/** * The Cloudflare Pages provisioning surface. Declared for the TS callers that only need the two * NAME GUARDS — the rest of this module talks to Cloudflare with a token, and reef-mcp hosted * deliberately holds neither (it asks reef-provisioner over a service binding instead). */ /** Throws unless `name` is a Pages project name Cloudflare will accept. Returns it unchanged. */ export function assertProjectName(name: string): string; /** Throws unless `name` is a hostname Cloudflare will accept as a custom domain. Returns it lowercased. */ export function assertDomainName(name: string): string; export function assertServiceBindings(services: unknown): unknown; export function makeCfPagesProvisioner(opts?: { accountId?: string; token?: string; previewSitesNamespaceId?: string; fetchImpl?: typeof fetch; }): Record Promise>; /** #1300 P1 — first-party zones no tenant may put a site under. */ export const PLATFORM_RESERVED_ZONES: readonly string[]; export function platformReservedZone(host: string, extraZones?: string[]): string | null; export function zoneCandidates(host: string): string[]; export const MAX_ZONE_CANDIDATES: number; /** go_live's address-control gate; throws `.code` `domain_platform_reserved` / `domain_zone_not_yours` * / `domain_zone_retired` / `zone_tomb_unknown` (#1315) / `domain_txt_proof_required` / `domain_apex_own_dns` (#1619, only with `tombDoor`). */ export function assertDomainControl(args: { host: string; extraZones?: string[]; accountZoneFor: (host: string) => Promise<{ zone: string | null; tomb?: { accountId: string | null; via?: "txt" } | null }>; hostsOwnedByAccount: () => Promise>; accountId?: string | null; /** #1619 — passed only when DOMAIN_TXT_PROOF is on; see domain-txt-proof.js `openTombWithTxtProof`. */ tombDoor?: ((a: { apex: string; host: string; tomb: { accountId: string | null } }) => Promise< { proven: true; commit: () => Promise } | { proofNeeded: { name: string; value: string; expiresAt: string } } | { refused: true } >) | null; }): Promise<{ zone: string | null; apex: boolean; commitTomb?: () => Promise; ownDns?: true }>; /** #1619 B — the bare domain of a zone a TXT proof holds for: refused, nothing written. */ export function domainApexOwnDnsError(zone: string): Error & { code: "domain_apex_own_dns" }; /** #1619 — the `domain_zone_retired` refusal, word for word, for go_live's deferred tombstone write. */ export function domainZoneRetiredError(zone: string, host: string): Error;