feat(dns): add db-backed DNS provider, domain, and record management with ops UI support
This commit is contained in:
42
ts_interfaces/data/dns-record.ts
Normal file
42
ts_interfaces/data/dns-record.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Supported DNS record types.
|
||||
*/
|
||||
export type TDnsRecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'CAA';
|
||||
|
||||
/**
|
||||
* Where a DNS record came from.
|
||||
*
|
||||
* - 'manual' → created in the dcrouter UI / API
|
||||
* - 'synced' → pulled from a provider during a sync operation
|
||||
*/
|
||||
export type TDnsRecordSource = 'manual' | 'synced';
|
||||
|
||||
/**
|
||||
* A DNS record. For manual (authoritative) domains, the record is registered
|
||||
* with the embedded smartdns.DnsServer. For provider-managed domains, the
|
||||
* record is mirrored from / pushed to the provider API and `providerRecordId`
|
||||
* holds the provider's internal record id (for updates and deletes).
|
||||
*/
|
||||
export interface IDnsRecord {
|
||||
id: string;
|
||||
/** ID of the parent IDomain. */
|
||||
domainId: string;
|
||||
/** Fully qualified record name (e.g. 'www.example.com'). */
|
||||
name: string;
|
||||
type: TDnsRecordType;
|
||||
/**
|
||||
* Record value as a string. For MX records, formatted as
|
||||
* `<priority> <exchange>` (e.g. `10 mail.example.com`).
|
||||
*/
|
||||
value: string;
|
||||
/** TTL in seconds. */
|
||||
ttl: number;
|
||||
/** Cloudflare-specific: whether the record is proxied through Cloudflare. */
|
||||
proxied?: boolean;
|
||||
source: TDnsRecordSource;
|
||||
/** Provider's internal record id (for updates/deletes). Only set for provider records. */
|
||||
providerRecordId?: string;
|
||||
createdAt: number;
|
||||
updatedAt: number;
|
||||
createdBy: string;
|
||||
}
|
||||
Reference in New Issue
Block a user