@scaleway/sdk-domain 2.5.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +12 -0
- package/dist/metadata.gen.js +13 -0
- package/dist/v2beta1/api.gen.d.ts +2 -2
- package/dist/v2beta1/api.gen.js +320 -672
- package/dist/v2beta1/content.gen.js +7 -7
- package/dist/v2beta1/marshalling.gen.js +135 -135
- package/dist/v2beta1/metadata.gen.js +1 -1
- package/package.json +16 -6
- package/LICENSE +0 -191
package/dist/v2beta1/api.gen.js
CHANGED
|
@@ -2,306 +2,147 @@ import { DOMAIN_TRANSIENT_STATUSES, SSL_CERTIFICATE_TRANSIENT_STATUSES } from ".
|
|
|
2
2
|
import { marshalCloneDNSZoneRequest, marshalCreateDNSZoneRequest, marshalCreateSSLCertificateRequest, marshalImportProviderDNSZoneRequest, marshalImportRawDNSZoneRequest, marshalRefreshDNSZoneRequest, marshalRegistrarApiBuyDomainsRequest, marshalRegistrarApiCheckContactsCompatibilityRequest, marshalRegistrarApiCreateDomainHostRequest, marshalRegistrarApiEnableDomainDNSSECRequest, marshalRegistrarApiRegisterExternalDomainRequest, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiRetryInboundTransferRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiUpdateContactRequest, marshalRegistrarApiUpdateDomainHostRequest, marshalRegistrarApiUpdateDomainRequest, marshalUpdateDNSZoneNameserversRequest, marshalUpdateDNSZoneRecordsRequest, marshalUpdateDNSZoneRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalClearDNSZoneRecordsResponse, unmarshalContact, unmarshalDNSZone, unmarshalDeleteDNSZoneResponse, unmarshalDeleteExternalDomainResponse, unmarshalDeleteSSLCertificateResponse, unmarshalDomain, unmarshalGetDNSZoneTsigKeyResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalGetDomainAuthCodeResponse, unmarshalHost, unmarshalImportProviderDNSZoneResponse, unmarshalImportRawDNSZoneResponse, unmarshalListContactsResponse, unmarshalListDNSZoneNameserversResponse, unmarshalListDNSZoneRecordsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZonesResponse, unmarshalListDomainHostsResponse, unmarshalListDomainsResponse, unmarshalListInboundTransfersResponse, unmarshalListRenewableDomainsResponse, unmarshalListSSLCertificatesResponse, unmarshalListTasksResponse, unmarshalListTldsResponse, unmarshalOrderResponse, unmarshalRefreshDNSZoneResponse, unmarshalRegisterExternalDomainResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalRetryInboundTransferResponse, unmarshalSSLCertificate, unmarshalSearchAvailableDomainsConsoleResponse, unmarshalSearchAvailableDomainsResponse, unmarshalUpdateDNSZoneNameserversResponse, unmarshalUpdateDNSZoneRecordsResponse } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, unmarshalServiceInfo, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v2beta1/api.gen.ts
|
|
5
|
-
|
|
5
|
+
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
6
|
/**
|
|
7
7
|
* Domains and DNS API.
|
|
8
8
|
|
|
9
9
|
This API allows you to manage your domains, DNS zones and records.
|
|
10
10
|
*/
|
|
11
11
|
var API = class extends API$1 {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/raw`,
|
|
147
|
-
urlParams: urlParams(["dl", 1], ["format", request.format]),
|
|
148
|
-
responseType: "blob"
|
|
149
|
-
});
|
|
150
|
-
/**
|
|
151
|
-
* Import a raw DNS zone. Import and replace the format of records from a given provider, with default name servers.
|
|
152
|
-
*
|
|
153
|
-
* @param request - The request {@link ImportRawDNSZoneRequest}
|
|
154
|
-
* @returns A Promise of ImportRawDNSZoneResponse
|
|
155
|
-
*/
|
|
156
|
-
importRawDNSZone = (request) => this.client.fetch({
|
|
157
|
-
body: JSON.stringify(marshalImportRawDNSZoneRequest(request, this.client.settings)),
|
|
158
|
-
headers: jsonContentHeaders,
|
|
159
|
-
method: "POST",
|
|
160
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/raw`
|
|
161
|
-
}, unmarshalImportRawDNSZoneResponse);
|
|
162
|
-
/**
|
|
163
|
-
* Import a DNS zone from another provider. Import and replace the format of records from a given provider, with default name servers.
|
|
164
|
-
*
|
|
165
|
-
* @param request - The request {@link ImportProviderDNSZoneRequest}
|
|
166
|
-
* @returns A Promise of ImportProviderDNSZoneResponse
|
|
167
|
-
*/
|
|
168
|
-
importProviderDNSZone = (request) => this.client.fetch({
|
|
169
|
-
body: JSON.stringify(marshalImportProviderDNSZoneRequest(request, this.client.settings)),
|
|
170
|
-
headers: jsonContentHeaders,
|
|
171
|
-
method: "POST",
|
|
172
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/import-provider`
|
|
173
|
-
}, unmarshalImportProviderDNSZoneResponse);
|
|
174
|
-
/**
|
|
175
|
-
* Refresh a DNS zone. Refresh an SOA DNS zone to reload the records in the DNS zone and update the SOA serial.
|
|
176
|
-
You can recreate the given DNS zone and its sub DNS zone if needed.
|
|
177
|
-
*
|
|
178
|
-
* @param request - The request {@link RefreshDNSZoneRequest}
|
|
179
|
-
* @returns A Promise of RefreshDNSZoneResponse
|
|
180
|
-
*/
|
|
181
|
-
refreshDNSZone = (request) => this.client.fetch({
|
|
182
|
-
body: JSON.stringify(marshalRefreshDNSZoneRequest(request, this.client.settings)),
|
|
183
|
-
headers: jsonContentHeaders,
|
|
184
|
-
method: "POST",
|
|
185
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/refresh`
|
|
186
|
-
}, unmarshalRefreshDNSZoneResponse);
|
|
187
|
-
pageOfListDNSZoneVersions = (request) => this.client.fetch({
|
|
188
|
-
method: "GET",
|
|
189
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/versions`,
|
|
190
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
191
|
-
}, unmarshalListDNSZoneVersionsResponse);
|
|
192
|
-
/**
|
|
193
|
-
* List versions of a DNS zone. Retrieve a list of a DNS zone's versions.<br/>
|
|
194
|
-
The maximum version count is 100. If the count reaches this limit, the oldest version will be deleted after each new modification.
|
|
195
|
-
*
|
|
196
|
-
* @param request - The request {@link ListDNSZoneVersionsRequest}
|
|
197
|
-
* @returns A Promise of ListDNSZoneVersionsResponse
|
|
198
|
-
*/
|
|
199
|
-
listDNSZoneVersions = (request) => enrichForPagination("versions", this.pageOfListDNSZoneVersions, request);
|
|
200
|
-
pageOfListDNSZoneVersionRecords = (request) => this.client.fetch({
|
|
201
|
-
method: "GET",
|
|
202
|
-
path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}`,
|
|
203
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
204
|
-
}, unmarshalListDNSZoneVersionRecordsResponse);
|
|
205
|
-
/**
|
|
206
|
-
* List records from a given version of a specific DNS zone. Retrieve a list of records from a specific DNS zone version.
|
|
207
|
-
*
|
|
208
|
-
* @param request - The request {@link ListDNSZoneVersionRecordsRequest}
|
|
209
|
-
* @returns A Promise of ListDNSZoneVersionRecordsResponse
|
|
210
|
-
*/
|
|
211
|
-
listDNSZoneVersionRecords = (request) => enrichForPagination("records", this.pageOfListDNSZoneVersionRecords, request);
|
|
212
|
-
/**
|
|
213
|
-
* Access differences from a specific DNS zone version. Access a previous DNS zone version to see the differences from another specific version.
|
|
214
|
-
*
|
|
215
|
-
* @param request - The request {@link GetDNSZoneVersionDiffRequest}
|
|
216
|
-
* @returns A Promise of GetDNSZoneVersionDiffResponse
|
|
217
|
-
*/
|
|
218
|
-
getDNSZoneVersionDiff = (request) => this.client.fetch({
|
|
219
|
-
method: "GET",
|
|
220
|
-
path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}/diff`
|
|
221
|
-
}, unmarshalGetDNSZoneVersionDiffResponse);
|
|
222
|
-
/**
|
|
223
|
-
* Restore a DNS zone version. Restore and activate a version of a specific DNS zone.
|
|
224
|
-
*
|
|
225
|
-
* @param request - The request {@link RestoreDNSZoneVersionRequest}
|
|
226
|
-
* @returns A Promise of RestoreDNSZoneVersionResponse
|
|
227
|
-
*/
|
|
228
|
-
restoreDNSZoneVersion = (request) => this.client.fetch({
|
|
229
|
-
body: "{}",
|
|
230
|
-
headers: jsonContentHeaders,
|
|
231
|
-
method: "POST",
|
|
232
|
-
path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}/restore`
|
|
233
|
-
}, unmarshalRestoreDNSZoneVersionResponse);
|
|
234
|
-
/**
|
|
235
|
-
* Get a DNS zone's TLS certificate. Get the DNS zone's TLS certificate. If you do not have a certificate, the output returns `no certificate found`.
|
|
236
|
-
*
|
|
237
|
-
* @param request - The request {@link GetSSLCertificateRequest}
|
|
238
|
-
* @returns A Promise of SSLCertificate
|
|
239
|
-
*/
|
|
240
|
-
getSSLCertificate = (request) => this.client.fetch({
|
|
241
|
-
method: "GET",
|
|
242
|
-
path: `/domain/v2beta1/ssl-certificates/${validatePathParam("dnsZone", request.dnsZone)}`
|
|
243
|
-
}, unmarshalSSLCertificate);
|
|
244
|
-
/**
|
|
245
|
-
* Waits for {@link SSLCertificate} to be in a final state.
|
|
246
|
-
*
|
|
247
|
-
* @param request - The request {@link GetSSLCertificateRequest}
|
|
248
|
-
* @param options - The waiting options
|
|
249
|
-
* @returns A Promise of SSLCertificate
|
|
250
|
-
*/
|
|
251
|
-
waitForSSLCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getSSLCertificate, request, options);
|
|
252
|
-
/**
|
|
253
|
-
* Create or get the DNS zone's TLS certificate. Create a new TLS certificate or retrieve information about an existing TLS certificate.
|
|
254
|
-
*
|
|
255
|
-
* @param request - The request {@link CreateSSLCertificateRequest}
|
|
256
|
-
* @returns A Promise of SSLCertificate
|
|
257
|
-
*/
|
|
258
|
-
createSSLCertificate = (request) => this.client.fetch({
|
|
259
|
-
body: JSON.stringify(marshalCreateSSLCertificateRequest(request, this.client.settings)),
|
|
260
|
-
headers: jsonContentHeaders,
|
|
261
|
-
method: "POST",
|
|
262
|
-
path: `/domain/v2beta1/ssl-certificates`
|
|
263
|
-
}, unmarshalSSLCertificate);
|
|
264
|
-
pageOfListSSLCertificates = (request) => this.client.fetch({
|
|
265
|
-
method: "GET",
|
|
266
|
-
path: `/domain/v2beta1/ssl-certificates`,
|
|
267
|
-
urlParams: urlParams(["dns_zone", request.dnsZone], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
268
|
-
}, unmarshalListSSLCertificatesResponse);
|
|
269
|
-
/**
|
|
270
|
-
* List a user's TLS certificates. List all the TLS certificates a user has created, specified by the user's Project ID and the DNS zone.
|
|
271
|
-
*
|
|
272
|
-
* @param request - The request {@link ListSSLCertificatesRequest}
|
|
273
|
-
* @returns A Promise of ListSSLCertificatesResponse
|
|
274
|
-
*/
|
|
275
|
-
listSSLCertificates = (request) => enrichForPagination("certificates", this.pageOfListSSLCertificates, request);
|
|
276
|
-
/**
|
|
277
|
-
* Delete a TLS certificate. Delete an existing TLS certificate specified by its DNS zone. Deleting a TLS certificate is permanent and cannot be undone.
|
|
278
|
-
*
|
|
279
|
-
* @param request - The request {@link DeleteSSLCertificateRequest}
|
|
280
|
-
* @returns A Promise of DeleteSSLCertificateResponse
|
|
281
|
-
*/
|
|
282
|
-
deleteSSLCertificate = (request) => this.client.fetch({
|
|
283
|
-
method: "DELETE",
|
|
284
|
-
path: `/domain/v2beta1/ssl-certificates/${validatePathParam("dnsZone", request.dnsZone)}`
|
|
285
|
-
}, unmarshalDeleteSSLCertificateResponse);
|
|
286
|
-
/**
|
|
287
|
-
* Get the DNS zone's TSIG key. Retrieve information about the TSIG key of a given DNS zone to allow AXFR requests.
|
|
288
|
-
*
|
|
289
|
-
* @param request - The request {@link GetDNSZoneTsigKeyRequest}
|
|
290
|
-
* @returns A Promise of GetDNSZoneTsigKeyResponse
|
|
291
|
-
*/
|
|
292
|
-
getDNSZoneTsigKey = (request) => this.client.fetch({
|
|
293
|
-
method: "GET",
|
|
294
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/tsig-key`
|
|
295
|
-
}, unmarshalGetDNSZoneTsigKeyResponse);
|
|
296
|
-
/**
|
|
297
|
-
* Delete the DNS zone's TSIG key. Delete an existing TSIG key specified by its DNS zone. Deleting a TSIG key is permanent and cannot be undone.
|
|
298
|
-
*
|
|
299
|
-
* @param request - The request {@link DeleteDNSZoneTsigKeyRequest}
|
|
300
|
-
*/
|
|
301
|
-
deleteDNSZoneTsigKey = (request) => this.client.fetch({
|
|
302
|
-
method: "DELETE",
|
|
303
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/tsig-key`
|
|
304
|
-
});
|
|
12
|
+
constructor(..._args) {
|
|
13
|
+
super(..._args);
|
|
14
|
+
this.pageOfListDNSZones = (request) => this.client.fetch({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/domain/v2beta1/dns-zones`,
|
|
17
|
+
urlParams: urlParams(["created_after", request.createdAfter], ["created_before", request.createdBefore], ["dns_zone", request.dnsZone], ["dns_zones", request.dnsZones], ["domain", request.domain], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["updated_after", request.updatedAfter], ["updated_before", request.updatedBefore])
|
|
18
|
+
}, unmarshalListDNSZonesResponse);
|
|
19
|
+
this.listDNSZones = (request) => enrichForPagination("dnsZones", this.pageOfListDNSZones, request);
|
|
20
|
+
this.createDNSZone = (request) => this.client.fetch({
|
|
21
|
+
body: JSON.stringify(marshalCreateDNSZoneRequest(request, this.client.settings)),
|
|
22
|
+
headers: jsonContentHeaders,
|
|
23
|
+
method: "POST",
|
|
24
|
+
path: `/domain/v2beta1/dns-zones`
|
|
25
|
+
}, unmarshalDNSZone);
|
|
26
|
+
this.updateDNSZone = (request) => this.client.fetch({
|
|
27
|
+
body: JSON.stringify(marshalUpdateDNSZoneRequest(request, this.client.settings)),
|
|
28
|
+
headers: jsonContentHeaders,
|
|
29
|
+
method: "PATCH",
|
|
30
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}`
|
|
31
|
+
}, unmarshalDNSZone);
|
|
32
|
+
this.cloneDNSZone = (request) => this.client.fetch({
|
|
33
|
+
body: JSON.stringify(marshalCloneDNSZoneRequest(request, this.client.settings)),
|
|
34
|
+
headers: jsonContentHeaders,
|
|
35
|
+
method: "POST",
|
|
36
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/clone`
|
|
37
|
+
}, unmarshalDNSZone);
|
|
38
|
+
this.deleteDNSZone = (request) => this.client.fetch({
|
|
39
|
+
method: "DELETE",
|
|
40
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}`,
|
|
41
|
+
urlParams: urlParams(["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
42
|
+
}, unmarshalDeleteDNSZoneResponse);
|
|
43
|
+
this.pageOfListDNSZoneRecords = (request) => this.client.fetch({
|
|
44
|
+
method: "GET",
|
|
45
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/records`,
|
|
46
|
+
urlParams: urlParams(["id", request.id], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["type", request.type])
|
|
47
|
+
}, unmarshalListDNSZoneRecordsResponse);
|
|
48
|
+
this.listDNSZoneRecords = (request) => enrichForPagination("records", this.pageOfListDNSZoneRecords, request);
|
|
49
|
+
this.updateDNSZoneRecords = (request) => this.client.fetch({
|
|
50
|
+
body: JSON.stringify(marshalUpdateDNSZoneRecordsRequest(request, this.client.settings)),
|
|
51
|
+
headers: jsonContentHeaders,
|
|
52
|
+
method: "PATCH",
|
|
53
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/records`
|
|
54
|
+
}, unmarshalUpdateDNSZoneRecordsResponse);
|
|
55
|
+
this.listDNSZoneNameservers = (request) => this.client.fetch({
|
|
56
|
+
method: "GET",
|
|
57
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/nameservers`,
|
|
58
|
+
urlParams: urlParams(["project_id", request.projectId])
|
|
59
|
+
}, unmarshalListDNSZoneNameserversResponse);
|
|
60
|
+
this.updateDNSZoneNameservers = (request) => this.client.fetch({
|
|
61
|
+
body: JSON.stringify(marshalUpdateDNSZoneNameserversRequest(request, this.client.settings)),
|
|
62
|
+
headers: jsonContentHeaders,
|
|
63
|
+
method: "PUT",
|
|
64
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/nameservers`
|
|
65
|
+
}, unmarshalUpdateDNSZoneNameserversResponse);
|
|
66
|
+
this.clearDNSZoneRecords = (request) => this.client.fetch({
|
|
67
|
+
method: "DELETE",
|
|
68
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/records`
|
|
69
|
+
}, unmarshalClearDNSZoneRecordsResponse);
|
|
70
|
+
this.exportRawDNSZone = (request) => this.client.fetch({
|
|
71
|
+
method: "GET",
|
|
72
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/raw`,
|
|
73
|
+
urlParams: urlParams(["dl", 1], ["format", request.format]),
|
|
74
|
+
responseType: "blob"
|
|
75
|
+
});
|
|
76
|
+
this.importRawDNSZone = (request) => this.client.fetch({
|
|
77
|
+
body: JSON.stringify(marshalImportRawDNSZoneRequest(request, this.client.settings)),
|
|
78
|
+
headers: jsonContentHeaders,
|
|
79
|
+
method: "POST",
|
|
80
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/raw`
|
|
81
|
+
}, unmarshalImportRawDNSZoneResponse);
|
|
82
|
+
this.importProviderDNSZone = (request) => this.client.fetch({
|
|
83
|
+
body: JSON.stringify(marshalImportProviderDNSZoneRequest(request, this.client.settings)),
|
|
84
|
+
headers: jsonContentHeaders,
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/import-provider`
|
|
87
|
+
}, unmarshalImportProviderDNSZoneResponse);
|
|
88
|
+
this.refreshDNSZone = (request) => this.client.fetch({
|
|
89
|
+
body: JSON.stringify(marshalRefreshDNSZoneRequest(request, this.client.settings)),
|
|
90
|
+
headers: jsonContentHeaders,
|
|
91
|
+
method: "POST",
|
|
92
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/refresh`
|
|
93
|
+
}, unmarshalRefreshDNSZoneResponse);
|
|
94
|
+
this.pageOfListDNSZoneVersions = (request) => this.client.fetch({
|
|
95
|
+
method: "GET",
|
|
96
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/versions`,
|
|
97
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
98
|
+
}, unmarshalListDNSZoneVersionsResponse);
|
|
99
|
+
this.listDNSZoneVersions = (request) => enrichForPagination("versions", this.pageOfListDNSZoneVersions, request);
|
|
100
|
+
this.pageOfListDNSZoneVersionRecords = (request) => this.client.fetch({
|
|
101
|
+
method: "GET",
|
|
102
|
+
path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}`,
|
|
103
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
104
|
+
}, unmarshalListDNSZoneVersionRecordsResponse);
|
|
105
|
+
this.listDNSZoneVersionRecords = (request) => enrichForPagination("records", this.pageOfListDNSZoneVersionRecords, request);
|
|
106
|
+
this.getDNSZoneVersionDiff = (request) => this.client.fetch({
|
|
107
|
+
method: "GET",
|
|
108
|
+
path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}/diff`
|
|
109
|
+
}, unmarshalGetDNSZoneVersionDiffResponse);
|
|
110
|
+
this.restoreDNSZoneVersion = (request) => this.client.fetch({
|
|
111
|
+
body: "{}",
|
|
112
|
+
headers: jsonContentHeaders,
|
|
113
|
+
method: "POST",
|
|
114
|
+
path: `/domain/v2beta1/dns-zones/version/${validatePathParam("dnsZoneVersionId", request.dnsZoneVersionId)}/restore`
|
|
115
|
+
}, unmarshalRestoreDNSZoneVersionResponse);
|
|
116
|
+
this.getSSLCertificate = (request) => this.client.fetch({
|
|
117
|
+
method: "GET",
|
|
118
|
+
path: `/domain/v2beta1/ssl-certificates/${validatePathParam("dnsZone", request.dnsZone)}`
|
|
119
|
+
}, unmarshalSSLCertificate);
|
|
120
|
+
this.waitForSSLCertificate = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getSSLCertificate, request, options);
|
|
121
|
+
this.createSSLCertificate = (request) => this.client.fetch({
|
|
122
|
+
body: JSON.stringify(marshalCreateSSLCertificateRequest(request, this.client.settings)),
|
|
123
|
+
headers: jsonContentHeaders,
|
|
124
|
+
method: "POST",
|
|
125
|
+
path: `/domain/v2beta1/ssl-certificates`
|
|
126
|
+
}, unmarshalSSLCertificate);
|
|
127
|
+
this.pageOfListSSLCertificates = (request) => this.client.fetch({
|
|
128
|
+
method: "GET",
|
|
129
|
+
path: `/domain/v2beta1/ssl-certificates`,
|
|
130
|
+
urlParams: urlParams(["dns_zone", request.dnsZone], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
131
|
+
}, unmarshalListSSLCertificatesResponse);
|
|
132
|
+
this.listSSLCertificates = (request) => enrichForPagination("certificates", this.pageOfListSSLCertificates, request);
|
|
133
|
+
this.deleteSSLCertificate = (request) => this.client.fetch({
|
|
134
|
+
method: "DELETE",
|
|
135
|
+
path: `/domain/v2beta1/ssl-certificates/${validatePathParam("dnsZone", request.dnsZone)}`
|
|
136
|
+
}, unmarshalDeleteSSLCertificateResponse);
|
|
137
|
+
this.getDNSZoneTsigKey = (request) => this.client.fetch({
|
|
138
|
+
method: "GET",
|
|
139
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/tsig-key`
|
|
140
|
+
}, unmarshalGetDNSZoneTsigKeyResponse);
|
|
141
|
+
this.deleteDNSZoneTsigKey = (request) => this.client.fetch({
|
|
142
|
+
method: "DELETE",
|
|
143
|
+
path: `/domain/v2beta1/dns-zones/${validatePathParam("dnsZone", request.dnsZone)}/tsig-key`
|
|
144
|
+
});
|
|
145
|
+
}
|
|
305
146
|
};
|
|
306
147
|
/**
|
|
307
148
|
* Domains and DNS - Registrar API.
|
|
@@ -309,389 +150,196 @@ var API = class extends API$1 {
|
|
|
309
150
|
Manage your domains and contacts.
|
|
310
151
|
*/
|
|
311
152
|
var RegistrarAPI = class extends API$1 {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
method: "GET",
|
|
486
|
-
path: `/domain/v2beta1/renewable-domains`,
|
|
487
|
-
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
488
|
-
}, unmarshalListRenewableDomainsResponse);
|
|
489
|
-
/**
|
|
490
|
-
* List domains that can be renewed. Retrieve the list of domains you own that can be renewed. You can also see the maximum renewal duration in years for your domains that are renewable.
|
|
491
|
-
*
|
|
492
|
-
* @param request - The request {@link RegistrarApiListRenewableDomainsRequest}
|
|
493
|
-
* @returns A Promise of ListRenewableDomainsResponse
|
|
494
|
-
*/
|
|
495
|
-
listRenewableDomains = (request = {}) => enrichForPagination("domains", this.pageOfListRenewableDomains, request);
|
|
496
|
-
/**
|
|
497
|
-
* Get domain. Retrieve a specific domain and display the domain's information.
|
|
498
|
-
*
|
|
499
|
-
* @param request - The request {@link RegistrarApiGetDomainRequest}
|
|
500
|
-
* @returns A Promise of Domain
|
|
501
|
-
*/
|
|
502
|
-
getDomain = (request) => this.client.fetch({
|
|
503
|
-
method: "GET",
|
|
504
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}`
|
|
505
|
-
}, unmarshalDomain);
|
|
506
|
-
/**
|
|
507
|
-
* Waits for {@link Domain} to be in a final state.
|
|
508
|
-
*
|
|
509
|
-
* @param request - The request {@link RegistrarApiGetDomainRequest}
|
|
510
|
-
* @param options - The waiting options
|
|
511
|
-
* @returns A Promise of Domain
|
|
512
|
-
*/
|
|
513
|
-
waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
514
|
-
/**
|
|
515
|
-
* Update a domain's contacts. Update contacts for a specific domain or create a new contact.<br/>
|
|
516
|
-
If you add the same contact for multiple roles (owner, administrative, technical), only one ID will be created and used for all of the roles.
|
|
517
|
-
*
|
|
518
|
-
* @param request - The request {@link RegistrarApiUpdateDomainRequest}
|
|
519
|
-
* @returns A Promise of Domain
|
|
520
|
-
*/
|
|
521
|
-
updateDomain = (request) => this.client.fetch({
|
|
522
|
-
body: JSON.stringify(marshalRegistrarApiUpdateDomainRequest(request, this.client.settings)),
|
|
523
|
-
headers: jsonContentHeaders,
|
|
524
|
-
method: "PATCH",
|
|
525
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}`
|
|
526
|
-
}, unmarshalDomain);
|
|
527
|
-
/**
|
|
528
|
-
* Lock the transfer of a domain. Lock the transfer of a domain. This means that the domain cannot be transferred and the authorization code cannot be requested to your current registrar.
|
|
529
|
-
*
|
|
530
|
-
* @param request - The request {@link RegistrarApiLockDomainTransferRequest}
|
|
531
|
-
* @returns A Promise of Domain
|
|
532
|
-
*/
|
|
533
|
-
lockDomainTransfer = (request) => this.client.fetch({
|
|
534
|
-
body: "{}",
|
|
535
|
-
headers: jsonContentHeaders,
|
|
536
|
-
method: "POST",
|
|
537
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/lock-transfer`
|
|
538
|
-
}, unmarshalDomain);
|
|
539
|
-
/**
|
|
540
|
-
* Unlock the transfer of a domain. Unlock the transfer of a domain. This means that the domain can be transferred and the authorization code can be requested to your current registrar.
|
|
541
|
-
*
|
|
542
|
-
* @param request - The request {@link RegistrarApiUnlockDomainTransferRequest}
|
|
543
|
-
* @returns A Promise of Domain
|
|
544
|
-
*/
|
|
545
|
-
unlockDomainTransfer = (request) => this.client.fetch({
|
|
546
|
-
body: "{}",
|
|
547
|
-
headers: jsonContentHeaders,
|
|
548
|
-
method: "POST",
|
|
549
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/unlock-transfer`
|
|
550
|
-
}, unmarshalDomain);
|
|
551
|
-
/**
|
|
552
|
-
* Enable auto renew. Enable the `auto renew` feature for a domain. This means the domain will be automatically renewed before its expiry date.
|
|
553
|
-
*
|
|
554
|
-
* @param request - The request {@link RegistrarApiEnableDomainAutoRenewRequest}
|
|
555
|
-
* @returns A Promise of Domain
|
|
556
|
-
*/
|
|
557
|
-
enableDomainAutoRenew = (request) => this.client.fetch({
|
|
558
|
-
body: "{}",
|
|
559
|
-
headers: jsonContentHeaders,
|
|
560
|
-
method: "POST",
|
|
561
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/enable-auto-renew`
|
|
562
|
-
}, unmarshalDomain);
|
|
563
|
-
/**
|
|
564
|
-
* Disable auto renew. Disable the `auto renew` feature for a domain. This means the domain will not be renewed before its expiry date.
|
|
565
|
-
*
|
|
566
|
-
* @param request - The request {@link RegistrarApiDisableDomainAutoRenewRequest}
|
|
567
|
-
* @returns A Promise of Domain
|
|
568
|
-
*/
|
|
569
|
-
disableDomainAutoRenew = (request) => this.client.fetch({
|
|
570
|
-
body: "{}",
|
|
571
|
-
headers: jsonContentHeaders,
|
|
572
|
-
method: "POST",
|
|
573
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/disable-auto-renew`
|
|
574
|
-
}, unmarshalDomain);
|
|
575
|
-
/**
|
|
576
|
-
* Get a domain's authorization code. Retrieve the authorization code to transfer an unlocked domain. The output returns an error if the domain is locked.
|
|
577
|
-
Some TLDs may have a different procedure to retrieve the authorization code. In that case, the information displays in the message field.
|
|
578
|
-
*
|
|
579
|
-
* @param request - The request {@link RegistrarApiGetDomainAuthCodeRequest}
|
|
580
|
-
* @returns A Promise of GetDomainAuthCodeResponse
|
|
581
|
-
*/
|
|
582
|
-
getDomainAuthCode = (request) => this.client.fetch({
|
|
583
|
-
method: "GET",
|
|
584
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/auth-code`
|
|
585
|
-
}, unmarshalGetDomainAuthCodeResponse);
|
|
586
|
-
/**
|
|
587
|
-
* Update domain DNSSEC. If your domain uses another registrar and has the default Scaleway NS, you have to **update the DS record at your registrar**.
|
|
588
|
-
*
|
|
589
|
-
* @param request - The request {@link RegistrarApiEnableDomainDNSSECRequest}
|
|
590
|
-
* @returns A Promise of Domain
|
|
591
|
-
*/
|
|
592
|
-
enableDomainDNSSEC = (request) => this.client.fetch({
|
|
593
|
-
body: JSON.stringify(marshalRegistrarApiEnableDomainDNSSECRequest(request, this.client.settings)),
|
|
594
|
-
headers: jsonContentHeaders,
|
|
595
|
-
method: "POST",
|
|
596
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/enable-dnssec`
|
|
597
|
-
}, unmarshalDomain);
|
|
598
|
-
/**
|
|
599
|
-
* Disable a domain's DNSSEC. Disable DNSSEC for a domain.
|
|
600
|
-
*
|
|
601
|
-
* @param request - The request {@link RegistrarApiDisableDomainDNSSECRequest}
|
|
602
|
-
* @returns A Promise of Domain
|
|
603
|
-
*/
|
|
604
|
-
disableDomainDNSSEC = (request) => this.client.fetch({
|
|
605
|
-
body: "{}",
|
|
606
|
-
headers: jsonContentHeaders,
|
|
607
|
-
method: "POST",
|
|
608
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/disable-dnssec`
|
|
609
|
-
}, unmarshalDomain);
|
|
610
|
-
/**
|
|
611
|
-
* Search available domains. Search a domain or a maximum of 10 domains that are available.
|
|
612
|
-
|
|
613
|
-
If the TLD list is empty or not set, the search returns the results from the most popular TLDs.
|
|
614
|
-
*
|
|
615
|
-
* @param request - The request {@link RegistrarApiSearchAvailableDomainsRequest}
|
|
616
|
-
* @returns A Promise of SearchAvailableDomainsResponse
|
|
617
|
-
*/
|
|
618
|
-
searchAvailableDomains = (request) => this.client.fetch({
|
|
619
|
-
method: "GET",
|
|
620
|
-
path: `/domain/v2beta1/search-domains`,
|
|
621
|
-
urlParams: urlParams(["domains", request.domains], ["include_exact_match", request.includeExactMatch], ["strict_search", request.strictSearch], ["tlds", request.tlds])
|
|
622
|
-
}, unmarshalSearchAvailableDomainsResponse);
|
|
623
|
-
pageOfListTlds = (request = {}) => this.client.fetch({
|
|
624
|
-
method: "GET",
|
|
625
|
-
path: `/domain/v2beta1/tlds`,
|
|
626
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tlds", request.tlds])
|
|
627
|
-
}, unmarshalListTldsResponse);
|
|
628
|
-
/**
|
|
629
|
-
* List TLD offers. Retrieve the list of TLDs and offers associated with them.
|
|
630
|
-
*
|
|
631
|
-
* @param request - The request {@link RegistrarApiListTldsRequest}
|
|
632
|
-
* @returns A Promise of ListTldsResponse
|
|
633
|
-
*/
|
|
634
|
-
listTlds = (request = {}) => enrichForPagination("tlds", this.pageOfListTlds, request);
|
|
635
|
-
/**
|
|
636
|
-
* Create a hostname for a domain. Create a hostname for a domain with glue IPs.
|
|
637
|
-
*
|
|
638
|
-
* @param request - The request {@link RegistrarApiCreateDomainHostRequest}
|
|
639
|
-
* @returns A Promise of Host
|
|
640
|
-
*/
|
|
641
|
-
createDomainHost = (request) => this.client.fetch({
|
|
642
|
-
body: JSON.stringify(marshalRegistrarApiCreateDomainHostRequest(request, this.client.settings)),
|
|
643
|
-
headers: jsonContentHeaders,
|
|
644
|
-
method: "POST",
|
|
645
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts`
|
|
646
|
-
}, unmarshalHost);
|
|
647
|
-
pageOfListDomainHosts = (request) => this.client.fetch({
|
|
648
|
-
method: "GET",
|
|
649
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts`,
|
|
650
|
-
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
651
|
-
}, unmarshalListDomainHostsResponse);
|
|
652
|
-
/**
|
|
653
|
-
* List a domain's hostnames. List a domain's hostnames using their glue IPs.
|
|
654
|
-
*
|
|
655
|
-
* @param request - The request {@link RegistrarApiListDomainHostsRequest}
|
|
656
|
-
* @returns A Promise of ListDomainHostsResponse
|
|
657
|
-
*/
|
|
658
|
-
listDomainHosts = (request) => enrichForPagination("hosts", this.pageOfListDomainHosts, request);
|
|
659
|
-
/**
|
|
660
|
-
* Update a domain's hostname. Update a domain's hostname with glue IPs.
|
|
661
|
-
*
|
|
662
|
-
* @param request - The request {@link RegistrarApiUpdateDomainHostRequest}
|
|
663
|
-
* @returns A Promise of Host
|
|
664
|
-
*/
|
|
665
|
-
updateDomainHost = (request) => this.client.fetch({
|
|
666
|
-
body: JSON.stringify(marshalRegistrarApiUpdateDomainHostRequest(request, this.client.settings)),
|
|
667
|
-
headers: jsonContentHeaders,
|
|
668
|
-
method: "PATCH",
|
|
669
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts/${validatePathParam("name", request.name)}`
|
|
670
|
-
}, unmarshalHost);
|
|
671
|
-
/**
|
|
672
|
-
* Delete a domain's hostname.
|
|
673
|
-
*
|
|
674
|
-
* @param request - The request {@link RegistrarApiDeleteDomainHostRequest}
|
|
675
|
-
* @returns A Promise of Host
|
|
676
|
-
*/
|
|
677
|
-
deleteDomainHost = (request) => this.client.fetch({
|
|
678
|
-
method: "DELETE",
|
|
679
|
-
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts/${validatePathParam("name", request.name)}`
|
|
680
|
-
}, unmarshalHost);
|
|
153
|
+
constructor(..._args2) {
|
|
154
|
+
super(..._args2);
|
|
155
|
+
this.pageOfListTasks = (request = {}) => this.client.fetch({
|
|
156
|
+
method: "GET",
|
|
157
|
+
path: `/domain/v2beta1/tasks`,
|
|
158
|
+
urlParams: urlParams(["domain", request.domain], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["statuses", request.statuses], ["types", request.types])
|
|
159
|
+
}, unmarshalListTasksResponse);
|
|
160
|
+
this.listTasks = (request = {}) => enrichForPagination("tasks", this.pageOfListTasks, request);
|
|
161
|
+
this.pageOfListInboundTransfers = (request) => this.client.fetch({
|
|
162
|
+
method: "GET",
|
|
163
|
+
path: `/domain/v2beta1/inbound-transfers`,
|
|
164
|
+
urlParams: urlParams(["domain", request.domain], ["organization_id", request.organizationId ?? this.client.settings.defaultOrganizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
165
|
+
}, unmarshalListInboundTransfersResponse);
|
|
166
|
+
this.listInboundTransfers = (request) => enrichForPagination("inboundTransfers", this.pageOfListInboundTransfers, request);
|
|
167
|
+
this.retryInboundTransfer = (request) => this.client.fetch({
|
|
168
|
+
body: JSON.stringify(marshalRegistrarApiRetryInboundTransferRequest(request, this.client.settings)),
|
|
169
|
+
headers: jsonContentHeaders,
|
|
170
|
+
method: "POST",
|
|
171
|
+
path: `/domain/v2beta1/retry-inbound-transfer`
|
|
172
|
+
}, unmarshalRetryInboundTransferResponse);
|
|
173
|
+
this.buyDomains = (request) => this.client.fetch({
|
|
174
|
+
body: JSON.stringify(marshalRegistrarApiBuyDomainsRequest(request, this.client.settings)),
|
|
175
|
+
headers: jsonContentHeaders,
|
|
176
|
+
method: "POST",
|
|
177
|
+
path: `/domain/v2beta1/buy-domains`
|
|
178
|
+
}, unmarshalOrderResponse);
|
|
179
|
+
this.renewDomains = (request) => this.client.fetch({
|
|
180
|
+
body: JSON.stringify(marshalRegistrarApiRenewDomainsRequest(request, this.client.settings)),
|
|
181
|
+
headers: jsonContentHeaders,
|
|
182
|
+
method: "POST",
|
|
183
|
+
path: `/domain/v2beta1/renew-domains`
|
|
184
|
+
}, unmarshalOrderResponse);
|
|
185
|
+
this.transferInDomain = (request) => this.client.fetch({
|
|
186
|
+
body: JSON.stringify(marshalRegistrarApiTransferInDomainRequest(request, this.client.settings)),
|
|
187
|
+
headers: jsonContentHeaders,
|
|
188
|
+
method: "POST",
|
|
189
|
+
path: `/domain/v2beta1/domains/transfer-domains`
|
|
190
|
+
}, unmarshalOrderResponse);
|
|
191
|
+
this.tradeDomain = (request) => this.client.fetch({
|
|
192
|
+
body: JSON.stringify(marshalRegistrarApiTradeDomainRequest(request, this.client.settings)),
|
|
193
|
+
headers: jsonContentHeaders,
|
|
194
|
+
method: "POST",
|
|
195
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/trade`
|
|
196
|
+
}, unmarshalOrderResponse);
|
|
197
|
+
this.registerExternalDomain = (request) => this.client.fetch({
|
|
198
|
+
body: JSON.stringify(marshalRegistrarApiRegisterExternalDomainRequest(request, this.client.settings)),
|
|
199
|
+
headers: jsonContentHeaders,
|
|
200
|
+
method: "POST",
|
|
201
|
+
path: `/domain/v2beta1/external-domains`
|
|
202
|
+
}, unmarshalRegisterExternalDomainResponse);
|
|
203
|
+
this.deleteExternalDomain = (request) => this.client.fetch({
|
|
204
|
+
method: "DELETE",
|
|
205
|
+
path: `/domain/v2beta1/external-domains/${validatePathParam("domain", request.domain)}`
|
|
206
|
+
}, unmarshalDeleteExternalDomainResponse);
|
|
207
|
+
this.checkContactsCompatibility = (request = {}) => this.client.fetch({
|
|
208
|
+
body: JSON.stringify(marshalRegistrarApiCheckContactsCompatibilityRequest(request, this.client.settings)),
|
|
209
|
+
headers: jsonContentHeaders,
|
|
210
|
+
method: "POST",
|
|
211
|
+
path: `/domain/v2beta1/check-contacts-compatibility`
|
|
212
|
+
}, unmarshalCheckContactsCompatibilityResponse);
|
|
213
|
+
this.pageOfListContacts = (request = {}) => this.client.fetch({
|
|
214
|
+
method: "GET",
|
|
215
|
+
path: `/domain/v2beta1/contacts`,
|
|
216
|
+
urlParams: urlParams(["domain", request.domain], ["email_status", request.emailStatus], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["role", request.role])
|
|
217
|
+
}, unmarshalListContactsResponse);
|
|
218
|
+
this.listContacts = (request = {}) => enrichForPagination("contacts", this.pageOfListContacts, request);
|
|
219
|
+
this.getContact = (request) => this.client.fetch({
|
|
220
|
+
method: "GET",
|
|
221
|
+
path: `/domain/v2beta1/contacts/${validatePathParam("contactId", request.contactId)}`
|
|
222
|
+
}, unmarshalContact);
|
|
223
|
+
this.updateContact = (request) => this.client.fetch({
|
|
224
|
+
body: JSON.stringify(marshalRegistrarApiUpdateContactRequest(request, this.client.settings)),
|
|
225
|
+
headers: jsonContentHeaders,
|
|
226
|
+
method: "PATCH",
|
|
227
|
+
path: `/domain/v2beta1/contacts/${validatePathParam("contactId", request.contactId)}`
|
|
228
|
+
}, unmarshalContact);
|
|
229
|
+
this.pageOfListDomains = (request = {}) => this.client.fetch({
|
|
230
|
+
method: "GET",
|
|
231
|
+
path: `/domain/v2beta1/domains`,
|
|
232
|
+
urlParams: urlParams(["domain", request.domain], ["is_external", request.isExternal], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["registrar", request.registrar], ["status", request.status])
|
|
233
|
+
}, unmarshalListDomainsResponse);
|
|
234
|
+
this.listDomains = (request = {}) => enrichForPagination("domains", this.pageOfListDomains, request);
|
|
235
|
+
this.pageOfListRenewableDomains = (request = {}) => this.client.fetch({
|
|
236
|
+
method: "GET",
|
|
237
|
+
path: `/domain/v2beta1/renewable-domains`,
|
|
238
|
+
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId])
|
|
239
|
+
}, unmarshalListRenewableDomainsResponse);
|
|
240
|
+
this.listRenewableDomains = (request = {}) => enrichForPagination("domains", this.pageOfListRenewableDomains, request);
|
|
241
|
+
this.getDomain = (request) => this.client.fetch({
|
|
242
|
+
method: "GET",
|
|
243
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}`
|
|
244
|
+
}, unmarshalDomain);
|
|
245
|
+
this.waitForDomain = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
246
|
+
this.updateDomain = (request) => this.client.fetch({
|
|
247
|
+
body: JSON.stringify(marshalRegistrarApiUpdateDomainRequest(request, this.client.settings)),
|
|
248
|
+
headers: jsonContentHeaders,
|
|
249
|
+
method: "PATCH",
|
|
250
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}`
|
|
251
|
+
}, unmarshalDomain);
|
|
252
|
+
this.lockDomainTransfer = (request) => this.client.fetch({
|
|
253
|
+
body: "{}",
|
|
254
|
+
headers: jsonContentHeaders,
|
|
255
|
+
method: "POST",
|
|
256
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/lock-transfer`
|
|
257
|
+
}, unmarshalDomain);
|
|
258
|
+
this.unlockDomainTransfer = (request) => this.client.fetch({
|
|
259
|
+
body: "{}",
|
|
260
|
+
headers: jsonContentHeaders,
|
|
261
|
+
method: "POST",
|
|
262
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/unlock-transfer`
|
|
263
|
+
}, unmarshalDomain);
|
|
264
|
+
this.enableDomainAutoRenew = (request) => this.client.fetch({
|
|
265
|
+
body: "{}",
|
|
266
|
+
headers: jsonContentHeaders,
|
|
267
|
+
method: "POST",
|
|
268
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/enable-auto-renew`
|
|
269
|
+
}, unmarshalDomain);
|
|
270
|
+
this.disableDomainAutoRenew = (request) => this.client.fetch({
|
|
271
|
+
body: "{}",
|
|
272
|
+
headers: jsonContentHeaders,
|
|
273
|
+
method: "POST",
|
|
274
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/disable-auto-renew`
|
|
275
|
+
}, unmarshalDomain);
|
|
276
|
+
this.getDomainAuthCode = (request) => this.client.fetch({
|
|
277
|
+
method: "GET",
|
|
278
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/auth-code`
|
|
279
|
+
}, unmarshalGetDomainAuthCodeResponse);
|
|
280
|
+
this.enableDomainDNSSEC = (request) => this.client.fetch({
|
|
281
|
+
body: JSON.stringify(marshalRegistrarApiEnableDomainDNSSECRequest(request, this.client.settings)),
|
|
282
|
+
headers: jsonContentHeaders,
|
|
283
|
+
method: "POST",
|
|
284
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/enable-dnssec`
|
|
285
|
+
}, unmarshalDomain);
|
|
286
|
+
this.disableDomainDNSSEC = (request) => this.client.fetch({
|
|
287
|
+
body: "{}",
|
|
288
|
+
headers: jsonContentHeaders,
|
|
289
|
+
method: "POST",
|
|
290
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/disable-dnssec`
|
|
291
|
+
}, unmarshalDomain);
|
|
292
|
+
this.searchAvailableDomains = (request) => this.client.fetch({
|
|
293
|
+
method: "GET",
|
|
294
|
+
path: `/domain/v2beta1/search-domains`,
|
|
295
|
+
urlParams: urlParams(["domains", request.domains], ["include_exact_match", request.includeExactMatch], ["strict_search", request.strictSearch], ["tlds", request.tlds])
|
|
296
|
+
}, unmarshalSearchAvailableDomainsResponse);
|
|
297
|
+
this.pageOfListTlds = (request = {}) => this.client.fetch({
|
|
298
|
+
method: "GET",
|
|
299
|
+
path: `/domain/v2beta1/tlds`,
|
|
300
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tlds", request.tlds])
|
|
301
|
+
}, unmarshalListTldsResponse);
|
|
302
|
+
this.listTlds = (request = {}) => enrichForPagination("tlds", this.pageOfListTlds, request);
|
|
303
|
+
this.createDomainHost = (request) => this.client.fetch({
|
|
304
|
+
body: JSON.stringify(marshalRegistrarApiCreateDomainHostRequest(request, this.client.settings)),
|
|
305
|
+
headers: jsonContentHeaders,
|
|
306
|
+
method: "POST",
|
|
307
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts`
|
|
308
|
+
}, unmarshalHost);
|
|
309
|
+
this.pageOfListDomainHosts = (request) => this.client.fetch({
|
|
310
|
+
method: "GET",
|
|
311
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts`,
|
|
312
|
+
urlParams: urlParams(["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
313
|
+
}, unmarshalListDomainHostsResponse);
|
|
314
|
+
this.listDomainHosts = (request) => enrichForPagination("hosts", this.pageOfListDomainHosts, request);
|
|
315
|
+
this.updateDomainHost = (request) => this.client.fetch({
|
|
316
|
+
body: JSON.stringify(marshalRegistrarApiUpdateDomainHostRequest(request, this.client.settings)),
|
|
317
|
+
headers: jsonContentHeaders,
|
|
318
|
+
method: "PATCH",
|
|
319
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts/${validatePathParam("name", request.name)}`
|
|
320
|
+
}, unmarshalHost);
|
|
321
|
+
this.deleteDomainHost = (request) => this.client.fetch({
|
|
322
|
+
method: "DELETE",
|
|
323
|
+
path: `/domain/v2beta1/domains/${validatePathParam("domain", request.domain)}/hosts/${validatePathParam("name", request.name)}`
|
|
324
|
+
}, unmarshalHost);
|
|
325
|
+
}
|
|
681
326
|
};
|
|
682
327
|
/**
|
|
683
328
|
* Unauthenticated Domain search API.
|
|
684
329
|
*/
|
|
685
330
|
var UnauthenticatedRegistrarAPI = class extends API$1 {
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
331
|
+
constructor(..._args3) {
|
|
332
|
+
super(..._args3);
|
|
333
|
+
this.getServiceInfo = () => this.client.fetch({
|
|
334
|
+
method: "GET",
|
|
335
|
+
path: `/domain/v2beta1/search`
|
|
336
|
+
}, unmarshalServiceInfo);
|
|
337
|
+
this.searchAvailableDomainsConsole = (request) => this.client.fetch({
|
|
338
|
+
method: "GET",
|
|
339
|
+
path: `/domain/v2beta1/search-domains-console`,
|
|
340
|
+
urlParams: urlParams(["domain", request.domain], ["strict_search", request.strictSearch], ["tlds", request.tlds])
|
|
341
|
+
}, unmarshalSearchAvailableDomainsConsoleResponse);
|
|
342
|
+
}
|
|
695
343
|
};
|
|
696
344
|
//#endregion
|
|
697
345
|
export { API, RegistrarAPI, UnauthenticatedRegistrarAPI };
|