@scaleway/sdk-vpc 2.3.1 → 2.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.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -1,6 +1,6 @@
1
1
  import type { ApiLocality } from '@scaleway/sdk-client';
2
2
  import { API as ParentAPI } from '@scaleway/sdk-client';
3
- import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableCustomRoutesPropagationRequest, EnableDHCPRequest, EnableRoutingRequest, GetAclRequest, GetAclResponse, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCsRequest, ListVPCsResponse, PrivateNetwork, Route, SetAclRequest, SetAclResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen.js';
3
+ import type { AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCConnectorRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCConnectorRequest, DeleteVPCRequest, EnableCustomRoutesPropagationRequest, EnableDHCPRequest, EnableRoutingRequest, GetAclRequest, GetAclResponse, GetPrivateNetworkRequest, GetRouteRequest, GetVPCConnectorRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksResponse, ListSubnetOverlapsRequest, ListSubnetOverlapsResponse, ListSubnetsRequest, ListSubnetsResponse, ListVPCConnectorsRequest, ListVPCConnectorsResponse, ListVPCsRequest, ListVPCsResponse, PrivateNetwork, Route, SetAclRequest, SetAclResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCConnectorRequest, UpdateVPCRequest, VPC, VPCConnector } from './types.gen.js';
4
4
  /**
5
5
  * VPC API.
6
6
 
@@ -175,4 +175,53 @@ export declare class API extends ParentAPI {
175
175
  * @returns A Promise of SetAclResponse
176
176
  */
177
177
  setAcl: (request: Readonly<SetAclRequest>) => Promise<SetAclResponse>;
178
+ protected pageOfListVPCConnectors: (request?: Readonly<ListVPCConnectorsRequest>) => Promise<ListVPCConnectorsResponse>;
179
+ /**
180
+ * List VPC connectors. List existing VPC connectors in the specified region.
181
+ *
182
+ * @param request - The request {@link ListVPCConnectorsRequest}
183
+ * @returns A Promise of ListVPCConnectorsResponse
184
+ */
185
+ listVPCConnectors: (request?: Readonly<ListVPCConnectorsRequest>) => Promise<ListVPCConnectorsResponse> & {
186
+ all: () => Promise<VPCConnector[]>;
187
+ [Symbol.asyncIterator]: () => AsyncGenerator<VPCConnector[], void, void>;
188
+ };
189
+ /**
190
+ * Create a VPC connector. Create a new VPC connector in the specified region.
191
+ *
192
+ * @param request - The request {@link CreateVPCConnectorRequest}
193
+ * @returns A Promise of VPCConnector
194
+ */
195
+ createVPCConnector: (request: Readonly<CreateVPCConnectorRequest>) => Promise<VPCConnector>;
196
+ /**
197
+ * Get a VPC connector. Retrieve details of an existing VPC connector, specified by its VPC connector ID.
198
+ *
199
+ * @param request - The request {@link GetVPCConnectorRequest}
200
+ * @returns A Promise of VPCConnector
201
+ */
202
+ getVPCConnector: (request: Readonly<GetVPCConnectorRequest>) => Promise<VPCConnector>;
203
+ /**
204
+ * Update VPC connector. Update parameters including name and tags of the specified VPC connector.
205
+ *
206
+ * @param request - The request {@link UpdateVPCConnectorRequest}
207
+ * @returns A Promise of VPCConnector
208
+ */
209
+ updateVPCConnector: (request: Readonly<UpdateVPCConnectorRequest>) => Promise<VPCConnector>;
210
+ /**
211
+ * Delete a VPC connector. Delete a VPC connector specified by its VPC connector ID.
212
+ *
213
+ * @param request - The request {@link DeleteVPCConnectorRequest}
214
+ */
215
+ deleteVPCConnector: (request: Readonly<DeleteVPCConnectorRequest>) => Promise<void>;
216
+ protected pageOfListSubnetOverlaps: (request: Readonly<ListSubnetOverlapsRequest>) => Promise<ListSubnetOverlapsResponse>;
217
+ /**
218
+ * List subnet overlaps.. List subnet overlaps between the VPCConnector VPC and the target VPC or for a specific subnet if specified.
219
+ *
220
+ * @param request - The request {@link ListSubnetOverlapsRequest}
221
+ * @returns A Promise of ListSubnetOverlapsResponse
222
+ */
223
+ listSubnetOverlaps: (request: Readonly<ListSubnetOverlapsRequest>) => Promise<ListSubnetOverlapsResponse> & {
224
+ all: () => Promise<import("./types.gen.js").ListSubnetOverlapsResponseSubnetOverlap[]>;
225
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").ListSubnetOverlapsResponseSubnetOverlap[], void, void>;
226
+ };
178
227
  }
@@ -1,12 +1,13 @@
1
- import { marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCRequest, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC } from "./marshalling.gen.js";
2
- import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
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
+ import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
+ //#region src/v2/api.gen.ts
3
4
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
5
  /**
5
6
  * VPC API.
6
7
 
7
8
  This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks.
8
9
  */
9
- var API$1 = class extends API {
10
+ var API = class extends API$1 {
10
11
  /**
11
12
  * Locality of this API.
12
13
  * type ∈ {'zone','region','global','unspecified'}
@@ -264,5 +265,73 @@ var API$1 = class extends API {
264
265
  method: "PUT",
265
266
  path: `/vpc/v2/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpcs/${validatePathParam("vpcId", request.vpcId)}/acl-rules`
266
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);
267
335
  };
268
- export { API$1 as API };
336
+ //#endregion
337
+ export { API };
@@ -1,4 +1,4 @@
1
1
  export { API, } from './api.gen.js';
2
2
  export * from './marshalling.gen.js';
3
- export type { AclRule, AclRuleProtocol, Action, AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCRequest, EnableCustomRoutesPropagationRequest, EnableDHCPRequest, EnableRoutingRequest, GetAclRequest, GetAclResponse, GetPrivateNetworkRequest, GetRouteRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, PrivateNetwork, Route, RouteType, SetAclRequest, SetAclResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC, } from './types.gen.js';
3
+ export type { AclRule, AclRuleProtocol, Action, AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCConnectorRequest, CreateVPCRequest, DeletePrivateNetworkRequest, DeleteRouteRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, DeleteVPCConnectorRequest, DeleteVPCRequest, EnableCustomRoutesPropagationRequest, EnableDHCPRequest, EnableRoutingRequest, GetAclRequest, GetAclResponse, GetPrivateNetworkRequest, GetRouteRequest, GetVPCConnectorRequest, GetVPCRequest, ListPrivateNetworksRequest, ListPrivateNetworksRequestOrderBy, ListPrivateNetworksResponse, ListSubnetOverlapsRequest, ListSubnetOverlapsRequestOrderBy, ListSubnetOverlapsResponse, ListSubnetOverlapsResponseSubnetOverlap, ListSubnetsRequest, ListSubnetsRequestOrderBy, ListSubnetsResponse, ListVPCConnectorsRequest, ListVPCConnectorsRequestOrderBy, ListVPCConnectorsResponse, ListVPCsRequest, ListVPCsRequestOrderBy, ListVPCsResponse, PrivateNetwork, Route, RouteType, SetAclRequest, SetAclResponse, Subnet, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCConnectorRequest, UpdateVPCRequest, VPC, VPCConnector, VPCConnectorPeerInfo, VPCConnectorStatus, } from './types.gen.js';
4
4
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,7 +1,8 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
- import { marshalAclRule, marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCRequest, unmarshalAclRule, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC } from "./marshalling.gen.js";
2
+ import { marshalAclRule, marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCConnectorRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCConnectorRequest, marshalUpdateVPCRequest, unmarshalAclRule, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetOverlapsResponse, unmarshalListSubnetsResponse, unmarshalListVPCConnectorsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC, unmarshalVPCConnector } from "./marshalling.gen.js";
3
3
  import { API } from "./api.gen.js";
4
4
  import { validation_rules_gen_exports } from "./validation-rules.gen.js";
5
+ //#region src/v2/index.gen.ts
5
6
  var index_gen_exports = /* @__PURE__ */ __exportAll({
6
7
  API: () => API,
7
8
  ValidationRules: () => validation_rules_gen_exports,
@@ -9,22 +10,28 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
9
10
  marshalAddSubnetsRequest: () => marshalAddSubnetsRequest,
10
11
  marshalCreatePrivateNetworkRequest: () => marshalCreatePrivateNetworkRequest,
11
12
  marshalCreateRouteRequest: () => marshalCreateRouteRequest,
13
+ marshalCreateVPCConnectorRequest: () => marshalCreateVPCConnectorRequest,
12
14
  marshalCreateVPCRequest: () => marshalCreateVPCRequest,
13
15
  marshalDeleteSubnetsRequest: () => marshalDeleteSubnetsRequest,
14
16
  marshalSetAclRequest: () => marshalSetAclRequest,
15
17
  marshalUpdatePrivateNetworkRequest: () => marshalUpdatePrivateNetworkRequest,
16
18
  marshalUpdateRouteRequest: () => marshalUpdateRouteRequest,
19
+ marshalUpdateVPCConnectorRequest: () => marshalUpdateVPCConnectorRequest,
17
20
  marshalUpdateVPCRequest: () => marshalUpdateVPCRequest,
18
21
  unmarshalAclRule: () => unmarshalAclRule,
19
22
  unmarshalAddSubnetsResponse: () => unmarshalAddSubnetsResponse,
20
23
  unmarshalDeleteSubnetsResponse: () => unmarshalDeleteSubnetsResponse,
21
24
  unmarshalGetAclResponse: () => unmarshalGetAclResponse,
22
25
  unmarshalListPrivateNetworksResponse: () => unmarshalListPrivateNetworksResponse,
26
+ unmarshalListSubnetOverlapsResponse: () => unmarshalListSubnetOverlapsResponse,
23
27
  unmarshalListSubnetsResponse: () => unmarshalListSubnetsResponse,
28
+ unmarshalListVPCConnectorsResponse: () => unmarshalListVPCConnectorsResponse,
24
29
  unmarshalListVPCsResponse: () => unmarshalListVPCsResponse,
25
30
  unmarshalPrivateNetwork: () => unmarshalPrivateNetwork,
26
31
  unmarshalRoute: () => unmarshalRoute,
27
32
  unmarshalSetAclResponse: () => unmarshalSetAclResponse,
28
- unmarshalVPC: () => unmarshalVPC
33
+ unmarshalVPC: () => unmarshalVPC,
34
+ unmarshalVPCConnector: () => unmarshalVPCConnector
29
35
  });
30
- export { index_gen_exports };
36
+ //#endregion
37
+ export { API, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalAclRule, marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCConnectorRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCConnectorRequest, marshalUpdateVPCRequest, unmarshalAclRule, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetOverlapsResponse, unmarshalListSubnetsResponse, unmarshalListVPCConnectorsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC, unmarshalVPCConnector };
@@ -1,23 +1,28 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { AclRule, AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, GetAclResponse, ListPrivateNetworksResponse, ListSubnetsResponse, ListVPCsResponse, PrivateNetwork, Route, SetAclRequest, SetAclResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCRequest, VPC } from './types.gen.js';
2
+ import type { AclRule, AddSubnetsRequest, AddSubnetsResponse, CreatePrivateNetworkRequest, CreateRouteRequest, CreateVPCConnectorRequest, CreateVPCRequest, DeleteSubnetsRequest, DeleteSubnetsResponse, GetAclResponse, ListPrivateNetworksResponse, ListSubnetOverlapsResponse, ListSubnetsResponse, ListVPCConnectorsResponse, ListVPCsResponse, PrivateNetwork, Route, SetAclRequest, SetAclResponse, UpdatePrivateNetworkRequest, UpdateRouteRequest, UpdateVPCConnectorRequest, UpdateVPCRequest, VPC, VPCConnector } from './types.gen.js';
3
3
  export declare const unmarshalPrivateNetwork: (data: unknown) => PrivateNetwork;
4
4
  export declare const unmarshalRoute: (data: unknown) => Route;
5
+ export declare const unmarshalVPCConnector: (data: unknown) => VPCConnector;
5
6
  export declare const unmarshalVPC: (data: unknown) => VPC;
6
7
  export declare const unmarshalAddSubnetsResponse: (data: unknown) => AddSubnetsResponse;
7
8
  export declare const unmarshalDeleteSubnetsResponse: (data: unknown) => DeleteSubnetsResponse;
8
9
  export declare const unmarshalAclRule: (data: unknown) => AclRule;
9
10
  export declare const unmarshalGetAclResponse: (data: unknown) => GetAclResponse;
10
11
  export declare const unmarshalListPrivateNetworksResponse: (data: unknown) => ListPrivateNetworksResponse;
12
+ export declare const unmarshalListSubnetOverlapsResponse: (data: unknown) => ListSubnetOverlapsResponse;
11
13
  export declare const unmarshalListSubnetsResponse: (data: unknown) => ListSubnetsResponse;
14
+ export declare const unmarshalListVPCConnectorsResponse: (data: unknown) => ListVPCConnectorsResponse;
12
15
  export declare const unmarshalListVPCsResponse: (data: unknown) => ListVPCsResponse;
13
16
  export declare const unmarshalSetAclResponse: (data: unknown) => SetAclResponse;
14
17
  export declare const marshalAddSubnetsRequest: (request: AddSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
15
18
  export declare const marshalCreatePrivateNetworkRequest: (request: CreatePrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
16
19
  export declare const marshalCreateRouteRequest: (request: CreateRouteRequest, defaults: DefaultValues) => Record<string, unknown>;
20
+ export declare const marshalCreateVPCConnectorRequest: (request: CreateVPCConnectorRequest, defaults: DefaultValues) => Record<string, unknown>;
17
21
  export declare const marshalCreateVPCRequest: (request: CreateVPCRequest, defaults: DefaultValues) => Record<string, unknown>;
18
22
  export declare const marshalDeleteSubnetsRequest: (request: DeleteSubnetsRequest, defaults: DefaultValues) => Record<string, unknown>;
19
23
  export declare const marshalAclRule: (request: AclRule, defaults: DefaultValues) => Record<string, unknown>;
20
24
  export declare const marshalSetAclRequest: (request: SetAclRequest, defaults: DefaultValues) => Record<string, unknown>;
21
25
  export declare const marshalUpdatePrivateNetworkRequest: (request: UpdatePrivateNetworkRequest, defaults: DefaultValues) => Record<string, unknown>;
22
26
  export declare const marshalUpdateRouteRequest: (request: UpdateRouteRequest, defaults: DefaultValues) => Record<string, unknown>;
27
+ export declare const marshalUpdateVPCConnectorRequest: (request: UpdateVPCConnectorRequest, defaults: DefaultValues) => Record<string, unknown>;
23
28
  export declare const marshalUpdateVPCRequest: (request: UpdateVPCRequest, defaults: DefaultValues) => Record<string, unknown>;
@@ -1,5 +1,6 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
2
  import randomName from "@scaleway/random-name";
3
+ //#region src/v2/marshalling.gen.ts
3
4
  var unmarshalSubnet = (data) => {
4
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Subnet' failed as data isn't a dictionary.`);
5
6
  return {
@@ -12,7 +13,7 @@ var unmarshalSubnet = (data) => {
12
13
  vpcId: data.vpc_id
13
14
  };
14
15
  };
15
- const unmarshalPrivateNetwork = (data) => {
16
+ var unmarshalPrivateNetwork = (data) => {
16
17
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PrivateNetwork' failed as data isn't a dictionary.`);
17
18
  return {
18
19
  createdAt: unmarshalDate(data.created_at),
@@ -29,7 +30,7 @@ const unmarshalPrivateNetwork = (data) => {
29
30
  vpcId: data.vpc_id
30
31
  };
31
32
  };
32
- const unmarshalRoute = (data) => {
33
+ var unmarshalRoute = (data) => {
33
34
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Route' failed as data isn't a dictionary.`);
34
35
  return {
35
36
  createdAt: unmarshalDate(data.created_at),
@@ -47,7 +48,32 @@ const unmarshalRoute = (data) => {
47
48
  vpcId: data.vpc_id
48
49
  };
49
50
  };
50
- const unmarshalVPC = (data) => {
51
+ var unmarshalVPCConnectorPeerInfo = (data) => {
52
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VPCConnectorPeerInfo' failed as data isn't a dictionary.`);
53
+ return {
54
+ organizationId: data.organization_id,
55
+ projectId: data.project_id,
56
+ vpcName: data.vpc_name
57
+ };
58
+ };
59
+ var unmarshalVPCConnector = (data) => {
60
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VPCConnector' failed as data isn't a dictionary.`);
61
+ return {
62
+ createdAt: unmarshalDate(data.created_at),
63
+ id: data.id,
64
+ name: data.name,
65
+ organizationId: data.organization_id,
66
+ peerInfo: data.peer_info ? unmarshalVPCConnectorPeerInfo(data.peer_info) : void 0,
67
+ projectId: data.project_id,
68
+ region: data.region,
69
+ status: data.status,
70
+ tags: data.tags,
71
+ targetVpcId: data.target_vpc_id,
72
+ updatedAt: unmarshalDate(data.updated_at),
73
+ vpcId: data.vpc_id
74
+ };
75
+ };
76
+ var unmarshalVPC = (data) => {
51
77
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'VPC' failed as data isn't a dictionary.`);
52
78
  return {
53
79
  createdAt: unmarshalDate(data.created_at),
@@ -64,15 +90,15 @@ const unmarshalVPC = (data) => {
64
90
  updatedAt: unmarshalDate(data.updated_at)
65
91
  };
66
92
  };
67
- const unmarshalAddSubnetsResponse = (data) => {
93
+ var unmarshalAddSubnetsResponse = (data) => {
68
94
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddSubnetsResponse' failed as data isn't a dictionary.`);
69
95
  return { subnets: data.subnets };
70
96
  };
71
- const unmarshalDeleteSubnetsResponse = (data) => {
97
+ var unmarshalDeleteSubnetsResponse = (data) => {
72
98
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DeleteSubnetsResponse' failed as data isn't a dictionary.`);
73
99
  return { subnets: data.subnets };
74
100
  };
75
- const unmarshalAclRule = (data) => {
101
+ var unmarshalAclRule = (data) => {
76
102
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AclRule' failed as data isn't a dictionary.`);
77
103
  return {
78
104
  action: data.action,
@@ -86,43 +112,66 @@ const unmarshalAclRule = (data) => {
86
112
  srcPortLow: data.src_port_low
87
113
  };
88
114
  };
89
- const unmarshalGetAclResponse = (data) => {
115
+ var unmarshalGetAclResponse = (data) => {
90
116
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GetAclResponse' failed as data isn't a dictionary.`);
91
117
  return {
92
118
  defaultPolicy: data.default_policy,
93
119
  rules: unmarshalArrayOfObject(data.rules, unmarshalAclRule)
94
120
  };
95
121
  };
96
- const unmarshalListPrivateNetworksResponse = (data) => {
122
+ var unmarshalListPrivateNetworksResponse = (data) => {
97
123
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPrivateNetworksResponse' failed as data isn't a dictionary.`);
98
124
  return {
99
125
  privateNetworks: unmarshalArrayOfObject(data.private_networks, unmarshalPrivateNetwork),
100
126
  totalCount: data.total_count
101
127
  };
102
128
  };
103
- const unmarshalListSubnetsResponse = (data) => {
129
+ var unmarshalListSubnetOverlapsResponseSubnetOverlap = (data) => {
130
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubnetOverlapsResponseSubnetOverlap' failed as data isn't a dictionary.`);
131
+ return {
132
+ subnet: data.subnet,
133
+ subnetId: data.subnet_id,
134
+ targetSubnet: data.target_subnet,
135
+ targetSubnetId: data.target_subnet_id
136
+ };
137
+ };
138
+ var unmarshalListSubnetOverlapsResponse = (data) => {
139
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubnetOverlapsResponse' failed as data isn't a dictionary.`);
140
+ return {
141
+ subnetOverlaps: unmarshalArrayOfObject(data.subnet_overlaps, unmarshalListSubnetOverlapsResponseSubnetOverlap),
142
+ totalCount: data.total_count
143
+ };
144
+ };
145
+ var unmarshalListSubnetsResponse = (data) => {
104
146
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSubnetsResponse' failed as data isn't a dictionary.`);
105
147
  return {
106
148
  subnets: unmarshalArrayOfObject(data.subnets, unmarshalSubnet),
107
149
  totalCount: data.total_count
108
150
  };
109
151
  };
110
- const unmarshalListVPCsResponse = (data) => {
152
+ var unmarshalListVPCConnectorsResponse = (data) => {
153
+ if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVPCConnectorsResponse' failed as data isn't a dictionary.`);
154
+ return {
155
+ totalCount: data.total_count,
156
+ vpcConnectors: unmarshalArrayOfObject(data.vpc_connectors, unmarshalVPCConnector)
157
+ };
158
+ };
159
+ var unmarshalListVPCsResponse = (data) => {
111
160
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListVPCsResponse' failed as data isn't a dictionary.`);
112
161
  return {
113
162
  totalCount: data.total_count,
114
163
  vpcs: unmarshalArrayOfObject(data.vpcs, unmarshalVPC)
115
164
  };
116
165
  };
117
- const unmarshalSetAclResponse = (data) => {
166
+ var unmarshalSetAclResponse = (data) => {
118
167
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetAclResponse' failed as data isn't a dictionary.`);
119
168
  return {
120
169
  defaultPolicy: data.default_policy,
121
170
  rules: unmarshalArrayOfObject(data.rules, unmarshalAclRule)
122
171
  };
123
172
  };
124
- const marshalAddSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
125
- const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
173
+ var marshalAddSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
174
+ var marshalCreatePrivateNetworkRequest = (request, defaults) => ({
126
175
  default_route_propagation_enabled: request.defaultRoutePropagationEnabled,
127
176
  name: request.name || randomName("pn"),
128
177
  project_id: request.projectId ?? defaults.defaultProjectId,
@@ -130,7 +179,7 @@ const marshalCreatePrivateNetworkRequest = (request, defaults) => ({
130
179
  tags: request.tags,
131
180
  vpc_id: request.vpcId
132
181
  });
133
- const marshalCreateRouteRequest = (request, defaults) => ({
182
+ var marshalCreateRouteRequest = (request, defaults) => ({
134
183
  description: request.description,
135
184
  destination: request.destination,
136
185
  nexthop_private_network_id: request.nexthopPrivateNetworkId,
@@ -139,14 +188,20 @@ const marshalCreateRouteRequest = (request, defaults) => ({
139
188
  tags: request.tags,
140
189
  vpc_id: request.vpcId
141
190
  });
142
- const marshalCreateVPCRequest = (request, defaults) => ({
191
+ var marshalCreateVPCConnectorRequest = (request, defaults) => ({
192
+ name: request.name || randomName("VPCConnector"),
193
+ tags: request.tags,
194
+ target_vpc_id: request.targetVpcId,
195
+ vpc_id: request.vpcId
196
+ });
197
+ var marshalCreateVPCRequest = (request, defaults) => ({
143
198
  enable_routing: request.enableRouting,
144
199
  name: request.name || randomName("vpc"),
145
200
  project_id: request.projectId ?? defaults.defaultProjectId,
146
201
  tags: request.tags
147
202
  });
148
- const marshalDeleteSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
149
- const marshalAclRule = (request, defaults) => ({
203
+ var marshalDeleteSubnetsRequest = (request, defaults) => ({ subnets: request.subnets });
204
+ var marshalAclRule = (request, defaults) => ({
150
205
  action: request.action,
151
206
  description: request.description,
152
207
  destination: request.destination,
@@ -157,17 +212,17 @@ const marshalAclRule = (request, defaults) => ({
157
212
  src_port_high: request.srcPortHigh,
158
213
  src_port_low: request.srcPortLow
159
214
  });
160
- const marshalSetAclRequest = (request, defaults) => ({
215
+ var marshalSetAclRequest = (request, defaults) => ({
161
216
  default_policy: request.defaultPolicy,
162
217
  is_ipv6: request.isIpv6,
163
218
  rules: request.rules.map((elt) => marshalAclRule(elt, defaults))
164
219
  });
165
- const marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
220
+ var marshalUpdatePrivateNetworkRequest = (request, defaults) => ({
166
221
  default_route_propagation_enabled: request.defaultRoutePropagationEnabled,
167
222
  name: request.name,
168
223
  tags: request.tags
169
224
  });
170
- const marshalUpdateRouteRequest = (request, defaults) => ({
225
+ var marshalUpdateRouteRequest = (request, defaults) => ({
171
226
  description: request.description,
172
227
  destination: request.destination,
173
228
  nexthop_private_network_id: request.nexthopPrivateNetworkId,
@@ -175,8 +230,13 @@ const marshalUpdateRouteRequest = (request, defaults) => ({
175
230
  nexthop_vpc_connector_id: request.nexthopVpcConnectorId,
176
231
  tags: request.tags
177
232
  });
178
- const marshalUpdateVPCRequest = (request, defaults) => ({
233
+ var marshalUpdateVPCConnectorRequest = (request, defaults) => ({
234
+ name: request.name,
235
+ tags: request.tags
236
+ });
237
+ var marshalUpdateVPCRequest = (request, defaults) => ({
179
238
  name: request.name,
180
239
  tags: request.tags
181
240
  });
182
- export { marshalAclRule, marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCRequest, unmarshalAclRule, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC };
241
+ //#endregion
242
+ export { marshalAclRule, marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, marshalCreateRouteRequest, marshalCreateVPCConnectorRequest, marshalCreateVPCRequest, marshalDeleteSubnetsRequest, marshalSetAclRequest, marshalUpdatePrivateNetworkRequest, marshalUpdateRouteRequest, marshalUpdateVPCConnectorRequest, marshalUpdateVPCRequest, unmarshalAclRule, unmarshalAddSubnetsResponse, unmarshalDeleteSubnetsResponse, unmarshalGetAclResponse, unmarshalListPrivateNetworksResponse, unmarshalListSubnetOverlapsResponse, unmarshalListSubnetsResponse, unmarshalListVPCConnectorsResponse, unmarshalListVPCsResponse, unmarshalPrivateNetwork, unmarshalRoute, unmarshalSetAclResponse, unmarshalVPC, unmarshalVPCConnector };
@@ -0,0 +1,110 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "vpc";
3
+ readonly version: "v2";
4
+ readonly folderName: "vpcv2";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "listVPCs";
9
+ readonly protoName: "ListVPCs";
10
+ readonly paramsType: "ListVPCsRequest";
11
+ readonly returnType: "ListVPCsResponse";
12
+ readonly isList: true;
13
+ readonly paginationType: "offset";
14
+ readonly pageParamKey: "page";
15
+ readonly listItemType: "VPC";
16
+ readonly isPrivate: false;
17
+ readonly description: "\"";
18
+ }, {
19
+ readonly methodName: "getVPC";
20
+ readonly protoName: "GetVPC";
21
+ readonly paramsType: "GetVPCRequest";
22
+ readonly returnType: "VPC";
23
+ readonly isList: false;
24
+ readonly paginationType: "none";
25
+ readonly isPrivate: false;
26
+ readonly description: "\"";
27
+ }, {
28
+ readonly methodName: "listPrivateNetworks";
29
+ readonly protoName: "ListPrivateNetworks";
30
+ readonly paramsType: "ListPrivateNetworksRequest";
31
+ readonly returnType: "ListPrivateNetworksResponse";
32
+ readonly isList: true;
33
+ readonly paginationType: "offset";
34
+ readonly pageParamKey: "page";
35
+ readonly listItemType: "PrivateNetwork";
36
+ readonly isPrivate: false;
37
+ readonly description: "\"";
38
+ }, {
39
+ readonly methodName: "getPrivateNetwork";
40
+ readonly protoName: "GetPrivateNetwork";
41
+ readonly paramsType: "GetPrivateNetworkRequest";
42
+ readonly returnType: "PrivateNetwork";
43
+ readonly isList: false;
44
+ readonly paginationType: "none";
45
+ readonly isPrivate: false;
46
+ readonly description: "\"";
47
+ }, {
48
+ readonly methodName: "listSubnets";
49
+ readonly protoName: "ListSubnets";
50
+ readonly paramsType: "ListSubnetsRequest";
51
+ readonly returnType: "ListSubnetsResponse";
52
+ readonly isList: true;
53
+ readonly paginationType: "offset";
54
+ readonly pageParamKey: "page";
55
+ readonly listItemType: "Subnet";
56
+ readonly isPrivate: false;
57
+ readonly description: "\"";
58
+ }, {
59
+ readonly methodName: "getRoute";
60
+ readonly protoName: "GetRoute";
61
+ readonly paramsType: "GetRouteRequest";
62
+ readonly returnType: "Route";
63
+ readonly isList: false;
64
+ readonly paginationType: "none";
65
+ readonly isPrivate: false;
66
+ readonly description: "\"";
67
+ }, {
68
+ readonly methodName: "getAcl";
69
+ readonly protoName: "GetAcl";
70
+ readonly paramsType: "GetAclRequest";
71
+ readonly returnType: "GetAclResponse";
72
+ readonly isList: false;
73
+ readonly paginationType: "none";
74
+ readonly isPrivate: false;
75
+ readonly description: "\"";
76
+ }, {
77
+ readonly methodName: "listVPCConnectors";
78
+ readonly protoName: "ListVPCConnectors";
79
+ readonly paramsType: "ListVPCConnectorsRequest";
80
+ readonly returnType: "ListVPCConnectorsResponse";
81
+ readonly isList: true;
82
+ readonly paginationType: "offset";
83
+ readonly pageParamKey: "page";
84
+ readonly listItemType: "VPCConnector";
85
+ readonly isPrivate: false;
86
+ readonly description: "\"";
87
+ }, {
88
+ readonly methodName: "getVPCConnector";
89
+ readonly protoName: "GetVPCConnector";
90
+ readonly paramsType: "GetVPCConnectorRequest";
91
+ readonly returnType: "VPCConnector";
92
+ readonly isList: false;
93
+ readonly paginationType: "none";
94
+ readonly isPrivate: false;
95
+ readonly description: "\"";
96
+ }, {
97
+ readonly methodName: "listSubnetOverlaps";
98
+ readonly protoName: "ListSubnetOverlaps";
99
+ readonly paramsType: "ListSubnetOverlapsRequest";
100
+ readonly returnType: "ListSubnetOverlapsResponse";
101
+ readonly isList: true;
102
+ readonly paginationType: "offset";
103
+ readonly pageParamKey: "page";
104
+ readonly listItemType: "ListSubnetOverlapsResponseSubnetOverlap";
105
+ readonly isPrivate: false;
106
+ readonly description: "\"";
107
+ }];
108
+ }];
109
+ };
110
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,123 @@
1
+ //#region src/v2/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "vpc",
4
+ version: "v2",
5
+ folderName: "vpcv2",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [
9
+ {
10
+ methodName: "listVPCs",
11
+ protoName: "ListVPCs",
12
+ paramsType: "ListVPCsRequest",
13
+ returnType: "ListVPCsResponse",
14
+ isList: true,
15
+ paginationType: "offset",
16
+ pageParamKey: "page",
17
+ listItemType: "VPC",
18
+ isPrivate: false,
19
+ description: "\""
20
+ },
21
+ {
22
+ methodName: "getVPC",
23
+ protoName: "GetVPC",
24
+ paramsType: "GetVPCRequest",
25
+ returnType: "VPC",
26
+ isList: false,
27
+ paginationType: "none",
28
+ isPrivate: false,
29
+ description: "\""
30
+ },
31
+ {
32
+ methodName: "listPrivateNetworks",
33
+ protoName: "ListPrivateNetworks",
34
+ paramsType: "ListPrivateNetworksRequest",
35
+ returnType: "ListPrivateNetworksResponse",
36
+ isList: true,
37
+ paginationType: "offset",
38
+ pageParamKey: "page",
39
+ listItemType: "PrivateNetwork",
40
+ isPrivate: false,
41
+ description: "\""
42
+ },
43
+ {
44
+ methodName: "getPrivateNetwork",
45
+ protoName: "GetPrivateNetwork",
46
+ paramsType: "GetPrivateNetworkRequest",
47
+ returnType: "PrivateNetwork",
48
+ isList: false,
49
+ paginationType: "none",
50
+ isPrivate: false,
51
+ description: "\""
52
+ },
53
+ {
54
+ methodName: "listSubnets",
55
+ protoName: "ListSubnets",
56
+ paramsType: "ListSubnetsRequest",
57
+ returnType: "ListSubnetsResponse",
58
+ isList: true,
59
+ paginationType: "offset",
60
+ pageParamKey: "page",
61
+ listItemType: "Subnet",
62
+ isPrivate: false,
63
+ description: "\""
64
+ },
65
+ {
66
+ methodName: "getRoute",
67
+ protoName: "GetRoute",
68
+ paramsType: "GetRouteRequest",
69
+ returnType: "Route",
70
+ isList: false,
71
+ paginationType: "none",
72
+ isPrivate: false,
73
+ description: "\""
74
+ },
75
+ {
76
+ methodName: "getAcl",
77
+ protoName: "GetAcl",
78
+ paramsType: "GetAclRequest",
79
+ returnType: "GetAclResponse",
80
+ isList: false,
81
+ paginationType: "none",
82
+ isPrivate: false,
83
+ description: "\""
84
+ },
85
+ {
86
+ methodName: "listVPCConnectors",
87
+ protoName: "ListVPCConnectors",
88
+ paramsType: "ListVPCConnectorsRequest",
89
+ returnType: "ListVPCConnectorsResponse",
90
+ isList: true,
91
+ paginationType: "offset",
92
+ pageParamKey: "page",
93
+ listItemType: "VPCConnector",
94
+ isPrivate: false,
95
+ description: "\""
96
+ },
97
+ {
98
+ methodName: "getVPCConnector",
99
+ protoName: "GetVPCConnector",
100
+ paramsType: "GetVPCConnectorRequest",
101
+ returnType: "VPCConnector",
102
+ isList: false,
103
+ paginationType: "none",
104
+ isPrivate: false,
105
+ description: "\""
106
+ },
107
+ {
108
+ methodName: "listSubnetOverlaps",
109
+ protoName: "ListSubnetOverlaps",
110
+ paramsType: "ListSubnetOverlapsRequest",
111
+ returnType: "ListSubnetOverlapsResponse",
112
+ isList: true,
113
+ paginationType: "offset",
114
+ pageParamKey: "page",
115
+ listItemType: "ListSubnetOverlapsResponseSubnetOverlap",
116
+ isPrivate: false,
117
+ description: "\""
118
+ }
119
+ ]
120
+ }]
121
+ };
122
+ //#endregion
123
+ export { queriesMetadata };
@@ -2,9 +2,12 @@ import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
2
  export type AclRuleProtocol = 'ANY' | 'TCP' | 'UDP' | 'ICMP';
3
3
  export type Action = 'unknown_action' | 'accept' | 'drop';
4
4
  export type ListPrivateNetworksRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
+ export type ListSubnetOverlapsRequestOrderBy = 'subnet_asc' | 'subnet_desc' | 'target_subnet_asc' | 'target_subnet_desc';
5
6
  export type ListSubnetsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
7
+ export type ListVPCConnectorsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
6
8
  export type ListVPCsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
7
9
  export type RouteType = 'unknown_route_type' | 'subnet' | 'default' | 'custom' | 'interlink' | 's2s_vpn';
10
+ export type VPCConnectorStatus = 'unknown_vpc_connector_status' | 'orphan' | 'peered' | 'conflict';
8
11
  export interface Subnet {
9
12
  /**
10
13
  * ID of the subnet.
@@ -139,6 +142,11 @@ export interface Route {
139
142
  */
140
143
  region: ScwRegion;
141
144
  }
145
+ export interface VPCConnectorPeerInfo {
146
+ organizationId: string;
147
+ projectId: string;
148
+ vpcName: string;
149
+ }
142
150
  export interface AclRule {
143
151
  /**
144
152
  * Protocol to which this rule applies.
@@ -177,6 +185,62 @@ export interface AclRule {
177
185
  */
178
186
  description?: string;
179
187
  }
188
+ export interface ListSubnetOverlapsResponseSubnetOverlap {
189
+ subnetId: string;
190
+ subnet: string;
191
+ targetSubnetId: string;
192
+ targetSubnet: string;
193
+ }
194
+ export interface VPCConnector {
195
+ /**
196
+ * VPC connector ID.
197
+ */
198
+ id: string;
199
+ /**
200
+ * VPC connector name.
201
+ */
202
+ name: string;
203
+ /**
204
+ * Scaleway Organization the VPC connector belongs to.
205
+ */
206
+ organizationId: string;
207
+ /**
208
+ * Scaleway Project the VPC connector belongs to.
209
+ */
210
+ projectId: string;
211
+ /**
212
+ * VPC the VPC connector belongs to (origin VPC).
213
+ */
214
+ vpcId: string;
215
+ /**
216
+ * VPC with which the VPC connector is peered (target VPC).
217
+ */
218
+ targetVpcId: string;
219
+ /**
220
+ * Status of the VPC connector.
221
+ */
222
+ status: VPCConnectorStatus;
223
+ /**
224
+ * Peer info of target VPC. Available when status is Peered.
225
+ */
226
+ peerInfo?: VPCConnectorPeerInfo;
227
+ /**
228
+ * Region of the VPC connector.
229
+ */
230
+ region: ScwRegion;
231
+ /**
232
+ * Tags for the VPC connector.
233
+ */
234
+ tags: string[];
235
+ /**
236
+ * Date the VPC connector was created.
237
+ */
238
+ createdAt?: Date;
239
+ /**
240
+ * Date the VPC connector was last modified.
241
+ */
242
+ updatedAt?: Date;
243
+ }
180
244
  export interface VPC {
181
245
  /**
182
246
  * VPC ID.
@@ -308,6 +372,28 @@ export type CreateRouteRequest = {
308
372
  */
309
373
  nexthopVpcConnectorId?: string;
310
374
  };
375
+ export type CreateVPCConnectorRequest = {
376
+ /**
377
+ * Region to target. If none is passed will use default region from the config.
378
+ */
379
+ region?: ScwRegion;
380
+ /**
381
+ * Name for the VPC connector.
382
+ */
383
+ name?: string;
384
+ /**
385
+ * Tags for the VPC connector.
386
+ */
387
+ tags?: string[];
388
+ /**
389
+ * VPC ID to filter for. Only connectors belonging to this VPC will be returned.
390
+ */
391
+ vpcId: string;
392
+ /**
393
+ * Target VPC ID to filter for. Only connectors belonging to this target VPC will be returned.
394
+ */
395
+ targetVpcId: string;
396
+ };
311
397
  export type CreateVPCRequest = {
312
398
  /**
313
399
  * Region to target. If none is passed will use default region from the config.
@@ -367,6 +453,16 @@ export type DeleteSubnetsRequest = {
367
453
  export interface DeleteSubnetsResponse {
368
454
  subnets: string[];
369
455
  }
456
+ export type DeleteVPCConnectorRequest = {
457
+ /**
458
+ * Region to target. If none is passed will use default region from the config.
459
+ */
460
+ region?: ScwRegion;
461
+ /**
462
+ * VPC connector ID.
463
+ */
464
+ vpcConnectorId: string;
465
+ };
370
466
  export type DeleteVPCRequest = {
371
467
  /**
372
468
  * Region to target. If none is passed will use default region from the config.
@@ -445,6 +541,16 @@ export type GetRouteRequest = {
445
541
  */
446
542
  routeId: string;
447
543
  };
544
+ export type GetVPCConnectorRequest = {
545
+ /**
546
+ * Region to target. If none is passed will use default region from the config.
547
+ */
548
+ region?: ScwRegion;
549
+ /**
550
+ * VPC connector ID.
551
+ */
552
+ vpcConnectorId: string;
553
+ };
448
554
  export type GetVPCRequest = {
449
555
  /**
450
556
  * Region to target. If none is passed will use default region from the config.
@@ -505,6 +611,32 @@ export interface ListPrivateNetworksResponse {
505
611
  privateNetworks: PrivateNetwork[];
506
612
  totalCount: number;
507
613
  }
614
+ export type ListSubnetOverlapsRequest = {
615
+ /**
616
+ * Region to target. If none is passed will use default region from the config.
617
+ */
618
+ region?: ScwRegion;
619
+ /**
620
+ * VPCConnector ID.
621
+ */
622
+ vpcConnectorId: string;
623
+ /**
624
+ * Sort order of the returned Subnet overlaps.
625
+ */
626
+ orderBy?: ListSubnetOverlapsRequestOrderBy;
627
+ /**
628
+ * Page number to return, from the paginated results.
629
+ */
630
+ page?: number;
631
+ /**
632
+ * Maximum number of Subnet overlaps to return per page.
633
+ */
634
+ pageSize?: number;
635
+ };
636
+ export interface ListSubnetOverlapsResponse {
637
+ subnetOverlaps: ListSubnetOverlapsResponseSubnetOverlap[];
638
+ totalCount: number;
639
+ }
508
640
  export type ListSubnetsRequest = {
509
641
  /**
510
642
  * Region to target. If none is passed will use default region from the config.
@@ -543,6 +675,56 @@ export interface ListSubnetsResponse {
543
675
  subnets: Subnet[];
544
676
  totalCount: number;
545
677
  }
678
+ export type ListVPCConnectorsRequest = {
679
+ /**
680
+ * Region to target. If none is passed will use default region from the config.
681
+ */
682
+ region?: ScwRegion;
683
+ /**
684
+ * Sort order of the returned VPC connectors.
685
+ */
686
+ orderBy?: ListVPCConnectorsRequestOrderBy;
687
+ /**
688
+ * Page number to return, from the paginated results.
689
+ */
690
+ page?: number;
691
+ /**
692
+ * Maximum number of VPC connectors to return per page.
693
+ */
694
+ pageSize?: number;
695
+ /**
696
+ * Name to filter for. Only connectors with names containing this string will be returned.
697
+ */
698
+ name?: string;
699
+ /**
700
+ * Tags to filter for. Only connectors with one or more matching tags will be returned.
701
+ */
702
+ tags?: string[];
703
+ /**
704
+ * Organization ID to filter for. Only connectors belonging to this Organization will be returned.
705
+ */
706
+ organizationId?: string;
707
+ /**
708
+ * Project ID to filter for. Only connectors belonging to this Project will be returned.
709
+ */
710
+ projectId?: string;
711
+ /**
712
+ * VPC ID to filter for. Only connectors belonging to this VPC will be returned.
713
+ */
714
+ vpcId?: string;
715
+ /**
716
+ * Target VPC ID to filter for. Only connectors belonging to this target VPC will be returned.
717
+ */
718
+ targetVpcId?: string;
719
+ /**
720
+ * Status of the VPC connector.
721
+ */
722
+ status?: VPCConnectorStatus;
723
+ };
724
+ export interface ListVPCConnectorsResponse {
725
+ vpcConnectors: VPCConnector[];
726
+ totalCount: number;
727
+ }
546
728
  export type ListVPCsRequest = {
547
729
  /**
548
730
  * Region to target. If none is passed will use default region from the config.
@@ -671,6 +853,24 @@ export type UpdateRouteRequest = {
671
853
  */
672
854
  nexthopVpcConnectorId?: string;
673
855
  };
856
+ export type UpdateVPCConnectorRequest = {
857
+ /**
858
+ * Region to target. If none is passed will use default region from the config.
859
+ */
860
+ region?: ScwRegion;
861
+ /**
862
+ * VPC connector ID.
863
+ */
864
+ vpcConnectorId: string;
865
+ /**
866
+ * Name for the VPC connector.
867
+ */
868
+ name?: string;
869
+ /**
870
+ * Tags for the VPC connector.
871
+ */
872
+ tags?: string[];
873
+ };
674
874
  export type UpdateVPCRequest = {
675
875
  /**
676
876
  * Region to target. If none is passed will use default region from the config.
File without changes
@@ -15,6 +15,15 @@ export declare const AclRule: {
15
15
  lessThanOrEqual: number;
16
16
  };
17
17
  };
18
+ export declare const ListSubnetOverlapsRequest: {
19
+ page: {
20
+ greaterThanOrEqual: number;
21
+ };
22
+ pageSize: {
23
+ greaterThanOrEqual: number;
24
+ lessThanOrEqual: number;
25
+ };
26
+ };
18
27
  export declare const Route: {
19
28
  description: {
20
29
  maxLength: number;
@@ -1,14 +1,24 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ //#region src/v2/validation-rules.gen.ts
2
3
  var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
4
  AclRule: () => AclRule,
5
+ ListSubnetOverlapsRequest: () => ListSubnetOverlapsRequest,
4
6
  Route: () => Route
5
7
  });
6
- const AclRule = {
8
+ var AclRule = {
7
9
  description: { maxLength: 200 },
8
10
  dstPortHigh: { lessThanOrEqual: 65536 },
9
11
  dstPortLow: { lessThanOrEqual: 65536 },
10
12
  srcPortHigh: { lessThanOrEqual: 65536 },
11
13
  srcPortLow: { lessThanOrEqual: 65536 }
12
14
  };
13
- const Route = { description: { maxLength: 200 } };
14
- export { validation_rules_gen_exports };
15
+ var ListSubnetOverlapsRequest = {
16
+ page: { greaterThanOrEqual: 1 },
17
+ pageSize: {
18
+ greaterThanOrEqual: 0,
19
+ lessThanOrEqual: 1e3
20
+ }
21
+ };
22
+ var Route = { description: { maxLength: 200 } };
23
+ //#endregion
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.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Scaleway SDK vpc",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.19.6"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.1"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",