mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-11-14 12:15:06 +08:00
9b3ad81b1d
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
32 lines
732 B
TypeScript
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 */;
|