@scaleway/sdk-webhosting 1.4.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.
@@ -1,799 +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 unmarshalWebsite = (data) => {
122
- if (!sdkClient.isJSONObject(data)) {
123
- throw new TypeError(
124
- `Unmarshalling the type 'Website' failed as data isn't a dictionary.`
125
- );
126
- }
127
- return {
128
- domain: data.domain,
129
- path: data.path,
130
- sslStatus: data.ssl_status
131
- };
132
- };
133
- const unmarshalFreeDomain = (data) => {
134
- if (!sdkClient.isJSONObject(data)) {
135
- throw new TypeError(
136
- `Unmarshalling the type 'FreeDomain' failed as data isn't a dictionary.`
137
- );
138
- }
139
- return {
140
- rootDomain: data.root_domain,
141
- slug: data.slug
142
- };
143
- };
144
- const unmarshalCheckFreeDomainAvailabilityResponse = (data) => {
145
- if (!sdkClient.isJSONObject(data)) {
146
- throw new TypeError(
147
- `Unmarshalling the type 'CheckFreeDomainAvailabilityResponse' failed as data isn't a dictionary.`
148
- );
149
- }
150
- return {
151
- freeDomain: data.free_domain ? unmarshalFreeDomain(data.free_domain) : void 0,
152
- isAvailable: data.is_available,
153
- reason: data.reason ? data.reason : void 0
154
- };
155
- };
156
- const unmarshalCheckUserOwnsDomainResponse = (data) => {
157
- if (!sdkClient.isJSONObject(data)) {
158
- throw new TypeError(
159
- `Unmarshalling the type 'CheckUserOwnsDomainResponse' failed as data isn't a dictionary.`
160
- );
161
- }
162
- return {
163
- ownsDomain: data.owns_domain
164
- };
165
- };
166
- const unmarshalDnsRecord = (data) => {
167
- if (!sdkClient.isJSONObject(data)) {
168
- throw new TypeError(
169
- `Unmarshalling the type 'DnsRecord' failed as data isn't a dictionary.`
170
- );
171
- }
172
- return {
173
- name: data.name,
174
- priority: data.priority,
175
- rawData: data.raw_data,
176
- status: data.status,
177
- ttl: data.ttl,
178
- type: data.type,
179
- value: data.value
180
- };
181
- };
182
- const unmarshalNameserver = (data) => {
183
- if (!sdkClient.isJSONObject(data)) {
184
- throw new TypeError(
185
- `Unmarshalling the type 'Nameserver' failed as data isn't a dictionary.`
186
- );
187
- }
188
- return {
189
- hostname: data.hostname,
190
- isDefault: data.is_default,
191
- status: data.status
192
- };
193
- };
194
- const unmarshalDnsRecords = (data) => {
195
- if (!sdkClient.isJSONObject(data)) {
196
- throw new TypeError(
197
- `Unmarshalling the type 'DnsRecords' failed as data isn't a dictionary.`
198
- );
199
- }
200
- return {
201
- autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
202
- dnsConfig: data.dns_config ? data.dns_config : void 0,
203
- nameServers: sdkClient.unmarshalArrayOfObject(data.name_servers, unmarshalNameserver),
204
- records: sdkClient.unmarshalArrayOfObject(data.records, unmarshalDnsRecord),
205
- status: data.status
206
- };
207
- };
208
- const unmarshalDomain = (data) => {
209
- if (!sdkClient.isJSONObject(data)) {
210
- throw new TypeError(
211
- `Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
212
- );
213
- }
214
- return {
215
- autoConfigDomainDns: data.auto_config_domain_dns ? unmarshalAutoConfigDomainDns(data.auto_config_domain_dns) : void 0,
216
- availableActions: data.available_actions,
217
- availableDnsActions: data.available_dns_actions ? data.available_dns_actions : void 0,
218
- name: data.name,
219
- owner: data.owner,
220
- status: data.status,
221
- zoneDomainName: data.zone_domain_name
222
- };
223
- };
224
- const unmarshalPlatformControlPanelUrls = (data) => {
225
- if (!sdkClient.isJSONObject(data)) {
226
- throw new TypeError(
227
- `Unmarshalling the type 'PlatformControlPanelUrls' failed as data isn't a dictionary.`
228
- );
229
- }
230
- return {
231
- dashboard: data.dashboard,
232
- webmail: data.webmail
233
- };
234
- };
235
- const unmarshalOfferOption = (data) => {
236
- if (!sdkClient.isJSONObject(data)) {
237
- throw new TypeError(
238
- `Unmarshalling the type 'OfferOption' failed as data isn't a dictionary.`
239
- );
240
- }
241
- return {
242
- billingOperationPath: data.billing_operation_path,
243
- currentValue: data.current_value,
244
- id: data.id,
245
- maxValue: data.max_value,
246
- minValue: data.min_value,
247
- name: data.name,
248
- price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
249
- quotaWarning: data.quota_warning
250
- };
251
- };
252
- const unmarshalPlatformControlPanel = (data) => {
253
- if (!sdkClient.isJSONObject(data)) {
254
- throw new TypeError(
255
- `Unmarshalling the type 'PlatformControlPanel' failed as data isn't a dictionary.`
256
- );
257
- }
258
- return {
259
- name: data.name,
260
- urls: data.urls ? unmarshalPlatformControlPanelUrls(data.urls) : void 0
261
- };
262
- };
263
- const unmarshalHostingUser = (data) => {
264
- if (!sdkClient.isJSONObject(data)) {
265
- throw new TypeError(
266
- `Unmarshalling the type 'HostingUser' failed as data isn't a dictionary.`
267
- );
268
- }
269
- return {
270
- contactEmail: data.contact_email,
271
- oneTimePassword: data.one_time_password,
272
- oneTimePasswordB64: data.one_time_password_b64,
273
- username: data.username
274
- };
275
- };
276
- const unmarshalOffer = (data) => {
277
- if (!sdkClient.isJSONObject(data)) {
278
- throw new TypeError(
279
- `Unmarshalling the type 'Offer' failed as data isn't a dictionary.`
280
- );
281
- }
282
- return {
283
- available: data.available,
284
- billingOperationPath: data.billing_operation_path,
285
- controlPanelName: data.control_panel_name,
286
- endOfLife: data.end_of_life,
287
- id: data.id,
288
- name: data.name,
289
- options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
290
- price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
291
- quotaWarning: data.quota_warning,
292
- region: data.region
293
- };
294
- };
295
- const unmarshalPlatform = (data) => {
296
- if (!sdkClient.isJSONObject(data)) {
297
- throw new TypeError(
298
- `Unmarshalling the type 'Platform' failed as data isn't a dictionary.`
299
- );
300
- }
301
- return {
302
- controlPanel: data.control_panel ? unmarshalPlatformControlPanel(data.control_panel) : void 0,
303
- groupName: data.group_name,
304
- hostname: data.hostname,
305
- ipv4: data.ipv4,
306
- ipv6: data.ipv6,
307
- number: data.number
308
- };
309
- };
310
- const unmarshalHosting = (data) => {
311
- if (!sdkClient.isJSONObject(data)) {
312
- throw new TypeError(
313
- `Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`
314
- );
315
- }
316
- return {
317
- createdAt: sdkClient.unmarshalDate(data.created_at),
318
- dnsStatus: data.dns_status ? data.dns_status : void 0,
319
- domain: data.domain,
320
- domainInfo: data.domain_info ? unmarshalHostingDomain(data.domain_info) : void 0,
321
- domainStatus: data.domain_status ? data.domain_status : void 0,
322
- id: data.id,
323
- ipv4: data.ipv4,
324
- offer: data.offer ? unmarshalOffer(data.offer) : void 0,
325
- platform: data.platform ? unmarshalPlatform(data.platform) : void 0,
326
- projectId: data.project_id,
327
- protected: data.protected,
328
- region: data.region,
329
- status: data.status,
330
- tags: data.tags,
331
- updatedAt: sdkClient.unmarshalDate(data.updated_at),
332
- user: data.user ? unmarshalHostingUser(data.user) : void 0
333
- };
334
- };
335
- const unmarshalBackupItem = (data) => {
336
- if (!sdkClient.isJSONObject(data)) {
337
- throw new TypeError(
338
- `Unmarshalling the type 'BackupItem' failed as data isn't a dictionary.`
339
- );
340
- }
341
- return {
342
- createdAt: sdkClient.unmarshalDate(data.created_at),
343
- id: data.id,
344
- name: data.name,
345
- size: data.size,
346
- status: data.status,
347
- type: data.type
348
- };
349
- };
350
- const unmarshalBackupItemGroup = (data) => {
351
- if (!sdkClient.isJSONObject(data)) {
352
- throw new TypeError(
353
- `Unmarshalling the type 'BackupItemGroup' failed as data isn't a dictionary.`
354
- );
355
- }
356
- return {
357
- items: sdkClient.unmarshalArrayOfObject(data.items, unmarshalBackupItem),
358
- type: data.type
359
- };
360
- };
361
- const unmarshalListBackupItemsResponse = (data) => {
362
- if (!sdkClient.isJSONObject(data)) {
363
- throw new TypeError(
364
- `Unmarshalling the type 'ListBackupItemsResponse' failed as data isn't a dictionary.`
365
- );
366
- }
367
- return {
368
- groups: sdkClient.unmarshalArrayOfObject(data.groups, unmarshalBackupItemGroup),
369
- totalCount: data.total_count
370
- };
371
- };
372
- const unmarshalListBackupsResponse = (data) => {
373
- if (!sdkClient.isJSONObject(data)) {
374
- throw new TypeError(
375
- `Unmarshalling the type 'ListBackupsResponse' failed as data isn't a dictionary.`
376
- );
377
- }
378
- return {
379
- backups: sdkClient.unmarshalArrayOfObject(data.backups, unmarshalBackup),
380
- totalCount: data.total_count
381
- };
382
- };
383
- const unmarshalControlPanel = (data) => {
384
- if (!sdkClient.isJSONObject(data)) {
385
- throw new TypeError(
386
- `Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`
387
- );
388
- }
389
- return {
390
- available: data.available,
391
- availableLanguages: data.available_languages,
392
- logoUrl: data.logo_url,
393
- name: data.name
394
- };
395
- };
396
- const unmarshalListControlPanelsResponse = (data) => {
397
- if (!sdkClient.isJSONObject(data)) {
398
- throw new TypeError(
399
- `Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`
400
- );
401
- }
402
- return {
403
- controlPanels: sdkClient.unmarshalArrayOfObject(
404
- data.control_panels,
405
- unmarshalControlPanel
406
- ),
407
- totalCount: data.total_count
408
- };
409
- };
410
- const unmarshalListDatabaseUsersResponse = (data) => {
411
- if (!sdkClient.isJSONObject(data)) {
412
- throw new TypeError(
413
- `Unmarshalling the type 'ListDatabaseUsersResponse' failed as data isn't a dictionary.`
414
- );
415
- }
416
- return {
417
- totalCount: data.total_count,
418
- users: sdkClient.unmarshalArrayOfObject(data.users, unmarshalDatabaseUser)
419
- };
420
- };
421
- const unmarshalListDatabasesResponse = (data) => {
422
- if (!sdkClient.isJSONObject(data)) {
423
- throw new TypeError(
424
- `Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary.`
425
- );
426
- }
427
- return {
428
- databases: sdkClient.unmarshalArrayOfObject(data.databases, unmarshalDatabase),
429
- totalCount: data.total_count
430
- };
431
- };
432
- const unmarshalListFreeRootDomainsResponse = (data) => {
433
- if (!sdkClient.isJSONObject(data)) {
434
- throw new TypeError(
435
- `Unmarshalling the type 'ListFreeRootDomainsResponse' failed as data isn't a dictionary.`
436
- );
437
- }
438
- return {
439
- rootDomains: data.root_domains,
440
- totalCount: data.total_count
441
- };
442
- };
443
- const unmarshalListFtpAccountsResponse = (data) => {
444
- if (!sdkClient.isJSONObject(data)) {
445
- throw new TypeError(
446
- `Unmarshalling the type 'ListFtpAccountsResponse' failed as data isn't a dictionary.`
447
- );
448
- }
449
- return {
450
- ftpAccounts: sdkClient.unmarshalArrayOfObject(data.ftp_accounts, unmarshalFtpAccount),
451
- totalCount: data.total_count
452
- };
453
- };
454
- const unmarshalListHostingsResponse = (data) => {
455
- if (!sdkClient.isJSONObject(data)) {
456
- throw new TypeError(
457
- `Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`
458
- );
459
- }
460
- return {
461
- hostings: sdkClient.unmarshalArrayOfObject(data.hostings, unmarshalHostingSummary),
462
- totalCount: data.total_count
463
- };
464
- };
465
- const unmarshalListMailAccountsResponse = (data) => {
466
- if (!sdkClient.isJSONObject(data)) {
467
- throw new TypeError(
468
- `Unmarshalling the type 'ListMailAccountsResponse' failed as data isn't a dictionary.`
469
- );
470
- }
471
- return {
472
- mailAccounts: sdkClient.unmarshalArrayOfObject(
473
- data.mail_accounts,
474
- unmarshalMailAccount
475
- ),
476
- totalCount: data.total_count
477
- };
478
- };
479
- const unmarshalListOffersResponse = (data) => {
480
- if (!sdkClient.isJSONObject(data)) {
481
- throw new TypeError(
482
- `Unmarshalling the type 'ListOffersResponse' failed as data isn't a dictionary.`
483
- );
484
- }
485
- return {
486
- offers: sdkClient.unmarshalArrayOfObject(data.offers, unmarshalOffer),
487
- totalCount: data.total_count
488
- };
489
- };
490
- const unmarshalProgressSummary = (data) => {
491
- if (!sdkClient.isJSONObject(data)) {
492
- throw new TypeError(
493
- `Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`
494
- );
495
- }
496
- return {
497
- backupItemsCount: data.backup_items_count,
498
- id: data.id,
499
- percentage: data.percentage,
500
- status: data.status
501
- };
502
- };
503
- const unmarshalListRecentProgressesResponse = (data) => {
504
- if (!sdkClient.isJSONObject(data)) {
505
- throw new TypeError(
506
- `Unmarshalling the type 'ListRecentProgressesResponse' failed as data isn't a dictionary.`
507
- );
508
- }
509
- return {
510
- progresses: sdkClient.unmarshalArrayOfObject(
511
- data.progresses,
512
- unmarshalProgressSummary
513
- )
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
- const marshalWebsiteApiCreateWebsiteRequest = (request, defaults) => ({
748
- domain_name: request.domainName
749
- });
750
- exports.marshalBackupApiRestoreBackupItemsRequest = marshalBackupApiRestoreBackupItemsRequest;
751
- exports.marshalDatabaseApiAssignDatabaseUserRequest = marshalDatabaseApiAssignDatabaseUserRequest;
752
- exports.marshalDatabaseApiChangeDatabaseUserPasswordRequest = marshalDatabaseApiChangeDatabaseUserPasswordRequest;
753
- exports.marshalDatabaseApiCreateDatabaseRequest = marshalDatabaseApiCreateDatabaseRequest;
754
- exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDatabaseUserRequest;
755
- exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
756
- exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDomainRequest;
757
- exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalDnsApiSyncDomainDnsRecordsRequest;
758
- exports.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = marshalFreeDomainApiCheckFreeDomainAvailabilityRequest;
759
- exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
760
- exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
761
- exports.marshalHostingApiAddCustomDomainRequest = marshalHostingApiAddCustomDomainRequest;
762
- exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
763
- exports.marshalHostingApiRemoveCustomDomainRequest = marshalHostingApiRemoveCustomDomainRequest;
764
- exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRequest;
765
- exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
766
- exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
767
- exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
768
- exports.marshalWebsiteApiCreateWebsiteRequest = marshalWebsiteApiCreateWebsiteRequest;
769
- exports.unmarshalBackup = unmarshalBackup;
770
- exports.unmarshalCheckFreeDomainAvailabilityResponse = unmarshalCheckFreeDomainAvailabilityResponse;
771
- exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
772
- exports.unmarshalDatabase = unmarshalDatabase;
773
- exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
774
- exports.unmarshalDnsRecords = unmarshalDnsRecords;
775
- exports.unmarshalDomain = unmarshalDomain;
776
- exports.unmarshalFtpAccount = unmarshalFtpAccount;
777
- exports.unmarshalHosting = unmarshalHosting;
778
- exports.unmarshalHostingSummary = unmarshalHostingSummary;
779
- exports.unmarshalListBackupItemsResponse = unmarshalListBackupItemsResponse;
780
- exports.unmarshalListBackupsResponse = unmarshalListBackupsResponse;
781
- exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
782
- exports.unmarshalListDatabaseUsersResponse = unmarshalListDatabaseUsersResponse;
783
- exports.unmarshalListDatabasesResponse = unmarshalListDatabasesResponse;
784
- exports.unmarshalListFreeRootDomainsResponse = unmarshalListFreeRootDomainsResponse;
785
- exports.unmarshalListFtpAccountsResponse = unmarshalListFtpAccountsResponse;
786
- exports.unmarshalListHostingsResponse = unmarshalListHostingsResponse;
787
- exports.unmarshalListMailAccountsResponse = unmarshalListMailAccountsResponse;
788
- exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
789
- exports.unmarshalListRecentProgressesResponse = unmarshalListRecentProgressesResponse;
790
- exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
791
- exports.unmarshalMailAccount = unmarshalMailAccount;
792
- exports.unmarshalProgress = unmarshalProgress;
793
- exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
794
- exports.unmarshalResourceSummary = unmarshalResourceSummary;
795
- exports.unmarshalRestoreBackupItemsResponse = unmarshalRestoreBackupItemsResponse;
796
- exports.unmarshalRestoreBackupResponse = unmarshalRestoreBackupResponse;
797
- exports.unmarshalSearchDomainsResponse = unmarshalSearchDomainsResponse;
798
- exports.unmarshalSession = unmarshalSession;
799
- exports.unmarshalWebsite = unmarshalWebsite;