-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
89 lines (79 loc) · 1.89 KB
/
types.ts
File metadata and controls
89 lines (79 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
export type User = {
id: string;
email?: string;
walletAddress?: string;
handle?: string;
avatar?: string;
balance: number;
};
export enum DomainStatus {
AVAILABLE = 'AVAILABLE',
REGISTERED = 'REGISTERED',
PREMIUM = 'PREMIUM',
UNAVAILABLE = 'UNAVAILABLE',
ACTIVE = 'ACTIVE',
EXPIRED = 'EXPIRED',
PENDING = 'PENDING',
}
export type DomainSearchResult = {
name: string;
status: DomainStatus;
price: number;
renewalPrice: number;
};
export type DNSRecord = {
id: string;
type: 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'MX' | 'SRV' | 'CAA' | 'URI';
name: string;
content: string;
ttl: number;
proxied: boolean;
};
export type Domain = {
name: string;
registrarStatus: 'ClientHold' | 'Ok' | 'Pending';
autoRenew: boolean;
expiresAt: string;
dnsMode: 'AUTO' | 'MANUAL';
sslStatus: 'ISSUING' | 'ACTIVE' | 'EXPIRED';
records: DNSRecord[];
recordLimit?: number;
recordUsage?: number;
};
export type DomainSummary = Omit<Domain, 'records'>;
export enum DeploymentStatus {
QUEUED = 'QUEUED',
BUILDING = 'BUILDING',
READY = 'READY',
ERROR = 'ERROR',
CANCELED = 'CANCELED'
}
export type Deployment = {
id: string;
siteId: string;
commitHash?: string;
branch?: string;
status: DeploymentStatus;
createdAt: string;
url?: string;
logs: string[];
};
export type Site = {
id: string;
name: string;
domain: string;
framework: 'vite' | 'next' | 'static' | 'create-react-app';
status: 'LIVE' | 'OFFLINE' | 'MAINTENANCE';
lastDeployedAt: string;
deployments: Deployment[];
};
export type SiteSummary = Omit<Site, 'deployments'>;
export type Order = {
id: string;
type: 'REGISTER' | 'RENEW' | 'TRANSFER';
domain: string;
amount: number;
status: 'CREATED' | 'PENDING_PAYMENT' | 'PAID' | 'PROVISIONING' | 'COMPLETED' | 'FAILED';
createdAt: string;
fulfillmentStatus?: 'PURCHASING' | 'PURCHASED' | 'CLOUDFLARE_PENDING' | 'ONLINE' | 'FAILED';
};