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