@scaleway/sdk-webhosting 2.2.0 → 2.2.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/v1/api.gen.d.ts +22 -1
- package/dist/v1/api.gen.js +143 -141
- package/dist/v1/content.gen.js +9 -3
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +3 -1
- package/dist/v1/marshalling.gen.d.ts +3 -1
- package/dist/v1/marshalling.gen.js +22 -37
- package/dist/v1/types.gen.d.ts +38 -0
- package/package.json +2 -2
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
2
2
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
-
import type { Backup, BackupApiGetBackupRequest, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, Website, WebsiteApiCreateWebsiteRequest, WebsiteApiDeleteWebsiteRequest, WebsiteApiListWebsitesRequest } from './types.gen.js';
|
|
3
|
+
import type { Backup, BackupApiGetBackupRequest, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingDomainsRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiResetHostingRequest, HostingApiUpdateHostingFreeDomainRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, Website, WebsiteApiCreateWebsiteRequest, WebsiteApiDeleteWebsiteRequest, WebsiteApiListWebsitesRequest } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Web Hosting backup API.
|
|
6
6
|
|
|
@@ -373,6 +373,27 @@ export declare class HostingAPI extends ParentAPI {
|
|
|
373
373
|
* @returns A Promise of HostingSummary
|
|
374
374
|
*/
|
|
375
375
|
migrateControlPanel: (request: Readonly<HostingApiMigrateControlPanelRequest>) => Promise<HostingSummary>;
|
|
376
|
+
/**
|
|
377
|
+
* Reset a Web Hosting plan. Reset a Web Hosting plan to its initial state, specified by its `hosting_id`. This permanently deletes all hosting data including files, databases and emails. The hosting will be re-provisioned.
|
|
378
|
+
*
|
|
379
|
+
* @param request - The request {@link HostingApiResetHostingRequest}
|
|
380
|
+
* @returns A Promise of Hosting
|
|
381
|
+
*/
|
|
382
|
+
resetHosting: (request: Readonly<HostingApiResetHostingRequest>) => Promise<Hosting>;
|
|
383
|
+
/**
|
|
384
|
+
* Delete domains from a Web Hosting plan. Remove one or more domains from a Web Hosting plan, specified by its `hosting_id`. This permanently deletes the domains and all services tied to them, including mailboxes, FTP accounts and DNS zones.
|
|
385
|
+
*
|
|
386
|
+
* @param request - The request {@link HostingApiDeleteHostingDomainsRequest}
|
|
387
|
+
* @returns A Promise of Hosting
|
|
388
|
+
*/
|
|
389
|
+
deleteHostingDomains: (request: Readonly<HostingApiDeleteHostingDomainsRequest>) => Promise<Hosting>;
|
|
390
|
+
/**
|
|
391
|
+
* Update the free domain of a Web Hosting plan. Change the free domain associated with a Web Hosting plan, specified by its `hosting_id`.
|
|
392
|
+
*
|
|
393
|
+
* @param request - The request {@link HostingApiUpdateHostingFreeDomainRequest}
|
|
394
|
+
* @returns A Promise of Hosting
|
|
395
|
+
*/
|
|
396
|
+
updateHostingFreeDomain: (request: Readonly<HostingApiUpdateHostingFreeDomainRequest>) => Promise<Hosting>;
|
|
376
397
|
}
|
|
377
398
|
/**
|
|
378
399
|
* Web Hosting free domain API.
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
|
|
2
2
|
import { BACKUP_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { unmarshalListBackupsResponse, unmarshalBackup, unmarshalRestoreBackupResponse, unmarshalListBackupItemsResponse, marshalBackupApiRestoreBackupItemsRequest, unmarshalRestoreBackupItemsResponse, unmarshalProgress, unmarshalListRecentProgressesResponse, unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalSearchDomainsResponse, unmarshalDomain, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalHostingApiAddCustomDomainRequest, unmarshalHostingSummary, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiMigrateControlPanelRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalListFreeRootDomainsResponse, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse, marshalWebsiteApiCreateWebsiteRequest, unmarshalWebsite } from "./marshalling.gen.js";
|
|
3
|
+
import { unmarshalListBackupsResponse, unmarshalBackup, unmarshalRestoreBackupResponse, unmarshalListBackupItemsResponse, marshalBackupApiRestoreBackupItemsRequest, unmarshalRestoreBackupItemsResponse, unmarshalProgress, unmarshalListRecentProgressesResponse, unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalSearchDomainsResponse, unmarshalDomain, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalHostingApiAddCustomDomainRequest, unmarshalHostingSummary, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiMigrateControlPanelRequest, marshalHostingApiDeleteHostingDomainsRequest, marshalHostingApiUpdateHostingFreeDomainRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalListFreeRootDomainsResponse, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse, marshalWebsiteApiCreateWebsiteRequest, unmarshalWebsite } from "./marshalling.gen.js";
|
|
4
4
|
const jsonContentHeaders = {
|
|
5
5
|
"Content-Type": "application/json; charset=utf-8"
|
|
6
6
|
};
|
|
@@ -10,7 +10,11 @@ class BackupAPI extends API {
|
|
|
10
10
|
* type ∈ {'zone','region','global','unspecified'}
|
|
11
11
|
*/
|
|
12
12
|
static LOCALITY = toApiLocality({
|
|
13
|
-
regions: [
|
|
13
|
+
regions: [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
]
|
|
14
18
|
});
|
|
15
19
|
pageOfListBackups = (request) => this.client.fetch(
|
|
16
20
|
{
|
|
@@ -19,10 +23,7 @@ class BackupAPI extends API {
|
|
|
19
23
|
urlParams: urlParams(
|
|
20
24
|
["order_by", request.orderBy],
|
|
21
25
|
["page", request.page],
|
|
22
|
-
[
|
|
23
|
-
"page_size",
|
|
24
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
25
|
-
]
|
|
26
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
26
27
|
)
|
|
27
28
|
},
|
|
28
29
|
unmarshalListBackupsResponse
|
|
@@ -55,9 +56,7 @@ class BackupAPI extends API {
|
|
|
55
56
|
* @returns A Promise of Backup
|
|
56
57
|
*/
|
|
57
58
|
waitForBackup = (request, options) => waitForResource(
|
|
58
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
59
|
-
!BACKUP_TRANSIENT_STATUSES.includes(res.status)
|
|
60
|
-
)),
|
|
59
|
+
options?.stop ?? ((res) => Promise.resolve(!BACKUP_TRANSIENT_STATUSES.includes(res.status))),
|
|
61
60
|
this.getBackup,
|
|
62
61
|
request,
|
|
63
62
|
options
|
|
@@ -87,7 +86,9 @@ class BackupAPI extends API {
|
|
|
87
86
|
{
|
|
88
87
|
method: "GET",
|
|
89
88
|
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/backup-items`,
|
|
90
|
-
urlParams: urlParams(
|
|
89
|
+
urlParams: urlParams(
|
|
90
|
+
["backup_id", request.backupId]
|
|
91
|
+
)
|
|
91
92
|
},
|
|
92
93
|
unmarshalListBackupItemsResponse
|
|
93
94
|
);
|
|
@@ -100,10 +101,7 @@ class BackupAPI extends API {
|
|
|
100
101
|
restoreBackupItems = (request) => this.client.fetch(
|
|
101
102
|
{
|
|
102
103
|
body: JSON.stringify(
|
|
103
|
-
marshalBackupApiRestoreBackupItemsRequest(
|
|
104
|
-
request,
|
|
105
|
-
this.client.settings
|
|
106
|
-
)
|
|
104
|
+
marshalBackupApiRestoreBackupItemsRequest(request, this.client.settings)
|
|
107
105
|
),
|
|
108
106
|
headers: jsonContentHeaders,
|
|
109
107
|
method: "POST",
|
|
@@ -144,7 +142,11 @@ class ControlPanelAPI extends API {
|
|
|
144
142
|
* type ∈ {'zone','region','global','unspecified'}
|
|
145
143
|
*/
|
|
146
144
|
static LOCALITY = toApiLocality({
|
|
147
|
-
regions: [
|
|
145
|
+
regions: [
|
|
146
|
+
"fr-par",
|
|
147
|
+
"nl-ams",
|
|
148
|
+
"pl-waw"
|
|
149
|
+
]
|
|
148
150
|
});
|
|
149
151
|
pageOfListControlPanels = (request = {}) => this.client.fetch(
|
|
150
152
|
{
|
|
@@ -152,10 +154,7 @@ class ControlPanelAPI extends API {
|
|
|
152
154
|
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/control-panels`,
|
|
153
155
|
urlParams: urlParams(
|
|
154
156
|
["page", request.page],
|
|
155
|
-
[
|
|
156
|
-
"page_size",
|
|
157
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
158
|
-
]
|
|
157
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
159
158
|
)
|
|
160
159
|
},
|
|
161
160
|
unmarshalListControlPanelsResponse
|
|
@@ -174,7 +173,11 @@ class DatabaseAPI extends API {
|
|
|
174
173
|
* type ∈ {'zone','region','global','unspecified'}
|
|
175
174
|
*/
|
|
176
175
|
static LOCALITY = toApiLocality({
|
|
177
|
-
regions: [
|
|
176
|
+
regions: [
|
|
177
|
+
"fr-par",
|
|
178
|
+
"nl-ams",
|
|
179
|
+
"pl-waw"
|
|
180
|
+
]
|
|
178
181
|
});
|
|
179
182
|
/**
|
|
180
183
|
* "Create a new database within your hosting plan".
|
|
@@ -185,10 +188,7 @@ class DatabaseAPI extends API {
|
|
|
185
188
|
createDatabase = (request) => this.client.fetch(
|
|
186
189
|
{
|
|
187
190
|
body: JSON.stringify(
|
|
188
|
-
marshalDatabaseApiCreateDatabaseRequest(
|
|
189
|
-
request,
|
|
190
|
-
this.client.settings
|
|
191
|
-
)
|
|
191
|
+
marshalDatabaseApiCreateDatabaseRequest(request, this.client.settings)
|
|
192
192
|
),
|
|
193
193
|
headers: jsonContentHeaders,
|
|
194
194
|
method: "POST",
|
|
@@ -203,10 +203,7 @@ class DatabaseAPI extends API {
|
|
|
203
203
|
urlParams: urlParams(
|
|
204
204
|
["order_by", request.orderBy],
|
|
205
205
|
["page", request.page],
|
|
206
|
-
[
|
|
207
|
-
"page_size",
|
|
208
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
209
|
-
]
|
|
206
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
210
207
|
)
|
|
211
208
|
},
|
|
212
209
|
unmarshalListDatabasesResponse
|
|
@@ -253,10 +250,7 @@ class DatabaseAPI extends API {
|
|
|
253
250
|
createDatabaseUser = (request) => this.client.fetch(
|
|
254
251
|
{
|
|
255
252
|
body: JSON.stringify(
|
|
256
|
-
marshalDatabaseApiCreateDatabaseUserRequest(
|
|
257
|
-
request,
|
|
258
|
-
this.client.settings
|
|
259
|
-
)
|
|
253
|
+
marshalDatabaseApiCreateDatabaseUserRequest(request, this.client.settings)
|
|
260
254
|
),
|
|
261
255
|
headers: jsonContentHeaders,
|
|
262
256
|
method: "POST",
|
|
@@ -271,10 +265,7 @@ class DatabaseAPI extends API {
|
|
|
271
265
|
urlParams: urlParams(
|
|
272
266
|
["order_by", request.orderBy],
|
|
273
267
|
["page", request.page],
|
|
274
|
-
[
|
|
275
|
-
"page_size",
|
|
276
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
277
|
-
]
|
|
268
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
278
269
|
)
|
|
279
270
|
},
|
|
280
271
|
unmarshalListDatabaseUsersResponse
|
|
@@ -321,10 +312,7 @@ class DatabaseAPI extends API {
|
|
|
321
312
|
changeDatabaseUserPassword = (request) => this.client.fetch(
|
|
322
313
|
{
|
|
323
314
|
body: JSON.stringify(
|
|
324
|
-
marshalDatabaseApiChangeDatabaseUserPasswordRequest(
|
|
325
|
-
request,
|
|
326
|
-
this.client.settings
|
|
327
|
-
)
|
|
315
|
+
marshalDatabaseApiChangeDatabaseUserPasswordRequest(request, this.client.settings)
|
|
328
316
|
),
|
|
329
317
|
headers: jsonContentHeaders,
|
|
330
318
|
method: "POST",
|
|
@@ -341,10 +329,7 @@ class DatabaseAPI extends API {
|
|
|
341
329
|
assignDatabaseUser = (request) => this.client.fetch(
|
|
342
330
|
{
|
|
343
331
|
body: JSON.stringify(
|
|
344
|
-
marshalDatabaseApiAssignDatabaseUserRequest(
|
|
345
|
-
request,
|
|
346
|
-
this.client.settings
|
|
347
|
-
)
|
|
332
|
+
marshalDatabaseApiAssignDatabaseUserRequest(request, this.client.settings)
|
|
348
333
|
),
|
|
349
334
|
headers: jsonContentHeaders,
|
|
350
335
|
method: "POST",
|
|
@@ -361,10 +346,7 @@ class DatabaseAPI extends API {
|
|
|
361
346
|
unassignDatabaseUser = (request) => this.client.fetch(
|
|
362
347
|
{
|
|
363
348
|
body: JSON.stringify(
|
|
364
|
-
marshalDatabaseApiUnassignDatabaseUserRequest(
|
|
365
|
-
request,
|
|
366
|
-
this.client.settings
|
|
367
|
-
)
|
|
349
|
+
marshalDatabaseApiUnassignDatabaseUserRequest(request, this.client.settings)
|
|
368
350
|
),
|
|
369
351
|
headers: jsonContentHeaders,
|
|
370
352
|
method: "POST",
|
|
@@ -379,7 +361,11 @@ class DnsAPI extends API {
|
|
|
379
361
|
* type ∈ {'zone','region','global','unspecified'}
|
|
380
362
|
*/
|
|
381
363
|
static LOCALITY = toApiLocality({
|
|
382
|
-
regions: [
|
|
364
|
+
regions: [
|
|
365
|
+
"fr-par",
|
|
366
|
+
"nl-ams",
|
|
367
|
+
"pl-waw"
|
|
368
|
+
]
|
|
383
369
|
});
|
|
384
370
|
/**
|
|
385
371
|
* Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain.
|
|
@@ -404,10 +390,7 @@ class DnsAPI extends API {
|
|
|
404
390
|
checkUserOwnsDomain = (request) => this.client.fetch(
|
|
405
391
|
{
|
|
406
392
|
body: JSON.stringify(
|
|
407
|
-
marshalDnsApiCheckUserOwnsDomainRequest(
|
|
408
|
-
request,
|
|
409
|
-
this.client.settings
|
|
410
|
-
)
|
|
393
|
+
marshalDnsApiCheckUserOwnsDomainRequest(request, this.client.settings)
|
|
411
394
|
),
|
|
412
395
|
headers: jsonContentHeaders,
|
|
413
396
|
method: "POST",
|
|
@@ -424,10 +407,7 @@ class DnsAPI extends API {
|
|
|
424
407
|
syncDomainDnsRecords = (request) => this.client.fetch(
|
|
425
408
|
{
|
|
426
409
|
body: JSON.stringify(
|
|
427
|
-
marshalDnsApiSyncDomainDnsRecordsRequest(
|
|
428
|
-
request,
|
|
429
|
-
this.client.settings
|
|
430
|
-
)
|
|
410
|
+
marshalDnsApiSyncDomainDnsRecordsRequest(request, this.client.settings)
|
|
431
411
|
),
|
|
432
412
|
headers: jsonContentHeaders,
|
|
433
413
|
method: "POST",
|
|
@@ -447,10 +427,7 @@ class DnsAPI extends API {
|
|
|
447
427
|
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/search-domains`,
|
|
448
428
|
urlParams: urlParams(
|
|
449
429
|
["domain_name", request.domainName],
|
|
450
|
-
[
|
|
451
|
-
"project_id",
|
|
452
|
-
request.projectId ?? this.client.settings.defaultProjectId
|
|
453
|
-
]
|
|
430
|
+
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
454
431
|
)
|
|
455
432
|
},
|
|
456
433
|
unmarshalSearchDomainsResponse
|
|
@@ -465,10 +442,9 @@ class DnsAPI extends API {
|
|
|
465
442
|
{
|
|
466
443
|
method: "GET",
|
|
467
444
|
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam("domainName", request.domainName)}`,
|
|
468
|
-
urlParams: urlParams(
|
|
469
|
-
"project_id",
|
|
470
|
-
|
|
471
|
-
])
|
|
445
|
+
urlParams: urlParams(
|
|
446
|
+
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
447
|
+
)
|
|
472
448
|
},
|
|
473
449
|
unmarshalDomain
|
|
474
450
|
);
|
|
@@ -480,9 +456,7 @@ class DnsAPI extends API {
|
|
|
480
456
|
* @returns A Promise of Domain
|
|
481
457
|
*/
|
|
482
458
|
waitForDomain = (request, options) => waitForResource(
|
|
483
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
484
|
-
!DOMAIN_TRANSIENT_STATUSES.includes(res.status)
|
|
485
|
-
)),
|
|
459
|
+
options?.stop ?? ((res) => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))),
|
|
486
460
|
this.getDomain,
|
|
487
461
|
request,
|
|
488
462
|
options
|
|
@@ -494,7 +468,11 @@ class OfferAPI extends API {
|
|
|
494
468
|
* type ∈ {'zone','region','global','unspecified'}
|
|
495
469
|
*/
|
|
496
470
|
static LOCALITY = toApiLocality({
|
|
497
|
-
regions: [
|
|
471
|
+
regions: [
|
|
472
|
+
"fr-par",
|
|
473
|
+
"nl-ams",
|
|
474
|
+
"pl-waw"
|
|
475
|
+
]
|
|
498
476
|
});
|
|
499
477
|
pageOfListOffers = (request = {}) => this.client.fetch(
|
|
500
478
|
{
|
|
@@ -505,10 +483,7 @@ class OfferAPI extends API {
|
|
|
505
483
|
["hosting_id", request.hostingId],
|
|
506
484
|
["order_by", request.orderBy],
|
|
507
485
|
["page", request.page],
|
|
508
|
-
[
|
|
509
|
-
"page_size",
|
|
510
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
511
|
-
]
|
|
486
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
512
487
|
)
|
|
513
488
|
},
|
|
514
489
|
unmarshalListOffersResponse
|
|
@@ -527,7 +502,11 @@ class HostingAPI extends API {
|
|
|
527
502
|
* type ∈ {'zone','region','global','unspecified'}
|
|
528
503
|
*/
|
|
529
504
|
static LOCALITY = toApiLocality({
|
|
530
|
-
regions: [
|
|
505
|
+
regions: [
|
|
506
|
+
"fr-par",
|
|
507
|
+
"nl-ams",
|
|
508
|
+
"pl-waw"
|
|
509
|
+
]
|
|
531
510
|
});
|
|
532
511
|
/**
|
|
533
512
|
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter.
|
|
@@ -556,10 +535,7 @@ class HostingAPI extends API {
|
|
|
556
535
|
["order_by", request.orderBy],
|
|
557
536
|
["organization_id", request.organizationId],
|
|
558
537
|
["page", request.page],
|
|
559
|
-
[
|
|
560
|
-
"page_size",
|
|
561
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
562
|
-
],
|
|
538
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
563
539
|
["project_id", request.projectId],
|
|
564
540
|
["statuses", request.statuses],
|
|
565
541
|
["subdomain", request.subdomain],
|
|
@@ -596,9 +572,7 @@ class HostingAPI extends API {
|
|
|
596
572
|
* @returns A Promise of Hosting
|
|
597
573
|
*/
|
|
598
574
|
waitForHosting = (request, options) => waitForResource(
|
|
599
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
600
|
-
!HOSTING_TRANSIENT_STATUSES.includes(res.status)
|
|
601
|
-
)),
|
|
575
|
+
options?.stop ?? ((res) => Promise.resolve(!HOSTING_TRANSIENT_STATUSES.includes(res.status))),
|
|
602
576
|
this.getHosting,
|
|
603
577
|
request,
|
|
604
578
|
options
|
|
@@ -685,10 +659,7 @@ class HostingAPI extends API {
|
|
|
685
659
|
addCustomDomain = (request) => this.client.fetch(
|
|
686
660
|
{
|
|
687
661
|
body: JSON.stringify(
|
|
688
|
-
marshalHostingApiAddCustomDomainRequest(
|
|
689
|
-
request,
|
|
690
|
-
this.client.settings
|
|
691
|
-
)
|
|
662
|
+
marshalHostingApiAddCustomDomainRequest(request, this.client.settings)
|
|
692
663
|
),
|
|
693
664
|
headers: jsonContentHeaders,
|
|
694
665
|
method: "POST",
|
|
@@ -705,10 +676,7 @@ class HostingAPI extends API {
|
|
|
705
676
|
removeCustomDomain = (request) => this.client.fetch(
|
|
706
677
|
{
|
|
707
678
|
body: JSON.stringify(
|
|
708
|
-
marshalHostingApiRemoveCustomDomainRequest(
|
|
709
|
-
request,
|
|
710
|
-
this.client.settings
|
|
711
|
-
)
|
|
679
|
+
marshalHostingApiRemoveCustomDomainRequest(request, this.client.settings)
|
|
712
680
|
),
|
|
713
681
|
headers: jsonContentHeaders,
|
|
714
682
|
method: "POST",
|
|
@@ -725,10 +693,7 @@ class HostingAPI extends API {
|
|
|
725
693
|
migrateControlPanel = (request) => this.client.fetch(
|
|
726
694
|
{
|
|
727
695
|
body: JSON.stringify(
|
|
728
|
-
marshalHostingApiMigrateControlPanelRequest(
|
|
729
|
-
request,
|
|
730
|
-
this.client.settings
|
|
731
|
-
)
|
|
696
|
+
marshalHostingApiMigrateControlPanelRequest(request, this.client.settings)
|
|
732
697
|
),
|
|
733
698
|
headers: jsonContentHeaders,
|
|
734
699
|
method: "POST",
|
|
@@ -736,6 +701,55 @@ class HostingAPI extends API {
|
|
|
736
701
|
},
|
|
737
702
|
unmarshalHostingSummary
|
|
738
703
|
);
|
|
704
|
+
/**
|
|
705
|
+
* Reset a Web Hosting plan. Reset a Web Hosting plan to its initial state, specified by its `hosting_id`. This permanently deletes all hosting data including files, databases and emails. The hosting will be re-provisioned.
|
|
706
|
+
*
|
|
707
|
+
* @param request - The request {@link HostingApiResetHostingRequest}
|
|
708
|
+
* @returns A Promise of Hosting
|
|
709
|
+
*/
|
|
710
|
+
resetHosting = (request) => this.client.fetch(
|
|
711
|
+
{
|
|
712
|
+
body: "{}",
|
|
713
|
+
headers: jsonContentHeaders,
|
|
714
|
+
method: "POST",
|
|
715
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/reset`
|
|
716
|
+
},
|
|
717
|
+
unmarshalHosting
|
|
718
|
+
);
|
|
719
|
+
/**
|
|
720
|
+
* Delete domains from a Web Hosting plan. Remove one or more domains from a Web Hosting plan, specified by its `hosting_id`. This permanently deletes the domains and all services tied to them, including mailboxes, FTP accounts and DNS zones.
|
|
721
|
+
*
|
|
722
|
+
* @param request - The request {@link HostingApiDeleteHostingDomainsRequest}
|
|
723
|
+
* @returns A Promise of Hosting
|
|
724
|
+
*/
|
|
725
|
+
deleteHostingDomains = (request) => this.client.fetch(
|
|
726
|
+
{
|
|
727
|
+
body: JSON.stringify(
|
|
728
|
+
marshalHostingApiDeleteHostingDomainsRequest(request, this.client.settings)
|
|
729
|
+
),
|
|
730
|
+
headers: jsonContentHeaders,
|
|
731
|
+
method: "POST",
|
|
732
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/delete-domains`
|
|
733
|
+
},
|
|
734
|
+
unmarshalHosting
|
|
735
|
+
);
|
|
736
|
+
/**
|
|
737
|
+
* Update the free domain of a Web Hosting plan. Change the free domain associated with a Web Hosting plan, specified by its `hosting_id`.
|
|
738
|
+
*
|
|
739
|
+
* @param request - The request {@link HostingApiUpdateHostingFreeDomainRequest}
|
|
740
|
+
* @returns A Promise of Hosting
|
|
741
|
+
*/
|
|
742
|
+
updateHostingFreeDomain = (request) => this.client.fetch(
|
|
743
|
+
{
|
|
744
|
+
body: JSON.stringify(
|
|
745
|
+
marshalHostingApiUpdateHostingFreeDomainRequest(request, this.client.settings)
|
|
746
|
+
),
|
|
747
|
+
headers: jsonContentHeaders,
|
|
748
|
+
method: "PATCH",
|
|
749
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/update-free-domain`
|
|
750
|
+
},
|
|
751
|
+
unmarshalHosting
|
|
752
|
+
);
|
|
739
753
|
}
|
|
740
754
|
class FreeDomainAPI extends API {
|
|
741
755
|
/**
|
|
@@ -743,7 +757,11 @@ class FreeDomainAPI extends API {
|
|
|
743
757
|
* type ∈ {'zone','region','global','unspecified'}
|
|
744
758
|
*/
|
|
745
759
|
static LOCALITY = toApiLocality({
|
|
746
|
-
regions: [
|
|
760
|
+
regions: [
|
|
761
|
+
"fr-par",
|
|
762
|
+
"nl-ams",
|
|
763
|
+
"pl-waw"
|
|
764
|
+
]
|
|
747
765
|
});
|
|
748
766
|
/**
|
|
749
767
|
* Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
|
|
@@ -754,10 +772,7 @@ class FreeDomainAPI extends API {
|
|
|
754
772
|
checkFreeDomainAvailability = (request) => this.client.fetch(
|
|
755
773
|
{
|
|
756
774
|
body: JSON.stringify(
|
|
757
|
-
marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(
|
|
758
|
-
request,
|
|
759
|
-
this.client.settings
|
|
760
|
-
)
|
|
775
|
+
marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(request, this.client.settings)
|
|
761
776
|
),
|
|
762
777
|
headers: jsonContentHeaders,
|
|
763
778
|
method: "POST",
|
|
@@ -771,10 +786,7 @@ class FreeDomainAPI extends API {
|
|
|
771
786
|
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
|
|
772
787
|
urlParams: urlParams(
|
|
773
788
|
["page", request.page],
|
|
774
|
-
[
|
|
775
|
-
"page_size",
|
|
776
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
777
|
-
]
|
|
789
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
778
790
|
)
|
|
779
791
|
},
|
|
780
792
|
unmarshalListFreeRootDomainsResponse
|
|
@@ -793,7 +805,11 @@ class FtpAccountAPI extends API {
|
|
|
793
805
|
* type ∈ {'zone','region','global','unspecified'}
|
|
794
806
|
*/
|
|
795
807
|
static LOCALITY = toApiLocality({
|
|
796
|
-
regions: [
|
|
808
|
+
regions: [
|
|
809
|
+
"fr-par",
|
|
810
|
+
"nl-ams",
|
|
811
|
+
"pl-waw"
|
|
812
|
+
]
|
|
797
813
|
});
|
|
798
814
|
/**
|
|
799
815
|
* Create a new FTP account within your hosting plan.. Create a new FTP account within your hosting plan.
|
|
@@ -804,10 +820,7 @@ class FtpAccountAPI extends API {
|
|
|
804
820
|
createFtpAccount = (request) => this.client.fetch(
|
|
805
821
|
{
|
|
806
822
|
body: JSON.stringify(
|
|
807
|
-
marshalFtpAccountApiCreateFtpAccountRequest(
|
|
808
|
-
request,
|
|
809
|
-
this.client.settings
|
|
810
|
-
)
|
|
823
|
+
marshalFtpAccountApiCreateFtpAccountRequest(request, this.client.settings)
|
|
811
824
|
),
|
|
812
825
|
headers: jsonContentHeaders,
|
|
813
826
|
method: "POST",
|
|
@@ -823,10 +836,7 @@ class FtpAccountAPI extends API {
|
|
|
823
836
|
["domain", request.domain],
|
|
824
837
|
["order_by", request.orderBy],
|
|
825
838
|
["page", request.page],
|
|
826
|
-
[
|
|
827
|
-
"page_size",
|
|
828
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
829
|
-
]
|
|
839
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
830
840
|
)
|
|
831
841
|
},
|
|
832
842
|
unmarshalListFtpAccountsResponse
|
|
@@ -854,10 +864,7 @@ class FtpAccountAPI extends API {
|
|
|
854
864
|
changeFtpAccountPassword = (request) => this.client.fetch(
|
|
855
865
|
{
|
|
856
866
|
body: JSON.stringify(
|
|
857
|
-
marshalFtpAccountApiChangeFtpAccountPasswordRequest(
|
|
858
|
-
request,
|
|
859
|
-
this.client.settings
|
|
860
|
-
)
|
|
867
|
+
marshalFtpAccountApiChangeFtpAccountPasswordRequest(request, this.client.settings)
|
|
861
868
|
),
|
|
862
869
|
headers: jsonContentHeaders,
|
|
863
870
|
method: "POST",
|
|
@@ -872,7 +879,11 @@ class MailAccountAPI extends API {
|
|
|
872
879
|
* type ∈ {'zone','region','global','unspecified'}
|
|
873
880
|
*/
|
|
874
881
|
static LOCALITY = toApiLocality({
|
|
875
|
-
regions: [
|
|
882
|
+
regions: [
|
|
883
|
+
"fr-par",
|
|
884
|
+
"nl-ams",
|
|
885
|
+
"pl-waw"
|
|
886
|
+
]
|
|
876
887
|
});
|
|
877
888
|
/**
|
|
878
889
|
* Create a new mail account within your hosting plan.. Create a new mail account within your hosting plan.
|
|
@@ -883,10 +894,7 @@ class MailAccountAPI extends API {
|
|
|
883
894
|
createMailAccount = (request) => this.client.fetch(
|
|
884
895
|
{
|
|
885
896
|
body: JSON.stringify(
|
|
886
|
-
marshalMailAccountApiCreateMailAccountRequest(
|
|
887
|
-
request,
|
|
888
|
-
this.client.settings
|
|
889
|
-
)
|
|
897
|
+
marshalMailAccountApiCreateMailAccountRequest(request, this.client.settings)
|
|
890
898
|
),
|
|
891
899
|
headers: jsonContentHeaders,
|
|
892
900
|
method: "POST",
|
|
@@ -902,10 +910,7 @@ class MailAccountAPI extends API {
|
|
|
902
910
|
["domain", request.domain],
|
|
903
911
|
["order_by", request.orderBy],
|
|
904
912
|
["page", request.page],
|
|
905
|
-
[
|
|
906
|
-
"page_size",
|
|
907
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
908
|
-
]
|
|
913
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
909
914
|
)
|
|
910
915
|
},
|
|
911
916
|
unmarshalListMailAccountsResponse
|
|
@@ -926,10 +931,7 @@ class MailAccountAPI extends API {
|
|
|
926
931
|
removeMailAccount = (request) => this.client.fetch(
|
|
927
932
|
{
|
|
928
933
|
body: JSON.stringify(
|
|
929
|
-
marshalMailAccountApiRemoveMailAccountRequest(
|
|
930
|
-
request,
|
|
931
|
-
this.client.settings
|
|
932
|
-
)
|
|
934
|
+
marshalMailAccountApiRemoveMailAccountRequest(request, this.client.settings)
|
|
933
935
|
),
|
|
934
936
|
headers: jsonContentHeaders,
|
|
935
937
|
method: "POST",
|
|
@@ -946,10 +948,7 @@ class MailAccountAPI extends API {
|
|
|
946
948
|
changeMailAccountPassword = (request) => this.client.fetch(
|
|
947
949
|
{
|
|
948
950
|
body: JSON.stringify(
|
|
949
|
-
marshalMailAccountApiChangeMailAccountPasswordRequest(
|
|
950
|
-
request,
|
|
951
|
-
this.client.settings
|
|
952
|
-
)
|
|
951
|
+
marshalMailAccountApiChangeMailAccountPasswordRequest(request, this.client.settings)
|
|
953
952
|
),
|
|
954
953
|
headers: jsonContentHeaders,
|
|
955
954
|
method: "POST",
|
|
@@ -964,7 +963,11 @@ class WebsiteAPI extends API {
|
|
|
964
963
|
* type ∈ {'zone','region','global','unspecified'}
|
|
965
964
|
*/
|
|
966
965
|
static LOCALITY = toApiLocality({
|
|
967
|
-
regions: [
|
|
966
|
+
regions: [
|
|
967
|
+
"fr-par",
|
|
968
|
+
"nl-ams",
|
|
969
|
+
"pl-waw"
|
|
970
|
+
]
|
|
968
971
|
});
|
|
969
972
|
pageOfListWebsites = (request) => this.client.fetch(
|
|
970
973
|
{
|
|
@@ -973,10 +976,7 @@ class WebsiteAPI extends API {
|
|
|
973
976
|
urlParams: urlParams(
|
|
974
977
|
["order_by", request.orderBy],
|
|
975
978
|
["page", request.page],
|
|
976
|
-
[
|
|
977
|
-
"page_size",
|
|
978
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
979
|
-
]
|
|
979
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
980
980
|
)
|
|
981
981
|
},
|
|
982
982
|
unmarshalListWebsitesResponse
|
|
@@ -1010,10 +1010,12 @@ class WebsiteAPI extends API {
|
|
|
1010
1010
|
*
|
|
1011
1011
|
* @param request - The request {@link WebsiteApiDeleteWebsiteRequest}
|
|
1012
1012
|
*/
|
|
1013
|
-
deleteWebsite = (request) => this.client.fetch(
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1013
|
+
deleteWebsite = (request) => this.client.fetch(
|
|
1014
|
+
{
|
|
1015
|
+
method: "DELETE",
|
|
1016
|
+
path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/websites/${validatePathParam("domainName", request.domainName)}`
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
1017
1019
|
}
|
|
1018
1020
|
export {
|
|
1019
1021
|
BackupAPI,
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
const BACKUP_TRANSIENT_STATUSES = [
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const BACKUP_TRANSIENT_STATUSES = [
|
|
2
|
+
"restoring"
|
|
3
|
+
];
|
|
4
|
+
const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = [
|
|
5
|
+
"validating"
|
|
6
|
+
];
|
|
7
|
+
const DOMAIN_TRANSIENT_STATUSES = [
|
|
8
|
+
"validating"
|
|
9
|
+
];
|
|
4
10
|
const HOSTING_TRANSIENT_STATUSES = [
|
|
5
11
|
"delivering",
|
|
6
12
|
"deleting",
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FreeDomainAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
|
-
export type { AutoConfigDomainDns, Backup, BackupApiGetBackupRequest, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, BackupItem, BackupItemGroup, BackupItemType, BackupStatus, CheckFreeDomainAvailabilityResponse, CheckFreeDomainAvailabilityResponseUnavailableReason, CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecords, DnsRecordsStatus, DnsRecordType, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FreeDomain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingDomain, HostingDomainCustomDomain, HostingStatus, HostingSummary, HostingUser, ListBackupItemsResponse, ListBackupsRequestOrderBy, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListFreeRootDomainsResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, Progress, ProgressStatus, ProgressSummary, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiCreateWebsiteRequest, WebsiteApiDeleteWebsiteRequest, WebsiteApiListWebsitesRequest, } from './types.gen.js';
|
|
4
|
+
export type { AutoConfigDomainDns, Backup, BackupApiGetBackupRequest, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, BackupItem, BackupItemGroup, BackupItemType, BackupStatus, CheckFreeDomainAvailabilityResponse, CheckFreeDomainAvailabilityResponseUnavailableReason, CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecords, DnsRecordsStatus, DnsRecordType, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FreeDomain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingDomainsRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiResetHostingRequest, HostingApiUpdateHostingFreeDomainRequest, HostingApiUpdateHostingRequest, HostingDomain, HostingDomainCustomDomain, HostingStatus, HostingSummary, HostingUser, ListBackupItemsResponse, ListBackupsRequestOrderBy, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListFreeRootDomainsResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, Progress, ProgressStatus, ProgressSummary, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiCreateWebsiteRequest, WebsiteApiDeleteWebsiteRequest, WebsiteApiListWebsitesRequest, } from './types.gen.js';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FreeDomainAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI } from "./api.gen.js";
|
|
2
2
|
import { BACKUP_TRANSIENT_STATUSES, DOMAIN_AVAILABILITY_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalBackupApiRestoreBackupItemsRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiCreateDatabaseRequest, marshalDatabaseApiCreateDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, marshalDnsApiCheckUserOwnsDomainRequest, marshalDnsApiSyncDomainDnsRecordsRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiMigrateControlPanelRequest, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, marshalWebsiteApiCreateWebsiteRequest, unmarshalBackup, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalCheckUserOwnsDomainResponse, unmarshalDatabase, unmarshalDatabaseUser, unmarshalDnsRecords, unmarshalDomain, unmarshalFtpAccount, unmarshalHosting, unmarshalHostingSummary, unmarshalListBackupItemsResponse, unmarshalListBackupsResponse, unmarshalListControlPanelsResponse, unmarshalListDatabaseUsersResponse, unmarshalListDatabasesResponse, unmarshalListFreeRootDomainsResponse, unmarshalListFtpAccountsResponse, unmarshalListHostingsResponse, unmarshalListMailAccountsResponse, unmarshalListOffersResponse, unmarshalListRecentProgressesResponse, unmarshalListWebsitesResponse, unmarshalMailAccount, unmarshalProgress, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, unmarshalRestoreBackupItemsResponse, unmarshalRestoreBackupResponse, unmarshalSearchDomainsResponse, unmarshalSession, unmarshalWebsite } from "./marshalling.gen.js";
|
|
3
|
+
import { marshalBackupApiRestoreBackupItemsRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiCreateDatabaseRequest, marshalDatabaseApiCreateDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, marshalDnsApiCheckUserOwnsDomainRequest, marshalDnsApiSyncDomainDnsRecordsRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiDeleteHostingDomainsRequest, marshalHostingApiMigrateControlPanelRequest, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiUpdateHostingFreeDomainRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, marshalWebsiteApiCreateWebsiteRequest, unmarshalBackup, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalCheckUserOwnsDomainResponse, unmarshalDatabase, unmarshalDatabaseUser, unmarshalDnsRecords, unmarshalDomain, unmarshalFtpAccount, unmarshalHosting, unmarshalHostingSummary, unmarshalListBackupItemsResponse, unmarshalListBackupsResponse, unmarshalListControlPanelsResponse, unmarshalListDatabaseUsersResponse, unmarshalListDatabasesResponse, unmarshalListFreeRootDomainsResponse, unmarshalListFtpAccountsResponse, unmarshalListHostingsResponse, unmarshalListMailAccountsResponse, unmarshalListOffersResponse, unmarshalListRecentProgressesResponse, unmarshalListWebsitesResponse, unmarshalMailAccount, unmarshalProgress, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, unmarshalRestoreBackupItemsResponse, unmarshalRestoreBackupResponse, unmarshalSearchDomainsResponse, unmarshalSession, unmarshalWebsite } from "./marshalling.gen.js";
|
|
4
4
|
import * as validationRules_gen from "./validation-rules.gen.js";
|
|
5
5
|
export {
|
|
6
6
|
BACKUP_TRANSIENT_STATUSES,
|
|
@@ -31,8 +31,10 @@ export {
|
|
|
31
31
|
marshalFtpAccountApiCreateFtpAccountRequest,
|
|
32
32
|
marshalHostingApiAddCustomDomainRequest,
|
|
33
33
|
marshalHostingApiCreateHostingRequest,
|
|
34
|
+
marshalHostingApiDeleteHostingDomainsRequest,
|
|
34
35
|
marshalHostingApiMigrateControlPanelRequest,
|
|
35
36
|
marshalHostingApiRemoveCustomDomainRequest,
|
|
37
|
+
marshalHostingApiUpdateHostingFreeDomainRequest,
|
|
36
38
|
marshalHostingApiUpdateHostingRequest,
|
|
37
39
|
marshalMailAccountApiChangeMailAccountPasswordRequest,
|
|
38
40
|
marshalMailAccountApiCreateMailAccountRequest,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { Backup, BackupApiRestoreBackupItemsRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, Website, WebsiteApiCreateWebsiteRequest } from './types.gen.js';
|
|
2
|
+
import type { Backup, BackupApiRestoreBackupItemsRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiDeleteHostingDomainsRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiUpdateHostingFreeDomainRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, Website, WebsiteApiCreateWebsiteRequest } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalBackup: (data: unknown) => Backup;
|
|
4
4
|
export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
|
|
5
5
|
export declare const unmarshalDatabase: (data: unknown) => Database;
|
|
@@ -44,8 +44,10 @@ export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (reque
|
|
|
44
44
|
export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
45
45
|
export declare const marshalHostingApiAddCustomDomainRequest: (request: HostingApiAddCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
46
46
|
export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
47
|
+
export declare const marshalHostingApiDeleteHostingDomainsRequest: (request: HostingApiDeleteHostingDomainsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
47
48
|
export declare const marshalHostingApiMigrateControlPanelRequest: (request: HostingApiMigrateControlPanelRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
48
49
|
export declare const marshalHostingApiRemoveCustomDomainRequest: (request: HostingApiRemoveCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
50
|
+
export declare const marshalHostingApiUpdateHostingFreeDomainRequest: (request: HostingApiUpdateHostingFreeDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
49
51
|
export declare const marshalHostingApiUpdateHostingRequest: (request: HostingApiUpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
50
52
|
export declare const marshalMailAccountApiChangeMailAccountPasswordRequest: (request: MailAccountApiChangeMailAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
51
53
|
export declare const marshalMailAccountApiCreateMailAccountRequest: (request: MailAccountApiCreateMailAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -294,10 +294,7 @@ const unmarshalOffer = (data) => {
|
|
|
294
294
|
available: data.available,
|
|
295
295
|
billingOperationPath: data.billing_operation_path,
|
|
296
296
|
controlPanelName: data.control_panel_name,
|
|
297
|
-
controlPanels: unmarshalArrayOfObject(
|
|
298
|
-
data.control_panels,
|
|
299
|
-
unmarshalControlPanel
|
|
300
|
-
),
|
|
297
|
+
controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
|
|
301
298
|
endOfLife: data.end_of_life,
|
|
302
299
|
id: data.id,
|
|
303
300
|
name: data.name,
|
|
@@ -402,10 +399,7 @@ const unmarshalListControlPanelsResponse = (data) => {
|
|
|
402
399
|
);
|
|
403
400
|
}
|
|
404
401
|
return {
|
|
405
|
-
controlPanels: unmarshalArrayOfObject(
|
|
406
|
-
data.control_panels,
|
|
407
|
-
unmarshalControlPanel
|
|
408
|
-
),
|
|
402
|
+
controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
|
|
409
403
|
totalCount: data.total_count
|
|
410
404
|
};
|
|
411
405
|
};
|
|
@@ -471,10 +465,7 @@ const unmarshalListMailAccountsResponse = (data) => {
|
|
|
471
465
|
);
|
|
472
466
|
}
|
|
473
467
|
return {
|
|
474
|
-
mailAccounts: unmarshalArrayOfObject(
|
|
475
|
-
data.mail_accounts,
|
|
476
|
-
unmarshalMailAccount
|
|
477
|
-
),
|
|
468
|
+
mailAccounts: unmarshalArrayOfObject(data.mail_accounts, unmarshalMailAccount),
|
|
478
469
|
totalCount: data.total_count
|
|
479
470
|
};
|
|
480
471
|
};
|
|
@@ -509,10 +500,7 @@ const unmarshalListRecentProgressesResponse = (data) => {
|
|
|
509
500
|
);
|
|
510
501
|
}
|
|
511
502
|
return {
|
|
512
|
-
progresses: unmarshalArrayOfObject(
|
|
513
|
-
data.progresses,
|
|
514
|
-
unmarshalProgressSummary
|
|
515
|
-
)
|
|
503
|
+
progresses: unmarshalArrayOfObject(data.progresses, unmarshalProgressSummary)
|
|
516
504
|
};
|
|
517
505
|
};
|
|
518
506
|
const unmarshalListWebsitesResponse = (data) => {
|
|
@@ -533,10 +521,7 @@ const unmarshalProgress = (data) => {
|
|
|
533
521
|
);
|
|
534
522
|
}
|
|
535
523
|
return {
|
|
536
|
-
backupItemGroups: unmarshalArrayOfObject(
|
|
537
|
-
data.backup_item_groups,
|
|
538
|
-
unmarshalBackupItemGroup
|
|
539
|
-
),
|
|
524
|
+
backupItemGroups: unmarshalArrayOfObject(data.backup_item_groups, unmarshalBackupItemGroup),
|
|
540
525
|
id: data.id,
|
|
541
526
|
percentage: data.percentage,
|
|
542
527
|
status: data.status
|
|
@@ -608,10 +593,7 @@ const unmarshalSearchDomainsResponse = (data) => {
|
|
|
608
593
|
);
|
|
609
594
|
}
|
|
610
595
|
return {
|
|
611
|
-
domainsAvailable: unmarshalArrayOfObject(
|
|
612
|
-
data.domains_available,
|
|
613
|
-
unmarshalDomainAvailability
|
|
614
|
-
)
|
|
596
|
+
domainsAvailable: unmarshalArrayOfObject(data.domains_available, unmarshalDomainAvailability)
|
|
615
597
|
};
|
|
616
598
|
};
|
|
617
599
|
const unmarshalSession = (data) => {
|
|
@@ -644,7 +626,10 @@ const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
|
|
|
644
626
|
param: "new_user",
|
|
645
627
|
value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
|
|
646
628
|
},
|
|
647
|
-
{
|
|
629
|
+
{
|
|
630
|
+
param: "existing_username",
|
|
631
|
+
value: request.existingUsername
|
|
632
|
+
}
|
|
648
633
|
])
|
|
649
634
|
});
|
|
650
635
|
const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
|
|
@@ -670,9 +655,7 @@ const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
|
|
|
670
655
|
});
|
|
671
656
|
const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
|
|
672
657
|
auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
|
|
673
|
-
custom_records: request.customRecords !== void 0 ? request.customRecords.map(
|
|
674
|
-
(elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
|
|
675
|
-
) : void 0,
|
|
658
|
+
custom_records: request.customRecords !== void 0 ? request.customRecords.map((elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)) : void 0,
|
|
676
659
|
update_all_records: request.updateAllRecords,
|
|
677
660
|
update_mail_records: request.updateMailRecords,
|
|
678
661
|
update_nameservers: request.updateNameservers,
|
|
@@ -706,20 +689,19 @@ const marshalOfferOptionRequest = (request, defaults) => ({
|
|
|
706
689
|
const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
|
|
707
690
|
auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
|
|
708
691
|
domain: request.domain,
|
|
709
|
-
domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
|
|
710
|
-
request.domainConfiguration
|
|
711
|
-
) : void 0,
|
|
692
|
+
domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(request.domainConfiguration) : void 0,
|
|
712
693
|
email: request.email,
|
|
713
694
|
language: request.language,
|
|
714
695
|
offer_id: request.offerId,
|
|
715
|
-
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
|
|
716
|
-
(elt) => marshalOfferOptionRequest(elt)
|
|
717
|
-
) : void 0,
|
|
696
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
|
|
718
697
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
719
698
|
skip_welcome_email: request.skipWelcomeEmail,
|
|
720
699
|
subdomain: request.subdomain,
|
|
721
700
|
tags: request.tags
|
|
722
701
|
});
|
|
702
|
+
const marshalHostingApiDeleteHostingDomainsRequest = (request, defaults) => ({
|
|
703
|
+
domains: request.domains
|
|
704
|
+
});
|
|
723
705
|
const marshalHostingApiMigrateControlPanelRequest = (request, defaults) => ({
|
|
724
706
|
control_panel_name: request.controlPanelName,
|
|
725
707
|
offer_id: request.offerId
|
|
@@ -727,12 +709,13 @@ const marshalHostingApiMigrateControlPanelRequest = (request, defaults) => ({
|
|
|
727
709
|
const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({
|
|
728
710
|
domain_name: request.domainName
|
|
729
711
|
});
|
|
712
|
+
const marshalHostingApiUpdateHostingFreeDomainRequest = (request, defaults) => ({
|
|
713
|
+
free_domain: request.freeDomain
|
|
714
|
+
});
|
|
730
715
|
const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
|
|
731
716
|
email: request.email,
|
|
732
717
|
offer_id: request.offerId,
|
|
733
|
-
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
|
|
734
|
-
(elt) => marshalOfferOptionRequest(elt)
|
|
735
|
-
) : void 0,
|
|
718
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
|
|
736
719
|
protected: request.protected,
|
|
737
720
|
tags: request.tags
|
|
738
721
|
});
|
|
@@ -767,8 +750,10 @@ export {
|
|
|
767
750
|
marshalFtpAccountApiCreateFtpAccountRequest,
|
|
768
751
|
marshalHostingApiAddCustomDomainRequest,
|
|
769
752
|
marshalHostingApiCreateHostingRequest,
|
|
753
|
+
marshalHostingApiDeleteHostingDomainsRequest,
|
|
770
754
|
marshalHostingApiMigrateControlPanelRequest,
|
|
771
755
|
marshalHostingApiRemoveCustomDomainRequest,
|
|
756
|
+
marshalHostingApiUpdateHostingFreeDomainRequest,
|
|
772
757
|
marshalHostingApiUpdateHostingRequest,
|
|
773
758
|
marshalMailAccountApiChangeMailAccountPasswordRequest,
|
|
774
759
|
marshalMailAccountApiCreateMailAccountRequest,
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -1242,6 +1242,20 @@ export type HostingApiCreateSessionRequest = {
|
|
|
1242
1242
|
*/
|
|
1243
1243
|
hostingId: string;
|
|
1244
1244
|
};
|
|
1245
|
+
export type HostingApiDeleteHostingDomainsRequest = {
|
|
1246
|
+
/**
|
|
1247
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1248
|
+
*/
|
|
1249
|
+
region?: ScwRegion;
|
|
1250
|
+
/**
|
|
1251
|
+
* Hosting ID of the Web Hosting plan from which to delete domains.
|
|
1252
|
+
*/
|
|
1253
|
+
hostingId: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* List of domains to delete from the Web Hosting plan.
|
|
1256
|
+
*/
|
|
1257
|
+
domains?: string[];
|
|
1258
|
+
};
|
|
1245
1259
|
export type HostingApiDeleteHostingRequest = {
|
|
1246
1260
|
/**
|
|
1247
1261
|
* Region to target. If none is passed will use default region from the config.
|
|
@@ -1360,6 +1374,30 @@ export type HostingApiResetHostingPasswordRequest = {
|
|
|
1360
1374
|
*/
|
|
1361
1375
|
hostingId: string;
|
|
1362
1376
|
};
|
|
1377
|
+
export type HostingApiResetHostingRequest = {
|
|
1378
|
+
/**
|
|
1379
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1380
|
+
*/
|
|
1381
|
+
region?: ScwRegion;
|
|
1382
|
+
/**
|
|
1383
|
+
* Hosting ID of the Web Hosting plan to reset.
|
|
1384
|
+
*/
|
|
1385
|
+
hostingId: string;
|
|
1386
|
+
};
|
|
1387
|
+
export type HostingApiUpdateHostingFreeDomainRequest = {
|
|
1388
|
+
/**
|
|
1389
|
+
* Region to target. If none is passed will use default region from the config.
|
|
1390
|
+
*/
|
|
1391
|
+
region?: ScwRegion;
|
|
1392
|
+
/**
|
|
1393
|
+
* Hosting ID of the Web Hosting plan to update.
|
|
1394
|
+
*/
|
|
1395
|
+
hostingId: string;
|
|
1396
|
+
/**
|
|
1397
|
+
* New free domain to associate with the Web Hosting plan.
|
|
1398
|
+
*/
|
|
1399
|
+
freeDomain: string;
|
|
1400
|
+
};
|
|
1363
1401
|
export type HostingApiUpdateHostingRequest = {
|
|
1364
1402
|
/**
|
|
1365
1403
|
* Region to target. If none is passed will use default region from the config.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-webhosting",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Scaleway SDK webhosting",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@scaleway/random-name": "5.1.2",
|
|
30
|
-
"@scaleway/sdk-std": "2.1.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@scaleway/sdk-client": "^2.1.0"
|