// 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> = { contentId: "content_id", dkimSelector: "dkim_selector", documentationUrl: "documentation_url", messageId: "message_id", mimeMessage: "mime_message", permanentBounces: "permanent_bounces", replyTo: "reply_to", returnPathDomain: "return_path_domain", }; export class Forbidden extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()("Forbidden", { code: S.Number, message: S.String, }), [{ status: 403 }], ) {} export class SendingSubdomainAlreadyExists extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "SendingSubdomainAlreadyExists", { code: S.Number, message: S.String, }, ), [{ code: 2040 }], ) {} export class SendingSubdomainNotFound extends /*@__PURE__*/ T.applyErrorMatchers( /*@__PURE__*/ S.TaggedError()( "SendingSubdomainNotFound", { code: S.Number, message: S.String, }, ), [{ code: 2033 }], ) {} export interface CreateSubdomainRequest { /** Identifier. */ zoneId: string; /** The subdomain name. Must be within the zone. */ name: string; } export const CreateSubdomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), name: S.String, }) .pipe( T.Http({ method: "POST", uri: "/zones/{zone_id}/email/sending/subdomains", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSubdomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface CreateSubdomainResponse { /** Whether Email Sending is enabled on this subdomain. */ enabled: boolean; /** The subdomain domain name. */ name: string; /** Sending subdomain identifier. */ tag: string; /** The date and time the destination address has been created. */ created?: string | null; /** The DKIM selector used for email signing. */ dkimSelector?: string | null; /** The date and time the destination address was last modified. */ modified?: string | null; /** Whether sent messages from this subdomain can be previewed in the activity log. */ previewEnabled?: boolean | null; /** The return-path domain used for bounce handling. */ returnPathDomain?: string | null; } export const CreateSubdomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, name: S.String, tag: S.String, created: S.optional(S.NullOr(S.String)), dkimSelector: S.optional(S.NullOr(S.String).pipe(T.Body("dkim_selector"))), modified: S.optional(S.NullOr(S.String)), previewEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preview_enabled")), ), returnPathDomain: S.optional( S.NullOr(S.String).pipe(T.Body("return_path_domain")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "CreateSubdomainResponse", }) as any as S.Schema; export interface DeleteSubdomainRequest { /** Identifier. */ zoneId: string; /** Sending subdomain identifier. */ subdomainId: string; } export const DeleteSubdomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), subdomainId: S.String.pipe(T.Label("subdomain_id")), }) .pipe( T.Http({ method: "DELETE", uri: "/zones/{zone_id}/email/sending/subdomains/{subdomain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSubdomainRequest", }) as any as S.Schema; export interface DeleteSubdomainResponse {} export const DeleteSubdomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "DeleteSubdomainResponse", }) as any as S.Schema; export interface GetSubdomainRequest { /** Identifier. */ zoneId: string; /** Sending subdomain identifier. */ subdomainId: string; } export const GetSubdomainRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), subdomainId: S.String.pipe(T.Label("subdomain_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/email/sending/subdomains/{subdomain_id}", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSubdomainRequest", }) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSubdomainResponse { /** Whether Email Sending is enabled on this subdomain. */ enabled: boolean; /** The subdomain domain name. */ name: string; /** Sending subdomain identifier. */ tag: string; /** The date and time the destination address has been created. */ created?: string | null; /** The DKIM selector used for email signing. */ dkimSelector?: string | null; /** The date and time the destination address was last modified. */ modified?: string | null; /** Whether sent messages from this subdomain can be previewed in the activity log. */ previewEnabled?: boolean | null; /** The return-path domain used for bounce handling. */ returnPathDomain?: string | null; } export const GetSubdomainResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, name: S.String, tag: S.String, created: S.optional(S.NullOr(S.String)), dkimSelector: S.optional(S.NullOr(S.String).pipe(T.Body("dkim_selector"))), modified: S.optional(S.NullOr(S.String)), previewEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preview_enabled")), ), returnPathDomain: S.optional( S.NullOr(S.String).pipe(T.Body("return_path_domain")), ), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSubdomainResponse", }) as any as S.Schema; export interface GetSubdomainDnsRequest { /** Identifier. */ zoneId: string; /** Sending subdomain identifier. */ subdomainId: string; } export const GetSubdomainDnsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), subdomainId: S.String.pipe(T.Label("subdomain_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/email/sending/subdomains/{subdomain_id}/dns", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSubdomainDnsRequest", }) as any as S.Schema; export type SubdomainsDnsGetResultItemType = | "A" | "AAAA" | "CNAME" | "HTTPS" | "TXT" | "SRV" | "LOC" | "MX" | "NS" | "CERT" | "DNSKEY" | "DS" | "NAPTR" | "SMIMEA" | "SSHFP" | "SVCB" | "TLSA" | "URI"; export const SubdomainsDnsGetResultItemType = /*@__PURE__*/ S.String; export interface SubdomainsDnsGetResultItem { /** DNS record content. */ content?: string | null; /** DNS record name (or @ for the zone apex). */ name?: string | null; /** Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. */ priority?: number | null; /** Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. */ ttl?: number | null; /** DNS record type. */ type?: SubdomainsDnsGetResultItemType | null; } export const SubdomainsDnsGetResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), priority: S.optional(S.NullOr(S.Number)), ttl: S.optional(S.NullOr(S.Number)), type: S.optional(S.NullOr(SubdomainsDnsGetResultItemType)), }), ).annotate({ identifier: "SubdomainsDnsGetResultItem", }) as any as S.Schema; export type SubdomainsDnsGetResultList = Array; export const SubdomainsDnsGetResultList = /*@__PURE__*/ S.Array( SubdomainsDnsGetResultItem, ) as any as S.Schema; export interface GetSubdomainDnsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SubdomainsDnsGetResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const GetSubdomainDnsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SubdomainsDnsGetResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSubdomainDnsResponse", }) as any as S.Schema; export interface ListSubdomainsRequest { /** Identifier. */ zoneId: string; } export const ListSubdomainsRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/email/sending/subdomains", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSubdomainsRequest", }) as any as S.Schema; export interface SubdomainsListResultItem { /** Whether Email Sending is enabled on this subdomain. */ enabled: boolean; /** The subdomain domain name. */ name: string; /** Sending subdomain identifier. */ tag: string; /** The date and time the destination address has been created. */ created?: string | null; /** The DKIM selector used for email signing. */ dkimSelector?: string | null; /** The date and time the destination address was last modified. */ modified?: string | null; /** Whether sent messages from this subdomain can be previewed in the activity log. */ previewEnabled?: boolean | null; /** The return-path domain used for bounce handling. */ returnPathDomain?: string | null; } export const SubdomainsListResultItem = /*@__PURE__*/ S.suspend(() => S.Struct({ enabled: S.Boolean, name: S.String, tag: S.String, created: S.optional(S.NullOr(S.String)), dkimSelector: S.optional(S.NullOr(S.String).pipe(T.Body("dkim_selector"))), modified: S.optional(S.NullOr(S.String)), previewEnabled: S.optional( S.NullOr(S.Boolean).pipe(T.Body("preview_enabled")), ), returnPathDomain: S.optional( S.NullOr(S.String).pipe(T.Body("return_path_domain")), ), }), ).annotate({ identifier: "SubdomainsListResultItem", }) as any as S.Schema; export type SubdomainsListResultList = Array; export const SubdomainsListResultList = /*@__PURE__*/ S.Array( SubdomainsListResultItem, ) as any as S.Schema; export interface ListSubdomainsResponse { /** The unwrapped `result` payload of the v4 response envelope. */ result: SubdomainsListResultList; /** Pagination info from the envelope's `result_info`. */ resultInfo?: ResultInfo | null; } export const ListSubdomainsResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ result: SubdomainsListResultList.pipe(T.EnvelopePayload()), resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "ListSubdomainsResponse", }) as any as S.Schema; export interface SendRequestFromEmailSendingEmailAddressObject { /** Email address (e.g., 'user@example.com'). */ address: string; /** Display name for the email address (e.g., 'John Doe'). Optional — omit or set to null for no display name. */ name?: string; } export const SendRequestFromEmailSendingEmailAddressObject = /*@__PURE__*/ S.suspend(() => S.Struct({ address: S.String, name: S.optional(S.String), }), ).annotate({ identifier: "SendRequestFromEmailSendingEmailAddressObject", }) as any as S.Schema; export type SendRequestFrom = | string | SendRequestFromEmailSendingEmailAddressObject; export const SendRequestFrom = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"]]), ); export type SendRequestAttachmentsItemInlineDisposition = "inline"; export const SendRequestAttachmentsItemInlineDisposition = /*@__PURE__*/ S.String; export interface SendRequestAttachmentsItemInline { /** Base64-encoded content of the attachment. */ content: string; /** Content ID used to reference this attachment in HTML via cid: URI (e.g., ). */ contentId: string; /** Must be 'inline'. Indicates the attachment is embedded in the email body. */ disposition: SendRequestAttachmentsItemInlineDisposition; /** Filename for the attachment. */ filename: string; /** MIME type of the attachment (e.g., 'image/png', 'text/plain'). */ type: string; } export const SendRequestAttachmentsItemInline = /*@__PURE__*/ S.suspend(() => S.Struct({ content: S.String, contentId: S.String.pipe(T.Body("content_id")), disposition: SendRequestAttachmentsItemInlineDisposition, filename: S.String, type: S.String, }), ).annotate({ identifier: "SendRequestAttachmentsItemInline", }) as any as S.Schema; export type SendRequestAttachmentsItemAttachmentDisposition = "attachment"; export const SendRequestAttachmentsItemAttachmentDisposition = /*@__PURE__*/ S.String; export interface SendRequestAttachmentsItemAttachment { /** Base64-encoded content of the attachment. */ content: string; /** Must be 'attachment'. Indicates a standard file attachment. */ disposition: SendRequestAttachmentsItemAttachmentDisposition; /** Filename for the attachment. */ filename: string; /** MIME type of the attachment (e.g., 'application/pdf', 'text/plain'). */ type: string; } export const SendRequestAttachmentsItemAttachment = /*@__PURE__*/ S.suspend( () => S.Struct({ content: S.String, disposition: SendRequestAttachmentsItemAttachmentDisposition, filename: S.String, type: S.String, }), ).annotate({ identifier: "SendRequestAttachmentsItemAttachment", }) as any as S.Schema; export type SendRequestAttachmentsItem = | SendRequestAttachmentsItemInline | SendRequestAttachmentsItemAttachment; export const SendRequestAttachmentsItem = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([ ["content", "contentId", "disposition", "filename", "type"], ["content", "disposition", "filename", "type"], ]), ); export type SendRequestAttachmentsList = Array; export const SendRequestAttachmentsList = /*@__PURE__*/ S.Array( SendRequestAttachmentsItem, ) as any as S.Schema; export type SendRequestBccEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestBccEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestBccCase2ItemEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestBccCase2ItemEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestBccCase2Item = | string | SendRequestFromEmailSendingEmailAddressObject; export const SendRequestBccCase2Item = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"]]), ); export type SendRequestBccCase2List = Array; export const SendRequestBccCase2List = /*@__PURE__*/ S.Array( SendRequestBccCase2Item, ) as any as S.Schema; export type SendRequestBcc = | string | SendRequestFromEmailSendingEmailAddressObject | SendRequestBccCase2List; export const SendRequestBcc = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"], []]), ); export type SendRequestCcEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestCcEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestCcCase2ItemEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestCcCase2ItemEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestCcCase2Item = | string | SendRequestFromEmailSendingEmailAddressObject; export const SendRequestCcCase2Item = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"]]), ); export type SendRequestCcCase2List = Array; export const SendRequestCcCase2List = /*@__PURE__*/ S.Array( SendRequestCcCase2Item, ) as any as S.Schema; export type SendRequestCc = | string | SendRequestFromEmailSendingEmailAddressObject | SendRequestCcCase2List; export const SendRequestCc = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"], []]), ); export type SendRequestHeadersMap = { [key: string]: string | undefined }; export const SendRequestHeadersMap = /*@__PURE__*/ S.Record( S.String, S.String, ) as any as S.Schema; export type SendRequestReplyToEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestReplyToEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestReplyTo = | string | SendRequestFromEmailSendingEmailAddressObject; export const SendRequestReplyTo = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"]]), ); export type SendRequestToEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestToEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestToCase2ItemEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export const SendRequestToCase2ItemEmailSendingEmailAddressObject = SendRequestFromEmailSendingEmailAddressObject; export type SendRequestToCase2Item = | string | SendRequestFromEmailSendingEmailAddressObject; export const SendRequestToCase2Item = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"]]), ); export type SendRequestToCase2List = Array; export const SendRequestToCase2List = /*@__PURE__*/ S.Array( SendRequestToCase2Item, ) as any as S.Schema; export type SendRequestTo = | string | SendRequestFromEmailSendingEmailAddressObject | SendRequestToCase2List; export const SendRequestTo = /*@__PURE__*/ S.Unknown.pipe( T.UnionCases([[], ["address", "name"], []]), ); export interface SendEmailSendingRequest { /** Identifier of the account. */ accountId: string; /** Sender email address. Either a plain string or an object with address and name. */ from: SendRequestFrom; /** Email subject line. */ subject: string; /** File attachments and inline images. */ attachments?: SendRequestAttachmentsList; /** BCC recipient(s). A single email string, a named address object, or an array of either. */ bcc?: SendRequestBcc; /** CC recipient(s). A single email string, a named address object, or an array of either. */ cc?: SendRequestCc; /** Custom email headers as key-value pairs. */ headers?: SendRequestHeadersMap; /** HTML body of the email. At least one of text or html must be provided (non-empty). */ html?: string; /** Reply-to address. Either a plain string or an object with address and name. */ replyTo?: SendRequestReplyTo; /** Plain text body of the email. At least one of text or html must be provided (non-empty). */ text?: string; /** Recipient(s). Optional if cc or bcc is provided. A single email string, a named address object, or an array of either. */ to?: SendRequestTo; } export const SendEmailSendingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), from: SendRequestFrom, subject: S.String, attachments: S.optional(SendRequestAttachmentsList), bcc: S.optional(SendRequestBcc), cc: S.optional(SendRequestCc), headers: S.optional(SendRequestHeadersMap), html: S.optional(S.String), replyTo: S.optional(SendRequestReplyTo.pipe(T.Body("reply_to"))), text: S.optional(S.String), to: S.optional(SendRequestTo), }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email/sending/send", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "SendEmailSendingRequest", }) as any as S.Schema; export type SendResponseDeliveredList = Array; export const SendResponseDeliveredList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SendResponsePermanentBouncesList = Array; export const SendResponsePermanentBouncesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SendResponseQueuedList = Array; export const SendResponseQueuedList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface SendEmailSendingResponse { /** Email addresses to which the message was delivered immediately. */ delivered: SendResponseDeliveredList; /** Message ID of the sent email. */ messageId: string; /** Email addresses that permanently bounced. */ permanentBounces: SendResponsePermanentBouncesList; /** Email addresses for which delivery was queued for later. */ queued: SendResponseQueuedList; } export const SendEmailSendingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ delivered: SendResponseDeliveredList, messageId: S.String.pipe(T.Body("message_id")), permanentBounces: SendResponsePermanentBouncesList.pipe( T.Body("permanent_bounces"), ), queued: SendResponseQueuedList, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "SendEmailSendingResponse", }) as any as S.Schema; export type SendRawRequestRecipientsList = Array; export const SendRawRequestRecipientsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface SendRawEmailSendingRequest { /** Identifier of the account. */ accountId: string; /** Sender email address. */ from: string; /** The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays. */ mimeMessage: string; /** List of recipient email addresses. */ recipients: SendRawRequestRecipientsList; } export const SendRawEmailSendingRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ accountId: S.String.pipe(T.Label("account_id")), from: S.String, mimeMessage: S.String.pipe(T.Body("mime_message")), recipients: SendRawRequestRecipientsList, }) .pipe( T.Http({ method: "POST", uri: "/accounts/{account_id}/email/sending/send_raw", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "SendRawEmailSendingRequest", }) as any as S.Schema; export type SendRawResponseDeliveredList = Array; export const SendRawResponseDeliveredList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SendRawResponsePermanentBouncesList = Array; export const SendRawResponsePermanentBouncesList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export type SendRawResponseQueuedList = Array; export const SendRawResponseQueuedList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface SendRawEmailSendingResponse { /** Email addresses to which the message was delivered immediately. */ delivered: SendRawResponseDeliveredList; /** Message ID of the sent email. */ messageId: string; /** Email addresses that permanently bounced. */ permanentBounces: SendRawResponsePermanentBouncesList; /** Email addresses for which delivery was queued for later. */ queued: SendRawResponseQueuedList; } export const SendRawEmailSendingResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ delivered: SendRawResponseDeliveredList, messageId: S.String.pipe(T.Body("message_id")), permanentBounces: SendRawResponsePermanentBouncesList.pipe( T.Body("permanent_bounces"), ), queued: SendRawResponseQueuedList, }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "SendRawEmailSendingResponse", }) as any as S.Schema; export type CreateSubdomainError = | Forbidden | SendingSubdomainAlreadyExists | CloudflareOpError; /** Creates a new sending subdomain or re-enables sending on an existing subdomain that had it disabled. If zone-level Email Sending has not been enabled yet, the zone flag is automatically set when the entitlement is present. */ export const createSubdomain: API.OperationMethod< CreateSubdomainRequest, CreateSubdomainResponse, CreateSubdomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: CreateSubdomainRequest, output: CreateSubdomainResponse, errors: [ Forbidden, SendingSubdomainAlreadyExists, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type DeleteSubdomainError = | Forbidden | SendingSubdomainNotFound | CloudflareOpError; /** Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled. */ export const deleteSubdomain: API.OperationMethod< DeleteSubdomainRequest, DeleteSubdomainResponse, DeleteSubdomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: DeleteSubdomainRequest, output: DeleteSubdomainResponse, errors: [ Forbidden, SendingSubdomainNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSubdomainError = | Forbidden | SendingSubdomainNotFound | CloudflareOpError; /** Gets information for a specific sending subdomain. */ export const getSubdomain: API.OperationMethod< GetSubdomainRequest, GetSubdomainResponse, GetSubdomainError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSubdomainRequest, output: GetSubdomainResponse, errors: [ Forbidden, SendingSubdomainNotFound, CloudflareRateLimited, CloudflareError, ], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSubdomainDnsError = CloudflareOpError; /** Returns the expected DNS records for a sending subdomain. */ export const getSubdomainDns: API.PaginatedOperationMethod< GetSubdomainDnsRequest, GetSubdomainDnsResponse, GetSubdomainDnsError, CloudflareOpContext, SubdomainsDnsGetResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: GetSubdomainDnsRequest, output: GetSubdomainDnsResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type ListSubdomainsError = Forbidden | CloudflareOpError; /** Lists all sending-enabled subdomains for the zone. */ export const listSubdomains: API.PaginatedOperationMethod< ListSubdomainsRequest, ListSubdomainsResponse, ListSubdomainsError, CloudflareOpContext, SubdomainsListResultItem > = /*@__PURE__*/ API.makePaginated( () => ({ input: ListSubdomainsRequest, output: ListSubdomainsResponse, errors: [Forbidden, CloudflareRateLimited, CloudflareError], protocol: CloudflarePaginatedProtocol, retry: Retry.Retry, pagination: { mode: "single", items: "result" } as const, }), cloudflarePaginate, ) as any; export type SendEmailSendingError = CloudflareOpError; /** Send an email */ export const sendEmailSending: API.OperationMethod< SendEmailSendingRequest, SendEmailSendingResponse, SendEmailSendingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: SendEmailSendingRequest, output: SendEmailSendingResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type SendRawEmailSendingError = CloudflareOpError; /** Send a raw MIME email */ export const sendRawEmailSending: API.OperationMethod< SendRawEmailSendingRequest, SendRawEmailSendingResponse, SendRawEmailSendingError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: SendRawEmailSendingRequest, output: SendRawEmailSendingResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));