@scaleway/sdk 2.63.0 → 2.65.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.
Files changed (70) hide show
  1. package/dist/api/applesilicon/v1alpha1/api.gen.d.ts +3 -3
  2. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +20 -20
  3. package/dist/api/cockpit/v1/api.gen.cjs +19 -1
  4. package/dist/api/cockpit/v1/api.gen.d.ts +4 -3
  5. package/dist/api/cockpit/v1/api.gen.js +20 -2
  6. package/dist/api/cockpit/v1/index.gen.d.ts +1 -1
  7. package/dist/api/cockpit/v1/marshalling.gen.cjs +13 -0
  8. package/dist/api/cockpit/v1/marshalling.gen.d.ts +2 -1
  9. package/dist/api/cockpit/v1/marshalling.gen.js +13 -0
  10. package/dist/api/cockpit/v1/types.gen.d.ts +50 -31
  11. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +3 -3
  12. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  13. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +16 -0
  14. package/dist/api/iam/v1alpha1/marshalling.gen.js +16 -0
  15. package/dist/api/iam/v1alpha1/types.gen.d.ts +48 -4
  16. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +7 -3
  17. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +6 -3
  18. package/dist/api/iam/v1alpha1/validation-rules.gen.js +7 -3
  19. package/dist/api/inference/v1beta1/api.gen.d.ts +2 -2
  20. package/dist/api/inference/v1beta1/types.gen.d.ts +21 -21
  21. package/dist/api/instance/v1/api.gen.d.ts +2 -2
  22. package/dist/api/instance/v1/types.gen.d.ts +87 -87
  23. package/dist/api/instance/v1/types.private.gen.d.ts +5 -5
  24. package/dist/api/interlink/v1beta1/api.gen.cjs +5 -1
  25. package/dist/api/interlink/v1beta1/api.gen.d.ts +2 -2
  26. package/dist/api/interlink/v1beta1/api.gen.js +5 -1
  27. package/dist/api/interlink/v1beta1/marshalling.gen.cjs +1 -0
  28. package/dist/api/interlink/v1beta1/marshalling.gen.js +1 -0
  29. package/dist/api/interlink/v1beta1/types.gen.d.ts +29 -24
  30. package/dist/api/ipam/v1/api.gen.cjs +5 -1
  31. package/dist/api/ipam/v1/api.gen.d.ts +2 -2
  32. package/dist/api/ipam/v1/api.gen.js +5 -1
  33. package/dist/api/ipam/v1/types.gen.d.ts +13 -13
  34. package/dist/api/key_manager/v1alpha1/api.gen.cjs +41 -37
  35. package/dist/api/key_manager/v1alpha1/api.gen.d.ts +38 -38
  36. package/dist/api/key_manager/v1alpha1/api.gen.js +41 -37
  37. package/dist/api/key_manager/v1alpha1/types.gen.d.ts +31 -30
  38. package/dist/api/lb/v1/api.gen.cjs +5 -1
  39. package/dist/api/lb/v1/api.gen.d.ts +3 -3
  40. package/dist/api/lb/v1/api.gen.js +5 -1
  41. package/dist/api/lb/v1/types.gen.d.ts +116 -116
  42. package/dist/api/vpc/v2/api.gen.cjs +5 -21
  43. package/dist/api/vpc/v2/api.gen.d.ts +3 -13
  44. package/dist/api/vpc/v2/api.gen.js +6 -22
  45. package/dist/api/vpc/v2/index.gen.d.ts +1 -1
  46. package/dist/api/vpc/v2/marshalling.gen.cjs +0 -16
  47. package/dist/api/vpc/v2/marshalling.gen.d.ts +1 -2
  48. package/dist/api/vpc/v2/marshalling.gen.js +1 -17
  49. package/dist/api/vpc/v2/types.gen.d.ts +24 -49
  50. package/dist/api/webhosting/v1/api.gen.cjs +98 -10
  51. package/dist/api/webhosting/v1/api.gen.d.ts +40 -12
  52. package/dist/api/webhosting/v1/api.gen.js +100 -12
  53. package/dist/api/webhosting/v1/content.gen.cjs +4 -0
  54. package/dist/api/webhosting/v1/content.gen.d.ts +5 -1
  55. package/dist/api/webhosting/v1/content.gen.js +4 -0
  56. package/dist/api/webhosting/v1/index.gen.cjs +2 -0
  57. package/dist/api/webhosting/v1/index.gen.d.ts +1 -1
  58. package/dist/api/webhosting/v1/index.gen.js +3 -1
  59. package/dist/api/webhosting/v1/marshalling.gen.cjs +45 -0
  60. package/dist/api/webhosting/v1/marshalling.gen.d.ts +3 -1
  61. package/dist/api/webhosting/v1/marshalling.gen.js +45 -0
  62. package/dist/api/webhosting/v1/types.gen.d.ts +102 -36
  63. package/dist/api/webhosting/v1alpha1/api.gen.cjs +6 -2
  64. package/dist/api/webhosting/v1alpha1/api.gen.d.ts +3 -3
  65. package/dist/api/webhosting/v1alpha1/api.gen.js +6 -2
  66. package/dist/api/webhosting/v1alpha1/types.gen.d.ts +19 -19
  67. package/dist/scw/constants.cjs +1 -1
  68. package/dist/scw/constants.d.ts +2 -2
  69. package/dist/scw/constants.js +1 -1
  70. package/package.json +2 -2
@@ -10,7 +10,11 @@ const jsonContentHeaders = {
10
10
  };
11
11
  class API extends api.API {
12
12
  /** Lists the available regions of the API. */
13
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
13
+ static LOCALITIES = [
14
+ "fr-par",
15
+ "nl-ams",
16
+ "pl-waw"
17
+ ];
14
18
  pageOfListVPCs = (request = {}) => this.client.fetch(
15
19
  {
16
20
  method: "GET",
@@ -192,26 +196,6 @@ class API extends api.API {
192
196
  method: "DELETE",
193
197
  path: `/vpc/v2/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${marshalling.validatePathParam("privateNetworkId", request.privateNetworkId)}`
194
198
  });
195
- /**
196
- * Migrate Private Networks from zoned to regional. Transform multiple
197
- * existing zoned Private Networks (scoped to a single Availability Zone) into
198
- * regional Private Networks, scoped to an entire region. You can transform
199
- * one or many Private Networks (specified by their Private Network IDs)
200
- * within a single Scaleway Organization or Project, with the same call.
201
- *
202
- * @param request - The request {@link MigrateZonalPrivateNetworksRequest}
203
- */
204
- migrateZonalPrivateNetworks = (request = {}) => this.client.fetch({
205
- body: JSON.stringify(
206
- marshalling_gen.marshalMigrateZonalPrivateNetworksRequest(
207
- request,
208
- this.client.settings
209
- )
210
- ),
211
- headers: jsonContentHeaders,
212
- method: "POST",
213
- path: `/vpc/v2/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
214
- });
215
199
  /**
216
200
  * Enable DHCP on a Private Network. Enable DHCP managed on an existing
217
201
  * Private Network. Note that you will not be able to deactivate it
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
- import type { Region } from '../../../bridge';
3
- import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCsRequest, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen';
2
+ import type { Region as ScwRegion } from '../../../bridge';
3
+ import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCsRequest, ListVPCsResponse, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen';
4
4
  /**
5
5
  * VPC API.
6
6
  *
@@ -9,7 +9,7 @@ import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest
9
9
  */
10
10
  export declare class API extends ParentAPI {
11
11
  /** Lists the available regions of the API. */
12
- static readonly LOCALITIES: Region[];
12
+ static readonly LOCALITIES: ScwRegion[];
13
13
  protected pageOfListVPCs: (request?: Readonly<ListVPCsRequest>) => Promise<ListVPCsResponse>;
14
14
  /**
15
15
  * List VPCs. List existing VPCs in the specified region.
@@ -94,16 +94,6 @@ export declare class API extends ParentAPI {
94
94
  * @param request - The request {@link DeletePrivateNetworkRequest}
95
95
  */
96
96
  deletePrivateNetwork: (request: Readonly<DeletePrivateNetworkRequest>) => Promise<void>;
97
- /**
98
- * Migrate Private Networks from zoned to regional. Transform multiple
99
- * existing zoned Private Networks (scoped to a single Availability Zone) into
100
- * regional Private Networks, scoped to an entire region. You can transform
101
- * one or many Private Networks (specified by their Private Network IDs)
102
- * within a single Scaleway Organization or Project, with the same call.
103
- *
104
- * @param request - The request {@link MigrateZonalPrivateNetworksRequest}
105
- */
106
- migrateZonalPrivateNetworks: (request?: Readonly<MigrateZonalPrivateNetworksRequest>) => Promise<void>;
107
97
  /**
108
98
  * Enable DHCP on a Private Network. Enable DHCP managed on an existing
109
99
  * Private Network. Note that you will not be able to deactivate it
@@ -2,13 +2,17 @@ import { API as API$1 } from "../../../scw/api.js";
2
2
  import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
3
3
  import "../../../vendor/base64/index.js";
4
4
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
5
- import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest, marshalMigrateZonalPrivateNetworksRequest, unmarshalListSubnetsResponse, marshalSetSubnetsRequest, unmarshalSetSubnetsResponse, marshalAddSubnetsRequest, unmarshalAddSubnetsResponse, marshalDeleteSubnetsRequest, unmarshalDeleteSubnetsResponse, marshalCreateRouteRequest, unmarshalRoute, marshalUpdateRouteRequest } from "./marshalling.gen.js";
5
+ import { unmarshalListVPCsResponse, marshalCreateVPCRequest, unmarshalVPC, marshalUpdateVPCRequest, unmarshalListPrivateNetworksResponse, marshalCreatePrivateNetworkRequest, unmarshalPrivateNetwork, marshalUpdatePrivateNetworkRequest, unmarshalListSubnetsResponse, marshalSetSubnetsRequest, unmarshalSetSubnetsResponse, marshalAddSubnetsRequest, unmarshalAddSubnetsResponse, marshalDeleteSubnetsRequest, unmarshalDeleteSubnetsResponse, marshalCreateRouteRequest, unmarshalRoute, marshalUpdateRouteRequest } from "./marshalling.gen.js";
6
6
  const jsonContentHeaders = {
7
7
  "Content-Type": "application/json; charset=utf-8"
8
8
  };
9
9
  class API extends API$1 {
10
10
  /** Lists the available regions of the API. */
11
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
11
+ static LOCALITIES = [
12
+ "fr-par",
13
+ "nl-ams",
14
+ "pl-waw"
15
+ ];
12
16
  pageOfListVPCs = (request = {}) => this.client.fetch(
13
17
  {
14
18
  method: "GET",
@@ -190,26 +194,6 @@ class API extends API$1 {
190
194
  method: "DELETE",
191
195
  path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
192
196
  });
193
- /**
194
- * Migrate Private Networks from zoned to regional. Transform multiple
195
- * existing zoned Private Networks (scoped to a single Availability Zone) into
196
- * regional Private Networks, scoped to an entire region. You can transform
197
- * one or many Private Networks (specified by their Private Network IDs)
198
- * within a single Scaleway Organization or Project, with the same call.
199
- *
200
- * @param request - The request {@link MigrateZonalPrivateNetworksRequest}
201
- */
202
- migrateZonalPrivateNetworks = (request = {}) => this.client.fetch({
203
- body: JSON.stringify(
204
- marshalMigrateZonalPrivateNetworksRequest(
205
- request,
206
- this.client.settings
207
- )
208
- ),
209
- headers: jsonContentHeaders,
210
- method: "POST",
211
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`
212
- });
213
197
  /**
214
198
  * Enable DHCP on a Private Network. Enable DHCP managed on an existing
215
199
  * Private Network. Note that you will not be able to deactivate it
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen.js';
2
- export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC, } from './types.gen';
2
+ export type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableDHCPRequest, EnableRoutingRequest, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC, } from './types.gen';
3
3
  export * as ValidationRules from './validation-rules.gen.js';
@@ -173,21 +173,6 @@ const marshalCreateVPCRequest = (request, defaults) => ({
173
173
  const marshalDeleteSubnetsRequest = (request, defaults) => ({
174
174
  subnets: request.subnets
175
175
  });
176
- const marshalMigrateZonalPrivateNetworksRequest = (request, defaults) => ({
177
- private_network_ids: request.privateNetworkIds,
178
- ...marshalling.resolveOneOf([
179
- {
180
- default: defaults.defaultOrganizationId,
181
- param: "organization_id",
182
- value: request.organizationId
183
- },
184
- {
185
- default: defaults.defaultProjectId,
186
- param: "project_id",
187
- value: request.projectId
188
- }
189
- ])
190
- });
191
176
  const marshalSetSubnetsRequest = (request, defaults) => ({
192
177
  subnets: request.subnets
193
178
  });
@@ -211,7 +196,6 @@ exports.marshalCreatePrivateNetworkRequest = marshalCreatePrivateNetworkRequest;
211
196
  exports.marshalCreateRouteRequest = marshalCreateRouteRequest;
212
197
  exports.marshalCreateVPCRequest = marshalCreateVPCRequest;
213
198
  exports.marshalDeleteSubnetsRequest = marshalDeleteSubnetsRequest;
214
- exports.marshalMigrateZonalPrivateNetworksRequest = marshalMigrateZonalPrivateNetworksRequest;
215
199
  exports.marshalSetSubnetsRequest = marshalSetSubnetsRequest;
216
200
  exports.marshalUpdatePrivateNetworkRequest = marshalUpdatePrivateNetworkRequest;
217
201
  exports.marshalUpdateRouteRequest = marshalUpdateRouteRequest;
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '../../../bridge';
2
- import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListSubnetsResponse, ListVPCsResponse, MigrateZonalPrivateNetworksRequest, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen';
2
+ import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, ListPrivateNetworksResponse, ListSubnetsResponse, ListVPCsResponse, PrivateNetwork, Route, SetSubnetsRequest, SetSubnetsResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen';
3
3
  export declare const unmarshalPrivateNetwork: (data: unknown) => PrivateNetwork;
4
4
  export declare const unmarshalRoute: (data: unknown) => Route;
5
5
  export declare const unmarshalVPC: (data: unknown) => VPC;
@@ -14,7 +14,6 @@ export declare const marshalCreatePrivateNetworkRequest: (request: CreatePrivate
14
14
  export declare const marshalCreateRouteRequest: (request: CreateRouteRequest, defaults: DefaultValues) => Record<string, unknown>;
15
15
  export declare const marshalCreateVPCRequest: (request: CreateVPCRequest, defaults: DefaultValues) => Record<string, unknown>;
16
16
  export declare const marshalDeleteSubnetsRequest: (request: DeleteSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
17
- export declare const marshalMigrateZonalPrivateNetworksRequest: (request: MigrateZonalPrivateNetworksRequest, defaults: DefaultValues) => Record<string, unknown>;
18
17
  export declare const marshalSetSubnetsRequest: (request: SetSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
19
18
  export declare const marshalUpdatePrivateNetworkRequest: (request: UpdatePrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
20
19
  export declare const marshalUpdateRouteRequest: (request: UpdateRouteRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -1,6 +1,6 @@
1
1
  import randomName from "@scaleway/random-name";
2
2
  import { isJSONObject } from "../../../helpers/json.js";
3
- import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from "../../../helpers/marshalling.js";
3
+ import { unmarshalDate, unmarshalArrayOfObject } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  const unmarshalSubnet = (data) => {
6
6
  if (!isJSONObject(data)) {
@@ -171,21 +171,6 @@ const marshalCreateVPCRequest = (request, defaults) => ({
171
171
  const marshalDeleteSubnetsRequest = (request, defaults) => ({
172
172
  subnets: request.subnets
173
173
  });
174
- const marshalMigrateZonalPrivateNetworksRequest = (request, defaults) => ({
175
- private_network_ids: request.privateNetworkIds,
176
- ...resolveOneOf([
177
- {
178
- default: defaults.defaultOrganizationId,
179
- param: "organization_id",
180
- value: request.organizationId
181
- },
182
- {
183
- default: defaults.defaultProjectId,
184
- param: "project_id",
185
- value: request.projectId
186
- }
187
- ])
188
- });
189
174
  const marshalSetSubnetsRequest = (request, defaults) => ({
190
175
  subnets: request.subnets
191
176
  });
@@ -210,7 +195,6 @@ export {
210
195
  marshalCreateRouteRequest,
211
196
  marshalCreateVPCRequest,
212
197
  marshalDeleteSubnetsRequest,
213
- marshalMigrateZonalPrivateNetworksRequest,
214
198
  marshalSetSubnetsRequest,
215
199
  marshalUpdatePrivateNetworkRequest,
216
200
  marshalUpdateRouteRequest,
@@ -1,4 +1,4 @@
1
- import type { Region } from '../../../bridge';
1
+ import type { Region as ScwRegion } from '../../../bridge';
2
2
  export type ListPrivateNetworksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
3
3
  export type ListSubnetsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
4
4
  export type ListVPCsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
@@ -28,7 +28,7 @@ export interface PrivateNetwork {
28
28
  /** Scaleway Project the Private Network belongs to. */
29
29
  projectId: string;
30
30
  /** Region in which the Private Network is available. */
31
- region: Region;
31
+ region: ScwRegion;
32
32
  /** Tags of the Private Network. */
33
33
  tags: string[];
34
34
  /** Date the Private Network was created. */
@@ -64,7 +64,7 @@ export interface Route {
64
64
  /** Defines whether the route can be modified or deleted by the user. */
65
65
  isReadOnly: boolean;
66
66
  /** Region of the Route. */
67
- region: Region;
67
+ region: ScwRegion;
68
68
  }
69
69
  export interface VPC {
70
70
  /** VPC ID. */
@@ -76,7 +76,7 @@ export interface VPC {
76
76
  /** Scaleway Project the VPC belongs to. */
77
77
  projectId: string;
78
78
  /** Region of the VPC. */
79
- region: Region;
79
+ region: ScwRegion;
80
80
  /** Tags for the VPC. */
81
81
  tags: string[];
82
82
  /** Defines whether the VPC is the default one for its Project. */
@@ -95,7 +95,7 @@ export type AddSubnetsRequest = {
95
95
  * Region to target. If none is passed will use default region from the
96
96
  * config.
97
97
  */
98
- region?: Region;
98
+ region?: ScwRegion;
99
99
  /** Private Network ID. */
100
100
  privateNetworkId: string;
101
101
  /** Private Network subnets CIDR. */
@@ -109,7 +109,7 @@ export type CreatePrivateNetworkRequest = {
109
109
  * Region to target. If none is passed will use default region from the
110
110
  * config.
111
111
  */
112
- region?: Region;
112
+ region?: ScwRegion;
113
113
  /** Name for the Private Network. */
114
114
  name?: string;
115
115
  /** Scaleway Project in which to create the Private Network. */
@@ -126,7 +126,7 @@ export type CreateRouteRequest = {
126
126
  * Region to target. If none is passed will use default region from the
127
127
  * config.
128
128
  */
129
- region?: Region;
129
+ region?: ScwRegion;
130
130
  /** Route description. */
131
131
  description: string;
132
132
  /** Tags of the Route. */
@@ -145,7 +145,7 @@ export type CreateVPCRequest = {
145
145
  * Region to target. If none is passed will use default region from the
146
146
  * config.
147
147
  */
148
- region?: Region;
148
+ region?: ScwRegion;
149
149
  /** Name for the VPC. */
150
150
  name?: string;
151
151
  /** Scaleway Project in which to create the VPC. */
@@ -160,7 +160,7 @@ export type DeletePrivateNetworkRequest = {
160
160
  * Region to target. If none is passed will use default region from the
161
161
  * config.
162
162
  */
163
- region?: Region;
163
+ region?: ScwRegion;
164
164
  /** Private Network ID. */
165
165
  privateNetworkId: string;
166
166
  };
@@ -169,7 +169,7 @@ export type DeleteRouteRequest = {
169
169
  * Region to target. If none is passed will use default region from the
170
170
  * config.
171
171
  */
172
- region?: Region;
172
+ region?: ScwRegion;
173
173
  /** Route ID. */
174
174
  routeId: string;
175
175
  };
@@ -178,7 +178,7 @@ export type DeleteSubnetsRequest = {
178
178
  * Region to target. If none is passed will use default region from the
179
179
  * config.
180
180
  */
181
- region?: Region;
181
+ region?: ScwRegion;
182
182
  /** Private Network ID. */
183
183
  privateNetworkId: string;
184
184
  /** Private Network subnets CIDR. */
@@ -192,7 +192,7 @@ export type DeleteVPCRequest = {
192
192
  * Region to target. If none is passed will use default region from the
193
193
  * config.
194
194
  */
195
- region?: Region;
195
+ region?: ScwRegion;
196
196
  /** VPC ID. */
197
197
  vpcId: string;
198
198
  };
@@ -201,7 +201,7 @@ export type EnableDHCPRequest = {
201
201
  * Region to target. If none is passed will use default region from the
202
202
  * config.
203
203
  */
204
- region?: Region;
204
+ region?: ScwRegion;
205
205
  /** Private Network ID. */
206
206
  privateNetworkId: string;
207
207
  };
@@ -210,7 +210,7 @@ export type EnableRoutingRequest = {
210
210
  * Region to target. If none is passed will use default region from the
211
211
  * config.
212
212
  */
213
- region?: Region;
213
+ region?: ScwRegion;
214
214
  /** VPC ID. */
215
215
  vpcId: string;
216
216
  };
@@ -219,7 +219,7 @@ export type GetPrivateNetworkRequest = {
219
219
  * Region to target. If none is passed will use default region from the
220
220
  * config.
221
221
  */
222
- region?: Region;
222
+ region?: ScwRegion;
223
223
  /** Private Network ID. */
224
224
  privateNetworkId: string;
225
225
  };
@@ -228,7 +228,7 @@ export type GetRouteRequest = {
228
228
  * Region to target. If none is passed will use default region from the
229
229
  * config.
230
230
  */
231
- region?: Region;
231
+ region?: ScwRegion;
232
232
  /** Route ID. */
233
233
  routeId: string;
234
234
  };
@@ -237,7 +237,7 @@ export type GetVPCRequest = {
237
237
  * Region to target. If none is passed will use default region from the
238
238
  * config.
239
239
  */
240
- region?: Region;
240
+ region?: ScwRegion;
241
241
  /** VPC ID. */
242
242
  vpcId: string;
243
243
  };
@@ -246,7 +246,7 @@ export type ListPrivateNetworksRequest = {
246
246
  * Region to target. If none is passed will use default region from the
247
247
  * config.
248
248
  */
249
- region?: Region;
249
+ region?: ScwRegion;
250
250
  /** Sort order of the returned Private Networks. */
251
251
  orderBy?: ListPrivateNetworksRequestOrderBy;
252
252
  /** Page number to return, from the paginated results. */
@@ -298,7 +298,7 @@ export type ListSubnetsRequest = {
298
298
  * Region to target. If none is passed will use default region from the
299
299
  * config.
300
300
  */
301
- region?: Region;
301
+ region?: ScwRegion;
302
302
  /** Sort order of the returned subnets. */
303
303
  orderBy?: ListSubnetsRequestOrderBy;
304
304
  /** Page number to return, from the paginated results. */
@@ -332,7 +332,7 @@ export type ListVPCsRequest = {
332
332
  * Region to target. If none is passed will use default region from the
333
333
  * config.
334
334
  */
335
- region?: Region;
335
+ region?: ScwRegion;
336
336
  /** Sort order of the returned VPCs. */
337
337
  orderBy?: ListVPCsRequestOrderBy;
338
338
  /** Page number to return, from the paginated results. */
@@ -374,37 +374,12 @@ export interface ListVPCsResponse {
374
374
  vpcs: VPC[];
375
375
  totalCount: number;
376
376
  }
377
- export type MigrateZonalPrivateNetworksRequest = {
378
- /**
379
- * Region to target. If none is passed will use default region from the
380
- * config.
381
- */
382
- region?: Region;
383
- /**
384
- * Organization ID to target. The specified zoned Private Networks within this
385
- * Organization will be migrated to regional.
386
- *
387
- * One-of ('scope'): at most one of 'organizationId', 'projectId' could be
388
- * set.
389
- */
390
- organizationId?: string;
391
- /**
392
- * Project to target. The specified zoned Private Networks within this Project
393
- * will be migrated to regional.
394
- *
395
- * One-of ('scope'): at most one of 'organizationId', 'projectId' could be
396
- * set.
397
- */
398
- projectId?: string;
399
- /** IDs of the Private Networks to migrate. */
400
- privateNetworkIds?: string[];
401
- };
402
377
  export type SetSubnetsRequest = {
403
378
  /**
404
379
  * Region to target. If none is passed will use default region from the
405
380
  * config.
406
381
  */
407
- region?: Region;
382
+ region?: ScwRegion;
408
383
  /** Private Network ID. */
409
384
  privateNetworkId: string;
410
385
  /** Private Network subnets CIDR. */
@@ -418,7 +393,7 @@ export type UpdatePrivateNetworkRequest = {
418
393
  * Region to target. If none is passed will use default region from the
419
394
  * config.
420
395
  */
421
- region?: Region;
396
+ region?: ScwRegion;
422
397
  /** Private Network ID. */
423
398
  privateNetworkId: string;
424
399
  /** Name for the Private Network. */
@@ -431,7 +406,7 @@ export type UpdateRouteRequest = {
431
406
  * Region to target. If none is passed will use default region from the
432
407
  * config.
433
408
  */
434
- region?: Region;
409
+ region?: ScwRegion;
435
410
  /** Route ID. */
436
411
  routeId: string;
437
412
  /** Route description. */
@@ -450,7 +425,7 @@ export type UpdateVPCRequest = {
450
425
  * Region to target. If none is passed will use default region from the
451
426
  * config.
452
427
  */
453
- region?: Region;
428
+ region?: ScwRegion;
454
429
  /** VPC ID. */
455
430
  vpcId: string;
456
431
  /** Name for the VPC. */
@@ -12,7 +12,11 @@ const jsonContentHeaders = {
12
12
  };
13
13
  class ControlPanelAPI extends api.API {
14
14
  /** Lists the available regions of the API. */
15
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
15
+ static LOCALITIES = [
16
+ "fr-par",
17
+ "nl-ams",
18
+ "pl-waw"
19
+ ];
16
20
  pageOfListControlPanels = (request = {}) => this.client.fetch(
17
21
  {
18
22
  method: "GET",
@@ -37,7 +41,11 @@ class ControlPanelAPI extends api.API {
37
41
  }
38
42
  class DatabaseAPI extends api.API {
39
43
  /** Lists the available regions of the API. */
40
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
44
+ static LOCALITIES = [
45
+ "fr-par",
46
+ "nl-ams",
47
+ "pl-waw"
48
+ ];
41
49
  /**
42
50
  * "Create a new database within your hosting plan".
43
51
  *
@@ -238,7 +246,11 @@ class DatabaseAPI extends api.API {
238
246
  }
239
247
  class DnsAPI extends api.API {
240
248
  /** Lists the available regions of the API. */
241
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
249
+ static LOCALITIES = [
250
+ "fr-par",
251
+ "nl-ams",
252
+ "pl-waw"
253
+ ];
242
254
  /**
243
255
  * Get DNS records. Get the set of DNS records of a specified domain
244
256
  * associated with a Web Hosting plan's domain.
@@ -254,7 +266,8 @@ class DnsAPI extends api.API {
254
266
  marshalling_gen.unmarshalDnsRecords
255
267
  );
256
268
  /**
257
- * "Check whether you own this domain or not.".
269
+ * Check whether you own this domain or not.. Check whether you own this
270
+ * domain or not.
258
271
  *
259
272
  * @param request - The request {@link DnsApiCheckUserOwnsDomainRequest}
260
273
  * @returns A Promise of CheckUserOwnsDomainResponse
@@ -274,7 +287,8 @@ class DnsAPI extends api.API {
274
287
  marshalling_gen.unmarshalCheckUserOwnsDomainResponse
275
288
  );
276
289
  /**
277
- * "Synchronize your DNS records on the Elements Console and on cPanel.".
290
+ * Synchronize your DNS records on the Elements Console and on cPanel..
291
+ * Synchronize your DNS records on the Elements Console and on cPanel.
278
292
  *
279
293
  * @param request - The request {@link DnsApiSyncDomainDnsRecordsRequest}
280
294
  * @returns A Promise of DnsRecords
@@ -293,10 +307,68 @@ class DnsAPI extends api.API {
293
307
  },
294
308
  marshalling_gen.unmarshalDnsRecords
295
309
  );
310
+ /**
311
+ * Search for available domains based on domain name.. Search for available
312
+ * domains based on domain name.
313
+ *
314
+ * @param request - The request {@link DnsApiSearchDomainsRequest}
315
+ * @returns A Promise of SearchDomainsResponse
316
+ */
317
+ searchDomains = (request) => this.client.fetch(
318
+ {
319
+ method: "GET",
320
+ path: `/webhosting/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/search-domains`,
321
+ urlParams: marshalling.urlParams(
322
+ ["domain_name", request.domainName],
323
+ [
324
+ "project_id",
325
+ request.projectId ?? this.client.settings.defaultProjectId
326
+ ]
327
+ )
328
+ },
329
+ marshalling_gen.unmarshalSearchDomainsResponse
330
+ );
331
+ /**
332
+ * Retrieve detailed information about a specific domain, including its
333
+ * status, DNS configuration, and ownership.. Retrieve detailed information
334
+ * about a specific domain, including its status, DNS configuration, and
335
+ * ownership.
336
+ *
337
+ * @param request - The request {@link DnsApiGetDomainRequest}
338
+ * @returns A Promise of Domain
339
+ */
340
+ getDomain = (request) => this.client.fetch(
341
+ {
342
+ method: "GET",
343
+ path: `/webhosting/v1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/domains/${marshalling.validatePathParam("domainName", request.domainName)}`,
344
+ urlParams: marshalling.urlParams([
345
+ "project_id",
346
+ request.projectId ?? this.client.settings.defaultProjectId
347
+ ])
348
+ },
349
+ marshalling_gen.unmarshalDomain
350
+ );
351
+ /**
352
+ * Waits for {@link Domain} to be in a final state.
353
+ *
354
+ * @param request - The request {@link DnsApiGetDomainRequest}
355
+ * @param options - The waiting options
356
+ * @returns A Promise of Domain
357
+ */
358
+ waitForDomain = (request, options) => intervalRetrier.waitForResource(
359
+ options?.stop ?? ((res) => Promise.resolve(!content_gen.DOMAIN_TRANSIENT_STATUSES.includes(res.status))),
360
+ this.getDomain,
361
+ request,
362
+ options
363
+ );
296
364
  }
297
365
  class OfferAPI extends api.API {
298
366
  /** Lists the available regions of the API. */
299
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
367
+ static LOCALITIES = [
368
+ "fr-par",
369
+ "nl-ams",
370
+ "pl-waw"
371
+ ];
300
372
  pageOfListOffers = (request = {}) => this.client.fetch(
301
373
  {
302
374
  method: "GET",
@@ -325,7 +397,11 @@ class OfferAPI extends api.API {
325
397
  }
326
398
  class HostingAPI extends api.API {
327
399
  /** Lists the available regions of the API. */
328
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
400
+ static LOCALITIES = [
401
+ "fr-par",
402
+ "nl-ams",
403
+ "pl-waw"
404
+ ];
329
405
  /**
330
406
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
331
407
  * type required via the `offer_id` parameter.
@@ -483,7 +559,11 @@ class HostingAPI extends api.API {
483
559
  }
484
560
  class FtpAccountAPI extends api.API {
485
561
  /** Lists the available regions of the API. */
486
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
562
+ static LOCALITIES = [
563
+ "fr-par",
564
+ "nl-ams",
565
+ "pl-waw"
566
+ ];
487
567
  /**
488
568
  * Create a new FTP account within your hosting plan.. Create a new FTP
489
569
  * account within your hosting plan.
@@ -560,7 +640,11 @@ class FtpAccountAPI extends api.API {
560
640
  }
561
641
  class MailAccountAPI extends api.API {
562
642
  /** Lists the available regions of the API. */
563
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
643
+ static LOCALITIES = [
644
+ "fr-par",
645
+ "nl-ams",
646
+ "pl-waw"
647
+ ];
564
648
  /**
565
649
  * Create a new mail account within your hosting plan.. Create a new mail
566
650
  * account within your hosting plan.
@@ -652,7 +736,11 @@ class MailAccountAPI extends api.API {
652
736
  }
653
737
  class WebsiteAPI extends api.API {
654
738
  /** Lists the available regions of the API. */
655
- static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
739
+ static LOCALITIES = [
740
+ "fr-par",
741
+ "nl-ams",
742
+ "pl-waw"
743
+ ];
656
744
  pageOfListWebsites = (request) => this.client.fetch(
657
745
  {
658
746
  method: "GET",