namecheap-ts 1.0.5 โ†’ 1.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/README.md CHANGED
@@ -1,129 +1,293 @@
1
- # Namecheap-ts API Wrapper
1
+ # Namecheap-ts
2
2
 
3
- A TypeScript package that provides a simple and intuitive interface to interact with Namecheap API.
3
+ [![npm version](https://img.shields.io/npm/v/namecheap-ts.svg)](https://www.npmjs.com/package/namecheap-ts)
4
+ [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
4
5
 
5
- ## Installation
6
+ A modern TypeScript/JavaScript wrapper for the Namecheap API. Simplify domain management, registration, pricing, and account operations with full type safety.
7
+
8
+ ## Features
6
9
 
7
- You can install the package using npm. Run the following command in your terminal:
10
+ โœจ **Full TypeScript Support** - Complete type definitions for all methods and responses
11
+ ๐ŸŽฏ **Simple API** - Intuitive methods for common operations
12
+ ๐Ÿ”’ **Type-Safe** - Catch errors at compile time, not runtime
13
+ ๐Ÿงช **Sandbox Support** - Test your integration without affecting production
14
+ ๐Ÿ“ฆ **Zero Config** - Works out of the box with ESM and CommonJS
15
+ โšก **Lightweight** - Minimal dependencies (axios, xml2js)
8
16
 
9
- ```shell
17
+ ## Installation
18
+
19
+ ```bash
10
20
  npm install namecheap-ts
11
21
  ```
12
22
 
13
- ## Usage
23
+ ```bash
24
+ yarn add namecheap-ts
25
+ ```
14
26
 
15
- You can use the package to perform various operations such as domain registration, DNS management, SSL certificate management, and more. Here's an example of how to use the package to check whether the domain name is available or not:
27
+ ```bash
28
+ pnpm add namecheap-ts
29
+ ```
30
+
31
+ ## Quick Start
16
32
 
17
33
  ```typescript
18
34
  import Namecheap, { INamecheapConfig } from "namecheap-ts";
35
+
36
+ // Configure the client
19
37
  const config: INamecheapConfig = {
20
- apiKey: "api-key",
21
- apiUser: "api-user",
22
- username: "user-name",
23
- clientIp: "client-ip",
38
+ apiUser: "your-api-username",
39
+ apiKey: "your-api-key",
40
+ username: "your-username",
41
+ clientIp: "your-whitelisted-ip",
24
42
  };
25
43
 
26
- const api = new Namecheap(config, true);
27
-
28
- const payload = { DomainList: "mezoishere.net" };
29
- const { data } = await api.call("namecheap.domains.check", payload);
44
+ // Create an instance (set second parameter to true for sandbox)
45
+ const namecheap = new Namecheap(config, false);
30
46
 
31
- const isAvailabe = data.DomainCheckResult.$.Available;
32
- console.log(isAvailable);
47
+ // Check domain availability
48
+ const { data } = await namecheap.checkDomain("example.com");
49
+ console.log(`Available: ${data.available}, Premium: ${data.premium}`);
33
50
  ```
34
51
 
35
- ## API
52
+ ## Configuration
53
+
54
+ ### INamecheapConfig
36
55
 
37
- The `Namecheap` class is the main entry point for interacting with the Namecheap API.
56
+ | Property | Type | Required | Description |
57
+ | ---------- | -------- | -------- | ------------------------------- |
58
+ | `apiUser` | `string` | โœ… | Your Namecheap API username |
59
+ | `apiKey` | `string` | โœ… | Your Namecheap API key |
60
+ | `username` | `string` | โœ… | Your Namecheap account username |
61
+ | `clientIp` | `string` | โœ… | Your whitelisted IP address |
38
62
 
39
- #### `constructor(config: INamecheapConfig, sandbox?: boolean)`
63
+ ### Sandbox Mode
40
64
 
41
- Create a new instance of the `Namecheap` class.
65
+ Pass `true` as the second parameter to use the Namecheap sandbox environment:
42
66
 
43
67
  ```typescript
44
- const namecheap = new Namecheap(config, true);
68
+ const namecheap = new Namecheap(config, true); // Sandbox mode
45
69
  ```
46
70
 
47
- #### `call(command: Command, payload: Payload): Promise<IReponse>`
71
+ ## API Reference
48
72
 
49
- Call a command on the Namecheap API.
73
+ ### `checkDomain(domainName: string)`
50
74
 
51
- ```typescript
52
- import { Commands } from "namecheap-ts";
53
- const response = await namecheap.call(Commands.DOMAINS_CHECK, {
54
- DomainList: "example.com",
55
- });
75
+ Check if a domain is available for registration and whether it's a premium domain.
56
76
 
57
- console.log(response);
58
- ```
77
+ **Returns:** `Promise<ICheckDomainResponse>`
59
78
 
60
- #### `checkDomain(domainName: string): Promise<ICheckDomainResponse>`
79
+ ```typescript
80
+ const result = await namecheap.checkDomain("example.com");
81
+
82
+ if (result.data.available) {
83
+ console.log("Domain is available!");
84
+ if (result.data.premium) {
85
+ console.log("This is a premium domain");
86
+ }
87
+ }
88
+ ```
61
89
 
62
- Check if a domain is available and if it'is premium.
90
+ ### `getDomainPrice(domainName: string, action: DomainPriceAction)`
63
91
 
64
- ```typescript
65
- const { data } = await namecheap.checkDomain("example.com");
92
+ Get pricing information for a domain based on the action type.
66
93
 
67
- console.log({ availabe: data.availabe, premium: data.premium });
68
- ```
94
+ **Parameters:**
69
95
 
70
- #### `getDomainPrice(domainName: string, action: DomainPriceAction): Promise<IReponse>`
96
+ - `domainName` - The domain name (e.g., "example.com")
97
+ - `action` - One of: `DomainPriceActions.REGISTER`, `RENEW`, `REACTIVATE`, `TRANSFER`
71
98
 
72
- Get the prices list of a domain.
99
+ **Returns:** `Promise<IResponse<object[]>>`
73
100
 
74
101
  ```typescript
75
- import { DomainPriceAction } from "namecheap-ts";
76
- const response = await namecheap.getDomainPrice(
102
+ import { DomainPriceActions } from "namecheap-ts";
103
+
104
+ const pricing = await namecheap.getDomainPrice(
77
105
  "example.com",
78
- DomainPriceAction.REGISTER
106
+ DomainPriceActions.REGISTER,
79
107
  );
80
108
 
81
- console.log(response);
109
+ console.log(pricing.data);
82
110
  ```
83
111
 
84
- #### `registerDomain(payload: Payload): Promise<IRegisterDomainResponse>`
112
+ ### `registerDomain(payload: Payload)`
113
+
114
+ Register a new domain with Namecheap.
85
115
 
86
- Register domain in namecheap.
116
+ **Returns:** `Promise<IRegisterDomainResponse>`
87
117
 
88
118
  ```typescript
89
119
  const payload = {
90
- DomainName: "mezoishere.co",
91
- Years: 2,
92
- // ...etc other attributes
120
+ DomainName: "example.com",
121
+ Years: 1,
122
+ // Add required registration fields according to Namecheap API docs
123
+ RegistrantFirstName: "John",
124
+ RegistrantLastName: "Doe",
125
+ RegistrantAddress1: "123 Main St",
126
+ RegistrantCity: "New York",
127
+ RegistrantStateProvince: "NY",
128
+ RegistrantPostalCode: "10001",
129
+ RegistrantCountry: "US",
130
+ RegistrantPhone: "+1.2125551234",
131
+ RegistrantEmailAddress: "john@example.com",
132
+ // ... additional required fields
93
133
  };
94
134
 
95
- const response = await namecheap.registerDomain(payload);
96
-
97
- console.log(response);
135
+ const result = await namecheap.registerDomain(payload);
136
+ console.log(`Domain registered: ${result.data.domain}`);
137
+ console.log(`Order ID: ${result.data.orderID}`);
98
138
  ```
99
139
 
100
- #### `addFundsRequest(payload: AddFundsRequestPayload): Promise<IAddFundsRequestResponse>`
140
+ ### `addFundsRequest(payload: AddFundsRequestPayload)`
141
+
142
+ Create a request to add funds to your Namecheap account.
101
143
 
102
- Add funds to the user account.
144
+ **Returns:** `Promise<IAddFundsRequestResponse>`
103
145
 
104
146
  ```typescript
105
147
  const payload = {
106
- username: "username",
148
+ username: "your-username",
107
149
  paymentType: "creditcard",
108
- amount: 10,
109
- returnURL: "the return url after payment is done",
150
+ amount: 100,
151
+ returnURL: "https://yoursite.com/payment-complete",
110
152
  };
111
153
 
112
- const response = await namecheap.addFundsRequest(payload);
154
+ const result = await namecheap.addFundsRequest(payload);
155
+ console.log(`Token ID: ${result.data.tokenId}`);
156
+ console.log(`Redirect to: ${result.data.redirectURL}`);
157
+ ```
158
+
159
+ ### `getFundsStatus(tokenId: string)`
160
+
161
+ Check the status of a funds request.
162
+
163
+ **Returns:** `Promise<IGetFundsStatusResponse>`
113
164
 
114
- console.log(response);
165
+ ```typescript
166
+ const tokenId = "abc123-token-id";
167
+ const result = await namecheap.getFundsStatus(tokenId);
168
+
169
+ console.log(`Status: ${result.data.status}`);
170
+ console.log(`Amount: ${result.data.amount}`);
115
171
  ```
116
172
 
117
- #### `getFundsStatus(tokenId: string): Promise<IGetFundsStatusResponse>`
173
+ ### `call(command: Command, payload: Payload)`
118
174
 
119
- Check the status of a specific funds request.
175
+ Make a direct API call to any Namecheap command.
176
+
177
+ **Returns:** `Promise<IResponse>`
120
178
 
121
179
  ```typescript
122
- const tokenId = "the-token-id-of-the-created-funds-request"
180
+ import { Commands } from "namecheap-ts";
123
181
 
124
- const response = await namecheap.getFundsStatus(tokentId);
182
+ const response = await namecheap.call(Commands.DOMAINS_CHECK, {
183
+ DomainList: "example.com,test.com",
184
+ });
185
+
186
+ console.log(response.data);
187
+ ```
188
+
189
+ ## Type Definitions
190
+
191
+ ### Available Commands
192
+
193
+ Import the `Commands` enum for type-safe command names:
194
+
195
+ ```typescript
196
+ import { Commands } from "namecheap-ts";
197
+
198
+ // Examples:
199
+ Commands.DOMAINS_CHECK;
200
+ Commands.DOMAINS_CREATE;
201
+ Commands.USERS_GET_PRICING;
202
+ Commands.USERS_CREATE_ADD_FUNDS_REQUEST;
203
+ Commands.USERS_GET_ADD_FUNDS_STATUS;
204
+ ```
205
+
206
+ ### Domain Price Actions
207
+
208
+ ```typescript
209
+ import { DomainPriceActions } from "namecheap-ts";
210
+
211
+ DomainPriceActions.REGISTER;
212
+ DomainPriceActions.RENEW;
213
+ DomainPriceActions.REACTIVATE;
214
+ DomainPriceActions.TRANSFER;
215
+ ```
216
+
217
+ ## Error Handling
218
+
219
+ ```typescript
220
+ try {
221
+ const result = await namecheap.checkDomain("example.com");
222
+ console.log(result.data);
223
+ } catch (error) {
224
+ if (error instanceof InvalidDomainNameException) {
225
+ console.error("Invalid domain name provided");
226
+ } else {
227
+ console.error("API error:", error.message);
228
+ }
229
+ }
230
+ ```
231
+
232
+ ## Complete Example
125
233
 
126
- console.log(response);
234
+ ```typescript
235
+ import Namecheap, { INamecheapConfig, DomainPriceActions } from "namecheap-ts";
236
+
237
+ async function main() {
238
+ const config: INamecheapConfig = {
239
+ apiUser: process.env.NAMECHEAP_API_USER!,
240
+ apiKey: process.env.NAMECHEAP_API_KEY!,
241
+ username: process.env.NAMECHEAP_USERNAME!,
242
+ clientIp: process.env.NAMECHEAP_CLIENT_IP!,
243
+ };
244
+
245
+ const namecheap = new Namecheap(config, true); // Sandbox mode
246
+
247
+ // Check domain availability
248
+ const domain = "example.com";
249
+ const availabilityCheck = await namecheap.checkDomain(domain);
250
+
251
+ if (availabilityCheck.data.available) {
252
+ // Get pricing
253
+ const pricing = await namecheap.getDomainPrice(
254
+ domain,
255
+ DomainPriceActions.REGISTER,
256
+ );
257
+
258
+ console.log("Domain is available!");
259
+ console.log("Pricing:", pricing.data);
260
+ } else {
261
+ console.log("Domain is not available");
262
+ }
263
+ }
264
+
265
+ main();
127
266
  ```
128
267
 
129
- You can refer to the official Namecheap API documentation for more information on the available methods and parameters. [The documentation is available at ยน](https://www.namecheap.com/support/api/intro/).
268
+ ## Requirements
269
+
270
+ - Node.js 14 or higher
271
+ - A Namecheap account with API access enabled
272
+ - Whitelisted IP address for API access
273
+
274
+ ## Getting API Credentials
275
+
276
+ 1. Log in to your Namecheap account
277
+ 2. Navigate to Profile โ†’ Tools โ†’ API Access
278
+ 3. Enable API access and whitelist your IP address
279
+ 4. Copy your API key and username
280
+
281
+ ## Resources
282
+
283
+ - [Namecheap API Documentation](https://www.namecheap.com/support/api/intro/)
284
+ - [API Method Reference](https://www.namecheap.com/support/api/methods/)
285
+ - [GitHub Repository](https://github.com/abdulrahmanKanakri/namecheap-ts)
286
+
287
+ ## License
288
+
289
+ ISC ยฉ Abdulrahman Kanakri
290
+
291
+ ## Contributing
292
+
293
+ Contributions are welcome! Please feel free to submit a Pull Request.
package/dist/index.d.mts CHANGED
@@ -1,92 +1,92 @@
1
1
  declare enum Commands {
2
- DOMAINS_GETLIST = "namecheap.domains.getList",
3
- DOMAINS_GETCONTACTS = "namecheap.domains.getContacts",
2
+ DOMAINS_GET_LIST = "namecheap.domains.getList",
3
+ DOMAINS_GET_CONTACTS = "namecheap.domains.getContacts",
4
4
  DOMAINS_CREATE = "namecheap.domains.create",
5
- DOMAINS_GETTLDLIST = "namecheap.domains.getTldList",
6
- DOMAINS_SETCONTACTS = "namecheap.domains.setContacts",
5
+ DOMAINS_GET_TLD_LIST = "namecheap.domains.getTldList",
6
+ DOMAINS_SET_CONTACTS = "namecheap.domains.setContacts",
7
7
  DOMAINS_CHECK = "namecheap.domains.check",
8
8
  DOMAINS_REACTIVATE = "namecheap.domains.reactivate",
9
9
  DOMAINS_RENEW = "namecheap.domains.renew",
10
- DOMAINS_GETREGISTRARLOCK = "namecheap.domains.getRegistrarLock",
11
- DOMAINS_SETREGISTRARLOCK = "namecheap.domains.setRegistrarLock",
12
- DOMAINS_GETINFO = "namecheap.domains.getInfo",
13
- DOMAINS_DNS_SETDEFAULT = "namecheap.domains.dns.setDefault",
14
- DOMAINS_DNS_SETCUSTOM = "namecheap.domains.dns.setCustom",
15
- DOMAINS_DNS_GETLIST = "namecheap.domains.dns.getList",
16
- DOMAINS_DNS_GETHOSTS = "namecheap.domains.dns.getHosts",
17
- DOMAINS_DNS_GETEMAILFORWARDING = "namecheap.domains.dns.getEmailForwarding",
18
- DOMAINS_DNS_SETEMAILFORWARDING = "namecheap.domains.dns.setEmailForwarding",
19
- DOMAINS_DNS_SETHOSTS = "namecheap.domains.dns.setHosts",
10
+ DOMAINS_GET_REGISTRAR_LOCK = "namecheap.domains.getRegistrarLock",
11
+ DOMAINS_SET_REGISTRAR_LOCK = "namecheap.domains.setRegistrarLock",
12
+ DOMAINS_GET_INFO = "namecheap.domains.getInfo",
13
+ DOMAINS_DNS_SET_DEFAULT = "namecheap.domains.dns.setDefault",
14
+ DOMAINS_DNS_SET_CUSTOM = "namecheap.domains.dns.setCustom",
15
+ DOMAINS_DNS_GET_LIST = "namecheap.domains.dns.getList",
16
+ DOMAINS_DNS_GET_HOSTS = "namecheap.domains.dns.getHosts",
17
+ DOMAINS_DNS_GET_EMAIL_FORWARDING = "namecheap.domains.dns.getEmailForwarding",
18
+ DOMAINS_DNS_SET_EMAIL_FORWARDING = "namecheap.domains.dns.setEmailForwarding",
19
+ DOMAINS_DNS_SET_HOSTS = "namecheap.domains.dns.setHosts",
20
20
  DOMAINS_NS_CREATE = "namecheap.domains.ns.create",
21
21
  DOMAINS_NS_DELETE = "namecheap.domains.ns.delete",
22
- DOMAINS_NS_GETINFO = "namecheap.domains.ns.getInfo",
22
+ DOMAINS_NS_GET_INFO = "namecheap.domains.ns.getInfo",
23
23
  DOMAINS_NS_UPDATE = "namecheap.domains.ns.update",
24
24
  DOMAINS_TRANSFER_CREATE = "namecheap.domains.transfer.create",
25
- DOMAINS_TRANSFER_GETSTATUS = "namecheap.domains.transfer.getStatus",
26
- DOMAINS_TRANSFER_UPDATESTATUS = "namecheap.domains.transfer.updateStatus",
27
- DOMAINS_TRANSFER_GETLIST = "namecheap.domains.transfer.getList",
25
+ DOMAINS_TRANSFER_GET_STATUS = "namecheap.domains.transfer.getStatus",
26
+ DOMAINS_TRANSFER_UPDATE_STATUS = "namecheap.domains.transfer.updateStatus",
27
+ DOMAINS_TRANSFER_GET_LIST = "namecheap.domains.transfer.getList",
28
28
  SSL_CREATE = "namecheap.ssl.create",
29
- SSL_GETLIST = "namecheap.ssl.getList",
30
- SSL_PARSECSR = "namecheap.ssl.parseCSR",
31
- SSL_GETAPPROVEREMAILLIST = "namecheap.ssl.getApproverEmailList",
29
+ SSL_GET_LIST = "namecheap.ssl.getList",
30
+ SSL_PARSE_CSR = "namecheap.ssl.parseCSR",
31
+ SSL_GET_APPROVER_EMAIL_LIST = "namecheap.ssl.getApproverEmailList",
32
32
  SSL_ACTIVATE = "namecheap.ssl.activate",
33
- SSL_RESENDAPPROVEREMAIL = "namecheap.ssl.resendApproverEmail",
34
- SSL_GETINFO = "namecheap.ssl.getInfo",
33
+ SSL_RESEND_APPROVER_EMAIL = "namecheap.ssl.resendApproverEmail",
34
+ SSL_GET_INFO = "namecheap.ssl.getInfo",
35
35
  SSL_RENEW = "namecheap.ssl.renew",
36
36
  SSL_REISSUE = "namecheap.ssl.reissue",
37
- SSL_RESENDFULFILLMENTEMAIL = "namecheap.ssl.resendfulfillmentemail",
38
- SSL_PURCHASEMORESANS = "namecheap.ssl.purchasemoresans",
39
- SSL_REVOKECERTIFICATE = "namecheap.ssl.revokecertificate",
40
- SSL_EDITDCVMETHOD = "namecheap.ssl.editDCVMethod",
41
- USERS_GETPRICING = "namecheap.users.getPricing",
42
- USERS_GETBALANCES = "namecheap.users.getBalances",
43
- USERS_CHANGEPASSWORD = "namecheap.users.changePassword",
37
+ SSL_RESEND_FULFILLMENT_EMAIL = "namecheap.ssl.resendfulfillmentemail",
38
+ SSL_PURCHASE_MORE_SANS = "namecheap.ssl.purchasemoresans",
39
+ SSL_REVOKE_CERTIFICATE = "namecheap.ssl.revokecertificate",
40
+ SSL_EDIT_DCV_METHOD = "namecheap.ssl.editDCVMethod",
41
+ USERS_GET_PRICING = "namecheap.users.getPricing",
42
+ USERS_GET_BALANCES = "namecheap.users.getBalances",
43
+ USERS_CHANGE_PASSWORD = "namecheap.users.changePassword",
44
44
  USERS_UPDATE = "namecheap.users.update",
45
- USERS_CREATEADDFUNDSREQUEST = "namecheap.users.createaddfundsrequest",
46
- USERS_GETADDFUNDSSTATUS = "namecheap.users.getAddFundsStatus",
45
+ USERS_CREATE_ADD_FUNDS_REQUEST = "namecheap.users.createaddfundsrequest",
46
+ USERS_GET_ADD_FUNDS_STATUS = "namecheap.users.getAddFundsStatus",
47
47
  USERS_CREATE = "namecheap.users.create",
48
48
  USERS_LOGIN = "namecheap.users.login",
49
- USERS_RESETPASSWORD = "namecheap.users.resetPassword",
49
+ USERS_RESET_PASSWORD = "namecheap.users.resetPassword",
50
50
  USERS_ADDRESS_CREATE = "namecheap.users.address.create",
51
51
  USERS_ADDRESS_DELETE = "namecheap.users.address.delete",
52
- USERS_ADDRESS_GETINFO = "namecheap.users.address.getInfo",
53
- USERS_ADDRESS_GETLIST = "namecheap.users.address.getList",
54
- USERS_ADDRESS_SETDEFAULT = "namecheap.users.address.setDefault",
52
+ USERS_ADDRESS_GET_INFO = "namecheap.users.address.getInfo",
53
+ USERS_ADDRESS_GET_LIST = "namecheap.users.address.getList",
54
+ USERS_ADDRESS_SET_DEFAULT = "namecheap.users.address.setDefault",
55
55
  USERS_ADDRESS_UPDATE = "namecheap.users.address.update",
56
- WHOISGUARD_CHANGEEMAILADDRESS = "Namecheap.Whoisguard.changeemailaddress",
57
- WHOISGUARD_ENABLE = "Namecheap.Whoisguard.enable",
58
- WHOISGUARD_DISABLE = "Namecheap.Whoisguard.disable",
59
- WHOISGUARD_GETLIST = "Namecheap.Whoisguard.getList",
60
- WHOISGUARD_RENEW = "Namecheap.Whoisguard.renew"
56
+ WHO_IS_GUARD_CHANGE_EMAIL_ADDRESS = "Namecheap.Whoisguard.changeemailaddress",
57
+ WHO_IS_GUARD_ENABLE = "Namecheap.Whoisguard.enable",
58
+ WHO_IS_GUARD_DISABLE = "Namecheap.Whoisguard.disable",
59
+ WHO_IS_GUARD_GET_LIST = "Namecheap.Whoisguard.getList",
60
+ WHO_IS_GUARD_RENEW = "Namecheap.Whoisguard.renew"
61
61
  }
62
62
  type Command = `${Commands}`;
63
63
 
64
64
  type Payload = Record<string, string | number>;
65
- interface IReponse<T = any> {
65
+ interface IResponse<T = any> {
66
66
  data: T;
67
67
  status: number;
68
68
  }
69
- type ICheckDomainResponse = IReponse<{
70
- availabe: boolean;
69
+ type ICheckDomainResponse = IResponse<{
70
+ available: boolean;
71
71
  premium: boolean;
72
72
  }>;
73
- type IRegisterDomainResponse = IReponse<{
73
+ type IRegisterDomainResponse = IResponse<{
74
74
  domain: string;
75
75
  registered: boolean;
76
76
  chargedAmount: number;
77
77
  domainID: string;
78
78
  orderID: string;
79
79
  transactionID: string;
80
- whoisguardEnable: boolean;
80
+ whoIsGuardEnable: boolean;
81
81
  freePositiveSSL: boolean;
82
82
  nonRealTimeDomain: boolean;
83
83
  }>;
84
- type IAddFundsRequestResponse = IReponse<{
84
+ type IAddFundsRequestResponse = IResponse<{
85
85
  tokenId: string;
86
86
  returnURL: string;
87
87
  redirectURL: string;
88
88
  }>;
89
- type IGetFundsStatusResponse = IReponse<{
89
+ type IGetFundsStatusResponse = IResponse<{
90
90
  status: string;
91
91
  amount: number;
92
92
  }>;
@@ -114,12 +114,12 @@ declare class Namecheap {
114
114
  private readonly config;
115
115
  private readonly apiClient;
116
116
  constructor(config: INamecheapConfig, sandbox?: boolean);
117
- call(command: Command, payload: Payload): Promise<IReponse>;
117
+ call(command: Command, payload: Payload): Promise<IResponse>;
118
118
  checkDomain(domainName: string): Promise<ICheckDomainResponse>;
119
- getDomainPrice(domainName: string, action: DomainPriceAction): Promise<IReponse<object[]>>;
119
+ getDomainPrice(domainName: string, action: DomainPriceAction): Promise<IResponse<object[]>>;
120
120
  registerDomain(payload: Payload): Promise<IRegisterDomainResponse>;
121
121
  addFundsRequest(payload: AddFundsRequestPayload): Promise<IAddFundsRequestResponse>;
122
122
  getFundsStatus(tokenId: string): Promise<IGetFundsStatusResponse>;
123
123
  }
124
124
 
125
- export { AddFundsRequestPayload, Command, Commands, DomainPriceAction, DomainPriceActions, IAddFundsRequestResponse, ICheckDomainResponse, IGetFundsStatusResponse, INamecheapConfig, IRegisterDomainResponse, IReponse, Payload, Namecheap as default };
125
+ export { type AddFundsRequestPayload, type Command, Commands, type DomainPriceAction, DomainPriceActions, type IAddFundsRequestResponse, type ICheckDomainResponse, type IGetFundsStatusResponse, type INamecheapConfig, type IRegisterDomainResponse, type IResponse, type Payload, Namecheap as default };