import { type Result, type ParsedDomainProps } from "@fjall/generator"; import type { DelegatedZonePhaseState } from "./delegatedDomainDeploy.js"; import { DomainDelegationError } from "./types.js"; import type { AwsSdkClientLike } from "./zoneClassifier.js"; /** Parsed identity of a delegated child domain component. */ export interface DelegatedDomainTopology { /** The parent zone the NS delegation lives in, e.g. `example.com`. */ readonly parentZoneName: string; /** The effective child zone, e.g. `dev.example.com`. */ readonly childZoneName: string; } /** * Derive a delegated child's topology from its parsed Domain props. * `undefined` means the component is NOT a delegated child (registrar * `route53` / `external-records`) — callers route those down the * single-phase path, which is then CORRECT, not a downgrade. */ export declare function readDelegatedTopologyFromProps(parsed: ParsedDomainProps): DelegatedDomainTopology | undefined; /** * The typed fail-closed stop for a parent DelegationRole that cannot be * used: proceeding would deploy a child zone whose NS delegation can never * be written, stalling at the NS-propagation gate with a worse message. * `cures` is host-specific — which remedies exist depends on where the * deploy runs (the CLI can mint parent-account credentials; the worker * cannot) — so each host names its own. */ export declare function delegationRoleUnusableError(parentZoneName: string, detail: string, cures: string): DomainDelegationError; /** * DescribeStacks on a domain's stack, reduced to a Map keyed by EXPORT * name. `success(undefined)` is the stack-not-found state; callers own its * meaning (fail-closed for a managed parent, not-applicable for an audit). */ export declare function readDomainStackOutputsByExport(cloudFormation: AwsSdkClientLike, domainName: string, abortSignal?: AbortSignal): Promise | undefined, Error>>; /** * Extract the parent stack's delegation-role export from its output map. * `undefined` covers both an absent export and an empty value — a stack * predating the export contract publishes neither usably. */ export declare function extractDelegationRoleArn(outputs: Map, parentZoneName: string): string | undefined; /** * Derive the delegated child's zone-phase state from its stack outputs: * the zone phase is complete when the hosted-zone-id export is present; the * nameservers export feeds the propagation gate's expected-NS check. * `undefined` outputs (stack not deployed) is an incomplete zone phase. */ export declare function deriveZonePhaseState(outputs: Map | undefined, childZoneName: string): DelegatedZonePhaseState;