@scaleway/sdk-webhosting 2.2.1 → 2.4.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.
@@ -1,793 +1,523 @@
1
- import { resolveOneOf, isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
1
+ import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
2
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
- };
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
- if (!isJSONObject(data)) {
18
- throw new TypeError(
19
- `Unmarshalling the type 'DatabaseUser' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
29
- throw new TypeError(
30
- `Unmarshalling the type 'Database' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
40
- throw new TypeError(
41
- `Unmarshalling the type 'FtpAccount' failed as data isn't a dictionary.`
42
- );
43
- }
44
- return {
45
- path: data.path,
46
- username: data.username
47
- };
48
- };
49
- const unmarshalAutoConfigDomainDns = (data) => {
50
- if (!isJSONObject(data)) {
51
- throw new TypeError(
52
- `Unmarshalling the type 'AutoConfigDomainDns' failed as data isn't a dictionary.`
53
- );
54
- }
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,
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
- if (!isJSONObject(data)) {
89
- throw new TypeError(
90
- `Unmarshalling the type 'HostingSummary' failed as data isn't a dictionary.`
91
- );
92
- }
93
- return {
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
- };
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
- 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
- };
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
- if (!isJSONObject(data)) {
121
- throw new TypeError(
122
- `Unmarshalling the type 'Website' failed as data isn't a dictionary.`
123
- );
124
- }
125
- return {
126
- domain: data.domain,
127
- path: data.path,
128
- sslStatus: data.ssl_status
129
- };
130
- };
131
- const unmarshalFreeDomain = (data) => {
132
- if (!isJSONObject(data)) {
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
- if (!isJSONObject(data)) {
144
- throw new TypeError(
145
- `Unmarshalling the type 'CheckFreeDomainAvailabilityResponse' failed as data isn't a dictionary.`
146
- );
147
- }
148
- return {
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
- if (!isJSONObject(data)) {
156
- throw new TypeError(
157
- `Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`
158
- );
159
- }
160
- return {
161
- ownsDomain: data.owns_domain
162
- };
163
- };
164
- const unmarshalDnsRecord = (data) => {
165
- if (!isJSONObject(data)) {
166
- throw new TypeError(
167
- `Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary.`
168
- );
169
- }
170
- return {
171
- name: data.name,
172
- priority: data.priority,
173
- rawData: data.raw_data,
174
- status: data.status,
175
- ttl: data.ttl,
176
- type: data.type,
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
- if (!isJSONObject(data)) {
194
- throw new TypeError(
195
- `Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary.`
196
- );
197
- }
198
- return {
199
- autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
200
- dnsConfig: data.dns_config ? data.dns_config : void 0,
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
- if (!isJSONObject(data)) {
208
- throw new TypeError(
209
- `Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
210
- );
211
- }
212
- return {
213
- autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
214
- availableActions: data.available_actions,
215
- availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
216
- name: data.name,
217
- owner: data.owner,
218
- status: data.status,
219
- zoneDomainName: data.zone_domain_name
220
- };
221
- };
222
- const unmarshalPlatformControlPanelUrls = (data) => {
223
- if (!isJSONObject(data)) {
224
- throw new TypeError(
225
- `Unmarshalling the type 'PlatformControlPanelUrls' failed as data isn't a dictionary.`
226
- );
227
- }
228
- return {
229
- dashboard: data.dashboard,
230
- webmail: data.webmail
231
- };
232
- };
233
- const unmarshalControlPanel = (data) => {
234
- if (!isJSONObject(data)) {
235
- throw new TypeError(
236
- `Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`
237
- );
238
- }
239
- return {
240
- available: data.available,
241
- availableLanguages: data.available_languages,
242
- logoUrl: data.logo_url,
243
- name: data.name
244
- };
245
- };
246
- const unmarshalOfferOption = (data) => {
247
- if (!isJSONObject(data)) {
248
- throw new TypeError(
249
- `Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`
250
- );
251
- }
252
- return {
253
- billingOperationPath: data.billing_operation_path,
254
- currentValue: data.current_value,
255
- id: data.id,
256
- maxValue: data.max_value,
257
- minValue: data.min_value,
258
- name: data.name,
259
- price: data.price ? unmarshalMoney(data.price) : void 0,
260
- quotaWarning: data.quota_warning
261
- };
262
- };
263
- const unmarshalPlatformControlPanel = (data) => {
264
- if (!isJSONObject(data)) {
265
- throw new TypeError(
266
- `Unmarshalling the type 'PlatformControlPanel' failed as data isn't a dictionary.`
267
- );
268
- }
269
- return {
270
- name: data.name,
271
- urls: data.urls ? unmarshalPlatformControlPanelUrls(data.urls) : void 0
272
- };
273
- };
274
- const unmarshalHostingUser = (data) => {
275
- if (!isJSONObject(data)) {
276
- throw new TypeError(
277
- `Unmarshalling the type 'HostingUser' failed as data isn't a dictionary.`
278
- );
279
- }
280
- return {
281
- contactEmail: data.contact_email,
282
- oneTimePassword: data.one_time_password,
283
- oneTimePasswordB64: data.one_time_password_b64,
284
- username: data.username
285
- };
286
- };
287
- const unmarshalOffer = (data) => {
288
- if (!isJSONObject(data)) {
289
- throw new TypeError(
290
- `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
291
- );
292
- }
293
- return {
294
- available: data.available,
295
- billingOperationPath: data.billing_operation_path,
296
- controlPanelName: data.control_panel_name,
297
- controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
298
- endOfLife: data.end_of_life,
299
- id: data.id,
300
- name: data.name,
301
- options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
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
- if (!isJSONObject(data)) {
324
- throw new TypeError(
325
- `Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`
326
- );
327
- }
328
- return {
329
- createdAt: unmarshalDate(data.created_at),
330
- dnsStatus: data.dns_status ? data.dns_status : void 0,
331
- domain: data.domain,
332
- domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
333
- domainStatus: data.domain_status ? data.domain_status : void 0,
334
- id: data.id,
335
- ipv4: data.ipv4,
336
- offer: data.offer ? unmarshalOffer(data.offer) : void 0,
337
- platform: data.platform ? unmarshalPlatform(data.platform) : void 0,
338
- projectId: data.project_id,
339
- protected: data.protected,
340
- region: data.region,
341
- status: data.status,
342
- tags: data.tags,
343
- updatedAt: unmarshalDate(data.updated_at),
344
- user: data.user ? unmarshalHostingUser(data.user) : void 0
345
- };
346
- };
347
- const unmarshalBackupItem = (data) => {
348
- if (!isJSONObject(data)) {
349
- throw new TypeError(
350
- `Unmarshalling the type 'BackupItem' failed as data isn't a dictionary.`
351
- );
352
- }
353
- return {
354
- createdAt: unmarshalDate(data.created_at),
355
- id: data.id,
356
- name: data.name,
357
- size: data.size,
358
- status: data.status,
359
- type: data.type
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
- if (!isJSONObject(data)) {
375
- throw new TypeError(
376
- `Unmarshalling the type 'ListBackupItemsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
386
- throw new TypeError(
387
- `Unmarshalling the type 'ListBackupsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
397
- throw new TypeError(
398
- `Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
408
- throw new TypeError(
409
- `Unmarshalling the type 'ListDatabaseUsersResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
419
- throw new TypeError(
420
- `Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
430
- throw new TypeError(
431
- `Unmarshalling the type 'ListFreeRootDomainsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
441
- throw new TypeError(
442
- `Unmarshalling the type 'ListFtpAccountsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
452
- throw new TypeError(
453
- `Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
463
- throw new TypeError(
464
- `Unmarshalling the type 'ListMailAccountsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
474
- throw new TypeError(
475
- `Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
476
- );
477
- }
478
- return {
479
- offers: unmarshalArrayOfObject(data.offers, unmarshalOffer),
480
- totalCount: data.total_count
481
- };
482
- };
483
- const unmarshalProgressSummary = (data) => {
484
- if (!isJSONObject(data)) {
485
- throw new TypeError(
486
- `Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
498
- throw new TypeError(
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
- if (!isJSONObject(data)) {
508
- throw new TypeError(
509
- `Unmarshalling the type 'ListWebsitesResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
519
- throw new TypeError(
520
- `Unmarshalling the type 'Progress' failed as data isn't a dictionary.`
521
- );
522
- }
523
- return {
524
- backupItemGroups: unmarshalArrayOfObject(data.backup_item_groups, unmarshalBackupItemGroup),
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
- if (!isJSONObject(data)) {
532
- throw new TypeError(
533
- `Unmarshalling the type 'ResetHostingPasswordResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
543
- throw new TypeError(
544
- `Unmarshalling the type 'ResourceSummary' failed as data isn't a dictionary.`
545
- );
546
- }
547
- return {
548
- databasesCount: data.databases_count,
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
- if (!isJSONObject(data)) {
556
- throw new TypeError(
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
- if (!isJSONObject(data)) {
566
- throw new TypeError(
567
- `Unmarshalling the type 'RestoreBackupResponse' failed as data isn't a dictionary.`
568
- );
569
- }
570
- return {
571
- progressId: data.progress_id
572
- };
573
- };
574
- const unmarshalDomainAvailability = (data) => {
575
- if (!isJSONObject(data)) {
576
- throw new TypeError(
577
- `Unmarshalling the type 'DomainAvailability' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
591
- throw new TypeError(
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
- if (!isJSONObject(data)) {
601
- throw new TypeError(
602
- `Unmarshalling the type 'Session' failed as data isn't a dictionary.`
603
- );
604
- }
605
- return {
606
- url: data.url
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
- database_name: request.databaseName,
624
- ...resolveOneOf([
625
- {
626
- param: "new_user",
627
- value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
628
- },
629
- {
630
- param: "existing_username",
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
- password: request.password,
637
- username: request.username
436
+ password: request.password,
437
+ username: request.username
638
438
  });
639
- const marshalDatabaseApiUnassignDatabaseUserRequest = (request, defaults) => ({
640
- username: request.username
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
- const marshalDnsApiCheckUserOwnsDomainRequest = (request, defaults) => ({
643
- project_id: request.projectId ?? defaults.defaultProjectId
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
- auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
658
- custom_records: request.customRecords !== void 0 ? request.customRecords.map((elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)) : void 0,
659
- update_all_records: request.updateAllRecords,
660
- update_mail_records: request.updateMailRecords,
661
- update_nameservers: request.updateNameservers,
662
- update_web_records: request.updateWebRecords
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
- root_domain: request.rootDomain,
666
- slug: request.slug
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
- password: request.password,
673
- path: request.path,
674
- username: request.username
466
+ password: request.password,
467
+ path: request.path,
468
+ username: request.username
675
469
  });
676
- const marshalHostingApiAddCustomDomainRequest = (request, defaults) => ({
677
- domain_name: request.domainName
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
- const marshalCreateHostingRequestDomainConfiguration = (request, defaults) => ({
680
- update_all_records: request.updateAllRecords,
681
- update_mail_record: request.updateMailRecord,
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
- auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
691
- domain: request.domain,
692
- domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(request.domainConfiguration) : void 0,
693
- email: request.email,
694
- language: request.language,
695
- offer_id: request.offerId,
696
- offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
697
- project_id: request.projectId ?? defaults.defaultProjectId,
698
- skip_welcome_email: request.skipWelcomeEmail,
699
- subdomain: request.subdomain,
700
- tags: request.tags
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
- control_panel_name: request.controlPanelName,
707
- offer_id: request.offerId
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
- email: request.email,
717
- offer_id: request.offerId,
718
- offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
719
- protected: request.protected,
720
- tags: request.tags
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
- domain: request.domain,
724
- password: request.password,
725
- username: request.username
509
+ domain: request.domain,
510
+ password: request.password,
511
+ username: request.username
726
512
  });
727
513
  const marshalMailAccountApiCreateMailAccountRequest = (request, defaults) => ({
728
- domain: request.domain,
729
- password: request.password,
730
- username: request.username
514
+ domain: request.domain,
515
+ password: request.password,
516
+ username: request.username
731
517
  });
732
518
  const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
733
- domain: request.domain,
734
- username: request.username
735
- });
736
- const marshalWebsiteApiCreateWebsiteRequest = (request, defaults) => ({
737
- domain_name: request.domainName
519
+ domain: request.domain,
520
+ username: request.username
738
521
  });
739
- export {
740
- marshalBackupApiRestoreBackupItemsRequest,
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 };