@scaleway/sdk-webhosting 1.2.0 → 1.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.
@@ -118,6 +118,41 @@ const unmarshalMailAccount = (data) => {
118
118
  username: data.username
119
119
  };
120
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
+ };
121
156
  const unmarshalCheckUserOwnsDomainResponse = (data) => {
122
157
  if (!sdkClient.isJSONObject(data)) {
123
158
  throw new TypeError(
@@ -253,7 +288,8 @@ const unmarshalOffer = (data) => {
253
288
  name: data.name,
254
289
  options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
255
290
  price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
256
- quotaWarning: data.quota_warning
291
+ quotaWarning: data.quota_warning,
292
+ region: data.region
257
293
  };
258
294
  };
259
295
  const unmarshalPlatform = (data) => {
@@ -393,6 +429,17 @@ const unmarshalListDatabasesResponse = (data) => {
393
429
  totalCount: data.total_count
394
430
  };
395
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
+ };
396
443
  const unmarshalListFtpAccountsResponse = (data) => {
397
444
  if (!sdkClient.isJSONObject(data)) {
398
445
  throw new TypeError(
@@ -440,16 +487,30 @@ const unmarshalListOffersResponse = (data) => {
440
487
  totalCount: data.total_count
441
488
  };
442
489
  };
443
- const unmarshalWebsite = (data) => {
490
+ const unmarshalProgressSummary = (data) => {
444
491
  if (!sdkClient.isJSONObject(data)) {
445
492
  throw new TypeError(
446
- `Unmarshalling the type 'Website' failed as data isn't a dictionary.`
493
+ `Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`
447
494
  );
448
495
  }
449
496
  return {
450
- domain: data.domain,
451
- path: data.path,
452
- sslStatus: data.ssl_status
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
+ )
453
514
  };
454
515
  };
455
516
  const unmarshalListWebsitesResponse = (data) => {
@@ -463,6 +524,22 @@ const unmarshalListWebsitesResponse = (data) => {
463
524
  websites: sdkClient.unmarshalArrayOfObject(data.websites, unmarshalWebsite)
464
525
  };
465
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
+ };
466
543
  const unmarshalResetHostingPasswordResponse = (data) => {
467
544
  if (!sdkClient.isJSONObject(data)) {
468
545
  throw new TypeError(
@@ -493,7 +570,9 @@ const unmarshalRestoreBackupItemsResponse = (data) => {
493
570
  `Unmarshalling the type 'RestoreBackupItemsResponse' failed as data isn't a dictionary.`
494
571
  );
495
572
  }
496
- return {};
573
+ return {
574
+ progressId: data.progress_id
575
+ };
497
576
  };
498
577
  const unmarshalRestoreBackupResponse = (data) => {
499
578
  if (!sdkClient.isJSONObject(data)) {
@@ -501,7 +580,9 @@ const unmarshalRestoreBackupResponse = (data) => {
501
580
  `Unmarshalling the type 'RestoreBackupResponse' failed as data isn't a dictionary.`
502
581
  );
503
582
  }
504
- return {};
583
+ return {
584
+ progressId: data.progress_id
585
+ };
505
586
  };
506
587
  const unmarshalDomainAvailability = (data) => {
507
588
  if (!sdkClient.isJSONObject(data)) {
@@ -595,6 +676,10 @@ const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
595
676
  update_nameservers: request.updateNameservers,
596
677
  update_web_records: request.updateWebRecords
597
678
  });
679
+ const marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = (request, defaults) => ({
680
+ root_domain: request.rootDomain,
681
+ slug: request.slug
682
+ });
598
683
  const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
599
684
  password: request.password
600
685
  });
@@ -633,6 +718,9 @@ const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
633
718
  subdomain: request.subdomain,
634
719
  tags: request.tags
635
720
  });
721
+ const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({
722
+ domain_name: request.domainName
723
+ });
636
724
  const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
637
725
  email: request.email,
638
726
  offer_id: request.offerId,
@@ -656,6 +744,9 @@ const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
656
744
  domain: request.domain,
657
745
  username: request.username
658
746
  });
747
+ const marshalWebsiteApiCreateWebsiteRequest = (request, defaults) => ({
748
+ domain_name: request.domainName
749
+ });
659
750
  exports.marshalBackupApiRestoreBackupItemsRequest = marshalBackupApiRestoreBackupItemsRequest;
660
751
  exports.marshalDatabaseApiAssignDatabaseUserRequest = marshalDatabaseApiAssignDatabaseUserRequest;
661
752
  exports.marshalDatabaseApiChangeDatabaseUserPasswordRequest = marshalDatabaseApiChangeDatabaseUserPasswordRequest;
@@ -664,15 +755,19 @@ exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDa
664
755
  exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
665
756
  exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDomainRequest;
666
757
  exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalDnsApiSyncDomainDnsRecordsRequest;
758
+ exports.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = marshalFreeDomainApiCheckFreeDomainAvailabilityRequest;
667
759
  exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
668
760
  exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
669
761
  exports.marshalHostingApiAddCustomDomainRequest = marshalHostingApiAddCustomDomainRequest;
670
762
  exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
763
+ exports.marshalHostingApiRemoveCustomDomainRequest = marshalHostingApiRemoveCustomDomainRequest;
671
764
  exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRequest;
672
765
  exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
673
766
  exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
674
767
  exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
768
+ exports.marshalWebsiteApiCreateWebsiteRequest = marshalWebsiteApiCreateWebsiteRequest;
675
769
  exports.unmarshalBackup = unmarshalBackup;
770
+ exports.unmarshalCheckFreeDomainAvailabilityResponse = unmarshalCheckFreeDomainAvailabilityResponse;
676
771
  exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
677
772
  exports.unmarshalDatabase = unmarshalDatabase;
678
773
  exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
@@ -686,15 +781,19 @@ exports.unmarshalListBackupsResponse = unmarshalListBackupsResponse;
686
781
  exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
687
782
  exports.unmarshalListDatabaseUsersResponse = unmarshalListDatabaseUsersResponse;
688
783
  exports.unmarshalListDatabasesResponse = unmarshalListDatabasesResponse;
784
+ exports.unmarshalListFreeRootDomainsResponse = unmarshalListFreeRootDomainsResponse;
689
785
  exports.unmarshalListFtpAccountsResponse = unmarshalListFtpAccountsResponse;
690
786
  exports.unmarshalListHostingsResponse = unmarshalListHostingsResponse;
691
787
  exports.unmarshalListMailAccountsResponse = unmarshalListMailAccountsResponse;
692
788
  exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
789
+ exports.unmarshalListRecentProgressesResponse = unmarshalListRecentProgressesResponse;
693
790
  exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
694
791
  exports.unmarshalMailAccount = unmarshalMailAccount;
792
+ exports.unmarshalProgress = unmarshalProgress;
695
793
  exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
696
794
  exports.unmarshalResourceSummary = unmarshalResourceSummary;
697
795
  exports.unmarshalRestoreBackupItemsResponse = unmarshalRestoreBackupItemsResponse;
698
796
  exports.unmarshalRestoreBackupResponse = unmarshalRestoreBackupResponse;
699
797
  exports.unmarshalSearchDomainsResponse = unmarshalSearchDomainsResponse;
700
798
  exports.unmarshalSession = unmarshalSession;
799
+ exports.unmarshalWebsite = unmarshalWebsite;
@@ -1,11 +1,13 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { Backup, BackupApiRestoreBackupItemsRequest, CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session } from './types.gen';
2
+ import type { Backup, BackupApiRestoreBackupItemsRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiRemoveCustomDomainRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiRemoveMailAccountRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, Website, WebsiteApiCreateWebsiteRequest } from './types.gen.js';
3
3
  export declare const unmarshalBackup: (data: unknown) => Backup;
4
4
  export declare const unmarshalDatabaseUser: (data: unknown) => DatabaseUser;
5
5
  export declare const unmarshalDatabase: (data: unknown) => Database;
6
6
  export declare const unmarshalFtpAccount: (data: unknown) => FtpAccount;
7
7
  export declare const unmarshalHostingSummary: (data: unknown) => HostingSummary;
8
8
  export declare const unmarshalMailAccount: (data: unknown) => MailAccount;
9
+ export declare const unmarshalWebsite: (data: unknown) => Website;
10
+ export declare const unmarshalCheckFreeDomainAvailabilityResponse: (data: unknown) => CheckFreeDomainAvailabilityResponse;
9
11
  export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
10
12
  export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
11
13
  export declare const unmarshalDomain: (data: unknown) => Domain;
@@ -15,11 +17,14 @@ export declare const unmarshalListBackupsResponse: (data: unknown) => ListBackup
15
17
  export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
16
18
  export declare const unmarshalListDatabaseUsersResponse: (data: unknown) => ListDatabaseUsersResponse;
17
19
  export declare const unmarshalListDatabasesResponse: (data: unknown) => ListDatabasesResponse;
20
+ export declare const unmarshalListFreeRootDomainsResponse: (data: unknown) => ListFreeRootDomainsResponse;
18
21
  export declare const unmarshalListFtpAccountsResponse: (data: unknown) => ListFtpAccountsResponse;
19
22
  export declare const unmarshalListHostingsResponse: (data: unknown) => ListHostingsResponse;
20
23
  export declare const unmarshalListMailAccountsResponse: (data: unknown) => ListMailAccountsResponse;
21
24
  export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
25
+ export declare const unmarshalListRecentProgressesResponse: (data: unknown) => ListRecentProgressesResponse;
22
26
  export declare const unmarshalListWebsitesResponse: (data: unknown) => ListWebsitesResponse;
27
+ export declare const unmarshalProgress: (data: unknown) => Progress;
23
28
  export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
24
29
  export declare const unmarshalResourceSummary: (data: unknown) => ResourceSummary;
25
30
  export declare const unmarshalRestoreBackupItemsResponse: (data: unknown) => RestoreBackupItemsResponse;
@@ -34,11 +39,14 @@ export declare const marshalDatabaseApiCreateDatabaseUserRequest: (request: Data
34
39
  export declare const marshalDatabaseApiUnassignDatabaseUserRequest: (request: DatabaseApiUnassignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
35
40
  export declare const marshalDnsApiCheckUserOwnsDomainRequest: (request: DnsApiCheckUserOwnsDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
36
41
  export declare const marshalDnsApiSyncDomainDnsRecordsRequest: (request: DnsApiSyncDomainDnsRecordsRequest, defaults: DefaultValues) => Record<string, unknown>;
42
+ export declare const marshalFreeDomainApiCheckFreeDomainAvailabilityRequest: (request: FreeDomainApiCheckFreeDomainAvailabilityRequest, defaults: DefaultValues) => Record<string, unknown>;
37
43
  export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (request: FtpAccountApiChangeFtpAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
38
44
  export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
39
45
  export declare const marshalHostingApiAddCustomDomainRequest: (request: HostingApiAddCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
40
46
  export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
47
+ export declare const marshalHostingApiRemoveCustomDomainRequest: (request: HostingApiRemoveCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
41
48
  export declare const marshalHostingApiUpdateHostingRequest: (request: HostingApiUpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
42
49
  export declare const marshalMailAccountApiChangeMailAccountPasswordRequest: (request: MailAccountApiChangeMailAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
43
50
  export declare const marshalMailAccountApiCreateMailAccountRequest: (request: MailAccountApiCreateMailAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
44
51
  export declare const marshalMailAccountApiRemoveMailAccountRequest: (request: MailAccountApiRemoveMailAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
52
+ export declare const marshalWebsiteApiCreateWebsiteRequest: (request: WebsiteApiCreateWebsiteRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -116,6 +116,41 @@ const unmarshalMailAccount = (data) => {
116
116
  username: data.username
117
117
  };
118
118
  };
119
+ 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
+ };
141
+ };
142
+ 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
+ };
153
+ };
119
154
  const unmarshalCheckUserOwnsDomainResponse = (data) => {
120
155
  if (!isJSONObject(data)) {
121
156
  throw new TypeError(
@@ -251,7 +286,8 @@ const unmarshalOffer = (data) => {
251
286
  name: data.name,
252
287
  options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
253
288
  price: data.price ? unmarshalMoney(data.price) : void 0,
254
- quotaWarning: data.quota_warning
289
+ quotaWarning: data.quota_warning,
290
+ region: data.region
255
291
  };
256
292
  };
257
293
  const unmarshalPlatform = (data) => {
@@ -391,6 +427,17 @@ const unmarshalListDatabasesResponse = (data) => {
391
427
  totalCount: data.total_count
392
428
  };
393
429
  };
430
+ const unmarshalListFreeRootDomainsResponse = (data) => {
431
+ if (!isJSONObject(data)) {
432
+ throw new TypeError(
433
+ `Unmarshalling the type 'ListFreeRootDomainsResponse' failed as data isn't a dictionary.`
434
+ );
435
+ }
436
+ return {
437
+ rootDomains: data.root_domains,
438
+ totalCount: data.total_count
439
+ };
440
+ };
394
441
  const unmarshalListFtpAccountsResponse = (data) => {
395
442
  if (!isJSONObject(data)) {
396
443
  throw new TypeError(
@@ -438,16 +485,30 @@ const unmarshalListOffersResponse = (data) => {
438
485
  totalCount: data.total_count
439
486
  };
440
487
  };
441
- const unmarshalWebsite = (data) => {
488
+ const unmarshalProgressSummary = (data) => {
442
489
  if (!isJSONObject(data)) {
443
490
  throw new TypeError(
444
- `Unmarshalling the type 'Website' failed as data isn't a dictionary.`
491
+ `Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`
445
492
  );
446
493
  }
447
494
  return {
448
- domain: data.domain,
449
- path: data.path,
450
- sslStatus: data.ssl_status
495
+ backupItemsCount: data.backup_items_count,
496
+ id: data.id,
497
+ percentage: data.percentage,
498
+ status: data.status
499
+ };
500
+ };
501
+ const unmarshalListRecentProgressesResponse = (data) => {
502
+ if (!isJSONObject(data)) {
503
+ throw new TypeError(
504
+ `Unmarshalling the type 'ListRecentProgressesResponse' failed as data isn't a dictionary.`
505
+ );
506
+ }
507
+ return {
508
+ progresses: unmarshalArrayOfObject(
509
+ data.progresses,
510
+ unmarshalProgressSummary
511
+ )
451
512
  };
452
513
  };
453
514
  const unmarshalListWebsitesResponse = (data) => {
@@ -461,6 +522,22 @@ const unmarshalListWebsitesResponse = (data) => {
461
522
  websites: unmarshalArrayOfObject(data.websites, unmarshalWebsite)
462
523
  };
463
524
  };
525
+ const unmarshalProgress = (data) => {
526
+ if (!isJSONObject(data)) {
527
+ throw new TypeError(
528
+ `Unmarshalling the type 'Progress' failed as data isn't a dictionary.`
529
+ );
530
+ }
531
+ return {
532
+ backupItemGroups: unmarshalArrayOfObject(
533
+ data.backup_item_groups,
534
+ unmarshalBackupItemGroup
535
+ ),
536
+ id: data.id,
537
+ percentage: data.percentage,
538
+ status: data.status
539
+ };
540
+ };
464
541
  const unmarshalResetHostingPasswordResponse = (data) => {
465
542
  if (!isJSONObject(data)) {
466
543
  throw new TypeError(
@@ -491,7 +568,9 @@ const unmarshalRestoreBackupItemsResponse = (data) => {
491
568
  `Unmarshalling the type 'RestoreBackupItemsResponse' failed as data isn't a dictionary.`
492
569
  );
493
570
  }
494
- return {};
571
+ return {
572
+ progressId: data.progress_id
573
+ };
495
574
  };
496
575
  const unmarshalRestoreBackupResponse = (data) => {
497
576
  if (!isJSONObject(data)) {
@@ -499,7 +578,9 @@ const unmarshalRestoreBackupResponse = (data) => {
499
578
  `Unmarshalling the type 'RestoreBackupResponse' failed as data isn't a dictionary.`
500
579
  );
501
580
  }
502
- return {};
581
+ return {
582
+ progressId: data.progress_id
583
+ };
503
584
  };
504
585
  const unmarshalDomainAvailability = (data) => {
505
586
  if (!isJSONObject(data)) {
@@ -593,6 +674,10 @@ const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
593
674
  update_nameservers: request.updateNameservers,
594
675
  update_web_records: request.updateWebRecords
595
676
  });
677
+ const marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = (request, defaults) => ({
678
+ root_domain: request.rootDomain,
679
+ slug: request.slug
680
+ });
596
681
  const marshalFtpAccountApiChangeFtpAccountPasswordRequest = (request, defaults) => ({
597
682
  password: request.password
598
683
  });
@@ -631,6 +716,9 @@ const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
631
716
  subdomain: request.subdomain,
632
717
  tags: request.tags
633
718
  });
719
+ const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({
720
+ domain_name: request.domainName
721
+ });
634
722
  const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
635
723
  email: request.email,
636
724
  offer_id: request.offerId,
@@ -654,6 +742,9 @@ const marshalMailAccountApiRemoveMailAccountRequest = (request, defaults) => ({
654
742
  domain: request.domain,
655
743
  username: request.username
656
744
  });
745
+ const marshalWebsiteApiCreateWebsiteRequest = (request, defaults) => ({
746
+ domain_name: request.domainName
747
+ });
657
748
  export {
658
749
  marshalBackupApiRestoreBackupItemsRequest,
659
750
  marshalDatabaseApiAssignDatabaseUserRequest,
@@ -663,15 +754,19 @@ export {
663
754
  marshalDatabaseApiUnassignDatabaseUserRequest,
664
755
  marshalDnsApiCheckUserOwnsDomainRequest,
665
756
  marshalDnsApiSyncDomainDnsRecordsRequest,
757
+ marshalFreeDomainApiCheckFreeDomainAvailabilityRequest,
666
758
  marshalFtpAccountApiChangeFtpAccountPasswordRequest,
667
759
  marshalFtpAccountApiCreateFtpAccountRequest,
668
760
  marshalHostingApiAddCustomDomainRequest,
669
761
  marshalHostingApiCreateHostingRequest,
762
+ marshalHostingApiRemoveCustomDomainRequest,
670
763
  marshalHostingApiUpdateHostingRequest,
671
764
  marshalMailAccountApiChangeMailAccountPasswordRequest,
672
765
  marshalMailAccountApiCreateMailAccountRequest,
673
766
  marshalMailAccountApiRemoveMailAccountRequest,
767
+ marshalWebsiteApiCreateWebsiteRequest,
674
768
  unmarshalBackup,
769
+ unmarshalCheckFreeDomainAvailabilityResponse,
675
770
  unmarshalCheckUserOwnsDomainResponse,
676
771
  unmarshalDatabase,
677
772
  unmarshalDatabaseUser,
@@ -685,16 +780,20 @@ export {
685
780
  unmarshalListControlPanelsResponse,
686
781
  unmarshalListDatabaseUsersResponse,
687
782
  unmarshalListDatabasesResponse,
783
+ unmarshalListFreeRootDomainsResponse,
688
784
  unmarshalListFtpAccountsResponse,
689
785
  unmarshalListHostingsResponse,
690
786
  unmarshalListMailAccountsResponse,
691
787
  unmarshalListOffersResponse,
788
+ unmarshalListRecentProgressesResponse,
692
789
  unmarshalListWebsitesResponse,
693
790
  unmarshalMailAccount,
791
+ unmarshalProgress,
694
792
  unmarshalResetHostingPasswordResponse,
695
793
  unmarshalResourceSummary,
696
794
  unmarshalRestoreBackupItemsResponse,
697
795
  unmarshalRestoreBackupResponse,
698
796
  unmarshalSearchDomainsResponse,
699
- unmarshalSession
797
+ unmarshalSession,
798
+ unmarshalWebsite
700
799
  };