@scaleway/sdk-webhosting 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  /**
@@ -1522,6 +1668,34 @@ export interface Session {
1522
1668
  */
1523
1669
  url: string;
1524
1670
  }
1671
+ export type WebsiteApiCreateWebsiteRequest = {
1672
+ /**
1673
+ * Region to target. If none is passed will use default region from the config.
1674
+ */
1675
+ region?: ScwRegion;
1676
+ /**
1677
+ * Hosting ID to which the website is attached to.
1678
+ */
1679
+ hostingId: string;
1680
+ /**
1681
+ * The new domain name or subdomain to use for the website.
1682
+ */
1683
+ domainName: string;
1684
+ };
1685
+ export type WebsiteApiDeleteWebsiteRequest = {
1686
+ /**
1687
+ * Region to target. If none is passed will use default region from the config.
1688
+ */
1689
+ region?: ScwRegion;
1690
+ /**
1691
+ * Hosting ID to which the website is detached from.
1692
+ */
1693
+ hostingId: string;
1694
+ /**
1695
+ * The new domain name or subdomain attached to the website.
1696
+ */
1697
+ domainName: string;
1698
+ };
1525
1699
  export type WebsiteApiListWebsitesRequest = {
1526
1700
  /**
1527
1701
  * Region to target. If none is passed will use default region from the config.
@@ -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.4.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.2.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.1"
36
+ "@scaleway/sdk-client": "^1.3.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.1"
39
+ "@scaleway/sdk-client": "^1.3.3"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",