@scaleway/sdk-webhosting 1.1.2 → 1.2.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/v1/api.gen.cjs +202 -48
- package/dist/v1/api.gen.d.ts +118 -20
- package/dist/v1/api.gen.js +205 -51
- package/dist/v1/content.gen.cjs +4 -1
- package/dist/v1/content.gen.d.ts +3 -1
- package/dist/v1/content.gen.js +4 -1
- package/dist/v1/index.gen.cjs +10 -0
- package/dist/v1/index.gen.d.ts +2 -2
- package/dist/v1/index.gen.js +13 -3
- package/dist/v1/marshalling.gen.cjs +155 -35
- package/dist/v1/marshalling.gen.d.ts +9 -1
- package/dist/v1/marshalling.gen.js +155 -35
- package/dist/v1/types.gen.d.ts +260 -25
- package/dist/v1/validation-rules.gen.cjs +10 -0
- package/dist/v1/validation-rules.gen.d.ts +9 -0
- package/dist/v1/validation-rules.gen.js +10 -0
- package/package.json +6 -6
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const sdkClient = require("@scaleway/sdk-client");
|
|
4
|
+
const unmarshalBackup = (data) => {
|
|
5
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
6
|
+
throw new TypeError(
|
|
7
|
+
`Unmarshalling the type 'Backup' failed as data isn't a dictionary.`
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
12
|
+
id: data.id,
|
|
13
|
+
size: data.size,
|
|
14
|
+
status: data.status,
|
|
15
|
+
totalItems: data.total_items
|
|
16
|
+
};
|
|
17
|
+
};
|
|
4
18
|
const unmarshalDatabaseUser = (data) => {
|
|
5
19
|
if (!sdkClient.isJSONObject(data)) {
|
|
6
20
|
throw new TypeError(
|
|
@@ -34,39 +48,84 @@ const unmarshalFtpAccount = (data) => {
|
|
|
34
48
|
username: data.username
|
|
35
49
|
};
|
|
36
50
|
};
|
|
37
|
-
const
|
|
51
|
+
const unmarshalAutoConfigDomainDns = (data) => {
|
|
38
52
|
if (!sdkClient.isJSONObject(data)) {
|
|
39
53
|
throw new TypeError(
|
|
40
|
-
`Unmarshalling the type '
|
|
54
|
+
`Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`
|
|
41
55
|
);
|
|
42
56
|
}
|
|
43
57
|
return {
|
|
58
|
+
allRecords: data.all_records,
|
|
59
|
+
mailRecords: data.mail_records,
|
|
60
|
+
nameservers: data.nameservers,
|
|
61
|
+
none: data.none,
|
|
62
|
+
webRecords: data.web_records
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
const unmarshalHostingDomainCustomDomain = (data) => {
|
|
66
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
67
|
+
throw new TypeError(
|
|
68
|
+
`Unmarshalling the type 'HostingDomainCustomDomain' failed as data isn't a dictionary.`
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
73
|
+
dnsStatus: data.dns_status,
|
|
44
74
|
domain: data.domain,
|
|
45
|
-
|
|
75
|
+
domainStatus: data.domain_status
|
|
46
76
|
};
|
|
47
77
|
};
|
|
48
|
-
const
|
|
78
|
+
const unmarshalHostingDomain = (data) => {
|
|
49
79
|
if (!sdkClient.isJSONObject(data)) {
|
|
50
80
|
throw new TypeError(
|
|
51
|
-
`Unmarshalling the type '
|
|
81
|
+
`Unmarshalling the type 'HostingDomain' failed as data isn't a dictionary.`
|
|
52
82
|
);
|
|
53
83
|
}
|
|
54
84
|
return {
|
|
55
|
-
|
|
85
|
+
customDomain: data.custom_domain ? unmarshalHostingDomainCustomDomain(data.custom_domain) : void 0,
|
|
86
|
+
subdomain: data.subdomain
|
|
56
87
|
};
|
|
57
88
|
};
|
|
58
|
-
const
|
|
89
|
+
const unmarshalHostingSummary = (data) => {
|
|
59
90
|
if (!sdkClient.isJSONObject(data)) {
|
|
60
91
|
throw new TypeError(
|
|
61
|
-
`Unmarshalling the type '
|
|
92
|
+
`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
|
|
62
93
|
);
|
|
63
94
|
}
|
|
64
95
|
return {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
96
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
97
|
+
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
98
|
+
domain: data.domain,
|
|
99
|
+
domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
|
|
100
|
+
domainStatus: data.domain_status ? data.domain_status : void 0,
|
|
101
|
+
id: data.id,
|
|
102
|
+
offerName: data.offer_name,
|
|
103
|
+
projectId: data.project_id,
|
|
104
|
+
protected: data.protected,
|
|
105
|
+
region: data.region,
|
|
106
|
+
status: data.status,
|
|
107
|
+
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
const unmarshalMailAccount = (data) => {
|
|
111
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
112
|
+
throw new TypeError(
|
|
113
|
+
`Unmarshalling the type 'MailAccount' failed as data isn't a dictionary.`
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
domain: data.domain,
|
|
118
|
+
username: data.username
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
const unmarshalCheckUserOwnsDomainResponse = (data) => {
|
|
122
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
123
|
+
throw new TypeError(
|
|
124
|
+
`Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
ownsDomain: data.owns_domain
|
|
70
129
|
};
|
|
71
130
|
};
|
|
72
131
|
const unmarshalDnsRecord = (data) => {
|
|
@@ -123,7 +182,8 @@ const unmarshalDomain = (data) => {
|
|
|
123
182
|
availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
|
|
124
183
|
name: data.name,
|
|
125
184
|
owner: data.owner,
|
|
126
|
-
status: data.status
|
|
185
|
+
status: data.status,
|
|
186
|
+
zoneDomainName: data.zone_domain_name
|
|
127
187
|
};
|
|
128
188
|
};
|
|
129
189
|
const unmarshalPlatformControlPanelUrls = (data) => {
|
|
@@ -221,7 +281,8 @@ const unmarshalHosting = (data) => {
|
|
|
221
281
|
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
222
282
|
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
223
283
|
domain: data.domain,
|
|
224
|
-
|
|
284
|
+
domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
|
|
285
|
+
domainStatus: data.domain_status ? data.domain_status : void 0,
|
|
225
286
|
id: data.id,
|
|
226
287
|
ipv4: data.ipv4,
|
|
227
288
|
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
@@ -235,6 +296,54 @@ const unmarshalHosting = (data) => {
|
|
|
235
296
|
user: data.user ? unmarshalHostingUser(data.user) : void 0
|
|
236
297
|
};
|
|
237
298
|
};
|
|
299
|
+
const unmarshalBackupItem = (data) => {
|
|
300
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
301
|
+
throw new TypeError(
|
|
302
|
+
`Unmarshalling the type 'BackupItem' failed as data isn't a dictionary.`
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
return {
|
|
306
|
+
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
307
|
+
id: data.id,
|
|
308
|
+
name: data.name,
|
|
309
|
+
size: data.size,
|
|
310
|
+
status: data.status,
|
|
311
|
+
type: data.type
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
const unmarshalBackupItemGroup = (data) => {
|
|
315
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
316
|
+
throw new TypeError(
|
|
317
|
+
`Unmarshalling the type 'BackupItemGroup' failed as data isn't a dictionary.`
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
return {
|
|
321
|
+
items: sdkClient.unmarshalArrayOfObject(data.items, unmarshalBackupItem),
|
|
322
|
+
type: data.type
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
const unmarshalListBackupItemsResponse = (data) => {
|
|
326
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
327
|
+
throw new TypeError(
|
|
328
|
+
`Unmarshalling the type 'ListBackupItemsResponse' failed as data isn't a dictionary.`
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
return {
|
|
332
|
+
groups: sdkClient.unmarshalArrayOfObject(data.groups, unmarshalBackupItemGroup),
|
|
333
|
+
totalCount: data.total_count
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
const unmarshalListBackupsResponse = (data) => {
|
|
337
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
338
|
+
throw new TypeError(
|
|
339
|
+
`Unmarshalling the type 'ListBackupsResponse' failed as data isn't a dictionary.`
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
backups: sdkClient.unmarshalArrayOfObject(data.backups, unmarshalBackup),
|
|
344
|
+
totalCount: data.total_count
|
|
345
|
+
};
|
|
346
|
+
};
|
|
238
347
|
const unmarshalControlPanel = (data) => {
|
|
239
348
|
if (!sdkClient.isJSONObject(data)) {
|
|
240
349
|
throw new TypeError(
|
|
@@ -295,26 +404,6 @@ const unmarshalListFtpAccountsResponse = (data) => {
|
|
|
295
404
|
totalCount: data.total_count
|
|
296
405
|
};
|
|
297
406
|
};
|
|
298
|
-
const unmarshalHostingSummary = (data) => {
|
|
299
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
300
|
-
throw new TypeError(
|
|
301
|
-
`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
return {
|
|
305
|
-
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
306
|
-
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
307
|
-
domain: data.domain,
|
|
308
|
-
domainStatus: data.domain_status,
|
|
309
|
-
id: data.id,
|
|
310
|
-
offerName: data.offer_name,
|
|
311
|
-
projectId: data.project_id,
|
|
312
|
-
protected: data.protected,
|
|
313
|
-
region: data.region,
|
|
314
|
-
status: data.status,
|
|
315
|
-
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
316
|
-
};
|
|
317
|
-
};
|
|
318
407
|
const unmarshalListHostingsResponse = (data) => {
|
|
319
408
|
if (!sdkClient.isJSONObject(data)) {
|
|
320
409
|
throw new TypeError(
|
|
@@ -398,6 +487,22 @@ const unmarshalResourceSummary = (data) => {
|
|
|
398
487
|
websitesCount: data.websites_count
|
|
399
488
|
};
|
|
400
489
|
};
|
|
490
|
+
const unmarshalRestoreBackupItemsResponse = (data) => {
|
|
491
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
492
|
+
throw new TypeError(
|
|
493
|
+
`Unmarshalling the type 'RestoreBackupItemsResponse' failed as data isn't a dictionary.`
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
return {};
|
|
497
|
+
};
|
|
498
|
+
const unmarshalRestoreBackupResponse = (data) => {
|
|
499
|
+
if (!sdkClient.isJSONObject(data)) {
|
|
500
|
+
throw new TypeError(
|
|
501
|
+
`Unmarshalling the type 'RestoreBackupResponse' failed as data isn't a dictionary.`
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
return {};
|
|
505
|
+
};
|
|
401
506
|
const unmarshalDomainAvailability = (data) => {
|
|
402
507
|
if (!sdkClient.isJSONObject(data)) {
|
|
403
508
|
throw new TypeError(
|
|
@@ -436,6 +541,9 @@ const unmarshalSession = (data) => {
|
|
|
436
541
|
url: data.url
|
|
437
542
|
};
|
|
438
543
|
};
|
|
544
|
+
const marshalBackupApiRestoreBackupItemsRequest = (request, defaults) => ({
|
|
545
|
+
item_ids: request.itemIds
|
|
546
|
+
});
|
|
439
547
|
const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
|
|
440
548
|
username: request.username
|
|
441
549
|
});
|
|
@@ -495,6 +603,9 @@ const marshalFtpAccountApiCreateFtpAccountRequest = (request, defaults) => ({
|
|
|
495
603
|
path: request.path,
|
|
496
604
|
username: request.username
|
|
497
605
|
});
|
|
606
|
+
const marshalHostingApiAddCustomDomainRequest = (request, defaults) => ({
|
|
607
|
+
domain_name: request.domainName
|
|
608
|
+
});
|
|
498
609
|
const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
|
|
499
610
|
update_all_records: request.updateAllRecords,
|
|
500
611
|
update_mail_record: request.updateMailRecord,
|
|
@@ -519,6 +630,7 @@ const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
|
|
|
519
630
|
) : void 0,
|
|
520
631
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
521
632
|
skip_welcome_email: request.skipWelcomeEmail,
|
|
633
|
+
subdomain: request.subdomain,
|
|
522
634
|
tags: request.tags
|
|
523
635
|
});
|
|
524
636
|
const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
|
|
@@ -544,6 +656,7 @@ const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
|
|
|
544
656
|
domain: request.domain,
|
|
545
657
|
username: request.username
|
|
546
658
|
});
|
|
659
|
+
exports.marshalBackupApiRestoreBackupItemsRequest = marshalBackupApiRestoreBackupItemsRequest;
|
|
547
660
|
exports.marshalDatabaseApiAssignDatabaseUserRequest = marshalDatabaseApiAssignDatabaseUserRequest;
|
|
548
661
|
exports.marshalDatabaseApiChangeDatabaseUserPasswordRequest = marshalDatabaseApiChangeDatabaseUserPasswordRequest;
|
|
549
662
|
exports.marshalDatabaseApiCreateDatabaseRequest = marshalDatabaseApiCreateDatabaseRequest;
|
|
@@ -553,11 +666,13 @@ exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDoma
|
|
|
553
666
|
exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalDnsApiSyncDomainDnsRecordsRequest;
|
|
554
667
|
exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
|
|
555
668
|
exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
|
|
669
|
+
exports.marshalHostingApiAddCustomDomainRequest = marshalHostingApiAddCustomDomainRequest;
|
|
556
670
|
exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
|
|
557
671
|
exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRequest;
|
|
558
672
|
exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
|
|
559
673
|
exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
|
|
560
674
|
exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
|
|
675
|
+
exports.unmarshalBackup = unmarshalBackup;
|
|
561
676
|
exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
|
|
562
677
|
exports.unmarshalDatabase = unmarshalDatabase;
|
|
563
678
|
exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
|
|
@@ -565,6 +680,9 @@ exports.unmarshalDnsRecords = unmarshalDnsRecords;
|
|
|
565
680
|
exports.unmarshalDomain = unmarshalDomain;
|
|
566
681
|
exports.unmarshalFtpAccount = unmarshalFtpAccount;
|
|
567
682
|
exports.unmarshalHosting = unmarshalHosting;
|
|
683
|
+
exports.unmarshalHostingSummary = unmarshalHostingSummary;
|
|
684
|
+
exports.unmarshalListBackupItemsResponse = unmarshalListBackupItemsResponse;
|
|
685
|
+
exports.unmarshalListBackupsResponse = unmarshalListBackupsResponse;
|
|
568
686
|
exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
|
|
569
687
|
exports.unmarshalListDatabaseUsersResponse = unmarshalListDatabaseUsersResponse;
|
|
570
688
|
exports.unmarshalListDatabasesResponse = unmarshalListDatabasesResponse;
|
|
@@ -576,5 +694,7 @@ exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
|
|
|
576
694
|
exports.unmarshalMailAccount = unmarshalMailAccount;
|
|
577
695
|
exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
|
|
578
696
|
exports.unmarshalResourceSummary = unmarshalResourceSummary;
|
|
697
|
+
exports.unmarshalRestoreBackupItemsResponse = unmarshalRestoreBackupItemsResponse;
|
|
698
|
+
exports.unmarshalRestoreBackupResponse = unmarshalRestoreBackupResponse;
|
|
579
699
|
exports.unmarshalSearchDomainsResponse = unmarshalSearchDomainsResponse;
|
|
580
700
|
exports.unmarshalSession = unmarshalSession;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest,
|
|
2
|
+
import type { Backup, BackupApiRestoreBackupItemsRequest, CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session } from './types.gen';
|
|
3
|
+
export declare const unmarshalBackup: (data: unknown) => Backup;
|
|
3
4
|
export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
|
|
4
5
|
export declare const unmarshalDatabase: (data: unknown) => Database;
|
|
5
6
|
export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
|
|
7
|
+
export declare const unmarshalHostingSummary: (data: unknown) => HostingSummary;
|
|
6
8
|
export declare const unmarshalMailAccount: (data: unknown) => MailAccount;
|
|
7
9
|
export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
|
|
8
10
|
export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
|
|
9
11
|
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
10
12
|
export declare const unmarshalHosting: (data: unknown) => Hosting;
|
|
13
|
+
export declare const unmarshalListBackupItemsResponse: (data: unknown) => ListBackupItemsResponse;
|
|
14
|
+
export declare const unmarshalListBackupsResponse: (data: unknown) => ListBackupsResponse;
|
|
11
15
|
export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
|
|
12
16
|
export declare const unmarshalListDatabaseUsersResponse: (data: unknown) => ListDatabaseUsersResponse;
|
|
13
17
|
export declare const unmarshalListDatabasesResponse: (data: unknown) => ListDatabasesResponse;
|
|
@@ -18,8 +22,11 @@ export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersR
|
|
|
18
22
|
export declare const unmarshalListWebsitesResponse: (data: unknown) => ListWebsitesResponse;
|
|
19
23
|
export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
|
|
20
24
|
export declare const unmarshalResourceSummary: (data: unknown) => ResourceSummary;
|
|
25
|
+
export declare const unmarshalRestoreBackupItemsResponse: (data: unknown) => RestoreBackupItemsResponse;
|
|
26
|
+
export declare const unmarshalRestoreBackupResponse: (data: unknown) => RestoreBackupResponse;
|
|
21
27
|
export declare const unmarshalSearchDomainsResponse: (data: unknown) => SearchDomainsResponse;
|
|
22
28
|
export declare const unmarshalSession: (data: unknown) => Session;
|
|
29
|
+
export declare const marshalBackupApiRestoreBackupItemsRequest: (request: BackupApiRestoreBackupItemsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
30
|
export declare const marshalDatabaseApiAssignDatabaseUserRequest: (request: DatabaseApiAssignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
31
|
export declare const marshalDatabaseApiChangeDatabaseUserPasswordRequest: (request: DatabaseApiChangeDatabaseUserPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
32
|
export declare const marshalDatabaseApiCreateDatabaseRequest: (request: DatabaseApiCreateDatabaseRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -29,6 +36,7 @@ export declare const marshalDnsApiCheckUserOwnsDomainRequest: (request: DnsApiCh
|
|
|
29
36
|
export declare const marshalDnsApiSyncDomainDnsRecordsRequest: (request: DnsApiSyncDomainDnsRecordsRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
30
37
|
export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (request: FtpAccountApiChangeFtpAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
31
38
|
export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
39
|
+
export declare const marshalHostingApiAddCustomDomainRequest: (request: HostingApiAddCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
32
40
|
export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
33
41
|
export declare const marshalHostingApiUpdateHostingRequest: (request: HostingApiUpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
34
42
|
export declare const marshalMailAccountApiChangeMailAccountPasswordRequest: (request: MailAccountApiChangeMailAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
|
+
const unmarshalBackup = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) {
|
|
4
|
+
throw new TypeError(
|
|
5
|
+
`Unmarshalling the type 'Backup' failed as data isn't a dictionary.`
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
return {
|
|
9
|
+
createdAt: unmarshalDate(data.created_at),
|
|
10
|
+
id: data.id,
|
|
11
|
+
size: data.size,
|
|
12
|
+
status: data.status,
|
|
13
|
+
totalItems: data.total_items
|
|
14
|
+
};
|
|
15
|
+
};
|
|
2
16
|
const unmarshalDatabaseUser = (data) => {
|
|
3
17
|
if (!isJSONObject(data)) {
|
|
4
18
|
throw new TypeError(
|
|
@@ -32,39 +46,84 @@ const unmarshalFtpAccount = (data) => {
|
|
|
32
46
|
username: data.username
|
|
33
47
|
};
|
|
34
48
|
};
|
|
35
|
-
const
|
|
49
|
+
const unmarshalAutoConfigDomainDns = (data) => {
|
|
36
50
|
if (!isJSONObject(data)) {
|
|
37
51
|
throw new TypeError(
|
|
38
|
-
`Unmarshalling the type '
|
|
52
|
+
`Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`
|
|
39
53
|
);
|
|
40
54
|
}
|
|
41
55
|
return {
|
|
56
|
+
allRecords: data.all_records,
|
|
57
|
+
mailRecords: data.mail_records,
|
|
58
|
+
nameservers: data.nameservers,
|
|
59
|
+
none: data.none,
|
|
60
|
+
webRecords: data.web_records
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const unmarshalHostingDomainCustomDomain = (data) => {
|
|
64
|
+
if (!isJSONObject(data)) {
|
|
65
|
+
throw new TypeError(
|
|
66
|
+
`Unmarshalling the type 'HostingDomainCustomDomain' failed as data isn't a dictionary.`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
71
|
+
dnsStatus: data.dns_status,
|
|
42
72
|
domain: data.domain,
|
|
43
|
-
|
|
73
|
+
domainStatus: data.domain_status
|
|
44
74
|
};
|
|
45
75
|
};
|
|
46
|
-
const
|
|
76
|
+
const unmarshalHostingDomain = (data) => {
|
|
47
77
|
if (!isJSONObject(data)) {
|
|
48
78
|
throw new TypeError(
|
|
49
|
-
`Unmarshalling the type '
|
|
79
|
+
`Unmarshalling the type 'HostingDomain' failed as data isn't a dictionary.`
|
|
50
80
|
);
|
|
51
81
|
}
|
|
52
82
|
return {
|
|
53
|
-
|
|
83
|
+
customDomain: data.custom_domain ? unmarshalHostingDomainCustomDomain(data.custom_domain) : void 0,
|
|
84
|
+
subdomain: data.subdomain
|
|
54
85
|
};
|
|
55
86
|
};
|
|
56
|
-
const
|
|
87
|
+
const unmarshalHostingSummary = (data) => {
|
|
57
88
|
if (!isJSONObject(data)) {
|
|
58
89
|
throw new TypeError(
|
|
59
|
-
`Unmarshalling the type '
|
|
90
|
+
`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
|
|
60
91
|
);
|
|
61
92
|
}
|
|
62
93
|
return {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
94
|
+
createdAt: unmarshalDate(data.created_at),
|
|
95
|
+
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
96
|
+
domain: data.domain,
|
|
97
|
+
domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
|
|
98
|
+
domainStatus: data.domain_status ? data.domain_status : void 0,
|
|
99
|
+
id: data.id,
|
|
100
|
+
offerName: data.offer_name,
|
|
101
|
+
projectId: data.project_id,
|
|
102
|
+
protected: data.protected,
|
|
103
|
+
region: data.region,
|
|
104
|
+
status: data.status,
|
|
105
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
const unmarshalMailAccount = (data) => {
|
|
109
|
+
if (!isJSONObject(data)) {
|
|
110
|
+
throw new TypeError(
|
|
111
|
+
`Unmarshalling the type 'MailAccount' failed as data isn't a dictionary.`
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
domain: data.domain,
|
|
116
|
+
username: data.username
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
const unmarshalCheckUserOwnsDomainResponse = (data) => {
|
|
120
|
+
if (!isJSONObject(data)) {
|
|
121
|
+
throw new TypeError(
|
|
122
|
+
`Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
ownsDomain: data.owns_domain
|
|
68
127
|
};
|
|
69
128
|
};
|
|
70
129
|
const unmarshalDnsRecord = (data) => {
|
|
@@ -121,7 +180,8 @@ const unmarshalDomain = (data) => {
|
|
|
121
180
|
availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
|
|
122
181
|
name: data.name,
|
|
123
182
|
owner: data.owner,
|
|
124
|
-
status: data.status
|
|
183
|
+
status: data.status,
|
|
184
|
+
zoneDomainName: data.zone_domain_name
|
|
125
185
|
};
|
|
126
186
|
};
|
|
127
187
|
const unmarshalPlatformControlPanelUrls = (data) => {
|
|
@@ -219,7 +279,8 @@ const unmarshalHosting = (data) => {
|
|
|
219
279
|
createdAt: unmarshalDate(data.created_at),
|
|
220
280
|
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
221
281
|
domain: data.domain,
|
|
222
|
-
|
|
282
|
+
domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
|
|
283
|
+
domainStatus: data.domain_status ? data.domain_status : void 0,
|
|
223
284
|
id: data.id,
|
|
224
285
|
ipv4: data.ipv4,
|
|
225
286
|
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
@@ -233,6 +294,54 @@ const unmarshalHosting = (data) => {
|
|
|
233
294
|
user: data.user ? unmarshalHostingUser(data.user) : void 0
|
|
234
295
|
};
|
|
235
296
|
};
|
|
297
|
+
const unmarshalBackupItem = (data) => {
|
|
298
|
+
if (!isJSONObject(data)) {
|
|
299
|
+
throw new TypeError(
|
|
300
|
+
`Unmarshalling the type 'BackupItem' failed as data isn't a dictionary.`
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
createdAt: unmarshalDate(data.created_at),
|
|
305
|
+
id: data.id,
|
|
306
|
+
name: data.name,
|
|
307
|
+
size: data.size,
|
|
308
|
+
status: data.status,
|
|
309
|
+
type: data.type
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
const unmarshalBackupItemGroup = (data) => {
|
|
313
|
+
if (!isJSONObject(data)) {
|
|
314
|
+
throw new TypeError(
|
|
315
|
+
`Unmarshalling the type 'BackupItemGroup' failed as data isn't a dictionary.`
|
|
316
|
+
);
|
|
317
|
+
}
|
|
318
|
+
return {
|
|
319
|
+
items: unmarshalArrayOfObject(data.items, unmarshalBackupItem),
|
|
320
|
+
type: data.type
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
const unmarshalListBackupItemsResponse = (data) => {
|
|
324
|
+
if (!isJSONObject(data)) {
|
|
325
|
+
throw new TypeError(
|
|
326
|
+
`Unmarshalling the type 'ListBackupItemsResponse' failed as data isn't a dictionary.`
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
return {
|
|
330
|
+
groups: unmarshalArrayOfObject(data.groups, unmarshalBackupItemGroup),
|
|
331
|
+
totalCount: data.total_count
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
const unmarshalListBackupsResponse = (data) => {
|
|
335
|
+
if (!isJSONObject(data)) {
|
|
336
|
+
throw new TypeError(
|
|
337
|
+
`Unmarshalling the type 'ListBackupsResponse' failed as data isn't a dictionary.`
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
return {
|
|
341
|
+
backups: unmarshalArrayOfObject(data.backups, unmarshalBackup),
|
|
342
|
+
totalCount: data.total_count
|
|
343
|
+
};
|
|
344
|
+
};
|
|
236
345
|
const unmarshalControlPanel = (data) => {
|
|
237
346
|
if (!isJSONObject(data)) {
|
|
238
347
|
throw new TypeError(
|
|
@@ -293,26 +402,6 @@ const unmarshalListFtpAccountsResponse = (data) => {
|
|
|
293
402
|
totalCount: data.total_count
|
|
294
403
|
};
|
|
295
404
|
};
|
|
296
|
-
const unmarshalHostingSummary = (data) => {
|
|
297
|
-
if (!isJSONObject(data)) {
|
|
298
|
-
throw new TypeError(
|
|
299
|
-
`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
return {
|
|
303
|
-
createdAt: unmarshalDate(data.created_at),
|
|
304
|
-
dnsStatus: data.dns_status ? data.dns_status : void 0,
|
|
305
|
-
domain: data.domain,
|
|
306
|
-
domainStatus: data.domain_status,
|
|
307
|
-
id: data.id,
|
|
308
|
-
offerName: data.offer_name,
|
|
309
|
-
projectId: data.project_id,
|
|
310
|
-
protected: data.protected,
|
|
311
|
-
region: data.region,
|
|
312
|
-
status: data.status,
|
|
313
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
314
|
-
};
|
|
315
|
-
};
|
|
316
405
|
const unmarshalListHostingsResponse = (data) => {
|
|
317
406
|
if (!isJSONObject(data)) {
|
|
318
407
|
throw new TypeError(
|
|
@@ -396,6 +485,22 @@ const unmarshalResourceSummary = (data) => {
|
|
|
396
485
|
websitesCount: data.websites_count
|
|
397
486
|
};
|
|
398
487
|
};
|
|
488
|
+
const unmarshalRestoreBackupItemsResponse = (data) => {
|
|
489
|
+
if (!isJSONObject(data)) {
|
|
490
|
+
throw new TypeError(
|
|
491
|
+
`Unmarshalling the type 'RestoreBackupItemsResponse' failed as data isn't a dictionary.`
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
return {};
|
|
495
|
+
};
|
|
496
|
+
const unmarshalRestoreBackupResponse = (data) => {
|
|
497
|
+
if (!isJSONObject(data)) {
|
|
498
|
+
throw new TypeError(
|
|
499
|
+
`Unmarshalling the type 'RestoreBackupResponse' failed as data isn't a dictionary.`
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
return {};
|
|
503
|
+
};
|
|
399
504
|
const unmarshalDomainAvailability = (data) => {
|
|
400
505
|
if (!isJSONObject(data)) {
|
|
401
506
|
throw new TypeError(
|
|
@@ -434,6 +539,9 @@ const unmarshalSession = (data) => {
|
|
|
434
539
|
url: data.url
|
|
435
540
|
};
|
|
436
541
|
};
|
|
542
|
+
const marshalBackupApiRestoreBackupItemsRequest = (request, defaults) => ({
|
|
543
|
+
item_ids: request.itemIds
|
|
544
|
+
});
|
|
437
545
|
const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
|
|
438
546
|
username: request.username
|
|
439
547
|
});
|
|
@@ -493,6 +601,9 @@ const marshalFtpAccountApiCreateFtpAccountRequest = (request, defaults) => ({
|
|
|
493
601
|
path: request.path,
|
|
494
602
|
username: request.username
|
|
495
603
|
});
|
|
604
|
+
const marshalHostingApiAddCustomDomainRequest = (request, defaults) => ({
|
|
605
|
+
domain_name: request.domainName
|
|
606
|
+
});
|
|
496
607
|
const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
|
|
497
608
|
update_all_records: request.updateAllRecords,
|
|
498
609
|
update_mail_record: request.updateMailRecord,
|
|
@@ -517,6 +628,7 @@ const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
|
|
|
517
628
|
) : void 0,
|
|
518
629
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
519
630
|
skip_welcome_email: request.skipWelcomeEmail,
|
|
631
|
+
subdomain: request.subdomain,
|
|
520
632
|
tags: request.tags
|
|
521
633
|
});
|
|
522
634
|
const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
|
|
@@ -543,6 +655,7 @@ const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
|
|
|
543
655
|
username: request.username
|
|
544
656
|
});
|
|
545
657
|
export {
|
|
658
|
+
marshalBackupApiRestoreBackupItemsRequest,
|
|
546
659
|
marshalDatabaseApiAssignDatabaseUserRequest,
|
|
547
660
|
marshalDatabaseApiChangeDatabaseUserPasswordRequest,
|
|
548
661
|
marshalDatabaseApiCreateDatabaseRequest,
|
|
@@ -552,11 +665,13 @@ export {
|
|
|
552
665
|
marshalDnsApiSyncDomainDnsRecordsRequest,
|
|
553
666
|
marshalFtpAccountApiChangeFtpAccountPasswordRequest,
|
|
554
667
|
marshalFtpAccountApiCreateFtpAccountRequest,
|
|
668
|
+
marshalHostingApiAddCustomDomainRequest,
|
|
555
669
|
marshalHostingApiCreateHostingRequest,
|
|
556
670
|
marshalHostingApiUpdateHostingRequest,
|
|
557
671
|
marshalMailAccountApiChangeMailAccountPasswordRequest,
|
|
558
672
|
marshalMailAccountApiCreateMailAccountRequest,
|
|
559
673
|
marshalMailAccountApiRemoveMailAccountRequest,
|
|
674
|
+
unmarshalBackup,
|
|
560
675
|
unmarshalCheckUserOwnsDomainResponse,
|
|
561
676
|
unmarshalDatabase,
|
|
562
677
|
unmarshalDatabaseUser,
|
|
@@ -564,6 +679,9 @@ export {
|
|
|
564
679
|
unmarshalDomain,
|
|
565
680
|
unmarshalFtpAccount,
|
|
566
681
|
unmarshalHosting,
|
|
682
|
+
unmarshalHostingSummary,
|
|
683
|
+
unmarshalListBackupItemsResponse,
|
|
684
|
+
unmarshalListBackupsResponse,
|
|
567
685
|
unmarshalListControlPanelsResponse,
|
|
568
686
|
unmarshalListDatabaseUsersResponse,
|
|
569
687
|
unmarshalListDatabasesResponse,
|
|
@@ -575,6 +693,8 @@ export {
|
|
|
575
693
|
unmarshalMailAccount,
|
|
576
694
|
unmarshalResetHostingPasswordResponse,
|
|
577
695
|
unmarshalResourceSummary,
|
|
696
|
+
unmarshalRestoreBackupItemsResponse,
|
|
697
|
+
unmarshalRestoreBackupResponse,
|
|
578
698
|
unmarshalSearchDomainsResponse,
|
|
579
699
|
unmarshalSession
|
|
580
700
|
};
|