@aoxborrow/registrar-client 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +415 -0
- package/dist/index.cjs +6798 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +768 -0
- package/dist/index.d.ts +768 -0
- package/dist/index.js +6747 -0
- package/dist/index.js.map +1 -0
- package/package.json +110 -0
- package/src/client.ts +200 -0
- package/src/constants.ts +11 -0
- package/src/errors.ts +192 -0
- package/src/features.ts +104 -0
- package/src/http.ts +230 -0
- package/src/index.ts +39 -0
- package/src/portfolio.ts +65 -0
- package/src/registrar.ts +240 -0
- package/src/registrars/cloudflare.ts +1205 -0
- package/src/registrars/dynadot.ts +1097 -0
- package/src/registrars/gandi.ts +970 -0
- package/src/registrars/godaddy.ts +1342 -0
- package/src/registrars/index.ts +41 -0
- package/src/registrars/namebright.ts +775 -0
- package/src/registrars/namecheap.ts +870 -0
- package/src/registrars/namesilo.ts +997 -0
- package/src/registrars/porkbun.ts +930 -0
- package/src/registrars/spaceship.ts +736 -0
- package/src/types.ts +446 -0
- package/src/utils.ts +135 -0
- package/src/xml.ts +39 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
import { X2jOptions } from 'fast-xml-parser';
|
|
2
|
+
|
|
3
|
+
declare const Feature: {
|
|
4
|
+
readonly TestConnection: "testConnection";
|
|
5
|
+
readonly ListDomains: "listDomains";
|
|
6
|
+
readonly GetDomain: "getDomain";
|
|
7
|
+
readonly CheckAvailability: "checkAvailability";
|
|
8
|
+
readonly GetPricing: "getPricing";
|
|
9
|
+
readonly RegisterDomain: "registerDomain";
|
|
10
|
+
readonly RenewDomain: "renewDomain";
|
|
11
|
+
readonly SetAutoRenew: "setAutoRenew";
|
|
12
|
+
readonly TransferIn: "transferIn";
|
|
13
|
+
readonly UpdateNameservers: "updateNameservers";
|
|
14
|
+
readonly GetNameservers: "getNameservers";
|
|
15
|
+
readonly LockDomain: "lockDomain";
|
|
16
|
+
readonly UnlockDomain: "unlockDomain";
|
|
17
|
+
readonly SetPrivacy: "setPrivacy";
|
|
18
|
+
readonly GetContacts: "getContacts";
|
|
19
|
+
readonly UpdateContacts: "updateContacts";
|
|
20
|
+
readonly GetDnsRecords: "getDnsRecords";
|
|
21
|
+
readonly SetDnsRecords: "setDnsRecords";
|
|
22
|
+
readonly GetAuthCode: "getAuthCode";
|
|
23
|
+
readonly GetDnssec: "getDnssec";
|
|
24
|
+
readonly DisableDnssec: "disableDnssec";
|
|
25
|
+
readonly GetEmailForwarding: "getEmailForwarding";
|
|
26
|
+
readonly SetEmailForwarding: "setEmailForwarding";
|
|
27
|
+
readonly GetDomainForwarding: "getDomainForwarding";
|
|
28
|
+
readonly SetDomainForwarding: "setDomainForwarding";
|
|
29
|
+
};
|
|
30
|
+
type RegistrarFeature = (typeof Feature)[keyof typeof Feature];
|
|
31
|
+
declare const CORE_FEATURES: readonly ["testConnection", "listDomains", "getDomain", "checkAvailability", "getPricing", "registerDomain", "renewDomain", "setAutoRenew", "transferIn", "updateNameservers", "getNameservers", "lockDomain", "unlockDomain", "setPrivacy", "getContacts", "updateContacts", "getDnsRecords", "setDnsRecords"];
|
|
32
|
+
declare const EXTENDED_FEATURES: readonly ["getAuthCode", "getDnssec", "disableDnssec", "getEmailForwarding", "setEmailForwarding", "getDomainForwarding", "setDomainForwarding"];
|
|
33
|
+
declare const ALL_FEATURES: readonly ["testConnection", "listDomains", "getDomain", "checkAvailability", "getPricing", "registerDomain", "renewDomain", "setAutoRenew", "transferIn", "updateNameservers", "getNameservers", "lockDomain", "unlockDomain", "setPrivacy", "getContacts", "updateContacts", "getDnsRecords", "setDnsRecords", "getAuthCode", "getDnssec", "disableDnssec", "getEmailForwarding", "setEmailForwarding", "getDomainForwarding", "setDomainForwarding"];
|
|
34
|
+
declare function isCoreFeature(feature: RegistrarFeature): boolean;
|
|
35
|
+
|
|
36
|
+
interface RegistrarClientOptions {
|
|
37
|
+
timeout: number;
|
|
38
|
+
retries: number;
|
|
39
|
+
backoff: number;
|
|
40
|
+
signal?: AbortSignal;
|
|
41
|
+
}
|
|
42
|
+
type RequestOptions = Partial<RegistrarClientOptions>;
|
|
43
|
+
interface ListDomainsOptions extends RequestOptions {
|
|
44
|
+
search?: string;
|
|
45
|
+
detailed?: boolean;
|
|
46
|
+
}
|
|
47
|
+
type RegistrarEnvironment = 'production' | 'sandbox';
|
|
48
|
+
interface RegistrarOptions extends Partial<RegistrarClientOptions> {
|
|
49
|
+
environment?: RegistrarEnvironment;
|
|
50
|
+
}
|
|
51
|
+
interface ConnectionResult {
|
|
52
|
+
success: boolean;
|
|
53
|
+
message: string;
|
|
54
|
+
}
|
|
55
|
+
interface OperationResult {
|
|
56
|
+
success: boolean;
|
|
57
|
+
message: string;
|
|
58
|
+
}
|
|
59
|
+
interface ConfigField {
|
|
60
|
+
name: string;
|
|
61
|
+
label: string;
|
|
62
|
+
type: 'text' | 'password' | 'select';
|
|
63
|
+
required: boolean;
|
|
64
|
+
options?: string[];
|
|
65
|
+
default?: string;
|
|
66
|
+
}
|
|
67
|
+
interface Domain {
|
|
68
|
+
domainName: string;
|
|
69
|
+
registrar: string;
|
|
70
|
+
status: string;
|
|
71
|
+
createdDate: Date | null;
|
|
72
|
+
expirationDate: Date | null;
|
|
73
|
+
renewalDate: Date | null;
|
|
74
|
+
autoRenew: boolean;
|
|
75
|
+
locked: boolean;
|
|
76
|
+
privacy: boolean;
|
|
77
|
+
nameservers: string[];
|
|
78
|
+
syncedAt: Date;
|
|
79
|
+
deleted: boolean;
|
|
80
|
+
}
|
|
81
|
+
interface DomainInput {
|
|
82
|
+
domainName?: string;
|
|
83
|
+
registrar?: string;
|
|
84
|
+
status?: string;
|
|
85
|
+
createdDate?: Date | string | number | null;
|
|
86
|
+
expirationDate?: Date | string | number | null;
|
|
87
|
+
renewalDate?: Date | string | number | null;
|
|
88
|
+
autoRenew?: boolean;
|
|
89
|
+
locked?: boolean;
|
|
90
|
+
privacy?: boolean;
|
|
91
|
+
nameservers?: unknown;
|
|
92
|
+
syncedAt?: Date;
|
|
93
|
+
deleted?: boolean;
|
|
94
|
+
}
|
|
95
|
+
interface Contact {
|
|
96
|
+
firstName: string;
|
|
97
|
+
lastName: string;
|
|
98
|
+
organization?: string;
|
|
99
|
+
email: string;
|
|
100
|
+
phone: string;
|
|
101
|
+
fax?: string;
|
|
102
|
+
address1: string;
|
|
103
|
+
address2?: string;
|
|
104
|
+
city: string;
|
|
105
|
+
state?: string;
|
|
106
|
+
postalCode: string;
|
|
107
|
+
country: string;
|
|
108
|
+
}
|
|
109
|
+
interface ContactSet {
|
|
110
|
+
registrant?: Contact;
|
|
111
|
+
admin?: Contact;
|
|
112
|
+
tech?: Contact;
|
|
113
|
+
billing?: Contact;
|
|
114
|
+
}
|
|
115
|
+
interface DnsRecord {
|
|
116
|
+
type: string;
|
|
117
|
+
name: string;
|
|
118
|
+
value: string;
|
|
119
|
+
ttl?: number;
|
|
120
|
+
priority?: number;
|
|
121
|
+
weight?: number;
|
|
122
|
+
port?: number;
|
|
123
|
+
}
|
|
124
|
+
interface DomainAvailability {
|
|
125
|
+
domainName: string;
|
|
126
|
+
available: boolean;
|
|
127
|
+
premium?: boolean;
|
|
128
|
+
price?: number;
|
|
129
|
+
currency?: string;
|
|
130
|
+
period?: number;
|
|
131
|
+
}
|
|
132
|
+
interface TldPricing {
|
|
133
|
+
tld: string;
|
|
134
|
+
currency: string;
|
|
135
|
+
registration?: number;
|
|
136
|
+
renewal?: number;
|
|
137
|
+
transfer?: number;
|
|
138
|
+
}
|
|
139
|
+
interface RegistrationConsent {
|
|
140
|
+
agreedBy: string;
|
|
141
|
+
agreedAt?: string;
|
|
142
|
+
}
|
|
143
|
+
interface TransferDomainInput {
|
|
144
|
+
authCode: string;
|
|
145
|
+
years?: number;
|
|
146
|
+
contacts?: ContactSet;
|
|
147
|
+
consent?: RegistrationConsent;
|
|
148
|
+
privacy?: boolean;
|
|
149
|
+
autoRenew?: boolean;
|
|
150
|
+
}
|
|
151
|
+
interface RegisterDomainInput {
|
|
152
|
+
years?: number;
|
|
153
|
+
contacts: ContactSet;
|
|
154
|
+
nameservers?: string[];
|
|
155
|
+
privacy?: boolean;
|
|
156
|
+
autoRenew?: boolean;
|
|
157
|
+
consent?: RegistrationConsent;
|
|
158
|
+
}
|
|
159
|
+
type RegistrarCredentials = Record<string, string>;
|
|
160
|
+
interface EmailForward {
|
|
161
|
+
alias: string;
|
|
162
|
+
forwardTo: string;
|
|
163
|
+
}
|
|
164
|
+
type DomainForwardType = 'temporary' | 'permanent' | 'masked';
|
|
165
|
+
interface DomainForward {
|
|
166
|
+
host: string;
|
|
167
|
+
url: string;
|
|
168
|
+
type: DomainForwardType;
|
|
169
|
+
}
|
|
170
|
+
interface DsRecord {
|
|
171
|
+
keyTag: number;
|
|
172
|
+
algorithm: number;
|
|
173
|
+
digestType: number;
|
|
174
|
+
digest: string;
|
|
175
|
+
}
|
|
176
|
+
interface DnssecStatus {
|
|
177
|
+
enabled: boolean;
|
|
178
|
+
dsRecords: DsRecord[];
|
|
179
|
+
}
|
|
180
|
+
interface Registrar {
|
|
181
|
+
readonly name: string;
|
|
182
|
+
readonly environment: RegistrarEnvironment;
|
|
183
|
+
readonly features: readonly RegistrarFeature[];
|
|
184
|
+
supports(feature: RegistrarFeature): boolean;
|
|
185
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
186
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
187
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
188
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
189
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
190
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
191
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
192
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
193
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
194
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
195
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
196
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
197
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
198
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
199
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
200
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
201
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
202
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
203
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
204
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
205
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
206
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
207
|
+
getAuthCode(domainName: string, opts?: RequestOptions): Promise<string>;
|
|
208
|
+
getDnssec(domainName: string, opts?: RequestOptions): Promise<DnssecStatus>;
|
|
209
|
+
disableDnssec(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
210
|
+
}
|
|
211
|
+
interface RegistrarConstructor {
|
|
212
|
+
new (credentials: RegistrarCredentials, options?: RegistrarOptions): Registrar;
|
|
213
|
+
readonly displayName: string;
|
|
214
|
+
readonly configFields: ConfigField[];
|
|
215
|
+
readonly helpText: string;
|
|
216
|
+
readonly supportsSandbox: boolean;
|
|
217
|
+
readonly extendedFeatures: readonly RegistrarFeature[];
|
|
218
|
+
readonly features: readonly RegistrarFeature[];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare class RegistrarClient {
|
|
222
|
+
readonly provider: Registrar;
|
|
223
|
+
constructor(provider: Registrar);
|
|
224
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
225
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
226
|
+
private enrichWithDetail;
|
|
227
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
228
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
229
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
230
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
231
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
232
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
233
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
234
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
235
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
236
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
237
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
238
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
239
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
240
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
241
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
242
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
243
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
244
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
245
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
246
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
type DomainSource = Registrar | RegistrarClient;
|
|
250
|
+
interface PortfolioError {
|
|
251
|
+
registrar: string;
|
|
252
|
+
error: Error;
|
|
253
|
+
}
|
|
254
|
+
interface PortfolioResult {
|
|
255
|
+
domains: Domain[];
|
|
256
|
+
errors: PortfolioError[];
|
|
257
|
+
}
|
|
258
|
+
declare function listPortfolio(sources: DomainSource[], opts?: ListDomainsOptions): Promise<PortfolioResult>;
|
|
259
|
+
|
|
260
|
+
declare function toRegistrarError(error: unknown): RegistrarError;
|
|
261
|
+
declare class RegistrarError extends Error {
|
|
262
|
+
status: number;
|
|
263
|
+
providerCode?: string;
|
|
264
|
+
constructor(message: string);
|
|
265
|
+
shouldRetry(): boolean;
|
|
266
|
+
}
|
|
267
|
+
declare class RetryableRegistrarError extends RegistrarError {
|
|
268
|
+
constructor(message: string);
|
|
269
|
+
shouldRetry(): boolean;
|
|
270
|
+
}
|
|
271
|
+
declare class TimeoutError extends RetryableRegistrarError {
|
|
272
|
+
status: number;
|
|
273
|
+
constructor(message: string);
|
|
274
|
+
}
|
|
275
|
+
declare class ConnectionError extends RetryableRegistrarError {
|
|
276
|
+
status: number;
|
|
277
|
+
constructor(message: string);
|
|
278
|
+
}
|
|
279
|
+
declare class AuthenticationError extends RegistrarError {
|
|
280
|
+
status: number;
|
|
281
|
+
constructor(message: string);
|
|
282
|
+
}
|
|
283
|
+
declare class AuthorizationError extends RegistrarError {
|
|
284
|
+
status: number;
|
|
285
|
+
constructor(message: string);
|
|
286
|
+
}
|
|
287
|
+
declare class NotFoundError extends RegistrarError {
|
|
288
|
+
status: number;
|
|
289
|
+
constructor(message: string);
|
|
290
|
+
}
|
|
291
|
+
declare class RateLimitError extends RetryableRegistrarError {
|
|
292
|
+
status: number;
|
|
293
|
+
retryAfter?: number;
|
|
294
|
+
constructor(message: string, retryAfter?: number);
|
|
295
|
+
}
|
|
296
|
+
declare class InvalidResponseError extends RetryableRegistrarError {
|
|
297
|
+
status: number;
|
|
298
|
+
constructor(message: string);
|
|
299
|
+
}
|
|
300
|
+
declare class ParsingError extends RegistrarError {
|
|
301
|
+
status: number;
|
|
302
|
+
constructor(message: string);
|
|
303
|
+
}
|
|
304
|
+
declare class ConfigurationError extends RegistrarError {
|
|
305
|
+
status: number;
|
|
306
|
+
constructor(message: string);
|
|
307
|
+
}
|
|
308
|
+
declare class ConsentRequiredError extends RegistrarError {
|
|
309
|
+
status: number;
|
|
310
|
+
constructor(message: string);
|
|
311
|
+
}
|
|
312
|
+
declare class NotImplementedError extends RegistrarError {
|
|
313
|
+
status: number;
|
|
314
|
+
constructor(message: string);
|
|
315
|
+
}
|
|
316
|
+
declare class AbortError extends RegistrarError {
|
|
317
|
+
status: number;
|
|
318
|
+
constructor(message: string);
|
|
319
|
+
shouldRetry(): boolean;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
interface HttpClientConfig {
|
|
323
|
+
baseUrl: string;
|
|
324
|
+
headers?: Record<string, string>;
|
|
325
|
+
options: RegistrarClientOptions;
|
|
326
|
+
}
|
|
327
|
+
interface RequestConfig {
|
|
328
|
+
method?: string;
|
|
329
|
+
path: string;
|
|
330
|
+
query?: Record<string, string | number | boolean | undefined>;
|
|
331
|
+
body?: unknown;
|
|
332
|
+
headers?: Record<string, string>;
|
|
333
|
+
timeout?: number;
|
|
334
|
+
retries?: number;
|
|
335
|
+
backoff?: number;
|
|
336
|
+
signal?: AbortSignal;
|
|
337
|
+
}
|
|
338
|
+
declare class HttpClient {
|
|
339
|
+
protected config: HttpClientConfig;
|
|
340
|
+
constructor(config: HttpClientConfig);
|
|
341
|
+
request<T = unknown>(req: RequestConfig): Promise<T>;
|
|
342
|
+
requestText(req: RequestConfig): Promise<string>;
|
|
343
|
+
protected withRetries<T>(req: RequestConfig, attemptFn: () => Promise<T>): Promise<T>;
|
|
344
|
+
protected buildUrl(req: RequestConfig): string;
|
|
345
|
+
protected send(req: RequestConfig): Promise<string>;
|
|
346
|
+
protected toStatusError(response: Response, url: string): Promise<RegistrarError>;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare function selectBaseUrl(registrar: string, environment: RegistrarEnvironment | undefined, urls: {
|
|
350
|
+
production: string;
|
|
351
|
+
sandbox?: string;
|
|
352
|
+
}): string;
|
|
353
|
+
declare abstract class BaseRegistrar implements Registrar {
|
|
354
|
+
abstract readonly name: string;
|
|
355
|
+
protected http: HttpClient;
|
|
356
|
+
protected credentials: RegistrarCredentials;
|
|
357
|
+
protected options: RegistrarClientOptions;
|
|
358
|
+
readonly environment: RegistrarEnvironment;
|
|
359
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
360
|
+
static get features(): readonly RegistrarFeature[];
|
|
361
|
+
get features(): readonly RegistrarFeature[];
|
|
362
|
+
supports(feature: RegistrarFeature): boolean;
|
|
363
|
+
constructor(credentials: RegistrarCredentials, httpConfig: Omit<HttpClientConfig, 'options'>, options?: RegistrarOptions);
|
|
364
|
+
testConnection(_opts?: RequestOptions): Promise<ConnectionResult>;
|
|
365
|
+
listDomains(_opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
366
|
+
renewDomain(_domainName: string, _years?: number, _opts?: RequestOptions): Promise<OperationResult>;
|
|
367
|
+
updateNameservers(_domainName: string, _nameservers: string[], _opts?: RequestOptions): Promise<OperationResult>;
|
|
368
|
+
lockDomain(_domainName: string, _opts?: RequestOptions): Promise<OperationResult>;
|
|
369
|
+
unlockDomain(_domainName: string, _opts?: RequestOptions): Promise<OperationResult>;
|
|
370
|
+
getDomain(_domainName: string, _opts?: RequestOptions): Promise<Domain>;
|
|
371
|
+
checkAvailability(_domainNames: string[], _opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
372
|
+
getPricing(_tldOrDomain: string, _opts?: RequestOptions): Promise<TldPricing>;
|
|
373
|
+
registerDomain(_domainName: string, _input: RegisterDomainInput, _opts?: RequestOptions): Promise<OperationResult>;
|
|
374
|
+
setAutoRenew(_domainName: string, _enabled: boolean, _opts?: RequestOptions): Promise<OperationResult>;
|
|
375
|
+
transferIn(_domainName: string, _input: TransferDomainInput, _opts?: RequestOptions): Promise<OperationResult>;
|
|
376
|
+
getNameservers(_domainName: string, _opts?: RequestOptions): Promise<string[]>;
|
|
377
|
+
setPrivacy(_domainName: string, _enabled: boolean, _opts?: RequestOptions): Promise<OperationResult>;
|
|
378
|
+
getContacts(_domainName: string, _opts?: RequestOptions): Promise<ContactSet>;
|
|
379
|
+
updateContacts(_domainName: string, _contacts: ContactSet, _opts?: RequestOptions): Promise<OperationResult>;
|
|
380
|
+
getDnsRecords(_domainName: string, _opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
381
|
+
setDnsRecords(_domainName: string, _records: DnsRecord[], _opts?: RequestOptions): Promise<OperationResult>;
|
|
382
|
+
getEmailForwarding(_domainName: string, _opts?: RequestOptions): Promise<EmailForward[]>;
|
|
383
|
+
setEmailForwarding(_domainName: string, _forwards: EmailForward[], _opts?: RequestOptions): Promise<OperationResult>;
|
|
384
|
+
getDomainForwarding(_domainName: string, _opts?: RequestOptions): Promise<DomainForward[]>;
|
|
385
|
+
setDomainForwarding(_domainName: string, _forwards: DomainForward[], _opts?: RequestOptions): Promise<OperationResult>;
|
|
386
|
+
getAuthCode(_domainName: string, _opts?: RequestOptions): Promise<string>;
|
|
387
|
+
getDnssec(_domainName: string, _opts?: RequestOptions): Promise<DnssecStatus>;
|
|
388
|
+
disableDnssec(_domainName: string, _opts?: RequestOptions): Promise<OperationResult>;
|
|
389
|
+
protected notImplemented(method: string): Promise<never>;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare class CloudflareRegistrar extends BaseRegistrar {
|
|
393
|
+
readonly name = "cloudflare";
|
|
394
|
+
static readonly displayName = "Cloudflare";
|
|
395
|
+
static readonly helpText: string;
|
|
396
|
+
static readonly configFields: ConfigField[];
|
|
397
|
+
static readonly supportsSandbox = false;
|
|
398
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
399
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
400
|
+
private get accountPath();
|
|
401
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
402
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
403
|
+
private toDomain;
|
|
404
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
405
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
406
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
407
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
408
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
409
|
+
private get registrarPath();
|
|
410
|
+
private domainCheck;
|
|
411
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
412
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
413
|
+
private findZone;
|
|
414
|
+
private requireZone;
|
|
415
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
416
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
417
|
+
private getRedirectRuleset;
|
|
418
|
+
private ensurePlaceholderRecord;
|
|
419
|
+
private removePlaceholderRecords;
|
|
420
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
421
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
422
|
+
private ensureDestinations;
|
|
423
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
424
|
+
private static readonly UPDATE_UNAVAILABLE;
|
|
425
|
+
renewDomain(_domainName: string, _years?: number, _opts?: RequestOptions): Promise<OperationResult>;
|
|
426
|
+
updateNameservers(_domainName: string, _nameservers: string[], _opts?: RequestOptions): Promise<OperationResult>;
|
|
427
|
+
lockDomain(_domainName: string, _opts?: RequestOptions): Promise<OperationResult>;
|
|
428
|
+
unlockDomain(_domainName: string, _opts?: RequestOptions): Promise<OperationResult>;
|
|
429
|
+
setAutoRenew(_domainName: string, _enabled: boolean, _opts?: RequestOptions): Promise<OperationResult>;
|
|
430
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
431
|
+
private findDomain;
|
|
432
|
+
private patchDomain;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
declare class DynadotRegistrar extends BaseRegistrar {
|
|
436
|
+
readonly name = "dynadot";
|
|
437
|
+
static readonly displayName = "Dynadot";
|
|
438
|
+
static readonly helpText: string;
|
|
439
|
+
static readonly configFields: ConfigField[];
|
|
440
|
+
static readonly supportsSandbox = true;
|
|
441
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
442
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
443
|
+
private signedRequest;
|
|
444
|
+
private read;
|
|
445
|
+
private mutate;
|
|
446
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
447
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
448
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
449
|
+
private domainInfo;
|
|
450
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
451
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
452
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
453
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
454
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
455
|
+
private renewPriceCheck;
|
|
456
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
457
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
458
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
459
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
460
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
461
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
462
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
463
|
+
private setLock;
|
|
464
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
465
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
466
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
467
|
+
getAuthCode(domainName: string, opts?: RequestOptions): Promise<string>;
|
|
468
|
+
getDnssec(domainName: string, opts?: RequestOptions): Promise<DnssecStatus>;
|
|
469
|
+
disableDnssec(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
470
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
471
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
472
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
473
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
474
|
+
private toDomain;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
declare class GandiRegistrar extends BaseRegistrar {
|
|
478
|
+
readonly name = "gandi";
|
|
479
|
+
static readonly displayName = "Gandi.net";
|
|
480
|
+
static readonly helpText: string;
|
|
481
|
+
static readonly configFields: ConfigField[];
|
|
482
|
+
static readonly supportsSandbox = true;
|
|
483
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
484
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
485
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
486
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
487
|
+
private toDomain;
|
|
488
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
489
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
490
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
491
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
492
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
493
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
494
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
495
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
496
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
497
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
498
|
+
getAuthCode(domainName: string, opts?: RequestOptions): Promise<string>;
|
|
499
|
+
getDnssec(domainName: string, opts?: RequestOptions): Promise<DnssecStatus>;
|
|
500
|
+
disableDnssec(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
501
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
502
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
503
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
504
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
505
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
506
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
507
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
508
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
509
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
510
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
511
|
+
private mutate;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
declare class GoDaddyRegistrar extends BaseRegistrar {
|
|
515
|
+
readonly name = "godaddy";
|
|
516
|
+
static readonly displayName = "GoDaddy";
|
|
517
|
+
static readonly helpText: string;
|
|
518
|
+
static readonly configFields: ConfigField[];
|
|
519
|
+
static readonly supportsSandbox = true;
|
|
520
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
521
|
+
private readonly useV3;
|
|
522
|
+
private customerIdPromise?;
|
|
523
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
524
|
+
private static authHeader;
|
|
525
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
526
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
527
|
+
private listDomainsV3;
|
|
528
|
+
private listDomainsV1;
|
|
529
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
530
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
531
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
532
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
533
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
534
|
+
private registerDomainV3;
|
|
535
|
+
private pollOperation;
|
|
536
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
537
|
+
private buildConsent;
|
|
538
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
539
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
540
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
541
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
542
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
543
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
544
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
545
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
546
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
547
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
548
|
+
private getV3Records;
|
|
549
|
+
private setDnsRecordsV3;
|
|
550
|
+
private resolveCustomerId;
|
|
551
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
552
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
553
|
+
private forwardPath;
|
|
554
|
+
getAuthCode(domainName: string, opts?: RequestOptions): Promise<string>;
|
|
555
|
+
private toDomain;
|
|
556
|
+
private toDomainV3;
|
|
557
|
+
private mutate;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
declare class NameBrightRegistrar extends BaseRegistrar {
|
|
561
|
+
readonly name = "namebright";
|
|
562
|
+
static readonly displayName = "NameBright";
|
|
563
|
+
static readonly helpText: string;
|
|
564
|
+
static readonly configFields: ConfigField[];
|
|
565
|
+
static readonly supportsSandbox = false;
|
|
566
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
567
|
+
private token?;
|
|
568
|
+
private tokenExpiresAt;
|
|
569
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
570
|
+
private getToken;
|
|
571
|
+
private authed;
|
|
572
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
573
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
574
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
575
|
+
getAuthCode(domainName: string, opts?: RequestOptions): Promise<string>;
|
|
576
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
577
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
578
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
579
|
+
getPricing(_tldOrDomain: string, _opts?: RequestOptions): Promise<TldPricing>;
|
|
580
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
581
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
582
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
583
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
584
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
585
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
586
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
587
|
+
private purchase;
|
|
588
|
+
private setDomainFlag;
|
|
589
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
590
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
591
|
+
private toDomain;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
declare class NamecheapRegistrar extends BaseRegistrar {
|
|
595
|
+
readonly name = "namecheap";
|
|
596
|
+
static readonly displayName = "Namecheap";
|
|
597
|
+
static readonly helpText: string;
|
|
598
|
+
static readonly configFields: ConfigField[];
|
|
599
|
+
static readonly supportsSandbox = true;
|
|
600
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
601
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
602
|
+
private baseQuery;
|
|
603
|
+
private call;
|
|
604
|
+
private command;
|
|
605
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
606
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
607
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
608
|
+
private getRegistrarLock;
|
|
609
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
610
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
611
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
612
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
613
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
614
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
615
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
616
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
617
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
618
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
619
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
620
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
621
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
622
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
623
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
624
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
625
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
626
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
627
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
declare class NameSiloRegistrar extends BaseRegistrar {
|
|
631
|
+
readonly name = "namesilo";
|
|
632
|
+
static readonly displayName = "NameSilo";
|
|
633
|
+
static readonly helpText: string;
|
|
634
|
+
static readonly configFields: ConfigField[];
|
|
635
|
+
static readonly supportsSandbox = true;
|
|
636
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
637
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
638
|
+
private call;
|
|
639
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
640
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
641
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
642
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
643
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
644
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
645
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
646
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
647
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
648
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
649
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
650
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
651
|
+
getDnssec(domainName: string, opts?: RequestOptions): Promise<DnssecStatus>;
|
|
652
|
+
disableDnssec(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
653
|
+
private listEmailForwards;
|
|
654
|
+
getEmailForwarding(domainName: string, opts?: RequestOptions): Promise<EmailForward[]>;
|
|
655
|
+
setEmailForwarding(domainName: string, forwards: EmailForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
656
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
657
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
658
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
659
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
660
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
661
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
662
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
663
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
declare class PorkbunRegistrar extends BaseRegistrar {
|
|
667
|
+
readonly name = "porkbun";
|
|
668
|
+
static readonly displayName = "Porkbun";
|
|
669
|
+
static readonly helpText: string;
|
|
670
|
+
static readonly configFields: ConfigField[];
|
|
671
|
+
static readonly supportsSandbox = true;
|
|
672
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
673
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
674
|
+
private call;
|
|
675
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
676
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
677
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
678
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
679
|
+
getContacts(_domainName: string, _opts?: RequestOptions): Promise<ContactSet>;
|
|
680
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
681
|
+
getPricing(tldOrDomain: string, opts?: RequestOptions): Promise<TldPricing>;
|
|
682
|
+
private tldPricing;
|
|
683
|
+
private renewPriceCheck;
|
|
684
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
685
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
686
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
687
|
+
renewDomain(domainName: string, _years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
688
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
689
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
690
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
691
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
692
|
+
getDnssec(domainName: string, opts?: RequestOptions): Promise<DnssecStatus>;
|
|
693
|
+
disableDnssec(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
694
|
+
getDomainForwarding(domainName: string, opts?: RequestOptions): Promise<DomainForward[]>;
|
|
695
|
+
setDomainForwarding(domainName: string, forwards: DomainForward[], opts?: RequestOptions): Promise<OperationResult>;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
declare class SpaceshipRegistrar extends BaseRegistrar {
|
|
699
|
+
readonly name = "spaceship";
|
|
700
|
+
static readonly displayName = "Spaceship";
|
|
701
|
+
static readonly helpText: string;
|
|
702
|
+
static readonly configFields: ConfigField[];
|
|
703
|
+
static readonly supportsSandbox = false;
|
|
704
|
+
static readonly extendedFeatures: readonly RegistrarFeature[];
|
|
705
|
+
constructor(credentials: RegistrarCredentials, options?: RegistrarOptions);
|
|
706
|
+
testConnection(opts?: RequestOptions): Promise<ConnectionResult>;
|
|
707
|
+
listDomains(opts?: ListDomainsOptions): Promise<Domain[]>;
|
|
708
|
+
getDomain(domainName: string, opts?: RequestOptions): Promise<Domain>;
|
|
709
|
+
getNameservers(domainName: string, opts?: RequestOptions): Promise<string[]>;
|
|
710
|
+
getAuthCode(domainName: string, opts?: RequestOptions): Promise<string>;
|
|
711
|
+
checkAvailability(domainNames: string[], opts?: RequestOptions): Promise<DomainAvailability[]>;
|
|
712
|
+
getPricing(_tldOrDomain: string, _opts?: RequestOptions): Promise<TldPricing>;
|
|
713
|
+
registerDomain(domainName: string, input: RegisterDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
714
|
+
transferIn(domainName: string, input: TransferDomainInput, opts?: RequestOptions): Promise<OperationResult>;
|
|
715
|
+
renewDomain(domainName: string, years?: number, opts?: RequestOptions): Promise<OperationResult>;
|
|
716
|
+
setAutoRenew(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
717
|
+
updateNameservers(domainName: string, nameservers: string[], opts?: RequestOptions): Promise<OperationResult>;
|
|
718
|
+
lockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
719
|
+
unlockDomain(domainName: string, opts?: RequestOptions): Promise<OperationResult>;
|
|
720
|
+
setPrivacy(domainName: string, enabled: boolean, opts?: RequestOptions): Promise<OperationResult>;
|
|
721
|
+
getContacts(domainName: string, opts?: RequestOptions): Promise<ContactSet>;
|
|
722
|
+
updateContacts(domainName: string, contacts: ContactSet, opts?: RequestOptions): Promise<OperationResult>;
|
|
723
|
+
getDnsRecords(domainName: string, opts?: RequestOptions): Promise<DnsRecord[]>;
|
|
724
|
+
setDnsRecords(domainName: string, records: DnsRecord[], opts?: RequestOptions): Promise<OperationResult>;
|
|
725
|
+
private getRaw;
|
|
726
|
+
private getContact;
|
|
727
|
+
private saveContactSet;
|
|
728
|
+
private saveContact;
|
|
729
|
+
private fetchRecords;
|
|
730
|
+
private toDomain;
|
|
731
|
+
private mutate;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
declare const registrars: {
|
|
735
|
+
cloudflare: typeof CloudflareRegistrar;
|
|
736
|
+
dynadot: typeof DynadotRegistrar;
|
|
737
|
+
gandi: typeof GandiRegistrar;
|
|
738
|
+
godaddy: typeof GoDaddyRegistrar;
|
|
739
|
+
namebright: typeof NameBrightRegistrar;
|
|
740
|
+
namecheap: typeof NamecheapRegistrar;
|
|
741
|
+
namesilo: typeof NameSiloRegistrar;
|
|
742
|
+
porkbun: typeof PorkbunRegistrar;
|
|
743
|
+
spaceship: typeof SpaceshipRegistrar;
|
|
744
|
+
};
|
|
745
|
+
type RegistrarName = keyof typeof registrars;
|
|
746
|
+
declare function createRegistrar(name: RegistrarName, credentials: RegistrarCredentials, options?: RegistrarOptions): Registrar;
|
|
747
|
+
|
|
748
|
+
declare function parseXml<T = unknown>(xml: string, options?: Partial<X2jOptions>): T;
|
|
749
|
+
declare function ensureArray<T>(value: T | T[] | undefined | null): T[];
|
|
750
|
+
|
|
751
|
+
declare const DEFAULT_OPTIONS: RegistrarClientOptions;
|
|
752
|
+
declare const USER_AGENT = "@aoxborrow/registrar-client";
|
|
753
|
+
|
|
754
|
+
declare function sleep(ms: number): Promise<void>;
|
|
755
|
+
type SettableDomainForward = DomainForward & {
|
|
756
|
+
type: 'temporary' | 'permanent';
|
|
757
|
+
};
|
|
758
|
+
declare const MASKED_FORWARD_UNSUPPORTED = "masked/framed forwarding is not supported by this library; use \"temporary\" or \"permanent\"";
|
|
759
|
+
declare function settableForwards(forwards: DomainForward[]): SettableDomainForward[];
|
|
760
|
+
declare function requireConsent(provider: string, consent: RegistrationConsent | undefined): RegistrationConsent;
|
|
761
|
+
declare function filterDomains(domains: Domain[], search?: string): Domain[];
|
|
762
|
+
declare function normalizeDomain(domain: string): string;
|
|
763
|
+
declare function backoffDelay(backoff: number, attempt: number): number;
|
|
764
|
+
declare function parseDate(value: Date | string | number | null | undefined): Date | null;
|
|
765
|
+
declare function normalizeNameservers(nameservers: unknown): string[];
|
|
766
|
+
declare function createDomain(data?: DomainInput): Domain;
|
|
767
|
+
|
|
768
|
+
export { ALL_FEATURES, AbortError, AuthenticationError, AuthorizationError, BaseRegistrar, CORE_FEATURES, CloudflareRegistrar, type ConfigField, ConfigurationError, ConnectionError, type ConnectionResult, ConsentRequiredError, type Contact, type ContactSet, DEFAULT_OPTIONS, type DnsRecord, type DnssecStatus, type Domain, type DomainAvailability, type DomainForward, type DomainForwardType, type DomainInput, type DomainSource, type DsRecord, DynadotRegistrar, EXTENDED_FEATURES, type EmailForward, Feature, GandiRegistrar, GoDaddyRegistrar, HttpClient, type HttpClientConfig, InvalidResponseError, type ListDomainsOptions, MASKED_FORWARD_UNSUPPORTED, NameBrightRegistrar, NameSiloRegistrar, NamecheapRegistrar, NotFoundError, NotImplementedError, type OperationResult, ParsingError, PorkbunRegistrar, type PortfolioError, type PortfolioResult, RateLimitError, type RegisterDomainInput, type Registrar, RegistrarClient, type RegistrarClientOptions, type RegistrarConstructor, type RegistrarCredentials, type RegistrarEnvironment, RegistrarError, type RegistrarFeature, type RegistrarName, type RegistrarOptions, type RegistrationConsent, type RequestConfig, type RequestOptions, RetryableRegistrarError, type SettableDomainForward, SpaceshipRegistrar, TimeoutError, type TldPricing, type TransferDomainInput, USER_AGENT, backoffDelay, createDomain, createRegistrar, ensureArray, filterDomains, isCoreFeature, listPortfolio, normalizeDomain, normalizeNameservers, parseDate, parseXml, registrars, requireConsent, selectBaseUrl, settableForwards, sleep, toRegistrarError };
|