@fwgapps/namecheap 0.2.0 → 0.3.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/dist/index.d.cts CHANGED
@@ -1,14 +1,3 @@
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
1
  interface ConfigType {
13
2
  apiUser: string;
14
3
  apiKey: string;
@@ -16,19 +5,6 @@ interface ConfigType {
16
5
  sandbox: boolean;
17
6
  username?: string;
18
7
  }
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
8
  interface NamecheapProps {
33
9
  apiUser: string;
34
10
  apiKey: string;
@@ -37,15 +13,6 @@ interface NamecheapProps {
37
13
  username: string;
38
14
  }
39
15
 
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
16
  interface Paging {
50
17
  totalItem: number;
51
18
  currentPage: number;
@@ -66,45 +33,12 @@ interface DomainGetListResult {
66
33
  isPremium: boolean;
67
34
  isOurDns: boolean;
68
35
  }
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
36
  interface Contacts {
79
37
  registrant: ContactDetail;
80
38
  tech: ContactDetail;
81
39
  admin: ContactDetail;
82
40
  auxBilling: ContactDetail;
83
41
  }
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
42
  interface ContactDetail {
109
43
  organizationName: string;
110
44
  jobTitle: string;
@@ -123,14 +57,6 @@ interface ContactDetail {
123
57
  phoneExt: number;
124
58
  readOnly: boolean;
125
59
  }
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
60
  interface CurrentAttributes {
135
61
  registrantNexus: string;
136
62
  registrantPurpose: string;
@@ -153,13 +79,6 @@ interface DomainCreateResult {
153
79
  whoisguardEnable: boolean;
154
80
  nonRealTimeDomain: boolean;
155
81
  }
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
82
  interface Category {
164
83
  name: string;
165
84
  sequenceNumber: number;
@@ -284,72 +203,276 @@ interface DomainGetInfoResult {
284
203
  isPremium: boolean;
285
204
  }
286
205
 
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
- */
206
+ declare const RecordType: {
207
+ readonly A: "A";
208
+ readonly AAAA: "AAAA";
209
+ readonly ALIAS: "ALIAS";
210
+ readonly CAA: "CAA";
211
+ readonly CNAME: "CNAME";
212
+ readonly MX: "MX";
213
+ readonly MXE: "MXE";
214
+ readonly NS: "NS";
215
+ readonly TXT: "TXT";
216
+ readonly URL: "URL";
217
+ readonly URL301: "URL301";
218
+ readonly FRAME: "FRAME";
219
+ };
220
+ type RecordType = (typeof RecordType)[keyof typeof RecordType];
221
+ declare const EmailType: {
222
+ readonly MXE: "MXE";
223
+ readonly MX: "MX";
224
+ readonly FWD: "FWD";
225
+ readonly OX: "OX";
226
+ };
227
+ type EmailType = (typeof EmailType)[keyof typeof EmailType];
228
+ declare const LockAction: {
229
+ readonly Lock: "LOCK";
230
+ readonly Unlock: "UNLOCK";
231
+ };
232
+ type LockAction = (typeof LockAction)[keyof typeof LockAction];
233
+ declare const DomainListType: {
234
+ readonly All: "ALL";
235
+ readonly Expiring: "EXPIRING";
236
+ readonly Expired: "EXPIRED";
237
+ };
238
+ type DomainListType = (typeof DomainListType)[keyof typeof DomainListType];
239
+ declare const DomainListSortBy: {
240
+ readonly NameAsc: "NAME";
241
+ readonly NameDesc: "NAME_DESC";
242
+ readonly ExpireDateAsc: "EXPIREDATE";
243
+ readonly ExpireDateDesc: "EXPIREDATE_DESC";
244
+ readonly CreateDateAsc: "CREATEDATE";
245
+ readonly CreateDateDesc: "CREATEDATE_DESC";
246
+ };
247
+ type DomainListSortBy = (typeof DomainListSortBy)[keyof typeof DomainListSortBy];
248
+ declare const IdnCode: {
249
+ readonly AFR: "afr";
250
+ readonly ALB: "alb";
251
+ readonly ARA: "ara";
252
+ readonly ARG: "arg";
253
+ readonly ARM: "arm";
254
+ readonly ASM: "asm";
255
+ readonly AST: "ast";
256
+ readonly AVE: "ave";
257
+ readonly AWA: "awa";
258
+ readonly AZE: "aze";
259
+ readonly BAK: "bak";
260
+ readonly BAL: "bal";
261
+ readonly BAN: "ban";
262
+ readonly BAQ: "baq";
263
+ readonly BAS: "bas";
264
+ readonly BEL: "bel";
265
+ readonly BEN: "ben";
266
+ readonly BHO: "bho";
267
+ readonly BOS: "bos";
268
+ readonly BUL: "bul";
269
+ readonly BUR: "bur";
270
+ readonly CAR: "car";
271
+ readonly CAT: "cat";
272
+ readonly CHE: "che";
273
+ readonly CHI: "chi";
274
+ readonly CHV: "chv";
275
+ readonly COP: "cop";
276
+ readonly COS: "cos";
277
+ readonly CZE: "cze";
278
+ readonly DAN: "dan";
279
+ readonly DIV: "div";
280
+ readonly DOI: "doi";
281
+ readonly DUT: "dut";
282
+ readonly ENG: "eng";
283
+ readonly EST: "est";
284
+ readonly FAO: "fao";
285
+ readonly FIJ: "fij";
286
+ readonly FIN: "fin";
287
+ readonly FRE: "fre";
288
+ readonly FRY: "fry";
289
+ readonly GEO: "geo";
290
+ readonly GER: "ger";
291
+ readonly GLA: "gla";
292
+ readonly GLE: "gle";
293
+ readonly GON: "gon";
294
+ readonly GRE: "gre";
295
+ readonly GUJ: "guj";
296
+ readonly HEB: "heb";
297
+ readonly HIN: "hin";
298
+ readonly HUN: "hun";
299
+ readonly INC: "inc";
300
+ readonly IND: "ind";
301
+ readonly INH: "inh";
302
+ readonly ISL: "isl";
303
+ readonly ITA: "ita";
304
+ readonly JAV: "jav";
305
+ readonly JPN: "jpn";
306
+ readonly KAS: "kas";
307
+ readonly KAZ: "kaz";
308
+ readonly KHM: "khm";
309
+ readonly KIR: "kir";
310
+ readonly KOR: "kor";
311
+ readonly KUR: "kur";
312
+ readonly LAO: "lao";
313
+ readonly LAV: "lav";
314
+ readonly LIT: "lit";
315
+ readonly LTZ: "ltz";
316
+ readonly MAL: "mal";
317
+ readonly MKD: "mkd";
318
+ readonly MLT: "mlt";
319
+ readonly MOL: "mol";
320
+ readonly MON: "mon";
321
+ readonly MRI: "mri";
322
+ readonly MSA: "msa";
323
+ readonly NEP: "nep";
324
+ readonly NOR: "nor";
325
+ readonly ORI: "ori";
326
+ readonly OSS: "oss";
327
+ readonly PAN: "pan";
328
+ readonly PER: "per";
329
+ readonly POL: "pol";
330
+ readonly POR: "por";
331
+ readonly PUS: "pus";
332
+ readonly RAJ: "raj";
333
+ readonly RUM: "rum";
334
+ readonly RUS: "rus";
335
+ readonly SAN: "san";
336
+ readonly SCR: "scr";
337
+ readonly SIN: "sin";
338
+ readonly SLO: "slo";
339
+ readonly SLV: "slv";
340
+ readonly SMO: "smo";
341
+ readonly SND: "snd";
342
+ readonly SOM: "som";
343
+ readonly SPA: "spa";
344
+ readonly SRD: "srd";
345
+ readonly SRP: "srp";
346
+ readonly SWA: "swa";
347
+ readonly SWE: "swe";
348
+ readonly SYR: "syr";
349
+ readonly TAM: "tam";
350
+ readonly TEL: "tel";
351
+ readonly TGK: "tgk";
352
+ readonly THA: "tha";
353
+ readonly TIB: "tib";
354
+ readonly TUR: "tur";
355
+ readonly UKR: "ukr";
356
+ readonly URD: "urd";
357
+ readonly UZB: "uzb";
358
+ readonly VIE: "vie";
359
+ readonly WEL: "wel";
360
+ readonly YID: "yid";
361
+ };
362
+ type IdnCode = (typeof IdnCode)[keyof typeof IdnCode];
363
+ declare const DomainTransferListType: {
364
+ readonly All: "ALL";
365
+ readonly InProgress: "INPROGRESS";
366
+ readonly Cancelled: "CANCELLED";
367
+ readonly Completed: "COMPLETED";
368
+ };
369
+ type DomainTransferListType = (typeof DomainTransferListType)[keyof typeof DomainTransferListType];
370
+ declare const DomainTransferSortBy: {
371
+ readonly DomainName: "DOMAINNAME";
372
+ readonly DomainNameDesc: "DOMAINNAME_DESC";
373
+ readonly TransferDate: "TRANSFERDATE";
374
+ readonly TransferDateDesc: "TRANSFERDATE_DESC";
375
+ readonly StatusDate: "STATUSDATE";
376
+ readonly StatusDateDesc: "STATUSDATE_DESC";
377
+ };
378
+ type DomainTransferSortBy = (typeof DomainTransferSortBy)[keyof typeof DomainTransferSortBy];
379
+ declare const SSLType: {
380
+ readonly PositiveSSL: "PositiveSSL";
381
+ readonly EssentialSSL: "EssentialSSL";
382
+ readonly InstantSSL: "InstantSSL";
383
+ readonly InstantSSLPro: "InstantSSL Pro";
384
+ readonly PremiumSSL: "PremiumSSL";
385
+ readonly EVSSL: "EV SSL";
386
+ readonly PositiveSSLWildcard: "PositiveSSL Wildcard";
387
+ readonly EssentialSSLWildcard: "EssentialSSL Wildcard";
388
+ readonly PremiumSSLWildcard: "PremiumSSL Wildcard";
389
+ readonly PositiveSSLMultiDomain: "PositiveSSL Multi Domain";
390
+ readonly MultiDomainSSL: "Multi Domain SSL";
391
+ readonly UnifiedCommunications: "Unified Communications";
392
+ readonly EVMultiDomainSSL: "EV Multi Domain SSL";
393
+ };
394
+ type SSLType = (typeof SSLType)[keyof typeof SSLType];
395
+ declare const SSLListType: {
396
+ readonly ALL: "ALL";
397
+ readonly Processing: "Processing";
398
+ readonly EmailSent: "EmailSent";
399
+ readonly TechnicalProblem: "TechnicalProblem";
400
+ readonly InProgress: "InProgress";
401
+ readonly Completed: "Completed";
402
+ readonly Deactivated: "Deactivated";
403
+ readonly Active: "Active";
404
+ readonly Cancelled: "Cancelled";
405
+ readonly NewPurchase: "NewPurchase";
406
+ readonly NewRenewal: "NewRenewal";
407
+ };
408
+ type SSLListType = (typeof SSLListType)[keyof typeof SSLListType];
409
+ declare const SSLListSortBy: {
410
+ readonly PurchaseDate: "PURCHASEDATE";
411
+ readonly PurchaseDateDesc: "PURCHASEDATE_DESC";
412
+ readonly SSLType: "SSLTYPE";
413
+ readonly SSLTypeDesc: "SSLTYPE_DESC";
414
+ readonly ExpireDateTime: "EXPIREDATETIME";
415
+ readonly ExpireDateTimeDesc: "EXPIREDATETIME_DESC";
416
+ readonly Hostname: "Host_Name";
417
+ readonly HostnameDesc: "Host_Name_DESC";
418
+ };
419
+ type SSLListSortBy = (typeof SSLListSortBy)[keyof typeof SSLListSortBy];
420
+ declare const UserProductType: {
421
+ readonly Domain: "DOMAIN";
422
+ readonly SslCertificate: "SSLCERTIFICATE";
423
+ };
424
+ type UserProductType = (typeof UserProductType)[keyof typeof UserProductType];
425
+ declare const UserProductCategory: {
426
+ readonly Domains: "DOMAINS";
427
+ readonly Comodo: "COMODO";
428
+ };
429
+ type UserProductCategory = (typeof UserProductCategory)[keyof typeof UserProductCategory];
430
+ declare const UserActionName: {
431
+ readonly Register: "REGISTER";
432
+ readonly Renew: "RENEW";
433
+ readonly Reactivate: "REACTIVATE";
434
+ readonly Transfer: "TRANSFER";
435
+ readonly Purchase: "PURCHASE";
436
+ };
437
+ type UserActionName = (typeof UserActionName)[keyof typeof UserActionName];
438
+ declare const UserProductName: {
439
+ readonly COM: "COM";
440
+ readonly InstantSsl: "INSTANTSSL";
441
+ };
442
+ type UserProductName = (typeof UserProductName)[keyof typeof UserProductName];
443
+ declare const UserPaymentType: {
444
+ readonly CreditCard: "Creditcard";
445
+ };
446
+ type UserPaymentType = (typeof UserPaymentType)[keyof typeof UserPaymentType];
447
+ declare const UserListFindBy: {
448
+ readonly EmailAddress: "EMAILADDRESS";
449
+ readonly DomainName: "DOMAINNAME";
450
+ readonly Username: "USERNAME";
451
+ };
452
+ type UserListFindBy = (typeof UserListFindBy)[keyof typeof UserListFindBy];
453
+ declare const WhoIsListType: {
454
+ readonly All: "ALL";
455
+ readonly Alloted: "ALLOTED";
456
+ readonly Free: "FREE";
457
+ readonly Discard: "DISCARD";
458
+ };
459
+ type WhoIsListType = (typeof WhoIsListType)[keyof typeof WhoIsListType];
460
+ declare const GetAddFundsStatus: {
461
+ readonly Created: "CREATED";
462
+ readonly Submitted: "SUBMITTED";
463
+ readonly Completed: "COMPLETED";
464
+ readonly Failed: "FAILED";
465
+ readonly Expired: "EXPIRED";
466
+ };
467
+ type GetAddFundsStatus = (typeof GetAddFundsStatus)[keyof typeof GetAddFundsStatus];
468
+
325
469
  interface GetListParams$1 {
326
- listType?: ListType$3;
470
+ listType?: DomainListType;
327
471
  searchTerm?: string;
328
472
  page?: number;
329
473
  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
- */
474
+ sortBy?: DomainListSortBy;
475
+ }
353
476
  interface CreateDomainParams extends Contacts {
354
477
  domainName: string;
355
478
  years: number;
@@ -364,27 +487,10 @@ interface CreateDomainParams extends Contacts {
364
487
  premiumPrice?: number;
365
488
  eapPrice?: number;
366
489
  }
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
490
  interface ContactDomainParams extends Contacts {
375
491
  domainName: string;
376
492
  extendedAttributes: string;
377
493
  }
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
494
  interface ReactivateDomainParams {
389
495
  domainName: string;
390
496
  promotionCode?: string;
@@ -392,17 +498,6 @@ interface ReactivateDomainParams {
392
498
  isPremiumDomain?: boolean;
393
499
  premiumPrice?: number;
394
500
  }
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
501
  interface RenewDomainParams {
407
502
  domainName: string;
408
503
  years: number;
@@ -410,138 +505,28 @@ interface RenewDomainParams {
410
505
  isPremiumDomain?: boolean;
411
506
  premiumPrice?: number;
412
507
  }
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
508
  interface SetRegistrarLockParams {
432
509
  domainName: string;
433
510
  lockAction: LockAction;
434
511
  }
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
512
 
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
513
  declare class Domains {
453
514
  private readonly config;
454
515
  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
516
  getList(params?: GetListParams$1): Promise<{
465
517
  data: Array<DomainGetListResult>;
466
518
  paging: Paging;
467
519
  }>;
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
520
  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
521
  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
522
  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
523
  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
524
  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
525
  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
526
  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
527
  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
528
  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>;
529
+ getInfo(domain: string, hostName?: string): Promise<DomainGetInfoResult>;
545
530
  }
546
531
 
547
532
  interface DomainDnsGetListResult {
@@ -573,28 +558,8 @@ interface DomainDnsGetEmailForwardingResult {
573
558
 
574
559
  interface SetDNSEmailForwardingParams {
575
560
  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"
561
+ mailBox: Array<string>;
562
+ forwardTo: Array<string>;
598
563
  }
599
564
  interface Host {
600
565
  hostname: string;
@@ -625,9 +590,9 @@ declare class DomainsDNS {
625
590
  getHosts(sld: string, tld: string): Promise<DomainDnsGetHostsResult>;
626
591
  getEmailForwarding(domain: string): Promise<DomainDnsGetEmailForwardingResult>;
627
592
  setEmailForwarding(domain: string, params: Omit<SetDNSEmailForwardingParams, "domainName">): Promise<string>;
628
- setHosts(sld: string, tld: string, params: Omit<SetDNSHostsParams, "sld" | "tld"> & {
593
+ setHosts(sld: string, tld: string, params: Omit<SetDNSHostsParams, "sld" | "tld" | "address" | "hostname" | "mxpref" | "recordType" | "ttl"> & {
629
594
  hosts: Array<Host>;
630
- }): Promise<string>;
595
+ }): Promise<Array<string>>;
631
596
  }
632
597
 
633
598
  interface GenericDomain {
@@ -659,20 +624,6 @@ declare class DomainsNS {
659
624
  update(sld: string, tld: string, nameserver: string, ip: string, oldIp: string): Promise<DomainNsUpdateResult>;
660
625
  }
661
626
 
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
627
  interface CreateTransferParams {
677
628
  domainName: string;
678
629
  years: number;
@@ -682,11 +633,11 @@ interface CreateTransferParams {
682
633
  wGenable: boolean;
683
634
  }
684
635
  interface GetListTransferParams {
685
- listType?: ListType$2;
636
+ listType?: DomainTransferListType;
686
637
  searchTerm?: string;
687
638
  page?: number;
688
639
  pageSize?: number;
689
- sortBy?: SortBy$1;
640
+ sortBy?: DomainTransferSortBy;
690
641
  }
691
642
 
692
643
  interface DomainTransferCreateResult {
@@ -728,56 +679,19 @@ declare class DomainsTransfer {
728
679
  }>;
729
680
  }
730
681
 
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
- }
682
+ type CreateSSLYearLimit = 1 | 2 | 3 | 4 | 5;
746
683
  interface CreateSSLParams {
747
- year: 1 | 2 | 3 | 4 | 5;
684
+ year: CreateSSLYearLimit;
748
685
  type: SSLType;
749
686
  sansToADD?: number;
750
687
  promotionCode?: string;
751
688
  }
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
689
  interface GetListSSLParams {
776
- listType?: ListType$1;
690
+ listType?: SSLListType;
777
691
  searchTerm?: string;
778
692
  page?: number;
779
693
  pageSize?: number;
780
- sortBy?: SortBy;
694
+ sortBy?: SSLListSortBy;
781
695
  }
782
696
  interface ActivateSSLCommonParams {
783
697
  certificateId: number;
@@ -985,31 +899,12 @@ declare class SSL {
985
899
  editDCVMethod(certificateId: number, params: Omit<EditDCVMethodParams, "certificateId">): Promise<SSLEditDcvMethodResult>;
986
900
  }
987
901
 
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
902
  interface GetPricingUserParams {
1008
- productType: ProductType;
1009
- productCategory?: ProductCategory$1;
903
+ productType: UserProductType;
904
+ productCategory?: UserProductCategory;
1010
905
  promotionCode?: string;
1011
- actionName?: ActionName;
1012
- productName?: ProductName;
906
+ actionName?: UserActionName;
907
+ productName?: UserProductName;
1013
908
  }
1014
909
  interface UpdateParams {
1015
910
  firstName: string;
@@ -1027,10 +922,9 @@ interface UpdateParams {
1027
922
  phoneExt?: string;
1028
923
  fax?: string;
1029
924
  }
1030
- type PaymentType = "Creditcard";
1031
925
  interface CreateAddFundsRequestParams {
1032
926
  username: string;
1033
- paymentType: PaymentType;
927
+ paymentType: typeof UserPaymentType.CreditCard;
1034
928
  amount: number;
1035
929
  returnUrl: string;
1036
930
  }
@@ -1055,13 +949,8 @@ interface CreateUserParams {
1055
949
  phoneExt?: string;
1056
950
  fax?: string;
1057
951
  }
1058
- declare enum FindBy {
1059
- EmailAddress = "EMAILADDRESS",
1060
- DomainName = "DOMAINNAME",
1061
- Username = "USERNAME"
1062
- }
1063
952
  interface ResetPasswordParams {
1064
- findBy: FindBy;
953
+ findBy: UserListFindBy;
1065
954
  findByValue: string;
1066
955
  emailFromName?: string;
1067
956
  emailFrom?: string;
@@ -1097,13 +986,6 @@ interface UserCreateAddFundsRequest {
1097
986
  returnUrl: string;
1098
987
  redirectUrl: string;
1099
988
  }
1100
- declare enum GetAddFundsStatus {
1101
- Created = "CREATED",
1102
- Submitted = "SUBMITTED",
1103
- Completed = "COMPLETED",
1104
- Failed = "FAILED",
1105
- Expired = "EXPIRED"
1106
- }
1107
989
  interface GetAddFundsStatusResult {
1108
990
  transactionId: number;
1109
991
  amount: number;
@@ -1221,14 +1103,8 @@ interface WhoIsGuardRenewResult {
1221
1103
  chargedAmount: number;
1222
1104
  }
1223
1105
 
1224
- declare enum ListType {
1225
- All = "ALL",
1226
- Alloted = "ALLOTED",
1227
- Free = "FREE",
1228
- Discard = "DISCARD"
1229
- }
1230
1106
  interface GetListParams {
1231
- listType?: ListType;
1107
+ listType?: WhoIsListType;
1232
1108
  page?: number;
1233
1109
  pageSize?: number;
1234
1110
  }
@@ -1265,4 +1141,4 @@ declare class Namecheap {
1265
1141
  private getConfig;
1266
1142
  }
1267
1143
 
1268
- export { Namecheap as default };
1144
+ export { DomainListSortBy, DomainListType, DomainTransferListType, DomainTransferSortBy, EmailType, GetAddFundsStatus, IdnCode, LockAction, RecordType, SSLListSortBy, SSLListType, SSLType, UserActionName, UserListFindBy, UserPaymentType, UserProductCategory, UserProductName, UserProductType, WhoIsListType, Namecheap as default };