@scaleway/sdk-webhosting 1.2.0 → 1.3.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.
@@ -2,4 +2,4 @@
2
2
  * This file is automatically generated
3
3
  * PLEASE DO NOT EDIT HERE
4
4
  */
5
- export * as Webhostingv1 from './v1/index.gen';
5
+ export * as Webhostingv1 from './v1/index.gen.js';
@@ -113,6 +113,32 @@ class BackupAPI extends sdkClient.API {
113
113
  },
114
114
  marshalling_gen.unmarshalRestoreBackupItemsResponse
115
115
  );
116
+ /**
117
+ * Retrieve detailed information about a specific progress by its ID.. Retrieve detailed information about a specific progress by its ID.
118
+ *
119
+ * @param request - The request {@link BackupApiGetProgressRequest}
120
+ * @returns A Promise of Progress
121
+ */
122
+ getProgress = (request) => this.client.fetch(
123
+ {
124
+ method: "GET",
125
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/progresses/${sdkClient.validatePathParam("progressId", request.progressId)}`
126
+ },
127
+ marshalling_gen.unmarshalProgress
128
+ );
129
+ /**
130
+ * List recent progresses associated with a specific backup, grouped by type.. List recent progresses associated with a specific backup, grouped by type.
131
+ *
132
+ * @param request - The request {@link BackupApiListRecentProgressesRequest}
133
+ * @returns A Promise of ListRecentProgressesResponse
134
+ */
135
+ listRecentProgresses = (request) => this.client.fetch(
136
+ {
137
+ method: "GET",
138
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/progresses`
139
+ },
140
+ marshalling_gen.unmarshalListRecentProgressesResponse
141
+ );
116
142
  }
117
143
  class ControlPanelAPI extends sdkClient.API {
118
144
  /**
@@ -680,7 +706,12 @@ class HostingAPI extends sdkClient.API {
680
706
  */
681
707
  removeCustomDomain = (request) => this.client.fetch(
682
708
  {
683
- body: "{}",
709
+ body: JSON.stringify(
710
+ marshalling_gen.marshalHostingApiRemoveCustomDomainRequest(
711
+ request,
712
+ this.client.settings
713
+ )
714
+ ),
684
715
  headers: jsonContentHeaders,
685
716
  method: "POST",
686
717
  path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${sdkClient.validatePathParam("hostingId", request.hostingId)}/remove-custom-domain`
@@ -688,6 +719,56 @@ class HostingAPI extends sdkClient.API {
688
719
  marshalling_gen.unmarshalHostingSummary
689
720
  );
690
721
  }
722
+ class FreeDomainAPI extends sdkClient.API {
723
+ /**
724
+ * Locality of this API.
725
+ * type ∈ {'zone','region','global','unspecified'}
726
+ */
727
+ static LOCALITY = sdkClient.toApiLocality({
728
+ regions: ["fr-par", "nl-ams", "pl-waw"]
729
+ });
730
+ /**
731
+ * Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
732
+ *
733
+ * @param request - The request {@link FreeDomainApiCheckFreeDomainAvailabilityRequest}
734
+ * @returns A Promise of CheckFreeDomainAvailabilityResponse
735
+ */
736
+ checkFreeDomainAvailability = (request) => this.client.fetch(
737
+ {
738
+ body: JSON.stringify(
739
+ marshalling_gen.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(
740
+ request,
741
+ this.client.settings
742
+ )
743
+ ),
744
+ headers: jsonContentHeaders,
745
+ method: "POST",
746
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/check-availability`
747
+ },
748
+ marshalling_gen.unmarshalCheckFreeDomainAvailabilityResponse
749
+ );
750
+ pageOfListFreeRootDomains = (request = {}) => this.client.fetch(
751
+ {
752
+ method: "GET",
753
+ path: `/webhosting/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
754
+ urlParams: sdkClient.urlParams(
755
+ ["page", request.page],
756
+ [
757
+ "page_size",
758
+ request.pageSize ?? this.client.settings.defaultPageSize
759
+ ]
760
+ )
761
+ },
762
+ marshalling_gen.unmarshalListFreeRootDomainsResponse
763
+ );
764
+ /**
765
+ * Retrieve the list of free root domains available for a Web Hosting.. Retrieve the list of free root domains available for a Web Hosting.
766
+ *
767
+ * @param request - The request {@link FreeDomainApiListFreeRootDomainsRequest}
768
+ * @returns A Promise of ListFreeRootDomainsResponse
769
+ */
770
+ listFreeRootDomains = (request = {}) => sdkClient.enrichForPagination("rootDomains", this.pageOfListFreeRootDomains, request);
771
+ }
691
772
  class FtpAccountAPI extends sdkClient.API {
692
773
  /**
693
774
  * Locality of this API.
@@ -894,6 +975,7 @@ exports.BackupAPI = BackupAPI;
894
975
  exports.ControlPanelAPI = ControlPanelAPI;
895
976
  exports.DatabaseAPI = DatabaseAPI;
896
977
  exports.DnsAPI = DnsAPI;
978
+ exports.FreeDomainAPI = FreeDomainAPI;
897
979
  exports.FtpAccountAPI = FtpAccountAPI;
898
980
  exports.HostingAPI = HostingAPI;
899
981
  exports.MailAccountAPI = MailAccountAPI;
@@ -1,6 +1,6 @@
1
- import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
2
1
  import { API as ParentAPI } from '@scaleway/sdk-client';
3
- import type { Backup, BackupApiGetBackupRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen';
2
+ import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
3
+ import type { Backup, BackupApiGetBackupRequest, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, CheckFreeDomainAvailabilityResponse, CheckUserOwnsDomainResponse, ControlPanelApiListControlPanelsRequest, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecords, Domain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabaseUsersResponse, ListDatabasesResponse, ListFreeRootDomainsResponse, ListFtpAccountsResponse, ListHostingsResponse, ListMailAccountsResponse, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, OfferApiListOffersRequest, Progress, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, WebsiteApiListWebsitesRequest } from './types.gen.js';
4
4
  /**
5
5
  * Web Hosting backup API.
6
6
 
@@ -59,6 +59,20 @@ export declare class BackupAPI extends ParentAPI {
59
59
  * @returns A Promise of RestoreBackupItemsResponse
60
60
  */
61
61
  restoreBackupItems: (request: Readonly<BackupApiRestoreBackupItemsRequest>) => Promise<RestoreBackupItemsResponse>;
62
+ /**
63
+ * Retrieve detailed information about a specific progress by its ID.. Retrieve detailed information about a specific progress by its ID.
64
+ *
65
+ * @param request - The request {@link BackupApiGetProgressRequest}
66
+ * @returns A Promise of Progress
67
+ */
68
+ getProgress: (request: Readonly<BackupApiGetProgressRequest>) => Promise<Progress>;
69
+ /**
70
+ * List recent progresses associated with a specific backup, grouped by type.. List recent progresses associated with a specific backup, grouped by type.
71
+ *
72
+ * @param request - The request {@link BackupApiListRecentProgressesRequest}
73
+ * @returns A Promise of ListRecentProgressesResponse
74
+ */
75
+ listRecentProgresses: (request: Readonly<BackupApiListRecentProgressesRequest>) => Promise<ListRecentProgressesResponse>;
62
76
  }
63
77
  /**
64
78
  * Web Hosting Control Panel API.
@@ -79,8 +93,8 @@ export declare class ControlPanelAPI extends ParentAPI {
79
93
  * @returns A Promise of ListControlPanelsResponse
80
94
  */
81
95
  listControlPanels: (request?: Readonly<ControlPanelApiListControlPanelsRequest>) => Promise<ListControlPanelsResponse> & {
82
- all: () => Promise<import("./types.gen").ControlPanel[]>;
83
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").ControlPanel[], void, void>;
96
+ all: () => Promise<import("./types.gen.js").ControlPanel[]>;
97
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").ControlPanel[], void, void>;
84
98
  };
85
99
  }
86
100
  /**
@@ -255,8 +269,8 @@ export declare class OfferAPI extends ParentAPI {
255
269
  * @returns A Promise of ListOffersResponse
256
270
  */
257
271
  listOffers: (request?: Readonly<OfferApiListOffersRequest>) => Promise<ListOffersResponse> & {
258
- all: () => Promise<import("./types.gen").Offer[]>;
259
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Offer[], void, void>;
272
+ all: () => Promise<import("./types.gen.js").Offer[]>;
273
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").Offer[], void, void>;
260
274
  };
261
275
  }
262
276
  /**
@@ -353,6 +367,36 @@ export declare class HostingAPI extends ParentAPI {
353
367
  */
354
368
  removeCustomDomain: (request: Readonly<HostingApiRemoveCustomDomainRequest>) => Promise<HostingSummary>;
355
369
  }
370
+ /**
371
+ * Web Hosting free domain API.
372
+
373
+ This API allows you to list and check a free domain's validity.
374
+ */
375
+ export declare class FreeDomainAPI extends ParentAPI {
376
+ /**
377
+ * Locality of this API.
378
+ * type ∈ {'zone','region','global','unspecified'}
379
+ */
380
+ static readonly LOCALITY: ApiLocality;
381
+ /**
382
+ * Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
383
+ *
384
+ * @param request - The request {@link FreeDomainApiCheckFreeDomainAvailabilityRequest}
385
+ * @returns A Promise of CheckFreeDomainAvailabilityResponse
386
+ */
387
+ checkFreeDomainAvailability: (request: Readonly<FreeDomainApiCheckFreeDomainAvailabilityRequest>) => Promise<CheckFreeDomainAvailabilityResponse>;
388
+ protected pageOfListFreeRootDomains: (request?: Readonly<FreeDomainApiListFreeRootDomainsRequest>) => Promise<ListFreeRootDomainsResponse>;
389
+ /**
390
+ * Retrieve the list of free root domains available for a Web Hosting.. Retrieve the list of free root domains available for a Web Hosting.
391
+ *
392
+ * @param request - The request {@link FreeDomainApiListFreeRootDomainsRequest}
393
+ * @returns A Promise of ListFreeRootDomainsResponse
394
+ */
395
+ listFreeRootDomains: (request?: Readonly<FreeDomainApiListFreeRootDomainsRequest>) => Promise<ListFreeRootDomainsResponse> & {
396
+ all: () => Promise<string[]>;
397
+ [Symbol.asyncIterator]: () => AsyncGenerator<string[], void, void>;
398
+ };
399
+ }
356
400
  /**
357
401
  * Web Hosting FTP Account API.
358
402
 
@@ -454,7 +498,7 @@ export declare class WebsiteAPI extends ParentAPI {
454
498
  * @returns A Promise of ListWebsitesResponse
455
499
  */
456
500
  listWebsites: (request: Readonly<WebsiteApiListWebsitesRequest>) => Promise<ListWebsitesResponse> & {
457
- all: () => Promise<import("./types.gen").Website[]>;
458
- [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").Website[], void, void>;
501
+ all: () => Promise<import("./types.gen.js").Website[]>;
502
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").Website[], void, void>;
459
503
  };
460
504
  }
@@ -1,6 +1,6 @@
1
1
  import { API, toApiLocality, urlParams, validatePathParam, enrichForPagination, waitForResource } from "@scaleway/sdk-client";
2
2
  import { BACKUP_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
3
- import { unmarshalListBackupsResponse, unmarshalBackup, unmarshalRestoreBackupResponse, unmarshalListBackupItemsResponse, marshalBackupApiRestoreBackupItemsRequest, unmarshalRestoreBackupItemsResponse, unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalSearchDomainsResponse, unmarshalDomain, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalHostingApiAddCustomDomainRequest, unmarshalHostingSummary, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
3
+ import { unmarshalListBackupsResponse, unmarshalBackup, unmarshalRestoreBackupResponse, unmarshalListBackupItemsResponse, marshalBackupApiRestoreBackupItemsRequest, unmarshalRestoreBackupItemsResponse, unmarshalProgress, unmarshalListRecentProgressesResponse, unmarshalListControlPanelsResponse, marshalDatabaseApiCreateDatabaseRequest, unmarshalDatabase, unmarshalListDatabasesResponse, marshalDatabaseApiCreateDatabaseUserRequest, unmarshalDatabaseUser, unmarshalListDatabaseUsersResponse, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, unmarshalDnsRecords, marshalDnsApiCheckUserOwnsDomainRequest, unmarshalCheckUserOwnsDomainResponse, marshalDnsApiSyncDomainDnsRecordsRequest, unmarshalSearchDomainsResponse, unmarshalDomain, unmarshalListOffersResponse, marshalHostingApiCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalHostingApiUpdateHostingRequest, unmarshalSession, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, marshalHostingApiAddCustomDomainRequest, unmarshalHostingSummary, marshalHostingApiRemoveCustomDomainRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalListFreeRootDomainsResponse, marshalFtpAccountApiCreateFtpAccountRequest, unmarshalFtpAccount, unmarshalListFtpAccountsResponse, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, unmarshalMailAccount, unmarshalListMailAccountsResponse, marshalMailAccountApiRemoveMailAccountRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, unmarshalListWebsitesResponse } from "./marshalling.gen.js";
4
4
  const jsonContentHeaders = {
5
5
  "Content-Type": "application/json; charset=utf-8"
6
6
  };
@@ -111,6 +111,32 @@ class BackupAPI extends API {
111
111
  },
112
112
  unmarshalRestoreBackupItemsResponse
113
113
  );
114
+ /**
115
+ * Retrieve detailed information about a specific progress by its ID.. Retrieve detailed information about a specific progress by its ID.
116
+ *
117
+ * @param request - The request {@link BackupApiGetProgressRequest}
118
+ * @returns A Promise of Progress
119
+ */
120
+ getProgress = (request) => this.client.fetch(
121
+ {
122
+ method: "GET",
123
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/progresses/${validatePathParam("progressId", request.progressId)}`
124
+ },
125
+ unmarshalProgress
126
+ );
127
+ /**
128
+ * List recent progresses associated with a specific backup, grouped by type.. List recent progresses associated with a specific backup, grouped by type.
129
+ *
130
+ * @param request - The request {@link BackupApiListRecentProgressesRequest}
131
+ * @returns A Promise of ListRecentProgressesResponse
132
+ */
133
+ listRecentProgresses = (request) => this.client.fetch(
134
+ {
135
+ method: "GET",
136
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/progresses`
137
+ },
138
+ unmarshalListRecentProgressesResponse
139
+ );
114
140
  }
115
141
  class ControlPanelAPI extends API {
116
142
  /**
@@ -678,7 +704,12 @@ class HostingAPI extends API {
678
704
  */
679
705
  removeCustomDomain = (request) => this.client.fetch(
680
706
  {
681
- body: "{}",
707
+ body: JSON.stringify(
708
+ marshalHostingApiRemoveCustomDomainRequest(
709
+ request,
710
+ this.client.settings
711
+ )
712
+ ),
682
713
  headers: jsonContentHeaders,
683
714
  method: "POST",
684
715
  path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/hostings/${validatePathParam("hostingId", request.hostingId)}/remove-custom-domain`
@@ -686,6 +717,56 @@ class HostingAPI extends API {
686
717
  unmarshalHostingSummary
687
718
  );
688
719
  }
720
+ class FreeDomainAPI extends API {
721
+ /**
722
+ * Locality of this API.
723
+ * type ∈ {'zone','region','global','unspecified'}
724
+ */
725
+ static LOCALITY = toApiLocality({
726
+ regions: ["fr-par", "nl-ams", "pl-waw"]
727
+ });
728
+ /**
729
+ * Check whether a given slug and free domain combination is available.. Check whether a given slug and free domain combination is available.
730
+ *
731
+ * @param request - The request {@link FreeDomainApiCheckFreeDomainAvailabilityRequest}
732
+ * @returns A Promise of CheckFreeDomainAvailabilityResponse
733
+ */
734
+ checkFreeDomainAvailability = (request) => this.client.fetch(
735
+ {
736
+ body: JSON.stringify(
737
+ marshalFreeDomainApiCheckFreeDomainAvailabilityRequest(
738
+ request,
739
+ this.client.settings
740
+ )
741
+ ),
742
+ headers: jsonContentHeaders,
743
+ method: "POST",
744
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/check-availability`
745
+ },
746
+ unmarshalCheckFreeDomainAvailabilityResponse
747
+ );
748
+ pageOfListFreeRootDomains = (request = {}) => this.client.fetch(
749
+ {
750
+ method: "GET",
751
+ path: `/webhosting/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/free-domains/root-domains`,
752
+ urlParams: urlParams(
753
+ ["page", request.page],
754
+ [
755
+ "page_size",
756
+ request.pageSize ?? this.client.settings.defaultPageSize
757
+ ]
758
+ )
759
+ },
760
+ unmarshalListFreeRootDomainsResponse
761
+ );
762
+ /**
763
+ * Retrieve the list of free root domains available for a Web Hosting.. Retrieve the list of free root domains available for a Web Hosting.
764
+ *
765
+ * @param request - The request {@link FreeDomainApiListFreeRootDomainsRequest}
766
+ * @returns A Promise of ListFreeRootDomainsResponse
767
+ */
768
+ listFreeRootDomains = (request = {}) => enrichForPagination("rootDomains", this.pageOfListFreeRootDomains, request);
769
+ }
689
770
  class FtpAccountAPI extends API {
690
771
  /**
691
772
  * Locality of this API.
@@ -893,6 +974,7 @@ export {
893
974
  ControlPanelAPI,
894
975
  DatabaseAPI,
895
976
  DnsAPI,
977
+ FreeDomainAPI,
896
978
  FtpAccountAPI,
897
979
  HostingAPI,
898
980
  MailAccountAPI,
@@ -1,4 +1,4 @@
1
- import type { BackupStatus, DomainAvailabilityStatus, DomainStatus, HostingStatus } from './types.gen';
1
+ import type { BackupStatus, DomainAvailabilityStatus, DomainStatus, HostingStatus } from './types.gen.js';
2
2
  /** Lists transient statutes of the enum {@link BackupStatus}. */
3
3
  export declare const BACKUP_TRANSIENT_STATUSES: BackupStatus[];
4
4
  /** Lists transient statutes of the enum {@link DomainAvailabilityStatus}. */
@@ -8,6 +8,7 @@ exports.BackupAPI = api_gen.BackupAPI;
8
8
  exports.ControlPanelAPI = api_gen.ControlPanelAPI;
9
9
  exports.DatabaseAPI = api_gen.DatabaseAPI;
10
10
  exports.DnsAPI = api_gen.DnsAPI;
11
+ exports.FreeDomainAPI = api_gen.FreeDomainAPI;
11
12
  exports.FtpAccountAPI = api_gen.FtpAccountAPI;
12
13
  exports.HostingAPI = api_gen.HostingAPI;
13
14
  exports.MailAccountAPI = api_gen.MailAccountAPI;
@@ -25,15 +26,18 @@ exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalling_gen.marshalDat
25
26
  exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalling_gen.marshalDatabaseApiUnassignDatabaseUserRequest;
26
27
  exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalling_gen.marshalDnsApiCheckUserOwnsDomainRequest;
27
28
  exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalling_gen.marshalDnsApiSyncDomainDnsRecordsRequest;
29
+ exports.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = marshalling_gen.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest;
28
30
  exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalling_gen.marshalFtpAccountApiChangeFtpAccountPasswordRequest;
29
31
  exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalling_gen.marshalFtpAccountApiCreateFtpAccountRequest;
30
32
  exports.marshalHostingApiAddCustomDomainRequest = marshalling_gen.marshalHostingApiAddCustomDomainRequest;
31
33
  exports.marshalHostingApiCreateHostingRequest = marshalling_gen.marshalHostingApiCreateHostingRequest;
34
+ exports.marshalHostingApiRemoveCustomDomainRequest = marshalling_gen.marshalHostingApiRemoveCustomDomainRequest;
32
35
  exports.marshalHostingApiUpdateHostingRequest = marshalling_gen.marshalHostingApiUpdateHostingRequest;
33
36
  exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalling_gen.marshalMailAccountApiChangeMailAccountPasswordRequest;
34
37
  exports.marshalMailAccountApiCreateMailAccountRequest = marshalling_gen.marshalMailAccountApiCreateMailAccountRequest;
35
38
  exports.marshalMailAccountApiRemoveMailAccountRequest = marshalling_gen.marshalMailAccountApiRemoveMailAccountRequest;
36
39
  exports.unmarshalBackup = marshalling_gen.unmarshalBackup;
40
+ exports.unmarshalCheckFreeDomainAvailabilityResponse = marshalling_gen.unmarshalCheckFreeDomainAvailabilityResponse;
37
41
  exports.unmarshalCheckUserOwnsDomainResponse = marshalling_gen.unmarshalCheckUserOwnsDomainResponse;
38
42
  exports.unmarshalDatabase = marshalling_gen.unmarshalDatabase;
39
43
  exports.unmarshalDatabaseUser = marshalling_gen.unmarshalDatabaseUser;
@@ -47,12 +51,15 @@ exports.unmarshalListBackupsResponse = marshalling_gen.unmarshalListBackupsRespo
47
51
  exports.unmarshalListControlPanelsResponse = marshalling_gen.unmarshalListControlPanelsResponse;
48
52
  exports.unmarshalListDatabaseUsersResponse = marshalling_gen.unmarshalListDatabaseUsersResponse;
49
53
  exports.unmarshalListDatabasesResponse = marshalling_gen.unmarshalListDatabasesResponse;
54
+ exports.unmarshalListFreeRootDomainsResponse = marshalling_gen.unmarshalListFreeRootDomainsResponse;
50
55
  exports.unmarshalListFtpAccountsResponse = marshalling_gen.unmarshalListFtpAccountsResponse;
51
56
  exports.unmarshalListHostingsResponse = marshalling_gen.unmarshalListHostingsResponse;
52
57
  exports.unmarshalListMailAccountsResponse = marshalling_gen.unmarshalListMailAccountsResponse;
53
58
  exports.unmarshalListOffersResponse = marshalling_gen.unmarshalListOffersResponse;
59
+ exports.unmarshalListRecentProgressesResponse = marshalling_gen.unmarshalListRecentProgressesResponse;
54
60
  exports.unmarshalListWebsitesResponse = marshalling_gen.unmarshalListWebsitesResponse;
55
61
  exports.unmarshalMailAccount = marshalling_gen.unmarshalMailAccount;
62
+ exports.unmarshalProgress = marshalling_gen.unmarshalProgress;
56
63
  exports.unmarshalResetHostingPasswordResponse = marshalling_gen.unmarshalResetHostingPasswordResponse;
57
64
  exports.unmarshalResourceSummary = marshalling_gen.unmarshalResourceSummary;
58
65
  exports.unmarshalRestoreBackupItemsResponse = marshalling_gen.unmarshalRestoreBackupItemsResponse;
@@ -1,5 +1,5 @@
1
- export { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen';
2
- export * from './content.gen';
3
- export * from './marshalling.gen';
4
- export type { AutoConfigDomainDns, Backup, BackupApiGetBackupRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, BackupItem, BackupItemGroup, BackupItemType, BackupStatus, CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecords, DnsRecordsStatus, DnsRecordType, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingDomain, HostingDomainCustomDomain, HostingStatus, HostingSummary, HostingUser, ListBackupItemsResponse, ListBackupsRequestOrderBy, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen';
5
- export * as ValidationRules from './validation-rules.gen';
1
+ export { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FreeDomainAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen.js';
2
+ export * from './content.gen.js';
3
+ export * from './marshalling.gen.js';
4
+ export type { AutoConfigDomainDns, Backup, BackupApiGetBackupRequest, BackupApiGetProgressRequest, BackupApiListBackupItemsRequest, BackupApiListBackupsRequest, BackupApiListRecentProgressesRequest, BackupApiRestoreBackupItemsRequest, BackupApiRestoreBackupRequest, BackupItem, BackupItemGroup, BackupItemType, BackupStatus, CheckFreeDomainAvailabilityResponse, CheckFreeDomainAvailabilityResponseUnavailableReason, CheckUserOwnsDomainResponse, ControlPanel, ControlPanelApiListControlPanelsRequest, CreateDatabaseRequestUser, CreateHostingRequestDomainConfiguration, Database, DatabaseApiAssignDatabaseUserRequest, DatabaseApiChangeDatabaseUserPasswordRequest, DatabaseApiCreateDatabaseRequest, DatabaseApiCreateDatabaseUserRequest, DatabaseApiDeleteDatabaseRequest, DatabaseApiDeleteDatabaseUserRequest, DatabaseApiGetDatabaseRequest, DatabaseApiGetDatabaseUserRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiListDatabasesRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecordType, DnsRecords, DnsRecordsStatus, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FreeDomain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingDomain, HostingDomainCustomDomain, HostingStatus, HostingSummary, HostingUser, ListBackupItemsResponse, ListBackupsRequestOrderBy, ListBackupsResponse, ListControlPanelsResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListFreeRootDomainsResponse, ListFtpAccountsRequestOrderBy, ListFtpAccountsResponse, ListHostingsRequestOrderBy, ListHostingsResponse, ListMailAccountsRequestOrderBy, ListMailAccountsResponse, ListOffersRequestOrderBy, ListOffersResponse, ListRecentProgressesResponse, ListWebsitesRequestOrderBy, ListWebsitesResponse, MailAccount, MailAccountApiChangeMailAccountPasswordRequest, MailAccountApiCreateMailAccountRequest, MailAccountApiListMailAccountsRequest, MailAccountApiRemoveMailAccountRequest, Nameserver, NameserverStatus, Offer, OfferApiListOffersRequest, OfferOption, OfferOptionName, OfferOptionRequest, OfferOptionWarning, Platform, PlatformControlPanel, PlatformControlPanelUrls, PlatformPlatformGroup, Progress, ProgressStatus, ProgressSummary, ResetHostingPasswordResponse, ResourceSummary, RestoreBackupItemsResponse, RestoreBackupResponse, SearchDomainsResponse, Session, SyncDomainDnsRecordsRequestRecord, Website, WebsiteApiListWebsitesRequest, } from './types.gen.js';
5
+ export * as ValidationRules from './validation-rules.gen.js';
@@ -1,6 +1,6 @@
1
- import { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI } from "./api.gen.js";
1
+ import { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FreeDomainAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI } from "./api.gen.js";
2
2
  import { BACKUP_TRANSIENT_STATUSES, DOMAIN_AVAILABILITY_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, HOSTING_TRANSIENT_STATUSES } from "./content.gen.js";
3
- import { marshalBackupApiRestoreBackupItemsRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiCreateDatabaseRequest, marshalDatabaseApiCreateDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, marshalDnsApiCheckUserOwnsDomainRequest, marshalDnsApiSyncDomainDnsRecordsRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, unmarshalBackup, unmarshalCheckUserOwnsDomainResponse, unmarshalDatabase, unmarshalDatabaseUser, unmarshalDnsRecords, unmarshalDomain, unmarshalFtpAccount, unmarshalHosting, unmarshalHostingSummary, unmarshalListBackupItemsResponse, unmarshalListBackupsResponse, unmarshalListControlPanelsResponse, unmarshalListDatabaseUsersResponse, unmarshalListDatabasesResponse, unmarshalListFtpAccountsResponse, unmarshalListHostingsResponse, unmarshalListMailAccountsResponse, unmarshalListOffersResponse, unmarshalListWebsitesResponse, unmarshalMailAccount, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, unmarshalRestoreBackupItemsResponse, unmarshalRestoreBackupResponse, unmarshalSearchDomainsResponse, unmarshalSession } from "./marshalling.gen.js";
3
+ import { marshalBackupApiRestoreBackupItemsRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiCreateDatabaseRequest, marshalDatabaseApiCreateDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, marshalDnsApiCheckUserOwnsDomainRequest, marshalDnsApiSyncDomainDnsRecordsRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, 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 } from "./marshalling.gen.js";
4
4
  import * as validationRules_gen from "./validation-rules.gen.js";
5
5
  export {
6
6
  BACKUP_TRANSIENT_STATUSES,
@@ -10,6 +10,7 @@ export {
10
10
  DOMAIN_TRANSIENT_STATUSES,
11
11
  DatabaseAPI,
12
12
  DnsAPI,
13
+ FreeDomainAPI,
13
14
  FtpAccountAPI,
14
15
  HOSTING_TRANSIENT_STATUSES,
15
16
  HostingAPI,
@@ -25,15 +26,18 @@ export {
25
26
  marshalDatabaseApiUnassignDatabaseUserRequest,
26
27
  marshalDnsApiCheckUserOwnsDomainRequest,
27
28
  marshalDnsApiSyncDomainDnsRecordsRequest,
29
+ marshalFreeDomainApiCheckFreeDomainAvailabilityRequest,
28
30
  marshalFtpAccountApiChangeFtpAccountPasswordRequest,
29
31
  marshalFtpAccountApiCreateFtpAccountRequest,
30
32
  marshalHostingApiAddCustomDomainRequest,
31
33
  marshalHostingApiCreateHostingRequest,
34
+ marshalHostingApiRemoveCustomDomainRequest,
32
35
  marshalHostingApiUpdateHostingRequest,
33
36
  marshalMailAccountApiChangeMailAccountPasswordRequest,
34
37
  marshalMailAccountApiCreateMailAccountRequest,
35
38
  marshalMailAccountApiRemoveMailAccountRequest,
36
39
  unmarshalBackup,
40
+ unmarshalCheckFreeDomainAvailabilityResponse,
37
41
  unmarshalCheckUserOwnsDomainResponse,
38
42
  unmarshalDatabase,
39
43
  unmarshalDatabaseUser,
@@ -47,12 +51,15 @@ export {
47
51
  unmarshalListControlPanelsResponse,
48
52
  unmarshalListDatabaseUsersResponse,
49
53
  unmarshalListDatabasesResponse,
54
+ unmarshalListFreeRootDomainsResponse,
50
55
  unmarshalListFtpAccountsResponse,
51
56
  unmarshalListHostingsResponse,
52
57
  unmarshalListMailAccountsResponse,
53
58
  unmarshalListOffersResponse,
59
+ unmarshalListRecentProgressesResponse,
54
60
  unmarshalListWebsitesResponse,
55
61
  unmarshalMailAccount,
62
+ unmarshalProgress,
56
63
  unmarshalResetHostingPasswordResponse,
57
64
  unmarshalResourceSummary,
58
65
  unmarshalRestoreBackupItemsResponse,
@@ -118,6 +118,29 @@ const unmarshalMailAccount = (data) => {
118
118
  username: data.username
119
119
  };
120
120
  };
121
+ const unmarshalFreeDomain = (data) => {
122
+ if (!sdkClient.isJSONObject(data)) {
123
+ throw new TypeError(
124
+ `Unmarshalling the type 'FreeDomain' failed as data isn't a dictionary.`
125
+ );
126
+ }
127
+ return {
128
+ rootDomain: data.root_domain,
129
+ slug: data.slug
130
+ };
131
+ };
132
+ const unmarshalCheckFreeDomainAvailabilityResponse = (data) => {
133
+ if (!sdkClient.isJSONObject(data)) {
134
+ throw new TypeError(
135
+ `Unmarshalling the type 'CheckFreeDomainAvailabilityResponse' failed as data isn't a dictionary.`
136
+ );
137
+ }
138
+ return {
139
+ freeDomain: data.free_domain ? unmarshalFreeDomain(data.free_domain) : void 0,
140
+ isAvailable: data.is_available,
141
+ reason: data.reason ? data.reason : void 0
142
+ };
143
+ };
121
144
  const unmarshalCheckUserOwnsDomainResponse = (data) => {
122
145
  if (!sdkClient.isJSONObject(data)) {
123
146
  throw new TypeError(
@@ -253,7 +276,8 @@ const unmarshalOffer = (data) => {
253
276
  name: data.name,
254
277
  options: sdkClient.unmarshalArrayOfObject(data.options, unmarshalOfferOption),
255
278
  price: data.price ? sdkClient.unmarshalMoney(data.price) : void 0,
256
- quotaWarning: data.quota_warning
279
+ quotaWarning: data.quota_warning,
280
+ region: data.region
257
281
  };
258
282
  };
259
283
  const unmarshalPlatform = (data) => {
@@ -393,6 +417,17 @@ const unmarshalListDatabasesResponse = (data) => {
393
417
  totalCount: data.total_count
394
418
  };
395
419
  };
420
+ const unmarshalListFreeRootDomainsResponse = (data) => {
421
+ if (!sdkClient.isJSONObject(data)) {
422
+ throw new TypeError(
423
+ `Unmarshalling the type 'ListFreeRootDomainsResponse' failed as data isn't a dictionary.`
424
+ );
425
+ }
426
+ return {
427
+ rootDomains: data.root_domains,
428
+ totalCount: data.total_count
429
+ };
430
+ };
396
431
  const unmarshalListFtpAccountsResponse = (data) => {
397
432
  if (!sdkClient.isJSONObject(data)) {
398
433
  throw new TypeError(
@@ -440,6 +475,32 @@ const unmarshalListOffersResponse = (data) => {
440
475
  totalCount: data.total_count
441
476
  };
442
477
  };
478
+ const unmarshalProgressSummary = (data) => {
479
+ if (!sdkClient.isJSONObject(data)) {
480
+ throw new TypeError(
481
+ `Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`
482
+ );
483
+ }
484
+ return {
485
+ backupItemsCount: data.backup_items_count,
486
+ id: data.id,
487
+ percentage: data.percentage,
488
+ status: data.status
489
+ };
490
+ };
491
+ const unmarshalListRecentProgressesResponse = (data) => {
492
+ if (!sdkClient.isJSONObject(data)) {
493
+ throw new TypeError(
494
+ `Unmarshalling the type 'ListRecentProgressesResponse' failed as data isn't a dictionary.`
495
+ );
496
+ }
497
+ return {
498
+ progresses: sdkClient.unmarshalArrayOfObject(
499
+ data.progresses,
500
+ unmarshalProgressSummary
501
+ )
502
+ };
503
+ };
443
504
  const unmarshalWebsite = (data) => {
444
505
  if (!sdkClient.isJSONObject(data)) {
445
506
  throw new TypeError(
@@ -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,
@@ -664,15 +752,18 @@ exports.marshalDatabaseApiCreateDatabaseUserRequest = marshalDatabaseApiCreateDa
664
752
  exports.marshalDatabaseApiUnassignDatabaseUserRequest = marshalDatabaseApiUnassignDatabaseUserRequest;
665
753
  exports.marshalDnsApiCheckUserOwnsDomainRequest = marshalDnsApiCheckUserOwnsDomainRequest;
666
754
  exports.marshalDnsApiSyncDomainDnsRecordsRequest = marshalDnsApiSyncDomainDnsRecordsRequest;
755
+ exports.marshalFreeDomainApiCheckFreeDomainAvailabilityRequest = marshalFreeDomainApiCheckFreeDomainAvailabilityRequest;
667
756
  exports.marshalFtpAccountApiChangeFtpAccountPasswordRequest = marshalFtpAccountApiChangeFtpAccountPasswordRequest;
668
757
  exports.marshalFtpAccountApiCreateFtpAccountRequest = marshalFtpAccountApiCreateFtpAccountRequest;
669
758
  exports.marshalHostingApiAddCustomDomainRequest = marshalHostingApiAddCustomDomainRequest;
670
759
  exports.marshalHostingApiCreateHostingRequest = marshalHostingApiCreateHostingRequest;
760
+ exports.marshalHostingApiRemoveCustomDomainRequest = marshalHostingApiRemoveCustomDomainRequest;
671
761
  exports.marshalHostingApiUpdateHostingRequest = marshalHostingApiUpdateHostingRequest;
672
762
  exports.marshalMailAccountApiChangeMailAccountPasswordRequest = marshalMailAccountApiChangeMailAccountPasswordRequest;
673
763
  exports.marshalMailAccountApiCreateMailAccountRequest = marshalMailAccountApiCreateMailAccountRequest;
674
764
  exports.marshalMailAccountApiRemoveMailAccountRequest = marshalMailAccountApiRemoveMailAccountRequest;
675
765
  exports.unmarshalBackup = unmarshalBackup;
766
+ exports.unmarshalCheckFreeDomainAvailabilityResponse = unmarshalCheckFreeDomainAvailabilityResponse;
676
767
  exports.unmarshalCheckUserOwnsDomainResponse = unmarshalCheckUserOwnsDomainResponse;
677
768
  exports.unmarshalDatabase = unmarshalDatabase;
678
769
  exports.unmarshalDatabaseUser = unmarshalDatabaseUser;
@@ -686,12 +777,15 @@ exports.unmarshalListBackupsResponse = unmarshalListBackupsResponse;
686
777
  exports.unmarshalListControlPanelsResponse = unmarshalListControlPanelsResponse;
687
778
  exports.unmarshalListDatabaseUsersResponse = unmarshalListDatabaseUsersResponse;
688
779
  exports.unmarshalListDatabasesResponse = unmarshalListDatabasesResponse;
780
+ exports.unmarshalListFreeRootDomainsResponse = unmarshalListFreeRootDomainsResponse;
689
781
  exports.unmarshalListFtpAccountsResponse = unmarshalListFtpAccountsResponse;
690
782
  exports.unmarshalListHostingsResponse = unmarshalListHostingsResponse;
691
783
  exports.unmarshalListMailAccountsResponse = unmarshalListMailAccountsResponse;
692
784
  exports.unmarshalListOffersResponse = unmarshalListOffersResponse;
785
+ exports.unmarshalListRecentProgressesResponse = unmarshalListRecentProgressesResponse;
693
786
  exports.unmarshalListWebsitesResponse = unmarshalListWebsitesResponse;
694
787
  exports.unmarshalMailAccount = unmarshalMailAccount;
788
+ exports.unmarshalProgress = unmarshalProgress;
695
789
  exports.unmarshalResetHostingPasswordResponse = unmarshalResetHostingPasswordResponse;
696
790
  exports.unmarshalResourceSummary = unmarshalResourceSummary;
697
791
  exports.unmarshalRestoreBackupItemsResponse = unmarshalRestoreBackupItemsResponse;
@@ -1,11 +1,12 @@
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 } 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 unmarshalCheckFreeDomainAvailabilityResponse: (data: unknown) => CheckFreeDomainAvailabilityResponse;
9
10
  export declare const unmarshalCheckUserOwnsDomainResponse: (data: unknown) => CheckUserOwnsDomainResponse;
10
11
  export declare const unmarshalDnsRecords: (data: unknown) => DnsRecords;
11
12
  export declare const unmarshalDomain: (data: unknown) => Domain;
@@ -15,11 +16,14 @@ export declare const unmarshalListBackupsResponse: (data: unknown) => ListBackup
15
16
  export declare const unmarshalListControlPanelsResponse: (data: unknown) => ListControlPanelsResponse;
16
17
  export declare const unmarshalListDatabaseUsersResponse: (data: unknown) => ListDatabaseUsersResponse;
17
18
  export declare const unmarshalListDatabasesResponse: (data: unknown) => ListDatabasesResponse;
19
+ export declare const unmarshalListFreeRootDomainsResponse: (data: unknown) => ListFreeRootDomainsResponse;
18
20
  export declare const unmarshalListFtpAccountsResponse: (data: unknown) => ListFtpAccountsResponse;
19
21
  export declare const unmarshalListHostingsResponse: (data: unknown) => ListHostingsResponse;
20
22
  export declare const unmarshalListMailAccountsResponse: (data: unknown) => ListMailAccountsResponse;
21
23
  export declare const unmarshalListOffersResponse: (data: unknown) => ListOffersResponse;
24
+ export declare const unmarshalListRecentProgressesResponse: (data: unknown) => ListRecentProgressesResponse;
22
25
  export declare const unmarshalListWebsitesResponse: (data: unknown) => ListWebsitesResponse;
26
+ export declare const unmarshalProgress: (data: unknown) => Progress;
23
27
  export declare const unmarshalResetHostingPasswordResponse: (data: unknown) => ResetHostingPasswordResponse;
24
28
  export declare const unmarshalResourceSummary: (data: unknown) => ResourceSummary;
25
29
  export declare const unmarshalRestoreBackupItemsResponse: (data: unknown) => RestoreBackupItemsResponse;
@@ -34,10 +38,12 @@ export declare const marshalDatabaseApiCreateDatabaseUserRequest: (request: Data
34
38
  export declare const marshalDatabaseApiUnassignDatabaseUserRequest: (request: DatabaseApiUnassignDatabaseUserRequest, defaults: DefaultValues) => Record<string, unknown>;
35
39
  export declare const marshalDnsApiCheckUserOwnsDomainRequest: (request: DnsApiCheckUserOwnsDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
36
40
  export declare const marshalDnsApiSyncDomainDnsRecordsRequest: (request: DnsApiSyncDomainDnsRecordsRequest, defaults: DefaultValues) => Record<string, unknown>;
41
+ export declare const marshalFreeDomainApiCheckFreeDomainAvailabilityRequest: (request: FreeDomainApiCheckFreeDomainAvailabilityRequest, defaults: DefaultValues) => Record<string, unknown>;
37
42
  export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (request: FtpAccountApiChangeFtpAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
38
43
  export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
39
44
  export declare const marshalHostingApiAddCustomDomainRequest: (request: HostingApiAddCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
40
45
  export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
46
+ export declare const marshalHostingApiRemoveCustomDomainRequest: (request: HostingApiRemoveCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
41
47
  export declare const marshalHostingApiUpdateHostingRequest: (request: HostingApiUpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
42
48
  export declare const marshalMailAccountApiChangeMailAccountPasswordRequest: (request: MailAccountApiChangeMailAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
43
49
  export declare const marshalMailAccountApiCreateMailAccountRequest: (request: MailAccountApiCreateMailAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -116,6 +116,29 @@ const unmarshalMailAccount = (data) => {
116
116
  username: data.username
117
117
  };
118
118
  };
119
+ const unmarshalFreeDomain = (data) => {
120
+ if (!isJSONObject(data)) {
121
+ throw new TypeError(
122
+ `Unmarshalling the type 'FreeDomain' failed as data isn't a dictionary.`
123
+ );
124
+ }
125
+ return {
126
+ rootDomain: data.root_domain,
127
+ slug: data.slug
128
+ };
129
+ };
130
+ const unmarshalCheckFreeDomainAvailabilityResponse = (data) => {
131
+ if (!isJSONObject(data)) {
132
+ throw new TypeError(
133
+ `Unmarshalling the type 'CheckFreeDomainAvailabilityResponse' failed as data isn't a dictionary.`
134
+ );
135
+ }
136
+ return {
137
+ freeDomain: data.free_domain ? unmarshalFreeDomain(data.free_domain) : void 0,
138
+ isAvailable: data.is_available,
139
+ reason: data.reason ? data.reason : void 0
140
+ };
141
+ };
119
142
  const unmarshalCheckUserOwnsDomainResponse = (data) => {
120
143
  if (!isJSONObject(data)) {
121
144
  throw new TypeError(
@@ -251,7 +274,8 @@ const unmarshalOffer = (data) => {
251
274
  name: data.name,
252
275
  options: unmarshalArrayOfObject(data.options, unmarshalOfferOption),
253
276
  price: data.price ? unmarshalMoney(data.price) : void 0,
254
- quotaWarning: data.quota_warning
277
+ quotaWarning: data.quota_warning,
278
+ region: data.region
255
279
  };
256
280
  };
257
281
  const unmarshalPlatform = (data) => {
@@ -391,6 +415,17 @@ const unmarshalListDatabasesResponse = (data) => {
391
415
  totalCount: data.total_count
392
416
  };
393
417
  };
418
+ const unmarshalListFreeRootDomainsResponse = (data) => {
419
+ if (!isJSONObject(data)) {
420
+ throw new TypeError(
421
+ `Unmarshalling the type 'ListFreeRootDomainsResponse' failed as data isn't a dictionary.`
422
+ );
423
+ }
424
+ return {
425
+ rootDomains: data.root_domains,
426
+ totalCount: data.total_count
427
+ };
428
+ };
394
429
  const unmarshalListFtpAccountsResponse = (data) => {
395
430
  if (!isJSONObject(data)) {
396
431
  throw new TypeError(
@@ -438,6 +473,32 @@ const unmarshalListOffersResponse = (data) => {
438
473
  totalCount: data.total_count
439
474
  };
440
475
  };
476
+ const unmarshalProgressSummary = (data) => {
477
+ if (!isJSONObject(data)) {
478
+ throw new TypeError(
479
+ `Unmarshalling the type 'ProgressSummary' failed as data isn't a dictionary.`
480
+ );
481
+ }
482
+ return {
483
+ backupItemsCount: data.backup_items_count,
484
+ id: data.id,
485
+ percentage: data.percentage,
486
+ status: data.status
487
+ };
488
+ };
489
+ const unmarshalListRecentProgressesResponse = (data) => {
490
+ if (!isJSONObject(data)) {
491
+ throw new TypeError(
492
+ `Unmarshalling the type 'ListRecentProgressesResponse' failed as data isn't a dictionary.`
493
+ );
494
+ }
495
+ return {
496
+ progresses: unmarshalArrayOfObject(
497
+ data.progresses,
498
+ unmarshalProgressSummary
499
+ )
500
+ };
501
+ };
441
502
  const unmarshalWebsite = (data) => {
442
503
  if (!isJSONObject(data)) {
443
504
  throw new TypeError(
@@ -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,
@@ -663,15 +751,18 @@ export {
663
751
  marshalDatabaseApiUnassignDatabaseUserRequest,
664
752
  marshalDnsApiCheckUserOwnsDomainRequest,
665
753
  marshalDnsApiSyncDomainDnsRecordsRequest,
754
+ marshalFreeDomainApiCheckFreeDomainAvailabilityRequest,
666
755
  marshalFtpAccountApiChangeFtpAccountPasswordRequest,
667
756
  marshalFtpAccountApiCreateFtpAccountRequest,
668
757
  marshalHostingApiAddCustomDomainRequest,
669
758
  marshalHostingApiCreateHostingRequest,
759
+ marshalHostingApiRemoveCustomDomainRequest,
670
760
  marshalHostingApiUpdateHostingRequest,
671
761
  marshalMailAccountApiChangeMailAccountPasswordRequest,
672
762
  marshalMailAccountApiCreateMailAccountRequest,
673
763
  marshalMailAccountApiRemoveMailAccountRequest,
674
764
  unmarshalBackup,
765
+ unmarshalCheckFreeDomainAvailabilityResponse,
675
766
  unmarshalCheckUserOwnsDomainResponse,
676
767
  unmarshalDatabase,
677
768
  unmarshalDatabaseUser,
@@ -685,12 +776,15 @@ export {
685
776
  unmarshalListControlPanelsResponse,
686
777
  unmarshalListDatabaseUsersResponse,
687
778
  unmarshalListDatabasesResponse,
779
+ unmarshalListFreeRootDomainsResponse,
688
780
  unmarshalListFtpAccountsResponse,
689
781
  unmarshalListHostingsResponse,
690
782
  unmarshalListMailAccountsResponse,
691
783
  unmarshalListOffersResponse,
784
+ unmarshalListRecentProgressesResponse,
692
785
  unmarshalListWebsitesResponse,
693
786
  unmarshalMailAccount,
787
+ unmarshalProgress,
694
788
  unmarshalResetHostingPasswordResponse,
695
789
  unmarshalResourceSummary,
696
790
  unmarshalRestoreBackupItemsResponse,
@@ -2,6 +2,7 @@ import type { Money, Region as ScwRegion } from '@scaleway/sdk-client';
2
2
  import type { LanguageCode as StdLanguageCode } from '@scaleway/sdk-std';
3
3
  export type BackupItemType = 'unknown_backup_item_type' | 'full' | 'web' | 'mail' | 'db' | 'db_user' | 'ftp_user' | 'dns_zone' | 'cron_job' | 'ssl_certificate';
4
4
  export type BackupStatus = 'unknown_backup_status' | 'active' | 'locked' | 'disabled' | 'damaged' | 'restoring';
5
+ export type CheckFreeDomainAvailabilityResponseUnavailableReason = 'unavailable_reason_unknown' | 'unavailable_reason_already_used' | 'unavailable_reason_too_short' | 'unavailable_reason_too_long' | 'unavailable_reason_invalid_characters' | 'unavailable_reason_starts_or_ends_with_hyphen' | 'unavailable_reason_contains_dots' | 'unavailable_reason_contains_reserved_keyword';
5
6
  export type DnsRecordStatus = 'unknown_status' | 'valid' | 'invalid';
6
7
  export type DnsRecordType = 'unknown_type' | 'a' | 'cname' | 'mx' | 'txt' | 'ns' | 'aaaa';
7
8
  export type DnsRecordsStatus = 'unknown_status' | 'valid' | 'invalid';
@@ -24,6 +25,7 @@ export type NameserverStatus = 'unknown_status' | 'valid' | 'invalid';
24
25
  export type OfferOptionName = 'unknown_name' | 'domain_count' | 'email_count' | 'storage_gb' | 'vcpu_count' | 'ram_gb' | 'backup' | 'dedicated_ip' | 'email_storage_gb' | 'database_count' | 'support';
25
26
  export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning' | 'usage_low_warning';
26
27
  export type PlatformPlatformGroup = 'unknown_group' | 'default' | 'premium';
28
+ export type ProgressStatus = 'unknown_status' | 'pending' | 'processing' | 'completed' | 'partially_completed' | 'failed' | 'aborted' | 'never_finished';
27
29
  export interface AutoConfigDomainDns {
28
30
  /**
29
31
  * Whether or not to synchronize domain nameservers.
@@ -154,6 +156,16 @@ export interface HostingDomain {
154
156
  */
155
157
  customDomain?: HostingDomainCustomDomain;
156
158
  }
159
+ export interface FreeDomain {
160
+ /**
161
+ * Custom prefix used for the free domain.
162
+ */
163
+ slug: string;
164
+ /**
165
+ * Free root domain provided by Web Hosting, selected from the list returned by `ListFreeRootDomains`.
166
+ */
167
+ rootDomain: string;
168
+ }
157
169
  export interface CreateDatabaseRequestUser {
158
170
  username: string;
159
171
  password: string;
@@ -277,6 +289,10 @@ export interface Offer {
277
289
  * Defines a warning if the maximum value for an option in the offer is exceeded.
278
290
  */
279
291
  quotaWarning: OfferOptionWarning;
292
+ /**
293
+ * Region where the offer is hosted.
294
+ */
295
+ region: ScwRegion;
280
296
  }
281
297
  export interface Platform {
282
298
  /**
@@ -444,6 +460,24 @@ export interface MailAccount {
444
460
  */
445
461
  username: string;
446
462
  }
463
+ export interface ProgressSummary {
464
+ /**
465
+ * ID of the progress.
466
+ */
467
+ id: string;
468
+ /**
469
+ * Total number of backup items included in the progress.
470
+ */
471
+ backupItemsCount: number;
472
+ /**
473
+ * Completion percentage of the progress.
474
+ */
475
+ percentage: number;
476
+ /**
477
+ * Current status of the progress operation.
478
+ */
479
+ status: ProgressStatus;
480
+ }
447
481
  export interface Website {
448
482
  /**
449
483
  * The domain of the website.
@@ -498,6 +532,20 @@ export type BackupApiGetBackupRequest = {
498
532
  */
499
533
  backupId: string;
500
534
  };
535
+ export type BackupApiGetProgressRequest = {
536
+ /**
537
+ * Region to target. If none is passed will use default region from the config.
538
+ */
539
+ region?: ScwRegion;
540
+ /**
541
+ * ID of the hosting associated with the progress.
542
+ */
543
+ hostingId: string;
544
+ /**
545
+ * ID of the progress to retrieve.
546
+ */
547
+ progressId: string;
548
+ };
501
549
  export type BackupApiListBackupItemsRequest = {
502
550
  /**
503
551
  * Region to target. If none is passed will use default region from the config.
@@ -534,6 +582,16 @@ export type BackupApiListBackupsRequest = {
534
582
  */
535
583
  orderBy?: ListBackupsRequestOrderBy;
536
584
  };
585
+ export type BackupApiListRecentProgressesRequest = {
586
+ /**
587
+ * Region to target. If none is passed will use default region from the config.
588
+ */
589
+ region?: ScwRegion;
590
+ /**
591
+ * ID of the hosting linked to the progress.
592
+ */
593
+ hostingId: string;
594
+ };
537
595
  export type BackupApiRestoreBackupItemsRequest = {
538
596
  /**
539
597
  * Region to target. If none is passed will use default region from the config.
@@ -562,6 +620,20 @@ export type BackupApiRestoreBackupRequest = {
562
620
  */
563
621
  backupId: string;
564
622
  };
623
+ export interface CheckFreeDomainAvailabilityResponse {
624
+ /**
625
+ * The free domain that was checked.
626
+ */
627
+ freeDomain?: FreeDomain;
628
+ /**
629
+ * Whether the free domain is available.
630
+ */
631
+ isAvailable: boolean;
632
+ /**
633
+ * Reason the domain is unavailable, if applicable.
634
+ */
635
+ reason?: CheckFreeDomainAvailabilityResponseUnavailableReason;
636
+ }
565
637
  export interface CheckUserOwnsDomainResponse {
566
638
  /**
567
639
  * Indicates whether the specified project owns the domain.
@@ -918,6 +990,34 @@ export interface Domain {
918
990
  */
919
991
  autoConfigDomainDns?: AutoConfigDomainDns;
920
992
  }
993
+ export type FreeDomainApiCheckFreeDomainAvailabilityRequest = {
994
+ /**
995
+ * Region to target. If none is passed will use default region from the config.
996
+ */
997
+ region?: ScwRegion;
998
+ /**
999
+ * Custom prefix used for the free domain.
1000
+ */
1001
+ slug: string;
1002
+ /**
1003
+ * Free root domain provided by Web Hosting, selected from the list returned by `ListFreeRootDomains`.
1004
+ */
1005
+ rootDomain: string;
1006
+ };
1007
+ export type FreeDomainApiListFreeRootDomainsRequest = {
1008
+ /**
1009
+ * Region to target. If none is passed will use default region from the config.
1010
+ */
1011
+ region?: ScwRegion;
1012
+ /**
1013
+ * Page number to return, from the paginated results (must be a positive integer).
1014
+ */
1015
+ page?: number;
1016
+ /**
1017
+ * Number of free root domains to return (must be a positive integer lower or equal to 100).
1018
+ */
1019
+ pageSize?: number;
1020
+ };
921
1021
  export type FtpAccountApiChangeFtpAccountPasswordRequest = {
922
1022
  /**
923
1023
  * Region to target. If none is passed will use default region from the config.
@@ -1223,6 +1323,10 @@ export type HostingApiRemoveCustomDomainRequest = {
1223
1323
  * Hosting ID to which the custom domain is detached from.
1224
1324
  */
1225
1325
  hostingId: string;
1326
+ /**
1327
+ * The custom domain name to detach from the hosting.
1328
+ */
1329
+ domainName: string;
1226
1330
  };
1227
1331
  export type HostingApiResetHostingPasswordRequest = {
1228
1332
  /**
@@ -1314,6 +1418,16 @@ export interface ListDatabasesResponse {
1314
1418
  */
1315
1419
  databases: Database[];
1316
1420
  }
1421
+ export interface ListFreeRootDomainsResponse {
1422
+ /**
1423
+ * List of free root domains available for the Web Hosting.
1424
+ */
1425
+ rootDomains: string[];
1426
+ /**
1427
+ * Total number of free root domains available.
1428
+ */
1429
+ totalCount: number;
1430
+ }
1317
1431
  export interface ListFtpAccountsResponse {
1318
1432
  /**
1319
1433
  * Total number of FTP accounts.
@@ -1354,6 +1468,12 @@ export interface ListOffersResponse {
1354
1468
  */
1355
1469
  offers: Offer[];
1356
1470
  }
1471
+ export interface ListRecentProgressesResponse {
1472
+ /**
1473
+ * List of summarized progress entries.
1474
+ */
1475
+ progresses: ProgressSummary[];
1476
+ }
1357
1477
  export interface ListWebsitesResponse {
1358
1478
  /**
1359
1479
  * Total number of websites.
@@ -1478,6 +1598,24 @@ export type OfferApiListOffersRequest = {
1478
1598
  */
1479
1599
  controlPanels?: string[];
1480
1600
  };
1601
+ export interface Progress {
1602
+ /**
1603
+ * ID of the progress.
1604
+ */
1605
+ id: string;
1606
+ /**
1607
+ * Groups of backup items included in this progress.
1608
+ */
1609
+ backupItemGroups: BackupItemGroup[];
1610
+ /**
1611
+ * Completion percentage of the progress.
1612
+ */
1613
+ percentage: number;
1614
+ /**
1615
+ * Current status of the progress operation.
1616
+ */
1617
+ status: ProgressStatus;
1618
+ }
1481
1619
  export interface ResetHostingPasswordResponse {
1482
1620
  /**
1483
1621
  * @deprecated New temporary password (deprecated, use password_b64 instead).
@@ -1507,8 +1645,16 @@ export interface ResourceSummary {
1507
1645
  websitesCount: number;
1508
1646
  }
1509
1647
  export interface RestoreBackupItemsResponse {
1648
+ /**
1649
+ * Identifier used to track the item restoration progress.
1650
+ */
1651
+ progressId: string;
1510
1652
  }
1511
1653
  export interface RestoreBackupResponse {
1654
+ /**
1655
+ * Identifier used to track the backup restoration progress.
1656
+ */
1657
+ progressId: string;
1512
1658
  }
1513
1659
  export interface SearchDomainsResponse {
1514
1660
  /**
@@ -36,6 +36,15 @@ const DatabaseApiListDatabasesRequest = {
36
36
  lessThanOrEqual: 100
37
37
  }
38
38
  };
39
+ const FreeDomainApiListFreeRootDomainsRequest = {
40
+ page: {
41
+ greaterThan: 0
42
+ },
43
+ pageSize: {
44
+ greaterThan: 0,
45
+ lessThanOrEqual: 100
46
+ }
47
+ };
39
48
  const FtpAccountApiListFtpAccountsRequest = {
40
49
  page: {
41
50
  greaterThan: 0
@@ -85,6 +94,7 @@ exports.BackupApiListBackupsRequest = BackupApiListBackupsRequest;
85
94
  exports.ControlPanelApiListControlPanelsRequest = ControlPanelApiListControlPanelsRequest;
86
95
  exports.DatabaseApiListDatabaseUsersRequest = DatabaseApiListDatabaseUsersRequest;
87
96
  exports.DatabaseApiListDatabasesRequest = DatabaseApiListDatabasesRequest;
97
+ exports.FreeDomainApiListFreeRootDomainsRequest = FreeDomainApiListFreeRootDomainsRequest;
88
98
  exports.FtpAccountApiListFtpAccountsRequest = FtpAccountApiListFtpAccountsRequest;
89
99
  exports.HostingApiListHostingsRequest = HostingApiListHostingsRequest;
90
100
  exports.MailAccountApiListMailAccountsRequest = MailAccountApiListMailAccountsRequest;
@@ -34,6 +34,15 @@ export declare const DatabaseApiListDatabasesRequest: {
34
34
  lessThanOrEqual: number;
35
35
  };
36
36
  };
37
+ export declare const FreeDomainApiListFreeRootDomainsRequest: {
38
+ page: {
39
+ greaterThan: number;
40
+ };
41
+ pageSize: {
42
+ greaterThan: number;
43
+ lessThanOrEqual: number;
44
+ };
45
+ };
37
46
  export declare const FtpAccountApiListFtpAccountsRequest: {
38
47
  page: {
39
48
  greaterThan: number;
@@ -34,6 +34,15 @@ const DatabaseApiListDatabasesRequest = {
34
34
  lessThanOrEqual: 100
35
35
  }
36
36
  };
37
+ const FreeDomainApiListFreeRootDomainsRequest = {
38
+ page: {
39
+ greaterThan: 0
40
+ },
41
+ pageSize: {
42
+ greaterThan: 0,
43
+ lessThanOrEqual: 100
44
+ }
45
+ };
37
46
  const FtpAccountApiListFtpAccountsRequest = {
38
47
  page: {
39
48
  greaterThan: 0
@@ -84,6 +93,7 @@ export {
84
93
  ControlPanelApiListControlPanelsRequest,
85
94
  DatabaseApiListDatabaseUsersRequest,
86
95
  DatabaseApiListDatabasesRequest,
96
+ FreeDomainApiListFreeRootDomainsRequest,
87
97
  FtpAccountApiListFtpAccountsRequest,
88
98
  HostingApiListHostingsRequest,
89
99
  MailAccountApiListMailAccountsRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-webhosting",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Scaleway SDK webhosting",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.2",
33
- "@scaleway/sdk-std": "1.0.6"
33
+ "@scaleway/sdk-std": "1.1.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.1"
36
+ "@scaleway/sdk-client": "^1.3.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.1"
39
+ "@scaleway/sdk-client": "^1.3.2"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",