dnscontrol/commands/types/base-types.d.ts

33 lines
732 B
TypeScript
Raw Normal View History

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 */;