@scaleway/sdk-s2s-vpn 1.2.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @scaleway/sdk-s2s-vpn
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@scaleway/sdk-s2s-vpn.svg)](https://www.npmjs.com/package/@scaleway/sdk-s2s-vpn)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@scaleway/sdk-s2s-vpn.svg)](https://www.npmjs.com/package/@scaleway/sdk-s2s-vpn)
5
+ [![license](https://img.shields.io/npm/l/@scaleway/sdk-s2s-vpn.svg)](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE)
6
+
7
+ Scaleway SDK for S2S Vpn API.
8
+
9
+ > **Note**
10
+ > This is an automatically generated package that is part of the [Scaleway SDK for JavaScript](https://github.com/scaleway/scaleway-sdk-js).
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @scaleway/sdk-s2s-vpn @scaleway/sdk-client
16
+ ```
17
+
18
+ or with pnpm:
19
+
20
+ ```bash
21
+ pnpm add @scaleway/sdk-s2s-vpn @scaleway/sdk-client
22
+ ```
23
+
24
+ or with yarn:
25
+
26
+ ```bash
27
+ yarn add @scaleway/sdk-s2s-vpn @scaleway/sdk-client
28
+ ```
29
+
30
+ ## Getting Started
31
+
32
+ You'll need a pair of access and secret keys to connect to Scaleway API. Please check the [documentation](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/) on how to retrieve them.
33
+
34
+ ### Basic Usage
35
+
36
+ ```typescript
37
+ import { createClient } from '@scaleway/sdk-client'
38
+ import { S2SVpn } from '@scaleway/sdk-s2s-vpn'
39
+
40
+ const client = createClient({
41
+ accessKey: 'SCWXXXXXXXXXXXXXXXXX',
42
+ secretKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
43
+ defaultProjectId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
44
+ defaultRegion: 'fr-par',
45
+ defaultZone: 'fr-par-1',
46
+ })
47
+
48
+ const api = new S2SVpn.v1.API(client)
49
+
50
+ // Use the API
51
+ // Example: await api.listServers()
52
+ ```
53
+
54
+ ### Using Configuration Loader
55
+
56
+ For a simpler setup, you can load credentials from the configuration file or environment variables:
57
+
58
+ ```typescript
59
+ import { createClient } from '@scaleway/sdk-client'
60
+ import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
61
+ import { S2SVpn } from '@scaleway/sdk-s2s-vpn'
62
+
63
+ const profile = loadProfileFromConfigurationFile()
64
+ const client = createClient(profile)
65
+ const api = new S2SVpn.v1.API(client)
66
+ ```
67
+
68
+ ## Documentation
69
+
70
+ - 📚 [Scaleway SDK Reference Documentation](https://scaleway.github.io/scaleway-sdk-js)
71
+ - 🌐 [Scaleway S2S Vpn API Documentation](https://www.scaleway.com/en/developers/api/s2s-vpn/)
72
+ - 📖 [Main Repository](https://github.com/scaleway/scaleway-sdk-js)
73
+ - 💡 [Example Projects](https://github.com/scaleway/scaleway-sdk-js/tree/master/examples)
74
+
75
+ ## Features
76
+
77
+ - ✅ Full TypeScript support with complete type definitions
78
+ - ✅ Promise-based API
79
+ - ✅ Automatic pagination helpers
80
+ - ✅ Built-in error handling
81
+ - ✅ Compatible with Node.js ≥ 20
82
+
83
+ ## Support
84
+
85
+ We love feedback! Feel free to reach us on:
86
+ - [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
87
+ - [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
88
+
89
+ ## Contributing
90
+
91
+ This repository is at its early stage and is still in active development. If you are looking for a way to contribute, please read [CONTRIBUTING.md](https://github.com/scaleway/scaleway-sdk-js/blob/master/CONTRIBUTING.md).
92
+
93
+ ## License
94
+
95
+ This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
96
+
@@ -1,6 +1,6 @@
1
- import { API as ParentAPI } from '@scaleway/sdk-client';
2
1
  import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
3
- import type { Connection, CreateConnectionRequest, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CustomerGateway, DeleteConnectionRequest, DeleteCustomerGatewayRequest, DeleteRoutingPolicyRequest, DeleteVpnGatewayRequest, DetachRoutingPolicyRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GetConnectionRequest, GetCustomerGatewayRequest, GetRoutingPolicyRequest, GetVpnGatewayRequest, ListConnectionsRequest, ListConnectionsResponse, ListCustomerGatewaysRequest, ListCustomerGatewaysResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesResponse, ListVpnGatewayTypesRequest, ListVpnGatewayTypesResponse, ListVpnGatewaysRequest, ListVpnGatewaysResponse, RenewConnectionPskRequest, RenewConnectionPskResponse, RoutingPolicy, SetRoutingPolicyRequest, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest, VpnGateway } from './types.gen.js';
2
+ import { API as ParentAPI } from '@scaleway/sdk-client';
3
+ import type { Connection, CreateConnectionRequest, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CustomerGateway, DeleteConnectionRequest, DeleteCustomerGatewayRequest, DeleteRoutingPolicyRequest, DeleteVpnGatewayRequest, DetachRoutingPolicyRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GetConnectionRequest, GetCustomerGatewayRequest, GetRoutingPolicyRequest, GetVpnGatewayRequest, ListConnectionsRequest, ListConnectionsResponse, ListCustomerGatewaysRequest, ListCustomerGatewaysResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesResponse, ListVpnGatewaysRequest, ListVpnGatewaysResponse, ListVpnGatewayTypesRequest, ListVpnGatewayTypesResponse, RenewConnectionPskRequest, RenewConnectionPskResponse, RoutingPolicy, SetRoutingPolicyRequest, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest, VpnGateway } from './types.gen.js';
4
4
  /**
5
5
  * Site-to-Site VPN.
6
6
 
@@ -10,7 +10,11 @@ class API extends API$1 {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- regions: ["fr-par", "nl-ams", "pl-waw"]
13
+ regions: [
14
+ "fr-par",
15
+ "nl-ams",
16
+ "pl-waw"
17
+ ]
14
18
  });
15
19
  pageOfListVpnGatewayTypes = (request = {}) => this.client.fetch(
16
20
  {
@@ -18,10 +22,7 @@ class API extends API$1 {
18
22
  path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/vpn-gateway-types`,
19
23
  urlParams: urlParams(
20
24
  ["page", request.page],
21
- [
22
- "page_size",
23
- request.pageSize ?? this.client.settings.defaultPageSize
24
- ]
25
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
25
26
  )
26
27
  },
27
28
  unmarshalListVpnGatewayTypesResponse
@@ -42,10 +43,7 @@ class API extends API$1 {
42
43
  ["name", request.name],
43
44
  ["order_by", request.orderBy],
44
45
  ["page", request.page],
45
- [
46
- "page_size",
47
- request.pageSize ?? this.client.settings.defaultPageSize
48
- ],
46
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
49
47
  ["private_network_ids", request.privateNetworkIds],
50
48
  ["project_id", request.projectId],
51
49
  ["statuses", request.statuses],
@@ -82,9 +80,7 @@ class API extends API$1 {
82
80
  * @returns A Promise of VpnGateway
83
81
  */
84
82
  waitForVpnGateway = (request, options) => waitForResource(
85
- options?.stop ?? ((res) => Promise.resolve(
86
- !VPN_GATEWAY_TRANSIENT_STATUSES.includes(res.status)
87
- )),
83
+ options?.stop ?? ((res) => Promise.resolve(!VPN_GATEWAY_TRANSIENT_STATUSES.includes(res.status))),
88
84
  this.getVpnGateway,
89
85
  request,
90
86
  options
@@ -146,10 +142,7 @@ class API extends API$1 {
146
142
  ["name", request.name],
147
143
  ["order_by", request.orderBy],
148
144
  ["page", request.page],
149
- [
150
- "page_size",
151
- request.pageSize ?? this.client.settings.defaultPageSize
152
- ],
145
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
153
146
  ["project_id", request.projectId],
154
147
  ["route_propagation_enabled", request.routePropagationEnabled],
155
148
  ["routing_policy_ids", request.routingPolicyIds],
@@ -219,10 +212,12 @@ class API extends API$1 {
219
212
  *
220
213
  * @param request - The request {@link DeleteConnectionRequest}
221
214
  */
222
- deleteConnection = (request) => this.client.fetch({
223
- method: "DELETE",
224
- path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/connections/${validatePathParam("connectionId", request.connectionId)}`
225
- });
215
+ deleteConnection = (request) => this.client.fetch(
216
+ {
217
+ method: "DELETE",
218
+ path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/connections/${validatePathParam("connectionId", request.connectionId)}`
219
+ }
220
+ );
226
221
  /**
227
222
  * Renew pre-shared key. Renew pre-shared key for a given connection.
228
223
  *
@@ -310,10 +305,7 @@ class API extends API$1 {
310
305
  ["name", request.name],
311
306
  ["order_by", request.orderBy],
312
307
  ["page", request.page],
313
- [
314
- "page_size",
315
- request.pageSize ?? this.client.settings.defaultPageSize
316
- ],
308
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
317
309
  ["project_id", request.projectId],
318
310
  ["tags", request.tags]
319
311
  )
@@ -379,10 +371,12 @@ class API extends API$1 {
379
371
  *
380
372
  * @param request - The request {@link DeleteCustomerGatewayRequest}
381
373
  */
382
- deleteCustomerGateway = (request) => this.client.fetch({
383
- method: "DELETE",
384
- path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/customer-gateways/${validatePathParam("gatewayId", request.gatewayId)}`
385
- });
374
+ deleteCustomerGateway = (request) => this.client.fetch(
375
+ {
376
+ method: "DELETE",
377
+ path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/customer-gateways/${validatePathParam("gatewayId", request.gatewayId)}`
378
+ }
379
+ );
386
380
  pageOfListRoutingPolicies = (request = {}) => this.client.fetch(
387
381
  {
388
382
  method: "GET",
@@ -392,10 +386,7 @@ class API extends API$1 {
392
386
  ["name", request.name],
393
387
  ["order_by", request.orderBy],
394
388
  ["page", request.page],
395
- [
396
- "page_size",
397
- request.pageSize ?? this.client.settings.defaultPageSize
398
- ],
389
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
399
390
  ["project_id", request.projectId],
400
391
  ["tags", request.tags]
401
392
  )
@@ -408,11 +399,7 @@ class API extends API$1 {
408
399
  * @param request - The request {@link ListRoutingPoliciesRequest}
409
400
  * @returns A Promise of ListRoutingPoliciesResponse
410
401
  */
411
- listRoutingPolicies = (request = {}) => enrichForPagination(
412
- "routingPolicies",
413
- this.pageOfListRoutingPolicies,
414
- request
415
- );
402
+ listRoutingPolicies = (request = {}) => enrichForPagination("routingPolicies", this.pageOfListRoutingPolicies, request);
416
403
  /**
417
404
  * Get routing policy. Get a routing policy for the given routing policy ID. The response object gives information including the policy's name, tags and prefix filters.
418
405
  *
@@ -465,10 +452,12 @@ class API extends API$1 {
465
452
  *
466
453
  * @param request - The request {@link DeleteRoutingPolicyRequest}
467
454
  */
468
- deleteRoutingPolicy = (request) => this.client.fetch({
469
- method: "DELETE",
470
- path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${validatePathParam("routingPolicyId", request.routingPolicyId)}`
471
- });
455
+ deleteRoutingPolicy = (request) => this.client.fetch(
456
+ {
457
+ method: "DELETE",
458
+ path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${validatePathParam("routingPolicyId", request.routingPolicyId)}`
459
+ }
460
+ );
472
461
  }
473
462
  export {
474
463
  API
@@ -1,5 +1,5 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
- export type { BgpSession, BgpSessionStatus, Connection, ConnectionCipher, ConnectionDhGroup, ConnectionEncryption, ConnectionInitiationPolicy, ConnectionIntegrity, ConnectionStatus, CreateConnectionRequest, CreateConnectionRequestBgpConfig, CreateConnectionRequestInitiationPolicy, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CreateVpnGatewayRequestPublicConfig, CustomerGateway, DeleteConnectionRequest, DeleteCustomerGatewayRequest, DeleteRoutingPolicyRequest, DeleteVpnGatewayRequest, DetachRoutingPolicyRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GatewayType, GetConnectionRequest, GetCustomerGatewayRequest, GetRoutingPolicyRequest, GetVpnGatewayRequest, ListConnectionsRequest, ListConnectionsRequestOrderBy, ListConnectionsResponse, ListCustomerGatewaysRequest, ListCustomerGatewaysRequestOrderBy, ListCustomerGatewaysResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesRequestOrderBy, ListRoutingPoliciesResponse, ListVpnGatewayTypesRequest, ListVpnGatewayTypesResponse, ListVpnGatewaysRequest, ListVpnGatewaysRequestOrderBy, ListVpnGatewaysResponse, RenewConnectionPskRequest, RenewConnectionPskResponse, RoutingPolicy, SetRoutingPolicyRequest, TunnelStatus, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest, VpnGateway, VpnGatewayPrivateConfig, VpnGatewayPublicConfig, VpnGatewayStatus, } from './types.gen.js';
4
+ export type { BgpSession, BgpSessionStatus, Connection, ConnectionCipher, ConnectionDhGroup, ConnectionEncryption, ConnectionInitiationPolicy, ConnectionIntegrity, ConnectionStatus, CreateConnectionRequest, CreateConnectionRequestBgpConfig, CreateConnectionRequestInitiationPolicy, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CreateVpnGatewayRequestPublicConfig, CustomerGateway, DeleteConnectionRequest, DeleteCustomerGatewayRequest, DeleteRoutingPolicyRequest, DeleteVpnGatewayRequest, DetachRoutingPolicyRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GatewayType, GetConnectionRequest, GetCustomerGatewayRequest, GetRoutingPolicyRequest, GetVpnGatewayRequest, ListConnectionsRequest, ListConnectionsRequestOrderBy, ListConnectionsResponse, ListCustomerGatewaysRequest, ListCustomerGatewaysRequestOrderBy, ListCustomerGatewaysResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesRequestOrderBy, ListRoutingPoliciesResponse, ListVpnGatewaysRequest, ListVpnGatewaysRequestOrderBy, ListVpnGatewaysResponse, ListVpnGatewayTypesRequest, ListVpnGatewayTypesResponse, RenewConnectionPskRequest, RenewConnectionPskResponse, RoutingPolicy, SetRoutingPolicyRequest, TunnelStatus, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest, VpnGateway, VpnGatewayPrivateConfig, VpnGatewayPublicConfig, VpnGatewayStatus, } from './types.gen.js';
5
5
  export * as ValidationRules from './validation-rules.gen.js';
@@ -1,5 +1,5 @@
1
1
  import type { DefaultValues } from '@scaleway/sdk-client';
2
- import type { Connection, CreateConnectionRequest, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CustomerGateway, DetachRoutingPolicyRequest, ListConnectionsResponse, ListCustomerGatewaysResponse, ListRoutingPoliciesResponse, ListVpnGatewayTypesResponse, ListVpnGatewaysResponse, RenewConnectionPskResponse, RoutingPolicy, SetRoutingPolicyRequest, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest, VpnGateway } from './types.gen.js';
2
+ import type { Connection, CreateConnectionRequest, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CustomerGateway, DetachRoutingPolicyRequest, ListConnectionsResponse, ListCustomerGatewaysResponse, ListRoutingPoliciesResponse, ListVpnGatewaysResponse, ListVpnGatewayTypesResponse, RenewConnectionPskResponse, RoutingPolicy, SetRoutingPolicyRequest, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest, VpnGateway } from './types.gen.js';
3
3
  export declare const unmarshalConnection: (data: unknown) => Connection;
4
4
  export declare const unmarshalCustomerGateway: (data: unknown) => CustomerGateway;
5
5
  export declare const unmarshalRoutingPolicy: (data: unknown) => RoutingPolicy;
@@ -36,15 +36,9 @@ const unmarshalConnection = (data) => {
36
36
  bgpStatusIpv6: data.bgp_status_ipv6,
37
37
  createdAt: unmarshalDate(data.created_at),
38
38
  customerGatewayId: data.customer_gateway_id,
39
- espCiphers: unmarshalArrayOfObject(
40
- data.esp_ciphers,
41
- unmarshalConnectionCipher
42
- ),
39
+ espCiphers: unmarshalArrayOfObject(data.esp_ciphers, unmarshalConnectionCipher),
43
40
  id: data.id,
44
- ikev2Ciphers: unmarshalArrayOfObject(
45
- data.ikev2_ciphers,
46
- unmarshalConnectionCipher
47
- ),
41
+ ikev2Ciphers: unmarshalArrayOfObject(data.ikev2_ciphers, unmarshalConnectionCipher),
48
42
  initiationPolicy: data.initiation_policy,
49
43
  isIpv6: data.is_ipv6,
50
44
  name: data.name,
@@ -187,10 +181,7 @@ const unmarshalListRoutingPoliciesResponse = (data) => {
187
181
  );
188
182
  }
189
183
  return {
190
- routingPolicies: unmarshalArrayOfObject(
191
- data.routing_policies,
192
- unmarshalRoutingPolicy
193
- ),
184
+ routingPolicies: unmarshalArrayOfObject(data.routing_policies, unmarshalRoutingPolicy),
194
185
  totalCount: data.total_count
195
186
  };
196
187
  };
@@ -204,7 +195,8 @@ const unmarshalGatewayType = (data) => {
204
195
  allowedConnections: data.allowed_connections,
205
196
  bandwidth: data.bandwidth,
206
197
  name: data.name,
207
- region: data.region
198
+ region: data.region,
199
+ zones: data.zones
208
200
  };
209
201
  };
210
202
  const unmarshalListVpnGatewayTypesResponse = (data) => {
@@ -214,10 +206,7 @@ const unmarshalListVpnGatewayTypesResponse = (data) => {
214
206
  );
215
207
  }
216
208
  return {
217
- gatewayTypes: unmarshalArrayOfObject(
218
- data.gateway_types,
219
- unmarshalGatewayType
220
- ),
209
+ gatewayTypes: unmarshalArrayOfObject(data.gateway_types, unmarshalGatewayType),
221
210
  totalCount: data.total_count
222
211
  };
223
212
  };
@@ -258,12 +247,8 @@ const marshalCreateConnectionRequest = (request, defaults) => ({
258
247
  bgp_config_ipv6: request.bgpConfigIpv6 !== void 0 ? marshalCreateConnectionRequestBgpConfig(request.bgpConfigIpv6) : void 0,
259
248
  customer_gateway_id: request.customerGatewayId,
260
249
  enable_route_propagation: request.enableRoutePropagation,
261
- esp_ciphers: request.espCiphers.map(
262
- (elt) => marshalConnectionCipher(elt)
263
- ),
264
- ikev2_ciphers: request.ikev2Ciphers.map(
265
- (elt) => marshalConnectionCipher(elt)
266
- ),
250
+ esp_ciphers: request.espCiphers.map((elt) => marshalConnectionCipher(elt)),
251
+ ikev2_ciphers: request.ikev2Ciphers.map((elt) => marshalConnectionCipher(elt)),
267
252
  initiation_policy: request.initiationPolicy,
268
253
  is_ipv6: request.isIpv6,
269
254
  name: request.name,
@@ -303,22 +288,32 @@ const marshalCreateVpnGatewayRequest = (request, defaults) => ({
303
288
  ...resolveOneOf([
304
289
  {
305
290
  param: "public_config",
306
- value: request.publicConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicConfig(
307
- request.publicConfig
308
- ) : void 0
291
+ value: request.publicConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicConfig(request.publicConfig) : void 0
309
292
  }
310
293
  ])
311
294
  });
312
295
  const marshalDetachRoutingPolicyRequest = (request, defaults) => ({
313
296
  ...resolveOneOf([
314
- { param: "routing_policy_v4", value: request.routingPolicyV4 },
315
- { param: "routing_policy_v6", value: request.routingPolicyV6 }
297
+ {
298
+ param: "routing_policy_v4",
299
+ value: request.routingPolicyV4
300
+ },
301
+ {
302
+ param: "routing_policy_v6",
303
+ value: request.routingPolicyV6
304
+ }
316
305
  ])
317
306
  });
318
307
  const marshalSetRoutingPolicyRequest = (request, defaults) => ({
319
308
  ...resolveOneOf([
320
- { param: "routing_policy_v4", value: request.routingPolicyV4 },
321
- { param: "routing_policy_v6", value: request.routingPolicyV6 }
309
+ {
310
+ param: "routing_policy_v4",
311
+ value: request.routingPolicyV4
312
+ },
313
+ {
314
+ param: "routing_policy_v6",
315
+ value: request.routingPolicyV6
316
+ }
322
317
  ])
323
318
  });
324
319
  const marshalUpdateConnectionRequest = (request, defaults) => ({
@@ -231,6 +231,7 @@ export interface GatewayType {
231
231
  name: string;
232
232
  bandwidth: number;
233
233
  allowedConnections: number;
234
+ zones: string[];
234
235
  /**
235
236
  * Region to target. If none is passed will use default region from the config.
236
237
  */
package/package.json CHANGED
@@ -1,23 +1,20 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-s2s-vpn",
3
- "version": "1.2.0",
3
+ "version": "2.1.1",
4
4
  "description": "Scaleway SDK s2s-vpn",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
7
+ "README.md",
7
8
  "dist"
8
9
  ],
9
10
  "type": "module",
10
11
  "exports": {
11
12
  ".": {
12
13
  "types": "./dist/index.gen.d.ts",
13
- "import": "./dist/index.gen.js",
14
- "require": "./dist/index.gen.cjs",
15
14
  "default": "./dist/index.gen.js"
16
15
  },
17
16
  "./*": {
18
17
  "types": "./dist/*/index.gen.d.ts",
19
- "import": "./dist/*/index.gen.js",
20
- "require": "./dist/*/index.gen.cjs",
21
18
  "default": "./dist/*/index.gen.js"
22
19
  }
23
20
  },
@@ -26,17 +23,17 @@
26
23
  "directory": "packages_generated/s2s-vpn"
27
24
  },
28
25
  "engines": {
29
- "node": ">=20.18.3"
26
+ "node": ">=20.19.6"
30
27
  },
31
28
  "dependencies": {
32
- "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.2.0"
29
+ "@scaleway/random-name": "5.1.2",
30
+ "@scaleway/sdk-std": "2.1.0"
34
31
  },
35
32
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.3"
33
+ "@scaleway/sdk-client": "^2.1.0"
37
34
  },
38
35
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.3"
36
+ "@scaleway/sdk-client": "^2.1.0"
40
37
  },
41
38
  "scripts": {
42
39
  "package:check": "pnpm publint",
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index_gen = require("./v1alpha1/index.gen.cjs");
4
- exports.S2SVpnv1alpha1 = index_gen;