@scaleway/sdk-vpcgw 2.4.0 → 2.6.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/.vite/license.md +3 -0
- package/dist/metadata.gen.d.ts +12 -0
- package/dist/metadata.gen.js +13 -0
- package/dist/v1/api.gen.d.ts +2 -2
- package/dist/v1/api.gen.js +216 -480
- package/dist/v1/content.gen.js +2 -2
- package/dist/v1/marshalling.gen.js +36 -36
- package/dist/v1/metadata.gen.js +1 -1
- package/dist/v2/api.gen.d.ts +2 -2
- package/dist/v2/api.gen.js +161 -333
- package/dist/v2/content.gen.js +2 -2
- package/dist/v2/marshalling.gen.js +26 -26
- package/dist/v2/metadata.gen.js +1 -1
- package/package.json +16 -6
- package/LICENSE +0 -191
package/dist/v1/content.gen.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
//#region src/v1/content.gen.ts
|
|
2
2
|
/** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */
|
|
3
|
-
|
|
3
|
+
const GATEWAY_NETWORK_TRANSIENT_STATUSES = [
|
|
4
4
|
"attaching",
|
|
5
5
|
"configuring",
|
|
6
6
|
"detaching"
|
|
7
7
|
];
|
|
8
8
|
/** Lists transient statutes of the enum {@link GatewayStatus}. */
|
|
9
|
-
|
|
9
|
+
const GATEWAY_TRANSIENT_STATUSES = [
|
|
10
10
|
"allocating",
|
|
11
11
|
"configuring",
|
|
12
12
|
"stopping",
|
|
@@ -1,7 +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
|
-
|
|
4
|
+
const unmarshalDHCP = (data) => {
|
|
5
5
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DHCP' failed as data isn't a dictionary.`);
|
|
6
6
|
return {
|
|
7
7
|
address: data.address,
|
|
@@ -25,14 +25,14 @@ var unmarshalDHCP = (data) => {
|
|
|
25
25
|
zone: data.zone
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
const unmarshalIpamConfig = (data) => {
|
|
29
29
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IpamConfig' failed as data isn't a dictionary.`);
|
|
30
30
|
return {
|
|
31
31
|
ipamIpId: data.ipam_ip_id,
|
|
32
32
|
pushDefaultRoute: data.push_default_route
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
const unmarshalGatewayNetwork = (data) => {
|
|
36
36
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayNetwork' failed as data isn't a dictionary.`);
|
|
37
37
|
return {
|
|
38
38
|
address: data.address,
|
|
@@ -50,7 +50,7 @@ var unmarshalGatewayNetwork = (data) => {
|
|
|
50
50
|
zone: data.zone
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
const unmarshalIP = (data) => {
|
|
54
54
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
|
|
55
55
|
return {
|
|
56
56
|
address: data.address,
|
|
@@ -65,7 +65,7 @@ var unmarshalIP = (data) => {
|
|
|
65
65
|
zone: data.zone
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
const unmarshalDHCPEntry = (data) => {
|
|
69
69
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DHCPEntry' failed as data isn't a dictionary.`);
|
|
70
70
|
return {
|
|
71
71
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -79,7 +79,7 @@ var unmarshalDHCPEntry = (data) => {
|
|
|
79
79
|
zone: data.zone
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
const unmarshalGatewayType = (data) => {
|
|
83
83
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayType' failed as data isn't a dictionary.`);
|
|
84
84
|
return {
|
|
85
85
|
bandwidth: data.bandwidth,
|
|
@@ -87,7 +87,7 @@ var unmarshalGatewayType = (data) => {
|
|
|
87
87
|
zone: data.zone
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
-
|
|
90
|
+
const unmarshalGateway = (data) => {
|
|
91
91
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Gateway' failed as data isn't a dictionary.`);
|
|
92
92
|
return {
|
|
93
93
|
bastionEnabled: data.bastion_enabled,
|
|
@@ -112,7 +112,7 @@ var unmarshalGateway = (data) => {
|
|
|
112
112
|
zone: data.zone
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
|
-
|
|
115
|
+
const unmarshalPATRule = (data) => {
|
|
116
116
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PATRule' failed as data isn't a dictionary.`);
|
|
117
117
|
return {
|
|
118
118
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -126,61 +126,61 @@ var unmarshalPATRule = (data) => {
|
|
|
126
126
|
zone: data.zone
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
const unmarshalListDHCPEntriesResponse = (data) => {
|
|
130
130
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDHCPEntriesResponse' failed as data isn't a dictionary.`);
|
|
131
131
|
return {
|
|
132
132
|
dhcpEntries: unmarshalArrayOfObject(data.dhcp_entries, unmarshalDHCPEntry),
|
|
133
133
|
totalCount: data.total_count
|
|
134
134
|
};
|
|
135
135
|
};
|
|
136
|
-
|
|
136
|
+
const unmarshalListDHCPsResponse = (data) => {
|
|
137
137
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDHCPsResponse' failed as data isn't a dictionary.`);
|
|
138
138
|
return {
|
|
139
139
|
dhcps: unmarshalArrayOfObject(data.dhcps, unmarshalDHCP),
|
|
140
140
|
totalCount: data.total_count
|
|
141
141
|
};
|
|
142
142
|
};
|
|
143
|
-
|
|
143
|
+
const unmarshalListGatewayNetworksResponse = (data) => {
|
|
144
144
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayNetworksResponse' failed as data isn't a dictionary.`);
|
|
145
145
|
return {
|
|
146
146
|
gatewayNetworks: unmarshalArrayOfObject(data.gateway_networks, unmarshalGatewayNetwork),
|
|
147
147
|
totalCount: data.total_count
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
const unmarshalListGatewayTypesResponse = (data) => {
|
|
151
151
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayTypesResponse' failed as data isn't a dictionary.`);
|
|
152
152
|
return { types: unmarshalArrayOfObject(data.types, unmarshalGatewayType) };
|
|
153
153
|
};
|
|
154
|
-
|
|
154
|
+
const unmarshalListGatewaysResponse = (data) => {
|
|
155
155
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewaysResponse' failed as data isn't a dictionary.`);
|
|
156
156
|
return {
|
|
157
157
|
gateways: unmarshalArrayOfObject(data.gateways, unmarshalGateway),
|
|
158
158
|
totalCount: data.total_count
|
|
159
159
|
};
|
|
160
160
|
};
|
|
161
|
-
|
|
161
|
+
const unmarshalListIPsResponse = (data) => {
|
|
162
162
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary.`);
|
|
163
163
|
return {
|
|
164
164
|
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
165
165
|
totalCount: data.total_count
|
|
166
166
|
};
|
|
167
167
|
};
|
|
168
|
-
|
|
168
|
+
const unmarshalListPATRulesResponse = (data) => {
|
|
169
169
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPATRulesResponse' failed as data isn't a dictionary.`);
|
|
170
170
|
return {
|
|
171
171
|
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPATRule),
|
|
172
172
|
totalCount: data.total_count
|
|
173
173
|
};
|
|
174
174
|
};
|
|
175
|
-
|
|
175
|
+
const unmarshalSetDHCPEntriesResponse = (data) => {
|
|
176
176
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetDHCPEntriesResponse' failed as data isn't a dictionary.`);
|
|
177
177
|
return { dhcpEntries: unmarshalArrayOfObject(data.dhcp_entries, unmarshalDHCPEntry) };
|
|
178
178
|
};
|
|
179
|
-
|
|
179
|
+
const unmarshalSetPATRulesResponse = (data) => {
|
|
180
180
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetPATRulesResponse' failed as data isn't a dictionary.`);
|
|
181
181
|
return { patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPATRule) };
|
|
182
182
|
};
|
|
183
|
-
|
|
183
|
+
const marshalCreateDHCPRequest = (request, defaults) => ({
|
|
184
184
|
address: request.address,
|
|
185
185
|
dns_local_name: request.dnsLocalName,
|
|
186
186
|
dns_search: request.dnsSearch,
|
|
@@ -196,16 +196,16 @@ var marshalCreateDHCPRequest = (request, defaults) => ({
|
|
|
196
196
|
subnet: request.subnet,
|
|
197
197
|
valid_lifetime: request.validLifetime
|
|
198
198
|
});
|
|
199
|
-
|
|
199
|
+
const marshalCreateDHCPEntryRequest = (request, defaults) => ({
|
|
200
200
|
gateway_network_id: request.gatewayNetworkId,
|
|
201
201
|
ip_address: request.ipAddress,
|
|
202
202
|
mac_address: request.macAddress
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
const marshalCreateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
|
|
205
205
|
ipam_ip_id: request.ipamIpId,
|
|
206
206
|
push_default_route: request.pushDefaultRoute
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
209
209
|
enable_dhcp: request.enableDhcp,
|
|
210
210
|
enable_masquerade: request.enableMasquerade,
|
|
211
211
|
gateway_id: request.gatewayId,
|
|
@@ -229,7 +229,7 @@ var marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
229
229
|
}
|
|
230
230
|
])
|
|
231
231
|
});
|
|
232
|
-
|
|
232
|
+
const marshalCreateGatewayRequest = (request, defaults) => ({
|
|
233
233
|
bastion_port: request.bastionPort,
|
|
234
234
|
enable_bastion: request.enableBastion,
|
|
235
235
|
enable_smtp: request.enableSmtp,
|
|
@@ -240,37 +240,37 @@ var marshalCreateGatewayRequest = (request, defaults) => ({
|
|
|
240
240
|
type: request.type,
|
|
241
241
|
upstream_dns_servers: request.upstreamDnsServers
|
|
242
242
|
});
|
|
243
|
-
|
|
243
|
+
const marshalCreateIPRequest = (request, defaults) => ({
|
|
244
244
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
245
245
|
tags: request.tags
|
|
246
246
|
});
|
|
247
|
-
|
|
247
|
+
const marshalCreatePATRuleRequest = (request, defaults) => ({
|
|
248
248
|
gateway_id: request.gatewayId,
|
|
249
249
|
private_ip: request.privateIp,
|
|
250
250
|
private_port: request.privatePort,
|
|
251
251
|
protocol: request.protocol,
|
|
252
252
|
public_port: request.publicPort
|
|
253
253
|
});
|
|
254
|
-
|
|
254
|
+
const marshalSetDHCPEntriesRequestEntry = (request, defaults) => ({
|
|
255
255
|
ip_address: request.ipAddress,
|
|
256
256
|
mac_address: request.macAddress
|
|
257
257
|
});
|
|
258
|
-
|
|
258
|
+
const marshalSetDHCPEntriesRequest = (request, defaults) => ({
|
|
259
259
|
dhcp_entries: request.dhcpEntries !== void 0 ? request.dhcpEntries.map((elt) => marshalSetDHCPEntriesRequestEntry(elt, defaults)) : void 0,
|
|
260
260
|
gateway_network_id: request.gatewayNetworkId
|
|
261
261
|
});
|
|
262
|
-
|
|
262
|
+
const marshalSetPATRulesRequestRule = (request, defaults) => ({
|
|
263
263
|
private_ip: request.privateIp,
|
|
264
264
|
private_port: request.privatePort,
|
|
265
265
|
protocol: request.protocol,
|
|
266
266
|
public_port: request.publicPort
|
|
267
267
|
});
|
|
268
|
-
|
|
268
|
+
const marshalSetPATRulesRequest = (request, defaults) => ({
|
|
269
269
|
gateway_id: request.gatewayId,
|
|
270
270
|
pat_rules: request.patRules.map((elt) => marshalSetPATRulesRequestRule(elt, defaults))
|
|
271
271
|
});
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
const marshalUpdateDHCPEntryRequest = (request, defaults) => ({ ip_address: request.ipAddress });
|
|
273
|
+
const marshalUpdateDHCPRequest = (request, defaults) => ({
|
|
274
274
|
address: request.address,
|
|
275
275
|
dns_local_name: request.dnsLocalName,
|
|
276
276
|
dns_search: request.dnsSearch,
|
|
@@ -285,11 +285,11 @@ var marshalUpdateDHCPRequest = (request, defaults) => ({
|
|
|
285
285
|
subnet: request.subnet,
|
|
286
286
|
valid_lifetime: request.validLifetime
|
|
287
287
|
});
|
|
288
|
-
|
|
288
|
+
const marshalUpdateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
|
|
289
289
|
ipam_ip_id: request.ipamIpId,
|
|
290
290
|
push_default_route: request.pushDefaultRoute
|
|
291
291
|
});
|
|
292
|
-
|
|
292
|
+
const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
293
293
|
enable_dhcp: request.enableDhcp,
|
|
294
294
|
enable_masquerade: request.enableMasquerade,
|
|
295
295
|
...resolveOneOf([
|
|
@@ -307,7 +307,7 @@ var marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
307
307
|
}
|
|
308
308
|
])
|
|
309
309
|
});
|
|
310
|
-
|
|
310
|
+
const marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
311
311
|
bastion_port: request.bastionPort,
|
|
312
312
|
enable_bastion: request.enableBastion,
|
|
313
313
|
enable_smtp: request.enableSmtp,
|
|
@@ -315,17 +315,17 @@ var marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
|
315
315
|
tags: request.tags,
|
|
316
316
|
upstream_dns_servers: request.upstreamDnsServers
|
|
317
317
|
});
|
|
318
|
-
|
|
318
|
+
const marshalUpdateIPRequest = (request, defaults) => ({
|
|
319
319
|
gateway_id: request.gatewayId,
|
|
320
320
|
reverse: request.reverse,
|
|
321
321
|
tags: request.tags
|
|
322
322
|
});
|
|
323
|
-
|
|
323
|
+
const marshalUpdatePATRuleRequest = (request, defaults) => ({
|
|
324
324
|
private_ip: request.privateIp,
|
|
325
325
|
private_port: request.privatePort,
|
|
326
326
|
protocol: request.protocol,
|
|
327
327
|
public_port: request.publicPort
|
|
328
328
|
});
|
|
329
|
-
|
|
329
|
+
const marshalUpgradeGatewayRequest = (request, defaults) => ({ type: request.type });
|
|
330
330
|
//#endregion
|
|
331
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 };
|
package/dist/v1/metadata.gen.js
CHANGED
package/dist/v2/api.gen.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class API extends ParentAPI {
|
|
|
37
37
|
* @param options - The waiting options
|
|
38
38
|
* @returns A Promise of Gateway
|
|
39
39
|
*/
|
|
40
|
-
waitForGateway: (request: Readonly<GetGatewayRequest>, options?: Readonly<WaitForOptions<Gateway>>) => Promise<Gateway>;
|
|
40
|
+
waitForGateway: (request: Readonly<GetGatewayRequest>, options?: Readonly<WaitForOptions<Gateway>> | undefined) => Promise<Gateway>;
|
|
41
41
|
/**
|
|
42
42
|
* Create a Public Gateway. Create a new Public Gateway in the specified Scaleway Project, defining its **name**, **type** and other configuration details such as whether to enable SSH bastion.
|
|
43
43
|
*
|
|
@@ -91,7 +91,7 @@ export declare class API extends ParentAPI {
|
|
|
91
91
|
* @param options - The waiting options
|
|
92
92
|
* @returns A Promise of GatewayNetwork
|
|
93
93
|
*/
|
|
94
|
-
waitForGatewayNetwork: (request: Readonly<GetGatewayNetworkRequest>, options?: Readonly<WaitForOptions<GatewayNetwork>>) => Promise<GatewayNetwork>;
|
|
94
|
+
waitForGatewayNetwork: (request: Readonly<GetGatewayNetworkRequest>, options?: Readonly<WaitForOptions<GatewayNetwork>> | undefined) => Promise<GatewayNetwork>;
|
|
95
95
|
/**
|
|
96
96
|
* Attach a Public Gateway to a Private Network. Attach a specific Public Gateway to a specific Private Network (create a GatewayNetwork). You can configure parameters for the connection including whether to enable masquerade (dynamic NAT), and more.
|
|
97
97
|
*
|