import type { DomainManagementTypes } from "@cargo-ai/types"; import { type Token } from "../core.js"; export type DomainDnsRecordType = DomainManagementTypes.DnsRecordType; export type DomainDnsRecordSpec = { type: DomainDnsRecordType; /** The record's name within the zone — `"@"` for the apex. */ name: string; value: string; /** Seconds. Registrars that own their TTLs (Mailpool) ignore it. */ ttl?: number; /** Required on MX and SRV, meaningless on every other type. */ priority?: number; }; export type DomainSpec = { /** * Bind to the domain this workspace already owns under this name instead of * registering a new one — for a domain bought in the Cargo UI, or by an * earlier deploy whose state file was lost. `destroy` then releases it rather * than cancelling a registration the deploy never paid for. Fails when the * workspace doesn't own the domain: adopting never falls back to buying. */ adopt?: boolean; /** * The complete DNS zone to publish. Declaring it REPLACES every live record, * including the ones the registrar wrote at purchase. Omit it to leave the * live zone untouched; `[]` empties the zone. */ dnsRecords?: DomainDnsRecordSpec[]; /** Apex forwarding URL. Omit to leave whatever is live alone. */ redirectUrl?: string; /** `rua=` mailbox on the published DMARC record. */ dmarcEmail?: string; /** `p=` tag on the published DMARC record. */ dmarcPolicy?: DomainManagementTypes.DmarcPolicy; }; export type DomainHandle = { /** The fully-qualified domain name, e.g. `acme-outreach.com`. */ readonly name: string; readonly uuid: Token; readonly resource: "domain"; }; export declare function defineDomain(name: string, spec?: DomainSpec): DomainHandle; //# sourceMappingURL=domain.d.ts.map