@scaleway/sdk 2.63.0 → 2.65.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/api/applesilicon/v1alpha1/api.gen.d.ts +3 -3
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +20 -20
- package/dist/api/cockpit/v1/api.gen.cjs +19 -1
- package/dist/api/cockpit/v1/api.gen.d.ts +4 -3
- package/dist/api/cockpit/v1/api.gen.js +20 -2
- package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
- package/dist/api/cockpit/v1/marshalling.gen.cjs +13 -0
- package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/cockpit/v1/marshalling.gen.js +13 -0
- package/dist/api/cockpit/v1/types.gen.d.ts +50 -31
- package/dist/api/edge_services/v1alpha1/types.gen.d.ts +3 -3
- package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +16 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +16 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +48 -4
- package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +7 -3
- package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +6 -3
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +7 -3
- package/dist/api/inference/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/inference/v1beta1/types.gen.d.ts +21 -21
- package/dist/api/instance/v1/api.gen.d.ts +2 -2
- package/dist/api/instance/v1/types.gen.d.ts +87 -87
- package/dist/api/instance/v1/types.private.gen.d.ts +5 -5
- package/dist/api/interlink/v1beta1/api.gen.cjs +5 -1
- package/dist/api/interlink/v1beta1/api.gen.d.ts +2 -2
- package/dist/api/interlink/v1beta1/api.gen.js +5 -1
- package/dist/api/interlink/v1beta1/marshalling.gen.cjs +1 -0
- package/dist/api/interlink/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/interlink/v1beta1/types.gen.d.ts +29 -24
- package/dist/api/ipam/v1/api.gen.cjs +5 -1
- package/dist/api/ipam/v1/api.gen.d.ts +2 -2
- package/dist/api/ipam/v1/api.gen.js +5 -1
- package/dist/api/ipam/v1/types.gen.d.ts +13 -13
- package/dist/api/key_manager/v1alpha1/api.gen.cjs +41 -37
- package/dist/api/key_manager/v1alpha1/api.gen.d.ts +38 -38
- package/dist/api/key_manager/v1alpha1/api.gen.js +41 -37
- package/dist/api/key_manager/v1alpha1/types.gen.d.ts +31 -30
- package/dist/api/lb/v1/api.gen.cjs +5 -1
- package/dist/api/lb/v1/api.gen.d.ts +3 -3
- package/dist/api/lb/v1/api.gen.js +5 -1
- package/dist/api/lb/v1/types.gen.d.ts +116 -116
- package/dist/api/vpc/v2/api.gen.cjs +5 -21
- package/dist/api/vpc/v2/api.gen.d.ts +3 -13
- package/dist/api/vpc/v2/api.gen.js +6 -22
- package/dist/api/vpc/v2/index.gen.d.ts +1 -1
- package/dist/api/vpc/v2/marshalling.gen.cjs +0 -16
- package/dist/api/vpc/v2/marshalling.gen.d.ts +1 -2
- package/dist/api/vpc/v2/marshalling.gen.js +1 -17
- package/dist/api/vpc/v2/types.gen.d.ts +24 -49
- package/dist/api/webhosting/v1/api.gen.cjs +98 -10
- package/dist/api/webhosting/v1/api.gen.d.ts +40 -12
- package/dist/api/webhosting/v1/api.gen.js +100 -12
- package/dist/api/webhosting/v1/content.gen.cjs +4 -0
- package/dist/api/webhosting/v1/content.gen.d.ts +5 -1
- package/dist/api/webhosting/v1/content.gen.js +4 -0
- package/dist/api/webhosting/v1/index.gen.cjs +2 -0
- package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
- package/dist/api/webhosting/v1/index.gen.js +3 -1
- package/dist/api/webhosting/v1/marshalling.gen.cjs +45 -0
- package/dist/api/webhosting/v1/marshalling.gen.d.ts +3 -1
- package/dist/api/webhosting/v1/marshalling.gen.js +45 -0
- package/dist/api/webhosting/v1/types.gen.d.ts +102 -36
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +6 -2
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +3 -3
- package/dist/api/webhosting/v1alpha1/api.gen.js +6 -2
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +19 -19
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
|
-
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, Session, WebsiteApiListWebsitesRequest } from './types.gen';
|
|
2
|
+
import type { Region as ScwRegion, WaitForOptions } from '../../../bridge';
|
|
3
|
+
import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, SearchDomainsResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Web Hosting Control Panel API.
|
|
6
6
|
*
|
|
@@ -8,7 +8,7 @@ import type { CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsReque
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class ControlPanelAPI extends ParentAPI {
|
|
10
10
|
/** Lists the available regions of the API. */
|
|
11
|
-
static readonly LOCALITIES:
|
|
11
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
12
12
|
protected pageOfListControlPanels: (request?: Readonly<ControlPanelApiListControlPanelsRequest>) => Promise<ListControlPanelsResponse>;
|
|
13
13
|
/**
|
|
14
14
|
* "List the control panels type: cpanel or plesk.".
|
|
@@ -29,7 +29,7 @@ export declare class ControlPanelAPI extends ParentAPI {
|
|
|
29
29
|
*/
|
|
30
30
|
export declare class DatabaseAPI extends ParentAPI {
|
|
31
31
|
/** Lists the available regions of the API. */
|
|
32
|
-
static readonly LOCALITIES:
|
|
32
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
33
33
|
/**
|
|
34
34
|
* "Create a new database within your hosting plan".
|
|
35
35
|
*
|
|
@@ -124,7 +124,7 @@ export declare class DatabaseAPI extends ParentAPI {
|
|
|
124
124
|
*/
|
|
125
125
|
export declare class DnsAPI extends ParentAPI {
|
|
126
126
|
/** Lists the available regions of the API. */
|
|
127
|
-
static readonly LOCALITIES:
|
|
127
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
128
128
|
/**
|
|
129
129
|
* Get DNS records. Get the set of DNS records of a specified domain
|
|
130
130
|
* associated with a Web Hosting plan's domain.
|
|
@@ -134,19 +134,47 @@ export declare class DnsAPI extends ParentAPI {
|
|
|
134
134
|
*/
|
|
135
135
|
getDomainDnsRecords: (request: Readonly<DnsApiGetDomainDnsRecordsRequest>) => Promise<DnsRecords>;
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* Check whether you own this domain or not.. Check whether you own this
|
|
138
|
+
* domain or not.
|
|
138
139
|
*
|
|
139
140
|
* @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
|
|
140
141
|
* @returns A Promise of CheckUserOwnsDomainResponse
|
|
141
142
|
*/
|
|
142
143
|
checkUserOwnsDomain: (request: Readonly<DnsApiCheckUserOwnsDomainRequest>) => Promise<CheckUserOwnsDomainResponse>;
|
|
143
144
|
/**
|
|
144
|
-
*
|
|
145
|
+
* Synchronize your DNS records on the Elements Console and on cPanel..
|
|
146
|
+
* Synchronize your DNS records on the Elements Console and on cPanel.
|
|
145
147
|
*
|
|
146
148
|
* @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
|
|
147
149
|
* @returns A Promise of DnsRecords
|
|
148
150
|
*/
|
|
149
151
|
syncDomainDnsRecords: (request: Readonly<DnsApiSyncDomainDnsRecordsRequest>) => Promise<DnsRecords>;
|
|
152
|
+
/**
|
|
153
|
+
* Search for available domains based on domain name.. Search for available
|
|
154
|
+
* domains based on domain name.
|
|
155
|
+
*
|
|
156
|
+
* @param request - The request {@link DnsApiSearchDomainsRequest}
|
|
157
|
+
* @returns A Promise of SearchDomainsResponse
|
|
158
|
+
*/
|
|
159
|
+
searchDomains: (request: Readonly<DnsApiSearchDomainsRequest>) => Promise<SearchDomainsResponse>;
|
|
160
|
+
/**
|
|
161
|
+
* Retrieve detailed information about a specific domain, including its
|
|
162
|
+
* status, DNS configuration, and ownership.. Retrieve detailed information
|
|
163
|
+
* about a specific domain, including its status, DNS configuration, and
|
|
164
|
+
* ownership.
|
|
165
|
+
*
|
|
166
|
+
* @param request - The request {@link DnsApiGetDomainRequest}
|
|
167
|
+
* @returns A Promise of Domain
|
|
168
|
+
*/
|
|
169
|
+
getDomain: (request: Readonly<DnsApiGetDomainRequest>) => Promise<Domain>;
|
|
170
|
+
/**
|
|
171
|
+
* Waits for {@link Domain} to be in a final state.
|
|
172
|
+
*
|
|
173
|
+
* @param request - The request {@link DnsApiGetDomainRequest}
|
|
174
|
+
* @param options - The waiting options
|
|
175
|
+
* @returns A Promise of Domain
|
|
176
|
+
*/
|
|
177
|
+
waitForDomain: (request: Readonly<DnsApiGetDomainRequest>, options?: Readonly<WaitForOptions<Domain>>) => Promise<Domain>;
|
|
150
178
|
}
|
|
151
179
|
/**
|
|
152
180
|
* Web Hosting Offer API.
|
|
@@ -155,7 +183,7 @@ export declare class DnsAPI extends ParentAPI {
|
|
|
155
183
|
*/
|
|
156
184
|
export declare class OfferAPI extends ParentAPI {
|
|
157
185
|
/** Lists the available regions of the API. */
|
|
158
|
-
static readonly LOCALITIES:
|
|
186
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
159
187
|
protected pageOfListOffers: (request?: Readonly<OfferApiListOffersRequest>) => Promise<ListOffersResponse>;
|
|
160
188
|
/**
|
|
161
189
|
* List all available hosting offers along with their specific options.. List
|
|
@@ -176,7 +204,7 @@ export declare class OfferAPI extends ParentAPI {
|
|
|
176
204
|
*/
|
|
177
205
|
export declare class HostingAPI extends ParentAPI {
|
|
178
206
|
/** Lists the available regions of the API. */
|
|
179
|
-
static readonly LOCALITIES:
|
|
207
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
180
208
|
/**
|
|
181
209
|
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
|
|
182
210
|
* type required via the `offer_id` parameter.
|
|
@@ -264,7 +292,7 @@ export declare class HostingAPI extends ParentAPI {
|
|
|
264
292
|
*/
|
|
265
293
|
export declare class FtpAccountAPI extends ParentAPI {
|
|
266
294
|
/** Lists the available regions of the API. */
|
|
267
|
-
static readonly LOCALITIES:
|
|
295
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
268
296
|
/**
|
|
269
297
|
* Create a new FTP account within your hosting plan.. Create a new FTP
|
|
270
298
|
* account within your hosting plan.
|
|
@@ -303,7 +331,7 @@ export declare class FtpAccountAPI extends ParentAPI {
|
|
|
303
331
|
*/
|
|
304
332
|
export declare class MailAccountAPI extends ParentAPI {
|
|
305
333
|
/** Lists the available regions of the API. */
|
|
306
|
-
static readonly LOCALITIES:
|
|
334
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
307
335
|
/**
|
|
308
336
|
* Create a new mail account within your hosting plan.. Create a new mail
|
|
309
337
|
* account within your hosting plan.
|
|
@@ -349,7 +377,7 @@ export declare class MailAccountAPI extends ParentAPI {
|
|
|
349
377
|
*/
|
|
350
378
|
export declare class WebsiteAPI extends ParentAPI {
|
|
351
379
|
/** Lists the available regions of the API. */
|
|
352
|
-
static readonly LOCALITIES:
|
|
380
|
+
static readonly LOCALITIES: ScwRegion[];
|
|
353
381
|
protected pageOfListWebsites: (request: Readonly<WebsiteApiListWebsitesRequest>) => Promise<ListWebsitesResponse>;
|
|
354
382
|
/**
|
|
355
383
|
* List all websites for a specific hosting.. List all websites for a specific
|
|
@@ -3,14 +3,18 @@ import { API as API$1 } from "../../../scw/api.js";
|
|
|
3
3
|
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
|
-
import { HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
|
|
6
|
+
import { DOMAIN_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
+
import { unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalSearchDomainsResponse, unmarshalDomain, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
11
11
|
class ControlPanelAPI extends API$1 {
|
|
12
12
|
/** Lists the available regions of the API. */
|
|
13
|
-
static LOCALITIES = [
|
|
13
|
+
static LOCALITIES = [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
];
|
|
14
18
|
pageOfListControlPanels = (request = {}) => this.client.fetch(
|
|
15
19
|
{
|
|
16
20
|
method: "GET",
|
|
@@ -35,7 +39,11 @@ class ControlPanelAPI extends API$1 {
|
|
|
35
39
|
}
|
|
36
40
|
class DatabaseAPI extends API$1 {
|
|
37
41
|
/** Lists the available regions of the API. */
|
|
38
|
-
static LOCALITIES = [
|
|
42
|
+
static LOCALITIES = [
|
|
43
|
+
"fr-par",
|
|
44
|
+
"nl-ams",
|
|
45
|
+
"pl-waw"
|
|
46
|
+
];
|
|
39
47
|
/**
|
|
40
48
|
* "Create a new database within your hosting plan".
|
|
41
49
|
*
|
|
@@ -236,7 +244,11 @@ class DatabaseAPI extends API$1 {
|
|
|
236
244
|
}
|
|
237
245
|
class DnsAPI extends API$1 {
|
|
238
246
|
/** Lists the available regions of the API. */
|
|
239
|
-
static LOCALITIES = [
|
|
247
|
+
static LOCALITIES = [
|
|
248
|
+
"fr-par",
|
|
249
|
+
"nl-ams",
|
|
250
|
+
"pl-waw"
|
|
251
|
+
];
|
|
240
252
|
/**
|
|
241
253
|
* Get DNS records. Get the set of DNS records of a specified domain
|
|
242
254
|
* associated with a Web Hosting plan's domain.
|
|
@@ -252,7 +264,8 @@ class DnsAPI extends API$1 {
|
|
|
252
264
|
unmarshalDnsRecords
|
|
253
265
|
);
|
|
254
266
|
/**
|
|
255
|
-
*
|
|
267
|
+
* Check whether you own this domain or not.. Check whether you own this
|
|
268
|
+
* domain or not.
|
|
256
269
|
*
|
|
257
270
|
* @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
|
|
258
271
|
* @returns A Promise of CheckUserOwnsDomainResponse
|
|
@@ -272,7 +285,8 @@ class DnsAPI extends API$1 {
|
|
|
272
285
|
unmarshalCheckUserOwnsDomainResponse
|
|
273
286
|
);
|
|
274
287
|
/**
|
|
275
|
-
*
|
|
288
|
+
* Synchronize your DNS records on the Elements Console and on cPanel..
|
|
289
|
+
* Synchronize your DNS records on the Elements Console and on cPanel.
|
|
276
290
|
*
|
|
277
291
|
* @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
|
|
278
292
|
* @returns A Promise of DnsRecords
|
|
@@ -291,10 +305,68 @@ class DnsAPI extends API$1 {
|
|
|
291
305
|
},
|
|
292
306
|
unmarshalDnsRecords
|
|
293
307
|
);
|
|
308
|
+
/**
|
|
309
|
+
* Search for available domains based on domain name.. Search for available
|
|
310
|
+
* domains based on domain name.
|
|
311
|
+
*
|
|
312
|
+
* @param request - The request {@link DnsApiSearchDomainsRequest}
|
|
313
|
+
* @returns A Promise of SearchDomainsResponse
|
|
314
|
+
*/
|
|
315
|
+
searchDomains = (request) => this.client.fetch(
|
|
316
|
+
{
|
|
317
|
+
method: "GET",
|
|
318
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/search-domains`,
|
|
319
|
+
urlParams: urlParams(
|
|
320
|
+
["domain_name", request.domainName],
|
|
321
|
+
[
|
|
322
|
+
"project_id",
|
|
323
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
324
|
+
]
|
|
325
|
+
)
|
|
326
|
+
},
|
|
327
|
+
unmarshalSearchDomainsResponse
|
|
328
|
+
);
|
|
329
|
+
/**
|
|
330
|
+
* Retrieve detailed information about a specific domain, including its
|
|
331
|
+
* status, DNS configuration, and ownership.. Retrieve detailed information
|
|
332
|
+
* about a specific domain, including its status, DNS configuration, and
|
|
333
|
+
* ownership.
|
|
334
|
+
*
|
|
335
|
+
* @param request - The request {@link DnsApiGetDomainRequest}
|
|
336
|
+
* @returns A Promise of Domain
|
|
337
|
+
*/
|
|
338
|
+
getDomain = (request) => this.client.fetch(
|
|
339
|
+
{
|
|
340
|
+
method: "GET",
|
|
341
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainName", request.domainName)}`,
|
|
342
|
+
urlParams: urlParams([
|
|
343
|
+
"project_id",
|
|
344
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
345
|
+
])
|
|
346
|
+
},
|
|
347
|
+
unmarshalDomain
|
|
348
|
+
);
|
|
349
|
+
/**
|
|
350
|
+
* Waits for {@link Domain} to be in a final state.
|
|
351
|
+
*
|
|
352
|
+
* @param request - The request {@link DnsApiGetDomainRequest}
|
|
353
|
+
* @param options - The waiting options
|
|
354
|
+
* @returns A Promise of Domain
|
|
355
|
+
*/
|
|
356
|
+
waitForDomain = (request, options) => waitForResource(
|
|
357
|
+
options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))),
|
|
358
|
+
this.getDomain,
|
|
359
|
+
request,
|
|
360
|
+
options
|
|
361
|
+
);
|
|
294
362
|
}
|
|
295
363
|
class OfferAPI extends API$1 {
|
|
296
364
|
/** Lists the available regions of the API. */
|
|
297
|
-
static LOCALITIES = [
|
|
365
|
+
static LOCALITIES = [
|
|
366
|
+
"fr-par",
|
|
367
|
+
"nl-ams",
|
|
368
|
+
"pl-waw"
|
|
369
|
+
];
|
|
298
370
|
pageOfListOffers = (request = {}) => this.client.fetch(
|
|
299
371
|
{
|
|
300
372
|
method: "GET",
|
|
@@ -323,7 +395,11 @@ class OfferAPI extends API$1 {
|
|
|
323
395
|
}
|
|
324
396
|
class HostingAPI extends API$1 {
|
|
325
397
|
/** Lists the available regions of the API. */
|
|
326
|
-
static LOCALITIES = [
|
|
398
|
+
static LOCALITIES = [
|
|
399
|
+
"fr-par",
|
|
400
|
+
"nl-ams",
|
|
401
|
+
"pl-waw"
|
|
402
|
+
];
|
|
327
403
|
/**
|
|
328
404
|
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
|
|
329
405
|
* type required via the `offer_id` parameter.
|
|
@@ -481,7 +557,11 @@ class HostingAPI extends API$1 {
|
|
|
481
557
|
}
|
|
482
558
|
class FtpAccountAPI extends API$1 {
|
|
483
559
|
/** Lists the available regions of the API. */
|
|
484
|
-
static LOCALITIES = [
|
|
560
|
+
static LOCALITIES = [
|
|
561
|
+
"fr-par",
|
|
562
|
+
"nl-ams",
|
|
563
|
+
"pl-waw"
|
|
564
|
+
];
|
|
485
565
|
/**
|
|
486
566
|
* Create a new FTP account within your hosting plan.. Create a new FTP
|
|
487
567
|
* account within your hosting plan.
|
|
@@ -558,7 +638,11 @@ class FtpAccountAPI extends API$1 {
|
|
|
558
638
|
}
|
|
559
639
|
class MailAccountAPI extends API$1 {
|
|
560
640
|
/** Lists the available regions of the API. */
|
|
561
|
-
static LOCALITIES = [
|
|
641
|
+
static LOCALITIES = [
|
|
642
|
+
"fr-par",
|
|
643
|
+
"nl-ams",
|
|
644
|
+
"pl-waw"
|
|
645
|
+
];
|
|
562
646
|
/**
|
|
563
647
|
* Create a new mail account within your hosting plan.. Create a new mail
|
|
564
648
|
* account within your hosting plan.
|
|
@@ -650,7 +734,11 @@ class MailAccountAPI extends API$1 {
|
|
|
650
734
|
}
|
|
651
735
|
class WebsiteAPI extends API$1 {
|
|
652
736
|
/** Lists the available regions of the API. */
|
|
653
|
-
static LOCALITIES = [
|
|
737
|
+
static LOCALITIES = [
|
|
738
|
+
"fr-par",
|
|
739
|
+
"nl-ams",
|
|
740
|
+
"pl-waw"
|
|
741
|
+
];
|
|
654
742
|
pageOfListWebsites = (request) => this.client.fetch(
|
|
655
743
|
{
|
|
656
744
|
method: "GET",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = ["validating"];
|
|
4
|
+
const DOMAIN_TRANSIENT_STATUSES = ["validating"];
|
|
3
5
|
const HOSTING_TRANSIENT_STATUSES = [
|
|
4
6
|
"delivering",
|
|
5
7
|
"deleting",
|
|
@@ -10,5 +12,7 @@ const HOSTING_SUMMARY_TRANSIENT_STATUSES = [
|
|
|
10
12
|
"deleting",
|
|
11
13
|
"migrating"
|
|
12
14
|
];
|
|
15
|
+
exports.DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = DOMAIN_AVAILABILITY_TRANSIENT_STATUSES;
|
|
16
|
+
exports.DOMAIN_TRANSIENT_STATUSES = DOMAIN_TRANSIENT_STATUSES;
|
|
13
17
|
exports.HOSTING_SUMMARY_TRANSIENT_STATUSES = HOSTING_SUMMARY_TRANSIENT_STATUSES;
|
|
14
18
|
exports.HOSTING_TRANSIENT_STATUSES = HOSTING_TRANSIENT_STATUSES;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type { HostingStatus, HostingSummaryStatus } from './types.gen';
|
|
1
|
+
import type { DomainAvailabilityStatus, DomainStatus, HostingStatus, HostingSummaryStatus } from './types.gen';
|
|
2
|
+
/** Lists transient statutes of the enum {@link DomainAvailabilityStatus}. */
|
|
3
|
+
export declare const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES: DomainAvailabilityStatus[];
|
|
4
|
+
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
5
|
+
export declare const DOMAIN_TRANSIENT_STATUSES: DomainStatus[];
|
|
2
6
|
/** Lists transient statutes of the enum {@link HostingStatus}. */
|
|
3
7
|
export declare const HOSTING_TRANSIENT_STATUSES: HostingStatus[];
|
|
4
8
|
/** Lists transient statutes of the enum {@link HostingSummaryStatus}. */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = ["validating"];
|
|
2
|
+
const DOMAIN_TRANSIENT_STATUSES = ["validating"];
|
|
1
3
|
const HOSTING_TRANSIENT_STATUSES = [
|
|
2
4
|
"delivering",
|
|
3
5
|
"deleting",
|
|
@@ -9,6 +11,8 @@ const HOSTING_SUMMARY_TRANSIENT_STATUSES = [
|
|
|
9
11
|
"migrating"
|
|
10
12
|
];
|
|
11
13
|
export {
|
|
14
|
+
DOMAIN_AVAILABILITY_TRANSIENT_STATUSES,
|
|
15
|
+
DOMAIN_TRANSIENT_STATUSES,
|
|
12
16
|
HOSTING_SUMMARY_TRANSIENT_STATUSES,
|
|
13
17
|
HOSTING_TRANSIENT_STATUSES
|
|
14
18
|
};
|
|
@@ -11,6 +11,8 @@ exports.HostingAPI = api_gen.HostingAPI;
|
|
|
11
11
|
exports.MailAccountAPI = api_gen.MailAccountAPI;
|
|
12
12
|
exports.OfferAPI = api_gen.OfferAPI;
|
|
13
13
|
exports.WebsiteAPI = api_gen.WebsiteAPI;
|
|
14
|
+
exports.DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = content_gen.DOMAIN_AVAILABILITY_TRANSIENT_STATUSES;
|
|
15
|
+
exports.DOMAIN_TRANSIENT_STATUSES = content_gen.DOMAIN_TRANSIENT_STATUSES;
|
|
14
16
|
exports.HOSTING_SUMMARY_TRANSIENT_STATUSES = content_gen.HOSTING_SUMMARY_TRANSIENT_STATUSES;
|
|
15
17
|
exports.HOSTING_TRANSIENT_STATUSES = content_gen.HOSTING_TRANSIENT_STATUSES;
|
|
16
18
|
exports.ValidationRules = validationRules_gen;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
|
-
export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
|
|
3
|
+
export type { CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingStatus, HostingSummary, HostingSummaryStatus, HostingUser, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI } from "./api.gen.js";
|
|
2
|
-
import { HOSTING_SUMMARY_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
+
import { DOMAIN_AVAILABILITY_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOSTING_SUMMARY_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import * as validationRules_gen from "./validation-rules.gen.js";
|
|
4
4
|
export {
|
|
5
5
|
ControlPanelAPI,
|
|
6
|
+
DOMAIN_AVAILABILITY_TRANSIENT_STATUSES,
|
|
7
|
+
DOMAIN_TRANSIENT_STATUSES,
|
|
6
8
|
DatabaseAPI,
|
|
7
9
|
DnsAPI,
|
|
8
10
|
FtpAccountAPI,
|
|
@@ -97,6 +97,20 @@ const unmarshalDnsRecords = (data) => {
|
|
|
97
97
|
status: data.status
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
+
const unmarshalDomain = (data) => {
|
|
101
|
+
if (!json.isJSONObject(data)) {
|
|
102
|
+
throw new TypeError(
|
|
103
|
+
`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
availableActions: data.available_actions,
|
|
108
|
+
availableDnsActions: data.available_dns_actions,
|
|
109
|
+
name: data.name,
|
|
110
|
+
owner: data.owner,
|
|
111
|
+
status: data.status
|
|
112
|
+
};
|
|
113
|
+
};
|
|
100
114
|
const unmarshalPlatformControlPanelUrls = (data) => {
|
|
101
115
|
if (!json.isJSONObject(data)) {
|
|
102
116
|
throw new TypeError(
|
|
@@ -365,6 +379,34 @@ const unmarshalResourceSummary = (data) => {
|
|
|
365
379
|
websitesCount: data.websites_count
|
|
366
380
|
};
|
|
367
381
|
};
|
|
382
|
+
const unmarshalDomainAvailability = (data) => {
|
|
383
|
+
if (!json.isJSONObject(data)) {
|
|
384
|
+
throw new TypeError(
|
|
385
|
+
`Unmarshalling the type 'DomainAvailability' failed as data isn't a dictionary.`
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
availableActions: data.available_actions,
|
|
390
|
+
canCreateHosting: data.can_create_hosting,
|
|
391
|
+
name: data.name,
|
|
392
|
+
price: data.price ? customMarshalling.unmarshalMoney(data.price) : void 0,
|
|
393
|
+
status: data.status,
|
|
394
|
+
zoneName: data.zone_name
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
const unmarshalSearchDomainsResponse = (data) => {
|
|
398
|
+
if (!json.isJSONObject(data)) {
|
|
399
|
+
throw new TypeError(
|
|
400
|
+
`Unmarshalling the type 'SearchDomainsResponse' failed as data isn't a dictionary.`
|
|
401
|
+
);
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
domainsAvailable: marshalling.unmarshalArrayOfObject(
|
|
405
|
+
data.domains_available,
|
|
406
|
+
unmarshalDomainAvailability
|
|
407
|
+
)
|
|
408
|
+
};
|
|
409
|
+
};
|
|
368
410
|
const unmarshalSession = (data) => {
|
|
369
411
|
if (!json.isJSONObject(data)) {
|
|
370
412
|
throw new TypeError(
|
|
@@ -415,6 +457,7 @@ const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
|
|
|
415
457
|
) : void 0,
|
|
416
458
|
update_all_records: request.updateAllRecords,
|
|
417
459
|
update_mail_records: request.updateMailRecords,
|
|
460
|
+
update_nameservers: request.updateNameservers,
|
|
418
461
|
update_web_records: request.updateWebRecords
|
|
419
462
|
});
|
|
420
463
|
const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
|
|
@@ -491,6 +534,7 @@ exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainRespo
|
|
|
491
534
|
exports.unmarshalDatabase = unmarshalDatabase;
|
|
492
535
|
exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
|
|
493
536
|
exports.unmarshalDnsRecords = unmarshalDnsRecords;
|
|
537
|
+
exports.unmarshalDomain = unmarshalDomain;
|
|
494
538
|
exports.unmarshalFtpAccount = unmarshalFtpAccount;
|
|
495
539
|
exports.unmarshalHosting = unmarshalHosting;
|
|
496
540
|
exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
|
|
@@ -504,4 +548,5 @@ exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
|
|
|
504
548
|
exports.unmarshalMailAccount = unmarshalMailAccount;
|
|
505
549
|
exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
|
|
506
550
|
exports.unmarshalResourceSummary = unmarshalResourceSummary;
|
|
551
|
+
exports.unmarshalSearchDomainsResponse = unmarshalSearchDomainsResponse;
|
|
507
552
|
exports.unmarshalSession = unmarshalSession;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, Session } from './types.gen';
|
|
2
|
+
import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, SearchDomainsResponse, Session } from './types.gen';
|
|
3
3
|
export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
|
|
4
4
|
export declare const unmarshalDatabase: (data: unknown) => Database;
|
|
5
5
|
export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
|
|
6
6
|
export declare const unmarshalMailAccount: (data: unknown) => MailAccount;
|
|
7
7
|
export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
|
|
8
8
|
export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
|
|
9
|
+
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
9
10
|
export declare const unmarshalHosting: (data: unknown) => Hosting;
|
|
10
11
|
export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
|
|
11
12
|
export declare const unmarshalListDatabaseUsersResponse: (data: unknown) => ListDatabaseUsersResponse;
|
|
@@ -17,6 +18,7 @@ export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersR
|
|
|
17
18
|
export declare const unmarshalListWebsitesResponse: (data: unknown) => ListWebsitesResponse;
|
|
18
19
|
export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
|
|
19
20
|
export declare const unmarshalResourceSummary: (data: unknown) => ResourceSummary;
|
|
21
|
+
export declare const unmarshalSearchDomainsResponse: (data: unknown) => SearchDomainsResponse;
|
|
20
22
|
export declare const unmarshalSession: (data: unknown) => Session;
|
|
21
23
|
export declare const marshalDatabaseApiAssignDatabaseUserRequest: (request: DatabaseApiAssignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
24
|
export declare const marshalDatabaseApiChangeDatabaseUserPasswordRequest: (request: DatabaseApiChangeDatabaseUserPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -95,6 +95,20 @@ const unmarshalDnsRecords = (data) => {
|
|
|
95
95
|
status: data.status
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
|
+
const unmarshalDomain = (data) => {
|
|
99
|
+
if (!isJSONObject(data)) {
|
|
100
|
+
throw new TypeError(
|
|
101
|
+
`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
availableActions: data.available_actions,
|
|
106
|
+
availableDnsActions: data.available_dns_actions,
|
|
107
|
+
name: data.name,
|
|
108
|
+
owner: data.owner,
|
|
109
|
+
status: data.status
|
|
110
|
+
};
|
|
111
|
+
};
|
|
98
112
|
const unmarshalPlatformControlPanelUrls = (data) => {
|
|
99
113
|
if (!isJSONObject(data)) {
|
|
100
114
|
throw new TypeError(
|
|
@@ -363,6 +377,34 @@ const unmarshalResourceSummary = (data) => {
|
|
|
363
377
|
websitesCount: data.websites_count
|
|
364
378
|
};
|
|
365
379
|
};
|
|
380
|
+
const unmarshalDomainAvailability = (data) => {
|
|
381
|
+
if (!isJSONObject(data)) {
|
|
382
|
+
throw new TypeError(
|
|
383
|
+
`Unmarshalling the type 'DomainAvailability' failed as data isn't a dictionary.`
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
return {
|
|
387
|
+
availableActions: data.available_actions,
|
|
388
|
+
canCreateHosting: data.can_create_hosting,
|
|
389
|
+
name: data.name,
|
|
390
|
+
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
391
|
+
status: data.status,
|
|
392
|
+
zoneName: data.zone_name
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
const unmarshalSearchDomainsResponse = (data) => {
|
|
396
|
+
if (!isJSONObject(data)) {
|
|
397
|
+
throw new TypeError(
|
|
398
|
+
`Unmarshalling the type 'SearchDomainsResponse' failed as data isn't a dictionary.`
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
return {
|
|
402
|
+
domainsAvailable: unmarshalArrayOfObject(
|
|
403
|
+
data.domains_available,
|
|
404
|
+
unmarshalDomainAvailability
|
|
405
|
+
)
|
|
406
|
+
};
|
|
407
|
+
};
|
|
366
408
|
const unmarshalSession = (data) => {
|
|
367
409
|
if (!isJSONObject(data)) {
|
|
368
410
|
throw new TypeError(
|
|
@@ -413,6 +455,7 @@ const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
|
|
|
413
455
|
) : void 0,
|
|
414
456
|
update_all_records: request.updateAllRecords,
|
|
415
457
|
update_mail_records: request.updateMailRecords,
|
|
458
|
+
update_nameservers: request.updateNameservers,
|
|
416
459
|
update_web_records: request.updateWebRecords
|
|
417
460
|
});
|
|
418
461
|
const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
|
|
@@ -490,6 +533,7 @@ export {
|
|
|
490
533
|
unmarshalDatabase,
|
|
491
534
|
unmarshalDatabaseUser,
|
|
492
535
|
unmarshalDnsRecords,
|
|
536
|
+
unmarshalDomain,
|
|
493
537
|
unmarshalFtpAccount,
|
|
494
538
|
unmarshalHosting,
|
|
495
539
|
unmarshalListControlPanelsResponse,
|
|
@@ -503,5 +547,6 @@ export {
|
|
|
503
547
|
unmarshalMailAccount,
|
|
504
548
|
unmarshalResetHostingPasswordResponse,
|
|
505
549
|
unmarshalResourceSummary,
|
|
550
|
+
unmarshalSearchDomainsResponse,
|
|
506
551
|
unmarshalSession
|
|
507
552
|
};
|