@scaleway/sdk-vpcgw 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.
- package/dist/_virtual/_rolldown/runtime.js +2 -0
- package/dist/v1/api.gen.js +5 -3
- package/dist/v1/content.gen.js +4 -2
- package/dist/v1/index.gen.js +3 -1
- package/dist/v1/marshalling.gen.js +32 -30
- package/dist/v1/metadata.gen.d.ts +141 -0
- package/dist/v1/metadata.gen.js +157 -0
- package/dist/v1/types.gen.js +0 -0
- package/dist/v2/api.gen.js +5 -3
- package/dist/v2/content.gen.js +4 -2
- package/dist/v2/index.gen.js +3 -1
- package/dist/v2/marshalling.gen.js +26 -24
- package/dist/v2/metadata.gen.d.ts +101 -0
- package/dist/v2/metadata.gen.js +113 -0
- package/dist/v2/types.gen.js +0 -0
- package/package.json +5 -5
|
@@ -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 };
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateDHCPEntryRequest, marshalCreateDHCPRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePATRuleRequest, marshalSetDHCPEntriesRequest, marshalSetPATRulesRequest, marshalUpdateDHCPEntryRequest, marshalUpdateDHCPRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePATRuleRequest, marshalUpgradeGatewayRequest, unmarshalDHCP, unmarshalDHCPEntry, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListDHCPEntriesResponse, unmarshalListDHCPsResponse, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPATRulesResponse, unmarshalPATRule, unmarshalSetDHCPEntriesResponse, unmarshalSetPATRulesResponse } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Public Gateways API.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Public Gateways.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -488,4 +489,5 @@ var API$1 = class extends API {
|
|
|
488
489
|
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/migrate-to-v2`
|
|
489
490
|
});
|
|
490
491
|
};
|
|
491
|
-
|
|
492
|
+
//#endregion
|
|
493
|
+
export { API };
|
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
//#region src/v1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */
|
|
2
|
-
|
|
3
|
+
var GATEWAY_NETWORK_TRANSIENT_STATUSES = [
|
|
3
4
|
"attaching",
|
|
4
5
|
"configuring",
|
|
5
6
|
"detaching"
|
|
6
7
|
];
|
|
7
8
|
/** Lists transient statutes of the enum {@link GatewayStatus}. */
|
|
8
|
-
|
|
9
|
+
var GATEWAY_TRANSIENT_STATUSES = [
|
|
9
10
|
"allocating",
|
|
10
11
|
"configuring",
|
|
11
12
|
"stopping",
|
|
12
13
|
"deleting"
|
|
13
14
|
];
|
|
15
|
+
//#endregion
|
|
14
16
|
export { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES };
|
package/dist/v1/index.gen.js
CHANGED
|
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import { marshalCreateDHCPEntryRequest, marshalCreateDHCPRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePATRuleRequest, marshalSetDHCPEntriesRequest, marshalSetPATRulesRequest, marshalUpdateDHCPEntryRequest, marshalUpdateDHCPRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePATRuleRequest, marshalUpgradeGatewayRequest, unmarshalDHCP, unmarshalDHCPEntry, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListDHCPEntriesResponse, unmarshalListDHCPsResponse, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPATRulesResponse, unmarshalPATRule, unmarshalSetDHCPEntriesResponse, unmarshalSetPATRulesResponse } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
|
+
//#region src/v1/index.gen.ts
|
|
5
6
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
6
7
|
API: () => API,
|
|
7
8
|
GATEWAY_NETWORK_TRANSIENT_STATUSES: () => GATEWAY_NETWORK_TRANSIENT_STATUSES,
|
|
@@ -37,4 +38,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
37
38
|
unmarshalSetDHCPEntriesResponse: () => unmarshalSetDHCPEntriesResponse,
|
|
38
39
|
unmarshalSetPATRulesResponse: () => unmarshalSetPATRulesResponse
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
//#endregion
|
|
42
|
+
export { API, GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES, index_gen_exports, marshalCreateDHCPEntryRequest, marshalCreateDHCPRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePATRuleRequest, marshalSetDHCPEntriesRequest, marshalSetPATRulesRequest, marshalUpdateDHCPEntryRequest, marshalUpdateDHCPRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePATRuleRequest, marshalUpgradeGatewayRequest, unmarshalDHCP, unmarshalDHCPEntry, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListDHCPEntriesResponse, unmarshalListDHCPsResponse, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPATRulesResponse, unmarshalPATRule, unmarshalSetDHCPEntriesResponse, unmarshalSetPATRulesResponse };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
-
|
|
3
|
+
//#region src/v1/marshalling.gen.ts
|
|
4
|
+
var unmarshalDHCP = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DHCP' failed as data isn't a dictionary.`);
|
|
5
6
|
return {
|
|
6
7
|
address: data.address,
|
|
@@ -31,7 +32,7 @@ var unmarshalIpamConfig = (data) => {
|
|
|
31
32
|
pushDefaultRoute: data.push_default_route
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
var unmarshalGatewayNetwork = (data) => {
|
|
35
36
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayNetwork' failed as data isn't a dictionary.`);
|
|
36
37
|
return {
|
|
37
38
|
address: data.address,
|
|
@@ -49,7 +50,7 @@ const unmarshalGatewayNetwork = (data) => {
|
|
|
49
50
|
zone: data.zone
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
+
var unmarshalIP = (data) => {
|
|
53
54
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
|
|
54
55
|
return {
|
|
55
56
|
address: data.address,
|
|
@@ -64,7 +65,7 @@ const unmarshalIP = (data) => {
|
|
|
64
65
|
zone: data.zone
|
|
65
66
|
};
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
+
var unmarshalDHCPEntry = (data) => {
|
|
68
69
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DHCPEntry' failed as data isn't a dictionary.`);
|
|
69
70
|
return {
|
|
70
71
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -86,7 +87,7 @@ var unmarshalGatewayType = (data) => {
|
|
|
86
87
|
zone: data.zone
|
|
87
88
|
};
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
+
var unmarshalGateway = (data) => {
|
|
90
91
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Gateway' failed as data isn't a dictionary.`);
|
|
91
92
|
return {
|
|
92
93
|
bastionEnabled: data.bastion_enabled,
|
|
@@ -111,7 +112,7 @@ const unmarshalGateway = (data) => {
|
|
|
111
112
|
zone: data.zone
|
|
112
113
|
};
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
+
var unmarshalPATRule = (data) => {
|
|
115
116
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PATRule' failed as data isn't a dictionary.`);
|
|
116
117
|
return {
|
|
117
118
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -125,61 +126,61 @@ const unmarshalPATRule = (data) => {
|
|
|
125
126
|
zone: data.zone
|
|
126
127
|
};
|
|
127
128
|
};
|
|
128
|
-
|
|
129
|
+
var unmarshalListDHCPEntriesResponse = (data) => {
|
|
129
130
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDHCPEntriesResponse' failed as data isn't a dictionary.`);
|
|
130
131
|
return {
|
|
131
132
|
dhcpEntries: unmarshalArrayOfObject(data.dhcp_entries, unmarshalDHCPEntry),
|
|
132
133
|
totalCount: data.total_count
|
|
133
134
|
};
|
|
134
135
|
};
|
|
135
|
-
|
|
136
|
+
var unmarshalListDHCPsResponse = (data) => {
|
|
136
137
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDHCPsResponse' failed as data isn't a dictionary.`);
|
|
137
138
|
return {
|
|
138
139
|
dhcps: unmarshalArrayOfObject(data.dhcps, unmarshalDHCP),
|
|
139
140
|
totalCount: data.total_count
|
|
140
141
|
};
|
|
141
142
|
};
|
|
142
|
-
|
|
143
|
+
var unmarshalListGatewayNetworksResponse = (data) => {
|
|
143
144
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayNetworksResponse' failed as data isn't a dictionary.`);
|
|
144
145
|
return {
|
|
145
146
|
gatewayNetworks: unmarshalArrayOfObject(data.gateway_networks, unmarshalGatewayNetwork),
|
|
146
147
|
totalCount: data.total_count
|
|
147
148
|
};
|
|
148
149
|
};
|
|
149
|
-
|
|
150
|
+
var unmarshalListGatewayTypesResponse = (data) => {
|
|
150
151
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayTypesResponse' failed as data isn't a dictionary.`);
|
|
151
152
|
return { types: unmarshalArrayOfObject(data.types, unmarshalGatewayType) };
|
|
152
153
|
};
|
|
153
|
-
|
|
154
|
+
var unmarshalListGatewaysResponse = (data) => {
|
|
154
155
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewaysResponse' failed as data isn't a dictionary.`);
|
|
155
156
|
return {
|
|
156
157
|
gateways: unmarshalArrayOfObject(data.gateways, unmarshalGateway),
|
|
157
158
|
totalCount: data.total_count
|
|
158
159
|
};
|
|
159
160
|
};
|
|
160
|
-
|
|
161
|
+
var unmarshalListIPsResponse = (data) => {
|
|
161
162
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary.`);
|
|
162
163
|
return {
|
|
163
164
|
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
164
165
|
totalCount: data.total_count
|
|
165
166
|
};
|
|
166
167
|
};
|
|
167
|
-
|
|
168
|
+
var unmarshalListPATRulesResponse = (data) => {
|
|
168
169
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPATRulesResponse' failed as data isn't a dictionary.`);
|
|
169
170
|
return {
|
|
170
171
|
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPATRule),
|
|
171
172
|
totalCount: data.total_count
|
|
172
173
|
};
|
|
173
174
|
};
|
|
174
|
-
|
|
175
|
+
var unmarshalSetDHCPEntriesResponse = (data) => {
|
|
175
176
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetDHCPEntriesResponse' failed as data isn't a dictionary.`);
|
|
176
177
|
return { dhcpEntries: unmarshalArrayOfObject(data.dhcp_entries, unmarshalDHCPEntry) };
|
|
177
178
|
};
|
|
178
|
-
|
|
179
|
+
var unmarshalSetPATRulesResponse = (data) => {
|
|
179
180
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetPATRulesResponse' failed as data isn't a dictionary.`);
|
|
180
181
|
return { patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPATRule) };
|
|
181
182
|
};
|
|
182
|
-
|
|
183
|
+
var marshalCreateDHCPRequest = (request, defaults) => ({
|
|
183
184
|
address: request.address,
|
|
184
185
|
dns_local_name: request.dnsLocalName,
|
|
185
186
|
dns_search: request.dnsSearch,
|
|
@@ -195,7 +196,7 @@ const marshalCreateDHCPRequest = (request, defaults) => ({
|
|
|
195
196
|
subnet: request.subnet,
|
|
196
197
|
valid_lifetime: request.validLifetime
|
|
197
198
|
});
|
|
198
|
-
|
|
199
|
+
var marshalCreateDHCPEntryRequest = (request, defaults) => ({
|
|
199
200
|
gateway_network_id: request.gatewayNetworkId,
|
|
200
201
|
ip_address: request.ipAddress,
|
|
201
202
|
mac_address: request.macAddress
|
|
@@ -204,7 +205,7 @@ var marshalCreateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
|
|
|
204
205
|
ipam_ip_id: request.ipamIpId,
|
|
205
206
|
push_default_route: request.pushDefaultRoute
|
|
206
207
|
});
|
|
207
|
-
|
|
208
|
+
var marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
208
209
|
enable_dhcp: request.enableDhcp,
|
|
209
210
|
enable_masquerade: request.enableMasquerade,
|
|
210
211
|
gateway_id: request.gatewayId,
|
|
@@ -228,7 +229,7 @@ const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
228
229
|
}
|
|
229
230
|
])
|
|
230
231
|
});
|
|
231
|
-
|
|
232
|
+
var marshalCreateGatewayRequest = (request, defaults) => ({
|
|
232
233
|
bastion_port: request.bastionPort,
|
|
233
234
|
enable_bastion: request.enableBastion,
|
|
234
235
|
enable_smtp: request.enableSmtp,
|
|
@@ -239,11 +240,11 @@ const marshalCreateGatewayRequest = (request, defaults) => ({
|
|
|
239
240
|
type: request.type,
|
|
240
241
|
upstream_dns_servers: request.upstreamDnsServers
|
|
241
242
|
});
|
|
242
|
-
|
|
243
|
+
var marshalCreateIPRequest = (request, defaults) => ({
|
|
243
244
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
244
245
|
tags: request.tags
|
|
245
246
|
});
|
|
246
|
-
|
|
247
|
+
var marshalCreatePATRuleRequest = (request, defaults) => ({
|
|
247
248
|
gateway_id: request.gatewayId,
|
|
248
249
|
private_ip: request.privateIp,
|
|
249
250
|
private_port: request.privatePort,
|
|
@@ -254,7 +255,7 @@ var marshalSetDHCPEntriesRequestEntry = (request, defaults) => ({
|
|
|
254
255
|
ip_address: request.ipAddress,
|
|
255
256
|
mac_address: request.macAddress
|
|
256
257
|
});
|
|
257
|
-
|
|
258
|
+
var marshalSetDHCPEntriesRequest = (request, defaults) => ({
|
|
258
259
|
dhcp_entries: request.dhcpEntries !== void 0 ? request.dhcpEntries.map((elt) => marshalSetDHCPEntriesRequestEntry(elt, defaults)) : void 0,
|
|
259
260
|
gateway_network_id: request.gatewayNetworkId
|
|
260
261
|
});
|
|
@@ -264,12 +265,12 @@ var marshalSetPATRulesRequestRule = (request, defaults) => ({
|
|
|
264
265
|
protocol: request.protocol,
|
|
265
266
|
public_port: request.publicPort
|
|
266
267
|
});
|
|
267
|
-
|
|
268
|
+
var marshalSetPATRulesRequest = (request, defaults) => ({
|
|
268
269
|
gateway_id: request.gatewayId,
|
|
269
270
|
pat_rules: request.patRules.map((elt) => marshalSetPATRulesRequestRule(elt, defaults))
|
|
270
271
|
});
|
|
271
|
-
|
|
272
|
-
|
|
272
|
+
var marshalUpdateDHCPEntryRequest = (request, defaults) => ({ ip_address: request.ipAddress });
|
|
273
|
+
var marshalUpdateDHCPRequest = (request, defaults) => ({
|
|
273
274
|
address: request.address,
|
|
274
275
|
dns_local_name: request.dnsLocalName,
|
|
275
276
|
dns_search: request.dnsSearch,
|
|
@@ -288,7 +289,7 @@ var marshalUpdateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
|
|
|
288
289
|
ipam_ip_id: request.ipamIpId,
|
|
289
290
|
push_default_route: request.pushDefaultRoute
|
|
290
291
|
});
|
|
291
|
-
|
|
292
|
+
var marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
292
293
|
enable_dhcp: request.enableDhcp,
|
|
293
294
|
enable_masquerade: request.enableMasquerade,
|
|
294
295
|
...resolveOneOf([
|
|
@@ -306,7 +307,7 @@ const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
306
307
|
}
|
|
307
308
|
])
|
|
308
309
|
});
|
|
309
|
-
|
|
310
|
+
var marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
310
311
|
bastion_port: request.bastionPort,
|
|
311
312
|
enable_bastion: request.enableBastion,
|
|
312
313
|
enable_smtp: request.enableSmtp,
|
|
@@ -314,16 +315,17 @@ const marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
|
314
315
|
tags: request.tags,
|
|
315
316
|
upstream_dns_servers: request.upstreamDnsServers
|
|
316
317
|
});
|
|
317
|
-
|
|
318
|
+
var marshalUpdateIPRequest = (request, defaults) => ({
|
|
318
319
|
gateway_id: request.gatewayId,
|
|
319
320
|
reverse: request.reverse,
|
|
320
321
|
tags: request.tags
|
|
321
322
|
});
|
|
322
|
-
|
|
323
|
+
var marshalUpdatePATRuleRequest = (request, defaults) => ({
|
|
323
324
|
private_ip: request.privateIp,
|
|
324
325
|
private_port: request.privatePort,
|
|
325
326
|
protocol: request.protocol,
|
|
326
327
|
public_port: request.publicPort
|
|
327
328
|
});
|
|
328
|
-
|
|
329
|
+
var marshalUpgradeGatewayRequest = (request, defaults) => ({ type: request.type });
|
|
330
|
+
//#endregion
|
|
329
331
|
export { marshalCreateDHCPEntryRequest, marshalCreateDHCPRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePATRuleRequest, marshalSetDHCPEntriesRequest, marshalSetPATRulesRequest, marshalUpdateDHCPEntryRequest, marshalUpdateDHCPRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePATRuleRequest, marshalUpgradeGatewayRequest, unmarshalDHCP, unmarshalDHCPEntry, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListDHCPEntriesResponse, unmarshalListDHCPsResponse, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPATRulesResponse, unmarshalPATRule, unmarshalSetDHCPEntriesResponse, unmarshalSetPATRulesResponse };
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export declare const queriesMetadata: {
|
|
2
|
+
readonly namespace: "vpcgw";
|
|
3
|
+
readonly version: "v1";
|
|
4
|
+
readonly folderName: "vpcgwv1";
|
|
5
|
+
readonly services: readonly [{
|
|
6
|
+
readonly apiClass: "API";
|
|
7
|
+
readonly methods: readonly [{
|
|
8
|
+
readonly methodName: "listGateways";
|
|
9
|
+
readonly protoName: "ListGateways";
|
|
10
|
+
readonly paramsType: "ListGatewaysRequest";
|
|
11
|
+
readonly returnType: "ListGatewaysResponse";
|
|
12
|
+
readonly isList: true;
|
|
13
|
+
readonly paginationType: "offset";
|
|
14
|
+
readonly pageParamKey: "page";
|
|
15
|
+
readonly listItemType: "Gateway";
|
|
16
|
+
readonly isPrivate: false;
|
|
17
|
+
readonly description: "\"";
|
|
18
|
+
}, {
|
|
19
|
+
readonly methodName: "getGateway";
|
|
20
|
+
readonly protoName: "GetGateway";
|
|
21
|
+
readonly paramsType: "GetGatewayRequest";
|
|
22
|
+
readonly returnType: "Gateway";
|
|
23
|
+
readonly isList: false;
|
|
24
|
+
readonly paginationType: "none";
|
|
25
|
+
readonly isPrivate: false;
|
|
26
|
+
readonly description: "\"";
|
|
27
|
+
readonly hasWaiter: true;
|
|
28
|
+
}, {
|
|
29
|
+
readonly methodName: "listGatewayNetworks";
|
|
30
|
+
readonly protoName: "ListGatewayNetworks";
|
|
31
|
+
readonly paramsType: "ListGatewayNetworksRequest";
|
|
32
|
+
readonly returnType: "ListGatewayNetworksResponse";
|
|
33
|
+
readonly isList: true;
|
|
34
|
+
readonly paginationType: "offset";
|
|
35
|
+
readonly pageParamKey: "page";
|
|
36
|
+
readonly listItemType: "GatewayNetwork";
|
|
37
|
+
readonly isPrivate: false;
|
|
38
|
+
readonly description: "\"";
|
|
39
|
+
}, {
|
|
40
|
+
readonly methodName: "getGatewayNetwork";
|
|
41
|
+
readonly protoName: "GetGatewayNetwork";
|
|
42
|
+
readonly paramsType: "GetGatewayNetworkRequest";
|
|
43
|
+
readonly returnType: "GatewayNetwork";
|
|
44
|
+
readonly isList: false;
|
|
45
|
+
readonly paginationType: "none";
|
|
46
|
+
readonly isPrivate: false;
|
|
47
|
+
readonly description: "\"";
|
|
48
|
+
readonly hasWaiter: true;
|
|
49
|
+
}, {
|
|
50
|
+
readonly methodName: "listDHCPs";
|
|
51
|
+
readonly protoName: "ListDHCPs";
|
|
52
|
+
readonly paramsType: "ListDHCPsRequest";
|
|
53
|
+
readonly returnType: "ListDHCPsResponse";
|
|
54
|
+
readonly isList: true;
|
|
55
|
+
readonly paginationType: "offset";
|
|
56
|
+
readonly pageParamKey: "page";
|
|
57
|
+
readonly listItemType: "DHCP";
|
|
58
|
+
readonly isPrivate: false;
|
|
59
|
+
readonly description: "\"";
|
|
60
|
+
}, {
|
|
61
|
+
readonly methodName: "getDHCP";
|
|
62
|
+
readonly protoName: "GetDHCP";
|
|
63
|
+
readonly paramsType: "GetDHCPRequest";
|
|
64
|
+
readonly returnType: "DHCP";
|
|
65
|
+
readonly isList: false;
|
|
66
|
+
readonly paginationType: "none";
|
|
67
|
+
readonly isPrivate: false;
|
|
68
|
+
readonly description: "\"";
|
|
69
|
+
}, {
|
|
70
|
+
readonly methodName: "listDHCPEntries";
|
|
71
|
+
readonly protoName: "ListDHCPEntries";
|
|
72
|
+
readonly paramsType: "ListDHCPEntriesRequest";
|
|
73
|
+
readonly returnType: "ListDHCPEntriesResponse";
|
|
74
|
+
readonly isList: true;
|
|
75
|
+
readonly paginationType: "offset";
|
|
76
|
+
readonly pageParamKey: "page";
|
|
77
|
+
readonly listItemType: "DHCPEntry";
|
|
78
|
+
readonly isPrivate: false;
|
|
79
|
+
readonly description: "\"";
|
|
80
|
+
}, {
|
|
81
|
+
readonly methodName: "getDHCPEntry";
|
|
82
|
+
readonly protoName: "GetDHCPEntry";
|
|
83
|
+
readonly paramsType: "GetDHCPEntryRequest";
|
|
84
|
+
readonly returnType: "DHCPEntry";
|
|
85
|
+
readonly isList: false;
|
|
86
|
+
readonly paginationType: "none";
|
|
87
|
+
readonly isPrivate: false;
|
|
88
|
+
readonly description: "\"";
|
|
89
|
+
}, {
|
|
90
|
+
readonly methodName: "listPATRules";
|
|
91
|
+
readonly protoName: "ListPATRules";
|
|
92
|
+
readonly paramsType: "ListPATRulesRequest";
|
|
93
|
+
readonly returnType: "ListPATRulesResponse";
|
|
94
|
+
readonly isList: true;
|
|
95
|
+
readonly paginationType: "offset";
|
|
96
|
+
readonly pageParamKey: "page";
|
|
97
|
+
readonly listItemType: "PATRule";
|
|
98
|
+
readonly isPrivate: false;
|
|
99
|
+
readonly description: "\"";
|
|
100
|
+
}, {
|
|
101
|
+
readonly methodName: "getPATRule";
|
|
102
|
+
readonly protoName: "GetPATRule";
|
|
103
|
+
readonly paramsType: "GetPATRuleRequest";
|
|
104
|
+
readonly returnType: "PATRule";
|
|
105
|
+
readonly isList: false;
|
|
106
|
+
readonly paginationType: "none";
|
|
107
|
+
readonly isPrivate: false;
|
|
108
|
+
readonly description: "\"";
|
|
109
|
+
}, {
|
|
110
|
+
readonly methodName: "listGatewayTypes";
|
|
111
|
+
readonly protoName: "ListGatewayTypes";
|
|
112
|
+
readonly paramsType: "ListGatewayTypesRequest";
|
|
113
|
+
readonly returnType: "ListGatewayTypesResponse";
|
|
114
|
+
readonly isList: false;
|
|
115
|
+
readonly paginationType: "none";
|
|
116
|
+
readonly isPrivate: false;
|
|
117
|
+
readonly description: "\"";
|
|
118
|
+
}, {
|
|
119
|
+
readonly methodName: "listIPs";
|
|
120
|
+
readonly protoName: "ListIPs";
|
|
121
|
+
readonly paramsType: "ListIPsRequest";
|
|
122
|
+
readonly returnType: "ListIPsResponse";
|
|
123
|
+
readonly isList: true;
|
|
124
|
+
readonly paginationType: "offset";
|
|
125
|
+
readonly pageParamKey: "page";
|
|
126
|
+
readonly listItemType: "IP";
|
|
127
|
+
readonly isPrivate: false;
|
|
128
|
+
readonly description: "\"";
|
|
129
|
+
}, {
|
|
130
|
+
readonly methodName: "getIP";
|
|
131
|
+
readonly protoName: "GetIP";
|
|
132
|
+
readonly paramsType: "GetIPRequest";
|
|
133
|
+
readonly returnType: "IP";
|
|
134
|
+
readonly isList: false;
|
|
135
|
+
readonly paginationType: "none";
|
|
136
|
+
readonly isPrivate: false;
|
|
137
|
+
readonly description: "\"";
|
|
138
|
+
}];
|
|
139
|
+
}];
|
|
140
|
+
};
|
|
141
|
+
export type QueriesMetadata = typeof queriesMetadata;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
//#region src/v1/metadata.gen.ts
|
|
2
|
+
var queriesMetadata = {
|
|
3
|
+
namespace: "vpcgw",
|
|
4
|
+
version: "v1",
|
|
5
|
+
folderName: "vpcgwv1",
|
|
6
|
+
services: [{
|
|
7
|
+
apiClass: "API",
|
|
8
|
+
methods: [
|
|
9
|
+
{
|
|
10
|
+
methodName: "listGateways",
|
|
11
|
+
protoName: "ListGateways",
|
|
12
|
+
paramsType: "ListGatewaysRequest",
|
|
13
|
+
returnType: "ListGatewaysResponse",
|
|
14
|
+
isList: true,
|
|
15
|
+
paginationType: "offset",
|
|
16
|
+
pageParamKey: "page",
|
|
17
|
+
listItemType: "Gateway",
|
|
18
|
+
isPrivate: false,
|
|
19
|
+
description: "\""
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
methodName: "getGateway",
|
|
23
|
+
protoName: "GetGateway",
|
|
24
|
+
paramsType: "GetGatewayRequest",
|
|
25
|
+
returnType: "Gateway",
|
|
26
|
+
isList: false,
|
|
27
|
+
paginationType: "none",
|
|
28
|
+
isPrivate: false,
|
|
29
|
+
description: "\"",
|
|
30
|
+
hasWaiter: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
methodName: "listGatewayNetworks",
|
|
34
|
+
protoName: "ListGatewayNetworks",
|
|
35
|
+
paramsType: "ListGatewayNetworksRequest",
|
|
36
|
+
returnType: "ListGatewayNetworksResponse",
|
|
37
|
+
isList: true,
|
|
38
|
+
paginationType: "offset",
|
|
39
|
+
pageParamKey: "page",
|
|
40
|
+
listItemType: "GatewayNetwork",
|
|
41
|
+
isPrivate: false,
|
|
42
|
+
description: "\""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
methodName: "getGatewayNetwork",
|
|
46
|
+
protoName: "GetGatewayNetwork",
|
|
47
|
+
paramsType: "GetGatewayNetworkRequest",
|
|
48
|
+
returnType: "GatewayNetwork",
|
|
49
|
+
isList: false,
|
|
50
|
+
paginationType: "none",
|
|
51
|
+
isPrivate: false,
|
|
52
|
+
description: "\"",
|
|
53
|
+
hasWaiter: true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
methodName: "listDHCPs",
|
|
57
|
+
protoName: "ListDHCPs",
|
|
58
|
+
paramsType: "ListDHCPsRequest",
|
|
59
|
+
returnType: "ListDHCPsResponse",
|
|
60
|
+
isList: true,
|
|
61
|
+
paginationType: "offset",
|
|
62
|
+
pageParamKey: "page",
|
|
63
|
+
listItemType: "DHCP",
|
|
64
|
+
isPrivate: false,
|
|
65
|
+
description: "\""
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
methodName: "getDHCP",
|
|
69
|
+
protoName: "GetDHCP",
|
|
70
|
+
paramsType: "GetDHCPRequest",
|
|
71
|
+
returnType: "DHCP",
|
|
72
|
+
isList: false,
|
|
73
|
+
paginationType: "none",
|
|
74
|
+
isPrivate: false,
|
|
75
|
+
description: "\""
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
methodName: "listDHCPEntries",
|
|
79
|
+
protoName: "ListDHCPEntries",
|
|
80
|
+
paramsType: "ListDHCPEntriesRequest",
|
|
81
|
+
returnType: "ListDHCPEntriesResponse",
|
|
82
|
+
isList: true,
|
|
83
|
+
paginationType: "offset",
|
|
84
|
+
pageParamKey: "page",
|
|
85
|
+
listItemType: "DHCPEntry",
|
|
86
|
+
isPrivate: false,
|
|
87
|
+
description: "\""
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
methodName: "getDHCPEntry",
|
|
91
|
+
protoName: "GetDHCPEntry",
|
|
92
|
+
paramsType: "GetDHCPEntryRequest",
|
|
93
|
+
returnType: "DHCPEntry",
|
|
94
|
+
isList: false,
|
|
95
|
+
paginationType: "none",
|
|
96
|
+
isPrivate: false,
|
|
97
|
+
description: "\""
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
methodName: "listPATRules",
|
|
101
|
+
protoName: "ListPATRules",
|
|
102
|
+
paramsType: "ListPATRulesRequest",
|
|
103
|
+
returnType: "ListPATRulesResponse",
|
|
104
|
+
isList: true,
|
|
105
|
+
paginationType: "offset",
|
|
106
|
+
pageParamKey: "page",
|
|
107
|
+
listItemType: "PATRule",
|
|
108
|
+
isPrivate: false,
|
|
109
|
+
description: "\""
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
methodName: "getPATRule",
|
|
113
|
+
protoName: "GetPATRule",
|
|
114
|
+
paramsType: "GetPATRuleRequest",
|
|
115
|
+
returnType: "PATRule",
|
|
116
|
+
isList: false,
|
|
117
|
+
paginationType: "none",
|
|
118
|
+
isPrivate: false,
|
|
119
|
+
description: "\""
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
methodName: "listGatewayTypes",
|
|
123
|
+
protoName: "ListGatewayTypes",
|
|
124
|
+
paramsType: "ListGatewayTypesRequest",
|
|
125
|
+
returnType: "ListGatewayTypesResponse",
|
|
126
|
+
isList: false,
|
|
127
|
+
paginationType: "none",
|
|
128
|
+
isPrivate: false,
|
|
129
|
+
description: "\""
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
methodName: "listIPs",
|
|
133
|
+
protoName: "ListIPs",
|
|
134
|
+
paramsType: "ListIPsRequest",
|
|
135
|
+
returnType: "ListIPsResponse",
|
|
136
|
+
isList: true,
|
|
137
|
+
paginationType: "offset",
|
|
138
|
+
pageParamKey: "page",
|
|
139
|
+
listItemType: "IP",
|
|
140
|
+
isPrivate: false,
|
|
141
|
+
description: "\""
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
methodName: "getIP",
|
|
145
|
+
protoName: "GetIP",
|
|
146
|
+
paramsType: "GetIPRequest",
|
|
147
|
+
returnType: "IP",
|
|
148
|
+
isList: false,
|
|
149
|
+
paginationType: "none",
|
|
150
|
+
isPrivate: false,
|
|
151
|
+
description: "\""
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}]
|
|
155
|
+
};
|
|
156
|
+
//#endregion
|
|
157
|
+
export { queriesMetadata };
|
|
File without changes
|
package/dist/v2/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalAddBastionAllowedIPsRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePatRuleRequest, marshalSetBastionAllowedIPsRequest, marshalSetPatRulesRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePatRuleRequest, marshalUpgradeGatewayRequest, unmarshalAddBastionAllowedIPsResponse, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPatRulesResponse, unmarshalPatRule, unmarshalSetBastionAllowedIPsResponse, unmarshalSetPatRulesResponse } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v2/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Public Gateways API.
|
|
7
8
|
|
|
8
9
|
This API allows you to manage your Public Gateways.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Locality of this API.
|
|
13
14
|
* type ∈ {'zone','region','global','unspecified'}
|
|
@@ -341,4 +342,5 @@ var API$1 = class extends API {
|
|
|
341
342
|
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/bastion-allowed-ips/${validatePathParam("ipRange", request.ipRange)}`
|
|
342
343
|
});
|
|
343
344
|
};
|
|
344
|
-
|
|
345
|
+
//#endregion
|
|
346
|
+
export { API };
|
package/dist/v2/content.gen.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
//#region src/v2/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */
|
|
2
|
-
|
|
3
|
+
var GATEWAY_NETWORK_TRANSIENT_STATUSES = [
|
|
3
4
|
"attaching",
|
|
4
5
|
"configuring",
|
|
5
6
|
"detaching"
|
|
6
7
|
];
|
|
7
8
|
/** Lists transient statutes of the enum {@link GatewayStatus}. */
|
|
8
|
-
|
|
9
|
+
var GATEWAY_TRANSIENT_STATUSES = [
|
|
9
10
|
"allocating",
|
|
10
11
|
"configuring",
|
|
11
12
|
"stopping",
|
|
12
13
|
"deleting"
|
|
13
14
|
];
|
|
15
|
+
//#endregion
|
|
14
16
|
export { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES };
|
package/dist/v2/index.gen.js
CHANGED
|
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import { marshalAddBastionAllowedIPsRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePatRuleRequest, marshalSetBastionAllowedIPsRequest, marshalSetPatRulesRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePatRuleRequest, marshalUpgradeGatewayRequest, unmarshalAddBastionAllowedIPsResponse, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPatRulesResponse, unmarshalPatRule, unmarshalSetBastionAllowedIPsResponse, unmarshalSetPatRulesResponse } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
|
+
//#region src/v2/index.gen.ts
|
|
5
6
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
6
7
|
API: () => API,
|
|
7
8
|
GATEWAY_NETWORK_TRANSIENT_STATUSES: () => GATEWAY_NETWORK_TRANSIENT_STATUSES,
|
|
@@ -31,4 +32,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
31
32
|
unmarshalSetBastionAllowedIPsResponse: () => unmarshalSetBastionAllowedIPsResponse,
|
|
32
33
|
unmarshalSetPatRulesResponse: () => unmarshalSetPatRulesResponse
|
|
33
34
|
});
|
|
34
|
-
|
|
35
|
+
//#endregion
|
|
36
|
+
export { API, GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES, index_gen_exports, marshalAddBastionAllowedIPsRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePatRuleRequest, marshalSetBastionAllowedIPsRequest, marshalSetPatRulesRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePatRuleRequest, marshalUpgradeGatewayRequest, unmarshalAddBastionAllowedIPsResponse, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPatRulesResponse, unmarshalPatRule, unmarshalSetBastionAllowedIPsResponse, unmarshalSetPatRulesResponse };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
2
|
import randomName from "@scaleway/random-name";
|
|
3
|
-
|
|
3
|
+
//#region src/v2/marshalling.gen.ts
|
|
4
|
+
var unmarshalGatewayNetwork = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayNetwork' failed as data isn't a dictionary.`);
|
|
5
6
|
return {
|
|
6
7
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -16,7 +17,7 @@ const unmarshalGatewayNetwork = (data) => {
|
|
|
16
17
|
zone: data.zone
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
+
var unmarshalIP = (data) => {
|
|
20
21
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
|
|
21
22
|
return {
|
|
22
23
|
address: data.address,
|
|
@@ -31,7 +32,7 @@ const unmarshalIP = (data) => {
|
|
|
31
32
|
zone: data.zone
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
var unmarshalGateway = (data) => {
|
|
35
36
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Gateway' failed as data isn't a dictionary.`);
|
|
36
37
|
return {
|
|
37
38
|
bandwidth: data.bandwidth,
|
|
@@ -56,7 +57,7 @@ const unmarshalGateway = (data) => {
|
|
|
56
57
|
zone: data.zone
|
|
57
58
|
};
|
|
58
59
|
};
|
|
59
|
-
|
|
60
|
+
var unmarshalPatRule = (data) => {
|
|
60
61
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PatRule' failed as data isn't a dictionary.`);
|
|
61
62
|
return {
|
|
62
63
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -70,11 +71,11 @@ const unmarshalPatRule = (data) => {
|
|
|
70
71
|
zone: data.zone
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
|
-
|
|
74
|
+
var unmarshalAddBastionAllowedIPsResponse = (data) => {
|
|
74
75
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`);
|
|
75
76
|
return { ipRanges: data.ip_ranges };
|
|
76
77
|
};
|
|
77
|
-
|
|
78
|
+
var unmarshalListGatewayNetworksResponse = (data) => {
|
|
78
79
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayNetworksResponse' failed as data isn't a dictionary.`);
|
|
79
80
|
return {
|
|
80
81
|
gatewayNetworks: unmarshalArrayOfObject(data.gateway_networks, unmarshalGatewayNetwork),
|
|
@@ -89,48 +90,48 @@ var unmarshalGatewayType = (data) => {
|
|
|
89
90
|
zone: data.zone
|
|
90
91
|
};
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
+
var unmarshalListGatewayTypesResponse = (data) => {
|
|
93
94
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayTypesResponse' failed as data isn't a dictionary.`);
|
|
94
95
|
return { types: unmarshalArrayOfObject(data.types, unmarshalGatewayType) };
|
|
95
96
|
};
|
|
96
|
-
|
|
97
|
+
var unmarshalListGatewaysResponse = (data) => {
|
|
97
98
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewaysResponse' failed as data isn't a dictionary.`);
|
|
98
99
|
return {
|
|
99
100
|
gateways: unmarshalArrayOfObject(data.gateways, unmarshalGateway),
|
|
100
101
|
totalCount: data.total_count
|
|
101
102
|
};
|
|
102
103
|
};
|
|
103
|
-
|
|
104
|
+
var unmarshalListIPsResponse = (data) => {
|
|
104
105
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary.`);
|
|
105
106
|
return {
|
|
106
107
|
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
107
108
|
totalCount: data.total_count
|
|
108
109
|
};
|
|
109
110
|
};
|
|
110
|
-
|
|
111
|
+
var unmarshalListPatRulesResponse = (data) => {
|
|
111
112
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPatRulesResponse' failed as data isn't a dictionary.`);
|
|
112
113
|
return {
|
|
113
114
|
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule),
|
|
114
115
|
totalCount: data.total_count
|
|
115
116
|
};
|
|
116
117
|
};
|
|
117
|
-
|
|
118
|
+
var unmarshalSetBastionAllowedIPsResponse = (data) => {
|
|
118
119
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`);
|
|
119
120
|
return { ipRanges: data.ip_ranges };
|
|
120
121
|
};
|
|
121
|
-
|
|
122
|
+
var unmarshalSetPatRulesResponse = (data) => {
|
|
122
123
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetPatRulesResponse' failed as data isn't a dictionary.`);
|
|
123
124
|
return { patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule) };
|
|
124
125
|
};
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
var marshalAddBastionAllowedIPsRequest = (request, defaults) => ({ ip_range: request.ipRange });
|
|
127
|
+
var marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
127
128
|
enable_masquerade: request.enableMasquerade,
|
|
128
129
|
gateway_id: request.gatewayId,
|
|
129
130
|
ipam_ip_id: request.ipamIpId,
|
|
130
131
|
private_network_id: request.privateNetworkId,
|
|
131
132
|
push_default_route: request.pushDefaultRoute
|
|
132
133
|
});
|
|
133
|
-
|
|
134
|
+
var marshalCreateGatewayRequest = (request, defaults) => ({
|
|
134
135
|
bastion_port: request.bastionPort,
|
|
135
136
|
enable_bastion: request.enableBastion,
|
|
136
137
|
enable_smtp: request.enableSmtp,
|
|
@@ -140,50 +141,51 @@ const marshalCreateGatewayRequest = (request, defaults) => ({
|
|
|
140
141
|
tags: request.tags,
|
|
141
142
|
type: request.type
|
|
142
143
|
});
|
|
143
|
-
|
|
144
|
+
var marshalCreateIPRequest = (request, defaults) => ({
|
|
144
145
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
145
146
|
tags: request.tags
|
|
146
147
|
});
|
|
147
|
-
|
|
148
|
+
var marshalCreatePatRuleRequest = (request, defaults) => ({
|
|
148
149
|
gateway_id: request.gatewayId,
|
|
149
150
|
private_ip: request.privateIp,
|
|
150
151
|
private_port: request.privatePort,
|
|
151
152
|
protocol: request.protocol,
|
|
152
153
|
public_port: request.publicPort
|
|
153
154
|
});
|
|
154
|
-
|
|
155
|
+
var marshalSetBastionAllowedIPsRequest = (request, defaults) => ({ ip_ranges: request.ipRanges });
|
|
155
156
|
var marshalSetPatRulesRequestRule = (request, defaults) => ({
|
|
156
157
|
private_ip: request.privateIp,
|
|
157
158
|
private_port: request.privatePort,
|
|
158
159
|
protocol: request.protocol,
|
|
159
160
|
public_port: request.publicPort
|
|
160
161
|
});
|
|
161
|
-
|
|
162
|
+
var marshalSetPatRulesRequest = (request, defaults) => ({
|
|
162
163
|
gateway_id: request.gatewayId,
|
|
163
164
|
pat_rules: request.patRules.map((elt) => marshalSetPatRulesRequestRule(elt, defaults))
|
|
164
165
|
});
|
|
165
|
-
|
|
166
|
+
var marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
166
167
|
enable_masquerade: request.enableMasquerade,
|
|
167
168
|
ipam_ip_id: request.ipamIpId,
|
|
168
169
|
push_default_route: request.pushDefaultRoute
|
|
169
170
|
});
|
|
170
|
-
|
|
171
|
+
var marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
171
172
|
bastion_port: request.bastionPort,
|
|
172
173
|
enable_bastion: request.enableBastion,
|
|
173
174
|
enable_smtp: request.enableSmtp,
|
|
174
175
|
name: request.name,
|
|
175
176
|
tags: request.tags
|
|
176
177
|
});
|
|
177
|
-
|
|
178
|
+
var marshalUpdateIPRequest = (request, defaults) => ({
|
|
178
179
|
gateway_id: request.gatewayId,
|
|
179
180
|
reverse: request.reverse,
|
|
180
181
|
tags: request.tags
|
|
181
182
|
});
|
|
182
|
-
|
|
183
|
+
var marshalUpdatePatRuleRequest = (request, defaults) => ({
|
|
183
184
|
private_ip: request.privateIp,
|
|
184
185
|
private_port: request.privatePort,
|
|
185
186
|
protocol: request.protocol,
|
|
186
187
|
public_port: request.publicPort
|
|
187
188
|
});
|
|
188
|
-
|
|
189
|
+
var marshalUpgradeGatewayRequest = (request, defaults) => ({ type: request.type });
|
|
190
|
+
//#endregion
|
|
189
191
|
export { marshalAddBastionAllowedIPsRequest, marshalCreateGatewayNetworkRequest, marshalCreateGatewayRequest, marshalCreateIPRequest, marshalCreatePatRuleRequest, marshalSetBastionAllowedIPsRequest, marshalSetPatRulesRequest, marshalUpdateGatewayNetworkRequest, marshalUpdateGatewayRequest, marshalUpdateIPRequest, marshalUpdatePatRuleRequest, marshalUpgradeGatewayRequest, unmarshalAddBastionAllowedIPsResponse, unmarshalGateway, unmarshalGatewayNetwork, unmarshalIP, unmarshalListGatewayNetworksResponse, unmarshalListGatewayTypesResponse, unmarshalListGatewaysResponse, unmarshalListIPsResponse, unmarshalListPatRulesResponse, unmarshalPatRule, unmarshalSetBastionAllowedIPsResponse, unmarshalSetPatRulesResponse };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export declare const queriesMetadata: {
|
|
2
|
+
readonly namespace: "vpcgw";
|
|
3
|
+
readonly version: "v2";
|
|
4
|
+
readonly folderName: "vpcgwv2";
|
|
5
|
+
readonly services: readonly [{
|
|
6
|
+
readonly apiClass: "API";
|
|
7
|
+
readonly methods: readonly [{
|
|
8
|
+
readonly methodName: "listGateways";
|
|
9
|
+
readonly protoName: "ListGateways";
|
|
10
|
+
readonly paramsType: "ListGatewaysRequest";
|
|
11
|
+
readonly returnType: "ListGatewaysResponse";
|
|
12
|
+
readonly isList: true;
|
|
13
|
+
readonly paginationType: "offset";
|
|
14
|
+
readonly pageParamKey: "page";
|
|
15
|
+
readonly listItemType: "Gateway";
|
|
16
|
+
readonly isPrivate: false;
|
|
17
|
+
readonly description: "\"";
|
|
18
|
+
}, {
|
|
19
|
+
readonly methodName: "getGateway";
|
|
20
|
+
readonly protoName: "GetGateway";
|
|
21
|
+
readonly paramsType: "GetGatewayRequest";
|
|
22
|
+
readonly returnType: "Gateway";
|
|
23
|
+
readonly isList: false;
|
|
24
|
+
readonly paginationType: "none";
|
|
25
|
+
readonly isPrivate: false;
|
|
26
|
+
readonly description: "\"";
|
|
27
|
+
readonly hasWaiter: true;
|
|
28
|
+
}, {
|
|
29
|
+
readonly methodName: "listGatewayNetworks";
|
|
30
|
+
readonly protoName: "ListGatewayNetworks";
|
|
31
|
+
readonly paramsType: "ListGatewayNetworksRequest";
|
|
32
|
+
readonly returnType: "ListGatewayNetworksResponse";
|
|
33
|
+
readonly isList: true;
|
|
34
|
+
readonly paginationType: "offset";
|
|
35
|
+
readonly pageParamKey: "page";
|
|
36
|
+
readonly listItemType: "GatewayNetwork";
|
|
37
|
+
readonly isPrivate: false;
|
|
38
|
+
readonly description: "\"";
|
|
39
|
+
}, {
|
|
40
|
+
readonly methodName: "getGatewayNetwork";
|
|
41
|
+
readonly protoName: "GetGatewayNetwork";
|
|
42
|
+
readonly paramsType: "GetGatewayNetworkRequest";
|
|
43
|
+
readonly returnType: "GatewayNetwork";
|
|
44
|
+
readonly isList: false;
|
|
45
|
+
readonly paginationType: "none";
|
|
46
|
+
readonly isPrivate: false;
|
|
47
|
+
readonly description: "\"";
|
|
48
|
+
readonly hasWaiter: true;
|
|
49
|
+
}, {
|
|
50
|
+
readonly methodName: "listPatRules";
|
|
51
|
+
readonly protoName: "ListPatRules";
|
|
52
|
+
readonly paramsType: "ListPatRulesRequest";
|
|
53
|
+
readonly returnType: "ListPatRulesResponse";
|
|
54
|
+
readonly isList: true;
|
|
55
|
+
readonly paginationType: "offset";
|
|
56
|
+
readonly pageParamKey: "page";
|
|
57
|
+
readonly listItemType: "PatRule";
|
|
58
|
+
readonly isPrivate: false;
|
|
59
|
+
readonly description: "\"";
|
|
60
|
+
}, {
|
|
61
|
+
readonly methodName: "getPatRule";
|
|
62
|
+
readonly protoName: "GetPatRule";
|
|
63
|
+
readonly paramsType: "GetPatRuleRequest";
|
|
64
|
+
readonly returnType: "PatRule";
|
|
65
|
+
readonly isList: false;
|
|
66
|
+
readonly paginationType: "none";
|
|
67
|
+
readonly isPrivate: false;
|
|
68
|
+
readonly description: "\"";
|
|
69
|
+
}, {
|
|
70
|
+
readonly methodName: "listGatewayTypes";
|
|
71
|
+
readonly protoName: "ListGatewayTypes";
|
|
72
|
+
readonly paramsType: "ListGatewayTypesRequest";
|
|
73
|
+
readonly returnType: "ListGatewayTypesResponse";
|
|
74
|
+
readonly isList: false;
|
|
75
|
+
readonly paginationType: "none";
|
|
76
|
+
readonly isPrivate: false;
|
|
77
|
+
readonly description: "\"";
|
|
78
|
+
}, {
|
|
79
|
+
readonly methodName: "listIPs";
|
|
80
|
+
readonly protoName: "ListIPs";
|
|
81
|
+
readonly paramsType: "ListIPsRequest";
|
|
82
|
+
readonly returnType: "ListIPsResponse";
|
|
83
|
+
readonly isList: true;
|
|
84
|
+
readonly paginationType: "offset";
|
|
85
|
+
readonly pageParamKey: "page";
|
|
86
|
+
readonly listItemType: "IP";
|
|
87
|
+
readonly isPrivate: false;
|
|
88
|
+
readonly description: "\"";
|
|
89
|
+
}, {
|
|
90
|
+
readonly methodName: "getIP";
|
|
91
|
+
readonly protoName: "GetIP";
|
|
92
|
+
readonly paramsType: "GetIPRequest";
|
|
93
|
+
readonly returnType: "IP";
|
|
94
|
+
readonly isList: false;
|
|
95
|
+
readonly paginationType: "none";
|
|
96
|
+
readonly isPrivate: false;
|
|
97
|
+
readonly description: "\"";
|
|
98
|
+
}];
|
|
99
|
+
}];
|
|
100
|
+
};
|
|
101
|
+
export type QueriesMetadata = typeof queriesMetadata;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
//#region src/v2/metadata.gen.ts
|
|
2
|
+
var queriesMetadata = {
|
|
3
|
+
namespace: "vpcgw",
|
|
4
|
+
version: "v2",
|
|
5
|
+
folderName: "vpcgwv2",
|
|
6
|
+
services: [{
|
|
7
|
+
apiClass: "API",
|
|
8
|
+
methods: [
|
|
9
|
+
{
|
|
10
|
+
methodName: "listGateways",
|
|
11
|
+
protoName: "ListGateways",
|
|
12
|
+
paramsType: "ListGatewaysRequest",
|
|
13
|
+
returnType: "ListGatewaysResponse",
|
|
14
|
+
isList: true,
|
|
15
|
+
paginationType: "offset",
|
|
16
|
+
pageParamKey: "page",
|
|
17
|
+
listItemType: "Gateway",
|
|
18
|
+
isPrivate: false,
|
|
19
|
+
description: "\""
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
methodName: "getGateway",
|
|
23
|
+
protoName: "GetGateway",
|
|
24
|
+
paramsType: "GetGatewayRequest",
|
|
25
|
+
returnType: "Gateway",
|
|
26
|
+
isList: false,
|
|
27
|
+
paginationType: "none",
|
|
28
|
+
isPrivate: false,
|
|
29
|
+
description: "\"",
|
|
30
|
+
hasWaiter: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
methodName: "listGatewayNetworks",
|
|
34
|
+
protoName: "ListGatewayNetworks",
|
|
35
|
+
paramsType: "ListGatewayNetworksRequest",
|
|
36
|
+
returnType: "ListGatewayNetworksResponse",
|
|
37
|
+
isList: true,
|
|
38
|
+
paginationType: "offset",
|
|
39
|
+
pageParamKey: "page",
|
|
40
|
+
listItemType: "GatewayNetwork",
|
|
41
|
+
isPrivate: false,
|
|
42
|
+
description: "\""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
methodName: "getGatewayNetwork",
|
|
46
|
+
protoName: "GetGatewayNetwork",
|
|
47
|
+
paramsType: "GetGatewayNetworkRequest",
|
|
48
|
+
returnType: "GatewayNetwork",
|
|
49
|
+
isList: false,
|
|
50
|
+
paginationType: "none",
|
|
51
|
+
isPrivate: false,
|
|
52
|
+
description: "\"",
|
|
53
|
+
hasWaiter: true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
methodName: "listPatRules",
|
|
57
|
+
protoName: "ListPatRules",
|
|
58
|
+
paramsType: "ListPatRulesRequest",
|
|
59
|
+
returnType: "ListPatRulesResponse",
|
|
60
|
+
isList: true,
|
|
61
|
+
paginationType: "offset",
|
|
62
|
+
pageParamKey: "page",
|
|
63
|
+
listItemType: "PatRule",
|
|
64
|
+
isPrivate: false,
|
|
65
|
+
description: "\""
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
methodName: "getPatRule",
|
|
69
|
+
protoName: "GetPatRule",
|
|
70
|
+
paramsType: "GetPatRuleRequest",
|
|
71
|
+
returnType: "PatRule",
|
|
72
|
+
isList: false,
|
|
73
|
+
paginationType: "none",
|
|
74
|
+
isPrivate: false,
|
|
75
|
+
description: "\""
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
methodName: "listGatewayTypes",
|
|
79
|
+
protoName: "ListGatewayTypes",
|
|
80
|
+
paramsType: "ListGatewayTypesRequest",
|
|
81
|
+
returnType: "ListGatewayTypesResponse",
|
|
82
|
+
isList: false,
|
|
83
|
+
paginationType: "none",
|
|
84
|
+
isPrivate: false,
|
|
85
|
+
description: "\""
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
methodName: "listIPs",
|
|
89
|
+
protoName: "ListIPs",
|
|
90
|
+
paramsType: "ListIPsRequest",
|
|
91
|
+
returnType: "ListIPsResponse",
|
|
92
|
+
isList: true,
|
|
93
|
+
paginationType: "offset",
|
|
94
|
+
pageParamKey: "page",
|
|
95
|
+
listItemType: "IP",
|
|
96
|
+
isPrivate: false,
|
|
97
|
+
description: "\""
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
methodName: "getIP",
|
|
101
|
+
protoName: "GetIP",
|
|
102
|
+
paramsType: "GetIPRequest",
|
|
103
|
+
returnType: "IP",
|
|
104
|
+
isList: false,
|
|
105
|
+
paginationType: "none",
|
|
106
|
+
isPrivate: false,
|
|
107
|
+
description: "\""
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}]
|
|
111
|
+
};
|
|
112
|
+
//#endregion
|
|
113
|
+
export { queriesMetadata };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-vpcgw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Scaleway SDK vpcgw",
|
|
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.
|
|
30
|
-
"@scaleway/sdk-std": "2.2.
|
|
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.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|