@scaleway/sdk-s2s-vpn 2.8.0 → 2.9.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.
- package/dist/v1alpha1/api.gen.d.ts +10 -3
- package/dist/v1alpha1/api.gen.js +9 -2
- package/dist/v1alpha1/index.gen.d.ts +1 -1
- package/dist/v1alpha1/index.gen.js +5 -2
- package/dist/v1alpha1/marshalling.gen.d.ts +4 -1
- package/dist/v1alpha1/marshalling.gen.js +16 -1
- package/dist/v1alpha1/metadata.gen.d.ts +68 -68
- package/dist/v1alpha1/types.gen.d.ts +40 -4
- package/package.json +13 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
2
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
3
|
-
import type {
|
|
2
|
+
import type { WaitForOptions, ApiLocality } from '@scaleway/sdk-client';
|
|
3
|
+
import type { ChangeConnectionPskRequest, ChangeConnectionPskResponse, 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';
|
|
4
4
|
/**
|
|
5
5
|
* Site-to-Site VPN.
|
|
6
6
|
|
|
@@ -48,7 +48,7 @@ export declare class API extends ParentAPI {
|
|
|
48
48
|
* @param options - The waiting options
|
|
49
49
|
* @returns A Promise of VpnGateway
|
|
50
50
|
*/
|
|
51
|
-
waitForVpnGateway: (request: Readonly<GetVpnGatewayRequest>, options?: Readonly<WaitForOptions<VpnGateway>>
|
|
51
|
+
waitForVpnGateway: (request: Readonly<GetVpnGatewayRequest>, options?: Readonly<WaitForOptions<VpnGateway>>) => Promise<VpnGateway>;
|
|
52
52
|
/**
|
|
53
53
|
* Create VPN gateway.
|
|
54
54
|
*
|
|
@@ -115,6 +115,13 @@ export declare class API extends ParentAPI {
|
|
|
115
115
|
* @returns A Promise of RenewConnectionPskResponse
|
|
116
116
|
*/
|
|
117
117
|
renewConnectionPsk: (request: Readonly<RenewConnectionPskRequest>) => Promise<RenewConnectionPskResponse>;
|
|
118
|
+
/**
|
|
119
|
+
* Change pre-shared key. Change pre-shared key for a given connection.
|
|
120
|
+
*
|
|
121
|
+
* @param request - The request {@link ChangeConnectionPskRequest}
|
|
122
|
+
* @returns A Promise of ChangeConnectionPskResponse
|
|
123
|
+
*/
|
|
124
|
+
changeConnectionPsk: (request: Readonly<ChangeConnectionPskRequest>) => Promise<ChangeConnectionPskResponse>;
|
|
118
125
|
/**
|
|
119
126
|
* Set a new routing policy. Set a new routing policy on a connection, overriding the existing one if present, specified by its connection ID.
|
|
120
127
|
*
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VPN_GATEWAY_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
-
import { marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway } from "./marshalling.gen.js";
|
|
2
|
+
import { marshalChangeConnectionPskRequest, marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalRenewConnectionPskRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalChangeConnectionPskResponse, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway } from "./marshalling.gen.js";
|
|
3
3
|
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
4
|
//#region src/v1alpha1/api.gen.ts
|
|
5
5
|
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
@@ -71,11 +71,17 @@ var API = class extends API$1 {
|
|
|
71
71
|
path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/connections/${validatePathParam("connectionId", request.connectionId)}`
|
|
72
72
|
});
|
|
73
73
|
this.renewConnectionPsk = (request) => this.client.fetch({
|
|
74
|
-
body:
|
|
74
|
+
body: JSON.stringify(marshalRenewConnectionPskRequest(request, this.client.settings)),
|
|
75
75
|
headers: jsonContentHeaders,
|
|
76
76
|
method: "POST",
|
|
77
77
|
path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/connections/${validatePathParam("connectionId", request.connectionId)}/renew-psk`
|
|
78
78
|
}, unmarshalRenewConnectionPskResponse);
|
|
79
|
+
this.changeConnectionPsk = (request) => this.client.fetch({
|
|
80
|
+
body: JSON.stringify(marshalChangeConnectionPskRequest(request, this.client.settings)),
|
|
81
|
+
headers: jsonContentHeaders,
|
|
82
|
+
method: "POST",
|
|
83
|
+
path: `/s2s-vpn/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/connections/${validatePathParam("connectionId", request.connectionId)}/change-psk`
|
|
84
|
+
}, unmarshalChangeConnectionPskResponse);
|
|
79
85
|
this.setRoutingPolicy = (request) => this.client.fetch({
|
|
80
86
|
body: JSON.stringify(marshalSetRoutingPolicyRequest(request, this.client.settings)),
|
|
81
87
|
headers: jsonContentHeaders,
|
|
@@ -156,6 +162,7 @@ var API = class extends API$1 {
|
|
|
156
162
|
static {
|
|
157
163
|
this.LOCALITY = toApiLocality({ regions: [
|
|
158
164
|
"fr-par",
|
|
165
|
+
"it-mil",
|
|
159
166
|
"nl-ams",
|
|
160
167
|
"pl-waw"
|
|
161
168
|
] });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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, CreateVpnGatewayRequestDualIpTunnel, CreateVpnGatewayRequestPublicConfig, CreateVpnGatewayRequestPublicTunnelConfig, CreateVpnGatewayRequestSingleIpTunnel, CustomerGateway, DeleteConnectionRequest, DeleteCustomerGatewayRequest, DeleteRoutingPolicyRequest, DeleteVpnGatewayRequest, DetachRoutingPolicyRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GatewayType, GetConnectionRequest, GetCustomerGatewayRequest, GetRoutingPolicyRequest, GetVpnGatewayRequest, ListConnectionsRequest, ListConnectionsRequestOrderBy, ListConnectionsResponse, ListCustomerGatewaysRequest, ListCustomerGatewaysRequestOrderBy, ListCustomerGatewaysResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesRequestOrderBy, ListRoutingPoliciesResponse,
|
|
4
|
+
export type { BgpSession, BgpSessionStatus, ChangeConnectionPskRequest, ChangeConnectionPskRequestSecret, ChangeConnectionPskResponse, Connection, ConnectionCipher, ConnectionDhGroup, ConnectionEncryption, ConnectionInitiationPolicy, ConnectionIntegrity, ConnectionStatus, CreateConnectionRequest, CreateConnectionRequestBgpConfig, CreateConnectionRequestInitiationPolicy, CreateConnectionRequestSecret, CreateConnectionResponse, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, CreateVpnGatewayRequestDualIpTunnel, CreateVpnGatewayRequestPublicConfig, CreateVpnGatewayRequestPublicTunnelConfig, CreateVpnGatewayRequestSingleIpTunnel, 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';
|
|
5
5
|
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { VPN_GATEWAY_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway } from "./marshalling.gen.js";
|
|
3
|
+
import { marshalChangeConnectionPskRequest, marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalRenewConnectionPskRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalChangeConnectionPskResponse, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
6
|
//#region src/v1alpha1/index.gen.ts
|
|
@@ -8,16 +8,19 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
8
8
|
API: () => API,
|
|
9
9
|
VPN_GATEWAY_TRANSIENT_STATUSES: () => VPN_GATEWAY_TRANSIENT_STATUSES,
|
|
10
10
|
ValidationRules: () => validation_rules_gen_exports,
|
|
11
|
+
marshalChangeConnectionPskRequest: () => marshalChangeConnectionPskRequest,
|
|
11
12
|
marshalCreateConnectionRequest: () => marshalCreateConnectionRequest,
|
|
12
13
|
marshalCreateCustomerGatewayRequest: () => marshalCreateCustomerGatewayRequest,
|
|
13
14
|
marshalCreateRoutingPolicyRequest: () => marshalCreateRoutingPolicyRequest,
|
|
14
15
|
marshalCreateVpnGatewayRequest: () => marshalCreateVpnGatewayRequest,
|
|
15
16
|
marshalDetachRoutingPolicyRequest: () => marshalDetachRoutingPolicyRequest,
|
|
17
|
+
marshalRenewConnectionPskRequest: () => marshalRenewConnectionPskRequest,
|
|
16
18
|
marshalSetRoutingPolicyRequest: () => marshalSetRoutingPolicyRequest,
|
|
17
19
|
marshalUpdateConnectionRequest: () => marshalUpdateConnectionRequest,
|
|
18
20
|
marshalUpdateCustomerGatewayRequest: () => marshalUpdateCustomerGatewayRequest,
|
|
19
21
|
marshalUpdateRoutingPolicyRequest: () => marshalUpdateRoutingPolicyRequest,
|
|
20
22
|
marshalUpdateVpnGatewayRequest: () => marshalUpdateVpnGatewayRequest,
|
|
23
|
+
unmarshalChangeConnectionPskResponse: () => unmarshalChangeConnectionPskResponse,
|
|
21
24
|
unmarshalConnection: () => unmarshalConnection,
|
|
22
25
|
unmarshalCreateConnectionResponse: () => unmarshalCreateConnectionResponse,
|
|
23
26
|
unmarshalCustomerGateway: () => unmarshalCustomerGateway,
|
|
@@ -31,4 +34,4 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
31
34
|
unmarshalVpnGateway: () => unmarshalVpnGateway
|
|
32
35
|
});
|
|
33
36
|
//#endregion
|
|
34
|
-
export { API, VPN_GATEWAY_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway };
|
|
37
|
+
export { API, VPN_GATEWAY_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalChangeConnectionPskRequest, marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalRenewConnectionPskRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalChangeConnectionPskResponse, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { Connection,
|
|
2
|
+
import type { Connection, CustomerGateway, RoutingPolicy, VpnGateway, ChangeConnectionPskResponse, CreateConnectionResponse, ListConnectionsResponse, ListCustomerGatewaysResponse, ListRoutingPoliciesResponse, ListVpnGatewayTypesResponse, ListVpnGatewaysResponse, RenewConnectionPskResponse, ChangeConnectionPskRequest, CreateConnectionRequest, CreateCustomerGatewayRequest, CreateRoutingPolicyRequest, CreateVpnGatewayRequest, DetachRoutingPolicyRequest, RenewConnectionPskRequest, SetRoutingPolicyRequest, UpdateConnectionRequest, UpdateCustomerGatewayRequest, UpdateRoutingPolicyRequest, UpdateVpnGatewayRequest } 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;
|
|
6
6
|
export declare const unmarshalVpnGateway: (data: unknown) => VpnGateway;
|
|
7
|
+
export declare const unmarshalChangeConnectionPskResponse: (data: unknown) => ChangeConnectionPskResponse;
|
|
7
8
|
export declare const unmarshalCreateConnectionResponse: (data: unknown) => CreateConnectionResponse;
|
|
8
9
|
export declare const unmarshalListConnectionsResponse: (data: unknown) => ListConnectionsResponse;
|
|
9
10
|
export declare const unmarshalListCustomerGatewaysResponse: (data: unknown) => ListCustomerGatewaysResponse;
|
|
@@ -11,11 +12,13 @@ export declare const unmarshalListRoutingPoliciesResponse: (data: unknown) => Li
|
|
|
11
12
|
export declare const unmarshalListVpnGatewayTypesResponse: (data: unknown) => ListVpnGatewayTypesResponse;
|
|
12
13
|
export declare const unmarshalListVpnGatewaysResponse: (data: unknown) => ListVpnGatewaysResponse;
|
|
13
14
|
export declare const unmarshalRenewConnectionPskResponse: (data: unknown) => RenewConnectionPskResponse;
|
|
15
|
+
export declare const marshalChangeConnectionPskRequest: (request: ChangeConnectionPskRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
14
16
|
export declare const marshalCreateConnectionRequest: (request: CreateConnectionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
15
17
|
export declare const marshalCreateCustomerGatewayRequest: (request: CreateCustomerGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
16
18
|
export declare const marshalCreateRoutingPolicyRequest: (request: CreateRoutingPolicyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
17
19
|
export declare const marshalCreateVpnGatewayRequest: (request: CreateVpnGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
18
20
|
export declare const marshalDetachRoutingPolicyRequest: (request: DetachRoutingPolicyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
21
|
+
export declare const marshalRenewConnectionPskRequest: (request: RenewConnectionPskRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
19
22
|
export declare const marshalSetRoutingPolicyRequest: (request: SetRoutingPolicyRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
20
23
|
export declare const marshalUpdateConnectionRequest: (request: UpdateConnectionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
21
24
|
export declare const marshalUpdateCustomerGatewayRequest: (request: UpdateCustomerGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -113,6 +113,10 @@ const unmarshalVpnGateway = (data) => {
|
|
|
113
113
|
zone: data.zone
|
|
114
114
|
};
|
|
115
115
|
};
|
|
116
|
+
const unmarshalChangeConnectionPskResponse = (data) => {
|
|
117
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ChangeConnectionPskResponse' failed as data isn't a dictionary.`);
|
|
118
|
+
return { connection: data.connection ? unmarshalConnection(data.connection) : void 0 };
|
|
119
|
+
};
|
|
116
120
|
const unmarshalCreateConnectionResponse = (data) => {
|
|
117
121
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'CreateConnectionResponse' failed as data isn't a dictionary.`);
|
|
118
122
|
return {
|
|
@@ -172,6 +176,11 @@ const unmarshalRenewConnectionPskResponse = (data) => {
|
|
|
172
176
|
preSharedKey: data.pre_shared_key
|
|
173
177
|
};
|
|
174
178
|
};
|
|
179
|
+
const marshalChangeConnectionPskRequestSecret = (request, defaults) => ({
|
|
180
|
+
id: request.id,
|
|
181
|
+
revision: request.revision
|
|
182
|
+
});
|
|
183
|
+
const marshalChangeConnectionPskRequest = (request, defaults) => ({ secret: marshalChangeConnectionPskRequestSecret(request.secret, defaults) });
|
|
175
184
|
const marshalConnectionCipher = (request, defaults) => ({
|
|
176
185
|
dh_group: request.dhGroup,
|
|
177
186
|
encryption: request.encryption,
|
|
@@ -182,6 +191,10 @@ const marshalCreateConnectionRequestBgpConfig = (request, defaults) => ({
|
|
|
182
191
|
private_ip: request.privateIp,
|
|
183
192
|
routing_policy_id: request.routingPolicyId
|
|
184
193
|
});
|
|
194
|
+
const marshalCreateConnectionRequestSecret = (request, defaults) => ({
|
|
195
|
+
id: request.id,
|
|
196
|
+
revision: request.revision
|
|
197
|
+
});
|
|
185
198
|
const marshalCreateConnectionRequest = (request, defaults) => ({
|
|
186
199
|
bgp_config_ipv4: request.bgpConfigIpv4 !== void 0 ? marshalCreateConnectionRequestBgpConfig(request.bgpConfigIpv4, defaults) : void 0,
|
|
187
200
|
bgp_config_ipv6: request.bgpConfigIpv6 !== void 0 ? marshalCreateConnectionRequestBgpConfig(request.bgpConfigIpv6, defaults) : void 0,
|
|
@@ -193,6 +206,7 @@ const marshalCreateConnectionRequest = (request, defaults) => ({
|
|
|
193
206
|
is_ipv6: request.isIpv6,
|
|
194
207
|
name: request.name,
|
|
195
208
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
209
|
+
secret: request.secret !== void 0 ? marshalCreateConnectionRequestSecret(request.secret, defaults) : void 0,
|
|
196
210
|
tags: request.tags,
|
|
197
211
|
vpn_gateway_id: request.vpnGatewayId
|
|
198
212
|
});
|
|
@@ -259,6 +273,7 @@ const marshalDetachRoutingPolicyRequest = (request, defaults) => ({ ...resolveOn
|
|
|
259
273
|
param: "routing_policy_v6",
|
|
260
274
|
value: request.routingPolicyV6
|
|
261
275
|
}]) });
|
|
276
|
+
const marshalRenewConnectionPskRequest = (request, defaults) => ({ generate_revision: request.generateRevision });
|
|
262
277
|
const marshalSetRoutingPolicyRequest = (request, defaults) => ({ ...resolveOneOf([{
|
|
263
278
|
param: "routing_policy_v4",
|
|
264
279
|
value: request.routingPolicyV4
|
|
@@ -291,4 +306,4 @@ const marshalUpdateVpnGatewayRequest = (request, defaults) => ({
|
|
|
291
306
|
tags: request.tags
|
|
292
307
|
});
|
|
293
308
|
//#endregion
|
|
294
|
-
export { marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway };
|
|
309
|
+
export { marshalChangeConnectionPskRequest, marshalCreateConnectionRequest, marshalCreateCustomerGatewayRequest, marshalCreateRoutingPolicyRequest, marshalCreateVpnGatewayRequest, marshalDetachRoutingPolicyRequest, marshalRenewConnectionPskRequest, marshalSetRoutingPolicyRequest, marshalUpdateConnectionRequest, marshalUpdateCustomerGatewayRequest, marshalUpdateRoutingPolicyRequest, marshalUpdateVpnGatewayRequest, unmarshalChangeConnectionPskResponse, unmarshalConnection, unmarshalCreateConnectionResponse, unmarshalCustomerGateway, unmarshalListConnectionsResponse, unmarshalListCustomerGatewaysResponse, unmarshalListRoutingPoliciesResponse, unmarshalListVpnGatewayTypesResponse, unmarshalListVpnGatewaysResponse, unmarshalRenewConnectionPskResponse, unmarshalRoutingPolicy, unmarshalVpnGateway };
|
|
@@ -1,101 +1,101 @@
|
|
|
1
1
|
export declare const queriesMetadata: {
|
|
2
|
-
readonly namespace:
|
|
3
|
-
readonly version:
|
|
4
|
-
readonly folderName:
|
|
2
|
+
readonly namespace: 's2s_vpn';
|
|
3
|
+
readonly version: 'v1alpha1';
|
|
4
|
+
readonly folderName: 's2SVpnv1alpha1';
|
|
5
5
|
readonly services: readonly [{
|
|
6
|
-
readonly apiClass:
|
|
6
|
+
readonly apiClass: 'API';
|
|
7
7
|
readonly methods: readonly [{
|
|
8
|
-
readonly methodName:
|
|
9
|
-
readonly protoName:
|
|
10
|
-
readonly paramsType:
|
|
11
|
-
readonly returnType:
|
|
8
|
+
readonly methodName: 'listVpnGatewayTypes';
|
|
9
|
+
readonly protoName: 'ListVpnGatewayTypes';
|
|
10
|
+
readonly paramsType: 'ListVpnGatewayTypesRequest';
|
|
11
|
+
readonly returnType: 'ListVpnGatewayTypesResponse';
|
|
12
12
|
readonly isList: true;
|
|
13
|
-
readonly paginationType:
|
|
14
|
-
readonly pageParamKey:
|
|
15
|
-
readonly listItemType:
|
|
13
|
+
readonly paginationType: 'offset';
|
|
14
|
+
readonly pageParamKey: 'page';
|
|
15
|
+
readonly listItemType: 'GatewayType';
|
|
16
16
|
readonly isPrivate: false;
|
|
17
|
-
readonly description: "
|
|
17
|
+
readonly description: '"';
|
|
18
18
|
}, {
|
|
19
|
-
readonly methodName:
|
|
20
|
-
readonly protoName:
|
|
21
|
-
readonly paramsType:
|
|
22
|
-
readonly returnType:
|
|
19
|
+
readonly methodName: 'listVpnGateways';
|
|
20
|
+
readonly protoName: 'ListVpnGateways';
|
|
21
|
+
readonly paramsType: 'ListVpnGatewaysRequest';
|
|
22
|
+
readonly returnType: 'ListVpnGatewaysResponse';
|
|
23
23
|
readonly isList: true;
|
|
24
|
-
readonly paginationType:
|
|
25
|
-
readonly pageParamKey:
|
|
26
|
-
readonly listItemType:
|
|
24
|
+
readonly paginationType: 'offset';
|
|
25
|
+
readonly pageParamKey: 'page';
|
|
26
|
+
readonly listItemType: 'VpnGateway';
|
|
27
27
|
readonly isPrivate: false;
|
|
28
|
-
readonly description: "
|
|
28
|
+
readonly description: '"';
|
|
29
29
|
}, {
|
|
30
|
-
readonly methodName:
|
|
31
|
-
readonly protoName:
|
|
32
|
-
readonly paramsType:
|
|
33
|
-
readonly returnType:
|
|
30
|
+
readonly methodName: 'getVpnGateway';
|
|
31
|
+
readonly protoName: 'GetVpnGateway';
|
|
32
|
+
readonly paramsType: 'GetVpnGatewayRequest';
|
|
33
|
+
readonly returnType: 'VpnGateway';
|
|
34
34
|
readonly isList: false;
|
|
35
|
-
readonly paginationType:
|
|
35
|
+
readonly paginationType: 'none';
|
|
36
36
|
readonly isPrivate: false;
|
|
37
|
-
readonly description: "
|
|
37
|
+
readonly description: '"';
|
|
38
38
|
readonly hasWaiter: true;
|
|
39
39
|
}, {
|
|
40
|
-
readonly methodName:
|
|
41
|
-
readonly protoName:
|
|
42
|
-
readonly paramsType:
|
|
43
|
-
readonly returnType:
|
|
40
|
+
readonly methodName: 'listConnections';
|
|
41
|
+
readonly protoName: 'ListConnections';
|
|
42
|
+
readonly paramsType: 'ListConnectionsRequest';
|
|
43
|
+
readonly returnType: 'ListConnectionsResponse';
|
|
44
44
|
readonly isList: true;
|
|
45
|
-
readonly paginationType:
|
|
46
|
-
readonly pageParamKey:
|
|
47
|
-
readonly listItemType:
|
|
45
|
+
readonly paginationType: 'offset';
|
|
46
|
+
readonly pageParamKey: 'page';
|
|
47
|
+
readonly listItemType: 'Connection';
|
|
48
48
|
readonly isPrivate: false;
|
|
49
|
-
readonly description: "
|
|
49
|
+
readonly description: '"';
|
|
50
50
|
}, {
|
|
51
|
-
readonly methodName:
|
|
52
|
-
readonly protoName:
|
|
53
|
-
readonly paramsType:
|
|
54
|
-
readonly returnType:
|
|
51
|
+
readonly methodName: 'getConnection';
|
|
52
|
+
readonly protoName: 'GetConnection';
|
|
53
|
+
readonly paramsType: 'GetConnectionRequest';
|
|
54
|
+
readonly returnType: 'Connection';
|
|
55
55
|
readonly isList: false;
|
|
56
|
-
readonly paginationType:
|
|
56
|
+
readonly paginationType: 'none';
|
|
57
57
|
readonly isPrivate: false;
|
|
58
|
-
readonly description: "
|
|
58
|
+
readonly description: '"';
|
|
59
59
|
}, {
|
|
60
|
-
readonly methodName:
|
|
61
|
-
readonly protoName:
|
|
62
|
-
readonly paramsType:
|
|
63
|
-
readonly returnType:
|
|
60
|
+
readonly methodName: 'listCustomerGateways';
|
|
61
|
+
readonly protoName: 'ListCustomerGateways';
|
|
62
|
+
readonly paramsType: 'ListCustomerGatewaysRequest';
|
|
63
|
+
readonly returnType: 'ListCustomerGatewaysResponse';
|
|
64
64
|
readonly isList: true;
|
|
65
|
-
readonly paginationType:
|
|
66
|
-
readonly pageParamKey:
|
|
67
|
-
readonly listItemType:
|
|
65
|
+
readonly paginationType: 'offset';
|
|
66
|
+
readonly pageParamKey: 'page';
|
|
67
|
+
readonly listItemType: 'CustomerGateway';
|
|
68
68
|
readonly isPrivate: false;
|
|
69
|
-
readonly description: "
|
|
69
|
+
readonly description: '"';
|
|
70
70
|
}, {
|
|
71
|
-
readonly methodName:
|
|
72
|
-
readonly protoName:
|
|
73
|
-
readonly paramsType:
|
|
74
|
-
readonly returnType:
|
|
71
|
+
readonly methodName: 'getCustomerGateway';
|
|
72
|
+
readonly protoName: 'GetCustomerGateway';
|
|
73
|
+
readonly paramsType: 'GetCustomerGatewayRequest';
|
|
74
|
+
readonly returnType: 'CustomerGateway';
|
|
75
75
|
readonly isList: false;
|
|
76
|
-
readonly paginationType:
|
|
76
|
+
readonly paginationType: 'none';
|
|
77
77
|
readonly isPrivate: false;
|
|
78
|
-
readonly description: "
|
|
78
|
+
readonly description: '"';
|
|
79
79
|
}, {
|
|
80
|
-
readonly methodName:
|
|
81
|
-
readonly protoName:
|
|
82
|
-
readonly paramsType:
|
|
83
|
-
readonly returnType:
|
|
80
|
+
readonly methodName: 'listRoutingPolicies';
|
|
81
|
+
readonly protoName: 'ListRoutingPolicies';
|
|
82
|
+
readonly paramsType: 'ListRoutingPoliciesRequest';
|
|
83
|
+
readonly returnType: 'ListRoutingPoliciesResponse';
|
|
84
84
|
readonly isList: true;
|
|
85
|
-
readonly paginationType:
|
|
86
|
-
readonly pageParamKey:
|
|
87
|
-
readonly listItemType:
|
|
85
|
+
readonly paginationType: 'offset';
|
|
86
|
+
readonly pageParamKey: 'page';
|
|
87
|
+
readonly listItemType: 'RoutingPolicy';
|
|
88
88
|
readonly isPrivate: false;
|
|
89
|
-
readonly description: "
|
|
89
|
+
readonly description: '"';
|
|
90
90
|
}, {
|
|
91
|
-
readonly methodName:
|
|
92
|
-
readonly protoName:
|
|
93
|
-
readonly paramsType:
|
|
94
|
-
readonly returnType:
|
|
91
|
+
readonly methodName: 'getRoutingPolicy';
|
|
92
|
+
readonly protoName: 'GetRoutingPolicy';
|
|
93
|
+
readonly paramsType: 'GetRoutingPolicyRequest';
|
|
94
|
+
readonly returnType: 'RoutingPolicy';
|
|
95
95
|
readonly isList: false;
|
|
96
|
-
readonly paginationType:
|
|
96
|
+
readonly paginationType: 'none';
|
|
97
97
|
readonly isPrivate: false;
|
|
98
|
-
readonly description: "
|
|
98
|
+
readonly description: '"';
|
|
99
99
|
}];
|
|
100
100
|
}];
|
|
101
101
|
};
|
|
@@ -35,10 +35,9 @@ export interface VpnGatewayPublicConfig {
|
|
|
35
35
|
ipamIpv4Id?: string;
|
|
36
36
|
ipamIpv6Id?: string;
|
|
37
37
|
}
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
peerPrivateIp?: string;
|
|
38
|
+
export interface ChangeConnectionPskRequestSecret {
|
|
39
|
+
id: string;
|
|
40
|
+
revision?: number;
|
|
42
41
|
}
|
|
43
42
|
export interface Connection {
|
|
44
43
|
/**
|
|
@@ -142,6 +141,15 @@ export interface Connection {
|
|
|
142
141
|
*/
|
|
143
142
|
region: ScwRegion;
|
|
144
143
|
}
|
|
144
|
+
export interface CreateConnectionRequestBgpConfig {
|
|
145
|
+
routingPolicyId: string;
|
|
146
|
+
privateIp?: string;
|
|
147
|
+
peerPrivateIp?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface CreateConnectionRequestSecret {
|
|
150
|
+
id: string;
|
|
151
|
+
revision?: number;
|
|
152
|
+
}
|
|
145
153
|
export interface CreateVpnGatewayRequestPublicConfig {
|
|
146
154
|
ipamIpv4Id?: string;
|
|
147
155
|
ipamIpv6Id?: string;
|
|
@@ -346,6 +354,26 @@ export interface VpnGateway {
|
|
|
346
354
|
*/
|
|
347
355
|
region: ScwRegion;
|
|
348
356
|
}
|
|
357
|
+
export type ChangeConnectionPskRequest = {
|
|
358
|
+
/**
|
|
359
|
+
* Region to target. If none is passed will use default region from the config.
|
|
360
|
+
*/
|
|
361
|
+
region?: ScwRegion;
|
|
362
|
+
/**
|
|
363
|
+
* ID of the connection to renew the PSK.
|
|
364
|
+
*/
|
|
365
|
+
connectionId: string;
|
|
366
|
+
/**
|
|
367
|
+
* New PSK Secret of the connection.
|
|
368
|
+
*/
|
|
369
|
+
secret: ChangeConnectionPskRequestSecret;
|
|
370
|
+
};
|
|
371
|
+
export interface ChangeConnectionPskResponse {
|
|
372
|
+
/**
|
|
373
|
+
* This connection.
|
|
374
|
+
*/
|
|
375
|
+
connection?: Connection;
|
|
376
|
+
}
|
|
349
377
|
export type CreateConnectionRequest = {
|
|
350
378
|
/**
|
|
351
379
|
* Region to target. If none is passed will use default region from the config.
|
|
@@ -383,6 +411,10 @@ export type CreateConnectionRequest = {
|
|
|
383
411
|
* Defines whether route propagation is enabled or not.
|
|
384
412
|
*/
|
|
385
413
|
enableRoutePropagation: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* Specifies the pre-shared key used for the IPsec tunnel.
|
|
416
|
+
*/
|
|
417
|
+
secret?: CreateConnectionRequestSecret;
|
|
386
418
|
/**
|
|
387
419
|
* ID of the VPN gateway to attach to the connection.
|
|
388
420
|
*/
|
|
@@ -884,6 +916,10 @@ export type RenewConnectionPskRequest = {
|
|
|
884
916
|
* ID of the connection to renew the PSK.
|
|
885
917
|
*/
|
|
886
918
|
connectionId: string;
|
|
919
|
+
/**
|
|
920
|
+
* Generate a new revision or update to the latest existing one.
|
|
921
|
+
*/
|
|
922
|
+
generateRevision?: boolean;
|
|
887
923
|
};
|
|
888
924
|
export interface RenewConnectionPskResponse {
|
|
889
925
|
/**
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-s2s-vpn",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Scaleway SDK s2s-vpn",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"directory": "packages_generated/s2s-vpn"
|
|
9
|
+
},
|
|
6
10
|
"files": [
|
|
7
11
|
"README.md",
|
|
8
12
|
"dist"
|
|
@@ -26,25 +30,20 @@
|
|
|
26
30
|
"default": "./dist/*/metadata.gen.js"
|
|
27
31
|
}
|
|
28
32
|
},
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"directory": "packages_generated/s2s-vpn"
|
|
32
|
-
},
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">=20.19.6"
|
|
35
|
-
},
|
|
36
33
|
"dependencies": {
|
|
37
34
|
"@scaleway/random-name": "5.1.4",
|
|
38
|
-
"@scaleway/sdk-std": "2.4.
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"@repo/configs": "^0.1.1",
|
|
42
|
-
"@scaleway/sdk-client": "^2.3.0"
|
|
35
|
+
"@scaleway/sdk-std": "2.4.2"
|
|
43
36
|
},
|
|
44
37
|
"devDependencies": {
|
|
45
|
-
"@scaleway/sdk-client": "^2.
|
|
38
|
+
"@scaleway/sdk-client": "^2.4.0",
|
|
46
39
|
"@repo/configs": "^0.1.1"
|
|
47
40
|
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@scaleway/sdk-client": "^2.4.0"
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=20.20.2"
|
|
46
|
+
},
|
|
48
47
|
"scripts": {
|
|
49
48
|
"package:check": "pnpm publint",
|
|
50
49
|
"typecheck": "tsgo --noEmit",
|