@scaleway/sdk-webhosting 1.4.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,12 @@
1
- const BACKUP_TRANSIENT_STATUSES = ["restoring"];
2
- const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = ["validating"];
3
- const DOMAIN_TRANSIENT_STATUSES = ["validating"];
1
+ const BACKUP_TRANSIENT_STATUSES = [
2
+ "restoring"
3
+ ];
4
+ const DOMAIN_AVAILABILITY_TRANSIENT_STATUSES = [
5
+ "validating"
6
+ ];
7
+ const DOMAIN_TRANSIENT_STATUSES = [
8
+ "validating"
9
+ ];
4
10
  const HOSTING_TRANSIENT_STATUSES = [
5
11
  "delivering",
6
12
  "deleting",
@@ -1,5 +1,5 @@
1
1
  export { BackupAPI, ControlPanelAPI, DatabaseAPI, DnsAPI, FreeDomainAPI, FtpAccountAPI, HostingAPI, MailAccountAPI, OfferAPI, WebsiteAPI, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
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, WebsiteApiCreateWebsiteRequest, WebsiteApiDeleteWebsiteRequest, WebsiteApiListWebsitesRequest, } from './types.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, DatabaseApiListDatabasesRequest, DatabaseApiListDatabaseUsersRequest, DatabaseApiUnassignDatabaseUserRequest, DatabaseUser, DnsApiCheckUserOwnsDomainRequest, DnsApiGetDomainDnsRecordsRequest, DnsApiGetDomainRequest, DnsApiSearchDomainsRequest, DnsApiSyncDomainDnsRecordsRequest, DnsRecord, DnsRecordStatus, DnsRecords, DnsRecordsStatus, DnsRecordType, Domain, DomainAction, DomainAvailability, DomainAvailabilityAction, DomainAvailabilityStatus, DomainDnsAction, DomainStatus, DomainZoneOwner, FreeDomain, FreeDomainApiCheckFreeDomainAvailabilityRequest, FreeDomainApiListFreeRootDomainsRequest, FtpAccount, FtpAccountApiChangeFtpAccountPasswordRequest, FtpAccountApiCreateFtpAccountRequest, FtpAccountApiListFtpAccountsRequest, FtpAccountApiRemoveFtpAccountRequest, Hosting, HostingApiAddCustomDomainRequest, HostingApiCreateHostingRequest, HostingApiCreateSessionRequest, HostingApiDeleteHostingRequest, HostingApiGetHostingRequest, HostingApiGetResourceSummaryRequest, HostingApiListHostingsRequest, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiResetHostingPasswordRequest, HostingApiUpdateHostingRequest, HostingDomain, HostingDomainCustomDomain, HostingStatus, HostingSummary, HostingUser, ListBackupItemsResponse, ListBackupsRequestOrderBy, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesRequestOrderBy, ListDatabasesResponse, ListDatabaseUsersRequestOrderBy, ListDatabaseUsersResponse, 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, WebsiteApiCreateWebsiteRequest, WebsiteApiDeleteWebsiteRequest, WebsiteApiListWebsitesRequest, } from './types.gen.js';
5
5
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,6 +1,6 @@
1
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, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, marshalWebsiteApiCreateWebsiteRequest, unmarshalBackup, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalCheckUserOwnsDomainResponse, unmarshalDatabase, unmarshalDatabaseUser, unmarshalDnsRecords, unmarshalDomain, unmarshalFtpAccount, unmarshalHosting, unmarshalHostingSummary, unmarshalListBackupItemsResponse, unmarshalListBackupsResponse, unmarshalListControlPanelsResponse, unmarshalListDatabaseUsersResponse, unmarshalListDatabasesResponse, unmarshalListFreeRootDomainsResponse, unmarshalListFtpAccountsResponse, unmarshalListHostingsResponse, unmarshalListMailAccountsResponse, unmarshalListOffersResponse, unmarshalListRecentProgressesResponse, unmarshalListWebsitesResponse, unmarshalMailAccount, unmarshalProgress, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, unmarshalRestoreBackupItemsResponse, unmarshalRestoreBackupResponse, unmarshalSearchDomainsResponse, unmarshalSession, unmarshalWebsite } from "./marshalling.gen.js";
3
+ import { marshalBackupApiRestoreBackupItemsRequest, marshalDatabaseApiAssignDatabaseUserRequest, marshalDatabaseApiChangeDatabaseUserPasswordRequest, marshalDatabaseApiCreateDatabaseRequest, marshalDatabaseApiCreateDatabaseUserRequest, marshalDatabaseApiUnassignDatabaseUserRequest, marshalDnsApiCheckUserOwnsDomainRequest, marshalDnsApiSyncDomainDnsRecordsRequest, marshalFreeDomainApiCheckFreeDomainAvailabilityRequest, marshalFtpAccountApiChangeFtpAccountPasswordRequest, marshalFtpAccountApiCreateFtpAccountRequest, marshalHostingApiAddCustomDomainRequest, marshalHostingApiCreateHostingRequest, marshalHostingApiMigrateControlPanelRequest, marshalHostingApiRemoveCustomDomainRequest, marshalHostingApiUpdateHostingRequest, marshalMailAccountApiChangeMailAccountPasswordRequest, marshalMailAccountApiCreateMailAccountRequest, marshalMailAccountApiRemoveMailAccountRequest, marshalWebsiteApiCreateWebsiteRequest, unmarshalBackup, unmarshalCheckFreeDomainAvailabilityResponse, unmarshalCheckUserOwnsDomainResponse, unmarshalDatabase, unmarshalDatabaseUser, unmarshalDnsRecords, unmarshalDomain, unmarshalFtpAccount, unmarshalHosting, unmarshalHostingSummary, unmarshalListBackupItemsResponse, unmarshalListBackupsResponse, unmarshalListControlPanelsResponse, unmarshalListDatabaseUsersResponse, unmarshalListDatabasesResponse, unmarshalListFreeRootDomainsResponse, unmarshalListFtpAccountsResponse, unmarshalListHostingsResponse, unmarshalListMailAccountsResponse, unmarshalListOffersResponse, unmarshalListRecentProgressesResponse, unmarshalListWebsitesResponse, unmarshalMailAccount, unmarshalProgress, unmarshalResetHostingPasswordResponse, unmarshalResourceSummary, unmarshalRestoreBackupItemsResponse, unmarshalRestoreBackupResponse, unmarshalSearchDomainsResponse, unmarshalSession, unmarshalWebsite } from "./marshalling.gen.js";
4
4
  import * as validationRules_gen from "./validation-rules.gen.js";
5
5
  export {
6
6
  BACKUP_TRANSIENT_STATUSES,
@@ -31,6 +31,7 @@ export {
31
31
  marshalFtpAccountApiCreateFtpAccountRequest,
32
32
  marshalHostingApiAddCustomDomainRequest,
33
33
  marshalHostingApiCreateHostingRequest,
34
+ marshalHostingApiMigrateControlPanelRequest,
34
35
  marshalHostingApiRemoveCustomDomainRequest,
35
36
  marshalHostingApiUpdateHostingRequest,
36
37
  marshalMailAccountApiChangeMailAccountPasswordRequest,
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
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';
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, HostingApiMigrateControlPanelRequest, HostingApiRemoveCustomDomainRequest, HostingApiUpdateHostingRequest, HostingSummary, ListBackupItemsResponse, ListBackupsResponse, ListControlPanelsResponse, ListDatabasesResponse, ListDatabaseUsersResponse, 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;
@@ -44,6 +44,7 @@ export declare const marshalFtpAccountApiChangeFtpAccountPasswordRequest: (reque
44
44
  export declare const marshalFtpAccountApiCreateFtpAccountRequest: (request: FtpAccountApiCreateFtpAccountRequest, defaults: DefaultValues) => Record<string, unknown>;
45
45
  export declare const marshalHostingApiAddCustomDomainRequest: (request: HostingApiAddCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
46
46
  export declare const marshalHostingApiCreateHostingRequest: (request: HostingApiCreateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
47
+ export declare const marshalHostingApiMigrateControlPanelRequest: (request: HostingApiMigrateControlPanelRequest, defaults: DefaultValues) => Record<string, unknown>;
47
48
  export declare const marshalHostingApiRemoveCustomDomainRequest: (request: HostingApiRemoveCustomDomainRequest, defaults: DefaultValues) => Record<string, unknown>;
48
49
  export declare const marshalHostingApiUpdateHostingRequest: (request: HostingApiUpdateHostingRequest, defaults: DefaultValues) => Record<string, unknown>;
49
50
  export declare const marshalMailAccountApiChangeMailAccountPasswordRequest: (request: MailAccountApiChangeMailAccountPasswordRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -230,6 +230,19 @@ const unmarshalPlatformControlPanelUrls = (data) => {
230
230
  webmail: data.webmail
231
231
  };
232
232
  };
233
+ const unmarshalControlPanel = (data) => {
234
+ if (!isJSONObject(data)) {
235
+ throw new TypeError(
236
+ `Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`
237
+ );
238
+ }
239
+ return {
240
+ available: data.available,
241
+ availableLanguages: data.available_languages,
242
+ logoUrl: data.logo_url,
243
+ name: data.name
244
+ };
245
+ };
233
246
  const unmarshalOfferOption = (data) => {
234
247
  if (!isJSONObject(data)) {
235
248
  throw new TypeError(
@@ -281,6 +294,7 @@ const unmarshalOffer = (data) => {
281
294
  available: data.available,
282
295
  billingOperationPath: data.billing_operation_path,
283
296
  controlPanelName: data.control_panel_name,
297
+ controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
284
298
  endOfLife: data.end_of_life,
285
299
  id: data.id,
286
300
  name: data.name,
@@ -378,19 +392,6 @@ const unmarshalListBackupsResponse = (data) => {
378
392
  totalCount: data.total_count
379
393
  };
380
394
  };
381
- const unmarshalControlPanel = (data) => {
382
- if (!isJSONObject(data)) {
383
- throw new TypeError(
384
- `Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`
385
- );
386
- }
387
- return {
388
- available: data.available,
389
- availableLanguages: data.available_languages,
390
- logoUrl: data.logo_url,
391
- name: data.name
392
- };
393
- };
394
395
  const unmarshalListControlPanelsResponse = (data) => {
395
396
  if (!isJSONObject(data)) {
396
397
  throw new TypeError(
@@ -398,10 +399,7 @@ const unmarshalListControlPanelsResponse = (data) => {
398
399
  );
399
400
  }
400
401
  return {
401
- controlPanels: unmarshalArrayOfObject(
402
- data.control_panels,
403
- unmarshalControlPanel
404
- ),
402
+ controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
405
403
  totalCount: data.total_count
406
404
  };
407
405
  };
@@ -467,10 +465,7 @@ const unmarshalListMailAccountsResponse = (data) => {
467
465
  );
468
466
  }
469
467
  return {
470
- mailAccounts: unmarshalArrayOfObject(
471
- data.mail_accounts,
472
- unmarshalMailAccount
473
- ),
468
+ mailAccounts: unmarshalArrayOfObject(data.mail_accounts, unmarshalMailAccount),
474
469
  totalCount: data.total_count
475
470
  };
476
471
  };
@@ -505,10 +500,7 @@ const unmarshalListRecentProgressesResponse = (data) => {
505
500
  );
506
501
  }
507
502
  return {
508
- progresses: unmarshalArrayOfObject(
509
- data.progresses,
510
- unmarshalProgressSummary
511
- )
503
+ progresses: unmarshalArrayOfObject(data.progresses, unmarshalProgressSummary)
512
504
  };
513
505
  };
514
506
  const unmarshalListWebsitesResponse = (data) => {
@@ -529,10 +521,7 @@ const unmarshalProgress = (data) => {
529
521
  );
530
522
  }
531
523
  return {
532
- backupItemGroups: unmarshalArrayOfObject(
533
- data.backup_item_groups,
534
- unmarshalBackupItemGroup
535
- ),
524
+ backupItemGroups: unmarshalArrayOfObject(data.backup_item_groups, unmarshalBackupItemGroup),
536
525
  id: data.id,
537
526
  percentage: data.percentage,
538
527
  status: data.status
@@ -604,10 +593,7 @@ const unmarshalSearchDomainsResponse = (data) => {
604
593
  );
605
594
  }
606
595
  return {
607
- domainsAvailable: unmarshalArrayOfObject(
608
- data.domains_available,
609
- unmarshalDomainAvailability
610
- )
596
+ domainsAvailable: unmarshalArrayOfObject(data.domains_available, unmarshalDomainAvailability)
611
597
  };
612
598
  };
613
599
  const unmarshalSession = (data) => {
@@ -640,7 +626,10 @@ const marshalDatabaseApiCreateDatabaseRequest = (request, defaults) => ({
640
626
  param: "new_user",
641
627
  value: request.newUser !== void 0 ? marshalCreateDatabaseRequestUser(request.newUser) : void 0
642
628
  },
643
- { param: "existing_username", value: request.existingUsername }
629
+ {
630
+ param: "existing_username",
631
+ value: request.existingUsername
632
+ }
644
633
  ])
645
634
  });
646
635
  const marshalDatabaseApiCreateDatabaseUserRequest = (request, defaults) => ({
@@ -666,9 +655,7 @@ const marshalSyncDomainDnsRecordsRequestRecord = (request, defaults) => ({
666
655
  });
667
656
  const marshalDnsApiSyncDomainDnsRecordsRequest = (request, defaults) => ({
668
657
  auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
669
- custom_records: request.customRecords !== void 0 ? request.customRecords.map(
670
- (elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)
671
- ) : void 0,
658
+ custom_records: request.customRecords !== void 0 ? request.customRecords.map((elt) => marshalSyncDomainDnsRecordsRequestRecord(elt)) : void 0,
672
659
  update_all_records: request.updateAllRecords,
673
660
  update_mail_records: request.updateMailRecords,
674
661
  update_nameservers: request.updateNameservers,
@@ -702,29 +689,27 @@ const marshalOfferOptionRequest = (request, defaults) => ({
702
689
  const marshalHostingApiCreateHostingRequest = (request, defaults) => ({
703
690
  auto_config_domain_dns: request.autoConfigDomainDns !== void 0 ? marshalAutoConfigDomainDns(request.autoConfigDomainDns) : void 0,
704
691
  domain: request.domain,
705
- domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(
706
- request.domainConfiguration
707
- ) : void 0,
692
+ domain_configuration: request.domainConfiguration !== void 0 ? marshalCreateHostingRequestDomainConfiguration(request.domainConfiguration) : void 0,
708
693
  email: request.email,
709
694
  language: request.language,
710
695
  offer_id: request.offerId,
711
- offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
712
- (elt) => marshalOfferOptionRequest(elt)
713
- ) : void 0,
696
+ offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
714
697
  project_id: request.projectId ?? defaults.defaultProjectId,
715
698
  skip_welcome_email: request.skipWelcomeEmail,
716
699
  subdomain: request.subdomain,
717
700
  tags: request.tags
718
701
  });
702
+ const marshalHostingApiMigrateControlPanelRequest = (request, defaults) => ({
703
+ control_panel_name: request.controlPanelName,
704
+ offer_id: request.offerId
705
+ });
719
706
  const marshalHostingApiRemoveCustomDomainRequest = (request, defaults) => ({
720
707
  domain_name: request.domainName
721
708
  });
722
709
  const marshalHostingApiUpdateHostingRequest = (request, defaults) => ({
723
710
  email: request.email,
724
711
  offer_id: request.offerId,
725
- offer_options: request.offerOptions !== void 0 ? request.offerOptions.map(
726
- (elt) => marshalOfferOptionRequest(elt)
727
- ) : void 0,
712
+ offer_options: request.offerOptions !== void 0 ? request.offerOptions.map((elt) => marshalOfferOptionRequest(elt)) : void 0,
728
713
  protected: request.protected,
729
714
  tags: request.tags
730
715
  });
@@ -759,6 +744,7 @@ export {
759
744
  marshalFtpAccountApiCreateFtpAccountRequest,
760
745
  marshalHostingApiAddCustomDomainRequest,
761
746
  marshalHostingApiCreateHostingRequest,
747
+ marshalHostingApiMigrateControlPanelRequest,
762
748
  marshalHostingApiRemoveCustomDomainRequest,
763
749
  marshalHostingApiUpdateHostingRequest,
764
750
  marshalMailAccountApiChangeMailAccountPasswordRequest,
@@ -22,7 +22,7 @@ export type ListMailAccountsRequestOrderBy = 'username_asc' | 'username_desc' |
22
22
  export type ListOffersRequestOrderBy = 'price_asc';
23
23
  export type ListWebsitesRequestOrderBy = 'domain_asc' | 'domain_desc';
24
24
  export type NameserverStatus = 'unknown_status' | 'valid' | 'invalid';
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
+ export type OfferOptionName = 'unknown_name' | 'domain_count' | 'email_count' | 'storage_gb' | 'vcpu_count' | 'ram_gb' | 'backup' | 'dedicated_ip' | 'email_storage_gb' | 'database_count' | 'support' | 'additional_email';
26
26
  export type OfferOptionWarning = 'unknown_warning' | 'quota_exceeded_warning' | 'usage_low_warning';
27
27
  export type PlatformPlatformGroup = 'unknown_group' | 'default' | 'premium';
28
28
  export type ProgressStatus = 'unknown_status' | 'pending' | 'processing' | 'completed' | 'partially_completed' | 'failed' | 'aborted' | 'never_finished';
@@ -76,6 +76,24 @@ export interface HostingDomainCustomDomain {
76
76
  */
77
77
  autoConfigDomainDns?: AutoConfigDomainDns;
78
78
  }
79
+ export interface ControlPanel {
80
+ /**
81
+ * Control panel name.
82
+ */
83
+ name: string;
84
+ /**
85
+ * Define if the control panel type is available to order.
86
+ */
87
+ available: boolean;
88
+ /**
89
+ * URL of the control panel's logo.
90
+ */
91
+ logoUrl: string;
92
+ /**
93
+ * List of available languages for the control panel.
94
+ */
95
+ availableLanguages: StdLanguageCode[];
96
+ }
79
97
  export interface OfferOption {
80
98
  /**
81
99
  * Option ID.
@@ -289,6 +307,10 @@ export interface Offer {
289
307
  * Defines a warning if the maximum value for an option in the offer is exceeded.
290
308
  */
291
309
  quotaWarning: OfferOptionWarning;
310
+ /**
311
+ * Lists available control panels for the specified offer.
312
+ */
313
+ controlPanels: ControlPanel[];
292
314
  /**
293
315
  * Region where the offer is hosted.
294
316
  */
@@ -352,24 +374,6 @@ export interface Backup {
352
374
  */
353
375
  totalItems: number;
354
376
  }
355
- export interface ControlPanel {
356
- /**
357
- * Control panel name.
358
- */
359
- name: string;
360
- /**
361
- * Define if the control panel type is available to order.
362
- */
363
- available: boolean;
364
- /**
365
- * URL of the control panel's logo.
366
- */
367
- logoUrl: string;
368
- /**
369
- * List of available languages for the control panel.
370
- */
371
- availableLanguages: StdLanguageCode[];
372
- }
373
377
  export interface DatabaseUser {
374
378
  /**
375
379
  * Name of the database user.
@@ -1314,6 +1318,24 @@ export type HostingApiListHostingsRequest = {
1314
1318
  */
1315
1319
  subdomain?: string;
1316
1320
  };
1321
+ export type HostingApiMigrateControlPanelRequest = {
1322
+ /**
1323
+ * Region to target. If none is passed will use default region from the config.
1324
+ */
1325
+ region?: ScwRegion;
1326
+ /**
1327
+ * Hosting ID to migrate to a new control panel.
1328
+ */
1329
+ hostingId: string;
1330
+ /**
1331
+ * Control panel will migrate the hosting to a new server.
1332
+ */
1333
+ controlPanelName: string;
1334
+ /**
1335
+ * Migration.
1336
+ */
1337
+ offerId: string;
1338
+ };
1317
1339
  export type HostingApiRemoveCustomDomainRequest = {
1318
1340
  /**
1319
1341
  * Region to target. If none is passed will use default region from the config.
package/package.json CHANGED
@@ -1,23 +1,20 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-webhosting",
3
- "version": "1.4.0",
3
+ "version": "2.1.1",
4
4
  "description": "Scaleway SDK webhosting",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
7
+ "README.md",
7
8
  "dist"
8
9
  ],
9
10
  "type": "module",
10
11
  "exports": {
11
12
  ".": {
12
13
  "types": "./dist/index.gen.d.ts",
13
- "import": "./dist/index.gen.js",
14
- "require": "./dist/index.gen.cjs",
15
14
  "default": "./dist/index.gen.js"
16
15
  },
17
16
  "./*": {
18
17
  "types": "./dist/*/index.gen.d.ts",
19
- "import": "./dist/*/index.gen.js",
20
- "require": "./dist/*/index.gen.cjs",
21
18
  "default": "./dist/*/index.gen.js"
22
19
  }
23
20
  },
@@ -26,17 +23,17 @@
26
23
  "directory": "packages_generated/webhosting"
27
24
  },
28
25
  "engines": {
29
- "node": ">=20.19.4"
26
+ "node": ">=20.19.6"
30
27
  },
31
28
  "dependencies": {
32
29
  "@scaleway/random-name": "5.1.2",
33
- "@scaleway/sdk-std": "1.2.0"
30
+ "@scaleway/sdk-std": "2.1.0"
34
31
  },
35
32
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.3"
33
+ "@scaleway/sdk-client": "^2.1.0"
37
34
  },
38
35
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.3"
36
+ "@scaleway/sdk-client": "^2.1.0"
40
37
  },
41
38
  "scripts": {
42
39
  "package:check": "pnpm publint",
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index_gen = require("./v1/index.gen.cjs");
4
- exports.Webhostingv1 = index_gen;