type DNDType = "email" | "domain"; /** * Suppression action. * - `reject` — bounce the email at the gateway. * - `suppress` — silently drop the email. * - `suppress_tracking` — deliver but disable open/click tracking. Email-only. */ type DNDAction = "reject" | "suppress" | "suppress_tracking"; interface GetAllDNDList { /** Start date filter. Accepts a `Date` object, ISO string format, or timestamp. */ dateFrom?: Date | string | number; /** End date filter. Accepts a `Date` object, ISO string format, or timestamp. */ dateTo?: Date | string | number; limit?: number; offset?: number; agentKey?: string; searchValue?: string; dndType: DNDType; } interface AddToDNDList { /** Note: The `suppress_tracking` action is only applicable when `dndType` is `"email"`. */ action: DNDAction; agentKeys?: string[]; description?: string; dndType: DNDType; values: string[]; } type UpdateDNDEntry = AddToDNDList; interface DeleteDNDEntry { dndType: DNDType; /** Email addresses or domain names to delete from the suppression list. */ values: string[]; } /** A single entry in the suppression (DND) list (as returned by the GET endpoint). */ interface SuppressionEntry { value: string; action: DNDAction; description?: string; /** Last-modified timestamp, formatted as e.g. `"01 Mar 2024 04:44 PM"`. */ modified_time: string; mailagent_keys?: string[]; /** Source of the suppression, e.g. `"manual"`. */ category?: string; created_time: string; } interface SuppressionListResponse { data: SuppressionEntry[]; status: "success"; count?: number; } /** The `data` block returned by add (POST) and update (PUT) suppression APIs. */ interface SuppressionMutationData { modified_time: string; suppression_type: DNDType; values: string[]; action: DNDAction; description?: string; mailagent_keys?: string[]; category?: string; } interface SuppressionMutationResponse { data: SuppressionMutationData; status: "success"; } export type { ResponseType } from "../BaseModel/types"; export type { DNDType, DNDAction, GetAllDNDList, AddToDNDList, UpdateDNDEntry, DeleteDNDEntry, SuppressionEntry, SuppressionListResponse, SuppressionMutationData, SuppressionMutationResponse };