dnscontrol/commands/types/base-types.d.ts
Jed Fox 9b3ad81b1d
Embed types-dnscontrol.d.ts into the binary instead of fetching it via HTTP (#1942)
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
2023-01-17 12:10:43 -05:00

32 lines
732 B
TypeScript

interface Domain {
name: string;
subdomain: string;
registrar: unknown;
meta: Record<string, unknown>;
records: DNSRecord[];
dnsProviders: Record<string, unknown>;
defaultTTL: number;
nameservers: unknown[];
ignored_names: unknown[];
ignored_targets: unknown[];
[key: string]: unknown;
}
interface DNSRecord {
type: string;
meta: Record<string, unknown>;
ttl: number;
}
type DomainModifier =
| ((domain: Domain) => void)
| Partial<Domain>
| DomainModifier[];
type RecordModifier =
| ((record: DNSRecord) => void)
| Partial<DNSRecord['meta']>;
type Duration =
| `${number}${'s' | 'm' | 'h' | 'd' | 'w' | 'n' | 'y' | ''}`
| number /* seconds */;