2026-02-24 18:15:44 +00:00
|
|
|
/**
|
|
|
|
|
* Domain, DNS, and certificate data shapes for Onebox
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export interface IDomain {
|
|
|
|
|
id?: number;
|
|
|
|
|
domain: string;
|
2026-04-29 15:24:25 +00:00
|
|
|
dnsProvider: 'cloudflare' | 'manual' | 'dcrouter' | null;
|
2026-02-24 18:15:44 +00:00
|
|
|
cloudflareZoneId?: string;
|
|
|
|
|
isObsolete: boolean;
|
|
|
|
|
defaultWildcard: boolean;
|
|
|
|
|
createdAt: number;
|
|
|
|
|
updatedAt: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ICertificate {
|
|
|
|
|
id?: number;
|
|
|
|
|
domainId: number;
|
|
|
|
|
certDomain: string;
|
|
|
|
|
isWildcard: boolean;
|
|
|
|
|
certPem: string;
|
|
|
|
|
keyPem: string;
|
|
|
|
|
fullchainPem: string;
|
|
|
|
|
expiryDate: number;
|
|
|
|
|
issuer: string;
|
|
|
|
|
isValid: boolean;
|
|
|
|
|
createdAt: number;
|
|
|
|
|
updatedAt: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ICertRequirement {
|
|
|
|
|
id?: number;
|
|
|
|
|
domainId: number;
|
|
|
|
|
serviceId: number;
|
|
|
|
|
subdomain: string;
|
|
|
|
|
status: 'pending' | 'active' | 'renewing' | 'failed';
|
|
|
|
|
certificateId?: number;
|
|
|
|
|
createdAt: number;
|
|
|
|
|
updatedAt: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IDomainDetail {
|
|
|
|
|
domain: IDomain;
|
|
|
|
|
certificates: ICertificate[];
|
|
|
|
|
requirements: ICertRequirement[];
|
|
|
|
|
serviceCount: number;
|
|
|
|
|
certificateStatus: 'valid' | 'expiring-soon' | 'expired' | 'pending' | 'none';
|
|
|
|
|
daysRemaining: number | null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IDnsRecord {
|
|
|
|
|
id?: number;
|
|
|
|
|
domain: string;
|
|
|
|
|
type: 'A' | 'AAAA' | 'CNAME';
|
|
|
|
|
value: string;
|
|
|
|
|
cloudflareID?: string;
|
|
|
|
|
createdAt: number;
|
|
|
|
|
updatedAt: number;
|
|
|
|
|
}
|
2026-05-09 11:58:51 +00:00
|
|
|
|
|
|
|
|
export interface IGatewayDomain {
|
|
|
|
|
id?: string;
|
|
|
|
|
name: string;
|
|
|
|
|
source?: 'dcrouter' | 'provider';
|
|
|
|
|
authoritative?: boolean;
|
|
|
|
|
providerId?: string;
|
|
|
|
|
serviceCount?: number;
|
|
|
|
|
managePath?: string;
|
|
|
|
|
manageUrl?: string;
|
|
|
|
|
capabilities?: {
|
|
|
|
|
canCreateSubdomains: boolean;
|
|
|
|
|
canManageDnsRecords: boolean;
|
|
|
|
|
canIssueCertificates: boolean;
|
|
|
|
|
canHostEmail: boolean;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface IGatewayDnsRecord {
|
|
|
|
|
id: string;
|
|
|
|
|
domainId: string;
|
|
|
|
|
domainName?: string;
|
|
|
|
|
name: string;
|
|
|
|
|
type: string;
|
|
|
|
|
value: string;
|
|
|
|
|
ttl: number;
|
|
|
|
|
source: string;
|
|
|
|
|
status: 'active' | 'missing';
|
|
|
|
|
gatewayClientType: 'onebox' | 'cloudly' | 'custom';
|
|
|
|
|
gatewayClientId: string;
|
|
|
|
|
appId: string;
|
|
|
|
|
hostname: string;
|
|
|
|
|
routeId?: string;
|
|
|
|
|
serviceName?: string;
|
|
|
|
|
managePath?: string;
|
|
|
|
|
manageUrl?: string;
|
|
|
|
|
}
|