// 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, type CloudflareOpError, type CloudflareOpContext, } from "../protocol.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> = { approvedSources: "approved_sources", bimiRecords: "bimi_records", cnameDkimRecords: "cname_dkim_records", cnameDmarcRecords: "cname_dmarc_records", cnameSpfRecords: "cname_spf_records", createdAt: "created_at", dkimRecords: "dkim_records", dmarcRecords: "dmarc_records", modifiedAt: "modified_at", ruaPrefix: "rua_prefix", skipWizard: "skip_wizard", spfRecords: "spf_records", totalLookups: "total_lookups", zoneId: "zone_id", }; export interface GetDmarcReportRequest { /** Identifier. */ zoneId: string; } export const GetDmarcReportRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/email/auth/dmarc-reports", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDmarcReportRequest", }) as any as S.Schema; export type DmarcReportsGetResponseApprovedSourcesItemIpsList = Array; export const DmarcReportsGetResponseApprovedSourcesItemIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DmarcReportsGetResponseApprovedSourcesItem { /** Deprecated, use created_at */ created?: string | null; /** Creation timestamp */ createdAt?: string | null; /** The source domain */ domain?: string | null; /** Resolved IP addresses from SPF */ ips?: DmarcReportsGetResponseApprovedSourcesItemIpsList | null; /** Deprecated, use modified_at */ modified?: string | null; /** Last modification timestamp */ modifiedAt?: string | null; /** Source name (typically same as domain) */ name?: string | null; /** URL-friendly identifier */ slug?: string | null; /** Source UUID */ tag?: string | null; } export const DmarcReportsGetResponseApprovedSourcesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ created: 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)), ips: S.optional( S.NullOr(DmarcReportsGetResponseApprovedSourcesItemIpsList), ), modified: S.optional(S.NullOr(S.String)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), name: S.optional(S.NullOr(S.String)), slug: S.optional(S.NullOr(S.String)), tag: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DmarcReportsGetResponseApprovedSourcesItem", }) as any as S.Schema; export type DmarcReportsGetResponseApprovedSourcesList = Array; export const DmarcReportsGetResponseApprovedSourcesList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseApprovedSourcesItem, ) as any as S.Schema; export interface DmarcReportsGetResponseRecordsBimiRecordsItem { /** DNS record ID */ id?: string | null; /** Record content */ content?: string | null; /** DNS record name */ name?: string | null; /** Time to live in seconds */ ttl?: number | null; /** Record type */ type?: string | null; } export const DmarcReportsGetResponseRecordsBimiRecordsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ id: S.optional(S.NullOr(S.String)), content: S.optional(S.NullOr(S.String)), name: S.optional(S.NullOr(S.String)), ttl: S.optional(S.NullOr(S.Number)), type: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DmarcReportsGetResponseRecordsBimiRecordsItem", }) as any as S.Schema; export type DmarcReportsGetResponseRecordsBimiRecordsList = Array; export const DmarcReportsGetResponseRecordsBimiRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsGetResponseRecordsCnameDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsGetResponseRecordsCnameDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsGetResponseRecordsCnameDkimRecordsList = Array; export const DmarcReportsGetResponseRecordsCnameDkimRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsGetResponseRecordsCnameDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsGetResponseRecordsCnameDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsGetResponseRecordsCnameDmarcRecordsList = Array; export const DmarcReportsGetResponseRecordsCnameDmarcRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsGetResponseRecordsCnameSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsGetResponseRecordsCnameSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsGetResponseRecordsCnameSpfRecordsList = Array; export const DmarcReportsGetResponseRecordsCnameSpfRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsGetResponseRecordsDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsGetResponseRecordsDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsGetResponseRecordsDkimRecordsList = Array; export const DmarcReportsGetResponseRecordsDkimRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsGetResponseRecordsDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsGetResponseRecordsDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsGetResponseRecordsDmarcRecordsList = Array; export const DmarcReportsGetResponseRecordsDmarcRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsGetResponseRecordsSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsGetResponseRecordsSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsGetResponseRecordsSpfRecordsList = Array; export const DmarcReportsGetResponseRecordsSpfRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export interface DmarcReportsGetResponseRecords { /** BIMI TXT records */ bimiRecords?: DmarcReportsGetResponseRecordsBimiRecordsList | null; /** CNAME records for DKIM */ cnameDkimRecords?: DmarcReportsGetResponseRecordsCnameDkimRecordsList | null; /** CNAME records at _dmarc (problematic) */ cnameDmarcRecords?: DmarcReportsGetResponseRecordsCnameDmarcRecordsList | null; /** CNAME records for SPF */ cnameSpfRecords?: DmarcReportsGetResponseRecordsCnameSpfRecordsList | null; /** DKIM TXT records */ dkimRecords?: DmarcReportsGetResponseRecordsDkimRecordsList | null; /** DMARC TXT records */ dmarcRecords?: DmarcReportsGetResponseRecordsDmarcRecordsList | null; /** SPF TXT records */ spfRecords?: DmarcReportsGetResponseRecordsSpfRecordsList | null; } export const DmarcReportsGetResponseRecords = /*@__PURE__*/ S.suspend(() => S.Struct({ bimiRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsBimiRecordsList).pipe( T.Body("bimi_records"), ), ), cnameDkimRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsCnameDkimRecordsList).pipe( T.Body("cname_dkim_records"), ), ), cnameDmarcRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsCnameDmarcRecordsList).pipe( T.Body("cname_dmarc_records"), ), ), cnameSpfRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsCnameSpfRecordsList).pipe( T.Body("cname_spf_records"), ), ), dkimRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsDkimRecordsList).pipe( T.Body("dkim_records"), ), ), dmarcRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsDmarcRecordsList).pipe( T.Body("dmarc_records"), ), ), spfRecords: S.optional( S.NullOr(DmarcReportsGetResponseRecordsSpfRecordsList).pipe( T.Body("spf_records"), ), ), }), ).annotate({ identifier: "DmarcReportsGetResponseRecords", }) as any as S.Schema; export type DmarcReportsGetResponseStatus = | "missing-dmarc-report" | "multiple-dmarc-reports" | "missing-dmarc-rua" | "cname-on-dmarc-record"; export const DmarcReportsGetResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetDmarcReportResponse { /** List of approved sending sources (omitted when empty) */ approvedSources?: DmarcReportsGetResponseApprovedSourcesList | null; /** Deprecated, use created_at */ created?: string | null; /** Creation timestamp */ createdAt?: string | null; /** Whether DMARC reports are enabled */ enabled?: boolean | null; /** Deprecated, use modified_at */ modified?: string | null; /** Last modification timestamp */ modifiedAt?: string | null; /** Live DNS records for the zone, grouped by type */ records?: DmarcReportsGetResponseRecords | null; /** Prefix for DMARC RUA addresses (32-char hex string) */ ruaPrefix?: string | null; /** Whether to skip the setup wizard */ skipWizard?: boolean | null; /** DMARC configuration status */ status?: DmarcReportsGetResponseStatus | null; /** Use `zone_id` instead */ tag?: string | null; /** Zone identifier */ zoneId?: string | null; } export const GetDmarcReportResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ approvedSources: S.optional( S.NullOr(DmarcReportsGetResponseApprovedSourcesList).pipe( T.Body("approved_sources"), ), ), created: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), enabled: S.optional(S.NullOr(S.Boolean)), modified: S.optional(S.NullOr(S.String)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), records: S.optional(S.NullOr(DmarcReportsGetResponseRecords)), ruaPrefix: S.optional(S.NullOr(S.String).pipe(T.Body("rua_prefix"))), skipWizard: S.optional(S.NullOr(S.Boolean).pipe(T.Body("skip_wizard"))), status: S.optional(S.NullOr(DmarcReportsGetResponseStatus)), tag: S.optional(S.NullOr(S.String)), zoneId: S.optional(S.NullOr(S.String).pipe(T.Body("zone_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetDmarcReportResponse", }) as any as S.Schema; export interface GetSpfInspectRequest { /** Identifier. */ zoneId: string; /** DNS record ID (rec_tag) to inspect */ id: string; } export const GetSpfInspectRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), id: S.String.pipe(T.Query()), }) .pipe( T.Http({ method: "GET", uri: "/zones/{zone_id}/email/auth/spf/inspect", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSpfInspectRequest", }) as any as S.Schema; export type SpfInspectGetResponseComponentsList = Array; export const SpfInspectGetResponseComponentsList = /*@__PURE__*/ S.Array( S.Unknown, ) as any as S.Schema; export interface SpfInspectGetResponseErrorsItem { /** Error code. Known values: */ code: string; /** Domain where the error occurred */ domain: string; /** Human-readable error message */ message: string; /** Additional error-specific details (optional). */ details?: string | null; } export const SpfInspectGetResponseErrorsItem = /*@__PURE__*/ S.suspend(() => S.Struct({ code: S.String, domain: S.String, message: S.String, details: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "SpfInspectGetResponseErrorsItem", }) as any as S.Schema; export type SpfInspectGetResponseErrorsList = Array; export const SpfInspectGetResponseErrorsList = /*@__PURE__*/ S.Array( SpfInspectGetResponseErrorsItem, ) as any as S.Schema; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface GetSpfInspectResponse { /** Parsed SPF components (mechanisms) */ components: SpfInspectGetResponseComponentsList; /** Domain being inspected */ domain: string; /** Raw SPF record content */ record: string; /** Total number of DNS lookups performed across all includes */ totalLookups: number; /** All errors encountered during inspection, collected from the entire tree. */ errors?: SpfInspectGetResponseErrorsList | null; } export const GetSpfInspectResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ components: SpfInspectGetResponseComponentsList, domain: S.String, record: S.String, totalLookups: S.Number.pipe(T.Body("total_lookups")), errors: S.optional(S.NullOr(SpfInspectGetResponseErrorsList)), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "GetSpfInspectResponse", }) as any as S.Schema; export interface PatchDmarcReportRequest { /** Identifier. */ zoneId: string; /** Enable or disable DMARC reports for this zone */ enabled?: boolean; /** Skip the DMARC setup wizard */ skipWizard?: boolean; } export const PatchDmarcReportRequest = /*@__PURE__*/ S.suspend(() => S.Struct({ zoneId: S.String.pipe(T.Label("zone_id")), enabled: S.optional(S.Boolean), skipWizard: S.optional(S.Boolean.pipe(T.Body("skip_wizard"))), }) .pipe( T.Http({ method: "PATCH", uri: "/zones/{zone_id}/email/auth/dmarc-reports", code: 200, }), ) .pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchDmarcReportRequest", }) as any as S.Schema; export type DmarcReportsEditResponseApprovedSourcesItemIpsList = Array; export const DmarcReportsEditResponseApprovedSourcesItemIpsList = /*@__PURE__*/ S.Array( S.String, ) as any as S.Schema; export interface DmarcReportsEditResponseApprovedSourcesItem { /** Deprecated, use created_at */ created?: string | null; /** Creation timestamp */ createdAt?: string | null; /** The source domain */ domain?: string | null; /** Resolved IP addresses from SPF */ ips?: DmarcReportsEditResponseApprovedSourcesItemIpsList | null; /** Deprecated, use modified_at */ modified?: string | null; /** Last modification timestamp */ modifiedAt?: string | null; /** Source name (typically same as domain) */ name?: string | null; /** URL-friendly identifier */ slug?: string | null; /** Source UUID */ tag?: string | null; } export const DmarcReportsEditResponseApprovedSourcesItem = /*@__PURE__*/ S.suspend(() => S.Struct({ created: 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)), ips: S.optional( S.NullOr(DmarcReportsEditResponseApprovedSourcesItemIpsList), ), modified: S.optional(S.NullOr(S.String)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), name: S.optional(S.NullOr(S.String)), slug: S.optional(S.NullOr(S.String)), tag: S.optional(S.NullOr(S.String)), }), ).annotate({ identifier: "DmarcReportsEditResponseApprovedSourcesItem", }) as any as S.Schema; export type DmarcReportsEditResponseApprovedSourcesList = Array; export const DmarcReportsEditResponseApprovedSourcesList = /*@__PURE__*/ S.Array( DmarcReportsEditResponseApprovedSourcesItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsBimiRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsBimiRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsBimiRecordsList = Array; export const DmarcReportsEditResponseRecordsBimiRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsCnameDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsCnameDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsCnameDkimRecordsList = Array; export const DmarcReportsEditResponseRecordsCnameDkimRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsCnameDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsCnameDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsCnameDmarcRecordsList = Array; export const DmarcReportsEditResponseRecordsCnameDmarcRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsCnameSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsCnameSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsCnameSpfRecordsList = Array; export const DmarcReportsEditResponseRecordsCnameSpfRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsDkimRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsDkimRecordsList = Array; export const DmarcReportsEditResponseRecordsDkimRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsDmarcRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsDmarcRecordsList = Array; export const DmarcReportsEditResponseRecordsDmarcRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export type DmarcReportsEditResponseRecordsSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export const DmarcReportsEditResponseRecordsSpfRecordsItem = DmarcReportsGetResponseRecordsBimiRecordsItem; export type DmarcReportsEditResponseRecordsSpfRecordsList = Array; export const DmarcReportsEditResponseRecordsSpfRecordsList = /*@__PURE__*/ S.Array( DmarcReportsGetResponseRecordsBimiRecordsItem, ) as any as S.Schema; export interface DmarcReportsEditResponseRecords { /** BIMI TXT records */ bimiRecords?: DmarcReportsEditResponseRecordsBimiRecordsList | null; /** CNAME records for DKIM */ cnameDkimRecords?: DmarcReportsEditResponseRecordsCnameDkimRecordsList | null; /** CNAME records at _dmarc (problematic) */ cnameDmarcRecords?: DmarcReportsEditResponseRecordsCnameDmarcRecordsList | null; /** CNAME records for SPF */ cnameSpfRecords?: DmarcReportsEditResponseRecordsCnameSpfRecordsList | null; /** DKIM TXT records */ dkimRecords?: DmarcReportsEditResponseRecordsDkimRecordsList | null; /** DMARC TXT records */ dmarcRecords?: DmarcReportsEditResponseRecordsDmarcRecordsList | null; /** SPF TXT records */ spfRecords?: DmarcReportsEditResponseRecordsSpfRecordsList | null; } export const DmarcReportsEditResponseRecords = /*@__PURE__*/ S.suspend(() => S.Struct({ bimiRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsBimiRecordsList).pipe( T.Body("bimi_records"), ), ), cnameDkimRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsCnameDkimRecordsList).pipe( T.Body("cname_dkim_records"), ), ), cnameDmarcRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsCnameDmarcRecordsList).pipe( T.Body("cname_dmarc_records"), ), ), cnameSpfRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsCnameSpfRecordsList).pipe( T.Body("cname_spf_records"), ), ), dkimRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsDkimRecordsList).pipe( T.Body("dkim_records"), ), ), dmarcRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsDmarcRecordsList).pipe( T.Body("dmarc_records"), ), ), spfRecords: S.optional( S.NullOr(DmarcReportsEditResponseRecordsSpfRecordsList).pipe( T.Body("spf_records"), ), ), }), ).annotate({ identifier: "DmarcReportsEditResponseRecords", }) as any as S.Schema; export type DmarcReportsEditResponseStatus = | "missing-dmarc-report" | "multiple-dmarc-reports" | "missing-dmarc-rua" | "cname-on-dmarc-record"; export const DmarcReportsEditResponseStatus = /*@__PURE__*/ S.String; /** Unwrapped `result` payload of the Cloudflare v4 response envelope. */ export interface PatchDmarcReportResponse { /** List of approved sending sources (omitted when empty) */ approvedSources?: DmarcReportsEditResponseApprovedSourcesList | null; /** Deprecated, use created_at */ created?: string | null; /** Creation timestamp */ createdAt?: string | null; /** Whether DMARC reports are enabled */ enabled?: boolean | null; /** Deprecated, use modified_at */ modified?: string | null; /** Last modification timestamp */ modifiedAt?: string | null; /** Live DNS records for the zone, grouped by type */ records?: DmarcReportsEditResponseRecords | null; /** Prefix for DMARC RUA addresses (32-char hex string) */ ruaPrefix?: string | null; /** Whether to skip the setup wizard */ skipWizard?: boolean | null; /** DMARC configuration status */ status?: DmarcReportsEditResponseStatus | null; /** Use `zone_id` instead */ tag?: string | null; /** Zone identifier */ zoneId?: string | null; } export const PatchDmarcReportResponse = /*@__PURE__*/ S.suspend(() => S.Struct({ approvedSources: S.optional( S.NullOr(DmarcReportsEditResponseApprovedSourcesList).pipe( T.Body("approved_sources"), ), ), created: S.optional(S.NullOr(S.String)), createdAt: S.optional(S.NullOr(S.String).pipe(T.Body("created_at"))), enabled: S.optional(S.NullOr(S.Boolean)), modified: S.optional(S.NullOr(S.String)), modifiedAt: S.optional(S.NullOr(S.String).pipe(T.Body("modified_at"))), records: S.optional(S.NullOr(DmarcReportsEditResponseRecords)), ruaPrefix: S.optional(S.NullOr(S.String).pipe(T.Body("rua_prefix"))), skipWizard: S.optional(S.NullOr(S.Boolean).pipe(T.Body("skip_wizard"))), status: S.optional(S.NullOr(DmarcReportsEditResponseStatus)), tag: S.optional(S.NullOr(S.String)), zoneId: S.optional(S.NullOr(S.String).pipe(T.Body("zone_id"))), }).pipe(T.KeyDictionary(KEY_DICTIONARY)), ).annotate({ identifier: "PatchDmarcReportResponse", }) as any as S.Schema; export type GetDmarcReportError = CloudflareOpError; /** Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records. */ export const getDmarcReport: API.OperationMethod< GetDmarcReportRequest, GetDmarcReportResponse, GetDmarcReportError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetDmarcReportRequest, output: GetDmarcReportResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type GetSpfInspectError = CloudflareOpError; /** Inspects a specific SPF TXT record and returns a parsed tree structure in the spflimit-worker format. The record ID must be provided via the `id` query parameter. Returns a recursive tree showing: - Parsed components with their qualifiers and types - Nested includes recursively resolved within components - Per-component and total lookup counts - Detailed error information with context */ export const getSpfInspect: API.OperationMethod< GetSpfInspectRequest, GetSpfInspectResponse, GetSpfInspectError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: GetSpfInspectRequest, output: GetSpfInspectResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, })); export type PatchDmarcReportError = CloudflareOpError; /** Updates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS. */ export const patchDmarcReport: API.OperationMethod< PatchDmarcReportRequest, PatchDmarcReportResponse, PatchDmarcReportError, CloudflareOpContext > = /*@__PURE__*/ API.make(() => ({ input: PatchDmarcReportRequest, output: PatchDmarcReportResponse, errors: [CloudflareRateLimited, CloudflareError], protocol: CloudflareProtocol, retry: Retry.Retry, }));