@fwgapps/namecheap 0.6.0 → 1.0.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 +314 -60
- package/dist/index.cjs +1660 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1211 -954
- package/dist/index.d.ts +1211 -954
- package/dist/index.js +1561 -1
- package/dist/index.js.map +1 -1
- package/package.json +31 -26
- package/dist/index.global.js +0 -5
- package/dist/index.global.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,220 @@
|
|
|
1
|
-
interface
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
interface XmlNode {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly attrs: Readonly<Record<string, string>>;
|
|
4
|
+
readonly text: string;
|
|
5
|
+
readonly children: readonly XmlNode[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Typed, read-only view over an XML node. Error messages never include attribute values. */
|
|
9
|
+
declare class El {
|
|
10
|
+
private readonly node;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
constructor(node: XmlNode);
|
|
13
|
+
text(): string;
|
|
14
|
+
all(name: string): El[];
|
|
15
|
+
/** All direct child elements in document order, whatever their names. */
|
|
16
|
+
children(): El[];
|
|
17
|
+
/** Text of the first child element called `name`, or `undefined` when there is none. */
|
|
18
|
+
optionalText(name: string): string | undefined;
|
|
19
|
+
one(name: string): El;
|
|
20
|
+
optional(name: string): El | undefined;
|
|
21
|
+
string(attr: string): string;
|
|
22
|
+
optionalString(attr: string): string | undefined;
|
|
23
|
+
number(attr: string): number;
|
|
24
|
+
optionalNumber(attr: string): number | undefined;
|
|
25
|
+
boolean(attr: string): boolean;
|
|
26
|
+
optionalBoolean(attr: string): boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Never throws: the plain decimal value of an attribute, or `undefined` when it is
|
|
29
|
+
* absent or not acceptable. For undocumented responses of billed or account-changing
|
|
30
|
+
* commands, where a parse failure after the action succeeded would invite a retry.
|
|
31
|
+
*/
|
|
32
|
+
lenientNumber(attr: string): number | undefined;
|
|
33
|
+
/** Never throws: `true`/`false` (any case), or `undefined` when absent or anything else. */
|
|
34
|
+
lenientBoolean(attr: string): boolean | undefined;
|
|
35
|
+
/** Element text as a plain decimal number (for numeric child elements). */
|
|
36
|
+
numberText(): number;
|
|
37
|
+
/** Element text as `true`/`false` (for boolean child elements). */
|
|
38
|
+
booleanText(): boolean;
|
|
39
|
+
attributes(): Record<string, string>;
|
|
40
|
+
private parseNumber;
|
|
41
|
+
private parseBoolean;
|
|
7
42
|
}
|
|
8
|
-
|
|
43
|
+
|
|
44
|
+
type ArrayStyle = "bracket" | "suffix";
|
|
45
|
+
|
|
46
|
+
interface TransportConfig {
|
|
9
47
|
apiUser: string;
|
|
10
48
|
apiKey: string;
|
|
49
|
+
userName?: string;
|
|
11
50
|
clientIp: string;
|
|
12
|
-
|
|
13
|
-
|
|
51
|
+
sandbox?: boolean;
|
|
52
|
+
fetch?: typeof fetch;
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
}
|
|
55
|
+
interface CommandRequest {
|
|
56
|
+
command: string;
|
|
57
|
+
params: Array<[string, string]>;
|
|
58
|
+
}
|
|
59
|
+
type Send = (req: CommandRequest) => Promise<El>;
|
|
60
|
+
/**
|
|
61
|
+
* Creates the function that sends one command as a form-encoded POST and returns the
|
|
62
|
+
* `CommandResponse` element. Error messages are fixed strings: they never contain the
|
|
63
|
+
* URL, the API key, the request body or the response body.
|
|
64
|
+
*/
|
|
65
|
+
declare function createTransport(config: TransportConfig): Send;
|
|
66
|
+
|
|
67
|
+
interface CommandDef<P, R> {
|
|
68
|
+
/** Namecheap command name, e.g. `namecheap.domains.check`. */
|
|
69
|
+
name: string;
|
|
70
|
+
arrayStyle?: ArrayStyle;
|
|
71
|
+
/** Maps a dotted camelCase path to an exact parameter name. */
|
|
72
|
+
keys?: Readonly<Record<string, string>>;
|
|
73
|
+
/** Runs before serializing; throw to reject the call without sending anything. */
|
|
74
|
+
validate?: (params: P) => void;
|
|
75
|
+
/** Receives the CommandResponse element returned by `send`. */
|
|
76
|
+
parse: (cr: El) => R;
|
|
77
|
+
}
|
|
78
|
+
interface Command<P, R> extends CommandDef<P, R> {
|
|
79
|
+
/** Phantom field carrying the params type; never set at runtime. */
|
|
80
|
+
readonly _params?: P;
|
|
81
|
+
}
|
|
82
|
+
type Group<C> = {
|
|
83
|
+
[K in keyof C]: C[K] extends Command<infer P, infer R> ? {} extends P ? (params?: P) => Promise<R> : (params: P) => Promise<R> : never;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Runs one command: validates, serializes, sends and parses.
|
|
87
|
+
*
|
|
88
|
+
* This is the tree-shakeable entry point: importing only `createTransport`, one
|
|
89
|
+
* standalone command (for example `domainsCheck`) and `run` bundles just those, not the
|
|
90
|
+
* whole command catalog that `new Namecheap(...)` carries.
|
|
91
|
+
*/
|
|
92
|
+
declare function run<P, R>(command: Command<P, R>, send: Send, ...args: {} extends P ? [params?: P] : [params: P]): Promise<R>;
|
|
93
|
+
|
|
94
|
+
declare class Namecheap {
|
|
95
|
+
readonly domains: Group<{
|
|
96
|
+
getList: Command<DomainsGetListParams, DomainsGetListResult>;
|
|
97
|
+
check: Command<DomainsCheckParams, DomainsCheckResult>;
|
|
98
|
+
getRegistrarLock: Command<DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult>;
|
|
99
|
+
setRegistrarLock: Command<DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult>;
|
|
100
|
+
reactivate: Command<DomainsReactivateParams, DomainsReactivateResult>;
|
|
101
|
+
renew: Command<DomainsRenewParams, DomainsRenewResult>;
|
|
102
|
+
setContacts: Command<DomainsSetContactsParams, DomainsSetContactsResult>;
|
|
103
|
+
create: Command<DomainsCreateParams, DomainsCreateResult>;
|
|
104
|
+
getTldList: Command<Record<string, never>, DomainsGetTldListResult>;
|
|
105
|
+
getContacts: Command<DomainsGetContactsParams, DomainsGetContactsResult>;
|
|
106
|
+
getInfo: Command<DomainsGetInfoParams, DomainsGetInfoResult>;
|
|
107
|
+
}>;
|
|
108
|
+
readonly dns: Group<{
|
|
109
|
+
setDefault: Command<DnsSetDefaultParams, DnsSetDefaultResult>;
|
|
110
|
+
setCustom: Command<DnsSetCustomParams, DnsSetCustomResult>;
|
|
111
|
+
getList: Command<DnsGetListParams, DnsGetListResult>;
|
|
112
|
+
getHosts: Command<DnsGetHostsParams, DnsGetHostsResult>;
|
|
113
|
+
getEmailForwarding: Command<DnsGetEmailForwardingParams, DnsGetEmailForwardingResult>;
|
|
114
|
+
setEmailForwarding: Command<DnsSetEmailForwardingParams, DnsSetEmailForwardingResult>;
|
|
115
|
+
setHosts: Command<DnsSetHostsParams, DnsSetHostsResult>;
|
|
116
|
+
}>;
|
|
117
|
+
readonly ns: Group<{
|
|
118
|
+
create: Command<NsCreateParams, NsCreateResult>;
|
|
119
|
+
delete: Command<NsDeleteParams, NsDeleteResult>;
|
|
120
|
+
getInfo: Command<NsGetInfoParams, NsGetInfoResult>;
|
|
121
|
+
update: Command<NsUpdateParams, NsUpdateResult>;
|
|
122
|
+
}>;
|
|
123
|
+
readonly transfer: Group<{
|
|
124
|
+
create: Command<TransferCreateParams, TransferCreateResult>;
|
|
125
|
+
getStatus: Command<TransferGetStatusParams, TransferGetStatusResult>;
|
|
126
|
+
updateStatus: Command<TransferUpdateStatusParams, TransferUpdateStatusResult>;
|
|
127
|
+
getList: Command<TransferGetListParams, TransferGetListResult>;
|
|
128
|
+
}>;
|
|
129
|
+
readonly ssl: Group<{
|
|
130
|
+
create: Command<SslCreateParams, SslCreateResult>;
|
|
131
|
+
getList: Command<SslGetListParams, SslGetListResult>;
|
|
132
|
+
parseCSR: Command<SslParseCsrParams, SslParseCsrResult>;
|
|
133
|
+
getApproverEmailList: Command<SslGetApproverEmailListParams, SslGetApproverEmailListResult>;
|
|
134
|
+
activate: Command<SslActivateParams, SslActivateResult>;
|
|
135
|
+
resendApproverEmail: Command<SslResendApproverEmailParams, SslResendResult>;
|
|
136
|
+
reissue: Command<SslReissueParams, SslActivateResult>;
|
|
137
|
+
resendFulfillmentEmail: Command<SslResendFulfillmentEmailParams, SslResendResult>;
|
|
138
|
+
editDCVMethod: Command<SslEditDcvMethodParams, SslActivateResult>;
|
|
139
|
+
getInfo: Command<SslGetInfoParams, SslGetInfoResult>;
|
|
140
|
+
renew: Command<SslRenewParams, SslRenewResult>;
|
|
141
|
+
purchaseMoreSans: Command<SslPurchaseMoreSansParams, SslPurchaseMoreSansResult>;
|
|
142
|
+
revokeCertificate: Command<SslRevokeCertificateParams, SslRevokeCertificateResult>;
|
|
143
|
+
}>;
|
|
144
|
+
readonly users: Group<{
|
|
145
|
+
getBalances: Command<Record<string, never>, UsersGetBalancesResult>;
|
|
146
|
+
getPricing: Command<UsersGetPricingParams, UsersGetPricingResult>;
|
|
147
|
+
changePassword: Command<UsersChangePasswordParams, UsersChangePasswordResult>;
|
|
148
|
+
update: Command<UsersUpdateParams, UsersUpdateResult>;
|
|
149
|
+
createAddFundsRequest: Command<UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult>;
|
|
150
|
+
getAddFundsStatus: Command<UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult>;
|
|
151
|
+
create: Command<UsersCreateParams, UsersCreateResult>;
|
|
152
|
+
login: Command<UsersLoginParams, UsersLoginResult>;
|
|
153
|
+
resetPassword: Command<UsersResetPasswordParams, UsersResetPasswordResult>;
|
|
154
|
+
}>;
|
|
155
|
+
readonly usersAddress: Group<{
|
|
156
|
+
create: Command<UsersAddressCreateParams, UsersAddressCreateResult>;
|
|
157
|
+
delete: Command<UsersAddressDeleteParams, UsersAddressDeleteResult>;
|
|
158
|
+
getInfo: Command<UsersAddressGetInfoParams, UsersAddressGetInfoResult>;
|
|
159
|
+
getList: Command<Record<string, never>, UsersAddressGetListResult>;
|
|
160
|
+
setDefault: Command<UsersAddressSetDefaultParams, UsersAddressSetDefaultResult>;
|
|
161
|
+
update: Command<UsersAddressUpdateParams, UsersAddressUpdateResult>;
|
|
162
|
+
}>;
|
|
163
|
+
readonly whoisGuard: Group<{
|
|
164
|
+
changeEmailAddress: Command<WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult>;
|
|
165
|
+
enable: Command<WhoisguardEnableParams, WhoisguardEnableResult>;
|
|
166
|
+
disable: Command<WhoisguardDisableParams, WhoisguardDisableResult>;
|
|
167
|
+
getList: Command<WhoisguardGetListParams, WhoisguardGetListResult>;
|
|
168
|
+
renew: Command<WhoisguardRenewParams, WhoisguardRenewResult>;
|
|
169
|
+
}>;
|
|
170
|
+
constructor(config: TransportConfig);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
type ApiErrorItem = {
|
|
174
|
+
code: number;
|
|
175
|
+
message: string;
|
|
176
|
+
};
|
|
177
|
+
/** Thrown when the Namecheap API answers with `Status="ERROR"`. */
|
|
178
|
+
declare class NamecheapError extends Error {
|
|
179
|
+
readonly code: number;
|
|
180
|
+
readonly errors: readonly ApiErrorItem[];
|
|
181
|
+
constructor(errors: readonly ApiErrorItem[]);
|
|
182
|
+
}
|
|
183
|
+
/** Thrown when the HTTP request fails or answers with a non-2xx status. */
|
|
184
|
+
declare class NamecheapHttpError extends Error {
|
|
185
|
+
readonly status: number | undefined;
|
|
186
|
+
readonly statusText: string;
|
|
187
|
+
constructor(message: string, init?: {
|
|
188
|
+
status?: number;
|
|
189
|
+
statusText?: string;
|
|
190
|
+
cause?: unknown;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/** Thrown when a response body cannot be parsed or has an unexpected shape. */
|
|
194
|
+
declare class NamecheapParseError extends Error {
|
|
195
|
+
constructor(message: string, init?: {
|
|
196
|
+
cause?: unknown;
|
|
197
|
+
});
|
|
14
198
|
}
|
|
15
199
|
|
|
16
200
|
interface Paging {
|
|
17
201
|
totalItems: number;
|
|
18
202
|
currentPage: number;
|
|
19
203
|
pageSize: number;
|
|
20
|
-
paging: boolean;
|
|
21
204
|
}
|
|
22
205
|
|
|
23
|
-
|
|
206
|
+
type DomainsListType = "ALL" | "EXPIRING" | "EXPIRED";
|
|
207
|
+
type DomainsSortBy = "NAME" | "NAME_DESC" | "EXPIREDATE" | "EXPIREDATE_DESC" | "CREATEDATE" | "CREATEDATE_DESC";
|
|
208
|
+
interface DomainsGetListParams {
|
|
209
|
+
listType?: DomainsListType;
|
|
210
|
+
/** Keyword to look for in the domain list. */
|
|
211
|
+
searchTerm?: string;
|
|
212
|
+
page?: number;
|
|
213
|
+
/** Min 10, max 100. */
|
|
214
|
+
pageSize?: number;
|
|
215
|
+
sortBy?: DomainsSortBy;
|
|
216
|
+
}
|
|
217
|
+
interface DomainsListItem {
|
|
24
218
|
id: number;
|
|
25
219
|
name: string;
|
|
26
220
|
user: string;
|
|
@@ -31,943 +225,896 @@ interface DomainGetListResult {
|
|
|
31
225
|
autoRenew: boolean;
|
|
32
226
|
whoisGuard: string;
|
|
33
227
|
isPremium: boolean;
|
|
34
|
-
|
|
228
|
+
isOurDNS: boolean;
|
|
35
229
|
}
|
|
36
|
-
interface
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
admin: ContactDetail;
|
|
40
|
-
auxBilling: ContactDetail;
|
|
230
|
+
interface DomainsGetListResult {
|
|
231
|
+
domains: DomainsListItem[];
|
|
232
|
+
paging: Paging;
|
|
41
233
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
234
|
+
declare const getList$5: Command<DomainsGetListParams, DomainsGetListResult>;
|
|
235
|
+
interface DomainsCheckParams {
|
|
236
|
+
/** Comma-separated list of domains to check (max 50). */
|
|
237
|
+
domainList: string;
|
|
238
|
+
}
|
|
239
|
+
interface DomainsCheckItem {
|
|
240
|
+
domain: string;
|
|
241
|
+
available: boolean;
|
|
242
|
+
/** Present in recorded responses, not in the reference. */
|
|
243
|
+
errorNo?: number;
|
|
244
|
+
/** Present in recorded responses, not in the reference. */
|
|
245
|
+
description?: string;
|
|
246
|
+
isPremiumName: boolean;
|
|
247
|
+
premiumRegistrationPrice: number;
|
|
248
|
+
premiumRenewalPrice: number;
|
|
249
|
+
premiumRestorePrice: number;
|
|
250
|
+
premiumTransferPrice: number;
|
|
251
|
+
icannFee: number;
|
|
252
|
+
eapFee: number;
|
|
253
|
+
}
|
|
254
|
+
type DomainsCheckResult = DomainsCheckItem[];
|
|
255
|
+
declare const check: Command<DomainsCheckParams, DomainsCheckResult>;
|
|
256
|
+
interface DomainsGetRegistrarLockParams {
|
|
257
|
+
domainName: string;
|
|
258
|
+
}
|
|
259
|
+
interface DomainsGetRegistrarLockResult {
|
|
260
|
+
domain: string;
|
|
261
|
+
registrarLockStatus: boolean;
|
|
262
|
+
}
|
|
263
|
+
declare const getRegistrarLock: Command<DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult>;
|
|
264
|
+
type DomainsLockAction = "LOCK" | "UNLOCK";
|
|
265
|
+
interface DomainsSetRegistrarLockParams {
|
|
266
|
+
domainName: string;
|
|
267
|
+
/** Default: LOCK. */
|
|
268
|
+
lockAction?: DomainsLockAction;
|
|
269
|
+
}
|
|
270
|
+
interface DomainsSetRegistrarLockResult {
|
|
271
|
+
domain: string;
|
|
272
|
+
isSuccess: boolean;
|
|
273
|
+
}
|
|
274
|
+
declare const setRegistrarLock: Command<DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult>;
|
|
275
|
+
/**
|
|
276
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
277
|
+
*/
|
|
278
|
+
interface DomainsReactivateParams {
|
|
279
|
+
domainName: string;
|
|
280
|
+
promotionCode?: string;
|
|
281
|
+
/** Number of years to add after expiry. */
|
|
282
|
+
yearsToAdd?: number;
|
|
283
|
+
isPremiumDomain?: boolean;
|
|
284
|
+
/** Reactivation price for a premium domain. */
|
|
285
|
+
premiumPrice?: number | string;
|
|
286
|
+
}
|
|
287
|
+
interface DomainsReactivateResult {
|
|
288
|
+
domain: string;
|
|
289
|
+
isSuccess: boolean;
|
|
290
|
+
chargedAmount: number;
|
|
291
|
+
orderID: number;
|
|
292
|
+
transactionID: number;
|
|
293
|
+
}
|
|
294
|
+
declare const reactivate: Command<DomainsReactivateParams, DomainsReactivateResult>;
|
|
295
|
+
/**
|
|
296
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
297
|
+
*/
|
|
298
|
+
interface DomainsRenewParams {
|
|
299
|
+
domainName: string;
|
|
300
|
+
years: number;
|
|
301
|
+
promotionCode?: string;
|
|
302
|
+
isPremiumDomain?: boolean;
|
|
303
|
+
/** Renewal price for a premium domain. */
|
|
304
|
+
premiumPrice?: number | string;
|
|
305
|
+
}
|
|
306
|
+
interface DomainsRenewResult {
|
|
307
|
+
domainName: string;
|
|
308
|
+
domainID: number;
|
|
309
|
+
renew: boolean;
|
|
310
|
+
chargedAmount: number;
|
|
311
|
+
orderID: number;
|
|
312
|
+
transactionID: number;
|
|
313
|
+
domainDetails: {
|
|
314
|
+
/** Date and time as sent by the server, e.g. `12/14/2034 1:01:07 PM`. */
|
|
315
|
+
expiredDate: string;
|
|
316
|
+
numYears: number;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
declare const renew$2: Command<DomainsRenewParams, DomainsRenewResult>;
|
|
320
|
+
/**
|
|
321
|
+
* One contact block of a request. Nested under `registrant`, `tech`, `admin` or
|
|
322
|
+
* `auxBilling`, so `registrant.firstName` is sent as `RegistrantFirstName`.
|
|
323
|
+
*/
|
|
324
|
+
interface DomainsContactParams {
|
|
45
325
|
firstName: string;
|
|
46
326
|
lastName: string;
|
|
47
327
|
address1: string;
|
|
48
|
-
address2?: string;
|
|
49
328
|
city: string;
|
|
50
329
|
stateProvince: string;
|
|
51
|
-
|
|
52
|
-
postalCode: string | number;
|
|
330
|
+
postalCode: string;
|
|
53
331
|
country: string;
|
|
54
|
-
|
|
55
|
-
|
|
332
|
+
/** Format +NNN.NNNNNNNNNN. */
|
|
333
|
+
phone: string;
|
|
56
334
|
emailAddress: string;
|
|
57
|
-
|
|
58
|
-
|
|
335
|
+
organizationName?: string;
|
|
336
|
+
jobTitle?: string;
|
|
337
|
+
address2?: string;
|
|
59
338
|
}
|
|
60
|
-
interface
|
|
61
|
-
|
|
62
|
-
|
|
339
|
+
interface DomainsSetContactsParams {
|
|
340
|
+
domainName: string;
|
|
341
|
+
registrant: DomainsContactParams;
|
|
342
|
+
tech: DomainsContactParams;
|
|
343
|
+
admin: DomainsContactParams;
|
|
344
|
+
auxBilling: DomainsContactParams;
|
|
63
345
|
}
|
|
64
|
-
interface
|
|
65
|
-
currentAttributes: CurrentAttributes;
|
|
66
|
-
whoisGuardContact: Contacts & {
|
|
67
|
-
whoisGuardContact: boolean;
|
|
68
|
-
};
|
|
346
|
+
interface DomainsSetContactsResult {
|
|
69
347
|
domain: string;
|
|
70
|
-
|
|
348
|
+
isSuccess: boolean;
|
|
349
|
+
}
|
|
350
|
+
declare const setContacts: Command<DomainsSetContactsParams, DomainsSetContactsResult>;
|
|
351
|
+
/**
|
|
352
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
353
|
+
*/
|
|
354
|
+
interface DomainsCreateParams {
|
|
355
|
+
domainName: string;
|
|
356
|
+
years: number;
|
|
357
|
+
promotionCode?: string;
|
|
358
|
+
registrant: DomainsContactParams;
|
|
359
|
+
tech: DomainsContactParams;
|
|
360
|
+
admin: DomainsContactParams;
|
|
361
|
+
auxBilling: DomainsContactParams;
|
|
362
|
+
/** Comma-separated custom nameservers. */
|
|
363
|
+
nameservers?: string;
|
|
364
|
+
/** Add free domain privacy, `Yes` or `No`. Default: Yes. */
|
|
365
|
+
addFreeWhoisguard?: string;
|
|
366
|
+
/** Enable domain privacy, `Yes` or `No`. Default: No. */
|
|
367
|
+
wgEnabled?: string;
|
|
368
|
+
isPremiumDomain?: boolean;
|
|
369
|
+
/** Registration price for a premium domain. */
|
|
370
|
+
premiumPrice?: number | string;
|
|
371
|
+
/** Purchase fee for a premium domain during EAP. */
|
|
372
|
+
eapFee?: number | string;
|
|
71
373
|
}
|
|
72
|
-
interface
|
|
374
|
+
interface DomainsCreateResult {
|
|
73
375
|
domain: string;
|
|
74
376
|
registered: boolean;
|
|
75
377
|
chargedAmount: number;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
interface TLD {
|
|
87
|
-
value: string;
|
|
378
|
+
domainID: number;
|
|
379
|
+
orderID: number;
|
|
380
|
+
transactionID: number;
|
|
381
|
+
/** Present in recorded responses, not in the reference's response table. */
|
|
382
|
+
whoisguardEnable?: boolean;
|
|
383
|
+
/** Present in recorded responses, not in the reference's response table. */
|
|
384
|
+
nonRealTimeDomain?: boolean;
|
|
385
|
+
}
|
|
386
|
+
declare const create$5: Command<DomainsCreateParams, DomainsCreateResult>;
|
|
387
|
+
interface DomainsTld {
|
|
88
388
|
name: string;
|
|
89
|
-
|
|
389
|
+
nonRealTimeDomain: boolean;
|
|
90
390
|
minRegisterYears: number;
|
|
91
391
|
maxRegisterYears: number;
|
|
92
392
|
minRenewYears: number;
|
|
93
393
|
maxRenewYears: number;
|
|
94
|
-
renewalMinDays?: number;
|
|
95
|
-
renewalMaxDays?: number;
|
|
96
|
-
reactivateMaxDays?: number;
|
|
97
394
|
minTransferYears: number;
|
|
98
395
|
maxTransferYears: number;
|
|
99
396
|
isApiRegisterable: boolean;
|
|
100
397
|
isApiRenewable: boolean;
|
|
101
398
|
isApiTransferable: boolean;
|
|
102
399
|
isEppRequired: boolean;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
isIncludeInExtendedSearchOnly: boolean;
|
|
106
|
-
sequenceNumber: number;
|
|
107
|
-
type: string;
|
|
108
|
-
subType?: string;
|
|
109
|
-
isSupportsIdn: boolean;
|
|
110
|
-
category: string;
|
|
111
|
-
supportsRegistrarLock?: boolean;
|
|
112
|
-
addGracePeriodDays?: number;
|
|
113
|
-
whoisVerification?: boolean;
|
|
114
|
-
providerApiDelete?: boolean;
|
|
115
|
-
tldState?: string;
|
|
116
|
-
searchGroup?: string;
|
|
117
|
-
registry?: string;
|
|
118
|
-
categories?: Array<Category>;
|
|
119
|
-
}
|
|
120
|
-
interface DomainCheckResult {
|
|
121
|
-
domain: string;
|
|
122
|
-
available: boolean;
|
|
123
|
-
errorNo: number;
|
|
124
|
-
isPremiumName: boolean;
|
|
125
|
-
premiumRegistrationPrice: number;
|
|
126
|
-
premiumRenewalPrice: number;
|
|
127
|
-
premiumRestorePrice: number;
|
|
128
|
-
premiumTransferPrice: number;
|
|
129
|
-
icannFee: number;
|
|
130
|
-
eapFee: number;
|
|
131
|
-
}
|
|
132
|
-
interface DomainReactivateResult {
|
|
133
|
-
domain: string;
|
|
134
|
-
isSuccess: boolean;
|
|
135
|
-
chargedAmount: number;
|
|
136
|
-
orderId: number;
|
|
137
|
-
transactionId: number;
|
|
400
|
+
/** Text content of the `Tld` element, e.g. `.com domain`. */
|
|
401
|
+
description: string;
|
|
138
402
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
numYears: number;
|
|
143
|
-
domainDetails: boolean;
|
|
144
|
-
};
|
|
403
|
+
type DomainsGetTldListResult = DomainsTld[];
|
|
404
|
+
declare const getTldList: Command<Record<string, never>, DomainsGetTldListResult>;
|
|
405
|
+
interface DomainsGetContactsParams {
|
|
145
406
|
domainName: string;
|
|
146
|
-
domainId: number;
|
|
147
|
-
renew: true;
|
|
148
|
-
orderId: number;
|
|
149
|
-
transactionId: number;
|
|
150
|
-
chargedAmount: number;
|
|
151
407
|
}
|
|
152
|
-
|
|
408
|
+
/** A contact as returned by getContacts; the API omits fields it has no value for. */
|
|
409
|
+
interface DomainsContact {
|
|
410
|
+
organizationName?: string;
|
|
411
|
+
jobTitle?: string;
|
|
412
|
+
firstName?: string;
|
|
413
|
+
lastName?: string;
|
|
414
|
+
address1?: string;
|
|
415
|
+
address2?: string;
|
|
416
|
+
city?: string;
|
|
417
|
+
stateProvince?: string;
|
|
418
|
+
postalCode?: string;
|
|
419
|
+
country?: string;
|
|
420
|
+
phone?: string;
|
|
421
|
+
emailAddress?: string;
|
|
422
|
+
}
|
|
423
|
+
interface DomainsGetContactsResult {
|
|
153
424
|
domain: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
425
|
+
/** Sent as the lower-case attribute `domainnameid`. */
|
|
426
|
+
domainnameid: number;
|
|
427
|
+
readonly: boolean;
|
|
428
|
+
registrant?: DomainsContact;
|
|
429
|
+
tech?: DomainsContact;
|
|
430
|
+
admin?: DomainsContact;
|
|
431
|
+
auxBilling?: DomainsContact;
|
|
432
|
+
}
|
|
433
|
+
declare const getContacts: Command<DomainsGetContactsParams, DomainsGetContactsResult>;
|
|
434
|
+
interface DomainsGetInfoParams {
|
|
435
|
+
domainName: string;
|
|
436
|
+
/** Hosted domain name for which domain info is requested. */
|
|
437
|
+
hostName?: string;
|
|
158
438
|
}
|
|
159
|
-
interface
|
|
439
|
+
interface DomainsGetInfoResult {
|
|
440
|
+
/** Documented as OK, Locked or Expired; absent from the recorded response. */
|
|
441
|
+
status?: string;
|
|
442
|
+
id: number;
|
|
443
|
+
domainName: string;
|
|
444
|
+
ownerName: string;
|
|
445
|
+
isOwner: boolean;
|
|
446
|
+
isPremium: boolean;
|
|
160
447
|
domainDetails: {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
448
|
+
/** `MM/DD/YYYY`. */
|
|
449
|
+
createdDate?: string;
|
|
450
|
+
/** `MM/DD/YYYY`. */
|
|
451
|
+
expiredDate?: string;
|
|
452
|
+
numYears: number;
|
|
165
453
|
};
|
|
166
454
|
whoisguard: {
|
|
167
|
-
|
|
168
|
-
expiredDate: string;
|
|
455
|
+
/** `True`, `False` or `NotAlloted`. */
|
|
169
456
|
enabled: string;
|
|
457
|
+
/** 0 means not alloted. */
|
|
458
|
+
id: number;
|
|
459
|
+
expiredDate?: string;
|
|
460
|
+
emailDetails?: {
|
|
461
|
+
whoisGuardEmail: string;
|
|
462
|
+
forwardedTo: string;
|
|
463
|
+
lastAutoEmailChangeDate: string;
|
|
464
|
+
autoEmailChangeFrequencyDays: number;
|
|
465
|
+
};
|
|
170
466
|
};
|
|
171
|
-
premiumDnsSubscription
|
|
467
|
+
premiumDnsSubscription: {
|
|
172
468
|
useAutoRenew: boolean;
|
|
469
|
+
/** -1 means no subscription. */
|
|
173
470
|
subscriptionId: number;
|
|
471
|
+
/** ISO without zone; `0001-01-01T00:00:00` means never. */
|
|
174
472
|
createdDate: string;
|
|
175
473
|
expirationDate: string;
|
|
176
474
|
isActive: boolean;
|
|
177
|
-
premiumDnsSubscription: boolean;
|
|
178
475
|
};
|
|
179
476
|
dnsDetails: {
|
|
180
|
-
nameserver?: Array<string>;
|
|
181
477
|
providerType: string;
|
|
182
|
-
|
|
183
|
-
hostCount
|
|
184
|
-
emailType
|
|
185
|
-
|
|
186
|
-
isFailover
|
|
478
|
+
isUsingOurDNS: boolean;
|
|
479
|
+
hostCount: number;
|
|
480
|
+
emailType: string;
|
|
481
|
+
dynamicDNSStatus: boolean;
|
|
482
|
+
isFailover: boolean;
|
|
483
|
+
nameservers: string[];
|
|
187
484
|
};
|
|
188
485
|
modificationrights: {
|
|
189
|
-
all
|
|
486
|
+
all?: boolean;
|
|
487
|
+
rights: Array<{
|
|
488
|
+
type: string;
|
|
489
|
+
value: string;
|
|
490
|
+
}>;
|
|
190
491
|
};
|
|
191
|
-
status: string;
|
|
192
|
-
id: number;
|
|
193
|
-
domainName: string;
|
|
194
|
-
ownerName: string;
|
|
195
|
-
isOwner: boolean;
|
|
196
|
-
isPremium: boolean;
|
|
197
492
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
readonly MXE: "MXE";
|
|
216
|
-
readonly MX: "MX";
|
|
217
|
-
readonly FWD: "FWD";
|
|
218
|
-
readonly OX: "OX";
|
|
219
|
-
};
|
|
220
|
-
type EmailType = (typeof EmailType)[keyof typeof EmailType];
|
|
221
|
-
declare const LockAction: {
|
|
222
|
-
readonly Lock: "LOCK";
|
|
223
|
-
readonly Unlock: "UNLOCK";
|
|
224
|
-
};
|
|
225
|
-
type LockAction = (typeof LockAction)[keyof typeof LockAction];
|
|
226
|
-
declare const DomainListType: {
|
|
227
|
-
readonly All: "ALL";
|
|
228
|
-
readonly Expiring: "EXPIRING";
|
|
229
|
-
readonly Expired: "EXPIRED";
|
|
230
|
-
};
|
|
231
|
-
type DomainListType = (typeof DomainListType)[keyof typeof DomainListType];
|
|
232
|
-
declare const DomainListSortBy: {
|
|
233
|
-
readonly NameAsc: "NAME";
|
|
234
|
-
readonly NameDesc: "NAME_DESC";
|
|
235
|
-
readonly ExpireDateAsc: "EXPIREDATE";
|
|
236
|
-
readonly ExpireDateDesc: "EXPIREDATE_DESC";
|
|
237
|
-
readonly CreateDateAsc: "CREATEDATE";
|
|
238
|
-
readonly CreateDateDesc: "CREATEDATE_DESC";
|
|
239
|
-
};
|
|
240
|
-
type DomainListSortBy = (typeof DomainListSortBy)[keyof typeof DomainListSortBy];
|
|
241
|
-
declare const IdnCode: {
|
|
242
|
-
readonly AFR: "afr";
|
|
243
|
-
readonly ALB: "alb";
|
|
244
|
-
readonly ARA: "ara";
|
|
245
|
-
readonly ARG: "arg";
|
|
246
|
-
readonly ARM: "arm";
|
|
247
|
-
readonly ASM: "asm";
|
|
248
|
-
readonly AST: "ast";
|
|
249
|
-
readonly AVE: "ave";
|
|
250
|
-
readonly AWA: "awa";
|
|
251
|
-
readonly AZE: "aze";
|
|
252
|
-
readonly BAK: "bak";
|
|
253
|
-
readonly BAL: "bal";
|
|
254
|
-
readonly BAN: "ban";
|
|
255
|
-
readonly BAQ: "baq";
|
|
256
|
-
readonly BAS: "bas";
|
|
257
|
-
readonly BEL: "bel";
|
|
258
|
-
readonly BEN: "ben";
|
|
259
|
-
readonly BHO: "bho";
|
|
260
|
-
readonly BOS: "bos";
|
|
261
|
-
readonly BUL: "bul";
|
|
262
|
-
readonly BUR: "bur";
|
|
263
|
-
readonly CAR: "car";
|
|
264
|
-
readonly CAT: "cat";
|
|
265
|
-
readonly CHE: "che";
|
|
266
|
-
readonly CHI: "chi";
|
|
267
|
-
readonly CHV: "chv";
|
|
268
|
-
readonly COP: "cop";
|
|
269
|
-
readonly COS: "cos";
|
|
270
|
-
readonly CZE: "cze";
|
|
271
|
-
readonly DAN: "dan";
|
|
272
|
-
readonly DIV: "div";
|
|
273
|
-
readonly DOI: "doi";
|
|
274
|
-
readonly DUT: "dut";
|
|
275
|
-
readonly ENG: "eng";
|
|
276
|
-
readonly EST: "est";
|
|
277
|
-
readonly FAO: "fao";
|
|
278
|
-
readonly FIJ: "fij";
|
|
279
|
-
readonly FIN: "fin";
|
|
280
|
-
readonly FRE: "fre";
|
|
281
|
-
readonly FRY: "fry";
|
|
282
|
-
readonly GEO: "geo";
|
|
283
|
-
readonly GER: "ger";
|
|
284
|
-
readonly GLA: "gla";
|
|
285
|
-
readonly GLE: "gle";
|
|
286
|
-
readonly GON: "gon";
|
|
287
|
-
readonly GRE: "gre";
|
|
288
|
-
readonly GUJ: "guj";
|
|
289
|
-
readonly HEB: "heb";
|
|
290
|
-
readonly HIN: "hin";
|
|
291
|
-
readonly HUN: "hun";
|
|
292
|
-
readonly INC: "inc";
|
|
293
|
-
readonly IND: "ind";
|
|
294
|
-
readonly INH: "inh";
|
|
295
|
-
readonly ISL: "isl";
|
|
296
|
-
readonly ITA: "ita";
|
|
297
|
-
readonly JAV: "jav";
|
|
298
|
-
readonly JPN: "jpn";
|
|
299
|
-
readonly KAS: "kas";
|
|
300
|
-
readonly KAZ: "kaz";
|
|
301
|
-
readonly KHM: "khm";
|
|
302
|
-
readonly KIR: "kir";
|
|
303
|
-
readonly KOR: "kor";
|
|
304
|
-
readonly KUR: "kur";
|
|
305
|
-
readonly LAO: "lao";
|
|
306
|
-
readonly LAV: "lav";
|
|
307
|
-
readonly LIT: "lit";
|
|
308
|
-
readonly LTZ: "ltz";
|
|
309
|
-
readonly MAL: "mal";
|
|
310
|
-
readonly MKD: "mkd";
|
|
311
|
-
readonly MLT: "mlt";
|
|
312
|
-
readonly MOL: "mol";
|
|
313
|
-
readonly MON: "mon";
|
|
314
|
-
readonly MRI: "mri";
|
|
315
|
-
readonly MSA: "msa";
|
|
316
|
-
readonly NEP: "nep";
|
|
317
|
-
readonly NOR: "nor";
|
|
318
|
-
readonly ORI: "ori";
|
|
319
|
-
readonly OSS: "oss";
|
|
320
|
-
readonly PAN: "pan";
|
|
321
|
-
readonly PER: "per";
|
|
322
|
-
readonly POL: "pol";
|
|
323
|
-
readonly POR: "por";
|
|
324
|
-
readonly PUS: "pus";
|
|
325
|
-
readonly RAJ: "raj";
|
|
326
|
-
readonly RUM: "rum";
|
|
327
|
-
readonly RUS: "rus";
|
|
328
|
-
readonly SAN: "san";
|
|
329
|
-
readonly SCR: "scr";
|
|
330
|
-
readonly SIN: "sin";
|
|
331
|
-
readonly SLO: "slo";
|
|
332
|
-
readonly SLV: "slv";
|
|
333
|
-
readonly SMO: "smo";
|
|
334
|
-
readonly SND: "snd";
|
|
335
|
-
readonly SOM: "som";
|
|
336
|
-
readonly SPA: "spa";
|
|
337
|
-
readonly SRD: "srd";
|
|
338
|
-
readonly SRP: "srp";
|
|
339
|
-
readonly SWA: "swa";
|
|
340
|
-
readonly SWE: "swe";
|
|
341
|
-
readonly SYR: "syr";
|
|
342
|
-
readonly TAM: "tam";
|
|
343
|
-
readonly TEL: "tel";
|
|
344
|
-
readonly TGK: "tgk";
|
|
345
|
-
readonly THA: "tha";
|
|
346
|
-
readonly TIB: "tib";
|
|
347
|
-
readonly TUR: "tur";
|
|
348
|
-
readonly UKR: "ukr";
|
|
349
|
-
readonly URD: "urd";
|
|
350
|
-
readonly UZB: "uzb";
|
|
351
|
-
readonly VIE: "vie";
|
|
352
|
-
readonly WEL: "wel";
|
|
353
|
-
readonly YID: "yid";
|
|
354
|
-
};
|
|
355
|
-
type IdnCode = (typeof IdnCode)[keyof typeof IdnCode];
|
|
356
|
-
declare const DomainTransferListType: {
|
|
357
|
-
readonly All: "ALL";
|
|
358
|
-
readonly InProgress: "INPROGRESS";
|
|
359
|
-
readonly Cancelled: "CANCELLED";
|
|
360
|
-
readonly Completed: "COMPLETED";
|
|
493
|
+
declare const getInfo$3: Command<DomainsGetInfoParams, DomainsGetInfoResult>;
|
|
494
|
+
/**
|
|
495
|
+
* The command table behind `client.domains`. Advanced use only: it is exported for custom
|
|
496
|
+
* integrations and is not covered by semver stability.
|
|
497
|
+
*/
|
|
498
|
+
declare const domainsCommands: {
|
|
499
|
+
getList: Command<DomainsGetListParams, DomainsGetListResult>;
|
|
500
|
+
check: Command<DomainsCheckParams, DomainsCheckResult>;
|
|
501
|
+
getRegistrarLock: Command<DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult>;
|
|
502
|
+
setRegistrarLock: Command<DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult>;
|
|
503
|
+
reactivate: Command<DomainsReactivateParams, DomainsReactivateResult>;
|
|
504
|
+
renew: Command<DomainsRenewParams, DomainsRenewResult>;
|
|
505
|
+
setContacts: Command<DomainsSetContactsParams, DomainsSetContactsResult>;
|
|
506
|
+
create: Command<DomainsCreateParams, DomainsCreateResult>;
|
|
507
|
+
getTldList: Command<Record<string, never>, DomainsGetTldListResult>;
|
|
508
|
+
getContacts: Command<DomainsGetContactsParams, DomainsGetContactsResult>;
|
|
509
|
+
getInfo: Command<DomainsGetInfoParams, DomainsGetInfoResult>;
|
|
361
510
|
};
|
|
362
|
-
type DomainTransferListType = (typeof DomainTransferListType)[keyof typeof DomainTransferListType];
|
|
363
|
-
declare const DomainTransferSortBy: {
|
|
364
|
-
readonly DomainName: "DOMAINNAME";
|
|
365
|
-
readonly DomainNameDesc: "DOMAINNAME_DESC";
|
|
366
|
-
readonly TransferDate: "TRANSFERDATE";
|
|
367
|
-
readonly TransferDateDesc: "TRANSFERDATE_DESC";
|
|
368
|
-
readonly StatusDate: "STATUSDATE";
|
|
369
|
-
readonly StatusDateDesc: "STATUSDATE_DESC";
|
|
370
|
-
};
|
|
371
|
-
type DomainTransferSortBy = (typeof DomainTransferSortBy)[keyof typeof DomainTransferSortBy];
|
|
372
|
-
declare const SSLType: {
|
|
373
|
-
readonly PositiveSSL: "PositiveSSL";
|
|
374
|
-
readonly EssentialSSL: "EssentialSSL";
|
|
375
|
-
readonly InstantSSL: "InstantSSL";
|
|
376
|
-
readonly InstantSSLPro: "InstantSSL Pro";
|
|
377
|
-
readonly PremiumSSL: "PremiumSSL";
|
|
378
|
-
readonly EVSSL: "EV SSL";
|
|
379
|
-
readonly PositiveSSLWildcard: "PositiveSSL Wildcard";
|
|
380
|
-
readonly EssentialSSLWildcard: "EssentialSSL Wildcard";
|
|
381
|
-
readonly PremiumSSLWildcard: "PremiumSSL Wildcard";
|
|
382
|
-
readonly PositiveSSLMultiDomain: "PositiveSSL Multi Domain";
|
|
383
|
-
readonly MultiDomainSSL: "Multi Domain SSL";
|
|
384
|
-
readonly UnifiedCommunications: "Unified Communications";
|
|
385
|
-
readonly EVMultiDomainSSL: "EV Multi Domain SSL";
|
|
386
|
-
};
|
|
387
|
-
type SSLType = (typeof SSLType)[keyof typeof SSLType];
|
|
388
|
-
declare const SSLListType: {
|
|
389
|
-
readonly ALL: "ALL";
|
|
390
|
-
readonly Processing: "Processing";
|
|
391
|
-
readonly EmailSent: "EmailSent";
|
|
392
|
-
readonly TechnicalProblem: "TechnicalProblem";
|
|
393
|
-
readonly InProgress: "InProgress";
|
|
394
|
-
readonly Completed: "Completed";
|
|
395
|
-
readonly Deactivated: "Deactivated";
|
|
396
|
-
readonly Active: "Active";
|
|
397
|
-
readonly Cancelled: "Cancelled";
|
|
398
|
-
readonly NewPurchase: "NewPurchase";
|
|
399
|
-
readonly NewRenewal: "NewRenewal";
|
|
400
|
-
};
|
|
401
|
-
type SSLListType = (typeof SSLListType)[keyof typeof SSLListType];
|
|
402
|
-
declare const SSLListSortBy: {
|
|
403
|
-
readonly PurchaseDate: "PURCHASEDATE";
|
|
404
|
-
readonly PurchaseDateDesc: "PURCHASEDATE_DESC";
|
|
405
|
-
readonly SSLType: "SSLTYPE";
|
|
406
|
-
readonly SSLTypeDesc: "SSLTYPE_DESC";
|
|
407
|
-
readonly ExpireDateTime: "EXPIREDATETIME";
|
|
408
|
-
readonly ExpireDateTimeDesc: "EXPIREDATETIME_DESC";
|
|
409
|
-
readonly Hostname: "Host_Name";
|
|
410
|
-
readonly HostnameDesc: "Host_Name_DESC";
|
|
411
|
-
};
|
|
412
|
-
type SSLListSortBy = (typeof SSLListSortBy)[keyof typeof SSLListSortBy];
|
|
413
|
-
declare const UserProductType: {
|
|
414
|
-
readonly Domain: "DOMAIN";
|
|
415
|
-
readonly SslCertificate: "SSLCERTIFICATE";
|
|
416
|
-
};
|
|
417
|
-
type UserProductType = (typeof UserProductType)[keyof typeof UserProductType];
|
|
418
|
-
declare const UserProductCategory: {
|
|
419
|
-
readonly Domains: "DOMAINS";
|
|
420
|
-
readonly Comodo: "COMODO";
|
|
421
|
-
};
|
|
422
|
-
type UserProductCategory = (typeof UserProductCategory)[keyof typeof UserProductCategory];
|
|
423
|
-
declare const UserActionName: {
|
|
424
|
-
readonly Register: "REGISTER";
|
|
425
|
-
readonly Renew: "RENEW";
|
|
426
|
-
readonly Reactivate: "REACTIVATE";
|
|
427
|
-
readonly Transfer: "TRANSFER";
|
|
428
|
-
readonly Purchase: "PURCHASE";
|
|
429
|
-
};
|
|
430
|
-
type UserActionName = (typeof UserActionName)[keyof typeof UserActionName];
|
|
431
|
-
declare const UserProductName: {
|
|
432
|
-
readonly COM: "COM";
|
|
433
|
-
readonly InstantSsl: "INSTANTSSL";
|
|
434
|
-
};
|
|
435
|
-
type UserProductName = (typeof UserProductName)[keyof typeof UserProductName];
|
|
436
|
-
declare const UserPaymentType: {
|
|
437
|
-
readonly CreditCard: "Creditcard";
|
|
438
|
-
};
|
|
439
|
-
type UserPaymentType = (typeof UserPaymentType)[keyof typeof UserPaymentType];
|
|
440
|
-
declare const UserListFindBy: {
|
|
441
|
-
readonly EmailAddress: "EMAILADDRESS";
|
|
442
|
-
readonly DomainName: "DOMAINNAME";
|
|
443
|
-
readonly Username: "USERNAME";
|
|
444
|
-
};
|
|
445
|
-
type UserListFindBy = (typeof UserListFindBy)[keyof typeof UserListFindBy];
|
|
446
|
-
declare const WhoIsListType: {
|
|
447
|
-
readonly All: "ALL";
|
|
448
|
-
readonly Alloted: "ALLOTED";
|
|
449
|
-
readonly Free: "FREE";
|
|
450
|
-
readonly Discard: "DISCARD";
|
|
451
|
-
};
|
|
452
|
-
type WhoIsListType = (typeof WhoIsListType)[keyof typeof WhoIsListType];
|
|
453
|
-
declare const GetAddFundsStatus: {
|
|
454
|
-
readonly Created: "CREATED";
|
|
455
|
-
readonly Submitted: "SUBMITTED";
|
|
456
|
-
readonly Completed: "COMPLETED";
|
|
457
|
-
readonly Failed: "FAILED";
|
|
458
|
-
readonly Expired: "EXPIRED";
|
|
459
|
-
};
|
|
460
|
-
type GetAddFundsStatus = (typeof GetAddFundsStatus)[keyof typeof GetAddFundsStatus];
|
|
461
|
-
declare const DomainDnsTag: {
|
|
462
|
-
Issue: string;
|
|
463
|
-
IssueWild: string;
|
|
464
|
-
IODEF: string;
|
|
465
|
-
};
|
|
466
|
-
type DomainDnsTag = (typeof DomainDnsTag)[keyof typeof DomainDnsTag];
|
|
467
511
|
|
|
468
|
-
interface
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
sortBy?: DomainListSortBy;
|
|
474
|
-
}
|
|
475
|
-
interface CreateDomainParams extends Contacts {
|
|
476
|
-
domainName: string;
|
|
477
|
-
years: number;
|
|
478
|
-
promoCode?: string;
|
|
479
|
-
billing?: Partial<ContactDetail>;
|
|
480
|
-
idnCode?: IdnCode;
|
|
481
|
-
extendedAttributes?: string;
|
|
482
|
-
nameservers?: string;
|
|
483
|
-
addFreeWhoisguard?: string;
|
|
484
|
-
WGEnabled?: string;
|
|
485
|
-
isPremiumDomain?: boolean;
|
|
486
|
-
premiumPrice?: number;
|
|
487
|
-
eapFee?: number;
|
|
512
|
+
interface DnsSetDefaultParams {
|
|
513
|
+
/** SLD of the domain name. */
|
|
514
|
+
sld: string;
|
|
515
|
+
/** TLD of the domain name. */
|
|
516
|
+
tld: string;
|
|
488
517
|
}
|
|
489
|
-
interface
|
|
490
|
-
|
|
491
|
-
|
|
518
|
+
interface DnsSetDefaultResult {
|
|
519
|
+
domain: string;
|
|
520
|
+
updated: boolean;
|
|
492
521
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
522
|
+
declare const setDefault$1: Command<DnsSetDefaultParams, DnsSetDefaultResult>;
|
|
523
|
+
interface DnsSetCustomParams {
|
|
524
|
+
sld: string;
|
|
525
|
+
tld: string;
|
|
526
|
+
/** Comma-separated list of nameservers. */
|
|
527
|
+
nameservers: string;
|
|
499
528
|
}
|
|
500
|
-
interface
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
promotionCode?: string;
|
|
504
|
-
isPremiumDomain?: boolean;
|
|
505
|
-
premiumPrice?: number;
|
|
529
|
+
interface DnsSetCustomResult {
|
|
530
|
+
domain: string;
|
|
531
|
+
updated: boolean;
|
|
506
532
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Returns a list of domains for the particular user
|
|
513
|
-
* @note IMPORTANT: Namecheap API privacy service provider recently changed to WithheldforPrivacy. We want to avoid service interruption for namecheap API users, so please note that in some cases, you may still see Whoisguard in the API parameter names.
|
|
514
|
-
*/
|
|
515
|
-
getList(params?: GetListParams$1): Promise<{
|
|
516
|
-
data: Array<DomainGetListResult>;
|
|
517
|
-
paging: Paging;
|
|
518
|
-
}>;
|
|
519
|
-
/**
|
|
520
|
-
* Gets contact information for the requested domain
|
|
521
|
-
* @note IMPORTANT: Namecheap API privacy service provider recently changed to WithheldforPrivacy. We want to avoid service interruption for our API users, so please note that in some cases, you may still see Whoisguard in the API parameter names.
|
|
522
|
-
*/
|
|
523
|
-
getContacts(domainName: string): Promise<DomainContactsResult>;
|
|
524
|
-
/**
|
|
525
|
-
* Registers a new domain
|
|
526
|
-
* @note IMPORTANT: Namecheap API privacy service provider recently changed to WithheldforPrivacy. We want to avoid service interruption for our API users, so please note that in some cases, you may still see Whoisguard in the API parameter names.
|
|
527
|
-
* @note For successful registration of an IDN domain, you need to send the IdnCode parameter and provide the domain name in the Punycode format (Example: xn--sdkhjsdhfkdh.com), as we do not support native code.
|
|
528
|
-
*/
|
|
529
|
-
create(domain: string, params: Omit<CreateDomainParams, "domainName">): Promise<DomainCreateResult>;
|
|
530
|
-
/**
|
|
531
|
-
* Returns a list of TLDs
|
|
532
|
-
* @note IMPORTANT: Namecheap API privacy service provider recently changed to WithheldforPrivacy. We want to avoid service interruption for our API users, so please note that in some cases, you may still see Whoisguard in the API parameter names.
|
|
533
|
-
* @note We strongly recommend that you cache this API response to avoid repeated calls.
|
|
534
|
-
*
|
|
535
|
-
*/
|
|
536
|
-
getTldList(): Promise<Array<TLD>>;
|
|
537
|
-
/**
|
|
538
|
-
* Sets contact information for the requested domain
|
|
539
|
-
*/
|
|
540
|
-
setContacts(domain: string, params: Omit<ContactDomainParams, "domainName">): Promise<string>;
|
|
541
|
-
/**
|
|
542
|
-
* Checks the availability of domains
|
|
543
|
-
*/
|
|
544
|
-
check(domains: Array<string>): Promise<Array<DomainCheckResult>>;
|
|
545
|
-
/**
|
|
546
|
-
* Reactivates an expired domain
|
|
547
|
-
*/
|
|
548
|
-
reactivate(domain: string, params?: Omit<ReactivateDomainParams, "domainName">): Promise<DomainReactivateResult>;
|
|
549
|
-
/**
|
|
550
|
-
* Renews an expiring domain
|
|
551
|
-
*/
|
|
552
|
-
renew(domain: string, params: Omit<RenewDomainParams, "domainName">): Promise<DomainRenewResult>;
|
|
553
|
-
/**
|
|
554
|
-
* Gets the Registrar Lock status for the requested domain
|
|
555
|
-
*/
|
|
556
|
-
getRegistrarLock(domain: string): Promise<DomainGetRegistrarLockResult>;
|
|
557
|
-
/**
|
|
558
|
-
* Sets the Registrar Lock status for a domain
|
|
559
|
-
*/
|
|
560
|
-
setRegistrarLock(domain: string, lockAction?: LockAction): Promise<string>;
|
|
561
|
-
/**
|
|
562
|
-
* Returns information about the requested domain
|
|
563
|
-
* @note IMPORTANT: Namecheap API privacy service provider recently changed to WithheldforPrivacy. We want to avoid service interruption for Namecheap API users, so please note that in some cases, you may still see Whoisguard in the API parameter names.
|
|
564
|
-
*/
|
|
565
|
-
getInfo(domain: string, hostName?: string): Promise<DomainGetInfoResult>;
|
|
533
|
+
declare const setCustom: Command<DnsSetCustomParams, DnsSetCustomResult>;
|
|
534
|
+
interface DnsGetListParams {
|
|
535
|
+
sld: string;
|
|
536
|
+
tld: string;
|
|
566
537
|
}
|
|
567
|
-
|
|
568
|
-
interface DomainDnsGetListResult {
|
|
569
|
-
nameserver: Array<string>;
|
|
538
|
+
interface DnsGetListResult {
|
|
570
539
|
domain: string;
|
|
571
|
-
|
|
540
|
+
isUsingOurDNS: boolean;
|
|
541
|
+
/** Present in recorded responses, not in the reference. */
|
|
542
|
+
isPremiumDNS?: boolean;
|
|
543
|
+
/** Present in recorded responses, not in the reference. */
|
|
544
|
+
isUsingFreeDNS?: boolean;
|
|
545
|
+
/** Taken from the recorded responses (not in the reference's response table); empty when none are listed. */
|
|
546
|
+
nameservers: string[];
|
|
547
|
+
}
|
|
548
|
+
declare const getList$4: Command<DnsGetListParams, DnsGetListResult>;
|
|
549
|
+
interface DnsGetHostsParams {
|
|
550
|
+
sld: string;
|
|
551
|
+
tld: string;
|
|
572
552
|
}
|
|
573
|
-
interface
|
|
553
|
+
interface DnsHost {
|
|
554
|
+
/** The reference spells the attribute `HostID`; responses carry `HostId`. */
|
|
574
555
|
hostId: number;
|
|
575
556
|
name: string;
|
|
576
557
|
type: string;
|
|
577
558
|
address: string;
|
|
578
559
|
mxPref: number;
|
|
579
560
|
ttl: number;
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
561
|
+
/** Present in recorded responses, not in the reference. */
|
|
562
|
+
associatedAppTitle?: string;
|
|
563
|
+
/** Present in recorded responses, not in the reference. */
|
|
564
|
+
friendlyName?: string;
|
|
565
|
+
/** Present in recorded responses, not in the reference. */
|
|
566
|
+
isActive?: boolean;
|
|
567
|
+
/** Present in recorded responses, not in the reference. */
|
|
568
|
+
isDDNSEnabled?: boolean;
|
|
569
|
+
}
|
|
570
|
+
interface DnsGetHostsResult {
|
|
583
571
|
domain: string;
|
|
584
|
-
|
|
572
|
+
/** Present in recorded responses, not in the reference. */
|
|
573
|
+
emailType?: string;
|
|
574
|
+
isUsingOurDNS: boolean;
|
|
575
|
+
hosts: DnsHost[];
|
|
576
|
+
}
|
|
577
|
+
declare const getHosts: Command<DnsGetHostsParams, DnsGetHostsResult>;
|
|
578
|
+
interface DnsGetEmailForwardingParams {
|
|
579
|
+
/** Domain name to get settings for. */
|
|
580
|
+
domainName: string;
|
|
585
581
|
}
|
|
586
|
-
interface
|
|
587
|
-
value: string;
|
|
582
|
+
interface DnsEmailForward {
|
|
588
583
|
mailbox: string;
|
|
584
|
+
/** Present in recorded responses, not in the reference. */
|
|
585
|
+
forwardTo?: string;
|
|
589
586
|
}
|
|
590
|
-
interface
|
|
591
|
-
forward: Array<Forward>;
|
|
587
|
+
interface DnsGetEmailForwardingResult {
|
|
592
588
|
domain: string;
|
|
589
|
+
forwards: DnsEmailForward[];
|
|
593
590
|
}
|
|
594
|
-
|
|
595
|
-
|
|
591
|
+
declare const getEmailForwarding: Command<DnsGetEmailForwardingParams, DnsGetEmailForwardingResult>;
|
|
592
|
+
/** One forwarding rule, sent as `MailBox<n>` and `ForwardTo<n>`. */
|
|
593
|
+
interface DnsEmailForwardRecord {
|
|
594
|
+
/** Mailbox for email forwarding (e.g. `example@domain.com`). */
|
|
595
|
+
mailBox: string;
|
|
596
|
+
/** Email address to forward to (e.g. `example@gmail.com`). */
|
|
597
|
+
forwardTo: string;
|
|
598
|
+
}
|
|
599
|
+
interface DnsSetEmailForwardingParams {
|
|
596
600
|
domainName: string;
|
|
597
|
-
|
|
598
|
-
|
|
601
|
+
/** An empty list is allowed and clears the domain's email forwarding. */
|
|
602
|
+
forwards: DnsEmailForwardRecord[];
|
|
599
603
|
}
|
|
600
|
-
interface
|
|
601
|
-
|
|
602
|
-
|
|
604
|
+
interface DnsSetEmailForwardingResult {
|
|
605
|
+
domain: string;
|
|
606
|
+
isSuccess: boolean;
|
|
607
|
+
}
|
|
608
|
+
declare const setEmailForwarding: Command<DnsSetEmailForwardingParams, DnsSetEmailForwardingResult>;
|
|
609
|
+
type DnsRecordType = "A" | "AAAA" | "ALIAS" | "CAA" | "CNAME" | "MX" | "MXE" | "NS" | "TXT" | "URL" | "URL301" | "FRAME";
|
|
610
|
+
type DnsEmailType = "NONE" | "MXE" | "MX" | "FWD" | "OX" | "GMAIL";
|
|
611
|
+
/** One host record, sent as `HostName<n>`, `RecordType<n>`, `Address<n>`, `MXPref<n>`, `TTL<n>`. */
|
|
612
|
+
interface DnsHostRecord {
|
|
613
|
+
/** Sub-domain/hostname for the record. */
|
|
614
|
+
hostName: string;
|
|
615
|
+
recordType: DnsRecordType;
|
|
616
|
+
/** URL or IP address, depending on the record type. */
|
|
603
617
|
address: string;
|
|
604
|
-
|
|
618
|
+
/** MX preference (MX records only). Required by the reference, but optional on the wire. */
|
|
619
|
+
mxPref?: number;
|
|
620
|
+
/** Time to live (300-60000). */
|
|
605
621
|
ttl?: number;
|
|
606
622
|
}
|
|
607
|
-
interface
|
|
623
|
+
interface DnsSetHostsParams {
|
|
608
624
|
sld: string;
|
|
609
625
|
tld: string;
|
|
610
|
-
emailType?: EmailType;
|
|
611
|
-
flag?: number;
|
|
612
|
-
tag?: DomainDnsTag;
|
|
613
|
-
hostname: Array<string>;
|
|
614
|
-
ttl: Array<number>;
|
|
615
|
-
address: Array<string>;
|
|
616
|
-
mxpref: Array<string>;
|
|
617
|
-
recordType: Array<RecordType>;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
declare class DomainsDNS {
|
|
621
|
-
private readonly config;
|
|
622
|
-
constructor(config: NamecheapProps);
|
|
623
|
-
/**
|
|
624
|
-
* Sets domain to use namecheap api default DNS servers.
|
|
625
|
-
* Required for free services like Host record management, URL forwarding, email forwarding, dynamic dns and other value added services.
|
|
626
|
-
*/
|
|
627
|
-
setDefault(sld: string, tld: string): Promise<string>;
|
|
628
|
-
/**
|
|
629
|
-
* Sets domain to use custom DNS servers.
|
|
630
|
-
* @note Services like URL forwarding, Email forwarding, Dynamic DNS will not work for domains using custom nameservers
|
|
631
|
-
*/
|
|
632
|
-
setCustom(sld: string, tld: string, nameservers: Array<string>): Promise<string>;
|
|
633
|
-
/**
|
|
634
|
-
* Gets a list of DNS servers associated with the requested domain.
|
|
635
|
-
*/
|
|
636
|
-
getList(sld: string, tld: string): Promise<DomainDnsGetListResult>;
|
|
637
|
-
/**
|
|
638
|
-
* Retrieves DNS host record settings for the requested domain.
|
|
639
|
-
*/
|
|
640
|
-
getHosts(sld: string, tld: string): Promise<DomainDnsGetHostsResult>;
|
|
641
|
-
/**
|
|
642
|
-
* Gets email forwarding settings for the requested domain.
|
|
643
|
-
*/
|
|
644
|
-
getEmailForwarding(domain: string): Promise<DomainDnsGetEmailForwardingResult>;
|
|
645
626
|
/**
|
|
646
|
-
*
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
*
|
|
651
|
-
* @note If you set more than 10 hosts the request will be done by POST method otherwise by GET method.
|
|
652
|
-
* @note All host records that are not included into the API call will be deleted, so add them in addition to new host records.
|
|
627
|
+
* Omitted keeps the zone's current mode.
|
|
628
|
+
*
|
|
629
|
+
* @remarks The reference warns that MX records are silently discarded unless the
|
|
630
|
+
* resulting email mode is `MX`. `setHosts` replaces the whole zone, so a call that
|
|
631
|
+
* lists MX hosts under another mode loses the mail routing.
|
|
653
632
|
*/
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
633
|
+
emailType?: DnsEmailType;
|
|
634
|
+
/** Replaces the whole zone: records not listed are deleted, so at least one is required. */
|
|
635
|
+
hosts: [DnsHostRecord, ...DnsHostRecord[]];
|
|
657
636
|
}
|
|
658
|
-
|
|
659
|
-
interface GenericDomain {
|
|
637
|
+
interface DnsSetHostsResult {
|
|
660
638
|
domain: string;
|
|
639
|
+
/** Present in recorded responses, not in the reference. */
|
|
640
|
+
emailType?: string;
|
|
641
|
+
isSuccess: boolean;
|
|
642
|
+
}
|
|
643
|
+
declare const setHosts: Command<DnsSetHostsParams, DnsSetHostsResult>;
|
|
644
|
+
/**
|
|
645
|
+
* The command table behind `client.dns`. Advanced use only: it is exported for custom
|
|
646
|
+
* integrations and is not covered by semver stability.
|
|
647
|
+
*/
|
|
648
|
+
declare const dnsCommands: {
|
|
649
|
+
setDefault: Command<DnsSetDefaultParams, DnsSetDefaultResult>;
|
|
650
|
+
setCustom: Command<DnsSetCustomParams, DnsSetCustomResult>;
|
|
651
|
+
getList: Command<DnsGetListParams, DnsGetListResult>;
|
|
652
|
+
getHosts: Command<DnsGetHostsParams, DnsGetHostsResult>;
|
|
653
|
+
getEmailForwarding: Command<DnsGetEmailForwardingParams, DnsGetEmailForwardingResult>;
|
|
654
|
+
setEmailForwarding: Command<DnsSetEmailForwardingParams, DnsSetEmailForwardingResult>;
|
|
655
|
+
setHosts: Command<DnsSetHostsParams, DnsSetHostsResult>;
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
interface NsCreateParams {
|
|
659
|
+
/** SLD of the domain name. */
|
|
660
|
+
sld: string;
|
|
661
|
+
/** TLD of the domain name. */
|
|
662
|
+
tld: string;
|
|
663
|
+
/** Nameserver to create. */
|
|
661
664
|
nameserver: string;
|
|
665
|
+
/** Nameserver IP address. */
|
|
666
|
+
ip: string;
|
|
662
667
|
}
|
|
663
|
-
interface
|
|
668
|
+
interface NsCreateResult {
|
|
669
|
+
domain: string;
|
|
670
|
+
nameserver: string;
|
|
664
671
|
ip: string;
|
|
665
672
|
isSuccess: boolean;
|
|
666
673
|
}
|
|
667
|
-
|
|
674
|
+
declare const create$4: Command<NsCreateParams, NsCreateResult>;
|
|
675
|
+
interface NsDeleteParams {
|
|
676
|
+
sld: string;
|
|
677
|
+
tld: string;
|
|
678
|
+
/** Nameserver to delete. */
|
|
679
|
+
nameserver: string;
|
|
680
|
+
}
|
|
681
|
+
interface NsDeleteResult {
|
|
682
|
+
domain: string;
|
|
683
|
+
nameserver: string;
|
|
668
684
|
isSuccess: boolean;
|
|
669
685
|
}
|
|
670
|
-
|
|
671
|
-
|
|
686
|
+
declare const deleteNs: Command<NsDeleteParams, NsDeleteResult>;
|
|
687
|
+
interface NsGetInfoParams {
|
|
688
|
+
sld: string;
|
|
689
|
+
tld: string;
|
|
690
|
+
/** Nameserver to get info for. */
|
|
691
|
+
nameserver: string;
|
|
672
692
|
}
|
|
673
|
-
interface
|
|
693
|
+
interface NsGetInfoResult {
|
|
674
694
|
domain: string;
|
|
675
|
-
|
|
676
|
-
|
|
695
|
+
nameserver: string;
|
|
696
|
+
ip: string;
|
|
697
|
+
/** Present in recorded responses, not in the reference. */
|
|
698
|
+
nameserverStatuses?: string[];
|
|
677
699
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
700
|
+
declare const getInfo$2: Command<NsGetInfoParams, NsGetInfoResult>;
|
|
701
|
+
interface NsUpdateParams {
|
|
702
|
+
sld: string;
|
|
703
|
+
tld: string;
|
|
704
|
+
/** Nameserver to update. */
|
|
705
|
+
nameserver: string;
|
|
706
|
+
/** Existing IP address. */
|
|
707
|
+
oldIP: string;
|
|
708
|
+
/** New IP address. */
|
|
709
|
+
ip: string;
|
|
710
|
+
}
|
|
711
|
+
interface NsUpdateResult {
|
|
712
|
+
domain: string;
|
|
713
|
+
nameserver: string;
|
|
714
|
+
isSuccess: boolean;
|
|
686
715
|
}
|
|
716
|
+
declare const update$2: Command<NsUpdateParams, NsUpdateResult>;
|
|
717
|
+
/**
|
|
718
|
+
* The command table behind `client.ns`. Advanced use only: it is exported for custom
|
|
719
|
+
* integrations and is not covered by semver stability.
|
|
720
|
+
*/
|
|
721
|
+
declare const nsCommands: {
|
|
722
|
+
create: Command<NsCreateParams, NsCreateResult>;
|
|
723
|
+
delete: Command<NsDeleteParams, NsDeleteResult>;
|
|
724
|
+
getInfo: Command<NsGetInfoParams, NsGetInfoResult>;
|
|
725
|
+
update: Command<NsUpdateParams, NsUpdateResult>;
|
|
726
|
+
};
|
|
687
727
|
|
|
688
|
-
|
|
728
|
+
/**
|
|
729
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
730
|
+
*/
|
|
731
|
+
interface TransferCreateParams {
|
|
732
|
+
/** Domain name to transfer. */
|
|
689
733
|
domainName: string;
|
|
734
|
+
/** Should be set to 1 year only. */
|
|
690
735
|
years: number;
|
|
736
|
+
/** EPP (authorization) code, required for most TLDs. */
|
|
691
737
|
eppCode: string;
|
|
692
|
-
promotionCode
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
listType?: DomainTransferListType;
|
|
698
|
-
searchTerm?: string;
|
|
699
|
-
page?: number;
|
|
700
|
-
pageSize?: number;
|
|
701
|
-
sortBy?: DomainTransferSortBy;
|
|
738
|
+
promotionCode?: string;
|
|
739
|
+
/** Add free domain privacy, `Yes` or `No`. Default: Yes. */
|
|
740
|
+
addFreeWhoisguard?: string;
|
|
741
|
+
/** Enable domain privacy, `Yes` or `No`. Default: No. Sent as `WGenable`. */
|
|
742
|
+
wgEnable?: string;
|
|
702
743
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
orderId: number;
|
|
710
|
-
transactionId: number;
|
|
744
|
+
interface TransferCreateResult {
|
|
745
|
+
domainName: string;
|
|
746
|
+
transferID: number;
|
|
747
|
+
statusID: number;
|
|
748
|
+
orderID: number;
|
|
749
|
+
transactionID: number;
|
|
711
750
|
chargedAmount: number;
|
|
712
|
-
statusCode: number;
|
|
713
751
|
}
|
|
714
|
-
|
|
715
|
-
|
|
752
|
+
declare const create$3: Command<TransferCreateParams, TransferCreateResult>;
|
|
753
|
+
interface TransferGetStatusParams {
|
|
754
|
+
transferID: number;
|
|
755
|
+
}
|
|
756
|
+
interface TransferGetStatusResult {
|
|
757
|
+
transferID: number;
|
|
758
|
+
statusID: number;
|
|
716
759
|
status: string;
|
|
717
|
-
statusId: number;
|
|
718
760
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
761
|
+
declare const getStatus: Command<TransferGetStatusParams, TransferGetStatusResult>;
|
|
762
|
+
interface TransferUpdateStatusParams {
|
|
763
|
+
transferID: number;
|
|
764
|
+
/** `true` resubmits the transfer. */
|
|
765
|
+
resubmit: boolean;
|
|
766
|
+
}
|
|
767
|
+
interface TransferUpdateStatusResult {
|
|
768
|
+
transferID: number;
|
|
769
|
+
resubmit: boolean;
|
|
770
|
+
}
|
|
771
|
+
declare const updateStatus: Command<TransferUpdateStatusParams, TransferUpdateStatusResult>;
|
|
772
|
+
type TransferListType = "ALL" | "INPROGRESS" | "CANCELLED" | "COMPLETED";
|
|
773
|
+
type TransferSortBy = "DOMAINNAME" | "DOMAINNAME_DESC" | "TRANSFERDATE" | "TRANSFERDATE_DESC" | "STATUSDATE" | "STATUSDATE_DESC";
|
|
774
|
+
interface TransferGetListParams {
|
|
775
|
+
/** Default: ALL. */
|
|
776
|
+
listType?: TransferListType;
|
|
777
|
+
/** Keyword (domain name) to search. */
|
|
778
|
+
searchTerm?: string;
|
|
779
|
+
page?: number;
|
|
780
|
+
/** Min 10, max 100. */
|
|
781
|
+
pageSize?: number;
|
|
782
|
+
sortBy?: TransferSortBy;
|
|
783
|
+
}
|
|
784
|
+
interface TransferListItem {
|
|
785
|
+
transferID: number;
|
|
786
|
+
/** The reference spells this column `Domainname`; the fixture uses `DomainName`. */
|
|
787
|
+
domainName: string;
|
|
722
788
|
user: string;
|
|
723
789
|
transferDate: string;
|
|
724
|
-
|
|
725
|
-
|
|
790
|
+
orderID: number;
|
|
791
|
+
statusID: number;
|
|
726
792
|
status: string;
|
|
727
|
-
statusDate: string;
|
|
728
|
-
statusDescription: string;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
declare class DomainsTransfer {
|
|
732
|
-
private readonly config;
|
|
733
|
-
constructor(config: NamecheapProps);
|
|
734
|
-
create(domain: string, params: Omit<CreateTransferParams, "domainName">): Promise<DomainTransferCreateResult>;
|
|
735
|
-
getStatus(id: number): Promise<DomainTransferGetStatusResult>;
|
|
736
|
-
updateStatus(id: number, resubmit: boolean): Promise<number>;
|
|
737
|
-
getList(params?: GetListTransferParams): Promise<{
|
|
738
|
-
data: Array<TransferGetResult>;
|
|
739
|
-
paging: Paging;
|
|
740
|
-
}>;
|
|
741
793
|
}
|
|
794
|
+
interface TransferGetListResult {
|
|
795
|
+
transfers: TransferListItem[];
|
|
796
|
+
paging: Paging;
|
|
797
|
+
}
|
|
798
|
+
declare const getList$3: Command<TransferGetListParams, TransferGetListResult>;
|
|
799
|
+
/**
|
|
800
|
+
* The command table behind `client.transfer`. Advanced use only: it is exported for custom
|
|
801
|
+
* integrations and is not covered by semver stability.
|
|
802
|
+
*/
|
|
803
|
+
declare const transferCommands: {
|
|
804
|
+
create: Command<TransferCreateParams, TransferCreateResult>;
|
|
805
|
+
getStatus: Command<TransferGetStatusParams, TransferGetStatusResult>;
|
|
806
|
+
updateStatus: Command<TransferUpdateStatusParams, TransferUpdateStatusResult>;
|
|
807
|
+
getList: Command<TransferGetListParams, TransferGetListResult>;
|
|
808
|
+
};
|
|
742
809
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
810
|
+
/**
|
|
811
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
812
|
+
*/
|
|
813
|
+
interface SslCreateParams {
|
|
814
|
+
/** Number of years for the certificate. Allowed values: 1 to 5. */
|
|
815
|
+
years: number;
|
|
816
|
+
/** SSL product name. */
|
|
817
|
+
type: string;
|
|
818
|
+
/** Number of add-on domains for multi-domain certificates. Sent as `SANStoADD`. */
|
|
819
|
+
sansToAdd?: number;
|
|
748
820
|
promotionCode?: string;
|
|
749
821
|
}
|
|
750
|
-
|
|
751
|
-
|
|
822
|
+
/** Every field is optional: the response shape of this billed command is not documented. */
|
|
823
|
+
interface SslCreateResult {
|
|
824
|
+
isSuccess?: boolean;
|
|
825
|
+
orderID?: number;
|
|
826
|
+
transactionID?: number;
|
|
827
|
+
chargedAmount?: number;
|
|
828
|
+
certificateID?: number;
|
|
829
|
+
created?: string;
|
|
830
|
+
sslType?: string;
|
|
831
|
+
status?: string;
|
|
832
|
+
}
|
|
833
|
+
declare const create$2: Command<SslCreateParams, SslCreateResult>;
|
|
834
|
+
type SslListType = "ALL" | "Processing" | "EmailSent" | "TechnicalProblem" | "InProgress" | "Completed" | "Deactivated" | "Active" | "Cancelled" | "NewPurchase" | "NewRenewal";
|
|
835
|
+
type SslSortBy = "PURCHASEDATE" | "PURCHASEDATE_DESC" | "SSLTYPE" | "SSLTYPE_DESC" | "EXPIREDATETIME" | "EXPIREDATETIME_DESC" | "Host_Name" | "Host_Name_DESC";
|
|
836
|
+
interface SslGetListParams {
|
|
837
|
+
/** Default: ALL. */
|
|
838
|
+
listType?: SslListType;
|
|
839
|
+
/** Keyword to look for. */
|
|
752
840
|
searchTerm?: string;
|
|
753
841
|
page?: number;
|
|
842
|
+
/** Min 10, max 100. Default: 20. */
|
|
754
843
|
pageSize?: number;
|
|
755
|
-
sortBy?:
|
|
756
|
-
}
|
|
757
|
-
interface ActivateSSLCommonParams {
|
|
758
|
-
certificateId: number;
|
|
759
|
-
csr: string;
|
|
760
|
-
adminEmailAddress: string;
|
|
761
|
-
webServerType?: string;
|
|
762
|
-
uniqueValue?: string;
|
|
763
|
-
}
|
|
764
|
-
interface SSLDCVParams extends ActivateSSLCommonParams {
|
|
765
|
-
approverEmail?: string;
|
|
766
|
-
HTTPDCValidation?: boolean;
|
|
767
|
-
DNSDCValidation?: boolean;
|
|
768
|
-
}
|
|
769
|
-
interface SSLMultiDomainParams extends ActivateSSLCommonParams {
|
|
770
|
-
DNSNames?: string;
|
|
771
|
-
DNSApproverEmails?: string;
|
|
772
|
-
}
|
|
773
|
-
interface SSLOVAndEVParams extends ActivateSSLCommonParams {
|
|
774
|
-
adminOrganizationName?: string;
|
|
775
|
-
organizationDepartment?: string;
|
|
776
|
-
DNSNames?: string;
|
|
777
|
-
DNSApproverEmails?: string;
|
|
778
|
-
adminCountry?: string;
|
|
779
|
-
adminStateProvince?: string;
|
|
780
|
-
adminCity?: string;
|
|
781
|
-
adminAddress1?: string;
|
|
782
|
-
adminAddress2?: string;
|
|
783
|
-
adminPostalCode?: string;
|
|
784
|
-
adminPhone?: string;
|
|
785
|
-
organizationDUNS?: string;
|
|
786
|
-
}
|
|
787
|
-
interface SSLEVParams extends ActivateSSLCommonParams {
|
|
788
|
-
companyIncorporationCountry: string;
|
|
789
|
-
companyIncorporationStateProvince?: string;
|
|
790
|
-
companyIncorporationLocality?: string;
|
|
791
|
-
companyIncorporationDate?: string;
|
|
792
|
-
companyDBA?: string;
|
|
793
|
-
companyRegistrationNumber?: string;
|
|
794
|
-
}
|
|
795
|
-
interface SSLOVParams extends ActivateSSLCommonParams {
|
|
796
|
-
organizationRepFirstName?: string;
|
|
797
|
-
organizationRepLastName?: string;
|
|
798
|
-
organizationRepTitle?: string;
|
|
799
|
-
organizationRepPhone?: string;
|
|
800
|
-
organizationRepEmailAddress?: string;
|
|
801
|
-
}
|
|
802
|
-
type SSLParams = SSLDCVParams | SSLMultiDomainParams | SSLOVAndEVParams | SSLEVParams | SSLOVParams;
|
|
803
|
-
type ActivateSSLParams = SSLParams;
|
|
804
|
-
type ReissueSSLParams = SSLParams;
|
|
805
|
-
interface RenewSSLParams {
|
|
806
|
-
certificateId: number;
|
|
807
|
-
years: number;
|
|
808
|
-
sslType: SSLType;
|
|
809
|
-
promotionCode?: string;
|
|
844
|
+
sortBy?: SslSortBy;
|
|
810
845
|
}
|
|
811
|
-
interface
|
|
812
|
-
|
|
813
|
-
DCVMethod: string;
|
|
814
|
-
DNSNames: string;
|
|
815
|
-
DCVMethods: string;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
interface SSLCertificate {
|
|
819
|
-
certificateId: number;
|
|
820
|
-
created: string;
|
|
821
|
-
sslType: string;
|
|
822
|
-
years: number;
|
|
823
|
-
status: string;
|
|
824
|
-
}
|
|
825
|
-
interface SSLCreateResult {
|
|
826
|
-
sslCertificate: SSLCertificate;
|
|
827
|
-
isSuccess: boolean;
|
|
828
|
-
orderId: number;
|
|
829
|
-
transactionId: number;
|
|
830
|
-
chargedAmount: number;
|
|
831
|
-
}
|
|
832
|
-
interface SSLResult {
|
|
833
|
-
certificateId: number;
|
|
846
|
+
interface SslListItem {
|
|
847
|
+
certificateID: number;
|
|
834
848
|
hostName: string;
|
|
835
849
|
sslType: string;
|
|
836
850
|
purchaseDate: string;
|
|
837
851
|
expireDate: string;
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
status: string;
|
|
852
|
+
/** Present in the fixtures but not in the reference table. */
|
|
853
|
+
status?: string;
|
|
841
854
|
}
|
|
842
|
-
interface
|
|
855
|
+
interface SslGetListResult {
|
|
856
|
+
certificates: SslListItem[];
|
|
857
|
+
paging: Paging;
|
|
858
|
+
}
|
|
859
|
+
declare const getList$2: Command<SslGetListParams, SslGetListResult>;
|
|
860
|
+
interface SslParseCsrParams {
|
|
861
|
+
/** Certificate Signing Request (PEM text). Sent as the lowercase `csr`. */
|
|
862
|
+
csr: string;
|
|
863
|
+
certificateType?: string;
|
|
864
|
+
}
|
|
865
|
+
interface SslParseCsrResult {
|
|
843
866
|
commonName: string;
|
|
844
867
|
domainName: string;
|
|
845
868
|
country: string;
|
|
846
869
|
organisationUnit: string;
|
|
847
870
|
organisation: string;
|
|
848
|
-
validTrueDomain: boolean;
|
|
849
871
|
state: string;
|
|
850
872
|
locality: string;
|
|
851
873
|
email: string;
|
|
852
|
-
dnsNames: string;
|
|
853
|
-
csrDetails: boolean;
|
|
854
874
|
}
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
875
|
+
declare const parseCSR: Command<SslParseCsrParams, SslParseCsrResult>;
|
|
876
|
+
interface SslGetApproverEmailListParams {
|
|
877
|
+
domainName: string;
|
|
878
|
+
certificateType: string;
|
|
879
|
+
}
|
|
880
|
+
interface SslGetApproverEmailListResult {
|
|
881
|
+
/** Domain WHOIS email addresses (`Domainemails`). */
|
|
882
|
+
domainEmails: string[];
|
|
883
|
+
/** Generic email addresses for the domain (`Genericemails`). */
|
|
884
|
+
genericEmails: string[];
|
|
885
|
+
/** Additional emails from the provider (`Manualemails`). */
|
|
886
|
+
manualEmails: string[];
|
|
887
|
+
}
|
|
888
|
+
declare const getApproverEmailList: Command<SslGetApproverEmailListParams, SslGetApproverEmailListResult>;
|
|
889
|
+
interface SslHttpDcValidation {
|
|
890
|
+
/** True when HTTP_CSR_HASH was set for at least one domain. */
|
|
891
|
+
valueAvailable: boolean;
|
|
892
|
+
fileName?: string;
|
|
893
|
+
fileContent?: string;
|
|
894
|
+
}
|
|
895
|
+
interface SslActivateParams {
|
|
896
|
+
certificateID: number;
|
|
897
|
+
/** Certificate Signing Request (PEM text, may span several lines). */
|
|
898
|
+
csr: string;
|
|
899
|
+
/** Email to send the signed certificate file to. */
|
|
900
|
+
adminEmailAddress: string;
|
|
901
|
+
/** Server software type, e.g. `apacheopenssl`, `nginx`, `iis`. */
|
|
902
|
+
webServerType?: string;
|
|
903
|
+
uniqueValue?: string;
|
|
859
904
|
}
|
|
860
|
-
interface
|
|
861
|
-
httpDcValidation: {
|
|
862
|
-
fileName: string;
|
|
863
|
-
fileContent: string;
|
|
864
|
-
domain: string;
|
|
865
|
-
};
|
|
866
|
-
dnsdcValidation: {
|
|
867
|
-
hostName: string;
|
|
868
|
-
target: string;
|
|
869
|
-
domain: string;
|
|
870
|
-
};
|
|
905
|
+
interface SslActivateResult {
|
|
871
906
|
id: number;
|
|
872
907
|
isSuccess: boolean;
|
|
908
|
+
/** Present when the response carries an HTTP DCV block. */
|
|
909
|
+
httpDCValidation?: SslHttpDcValidation;
|
|
873
910
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
approverEmail: string;
|
|
878
|
-
commonName: string;
|
|
879
|
-
administratorName: string;
|
|
880
|
-
administratorEmail: string;
|
|
881
|
-
certificates: {
|
|
882
|
-
certificate: string;
|
|
883
|
-
caCertificates: Array<{
|
|
884
|
-
certificate: string;
|
|
885
|
-
type: string;
|
|
886
|
-
}>;
|
|
887
|
-
certificateReturned: boolean;
|
|
888
|
-
returnType: string;
|
|
889
|
-
};
|
|
890
|
-
certificateDetails: boolean;
|
|
891
|
-
};
|
|
892
|
-
provider: {
|
|
893
|
-
orderId: number;
|
|
894
|
-
name: string;
|
|
895
|
-
provider: boolean;
|
|
896
|
-
};
|
|
897
|
-
status: string;
|
|
898
|
-
statusDescription: string;
|
|
899
|
-
type: string;
|
|
900
|
-
issuedOn: string;
|
|
901
|
-
expires: string;
|
|
902
|
-
orderId: number;
|
|
903
|
-
replacedBy: number;
|
|
904
|
-
sansCount: number;
|
|
911
|
+
declare const activate: Command<SslActivateParams, SslActivateResult>;
|
|
912
|
+
interface SslResendApproverEmailParams {
|
|
913
|
+
certificateID: number;
|
|
905
914
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
sslType: string;
|
|
909
|
-
years: number;
|
|
910
|
-
orderId: number;
|
|
911
|
-
transactionId: number;
|
|
912
|
-
chargedAmount: number;
|
|
913
|
-
}
|
|
914
|
-
interface SSLPurchaseMoreSansResult {
|
|
915
|
-
sslCertificate: {
|
|
916
|
-
certificateId: number;
|
|
917
|
-
sslType: string;
|
|
918
|
-
years: number;
|
|
919
|
-
status: string;
|
|
920
|
-
sansCount: number;
|
|
921
|
-
};
|
|
922
|
-
isSuccess: boolean;
|
|
923
|
-
orderId: number;
|
|
924
|
-
transactionId: number;
|
|
925
|
-
chargedAmount: number;
|
|
926
|
-
}
|
|
927
|
-
interface SSLEditDcvMethodResult {
|
|
928
|
-
httpDcValidation: {
|
|
929
|
-
fileName: string;
|
|
930
|
-
fileContent: string;
|
|
931
|
-
valueAvailable: boolean;
|
|
932
|
-
};
|
|
933
|
-
dnsdcValidation: {
|
|
934
|
-
hostName: string;
|
|
935
|
-
target: string;
|
|
936
|
-
valueAvailable: boolean;
|
|
937
|
-
};
|
|
938
|
-
domains: {
|
|
939
|
-
domains: boolean;
|
|
940
|
-
};
|
|
915
|
+
/** The `{ id, isSuccess }` result shared by the two resend commands. */
|
|
916
|
+
interface SslResendResult {
|
|
941
917
|
id: number;
|
|
942
918
|
isSuccess: boolean;
|
|
943
919
|
}
|
|
944
|
-
|
|
945
|
-
declare
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
920
|
+
type SslResendApproverEmailResult = SslResendResult;
|
|
921
|
+
declare const resendApproverEmail: Command<SslResendApproverEmailParams, SslResendResult>;
|
|
922
|
+
interface SslReissueParams {
|
|
923
|
+
certificateID: number;
|
|
924
|
+
/** Certificate Signing Request (PEM text, may span several lines). */
|
|
925
|
+
csr: string;
|
|
926
|
+
/** Cannot be changed from the initial activation. */
|
|
927
|
+
adminEmailAddress?: string;
|
|
928
|
+
webServerType?: string;
|
|
929
|
+
uniqueValue?: string;
|
|
930
|
+
}
|
|
931
|
+
type SslReissueResult = SslActivateResult;
|
|
932
|
+
declare const reissue: Command<SslReissueParams, SslActivateResult>;
|
|
933
|
+
interface SslResendFulfillmentEmailParams {
|
|
934
|
+
certificateID: number;
|
|
935
|
+
}
|
|
936
|
+
type SslResendFulfillmentEmailResult = SslResendResult;
|
|
937
|
+
declare const resendFulfillmentEmail: Command<SslResendFulfillmentEmailParams, SslResendResult>;
|
|
938
|
+
/** Either one `dcvMethod` for the whole certificate, or `dnsNames` plus `dcvMethods` per domain. */
|
|
939
|
+
type SslEditDcvMethodParams = {
|
|
940
|
+
certificateID: number;
|
|
941
|
+
/** DCV method used to validate domain control. */
|
|
942
|
+
dcvMethod: string;
|
|
943
|
+
} | {
|
|
944
|
+
certificateID: number;
|
|
945
|
+
/** Comma-separated list of domain names. */
|
|
946
|
+
dnsNames: string;
|
|
947
|
+
/** Comma-separated list of DCV methods, one per domain name. */
|
|
948
|
+
dcvMethods: string;
|
|
949
|
+
};
|
|
950
|
+
type SslEditDcvMethodResult = SslActivateResult;
|
|
951
|
+
declare const editDCVMethod: Command<SslEditDcvMethodParams, SslActivateResult>;
|
|
952
|
+
type SslReturnType = "Individual" | "PKCS7";
|
|
953
|
+
interface SslGetInfoParams {
|
|
954
|
+
certificateID: number;
|
|
955
|
+
/**
|
|
956
|
+
* Flag for returning the certificate in the response. Sent as `Returncertificate`.
|
|
957
|
+
*
|
|
958
|
+
* @remarks The response shape for the certificate body is undocumented, so 1.0 does
|
|
959
|
+
* not parse it: the result never contains the certificate.
|
|
960
|
+
*/
|
|
961
|
+
returnCertificate?: string;
|
|
962
|
+
/** Format of the returned certificate. Sent as `Returntype`. */
|
|
963
|
+
returnType?: SslReturnType;
|
|
964
|
+
}
|
|
965
|
+
interface SslGetInfoResult {
|
|
966
|
+
certificateID: number;
|
|
967
|
+
/** For example `Active`, `Newpurchase`, `Purchased`, `Cancelled`. */
|
|
968
|
+
status: string;
|
|
969
|
+
/** The attributes below are in the fixture but not in the reference. */
|
|
970
|
+
type?: string;
|
|
971
|
+
commonName?: string;
|
|
972
|
+
provider?: string;
|
|
973
|
+
issuedOn?: string;
|
|
974
|
+
expires?: string;
|
|
975
|
+
}
|
|
976
|
+
declare const getInfo$1: Command<SslGetInfoParams, SslGetInfoResult>;
|
|
977
|
+
/**
|
|
978
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
979
|
+
*/
|
|
980
|
+
interface SslRenewParams {
|
|
981
|
+
certificateID: number;
|
|
982
|
+
/** Allowed values: 1 to 5. */
|
|
983
|
+
years: number;
|
|
984
|
+
/** SSL product name. */
|
|
985
|
+
sslType: string;
|
|
986
|
+
promotionCode?: string;
|
|
961
987
|
}
|
|
988
|
+
/** Every field is optional: the response shape of this billed command is not documented. */
|
|
989
|
+
interface SslRenewResult {
|
|
990
|
+
certificateID?: number;
|
|
991
|
+
years?: number;
|
|
992
|
+
orderID?: number;
|
|
993
|
+
transactionID?: number;
|
|
994
|
+
chargedAmount?: number;
|
|
995
|
+
}
|
|
996
|
+
declare const renew$1: Command<SslRenewParams, SslRenewResult>;
|
|
997
|
+
/**
|
|
998
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
999
|
+
*/
|
|
1000
|
+
interface SslPurchaseMoreSansParams {
|
|
1001
|
+
certificateID: number;
|
|
1002
|
+
/** Number of add-on domains to order. Sent as `NumberOfSANSToAdd`. */
|
|
1003
|
+
numberOfSansToAdd: number;
|
|
1004
|
+
}
|
|
1005
|
+
/** Every field is optional: the response shape of this billed command is not documented. */
|
|
1006
|
+
interface SslPurchaseMoreSansResult {
|
|
1007
|
+
isSuccess?: boolean;
|
|
1008
|
+
orderID?: number;
|
|
1009
|
+
transactionID?: number;
|
|
1010
|
+
chargedAmount?: number;
|
|
1011
|
+
certificateID?: number;
|
|
1012
|
+
sslType?: string;
|
|
1013
|
+
/** Number of add-on domains (`SANSCount`). */
|
|
1014
|
+
sansCount?: number;
|
|
1015
|
+
}
|
|
1016
|
+
declare const purchaseMoreSans: Command<SslPurchaseMoreSansParams, SslPurchaseMoreSansResult>;
|
|
1017
|
+
/**
|
|
1018
|
+
* @remarks Irreversible: a revoked certificate cannot be restored.
|
|
1019
|
+
*/
|
|
1020
|
+
interface SslRevokeCertificateParams {
|
|
1021
|
+
certificateID: number;
|
|
1022
|
+
certificateType: string;
|
|
1023
|
+
}
|
|
1024
|
+
interface SslRevokeCertificateResult {
|
|
1025
|
+
isSuccess: boolean;
|
|
1026
|
+
certificateID: number;
|
|
1027
|
+
}
|
|
1028
|
+
declare const revokeCertificate: Command<SslRevokeCertificateParams, SslRevokeCertificateResult>;
|
|
1029
|
+
/**
|
|
1030
|
+
* The command table behind `client.ssl`. Advanced use only: it is exported for custom
|
|
1031
|
+
* integrations and is not covered by semver stability.
|
|
1032
|
+
*/
|
|
1033
|
+
declare const sslCommands: {
|
|
1034
|
+
create: Command<SslCreateParams, SslCreateResult>;
|
|
1035
|
+
getList: Command<SslGetListParams, SslGetListResult>;
|
|
1036
|
+
parseCSR: Command<SslParseCsrParams, SslParseCsrResult>;
|
|
1037
|
+
getApproverEmailList: Command<SslGetApproverEmailListParams, SslGetApproverEmailListResult>;
|
|
1038
|
+
activate: Command<SslActivateParams, SslActivateResult>;
|
|
1039
|
+
resendApproverEmail: Command<SslResendApproverEmailParams, SslResendResult>;
|
|
1040
|
+
reissue: Command<SslReissueParams, SslActivateResult>;
|
|
1041
|
+
resendFulfillmentEmail: Command<SslResendFulfillmentEmailParams, SslResendResult>;
|
|
1042
|
+
editDCVMethod: Command<SslEditDcvMethodParams, SslActivateResult>;
|
|
1043
|
+
getInfo: Command<SslGetInfoParams, SslGetInfoResult>;
|
|
1044
|
+
renew: Command<SslRenewParams, SslRenewResult>;
|
|
1045
|
+
purchaseMoreSans: Command<SslPurchaseMoreSansParams, SslPurchaseMoreSansResult>;
|
|
1046
|
+
revokeCertificate: Command<SslRevokeCertificateParams, SslRevokeCertificateResult>;
|
|
1047
|
+
};
|
|
962
1048
|
|
|
963
|
-
interface
|
|
964
|
-
|
|
965
|
-
|
|
1049
|
+
interface UsersGetBalancesResult {
|
|
1050
|
+
currency: string;
|
|
1051
|
+
availableBalance: string;
|
|
1052
|
+
accountBalance: string;
|
|
1053
|
+
earnedAmount: string;
|
|
1054
|
+
withdrawableAmount: string;
|
|
1055
|
+
fundsRequiredForAutoRenew: string;
|
|
1056
|
+
}
|
|
1057
|
+
declare const getBalances: Command<Record<string, never>, UsersGetBalancesResult>;
|
|
1058
|
+
interface UsersGetPricingParams {
|
|
1059
|
+
/** Product type, e.g. `DOMAIN` or `SSLCERTIFICATE` (the reference gives examples, not a closed set). */
|
|
1060
|
+
productType: string;
|
|
1061
|
+
productCategory?: string;
|
|
966
1062
|
promotionCode?: string;
|
|
967
|
-
|
|
968
|
-
|
|
1063
|
+
/** Action, e.g. `REGISTER`, `RENEW` or `TRANSFER` (examples, not a closed set). */
|
|
1064
|
+
actionName?: string;
|
|
1065
|
+
productName?: string;
|
|
969
1066
|
}
|
|
970
|
-
interface
|
|
1067
|
+
interface PricingPrice {
|
|
1068
|
+
duration: number;
|
|
1069
|
+
durationType: string;
|
|
1070
|
+
/** Final price. May be an empty string. */
|
|
1071
|
+
price: string;
|
|
1072
|
+
regularPrice: string;
|
|
1073
|
+
yourPrice: string;
|
|
1074
|
+
currency: string;
|
|
1075
|
+
/** Present in the fixture but not in the reference table. */
|
|
1076
|
+
pricingType?: string;
|
|
1077
|
+
/** Present in the fixture but not in the reference table. */
|
|
1078
|
+
regularPriceType?: string;
|
|
1079
|
+
/** Present in the fixture but not in the reference table. */
|
|
1080
|
+
yourPriceType?: string;
|
|
1081
|
+
/** Documented; present only when a promotion applies to the tier. */
|
|
1082
|
+
promotionPrice?: string;
|
|
1083
|
+
}
|
|
1084
|
+
interface PricingProduct {
|
|
1085
|
+
name: string;
|
|
1086
|
+
prices: PricingPrice[];
|
|
1087
|
+
}
|
|
1088
|
+
interface PricingProductCategory {
|
|
1089
|
+
name: string;
|
|
1090
|
+
products: PricingProduct[];
|
|
1091
|
+
}
|
|
1092
|
+
interface PricingProductType {
|
|
1093
|
+
name: string;
|
|
1094
|
+
productCategories: PricingProductCategory[];
|
|
1095
|
+
}
|
|
1096
|
+
interface UsersGetPricingResult {
|
|
1097
|
+
productTypes: PricingProductType[];
|
|
1098
|
+
}
|
|
1099
|
+
declare const getPricing: Command<UsersGetPricingParams, UsersGetPricingResult>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Credential-bearing: changes the password of a real account. Either the old
|
|
1102
|
+
* password (method 1) or a reset code from `resetPassword` (method 2).
|
|
1103
|
+
*/
|
|
1104
|
+
type UsersChangePasswordParams = {
|
|
1105
|
+
oldPassword: string;
|
|
1106
|
+
newPassword: string;
|
|
1107
|
+
} | {
|
|
1108
|
+
resetCode: string;
|
|
1109
|
+
newPassword: string;
|
|
1110
|
+
};
|
|
1111
|
+
/** Never echoes a password or reset code. */
|
|
1112
|
+
interface UsersChangePasswordResult {
|
|
1113
|
+
success: boolean;
|
|
1114
|
+
userID: number;
|
|
1115
|
+
}
|
|
1116
|
+
declare const changePassword: Command<UsersChangePasswordParams, UsersChangePasswordResult>;
|
|
1117
|
+
interface UsersUpdateParams {
|
|
971
1118
|
firstName: string;
|
|
972
1119
|
lastName: string;
|
|
973
1120
|
jobTitle?: string;
|
|
@@ -977,26 +1124,63 @@ interface UpdateParams {
|
|
|
977
1124
|
city: string;
|
|
978
1125
|
stateProvince: string;
|
|
979
1126
|
zip: string;
|
|
1127
|
+
/** Two-letter country code. */
|
|
980
1128
|
country: string;
|
|
981
1129
|
emailAddress: string;
|
|
1130
|
+
/** Format +NNN.NNNNNNNNNN. */
|
|
982
1131
|
phone: string;
|
|
983
1132
|
phoneExt?: string;
|
|
1133
|
+
/** Format +NNN.NNNNNNNNNN. */
|
|
984
1134
|
fax?: string;
|
|
985
1135
|
}
|
|
986
|
-
interface
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1136
|
+
interface UsersUpdateResult {
|
|
1137
|
+
success: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
declare const update$1: Command<UsersUpdateParams, UsersUpdateResult>;
|
|
1140
|
+
/** The only documented payment type. */
|
|
1141
|
+
type UsersPaymentType = "Creditcard";
|
|
1142
|
+
/**
|
|
1143
|
+
* The documented `Username` parameter is not exposed: the transport always sends
|
|
1144
|
+
* the configured account as `UserName`.
|
|
1145
|
+
*
|
|
1146
|
+
* @remarks Billed: this command creates a request to add money to your Namecheap account balance.
|
|
1147
|
+
*/
|
|
1148
|
+
interface UsersCreateAddFundsRequestParams {
|
|
1149
|
+
paymentType: UsersPaymentType;
|
|
1150
|
+
/** Amount to add. */
|
|
1151
|
+
amount: number | string;
|
|
1152
|
+
/** URL to redirect the user to after payment. Sent as `ReturnUrl`. */
|
|
990
1153
|
returnUrl: string;
|
|
991
1154
|
}
|
|
992
|
-
interface
|
|
1155
|
+
interface UsersCreateAddFundsRequestResult {
|
|
1156
|
+
tokenID: string;
|
|
1157
|
+
redirectURL: string;
|
|
1158
|
+
returnURL: string;
|
|
1159
|
+
}
|
|
1160
|
+
declare const createAddFundsRequest: Command<UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult>;
|
|
1161
|
+
interface UsersGetAddFundsStatusParams {
|
|
1162
|
+
/** Token from `createAddFundsRequest`. Sent as `TokenId` (not `TokenID`). */
|
|
1163
|
+
tokenId: string;
|
|
1164
|
+
}
|
|
1165
|
+
interface UsersGetAddFundsStatusResult {
|
|
1166
|
+
transactionID: number;
|
|
1167
|
+
amount: string;
|
|
1168
|
+
/** One of CREATED, SUBMITTED, COMPLETED, FAILED, EXPIRED. */
|
|
1169
|
+
status: string;
|
|
1170
|
+
}
|
|
1171
|
+
declare const getAddFundsStatus: Command<UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult>;
|
|
1172
|
+
/** Credential-bearing: creates a real account under the ApiUser with its password. */
|
|
1173
|
+
interface UsersCreateParams {
|
|
993
1174
|
newUserName: string;
|
|
994
1175
|
newUserPassword: string;
|
|
995
1176
|
emailAddress: string;
|
|
1177
|
+
/** Whether to skip the duplicate e-mail check. Default: Yes. */
|
|
996
1178
|
ignoreDuplicateEmailAddress?: string;
|
|
997
1179
|
firstName: string;
|
|
998
1180
|
lastName: string;
|
|
1181
|
+
/** Must be 1 to accept the terms. */
|
|
999
1182
|
acceptTerms: number;
|
|
1183
|
+
/** 1 to receive newsletters, 0 to opt out. */
|
|
1000
1184
|
acceptNews?: number;
|
|
1001
1185
|
jobTitle?: string;
|
|
1002
1186
|
organization?: string;
|
|
@@ -1005,117 +1189,128 @@ interface CreateUserParams {
|
|
|
1005
1189
|
city: string;
|
|
1006
1190
|
stateProvince: string;
|
|
1007
1191
|
zip: string;
|
|
1192
|
+
/** Two-letter country code. */
|
|
1008
1193
|
country: string;
|
|
1194
|
+
/** Format +NNN.NNNNNNNNNN. */
|
|
1009
1195
|
phone: string;
|
|
1010
1196
|
phoneExt?: string;
|
|
1011
1197
|
fax?: string;
|
|
1012
1198
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1199
|
+
/**
|
|
1200
|
+
* Neither the reference nor the SDK documents a response for this command, so the
|
|
1201
|
+
* attributes of the first element inside `CommandResponse` are returned as-is
|
|
1202
|
+
* (empty when there is none). Parsing never throws: the account may already exist.
|
|
1203
|
+
*/
|
|
1204
|
+
type UsersCreateResult = Record<string, string>;
|
|
1205
|
+
declare const create$1: Command<UsersCreateParams, UsersCreateResult>;
|
|
1206
|
+
/**
|
|
1207
|
+
* Credential-bearing. Validates the password of an account created via
|
|
1208
|
+
* `users.create` (the account is the configured `userName`).
|
|
1209
|
+
*/
|
|
1210
|
+
interface UsersLoginParams {
|
|
1211
|
+
password: string;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* The response shape is not documented anywhere; the documented attributes are read
|
|
1215
|
+
* from the first element inside `CommandResponse`, whatever its name, and left
|
|
1216
|
+
* out when absent.
|
|
1217
|
+
*/
|
|
1218
|
+
interface UsersLoginResult {
|
|
1219
|
+
username?: string;
|
|
1220
|
+
loginSuccess?: boolean;
|
|
1221
|
+
}
|
|
1222
|
+
declare const login: Command<UsersLoginParams, UsersLoginResult>;
|
|
1223
|
+
type UsersResetPasswordFindBy = "EMAILADDRESS" | "DOMAINNAME" | "USERNAME";
|
|
1224
|
+
/** Credential-bearing: e-mails a password reset link for a real account. */
|
|
1225
|
+
interface UsersResetPasswordParams {
|
|
1226
|
+
findBy: UsersResetPasswordFindBy;
|
|
1227
|
+
/** The username, e-mail address or domain to search by. */
|
|
1015
1228
|
findByValue: string;
|
|
1229
|
+
/** Sender name in the reset e-mail. Default: namecheap.com. */
|
|
1016
1230
|
emailFromName?: string;
|
|
1231
|
+
/** Sender address. Default: support@namecheap.com. */
|
|
1017
1232
|
emailFrom?: string;
|
|
1233
|
+
/** URL pattern containing the `[RESETCODE]` placeholder. Sent as `URLPattern`. */
|
|
1018
1234
|
urlPattern?: string;
|
|
1019
1235
|
}
|
|
1236
|
+
/** The response shape is not documented anywhere; read tolerantly from the first child of `CommandResponse`. */
|
|
1237
|
+
interface UsersResetPasswordResult {
|
|
1238
|
+
success?: boolean;
|
|
1239
|
+
}
|
|
1240
|
+
declare const resetPassword: Command<UsersResetPasswordParams, UsersResetPasswordResult>;
|
|
1241
|
+
/**
|
|
1242
|
+
* The command table behind `client.users`. Advanced use only: it is exported for custom
|
|
1243
|
+
* integrations and is not covered by semver stability.
|
|
1244
|
+
*/
|
|
1245
|
+
declare const usersCommands: {
|
|
1246
|
+
getBalances: Command<Record<string, never>, UsersGetBalancesResult>;
|
|
1247
|
+
getPricing: Command<UsersGetPricingParams, UsersGetPricingResult>;
|
|
1248
|
+
changePassword: Command<UsersChangePasswordParams, UsersChangePasswordResult>;
|
|
1249
|
+
update: Command<UsersUpdateParams, UsersUpdateResult>;
|
|
1250
|
+
createAddFundsRequest: Command<UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult>;
|
|
1251
|
+
getAddFundsStatus: Command<UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult>;
|
|
1252
|
+
create: Command<UsersCreateParams, UsersCreateResult>;
|
|
1253
|
+
login: Command<UsersLoginParams, UsersLoginResult>;
|
|
1254
|
+
resetPassword: Command<UsersResetPasswordParams, UsersResetPasswordResult>;
|
|
1255
|
+
};
|
|
1020
1256
|
|
|
1021
|
-
interface
|
|
1022
|
-
|
|
1023
|
-
durationType: string;
|
|
1024
|
-
price: number;
|
|
1025
|
-
regularPrice: number;
|
|
1026
|
-
yourPrice: number;
|
|
1027
|
-
currency: string;
|
|
1028
|
-
}
|
|
1029
|
-
interface ProductCategory {
|
|
1030
|
-
product: Array<Product>;
|
|
1031
|
-
name: string;
|
|
1032
|
-
}
|
|
1033
|
-
interface UserGetPricingResult {
|
|
1034
|
-
productCategory: Array<ProductCategory>;
|
|
1035
|
-
name: string;
|
|
1036
|
-
}
|
|
1037
|
-
interface UserGetBalancesResult {
|
|
1038
|
-
currency: string;
|
|
1039
|
-
availableBalance: number;
|
|
1040
|
-
accountBalance: number;
|
|
1041
|
-
earnedAmount: number;
|
|
1042
|
-
withdrawableAmount: number;
|
|
1043
|
-
fundsRequiredForAutoRenew: number;
|
|
1044
|
-
}
|
|
1045
|
-
interface UserCreateAddFundsRequest {
|
|
1046
|
-
tokenId: string;
|
|
1047
|
-
returnUrl: string;
|
|
1048
|
-
redirectUrl: string;
|
|
1049
|
-
}
|
|
1050
|
-
interface GetAddFundsStatusResult {
|
|
1051
|
-
transactionId: number;
|
|
1052
|
-
amount: number;
|
|
1053
|
-
status: GetAddFundsStatus;
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
declare class Users {
|
|
1057
|
-
private readonly config;
|
|
1058
|
-
constructor(config: NamecheapProps);
|
|
1059
|
-
getPricing(params: GetPricingUserParams): Promise<UserGetPricingResult>;
|
|
1060
|
-
getBalances(): Promise<UserGetBalancesResult>;
|
|
1061
|
-
changePassword(oldPassword: string, newPassword: string): Promise<string>;
|
|
1062
|
-
update(params: UpdateParams): Promise<string>;
|
|
1063
|
-
createAddFundsRequest(username: string, params: Omit<CreateAddFundsRequestParams, "username">): Promise<UserCreateAddFundsRequest>;
|
|
1064
|
-
getAddFundsStatus(tokenId: string): Promise<GetAddFundsStatusResult>;
|
|
1065
|
-
create(param: CreateUserParams): Promise<number>;
|
|
1066
|
-
login(password: string): Promise<string>;
|
|
1067
|
-
resetPassword(params: ResetPasswordParams): Promise<string>;
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
interface AddressCreateResult {
|
|
1071
|
-
success: boolean;
|
|
1072
|
-
addressId: number;
|
|
1073
|
-
addressName: string;
|
|
1074
|
-
}
|
|
1075
|
-
interface AddressDeleteResult {
|
|
1076
|
-
success: boolean;
|
|
1077
|
-
profileId: number;
|
|
1078
|
-
userName: string;
|
|
1079
|
-
}
|
|
1080
|
-
interface GetAddressInfoResult {
|
|
1081
|
-
addressId: number;
|
|
1082
|
-
userName: string;
|
|
1257
|
+
interface UsersAddressCreateParams {
|
|
1258
|
+
/** Address name/label (max 20 characters). */
|
|
1083
1259
|
addressName: string;
|
|
1084
|
-
|
|
1260
|
+
/** 1 to set as the default address, 0 otherwise. */
|
|
1261
|
+
defaultYN?: number;
|
|
1262
|
+
emailAddress: string;
|
|
1085
1263
|
firstName: string;
|
|
1086
1264
|
lastName: string;
|
|
1087
|
-
jobTitle
|
|
1088
|
-
organization
|
|
1265
|
+
jobTitle?: string;
|
|
1266
|
+
organization?: string;
|
|
1089
1267
|
address1: string;
|
|
1090
|
-
address2
|
|
1268
|
+
address2?: string;
|
|
1091
1269
|
city: string;
|
|
1092
1270
|
stateProvince: string;
|
|
1093
1271
|
stateProvinceChoice: string;
|
|
1094
|
-
zip:
|
|
1272
|
+
zip: string;
|
|
1273
|
+
/** Two-letter country code. */
|
|
1095
1274
|
country: string;
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
phoneExt
|
|
1099
|
-
|
|
1100
|
-
|
|
1275
|
+
/** Format +NNN.NNNNNNNNNN. */
|
|
1276
|
+
phone: string;
|
|
1277
|
+
phoneExt?: string;
|
|
1278
|
+
/** Format +NNN.NNNNNNNNNN. */
|
|
1279
|
+
fax?: string;
|
|
1101
1280
|
}
|
|
1102
|
-
interface
|
|
1281
|
+
interface UsersAddressCreateResult {
|
|
1282
|
+
success: boolean;
|
|
1103
1283
|
addressId: number;
|
|
1104
1284
|
addressName: string;
|
|
1105
1285
|
}
|
|
1106
|
-
|
|
1286
|
+
declare const create: Command<UsersAddressCreateParams, UsersAddressCreateResult>;
|
|
1287
|
+
interface UsersAddressDeleteParams {
|
|
1288
|
+
/** Sent as `AddressId`. */
|
|
1289
|
+
addressId: number;
|
|
1290
|
+
}
|
|
1291
|
+
interface UsersAddressDeleteResult {
|
|
1107
1292
|
success: boolean;
|
|
1293
|
+
/** Id of the deleted address profile (`ProfileId`). */
|
|
1294
|
+
profileId: number;
|
|
1295
|
+
/** Listed in the official docs; absent from the captured response. */
|
|
1296
|
+
username?: string;
|
|
1297
|
+
}
|
|
1298
|
+
declare const deleteAddress: Command<UsersAddressDeleteParams, UsersAddressDeleteResult>;
|
|
1299
|
+
interface UsersAddressGetInfoParams {
|
|
1300
|
+
/** Sent as `AddressId`; 0 is the primary address. */
|
|
1108
1301
|
addressId: number;
|
|
1109
|
-
addressName: string;
|
|
1110
1302
|
}
|
|
1111
|
-
|
|
1112
|
-
interface
|
|
1303
|
+
/** Fields the reference says are omitted (not sent empty) when they have no value are optional. */
|
|
1304
|
+
interface UsersAddressGetInfoResult {
|
|
1305
|
+
addressId: number;
|
|
1306
|
+
userName: string;
|
|
1113
1307
|
addressName: string;
|
|
1114
|
-
|
|
1115
|
-
|
|
1308
|
+
/** From the `Default_YN` element. */
|
|
1309
|
+
defaultYN: boolean;
|
|
1116
1310
|
firstName: string;
|
|
1117
1311
|
lastName: string;
|
|
1118
1312
|
jobTitle?: string;
|
|
1313
|
+
/** Not listed as omitted in the reference, but optional on the API side. */
|
|
1119
1314
|
organization?: string;
|
|
1120
1315
|
address1: string;
|
|
1121
1316
|
address2?: string;
|
|
@@ -1127,79 +1322,141 @@ interface CreateUserAddressParams {
|
|
|
1127
1322
|
phone: string;
|
|
1128
1323
|
phoneExt?: string;
|
|
1129
1324
|
fax?: string;
|
|
1325
|
+
emailAddress: string;
|
|
1130
1326
|
}
|
|
1131
|
-
|
|
1327
|
+
/** Text of an optional child element. */
|
|
1328
|
+
declare const getInfo: Command<UsersAddressGetInfoParams, UsersAddressGetInfoResult>;
|
|
1329
|
+
interface UsersAddressListItem {
|
|
1132
1330
|
addressId: number;
|
|
1331
|
+
addressName: string;
|
|
1332
|
+
isDefault: boolean;
|
|
1133
1333
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1334
|
+
/** The response has no `Paging` element, so the result is a bare array (empty when there are no `List` elements). */
|
|
1335
|
+
type UsersAddressGetListResult = UsersAddressListItem[];
|
|
1336
|
+
declare const getList$1: Command<Record<string, never>, UsersAddressGetListResult>;
|
|
1337
|
+
interface UsersAddressSetDefaultParams {
|
|
1338
|
+
/** Sent as `AddressId`; 0 makes the primary address the default again. */
|
|
1339
|
+
addressId: number;
|
|
1340
|
+
}
|
|
1341
|
+
interface UsersAddressSetDefaultResult {
|
|
1342
|
+
success: boolean;
|
|
1343
|
+
addressId: number;
|
|
1344
|
+
}
|
|
1345
|
+
declare const setDefault: Command<UsersAddressSetDefaultParams, UsersAddressSetDefaultResult>;
|
|
1346
|
+
/** Same fields as `create`; omitting `defaultYN` leaves the default flag unchanged. */
|
|
1347
|
+
interface UsersAddressUpdateParams extends UsersAddressCreateParams {
|
|
1348
|
+
/** Sent as `AddressId`. */
|
|
1349
|
+
addressId: number;
|
|
1350
|
+
}
|
|
1351
|
+
interface UsersAddressUpdateResult {
|
|
1352
|
+
success: boolean;
|
|
1353
|
+
addressId: number;
|
|
1354
|
+
addressName: string;
|
|
1144
1355
|
}
|
|
1356
|
+
declare const update: Command<UsersAddressUpdateParams, UsersAddressUpdateResult>;
|
|
1357
|
+
/**
|
|
1358
|
+
* The command table behind `client.usersAddress`. Advanced use only: it is exported for custom
|
|
1359
|
+
* integrations and is not covered by semver stability.
|
|
1360
|
+
*/
|
|
1361
|
+
declare const usersAddressCommands: {
|
|
1362
|
+
create: Command<UsersAddressCreateParams, UsersAddressCreateResult>;
|
|
1363
|
+
delete: Command<UsersAddressDeleteParams, UsersAddressDeleteResult>;
|
|
1364
|
+
getInfo: Command<UsersAddressGetInfoParams, UsersAddressGetInfoResult>;
|
|
1365
|
+
getList: Command<Record<string, never>, UsersAddressGetListResult>;
|
|
1366
|
+
setDefault: Command<UsersAddressSetDefaultParams, UsersAddressSetDefaultResult>;
|
|
1367
|
+
update: Command<UsersAddressUpdateParams, UsersAddressUpdateResult>;
|
|
1368
|
+
};
|
|
1145
1369
|
|
|
1146
|
-
interface
|
|
1370
|
+
interface WhoisguardChangeEmailAddressParams {
|
|
1371
|
+
/** Unique domain privacy ID to change. Sent as `WhoisguardID`. */
|
|
1372
|
+
whoisguardID: number;
|
|
1373
|
+
}
|
|
1374
|
+
interface WhoisguardChangeEmailAddressResult {
|
|
1375
|
+
/** Unique integer representing the domain privacy subscription. */
|
|
1147
1376
|
id: number;
|
|
1148
1377
|
isSuccess: boolean;
|
|
1378
|
+
/** New domain privacy email address. */
|
|
1149
1379
|
wgEmail: string;
|
|
1380
|
+
/** Old domain privacy email address. */
|
|
1150
1381
|
wgOldEmail: string;
|
|
1151
1382
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1383
|
+
declare const changeEmailAddress: Command<WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult>;
|
|
1384
|
+
interface WhoisguardEnableParams {
|
|
1385
|
+
/** Unique domain privacy ID to enable. Sent as `WhoisguardID`. */
|
|
1386
|
+
whoisguardID: number;
|
|
1387
|
+
/** Email address to forward domain privacy emails to (max 70 characters). */
|
|
1388
|
+
forwardedToEmail: string;
|
|
1157
1389
|
}
|
|
1158
|
-
interface
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
renew: boolean;
|
|
1162
|
-
orderId: number;
|
|
1163
|
-
transactionId: number;
|
|
1164
|
-
chargedAmount: number;
|
|
1390
|
+
interface WhoisguardEnableResult {
|
|
1391
|
+
domainName: string;
|
|
1392
|
+
isSuccess: boolean;
|
|
1165
1393
|
}
|
|
1166
|
-
|
|
1167
|
-
interface
|
|
1168
|
-
|
|
1394
|
+
declare const enable: Command<WhoisguardEnableParams, WhoisguardEnableResult>;
|
|
1395
|
+
interface WhoisguardDisableParams {
|
|
1396
|
+
/** Unique domain privacy ID to disable. Sent as `WhoisguardID`. */
|
|
1397
|
+
whoisguardID: number;
|
|
1398
|
+
}
|
|
1399
|
+
interface WhoisguardDisableResult {
|
|
1400
|
+
/** The reference spells this `Domainname`; the fixture uses `DomainName`. */
|
|
1401
|
+
domainName: string;
|
|
1402
|
+
isSuccess: boolean;
|
|
1403
|
+
}
|
|
1404
|
+
declare const disable: Command<WhoisguardDisableParams, WhoisguardDisableResult>;
|
|
1405
|
+
/** `ALLOTED` is the API's own (nonstandard) spelling and is sent verbatim. */
|
|
1406
|
+
type WhoisguardListType = "ALL" | "ALLOTED" | "FREE" | "DISCARD";
|
|
1407
|
+
interface WhoisguardGetListParams {
|
|
1408
|
+
/** Default: ALL. */
|
|
1409
|
+
listType?: WhoisguardListType;
|
|
1410
|
+
/** Default: 1. */
|
|
1169
1411
|
page?: number;
|
|
1412
|
+
/** Min 2, max 100. */
|
|
1170
1413
|
pageSize?: number;
|
|
1171
1414
|
}
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
data: Array<WhoIsGuardGetListResult>;
|
|
1181
|
-
paging: Paging;
|
|
1182
|
-
}>;
|
|
1183
|
-
renew(whoIsGuardId: string, year: number, promotionCode?: number): Promise<WhoIsGuardRenewResult>;
|
|
1415
|
+
interface WhoisguardListItem {
|
|
1416
|
+
/** Unique integer representing the subscription (the reference column is "Whoisguard ID"). */
|
|
1417
|
+
id: number;
|
|
1418
|
+
/** The reference spells this column `Domainname`; the fixture uses `DomainName`. Empty for a FREE subscription. */
|
|
1419
|
+
domainName: string;
|
|
1420
|
+
created: string;
|
|
1421
|
+
expires: string;
|
|
1422
|
+
status: string;
|
|
1184
1423
|
}
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
readonly whoIsGuard: WhoIsGuard;
|
|
1200
|
-
get domainPrivacy(): WhoIsGuard;
|
|
1201
|
-
constructor(config: ConfigType);
|
|
1202
|
-
private getConfig;
|
|
1424
|
+
interface WhoisguardGetListResult {
|
|
1425
|
+
whoisguards: WhoisguardListItem[];
|
|
1426
|
+
paging: Paging;
|
|
1427
|
+
}
|
|
1428
|
+
declare const getList: Command<WhoisguardGetListParams, WhoisguardGetListResult>;
|
|
1429
|
+
/**
|
|
1430
|
+
* @remarks Billed: this command charges your Namecheap account.
|
|
1431
|
+
*/
|
|
1432
|
+
interface WhoisguardRenewParams {
|
|
1433
|
+
/** Domain privacy ID to renew. Sent as `WhoisguardID`. */
|
|
1434
|
+
whoisguardID: number;
|
|
1435
|
+
/** Number of years to renew. Default: 1. */
|
|
1436
|
+
years: number;
|
|
1437
|
+
promotionCode?: string;
|
|
1203
1438
|
}
|
|
1439
|
+
interface WhoisguardRenewResult {
|
|
1440
|
+
whoisguardID?: number;
|
|
1441
|
+
years?: number;
|
|
1442
|
+
/** Omitted when the attribute is absent or not `true`/`false`. */
|
|
1443
|
+
renew?: boolean;
|
|
1444
|
+
orderID?: number;
|
|
1445
|
+
transactionID?: number;
|
|
1446
|
+
chargedAmount?: number;
|
|
1447
|
+
}
|
|
1448
|
+
declare const renew: Command<WhoisguardRenewParams, WhoisguardRenewResult>;
|
|
1449
|
+
/**
|
|
1450
|
+
* The command table behind `client.whoisGuard`. Advanced use only: it is exported for custom
|
|
1451
|
+
* integrations and is not covered by semver stability.
|
|
1452
|
+
*/
|
|
1453
|
+
declare const whoisGuardCommands: {
|
|
1454
|
+
changeEmailAddress: Command<WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult>;
|
|
1455
|
+
enable: Command<WhoisguardEnableParams, WhoisguardEnableResult>;
|
|
1456
|
+
disable: Command<WhoisguardDisableParams, WhoisguardDisableResult>;
|
|
1457
|
+
getList: Command<WhoisguardGetListParams, WhoisguardGetListResult>;
|
|
1458
|
+
renew: Command<WhoisguardRenewParams, WhoisguardRenewResult>;
|
|
1459
|
+
};
|
|
1204
1460
|
|
|
1205
|
-
export {
|
|
1461
|
+
export { Namecheap, NamecheapError, NamecheapHttpError, NamecheapParseError, createTransport, Namecheap as default, dnsCommands, getEmailForwarding as dnsGetEmailForwarding, getHosts as dnsGetHosts, getList$4 as dnsGetList, setCustom as dnsSetCustom, setDefault$1 as dnsSetDefault, setEmailForwarding as dnsSetEmailForwarding, setHosts as dnsSetHosts, check as domainsCheck, domainsCommands, create$5 as domainsCreate, getContacts as domainsGetContacts, getInfo$3 as domainsGetInfo, getList$5 as domainsGetList, getRegistrarLock as domainsGetRegistrarLock, getTldList as domainsGetTldList, reactivate as domainsReactivate, renew$2 as domainsRenew, setContacts as domainsSetContacts, setRegistrarLock as domainsSetRegistrarLock, nsCommands, create$4 as nsCreate, deleteNs as nsDelete, getInfo$2 as nsGetInfo, update$2 as nsUpdate, run, activate as sslActivate, sslCommands, create$2 as sslCreate, editDCVMethod as sslEditDCVMethod, getApproverEmailList as sslGetApproverEmailList, getInfo$1 as sslGetInfo, getList$2 as sslGetList, parseCSR as sslParseCSR, purchaseMoreSans as sslPurchaseMoreSans, reissue as sslReissue, renew$1 as sslRenew, resendApproverEmail as sslResendApproverEmail, resendFulfillmentEmail as sslResendFulfillmentEmail, revokeCertificate as sslRevokeCertificate, transferCommands, create$3 as transferCreate, getList$3 as transferGetList, getStatus as transferGetStatus, updateStatus as transferUpdateStatus, usersAddressCommands, create as usersAddressCreate, deleteAddress as usersAddressDelete, getInfo as usersAddressGetInfo, getList$1 as usersAddressGetList, setDefault as usersAddressSetDefault, update as usersAddressUpdate, changePassword as usersChangePassword, usersCommands, create$1 as usersCreate, createAddFundsRequest as usersCreateAddFundsRequest, getAddFundsStatus as usersGetAddFundsStatus, getBalances as usersGetBalances, getPricing as usersGetPricing, login as usersLogin, resetPassword as usersResetPassword, update$1 as usersUpdate, changeEmailAddress as whoisGuardChangeEmailAddress, whoisGuardCommands, disable as whoisGuardDisable, enable as whoisGuardEnable, getList as whoisGuardGetList, renew as whoisGuardRenew };
|
|
1462
|
+
export type { Command, DnsEmailForward, DnsEmailForwardRecord, DnsEmailType, DnsGetEmailForwardingParams, DnsGetEmailForwardingResult, DnsGetHostsParams, DnsGetHostsResult, DnsGetListParams, DnsGetListResult, DnsHost, DnsHostRecord, DnsRecordType, DnsSetCustomParams, DnsSetCustomResult, DnsSetDefaultParams, DnsSetDefaultResult, DnsSetEmailForwardingParams, DnsSetEmailForwardingResult, DnsSetHostsParams, DnsSetHostsResult, DomainsCheckItem, DomainsCheckParams, DomainsCheckResult, DomainsContact, DomainsContactParams, DomainsCreateParams, DomainsCreateResult, DomainsGetContactsParams, DomainsGetContactsResult, DomainsGetInfoParams, DomainsGetInfoResult, DomainsGetListParams, DomainsGetListResult, DomainsGetRegistrarLockParams, DomainsGetRegistrarLockResult, DomainsGetTldListResult, DomainsListItem, DomainsListType, DomainsLockAction, DomainsReactivateParams, DomainsReactivateResult, DomainsRenewParams, DomainsRenewResult, DomainsSetContactsParams, DomainsSetContactsResult, DomainsSetRegistrarLockParams, DomainsSetRegistrarLockResult, DomainsSortBy, DomainsTld, TransportConfig as NamecheapConfig, NsCreateParams, NsCreateResult, NsDeleteParams, NsDeleteResult, NsGetInfoParams, NsGetInfoResult, NsUpdateParams, NsUpdateResult, PricingPrice, PricingProduct, PricingProductCategory, PricingProductType, Send, SslActivateParams, SslActivateResult, SslCreateParams, SslCreateResult, SslEditDcvMethodParams, SslEditDcvMethodResult, SslGetApproverEmailListParams, SslGetApproverEmailListResult, SslGetInfoParams, SslGetInfoResult, SslGetListParams, SslGetListResult, SslHttpDcValidation, SslListItem, SslListType, SslParseCsrParams, SslParseCsrResult, SslPurchaseMoreSansParams, SslPurchaseMoreSansResult, SslReissueParams, SslReissueResult, SslRenewParams, SslRenewResult, SslResendApproverEmailParams, SslResendApproverEmailResult, SslResendFulfillmentEmailParams, SslResendFulfillmentEmailResult, SslResendResult, SslReturnType, SslRevokeCertificateParams, SslRevokeCertificateResult, SslSortBy, TransferCreateParams, TransferCreateResult, TransferGetListParams, TransferGetListResult, TransferGetStatusParams, TransferGetStatusResult, TransferListItem, TransferListType, TransferSortBy, TransferUpdateStatusParams, TransferUpdateStatusResult, UsersAddressCreateParams, UsersAddressCreateResult, UsersAddressDeleteParams, UsersAddressDeleteResult, UsersAddressGetInfoParams, UsersAddressGetInfoResult, UsersAddressGetListResult, UsersAddressListItem, UsersAddressSetDefaultParams, UsersAddressSetDefaultResult, UsersAddressUpdateParams, UsersAddressUpdateResult, UsersChangePasswordParams, UsersChangePasswordResult, UsersCreateAddFundsRequestParams, UsersCreateAddFundsRequestResult, UsersCreateParams, UsersCreateResult, UsersGetAddFundsStatusParams, UsersGetAddFundsStatusResult, UsersGetBalancesResult, UsersGetPricingParams, UsersGetPricingResult, UsersLoginParams, UsersLoginResult, UsersPaymentType, UsersResetPasswordFindBy, UsersResetPasswordParams, UsersResetPasswordResult, UsersUpdateParams, UsersUpdateResult, WhoisguardChangeEmailAddressParams, WhoisguardChangeEmailAddressResult, WhoisguardDisableParams, WhoisguardDisableResult, WhoisguardEnableParams, WhoisguardEnableResult, WhoisguardGetListParams, WhoisguardGetListResult, WhoisguardListItem, WhoisguardListType, WhoisguardRenewParams, WhoisguardRenewResult };
|