// AUTO-GENERATED by scripts/generate.ts from .generated-specs. Do not edit. import * as S from "@distilled.cloud/core/schema"; import * as API from "@distilled.cloud/core/api"; import * as T from "../traits.ts"; import { CloudflareProtocol, CloudflarePaginatedProtocol, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.ts"; import { cloudflarePaginate, ResultInfo } from "../pagination.ts"; import { CloudflareError, CloudflareRateLimited } from "../errors.ts"; import * as Retry from "../retry.ts"; export type { CloudflareOpError, CloudflareOpContext }; /** Fallback camelCase→wire mapping for opaque content (mined from the distilled SDK). */ const KEY_DICTIONARY: Record> = { actionLog: "action_log", actionParams: "action_params", actionType: "action_type", alertId: "alert_id", allowedDeliveryModes: "allowed_delivery_modes", allowlistedPattern: "allowlisted_pattern", allowlistedPatternType: "allowlisted_pattern_type", asName: "as_name", asNumber: "as_number", blocklistedMessage: "blocklisted_message", blocklistedPattern: "blocklisted_pattern", clientRecipient: "client_recipient", clientRecipients: "client_recipients", completedAt: "completed_at", completedTimestamp: "completed_timestamp", contentType: "content_type", createdAt: "created_at", customerStatus: "customer_status", deliveryMode: "delivery_mode", deliveryStatus: "delivery_status", detectionReasons: "detection_reasons", detectionsOnly: "detections_only", directoryId: "directory_id", directoryNodeId: "directory_node_id", dmarcStatus: "dmarc_status", dropDispositions: "drop_dispositions", edfHash: "edf_hash", emailMessageId: "email_message_id", emailsProcessed: "emails_processed", emlContent: "eml_content", envelopeFrom: "envelope_from", envelopeTo: "envelope_to", escalatedAs: "escalated_as", escalatedAt: "escalated_at", escalatedBy: "escalated_by", escalatedSubmissionId: "escalated_submission_id", exactSubject: "exact_subject", expectedDisposition: "expected_disposition", externalDirectoryNodeId: "external_directory_node_id", finalDisposition: "final_disposition", fromName: "from_name", htmltextStructureHash: "htmltext_structure_hash", inboxProvider: "inbox_provider", integrationId: "integration_id", ipRestrictions: "ip_restrictions", isAcceptableSender: "is_acceptable_sender", isEmailRegex: "is_email_regex", isExemptRecipient: "is_exempt_recipient", isPhishSubmission: "is_phish_submission", isQuarantined: "is_quarantined", isRecent: "is_recent", isRecipient: "is_recipient", isRegex: "is_regex", isSender: "is_sender", isSimilarity: "is_similarity", isSpoof: "is_spoof", isTrustedSender: "is_trusted_sender", itemCount: "item_count", jobId: "job_id", lastModified: "last_modified", loggedAt: "logged_at", lookbackHops: "lookback_hops", messageAction: "message_action", messageId: "message_id", messagesFailed: "messages_failed", messagesPending: "messages_pending", messagesSuccessful: "messages_successful", modifiedAt: "modified_at", o365TenantId: "o365_tenant_id", occurredAt: "occurred_at", originalDisposition: "original_disposition", originalEdfHash: "original_edf_hash", originalPostfixId: "original_postfix_id", outcomeDisposition: "outcome_disposition", patternType: "pattern_type", perPage: "per_page", postDeliveryOperations: "post_delivery_operations", postfixId: "postfix_id", postfixIdOutbound: "postfix_id_outbound", processedAt: "processed_at", requestedAt: "requested_at", requestedBy: "requested_by", requestedDisposition: "requested_disposition", requestedTs: "requested_ts", requireTlsInbound: "require_tls_inbound", requireTlsOutbound: "require_tls_outbound", resultInfo: "result_info", retryAfter: "retry_after", retryCount: "retry_count", scannedAt: "scanned_at", searchParams: "search_params", senderInfo: "sender_info", sentAt: "sent_at", sentDate: "sent_date", smtpHeloServerIp: "smtp_helo_server_ip", smtpPreviousHopIp: "smtp_previous_hop_ip", spfStatus: "spf_status", startedAt: "started_at", statusMessage: "status_message", submissionId: "submission_id", threatCategories: "threat_categories", toName: "to_name", totalCount: "total_count", totalEmailsProcessed: "total_emails_processed", totalEmailsProcessedPrevious: "total_emails_processed_previous", totalMessagesDiscovered: "total_messages_discovered", updatedAt: "updated_at", verifySender: "verify_sender", whitelistedPatternType: "whitelisted_pattern_type", xOriginatingIp: "x_originating_ip", }; export class AllowPolicyNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("AllowPolicyNotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export class BlockSenderNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("BlockSenderNotFound", { code: S.Number, message: S.String, }), [{ status: 404 }], ) {} export class EmailSecurityDomainNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "EmailSecurityDomainNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class EmailSecurityNotEntitled extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "EmailSecurityNotEntitled", { code: S.Number, message: S.String, }, ), [ { status: 403, message: { includes: "not available in the current subscription" }, }, ], ) {} export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class ImpersonationRegistryEntryNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "ImpersonationRegistryEntryNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export class TrustedDomainNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "TrustedDomainNotFound", { code: S.Number, message: S.String, }, ), [{ status: 404 }], ) {} export type InvestigateMoveBulkRequestDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateMoveBulkRequestDestination = /*@__PURE__*/ S.String; export type InvestigateMoveBulkRequestExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateMoveBulkRequestExpectedDisposition = /*@__PURE__*/ S.String; export type InvestigateMoveBulkRequestIdsList = Array; export const InvestigateMoveBulkRequestIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateMoveBulkRequestPostfixIdsList = Array; export const InvestigateMoveBulkRequestPostfixIdsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface BulkInvestigateMoveRequest { /** Identifier. */ accountId: string; destination: InvestigateMoveBulkRequestDestination | (string & {}); expectedDisposition?: | InvestigateMoveBulkRequestExpectedDisposition | (string & {}); /** List of message IDs to move */ ids?: InvestigateMoveBulkRequestIdsList; /** Deprecated, use `ids` instead. End of life: November 1, 2026. List of message IDs to move. */ postfixIds?: InvestigateMoveBulkRequestPostfixIdsList; } export const BulkInvestigateMoveRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), destination: InvestigateMoveBulkRequestDestination, expectedDisposition: S.optional( InvestigateMoveBulkRequestExpectedDisposition.pipe( T.Body("expected_disposition"), ), ), ids: S.optional(InvestigateMoveBulkRequestIdsList), postfixIds: S.optional( InvestigateMoveBulkRequestPostfixIdsList.pipe(T.Body("postfix_ids")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/move", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkInvestigateMoveRequest", }) as any as S.Schema; export interface InvestigateMoveBulkResultItem { /** Whether the operation succeeded */ success: boolean; /** When the move operation completed (UTC) */ completedAt?: string | null; /** Deprecated, use `completed_at` instead. End of life: November 1, 2026. */ completedTimestamp?: string | null; /** Destination folder for the message */ destination?: string | null; /** Number of items moved. End of life: November 1, 2026. */ itemCount?: number | null; /** Message identifier */ messageId?: string | null; /** Type of operation performed */ operation?: string | null; /** Recipient email address */ recipient?: string | null; /** Operation status */ status?: string | null; } export const InvestigateMoveBulkResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ success: S.Boolean, completedAt: S.optional(S.NullOr(S.String).pipe(T.Body("completed_at"))), completedTimestamp: S.optional( S.NullOr(S.String).pipe(T.Body("completed_timestamp")), ), destination: S.optional(S.NullOr(S.String)), itemCount: S.optional(S.NullOr(S.Number).pipe(T.Body("item_count"))), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), operation: S.optional(S.NullOr(S.String)), recipient: S.optional(S.NullOr(S.String)), status: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateMoveBulkResultItem", }) as any as S.Schema; export type InvestigateMoveBulkResultList = Array; export const InvestigateMoveBulkResultList = /*@__PURE__*/ S.Array( InvestigateMoveBulkResultItem, ) as any as S.Schema; export interface BulkInvestigateMoveResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: InvestigateMoveBulkResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkInvestigateMoveResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: InvestigateMoveBulkResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkInvestigateMoveResponse", }) as any as S.Schema; export type InvestigateReleaseBulkRequestBodyList = Array; export const InvestigateReleaseBulkRequestBodyList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface BulkInvestigateReleaseRequest { /** Identifier. */ accountId: string; body: InvestigateReleaseBulkRequestBodyList; } export const BulkInvestigateReleaseRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), body: InvestigateReleaseBulkRequestBodyList.pipe(T.HttpBody()), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/release", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkInvestigateReleaseRequest", }) as any as S.Schema; export type InvestigateReleaseBulkResultItemDeliveredList = Array; export const InvestigateReleaseBulkResultItemDeliveredList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateReleaseBulkResultItemFailedList = Array; export const InvestigateReleaseBulkResultItemFailedList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateReleaseBulkResultItemUndeliveredList = Array; export const InvestigateReleaseBulkResultItemUndeliveredList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface InvestigateReleaseBulkResultItem { /** Unique identifier for a message retrieved from investigation */ id: string; delivered?: InvestigateReleaseBulkResultItemDeliveredList | null; failed?: InvestigateReleaseBulkResultItemFailedList | null; /** Deprecated, use `id` instead. End of life: November 1, 2026. */ postfixId?: string | null; undelivered?: InvestigateReleaseBulkResultItemUndeliveredList | null; } export const InvestigateReleaseBulkResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, delivered: S.optional( S.NullOr(InvestigateReleaseBulkResultItemDeliveredList), ), failed: S.optional(S.NullOr(InvestigateReleaseBulkResultItemFailedList)), postfixId: S.optional(S.NullOr(S.String).pipe(T.Body("postfix_id"))), undelivered: S.optional( S.NullOr(InvestigateReleaseBulkResultItemUndeliveredList), ), }), ).annotate({ identifier: "InvestigateReleaseBulkResultItem", }) as any as S.Schema; export type InvestigateReleaseBulkResultList = Array; export const InvestigateReleaseBulkResultList = /*@__PURE__*/ S.Array( InvestigateReleaseBulkResultItem, ) as any as S.Schema; export interface BulkInvestigateReleaseResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: InvestigateReleaseBulkResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const BulkInvestigateReleaseResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: InvestigateReleaseBulkResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "BulkInvestigateReleaseResponse", }) as any as S.Schema; export type InvestigateBulkCreateRequestAction = "MOVE" | "RELEASE"; export const InvestigateBulkCreateRequestAction = /*@__PURE__*/ S.String; export type InvestigateBulkCreateRequestSearchParamsDeliveryStatus = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateBulkCreateRequestSearchParamsDeliveryStatus = /*@__PURE__*/ S.String; export type InvestigateBulkCreateRequestSearchParamsFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkCreateRequestSearchParamsFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateBulkCreateRequestSearchParamsMessageAction = | "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED"; export const InvestigateBulkCreateRequestSearchParamsMessageAction = /*@__PURE__*/ S.String; export interface InvestigateBulkCreateRequestSearchParams { /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog?: boolean; alertId?: string; /** Delivery status of the message. */ deliveryStatus?: | InvestigateBulkCreateRequestSearchParamsDeliveryStatus | (string & {}); detectionsOnly?: boolean; domain?: string; /** End of search date range */ end?: string; exactSubject?: string; finalDisposition?: | InvestigateBulkCreateRequestSearchParamsFinalDisposition | (string & {}); messageAction?: | InvestigateBulkCreateRequestSearchParamsMessageAction | (string & {}); messageId?: string; metric?: string; query?: string; recipient?: string; sender?: string; /** Beginning of search date range */ start?: string; subject?: string; submissions?: boolean; } export const InvestigateBulkCreateRequestSearchParams = /*@__PURE__*/ S.suspend( () => S.Struct({ actionLog: S.optional(S.Boolean.pipe(T.Body("action_log"))), alertId: S.optional(S.String.pipe(T.Body("alert_id"))), deliveryStatus: S.optional( InvestigateBulkCreateRequestSearchParamsDeliveryStatus.pipe( T.Body("delivery_status"), ), ), detectionsOnly: S.optional(S.Boolean.pipe(T.Body("detections_only"))), domain: S.optional(S.String), end: S.optional(S.String), exactSubject: S.optional(S.String.pipe(T.Body("exact_subject"))), finalDisposition: S.optional( InvestigateBulkCreateRequestSearchParamsFinalDisposition.pipe( T.Body("final_disposition"), ), ), messageAction: S.optional( InvestigateBulkCreateRequestSearchParamsMessageAction.pipe( T.Body("message_action"), ), ), messageId: S.optional(S.String.pipe(T.Body("message_id"))), metric: S.optional(S.String), query: S.optional(S.String), recipient: S.optional(S.String), sender: S.optional(S.String), start: S.optional(S.String), subject: S.optional(S.String), submissions: S.optional(S.Boolean), }), ).annotate({ identifier: "InvestigateBulkCreateRequestSearchParams", }) as any as S.Schema; export type InvestigateBulkCreateRequestDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateBulkCreateRequestDestination = /*@__PURE__*/ S.String; export type InvestigateBulkCreateRequestExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkCreateRequestExpectedDisposition = /*@__PURE__*/ S.String; export interface CreateInvestigateBulkRequest { /** Identifier. */ accountId: string; action: InvestigateBulkCreateRequestAction | (string & {}); searchParams: InvestigateBulkCreateRequestSearchParams; comment?: string; destination?: InvestigateBulkCreateRequestDestination | (string & {}); expectedDisposition?: | InvestigateBulkCreateRequestExpectedDisposition | (string & {}); } export const CreateInvestigateBulkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), action: InvestigateBulkCreateRequestAction, searchParams: InvestigateBulkCreateRequestSearchParams.pipe( T.Body("search_params"), ), comment: S.optional(S.String), destination: S.optional(InvestigateBulkCreateRequestDestination), expectedDisposition: S.optional( InvestigateBulkCreateRequestExpectedDisposition.pipe( T.Body("expected_disposition"), ), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/bulk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateBulkRequest", }) as any as S.Schema; export type InvestigateBulkCreateResponseActionParamsMoveDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateBulkCreateResponseActionParamsMoveDestination = /*@__PURE__*/ S.String; export type InvestigateBulkCreateResponseActionParamsMoveType = "MOVE"; export const InvestigateBulkCreateResponseActionParamsMoveType = /*@__PURE__*/ S.String; export type InvestigateBulkCreateResponseActionParamsMoveExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkCreateResponseActionParamsMoveExpectedDisposition = /*@__PURE__*/ S.String; export interface InvestigateBulkCreateResponseActionParamsMove { destination: InvestigateBulkCreateResponseActionParamsMoveDestination; type: InvestigateBulkCreateResponseActionParamsMoveType; expectedDisposition?: InvestigateBulkCreateResponseActionParamsMoveExpectedDisposition | null; } export const InvestigateBulkCreateResponseActionParamsMove = /*@__PURE__*/ S.suspend(() => S.Struct({ destination: InvestigateBulkCreateResponseActionParamsMoveDestination, type: InvestigateBulkCreateResponseActionParamsMoveType, expectedDisposition: S.optional( S.NullOr( InvestigateBulkCreateResponseActionParamsMoveExpectedDisposition, ).pipe(T.Body("expected_disposition")), ), }), ).annotate({ identifier: "InvestigateBulkCreateResponseActionParamsMove", }) as any as S.Schema; export type InvestigateBulkCreateResponseActionParamsReleaseType = "RELEASE"; export const InvestigateBulkCreateResponseActionParamsReleaseType = /*@__PURE__*/ S.String; export interface InvestigateBulkCreateResponseActionParamsRelease { type: InvestigateBulkCreateResponseActionParamsReleaseType; } export const InvestigateBulkCreateResponseActionParamsRelease = /*@__PURE__*/ S.suspend(() => S.Struct({ type: InvestigateBulkCreateResponseActionParamsReleaseType, }), ).annotate({ identifier: "InvestigateBulkCreateResponseActionParamsRelease", }) as any as S.Schema; export type InvestigateBulkCreateResponseActionParams = | InvestigateBulkCreateResponseActionParamsMove | InvestigateBulkCreateResponseActionParamsRelease; export const InvestigateBulkCreateResponseActionParams = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["destination", "type", "expectedDisposition"], ["type"]]), ); export type InvestigateBulkCreateResponseActionType = "MOVE" | "RELEASE"; export const InvestigateBulkCreateResponseActionType = /*@__PURE__*/ S.String; export type InvestigateBulkCreateResponseSearchParamsDeliveryStatus = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateBulkCreateResponseSearchParamsDeliveryStatus = /*@__PURE__*/ S.String; export type InvestigateBulkCreateResponseSearchParamsFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkCreateResponseSearchParamsFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateBulkCreateResponseSearchParamsMessageAction = | "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED"; export const InvestigateBulkCreateResponseSearchParamsMessageAction = /*@__PURE__*/ S.String; export interface InvestigateBulkCreateResponseSearchParams { /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog?: boolean | null; alertId?: string | null; /** Delivery status of the message. */ deliveryStatus?: InvestigateBulkCreateResponseSearchParamsDeliveryStatus | null; detectionsOnly?: boolean | null; domain?: string | null; /** End of search date range */ end?: string | null; exactSubject?: string | null; finalDisposition?: InvestigateBulkCreateResponseSearchParamsFinalDisposition | null; messageAction?: InvestigateBulkCreateResponseSearchParamsMessageAction | null; messageId?: string | null; metric?: string | null; query?: string | null; recipient?: string | null; sender?: string | null; /** Beginning of search date range */ start?: string | null; subject?: string | null; submissions?: boolean | null; } export const InvestigateBulkCreateResponseSearchParams = /*@__PURE__*/ S.suspend(() => S.Struct({ actionLog: S.optional(S.NullOr(S.Boolean).pipe(T.Body("action_log"))), alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), deliveryStatus: S.optional( S.NullOr(InvestigateBulkCreateResponseSearchParamsDeliveryStatus).pipe( T.Body("delivery_status"), ), ), detectionsOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("detections_only")), ), domain: S.optional(S.NullOr(S.String)), end: S.optional(S.NullOr(S.String)), exactSubject: S.optional( S.NullOr(S.String).pipe(T.Body("exact_subject")), ), finalDisposition: S.optional( S.NullOr( InvestigateBulkCreateResponseSearchParamsFinalDisposition, ).pipe(T.Body("final_disposition")), ), messageAction: S.optional( S.NullOr(InvestigateBulkCreateResponseSearchParamsMessageAction).pipe( T.Body("message_action"), ), ), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), metric: S.optional(S.NullOr(S.String)), query: S.optional(S.NullOr(S.String)), recipient: S.optional(S.NullOr(S.String)), sender: S.optional(S.NullOr(S.String)), start: S.optional(S.NullOr(S.String)), subject: S.optional(S.NullOr(S.String)), submissions: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "InvestigateBulkCreateResponseSearchParams", }) as any as S.Schema; export type InvestigateBulkCreateResponseStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkCreateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateInvestigateBulkResponse { actionParams: InvestigateBulkCreateResponseActionParams; actionType: InvestigateBulkCreateResponseActionType; createdAt: string; jobId: string; messagesFailed: number; messagesPending: number; messagesSuccessful: number; searchParams: InvestigateBulkCreateResponseSearchParams; status: InvestigateBulkCreateResponseStatus; totalMessagesDiscovered: number; comment?: string | null; completedAt?: string | null; startedAt?: string | null; statusMessage?: string | null; } export const CreateInvestigateBulkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ actionParams: InvestigateBulkCreateResponseActionParams.pipe( T.Body("action_params"), ), actionType: InvestigateBulkCreateResponseActionType.pipe( T.Body("action_type"), ), createdAt: S.String.pipe(T.Body("created_at")), jobId: S.String.pipe(T.Body("job_id")), messagesFailed: S.Number.pipe(T.Body("messages_failed")), messagesPending: S.Number.pipe(T.Body("messages_pending")), messagesSuccessful: S.Number.pipe(T.Body("messages_successful")), searchParams: InvestigateBulkCreateResponseSearchParams.pipe( T.Body("search_params"), ), status: InvestigateBulkCreateResponseStatus, totalMessagesDiscovered: S.Number.pipe(T.Body("total_messages_discovered")), comment: S.optional(S.NullOr(S.String)), completedAt: S.optional(S.NullOr(S.String).pipe(T.Body("completed_at"))), startedAt: S.optional(S.NullOr(S.String).pipe(T.Body("started_at"))), statusMessage: S.optional( S.NullOr(S.String).pipe(T.Body("status_message")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateBulkResponse", }) as any as S.Schema; export interface CreateInvestigateBulkCancelRequest { /** Identifier. */ accountId: string; jobId: string; } export const CreateInvestigateBulkCancelRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/bulk/{job_id}/cancel", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateBulkCancelRequest", }) as any as S.Schema; export type InvestigateBulkCancelCreateResponseActionParamsMoveDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateBulkCancelCreateResponseActionParamsMoveDestination = /*@__PURE__*/ S.String; export type InvestigateBulkCancelCreateResponseActionParamsMoveType = "MOVE"; export const InvestigateBulkCancelCreateResponseActionParamsMoveType = /*@__PURE__*/ S.String; export type InvestigateBulkCancelCreateResponseActionParamsMoveExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkCancelCreateResponseActionParamsMoveExpectedDisposition = /*@__PURE__*/ S.String; export interface InvestigateBulkCancelCreateResponseActionParamsMove { destination: InvestigateBulkCancelCreateResponseActionParamsMoveDestination; type: InvestigateBulkCancelCreateResponseActionParamsMoveType; expectedDisposition?: InvestigateBulkCancelCreateResponseActionParamsMoveExpectedDisposition | null; } export const InvestigateBulkCancelCreateResponseActionParamsMove = /*@__PURE__*/ S.suspend(() => S.Struct({ destination: InvestigateBulkCancelCreateResponseActionParamsMoveDestination, type: InvestigateBulkCancelCreateResponseActionParamsMoveType, expectedDisposition: S.optional( S.NullOr( InvestigateBulkCancelCreateResponseActionParamsMoveExpectedDisposition, ).pipe(T.Body("expected_disposition")), ), }), ).annotate({ identifier: "InvestigateBulkCancelCreateResponseActionParamsMove", }) as any as S.Schema; export type InvestigateBulkCancelCreateResponseActionParamsReleaseType = "RELEASE"; export const InvestigateBulkCancelCreateResponseActionParamsReleaseType = /*@__PURE__*/ S.String; export interface InvestigateBulkCancelCreateResponseActionParamsRelease { type: InvestigateBulkCancelCreateResponseActionParamsReleaseType; } export const InvestigateBulkCancelCreateResponseActionParamsRelease = /*@__PURE__*/ S.suspend(() => S.Struct({ type: InvestigateBulkCancelCreateResponseActionParamsReleaseType, }), ).annotate({ identifier: "InvestigateBulkCancelCreateResponseActionParamsRelease", }) as any as S.Schema; export type InvestigateBulkCancelCreateResponseActionParams = | InvestigateBulkCancelCreateResponseActionParamsMove | InvestigateBulkCancelCreateResponseActionParamsRelease; export const InvestigateBulkCancelCreateResponseActionParams = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["destination", "type", "expectedDisposition"], ["type"]]), ); export type InvestigateBulkCancelCreateResponseActionType = "MOVE" | "RELEASE"; export const InvestigateBulkCancelCreateResponseActionType = /*@__PURE__*/ S.String; export type InvestigateBulkCancelCreateResponseSearchParamsDeliveryStatus = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateBulkCancelCreateResponseSearchParamsDeliveryStatus = /*@__PURE__*/ S.String; export type InvestigateBulkCancelCreateResponseSearchParamsFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkCancelCreateResponseSearchParamsFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateBulkCancelCreateResponseSearchParamsMessageAction = | "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED"; export const InvestigateBulkCancelCreateResponseSearchParamsMessageAction = /*@__PURE__*/ S.String; export interface InvestigateBulkCancelCreateResponseSearchParams { /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog?: boolean | null; alertId?: string | null; /** Delivery status of the message. */ deliveryStatus?: InvestigateBulkCancelCreateResponseSearchParamsDeliveryStatus | null; detectionsOnly?: boolean | null; domain?: string | null; /** End of search date range */ end?: string | null; exactSubject?: string | null; finalDisposition?: InvestigateBulkCancelCreateResponseSearchParamsFinalDisposition | null; messageAction?: InvestigateBulkCancelCreateResponseSearchParamsMessageAction | null; messageId?: string | null; metric?: string | null; query?: string | null; recipient?: string | null; sender?: string | null; /** Beginning of search date range */ start?: string | null; subject?: string | null; submissions?: boolean | null; } export const InvestigateBulkCancelCreateResponseSearchParams = /*@__PURE__*/ S.suspend(() => S.Struct({ actionLog: S.optional(S.NullOr(S.Boolean).pipe(T.Body("action_log"))), alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), deliveryStatus: S.optional( S.NullOr( InvestigateBulkCancelCreateResponseSearchParamsDeliveryStatus, ).pipe(T.Body("delivery_status")), ), detectionsOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("detections_only")), ), domain: S.optional(S.NullOr(S.String)), end: S.optional(S.NullOr(S.String)), exactSubject: S.optional( S.NullOr(S.String).pipe(T.Body("exact_subject")), ), finalDisposition: S.optional( S.NullOr( InvestigateBulkCancelCreateResponseSearchParamsFinalDisposition, ).pipe(T.Body("final_disposition")), ), messageAction: S.optional( S.NullOr( InvestigateBulkCancelCreateResponseSearchParamsMessageAction, ).pipe(T.Body("message_action")), ), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), metric: S.optional(S.NullOr(S.String)), query: S.optional(S.NullOr(S.String)), recipient: S.optional(S.NullOr(S.String)), sender: S.optional(S.NullOr(S.String)), start: S.optional(S.NullOr(S.String)), subject: S.optional(S.NullOr(S.String)), submissions: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "InvestigateBulkCancelCreateResponseSearchParams", }) as any as S.Schema; export type InvestigateBulkCancelCreateResponseStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkCancelCreateResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateInvestigateBulkCancelResponse { actionParams: InvestigateBulkCancelCreateResponseActionParams; actionType: InvestigateBulkCancelCreateResponseActionType; createdAt: string; jobId: string; messagesFailed: number; messagesPending: number; messagesSuccessful: number; searchParams: InvestigateBulkCancelCreateResponseSearchParams; status: InvestigateBulkCancelCreateResponseStatus; totalMessagesDiscovered: number; comment?: string | null; completedAt?: string | null; startedAt?: string | null; statusMessage?: string | null; } export const CreateInvestigateBulkCancelResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ actionParams: InvestigateBulkCancelCreateResponseActionParams.pipe( T.Body("action_params"), ), actionType: InvestigateBulkCancelCreateResponseActionType.pipe( T.Body("action_type"), ), createdAt: S.String.pipe(T.Body("created_at")), jobId: S.String.pipe(T.Body("job_id")), messagesFailed: S.Number.pipe(T.Body("messages_failed")), messagesPending: S.Number.pipe(T.Body("messages_pending")), messagesSuccessful: S.Number.pipe(T.Body("messages_successful")), searchParams: InvestigateBulkCancelCreateResponseSearchParams.pipe( T.Body("search_params"), ), status: InvestigateBulkCancelCreateResponseStatus, totalMessagesDiscovered: S.Number.pipe(T.Body("total_messages_discovered")), comment: S.optional(S.NullOr(S.String)), completedAt: S.optional(S.NullOr(S.String).pipe(T.Body("completed_at"))), startedAt: S.optional(S.NullOr(S.String).pipe(T.Body("started_at"))), statusMessage: S.optional( S.NullOr(S.String).pipe(T.Body("status_message")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateBulkCancelResponse", }) as any as S.Schema; export type InvestigateMoveCreateRequestDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateMoveCreateRequestDestination = /*@__PURE__*/ S.String; export type InvestigateMoveCreateRequestExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateMoveCreateRequestExpectedDisposition = /*@__PURE__*/ S.String; export interface CreateInvestigateMoveRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; destination: InvestigateMoveCreateRequestDestination | (string & {}); expectedDisposition?: | InvestigateMoveCreateRequestExpectedDisposition | (string & {}); } export const CreateInvestigateMoveRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), destination: InvestigateMoveCreateRequestDestination, expectedDisposition: S.optional( InvestigateMoveCreateRequestExpectedDisposition.pipe( T.Body("expected_disposition"), ), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}/move", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateMoveRequest", }) as any as S.Schema; export type InvestigateMoveCreateResultItem = InvestigateMoveBulkResultItem; export const InvestigateMoveCreateResultItem = InvestigateMoveBulkResultItem; export type InvestigateMoveCreateResultList = Array; export const InvestigateMoveCreateResultList = /*@__PURE__*/ S.Array( InvestigateMoveBulkResultItem, ) as any as S.Schema; export interface CreateInvestigateMoveResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: InvestigateMoveCreateResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const CreateInvestigateMoveResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: InvestigateMoveCreateResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateMoveResponse", }) as any as S.Schema; export interface CreateInvestigatePreviewRequest { /** Identifier. */ accountId: string; /** The identifier of the message */ postfixId: string; } export const CreateInvestigatePreviewRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), postfixId: S.String.pipe(T.Body("postfix_id")), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/preview", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigatePreviewRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateInvestigatePreviewResponse { /** A base64 encoded PNG image of the email. */ screenshot: string; } export const CreateInvestigatePreviewResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ screenshot: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigatePreviewResponse", }) as any as S.Schema; export type InvestigateReclassifyCreateRequestExpectedDisposition = | "NONE" | "BULK" | "MALICIOUS" | "SPAM" | "SPOOF" | "SUSPICIOUS"; export const InvestigateReclassifyCreateRequestExpectedDisposition = /*@__PURE__*/ S.String; export interface CreateInvestigateReclassifyRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; expectedDisposition: | InvestigateReclassifyCreateRequestExpectedDisposition | (string & {}); /** Base64 encoded content of the EML file. */ emlContent?: string; escalatedSubmissionId?: string; } export const CreateInvestigateReclassifyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), expectedDisposition: InvestigateReclassifyCreateRequestExpectedDisposition.pipe( T.Body("expected_disposition"), ), emlContent: S.optional(S.String.pipe(T.Body("eml_content"))), escalatedSubmissionId: S.optional( S.String.pipe(T.Body("escalated_submission_id")), ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}/reclassify", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateReclassifyRequest", }) as any as S.Schema; export type CreateInvestigateReclassifyResponse = unknown; export const CreateInvestigateReclassifyResponse = /*@__PURE__*/ S.suspend(() => S.Unknown.pipe(T.EnvelopePayloadRoot(), T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateInvestigateReclassifyResponse", }) as any as S.Schema; export type SettingsAllowPoliciesCreateRequestPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesCreateRequestPatternType = /*@__PURE__*/ S.String; export interface CreateSettingAllowPolicyRequest { /** Identifier. */ accountId: string; /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. */ isAcceptableSender: boolean; /** Messages to this recipient will bypass all detections */ isExemptRecipient: boolean; isRegex: boolean; /** Messages from this sender will bypass all detections and link following */ isTrustedSender: boolean; pattern: string; /** Type of pattern matching. */ patternType: SettingsAllowPoliciesCreateRequestPatternType | (string & {}); /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */ verifySender: boolean; comments?: string; /** Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026. */ isRecipient?: boolean; /** Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026. */ isSender?: boolean; /** Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026. */ isSpoof?: boolean; } export const CreateSettingAllowPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), isAcceptableSender: S.Boolean.pipe(T.Body("is_acceptable_sender")), isExemptRecipient: S.Boolean.pipe(T.Body("is_exempt_recipient")), isRegex: S.Boolean.pipe(T.Body("is_regex")), isTrustedSender: S.Boolean.pipe(T.Body("is_trusted_sender")), pattern: S.String, patternType: SettingsAllowPoliciesCreateRequestPatternType.pipe( T.Body("pattern_type"), ), verifySender: S.Boolean.pipe(T.Body("verify_sender")), comments: S.optional(S.String), isRecipient: S.optional(S.Boolean.pipe(T.Body("is_recipient"))), isSender: S.optional(S.Boolean.pipe(T.Body("is_sender"))), isSpoof: S.optional(S.Boolean.pipe(T.Body("is_spoof"))), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/settings/allow_policies", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingAllowPolicyRequest", }) as any as S.Schema; export type SettingsAllowPoliciesCreateResponsePatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesCreateResponsePatternType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSettingAllowPolicyResponse { /** Allow policy identifier */ id: string; createdAt: string; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified: string; comments?: string | null; /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. */ isAcceptableSender?: boolean | null; /** Messages to this recipient will bypass all detections */ isExemptRecipient?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026. */ isRecipient?: boolean | null; isRegex?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026. */ isSender?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026. */ isSpoof?: boolean | null; /** Messages from this sender will bypass all detections and link following */ isTrustedSender?: boolean | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsAllowPoliciesCreateResponsePatternType | null; /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */ verifySender?: boolean | null; } export const CreateSettingAllowPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), lastModified: S.String.pipe(T.Body("last_modified")), comments: S.optional(S.NullOr(S.String)), isAcceptableSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_acceptable_sender")), ), isExemptRecipient: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_exempt_recipient")), ), isRecipient: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recipient"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_sender"))), isSpoof: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_spoof"))), isTrustedSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_trusted_sender")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsAllowPoliciesCreateResponsePatternType).pipe( T.Body("pattern_type"), ), ), verifySender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("verify_sender"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingAllowPolicyResponse", }) as any as S.Schema; export type SettingsBlockSendersCreateRequestPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersCreateRequestPatternType = /*@__PURE__*/ S.String; export interface CreateSettingBlockSenderRequest { /** Identifier. */ accountId: string; isRegex: boolean; pattern: string; /** Type of pattern matching. */ patternType: SettingsBlockSendersCreateRequestPatternType | (string & {}); comments?: string; } export const CreateSettingBlockSenderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), isRegex: S.Boolean.pipe(T.Body("is_regex")), pattern: S.String, patternType: SettingsBlockSendersCreateRequestPatternType.pipe( T.Body("pattern_type"), ), comments: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/settings/block_senders", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingBlockSenderRequest", }) as any as S.Schema; export type SettingsBlockSendersCreateResponsePatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersCreateResponsePatternType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSettingBlockSenderResponse { /** Blocked sender pattern identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; isRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsBlockSendersCreateResponsePatternType | null; } export const CreateSettingBlockSenderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsBlockSendersCreateResponsePatternType).pipe( T.Body("pattern_type"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingBlockSenderResponse", }) as any as S.Schema; export type SettingsImpersonationRegistryCreateRequestProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryCreateRequestProvenance = /*@__PURE__*/ S.String; export interface CreateSettingImpersonationRegistryRequest { /** Identifier. */ accountId: string; email: string; isEmailRegex: boolean; name: string; comments?: string; directoryId?: number; directoryNodeId?: number; externalDirectoryNodeId?: string; provenance?: | SettingsImpersonationRegistryCreateRequestProvenance | (string & {}); } export const CreateSettingImpersonationRegistryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), email: S.String, isEmailRegex: S.Boolean.pipe(T.Body("is_email_regex")), name: S.String, comments: S.optional(S.String), directoryId: S.optional(S.Number.pipe(T.Body("directory_id"))), directoryNodeId: S.optional(S.Number.pipe(T.Body("directory_node_id"))), externalDirectoryNodeId: S.optional( S.String.pipe(T.Body("external_directory_node_id")), ), provenance: S.optional( SettingsImpersonationRegistryCreateRequestProvenance, ), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/settings/impersonation_registry", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingImpersonationRegistryRequest", }) as any as S.Schema; export type SettingsImpersonationRegistryCreateResponseProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryCreateResponseProvenance = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSettingImpersonationRegistryResponse { /** Impersonation registry entry identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; directoryId?: number | null; directoryNodeId?: number | null; email?: string | null; externalDirectoryNodeId?: string | null; isEmailRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; name?: string | null; provenance?: SettingsImpersonationRegistryCreateResponseProvenance | null; } export const CreateSettingImpersonationRegistryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), directoryId: S.optional(S.NullOr(S.Number).pipe(T.Body("directory_id"))), directoryNodeId: S.optional( S.NullOr(S.Number).pipe(T.Body("directory_node_id")), ), email: S.optional(S.NullOr(S.String)), externalDirectoryNodeId: S.optional( S.NullOr(S.String).pipe(T.Body("external_directory_node_id")), ), isEmailRegex: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_email_regex")), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), name: S.optional(S.NullOr(S.String)), provenance: S.optional( S.NullOr(SettingsImpersonationRegistryCreateResponseProvenance), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingImpersonationRegistryResponse", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsCreateRequestExcludeList = Array; export const SettingsSendingDomainRestrictionsCreateRequestExcludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface CreateSettingSendingDomainRestrictionRequest { /** Identifier. */ accountId: string; /** Domain that requires TLS enforcement. */ domain: string; /** Excluded subdomains that are exempt from TLS requirements. */ exclude: SettingsSendingDomainRestrictionsCreateRequestExcludeList; comments?: string; } export const CreateSettingSendingDomainRestrictionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), domain: S.String, exclude: SettingsSendingDomainRestrictionsCreateRequestExcludeList, comments: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/settings/sending_domain_restrictions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingSendingDomainRestrictionRequest", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsCreateResponseExcludeList = Array; export const SettingsSendingDomainRestrictionsCreateResponseExcludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSettingSendingDomainRestrictionResponse { /** Sending domain restriction identifier. */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Domain that requires TLS enforcement. */ domain?: string | null; /** Excluded subdomains that are exempt from TLS requirements. */ exclude?: SettingsSendingDomainRestrictionsCreateResponseExcludeList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const CreateSettingSendingDomainRestrictionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), domain: S.optional(S.NullOr(S.String)), exclude: S.optional( S.NullOr(SettingsSendingDomainRestrictionsCreateResponseExcludeList), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingSendingDomainRestrictionResponse", }) as any as S.Schema; export interface CreateSettingTrustedDomainRequest { /** Identifier. */ accountId: string; /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */ isRecent: boolean; isRegex: boolean; /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */ isSimilarity: boolean; pattern: string; comments?: string; } export const CreateSettingTrustedDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), isRecent: S.Boolean.pipe(T.Body("is_recent")), isRegex: S.Boolean.pipe(T.Body("is_regex")), isSimilarity: S.Boolean.pipe(T.Body("is_similarity")), pattern: S.String, comments: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/settings/trusted_domains", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingTrustedDomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSettingTrustedDomainResponse { /** Trusted domain identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */ isRecent?: boolean | null; isRegex?: boolean | null; /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */ isSimilarity?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; } export const CreateSettingTrustedDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRecent: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recent"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSimilarity: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_similarity"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingTrustedDomainResponse", }) as any as S.Schema; export interface CreateSettingUrlIgnorePatternRequest { /** Identifier. */ accountId: string; /** Regular expression matching URLs that should not be rewritten. */ pattern: string; /** Optional note describing the reason for the ignore pattern. */ comments?: string; } export const CreateSettingUrlIgnorePatternRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), pattern: S.String, comments: S.optional(S.String), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email-security/settings/url_ignore_patterns", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingUrlIgnorePatternRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSettingUrlIgnorePatternResponse { /** URL ignore pattern identifier */ id: string; createdAt: string; /** Regular expression matching URLs that should not be rewritten. */ pattern: string; /** Optional note describing the reason for the ignore pattern. */ comments?: string | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const CreateSettingUrlIgnorePatternResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), pattern: S.String, comments: S.optional(S.NullOr(S.String)), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSettingUrlIgnorePatternResponse", }) as any as S.Schema; export interface DeleteInvestigateBulkRequest { /** Identifier. */ accountId: string; jobId: string; } export const DeleteInvestigateBulkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/investigate/bulk/{job_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteInvestigateBulkRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteInvestigateBulkResponse { id: string; } export const DeleteInvestigateBulkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteInvestigateBulkResponse", }) as any as S.Schema; export interface DeleteSettingAllowPolicyRequest { /** Identifier. */ accountId: string; /** Allow policy identifier */ policyId: string; } export const DeleteSettingAllowPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), policyId: S.String.pipe(T.Label("policy_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/allow_policies/{policy_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingAllowPolicyRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingAllowPolicyResponse { /** Allow policy identifier */ id: string; } export const DeleteSettingAllowPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingAllowPolicyResponse", }) as any as S.Schema; export interface DeleteSettingBlockSenderRequest { /** Identifier. */ accountId: string; /** Blocked sender pattern identifier */ patternId: string; } export const DeleteSettingBlockSenderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), patternId: S.String.pipe(T.Label("pattern_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/block_senders/{pattern_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingBlockSenderRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingBlockSenderResponse { /** Blocked sender pattern identifier */ id: string; } export const DeleteSettingBlockSenderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingBlockSenderResponse", }) as any as S.Schema; export interface DeleteSettingDomainRequest { /** Identifier. */ accountId: string; /** Domain identifier */ domainId: string; } export const DeleteSettingDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), domainId: S.String.pipe(T.Label("domain_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/domains/{domain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingDomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingDomainResponse { /** Domain identifier */ id: string; } export const DeleteSettingDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingDomainResponse", }) as any as S.Schema; export interface DeleteSettingImpersonationRegistryRequest { /** Identifier. */ accountId: string; /** Impersonation registry entry identifier */ impersonationRegistryId: string; } export const DeleteSettingImpersonationRegistryRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), impersonationRegistryId: S.String.pipe( T.Label("impersonation_registry_id"), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/impersonation_registry/{impersonation_registry_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingImpersonationRegistryRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingImpersonationRegistryResponse { /** Impersonation registry entry identifier */ id: string; } export const DeleteSettingImpersonationRegistryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingImpersonationRegistryResponse", }) as any as S.Schema; export interface DeleteSettingSendingDomainRestrictionRequest { /** Identifier. */ accountId: string; /** Sending domain restriction identifier. */ sendingDomainRestrictionId: string; } export const DeleteSettingSendingDomainRestrictionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), sendingDomainRestrictionId: S.String.pipe( T.Label("sending_domain_restriction_id"), ), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/sending_domain_restrictions/{sending_domain_restriction_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingSendingDomainRestrictionRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingSendingDomainRestrictionResponse { /** Sending domain restriction identifier. */ id: string; } export const DeleteSettingSendingDomainRestrictionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingSendingDomainRestrictionResponse", }) as any as S.Schema; export interface DeleteSettingTrustedDomainRequest { /** Identifier. */ accountId: string; /** Trusted domain identifier */ trustedDomainId: string; } export const DeleteSettingTrustedDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), trustedDomainId: S.String.pipe(T.Label("trusted_domain_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/trusted_domains/{trusted_domain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingTrustedDomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingTrustedDomainResponse { /** Trusted domain identifier */ id: string; } export const DeleteSettingTrustedDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingTrustedDomainResponse", }) as any as S.Schema; export interface DeleteSettingUrlIgnorePatternRequest { /** Identifier. */ accountId: string; /** URL ignore pattern identifier */ patternId: string; } export const DeleteSettingUrlIgnorePatternRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), patternId: S.String.pipe(T.Label("pattern_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/accounts/{account_id}/email-security/settings/url_ignore_patterns/{pattern_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingUrlIgnorePatternRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface DeleteSettingUrlIgnorePatternResponse { /** URL ignore pattern identifier */ id: string; } export const DeleteSettingUrlIgnorePatternResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSettingUrlIgnorePatternResponse", }) as any as S.Schema; export interface GetInvestigateRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; /** When true, search the submissions datastore only. When false or omitted, search the */ submission?: boolean; } export const GetInvestigateRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), submission: S.optional(S.Boolean.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateRequest", }) as any as S.Schema; export type InvestigateGetResponseActionLogItemOperation = | "MOVE" | "RELEASE" | "RECLASSIFY" | "SUBMISSION" | "QUARANTINE_RELEASE" | "PREVIEW"; export const InvestigateGetResponseActionLogItemOperation = /*@__PURE__*/ S.String; export interface InvestigateGetResponseActionLogItemProperties { /** Target folder for move operations */ folder?: string | null; /** User who requested the action */ requestedBy?: string | null; } export const InvestigateGetResponseActionLogItemProperties = /*@__PURE__*/ S.suspend(() => S.Struct({ folder: S.optional(S.NullOr(S.String)), requestedBy: S.optional(S.NullOr(S.String).pipe(T.Body("requested_by"))), }), ).annotate({ identifier: "InvestigateGetResponseActionLogItemProperties", }) as any as S.Schema; export interface InvestigateGetResponseActionLogItem { /** Timestamp when action completed */ completedAt: string; /** Type of action performed */ operation: InvestigateGetResponseActionLogItemOperation; /** Deprecated, use `completed_at` instead. End of life: November 1, 2026. */ completedTimestamp?: string | null; /** Additional properties for the action */ properties?: InvestigateGetResponseActionLogItemProperties | null; /** Status of the action */ status?: string | null; } export const InvestigateGetResponseActionLogItem = /*@__PURE__*/ S.suspend(() => S.Struct({ completedAt: S.String.pipe(T.Body("completed_at")), operation: InvestigateGetResponseActionLogItemOperation, completedTimestamp: S.optional( S.NullOr(S.String).pipe(T.Body("completed_timestamp")), ), properties: S.optional( S.NullOr(InvestigateGetResponseActionLogItemProperties), ), status: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateGetResponseActionLogItem", }) as any as S.Schema; export type InvestigateGetResponseActionLogList = Array; export const InvestigateGetResponseActionLogList = /*@__PURE__*/ S.Array( InvestigateGetResponseActionLogItem, ) as any as S.Schema; export type InvestigateGetResponseClientRecipientsList = Array; export const InvestigateGetResponseClientRecipientsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateGetResponseDetectionReasonsList = Array; export const InvestigateGetResponseDetectionReasonsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateGetResponsePropertiesAllowlistedPatternType = | "quarantine_release" | "acceptable_sender" | "allowed_sender" | "allowed_recipient" | "domain_similarity" | "domain_recency" | "managed_acceptable_sender" | "outbound_ndr"; export const InvestigateGetResponsePropertiesAllowlistedPatternType = /*@__PURE__*/ S.String; export type InvestigateGetResponsePropertiesWhitelistedPatternType = | "quarantine_release" | "acceptable_sender" | "allowed_sender" | "allowed_recipient" | "domain_similarity" | "domain_recency" | "managed_acceptable_sender" | "outbound_ndr"; export const InvestigateGetResponsePropertiesWhitelistedPatternType = /*@__PURE__*/ S.String; export interface InvestigateGetResponseProperties { /** Pattern that allowlisted this message */ allowlistedPattern?: string | null; /** Type of allowlist pattern */ allowlistedPatternType?: InvestigateGetResponsePropertiesAllowlistedPatternType | null; /** Whether message was blocklisted */ blocklistedMessage?: boolean | null; /** Pattern that blocklisted this message */ blocklistedPattern?: string | null; /** Legacy field for allowlist pattern type */ whitelistedPatternType?: InvestigateGetResponsePropertiesWhitelistedPatternType | null; } export const InvestigateGetResponseProperties = /*@__PURE__*/ S.suspend(() => S.Struct({ allowlistedPattern: S.optional( S.NullOr(S.String).pipe(T.Body("allowlisted_pattern")), ), allowlistedPatternType: S.optional( S.NullOr(InvestigateGetResponsePropertiesAllowlistedPatternType).pipe( T.Body("allowlisted_pattern_type"), ), ), blocklistedMessage: S.optional( S.NullOr(S.Boolean).pipe(T.Body("blocklisted_message")), ), blocklistedPattern: S.optional( S.NullOr(S.String).pipe(T.Body("blocklisted_pattern")), ), whitelistedPatternType: S.optional( S.NullOr(InvestigateGetResponsePropertiesWhitelistedPatternType).pipe( T.Body("whitelisted_pattern_type"), ), ), }), ).annotate({ identifier: "InvestigateGetResponseProperties", }) as any as S.Schema; export type InvestigateGetResponseDeliveryMode = | "DIRECT" | "BCC" | "JOURNAL" | "REVIEW_SUBMISSION" | "DMARC_UNVERIFIED" | "DMARC_FAILURE_REPORT" | "DMARC_AGGREGATE_REPORT" | "THREAT_INTEL_SUBMISSION" | "SIMULATION_SUBMISSION" | "API" | "RETRO_SCAN"; export const InvestigateGetResponseDeliveryMode = /*@__PURE__*/ S.String; export type InvestigateGetResponseDeliveryStatusItem = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateGetResponseDeliveryStatusItem = /*@__PURE__*/ S.String; export type InvestigateGetResponseDeliveryStatusList = Array; export const InvestigateGetResponseDeliveryStatusList = /*@__PURE__*/ S.Array( InvestigateGetResponseDeliveryStatusItem, ) as any as S.Schema; export type InvestigateGetResponseEnvelopeToList = Array; export const InvestigateGetResponseEnvelopeToList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateGetResponseFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateGetResponseFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateGetResponseFindingsItemDetection = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateGetResponseFindingsItemDetection = /*@__PURE__*/ S.String; export interface InvestigateGetResponseFindingsItem { attachment?: string | null; detail?: string | null; detection?: InvestigateGetResponseFindingsItemDetection | null; field?: string | null; name?: string | null; portion?: string | null; reason?: string | null; score?: number | null; value?: string | null; } export const InvestigateGetResponseFindingsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ attachment: S.optional(S.NullOr(S.String)), detail: S.optional(S.NullOr(S.String)), detection: S.optional( S.NullOr(InvestigateGetResponseFindingsItemDetection), ), field: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), portion: S.optional(S.NullOr(S.String)), reason: S.optional(S.NullOr(S.String)), score: S.optional(S.NullOr(S.Number)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateGetResponseFindingsItem", }) as any as S.Schema; export type InvestigateGetResponseFindingsList = Array; export const InvestigateGetResponseFindingsList = /*@__PURE__*/ S.Array( InvestigateGetResponseFindingsItem, ) as any as S.Schema; export type InvestigateGetResponsePostDeliveryOperationsItem = | "PREVIEW" | "QUARANTINE_RELEASE" | "SUBMISSION" | "MOVE"; export const InvestigateGetResponsePostDeliveryOperationsItem = /*@__PURE__*/ S.String; export type InvestigateGetResponsePostDeliveryOperationsList = Array; export const InvestigateGetResponsePostDeliveryOperationsList = /*@__PURE__*/ S.Array( InvestigateGetResponsePostDeliveryOperationsItem, ) as any as S.Schema; export type InvestigateGetResponseThreatCategoriesList = Array; export const InvestigateGetResponseThreatCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateGetResponseToList = Array; export const InvestigateGetResponseToList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateGetResponseToNameList = Array; export const InvestigateGetResponseToNameList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateGetResponseValidationDkim = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateGetResponseValidationDkim = /*@__PURE__*/ S.String; export type InvestigateGetResponseValidationDmarc = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateGetResponseValidationDmarc = /*@__PURE__*/ S.String; export type InvestigateGetResponseValidationSpf = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateGetResponseValidationSpf = /*@__PURE__*/ S.String; export interface InvestigateGetResponseValidation { comment?: string | null; dkim?: InvestigateGetResponseValidationDkim | null; dmarc?: InvestigateGetResponseValidationDmarc | null; spf?: InvestigateGetResponseValidationSpf | null; } export const InvestigateGetResponseValidation = /*@__PURE__*/ S.suspend(() => S.Struct({ comment: S.optional(S.NullOr(S.String)), dkim: S.optional(S.NullOr(InvestigateGetResponseValidationDkim)), dmarc: S.optional(S.NullOr(InvestigateGetResponseValidationDmarc)), spf: S.optional(S.NullOr(InvestigateGetResponseValidationSpf)), }), ).annotate({ identifier: "InvestigateGetResponseValidation", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetInvestigateResponse { /** Unique identifier for a message retrieved from investigation */ id: string; /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog: InvestigateGetResponseActionLogList; clientRecipients: InvestigateGetResponseClientRecipientsList; detectionReasons: InvestigateGetResponseDetectionReasonsList; isPhishSubmission: boolean; isQuarantined: boolean; /** The identifier of the message */ postfixId: string; /** Message processing properties */ properties: InvestigateGetResponseProperties; /** Deprecated, use `scanned_at` instead. End of life: November 1, 2026. */ ts: string; alertId?: string | null; deliveryMode?: InvestigateGetResponseDeliveryMode | null; deliveryStatus?: InvestigateGetResponseDeliveryStatusList | null; edfHash?: string | null; envelopeFrom?: string | null; envelopeTo?: InvestigateGetResponseEnvelopeToList | null; finalDisposition?: InvestigateGetResponseFinalDisposition | null; /** Deprecated, use the `findings` field from `GET /investigate/{investigate_id}/detections` instead. End of life: November 1, 2026. Detection findings for this message. */ findings?: InvestigateGetResponseFindingsList | null; from?: string | null; fromName?: string | null; htmltextStructureHash?: string | null; messageId?: string | null; /** Post-delivery operations performed on this message */ postDeliveryOperations?: InvestigateGetResponsePostDeliveryOperationsList | null; postfixIdOutbound?: string | null; replyto?: string | null; /** When the message was scanned (UTC) */ scannedAt?: string | null; /** When the message was sent (UTC) */ sentAt?: string | null; sentDate?: string | null; smtpHeloServerIp?: string | null; smtpPreviousHopIp?: string | null; subject?: string | null; threatCategories?: InvestigateGetResponseThreatCategoriesList | null; to?: InvestigateGetResponseToList | null; toName?: InvestigateGetResponseToNameList | null; validation?: InvestigateGetResponseValidation | null; xOriginatingIp?: string | null; } export const GetInvestigateResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, actionLog: InvestigateGetResponseActionLogList.pipe(T.Body("action_log")), clientRecipients: InvestigateGetResponseClientRecipientsList.pipe( T.Body("client_recipients"), ), detectionReasons: InvestigateGetResponseDetectionReasonsList.pipe( T.Body("detection_reasons"), ), isPhishSubmission: S.Boolean.pipe(T.Body("is_phish_submission")), isQuarantined: S.Boolean.pipe(T.Body("is_quarantined")), postfixId: S.String.pipe(T.Body("postfix_id")), properties: InvestigateGetResponseProperties, ts: S.String, alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), deliveryMode: S.optional( S.NullOr(InvestigateGetResponseDeliveryMode).pipe( T.Body("delivery_mode"), ), ), deliveryStatus: S.optional( S.NullOr(InvestigateGetResponseDeliveryStatusList).pipe( T.Body("delivery_status"), ), ), edfHash: S.optional(S.NullOr(S.String).pipe(T.Body("edf_hash"))), envelopeFrom: S.optional(S.NullOr(S.String).pipe(T.Body("envelope_from"))), envelopeTo: S.optional( S.NullOr(InvestigateGetResponseEnvelopeToList).pipe( T.Body("envelope_to"), ), ), finalDisposition: S.optional( S.NullOr(InvestigateGetResponseFinalDisposition).pipe( T.Body("final_disposition"), ), ), findings: S.optional(S.NullOr(InvestigateGetResponseFindingsList)), from: S.optional(S.NullOr(S.String)), fromName: S.optional(S.NullOr(S.String).pipe(T.Body("from_name"))), htmltextStructureHash: S.optional( S.NullOr(S.String).pipe(T.Body("htmltext_structure_hash")), ), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), postDeliveryOperations: S.optional( S.NullOr(InvestigateGetResponsePostDeliveryOperationsList).pipe( T.Body("post_delivery_operations"), ), ), postfixIdOutbound: S.optional( S.NullOr(S.String).pipe(T.Body("postfix_id_outbound")), ), replyto: S.optional(S.NullOr(S.String)), scannedAt: S.optional(S.NullOr(S.String).pipe(T.Body("scanned_at"))), sentAt: S.optional(S.NullOr(S.String).pipe(T.Body("sent_at"))), sentDate: S.optional(S.NullOr(S.String).pipe(T.Body("sent_date"))), smtpHeloServerIp: S.optional( S.NullOr(S.String).pipe(T.Body("smtp_helo_server_ip")), ), smtpPreviousHopIp: S.optional( S.NullOr(S.String).pipe(T.Body("smtp_previous_hop_ip")), ), subject: S.optional(S.NullOr(S.String)), threatCategories: S.optional( S.NullOr(InvestigateGetResponseThreatCategoriesList).pipe( T.Body("threat_categories"), ), ), to: S.optional(S.NullOr(InvestigateGetResponseToList)), toName: S.optional( S.NullOr(InvestigateGetResponseToNameList).pipe(T.Body("to_name")), ), validation: S.optional(S.NullOr(InvestigateGetResponseValidation)), xOriginatingIp: S.optional( S.NullOr(S.String).pipe(T.Body("x_originating_ip")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateResponse", }) as any as S.Schema; export interface GetInvestigateBulkRequest { /** Identifier. */ accountId: string; jobId: string; } export const GetInvestigateBulkRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/bulk/{job_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateBulkRequest", }) as any as S.Schema; export type InvestigateBulkGetResponseActionParamsMoveDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateBulkGetResponseActionParamsMoveDestination = /*@__PURE__*/ S.String; export type InvestigateBulkGetResponseActionParamsMoveType = "MOVE"; export const InvestigateBulkGetResponseActionParamsMoveType = /*@__PURE__*/ S.String; export type InvestigateBulkGetResponseActionParamsMoveExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkGetResponseActionParamsMoveExpectedDisposition = /*@__PURE__*/ S.String; export interface InvestigateBulkGetResponseActionParamsMove { destination: InvestigateBulkGetResponseActionParamsMoveDestination; type: InvestigateBulkGetResponseActionParamsMoveType; expectedDisposition?: InvestigateBulkGetResponseActionParamsMoveExpectedDisposition | null; } export const InvestigateBulkGetResponseActionParamsMove = /*@__PURE__*/ S.suspend(() => S.Struct({ destination: InvestigateBulkGetResponseActionParamsMoveDestination, type: InvestigateBulkGetResponseActionParamsMoveType, expectedDisposition: S.optional( S.NullOr( InvestigateBulkGetResponseActionParamsMoveExpectedDisposition, ).pipe(T.Body("expected_disposition")), ), }), ).annotate({ identifier: "InvestigateBulkGetResponseActionParamsMove", }) as any as S.Schema; export type InvestigateBulkGetResponseActionParamsReleaseType = "RELEASE"; export const InvestigateBulkGetResponseActionParamsReleaseType = /*@__PURE__*/ S.String; export interface InvestigateBulkGetResponseActionParamsRelease { type: InvestigateBulkGetResponseActionParamsReleaseType; } export const InvestigateBulkGetResponseActionParamsRelease = /*@__PURE__*/ S.suspend(() => S.Struct({ type: InvestigateBulkGetResponseActionParamsReleaseType, }), ).annotate({ identifier: "InvestigateBulkGetResponseActionParamsRelease", }) as any as S.Schema; export type InvestigateBulkGetResponseActionParams = | InvestigateBulkGetResponseActionParamsMove | InvestigateBulkGetResponseActionParamsRelease; export const InvestigateBulkGetResponseActionParams = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["destination", "type", "expectedDisposition"], ["type"]]), ); export type InvestigateBulkGetResponseActionType = "MOVE" | "RELEASE"; export const InvestigateBulkGetResponseActionType = /*@__PURE__*/ S.String; export type InvestigateBulkGetResponseSearchParamsDeliveryStatus = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateBulkGetResponseSearchParamsDeliveryStatus = /*@__PURE__*/ S.String; export type InvestigateBulkGetResponseSearchParamsFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkGetResponseSearchParamsFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateBulkGetResponseSearchParamsMessageAction = | "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED"; export const InvestigateBulkGetResponseSearchParamsMessageAction = /*@__PURE__*/ S.String; export interface InvestigateBulkGetResponseSearchParams { /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog?: boolean | null; alertId?: string | null; /** Delivery status of the message. */ deliveryStatus?: InvestigateBulkGetResponseSearchParamsDeliveryStatus | null; detectionsOnly?: boolean | null; domain?: string | null; /** End of search date range */ end?: string | null; exactSubject?: string | null; finalDisposition?: InvestigateBulkGetResponseSearchParamsFinalDisposition | null; messageAction?: InvestigateBulkGetResponseSearchParamsMessageAction | null; messageId?: string | null; metric?: string | null; query?: string | null; recipient?: string | null; sender?: string | null; /** Beginning of search date range */ start?: string | null; subject?: string | null; submissions?: boolean | null; } export const InvestigateBulkGetResponseSearchParams = /*@__PURE__*/ S.suspend( () => S.Struct({ actionLog: S.optional(S.NullOr(S.Boolean).pipe(T.Body("action_log"))), alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), deliveryStatus: S.optional( S.NullOr(InvestigateBulkGetResponseSearchParamsDeliveryStatus).pipe( T.Body("delivery_status"), ), ), detectionsOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("detections_only")), ), domain: S.optional(S.NullOr(S.String)), end: S.optional(S.NullOr(S.String)), exactSubject: S.optional( S.NullOr(S.String).pipe(T.Body("exact_subject")), ), finalDisposition: S.optional( S.NullOr(InvestigateBulkGetResponseSearchParamsFinalDisposition).pipe( T.Body("final_disposition"), ), ), messageAction: S.optional( S.NullOr(InvestigateBulkGetResponseSearchParamsMessageAction).pipe( T.Body("message_action"), ), ), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), metric: S.optional(S.NullOr(S.String)), query: S.optional(S.NullOr(S.String)), recipient: S.optional(S.NullOr(S.String)), sender: S.optional(S.NullOr(S.String)), start: S.optional(S.NullOr(S.String)), subject: S.optional(S.NullOr(S.String)), submissions: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "InvestigateBulkGetResponseSearchParams", }) as any as S.Schema; export type InvestigateBulkGetResponseStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkGetResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetInvestigateBulkResponse { actionParams: InvestigateBulkGetResponseActionParams; actionType: InvestigateBulkGetResponseActionType; createdAt: string; jobId: string; messagesFailed: number; messagesPending: number; messagesSuccessful: number; searchParams: InvestigateBulkGetResponseSearchParams; status: InvestigateBulkGetResponseStatus; totalMessagesDiscovered: number; comment?: string | null; completedAt?: string | null; startedAt?: string | null; statusMessage?: string | null; } export const GetInvestigateBulkResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ actionParams: InvestigateBulkGetResponseActionParams.pipe( T.Body("action_params"), ), actionType: InvestigateBulkGetResponseActionType.pipe( T.Body("action_type"), ), createdAt: S.String.pipe(T.Body("created_at")), jobId: S.String.pipe(T.Body("job_id")), messagesFailed: S.Number.pipe(T.Body("messages_failed")), messagesPending: S.Number.pipe(T.Body("messages_pending")), messagesSuccessful: S.Number.pipe(T.Body("messages_successful")), searchParams: InvestigateBulkGetResponseSearchParams.pipe( T.Body("search_params"), ), status: InvestigateBulkGetResponseStatus, totalMessagesDiscovered: S.Number.pipe(T.Body("total_messages_discovered")), comment: S.optional(S.NullOr(S.String)), completedAt: S.optional(S.NullOr(S.String).pipe(T.Body("completed_at"))), startedAt: S.optional(S.NullOr(S.String).pipe(T.Body("started_at"))), statusMessage: S.optional( S.NullOr(S.String).pipe(T.Body("status_message")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateBulkResponse", }) as any as S.Schema; export interface GetInvestigateDetectionRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; } export const GetInvestigateDetectionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}/detections", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateDetectionRequest", }) as any as S.Schema; export type InvestigateDetectionsGetResponseAttachmentsItemDetection = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateDetectionsGetResponseAttachmentsItemDetection = /*@__PURE__*/ S.String; export interface InvestigateDetectionsGetResponseAttachmentsItem { /** Size of the attachment in bytes */ size: number; /** MIME type of the attachment */ contentType?: string | null; /** Detection result for this attachment */ detection?: InvestigateDetectionsGetResponseAttachmentsItemDetection | null; /** Whether the attachment is encrypted */ encrypted?: boolean | null; /** Name of the attached file */ filename?: string | null; /** MD5 hash of the attachment */ md5?: string | null; /** Attachment name (alternative to filename) */ name?: string | null; /** SHA1 hash of the attachment */ sha1?: string | null; /** SHA256 hash of the attachment */ sha256?: string | null; } export const InvestigateDetectionsGetResponseAttachmentsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ size: S.Number, contentType: S.optional(S.NullOr(S.String).pipe(T.Body("content_type"))), detection: S.optional( S.NullOr(InvestigateDetectionsGetResponseAttachmentsItemDetection), ), encrypted: S.optional(S.NullOr(S.Boolean)), filename: S.optional(S.NullOr(S.String)), md5: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), sha1: S.optional(S.NullOr(S.String)), sha256: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateDetectionsGetResponseAttachmentsItem", }) as any as S.Schema; export type InvestigateDetectionsGetResponseAttachmentsList = Array; export const InvestigateDetectionsGetResponseAttachmentsList = /*@__PURE__*/ S.Array( InvestigateDetectionsGetResponseAttachmentsItem, ) as any as S.Schema; export type InvestigateDetectionsGetResponseFindingsItemDetection = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateDetectionsGetResponseFindingsItemDetection = /*@__PURE__*/ S.String; export interface InvestigateDetectionsGetResponseFindingsItem { attachment?: string | null; detail?: string | null; detection?: InvestigateDetectionsGetResponseFindingsItemDetection | null; field?: string | null; name?: string | null; portion?: string | null; reason?: string | null; score?: number | null; value?: string | null; } export const InvestigateDetectionsGetResponseFindingsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ attachment: S.optional(S.NullOr(S.String)), detail: S.optional(S.NullOr(S.String)), detection: S.optional( S.NullOr(InvestigateDetectionsGetResponseFindingsItemDetection), ), field: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), portion: S.optional(S.NullOr(S.String)), reason: S.optional(S.NullOr(S.String)), score: S.optional(S.NullOr(S.Number)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateDetectionsGetResponseFindingsItem", }) as any as S.Schema; export type InvestigateDetectionsGetResponseFindingsList = Array; export const InvestigateDetectionsGetResponseFindingsList = /*@__PURE__*/ S.Array( InvestigateDetectionsGetResponseFindingsItem, ) as any as S.Schema; export interface InvestigateDetectionsGetResponseHeadersItem { name: string; value: string; } export const InvestigateDetectionsGetResponseHeadersItem = /*@__PURE__*/ S.suspend(() => S.Struct({ name: S.String, value: S.String, }), ).annotate({ identifier: "InvestigateDetectionsGetResponseHeadersItem", }) as any as S.Schema; export type InvestigateDetectionsGetResponseHeadersList = Array; export const InvestigateDetectionsGetResponseHeadersList = /*@__PURE__*/ S.Array( InvestigateDetectionsGetResponseHeadersItem, ) as any as S.Schema; export interface InvestigateDetectionsGetResponseLinksItem { href: string; text?: string | null; } export const InvestigateDetectionsGetResponseLinksItem = /*@__PURE__*/ S.suspend(() => S.Struct({ href: S.String, text: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateDetectionsGetResponseLinksItem", }) as any as S.Schema; export type InvestigateDetectionsGetResponseLinksList = Array; export const InvestigateDetectionsGetResponseLinksList = /*@__PURE__*/ S.Array( InvestigateDetectionsGetResponseLinksItem, ) as any as S.Schema; export interface InvestigateDetectionsGetResponseSenderInfo { /** The name of the autonomous system. */ asName?: string | null; /** The number of the autonomous system. */ asNumber?: number | null; geo?: string | null; ip?: string | null; pld?: string | null; } export const InvestigateDetectionsGetResponseSenderInfo = /*@__PURE__*/ S.suspend(() => S.Struct({ asName: S.optional(S.NullOr(S.String).pipe(T.Body("as_name"))), asNumber: S.optional(S.NullOr(S.Number).pipe(T.Body("as_number"))), geo: S.optional(S.NullOr(S.String)), ip: S.optional(S.NullOr(S.String)), pld: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateDetectionsGetResponseSenderInfo", }) as any as S.Schema; export interface InvestigateDetectionsGetResponseThreatCategoriesItem { id?: number | null; description?: string | null; name?: string | null; } export const InvestigateDetectionsGetResponseThreatCategoriesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.Number)), description: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateDetectionsGetResponseThreatCategoriesItem", }) as any as S.Schema; export type InvestigateDetectionsGetResponseThreatCategoriesList = Array; export const InvestigateDetectionsGetResponseThreatCategoriesList = /*@__PURE__*/ S.Array( InvestigateDetectionsGetResponseThreatCategoriesItem, ) as any as S.Schema; export type InvestigateDetectionsGetResponseValidationDkim = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateDetectionsGetResponseValidationDkim = /*@__PURE__*/ S.String; export type InvestigateDetectionsGetResponseValidationDmarc = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateDetectionsGetResponseValidationDmarc = /*@__PURE__*/ S.String; export type InvestigateDetectionsGetResponseValidationSpf = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateDetectionsGetResponseValidationSpf = /*@__PURE__*/ S.String; export interface InvestigateDetectionsGetResponseValidation { comment?: string | null; dkim?: InvestigateDetectionsGetResponseValidationDkim | null; dmarc?: InvestigateDetectionsGetResponseValidationDmarc | null; spf?: InvestigateDetectionsGetResponseValidationSpf | null; } export const InvestigateDetectionsGetResponseValidation = /*@__PURE__*/ S.suspend(() => S.Struct({ comment: S.optional(S.NullOr(S.String)), dkim: S.optional( S.NullOr(InvestigateDetectionsGetResponseValidationDkim), ), dmarc: S.optional( S.NullOr(InvestigateDetectionsGetResponseValidationDmarc), ), spf: S.optional(S.NullOr(InvestigateDetectionsGetResponseValidationSpf)), }), ).annotate({ identifier: "InvestigateDetectionsGetResponseValidation", }) as any as S.Schema; export type InvestigateDetectionsGetResponseFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateDetectionsGetResponseFinalDisposition = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetInvestigateDetectionResponse { action: string; attachments: InvestigateDetectionsGetResponseAttachmentsList; findings: InvestigateDetectionsGetResponseFindingsList; headers: InvestigateDetectionsGetResponseHeadersList; links: InvestigateDetectionsGetResponseLinksList; senderInfo: InvestigateDetectionsGetResponseSenderInfo; threatCategories: InvestigateDetectionsGetResponseThreatCategoriesList; validation: InvestigateDetectionsGetResponseValidation; finalDisposition?: InvestigateDetectionsGetResponseFinalDisposition | null; } export const GetInvestigateDetectionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ action: S.String, attachments: InvestigateDetectionsGetResponseAttachmentsList, findings: InvestigateDetectionsGetResponseFindingsList, headers: InvestigateDetectionsGetResponseHeadersList, links: InvestigateDetectionsGetResponseLinksList, senderInfo: InvestigateDetectionsGetResponseSenderInfo.pipe( T.Body("sender_info"), ), threatCategories: InvestigateDetectionsGetResponseThreatCategoriesList.pipe( T.Body("threat_categories"), ), validation: InvestigateDetectionsGetResponseValidation, finalDisposition: S.optional( S.NullOr(InvestigateDetectionsGetResponseFinalDisposition).pipe( T.Body("final_disposition"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateDetectionResponse", }) as any as S.Schema; export interface GetInvestigatePreviewRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; } export const GetInvestigatePreviewRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}/preview", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigatePreviewRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetInvestigatePreviewResponse { /** A base64 encoded PNG image of the email. */ screenshot: string; } export const GetInvestigatePreviewResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ screenshot: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigatePreviewResponse", }) as any as S.Schema; export interface GetInvestigateRawRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; } export const GetInvestigateRawRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}/raw", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateRawRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetInvestigateRawResponse { /** A UTF-8 encoded eml file of the email. */ raw: string; } export const GetInvestigateRawResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ raw: S.String, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateRawResponse", }) as any as S.Schema; export interface GetInvestigateTraceRequest { /** Identifier. */ accountId: string; /** Unique identifier for a message retrieved from investigation */ investigateId: string; } export const GetInvestigateTraceRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), investigateId: S.String.pipe(T.Label("investigate_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/{investigate_id}/trace", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateTraceRequest", }) as any as S.Schema; export interface InvestigateTraceGetResponseInboundLinesItem { /** Line number in the trace log */ lineno?: number | null; loggedAt?: string | null; message?: string | null; /** Deprecated, use `logged_at` instead. End of life: November 1, 2026. */ ts?: string | null; } export const InvestigateTraceGetResponseInboundLinesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ lineno: S.optional(S.NullOr(S.Number)), loggedAt: S.optional(S.NullOr(S.String).pipe(T.Body("logged_at"))), message: S.optional(S.NullOr(S.String)), ts: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateTraceGetResponseInboundLinesItem", }) as any as S.Schema; export type InvestigateTraceGetResponseInboundLinesList = Array; export const InvestigateTraceGetResponseInboundLinesList = /*@__PURE__*/ S.Array( InvestigateTraceGetResponseInboundLinesItem, ) as any as S.Schema; export interface InvestigateTraceGetResponseInbound { lines?: InvestigateTraceGetResponseInboundLinesList | null; pending?: boolean | null; } export const InvestigateTraceGetResponseInbound = /*@__PURE__*/ S.suspend(() => S.Struct({ lines: S.optional(S.NullOr(InvestigateTraceGetResponseInboundLinesList)), pending: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "InvestigateTraceGetResponseInbound", }) as any as S.Schema; export type InvestigateTraceGetResponseOutboundLinesItem = InvestigateTraceGetResponseInboundLinesItem; export const InvestigateTraceGetResponseOutboundLinesItem = InvestigateTraceGetResponseInboundLinesItem; export type InvestigateTraceGetResponseOutboundLinesList = Array; export const InvestigateTraceGetResponseOutboundLinesList = /*@__PURE__*/ S.Array( InvestigateTraceGetResponseInboundLinesItem, ) as any as S.Schema; export interface InvestigateTraceGetResponseOutbound { lines?: InvestigateTraceGetResponseOutboundLinesList | null; pending?: boolean | null; } export const InvestigateTraceGetResponseOutbound = /*@__PURE__*/ S.suspend(() => S.Struct({ lines: S.optional(S.NullOr(InvestigateTraceGetResponseOutboundLinesList)), pending: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "InvestigateTraceGetResponseOutbound", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetInvestigateTraceResponse { inbound: InvestigateTraceGetResponseInbound; outbound: InvestigateTraceGetResponseOutbound; } export const GetInvestigateTraceResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ inbound: InvestigateTraceGetResponseInbound, outbound: InvestigateTraceGetResponseOutbound, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetInvestigateTraceResponse", }) as any as S.Schema; export interface GetSettingAllowPolicyRequest { /** Identifier. */ accountId: string; /** Allow policy identifier */ policyId: string; } export const GetSettingAllowPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), policyId: S.String.pipe(T.Label("policy_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/allow_policies/{policy_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingAllowPolicyRequest", }) as any as S.Schema; export type SettingsAllowPoliciesGetResponsePatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesGetResponsePatternType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingAllowPolicyResponse { /** Allow policy identifier */ id: string; createdAt: string; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified: string; comments?: string | null; /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. */ isAcceptableSender?: boolean | null; /** Messages to this recipient will bypass all detections */ isExemptRecipient?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026. */ isRecipient?: boolean | null; isRegex?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026. */ isSender?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026. */ isSpoof?: boolean | null; /** Messages from this sender will bypass all detections and link following */ isTrustedSender?: boolean | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsAllowPoliciesGetResponsePatternType | null; /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */ verifySender?: boolean | null; } export const GetSettingAllowPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), lastModified: S.String.pipe(T.Body("last_modified")), comments: S.optional(S.NullOr(S.String)), isAcceptableSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_acceptable_sender")), ), isExemptRecipient: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_exempt_recipient")), ), isRecipient: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recipient"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_sender"))), isSpoof: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_spoof"))), isTrustedSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_trusted_sender")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsAllowPoliciesGetResponsePatternType).pipe( T.Body("pattern_type"), ), ), verifySender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("verify_sender"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingAllowPolicyResponse", }) as any as S.Schema; export interface GetSettingBlockSenderRequest { /** Identifier. */ accountId: string; /** Blocked sender pattern identifier */ patternId: string; } export const GetSettingBlockSenderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), patternId: S.String.pipe(T.Label("pattern_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/block_senders/{pattern_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingBlockSenderRequest", }) as any as S.Schema; export type SettingsBlockSendersGetResponsePatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersGetResponsePatternType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingBlockSenderResponse { /** Blocked sender pattern identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; isRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsBlockSendersGetResponsePatternType | null; } export const GetSettingBlockSenderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsBlockSendersGetResponsePatternType).pipe( T.Body("pattern_type"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingBlockSenderResponse", }) as any as S.Schema; export interface GetSettingDomainRequest { /** Identifier. */ accountId: string; /** Domain identifier */ domainId: string; } export const GetSettingDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), domainId: S.String.pipe(T.Label("domain_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/domains/{domain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingDomainRequest", }) as any as S.Schema; export type SettingsDomainsGetResponseAllowedDeliveryModesItem = | "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN"; export const SettingsDomainsGetResponseAllowedDeliveryModesItem = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseAllowedDeliveryModesList = Array; export const SettingsDomainsGetResponseAllowedDeliveryModesList = /*@__PURE__*/ S.Array( SettingsDomainsGetResponseAllowedDeliveryModesItem, ) as any as S.Schema; export interface SettingsDomainsGetResponseAuthorization { authorized: boolean; timestamp: string; statusMessage?: string | null; } export const SettingsDomainsGetResponseAuthorization = /*@__PURE__*/ S.suspend( () => S.Struct({ authorized: S.Boolean, timestamp: S.String, statusMessage: S.optional( S.NullOr(S.String).pipe(T.Body("status_message")), ), }), ).annotate({ identifier: "SettingsDomainsGetResponseAuthorization", }) as any as S.Schema; export type SettingsDomainsGetResponseDmarcStatus = "none" | "good" | "invalid"; export const SettingsDomainsGetResponseDmarcStatus = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseDropDispositionsItem = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const SettingsDomainsGetResponseDropDispositionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseDropDispositionsList = Array; export const SettingsDomainsGetResponseDropDispositionsList = /*@__PURE__*/ S.Array( SettingsDomainsGetResponseDropDispositionsItem, ) as any as S.Schema; export interface SettingsDomainsGetResponseEmailsProcessed { timestamp: string; totalEmailsProcessed: number; totalEmailsProcessedPrevious: number; } export const SettingsDomainsGetResponseEmailsProcessed = /*@__PURE__*/ S.suspend(() => S.Struct({ timestamp: S.String, totalEmailsProcessed: S.Number.pipe(T.Body("total_emails_processed")), totalEmailsProcessedPrevious: S.Number.pipe( T.Body("total_emails_processed_previous"), ), }), ).annotate({ identifier: "SettingsDomainsGetResponseEmailsProcessed", }) as any as S.Schema; export type SettingsDomainsGetResponseFolder = "AllItems" | "Inbox"; export const SettingsDomainsGetResponseFolder = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseInboxProvider = "Microsoft" | "Google"; export const SettingsDomainsGetResponseInboxProvider = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseIpRestrictionsList = Array; export const SettingsDomainsGetResponseIpRestrictionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SettingsDomainsGetResponseRegionsItem = | "GLOBAL" | "AU" | "DE" | "IN" | "US"; export const SettingsDomainsGetResponseRegionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseRegionsList = Array; export const SettingsDomainsGetResponseRegionsList = /*@__PURE__*/ S.Array( SettingsDomainsGetResponseRegionsItem, ) as any as S.Schema; export type SettingsDomainsGetResponseSpfStatus = | "none" | "good" | "neutral" | "open" | "invalid"; export const SettingsDomainsGetResponseSpfStatus = /*@__PURE__*/ S.String; export type SettingsDomainsGetResponseStatus = | "pending" | "active" | "failed" | "timeout"; export const SettingsDomainsGetResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingDomainResponse { /** Domain identifier */ id?: string | null; allowedDeliveryModes?: SettingsDomainsGetResponseAllowedDeliveryModesList | null; authorization?: SettingsDomainsGetResponseAuthorization | null; createdAt?: string | null; dmarcStatus?: SettingsDomainsGetResponseDmarcStatus | null; domain?: string | null; dropDispositions?: SettingsDomainsGetResponseDropDispositionsList | null; emailsProcessed?: SettingsDomainsGetResponseEmailsProcessed | null; folder?: SettingsDomainsGetResponseFolder | null; inboxProvider?: SettingsDomainsGetResponseInboxProvider | null; integrationId?: string | null; ipRestrictions?: SettingsDomainsGetResponseIpRestrictionsList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; lookbackHops?: number | null; modifiedAt?: string | null; o365TenantId?: string | null; regions?: SettingsDomainsGetResponseRegionsList | null; requireTlsInbound?: boolean | null; requireTlsOutbound?: boolean | null; spfStatus?: SettingsDomainsGetResponseSpfStatus | null; status?: SettingsDomainsGetResponseStatus | null; transport?: string | null; } export const GetSettingDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), allowedDeliveryModes: S.optional( S.NullOr(SettingsDomainsGetResponseAllowedDeliveryModesList).pipe( T.Body("allowed_delivery_modes"), ), ), authorization: S.optional( S.NullOr(SettingsDomainsGetResponseAuthorization), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), dmarcStatus: S.optional( S.NullOr(SettingsDomainsGetResponseDmarcStatus).pipe( T.Body("dmarc_status"), ), ), domain: S.optional(S.NullOr(S.String)), dropDispositions: S.optional( S.NullOr(SettingsDomainsGetResponseDropDispositionsList).pipe( T.Body("drop_dispositions"), ), ), emailsProcessed: S.optional( S.NullOr(SettingsDomainsGetResponseEmailsProcessed).pipe( T.Body("emails_processed"), ), ), folder: S.optional(S.NullOr(SettingsDomainsGetResponseFolder)), inboxProvider: S.optional( S.NullOr(SettingsDomainsGetResponseInboxProvider).pipe( T.Body("inbox_provider"), ), ), integrationId: S.optional( S.NullOr(S.String).pipe(T.Body("integration_id")), ), ipRestrictions: S.optional( S.NullOr(SettingsDomainsGetResponseIpRestrictionsList).pipe( T.Body("ip_restrictions"), ), ), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), lookbackHops: S.optional(S.NullOr(S.Number).pipe(T.Body("lookback_hops"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), o365TenantId: S.optional(S.NullOr(S.String).pipe(T.Body("o365_tenant_id"))), regions: S.optional(S.NullOr(SettingsDomainsGetResponseRegionsList)), requireTlsInbound: S.optional( S.NullOr(S.Boolean).pipe(T.Body("require_tls_inbound")), ), requireTlsOutbound: S.optional( S.NullOr(S.Boolean).pipe(T.Body("require_tls_outbound")), ), spfStatus: S.optional( S.NullOr(SettingsDomainsGetResponseSpfStatus).pipe(T.Body("spf_status")), ), status: S.optional(S.NullOr(SettingsDomainsGetResponseStatus)), transport: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingDomainResponse", }) as any as S.Schema; export interface GetSettingImpersonationRegistryRequest { /** Identifier. */ accountId: string; /** Impersonation registry entry identifier */ impersonationRegistryId: string; } export const GetSettingImpersonationRegistryRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), impersonationRegistryId: S.String.pipe( T.Label("impersonation_registry_id"), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/impersonation_registry/{impersonation_registry_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingImpersonationRegistryRequest", }) as any as S.Schema; export type SettingsImpersonationRegistryGetResponseProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryGetResponseProvenance = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingImpersonationRegistryResponse { /** Impersonation registry entry identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; directoryId?: number | null; directoryNodeId?: number | null; email?: string | null; externalDirectoryNodeId?: string | null; isEmailRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; name?: string | null; provenance?: SettingsImpersonationRegistryGetResponseProvenance | null; } export const GetSettingImpersonationRegistryResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), directoryId: S.optional(S.NullOr(S.Number).pipe(T.Body("directory_id"))), directoryNodeId: S.optional( S.NullOr(S.Number).pipe(T.Body("directory_node_id")), ), email: S.optional(S.NullOr(S.String)), externalDirectoryNodeId: S.optional( S.NullOr(S.String).pipe(T.Body("external_directory_node_id")), ), isEmailRegex: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_email_regex")), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), name: S.optional(S.NullOr(S.String)), provenance: S.optional( S.NullOr(SettingsImpersonationRegistryGetResponseProvenance), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingImpersonationRegistryResponse", }) as any as S.Schema; export interface GetSettingSendingDomainRestrictionRequest { /** Identifier. */ accountId: string; /** Sending domain restriction identifier. */ sendingDomainRestrictionId: string; } export const GetSettingSendingDomainRestrictionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), sendingDomainRestrictionId: S.String.pipe( T.Label("sending_domain_restriction_id"), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/sending_domain_restrictions/{sending_domain_restriction_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingSendingDomainRestrictionRequest", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsGetResponseExcludeList = Array; export const SettingsSendingDomainRestrictionsGetResponseExcludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingSendingDomainRestrictionResponse { /** Sending domain restriction identifier. */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Domain that requires TLS enforcement. */ domain?: string | null; /** Excluded subdomains that are exempt from TLS requirements. */ exclude?: SettingsSendingDomainRestrictionsGetResponseExcludeList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const GetSettingSendingDomainRestrictionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), domain: S.optional(S.NullOr(S.String)), exclude: S.optional( S.NullOr(SettingsSendingDomainRestrictionsGetResponseExcludeList), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingSendingDomainRestrictionResponse", }) as any as S.Schema; export interface GetSettingTrustedDomainRequest { /** Identifier. */ accountId: string; /** Trusted domain identifier */ trustedDomainId: string; } export const GetSettingTrustedDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), trustedDomainId: S.String.pipe(T.Label("trusted_domain_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/trusted_domains/{trusted_domain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingTrustedDomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingTrustedDomainResponse { /** Trusted domain identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */ isRecent?: boolean | null; isRegex?: boolean | null; /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */ isSimilarity?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; } export const GetSettingTrustedDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRecent: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recent"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSimilarity: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_similarity"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingTrustedDomainResponse", }) as any as S.Schema; export interface GetSettingUrlIgnorePatternRequest { /** Identifier. */ accountId: string; /** URL ignore pattern identifier */ patternId: string; } export const GetSettingUrlIgnorePatternRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), patternId: S.String.pipe(T.Label("pattern_id")), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/url_ignore_patterns/{pattern_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingUrlIgnorePatternRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSettingUrlIgnorePatternResponse { /** URL ignore pattern identifier */ id: string; createdAt: string; /** Regular expression matching URLs that should not be rewritten. */ pattern: string; /** Optional note describing the reason for the ignore pattern. */ comments?: string | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const GetSettingUrlIgnorePatternResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), pattern: S.String, comments: S.optional(S.NullOr(S.String)), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSettingUrlIgnorePatternResponse", }) as any as S.Schema; export type InvestigateBulkMessagesListRequestStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkMessagesListRequestStatus = /*@__PURE__*/ S.String; export interface ListInvestigateBulkMessagesRequest { /** Identifier. */ accountId: string; jobId: string; /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; status?: InvestigateBulkMessagesListRequestStatus | (string & {}); } export const ListInvestigateBulkMessagesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), jobId: S.String.pipe(T.Label("job_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), status: S.optional( InvestigateBulkMessagesListRequestStatus.pipe(T.Query()), ), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/bulk/{job_id}/messages", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListInvestigateBulkMessagesRequest", }) as any as S.Schema; export type InvestigateBulkMessagesListResultItemActionParamsMoveDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateBulkMessagesListResultItemActionParamsMoveDestination = /*@__PURE__*/ S.String; export type InvestigateBulkMessagesListResultItemActionParamsMoveType = "MOVE"; export const InvestigateBulkMessagesListResultItemActionParamsMoveType = /*@__PURE__*/ S.String; export type InvestigateBulkMessagesListResultItemActionParamsMoveExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkMessagesListResultItemActionParamsMoveExpectedDisposition = /*@__PURE__*/ S.String; export interface InvestigateBulkMessagesListResultItemActionParamsMove { clientRecipient: string; destination: InvestigateBulkMessagesListResultItemActionParamsMoveDestination; type: InvestigateBulkMessagesListResultItemActionParamsMoveType; expectedDisposition?: InvestigateBulkMessagesListResultItemActionParamsMoveExpectedDisposition | null; } export const InvestigateBulkMessagesListResultItemActionParamsMove = /*@__PURE__*/ S.suspend(() => S.Struct({ clientRecipient: S.String.pipe(T.Body("client_recipient")), destination: InvestigateBulkMessagesListResultItemActionParamsMoveDestination, type: InvestigateBulkMessagesListResultItemActionParamsMoveType, expectedDisposition: S.optional( S.NullOr( InvestigateBulkMessagesListResultItemActionParamsMoveExpectedDisposition, ).pipe(T.Body("expected_disposition")), ), }), ).annotate({ identifier: "InvestigateBulkMessagesListResultItemActionParamsMove", }) as any as S.Schema; export type InvestigateBulkMessagesListResultItemActionParamsReleaseType = "RELEASE"; export const InvestigateBulkMessagesListResultItemActionParamsReleaseType = /*@__PURE__*/ S.String; export interface InvestigateBulkMessagesListResultItemActionParamsRelease { clientRecipient: string; type: InvestigateBulkMessagesListResultItemActionParamsReleaseType; } export const InvestigateBulkMessagesListResultItemActionParamsRelease = /*@__PURE__*/ S.suspend(() => S.Struct({ clientRecipient: S.String.pipe(T.Body("client_recipient")), type: InvestigateBulkMessagesListResultItemActionParamsReleaseType, }), ).annotate({ identifier: "InvestigateBulkMessagesListResultItemActionParamsRelease", }) as any as S.Schema; export type InvestigateBulkMessagesListResultItemActionParams = | InvestigateBulkMessagesListResultItemActionParamsMove | InvestigateBulkMessagesListResultItemActionParamsRelease; export const InvestigateBulkMessagesListResultItemActionParams = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["clientRecipient", "destination", "type", "expectedDisposition"], ["clientRecipient", "type"], ]), ); export type InvestigateBulkMessagesListResultItemActionType = | "MOVE" | "RELEASE"; export const InvestigateBulkMessagesListResultItemActionType = /*@__PURE__*/ S.String; export type InvestigateBulkMessagesListResultItemStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkMessagesListResultItemStatus = /*@__PURE__*/ S.String; export interface InvestigateBulkMessagesListResultItem { actionParams: InvestigateBulkMessagesListResultItemActionParams; actionType: InvestigateBulkMessagesListResultItemActionType; createdAt: string; messageId: string; postfixId: string; retryCount: number; status: InvestigateBulkMessagesListResultItemStatus; alertId?: string | null; emailMessageId?: string | null; processedAt?: string | null; /** When to retry the action if it failed */ retryAfter?: string | null; statusMessage?: string | null; } export const InvestigateBulkMessagesListResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ actionParams: InvestigateBulkMessagesListResultItemActionParams.pipe( T.Body("action_params"), ), actionType: InvestigateBulkMessagesListResultItemActionType.pipe( T.Body("action_type"), ), createdAt: S.String.pipe(T.Body("created_at")), messageId: S.String.pipe(T.Body("message_id")), postfixId: S.String.pipe(T.Body("postfix_id")), retryCount: S.Number.pipe(T.Body("retry_count")), status: InvestigateBulkMessagesListResultItemStatus, alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), emailMessageId: S.optional( S.NullOr(S.String).pipe(T.Body("email_message_id")), ), processedAt: S.optional(S.NullOr(S.String).pipe(T.Body("processed_at"))), retryAfter: S.optional(S.NullOr(S.String).pipe(T.Body("retry_after"))), statusMessage: S.optional( S.NullOr(S.String).pipe(T.Body("status_message")), ), }), ).annotate({ identifier: "InvestigateBulkMessagesListResultItem", }) as any as S.Schema; export type InvestigateBulkMessagesListResultList = Array; export const InvestigateBulkMessagesListResultList = /*@__PURE__*/ S.Array( InvestigateBulkMessagesListResultItem, ) as any as S.Schema; export interface ListInvestigateBulkMessagesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: InvestigateBulkMessagesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListInvestigateBulkMessagesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: InvestigateBulkMessagesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListInvestigateBulkMessagesResponse", }) as any as S.Schema; export type InvestigateBulkListRequestActionType = "MOVE" | "RELEASE"; export const InvestigateBulkListRequestActionType = /*@__PURE__*/ S.String; export type InvestigateBulkListRequestStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkListRequestStatus = /*@__PURE__*/ S.String; export interface ListInvestigateBulksRequest { /** Identifier. */ accountId: string; actionType?: InvestigateBulkListRequestActionType | (string & {}); /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; status?: InvestigateBulkListRequestStatus | (string & {}); } export const ListInvestigateBulksRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), actionType: S.optional( InvestigateBulkListRequestActionType.pipe(T.Query("action_type")), ), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), status: S.optional(InvestigateBulkListRequestStatus.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate/bulk", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListInvestigateBulksRequest", }) as any as S.Schema; export type InvestigateBulkListResultItemActionParamsMoveDestination = | "Inbox" | "JunkEmail" | "DeletedItems" | "RecoverableItemsDeletions" | "RecoverableItemsPurges"; export const InvestigateBulkListResultItemActionParamsMoveDestination = /*@__PURE__*/ S.String; export type InvestigateBulkListResultItemActionParamsMoveType = "MOVE"; export const InvestigateBulkListResultItemActionParamsMoveType = /*@__PURE__*/ S.String; export type InvestigateBulkListResultItemActionParamsMoveExpectedDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkListResultItemActionParamsMoveExpectedDisposition = /*@__PURE__*/ S.String; export interface InvestigateBulkListResultItemActionParamsMove { destination: InvestigateBulkListResultItemActionParamsMoveDestination; type: InvestigateBulkListResultItemActionParamsMoveType; expectedDisposition?: InvestigateBulkListResultItemActionParamsMoveExpectedDisposition | null; } export const InvestigateBulkListResultItemActionParamsMove = /*@__PURE__*/ S.suspend(() => S.Struct({ destination: InvestigateBulkListResultItemActionParamsMoveDestination, type: InvestigateBulkListResultItemActionParamsMoveType, expectedDisposition: S.optional( S.NullOr( InvestigateBulkListResultItemActionParamsMoveExpectedDisposition, ).pipe(T.Body("expected_disposition")), ), }), ).annotate({ identifier: "InvestigateBulkListResultItemActionParamsMove", }) as any as S.Schema; export type InvestigateBulkListResultItemActionParamsReleaseType = "RELEASE"; export const InvestigateBulkListResultItemActionParamsReleaseType = /*@__PURE__*/ S.String; export interface InvestigateBulkListResultItemActionParamsRelease { type: InvestigateBulkListResultItemActionParamsReleaseType; } export const InvestigateBulkListResultItemActionParamsRelease = /*@__PURE__*/ S.suspend(() => S.Struct({ type: InvestigateBulkListResultItemActionParamsReleaseType, }), ).annotate({ identifier: "InvestigateBulkListResultItemActionParamsRelease", }) as any as S.Schema; export type InvestigateBulkListResultItemActionParams = | InvestigateBulkListResultItemActionParamsMove | InvestigateBulkListResultItemActionParamsRelease; export const InvestigateBulkListResultItemActionParams = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([["destination", "type", "expectedDisposition"], ["type"]]), ); export type InvestigateBulkListResultItemActionType = "MOVE" | "RELEASE"; export const InvestigateBulkListResultItemActionType = /*@__PURE__*/ S.String; export type InvestigateBulkListResultItemSearchParamsDeliveryStatus = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateBulkListResultItemSearchParamsDeliveryStatus = /*@__PURE__*/ S.String; export type InvestigateBulkListResultItemSearchParamsFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateBulkListResultItemSearchParamsFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateBulkListResultItemSearchParamsMessageAction = | "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED"; export const InvestigateBulkListResultItemSearchParamsMessageAction = /*@__PURE__*/ S.String; export interface InvestigateBulkListResultItemSearchParams { /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog?: boolean | null; alertId?: string | null; /** Delivery status of the message. */ deliveryStatus?: InvestigateBulkListResultItemSearchParamsDeliveryStatus | null; detectionsOnly?: boolean | null; domain?: string | null; /** End of search date range */ end?: string | null; exactSubject?: string | null; finalDisposition?: InvestigateBulkListResultItemSearchParamsFinalDisposition | null; messageAction?: InvestigateBulkListResultItemSearchParamsMessageAction | null; messageId?: string | null; metric?: string | null; query?: string | null; recipient?: string | null; sender?: string | null; /** Beginning of search date range */ start?: string | null; subject?: string | null; submissions?: boolean | null; } export const InvestigateBulkListResultItemSearchParams = /*@__PURE__*/ S.suspend(() => S.Struct({ actionLog: S.optional(S.NullOr(S.Boolean).pipe(T.Body("action_log"))), alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), deliveryStatus: S.optional( S.NullOr(InvestigateBulkListResultItemSearchParamsDeliveryStatus).pipe( T.Body("delivery_status"), ), ), detectionsOnly: S.optional( S.NullOr(S.Boolean).pipe(T.Body("detections_only")), ), domain: S.optional(S.NullOr(S.String)), end: S.optional(S.NullOr(S.String)), exactSubject: S.optional( S.NullOr(S.String).pipe(T.Body("exact_subject")), ), finalDisposition: S.optional( S.NullOr( InvestigateBulkListResultItemSearchParamsFinalDisposition, ).pipe(T.Body("final_disposition")), ), messageAction: S.optional( S.NullOr(InvestigateBulkListResultItemSearchParamsMessageAction).pipe( T.Body("message_action"), ), ), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), metric: S.optional(S.NullOr(S.String)), query: S.optional(S.NullOr(S.String)), recipient: S.optional(S.NullOr(S.String)), sender: S.optional(S.NullOr(S.String)), start: S.optional(S.NullOr(S.String)), subject: S.optional(S.NullOr(S.String)), submissions: S.optional(S.NullOr(S.Boolean)), }), ).annotate({ identifier: "InvestigateBulkListResultItemSearchParams", }) as any as S.Schema; export type InvestigateBulkListResultItemStatus = | "PENDING" | "DISCOVERING" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELLED" | "SKIPPED"; export const InvestigateBulkListResultItemStatus = /*@__PURE__*/ S.String; export interface InvestigateBulkListResultItem { actionParams: InvestigateBulkListResultItemActionParams; actionType: InvestigateBulkListResultItemActionType; createdAt: string; jobId: string; messagesFailed: number; messagesPending: number; messagesSuccessful: number; searchParams: InvestigateBulkListResultItemSearchParams; status: InvestigateBulkListResultItemStatus; totalMessagesDiscovered: number; comment?: string | null; completedAt?: string | null; startedAt?: string | null; statusMessage?: string | null; } export const InvestigateBulkListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ actionParams: InvestigateBulkListResultItemActionParams.pipe( T.Body("action_params"), ), actionType: InvestigateBulkListResultItemActionType.pipe( T.Body("action_type"), ), createdAt: S.String.pipe(T.Body("created_at")), jobId: S.String.pipe(T.Body("job_id")), messagesFailed: S.Number.pipe(T.Body("messages_failed")), messagesPending: S.Number.pipe(T.Body("messages_pending")), messagesSuccessful: S.Number.pipe(T.Body("messages_successful")), searchParams: InvestigateBulkListResultItemSearchParams.pipe( T.Body("search_params"), ), status: InvestigateBulkListResultItemStatus, totalMessagesDiscovered: S.Number.pipe(T.Body("total_messages_discovered")), comment: S.optional(S.NullOr(S.String)), completedAt: S.optional(S.NullOr(S.String).pipe(T.Body("completed_at"))), startedAt: S.optional(S.NullOr(S.String).pipe(T.Body("started_at"))), statusMessage: S.optional( S.NullOr(S.String).pipe(T.Body("status_message")), ), }), ).annotate({ identifier: "InvestigateBulkListResultItem", }) as any as S.Schema; export type InvestigateBulkListResultList = Array; export const InvestigateBulkListResultList = /*@__PURE__*/ S.Array( InvestigateBulkListResultItem, ) as any as S.Schema; export interface ListInvestigateBulksResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: InvestigateBulkListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListInvestigateBulksResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: InvestigateBulkListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListInvestigateBulksResponse", }) as any as S.Schema; export type InvestigateListRequestDeliveryStatus = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateListRequestDeliveryStatus = /*@__PURE__*/ S.String; export type InvestigateListRequestFinalDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const InvestigateListRequestFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateListRequestMessageAction = | "PREVIEW" | "QUARANTINE_RELEASED" | "MOVED"; export const InvestigateListRequestMessageAction = /*@__PURE__*/ S.String; export interface ListInvestigatesRequest { /** Identifier. */ accountId: string; alertId?: string; cursor?: string; /** Delivery status to filter by. */ deliveryStatus?: InvestigateListRequestDeliveryStatus | (string & {}); /** Whether to include only detections in search results. */ detectionsOnly?: boolean; /** Sender domains to filter by. */ domain?: string; /** The end of the search date range. Defaults to `now`. */ end?: string; /** Dispositions to filter by. */ finalDisposition?: InvestigateListRequestFinalDisposition | (string & {}); /** Message actions to filter by. */ messageAction?: InvestigateListRequestMessageAction | (string & {}); messageId?: string; metric?: string; /** Deprecated: Use cursor pagination instead. End of life: November 1, 2026. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; /** Space-delimited search term. Case-insensitive. */ query?: string; recipient?: string; sender?: string; /** The beginning of the search date range. Defaults to `now - 30 days`. */ start?: string; subject?: string; } export const ListInvestigatesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), alertId: S.optional(S.String.pipe(T.Query("alert_id"))), cursor: S.optional(S.String.pipe(T.Query())), deliveryStatus: S.optional( InvestigateListRequestDeliveryStatus.pipe(T.Query("delivery_status")), ), detectionsOnly: S.optional(S.Boolean.pipe(T.Query("detections_only"))), domain: S.optional(S.String.pipe(T.Query())), end: S.optional(S.String.pipe(T.Query())), finalDisposition: S.optional( InvestigateListRequestFinalDisposition.pipe(T.Query("final_disposition")), ), messageAction: S.optional( InvestigateListRequestMessageAction.pipe(T.Query("message_action")), ), messageId: S.optional(S.String.pipe(T.Query("message_id"))), metric: S.optional(S.String.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), query: S.optional(S.String.pipe(T.Query())), recipient: S.optional(S.String.pipe(T.Query())), sender: S.optional(S.String.pipe(T.Query())), start: S.optional(S.String.pipe(T.Query())), subject: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/investigate", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListInvestigatesRequest", }) as any as S.Schema; export type InvestigateListResultItemActionLogItemOperation = | "MOVE" | "RELEASE" | "RECLASSIFY" | "SUBMISSION" | "QUARANTINE_RELEASE" | "PREVIEW"; export const InvestigateListResultItemActionLogItemOperation = /*@__PURE__*/ S.String; export type InvestigateListResultItemActionLogItemProperties = InvestigateGetResponseActionLogItemProperties; export const InvestigateListResultItemActionLogItemProperties = InvestigateGetResponseActionLogItemProperties; export interface InvestigateListResultItemActionLogItem { /** Timestamp when action completed */ completedAt: string; /** Type of action performed */ operation: InvestigateListResultItemActionLogItemOperation; /** Deprecated, use `completed_at` instead. End of life: November 1, 2026. */ completedTimestamp?: string | null; /** Additional properties for the action */ properties?: InvestigateGetResponseActionLogItemProperties | null; /** Status of the action */ status?: string | null; } export const InvestigateListResultItemActionLogItem = /*@__PURE__*/ S.suspend( () => S.Struct({ completedAt: S.String.pipe(T.Body("completed_at")), operation: InvestigateListResultItemActionLogItemOperation, completedTimestamp: S.optional( S.NullOr(S.String).pipe(T.Body("completed_timestamp")), ), properties: S.optional( S.NullOr(InvestigateGetResponseActionLogItemProperties), ), status: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateListResultItemActionLogItem", }) as any as S.Schema; export type InvestigateListResultItemActionLogList = Array; export const InvestigateListResultItemActionLogList = /*@__PURE__*/ S.Array( InvestigateListResultItemActionLogItem, ) as any as S.Schema; export type InvestigateListResultItemClientRecipientsList = Array; export const InvestigateListResultItemClientRecipientsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateListResultItemDetectionReasonsList = Array; export const InvestigateListResultItemDetectionReasonsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateListResultItemPropertiesAllowlistedPatternType = | "quarantine_release" | "acceptable_sender" | "allowed_sender" | "allowed_recipient" | "domain_similarity" | "domain_recency" | "managed_acceptable_sender" | "outbound_ndr"; export const InvestigateListResultItemPropertiesAllowlistedPatternType = /*@__PURE__*/ S.String; export type InvestigateListResultItemPropertiesWhitelistedPatternType = | "quarantine_release" | "acceptable_sender" | "allowed_sender" | "allowed_recipient" | "domain_similarity" | "domain_recency" | "managed_acceptable_sender" | "outbound_ndr"; export const InvestigateListResultItemPropertiesWhitelistedPatternType = /*@__PURE__*/ S.String; export interface InvestigateListResultItemProperties { /** Pattern that allowlisted this message */ allowlistedPattern?: string | null; /** Type of allowlist pattern */ allowlistedPatternType?: InvestigateListResultItemPropertiesAllowlistedPatternType | null; /** Whether message was blocklisted */ blocklistedMessage?: boolean | null; /** Pattern that blocklisted this message */ blocklistedPattern?: string | null; /** Legacy field for allowlist pattern type */ whitelistedPatternType?: InvestigateListResultItemPropertiesWhitelistedPatternType | null; } export const InvestigateListResultItemProperties = /*@__PURE__*/ S.suspend(() => S.Struct({ allowlistedPattern: S.optional( S.NullOr(S.String).pipe(T.Body("allowlisted_pattern")), ), allowlistedPatternType: S.optional( S.NullOr(InvestigateListResultItemPropertiesAllowlistedPatternType).pipe( T.Body("allowlisted_pattern_type"), ), ), blocklistedMessage: S.optional( S.NullOr(S.Boolean).pipe(T.Body("blocklisted_message")), ), blocklistedPattern: S.optional( S.NullOr(S.String).pipe(T.Body("blocklisted_pattern")), ), whitelistedPatternType: S.optional( S.NullOr(InvestigateListResultItemPropertiesWhitelistedPatternType).pipe( T.Body("whitelisted_pattern_type"), ), ), }), ).annotate({ identifier: "InvestigateListResultItemProperties", }) as any as S.Schema; export type InvestigateListResultItemDeliveryMode = | "DIRECT" | "BCC" | "JOURNAL" | "REVIEW_SUBMISSION" | "DMARC_UNVERIFIED" | "DMARC_FAILURE_REPORT" | "DMARC_AGGREGATE_REPORT" | "THREAT_INTEL_SUBMISSION" | "SIMULATION_SUBMISSION" | "API" | "RETRO_SCAN"; export const InvestigateListResultItemDeliveryMode = /*@__PURE__*/ S.String; export type InvestigateListResultItemDeliveryStatusItem = | "delivered" | "moved" | "quarantined" | "rejected" | "deferred" | "bounced" | "queued"; export const InvestigateListResultItemDeliveryStatusItem = /*@__PURE__*/ S.String; export type InvestigateListResultItemDeliveryStatusList = Array; export const InvestigateListResultItemDeliveryStatusList = /*@__PURE__*/ S.Array( InvestigateListResultItemDeliveryStatusItem, ) as any as S.Schema; export type InvestigateListResultItemEnvelopeToList = Array; export const InvestigateListResultItemEnvelopeToList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateListResultItemFinalDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateListResultItemFinalDisposition = /*@__PURE__*/ S.String; export type InvestigateListResultItemFindingsItemDetection = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const InvestigateListResultItemFindingsItemDetection = /*@__PURE__*/ S.String; export interface InvestigateListResultItemFindingsItem { attachment?: string | null; detail?: string | null; detection?: InvestigateListResultItemFindingsItemDetection | null; field?: string | null; name?: string | null; portion?: string | null; reason?: string | null; score?: number | null; value?: string | null; } export const InvestigateListResultItemFindingsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ attachment: S.optional(S.NullOr(S.String)), detail: S.optional(S.NullOr(S.String)), detection: S.optional( S.NullOr(InvestigateListResultItemFindingsItemDetection), ), field: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), portion: S.optional(S.NullOr(S.String)), reason: S.optional(S.NullOr(S.String)), score: S.optional(S.NullOr(S.Number)), value: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "InvestigateListResultItemFindingsItem", }) as any as S.Schema; export type InvestigateListResultItemFindingsList = Array; export const InvestigateListResultItemFindingsList = /*@__PURE__*/ S.Array( InvestigateListResultItemFindingsItem, ) as any as S.Schema; export type InvestigateListResultItemPostDeliveryOperationsItem = | "PREVIEW" | "QUARANTINE_RELEASE" | "SUBMISSION" | "MOVE"; export const InvestigateListResultItemPostDeliveryOperationsItem = /*@__PURE__*/ S.String; export type InvestigateListResultItemPostDeliveryOperationsList = Array; export const InvestigateListResultItemPostDeliveryOperationsList = /*@__PURE__*/ S.Array( InvestigateListResultItemPostDeliveryOperationsItem, ) as any as S.Schema; export type InvestigateListResultItemThreatCategoriesList = Array; export const InvestigateListResultItemThreatCategoriesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateListResultItemToList = Array; export const InvestigateListResultItemToList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateListResultItemToNameList = Array; export const InvestigateListResultItemToNameList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type InvestigateListResultItemValidationDkim = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateListResultItemValidationDkim = /*@__PURE__*/ S.String; export type InvestigateListResultItemValidationDmarc = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateListResultItemValidationDmarc = /*@__PURE__*/ S.String; export type InvestigateListResultItemValidationSpf = | "pass" | "neutral" | "fail" | "error" | "none"; export const InvestigateListResultItemValidationSpf = /*@__PURE__*/ S.String; export interface InvestigateListResultItemValidation { comment?: string | null; dkim?: InvestigateListResultItemValidationDkim | null; dmarc?: InvestigateListResultItemValidationDmarc | null; spf?: InvestigateListResultItemValidationSpf | null; } export const InvestigateListResultItemValidation = /*@__PURE__*/ S.suspend(() => S.Struct({ comment: S.optional(S.NullOr(S.String)), dkim: S.optional(S.NullOr(InvestigateListResultItemValidationDkim)), dmarc: S.optional(S.NullOr(InvestigateListResultItemValidationDmarc)), spf: S.optional(S.NullOr(InvestigateListResultItemValidationSpf)), }), ).annotate({ identifier: "InvestigateListResultItemValidation", }) as any as S.Schema; export interface InvestigateListResultItem { /** Unique identifier for a message retrieved from investigation */ id: string; /** Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026. */ actionLog: InvestigateListResultItemActionLogList; clientRecipients: InvestigateListResultItemClientRecipientsList; detectionReasons: InvestigateListResultItemDetectionReasonsList; isPhishSubmission: boolean; isQuarantined: boolean; /** The identifier of the message */ postfixId: string; /** Message processing properties */ properties: InvestigateListResultItemProperties; /** Deprecated, use `scanned_at` instead. End of life: November 1, 2026. */ ts: string; alertId?: string | null; deliveryMode?: InvestigateListResultItemDeliveryMode | null; deliveryStatus?: InvestigateListResultItemDeliveryStatusList | null; edfHash?: string | null; envelopeFrom?: string | null; envelopeTo?: InvestigateListResultItemEnvelopeToList | null; finalDisposition?: InvestigateListResultItemFinalDisposition | null; /** Deprecated, use the `findings` field from `GET /investigate/{investigate_id}/detections` instead. End of life: November 1, 2026. Detection findings for this message. */ findings?: InvestigateListResultItemFindingsList | null; from?: string | null; fromName?: string | null; htmltextStructureHash?: string | null; messageId?: string | null; /** Post-delivery operations performed on this message */ postDeliveryOperations?: InvestigateListResultItemPostDeliveryOperationsList | null; postfixIdOutbound?: string | null; replyto?: string | null; /** When the message was scanned (UTC) */ scannedAt?: string | null; /** When the message was sent (UTC) */ sentAt?: string | null; sentDate?: string | null; smtpHeloServerIp?: string | null; smtpPreviousHopIp?: string | null; subject?: string | null; threatCategories?: InvestigateListResultItemThreatCategoriesList | null; to?: InvestigateListResultItemToList | null; toName?: InvestigateListResultItemToNameList | null; validation?: InvestigateListResultItemValidation | null; xOriginatingIp?: string | null; } export const InvestigateListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, actionLog: InvestigateListResultItemActionLogList.pipe( T.Body("action_log"), ), clientRecipients: InvestigateListResultItemClientRecipientsList.pipe( T.Body("client_recipients"), ), detectionReasons: InvestigateListResultItemDetectionReasonsList.pipe( T.Body("detection_reasons"), ), isPhishSubmission: S.Boolean.pipe(T.Body("is_phish_submission")), isQuarantined: S.Boolean.pipe(T.Body("is_quarantined")), postfixId: S.String.pipe(T.Body("postfix_id")), properties: InvestigateListResultItemProperties, ts: S.String, alertId: S.optional(S.NullOr(S.String).pipe(T.Body("alert_id"))), deliveryMode: S.optional( S.NullOr(InvestigateListResultItemDeliveryMode).pipe( T.Body("delivery_mode"), ), ), deliveryStatus: S.optional( S.NullOr(InvestigateListResultItemDeliveryStatusList).pipe( T.Body("delivery_status"), ), ), edfHash: S.optional(S.NullOr(S.String).pipe(T.Body("edf_hash"))), envelopeFrom: S.optional(S.NullOr(S.String).pipe(T.Body("envelope_from"))), envelopeTo: S.optional( S.NullOr(InvestigateListResultItemEnvelopeToList).pipe( T.Body("envelope_to"), ), ), finalDisposition: S.optional( S.NullOr(InvestigateListResultItemFinalDisposition).pipe( T.Body("final_disposition"), ), ), findings: S.optional(S.NullOr(InvestigateListResultItemFindingsList)), from: S.optional(S.NullOr(S.String)), fromName: S.optional(S.NullOr(S.String).pipe(T.Body("from_name"))), htmltextStructureHash: S.optional( S.NullOr(S.String).pipe(T.Body("htmltext_structure_hash")), ), messageId: S.optional(S.NullOr(S.String).pipe(T.Body("message_id"))), postDeliveryOperations: S.optional( S.NullOr(InvestigateListResultItemPostDeliveryOperationsList).pipe( T.Body("post_delivery_operations"), ), ), postfixIdOutbound: S.optional( S.NullOr(S.String).pipe(T.Body("postfix_id_outbound")), ), replyto: S.optional(S.NullOr(S.String)), scannedAt: S.optional(S.NullOr(S.String).pipe(T.Body("scanned_at"))), sentAt: S.optional(S.NullOr(S.String).pipe(T.Body("sent_at"))), sentDate: S.optional(S.NullOr(S.String).pipe(T.Body("sent_date"))), smtpHeloServerIp: S.optional( S.NullOr(S.String).pipe(T.Body("smtp_helo_server_ip")), ), smtpPreviousHopIp: S.optional( S.NullOr(S.String).pipe(T.Body("smtp_previous_hop_ip")), ), subject: S.optional(S.NullOr(S.String)), threatCategories: S.optional( S.NullOr(InvestigateListResultItemThreatCategoriesList).pipe( T.Body("threat_categories"), ), ), to: S.optional(S.NullOr(InvestigateListResultItemToList)), toName: S.optional( S.NullOr(InvestigateListResultItemToNameList).pipe(T.Body("to_name")), ), validation: S.optional(S.NullOr(InvestigateListResultItemValidation)), xOriginatingIp: S.optional( S.NullOr(S.String).pipe(T.Body("x_originating_ip")), ), }), ).annotate({ identifier: "InvestigateListResultItem", }) as any as S.Schema; export type InvestigateListResultList = Array; export const InvestigateListResultList = /*@__PURE__*/ S.Array( InvestigateListResultItem, ) as any as S.Schema; export interface ListInvestigatesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: InvestigateListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListInvestigatesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: InvestigateListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListInvestigatesResponse", }) as any as S.Schema; export interface ListPhishguardReportsRequest { /** Identifier. */ accountId: string; /** End of the time range (RFC3339). Takes precedence over to_date. */ end?: string; /** Deprecated, use `start` instead. Start date in YYYY-MM-DD format. */ fromDate?: string; /** Start of the time range (RFC3339). Takes precedence over from_date. */ start?: string; /** Deprecated, use `end` instead. End date in YYYY-MM-DD format. */ toDate?: string; } export const ListPhishguardReportsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), end: S.optional(S.String.pipe(T.Query())), fromDate: S.optional(S.String.pipe(T.Query("from_date"))), start: S.optional(S.String.pipe(T.Query())), toDate: S.optional(S.String.pipe(T.Query("to_date"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/phishguard/reports", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPhishguardReportsRequest", }) as any as S.Schema; export type PhishguardReportsListResultItemDisposition = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const PhishguardReportsListResultItemDisposition = /*@__PURE__*/ S.String; export type PhishguardReportsListResultItemFieldsToList = Array; export const PhishguardReportsListResultItemFieldsToList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PhishguardReportsListResultItemFields { to: PhishguardReportsListResultItemFieldsToList; from?: string | null; occurredAt?: string | null; postfixId?: string | null; /** Deprecated, use `occurred_at` instead */ ts?: string | null; } export const PhishguardReportsListResultItemFields = /*@__PURE__*/ S.suspend( () => S.Struct({ to: PhishguardReportsListResultItemFieldsToList, from: S.optional(S.NullOr(S.String)), occurredAt: S.optional(S.NullOr(S.String).pipe(T.Body("occurred_at"))), postfixId: S.optional(S.NullOr(S.String).pipe(T.Body("postfix_id"))), ts: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "PhishguardReportsListResultItemFields", }) as any as S.Schema; export interface PhishguardReportsListResultItemTagsItem { category: string; value: string; } export const PhishguardReportsListResultItemTagsItem = /*@__PURE__*/ S.suspend( () => S.Struct({ category: S.String, value: S.String, }), ).annotate({ identifier: "PhishguardReportsListResultItemTagsItem", }) as any as S.Schema; export type PhishguardReportsListResultItemTagsList = Array; export const PhishguardReportsListResultItemTagsList = /*@__PURE__*/ S.Array( PhishguardReportsListResultItemTagsItem, ) as any as S.Schema; export interface PhishguardReportsListResultItem { id: number; content: string; disposition: PhishguardReportsListResultItemDisposition; fields: PhishguardReportsListResultItemFields; priority: string; title: string; createdAt?: string | null; tags?: PhishguardReportsListResultItemTagsList | null; /** Deprecated, use `created_at` instead */ ts?: string | null; updatedAt?: string | null; } export const PhishguardReportsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.Number, content: S.String, disposition: PhishguardReportsListResultItemDisposition, fields: PhishguardReportsListResultItemFields, priority: S.String, title: S.String, createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), tags: S.optional(S.NullOr(PhishguardReportsListResultItemTagsList)), ts: S.optional(S.NullOr(S.String)), updatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("updated_at"))), }), ).annotate({ identifier: "PhishguardReportsListResultItem", }) as any as S.Schema; export type PhishguardReportsListResultList = Array; export const PhishguardReportsListResultList = /*@__PURE__*/ S.Array( PhishguardReportsListResultItem, ) as any as S.Schema; export interface ListPhishguardReportsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: PhishguardReportsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListPhishguardReportsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: PhishguardReportsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListPhishguardReportsResponse", }) as any as S.Schema; export type SettingsAllowPoliciesListRequestDirection = "asc" | "desc"; export const SettingsAllowPoliciesListRequestDirection = /*@__PURE__*/ S.String; export type SettingsAllowPoliciesListRequestOrder = "pattern" | "created_at"; export const SettingsAllowPoliciesListRequestOrder = /*@__PURE__*/ S.String; export type SettingsAllowPoliciesListRequestPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesListRequestPatternType = /*@__PURE__*/ S.String; export interface ListSettingAllowPoliciesRequest { /** Identifier. */ accountId: string; /** The sorting direction. */ direction?: SettingsAllowPoliciesListRequestDirection | (string & {}); /** Filter to show only policies where messages from the sender are exempted from Spam, Spoof, and Bulk dispositions (not Malicious or Suspicious). */ isAcceptableSender?: boolean; /** Filter to show only policies where messages to the recipient bypass all detections. */ isExemptRecipient?: boolean; /** Filter to show only policies where messages from the sender bypass all detections and link following. */ isTrustedSender?: boolean; /** Field to sort by. */ order?: SettingsAllowPoliciesListRequestOrder | (string & {}); /** Current page within paginated list of results. */ page?: number; pattern?: string; /** Type of pattern matching. */ patternType?: SettingsAllowPoliciesListRequestPatternType | (string & {}); /** The number of results per page. Maximum value is 1000. */ perPage?: number; /** Search term for filtering records. Behavior may change. */ search?: string; /** Filter to show only policies that enforce DMARC, SPF, or DKIM authentication. */ verifySender?: boolean; } export const ListSettingAllowPoliciesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional( SettingsAllowPoliciesListRequestDirection.pipe(T.Query()), ), isAcceptableSender: S.optional( S.Boolean.pipe(T.Query("is_acceptable_sender")), ), isExemptRecipient: S.optional( S.Boolean.pipe(T.Query("is_exempt_recipient")), ), isTrustedSender: S.optional(S.Boolean.pipe(T.Query("is_trusted_sender"))), order: S.optional(SettingsAllowPoliciesListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), pattern: S.optional(S.String.pipe(T.Query())), patternType: S.optional( SettingsAllowPoliciesListRequestPatternType.pipe(T.Query("pattern_type")), ), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), search: S.optional(S.String.pipe(T.Query())), verifySender: S.optional(S.Boolean.pipe(T.Query("verify_sender"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/allow_policies", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingAllowPoliciesRequest", }) as any as S.Schema; export type SettingsAllowPoliciesListResultItemPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesListResultItemPatternType = /*@__PURE__*/ S.String; export interface SettingsAllowPoliciesListResultItem { /** Allow policy identifier */ id: string; createdAt: string; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified: string; comments?: string | null; /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. */ isAcceptableSender?: boolean | null; /** Messages to this recipient will bypass all detections */ isExemptRecipient?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026. */ isRecipient?: boolean | null; isRegex?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026. */ isSender?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026. */ isSpoof?: boolean | null; /** Messages from this sender will bypass all detections and link following */ isTrustedSender?: boolean | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsAllowPoliciesListResultItemPatternType | null; /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */ verifySender?: boolean | null; } export const SettingsAllowPoliciesListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), lastModified: S.String.pipe(T.Body("last_modified")), comments: S.optional(S.NullOr(S.String)), isAcceptableSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_acceptable_sender")), ), isExemptRecipient: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_exempt_recipient")), ), isRecipient: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recipient"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_sender"))), isSpoof: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_spoof"))), isTrustedSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_trusted_sender")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsAllowPoliciesListResultItemPatternType).pipe( T.Body("pattern_type"), ), ), verifySender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("verify_sender"))), }), ).annotate({ identifier: "SettingsAllowPoliciesListResultItem", }) as any as S.Schema; export type SettingsAllowPoliciesListResultList = Array; export const SettingsAllowPoliciesListResultList = /*@__PURE__*/ S.Array( SettingsAllowPoliciesListResultItem, ) as any as S.Schema; export interface ListSettingAllowPoliciesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsAllowPoliciesListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingAllowPoliciesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SettingsAllowPoliciesListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingAllowPoliciesResponse", }) as any as S.Schema; export type SettingsBlockSendersListRequestDirection = "asc" | "desc"; export const SettingsBlockSendersListRequestDirection = /*@__PURE__*/ S.String; export type SettingsBlockSendersListRequestOrder = "pattern" | "created_at"; export const SettingsBlockSendersListRequestOrder = /*@__PURE__*/ S.String; export type SettingsBlockSendersListRequestPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersListRequestPatternType = /*@__PURE__*/ S.String; export interface ListSettingBlockSendersRequest { /** Identifier. */ accountId: string; /** The sorting direction. */ direction?: SettingsBlockSendersListRequestDirection | (string & {}); /** Field to sort by. */ order?: SettingsBlockSendersListRequestOrder | (string & {}); /** Current page within paginated list of results. */ page?: number; /** Filter by pattern value. */ pattern?: string; /** Filter by pattern type. */ patternType?: SettingsBlockSendersListRequestPatternType | (string & {}); /** The number of results per page. Maximum value is 1000. */ perPage?: number; /** Search term for filtering records. Behavior may change. */ search?: string; } export const ListSettingBlockSendersRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional( SettingsBlockSendersListRequestDirection.pipe(T.Query()), ), order: S.optional(SettingsBlockSendersListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), pattern: S.optional(S.String.pipe(T.Query())), patternType: S.optional( SettingsBlockSendersListRequestPatternType.pipe(T.Query("pattern_type")), ), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), search: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/block_senders", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingBlockSendersRequest", }) as any as S.Schema; export type SettingsBlockSendersListResultItemPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersListResultItemPatternType = /*@__PURE__*/ S.String; export interface SettingsBlockSendersListResultItem { /** Blocked sender pattern identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; isRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsBlockSendersListResultItemPatternType | null; } export const SettingsBlockSendersListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsBlockSendersListResultItemPatternType).pipe( T.Body("pattern_type"), ), ), }), ).annotate({ identifier: "SettingsBlockSendersListResultItem", }) as any as S.Schema; export type SettingsBlockSendersListResultList = Array; export const SettingsBlockSendersListResultList = /*@__PURE__*/ S.Array( SettingsBlockSendersListResultItem, ) as any as S.Schema; export interface ListSettingBlockSendersResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsBlockSendersListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingBlockSendersResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SettingsBlockSendersListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingBlockSendersResponse", }) as any as S.Schema; export type SettingsDomainsListRequestActiveDeliveryMode = | "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN"; export const SettingsDomainsListRequestActiveDeliveryMode = /*@__PURE__*/ S.String; export type SettingsDomainsListRequestAllowedDeliveryMode = | "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN"; export const SettingsDomainsListRequestAllowedDeliveryMode = /*@__PURE__*/ S.String; export type SettingsDomainsListRequestDirection = "asc" | "desc"; export const SettingsDomainsListRequestDirection = /*@__PURE__*/ S.String; export type SettingsDomainsListRequestDomainList = Array; export const SettingsDomainsListRequestDomainList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SettingsDomainsListRequestOrder = "domain" | "created_at"; export const SettingsDomainsListRequestOrder = /*@__PURE__*/ S.String; export type SettingsDomainsListRequestStatus = | "pending" | "active" | "failed" | "timeout"; export const SettingsDomainsListRequestStatus = /*@__PURE__*/ S.String; export interface ListSettingDomainsRequest { /** Identifier. */ accountId: string; /** Currently active delivery mode to filter by. */ activeDeliveryMode?: | SettingsDomainsListRequestActiveDeliveryMode | (string & {}); /** Delivery mode to filter by. */ allowedDeliveryMode?: | SettingsDomainsListRequestAllowedDeliveryMode | (string & {}); /** The sorting direction. */ direction?: SettingsDomainsListRequestDirection | (string & {}); /** Domain names to filter by. */ domain?: SettingsDomainsListRequestDomainList; /** Integration ID to filter by. */ integrationId?: string; /** Field to sort by. */ order?: SettingsDomainsListRequestOrder | (string & {}); /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; /** Search term for filtering records. Behavior may change. */ search?: string; /** Filters response to domains with the provided status. */ status?: SettingsDomainsListRequestStatus | (string & {}); } export const ListSettingDomainsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), activeDeliveryMode: S.optional( SettingsDomainsListRequestActiveDeliveryMode.pipe( T.Query("active_delivery_mode"), ), ), allowedDeliveryMode: S.optional( SettingsDomainsListRequestAllowedDeliveryMode.pipe( T.Query("allowed_delivery_mode"), ), ), direction: S.optional(SettingsDomainsListRequestDirection.pipe(T.Query())), domain: S.optional(SettingsDomainsListRequestDomainList.pipe(T.Query())), integrationId: S.optional(S.String.pipe(T.Query("integration_id"))), order: S.optional(SettingsDomainsListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), search: S.optional(S.String.pipe(T.Query())), status: S.optional(SettingsDomainsListRequestStatus.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/domains", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingDomainsRequest", }) as any as S.Schema; export type SettingsDomainsListResultItemAllowedDeliveryModesItem = | "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN"; export const SettingsDomainsListResultItemAllowedDeliveryModesItem = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemAllowedDeliveryModesList = Array; export const SettingsDomainsListResultItemAllowedDeliveryModesList = /*@__PURE__*/ S.Array( SettingsDomainsListResultItemAllowedDeliveryModesItem, ) as any as S.Schema; export type SettingsDomainsListResultItemAuthorization = SettingsDomainsGetResponseAuthorization; export const SettingsDomainsListResultItemAuthorization = SettingsDomainsGetResponseAuthorization; export type SettingsDomainsListResultItemDmarcStatus = | "none" | "good" | "invalid"; export const SettingsDomainsListResultItemDmarcStatus = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemDropDispositionsItem = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const SettingsDomainsListResultItemDropDispositionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemDropDispositionsList = Array; export const SettingsDomainsListResultItemDropDispositionsList = /*@__PURE__*/ S.Array( SettingsDomainsListResultItemDropDispositionsItem, ) as any as S.Schema; export type SettingsDomainsListResultItemEmailsProcessed = SettingsDomainsGetResponseEmailsProcessed; export const SettingsDomainsListResultItemEmailsProcessed = SettingsDomainsGetResponseEmailsProcessed; export type SettingsDomainsListResultItemFolder = "AllItems" | "Inbox"; export const SettingsDomainsListResultItemFolder = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemInboxProvider = "Microsoft" | "Google"; export const SettingsDomainsListResultItemInboxProvider = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemIpRestrictionsList = Array; export const SettingsDomainsListResultItemIpRestrictionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SettingsDomainsListResultItemRegionsItem = | "GLOBAL" | "AU" | "DE" | "IN" | "US"; export const SettingsDomainsListResultItemRegionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemRegionsList = Array; export const SettingsDomainsListResultItemRegionsList = /*@__PURE__*/ S.Array( SettingsDomainsListResultItemRegionsItem, ) as any as S.Schema; export type SettingsDomainsListResultItemSpfStatus = | "none" | "good" | "neutral" | "open" | "invalid"; export const SettingsDomainsListResultItemSpfStatus = /*@__PURE__*/ S.String; export type SettingsDomainsListResultItemStatus = | "pending" | "active" | "failed" | "timeout"; export const SettingsDomainsListResultItemStatus = /*@__PURE__*/ S.String; export interface SettingsDomainsListResultItem { /** Domain identifier */ id?: string | null; allowedDeliveryModes?: SettingsDomainsListResultItemAllowedDeliveryModesList | null; authorization?: SettingsDomainsGetResponseAuthorization | null; createdAt?: string | null; dmarcStatus?: SettingsDomainsListResultItemDmarcStatus | null; domain?: string | null; dropDispositions?: SettingsDomainsListResultItemDropDispositionsList | null; emailsProcessed?: SettingsDomainsGetResponseEmailsProcessed | null; folder?: SettingsDomainsListResultItemFolder | null; inboxProvider?: SettingsDomainsListResultItemInboxProvider | null; integrationId?: string | null; ipRestrictions?: SettingsDomainsListResultItemIpRestrictionsList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; lookbackHops?: number | null; modifiedAt?: string | null; o365TenantId?: string | null; regions?: SettingsDomainsListResultItemRegionsList | null; requireTlsInbound?: boolean | null; requireTlsOutbound?: boolean | null; spfStatus?: SettingsDomainsListResultItemSpfStatus | null; status?: SettingsDomainsListResultItemStatus | null; transport?: string | null; } export const SettingsDomainsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), allowedDeliveryModes: S.optional( S.NullOr(SettingsDomainsListResultItemAllowedDeliveryModesList).pipe( T.Body("allowed_delivery_modes"), ), ), authorization: S.optional( S.NullOr(SettingsDomainsGetResponseAuthorization), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), dmarcStatus: S.optional( S.NullOr(SettingsDomainsListResultItemDmarcStatus).pipe( T.Body("dmarc_status"), ), ), domain: S.optional(S.NullOr(S.String)), dropDispositions: S.optional( S.NullOr(SettingsDomainsListResultItemDropDispositionsList).pipe( T.Body("drop_dispositions"), ), ), emailsProcessed: S.optional( S.NullOr(SettingsDomainsGetResponseEmailsProcessed).pipe( T.Body("emails_processed"), ), ), folder: S.optional(S.NullOr(SettingsDomainsListResultItemFolder)), inboxProvider: S.optional( S.NullOr(SettingsDomainsListResultItemInboxProvider).pipe( T.Body("inbox_provider"), ), ), integrationId: S.optional( S.NullOr(S.String).pipe(T.Body("integration_id")), ), ipRestrictions: S.optional( S.NullOr(SettingsDomainsListResultItemIpRestrictionsList).pipe( T.Body("ip_restrictions"), ), ), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), lookbackHops: S.optional(S.NullOr(S.Number).pipe(T.Body("lookback_hops"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), o365TenantId: S.optional(S.NullOr(S.String).pipe(T.Body("o365_tenant_id"))), regions: S.optional(S.NullOr(SettingsDomainsListResultItemRegionsList)), requireTlsInbound: S.optional( S.NullOr(S.Boolean).pipe(T.Body("require_tls_inbound")), ), requireTlsOutbound: S.optional( S.NullOr(S.Boolean).pipe(T.Body("require_tls_outbound")), ), spfStatus: S.optional( S.NullOr(SettingsDomainsListResultItemSpfStatus).pipe( T.Body("spf_status"), ), ), status: S.optional(S.NullOr(SettingsDomainsListResultItemStatus)), transport: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "SettingsDomainsListResultItem", }) as any as S.Schema; export type SettingsDomainsListResultList = Array; export const SettingsDomainsListResultList = /*@__PURE__*/ S.Array( SettingsDomainsListResultItem, ) as any as S.Schema; export interface ListSettingDomainsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsDomainsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingDomainsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SettingsDomainsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingDomainsResponse", }) as any as S.Schema; export type SettingsImpersonationRegistryListRequestDirection = "asc" | "desc"; export const SettingsImpersonationRegistryListRequestDirection = /*@__PURE__*/ S.String; export type SettingsImpersonationRegistryListRequestOrder = | "name" | "email" | "created_at"; export const SettingsImpersonationRegistryListRequestOrder = /*@__PURE__*/ S.String; export type SettingsImpersonationRegistryListRequestProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryListRequestProvenance = /*@__PURE__*/ S.String; export interface ListSettingImpersonationRegistriesRequest { /** Identifier. */ accountId: string; /** The sorting direction. */ direction?: SettingsImpersonationRegistryListRequestDirection | (string & {}); /** Field to sort by. */ order?: SettingsImpersonationRegistryListRequestOrder | (string & {}); /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; provenance?: | SettingsImpersonationRegistryListRequestProvenance | (string & {}); /** Search term for filtering records. Behavior may change. */ search?: string; } export const ListSettingImpersonationRegistriesRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional( SettingsImpersonationRegistryListRequestDirection.pipe(T.Query()), ), order: S.optional( SettingsImpersonationRegistryListRequestOrder.pipe(T.Query()), ), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), provenance: S.optional( SettingsImpersonationRegistryListRequestProvenance.pipe(T.Query()), ), search: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/impersonation_registry", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingImpersonationRegistriesRequest", }) as any as S.Schema; export type SettingsImpersonationRegistryListResultItemProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryListResultItemProvenance = /*@__PURE__*/ S.String; export interface SettingsImpersonationRegistryListResultItem { /** Impersonation registry entry identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; directoryId?: number | null; directoryNodeId?: number | null; email?: string | null; externalDirectoryNodeId?: string | null; isEmailRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; name?: string | null; provenance?: SettingsImpersonationRegistryListResultItemProvenance | null; } export const SettingsImpersonationRegistryListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), directoryId: S.optional(S.NullOr(S.Number).pipe(T.Body("directory_id"))), directoryNodeId: S.optional( S.NullOr(S.Number).pipe(T.Body("directory_node_id")), ), email: S.optional(S.NullOr(S.String)), externalDirectoryNodeId: S.optional( S.NullOr(S.String).pipe(T.Body("external_directory_node_id")), ), isEmailRegex: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_email_regex")), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), name: S.optional(S.NullOr(S.String)), provenance: S.optional( S.NullOr(SettingsImpersonationRegistryListResultItemProvenance), ), }), ).annotate({ identifier: "SettingsImpersonationRegistryListResultItem", }) as any as S.Schema; export type SettingsImpersonationRegistryListResultList = Array; export const SettingsImpersonationRegistryListResultList = /*@__PURE__*/ S.Array( SettingsImpersonationRegistryListResultItem, ) as any as S.Schema; export interface ListSettingImpersonationRegistriesResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsImpersonationRegistryListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingImpersonationRegistriesResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SettingsImpersonationRegistryListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingImpersonationRegistriesResponse", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsListRequestDirection = | "asc" | "desc"; export const SettingsSendingDomainRestrictionsListRequestDirection = /*@__PURE__*/ S.String; export type SettingsSendingDomainRestrictionsListRequestOrder = | "domain" | "created_at"; export const SettingsSendingDomainRestrictionsListRequestOrder = /*@__PURE__*/ S.String; export interface ListSettingSendingDomainRestrictionsRequest { /** Identifier. */ accountId: string; /** The sorting direction. */ direction?: | SettingsSendingDomainRestrictionsListRequestDirection | (string & {}); /** Field to sort by. */ order?: SettingsSendingDomainRestrictionsListRequestOrder | (string & {}); /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; /** Search term for filtering records. Behavior may change. */ search?: string; } export const ListSettingSendingDomainRestrictionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional( SettingsSendingDomainRestrictionsListRequestDirection.pipe(T.Query()), ), order: S.optional( SettingsSendingDomainRestrictionsListRequestOrder.pipe(T.Query()), ), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), search: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/sending_domain_restrictions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingSendingDomainRestrictionsRequest", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsListResultItemExcludeList = Array; export const SettingsSendingDomainRestrictionsListResultItemExcludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SettingsSendingDomainRestrictionsListResultItem { /** Sending domain restriction identifier. */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Domain that requires TLS enforcement. */ domain?: string | null; /** Excluded subdomains that are exempt from TLS requirements. */ exclude?: SettingsSendingDomainRestrictionsListResultItemExcludeList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const SettingsSendingDomainRestrictionsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), domain: S.optional(S.NullOr(S.String)), exclude: S.optional( S.NullOr(SettingsSendingDomainRestrictionsListResultItemExcludeList), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }), ).annotate({ identifier: "SettingsSendingDomainRestrictionsListResultItem", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsListResultList = Array; export const SettingsSendingDomainRestrictionsListResultList = /*@__PURE__*/ S.Array( SettingsSendingDomainRestrictionsListResultItem, ) as any as S.Schema; export interface ListSettingSendingDomainRestrictionsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsSendingDomainRestrictionsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingSendingDomainRestrictionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SettingsSendingDomainRestrictionsListResultList.pipe( T.EnvelopePayload(), ), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingSendingDomainRestrictionsResponse", }) as any as S.Schema; export type SettingsTrustedDomainsListRequestDirection = "asc" | "desc"; export const SettingsTrustedDomainsListRequestDirection = /*@__PURE__*/ S.String; export type SettingsTrustedDomainsListRequestOrder = "pattern" | "created_at"; export const SettingsTrustedDomainsListRequestOrder = /*@__PURE__*/ S.String; export interface ListSettingTrustedDomainsRequest { /** Identifier. */ accountId: string; /** The sorting direction. */ direction?: SettingsTrustedDomainsListRequestDirection | (string & {}); /** Filter to show only recently registered domains that are trusted to prevent triggering Suspicious or Malicious dispositions. */ isRecent?: boolean; /** Filter to show only proximity domains (partner or approved domains with similar spelling to connected domains) that prevent Spoof dispositions. */ isSimilarity?: boolean; /** Field to sort by. */ order?: SettingsTrustedDomainsListRequestOrder | (string & {}); /** Current page within paginated list of results. */ page?: number; pattern?: string; /** The number of results per page. Maximum value is 1000. */ perPage?: number; /** Search term for filtering records. Behavior may change. */ search?: string; } export const ListSettingTrustedDomainsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), direction: S.optional( SettingsTrustedDomainsListRequestDirection.pipe(T.Query()), ), isRecent: S.optional(S.Boolean.pipe(T.Query("is_recent"))), isSimilarity: S.optional(S.Boolean.pipe(T.Query("is_similarity"))), order: S.optional(SettingsTrustedDomainsListRequestOrder.pipe(T.Query())), page: S.optional(S.Number.pipe(T.Query())), pattern: S.optional(S.String.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), search: S.optional(S.String.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/trusted_domains", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingTrustedDomainsRequest", }) as any as S.Schema; export interface SettingsTrustedDomainsListResultItem { /** Trusted domain identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */ isRecent?: boolean | null; isRegex?: boolean | null; /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */ isSimilarity?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; } export const SettingsTrustedDomainsListResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRecent: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recent"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSimilarity: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_similarity")), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "SettingsTrustedDomainsListResultItem", }) as any as S.Schema; export type SettingsTrustedDomainsListResultList = Array; export const SettingsTrustedDomainsListResultList = /*@__PURE__*/ S.Array( SettingsTrustedDomainsListResultItem, ) as any as S.Schema; export interface ListSettingTrustedDomainsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsTrustedDomainsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingTrustedDomainsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SettingsTrustedDomainsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingTrustedDomainsResponse", }) as any as S.Schema; export interface ListSettingUrlIgnorePatternsRequest { /** Identifier. */ accountId: string; /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; } export const ListSettingUrlIgnorePatternsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/settings/url_ignore_patterns", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingUrlIgnorePatternsRequest", }) as any as S.Schema; export interface SettingsUrlIgnorePatternsListResultItem { /** URL ignore pattern identifier */ id: string; createdAt: string; /** Regular expression matching URLs that should not be rewritten. */ pattern: string; /** Optional note describing the reason for the ignore pattern. */ comments?: string | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const SettingsUrlIgnorePatternsListResultItem = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), pattern: S.String, comments: S.optional(S.NullOr(S.String)), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }), ).annotate({ identifier: "SettingsUrlIgnorePatternsListResultItem", }) as any as S.Schema; export type SettingsUrlIgnorePatternsListResultList = Array; export const SettingsUrlIgnorePatternsListResultList = /*@__PURE__*/ S.Array( SettingsUrlIgnorePatternsListResultItem, ) as any as S.Schema; export interface ListSettingUrlIgnorePatternsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SettingsUrlIgnorePatternsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSettingUrlIgnorePatternsResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ result: SettingsUrlIgnorePatternsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSettingUrlIgnorePatternsResponse", }) as any as S.Schema; export type SubmissionsListRequestOriginalDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListRequestOriginalDisposition = /*@__PURE__*/ S.String; export type SubmissionsListRequestOutcomeDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListRequestOutcomeDisposition = /*@__PURE__*/ S.String; export type SubmissionsListRequestRequestedDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListRequestRequestedDisposition = /*@__PURE__*/ S.String; export type SubmissionsListRequestType = "TEAM" | "USER"; export const SubmissionsListRequestType = /*@__PURE__*/ S.String; export interface ListSubmissionsRequest { /** Identifier. */ accountId: string; /** The end of the search date range. Defaults to `now`. */ end?: string; /** When true, return only submissions that were escalated by an end user (vs. by the security team). When false, return only submissions that were not escalated by an end user. When omitted, no filter is applied. */ escalatedFromUser?: boolean; originalDisposition?: | SubmissionsListRequestOriginalDisposition | (string & {}); outcomeDisposition?: SubmissionsListRequestOutcomeDisposition | (string & {}); /** Current page within paginated list of results. */ page?: number; /** The number of results per page. Maximum value is 1000. */ perPage?: number; query?: string; requestedDisposition?: | SubmissionsListRequestRequestedDisposition | (string & {}); /** The beginning of the search date range. Defaults to `now - 30 days`. */ start?: string; status?: string; submissionId?: string; type?: SubmissionsListRequestType | (string & {}); } export const ListSubmissionsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), end: S.optional(S.String.pipe(T.Query())), escalatedFromUser: S.optional( S.Boolean.pipe(T.Query("escalated_from_user")), ), originalDisposition: S.optional( SubmissionsListRequestOriginalDisposition.pipe( T.Query("original_disposition"), ), ), outcomeDisposition: S.optional( SubmissionsListRequestOutcomeDisposition.pipe( T.Query("outcome_disposition"), ), ), page: S.optional(S.Number.pipe(T.Query())), perPage: S.optional(S.Number.pipe(T.Query("per_page"))), query: S.optional(S.String.pipe(T.Query())), requestedDisposition: S.optional( SubmissionsListRequestRequestedDisposition.pipe( T.Query("requested_disposition"), ), ), start: S.optional(S.String.pipe(T.Query())), status: S.optional(S.String.pipe(T.Query())), submissionId: S.optional(S.String.pipe(T.Query("submission_id"))), type: S.optional(SubmissionsListRequestType.pipe(T.Query())), }) .pipe( T.Http({ method: "GET", uri: "/accounts/{account_id}/email-security/submissions", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSubmissionsRequest", }) as any as S.Schema; export type SubmissionsListResultItemCustomerStatus = | "escalated" | "reviewed" | "unreviewed"; export const SubmissionsListResultItemCustomerStatus = /*@__PURE__*/ S.String; export type SubmissionsListResultItemEscalatedAs = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListResultItemEscalatedAs = /*@__PURE__*/ S.String; export type SubmissionsListResultItemOriginalDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListResultItemOriginalDisposition = /*@__PURE__*/ S.String; export type SubmissionsListResultItemOutcomeDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListResultItemOutcomeDisposition = /*@__PURE__*/ S.String; export type SubmissionsListResultItemRequestedDisposition = | "MALICIOUS" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "NONE"; export const SubmissionsListResultItemRequestedDisposition = /*@__PURE__*/ S.String; export type SubmissionsListResultItemType = "Team" | "User"; export const SubmissionsListResultItemType = /*@__PURE__*/ S.String; export interface SubmissionsListResultItem { /** When the submission was requested (UTC). */ requestedAt: string; submissionId: string; customerStatus?: SubmissionsListResultItemCustomerStatus | null; escalatedAs?: SubmissionsListResultItemEscalatedAs | null; escalatedAt?: string | null; escalatedBy?: string | null; escalatedSubmissionId?: string | null; originalDisposition?: SubmissionsListResultItemOriginalDisposition | null; originalEdfHash?: string | null; /** The postfix ID of the original message that was submitted */ originalPostfixId?: string | null; outcome?: string | null; outcomeDisposition?: SubmissionsListResultItemOutcomeDisposition | null; requestedBy?: string | null; requestedDisposition?: SubmissionsListResultItemRequestedDisposition | null; /** Deprecated, use `requested_at` instead */ requestedTs?: string | null; status?: string | null; subject?: string | null; /** Whether the submission was created by a team member or an end user. */ type?: SubmissionsListResultItemType | null; } export const SubmissionsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ requestedAt: S.String.pipe(T.Body("requested_at")), submissionId: S.String.pipe(T.Body("submission_id")), customerStatus: S.optional( S.NullOr(SubmissionsListResultItemCustomerStatus).pipe( T.Body("customer_status"), ), ), escalatedAs: S.optional( S.NullOr(SubmissionsListResultItemEscalatedAs).pipe( T.Body("escalated_as"), ), ), escalatedAt: S.optional(S.NullOr(S.String).pipe(T.Body("escalated_at"))), escalatedBy: S.optional(S.NullOr(S.String).pipe(T.Body("escalated_by"))), escalatedSubmissionId: S.optional( S.NullOr(S.String).pipe(T.Body("escalated_submission_id")), ), originalDisposition: S.optional( S.NullOr(SubmissionsListResultItemOriginalDisposition).pipe( T.Body("original_disposition"), ), ), originalEdfHash: S.optional( S.NullOr(S.String).pipe(T.Body("original_edf_hash")), ), originalPostfixId: S.optional( S.NullOr(S.String).pipe(T.Body("original_postfix_id")), ), outcome: S.optional(S.NullOr(S.String)), outcomeDisposition: S.optional( S.NullOr(SubmissionsListResultItemOutcomeDisposition).pipe( T.Body("outcome_disposition"), ), ), requestedBy: S.optional(S.NullOr(S.String).pipe(T.Body("requested_by"))), requestedDisposition: S.optional( S.NullOr(SubmissionsListResultItemRequestedDisposition).pipe( T.Body("requested_disposition"), ), ), requestedTs: S.optional(S.NullOr(S.String).pipe(T.Body("requested_ts"))), status: S.optional(S.NullOr(S.String)), subject: S.optional(S.NullOr(S.String)), type: S.optional(S.NullOr(SubmissionsListResultItemType)), }), ).annotate({ identifier: "SubmissionsListResultItem", }) as any as S.Schema; export type SubmissionsListResultList = Array; export const SubmissionsListResultList = /*@__PURE__*/ S.Array( SubmissionsListResultItem, ) as any as S.Schema; export interface ListSubmissionsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SubmissionsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSubmissionsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SubmissionsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSubmissionsResponse", }) as any as S.Schema; export type SettingsAllowPoliciesEditRequestPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesEditRequestPatternType = /*@__PURE__*/ S.String; export interface PatchSettingAllowPolicyRequest { /** Identifier. */ accountId: string; /** Allow policy identifier */ policyId: string; comments?: string; /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. */ isAcceptableSender?: boolean; /** Messages to this recipient will bypass all detections */ isExemptRecipient?: boolean; /** Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026. */ isRecipient?: boolean; isRegex?: boolean; /** Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026. */ isSender?: boolean; /** Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026. */ isSpoof?: boolean; /** Messages from this sender will bypass all detections and link following */ isTrustedSender?: boolean; pattern?: string; /** Type of pattern matching. */ patternType?: SettingsAllowPoliciesEditRequestPatternType | (string & {}); /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */ verifySender?: boolean; } export const PatchSettingAllowPolicyRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), policyId: S.String.pipe(T.Label("policy_id")), comments: S.optional(S.String), isAcceptableSender: S.optional( S.Boolean.pipe(T.Body("is_acceptable_sender")), ), isExemptRecipient: S.optional( S.Boolean.pipe(T.Body("is_exempt_recipient")), ), isRecipient: S.optional(S.Boolean.pipe(T.Body("is_recipient"))), isRegex: S.optional(S.Boolean.pipe(T.Body("is_regex"))), isSender: S.optional(S.Boolean.pipe(T.Body("is_sender"))), isSpoof: S.optional(S.Boolean.pipe(T.Body("is_spoof"))), isTrustedSender: S.optional(S.Boolean.pipe(T.Body("is_trusted_sender"))), pattern: S.optional(S.String), patternType: S.optional( SettingsAllowPoliciesEditRequestPatternType.pipe(T.Body("pattern_type")), ), verifySender: S.optional(S.Boolean.pipe(T.Body("verify_sender"))), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/allow_policies/{policy_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingAllowPolicyRequest", }) as any as S.Schema; export type SettingsAllowPoliciesEditResponsePatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsAllowPoliciesEditResponsePatternType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingAllowPolicyResponse { /** Allow policy identifier */ id: string; createdAt: string; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified: string; comments?: string | null; /** Messages from this sender will be exempted from Spam, Spoof and Bulk dispositions. Note - This will not exempt messages with Malicious or Suspicious dispositions. */ isAcceptableSender?: boolean | null; /** Messages to this recipient will bypass all detections */ isExemptRecipient?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026. */ isRecipient?: boolean | null; isRegex?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026. */ isSender?: boolean | null; /** Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026. */ isSpoof?: boolean | null; /** Messages from this sender will bypass all detections and link following */ isTrustedSender?: boolean | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsAllowPoliciesEditResponsePatternType | null; /** Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication. */ verifySender?: boolean | null; } export const PatchSettingAllowPolicyResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), lastModified: S.String.pipe(T.Body("last_modified")), comments: S.optional(S.NullOr(S.String)), isAcceptableSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_acceptable_sender")), ), isExemptRecipient: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_exempt_recipient")), ), isRecipient: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recipient"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_sender"))), isSpoof: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_spoof"))), isTrustedSender: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_trusted_sender")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsAllowPoliciesEditResponsePatternType).pipe( T.Body("pattern_type"), ), ), verifySender: S.optional(S.NullOr(S.Boolean).pipe(T.Body("verify_sender"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingAllowPolicyResponse", }) as any as S.Schema; export type SettingsBlockSendersEditRequestPatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersEditRequestPatternType = /*@__PURE__*/ S.String; export interface PatchSettingBlockSenderRequest { /** Identifier. */ accountId: string; /** Blocked sender pattern identifier */ patternId: string; comments?: string; isRegex?: boolean; pattern?: string; /** Type of pattern matching. */ patternType?: SettingsBlockSendersEditRequestPatternType | (string & {}); } export const PatchSettingBlockSenderRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), patternId: S.String.pipe(T.Label("pattern_id")), comments: S.optional(S.String), isRegex: S.optional(S.Boolean.pipe(T.Body("is_regex"))), pattern: S.optional(S.String), patternType: S.optional( SettingsBlockSendersEditRequestPatternType.pipe(T.Body("pattern_type")), ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/block_senders/{pattern_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingBlockSenderRequest", }) as any as S.Schema; export type SettingsBlockSendersEditResponsePatternType = | "EMAIL" | "DOMAIN" | "IP" | "UNKNOWN"; export const SettingsBlockSendersEditResponsePatternType = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingBlockSenderResponse { /** Blocked sender pattern identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; isRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; /** Type of pattern matching. */ patternType?: SettingsBlockSendersEditResponsePatternType | null; } export const PatchSettingBlockSenderResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), patternType: S.optional( S.NullOr(SettingsBlockSendersEditResponsePatternType).pipe( T.Body("pattern_type"), ), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingBlockSenderResponse", }) as any as S.Schema; export type SettingsDomainsEditRequestAllowedDeliveryModesItem = | "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN"; export const SettingsDomainsEditRequestAllowedDeliveryModesItem = /*@__PURE__*/ S.String; export type SettingsDomainsEditRequestAllowedDeliveryModesList = Array< SettingsDomainsEditRequestAllowedDeliveryModesItem | (string & {}) >; export const SettingsDomainsEditRequestAllowedDeliveryModesList = /*@__PURE__*/ S.Array( SettingsDomainsEditRequestAllowedDeliveryModesItem, ) as any as S.Schema; export type SettingsDomainsEditRequestDropDispositionsItem = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const SettingsDomainsEditRequestDropDispositionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsEditRequestDropDispositionsList = Array< SettingsDomainsEditRequestDropDispositionsItem | (string & {}) >; export const SettingsDomainsEditRequestDropDispositionsList = /*@__PURE__*/ S.Array( SettingsDomainsEditRequestDropDispositionsItem, ) as any as S.Schema; export type SettingsDomainsEditRequestFolder = "AllItems" | "Inbox"; export const SettingsDomainsEditRequestFolder = /*@__PURE__*/ S.String; export type SettingsDomainsEditRequestIpRestrictionsList = Array; export const SettingsDomainsEditRequestIpRestrictionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SettingsDomainsEditRequestRegionsItem = | "GLOBAL" | "AU" | "DE" | "IN" | "US"; export const SettingsDomainsEditRequestRegionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsEditRequestRegionsList = Array< SettingsDomainsEditRequestRegionsItem | (string & {}) >; export const SettingsDomainsEditRequestRegionsList = /*@__PURE__*/ S.Array( SettingsDomainsEditRequestRegionsItem, ) as any as S.Schema; export interface PatchSettingDomainRequest { /** Identifier. */ accountId: string; /** Domain identifier */ domainId: string; allowedDeliveryModes?: SettingsDomainsEditRequestAllowedDeliveryModesList; domain?: string; dropDispositions?: SettingsDomainsEditRequestDropDispositionsList; folder?: SettingsDomainsEditRequestFolder | (string & {}); integrationId?: string; ipRestrictions?: SettingsDomainsEditRequestIpRestrictionsList; lookbackHops?: number; regions?: SettingsDomainsEditRequestRegionsList; requireTlsInbound?: boolean; requireTlsOutbound?: boolean; transport?: string; } export const PatchSettingDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), domainId: S.String.pipe(T.Label("domain_id")), allowedDeliveryModes: S.optional( SettingsDomainsEditRequestAllowedDeliveryModesList.pipe( T.Body("allowed_delivery_modes"), ), ), domain: S.optional(S.String), dropDispositions: S.optional( SettingsDomainsEditRequestDropDispositionsList.pipe( T.Body("drop_dispositions"), ), ), folder: S.optional(SettingsDomainsEditRequestFolder), integrationId: S.optional(S.String.pipe(T.Body("integration_id"))), ipRestrictions: S.optional( SettingsDomainsEditRequestIpRestrictionsList.pipe( T.Body("ip_restrictions"), ), ), lookbackHops: S.optional(S.Number.pipe(T.Body("lookback_hops"))), regions: S.optional(SettingsDomainsEditRequestRegionsList), requireTlsInbound: S.optional( S.Boolean.pipe(T.Body("require_tls_inbound")), ), requireTlsOutbound: S.optional( S.Boolean.pipe(T.Body("require_tls_outbound")), ), transport: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/domains/{domain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingDomainRequest", }) as any as S.Schema; export type SettingsDomainsEditResponseAllowedDeliveryModesItem = | "DIRECT" | "BCC" | "JOURNAL" | "API" | "RETRO_SCAN"; export const SettingsDomainsEditResponseAllowedDeliveryModesItem = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseAllowedDeliveryModesList = Array; export const SettingsDomainsEditResponseAllowedDeliveryModesList = /*@__PURE__*/ S.Array( SettingsDomainsEditResponseAllowedDeliveryModesItem, ) as any as S.Schema; export type SettingsDomainsEditResponseAuthorization = SettingsDomainsGetResponseAuthorization; export const SettingsDomainsEditResponseAuthorization = SettingsDomainsGetResponseAuthorization; export type SettingsDomainsEditResponseDmarcStatus = | "none" | "good" | "invalid"; export const SettingsDomainsEditResponseDmarcStatus = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseDropDispositionsItem = | "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | "SPOOF" | "SPAM" | "BULK" | "ENCRYPTED" | "EXTERNAL" | "UNKNOWN" | "NONE"; export const SettingsDomainsEditResponseDropDispositionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseDropDispositionsList = Array; export const SettingsDomainsEditResponseDropDispositionsList = /*@__PURE__*/ S.Array( SettingsDomainsEditResponseDropDispositionsItem, ) as any as S.Schema; export type SettingsDomainsEditResponseEmailsProcessed = SettingsDomainsGetResponseEmailsProcessed; export const SettingsDomainsEditResponseEmailsProcessed = SettingsDomainsGetResponseEmailsProcessed; export type SettingsDomainsEditResponseFolder = "AllItems" | "Inbox"; export const SettingsDomainsEditResponseFolder = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseInboxProvider = "Microsoft" | "Google"; export const SettingsDomainsEditResponseInboxProvider = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseIpRestrictionsList = Array; export const SettingsDomainsEditResponseIpRestrictionsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SettingsDomainsEditResponseRegionsItem = | "GLOBAL" | "AU" | "DE" | "IN" | "US"; export const SettingsDomainsEditResponseRegionsItem = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseRegionsList = Array; export const SettingsDomainsEditResponseRegionsList = /*@__PURE__*/ S.Array( SettingsDomainsEditResponseRegionsItem, ) as any as S.Schema; export type SettingsDomainsEditResponseSpfStatus = | "none" | "good" | "neutral" | "open" | "invalid"; export const SettingsDomainsEditResponseSpfStatus = /*@__PURE__*/ S.String; export type SettingsDomainsEditResponseStatus = | "pending" | "active" | "failed" | "timeout"; export const SettingsDomainsEditResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingDomainResponse { /** Domain identifier */ id?: string | null; allowedDeliveryModes?: SettingsDomainsEditResponseAllowedDeliveryModesList | null; authorization?: SettingsDomainsGetResponseAuthorization | null; createdAt?: string | null; dmarcStatus?: SettingsDomainsEditResponseDmarcStatus | null; domain?: string | null; dropDispositions?: SettingsDomainsEditResponseDropDispositionsList | null; emailsProcessed?: SettingsDomainsGetResponseEmailsProcessed | null; folder?: SettingsDomainsEditResponseFolder | null; inboxProvider?: SettingsDomainsEditResponseInboxProvider | null; integrationId?: string | null; ipRestrictions?: SettingsDomainsEditResponseIpRestrictionsList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; lookbackHops?: number | null; modifiedAt?: string | null; o365TenantId?: string | null; regions?: SettingsDomainsEditResponseRegionsList | null; requireTlsInbound?: boolean | null; requireTlsOutbound?: boolean | null; spfStatus?: SettingsDomainsEditResponseSpfStatus | null; status?: SettingsDomainsEditResponseStatus | null; transport?: string | null; } export const PatchSettingDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), allowedDeliveryModes: S.optional( S.NullOr(SettingsDomainsEditResponseAllowedDeliveryModesList).pipe( T.Body("allowed_delivery_modes"), ), ), authorization: S.optional( S.NullOr(SettingsDomainsGetResponseAuthorization), ), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), dmarcStatus: S.optional( S.NullOr(SettingsDomainsEditResponseDmarcStatus).pipe( T.Body("dmarc_status"), ), ), domain: S.optional(S.NullOr(S.String)), dropDispositions: S.optional( S.NullOr(SettingsDomainsEditResponseDropDispositionsList).pipe( T.Body("drop_dispositions"), ), ), emailsProcessed: S.optional( S.NullOr(SettingsDomainsGetResponseEmailsProcessed).pipe( T.Body("emails_processed"), ), ), folder: S.optional(S.NullOr(SettingsDomainsEditResponseFolder)), inboxProvider: S.optional( S.NullOr(SettingsDomainsEditResponseInboxProvider).pipe( T.Body("inbox_provider"), ), ), integrationId: S.optional( S.NullOr(S.String).pipe(T.Body("integration_id")), ), ipRestrictions: S.optional( S.NullOr(SettingsDomainsEditResponseIpRestrictionsList).pipe( T.Body("ip_restrictions"), ), ), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), lookbackHops: S.optional(S.NullOr(S.Number).pipe(T.Body("lookback_hops"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), o365TenantId: S.optional(S.NullOr(S.String).pipe(T.Body("o365_tenant_id"))), regions: S.optional(S.NullOr(SettingsDomainsEditResponseRegionsList)), requireTlsInbound: S.optional( S.NullOr(S.Boolean).pipe(T.Body("require_tls_inbound")), ), requireTlsOutbound: S.optional( S.NullOr(S.Boolean).pipe(T.Body("require_tls_outbound")), ), spfStatus: S.optional( S.NullOr(SettingsDomainsEditResponseSpfStatus).pipe(T.Body("spf_status")), ), status: S.optional(S.NullOr(SettingsDomainsEditResponseStatus)), transport: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingDomainResponse", }) as any as S.Schema; export type SettingsImpersonationRegistryEditRequestProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryEditRequestProvenance = /*@__PURE__*/ S.String; export interface PatchSettingImpersonationRegistryRequest { /** Identifier. */ accountId: string; /** Impersonation registry entry identifier */ impersonationRegistryId: string; comments?: string; directoryId?: number; directoryNodeId?: number; email?: string; externalDirectoryNodeId?: string; isEmailRegex?: boolean; name?: string; provenance?: | SettingsImpersonationRegistryEditRequestProvenance | (string & {}); } export const PatchSettingImpersonationRegistryRequest = /*@__PURE__*/ S.suspend( () => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), impersonationRegistryId: S.String.pipe( T.Label("impersonation_registry_id"), ), comments: S.optional(S.String), directoryId: S.optional(S.Number.pipe(T.Body("directory_id"))), directoryNodeId: S.optional(S.Number.pipe(T.Body("directory_node_id"))), email: S.optional(S.String), externalDirectoryNodeId: S.optional( S.String.pipe(T.Body("external_directory_node_id")), ), isEmailRegex: S.optional(S.Boolean.pipe(T.Body("is_email_regex"))), name: S.optional(S.String), provenance: S.optional( SettingsImpersonationRegistryEditRequestProvenance, ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/impersonation_registry/{impersonation_registry_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingImpersonationRegistryRequest", }) as any as S.Schema; export type SettingsImpersonationRegistryEditResponseProvenance = | "A1S_INTERNAL" | "SNOOPY-CASB_OFFICE_365" | "SNOOPY-OFFICE_365" | "SNOOPY-GOOGLE_DIRECTORY"; export const SettingsImpersonationRegistryEditResponseProvenance = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingImpersonationRegistryResponse { /** Impersonation registry entry identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; directoryId?: number | null; directoryNodeId?: number | null; email?: string | null; externalDirectoryNodeId?: string | null; isEmailRegex?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; name?: string | null; provenance?: SettingsImpersonationRegistryEditResponseProvenance | null; } export const PatchSettingImpersonationRegistryResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), directoryId: S.optional(S.NullOr(S.Number).pipe(T.Body("directory_id"))), directoryNodeId: S.optional( S.NullOr(S.Number).pipe(T.Body("directory_node_id")), ), email: S.optional(S.NullOr(S.String)), externalDirectoryNodeId: S.optional( S.NullOr(S.String).pipe(T.Body("external_directory_node_id")), ), isEmailRegex: S.optional( S.NullOr(S.Boolean).pipe(T.Body("is_email_regex")), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), name: S.optional(S.NullOr(S.String)), provenance: S.optional( S.NullOr(SettingsImpersonationRegistryEditResponseProvenance), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingImpersonationRegistryResponse", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsEditRequestExcludeList = Array; export const SettingsSendingDomainRestrictionsEditRequestExcludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface PatchSettingSendingDomainRestrictionRequest { /** Identifier. */ accountId: string; /** Sending domain restriction identifier. */ sendingDomainRestrictionId: string; comments?: string; /** Domain that requires TLS enforcement. */ domain?: string; /** Excluded subdomains that are exempt from TLS requirements. */ exclude?: SettingsSendingDomainRestrictionsEditRequestExcludeList; } export const PatchSettingSendingDomainRestrictionRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), sendingDomainRestrictionId: S.String.pipe( T.Label("sending_domain_restriction_id"), ), comments: S.optional(S.String), domain: S.optional(S.String), exclude: S.optional( SettingsSendingDomainRestrictionsEditRequestExcludeList, ), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/sending_domain_restrictions/{sending_domain_restriction_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingSendingDomainRestrictionRequest", }) as any as S.Schema; export type SettingsSendingDomainRestrictionsEditResponseExcludeList = Array; export const SettingsSendingDomainRestrictionsEditResponseExcludeList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingSendingDomainRestrictionResponse { /** Sending domain restriction identifier. */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Domain that requires TLS enforcement. */ domain?: string | null; /** Excluded subdomains that are exempt from TLS requirements. */ exclude?: SettingsSendingDomainRestrictionsEditResponseExcludeList | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const PatchSettingSendingDomainRestrictionResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), domain: S.optional(S.NullOr(S.String)), exclude: S.optional( S.NullOr(SettingsSendingDomainRestrictionsEditResponseExcludeList), ), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingSendingDomainRestrictionResponse", }) as any as S.Schema; export interface PatchSettingTrustedDomainRequest { /** Identifier. */ accountId: string; /** Trusted domain identifier */ trustedDomainId: string; comments?: string; /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */ isRecent?: boolean; isRegex?: boolean; /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */ isSimilarity?: boolean; pattern?: string; } export const PatchSettingTrustedDomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), trustedDomainId: S.String.pipe(T.Label("trusted_domain_id")), comments: S.optional(S.String), isRecent: S.optional(S.Boolean.pipe(T.Body("is_recent"))), isRegex: S.optional(S.Boolean.pipe(T.Body("is_regex"))), isSimilarity: S.optional(S.Boolean.pipe(T.Body("is_similarity"))), pattern: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/trusted_domains/{trusted_domain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingTrustedDomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingTrustedDomainResponse { /** Trusted domain identifier */ id?: string | null; comments?: string | null; createdAt?: string | null; /** Select to prevent recently registered domains from triggering a Suspicious or Malicious disposition. */ isRecent?: boolean | null; isRegex?: boolean | null; /** Select for partner or other approved domains that have similar spelling to your connected domains. Prevents listed domains from triggering a Spoof disposition. */ isSimilarity?: boolean | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; pattern?: string | null; } export const PatchSettingTrustedDomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), comments: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), isRecent: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_recent"))), isRegex: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_regex"))), isSimilarity: S.optional(S.NullOr(S.Boolean).pipe(T.Body("is_similarity"))), lastModified: S.optional(S.NullOr(S.String).pipe(T.Body("last_modified"))), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), pattern: S.optional(S.NullOr(S.String)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingTrustedDomainResponse", }) as any as S.Schema; export interface PatchSettingUrlIgnorePatternRequest { /** Identifier. */ accountId: string; /** URL ignore pattern identifier */ patternId: string; /** Optional note describing the reason for the ignore pattern. */ comments?: string; /** Regular expression matching URLs that should not be rewritten. */ pattern?: string; } export const PatchSettingUrlIgnorePatternRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), patternId: S.String.pipe(T.Label("pattern_id")), comments: S.optional(S.String), pattern: S.optional(S.String), }) .pipe( T.Http({ method: "PATCH", uri: "/accounts/{account_id}/email-security/settings/url_ignore_patterns/{pattern_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingUrlIgnorePatternRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchSettingUrlIgnorePatternResponse { /** URL ignore pattern identifier */ id: string; createdAt: string; /** Regular expression matching URLs that should not be rewritten. */ pattern: string; /** Optional note describing the reason for the ignore pattern. */ comments?: string | null; /** Deprecated, use `modified_at` instead. End of life: November 1, 2026. */ lastModified?: string | null; modifiedAt?: string | null; } export const PatchSettingUrlIgnorePatternResponse = /*@__PURE__*/ S.suspend( () => S.Struct({ id: S.String, createdAt: S.String.pipe(T.Body("created_at")), pattern: S.String, comments: S.optional(S.NullOr(S.String)), lastModified: S.optional( S.NullOr(S.String).pipe(T.Body("last_modified")), ), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchSettingUrlIgnorePatternResponse", }) as any as S.Schema; export type BulkInvestigateMoveError = CloudflareOpError; /** Moves multiple messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. */ export const bulkInvestigateMove: API.PaginatedOperationMethod< BulkInvestigateMoveRequest, BulkInvestigateMoveResponse, BulkInvestigateMoveError, CloudflareOpContext, InvestigateMoveBulkResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkInvestigateMoveRequest, output: BulkInvestigateMoveResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type BulkInvestigateReleaseError = CloudflareOpError; /** Releases one or more quarantined messages, delivering them to the intended recipients. Use when a message was incorrectly quarantined. Returns delivery status for each recipient. */ export const bulkInvestigateRelease: API.PaginatedOperationMethod< BulkInvestigateReleaseRequest, BulkInvestigateReleaseResponse, BulkInvestigateReleaseError, CloudflareOpContext, InvestigateReleaseBulkResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: BulkInvestigateReleaseRequest, output: BulkInvestigateReleaseResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateInvestigateBulkError = CloudflareOpError; /** Create a bulk action job */ export const createInvestigateBulk: API.OperationMethod< CreateInvestigateBulkRequest, CreateInvestigateBulkResponse, CreateInvestigateBulkError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateInvestigateBulkRequest, output: CreateInvestigateBulkResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateInvestigateBulkCancelError = CloudflareOpError; /** Marks the job as cancelled and stops any pending message processing. The job record remains visible in list and detail endpoints. */ export const createInvestigateBulkCancel: API.OperationMethod< CreateInvestigateBulkCancelRequest, CreateInvestigateBulkCancelResponse, CreateInvestigateBulkCancelError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateInvestigateBulkCancelRequest, output: CreateInvestigateBulkCancelResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateInvestigateMoveError = CloudflareOpError; /** Moves a single message to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. */ export const createInvestigateMove: API.PaginatedOperationMethod< CreateInvestigateMoveRequest, CreateInvestigateMoveResponse, CreateInvestigateMoveError, CloudflareOpContext, InvestigateMoveBulkResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: CreateInvestigateMoveRequest, output: CreateInvestigateMoveResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type CreateInvestigatePreviewError = CloudflareOpError; /** Generates a preview image for a message that was not flagged as a detection. Useful for investigating benign messages. Returns a base64-encoded PNG screenshot of the email body. */ export const createInvestigatePreview: API.OperationMethod< CreateInvestigatePreviewRequest, CreateInvestigatePreviewResponse, CreateInvestigatePreviewError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateInvestigatePreviewRequest, output: CreateInvestigatePreviewResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateInvestigateReclassifyError = CloudflareOpError; /** Submits a request to reclassify an email's disposition. Use for reporting false positives or false negatives. Optionally provide the raw EML content for reanalysis. The reclassification is processed asynchronously. */ export const createInvestigateReclassify: API.OperationMethod< CreateInvestigateReclassifyRequest, CreateInvestigateReclassifyResponse, CreateInvestigateReclassifyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateInvestigateReclassifyRequest, output: CreateInvestigateReclassifyResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSettingAllowPolicyError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Creates a new allow policy that exempts matching emails from security detections. Use with caution as this bypasses email security scanning. Policies can match on sender patterns and apply to specific detections or all detections. */ export const createSettingAllowPolicy: API.OperationMethod< CreateSettingAllowPolicyRequest, CreateSettingAllowPolicyResponse, CreateSettingAllowPolicyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSettingAllowPolicyRequest, output: CreateSettingAllowPolicyResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSettingBlockSenderError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Creates a new blocked sender pattern. Emails matching this pattern will be blocked from delivery. Patterns can be email addresses, domains, or IP addresses, and support regular expressions. */ export const createSettingBlockSender: API.OperationMethod< CreateSettingBlockSenderRequest, CreateSettingBlockSenderResponse, CreateSettingBlockSenderError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSettingBlockSenderRequest, output: CreateSettingBlockSenderResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSettingImpersonationRegistryError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching. */ export const createSettingImpersonationRegistry: API.OperationMethod< CreateSettingImpersonationRegistryRequest, CreateSettingImpersonationRegistryResponse, CreateSettingImpersonationRegistryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSettingImpersonationRegistryRequest, output: CreateSettingImpersonationRegistryResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSettingSendingDomainRestrictionError = CloudflareOpError; /** Creates a new sending domain restriction to enforce TLS requirements for a domain. Emails without TLS from this domain will be dropped unless the subdomain is in the exclude list. */ export const createSettingSendingDomainRestriction: API.OperationMethod< CreateSettingSendingDomainRestrictionRequest, CreateSettingSendingDomainRestrictionResponse, CreateSettingSendingDomainRestrictionError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSettingSendingDomainRestrictionRequest, output: CreateSettingSendingDomainRestrictionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSettingTrustedDomainError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Creates a new trusted domain pattern. Use for partner domains or approved senders that should bypass recent domain registration and similarity checks. Configure whether it prevents recent domain or spoof dispositions. */ export const createSettingTrustedDomain: API.OperationMethod< CreateSettingTrustedDomainRequest, CreateSettingTrustedDomainResponse, CreateSettingTrustedDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSettingTrustedDomainRequest, output: CreateSettingTrustedDomainResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type CreateSettingUrlIgnorePatternError = CloudflareOpError; /** Creates a new URL rewrite ignore pattern. URLs matching this pattern will not be rewritten. */ export const createSettingUrlIgnorePattern: API.OperationMethod< CreateSettingUrlIgnorePatternRequest, CreateSettingUrlIgnorePatternResponse, CreateSettingUrlIgnorePatternError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSettingUrlIgnorePatternRequest, output: CreateSettingUrlIgnorePatternResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteInvestigateBulkError = CloudflareOpError; /** Deletes the job, removing it from all list and detail endpoints. Only jobs in a terminal state (`COMPLETED`, `CANCELLED`, `FAILED`, or `SKIPPED`) can be deleted. To stop an in-progress job without removing it, use the cancel endpoint instead. */ export const deleteInvestigateBulk: API.OperationMethod< DeleteInvestigateBulkRequest, DeleteInvestigateBulkResponse, DeleteInvestigateBulkError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteInvestigateBulkRequest, output: DeleteInvestigateBulkResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingAllowPolicyError = | AllowPolicyNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Removes an allow policy. After deletion, emails matching this pattern will be subject to normal security scanning and disposition actions. */ export const deleteSettingAllowPolicy: API.OperationMethod< DeleteSettingAllowPolicyRequest, DeleteSettingAllowPolicyResponse, DeleteSettingAllowPolicyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingAllowPolicyRequest, output: DeleteSettingAllowPolicyResponse, errors: [ AllowPolicyNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingBlockSenderError = | BlockSenderNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Removes a blocked sender pattern. After deletion, emails from this sender will no longer be automatically blocked based on this rule. */ export const deleteSettingBlockSender: API.OperationMethod< DeleteSettingBlockSenderRequest, DeleteSettingBlockSenderResponse, DeleteSettingBlockSenderError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingBlockSenderRequest, output: DeleteSettingBlockSenderResponse, errors: [ BlockSenderNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingDomainError = | EmailSecurityDomainNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone. */ export const deleteSettingDomain: API.OperationMethod< DeleteSettingDomainRequest, DeleteSettingDomainResponse, DeleteSettingDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingDomainRequest, output: DeleteSettingDomainResponse, errors: [ EmailSecurityDomainNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingImpersonationRegistryError = | ImpersonationRegistryEntryNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Removes an entry from the impersonation registry. After deletion, this identity will no longer be protected from impersonation. */ export const deleteSettingImpersonationRegistry: API.OperationMethod< DeleteSettingImpersonationRegistryRequest, DeleteSettingImpersonationRegistryResponse, DeleteSettingImpersonationRegistryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingImpersonationRegistryRequest, output: DeleteSettingImpersonationRegistryResponse, errors: [ ImpersonationRegistryEntryNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingSendingDomainRestrictionError = CloudflareOpError; /** Removes a sending domain restriction. After deletion, TLS will no longer be enforced for emails from this domain. */ export const deleteSettingSendingDomainRestriction: API.OperationMethod< DeleteSettingSendingDomainRestrictionRequest, DeleteSettingSendingDomainRestrictionResponse, DeleteSettingSendingDomainRestrictionError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingSendingDomainRestrictionRequest, output: DeleteSettingSendingDomainRestrictionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingTrustedDomainError = | TrustedDomainNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Removes a trusted domain pattern. After deletion, emails from this domain will be subject to normal recent domain and similarity checks. */ export const deleteSettingTrustedDomain: API.OperationMethod< DeleteSettingTrustedDomainRequest, DeleteSettingTrustedDomainResponse, DeleteSettingTrustedDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingTrustedDomainRequest, output: DeleteSettingTrustedDomainResponse, errors: [ TrustedDomainNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSettingUrlIgnorePatternError = CloudflareOpError; /** Removes a URL rewrite ignore pattern. After deletion, URLs matching this pattern will be rewritten again. */ export const deleteSettingUrlIgnorePattern: API.OperationMethod< DeleteSettingUrlIgnorePatternRequest, DeleteSettingUrlIgnorePatternResponse, DeleteSettingUrlIgnorePatternError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSettingUrlIgnorePatternRequest, output: DeleteSettingUrlIgnorePatternResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetInvestigateError = CloudflareOpError; /** Retrieves comprehensive details for a specific email message including headers, recipients, sender information, and current quarantine status. Use the investigate_id from search results to fetch detailed information. */ export const getInvestigate: API.OperationMethod< GetInvestigateRequest, GetInvestigateResponse, GetInvestigateError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetInvestigateRequest, output: GetInvestigateResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetInvestigateBulkError = CloudflareOpError; /** Get bulk action job details */ export const getInvestigateBulk: API.OperationMethod< GetInvestigateBulkRequest, GetInvestigateBulkResponse, GetInvestigateBulkError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetInvestigateBulkRequest, output: GetInvestigateBulkResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetInvestigateDetectionError = CloudflareOpError; /** Returns detection details such as threat categories and sender information for non-benign messages. */ export const getInvestigateDetection: API.OperationMethod< GetInvestigateDetectionRequest, GetInvestigateDetectionResponse, GetInvestigateDetectionError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetInvestigateDetectionRequest, output: GetInvestigateDetectionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetInvestigatePreviewError = CloudflareOpError; /** Returns a preview of the message body as a base64 encoded PNG image for non-benign messages. */ export const getInvestigatePreview: API.OperationMethod< GetInvestigatePreviewRequest, GetInvestigatePreviewResponse, GetInvestigatePreviewError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetInvestigatePreviewRequest, output: GetInvestigatePreviewResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetInvestigateRawError = CloudflareOpError; /** Returns the raw eml of any non-benign message. */ export const getInvestigateRaw: API.OperationMethod< GetInvestigateRawRequest, GetInvestigateRawResponse, GetInvestigateRawError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetInvestigateRawRequest, output: GetInvestigateRawResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetInvestigateTraceError = CloudflareOpError; /** Retrieves delivery and processing trace information for an email message. Shows the delivery path, retraction history, and move operations performed on the message. Useful for debugging delivery issues. */ export const getInvestigateTrace: API.OperationMethod< GetInvestigateTraceRequest, GetInvestigateTraceResponse, GetInvestigateTraceError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetInvestigateTraceRequest, output: GetInvestigateTraceResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingAllowPolicyError = | AllowPolicyNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Retrieves details for a specific allow policy including its pattern, dispositions that are exempted, and whether it applies to all detections. */ export const getSettingAllowPolicy: API.OperationMethod< GetSettingAllowPolicyRequest, GetSettingAllowPolicyResponse, GetSettingAllowPolicyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingAllowPolicyRequest, output: GetSettingAllowPolicyResponse, errors: [ AllowPolicyNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingBlockSenderError = | BlockSenderNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Retrieves details for a specific blocked sender pattern including its pattern type, value, and metadata. */ export const getSettingBlockSender: API.OperationMethod< GetSettingBlockSenderRequest, GetSettingBlockSenderResponse, GetSettingBlockSenderError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingBlockSenderRequest, output: GetSettingBlockSenderResponse, errors: [ BlockSenderNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingDomainError = | EmailSecurityDomainNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state. */ export const getSettingDomain: API.OperationMethod< GetSettingDomainRequest, GetSettingDomainResponse, GetSettingDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingDomainRequest, output: GetSettingDomainResponse, errors: [ EmailSecurityDomainNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingImpersonationRegistryError = | ImpersonationRegistryEntryNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Retrieves details for a specific impersonation registry entry including the protected identity, email pattern, and synchronization source if directory-synced. */ export const getSettingImpersonationRegistry: API.OperationMethod< GetSettingImpersonationRegistryRequest, GetSettingImpersonationRegistryResponse, GetSettingImpersonationRegistryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingImpersonationRegistryRequest, output: GetSettingImpersonationRegistryResponse, errors: [ ImpersonationRegistryEntryNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingSendingDomainRestrictionError = CloudflareOpError; /** Retrieves details for a specific sending domain restriction including the domain requiring TLS and any excluded subdomains exempt from the TLS requirement. */ export const getSettingSendingDomainRestriction: API.OperationMethod< GetSettingSendingDomainRestrictionRequest, GetSettingSendingDomainRestrictionResponse, GetSettingSendingDomainRestrictionError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingSendingDomainRestrictionRequest, output: GetSettingSendingDomainRestrictionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingTrustedDomainError = | TrustedDomainNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Retrieves details for a specific trusted domain pattern including its pattern value, whether it uses regex matching, and which detection types it affects. */ export const getSettingTrustedDomain: API.OperationMethod< GetSettingTrustedDomainRequest, GetSettingTrustedDomainResponse, GetSettingTrustedDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingTrustedDomainRequest, output: GetSettingTrustedDomainResponse, errors: [ TrustedDomainNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSettingUrlIgnorePatternError = CloudflareOpError; /** Returns a single URL rewrite ignore pattern by its identifier. */ export const getSettingUrlIgnorePattern: API.OperationMethod< GetSettingUrlIgnorePatternRequest, GetSettingUrlIgnorePatternResponse, GetSettingUrlIgnorePatternError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSettingUrlIgnorePatternRequest, output: GetSettingUrlIgnorePatternResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type ListInvestigateBulkMessagesError = CloudflareOpError; /** List messages for a bulk action job */ export const listInvestigateBulkMessages: API.PaginatedOperationMethod< ListInvestigateBulkMessagesRequest, ListInvestigateBulkMessagesResponse, ListInvestigateBulkMessagesError, CloudflareOpContext, InvestigateBulkMessagesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListInvestigateBulkMessagesRequest, output: ListInvestigateBulkMessagesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListInvestigateBulksError = CloudflareOpError; /** List bulk action jobs */ export const listInvestigateBulks: API.PaginatedOperationMethod< ListInvestigateBulksRequest, ListInvestigateBulksResponse, ListInvestigateBulksError, CloudflareOpContext, InvestigateBulkListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListInvestigateBulksRequest, output: ListInvestigateBulksResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListInvestigatesError = CloudflareOpError; /** Returns information for each email that matches the search parameter(s). */ export const listInvestigates: API.PaginatedOperationMethod< ListInvestigatesRequest, ListInvestigatesResponse, ListInvestigatesError, CloudflareOpContext, InvestigateListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListInvestigatesRequest, output: ListInvestigatesResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListPhishguardReportsError = CloudflareOpError; /** Retrieves PhishGuard security alert reports for a specified date range. Reports include detected threats, dispositions, and contextual information. Use for security monitoring and threat analysis. */ export const listPhishguardReports: API.PaginatedOperationMethod< ListPhishguardReportsRequest, ListPhishguardReportsResponse, ListPhishguardReportsError, CloudflareOpContext, PhishguardReportsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListPhishguardReportsRequest, output: ListPhishguardReportsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSettingAllowPoliciesError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Returns a paginated list of email allow policies. These policies exempt matching emails from security detection, allowing them to bypass disposition actions. Supports filtering by pattern type and policy attributes. */ export const listSettingAllowPolicies: API.PaginatedOperationMethod< ListSettingAllowPoliciesRequest, ListSettingAllowPoliciesResponse, ListSettingAllowPoliciesError, CloudflareOpContext, SettingsAllowPoliciesListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingAllowPoliciesRequest, output: ListSettingAllowPoliciesResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSettingBlockSendersError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Returns a paginated list of blocked email sender patterns. These patterns prevent emails from matching senders from being delivered. Supports filtering by pattern type and searching across patterns. */ export const listSettingBlockSenders: API.PaginatedOperationMethod< ListSettingBlockSendersRequest, ListSettingBlockSendersResponse, ListSettingBlockSendersError, CloudflareOpContext, SettingsBlockSendersListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingBlockSendersRequest, output: ListSettingBlockSendersResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSettingDomainsError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Returns a paginated list of email domains protected by Email Security. Includes domain configuration, delivery modes, and authorization status. Supports filtering by delivery mode and integration ID. */ export const listSettingDomains: API.PaginatedOperationMethod< ListSettingDomainsRequest, ListSettingDomainsResponse, ListSettingDomainsError, CloudflareOpContext, SettingsDomainsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingDomainsRequest, output: ListSettingDomainsResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSettingImpersonationRegistriesError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Returns a paginated list of protected identities in the impersonation registry. These entries define identities and email addresses to protect from impersonation attacks. Can be manually added or automatically synced from directory integrations. */ export const listSettingImpersonationRegistries: API.PaginatedOperationMethod< ListSettingImpersonationRegistriesRequest, ListSettingImpersonationRegistriesResponse, ListSettingImpersonationRegistriesError, CloudflareOpContext, SettingsImpersonationRegistryListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingImpersonationRegistriesRequest, output: ListSettingImpersonationRegistriesResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSettingSendingDomainRestrictionsError = CloudflareOpError; /** Returns a paginated list of sending domain restrictions. These restrictions enforce TLS requirements for emails from specific domains. Mail without TLS from restricted domains will be dropped unless the subdomain is in the exclude list. Supports sorting and searching. */ export const listSettingSendingDomainRestrictions: API.PaginatedOperationMethod< ListSettingSendingDomainRestrictionsRequest, ListSettingSendingDomainRestrictionsResponse, ListSettingSendingDomainRestrictionsError, CloudflareOpContext, SettingsSendingDomainRestrictionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingSendingDomainRestrictionsRequest, output: ListSettingSendingDomainRestrictionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSettingTrustedDomainsError = | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Returns a paginated list of trusted domain patterns. Trusted domains prevent false positives for recently registered domains and lookalike domain detections. Patterns can use regular expressions for flexible matching. */ export const listSettingTrustedDomains: API.PaginatedOperationMethod< ListSettingTrustedDomainsRequest, ListSettingTrustedDomainsResponse, ListSettingTrustedDomainsError, CloudflareOpContext, SettingsTrustedDomainsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingTrustedDomainsRequest, output: ListSettingTrustedDomainsResponse, errors: [ EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSettingUrlIgnorePatternsError = CloudflareOpError; /** Returns a paginated list of URL rewrite ignore patterns for the account. URLs matching these patterns will not be rewritten. */ export const listSettingUrlIgnorePatterns: API.PaginatedOperationMethod< ListSettingUrlIgnorePatternsRequest, ListSettingUrlIgnorePatternsResponse, ListSettingUrlIgnorePatternsError, CloudflareOpContext, SettingsUrlIgnorePatternsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSettingUrlIgnorePatternsRequest, output: ListSettingUrlIgnorePatternsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type ListSubmissionsError = CloudflareOpError; /** Returns information for submissions made to reclassify emails. Shows the status, outcome, and disposition changes for reclassification requests made by users or the security team. Useful for tracking false positive/negative reports. */ export const listSubmissions: API.PaginatedOperationMethod< ListSubmissionsRequest, ListSubmissionsResponse, ListSubmissionsError, CloudflareOpContext, SubmissionsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSubmissionsRequest, output: ListSubmissionsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "page", inputToken: "page", outputToken: "resultInfo.page", items: "result", pageSize: "perPage", } as const, }), cloudflarePaginate, ) as any; export type PatchSettingAllowPolicyError = | AllowPolicyNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Updates an existing allow policy. Only provided fields will be modified. Changes take effect for new emails matching the pattern. */ export const patchSettingAllowPolicy: API.OperationMethod< PatchSettingAllowPolicyRequest, PatchSettingAllowPolicyResponse, PatchSettingAllowPolicyError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingAllowPolicyRequest, output: PatchSettingAllowPolicyResponse, errors: [ AllowPolicyNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingBlockSenderError = | BlockSenderNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Updates an existing blocked sender pattern. Only provided fields will be modified. The pattern will continue blocking emails until deleted. */ export const patchSettingBlockSender: API.OperationMethod< PatchSettingBlockSenderRequest, PatchSettingBlockSenderResponse, PatchSettingBlockSenderError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingBlockSenderRequest, output: PatchSettingBlockSenderResponse, errors: [ BlockSenderNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingDomainError = | EmailSecurityDomainNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing. */ export const patchSettingDomain: API.OperationMethod< PatchSettingDomainRequest, PatchSettingDomainResponse, PatchSettingDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingDomainRequest, output: PatchSettingDomainResponse, errors: [ EmailSecurityDomainNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingImpersonationRegistryError = | ImpersonationRegistryEntryNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated. */ export const patchSettingImpersonationRegistry: API.OperationMethod< PatchSettingImpersonationRegistryRequest, PatchSettingImpersonationRegistryResponse, PatchSettingImpersonationRegistryError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingImpersonationRegistryRequest, output: PatchSettingImpersonationRegistryResponse, errors: [ ImpersonationRegistryEntryNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingSendingDomainRestrictionError = CloudflareOpError; /** Updates an existing sending domain restriction. Only provided fields will be modified. Changes affect which domains require TLS and which subdomains are excluded. */ export const patchSettingSendingDomainRestriction: API.OperationMethod< PatchSettingSendingDomainRestrictionRequest, PatchSettingSendingDomainRestrictionResponse, PatchSettingSendingDomainRestrictionError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingSendingDomainRestrictionRequest, output: PatchSettingSendingDomainRestrictionResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingTrustedDomainError = | TrustedDomainNotFound | EmailSecurityNotEntitled | Forbidden | CloudflareOpError; /** Updates an existing trusted domain pattern. Only provided fields will be modified. Changes take effect for new emails matching the pattern. */ export const patchSettingTrustedDomain: API.OperationMethod< PatchSettingTrustedDomainRequest, PatchSettingTrustedDomainResponse, PatchSettingTrustedDomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingTrustedDomainRequest, output: PatchSettingTrustedDomainResponse, errors: [ TrustedDomainNotFound, EmailSecurityNotEntitled, Forbidden, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchSettingUrlIgnorePatternError = CloudflareOpError; /** Updates an existing URL rewrite ignore pattern. Only provided fields will be modified. */ export const patchSettingUrlIgnorePattern: API.OperationMethod< PatchSettingUrlIgnorePatternRequest, PatchSettingUrlIgnorePatternResponse, PatchSettingUrlIgnorePatternError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchSettingUrlIgnorePatternRequest, output: PatchSettingUrlIgnorePatternResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));