@fwgapps/namecheap 0.2.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.
@@ -0,0 +1,1268 @@
1
+ /**
2
+ * The ConfigType interface defines the structure for configuration data used in an application.
3
+ * This could include API credentials, client information, and other optional settings.
4
+ *
5
+ * Properties:
6
+ * - `apiUser`: A string representing the user identifier for API authentication.
7
+ * - `apiKey`: A string containing the authentication key required for API access.
8
+ * - `clientIp`: A string representing the IP address of the client or user making requests.
9
+ * - `sandbox`: A boolean indicating whether the application is running in a sandbox (testing) environment.
10
+ * - `username` (optional): A string specifying the username for additional authentication purposes.
11
+ */
12
+ interface ConfigType {
13
+ apiUser: string;
14
+ apiKey: string;
15
+ clientIp: string;
16
+ sandbox: boolean;
17
+ username?: string;
18
+ }
19
+ /**
20
+ * Interface representing configuration properties for interacting with the Namecheap API.
21
+ *
22
+ * The properties in this interface are used to authenticate and establish a connection
23
+ * with the Namecheap API, and they include credentials and endpoint details.
24
+ *
25
+ * Properties:
26
+ * - apiUser: The API user associated with the Namecheap account.
27
+ * - apiKey: The API key used for authenticating API requests.
28
+ * - clientIp: The client's IP address allowed to communicate with the API.
29
+ * - apiUrl: The base URL of the Namecheap API endpoint.
30
+ * - username: The username of the Namecheap account owner.
31
+ */
32
+ interface NamecheapProps {
33
+ apiUser: string;
34
+ apiKey: string;
35
+ clientIp: string;
36
+ apiUrl: string;
37
+ username: string;
38
+ }
39
+
40
+ /**
41
+ * Represents the pagination details for a dataset.
42
+ *
43
+ * @interface Paging
44
+ * @property {number} totalItem - The total number of items in the dataset.
45
+ * @property {number} currentPage - The current page being accessed.
46
+ * @property {number} pageSize - The number of items displayed per page.
47
+ * @property {boolean} paging - Indicates whether paging is enabled.
48
+ */
49
+ interface Paging {
50
+ totalItem: number;
51
+ currentPage: number;
52
+ pageSize: number;
53
+ paging: boolean;
54
+ }
55
+
56
+ interface DomainGetListResult {
57
+ id: number;
58
+ name: string;
59
+ user: string;
60
+ created: string;
61
+ expires: string;
62
+ isExpired: boolean;
63
+ isLocked: boolean;
64
+ autoRenew: boolean;
65
+ whoisGuard: string;
66
+ isPremium: boolean;
67
+ isOurDns: boolean;
68
+ }
69
+ /**
70
+ * Represents the collection of contact details associated with different roles.
71
+ *
72
+ * This interface is used to store and structure contact information for
73
+ * registrants, technical contacts, administrative contacts, and auxiliary billing contacts.
74
+ *
75
+ * Each property corresponds to a different role and contains detailed
76
+ * contact information through the `ContactDetail` interface.
77
+ */
78
+ interface Contacts {
79
+ registrant: ContactDetail;
80
+ tech: ContactDetail;
81
+ admin: ContactDetail;
82
+ auxBilling: ContactDetail;
83
+ }
84
+ /**
85
+ * Represents the contact details for an individual or organization.
86
+ *
87
+ * This interface defines the structure for commonly used contact information
88
+ * such as names, addresses, communication details, and additional metadata.
89
+ *
90
+ * Properties:
91
+ * - organizationName: The name of the organization associated with the contact.
92
+ * - jobTitle: The job title or role of the contact individual.
93
+ * - firstName: The first name of the individual contact.
94
+ * - lastName: The last name of the individual contact.
95
+ * - address1: The primary address line for the contact.
96
+ * - address2: The secondary address line, if applicable.
97
+ * - city: The city where the contact is located.
98
+ * - stateProvince: The state or province of the contact's location.
99
+ * - stateProvinceChoice: Specific state or province choice when applicable.
100
+ * - postalCode: The postal or zip code corresponding to the contact's address.
101
+ * - country: The name of the country of the contact.
102
+ * - phone: The primary phone number for the contact.
103
+ * - fax: The fax number associated with the contact, if available.
104
+ * - emailAddress: The primary email address associated with the contact.
105
+ * - phoneExt: The phone number extension, if applicable.
106
+ * - readOnly: A flag indicating whether the contact details are read-only.
107
+ */
108
+ interface ContactDetail {
109
+ organizationName: string;
110
+ jobTitle: string;
111
+ firstName: string;
112
+ lastName: string;
113
+ address1: string;
114
+ address2: string;
115
+ city: string;
116
+ stateProvince: string;
117
+ stateProvinceChoice: string;
118
+ postalCode: number;
119
+ country: string;
120
+ phone: number;
121
+ fax: number;
122
+ emailAddress: string;
123
+ phoneExt: number;
124
+ readOnly: boolean;
125
+ }
126
+ /**
127
+ * Represents the attributes related to the current registrant.
128
+ *
129
+ * This interface provides properties that define key details about the
130
+ * registrant's nexus and purpose.
131
+ *
132
+ * @interface
133
+ */
134
+ interface CurrentAttributes {
135
+ registrantNexus: string;
136
+ registrantPurpose: string;
137
+ }
138
+ interface DomainContactsResult extends Contacts {
139
+ currentAttributes: CurrentAttributes;
140
+ whoisGuardContact: Contacts & {
141
+ whoisGuardContact: boolean;
142
+ };
143
+ domain: string;
144
+ domainnameid: number;
145
+ }
146
+ interface DomainCreateResult {
147
+ domain: string;
148
+ registered: boolean;
149
+ chargedAmount: number;
150
+ domainID: number;
151
+ orderID: number;
152
+ transactionID: number;
153
+ whoisguardEnable: boolean;
154
+ nonRealTimeDomain: boolean;
155
+ }
156
+ /**
157
+ * Represents a category with a name and a sequence number.
158
+ *
159
+ * @interface Category
160
+ * @property {string} name - The name of the category.
161
+ * @property {number} sequenceNumber - The sequence number of the category, typically used for ordering.
162
+ */
163
+ interface Category {
164
+ name: string;
165
+ sequenceNumber: number;
166
+ }
167
+ interface TLD {
168
+ name: string;
169
+ nonRealTime: boolean;
170
+ minRegisterYears: number;
171
+ maxRegisterYears: number;
172
+ minRenewYears: number;
173
+ maxRenewYears: number;
174
+ renewalMinDays: number;
175
+ renewalMaxDays: number;
176
+ reactivateMaxDays: number;
177
+ minTransferYears: number;
178
+ maxTransferYears: number;
179
+ isApiRegisterable: boolean;
180
+ isApiRenewable: boolean;
181
+ isApiTransferable: boolean;
182
+ isEppRequired: boolean;
183
+ isDisableModContact: boolean;
184
+ isDisableWGAllot: boolean;
185
+ isIncludeInExtendedSearchOnly: boolean;
186
+ sequenceNumber: number;
187
+ type: string;
188
+ subType: string;
189
+ isSupportsIDN: boolean;
190
+ category: string;
191
+ supportsRegistrarLock: boolean;
192
+ addGracePeriodDays: number;
193
+ whoisVerification: boolean;
194
+ providerApiDelete: boolean;
195
+ tldState: string;
196
+ searchGroup: string;
197
+ registry: string;
198
+ categories: Array<Category>;
199
+ }
200
+ interface DomainCheckResult {
201
+ domain: string;
202
+ available: boolean;
203
+ errorNo: number;
204
+ isPremiumName: boolean;
205
+ premiumRegistrationPrice: number;
206
+ premiumRenewalPrice: number;
207
+ premiumRestorePrice: number;
208
+ premiumTransferPrice: number;
209
+ icannFee: number;
210
+ eapFee: number;
211
+ }
212
+ interface DomainReactivateResult {
213
+ domain: string;
214
+ isSuccess: boolean;
215
+ chargedAmount: number;
216
+ orderId: number;
217
+ transactionId: number;
218
+ }
219
+ interface DomainRenewResult {
220
+ domainDetails: {
221
+ expiredDate: string;
222
+ numYears: number;
223
+ domainDetails: boolean;
224
+ };
225
+ domainName: string;
226
+ domainId: number;
227
+ renew: true;
228
+ orderId: number;
229
+ transactionId: number;
230
+ chargedAmount: number;
231
+ }
232
+ interface DomainGetRegistrarLockResult {
233
+ domain: string;
234
+ registrarLockStatus: boolean;
235
+ isClientUpdateProhibited: boolean;
236
+ isClientDeleteProhibited: boolean;
237
+ isClientHold: boolean;
238
+ }
239
+ interface DomainSetRegistrarLockResult {
240
+ domain: string;
241
+ isSuccess: boolean;
242
+ registrarLockStatus: boolean;
243
+ isRegistrarLockStatusUpdated: boolean;
244
+ isClientUpdateProhibitedUpdated: boolean;
245
+ isClientDeleteProhibitedUpdated: boolean;
246
+ isClientHoldUpdated: boolean;
247
+ }
248
+ interface DomainGetInfoResult {
249
+ domainDetails: {
250
+ createdDate: string;
251
+ expiredDate: string;
252
+ numYears: number;
253
+ domainDetails: boolean;
254
+ };
255
+ whoisguard: {
256
+ id: number;
257
+ enabled: string;
258
+ };
259
+ premiumDnsSubscription: {
260
+ useAutoRenew: boolean;
261
+ subscriptionId: number;
262
+ createdDate: string;
263
+ expirationDate: string;
264
+ isActive: boolean;
265
+ premiumDnsSubscription: boolean;
266
+ };
267
+ dnsDetails: {
268
+ nameserver: Array<string>;
269
+ providerType: string;
270
+ isUsingOurDns: boolean;
271
+ hostCount: number;
272
+ emailType: string;
273
+ dynamicDnsStatus: boolean;
274
+ isFailover: boolean;
275
+ };
276
+ modificationrights: {
277
+ all: boolean;
278
+ };
279
+ status: string;
280
+ id: number;
281
+ domainName: string;
282
+ ownerName: string;
283
+ isOwner: boolean;
284
+ isPremium: boolean;
285
+ }
286
+
287
+ /**
288
+ * Represents a type that defines a set of standardized language codes.
289
+ * Each language code corresponds to a specific language or dialect typically defined
290
+ * by their internationally recognized abbreviations. These codes follow conventions used
291
+ * in software and internationalization frameworks for language identification.
292
+ */
293
+ type IdnCode = "afr" | "alb" | "ara" | "arg" | "arm" | "asm" | "ast" | "ave" | "awa" | "aze" | "bak" | "bal" | "ban" | "baq" | "bas" | "bel" | "ben" | "bho" | "bos" | "bul" | "bur" | "car" | "cat" | "che" | "chi" | "chv" | "cop" | "cos" | "cze" | "dan" | "div" | "doi" | "dut" | "eng" | "est" | "fao" | "fij" | "fin" | "fre" | "fry" | "geo" | "ger" | "gla" | "gle" | "gon" | "gre" | "guj" | "heb" | "hin" | "hun" | "inc" | "ind" | "inh" | "isl" | "ita" | "jav" | "jpn" | "kas" | "kaz" | "khm" | "kir" | "kor" | "kur" | "lao" | "lav" | "lit" | "ltz" | "mal" | "mkd" | "mlt" | "mol" | "mon" | "mri" | "msa" | "nep" | "nor" | "ori" | "oss" | "pan" | "per" | "pol" | "por" | "pus" | "raj" | "rum" | "rus" | "san" | "scr" | "sin" | "slo" | "slv" | "smo" | "snd" | "som" | "spa" | "srd" | "srp" | "swa" | "swe" | "syr" | "tam" | "tel" | "tgk" | "tha" | "tib" | "tur" | "ukr" | "urd" | "uzb" | "vie" | "wel" | "yid";
294
+ /**
295
+ * Represents a predefined type of list used for categorization or filtering.
296
+ *
297
+ * "ALL" - Represents all items in the list without any filtering.
298
+ * "EXPIRING" - Represents items that are nearing their expiration or due date.
299
+ * "EXPIRED" - Represents items that have already passed their expiration or due date.
300
+ */
301
+ type ListType$3 = "ALL" | "EXPIRING" | "EXPIRED";
302
+ /**
303
+ * SortBy represents the sorting options for a collection of items.
304
+ * Each option specifies an attribute to sort by and the sort order.
305
+ *
306
+ * - "NAME": Sort by name in ascending order.
307
+ * - "NAME_DESC": Sort by name in descending order.
308
+ * - "EXPIREDATE": Sort by expiration date in ascending order.
309
+ * - "EXPIREDATE_DESC": Sort by expiration date in descending order.
310
+ * - "CREATEDATE": Sort by creation date in ascending order.
311
+ * - "CREATEDATE_DESC": Sort by creation date in descending order.
312
+ */
313
+ type SortBy$2 = "NAME" | "NAME_DESC" | "EXPIREDATE" | "EXPIREDATE_DESC" | "CREATEDATE" | "CREATEDATE_DESC";
314
+ /**
315
+ * Represents the parameters for obtaining a list with optional filters and pagination.
316
+ *
317
+ * @interface GetListParams
318
+ *
319
+ * @property {ListType} [listType] The type of list to retrieve; optional.
320
+ * @property {string} [searchTerm] A search query to filter the list; optional.
321
+ * @property {number} [page] The page number for paginated results; optional.
322
+ * @property {number} [pageSize] The number of items per page for paginated results; optional.
323
+ * @property {SortBy} [sortBy] The sorting criteria for the list; optional.
324
+ */
325
+ interface GetListParams$1 {
326
+ listType?: ListType$3;
327
+ searchTerm?: string;
328
+ page?: number;
329
+ pageSize?: number;
330
+ sortBy?: SortBy$2;
331
+ }
332
+ /**
333
+ * Represents the details required to create a new domain registration.
334
+ *
335
+ * This interface extends the `Contacts` interface, inheriting contact information properties.
336
+ * It includes properties for specifying domain details, registration duration, billing information,
337
+ * and other settings or attributes related to the domain.
338
+ *
339
+ * Properties:
340
+ * - `domainName`: The name of the domain to be registered.
341
+ * - `years`: The number of years for which the domain will be registered.
342
+ * - `promoCode`: (Optional) A promotional code that might be applied during registration.
343
+ * - `billing`: (Optional) Billing contact details provided as a partial contact detail object.
344
+ * - `idnCode`: (Optional) Internationalized domain name code, if applicable.
345
+ * - `extendedAttributes`: Attributes extended for domain registration based on requirements.
346
+ * - `nameservers`: (Optional) Name servers assigned to the domain.
347
+ * - `addFreeWhoisguard`: (Optional) Specifies if free WHOIS Guard should be added.
348
+ * - `WGEnabled`: (Optional) Indicates if WHOIS Guard is enabled for the domain.
349
+ * - `isPremiumDomain`: (Optional) Denotes whether the domain is a premium domain.
350
+ * - `premiumPrice`: (Optional) The price of the premium domain, if applicable.
351
+ * - `eapPrice`: (Optional) Early access pricing for the domain, if in an early access phase.
352
+ */
353
+ interface CreateDomainParams extends Contacts {
354
+ domainName: string;
355
+ years: number;
356
+ promoCode?: string;
357
+ billing?: Partial<ContactDetail>;
358
+ idnCode?: IdnCode;
359
+ extendedAttributes: string;
360
+ nameservers?: string;
361
+ addFreeWhoisguard?: string;
362
+ WGEnabled?: string;
363
+ isPremiumDomain?: boolean;
364
+ premiumPrice?: number;
365
+ eapPrice?: number;
366
+ }
367
+ /**
368
+ * Represents a contact domain that extends the base Contacts interface.
369
+ * It includes additional attributes specific to domain-level contacts.
370
+ *
371
+ * @interface ContactDomainParams
372
+ * @extends Contacts
373
+ */
374
+ interface ContactDomainParams extends Contacts {
375
+ domainName: string;
376
+ extendedAttributes: string;
377
+ }
378
+ /**
379
+ * Represents the details required to reactivate a domain.
380
+ *
381
+ * @interface ReactivateDomainParams
382
+ * @property {string} domainName - The name of the domain to be reactivated.
383
+ * @property {string} [promotionCode] - Optional promotion code to be applied during reactivation.
384
+ * @property {number} [yearsToAdd] - Optional number of years to extend the domain registration upon reactivation.
385
+ * @property {boolean} [isPremiumDomain] - Indicates if the domain is a premium domain.
386
+ * @property {number} [premiumPrice] - The cost associated with reactivating a premium domain, if applicable.
387
+ */
388
+ interface ReactivateDomainParams {
389
+ domainName: string;
390
+ promotionCode?: string;
391
+ yearsToAdd?: number;
392
+ isPremiumDomain?: boolean;
393
+ premiumPrice?: number;
394
+ }
395
+ /**
396
+ * Represents the data required to renew a domain.
397
+ *
398
+ * @interface RenewDomainParams
399
+ *
400
+ * @property {string} domainName - The name of the domain to be renewed.
401
+ * @property {number} years - The number of years for which the domain should be renewed.
402
+ * @property {string} [promotionCode] - An optional promotional code to apply during renewal.
403
+ * @property {boolean} [isPremiumDomain] - Indicates if the domain is a premium domain.
404
+ * @property {number} [premiumPrice] - The price of the premium domain, if applicable.
405
+ */
406
+ interface RenewDomainParams {
407
+ domainName: string;
408
+ years: number;
409
+ promotionCode?: string;
410
+ isPremiumDomain?: boolean;
411
+ premiumPrice?: number;
412
+ }
413
+ /**
414
+ * Represents an action that can be performed to modify a lock state.
415
+ *
416
+ * The `LockAction` type can either be:
417
+ * - "LOCK": Represents an action to lock.
418
+ * - "UNLOCK": Represents an action to unlock.
419
+ */
420
+ type LockAction = "LOCK" | "UNLOCK";
421
+ /**
422
+ * Represents the structure required to set or manage a registrar lock for a domain.
423
+ * The registrar lock prevents unauthorized transfer or modification of the domain.
424
+ *
425
+ * @interface SetRegistrarLockParams
426
+ *
427
+ * @property {string} domainName - The fully qualified domain name (FQDN) to which the registrar lock action will be applied.
428
+ *
429
+ * @property {LockAction} lockAction - Specifies the action to be performed on the registrar lock, such as enabling or disabling it.
430
+ */
431
+ interface SetRegistrarLockParams {
432
+ domainName: string;
433
+ lockAction: LockAction;
434
+ }
435
+ /**
436
+ * Represents a structure to store information about a domain and its host.
437
+ *
438
+ * @interface GetInfoParams
439
+ * @property {string} domainName - The name of the domain.
440
+ * @property {string} [hostName] - The optional name of the host associated with the domain.
441
+ */
442
+ interface GetInfoParams {
443
+ domainName: string;
444
+ hostName?: string;
445
+ }
446
+
447
+ /**
448
+ * The `Domains` class provides methods to interact with domain-related functionalities
449
+ * using the Namecheap API. It allows performing operations such as retrieving domain lists,
450
+ * managing contacts, checking availability, and managing domain statuses.
451
+ */
452
+ declare class Domains {
453
+ private readonly config;
454
+ constructor(config: NamecheapProps);
455
+ /**
456
+ * Retrieves a list of domains or related items based on the specified parameters.
457
+ *
458
+ * @param {Object} params - The parameters to configure the list retrieval.
459
+ * @param {string} [params.listType="ALL"] - The type of list to retrieve (e.g., ALL, EXPIRING, etc.).
460
+ * @param {number} [params.page=1] - The page number of the results to retrieve.
461
+ * @param {number} [params.pageSize=20] - The number of items to retrieve per page.
462
+ * @return {Promise<NamecheapXMLParsedSuccess<GetListSuccess>>} A promise that resolves with the parsed response data.
463
+ */
464
+ getList(params?: GetListParams$1): Promise<{
465
+ data: Array<DomainGetListResult>;
466
+ paging: Paging;
467
+ }>;
468
+ /**
469
+ * Retrieves the contact information associated with the given domain name.
470
+ *
471
+ * @param {string} domainName - The domain name for which to retrieve contact information.
472
+ * @return {Promise<NamecheapXMLParsedSuccess<GetContactSuccess>>} A promise that resolves with the parsed response containing the contact details.
473
+ */
474
+ getContacts(domainName: string): Promise<DomainContactsResult>;
475
+ /**
476
+ * Creates a new domain registration with the provided parameters.
477
+ *
478
+ * @param {string} domain - The domain name to be created.
479
+ * @param {Omit<CreateDomainParams, "domainName">} params - The parameters required for domain creation, excluding the domain name.
480
+ * @return {Promise<NamecheapXMLParsedSuccess<CreateSuccess>>} A promise that resolves with the result of the domain creation process.
481
+ */
482
+ create(domain: string, params: Omit<CreateDomainParams, "domainName">): Promise<DomainCreateResult>;
483
+ /**
484
+ * Retrieves the list of top-level domains (TLDs) available from the Namecheap API.
485
+ *
486
+ * @return {Promise<NamecheapXMLParsedSuccess<GetTldListSuccess>>} A promise that resolves with the structured response data containing the details of available TLDs.
487
+ */
488
+ getTldList(): Promise<Array<TLD>>;
489
+ /**
490
+ * Updates the contact details for a specific domain.
491
+ *
492
+ * @param {string} domain - The domain name for which the contact information will be updated.
493
+ * @param {Omit<ContactDomainParams, "domainName">} params - The contact information to set, omitting the domain name property.
494
+ * @return {Promise<NamecheapXMLParsedSuccess<SetContactSuccess>>} A promise that resolves to the result of the contact update operation.
495
+ */
496
+ setContacts(domain: string, params: Omit<ContactDomainParams, "domainName">): Promise<string>;
497
+ /**
498
+ * Checks the availability of the given list of domains.
499
+ *
500
+ * @param {Array<string>} domains - An array of domain names to check for availability.
501
+ * @return {Promise<NamecheapXMLParsedSuccess<CheckSuccess>>} A promise that resolves to the parsed response indicating the availability status of each domain.
502
+ */
503
+ check(domains: Array<string>): Promise<DomainCheckResult>;
504
+ /**
505
+ * Reactivates a previously expired or deactivated domain.
506
+ *
507
+ * @param {string} domain - The name of the domain to be reactivated.
508
+ * @param {Omit<ReactivateDomainParams, "domainName">} [params={}] - Additional parameters for reactivation, excluding the domain name.
509
+ * @return {Promise<NamecheapXMLParsedSuccess<ReactiveSuccess>>} A promise that resolves with the result of the domain reactivation.
510
+ */
511
+ reactivate(domain: string, params?: Omit<ReactivateDomainParams, "domainName">): Promise<DomainReactivateResult>;
512
+ /**
513
+ * Renews the registration of a domain name with the specified parameters.
514
+ *
515
+ * @param {string} domain - The domain name to be renewed.
516
+ * @param {Omit<RenewDomainParams, "domainName">} params - The parameters required for renewing the domain, excluding the domain name.
517
+ * @return {Promise<NamecheapXMLParsedSuccess<RenewSuccess>>} A promise that resolves with the parsed response data indicating the success of the renewal.
518
+ */
519
+ renew(domain: string, params: Omit<RenewDomainParams, "domainName">): Promise<DomainRenewResult>;
520
+ /**
521
+ * Retrieves the registrar lock status of the specified domain.
522
+ *
523
+ * @param {string} domain - The domain name for which the registrar lock status is being retrieved.
524
+ * @return {Promise<NamecheapXMLParsedSuccess<GetRegistrarLockSuccess>>} A promise that resolves to the parsed success response containing the registrar lock status.
525
+ */
526
+ getRegistrarLock(domain: string): Promise<DomainGetRegistrarLockResult>;
527
+ /**
528
+ * Sets the registrar lock status for a specified domain.
529
+ *
530
+ * @param {string} domain - The domain name for which the registrar lock status is being set.
531
+ * @param {Object} params - Additional configuration options for the registrar lock action.
532
+ * Defaults to `{ lockAction: "LOCK" }`. Excludes the "domainName" property.
533
+ * @return {Promise<NamecheapXMLParsedSuccess<SetRegistrarLockSuccess>>} A promise that resolves with the parsed response
534
+ * indicating the success or failure of the operation.
535
+ */
536
+ setRegistrarLock(domain: string, params?: Omit<SetRegistrarLockParams, "domainName">): Promise<DomainSetRegistrarLockResult>;
537
+ /**
538
+ * Retrieves information about a specific domain.
539
+ *
540
+ * @param {string} domain - The domain name for which information is to be retrieved.
541
+ * @param {Omit<GetInfoParams, "domainName">} [params={}] - Additional parameters for the request, excluding the domain name.
542
+ * @return {Promise<NamecheapXMLParsedSuccess<GetInfoSuccess>>} A promise that resolves to the parsed response containing domain information.
543
+ */
544
+ getInfo(domain: string, params?: Omit<GetInfoParams, "domainName">): Promise<DomainGetInfoResult>;
545
+ }
546
+
547
+ interface DomainDnsGetListResult {
548
+ nameserver: Array<string>;
549
+ domain: string;
550
+ isUsingOurDns: boolean;
551
+ }
552
+ interface Host$1 {
553
+ hostId: number;
554
+ name: string;
555
+ type: string;
556
+ address: string;
557
+ mxPref: number;
558
+ ttl: number;
559
+ }
560
+ interface DomainDnsGetHostsResult {
561
+ host: Array<Host$1>;
562
+ domain: string;
563
+ isUsingOurDns: boolean;
564
+ }
565
+ interface Forward {
566
+ value: string;
567
+ mailbox: string;
568
+ }
569
+ interface DomainDnsGetEmailForwardingResult {
570
+ forward: Array<Forward>;
571
+ domain: string;
572
+ }
573
+
574
+ interface SetDNSEmailForwardingParams {
575
+ domainName: string;
576
+ MailBox: Array<string>;
577
+ ForwardTo: Array<string>;
578
+ }
579
+ declare enum RecordType {
580
+ A = "A",
581
+ AAAA = "AAAA",
582
+ ALIAS = "ALIAS",
583
+ CAA = "CAA",
584
+ CNAME = "CNAME",
585
+ MX = "MX",
586
+ MXE = "MXE",
587
+ NS = "NS",
588
+ TXT = "TXT",
589
+ URL = "URL",
590
+ URL301 = "URL301",
591
+ FRAME = "FRAME"
592
+ }
593
+ declare enum EmailType {
594
+ MXE = "MXE",
595
+ MX = "MX",
596
+ FWD = "FWD",
597
+ OX = "OX"
598
+ }
599
+ interface Host {
600
+ hostname: string;
601
+ recordType: RecordType;
602
+ address: string;
603
+ mxpref?: string;
604
+ ttl?: number;
605
+ }
606
+ interface SetDNSHostsParams {
607
+ sld: string;
608
+ tld: string;
609
+ emailType?: EmailType;
610
+ flag?: number;
611
+ tag?: string;
612
+ hostname: Array<string>;
613
+ ttl: Array<number>;
614
+ address: Array<string>;
615
+ mxpref: Array<string>;
616
+ recordType: Array<RecordType>;
617
+ }
618
+
619
+ declare class DomainsDNS {
620
+ private readonly config;
621
+ constructor(config: NamecheapProps);
622
+ setDefault(sld: string, tld: string): Promise<string>;
623
+ setCustom(sld: string, tld: string, nameservers: Array<string>): Promise<string>;
624
+ getList(sld: string, tld: string): Promise<DomainDnsGetListResult>;
625
+ getHosts(sld: string, tld: string): Promise<DomainDnsGetHostsResult>;
626
+ getEmailForwarding(domain: string): Promise<DomainDnsGetEmailForwardingResult>;
627
+ setEmailForwarding(domain: string, params: Omit<SetDNSEmailForwardingParams, "domainName">): Promise<string>;
628
+ setHosts(sld: string, tld: string, params: Omit<SetDNSHostsParams, "sld" | "tld"> & {
629
+ hosts: Array<Host>;
630
+ }): Promise<string>;
631
+ }
632
+
633
+ interface GenericDomain {
634
+ domain: string;
635
+ nameserver: string;
636
+ }
637
+ interface DomainNsCreateResult extends GenericDomain {
638
+ ip: string;
639
+ isSuccess: boolean;
640
+ }
641
+ interface DomainNsDeleteResult extends GenericDomain {
642
+ isSuccess: boolean;
643
+ }
644
+ interface DomainNsInfoResult extends GenericDomain {
645
+ nameserverStatuses: Array<string>;
646
+ }
647
+ interface DomainNsUpdateResult {
648
+ domain: string;
649
+ nameserverStatuses: Array<string>;
650
+ isSuccess: boolean;
651
+ }
652
+
653
+ declare class DomainsNS {
654
+ private readonly config;
655
+ constructor(config: NamecheapProps);
656
+ create(sld: string, tld: string, nameserver: string, ip: string): Promise<DomainNsCreateResult>;
657
+ delete(sld: string, tld: string, nameserver: string): Promise<DomainNsDeleteResult>;
658
+ getInfo(sld: string, tld: string, nameserver: string): Promise<DomainNsInfoResult>;
659
+ update(sld: string, tld: string, nameserver: string, ip: string, oldIp: string): Promise<DomainNsUpdateResult>;
660
+ }
661
+
662
+ declare enum ListType$2 {
663
+ ALL = "ALL",
664
+ InProgress = "INPROGRESS",
665
+ Cancelled = "CANCELLED",
666
+ Completed = "COMPLETED"
667
+ }
668
+ declare enum SortBy$1 {
669
+ DomainName = "DOMAINNAME",
670
+ DomainNameDesc = "DOMAINNAME_DESC",
671
+ TransferDate = "TRANSFERDATE",
672
+ TransferDateDesc = "TRANSFERDATE_DESC",
673
+ StatusDate = "STATUSDATE",
674
+ StatusDateDesc = "STATUSDATE_DESC"
675
+ }
676
+ interface CreateTransferParams {
677
+ domainName: string;
678
+ years: number;
679
+ eppCode: string;
680
+ promotionCode: string;
681
+ addFreeWhoisGuard: boolean;
682
+ wGenable: boolean;
683
+ }
684
+ interface GetListTransferParams {
685
+ listType?: ListType$2;
686
+ searchTerm?: string;
687
+ page?: number;
688
+ pageSize?: number;
689
+ sortBy?: SortBy$1;
690
+ }
691
+
692
+ interface DomainTransferCreateResult {
693
+ domainname: string;
694
+ transfer: boolean;
695
+ transferId: number;
696
+ statusId: number;
697
+ orderId: number;
698
+ transactionId: number;
699
+ chargedAmount: number;
700
+ statusCode: number;
701
+ }
702
+ interface DomainTransferGetStatusResult {
703
+ transferId: number;
704
+ status: string;
705
+ statusId: number;
706
+ }
707
+ interface TransferGetResult {
708
+ id: number;
709
+ domainname: string;
710
+ user: string;
711
+ transferDate: string;
712
+ orderId: number;
713
+ statusId: number;
714
+ status: string;
715
+ statusDate: string;
716
+ statusDescription: string;
717
+ }
718
+
719
+ declare class DomainsTransfer {
720
+ private readonly config;
721
+ constructor(config: NamecheapProps);
722
+ create(domain: string, params: Omit<CreateTransferParams, "domainName">): Promise<DomainTransferCreateResult>;
723
+ getStatus(id: number): Promise<DomainTransferGetStatusResult>;
724
+ updateStatus(id: number, resubmit: boolean): Promise<number>;
725
+ getList(params?: GetListTransferParams): Promise<{
726
+ data: Array<TransferGetResult>;
727
+ paging: Paging;
728
+ }>;
729
+ }
730
+
731
+ declare enum SSLType {
732
+ PositiveSSL = "PositiveSSL",
733
+ EssentialSSL = "EssentialSSL",
734
+ InstantSSL = "InstantSSL",
735
+ InstantSSLPro = "InstantSSL Pro",
736
+ PremiumSSL = "PremiumSSL",
737
+ EVSSL = "EV SSL",
738
+ PositiveSSLWildcard = "PositiveSSL Wildcard",
739
+ EssentialSSLWildcard = "EssentialSSL Wildcard",
740
+ PremiumSSLWildcard = "PremiumSSL Wildcard",
741
+ PositiveSSLMultiDomain = "PositiveSSL Multi Domain",
742
+ MultiDomainSSL = "Multi Domain SSL",
743
+ UnifiedCommunications = "Unified Communications",
744
+ EVMultiDomainSSL = "EV Multi Domain SSL"
745
+ }
746
+ interface CreateSSLParams {
747
+ year: 1 | 2 | 3 | 4 | 5;
748
+ type: SSLType;
749
+ sansToADD?: number;
750
+ promotionCode?: string;
751
+ }
752
+ declare enum ListType$1 {
753
+ ALL = "ALL",
754
+ Processing = "Processing",
755
+ EmailSent = "EmailSent",
756
+ TechnicalProblem = "TechnicalProblem",
757
+ InProgress = "InProgress",
758
+ Completed = "Completed",
759
+ Deactivated = "Deactivated",
760
+ Active = "Active",
761
+ Cancelled = "Cancelled",
762
+ NewPurchase = "NewPurchase",
763
+ NewRenewal = "NewRenewal"
764
+ }
765
+ declare enum SortBy {
766
+ PurchaseDate = "PURCHASEDATE",
767
+ PurchaseDateDesc = "PURCHASEDATE_DESC",
768
+ SSLType = "SSLTYPE",
769
+ SSLTypeDesc = "SSLTYPE_DESC",
770
+ ExpireDateTime = "EXPIREDATETIME",
771
+ ExpireDateTimeDesc = "EXPIREDATETIME_DESC",
772
+ Hostname = "Host_Name",
773
+ HostnameDesc = "Host_Name_DESC"
774
+ }
775
+ interface GetListSSLParams {
776
+ listType?: ListType$1;
777
+ searchTerm?: string;
778
+ page?: number;
779
+ pageSize?: number;
780
+ sortBy?: SortBy;
781
+ }
782
+ interface ActivateSSLCommonParams {
783
+ certificateId: number;
784
+ csr: string;
785
+ adminEmailAddress: string;
786
+ webServerType?: string;
787
+ uniqueValue?: string;
788
+ }
789
+ interface SSLDCVParams extends ActivateSSLCommonParams {
790
+ approverEmail?: string;
791
+ HTTPDCValidation?: boolean;
792
+ DNSDCValidation?: boolean;
793
+ }
794
+ interface SSLMultiDomainParams extends ActivateSSLCommonParams {
795
+ DNSNames?: string;
796
+ DNSApproverEmails?: string;
797
+ }
798
+ interface SSLOVAndEVParams extends ActivateSSLCommonParams {
799
+ adminOrganizationName?: string;
800
+ organizationDepartment?: string;
801
+ DNSNames?: string;
802
+ DNSApproverEmails?: string;
803
+ adminCountry?: string;
804
+ adminStateProvince?: string;
805
+ adminCity?: string;
806
+ adminAddress1?: string;
807
+ adminAddress2?: string;
808
+ adminPostalCode?: string;
809
+ adminPhone?: string;
810
+ organizationDUNS?: string;
811
+ }
812
+ interface SSLEVParams extends ActivateSSLCommonParams {
813
+ companyIncorporationCountry: string;
814
+ companyIncorporationStateProvince?: string;
815
+ companyIncorporationLocality?: string;
816
+ companyIncorporationDate?: string;
817
+ companyDBA?: string;
818
+ companyRegistrationNumber?: string;
819
+ }
820
+ interface SSLOVParams extends ActivateSSLCommonParams {
821
+ organizationRepFirstName?: string;
822
+ organizationRepLastName?: string;
823
+ organizationRepTitle?: string;
824
+ organizationRepPhone?: string;
825
+ organizationRepEmailAddress?: string;
826
+ }
827
+ type SSLParams = SSLDCVParams | SSLMultiDomainParams | SSLOVAndEVParams | SSLEVParams | SSLOVParams;
828
+ type ActivateSSLParams = SSLParams;
829
+ type ReissueSSLParams = SSLParams;
830
+ interface RenewSSLParams {
831
+ certificateId: number;
832
+ years: number;
833
+ sslType: SSLType;
834
+ promotionCode?: string;
835
+ }
836
+ interface EditDCVMethodParams {
837
+ certificateId: number;
838
+ DCVMethod: string;
839
+ DNSNames: string;
840
+ DCVMethods: string;
841
+ }
842
+
843
+ interface SSLCertificate {
844
+ certificateId: number;
845
+ created: string;
846
+ sslType: string;
847
+ years: number;
848
+ status: string;
849
+ }
850
+ interface SSLCreateResult {
851
+ sslCertificate: SSLCertificate;
852
+ isSuccess: boolean;
853
+ orderId: number;
854
+ transactionId: number;
855
+ chargedAmount: number;
856
+ }
857
+ interface SSLResult {
858
+ certificateId: number;
859
+ hostName: string;
860
+ sslType: string;
861
+ purchaseDate: string;
862
+ expireDate: string;
863
+ activationExpireDate: string;
864
+ isExpiredYn: boolean;
865
+ status: string;
866
+ }
867
+ interface SSLParseCsrResult {
868
+ commonName: string;
869
+ domainName: string;
870
+ country: string;
871
+ organisationUnit: string;
872
+ organisation: string;
873
+ validTrueDomain: boolean;
874
+ state: string;
875
+ locality: string;
876
+ email: string;
877
+ dnsNames: string;
878
+ csrDetails: boolean;
879
+ }
880
+ interface GetApproverEmailListResult {
881
+ domainemails: string;
882
+ genericemails: Array<string>;
883
+ domain: string;
884
+ }
885
+ interface SSLActivateResult {
886
+ httpDcValidation: {
887
+ fileName: string;
888
+ fileContent: string;
889
+ domain: string;
890
+ };
891
+ dnsdcValidation: {
892
+ hostName: string;
893
+ target: string;
894
+ domain: string;
895
+ };
896
+ id: number;
897
+ isSuccess: boolean;
898
+ }
899
+ interface SSLGetInfoResult {
900
+ certificateDetails: {
901
+ csr: string;
902
+ approverEmail: string;
903
+ commonName: string;
904
+ administratorName: string;
905
+ administratorEmail: string;
906
+ certificates: {
907
+ certificate: string;
908
+ caCertificates: Array<{
909
+ certificate: string;
910
+ type: string;
911
+ }>;
912
+ certificateReturned: boolean;
913
+ returnType: string;
914
+ };
915
+ certificateDetails: boolean;
916
+ };
917
+ provider: {
918
+ orderId: number;
919
+ name: string;
920
+ provider: boolean;
921
+ };
922
+ status: string;
923
+ statusDescription: string;
924
+ type: string;
925
+ issuedOn: string;
926
+ expires: string;
927
+ orderId: number;
928
+ replacedBy: number;
929
+ sansCount: number;
930
+ }
931
+ interface SSLRenewResult {
932
+ certificateId: number;
933
+ sslType: string;
934
+ years: number;
935
+ orderId: number;
936
+ transactionId: number;
937
+ chargedAmount: number;
938
+ }
939
+ interface SSLPurchaseMoreSansResult {
940
+ sslCertificate: {
941
+ certificateId: number;
942
+ sslType: string;
943
+ years: number;
944
+ status: string;
945
+ sansCount: number;
946
+ };
947
+ isSuccess: boolean;
948
+ orderId: number;
949
+ transactionId: number;
950
+ chargedAmount: number;
951
+ }
952
+ interface SSLEditDcvMethodResult {
953
+ httpDcValidation: {
954
+ fileName: string;
955
+ fileContent: string;
956
+ valueAvailable: boolean;
957
+ };
958
+ dnsdcValidation: {
959
+ hostName: string;
960
+ target: string;
961
+ valueAvailable: boolean;
962
+ };
963
+ domains: {
964
+ domains: boolean;
965
+ };
966
+ id: number;
967
+ isSuccess: boolean;
968
+ }
969
+
970
+ declare class SSL {
971
+ private readonly config;
972
+ constructor(config: NamecheapProps);
973
+ create(params: CreateSSLParams): Promise<SSLCreateResult>;
974
+ getList(params: GetListSSLParams): Promise<Array<SSLResult>>;
975
+ parseCSR(csr: string, certificateType?: SSLType): Promise<SSLParseCsrResult>;
976
+ getApproverEmailList(domainName: string, certificateType?: SSLType): Promise<GetApproverEmailListResult>;
977
+ activate(certificateId: number, params: Omit<ActivateSSLParams, "certificateId">): Promise<SSLActivateResult>;
978
+ resendApproverEmail(certificateId: number): Promise<number>;
979
+ getInfo(certificateId: number): Promise<SSLGetInfoResult>;
980
+ renew(certificateId: number, params: Omit<RenewSSLParams, "certificateId">): Promise<SSLRenewResult>;
981
+ reissue(certificateId: number, params: Omit<ReissueSSLParams, "certificateId">): Promise<SSLActivateResult>;
982
+ resendFulfillmentEmail(certificateId: number): Promise<number>;
983
+ purchaseMoreSANS(certificateId: number, numberOfSANSToAdd: number): Promise<SSLPurchaseMoreSansResult>;
984
+ revokeCertificate(certificateId: number, certificateType: SSLType): Promise<number>;
985
+ editDCVMethod(certificateId: number, params: Omit<EditDCVMethodParams, "certificateId">): Promise<SSLEditDcvMethodResult>;
986
+ }
987
+
988
+ declare enum ProductType {
989
+ Domain = "DOMAIN",
990
+ SslCertificate = "SSLCERTIFICATE"
991
+ }
992
+ declare enum ProductCategory$1 {
993
+ Domains = "DOMAINS",
994
+ Comodo = "COMODO"
995
+ }
996
+ declare enum ActionName {
997
+ Register = "REGISTER",
998
+ Renew = "RENEW",
999
+ Reactivate = "REACTIVATE",
1000
+ Transfer = "TRANSFER",
1001
+ Purchase = "PURCHASE"
1002
+ }
1003
+ declare enum ProductName {
1004
+ COM = "COM",
1005
+ InstantSsl = "INSTANTSSL"
1006
+ }
1007
+ interface GetPricingUserParams {
1008
+ productType: ProductType;
1009
+ productCategory?: ProductCategory$1;
1010
+ promotionCode?: string;
1011
+ actionName?: ActionName;
1012
+ productName?: ProductName;
1013
+ }
1014
+ interface UpdateParams {
1015
+ firstName: string;
1016
+ lastName: string;
1017
+ jobTitle?: string;
1018
+ organization?: string;
1019
+ address1: string;
1020
+ address2?: string;
1021
+ city: string;
1022
+ stateProvince: string;
1023
+ zip: string;
1024
+ country: string;
1025
+ emailAddress: string;
1026
+ phone: string;
1027
+ phoneExt?: string;
1028
+ fax?: string;
1029
+ }
1030
+ type PaymentType = "Creditcard";
1031
+ interface CreateAddFundsRequestParams {
1032
+ username: string;
1033
+ paymentType: PaymentType;
1034
+ amount: number;
1035
+ returnUrl: string;
1036
+ }
1037
+ interface CreateUserParams {
1038
+ newUserName: string;
1039
+ newUserPassword: string;
1040
+ emailAddress: string;
1041
+ ignoreDuplicateEmailAddress?: string;
1042
+ firstName: string;
1043
+ lastName: string;
1044
+ acceptTerms: number;
1045
+ acceptNews?: number;
1046
+ jobTitle?: string;
1047
+ organization?: string;
1048
+ address1: string;
1049
+ address2?: string;
1050
+ city: string;
1051
+ stateProvince: string;
1052
+ zip: string;
1053
+ country: string;
1054
+ phone: string;
1055
+ phoneExt?: string;
1056
+ fax?: string;
1057
+ }
1058
+ declare enum FindBy {
1059
+ EmailAddress = "EMAILADDRESS",
1060
+ DomainName = "DOMAINNAME",
1061
+ Username = "USERNAME"
1062
+ }
1063
+ interface ResetPasswordParams {
1064
+ findBy: FindBy;
1065
+ findByValue: string;
1066
+ emailFromName?: string;
1067
+ emailFrom?: string;
1068
+ urlPattern?: string;
1069
+ }
1070
+
1071
+ interface Product {
1072
+ duration: number;
1073
+ durationType: string;
1074
+ price: number;
1075
+ regularPrice: number;
1076
+ yourPrice: number;
1077
+ currency: string;
1078
+ }
1079
+ interface ProductCategory {
1080
+ product: Array<Product>;
1081
+ name: string;
1082
+ }
1083
+ interface UserGetPricingResult {
1084
+ productCategory: Array<ProductCategory>;
1085
+ name: string;
1086
+ }
1087
+ interface UserGetBalancesResult {
1088
+ currency: string;
1089
+ availableBalance: number;
1090
+ accountBalance: number;
1091
+ earnedAmount: number;
1092
+ withdrawableAmount: number;
1093
+ fundsRequiredForAutoRenew: number;
1094
+ }
1095
+ interface UserCreateAddFundsRequest {
1096
+ tokenId: string;
1097
+ returnUrl: string;
1098
+ redirectUrl: string;
1099
+ }
1100
+ declare enum GetAddFundsStatus {
1101
+ Created = "CREATED",
1102
+ Submitted = "SUBMITTED",
1103
+ Completed = "COMPLETED",
1104
+ Failed = "FAILED",
1105
+ Expired = "EXPIRED"
1106
+ }
1107
+ interface GetAddFundsStatusResult {
1108
+ transactionId: number;
1109
+ amount: number;
1110
+ status: GetAddFundsStatus;
1111
+ }
1112
+
1113
+ declare class Users {
1114
+ private readonly config;
1115
+ constructor(config: NamecheapProps);
1116
+ getPricing(params: GetPricingUserParams): Promise<UserGetPricingResult>;
1117
+ getBalances(): Promise<UserGetBalancesResult>;
1118
+ changePassword(oldPassword: string, newPassword: string): Promise<string>;
1119
+ update(params: UpdateParams): Promise<string>;
1120
+ createAddFundsRequest(username: string, params: Omit<CreateAddFundsRequestParams, "username">): Promise<UserCreateAddFundsRequest>;
1121
+ getAddFundsStatus(tokenId: string): Promise<GetAddFundsStatusResult>;
1122
+ create(param: CreateUserParams): Promise<number>;
1123
+ login(password: string): Promise<string>;
1124
+ resetPassword(params: ResetPasswordParams): Promise<string>;
1125
+ }
1126
+
1127
+ interface AddressCreateResult {
1128
+ success: boolean;
1129
+ addressId: number;
1130
+ addressName: string;
1131
+ }
1132
+ interface AddressDeleteResult {
1133
+ success: boolean;
1134
+ profileId: number;
1135
+ userName: string;
1136
+ }
1137
+ interface GetAddressInfoResult {
1138
+ addressId: number;
1139
+ userName: string;
1140
+ addressName: string;
1141
+ defaultYn: boolean;
1142
+ firstName: string;
1143
+ lastName: string;
1144
+ jobTitle: string;
1145
+ organization: string;
1146
+ address1: string;
1147
+ address2: string;
1148
+ city: string;
1149
+ stateProvince: string;
1150
+ stateProvinceChoice: string;
1151
+ zip: number;
1152
+ country: string;
1153
+ phone: number;
1154
+ fax: number;
1155
+ phoneExt: number;
1156
+ emailAddress: string;
1157
+ getAddressInfoResult: boolean;
1158
+ }
1159
+ interface AddressGetListResult {
1160
+ addressId: number;
1161
+ addressName: string;
1162
+ }
1163
+ interface AddressUpdateResult {
1164
+ success: boolean;
1165
+ addressId: number;
1166
+ addressName: string;
1167
+ }
1168
+
1169
+ interface CreateUserAddressParams {
1170
+ addressName: string;
1171
+ defaultYN?: number;
1172
+ emailAddress: string;
1173
+ firstName: string;
1174
+ lastName: string;
1175
+ jobTitle?: string;
1176
+ organization?: string;
1177
+ address1: string;
1178
+ address2?: string;
1179
+ city: string;
1180
+ stateProvince: string;
1181
+ stateProvinceChoice: string;
1182
+ zip: string;
1183
+ country: string;
1184
+ phone: string;
1185
+ phoneExt?: string;
1186
+ fax?: string;
1187
+ }
1188
+ interface UpdateUserAddressParams extends CreateUserAddressParams {
1189
+ addressId: number;
1190
+ }
1191
+
1192
+ declare class UsersAddress {
1193
+ private readonly config;
1194
+ constructor(config: NamecheapProps);
1195
+ create(param: CreateUserAddressParams): Promise<AddressCreateResult>;
1196
+ delete(addressId: number): Promise<AddressDeleteResult>;
1197
+ getInfo(addressId: number): Promise<GetAddressInfoResult>;
1198
+ getList(): Promise<AddressGetListResult>;
1199
+ setDefault(addressId: number): Promise<number>;
1200
+ update(addressId: number, params: Omit<UpdateUserAddressParams, "addressId">): Promise<AddressUpdateResult>;
1201
+ }
1202
+
1203
+ interface WhoIsGuardChangeEmailAddressResult {
1204
+ id: number;
1205
+ isSuccess: boolean;
1206
+ wgEmail: string;
1207
+ wgOldEmail: string;
1208
+ }
1209
+ interface WhoIsGuardGetListResult {
1210
+ id: number;
1211
+ created: string;
1212
+ expires: string;
1213
+ status: string;
1214
+ }
1215
+ interface WhoIsGuardRenewResult {
1216
+ whoisguardId: number;
1217
+ years: number;
1218
+ renew: boolean;
1219
+ orderId: number;
1220
+ transactionId: number;
1221
+ chargedAmount: number;
1222
+ }
1223
+
1224
+ declare enum ListType {
1225
+ All = "ALL",
1226
+ Alloted = "ALLOTED",
1227
+ Free = "FREE",
1228
+ Discard = "DISCARD"
1229
+ }
1230
+ interface GetListParams {
1231
+ listType?: ListType;
1232
+ page?: number;
1233
+ pageSize?: number;
1234
+ }
1235
+
1236
+ declare class WhoIsGuard {
1237
+ private readonly config;
1238
+ constructor(config: NamecheapProps);
1239
+ changeEmailAddress(whoIsGuardId: number): Promise<WhoIsGuardChangeEmailAddressResult>;
1240
+ enable(whoIsGuardId: number, forwardedToEmail: string): Promise<string>;
1241
+ disable(whoIsGuardId: number): Promise<string>;
1242
+ getList(param: GetListParams): Promise<{
1243
+ data: Array<WhoIsGuardGetListResult>;
1244
+ paging: Paging;
1245
+ }>;
1246
+ renew(whoIsGuardId: string, year: number, promotionCode?: number): Promise<WhoIsGuardRenewResult>;
1247
+ }
1248
+
1249
+ declare class Namecheap {
1250
+ private readonly apiUrl;
1251
+ private readonly apiUser;
1252
+ private readonly apiKey;
1253
+ private readonly username;
1254
+ private readonly clientIp;
1255
+ readonly domains: Domains;
1256
+ readonly domainsDns: DomainsDNS;
1257
+ readonly domainsNs: DomainsNS;
1258
+ readonly domainsTransfer: DomainsTransfer;
1259
+ readonly ssl: SSL;
1260
+ readonly users: Users;
1261
+ readonly usersAddress: UsersAddress;
1262
+ readonly whoIsGuard: WhoIsGuard;
1263
+ get domainPrivacy(): WhoIsGuard;
1264
+ constructor(config: ConfigType);
1265
+ private getConfig;
1266
+ }
1267
+
1268
+ export { Namecheap as default };