/** * Where a domain came from / how it is managed. * * - 'manual' → operator added the domain manually. dcrouter is the * authoritative DNS server for it; records are served by * the embedded smartdns.DnsServer. * - 'provider' → domain was imported from an external DNS provider * (e.g. Cloudflare). The provider stays authoritative; * dcrouter only reads/writes records via the provider API. */ export type TDomainSource = 'manual' | 'provider'; /** * A domain under management by dcrouter. */ export interface IDomain { id: string; /** Fully qualified domain name (e.g. 'example.com'). */ name: string; source: TDomainSource; /** ID of the DnsProvider that owns this domain — only set when source === 'provider'. */ providerId?: string; /** True when dcrouter is the authoritative DNS server for this domain (source === 'manual'). */ authoritative: boolean; /** Authoritative nameservers (display only — populated from provider for imported domains). */ nameservers?: string[]; /** Provider's internal zone identifier — only set when source === 'provider'. */ externalZoneId?: string; /** Last time records were synced from the provider — only set when source === 'provider'. */ lastSyncedAt?: number; description?: string; createdAt: number; updatedAt: number; createdBy: string; }