2025-09-09 15:08:28 +00:00
|
|
|
export type TDomainStatus = 'active' | 'pending' | 'expired' | 'suspended' | 'transferred';
|
|
|
|
export type TDomainVerificationStatus = 'verified' | 'pending' | 'failed' | 'not_required';
|
|
|
|
|
|
|
|
export interface IDomain {
|
|
|
|
id: string;
|
|
|
|
data: {
|
|
|
|
/**
|
|
|
|
* The domain name (e.g., example.com)
|
|
|
|
*/
|
|
|
|
name: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Description or notes about the domain
|
|
|
|
*/
|
|
|
|
description?: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Current status of the domain
|
|
|
|
*/
|
|
|
|
status: TDomainStatus;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain verification status
|
|
|
|
*/
|
|
|
|
verificationStatus: TDomainVerificationStatus;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Nameservers for the domain
|
|
|
|
*/
|
|
|
|
nameservers: string[];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain registrar information
|
|
|
|
*/
|
|
|
|
registrar?: {
|
|
|
|
name: string;
|
|
|
|
url?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain registration date (timestamp)
|
|
|
|
*/
|
|
|
|
registeredAt?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain expiration date (timestamp)
|
|
|
|
*/
|
|
|
|
expiresAt?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether auto-renewal is enabled
|
|
|
|
*/
|
|
|
|
autoRenew: boolean;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* DNSSEC enabled
|
|
|
|
*/
|
|
|
|
dnssecEnabled?: boolean;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tags for categorization
|
|
|
|
*/
|
|
|
|
tags?: string[];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether this domain is primary for the organization
|
|
|
|
*/
|
|
|
|
isPrimary?: boolean;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SSL certificate status
|
|
|
|
*/
|
|
|
|
sslStatus?: 'active' | 'pending' | 'expired' | 'none';
|
2025-09-14 17:38:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Cloudly activation state controls whether we actively manage DNS/certificates
|
|
|
|
* - available: discovered/imported, not actively managed
|
|
|
|
* - activated: actively managed (DNS edits allowed, certs considered)
|
|
|
|
* - ignored: explicitly ignored from management/automation
|
|
|
|
*/
|
|
|
|
activationState?: 'available' | 'activated' | 'ignored';
|
2025-09-09 15:08:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Last verification attempt timestamp
|
|
|
|
*/
|
|
|
|
lastVerificationAt?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verification method used
|
|
|
|
*/
|
|
|
|
verificationMethod?: 'dns' | 'http' | 'email' | 'manual';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Verification token (for DNS/HTTP verification)
|
|
|
|
*/
|
|
|
|
verificationToken?: string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cloudflare zone ID if managed by Cloudflare
|
|
|
|
*/
|
|
|
|
cloudflareZoneId?: string;
|
2025-09-14 17:38:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sync metadata
|
|
|
|
*/
|
|
|
|
syncSource?: 'cloudflare' | 'manual' | null;
|
|
|
|
lastSyncAt?: number;
|
2025-09-09 15:08:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether domain is managed externally
|
|
|
|
*/
|
|
|
|
isExternal?: boolean;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creation timestamp
|
|
|
|
*/
|
|
|
|
createdAt?: number;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Last update timestamp
|
|
|
|
*/
|
|
|
|
updatedAt?: number;
|
|
|
|
};
|
2025-09-14 17:38:16 +00:00
|
|
|
}
|