@scaleway/sdk-webhosting 2.3.0 → 2.4.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/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1/api.gen.js +788 -1044
- package/dist/v1/content.gen.js +12 -19
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +74 -72
- package/dist/v1/marshalling.gen.js +435 -705
- package/dist/v1/types.gen.d.ts +49 -13
- package/dist/v1/validation-rules.gen.js +64 -82
- package/package.json +4 -4
|
@@ -1,793 +1,523 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
const unmarshalBackup = (data) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
size: data.size,
|
|
12
|
-
status: data.status,
|
|
13
|
-
totalItems: data.total_items
|
|
14
|
-
};
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Backup' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
createdAt: unmarshalDate(data.created_at),
|
|
6
|
+
id: data.id,
|
|
7
|
+
size: data.size,
|
|
8
|
+
status: data.status,
|
|
9
|
+
totalItems: data.total_items
|
|
10
|
+
};
|
|
15
11
|
};
|
|
16
12
|
const unmarshalDatabaseUser = (data) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
databases: data.databases,
|
|
24
|
-
username: data.username
|
|
25
|
-
};
|
|
13
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DatabaseUser' failed as data isn't a dictionary.`);
|
|
14
|
+
return {
|
|
15
|
+
databases: data.databases,
|
|
16
|
+
username: data.username
|
|
17
|
+
};
|
|
26
18
|
};
|
|
27
19
|
const unmarshalDatabase = (data) => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
databaseName: data.database_name,
|
|
35
|
-
users: data.users
|
|
36
|
-
};
|
|
20
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Database' failed as data isn't a dictionary.`);
|
|
21
|
+
return {
|
|
22
|
+
databaseName: data.database_name,
|
|
23
|
+
users: data.users
|
|
24
|
+
};
|
|
37
25
|
};
|
|
38
26
|
const unmarshalFtpAccount = (data) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
71
|
-
dnsStatus: data.dns_status,
|
|
72
|
-
domain: data.domain,
|
|
73
|
-
domainStatus: data.domain_status
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
const unmarshalHostingDomain = (data) => {
|
|
77
|
-
if (!isJSONObject(data)) {
|
|
78
|
-
throw new TypeError(
|
|
79
|
-
`Unmarshalling the type 'HostingDomain' failed as data isn't a dictionary.`
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
customDomain: data.custom_domain ? unmarshalHostingDomainCustomDomain(data.custom_domain) : void 0,
|
|
84
|
-
subdomain: data.subdomain
|
|
85
|
-
};
|
|
27
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'FtpAccount' failed as data isn't a dictionary.`);
|
|
28
|
+
return {
|
|
29
|
+
path: data.path,
|
|
30
|
+
username: data.username
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
var unmarshalAutoConfigDomainDns = (data) => {
|
|
34
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`);
|
|
35
|
+
return {
|
|
36
|
+
allRecords: data.all_records,
|
|
37
|
+
mailRecords: data.mail_records,
|
|
38
|
+
nameservers: data.nameservers,
|
|
39
|
+
none: data.none,
|
|
40
|
+
webRecords: data.web_records
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
var unmarshalHostingDomainCustomDomain = (data) => {
|
|
44
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HostingDomainCustomDomain' failed as data isn't a dictionary.`);
|
|
45
|
+
return {
|
|
46
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
47
|
+
dnsStatus: data.dns_status,
|
|
48
|
+
domain: data.domain,
|
|
49
|
+
domainStatus: data.domain_status
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
var unmarshalHostingDomain = (data) => {
|
|
53
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HostingDomain' failed as data isn't a dictionary.`);
|
|
54
|
+
return {
|
|
55
|
+
customDomain: data.custom_domain ? unmarshalHostingDomainCustomDomain(data.custom_domain) : void 0,
|
|
56
|
+
subdomain: data.subdomain
|
|
57
|
+
};
|
|
86
58
|
};
|
|
87
59
|
const unmarshalHostingSummary = (data) => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
region: data.region,
|
|
104
|
-
status: data.status,
|
|
105
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
106
|
-
};
|
|
60
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`);
|
|
61
|
+
return {
|
|
62
|
+
createdAt: unmarshalDate(data.created_at),
|
|
63
|
+
dnsStatus: data.dns_status,
|
|
64
|
+
domain: data.domain,
|
|
65
|
+
domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
|
|
66
|
+
domainStatus: data.domain_status,
|
|
67
|
+
id: data.id,
|
|
68
|
+
offerName: data.offer_name,
|
|
69
|
+
projectId: data.project_id,
|
|
70
|
+
protected: data.protected,
|
|
71
|
+
region: data.region,
|
|
72
|
+
status: data.status,
|
|
73
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
74
|
+
};
|
|
107
75
|
};
|
|
108
76
|
const unmarshalMailAccount = (data) => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return {
|
|
115
|
-
domain: data.domain,
|
|
116
|
-
username: data.username
|
|
117
|
-
};
|
|
77
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'MailAccount' failed as data isn't a dictionary.`);
|
|
78
|
+
return {
|
|
79
|
+
domain: data.domain,
|
|
80
|
+
username: data.username
|
|
81
|
+
};
|
|
118
82
|
};
|
|
119
83
|
const unmarshalWebsite = (data) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
throw new TypeError(
|
|
134
|
-
`Unmarshalling the type 'FreeDomain' failed as data isn't a dictionary.`
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
return {
|
|
138
|
-
rootDomain: data.root_domain,
|
|
139
|
-
slug: data.slug
|
|
140
|
-
};
|
|
84
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Website' failed as data isn't a dictionary.`);
|
|
85
|
+
return {
|
|
86
|
+
domain: data.domain,
|
|
87
|
+
path: data.path,
|
|
88
|
+
sslStatus: data.ssl_status
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
var unmarshalFreeDomain = (data) => {
|
|
92
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'FreeDomain' failed as data isn't a dictionary.`);
|
|
93
|
+
return {
|
|
94
|
+
rootDomain: data.root_domain,
|
|
95
|
+
slug: data.slug
|
|
96
|
+
};
|
|
141
97
|
};
|
|
142
98
|
const unmarshalCheckFreeDomainAvailabilityResponse = (data) => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
freeDomain: data.free_domain ? unmarshalFreeDomain(data.free_domain) : void 0,
|
|
150
|
-
isAvailable: data.is_available,
|
|
151
|
-
reason: data.reason ? data.reason : void 0
|
|
152
|
-
};
|
|
99
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckFreeDomainAvailabilityResponse' failed as data isn't a dictionary.`);
|
|
100
|
+
return {
|
|
101
|
+
freeDomain: data.free_domain ? unmarshalFreeDomain(data.free_domain) : void 0,
|
|
102
|
+
isAvailable: data.is_available,
|
|
103
|
+
reason: data.reason ? data.reason : void 0
|
|
104
|
+
};
|
|
153
105
|
};
|
|
154
106
|
const unmarshalCheckUserOwnsDomainResponse = (data) => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
value: data.value
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
const unmarshalNameserver = (data) => {
|
|
181
|
-
if (!isJSONObject(data)) {
|
|
182
|
-
throw new TypeError(
|
|
183
|
-
`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
return {
|
|
187
|
-
hostname: data.hostname,
|
|
188
|
-
isDefault: data.is_default,
|
|
189
|
-
status: data.status
|
|
190
|
-
};
|
|
107
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`);
|
|
108
|
+
return { ownsDomain: data.owns_domain };
|
|
109
|
+
};
|
|
110
|
+
var unmarshalDnsRecord = (data) => {
|
|
111
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary.`);
|
|
112
|
+
return {
|
|
113
|
+
name: data.name,
|
|
114
|
+
priority: data.priority,
|
|
115
|
+
rawData: data.raw_data,
|
|
116
|
+
status: data.status,
|
|
117
|
+
ttl: data.ttl,
|
|
118
|
+
type: data.type,
|
|
119
|
+
value: data.value
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
var unmarshalNameserver = (data) => {
|
|
123
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`);
|
|
124
|
+
return {
|
|
125
|
+
hostname: data.hostname,
|
|
126
|
+
isDefault: data.is_default,
|
|
127
|
+
status: data.status
|
|
128
|
+
};
|
|
191
129
|
};
|
|
192
130
|
const unmarshalDnsRecords = (data) => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
nameServers: unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
|
|
202
|
-
records: unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
|
|
203
|
-
status: data.status
|
|
204
|
-
};
|
|
131
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary.`);
|
|
132
|
+
return {
|
|
133
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
134
|
+
dnsConfig: data.dns_config,
|
|
135
|
+
nameServers: unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
|
|
136
|
+
records: unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
|
|
137
|
+
status: data.status
|
|
138
|
+
};
|
|
205
139
|
};
|
|
206
140
|
const unmarshalDomain = (data) => {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
303
|
-
quotaWarning: data.quota_warning,
|
|
304
|
-
region: data.region
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
const unmarshalPlatform = (data) => {
|
|
308
|
-
if (!isJSONObject(data)) {
|
|
309
|
-
throw new TypeError(
|
|
310
|
-
`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
return {
|
|
314
|
-
controlPanel: data.control_panel ? unmarshalPlatformControlPanel(data.control_panel) : void 0,
|
|
315
|
-
groupName: data.group_name,
|
|
316
|
-
hostname: data.hostname,
|
|
317
|
-
ipv4: data.ipv4,
|
|
318
|
-
ipv6: data.ipv6,
|
|
319
|
-
number: data.number
|
|
320
|
-
};
|
|
141
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
|
|
142
|
+
return {
|
|
143
|
+
autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
|
|
144
|
+
availableActions: data.available_actions,
|
|
145
|
+
availableDnsActions: data.available_dns_actions,
|
|
146
|
+
name: data.name,
|
|
147
|
+
owner: data.owner,
|
|
148
|
+
status: data.status,
|
|
149
|
+
zoneDomainName: data.zone_domain_name
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
var unmarshalPlatformControlPanelUrls = (data) => {
|
|
153
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformControlPanelUrls' failed as data isn't a dictionary.`);
|
|
154
|
+
return {
|
|
155
|
+
dashboard: data.dashboard,
|
|
156
|
+
webmail: data.webmail
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
var unmarshalControlPanel = (data) => {
|
|
160
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`);
|
|
161
|
+
return {
|
|
162
|
+
available: data.available,
|
|
163
|
+
availableLanguages: data.available_languages,
|
|
164
|
+
logoUrl: data.logo_url,
|
|
165
|
+
name: data.name
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
var unmarshalOfferCommitment = (data) => {
|
|
169
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferCommitment' failed as data isn't a dictionary.`);
|
|
170
|
+
return {
|
|
171
|
+
billingMode: data.billing_mode,
|
|
172
|
+
billingOperationPath: data.billing_operation_path,
|
|
173
|
+
durationInMonth: data.duration_in_month,
|
|
174
|
+
id: data.id,
|
|
175
|
+
next: data.next ? unmarshalOfferCommitment(data.next) : void 0,
|
|
176
|
+
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
177
|
+
type: data.type
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
var unmarshalOfferOption = (data) => {
|
|
181
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`);
|
|
182
|
+
return {
|
|
183
|
+
billingOperationPath: data.billing_operation_path,
|
|
184
|
+
currentValue: data.current_value,
|
|
185
|
+
id: data.id,
|
|
186
|
+
maxValue: data.max_value,
|
|
187
|
+
minValue: data.min_value,
|
|
188
|
+
name: data.name,
|
|
189
|
+
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
190
|
+
quotaWarning: data.quota_warning
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
var unmarshalPlatformControlPanel = (data) => {
|
|
194
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformControlPanel' failed as data isn't a dictionary.`);
|
|
195
|
+
return {
|
|
196
|
+
name: data.name,
|
|
197
|
+
urls: data.urls ? unmarshalPlatformControlPanelUrls(data.urls) : void 0
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
var unmarshalHostingUser = (data) => {
|
|
201
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'HostingUser' failed as data isn't a dictionary.`);
|
|
202
|
+
return {
|
|
203
|
+
contactEmail: data.contact_email,
|
|
204
|
+
oneTimePassword: data.one_time_password,
|
|
205
|
+
oneTimePasswordB64: data.one_time_password_b64,
|
|
206
|
+
username: data.username
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
var unmarshalOffer = (data) => {
|
|
210
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Offer' failed as data isn't a dictionary.`);
|
|
211
|
+
return {
|
|
212
|
+
available: data.available,
|
|
213
|
+
billingOperationPath: data.billing_operation_path,
|
|
214
|
+
commitments: unmarshalArrayOfObject(data.commitments, unmarshalOfferCommitment),
|
|
215
|
+
controlPanelName: data.control_panel_name,
|
|
216
|
+
controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
|
|
217
|
+
endOfLife: data.end_of_life,
|
|
218
|
+
id: data.id,
|
|
219
|
+
name: data.name,
|
|
220
|
+
options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
|
|
221
|
+
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
222
|
+
quotaWarning: data.quota_warning,
|
|
223
|
+
region: data.region
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
var unmarshalPlatform = (data) => {
|
|
227
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`);
|
|
228
|
+
return {
|
|
229
|
+
controlPanel: data.control_panel ? unmarshalPlatformControlPanel(data.control_panel) : void 0,
|
|
230
|
+
groupName: data.group_name,
|
|
231
|
+
hostname: data.hostname,
|
|
232
|
+
ipv4: data.ipv4,
|
|
233
|
+
ipv6: data.ipv6,
|
|
234
|
+
number: data.number
|
|
235
|
+
};
|
|
321
236
|
};
|
|
322
237
|
const unmarshalHosting = (data) => {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
};
|
|
361
|
-
};
|
|
362
|
-
const unmarshalBackupItemGroup = (data) => {
|
|
363
|
-
if (!isJSONObject(data)) {
|
|
364
|
-
throw new TypeError(
|
|
365
|
-
`Unmarshalling the type 'BackupItemGroup' failed as data isn't a dictionary.`
|
|
366
|
-
);
|
|
367
|
-
}
|
|
368
|
-
return {
|
|
369
|
-
items: unmarshalArrayOfObject(data.items, unmarshalBackupItem),
|
|
370
|
-
type: data.type
|
|
371
|
-
};
|
|
238
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`);
|
|
239
|
+
return {
|
|
240
|
+
createdAt: unmarshalDate(data.created_at),
|
|
241
|
+
dnsStatus: data.dns_status,
|
|
242
|
+
domain: data.domain,
|
|
243
|
+
domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
|
|
244
|
+
domainStatus: data.domain_status,
|
|
245
|
+
id: data.id,
|
|
246
|
+
ipv4: data.ipv4,
|
|
247
|
+
offer: data.offer ? unmarshalOffer(data.offer) : void 0,
|
|
248
|
+
platform: data.platform ? unmarshalPlatform(data.platform) : void 0,
|
|
249
|
+
projectId: data.project_id,
|
|
250
|
+
protected: data.protected,
|
|
251
|
+
region: data.region,
|
|
252
|
+
status: data.status,
|
|
253
|
+
tags: data.tags,
|
|
254
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
255
|
+
user: data.user ? unmarshalHostingUser(data.user) : void 0
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
var unmarshalBackupItem = (data) => {
|
|
259
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BackupItem' failed as data isn't a dictionary.`);
|
|
260
|
+
return {
|
|
261
|
+
createdAt: unmarshalDate(data.created_at),
|
|
262
|
+
id: data.id,
|
|
263
|
+
name: data.name,
|
|
264
|
+
size: data.size,
|
|
265
|
+
status: data.status,
|
|
266
|
+
type: data.type
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
var unmarshalBackupItemGroup = (data) => {
|
|
270
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'BackupItemGroup' failed as data isn't a dictionary.`);
|
|
271
|
+
return {
|
|
272
|
+
items: unmarshalArrayOfObject(data.items, unmarshalBackupItem),
|
|
273
|
+
type: data.type
|
|
274
|
+
};
|
|
372
275
|
};
|
|
373
276
|
const unmarshalListBackupItemsResponse = (data) => {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
return {
|
|
380
|
-
groups: unmarshalArrayOfObject(data.groups, unmarshalBackupItemGroup),
|
|
381
|
-
totalCount: data.total_count
|
|
382
|
-
};
|
|
277
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBackupItemsResponse' failed as data isn't a dictionary.`);
|
|
278
|
+
return {
|
|
279
|
+
groups: unmarshalArrayOfObject(data.groups, unmarshalBackupItemGroup),
|
|
280
|
+
totalCount: data.total_count
|
|
281
|
+
};
|
|
383
282
|
};
|
|
384
283
|
const unmarshalListBackupsResponse = (data) => {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
return {
|
|
391
|
-
backups: unmarshalArrayOfObject(data.backups, unmarshalBackup),
|
|
392
|
-
totalCount: data.total_count
|
|
393
|
-
};
|
|
284
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBackupsResponse' failed as data isn't a dictionary.`);
|
|
285
|
+
return {
|
|
286
|
+
backups: unmarshalArrayOfObject(data.backups, unmarshalBackup),
|
|
287
|
+
totalCount: data.total_count
|
|
288
|
+
};
|
|
394
289
|
};
|
|
395
290
|
const unmarshalListControlPanelsResponse = (data) => {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
return {
|
|
402
|
-
controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
|
|
403
|
-
totalCount: data.total_count
|
|
404
|
-
};
|
|
291
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`);
|
|
292
|
+
return {
|
|
293
|
+
controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
|
|
294
|
+
totalCount: data.total_count
|
|
295
|
+
};
|
|
405
296
|
};
|
|
406
297
|
const unmarshalListDatabaseUsersResponse = (data) => {
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
return {
|
|
413
|
-
totalCount: data.total_count,
|
|
414
|
-
users: unmarshalArrayOfObject(data.users, unmarshalDatabaseUser)
|
|
415
|
-
};
|
|
298
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabaseUsersResponse' failed as data isn't a dictionary.`);
|
|
299
|
+
return {
|
|
300
|
+
totalCount: data.total_count,
|
|
301
|
+
users: unmarshalArrayOfObject(data.users, unmarshalDatabaseUser)
|
|
302
|
+
};
|
|
416
303
|
};
|
|
417
304
|
const unmarshalListDatabasesResponse = (data) => {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
return {
|
|
424
|
-
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
425
|
-
totalCount: data.total_count
|
|
426
|
-
};
|
|
305
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`);
|
|
306
|
+
return {
|
|
307
|
+
databases: unmarshalArrayOfObject(data.databases, unmarshalDatabase),
|
|
308
|
+
totalCount: data.total_count
|
|
309
|
+
};
|
|
427
310
|
};
|
|
428
311
|
const unmarshalListFreeRootDomainsResponse = (data) => {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
return {
|
|
435
|
-
rootDomains: data.root_domains,
|
|
436
|
-
totalCount: data.total_count
|
|
437
|
-
};
|
|
312
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFreeRootDomainsResponse' failed as data isn't a dictionary.`);
|
|
313
|
+
return {
|
|
314
|
+
rootDomains: data.root_domains,
|
|
315
|
+
totalCount: data.total_count
|
|
316
|
+
};
|
|
438
317
|
};
|
|
439
318
|
const unmarshalListFtpAccountsResponse = (data) => {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
return {
|
|
446
|
-
ftpAccounts: unmarshalArrayOfObject(data.ftp_accounts, unmarshalFtpAccount),
|
|
447
|
-
totalCount: data.total_count
|
|
448
|
-
};
|
|
319
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFtpAccountsResponse' failed as data isn't a dictionary.`);
|
|
320
|
+
return {
|
|
321
|
+
ftpAccounts: unmarshalArrayOfObject(data.ftp_accounts, unmarshalFtpAccount),
|
|
322
|
+
totalCount: data.total_count
|
|
323
|
+
};
|
|
449
324
|
};
|
|
450
325
|
const unmarshalListHostingsResponse = (data) => {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
return {
|
|
457
|
-
hostings: unmarshalArrayOfObject(data.hostings, unmarshalHostingSummary),
|
|
458
|
-
totalCount: data.total_count
|
|
459
|
-
};
|
|
326
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`);
|
|
327
|
+
return {
|
|
328
|
+
hostings: unmarshalArrayOfObject(data.hostings, unmarshalHostingSummary),
|
|
329
|
+
totalCount: data.total_count
|
|
330
|
+
};
|
|
460
331
|
};
|
|
461
332
|
const unmarshalListMailAccountsResponse = (data) => {
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
return {
|
|
468
|
-
mailAccounts: unmarshalArrayOfObject(data.mail_accounts, unmarshalMailAccount),
|
|
469
|
-
totalCount: data.total_count
|
|
470
|
-
};
|
|
333
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListMailAccountsResponse' failed as data isn't a dictionary.`);
|
|
334
|
+
return {
|
|
335
|
+
mailAccounts: unmarshalArrayOfObject(data.mail_accounts, unmarshalMailAccount),
|
|
336
|
+
totalCount: data.total_count
|
|
337
|
+
};
|
|
471
338
|
};
|
|
472
339
|
const unmarshalListOffersResponse = (data) => {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
);
|
|
488
|
-
}
|
|
489
|
-
return {
|
|
490
|
-
backupItemsCount: data.backup_items_count,
|
|
491
|
-
id: data.id,
|
|
492
|
-
percentage: data.percentage,
|
|
493
|
-
status: data.status
|
|
494
|
-
};
|
|
340
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`);
|
|
341
|
+
return {
|
|
342
|
+
offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
|
|
343
|
+
totalCount: data.total_count
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
var unmarshalProgressSummary = (data) => {
|
|
347
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`);
|
|
348
|
+
return {
|
|
349
|
+
backupItemsCount: data.backup_items_count,
|
|
350
|
+
id: data.id,
|
|
351
|
+
percentage: data.percentage,
|
|
352
|
+
status: data.status
|
|
353
|
+
};
|
|
495
354
|
};
|
|
496
355
|
const unmarshalListRecentProgressesResponse = (data) => {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
`Unmarshalling the type 'ListRecentProgressesResponse' failed as data isn't a dictionary.`
|
|
500
|
-
);
|
|
501
|
-
}
|
|
502
|
-
return {
|
|
503
|
-
progresses: unmarshalArrayOfObject(data.progresses, unmarshalProgressSummary)
|
|
504
|
-
};
|
|
356
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListRecentProgressesResponse' failed as data isn't a dictionary.`);
|
|
357
|
+
return { progresses: unmarshalArrayOfObject(data.progresses, unmarshalProgressSummary) };
|
|
505
358
|
};
|
|
506
359
|
const unmarshalListWebsitesResponse = (data) => {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return {
|
|
513
|
-
totalCount: data.total_count,
|
|
514
|
-
websites: unmarshalArrayOfObject(data.websites, unmarshalWebsite)
|
|
515
|
-
};
|
|
360
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListWebsitesResponse' failed as data isn't a dictionary.`);
|
|
361
|
+
return {
|
|
362
|
+
totalCount: data.total_count,
|
|
363
|
+
websites: unmarshalArrayOfObject(data.websites, unmarshalWebsite)
|
|
364
|
+
};
|
|
516
365
|
};
|
|
517
366
|
const unmarshalProgress = (data) => {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
id: data.id,
|
|
526
|
-
percentage: data.percentage,
|
|
527
|
-
status: data.status
|
|
528
|
-
};
|
|
367
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Progress' failed as data isn't a dictionary.`);
|
|
368
|
+
return {
|
|
369
|
+
backupItemGroups: unmarshalArrayOfObject(data.backup_item_groups, unmarshalBackupItemGroup),
|
|
370
|
+
id: data.id,
|
|
371
|
+
percentage: data.percentage,
|
|
372
|
+
status: data.status
|
|
373
|
+
};
|
|
529
374
|
};
|
|
530
375
|
const unmarshalResetHostingPasswordResponse = (data) => {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
return {
|
|
537
|
-
oneTimePassword: data.one_time_password,
|
|
538
|
-
oneTimePasswordB64: data.one_time_password_b64
|
|
539
|
-
};
|
|
376
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ResetHostingPasswordResponse' failed as data isn't a dictionary.`);
|
|
377
|
+
return {
|
|
378
|
+
oneTimePassword: data.one_time_password,
|
|
379
|
+
oneTimePasswordB64: data.one_time_password_b64
|
|
380
|
+
};
|
|
540
381
|
};
|
|
541
382
|
const unmarshalResourceSummary = (data) => {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
ftpAccountsCount: data.ftp_accounts_count,
|
|
550
|
-
mailAccountsCount: data.mail_accounts_count,
|
|
551
|
-
websitesCount: data.websites_count
|
|
552
|
-
};
|
|
383
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ResourceSummary' failed as data isn't a dictionary.`);
|
|
384
|
+
return {
|
|
385
|
+
databasesCount: data.databases_count,
|
|
386
|
+
ftpAccountsCount: data.ftp_accounts_count,
|
|
387
|
+
mailAccountsCount: data.mail_accounts_count,
|
|
388
|
+
websitesCount: data.websites_count
|
|
389
|
+
};
|
|
553
390
|
};
|
|
554
391
|
const unmarshalRestoreBackupItemsResponse = (data) => {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
`Unmarshalling the type 'RestoreBackupItemsResponse' failed as data isn't a dictionary.`
|
|
558
|
-
);
|
|
559
|
-
}
|
|
560
|
-
return {
|
|
561
|
-
progressId: data.progress_id
|
|
562
|
-
};
|
|
392
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RestoreBackupItemsResponse' failed as data isn't a dictionary.`);
|
|
393
|
+
return { progressId: data.progress_id };
|
|
563
394
|
};
|
|
564
395
|
const unmarshalRestoreBackupResponse = (data) => {
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
);
|
|
579
|
-
}
|
|
580
|
-
return {
|
|
581
|
-
availableActions: data.available_actions,
|
|
582
|
-
canCreateHosting: data.can_create_hosting,
|
|
583
|
-
name: data.name,
|
|
584
|
-
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
585
|
-
status: data.status,
|
|
586
|
-
zoneName: data.zone_name
|
|
587
|
-
};
|
|
396
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'RestoreBackupResponse' failed as data isn't a dictionary.`);
|
|
397
|
+
return { progressId: data.progress_id };
|
|
398
|
+
};
|
|
399
|
+
var unmarshalDomainAvailability = (data) => {
|
|
400
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DomainAvailability' failed as data isn't a dictionary.`);
|
|
401
|
+
return {
|
|
402
|
+
availableActions: data.available_actions,
|
|
403
|
+
canCreateHosting: data.can_create_hosting,
|
|
404
|
+
name: data.name,
|
|
405
|
+
price: data.price ? unmarshalMoney(data.price) : void 0,
|
|
406
|
+
status: data.status,
|
|
407
|
+
zoneName: data.zone_name
|
|
408
|
+
};
|
|
588
409
|
};
|
|
589
410
|
const unmarshalSearchDomainsResponse = (data) => {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
`Unmarshalling the type 'SearchDomainsResponse' failed as data isn't a dictionary.`
|
|
593
|
-
);
|
|
594
|
-
}
|
|
595
|
-
return {
|
|
596
|
-
domainsAvailable: unmarshalArrayOfObject(data.domains_available, unmarshalDomainAvailability)
|
|
597
|
-
};
|
|
411
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SearchDomainsResponse' failed as data isn't a dictionary.`);
|
|
412
|
+
return { domainsAvailable: unmarshalArrayOfObject(data.domains_available, unmarshalDomainAvailability) };
|
|
598
413
|
};
|
|
599
414
|
const unmarshalSession = (data) => {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
const marshalBackupApiRestoreBackupItemsRequest = (request, defaults) => ({
|
|
610
|
-
item_ids: request.itemIds
|
|
611
|
-
});
|
|
612
|
-
const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({
|
|
613
|
-
username: request.username
|
|
614
|
-
});
|
|
615
|
-
const marshalDatabaseApiChangeDatabaseUserPasswordRequest = (request, defaults) => ({
|
|
616
|
-
password: request.password
|
|
617
|
-
});
|
|
618
|
-
const marshalCreateDatabaseRequestUser = (request, defaults) => ({
|
|
619
|
-
password: request.password,
|
|
620
|
-
username: request.username
|
|
415
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Session' failed as data isn't a dictionary.`);
|
|
416
|
+
return { url: data.url };
|
|
417
|
+
};
|
|
418
|
+
const marshalBackupApiRestoreBackupItemsRequest = (request, defaults) => ({ item_ids: request.itemIds });
|
|
419
|
+
const marshalDatabaseApiAssignDatabaseUserRequest = (request, defaults) => ({ username: request.username });
|
|
420
|
+
const marshalDatabaseApiChangeDatabaseUserPasswordRequest = (request, defaults) => ({ password: request.password });
|
|
421
|
+
var marshalCreateDatabaseRequestUser = (request, defaults) => ({
|
|
422
|
+
password: request.password,
|
|
423
|
+
username: request.username
|
|
621
424
|
});
|
|
622
425
|
const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
value: request.existingUsername
|
|
632
|
-
}
|
|
633
|
-
])
|
|
426
|
+
database_name: request.databaseName,
|
|
427
|
+
...resolveOneOf([{
|
|
428
|
+
param: "new_user",
|
|
429
|
+
value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser, defaults) : void 0
|
|
430
|
+
}, {
|
|
431
|
+
param: "existing_username",
|
|
432
|
+
value: request.existingUsername
|
|
433
|
+
}])
|
|
634
434
|
});
|
|
635
435
|
const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
|
|
636
|
-
|
|
637
|
-
|
|
436
|
+
password: request.password,
|
|
437
|
+
username: request.username
|
|
638
438
|
});
|
|
639
|
-
const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
|
|
640
|
-
|
|
439
|
+
const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({ username: request.username });
|
|
440
|
+
const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({ project_id: request.projectId ?? defaults.defaultProjectId });
|
|
441
|
+
var marshalAutoConfigDomainDns = (request, defaults) => ({
|
|
442
|
+
all_records: request.allRecords,
|
|
443
|
+
mail_records: request.mailRecords,
|
|
444
|
+
nameservers: request.nameservers,
|
|
445
|
+
none: request.none,
|
|
446
|
+
web_records: request.webRecords
|
|
641
447
|
});
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
const marshalAutoConfigDomainDns = (request, defaults) => ({
|
|
646
|
-
all_records: request.allRecords,
|
|
647
|
-
mail_records: request.mailRecords,
|
|
648
|
-
nameservers: request.nameservers,
|
|
649
|
-
none: request.none,
|
|
650
|
-
web_records: request.webRecords
|
|
651
|
-
});
|
|
652
|
-
const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
|
|
653
|
-
name: request.name,
|
|
654
|
-
type: request.type
|
|
448
|
+
var marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
|
|
449
|
+
name: request.name,
|
|
450
|
+
type: request.type
|
|
655
451
|
});
|
|
656
452
|
const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
453
|
+
auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns, defaults) : void 0,
|
|
454
|
+
custom_records: request.customRecords !== void 0 ? request.customRecords.map((elt) => marshalSyncDomainDnsRecordsRequestRecord(elt, defaults)) : void 0,
|
|
455
|
+
update_all_records: request.updateAllRecords,
|
|
456
|
+
update_mail_records: request.updateMailRecords,
|
|
457
|
+
update_nameservers: request.updateNameservers,
|
|
458
|
+
update_web_records: request.updateWebRecords
|
|
663
459
|
});
|
|
664
460
|
const marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = (request, defaults) => ({
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
});
|
|
668
|
-
const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
|
|
669
|
-
password: request.password
|
|
461
|
+
root_domain: request.rootDomain,
|
|
462
|
+
slug: request.slug
|
|
670
463
|
});
|
|
464
|
+
const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({ password: request.password });
|
|
671
465
|
const marshalFtpAccountApiCreateFtpAccountRequest = (request, defaults) => ({
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
466
|
+
password: request.password,
|
|
467
|
+
path: request.path,
|
|
468
|
+
username: request.username
|
|
675
469
|
});
|
|
676
|
-
const marshalHostingApiAddCustomDomainRequest = (request, defaults) => ({
|
|
677
|
-
|
|
470
|
+
const marshalHostingApiAddCustomDomainRequest = (request, defaults) => ({ domain_name: request.domainName });
|
|
471
|
+
var marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
|
|
472
|
+
update_all_records: request.updateAllRecords,
|
|
473
|
+
update_mail_record: request.updateMailRecord,
|
|
474
|
+
update_nameservers: request.updateNameservers,
|
|
475
|
+
update_web_record: request.updateWebRecord
|
|
678
476
|
});
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
update_nameservers: request.updateNameservers,
|
|
683
|
-
update_web_record: request.updateWebRecord
|
|
684
|
-
});
|
|
685
|
-
const marshalOfferOptionRequest = (request, defaults) => ({
|
|
686
|
-
id: request.id,
|
|
687
|
-
quantity: request.quantity
|
|
477
|
+
var marshalOfferOptionRequest = (request, defaults) => ({
|
|
478
|
+
id: request.id,
|
|
479
|
+
quantity: request.quantity
|
|
688
480
|
});
|
|
689
481
|
const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
});
|
|
702
|
-
const marshalHostingApiDeleteHostingDomainsRequest = (request, defaults) => ({
|
|
703
|
-
domains: request.domains
|
|
482
|
+
auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns, defaults) : void 0,
|
|
483
|
+
domain: request.domain,
|
|
484
|
+
domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(request.domainConfiguration, defaults) : void 0,
|
|
485
|
+
email: request.email,
|
|
486
|
+
language: request.language,
|
|
487
|
+
offer_id: request.offerId,
|
|
488
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt, defaults)) : void 0,
|
|
489
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
490
|
+
skip_welcome_email: request.skipWelcomeEmail,
|
|
491
|
+
subdomain: request.subdomain,
|
|
492
|
+
tags: request.tags
|
|
704
493
|
});
|
|
494
|
+
const marshalHostingApiDeleteHostingDomainsRequest = (request, defaults) => ({ domains: request.domains });
|
|
705
495
|
const marshalHostingApiMigrateControlPanelRequest = (request, defaults) => ({
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
});
|
|
709
|
-
const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({
|
|
710
|
-
domain_name: request.domainName
|
|
711
|
-
});
|
|
712
|
-
const marshalHostingApiUpdateHostingFreeDomainRequest = (request, defaults) => ({
|
|
713
|
-
free_domain: request.freeDomain
|
|
496
|
+
control_panel_name: request.controlPanelName,
|
|
497
|
+
offer_id: request.offerId
|
|
714
498
|
});
|
|
499
|
+
const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({ domain_name: request.domainName });
|
|
500
|
+
const marshalHostingApiUpdateHostingFreeDomainRequest = (request, defaults) => ({ free_domain: request.freeDomain });
|
|
715
501
|
const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
502
|
+
email: request.email,
|
|
503
|
+
offer_id: request.offerId,
|
|
504
|
+
offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt, defaults)) : void 0,
|
|
505
|
+
protected: request.protected,
|
|
506
|
+
tags: request.tags
|
|
721
507
|
});
|
|
722
508
|
const marshalMailAccountApiChangeMailAccountPasswordRequest = (request, defaults) => ({
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
509
|
+
domain: request.domain,
|
|
510
|
+
password: request.password,
|
|
511
|
+
username: request.username
|
|
726
512
|
});
|
|
727
513
|
const marshalMailAccountApiCreateMailAccountRequest = (request, defaults) => ({
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
514
|
+
domain: request.domain,
|
|
515
|
+
password: request.password,
|
|
516
|
+
username: request.username
|
|
731
517
|
});
|
|
732
518
|
const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
});
|
|
736
|
-
const marshalWebsiteApiCreateWebsiteRequest = (request, defaults) => ({
|
|
737
|
-
domain_name: request.domainName
|
|
519
|
+
domain: request.domain,
|
|
520
|
+
username: request.username
|
|
738
521
|
});
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
marshalDatabaseApiAssignDatabaseUserRequest,
|
|
742
|
-
marshalDatabaseApiChangeDatabaseUserPasswordRequest,
|
|
743
|
-
marshalDatabaseApiCreateDatabaseRequest,
|
|
744
|
-
marshalDatabaseApiCreateDatabaseUserRequest,
|
|
745
|
-
marshalDatabaseApiUnassignDatabaseUserRequest,
|
|
746
|
-
marshalDnsApiCheckUserOwnsDomainRequest,
|
|
747
|
-
marshalDnsApiSyncDomainDnsRecordsRequest,
|
|
748
|
-
marshalFreeDomainApiCheckFreeDomainAvailabilityRequest,
|
|
749
|
-
marshalFtpAccountApiChangeFtpAccountPasswordRequest,
|
|
750
|
-
marshalFtpAccountApiCreateFtpAccountRequest,
|
|
751
|
-
marshalHostingApiAddCustomDomainRequest,
|
|
752
|
-
marshalHostingApiCreateHostingRequest,
|
|
753
|
-
marshalHostingApiDeleteHostingDomainsRequest,
|
|
754
|
-
marshalHostingApiMigrateControlPanelRequest,
|
|
755
|
-
marshalHostingApiRemoveCustomDomainRequest,
|
|
756
|
-
marshalHostingApiUpdateHostingFreeDomainRequest,
|
|
757
|
-
marshalHostingApiUpdateHostingRequest,
|
|
758
|
-
marshalMailAccountApiChangeMailAccountPasswordRequest,
|
|
759
|
-
marshalMailAccountApiCreateMailAccountRequest,
|
|
760
|
-
marshalMailAccountApiRemoveMailAccountRequest,
|
|
761
|
-
marshalWebsiteApiCreateWebsiteRequest,
|
|
762
|
-
unmarshalBackup,
|
|
763
|
-
unmarshalCheckFreeDomainAvailabilityResponse,
|
|
764
|
-
unmarshalCheckUserOwnsDomainResponse,
|
|
765
|
-
unmarshalDatabase,
|
|
766
|
-
unmarshalDatabaseUser,
|
|
767
|
-
unmarshalDnsRecords,
|
|
768
|
-
unmarshalDomain,
|
|
769
|
-
unmarshalFtpAccount,
|
|
770
|
-
unmarshalHosting,
|
|
771
|
-
unmarshalHostingSummary,
|
|
772
|
-
unmarshalListBackupItemsResponse,
|
|
773
|
-
unmarshalListBackupsResponse,
|
|
774
|
-
unmarshalListControlPanelsResponse,
|
|
775
|
-
unmarshalListDatabaseUsersResponse,
|
|
776
|
-
unmarshalListDatabasesResponse,
|
|
777
|
-
unmarshalListFreeRootDomainsResponse,
|
|
778
|
-
unmarshalListFtpAccountsResponse,
|
|
779
|
-
unmarshalListHostingsResponse,
|
|
780
|
-
unmarshalListMailAccountsResponse,
|
|
781
|
-
unmarshalListOffersResponse,
|
|
782
|
-
unmarshalListRecentProgressesResponse,
|
|
783
|
-
unmarshalListWebsitesResponse,
|
|
784
|
-
unmarshalMailAccount,
|
|
785
|
-
unmarshalProgress,
|
|
786
|
-
unmarshalResetHostingPasswordResponse,
|
|
787
|
-
unmarshalResourceSummary,
|
|
788
|
-
unmarshalRestoreBackupItemsResponse,
|
|
789
|
-
unmarshalRestoreBackupResponse,
|
|
790
|
-
unmarshalSearchDomainsResponse,
|
|
791
|
-
unmarshalSession,
|
|
792
|
-
unmarshalWebsite
|
|
793
|
-
};
|
|
522
|
+
const marshalWebsiteApiCreateWebsiteRequest = (request, defaults) => ({ domain_name: request.domainName });
|
|
523
|
+
export { 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 };
|