@scaleway/sdk 3.0.0-alpha.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.gen.d.ts +362 -0
- package/dist/index.gen.js +323 -0
- package/package.json +71 -25
- package/README.md +0 -46
- package/dist/api/account/index.js +0 -4
- package/dist/api/account/v2/api.gen.js +0 -147
- package/dist/api/account/v2/index.gen.js +0 -4
- package/dist/api/account/v2/marshalling.gen.js +0 -39
- package/dist/api/account/v3/api.gen.js +0 -129
- package/dist/api/account/v3/index.gen.js +0 -6
- package/dist/api/account/v3/marshalling.gen.js +0 -39
- package/dist/api/account/v3/validation-rules.gen.js +0 -39
- package/dist/api/applesilicon/index.js +0 -2
- package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
- package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
- package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
- package/dist/api/baremetal/index.js +0 -2
- package/dist/api/baremetal/v1/api.gen.js +0 -523
- package/dist/api/baremetal/v1/api.utils.js +0 -27
- package/dist/api/baremetal/v1/content.gen.js +0 -13
- package/dist/api/baremetal/v1/index.js +0 -5
- package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
- package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
- package/dist/api/billing/index.js +0 -2
- package/dist/api/billing/v2alpha1/api.gen.js +0 -80
- package/dist/api/billing/v2alpha1/index.gen.js +0 -4
- package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
- package/dist/api/block/index.js +0 -2
- package/dist/api/block/v1alpha1/api.gen.js +0 -245
- package/dist/api/block/v1alpha1/content.gen.js +0 -13
- package/dist/api/block/v1alpha1/index.gen.js +0 -7
- package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
- package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
- package/dist/api/cockpit/index.js +0 -2
- package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
- package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
- package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
- package/dist/api/container/index.js +0 -2
- package/dist/api/container/v1beta1/api.gen.js +0 -549
- package/dist/api/container/v1beta1/content.gen.js +0 -22
- package/dist/api/container/v1beta1/index.gen.js +0 -5
- package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
- package/dist/api/document_db/index.js +0 -2
- package/dist/api/document_db/v1beta1/api.gen.js +0 -830
- package/dist/api/document_db/v1beta1/content.gen.js +0 -19
- package/dist/api/document_db/v1beta1/index.gen.js +0 -7
- package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
- package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
- package/dist/api/domain/index.js +0 -2
- package/dist/api/domain/v2beta1/api.gen.js +0 -875
- package/dist/api/domain/v2beta1/content.gen.js +0 -28
- package/dist/api/domain/v2beta1/index.gen.js +0 -7
- package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
- package/dist/api/flexibleip/index.js +0 -2
- package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
- package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
- package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
- package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
- package/dist/api/function/index.js +0 -2
- package/dist/api/function/v1beta1/api.gen.js +0 -560
- package/dist/api/function/v1beta1/content.gen.js +0 -22
- package/dist/api/function/v1beta1/index.gen.js +0 -5
- package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
- package/dist/api/iam/index.js +0 -2
- package/dist/api/iam/v1alpha1/api.gen.js +0 -799
- package/dist/api/iam/v1alpha1/index.gen.js +0 -6
- package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
- package/dist/api/instance/index.js +0 -2
- package/dist/api/instance/v1/api.gen.js +0 -1003
- package/dist/api/instance/v1/api.utils.js +0 -369
- package/dist/api/instance/v1/content.gen.js +0 -31
- package/dist/api/instance/v1/index.js +0 -2
- package/dist/api/instance/v1/marshalling.gen.js +0 -1206
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
- package/dist/api/iot/index.js +0 -2
- package/dist/api/iot/v1/api.gen.js +0 -581
- package/dist/api/iot/v1/content.gen.js +0 -7
- package/dist/api/iot/v1/index.gen.js +0 -5
- package/dist/api/iot/v1/marshalling.gen.js +0 -388
- package/dist/api/ipfs/index.js +0 -2
- package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
- package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
- package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/k8s/index.js +0 -2
- package/dist/api/k8s/v1/api.gen.js +0 -454
- package/dist/api/k8s/v1/api.utils.js +0 -13
- package/dist/api/k8s/v1/content.gen.js +0 -13
- package/dist/api/k8s/v1/index.js +0 -4
- package/dist/api/k8s/v1/marshalling.gen.js +0 -333
- package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
- package/dist/api/lb/index.js +0 -2
- package/dist/api/lb/v1/api.gen.js +0 -1669
- package/dist/api/lb/v1/api.utils.js +0 -81
- package/dist/api/lb/v1/content.gen.js +0 -16
- package/dist/api/lb/v1/index.js +0 -2
- package/dist/api/lb/v1/marshalling.gen.js +0 -923
- package/dist/api/marketplace/index.js +0 -4
- package/dist/api/marketplace/v1/api.gen.js +0 -60
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
- package/dist/api/marketplace/v2/api.gen.js +0 -162
- package/dist/api/marketplace/v2/index.gen.js +0 -4
- package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
- package/dist/api/mnq/index.js +0 -2
- package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
- package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
- package/dist/api/rdb/index.js +0 -2
- package/dist/api/rdb/v1/api.gen.js +0 -972
- package/dist/api/rdb/v1/content.gen.js +0 -22
- package/dist/api/rdb/v1/index.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +0 -636
- package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
- package/dist/api/redis/index.js +0 -2
- package/dist/api/redis/v1/api.gen.js +0 -389
- package/dist/api/redis/v1/content.gen.js +0 -7
- package/dist/api/redis/v1/index.gen.js +0 -5
- package/dist/api/redis/v1/marshalling.gen.js +0 -259
- package/dist/api/registry/index.js +0 -2
- package/dist/api/registry/v1/api.gen.js +0 -252
- package/dist/api/registry/v1/content.gen.js +0 -13
- package/dist/api/registry/v1/index.gen.js +0 -5
- package/dist/api/registry/v1/marshalling.gen.js +0 -106
- package/dist/api/secret/index.js +0 -2
- package/dist/api/secret/v1alpha1/api.gen.js +0 -415
- package/dist/api/secret/v1alpha1/index.gen.js +0 -4
- package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
- package/dist/api/tem/index.js +0 -2
- package/dist/api/tem/v1alpha1/api.gen.js +0 -229
- package/dist/api/tem/v1alpha1/content.gen.js +0 -10
- package/dist/api/tem/v1alpha1/index.gen.js +0 -5
- package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
- package/dist/api/test/index.js +0 -2
- package/dist/api/test/v1/api.gen.js +0 -152
- package/dist/api/test/v1/content.gen.js +0 -7
- package/dist/api/test/v1/index.gen.js +0 -5
- package/dist/api/test/v1/marshalling.gen.js +0 -79
- package/dist/api/vpc/index.js +0 -4
- package/dist/api/vpc/v1/api.gen.js +0 -110
- package/dist/api/vpc/v1/index.gen.js +0 -4
- package/dist/api/vpc/v1/marshalling.gen.js +0 -44
- package/dist/api/vpc/v2/api.gen.js +0 -276
- package/dist/api/vpc/v2/index.gen.js +0 -4
- package/dist/api/vpc/v2/marshalling.gen.js +0 -135
- package/dist/api/vpcgw/index.js +0 -2
- package/dist/api/vpcgw/v1/api.gen.js +0 -669
- package/dist/api/vpcgw/v1/content.gen.js +0 -10
- package/dist/api/vpcgw/v1/index.gen.js +0 -5
- package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
- package/dist/api/webhosting/index.js +0 -2
- package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
- package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
- package/dist/helpers/is-browser.js +0 -5
- package/dist/helpers/is-response.js +0 -10
- package/dist/helpers/json.js +0 -11
- package/dist/helpers/marshalling.js +0 -130
- package/dist/index.cjs +0 -24364
- package/dist/index.d.ts +0 -27584
- package/dist/index.js +0 -69
- package/dist/internal/async/interval-retrier.js +0 -105
- package/dist/internal/async/sleep.js +0 -13
- package/dist/internal/interceptors/composer.js +0 -46
- package/dist/internal/interceptors/helpers.js +0 -32
- package/dist/internal/logger/console-logger.js +0 -38
- package/dist/internal/logger/index.js +0 -41
- package/dist/internal/logger/level-resolver.js +0 -13
- package/dist/internal/validations/string-validation.js +0 -38
- package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/dist/scw/api.js +0 -12
- package/dist/scw/auth.js +0 -68
- package/dist/scw/client-ini-factory.js +0 -174
- package/dist/scw/client-ini-profile.js +0 -54
- package/dist/scw/client-settings.js +0 -78
- package/dist/scw/client.js +0 -98
- package/dist/scw/constants.js +0 -4
- package/dist/scw/custom-marshalling.js +0 -131
- package/dist/scw/errors/error-parser.js +0 -107
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
- package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
- package/dist/scw/errors/scw-error.js +0 -66
- package/dist/scw/errors/standard/already-exists-error.js +0 -26
- package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
- package/dist/scw/errors/standard/index.js +0 -13
- package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
- package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
- package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
- package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
- package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
- package/dist/scw/errors/standard/resource-expired-error.js +0 -26
- package/dist/scw/errors/standard/resource-locked-error.js +0 -25
- package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
- package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
- package/dist/scw/errors/standard/transient-state-error.js +0 -26
- package/dist/scw/errors/types.js +0 -23
- package/dist/scw/fetch/build-fetcher.js +0 -72
- package/dist/scw/fetch/http-dumper.js +0 -54
- package/dist/scw/fetch/http-interceptors.js +0 -99
- package/dist/scw/fetch/resource-paginator.js +0 -84
- package/dist/scw/fetch/response-parser.js +0 -72
- package/node_modules/@scaleway/random-name/.npmignore +0 -4
- package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
- package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
- package/node_modules/@scaleway/random-name/README.md +0 -26
- package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
- package/node_modules/@scaleway/random-name/dist/index.js +0 -13
- package/node_modules/@scaleway/random-name/package.json +0 -23
|
@@ -1,875 +0,0 @@
|
|
|
1
|
-
import { waitForResource } from '../../../internal/async/interval-retrier.js';
|
|
2
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
3
|
-
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
4
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
|
-
import { SSL_CERTIFICATE_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListDNSZonesResponse, marshalCreateDNSZoneRequest, unmarshalDNSZone, marshalUpdateDNSZoneRequest, marshalCloneDNSZoneRequest, unmarshalDeleteDNSZoneResponse, unmarshalListDNSZoneRecordsResponse, marshalUpdateDNSZoneRecordsRequest, unmarshalUpdateDNSZoneRecordsResponse, unmarshalListDNSZoneNameserversResponse, marshalUpdateDNSZoneNameserversRequest, unmarshalUpdateDNSZoneNameserversResponse, unmarshalClearDNSZoneRecordsResponse, marshalImportRawDNSZoneRequest, unmarshalImportRawDNSZoneResponse, marshalImportProviderDNSZoneRequest, unmarshalImportProviderDNSZoneResponse, marshalRefreshDNSZoneRequest, unmarshalRefreshDNSZoneResponse, unmarshalListDNSZoneVersionsResponse, unmarshalListDNSZoneVersionRecordsResponse, unmarshalGetDNSZoneVersionDiffResponse, unmarshalRestoreDNSZoneVersionResponse, unmarshalSSLCertificate, marshalCreateSSLCertificateRequest, unmarshalListSSLCertificatesResponse, unmarshalDeleteSSLCertificateResponse, unmarshalGetDNSZoneTsigKeyResponse, unmarshalListTasksResponse, marshalRegistrarApiBuyDomainsRequest, unmarshalOrderResponse, marshalRegistrarApiRenewDomainsRequest, marshalRegistrarApiTransferInDomainRequest, marshalRegistrarApiTradeDomainRequest, marshalRegistrarApiRegisterExternalDomainRequest, unmarshalRegisterExternalDomainResponse, unmarshalDeleteExternalDomainResponse, marshalRegistrarApiCheckContactsCompatibilityRequest, unmarshalCheckContactsCompatibilityResponse, unmarshalListContactsResponse, unmarshalContact, marshalRegistrarApiUpdateContactRequest, unmarshalListDomainsResponse, unmarshalListRenewableDomainsResponse, unmarshalDomain, marshalRegistrarApiUpdateDomainRequest, unmarshalGetDomainAuthCodeResponse, marshalRegistrarApiEnableDomainDNSSECRequest, unmarshalSearchAvailableDomainsResponse, unmarshalListTldsResponse, marshalRegistrarApiCreateDomainHostRequest, unmarshalHost, unmarshalListDomainHostsResponse, marshalRegistrarApiUpdateDomainHostRequest } from './marshalling.gen.js';
|
|
7
|
-
|
|
8
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
9
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
10
|
-
const jsonContentHeaders = {
|
|
11
|
-
'Content-Type': 'application/json; charset=utf-8'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Domains and DNS API.
|
|
16
|
-
*
|
|
17
|
-
* Manage your domains, DNS zones and records with the Domains and DNS API.
|
|
18
|
-
*/
|
|
19
|
-
class API extends API$1 {
|
|
20
|
-
pageOfListDNSZones = request => this.client.fetch({
|
|
21
|
-
method: 'GET',
|
|
22
|
-
path: `/domain/v2beta1/dns-zones`,
|
|
23
|
-
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])
|
|
24
|
-
}, unmarshalListDNSZonesResponse);
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* List DNS zones. Retrieve the list of DNS zones you can manage and filter
|
|
28
|
-
* DNS zones associated with specific domain names.
|
|
29
|
-
*
|
|
30
|
-
* @param request - The request {@link ListDNSZonesRequest}
|
|
31
|
-
* @returns A Promise of ListDNSZonesResponse
|
|
32
|
-
*/
|
|
33
|
-
listDNSZones = request => enrichForPagination('dnsZones', this.pageOfListDNSZones, request);
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Create a DNS zone. Create a new DNS zone specified by the domain name, the
|
|
37
|
-
* subdomain and the Project ID.
|
|
38
|
-
*
|
|
39
|
-
* @param request - The request {@link CreateDNSZoneRequest}
|
|
40
|
-
* @returns A Promise of DNSZone
|
|
41
|
-
*/
|
|
42
|
-
createDNSZone = request => this.client.fetch({
|
|
43
|
-
body: JSON.stringify(marshalCreateDNSZoneRequest(request, this.client.settings)),
|
|
44
|
-
headers: jsonContentHeaders,
|
|
45
|
-
method: 'POST',
|
|
46
|
-
path: `/domain/v2beta1/dns-zones`
|
|
47
|
-
}, unmarshalDNSZone);
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Update a DNS zone. Update the name and/or the Organizations for a DNS zone.
|
|
51
|
-
*
|
|
52
|
-
* @param request - The request {@link UpdateDNSZoneRequest}
|
|
53
|
-
* @returns A Promise of DNSZone
|
|
54
|
-
*/
|
|
55
|
-
updateDNSZone = request => this.client.fetch({
|
|
56
|
-
body: JSON.stringify(marshalUpdateDNSZoneRequest(request, this.client.settings)),
|
|
57
|
-
headers: jsonContentHeaders,
|
|
58
|
-
method: 'PATCH',
|
|
59
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}`
|
|
60
|
-
}, unmarshalDNSZone);
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Clone a DNS zone. Clone an existing DNS zone with all its records into a
|
|
64
|
-
* new DNS zone.
|
|
65
|
-
*
|
|
66
|
-
* @param request - The request {@link CloneDNSZoneRequest}
|
|
67
|
-
* @returns A Promise of DNSZone
|
|
68
|
-
*/
|
|
69
|
-
cloneDNSZone = request => this.client.fetch({
|
|
70
|
-
body: JSON.stringify(marshalCloneDNSZoneRequest(request, this.client.settings)),
|
|
71
|
-
headers: jsonContentHeaders,
|
|
72
|
-
method: 'POST',
|
|
73
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/clone`
|
|
74
|
-
}, unmarshalDNSZone);
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Delete a DNS zone. Delete a DNS zone and all its records.
|
|
78
|
-
*
|
|
79
|
-
* @param request - The request {@link DeleteDNSZoneRequest}
|
|
80
|
-
* @returns A Promise of DeleteDNSZoneResponse
|
|
81
|
-
*/
|
|
82
|
-
deleteDNSZone = request => this.client.fetch({
|
|
83
|
-
method: 'DELETE',
|
|
84
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}`,
|
|
85
|
-
urlParams: urlParams(['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
86
|
-
}, unmarshalDeleteDNSZoneResponse);
|
|
87
|
-
pageOfListDNSZoneRecords = request => this.client.fetch({
|
|
88
|
-
method: 'GET',
|
|
89
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/records`,
|
|
90
|
-
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])
|
|
91
|
-
}, unmarshalListDNSZoneRecordsResponse);
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* List records within a DNS zone. Retrieve a list of DNS records within a DNS
|
|
95
|
-
* zone that has default name servers. You can filter records by type and
|
|
96
|
-
* name.
|
|
97
|
-
*
|
|
98
|
-
* @param request - The request {@link ListDNSZoneRecordsRequest}
|
|
99
|
-
* @returns A Promise of ListDNSZoneRecordsResponse
|
|
100
|
-
*/
|
|
101
|
-
listDNSZoneRecords = request => enrichForPagination('records', this.pageOfListDNSZoneRecords, request);
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Update records within a DNS zone. Update records within a DNS zone that has
|
|
105
|
-
* default name servers and perform several actions on your records.
|
|
106
|
-
*
|
|
107
|
-
* Actions include:
|
|
108
|
-
*
|
|
109
|
-
* - Add: allows you to add a new record or add a new IP to an existing A
|
|
110
|
-
* record, for example
|
|
111
|
-
* - Set: allows you to edit a record or edit an IP from an existing A record,
|
|
112
|
-
* for example
|
|
113
|
-
* - Delete: allows you to delete a record or delete an IP from an existing A
|
|
114
|
-
* record, for example
|
|
115
|
-
* - Clear: allows you to delete all records from a DNS zone
|
|
116
|
-
*
|
|
117
|
-
* All edits will be versioned.
|
|
118
|
-
*
|
|
119
|
-
* @param request - The request {@link UpdateDNSZoneRecordsRequest}
|
|
120
|
-
* @returns A Promise of UpdateDNSZoneRecordsResponse
|
|
121
|
-
*/
|
|
122
|
-
updateDNSZoneRecords = request => this.client.fetch({
|
|
123
|
-
body: JSON.stringify(marshalUpdateDNSZoneRecordsRequest(request, this.client.settings)),
|
|
124
|
-
headers: jsonContentHeaders,
|
|
125
|
-
method: 'PATCH',
|
|
126
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/records`
|
|
127
|
-
}, unmarshalUpdateDNSZoneRecordsResponse);
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* List name servers within a DNS zone. Retrieve a list of name servers within
|
|
131
|
-
* a DNS zone and their optional glue records.
|
|
132
|
-
*
|
|
133
|
-
* @param request - The request {@link ListDNSZoneNameserversRequest}
|
|
134
|
-
* @returns A Promise of ListDNSZoneNameserversResponse
|
|
135
|
-
*/
|
|
136
|
-
listDNSZoneNameservers = request => this.client.fetch({
|
|
137
|
-
method: 'GET',
|
|
138
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/nameservers`,
|
|
139
|
-
urlParams: urlParams(['project_id', request.projectId])
|
|
140
|
-
}, unmarshalListDNSZoneNameserversResponse);
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Update name servers within a DNS zone. Update name servers within a DNS
|
|
144
|
-
* zone and set optional glue records.
|
|
145
|
-
*
|
|
146
|
-
* @param request - The request {@link UpdateDNSZoneNameserversRequest}
|
|
147
|
-
* @returns A Promise of UpdateDNSZoneNameserversResponse
|
|
148
|
-
*/
|
|
149
|
-
updateDNSZoneNameservers = request => this.client.fetch({
|
|
150
|
-
body: JSON.stringify(marshalUpdateDNSZoneNameserversRequest(request, this.client.settings)),
|
|
151
|
-
headers: jsonContentHeaders,
|
|
152
|
-
method: 'PUT',
|
|
153
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/nameservers`
|
|
154
|
-
}, unmarshalUpdateDNSZoneNameserversResponse);
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Clear records within a DNS zone. Delete all records within a DNS zone that
|
|
158
|
-
* has default name servers.<br/> All edits will be versioned.
|
|
159
|
-
*
|
|
160
|
-
* @param request - The request {@link ClearDNSZoneRecordsRequest}
|
|
161
|
-
* @returns A Promise of ClearDNSZoneRecordsResponse
|
|
162
|
-
*/
|
|
163
|
-
clearDNSZoneRecords = request => this.client.fetch({
|
|
164
|
-
method: 'DELETE',
|
|
165
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/records`
|
|
166
|
-
}, unmarshalClearDNSZoneRecordsResponse);
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Export a raw DNS zone. Export a DNS zone with default name servers, in a
|
|
170
|
-
* specific format.
|
|
171
|
-
*
|
|
172
|
-
* @param request - The request {@link ExportRawDNSZoneRequest}
|
|
173
|
-
* @returns A Promise of Blob
|
|
174
|
-
*/
|
|
175
|
-
exportRawDNSZone = request => this.client.fetch({
|
|
176
|
-
method: 'GET',
|
|
177
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/raw`,
|
|
178
|
-
urlParams: urlParams(['dl', 1], ['format', request.format]),
|
|
179
|
-
responseType: 'blob'
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Import a raw DNS zone. Import and replace the format of records from a
|
|
184
|
-
* given provider, with default name servers.
|
|
185
|
-
*
|
|
186
|
-
* @param request - The request {@link ImportRawDNSZoneRequest}
|
|
187
|
-
* @returns A Promise of ImportRawDNSZoneResponse
|
|
188
|
-
*/
|
|
189
|
-
importRawDNSZone = request => this.client.fetch({
|
|
190
|
-
body: JSON.stringify(marshalImportRawDNSZoneRequest(request, this.client.settings)),
|
|
191
|
-
headers: jsonContentHeaders,
|
|
192
|
-
method: 'POST',
|
|
193
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/raw`
|
|
194
|
-
}, unmarshalImportRawDNSZoneResponse);
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Import a DNS zone from another provider. Import and replace the format of
|
|
198
|
-
* records from a given provider, with default name servers.
|
|
199
|
-
*
|
|
200
|
-
* @param request - The request {@link ImportProviderDNSZoneRequest}
|
|
201
|
-
* @returns A Promise of ImportProviderDNSZoneResponse
|
|
202
|
-
*/
|
|
203
|
-
importProviderDNSZone = request => this.client.fetch({
|
|
204
|
-
body: JSON.stringify(marshalImportProviderDNSZoneRequest(request, this.client.settings)),
|
|
205
|
-
headers: jsonContentHeaders,
|
|
206
|
-
method: 'POST',
|
|
207
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/import-provider`
|
|
208
|
-
}, unmarshalImportProviderDNSZoneResponse);
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Refresh a DNS zone. Refresh an SOA DNS zone to reload the records in the
|
|
212
|
-
* DNS zone and update the SOA serial. You can recreate the given DNS zone and
|
|
213
|
-
* its sub DNS zone if needed.
|
|
214
|
-
*
|
|
215
|
-
* @param request - The request {@link RefreshDNSZoneRequest}
|
|
216
|
-
* @returns A Promise of RefreshDNSZoneResponse
|
|
217
|
-
*/
|
|
218
|
-
refreshDNSZone = request => this.client.fetch({
|
|
219
|
-
body: JSON.stringify(marshalRefreshDNSZoneRequest(request, this.client.settings)),
|
|
220
|
-
headers: jsonContentHeaders,
|
|
221
|
-
method: 'POST',
|
|
222
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/refresh`
|
|
223
|
-
}, unmarshalRefreshDNSZoneResponse);
|
|
224
|
-
pageOfListDNSZoneVersions = request => this.client.fetch({
|
|
225
|
-
method: 'GET',
|
|
226
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/versions`,
|
|
227
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
228
|
-
}, unmarshalListDNSZoneVersionsResponse);
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* List versions of a DNS zone. Retrieve a list of a DNS zone's versions.<br/>
|
|
232
|
-
* The maximum version count is 100. If the count reaches this limit, the
|
|
233
|
-
* oldest version will be deleted after each new modification.
|
|
234
|
-
*
|
|
235
|
-
* @param request - The request {@link ListDNSZoneVersionsRequest}
|
|
236
|
-
* @returns A Promise of ListDNSZoneVersionsResponse
|
|
237
|
-
*/
|
|
238
|
-
listDNSZoneVersions = request => enrichForPagination('versions', this.pageOfListDNSZoneVersions, request);
|
|
239
|
-
pageOfListDNSZoneVersionRecords = request => this.client.fetch({
|
|
240
|
-
method: 'GET',
|
|
241
|
-
path: `/domain/v2beta1/dns-zones/version/${validatePathParam('dnsZoneVersionId', request.dnsZoneVersionId)}`,
|
|
242
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
243
|
-
}, unmarshalListDNSZoneVersionRecordsResponse);
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* List records from a given version of a specific DNS zone. Retrieve a list
|
|
247
|
-
* of records from a specific DNS zone version.
|
|
248
|
-
*
|
|
249
|
-
* @param request - The request {@link ListDNSZoneVersionRecordsRequest}
|
|
250
|
-
* @returns A Promise of ListDNSZoneVersionRecordsResponse
|
|
251
|
-
*/
|
|
252
|
-
listDNSZoneVersionRecords = request => enrichForPagination('records', this.pageOfListDNSZoneVersionRecords, request);
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Access differences from a specific DNS zone version. Access a previous DNS
|
|
256
|
-
* zone version to see the differences from another specific version.
|
|
257
|
-
*
|
|
258
|
-
* @param request - The request {@link GetDNSZoneVersionDiffRequest}
|
|
259
|
-
* @returns A Promise of GetDNSZoneVersionDiffResponse
|
|
260
|
-
*/
|
|
261
|
-
getDNSZoneVersionDiff = request => this.client.fetch({
|
|
262
|
-
method: 'GET',
|
|
263
|
-
path: `/domain/v2beta1/dns-zones/version/${validatePathParam('dnsZoneVersionId', request.dnsZoneVersionId)}/diff`
|
|
264
|
-
}, unmarshalGetDNSZoneVersionDiffResponse);
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Restore a DNS zone version. Restore and activate a version of a specific
|
|
268
|
-
* DNS zone.
|
|
269
|
-
*
|
|
270
|
-
* @param request - The request {@link RestoreDNSZoneVersionRequest}
|
|
271
|
-
* @returns A Promise of RestoreDNSZoneVersionResponse
|
|
272
|
-
*/
|
|
273
|
-
restoreDNSZoneVersion = request => this.client.fetch({
|
|
274
|
-
body: '{}',
|
|
275
|
-
headers: jsonContentHeaders,
|
|
276
|
-
method: 'POST',
|
|
277
|
-
path: `/domain/v2beta1/dns-zones/version/${validatePathParam('dnsZoneVersionId', request.dnsZoneVersionId)}/restore`
|
|
278
|
-
}, unmarshalRestoreDNSZoneVersionResponse);
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Get a DNS zone's TLS certificate. Get the DNS zone's TLS certificate. If
|
|
282
|
-
* you do not have a certificate, the ouptut returns `no certificate found`.
|
|
283
|
-
*
|
|
284
|
-
* @param request - The request {@link GetSSLCertificateRequest}
|
|
285
|
-
* @returns A Promise of SSLCertificate
|
|
286
|
-
*/
|
|
287
|
-
getSSLCertificate = request => this.client.fetch({
|
|
288
|
-
method: 'GET',
|
|
289
|
-
path: `/domain/v2beta1/ssl-certificates/${validatePathParam('dnsZone', request.dnsZone)}`
|
|
290
|
-
}, unmarshalSSLCertificate);
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Waits for {@link SSLCertificate} to be in a final state.
|
|
294
|
-
*
|
|
295
|
-
* @param request - The request {@link GetSSLCertificateRequest}
|
|
296
|
-
* @param options - The waiting options
|
|
297
|
-
* @returns A Promise of SSLCertificate
|
|
298
|
-
*/
|
|
299
|
-
waitForSSLCertificate = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!SSL_CERTIFICATE_TRANSIENT_STATUSES.includes(res.status))), this.getSSLCertificate, request, options);
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Create or get the DNS zone's TLS certificate. Create a new TLS certificate
|
|
303
|
-
* or retrieve information about an existing TLS certificate.
|
|
304
|
-
*
|
|
305
|
-
* @param request - The request {@link CreateSSLCertificateRequest}
|
|
306
|
-
* @returns A Promise of SSLCertificate
|
|
307
|
-
*/
|
|
308
|
-
createSSLCertificate = request => this.client.fetch({
|
|
309
|
-
body: JSON.stringify(marshalCreateSSLCertificateRequest(request, this.client.settings)),
|
|
310
|
-
headers: jsonContentHeaders,
|
|
311
|
-
method: 'POST',
|
|
312
|
-
path: `/domain/v2beta1/ssl-certificates`
|
|
313
|
-
}, unmarshalSSLCertificate);
|
|
314
|
-
pageOfListSSLCertificates = request => this.client.fetch({
|
|
315
|
-
method: 'GET',
|
|
316
|
-
path: `/domain/v2beta1/ssl-certificates`,
|
|
317
|
-
urlParams: urlParams(['dns_zone', request.dnsZone], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
318
|
-
}, unmarshalListSSLCertificatesResponse);
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* List a user's TLS certificates. List all the TLS certificates a user has
|
|
322
|
-
* created, specified by the user's Project ID and the DNS zone.
|
|
323
|
-
*
|
|
324
|
-
* @param request - The request {@link ListSSLCertificatesRequest}
|
|
325
|
-
* @returns A Promise of ListSSLCertificatesResponse
|
|
326
|
-
*/
|
|
327
|
-
listSSLCertificates = request => enrichForPagination('certificates', this.pageOfListSSLCertificates, request);
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Delete a TLS certificate. Delete an existing TLS certificate specified by
|
|
331
|
-
* its DNS zone. Deleting a TLS certificate is permanent and cannot be
|
|
332
|
-
* undone.
|
|
333
|
-
*
|
|
334
|
-
* @param request - The request {@link DeleteSSLCertificateRequest}
|
|
335
|
-
* @returns A Promise of DeleteSSLCertificateResponse
|
|
336
|
-
*/
|
|
337
|
-
deleteSSLCertificate = request => this.client.fetch({
|
|
338
|
-
method: 'DELETE',
|
|
339
|
-
path: `/domain/v2beta1/ssl-certificates/${validatePathParam('dnsZone', request.dnsZone)}`
|
|
340
|
-
}, unmarshalDeleteSSLCertificateResponse);
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Get the DNS zone's TSIG key. Retrieve information about the TSIG key of a
|
|
344
|
-
* given DNS zone to allow AXFR requests.
|
|
345
|
-
*
|
|
346
|
-
* @param request - The request {@link GetDNSZoneTsigKeyRequest}
|
|
347
|
-
* @returns A Promise of GetDNSZoneTsigKeyResponse
|
|
348
|
-
*/
|
|
349
|
-
getDNSZoneTsigKey = request => this.client.fetch({
|
|
350
|
-
method: 'GET',
|
|
351
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/tsig-key`
|
|
352
|
-
}, unmarshalGetDNSZoneTsigKeyResponse);
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Delete the DNS zone's TSIG key. Delete an existing TSIG key specified by
|
|
356
|
-
* its DNS zone. Deleting a TSIG key is permanent and cannot be undone.
|
|
357
|
-
*
|
|
358
|
-
* @param request - The request {@link DeleteDNSZoneTsigKeyRequest}
|
|
359
|
-
*/
|
|
360
|
-
deleteDNSZoneTsigKey = request => this.client.fetch({
|
|
361
|
-
method: 'DELETE',
|
|
362
|
-
path: `/domain/v2beta1/dns-zones/${validatePathParam('dnsZone', request.dnsZone)}/tsig-key`
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Domains and DNS - Registrar API.
|
|
368
|
-
*
|
|
369
|
-
* Manage your domains and contacts.
|
|
370
|
-
*/
|
|
371
|
-
class RegistrarAPI extends API$1 {
|
|
372
|
-
pageOfListTasks = (() => {
|
|
373
|
-
var _this = this;
|
|
374
|
-
return function (request) {
|
|
375
|
-
if (request === void 0) {
|
|
376
|
-
request = {};
|
|
377
|
-
}
|
|
378
|
-
return _this.client.fetch({
|
|
379
|
-
method: 'GET',
|
|
380
|
-
path: `/domain/v2beta1/tasks`,
|
|
381
|
-
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])
|
|
382
|
-
}, unmarshalListTasksResponse);
|
|
383
|
-
};
|
|
384
|
-
})();
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* List tasks. List all operations performed on the account. You can filter
|
|
388
|
-
* the list of tasks by domain name.
|
|
389
|
-
*
|
|
390
|
-
* @param request - The request {@link RegistrarApiListTasksRequest}
|
|
391
|
-
* @returns A Promise of ListTasksResponse
|
|
392
|
-
*/
|
|
393
|
-
listTasks = (() => {
|
|
394
|
-
var _this2 = this;
|
|
395
|
-
return function (request) {
|
|
396
|
-
if (request === void 0) {
|
|
397
|
-
request = {};
|
|
398
|
-
}
|
|
399
|
-
return enrichForPagination('tasks', _this2.pageOfListTasks, request);
|
|
400
|
-
};
|
|
401
|
-
})();
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
* Purchase domains. Request the registration of domain names. You can provide
|
|
405
|
-
* a domain's already existing contact or a new contact.
|
|
406
|
-
*
|
|
407
|
-
* @param request - The request {@link RegistrarApiBuyDomainsRequest}
|
|
408
|
-
* @returns A Promise of OrderResponse
|
|
409
|
-
*/
|
|
410
|
-
buyDomains = request => this.client.fetch({
|
|
411
|
-
body: JSON.stringify(marshalRegistrarApiBuyDomainsRequest(request, this.client.settings)),
|
|
412
|
-
headers: jsonContentHeaders,
|
|
413
|
-
method: 'POST',
|
|
414
|
-
path: `/domain/v2beta1/buy-domains`
|
|
415
|
-
}, unmarshalOrderResponse);
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Renew domains. Request the renewal of one or more domain names.
|
|
419
|
-
*
|
|
420
|
-
* @param request - The request {@link RegistrarApiRenewDomainsRequest}
|
|
421
|
-
* @returns A Promise of OrderResponse
|
|
422
|
-
*/
|
|
423
|
-
renewDomains = request => this.client.fetch({
|
|
424
|
-
body: JSON.stringify(marshalRegistrarApiRenewDomainsRequest(request, this.client.settings)),
|
|
425
|
-
headers: jsonContentHeaders,
|
|
426
|
-
method: 'POST',
|
|
427
|
-
path: `/domain/v2beta1/renew-domains`
|
|
428
|
-
}, unmarshalOrderResponse);
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Transfer a domain. Request the transfer of a domain from another registrar
|
|
432
|
-
* to Scaleway Domains and DNS.
|
|
433
|
-
*
|
|
434
|
-
* @param request - The request {@link RegistrarApiTransferInDomainRequest}
|
|
435
|
-
* @returns A Promise of OrderResponse
|
|
436
|
-
*/
|
|
437
|
-
transferInDomain = (() => {
|
|
438
|
-
var _this3 = this;
|
|
439
|
-
return function (request) {
|
|
440
|
-
if (request === void 0) {
|
|
441
|
-
request = {};
|
|
442
|
-
}
|
|
443
|
-
return _this3.client.fetch({
|
|
444
|
-
body: JSON.stringify(marshalRegistrarApiTransferInDomainRequest(request, _this3.client.settings)),
|
|
445
|
-
headers: jsonContentHeaders,
|
|
446
|
-
method: 'POST',
|
|
447
|
-
path: `/domain/v2beta1/domains/transfer-domains`
|
|
448
|
-
}, unmarshalOrderResponse);
|
|
449
|
-
};
|
|
450
|
-
})();
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Trade a domain's contact. Request to change a domain's contact owner.<br/>
|
|
454
|
-
* If you specify the `organization_id` of the domain's new owner, the contact
|
|
455
|
-
* will change from the current owner's Scaleway account to the new owner's
|
|
456
|
-
* Scaleway account.<br/> If the new owner's current contact information is
|
|
457
|
-
* not available, the first ever contact they have created for previous
|
|
458
|
-
* domains is taken into account to operate the change.<br/> If the new owner
|
|
459
|
-
* has never created a contact to register domains before, an error message
|
|
460
|
-
* displays.
|
|
461
|
-
*
|
|
462
|
-
* @param request - The request {@link RegistrarApiTradeDomainRequest}
|
|
463
|
-
* @returns A Promise of OrderResponse
|
|
464
|
-
*/
|
|
465
|
-
tradeDomain = request => this.client.fetch({
|
|
466
|
-
body: JSON.stringify(marshalRegistrarApiTradeDomainRequest(request, this.client.settings)),
|
|
467
|
-
headers: jsonContentHeaders,
|
|
468
|
-
method: 'POST',
|
|
469
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/trade`
|
|
470
|
-
}, unmarshalOrderResponse);
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* Register an external domain. Request the registration of an external domain
|
|
474
|
-
* name.
|
|
475
|
-
*
|
|
476
|
-
* @param request - The request
|
|
477
|
-
* {@link RegistrarApiRegisterExternalDomainRequest}
|
|
478
|
-
* @returns A Promise of RegisterExternalDomainResponse
|
|
479
|
-
*/
|
|
480
|
-
registerExternalDomain = request => this.client.fetch({
|
|
481
|
-
body: JSON.stringify(marshalRegistrarApiRegisterExternalDomainRequest(request, this.client.settings)),
|
|
482
|
-
headers: jsonContentHeaders,
|
|
483
|
-
method: 'POST',
|
|
484
|
-
path: `/domain/v2beta1/external-domains`
|
|
485
|
-
}, unmarshalRegisterExternalDomainResponse);
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Delete an external domain. Delete an external domain name.
|
|
489
|
-
*
|
|
490
|
-
* @param request - The request {@link RegistrarApiDeleteExternalDomainRequest}
|
|
491
|
-
* @returns A Promise of DeleteExternalDomainResponse
|
|
492
|
-
*/
|
|
493
|
-
deleteExternalDomain = request => this.client.fetch({
|
|
494
|
-
method: 'DELETE',
|
|
495
|
-
path: `/domain/v2beta1/external-domains/${validatePathParam('domain', request.domain)}`
|
|
496
|
-
}, unmarshalDeleteExternalDomainResponse);
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* Check if contacts are compatible with a domain or a TLD. Check whether
|
|
500
|
-
* contacts are compatible with a domain or a TLD. If contacts are not
|
|
501
|
-
* compatible with either the domain or the TLD, the information that needs to
|
|
502
|
-
* be corrected is returned.
|
|
503
|
-
*
|
|
504
|
-
* @param request - The request
|
|
505
|
-
* {@link RegistrarApiCheckContactsCompatibilityRequest}
|
|
506
|
-
* @returns A Promise of CheckContactsCompatibilityResponse
|
|
507
|
-
*/
|
|
508
|
-
checkContactsCompatibility = (() => {
|
|
509
|
-
var _this4 = this;
|
|
510
|
-
return function (request) {
|
|
511
|
-
if (request === void 0) {
|
|
512
|
-
request = {};
|
|
513
|
-
}
|
|
514
|
-
return _this4.client.fetch({
|
|
515
|
-
body: JSON.stringify(marshalRegistrarApiCheckContactsCompatibilityRequest(request, _this4.client.settings)),
|
|
516
|
-
headers: jsonContentHeaders,
|
|
517
|
-
method: 'POST',
|
|
518
|
-
path: `/domain/v2beta1/check-contacts-compatibility`
|
|
519
|
-
}, unmarshalCheckContactsCompatibilityResponse);
|
|
520
|
-
};
|
|
521
|
-
})();
|
|
522
|
-
pageOfListContacts = (() => {
|
|
523
|
-
var _this5 = this;
|
|
524
|
-
return function (request) {
|
|
525
|
-
if (request === void 0) {
|
|
526
|
-
request = {};
|
|
527
|
-
}
|
|
528
|
-
return _this5.client.fetch({
|
|
529
|
-
method: 'GET',
|
|
530
|
-
path: `/domain/v2beta1/contacts`,
|
|
531
|
-
urlParams: urlParams(['domain', request.domain], ['email_status', request.emailStatus], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize], ['project_id', request.projectId], ['role', request.role])
|
|
532
|
-
}, unmarshalListContactsResponse);
|
|
533
|
-
};
|
|
534
|
-
})();
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* List contacts. Retrieve the list of contacts and their associated domains
|
|
538
|
-
* and roles. You can filter the list by domain name.
|
|
539
|
-
*
|
|
540
|
-
* @param request - The request {@link RegistrarApiListContactsRequest}
|
|
541
|
-
* @returns A Promise of ListContactsResponse
|
|
542
|
-
*/
|
|
543
|
-
listContacts = (() => {
|
|
544
|
-
var _this6 = this;
|
|
545
|
-
return function (request) {
|
|
546
|
-
if (request === void 0) {
|
|
547
|
-
request = {};
|
|
548
|
-
}
|
|
549
|
-
return enrichForPagination('contacts', _this6.pageOfListContacts, request);
|
|
550
|
-
};
|
|
551
|
-
})();
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Get a contact. Retrieve a contact's details from the registrar using the
|
|
555
|
-
* given contact's ID.
|
|
556
|
-
*
|
|
557
|
-
* @param request - The request {@link RegistrarApiGetContactRequest}
|
|
558
|
-
* @returns A Promise of Contact
|
|
559
|
-
*/
|
|
560
|
-
getContact = request => this.client.fetch({
|
|
561
|
-
method: 'GET',
|
|
562
|
-
path: `/domain/v2beta1/contacts/${validatePathParam('contactId', request.contactId)}`
|
|
563
|
-
}, unmarshalContact);
|
|
564
|
-
|
|
565
|
-
/**
|
|
566
|
-
* Update contact. Edit the contact's information.
|
|
567
|
-
*
|
|
568
|
-
* @param request - The request {@link RegistrarApiUpdateContactRequest}
|
|
569
|
-
* @returns A Promise of Contact
|
|
570
|
-
*/
|
|
571
|
-
updateContact = request => this.client.fetch({
|
|
572
|
-
body: JSON.stringify(marshalRegistrarApiUpdateContactRequest(request, this.client.settings)),
|
|
573
|
-
headers: jsonContentHeaders,
|
|
574
|
-
method: 'PATCH',
|
|
575
|
-
path: `/domain/v2beta1/contacts/${validatePathParam('contactId', request.contactId)}`
|
|
576
|
-
}, unmarshalContact);
|
|
577
|
-
pageOfListDomains = (() => {
|
|
578
|
-
var _this7 = this;
|
|
579
|
-
return function (request) {
|
|
580
|
-
if (request === void 0) {
|
|
581
|
-
request = {};
|
|
582
|
-
}
|
|
583
|
-
return _this7.client.fetch({
|
|
584
|
-
method: 'GET',
|
|
585
|
-
path: `/domain/v2beta1/domains`,
|
|
586
|
-
urlParams: urlParams(['domain', request.domain], ['is_external', request.isExternal], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['project_id', request.projectId], ['registrar', request.registrar], ['status', request.status])
|
|
587
|
-
}, unmarshalListDomainsResponse);
|
|
588
|
-
};
|
|
589
|
-
})();
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* List domains. Retrieve the list of domains you own.
|
|
593
|
-
*
|
|
594
|
-
* @param request - The request {@link RegistrarApiListDomainsRequest}
|
|
595
|
-
* @returns A Promise of ListDomainsResponse
|
|
596
|
-
*/
|
|
597
|
-
listDomains = (() => {
|
|
598
|
-
var _this8 = this;
|
|
599
|
-
return function (request) {
|
|
600
|
-
if (request === void 0) {
|
|
601
|
-
request = {};
|
|
602
|
-
}
|
|
603
|
-
return enrichForPagination('domains', _this8.pageOfListDomains, request);
|
|
604
|
-
};
|
|
605
|
-
})();
|
|
606
|
-
pageOfListRenewableDomains = (() => {
|
|
607
|
-
var _this9 = this;
|
|
608
|
-
return function (request) {
|
|
609
|
-
if (request === void 0) {
|
|
610
|
-
request = {};
|
|
611
|
-
}
|
|
612
|
-
return _this9.client.fetch({
|
|
613
|
-
method: 'GET',
|
|
614
|
-
path: `/domain/v2beta1/renewable-domains`,
|
|
615
|
-
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
616
|
-
}, unmarshalListRenewableDomainsResponse);
|
|
617
|
-
};
|
|
618
|
-
})();
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
* List domains that can be renewed. Retrieve the list of domains you own that
|
|
622
|
-
* can be renewed. You can also see the maximum renewal duration in years for
|
|
623
|
-
* your domains that are renewable.
|
|
624
|
-
*
|
|
625
|
-
* @param request - The request {@link RegistrarApiListRenewableDomainsRequest}
|
|
626
|
-
* @returns A Promise of ListRenewableDomainsResponse
|
|
627
|
-
*/
|
|
628
|
-
listRenewableDomains = (() => {
|
|
629
|
-
var _this10 = this;
|
|
630
|
-
return function (request) {
|
|
631
|
-
if (request === void 0) {
|
|
632
|
-
request = {};
|
|
633
|
-
}
|
|
634
|
-
return enrichForPagination('domains', _this10.pageOfListRenewableDomains, request);
|
|
635
|
-
};
|
|
636
|
-
})();
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* Get domain. Retrieve a specific domain and display the domain's
|
|
640
|
-
* information.
|
|
641
|
-
*
|
|
642
|
-
* @param request - The request {@link RegistrarApiGetDomainRequest}
|
|
643
|
-
* @returns A Promise of Domain
|
|
644
|
-
*/
|
|
645
|
-
getDomain = request => this.client.fetch({
|
|
646
|
-
method: 'GET',
|
|
647
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}`
|
|
648
|
-
}, unmarshalDomain);
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* Waits for {@link Domain} to be in a final state.
|
|
652
|
-
*
|
|
653
|
-
* @param request - The request {@link RegistrarApiGetDomainRequest}
|
|
654
|
-
* @param options - The waiting options
|
|
655
|
-
* @returns A Promise of Domain
|
|
656
|
-
*/
|
|
657
|
-
waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* Update a domain's contacts. Update contacts for a specific domain or create
|
|
661
|
-
* a new contact.<br/> If you add the same contact for multiple roles (owner,
|
|
662
|
-
* administrative, technical), only one ID will be created and used for all of
|
|
663
|
-
* the roles.
|
|
664
|
-
*
|
|
665
|
-
* @param request - The request {@link RegistrarApiUpdateDomainRequest}
|
|
666
|
-
* @returns A Promise of Domain
|
|
667
|
-
*/
|
|
668
|
-
updateDomain = request => this.client.fetch({
|
|
669
|
-
body: JSON.stringify(marshalRegistrarApiUpdateDomainRequest(request, this.client.settings)),
|
|
670
|
-
headers: jsonContentHeaders,
|
|
671
|
-
method: 'PATCH',
|
|
672
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}`
|
|
673
|
-
}, unmarshalDomain);
|
|
674
|
-
|
|
675
|
-
/**
|
|
676
|
-
* Lock the transfer of a domain. Lock the transfer of a domain. This means
|
|
677
|
-
* that the domain cannot be transferred and the authorization code cannot be
|
|
678
|
-
* requested to your current registrar.
|
|
679
|
-
*
|
|
680
|
-
* @param request - The request {@link RegistrarApiLockDomainTransferRequest}
|
|
681
|
-
* @returns A Promise of Domain
|
|
682
|
-
*/
|
|
683
|
-
lockDomainTransfer = request => this.client.fetch({
|
|
684
|
-
body: '{}',
|
|
685
|
-
headers: jsonContentHeaders,
|
|
686
|
-
method: 'POST',
|
|
687
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/lock-transfer`
|
|
688
|
-
}, unmarshalDomain);
|
|
689
|
-
|
|
690
|
-
/**
|
|
691
|
-
* Unlock the transfer of a domain. Unlock the transfer of a domain. This
|
|
692
|
-
* means that the domain can be transferred and the authorization code can be
|
|
693
|
-
* requested to your current registrar.
|
|
694
|
-
*
|
|
695
|
-
* @param request - The request {@link RegistrarApiUnlockDomainTransferRequest}
|
|
696
|
-
* @returns A Promise of Domain
|
|
697
|
-
*/
|
|
698
|
-
unlockDomainTransfer = request => this.client.fetch({
|
|
699
|
-
body: '{}',
|
|
700
|
-
headers: jsonContentHeaders,
|
|
701
|
-
method: 'POST',
|
|
702
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/unlock-transfer`
|
|
703
|
-
}, unmarshalDomain);
|
|
704
|
-
|
|
705
|
-
/**
|
|
706
|
-
* Enable auto renew. Enable the `auto renew` feature for a domain. This means
|
|
707
|
-
* the domain will be automatically renewed before its expiry date.
|
|
708
|
-
*
|
|
709
|
-
* @param request - The request
|
|
710
|
-
* {@link RegistrarApiEnableDomainAutoRenewRequest}
|
|
711
|
-
* @returns A Promise of Domain
|
|
712
|
-
*/
|
|
713
|
-
enableDomainAutoRenew = request => this.client.fetch({
|
|
714
|
-
body: '{}',
|
|
715
|
-
headers: jsonContentHeaders,
|
|
716
|
-
method: 'POST',
|
|
717
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/enable-auto-renew`
|
|
718
|
-
}, unmarshalDomain);
|
|
719
|
-
|
|
720
|
-
/**
|
|
721
|
-
* Disable auto renew. Disable the `auto renew` feature for a domain. This
|
|
722
|
-
* means the domain will not be renewed before its expiry date.
|
|
723
|
-
*
|
|
724
|
-
* @param request - The request
|
|
725
|
-
* {@link RegistrarApiDisableDomainAutoRenewRequest}
|
|
726
|
-
* @returns A Promise of Domain
|
|
727
|
-
*/
|
|
728
|
-
disableDomainAutoRenew = request => this.client.fetch({
|
|
729
|
-
body: '{}',
|
|
730
|
-
headers: jsonContentHeaders,
|
|
731
|
-
method: 'POST',
|
|
732
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/disable-auto-renew`
|
|
733
|
-
}, unmarshalDomain);
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* Get a domain's authorization code. Retrieve the authorization code to
|
|
737
|
-
* tranfer an unlocked domain. The output returns an error if the domain is
|
|
738
|
-
* locked. Some TLDs may have a different procedure to retrieve the
|
|
739
|
-
* authorization code. In that case, the information displays in the message
|
|
740
|
-
* field.
|
|
741
|
-
*
|
|
742
|
-
* @param request - The request {@link RegistrarApiGetDomainAuthCodeRequest}
|
|
743
|
-
* @returns A Promise of GetDomainAuthCodeResponse
|
|
744
|
-
*/
|
|
745
|
-
getDomainAuthCode = request => this.client.fetch({
|
|
746
|
-
method: 'GET',
|
|
747
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/auth-code`
|
|
748
|
-
}, unmarshalGetDomainAuthCodeResponse);
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* Update domain DNSSEC. If your domain has the default Scaleway NS and uses
|
|
752
|
-
* another registrar, you have to update the DS record manually.
|
|
753
|
-
*
|
|
754
|
-
* @param request - The request {@link RegistrarApiEnableDomainDNSSECRequest}
|
|
755
|
-
* @returns A Promise of Domain
|
|
756
|
-
*/
|
|
757
|
-
enableDomainDNSSEC = request => this.client.fetch({
|
|
758
|
-
body: JSON.stringify(marshalRegistrarApiEnableDomainDNSSECRequest(request, this.client.settings)),
|
|
759
|
-
headers: jsonContentHeaders,
|
|
760
|
-
method: 'POST',
|
|
761
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/enable-dnssec`
|
|
762
|
-
}, unmarshalDomain);
|
|
763
|
-
|
|
764
|
-
/**
|
|
765
|
-
* Disable a domain's DNSSEC. Disable DNSSEC for a domain.
|
|
766
|
-
*
|
|
767
|
-
* @param request - The request {@link RegistrarApiDisableDomainDNSSECRequest}
|
|
768
|
-
* @returns A Promise of Domain
|
|
769
|
-
*/
|
|
770
|
-
disableDomainDNSSEC = request => this.client.fetch({
|
|
771
|
-
body: '{}',
|
|
772
|
-
headers: jsonContentHeaders,
|
|
773
|
-
method: 'POST',
|
|
774
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/disable-dnssec`
|
|
775
|
-
}, unmarshalDomain);
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* Search available domains. Search a domain or a maximum of 10 domains that
|
|
779
|
-
* are available.
|
|
780
|
-
*
|
|
781
|
-
* If the TLD list is empty or not set, the search returns the results from
|
|
782
|
-
* the most popular TLDs.
|
|
783
|
-
*
|
|
784
|
-
* @param request - The request
|
|
785
|
-
* {@link RegistrarApiSearchAvailableDomainsRequest}
|
|
786
|
-
* @returns A Promise of SearchAvailableDomainsResponse
|
|
787
|
-
*/
|
|
788
|
-
searchAvailableDomains = request => this.client.fetch({
|
|
789
|
-
method: 'GET',
|
|
790
|
-
path: `/domain/v2beta1/search-domains`,
|
|
791
|
-
urlParams: urlParams(['domains', request.domains], ['strict_search', request.strictSearch], ['tlds', request.tlds])
|
|
792
|
-
}, unmarshalSearchAvailableDomainsResponse);
|
|
793
|
-
pageOfListTlds = (() => {
|
|
794
|
-
var _this11 = this;
|
|
795
|
-
return function (request) {
|
|
796
|
-
if (request === void 0) {
|
|
797
|
-
request = {};
|
|
798
|
-
}
|
|
799
|
-
return _this11.client.fetch({
|
|
800
|
-
method: 'GET',
|
|
801
|
-
path: `/domain/v2beta1/tlds`,
|
|
802
|
-
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['tlds', request.tlds])
|
|
803
|
-
}, unmarshalListTldsResponse);
|
|
804
|
-
};
|
|
805
|
-
})();
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* List TLD offers. Retrieve the list of TLDs and offers associated with them.
|
|
809
|
-
*
|
|
810
|
-
* @param request - The request {@link RegistrarApiListTldsRequest}
|
|
811
|
-
* @returns A Promise of ListTldsResponse
|
|
812
|
-
*/
|
|
813
|
-
listTlds = (() => {
|
|
814
|
-
var _this12 = this;
|
|
815
|
-
return function (request) {
|
|
816
|
-
if (request === void 0) {
|
|
817
|
-
request = {};
|
|
818
|
-
}
|
|
819
|
-
return enrichForPagination('tlds', _this12.pageOfListTlds, request);
|
|
820
|
-
};
|
|
821
|
-
})();
|
|
822
|
-
|
|
823
|
-
/**
|
|
824
|
-
* Create a hostname for a domain. Create a hostname for a domain with glue
|
|
825
|
-
* IPs.
|
|
826
|
-
*
|
|
827
|
-
* @param request - The request {@link RegistrarApiCreateDomainHostRequest}
|
|
828
|
-
* @returns A Promise of Host
|
|
829
|
-
*/
|
|
830
|
-
createDomainHost = request => this.client.fetch({
|
|
831
|
-
body: JSON.stringify(marshalRegistrarApiCreateDomainHostRequest(request, this.client.settings)),
|
|
832
|
-
headers: jsonContentHeaders,
|
|
833
|
-
method: 'POST',
|
|
834
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/hosts`
|
|
835
|
-
}, unmarshalHost);
|
|
836
|
-
pageOfListDomainHosts = request => this.client.fetch({
|
|
837
|
-
method: 'GET',
|
|
838
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/hosts`,
|
|
839
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
840
|
-
}, unmarshalListDomainHostsResponse);
|
|
841
|
-
|
|
842
|
-
/**
|
|
843
|
-
* List a domain's hostnames. List a domain's hostnames using their glue IPs.
|
|
844
|
-
*
|
|
845
|
-
* @param request - The request {@link RegistrarApiListDomainHostsRequest}
|
|
846
|
-
* @returns A Promise of ListDomainHostsResponse
|
|
847
|
-
*/
|
|
848
|
-
listDomainHosts = request => enrichForPagination('hosts', this.pageOfListDomainHosts, request);
|
|
849
|
-
|
|
850
|
-
/**
|
|
851
|
-
* Update a domain's hostname. Update a domain's hostname with glue IPs.
|
|
852
|
-
*
|
|
853
|
-
* @param request - The request {@link RegistrarApiUpdateDomainHostRequest}
|
|
854
|
-
* @returns A Promise of Host
|
|
855
|
-
*/
|
|
856
|
-
updateDomainHost = request => this.client.fetch({
|
|
857
|
-
body: JSON.stringify(marshalRegistrarApiUpdateDomainHostRequest(request, this.client.settings)),
|
|
858
|
-
headers: jsonContentHeaders,
|
|
859
|
-
method: 'PATCH',
|
|
860
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/hosts/${validatePathParam('name', request.name)}`
|
|
861
|
-
}, unmarshalHost);
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* Delete a domain's hostname.
|
|
865
|
-
*
|
|
866
|
-
* @param request - The request {@link RegistrarApiDeleteDomainHostRequest}
|
|
867
|
-
* @returns A Promise of Host
|
|
868
|
-
*/
|
|
869
|
-
deleteDomainHost = request => this.client.fetch({
|
|
870
|
-
method: 'DELETE',
|
|
871
|
-
path: `/domain/v2beta1/domains/${validatePathParam('domain', request.domain)}/hosts/${validatePathParam('name', request.name)}`
|
|
872
|
-
}, unmarshalHost);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
export { API, RegistrarAPI };
|