- Added DnsManager and DnsEntry classes to handle DNS entries. - Introduced new interfaces for DNS entry requests and data structures. - Updated Cloudly class to include DnsManager instance. - Enhanced app state to manage DNS entries and actions for creating, updating, and deleting DNS records. - Created UI components for DNS management, including forms for adding and editing DNS entries. - Updated overview and services views to reflect DNS entries. - Added validation and formatting methods for DNS entries.
110 lines
2.0 KiB
TypeScript
110 lines
2.0 KiB
TypeScript
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';
|
|
|
|
/**
|
|
* 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;
|
|
|
|
/**
|
|
* Whether domain is managed externally
|
|
*/
|
|
isExternal?: boolean;
|
|
|
|
/**
|
|
* Creation timestamp
|
|
*/
|
|
createdAt?: number;
|
|
|
|
/**
|
|
* Last update timestamp
|
|
*/
|
|
updatedAt?: number;
|
|
};
|
|
} |