export type CreateAddressType = {
  username: string;
  password: string;
  domainId: string;
  title: string;
  quota?: number;
  templateId?: string;
  forwarders?: string[];
};

export type UpdateAddressType = {
  password?: string;
  displayName?: string;
  quota?: number;
  aliases?: string[];
  title?: string;
  forwarders?: string[];
  templateId?: string;
};

export interface AddressData extends Record<string, unknown> {
  id: string;
  createdAt: string;
  updatedAt: string;
  deletedAt: string | null;
  title: string;
  userName: string;
  password: string;
  emailAddress: string;
  emailEnabled: boolean;
  emailQuota: number;
  emailQuotaUsed: number;
  emailAccountId: string;
  displayName: string;
  isActive: boolean;
  emailSignature: string | null;
  role: string;
  forwarders?: string[];
  business: {
    id: string;
    createdAt: string;
    updatedAt: string;
    deletedAt: string | null;
    danakSubscriptionId: string;
    name: string;
    slug: string;
    logoUrl: string | null;
    domain: string;
  };
  domain: {
    id: string;
    createdAt: string;
    updatedAt: string;
    deletedAt: string | null;
    name: string;
    status: string;
    isVerified: boolean;
    isActive: boolean;
    verifiedAt: string;
    lastCheckedAt: string | null;
    notes: string;
    dkimEnabled: boolean;
    dkimSelector: string;
    dkimPrivateKey: string;
    dkimPublicKey: string;
    spfEnabled: boolean;
    spfRecord: string | null;
    dmarcEnabled: boolean;
    dmarcPolicy: string | null;
    business: string;
  };
  template: string | null;
}

export interface AddressResponse {
  data: {
    users: AddressData[];
    pager: {
      page: number;
      limit: number;
      total: number;
      totalPages: number;
    };
  };
}
