81 lines
1.6 KiB
TypeScript
81 lines
1.6 KiB
TypeScript
|
export type TDnsRecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'SRV' | 'CAA' | 'PTR';
|
||
|
|
||
|
export interface IDnsEntry {
|
||
|
id: string;
|
||
|
data: {
|
||
|
/**
|
||
|
* The DNS record type
|
||
|
*/
|
||
|
type: TDnsRecordType;
|
||
|
|
||
|
/**
|
||
|
* The DNS record name (e.g., www, @, mail)
|
||
|
* @ represents the root domain
|
||
|
*/
|
||
|
name: string;
|
||
|
|
||
|
/**
|
||
|
* The value of the DNS record
|
||
|
* - For A/AAAA: IP address
|
||
|
* - For CNAME: Target domain
|
||
|
* - For MX: Mail server hostname
|
||
|
* - For TXT: Text value
|
||
|
* - For NS: Nameserver hostname
|
||
|
* - For SRV: Target hostname
|
||
|
* - For CAA: CAA record value
|
||
|
* - For PTR: Domain name
|
||
|
*/
|
||
|
value: string;
|
||
|
|
||
|
/**
|
||
|
* Time to live in seconds
|
||
|
* Default: 3600 (1 hour)
|
||
|
*/
|
||
|
ttl: number;
|
||
|
|
||
|
/**
|
||
|
* Priority (used for MX and SRV records)
|
||
|
* Lower values have higher priority
|
||
|
*/
|
||
|
priority?: number;
|
||
|
|
||
|
/**
|
||
|
* The DNS zone this entry belongs to
|
||
|
* e.g., example.com
|
||
|
* @deprecated Use domainId instead
|
||
|
*/
|
||
|
zone: string;
|
||
|
|
||
|
/**
|
||
|
* The domain ID this DNS entry belongs to
|
||
|
* Links to the Domain entity
|
||
|
*/
|
||
|
domainId?: string;
|
||
|
|
||
|
/**
|
||
|
* Additional fields for SRV records
|
||
|
*/
|
||
|
weight?: number;
|
||
|
port?: number;
|
||
|
|
||
|
/**
|
||
|
* Whether this DNS entry is active
|
||
|
*/
|
||
|
active: boolean;
|
||
|
|
||
|
/**
|
||
|
* Optional description for documentation
|
||
|
*/
|
||
|
description?: string;
|
||
|
|
||
|
/**
|
||
|
* Timestamp when the entry was created
|
||
|
*/
|
||
|
createdAt?: number;
|
||
|
|
||
|
/**
|
||
|
* Timestamp when the entry was last updated
|
||
|
*/
|
||
|
updatedAt?: number;
|
||
|
};
|
||
|
}
|