@scaleway/sdk-vpc 2.5.0 → 2.6.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.
@@ -0,0 +1,3 @@
1
+ # Licenses
2
+
3
+ The app does not bundle any dependencies with licenses.
@@ -2,11 +2,11 @@
2
2
  * This file is automatically generated
3
3
  * PLEASE DO NOT EDIT HERE
4
4
  */
5
- export type Metadata = {
6
- name: string;
7
- namespace: string;
8
- displayName: string;
9
- versions: string[];
5
+ export declare const pkgMetadata: {
6
+ readonly name: "@scaleway/sdk-vpc";
7
+ readonly namespace: "vpc";
8
+ readonly displayName: "Vpc";
9
+ readonly versions: readonly ["v2"];
10
10
  };
11
- export declare const pkgMetadata: Metadata;
11
+ export type Metadata = typeof pkgMetadata;
12
12
  export default pkgMetadata;
@@ -1,9 +1,13 @@
1
- import metadata_gen_default from "./metadata2.gen.js";
2
1
  //#region src/metadata.gen.ts
3
2
  /**
4
3
  * This file is automatically generated
5
4
  * PLEASE DO NOT EDIT HERE
6
5
  */
7
- var pkgMetadata = metadata_gen_default;
6
+ const pkgMetadata = {
7
+ name: "@scaleway/sdk-vpc",
8
+ namespace: "vpc",
9
+ displayName: "Vpc",
10
+ versions: ["v2"]
11
+ };
8
12
  //#endregion
9
13
  export { pkgMetadata as default, pkgMetadata };
@@ -1,337 +1,174 @@
1
1
  import { marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCConnectorRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCConnectorRequest, marshalUpdateVPCRequest, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetOverlapsResponse, unmarshalListSubnetsResponse, unmarshalListVPCConnectorsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC, unmarshalVPCConnector } from "./marshalling.gen.js";
2
2
  import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
3
  //#region src/v2/api.gen.ts
4
- var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
+ const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
5
  /**
6
6
  * VPC API.
7
7
 
8
8
  This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks.
9
9
  */
10
10
  var API = class extends API$1 {
11
- /**
12
- * Locality of this API.
13
- * type {'zone','region','global','unspecified'}
14
- */
15
- static LOCALITY = toApiLocality({ regions: [
16
- "fr-par",
17
- "nl-ams",
18
- "pl-waw"
19
- ] });
20
- pageOfListVPCs = (request = {}) => this.client.fetch({
21
- method: "GET",
22
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs`,
23
- urlParams: urlParams(["is_default", request.isDefault], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["routing_enabled", request.routingEnabled], ["tags", request.tags])
24
- }, unmarshalListVPCsResponse);
25
- /**
26
- * List VPCs. List existing VPCs in the specified region.
27
- *
28
- * @param request - The request {@link ListVPCsRequest}
29
- * @returns A Promise of ListVPCsResponse
30
- */
31
- listVPCs = (request = {}) => enrichForPagination("vpcs", this.pageOfListVPCs, request);
32
- /**
33
- * Create a VPC. Create a new VPC in the specified region.
34
- *
35
- * @param request - The request {@link CreateVPCRequest}
36
- * @returns A Promise of VPC
37
- */
38
- createVPC = (request) => this.client.fetch({
39
- body: JSON.stringify(marshalCreateVPCRequest(request, this.client.settings)),
40
- headers: jsonContentHeaders,
41
- method: "POST",
42
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs`
43
- }, unmarshalVPC);
44
- /**
45
- * Get a VPC. Retrieve details of an existing VPC, specified by its VPC ID.
46
- *
47
- * @param request - The request {@link GetVPCRequest}
48
- * @returns A Promise of VPC
49
- */
50
- getVPC = (request) => this.client.fetch({
51
- method: "GET",
52
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}`
53
- }, unmarshalVPC);
54
- /**
55
- * Update VPC. Update parameters including name and tags of the specified VPC.
56
- *
57
- * @param request - The request {@link UpdateVPCRequest}
58
- * @returns A Promise of VPC
59
- */
60
- updateVPC = (request) => this.client.fetch({
61
- body: JSON.stringify(marshalUpdateVPCRequest(request, this.client.settings)),
62
- headers: jsonContentHeaders,
63
- method: "PATCH",
64
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}`
65
- }, unmarshalVPC);
66
- /**
67
- * Delete a VPC. Delete a VPC specified by its VPC ID.
68
- *
69
- * @param request - The request {@link DeleteVPCRequest}
70
- */
71
- deleteVPC = (request) => this.client.fetch({
72
- method: "DELETE",
73
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}`
74
- });
75
- pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
76
- method: "GET",
77
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks`,
78
- urlParams: urlParams(["dhcp_enabled", request.dhcpEnabled], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["private_network_ids", request.privateNetworkIds], ["project_id", request.projectId], ["tags", request.tags], ["vpc_id", request.vpcId])
79
- }, unmarshalListPrivateNetworksResponse);
80
- /**
81
- * List Private Networks. List existing Private Networks in the specified region. By default, the Private Networks returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
82
- *
83
- * @param request - The request {@link ListPrivateNetworksRequest}
84
- * @returns A Promise of ListPrivateNetworksResponse
85
- */
86
- listPrivateNetworks = (request = {}) => enrichForPagination("privateNetworks", this.pageOfListPrivateNetworks, request);
87
- /**
88
- * Create a Private Network. Create a new Private Network. Once created, you can attach Scaleway resources which are in the same region.
89
- *
90
- * @param request - The request {@link CreatePrivateNetworkRequest}
91
- * @returns A Promise of PrivateNetwork
92
- */
93
- createPrivateNetwork = (request) => this.client.fetch({
94
- body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, this.client.settings)),
95
- headers: jsonContentHeaders,
96
- method: "POST",
97
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks`
98
- }, unmarshalPrivateNetwork);
99
- /**
100
- * Get a Private Network. Retrieve information about an existing Private Network, specified by its Private Network ID. Its full details are returned in the response object.
101
- *
102
- * @param request - The request {@link GetPrivateNetworkRequest}
103
- * @returns A Promise of PrivateNetwork
104
- */
105
- getPrivateNetwork = (request) => this.client.fetch({
106
- method: "GET",
107
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
108
- }, unmarshalPrivateNetwork);
109
- /**
110
- * Update Private Network. Update parameters (such as name or tags) of an existing Private Network, specified by its Private Network ID.
111
- *
112
- * @param request - The request {@link UpdatePrivateNetworkRequest}
113
- * @returns A Promise of PrivateNetwork
114
- */
115
- updatePrivateNetwork = (request) => this.client.fetch({
116
- body: JSON.stringify(marshalUpdatePrivateNetworkRequest(request, this.client.settings)),
117
- headers: jsonContentHeaders,
118
- method: "PATCH",
119
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
120
- }, unmarshalPrivateNetwork);
121
- /**
122
- * Delete a Private Network. Delete an existing Private Network. Note that you must first detach all resources from the network, in order to delete it.
123
- *
124
- * @param request - The request {@link DeletePrivateNetworkRequest}
125
- */
126
- deletePrivateNetwork = (request) => this.client.fetch({
127
- method: "DELETE",
128
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
129
- });
130
- /**
131
- * Enable DHCP on a Private Network. Enable DHCP managed on an existing Private Network. Note that you will not be able to deactivate it afterwards.
132
- *
133
- * @param request - The request {@link EnableDHCPRequest}
134
- * @returns A Promise of PrivateNetwork
135
- */
136
- enableDHCP = (request) => this.client.fetch({
137
- body: "{}",
138
- headers: jsonContentHeaders,
139
- method: "POST",
140
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/enable-dhcp`
141
- }, unmarshalPrivateNetwork);
142
- /**
143
- * Enable routing on a VPC. Enable routing on an existing VPC. Note that you will not be able to deactivate it afterwards.
144
- *
145
- * @param request - The request {@link EnableRoutingRequest}
146
- * @returns A Promise of VPC
147
- */
148
- enableRouting = (request) => this.client.fetch({
149
- body: "{}",
150
- headers: jsonContentHeaders,
151
- method: "POST",
152
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/enable-routing`
153
- }, unmarshalVPC);
154
- /**
155
- * Enable custom routes propagation on a VPC. Enable custom routes propagation on an existing VPC. Note that you will not be able to deactivate it afterwards.
156
- *
157
- * @param request - The request {@link EnableCustomRoutesPropagationRequest}
158
- * @returns A Promise of VPC
159
- */
160
- enableCustomRoutesPropagation = (request) => this.client.fetch({
161
- body: "{}",
162
- headers: jsonContentHeaders,
163
- method: "POST",
164
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/enable-custom-routes-propagation`
165
- }, unmarshalVPC);
166
- pageOfListSubnets = (request = {}) => this.client.fetch({
167
- method: "GET",
168
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subnets`,
169
- urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["subnet_ids", request.subnetIds], ["vpc_id", request.vpcId])
170
- }, unmarshalListSubnetsResponse);
171
- /**
172
- * List subnets. List any Private Network's subnets. See ListPrivateNetworks to list a specific Private Network's subnets.
173
- *
174
- * @param request - The request {@link ListSubnetsRequest}
175
- * @returns A Promise of ListSubnetsResponse
176
- */
177
- listSubnets = (request = {}) => enrichForPagination("subnets", this.pageOfListSubnets, request);
178
- /**
179
- * Add subnets to a Private Network. Add new subnets to an existing Private Network.
180
- *
181
- * @param request - The request {@link AddSubnetsRequest}
182
- * @returns A Promise of AddSubnetsResponse
183
- */
184
- addSubnets = (request) => this.client.fetch({
185
- body: JSON.stringify(marshalAddSubnetsRequest(request, this.client.settings)),
186
- headers: jsonContentHeaders,
187
- method: "POST",
188
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/subnets`
189
- }, unmarshalAddSubnetsResponse);
190
- /**
191
- * Delete subnets from a Private Network. Delete the specified subnets from a Private Network.
192
- *
193
- * @param request - The request {@link DeleteSubnetsRequest}
194
- * @returns A Promise of DeleteSubnetsResponse
195
- */
196
- deleteSubnets = (request) => this.client.fetch({
197
- body: JSON.stringify(marshalDeleteSubnetsRequest(request, this.client.settings)),
198
- headers: jsonContentHeaders,
199
- method: "DELETE",
200
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/subnets`
201
- }, unmarshalDeleteSubnetsResponse);
202
- /**
203
- * Create a Route. Create a new custom Route.
204
- *
205
- * @param request - The request {@link CreateRouteRequest}
206
- * @returns A Promise of Route
207
- */
208
- createRoute = (request) => this.client.fetch({
209
- body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
210
- headers: jsonContentHeaders,
211
- method: "POST",
212
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`
213
- }, unmarshalRoute);
214
- /**
215
- * Get a Route. Retrieve details of an existing Route, specified by its Route ID.
216
- *
217
- * @param request - The request {@link GetRouteRequest}
218
- * @returns A Promise of Route
219
- */
220
- getRoute = (request) => this.client.fetch({
221
- method: "GET",
222
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
223
- }, unmarshalRoute);
224
- /**
225
- * Update Route. Update parameters of the specified Route.
226
- *
227
- * @param request - The request {@link UpdateRouteRequest}
228
- * @returns A Promise of Route
229
- */
230
- updateRoute = (request) => this.client.fetch({
231
- body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
232
- headers: jsonContentHeaders,
233
- method: "PATCH",
234
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
235
- }, unmarshalRoute);
236
- /**
237
- * Delete a Route. Delete a Route specified by its Route ID.
238
- *
239
- * @param request - The request {@link DeleteRouteRequest}
240
- */
241
- deleteRoute = (request) => this.client.fetch({
242
- method: "DELETE",
243
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
244
- });
245
- /**
246
- * Get ACL Rules for VPC. Retrieve a list of ACL rules for a VPC, specified by its VPC ID.
247
- *
248
- * @param request - The request {@link GetAclRequest}
249
- * @returns A Promise of GetAclResponse
250
- */
251
- getAcl = (request) => this.client.fetch({
252
- method: "GET",
253
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/acl-rules`,
254
- urlParams: urlParams(["is_ipv6", request.isIpv6])
255
- }, unmarshalGetAclResponse);
256
- /**
257
- * Set VPC ACL rules. Set the list of ACL rules and the default routing policy for a VPC.
258
- *
259
- * @param request - The request {@link SetAclRequest}
260
- * @returns A Promise of SetAclResponse
261
- */
262
- setAcl = (request) => this.client.fetch({
263
- body: JSON.stringify(marshalSetAclRequest(request, this.client.settings)),
264
- headers: jsonContentHeaders,
265
- method: "PUT",
266
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/acl-rules`
267
- }, unmarshalSetAclResponse);
268
- pageOfListVPCConnectors = (request = {}) => this.client.fetch({
269
- method: "GET",
270
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors`,
271
- urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["status", request.status], ["tags", request.tags], ["target_vpc_id", request.targetVpcId], ["vpc_id", request.vpcId])
272
- }, unmarshalListVPCConnectorsResponse);
273
- /**
274
- * List VPC connectors. List existing VPC connectors in the specified region.
275
- *
276
- * @param request - The request {@link ListVPCConnectorsRequest}
277
- * @returns A Promise of ListVPCConnectorsResponse
278
- */
279
- listVPCConnectors = (request = {}) => enrichForPagination("vpcConnectors", this.pageOfListVPCConnectors, request);
280
- /**
281
- * Create a VPC connector. Create a new VPC connector in the specified region.
282
- *
283
- * @param request - The request {@link CreateVPCConnectorRequest}
284
- * @returns A Promise of VPCConnector
285
- */
286
- createVPCConnector = (request) => this.client.fetch({
287
- body: JSON.stringify(marshalCreateVPCConnectorRequest(request, this.client.settings)),
288
- headers: jsonContentHeaders,
289
- method: "POST",
290
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors`
291
- }, unmarshalVPCConnector);
292
- /**
293
- * Get a VPC connector. Retrieve details of an existing VPC connector, specified by its VPC connector ID.
294
- *
295
- * @param request - The request {@link GetVPCConnectorRequest}
296
- * @returns A Promise of VPCConnector
297
- */
298
- getVPCConnector = (request) => this.client.fetch({
299
- method: "GET",
300
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}`
301
- }, unmarshalVPCConnector);
302
- /**
303
- * Update VPC connector. Update parameters including name and tags of the specified VPC connector.
304
- *
305
- * @param request - The request {@link UpdateVPCConnectorRequest}
306
- * @returns A Promise of VPCConnector
307
- */
308
- updateVPCConnector = (request) => this.client.fetch({
309
- body: JSON.stringify(marshalUpdateVPCConnectorRequest(request, this.client.settings)),
310
- headers: jsonContentHeaders,
311
- method: "PATCH",
312
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}`
313
- }, unmarshalVPCConnector);
314
- /**
315
- * Delete a VPC connector. Delete a VPC connector specified by its VPC connector ID.
316
- *
317
- * @param request - The request {@link DeleteVPCConnectorRequest}
318
- */
319
- deleteVPCConnector = (request) => this.client.fetch({
320
- method: "DELETE",
321
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}`
322
- });
323
- pageOfListSubnetOverlaps = (request) => this.client.fetch({
324
- method: "GET",
325
- path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}/subnet-overlaps`,
326
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
327
- }, unmarshalListSubnetOverlapsResponse);
328
- /**
329
- * List subnet overlaps.. List subnet overlaps between the VPCConnector VPC and the target VPC or for a specific subnet if specified.
330
- *
331
- * @param request - The request {@link ListSubnetOverlapsRequest}
332
- * @returns A Promise of ListSubnetOverlapsResponse
333
- */
334
- listSubnetOverlaps = (request) => enrichForPagination("subnetOverlaps", this.pageOfListSubnetOverlaps, request);
11
+ constructor(..._args) {
12
+ super(..._args);
13
+ this.pageOfListVPCs = (request = {}) => this.client.fetch({
14
+ method: "GET",
15
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs`,
16
+ urlParams: urlParams(["is_default", request.isDefault], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["routing_enabled", request.routingEnabled], ["tags", request.tags])
17
+ }, unmarshalListVPCsResponse);
18
+ this.listVPCs = (request = {}) => enrichForPagination("vpcs", this.pageOfListVPCs, request);
19
+ this.createVPC = (request) => this.client.fetch({
20
+ body: JSON.stringify(marshalCreateVPCRequest(request, this.client.settings)),
21
+ headers: jsonContentHeaders,
22
+ method: "POST",
23
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs`
24
+ }, unmarshalVPC);
25
+ this.getVPC = (request) => this.client.fetch({
26
+ method: "GET",
27
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}`
28
+ }, unmarshalVPC);
29
+ this.updateVPC = (request) => this.client.fetch({
30
+ body: JSON.stringify(marshalUpdateVPCRequest(request, this.client.settings)),
31
+ headers: jsonContentHeaders,
32
+ method: "PATCH",
33
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}`
34
+ }, unmarshalVPC);
35
+ this.deleteVPC = (request) => this.client.fetch({
36
+ method: "DELETE",
37
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}`
38
+ });
39
+ this.pageOfListPrivateNetworks = (request = {}) => this.client.fetch({
40
+ method: "GET",
41
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks`,
42
+ urlParams: urlParams(["dhcp_enabled", request.dhcpEnabled], ["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["private_network_ids", request.privateNetworkIds], ["project_id", request.projectId], ["tags", request.tags], ["vpc_id", request.vpcId])
43
+ }, unmarshalListPrivateNetworksResponse);
44
+ this.listPrivateNetworks = (request = {}) => enrichForPagination("privateNetworks", this.pageOfListPrivateNetworks, request);
45
+ this.createPrivateNetwork = (request) => this.client.fetch({
46
+ body: JSON.stringify(marshalCreatePrivateNetworkRequest(request, this.client.settings)),
47
+ headers: jsonContentHeaders,
48
+ method: "POST",
49
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks`
50
+ }, unmarshalPrivateNetwork);
51
+ this.getPrivateNetwork = (request) => this.client.fetch({
52
+ method: "GET",
53
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
54
+ }, unmarshalPrivateNetwork);
55
+ this.updatePrivateNetwork = (request) => this.client.fetch({
56
+ body: JSON.stringify(marshalUpdatePrivateNetworkRequest(request, this.client.settings)),
57
+ headers: jsonContentHeaders,
58
+ method: "PATCH",
59
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
60
+ }, unmarshalPrivateNetwork);
61
+ this.deletePrivateNetwork = (request) => this.client.fetch({
62
+ method: "DELETE",
63
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}`
64
+ });
65
+ this.enableDHCP = (request) => this.client.fetch({
66
+ body: "{}",
67
+ headers: jsonContentHeaders,
68
+ method: "POST",
69
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/enable-dhcp`
70
+ }, unmarshalPrivateNetwork);
71
+ this.enableRouting = (request) => this.client.fetch({
72
+ body: "{}",
73
+ headers: jsonContentHeaders,
74
+ method: "POST",
75
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/enable-routing`
76
+ }, unmarshalVPC);
77
+ this.enableCustomRoutesPropagation = (request) => this.client.fetch({
78
+ body: "{}",
79
+ headers: jsonContentHeaders,
80
+ method: "POST",
81
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/enable-custom-routes-propagation`
82
+ }, unmarshalVPC);
83
+ this.pageOfListSubnets = (request = {}) => this.client.fetch({
84
+ method: "GET",
85
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/subnets`,
86
+ urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["subnet_ids", request.subnetIds], ["vpc_id", request.vpcId])
87
+ }, unmarshalListSubnetsResponse);
88
+ this.listSubnets = (request = {}) => enrichForPagination("subnets", this.pageOfListSubnets, request);
89
+ this.addSubnets = (request) => this.client.fetch({
90
+ body: JSON.stringify(marshalAddSubnetsRequest(request, this.client.settings)),
91
+ headers: jsonContentHeaders,
92
+ method: "POST",
93
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/subnets`
94
+ }, unmarshalAddSubnetsResponse);
95
+ this.deleteSubnets = (request) => this.client.fetch({
96
+ body: JSON.stringify(marshalDeleteSubnetsRequest(request, this.client.settings)),
97
+ headers: jsonContentHeaders,
98
+ method: "DELETE",
99
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam("privateNetworkId", request.privateNetworkId)}/subnets`
100
+ }, unmarshalDeleteSubnetsResponse);
101
+ this.createRoute = (request) => this.client.fetch({
102
+ body: JSON.stringify(marshalCreateRouteRequest(request, this.client.settings)),
103
+ headers: jsonContentHeaders,
104
+ method: "POST",
105
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes`
106
+ }, unmarshalRoute);
107
+ this.getRoute = (request) => this.client.fetch({
108
+ method: "GET",
109
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
110
+ }, unmarshalRoute);
111
+ this.updateRoute = (request) => this.client.fetch({
112
+ body: JSON.stringify(marshalUpdateRouteRequest(request, this.client.settings)),
113
+ headers: jsonContentHeaders,
114
+ method: "PATCH",
115
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
116
+ }, unmarshalRoute);
117
+ this.deleteRoute = (request) => this.client.fetch({
118
+ method: "DELETE",
119
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routes/${validatePathParam("routeId", request.routeId)}`
120
+ });
121
+ this.getAcl = (request) => this.client.fetch({
122
+ method: "GET",
123
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/acl-rules`,
124
+ urlParams: urlParams(["is_ipv6", request.isIpv6])
125
+ }, unmarshalGetAclResponse);
126
+ this.setAcl = (request) => this.client.fetch({
127
+ body: JSON.stringify(marshalSetAclRequest(request, this.client.settings)),
128
+ headers: jsonContentHeaders,
129
+ method: "PUT",
130
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/acl-rules`
131
+ }, unmarshalSetAclResponse);
132
+ this.pageOfListVPCConnectors = (request = {}) => this.client.fetch({
133
+ method: "GET",
134
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors`,
135
+ urlParams: urlParams(["name", request.name], ["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["status", request.status], ["tags", request.tags], ["target_vpc_id", request.targetVpcId], ["vpc_id", request.vpcId])
136
+ }, unmarshalListVPCConnectorsResponse);
137
+ this.listVPCConnectors = (request = {}) => enrichForPagination("vpcConnectors", this.pageOfListVPCConnectors, request);
138
+ this.createVPCConnector = (request) => this.client.fetch({
139
+ body: JSON.stringify(marshalCreateVPCConnectorRequest(request, this.client.settings)),
140
+ headers: jsonContentHeaders,
141
+ method: "POST",
142
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors`
143
+ }, unmarshalVPCConnector);
144
+ this.getVPCConnector = (request) => this.client.fetch({
145
+ method: "GET",
146
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}`
147
+ }, unmarshalVPCConnector);
148
+ this.updateVPCConnector = (request) => this.client.fetch({
149
+ body: JSON.stringify(marshalUpdateVPCConnectorRequest(request, this.client.settings)),
150
+ headers: jsonContentHeaders,
151
+ method: "PATCH",
152
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}`
153
+ }, unmarshalVPCConnector);
154
+ this.deleteVPCConnector = (request) => this.client.fetch({
155
+ method: "DELETE",
156
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}`
157
+ });
158
+ this.pageOfListSubnetOverlaps = (request) => this.client.fetch({
159
+ method: "GET",
160
+ path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpc-connectors/${validatePathParam("vpcConnectorId", request.vpcConnectorId)}/subnet-overlaps`,
161
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
162
+ }, unmarshalListSubnetOverlapsResponse);
163
+ this.listSubnetOverlaps = (request) => enrichForPagination("subnetOverlaps", this.pageOfListSubnetOverlaps, request);
164
+ }
165
+ static {
166
+ this.LOCALITY = toApiLocality({ regions: [
167
+ "fr-par",
168
+ "nl-ams",
169
+ "pl-waw"
170
+ ] });
171
+ }
335
172
  };
336
173
  //#endregion
337
174
  export { API };
@@ -1,7 +1,7 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
2
  import randomName from "@scaleway/random-name";
3
3
  //#region src/v2/marshalling.gen.ts
4
- var unmarshalSubnet = (data) => {
4
+ const unmarshalSubnet = (data) => {
5
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Subnet' failed as data isn't a dictionary.`);
6
6
  return {
7
7
  createdAt: unmarshalDate(data.created_at),
@@ -13,7 +13,7 @@ var unmarshalSubnet = (data) => {
13
13
  vpcId: data.vpc_id
14
14
  };
15
15
  };
16
- var unmarshalPrivateNetwork = (data) => {
16
+ const unmarshalPrivateNetwork = (data) => {
17
17
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
18
18
  return {
19
19
  createdAt: unmarshalDate(data.created_at),
@@ -30,7 +30,7 @@ var unmarshalPrivateNetwork = (data) => {
30
30
  vpcId: data.vpc_id
31
31
  };
32
32
  };
33
- var unmarshalRoute = (data) => {
33
+ const unmarshalRoute = (data) => {
34
34
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
35
35
  return {
36
36
  createdAt: unmarshalDate(data.created_at),
@@ -48,7 +48,7 @@ var unmarshalRoute = (data) => {
48
48
  vpcId: data.vpc_id
49
49
  };
50
50
  };
51
- var unmarshalVPCConnectorPeerInfo = (data) => {
51
+ const unmarshalVPCConnectorPeerInfo = (data) => {
52
52
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VPCConnectorPeerInfo' failed as data isn't a dictionary.`);
53
53
  return {
54
54
  organizationId: data.organization_id,
@@ -56,7 +56,7 @@ var unmarshalVPCConnectorPeerInfo = (data) => {
56
56
  vpcName: data.vpc_name
57
57
  };
58
58
  };
59
- var unmarshalVPCConnector = (data) => {
59
+ const unmarshalVPCConnector = (data) => {
60
60
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VPCConnector' failed as data isn't a dictionary.`);
61
61
  return {
62
62
  createdAt: unmarshalDate(data.created_at),
@@ -73,7 +73,7 @@ var unmarshalVPCConnector = (data) => {
73
73
  vpcId: data.vpc_id
74
74
  };
75
75
  };
76
- var unmarshalVPC = (data) => {
76
+ const unmarshalVPC = (data) => {
77
77
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VPC' failed as data isn't a dictionary.`);
78
78
  return {
79
79
  createdAt: unmarshalDate(data.created_at),
@@ -90,15 +90,15 @@ var unmarshalVPC = (data) => {
90
90
  updatedAt: unmarshalDate(data.updated_at)
91
91
  };
92
92
  };
93
- var unmarshalAddSubnetsResponse = (data) => {
93
+ const unmarshalAddSubnetsResponse = (data) => {
94
94
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddSubnetsResponse' failed as data isn't a dictionary.`);
95
95
  return { subnets: data.subnets };
96
96
  };
97
- var unmarshalDeleteSubnetsResponse = (data) => {
97
+ const unmarshalDeleteSubnetsResponse = (data) => {
98
98
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteSubnetsResponse' failed as data isn't a dictionary.`);
99
99
  return { subnets: data.subnets };
100
100
  };
101
- var unmarshalAclRule = (data) => {
101
+ const unmarshalAclRule = (data) => {
102
102
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AclRule' failed as data isn't a dictionary.`);
103
103
  return {
104
104
  action: data.action,
@@ -112,21 +112,21 @@ var unmarshalAclRule = (data) => {
112
112
  srcPortLow: data.src_port_low
113
113
  };
114
114
  };
115
- var unmarshalGetAclResponse = (data) => {
115
+ const unmarshalGetAclResponse = (data) => {
116
116
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetAclResponse' failed as data isn't a dictionary.`);
117
117
  return {
118
118
  defaultPolicy: data.default_policy,
119
119
  rules: unmarshalArrayOfObject(data.rules, unmarshalAclRule)
120
120
  };
121
121
  };
122
- var unmarshalListPrivateNetworksResponse = (data) => {
122
+ const unmarshalListPrivateNetworksResponse = (data) => {
123
123
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPrivateNetworksResponse' failed as data isn't a dictionary.`);
124
124
  return {
125
125
  privateNetworks: unmarshalArrayOfObject(data.private_networks, unmarshalPrivateNetwork),
126
126
  totalCount: data.total_count
127
127
  };
128
128
  };
129
- var unmarshalListSubnetOverlapsResponseSubnetOverlap = (data) => {
129
+ const unmarshalListSubnetOverlapsResponseSubnetOverlap = (data) => {
130
130
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubnetOverlapsResponseSubnetOverlap' failed as data isn't a dictionary.`);
131
131
  return {
132
132
  subnet: data.subnet,
@@ -135,43 +135,43 @@ var unmarshalListSubnetOverlapsResponseSubnetOverlap = (data) => {
135
135
  targetSubnetId: data.target_subnet_id
136
136
  };
137
137
  };
138
- var unmarshalListSubnetOverlapsResponse = (data) => {
138
+ const unmarshalListSubnetOverlapsResponse = (data) => {
139
139
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubnetOverlapsResponse' failed as data isn't a dictionary.`);
140
140
  return {
141
141
  subnetOverlaps: unmarshalArrayOfObject(data.subnet_overlaps, unmarshalListSubnetOverlapsResponseSubnetOverlap),
142
142
  totalCount: data.total_count
143
143
  };
144
144
  };
145
- var unmarshalListSubnetsResponse = (data) => {
145
+ const unmarshalListSubnetsResponse = (data) => {
146
146
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubnetsResponse' failed as data isn't a dictionary.`);
147
147
  return {
148
148
  subnets: unmarshalArrayOfObject(data.subnets, unmarshalSubnet),
149
149
  totalCount: data.total_count
150
150
  };
151
151
  };
152
- var unmarshalListVPCConnectorsResponse = (data) => {
152
+ const unmarshalListVPCConnectorsResponse = (data) => {
153
153
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVPCConnectorsResponse' failed as data isn't a dictionary.`);
154
154
  return {
155
155
  totalCount: data.total_count,
156
156
  vpcConnectors: unmarshalArrayOfObject(data.vpc_connectors, unmarshalVPCConnector)
157
157
  };
158
158
  };
159
- var unmarshalListVPCsResponse = (data) => {
159
+ const unmarshalListVPCsResponse = (data) => {
160
160
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVPCsResponse' failed as data isn't a dictionary.`);
161
161
  return {
162
162
  totalCount: data.total_count,
163
163
  vpcs: unmarshalArrayOfObject(data.vpcs, unmarshalVPC)
164
164
  };
165
165
  };
166
- var unmarshalSetAclResponse = (data) => {
166
+ const unmarshalSetAclResponse = (data) => {
167
167
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetAclResponse' failed as data isn't a dictionary.`);
168
168
  return {
169
169
  defaultPolicy: data.default_policy,
170
170
  rules: unmarshalArrayOfObject(data.rules, unmarshalAclRule)
171
171
  };
172
172
  };
173
- var marshalAddSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
174
- var marshalCreatePrivateNetworkRequest = (request, defaults) => ({
173
+ const marshalAddSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
174
+ const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
175
175
  default_route_propagation_enabled: request.defaultRoutePropagationEnabled,
176
176
  name: request.name || randomName("pn"),
177
177
  project_id: request.projectId ?? defaults.defaultProjectId,
@@ -179,7 +179,7 @@ var marshalCreatePrivateNetworkRequest = (request, defaults) => ({
179
179
  tags: request.tags,
180
180
  vpc_id: request.vpcId
181
181
  });
182
- var marshalCreateRouteRequest = (request, defaults) => ({
182
+ const marshalCreateRouteRequest = (request, defaults) => ({
183
183
  description: request.description,
184
184
  destination: request.destination,
185
185
  nexthop_private_network_id: request.nexthopPrivateNetworkId,
@@ -188,20 +188,20 @@ var marshalCreateRouteRequest = (request, defaults) => ({
188
188
  tags: request.tags,
189
189
  vpc_id: request.vpcId
190
190
  });
191
- var marshalCreateVPCConnectorRequest = (request, defaults) => ({
191
+ const marshalCreateVPCConnectorRequest = (request, defaults) => ({
192
192
  name: request.name || randomName("VPCConnector"),
193
193
  tags: request.tags,
194
194
  target_vpc_id: request.targetVpcId,
195
195
  vpc_id: request.vpcId
196
196
  });
197
- var marshalCreateVPCRequest = (request, defaults) => ({
197
+ const marshalCreateVPCRequest = (request, defaults) => ({
198
198
  enable_routing: request.enableRouting,
199
199
  name: request.name || randomName("vpc"),
200
200
  project_id: request.projectId ?? defaults.defaultProjectId,
201
201
  tags: request.tags
202
202
  });
203
- var marshalDeleteSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
204
- var marshalAclRule = (request, defaults) => ({
203
+ const marshalDeleteSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
204
+ const marshalAclRule = (request, defaults) => ({
205
205
  action: request.action,
206
206
  description: request.description,
207
207
  destination: request.destination,
@@ -212,17 +212,17 @@ var marshalAclRule = (request, defaults) => ({
212
212
  src_port_high: request.srcPortHigh,
213
213
  src_port_low: request.srcPortLow
214
214
  });
215
- var marshalSetAclRequest = (request, defaults) => ({
215
+ const marshalSetAclRequest = (request, defaults) => ({
216
216
  default_policy: request.defaultPolicy,
217
217
  is_ipv6: request.isIpv6,
218
218
  rules: request.rules.map((elt) => marshalAclRule(elt, defaults))
219
219
  });
220
- var marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
220
+ const marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
221
221
  default_route_propagation_enabled: request.defaultRoutePropagationEnabled,
222
222
  name: request.name,
223
223
  tags: request.tags
224
224
  });
225
- var marshalUpdateRouteRequest = (request, defaults) => ({
225
+ const marshalUpdateRouteRequest = (request, defaults) => ({
226
226
  description: request.description,
227
227
  destination: request.destination,
228
228
  nexthop_private_network_id: request.nexthopPrivateNetworkId,
@@ -230,11 +230,11 @@ var marshalUpdateRouteRequest = (request, defaults) => ({
230
230
  nexthop_vpc_connector_id: request.nexthopVpcConnectorId,
231
231
  tags: request.tags
232
232
  });
233
- var marshalUpdateVPCConnectorRequest = (request, defaults) => ({
233
+ const marshalUpdateVPCConnectorRequest = (request, defaults) => ({
234
234
  name: request.name,
235
235
  tags: request.tags
236
236
  });
237
- var marshalUpdateVPCRequest = (request, defaults) => ({
237
+ const marshalUpdateVPCRequest = (request, defaults) => ({
238
238
  name: request.name,
239
239
  tags: request.tags
240
240
  });
@@ -1,5 +1,5 @@
1
1
  //#region src/v2/metadata.gen.ts
2
- var queriesMetadata = {
2
+ const queriesMetadata = {
3
3
  namespace: "vpc",
4
4
  version: "v2",
5
5
  folderName: "vpcv2",
@@ -5,20 +5,20 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
5
5
  ListSubnetOverlapsRequest: () => ListSubnetOverlapsRequest,
6
6
  Route: () => Route
7
7
  });
8
- var AclRule = {
8
+ const AclRule = {
9
9
  description: { maxLength: 200 },
10
10
  dstPortHigh: { lessThanOrEqual: 65536 },
11
11
  dstPortLow: { lessThanOrEqual: 65536 },
12
12
  srcPortHigh: { lessThanOrEqual: 65536 },
13
13
  srcPortLow: { lessThanOrEqual: 65536 }
14
14
  };
15
- var ListSubnetOverlapsRequest = {
15
+ const ListSubnetOverlapsRequest = {
16
16
  page: { greaterThanOrEqual: 1 },
17
17
  pageSize: {
18
18
  greaterThanOrEqual: 0,
19
19
  lessThanOrEqual: 1e3
20
20
  }
21
21
  };
22
- var Route = { description: { maxLength: 200 } };
22
+ const Route = { description: { maxLength: 200 } };
23
23
  //#endregion
24
24
  export { AclRule, ListSubnetOverlapsRequest, Route, validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-vpc",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Scaleway SDK vpc",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -35,18 +35,20 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@scaleway/random-name": "5.1.4",
38
- "@scaleway/sdk-std": "2.3.0"
38
+ "@scaleway/sdk-std": "2.4.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@scaleway/sdk-client": "^2.2.2"
41
+ "@repo/configs": "^0.1.1",
42
+ "@scaleway/sdk-client": "^2.3.0"
42
43
  },
43
44
  "devDependencies": {
44
- "@scaleway/sdk-client": "^2.2.2"
45
+ "@repo/configs": "^0.1.1",
46
+ "@scaleway/sdk-client": "^2.3.0"
45
47
  },
46
48
  "scripts": {
47
49
  "package:check": "pnpm publint",
48
- "typecheck": "tsc --noEmit",
49
- "type:generate": "tsc --declaration -p tsconfig.build.json",
50
+ "typecheck": "tsgo --noEmit",
51
+ "type:generate": "tsgo --declaration -p tsconfig.build.json",
50
52
  "build": "vite build --config vite.config.ts && pnpm run type:generate",
51
53
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
52
54
  }
package/LICENSE DELETED
@@ -1,191 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- https://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- Copyright 2019 Scaleway.
180
-
181
- Licensed under the Apache License, Version 2.0 (the "License");
182
- you may not use this file except in compliance with the License.
183
- You may obtain a copy of the License at
184
-
185
- https://www.apache.org/licenses/LICENSE-2.0
186
-
187
- Unless required by applicable law or agreed to in writing, software
188
- distributed under the License is distributed on an "AS IS" BASIS,
189
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
- See the License for the specific language governing permissions and
191
- limitations under the License.
@@ -1,6 +0,0 @@
1
- {
2
- "name": "@scaleway/sdk-vpc",
3
- "namespace": "vpc",
4
- "displayName": "Vpc",
5
- "versions": ["v2"]
6
- }
@@ -1,8 +0,0 @@
1
- var metadata_gen_default = {
2
- name: "@scaleway/sdk-vpc",
3
- namespace: "vpc",
4
- displayName: "Vpc",
5
- versions: ["v2"]
6
- };
7
- //#endregion
8
- export { metadata_gen_default as default };