@scaleway/sdk-s2s-vpn 1.1.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,
@@ -52,6 +46,8 @@ const unmarshalConnection = (data) => {
52
46
  projectId: data.project_id,
53
47
  region: data.region,
54
48
  routePropagationEnabled: data.route_propagation_enabled,
49
+ secretId: data.secret_id,
50
+ secretRevision: data.secret_revision,
55
51
  status: data.status,
56
52
  tags: data.tags,
57
53
  tunnelStatus: data.tunnel_status,
@@ -185,10 +181,7 @@ const unmarshalListRoutingPoliciesResponse = (data) => {
185
181
  );
186
182
  }
187
183
  return {
188
- routingPolicies: unmarshalArrayOfObject(
189
- data.routing_policies,
190
- unmarshalRoutingPolicy
191
- ),
184
+ routingPolicies: unmarshalArrayOfObject(data.routing_policies, unmarshalRoutingPolicy),
192
185
  totalCount: data.total_count
193
186
  };
194
187
  };
@@ -202,7 +195,8 @@ const unmarshalGatewayType = (data) => {
202
195
  allowedConnections: data.allowed_connections,
203
196
  bandwidth: data.bandwidth,
204
197
  name: data.name,
205
- region: data.region
198
+ region: data.region,
199
+ zones: data.zones
206
200
  };
207
201
  };
208
202
  const unmarshalListVpnGatewayTypesResponse = (data) => {
@@ -212,10 +206,7 @@ const unmarshalListVpnGatewayTypesResponse = (data) => {
212
206
  );
213
207
  }
214
208
  return {
215
- gatewayTypes: unmarshalArrayOfObject(
216
- data.gateway_types,
217
- unmarshalGatewayType
218
- ),
209
+ gatewayTypes: unmarshalArrayOfObject(data.gateway_types, unmarshalGatewayType),
219
210
  totalCount: data.total_count
220
211
  };
221
212
  };
@@ -256,12 +247,8 @@ const marshalCreateConnectionRequest = (request, defaults) => ({
256
247
  bgp_config_ipv6: request.bgpConfigIpv6 !== void 0 ? marshalCreateConnectionRequestBgpConfig(request.bgpConfigIpv6) : void 0,
257
248
  customer_gateway_id: request.customerGatewayId,
258
249
  enable_route_propagation: request.enableRoutePropagation,
259
- esp_ciphers: request.espCiphers.map(
260
- (elt) => marshalConnectionCipher(elt)
261
- ),
262
- ikev2_ciphers: request.ikev2Ciphers.map(
263
- (elt) => marshalConnectionCipher(elt)
264
- ),
250
+ esp_ciphers: request.espCiphers.map((elt) => marshalConnectionCipher(elt)),
251
+ ikev2_ciphers: request.ikev2Ciphers.map((elt) => marshalConnectionCipher(elt)),
265
252
  initiation_policy: request.initiationPolicy,
266
253
  is_ipv6: request.isIpv6,
267
254
  name: request.name,
@@ -301,22 +288,32 @@ const marshalCreateVpnGatewayRequest = (request, defaults) => ({
301
288
  ...resolveOneOf([
302
289
  {
303
290
  param: "public_config",
304
- value: request.publicConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicConfig(
305
- request.publicConfig
306
- ) : void 0
291
+ value: request.publicConfig !== void 0 ? marshalCreateVpnGatewayRequestPublicConfig(request.publicConfig) : void 0
307
292
  }
308
293
  ])
309
294
  });
310
295
  const marshalDetachRoutingPolicyRequest = (request, defaults) => ({
311
296
  ...resolveOneOf([
312
- { param: "routing_policy_v4", value: request.routingPolicyV4 },
313
- { 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
+ }
314
305
  ])
315
306
  });
316
307
  const marshalSetRoutingPolicyRequest = (request, defaults) => ({
317
308
  ...resolveOneOf([
318
- { param: "routing_policy_v4", value: request.routingPolicyV4 },
319
- { 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
+ }
320
317
  ])
321
318
  });
322
319
  const marshalUpdateConnectionRequest = (request, defaults) => ({
@@ -74,6 +74,14 @@ export interface Connection {
74
74
  * Who initiates the IPsec tunnel.
75
75
  */
76
76
  initiationPolicy: ConnectionInitiationPolicy;
77
+ /**
78
+ * ID of the secret in Secret Manager which contains the PSK.
79
+ */
80
+ secretId: string;
81
+ /**
82
+ * Version number of the secret in Secret Manager which contains the PSK.
83
+ */
84
+ secretRevision: number;
77
85
  /**
78
86
  * List of IKE v2 ciphers proposed for the IPsec tunnel.
79
87
  */
@@ -223,6 +231,7 @@ export interface GatewayType {
223
231
  name: string;
224
232
  bandwidth: number;
225
233
  allowedConnections: number;
234
+ zones: string[];
226
235
  /**
227
236
  * Region to target. If none is passed will use default region from the config.
228
237
  */
@@ -361,9 +370,9 @@ export interface CreateConnectionResponse {
361
370
  */
362
371
  connection?: Connection;
363
372
  /**
364
- * New PSK generated for this connection.
373
+ * @deprecated Deprecated, use secret_id & secret_revision fields.
365
374
  */
366
- preSharedKey: string;
375
+ preSharedKey?: string;
367
376
  }
368
377
  export type CreateCustomerGatewayRequest = {
369
378
  /**
@@ -825,9 +834,9 @@ export interface RenewConnectionPskResponse {
825
834
  */
826
835
  connection?: Connection;
827
836
  /**
828
- * New PSK generated for this connection.
837
+ * @deprecated Deprecated, use secret_id & secret_revision fields.
829
838
  */
830
- preSharedKey: string;
839
+ preSharedKey?: string;
831
840
  }
832
841
  export type SetRoutingPolicyRequest = {
833
842
  /**
package/package.json CHANGED
@@ -1,23 +1,20 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-s2s-vpn",
3
- "version": "1.1.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.1.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.2"
33
+ "@scaleway/sdk-client": "^2.1.0"
37
34
  },
38
35
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.2"
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;