@scaleway/sdk-vpcgw 2.1.1 → 2.2.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/v1/api.gen.js +73 -67
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/marshalling.gen.js +24 -22
- package/dist/v2/api.gen.js +40 -28
- package/dist/v2/index.gen.d.ts +1 -1
- package/dist/v2/marshalling.gen.js +11 -3
- package/package.json +1 -1
package/dist/v1/api.gen.js
CHANGED
|
@@ -30,7 +30,10 @@ class API extends API$1 {
|
|
|
30
30
|
["order_by", request.orderBy],
|
|
31
31
|
["organization_id", request.organizationId],
|
|
32
32
|
["page", request.page],
|
|
33
|
-
[
|
|
33
|
+
[
|
|
34
|
+
"page_size",
|
|
35
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
36
|
+
],
|
|
34
37
|
["private_network_id", request.privateNetworkId],
|
|
35
38
|
["project_id", request.projectId],
|
|
36
39
|
["status", request.status],
|
|
@@ -70,7 +73,9 @@ class API extends API$1 {
|
|
|
70
73
|
* @returns A Promise of Gateway
|
|
71
74
|
*/
|
|
72
75
|
waitForGateway = (request, options) => waitForResource(
|
|
73
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
76
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
77
|
+
!GATEWAY_TRANSIENT_STATUSES.includes(res.status)
|
|
78
|
+
)),
|
|
74
79
|
this.getGateway,
|
|
75
80
|
request,
|
|
76
81
|
options
|
|
@@ -117,15 +122,11 @@ class API extends API$1 {
|
|
|
117
122
|
* @deprecated
|
|
118
123
|
* @param request - The request {@link DeleteGatewayRequest}
|
|
119
124
|
*/
|
|
120
|
-
deleteGateway = (request) => this.client.fetch(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
["cleanup_dhcp", request.cleanupDhcp]
|
|
126
|
-
)
|
|
127
|
-
}
|
|
128
|
-
);
|
|
125
|
+
deleteGateway = (request) => this.client.fetch({
|
|
126
|
+
method: "DELETE",
|
|
127
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}`,
|
|
128
|
+
urlParams: urlParams(["cleanup_dhcp", request.cleanupDhcp])
|
|
129
|
+
});
|
|
129
130
|
/**
|
|
130
131
|
* Upgrade a Public Gateway to the latest version and/or to a different commercial offer type. Upgrade a given Public Gateway to the newest software version or to a different commercial offer type. This applies the latest bugfixes and features to your Public Gateway. Note that gateway service will be interrupted during the update.
|
|
131
132
|
*
|
|
@@ -150,14 +151,12 @@ class API extends API$1 {
|
|
|
150
151
|
* @deprecated
|
|
151
152
|
* @param request - The request {@link EnableIPMobilityRequest}
|
|
152
153
|
*/
|
|
153
|
-
enableIPMobility = (request) => this.client.fetch(
|
|
154
|
-
{
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
);
|
|
154
|
+
enableIPMobility = (request) => this.client.fetch({
|
|
155
|
+
body: "{}",
|
|
156
|
+
headers: jsonContentHeaders,
|
|
157
|
+
method: "POST",
|
|
158
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/enable-ip-mobility`
|
|
159
|
+
});
|
|
161
160
|
pageOfListGatewayNetworks = (request = {}) => this.client.fetch(
|
|
162
161
|
{
|
|
163
162
|
method: "GET",
|
|
@@ -168,7 +167,10 @@ class API extends API$1 {
|
|
|
168
167
|
["gateway_id", request.gatewayId],
|
|
169
168
|
["order_by", request.orderBy],
|
|
170
169
|
["page", request.page],
|
|
171
|
-
[
|
|
170
|
+
[
|
|
171
|
+
"page_size",
|
|
172
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
173
|
+
],
|
|
172
174
|
["private_network_id", request.privateNetworkId],
|
|
173
175
|
["status", request.status]
|
|
174
176
|
)
|
|
@@ -182,7 +184,11 @@ class API extends API$1 {
|
|
|
182
184
|
* @param request - The request {@link ListGatewayNetworksRequest}
|
|
183
185
|
* @returns A Promise of ListGatewayNetworksResponse
|
|
184
186
|
*/
|
|
185
|
-
listGatewayNetworks = (request = {}) => enrichForPagination(
|
|
187
|
+
listGatewayNetworks = (request = {}) => enrichForPagination(
|
|
188
|
+
"gatewayNetworks",
|
|
189
|
+
this.pageOfListGatewayNetworks,
|
|
190
|
+
request
|
|
191
|
+
);
|
|
186
192
|
/**
|
|
187
193
|
* Get a Public Gateway connection to a Private Network. Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.
|
|
188
194
|
*
|
|
@@ -205,7 +211,9 @@ class API extends API$1 {
|
|
|
205
211
|
* @returns A Promise of GatewayNetwork
|
|
206
212
|
*/
|
|
207
213
|
waitForGatewayNetwork = (request, options) => waitForResource(
|
|
208
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
214
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
215
|
+
!GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status)
|
|
216
|
+
)),
|
|
209
217
|
this.getGatewayNetwork,
|
|
210
218
|
request,
|
|
211
219
|
options
|
|
@@ -252,15 +260,11 @@ class API extends API$1 {
|
|
|
252
260
|
* @deprecated
|
|
253
261
|
* @param request - The request {@link DeleteGatewayNetworkRequest}
|
|
254
262
|
*/
|
|
255
|
-
deleteGatewayNetwork = (request) => this.client.fetch(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
["cleanup_dhcp", request.cleanupDhcp]
|
|
261
|
-
)
|
|
262
|
-
}
|
|
263
|
-
);
|
|
263
|
+
deleteGatewayNetwork = (request) => this.client.fetch({
|
|
264
|
+
method: "DELETE",
|
|
265
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateway-networks/${validatePathParam("gatewayNetworkId", request.gatewayNetworkId)}`,
|
|
266
|
+
urlParams: urlParams(["cleanup_dhcp", request.cleanupDhcp])
|
|
267
|
+
});
|
|
264
268
|
pageOfListDHCPs = (request = {}) => this.client.fetch(
|
|
265
269
|
{
|
|
266
270
|
method: "GET",
|
|
@@ -271,7 +275,10 @@ class API extends API$1 {
|
|
|
271
275
|
["order_by", request.orderBy],
|
|
272
276
|
["organization_id", request.organizationId],
|
|
273
277
|
["page", request.page],
|
|
274
|
-
[
|
|
278
|
+
[
|
|
279
|
+
"page_size",
|
|
280
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
281
|
+
],
|
|
275
282
|
["project_id", request.projectId]
|
|
276
283
|
)
|
|
277
284
|
},
|
|
@@ -341,12 +348,10 @@ class API extends API$1 {
|
|
|
341
348
|
* @deprecated
|
|
342
349
|
* @param request - The request {@link DeleteDHCPRequest}
|
|
343
350
|
*/
|
|
344
|
-
deleteDHCP = (request) => this.client.fetch(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}
|
|
349
|
-
);
|
|
351
|
+
deleteDHCP = (request) => this.client.fetch({
|
|
352
|
+
method: "DELETE",
|
|
353
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcps/${validatePathParam("dhcpId", request.dhcpId)}`
|
|
354
|
+
});
|
|
350
355
|
pageOfListDHCPEntries = (request = {}) => this.client.fetch(
|
|
351
356
|
{
|
|
352
357
|
method: "GET",
|
|
@@ -358,7 +363,10 @@ class API extends API$1 {
|
|
|
358
363
|
["mac_address", request.macAddress],
|
|
359
364
|
["order_by", request.orderBy],
|
|
360
365
|
["page", request.page],
|
|
361
|
-
[
|
|
366
|
+
[
|
|
367
|
+
"page_size",
|
|
368
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
369
|
+
],
|
|
362
370
|
["type", request.type]
|
|
363
371
|
)
|
|
364
372
|
},
|
|
@@ -446,12 +454,10 @@ class API extends API$1 {
|
|
|
446
454
|
* @deprecated
|
|
447
455
|
* @param request - The request {@link DeleteDHCPEntryRequest}
|
|
448
456
|
*/
|
|
449
|
-
deleteDHCPEntry = (request) => this.client.fetch(
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
);
|
|
457
|
+
deleteDHCPEntry = (request) => this.client.fetch({
|
|
458
|
+
method: "DELETE",
|
|
459
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/dhcp-entries/${validatePathParam("dhcpEntryId", request.dhcpEntryId)}`
|
|
460
|
+
});
|
|
455
461
|
pageOfListPATRules = (request = {}) => this.client.fetch(
|
|
456
462
|
{
|
|
457
463
|
method: "GET",
|
|
@@ -460,7 +466,10 @@ class API extends API$1 {
|
|
|
460
466
|
["gateway_id", request.gatewayId],
|
|
461
467
|
["order_by", request.orderBy],
|
|
462
468
|
["page", request.page],
|
|
463
|
-
[
|
|
469
|
+
[
|
|
470
|
+
"page_size",
|
|
471
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
472
|
+
],
|
|
464
473
|
["private_ip", request.privateIp],
|
|
465
474
|
["protocol", request.protocol]
|
|
466
475
|
)
|
|
@@ -549,12 +558,10 @@ class API extends API$1 {
|
|
|
549
558
|
* @deprecated
|
|
550
559
|
* @param request - The request {@link DeletePATRuleRequest}
|
|
551
560
|
*/
|
|
552
|
-
deletePATRule = (request) => this.client.fetch(
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
557
|
-
);
|
|
561
|
+
deletePATRule = (request) => this.client.fetch({
|
|
562
|
+
method: "DELETE",
|
|
563
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${validatePathParam("patRuleId", request.patRuleId)}`
|
|
564
|
+
});
|
|
558
565
|
/**
|
|
559
566
|
* List Public Gateway types. List the different Public Gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available gateway type.
|
|
560
567
|
*
|
|
@@ -578,7 +585,10 @@ class API extends API$1 {
|
|
|
578
585
|
["order_by", request.orderBy],
|
|
579
586
|
["organization_id", request.organizationId],
|
|
580
587
|
["page", request.page],
|
|
581
|
-
[
|
|
588
|
+
[
|
|
589
|
+
"page_size",
|
|
590
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
591
|
+
],
|
|
582
592
|
["project_id", request.projectId],
|
|
583
593
|
["reverse", request.reverse],
|
|
584
594
|
["tags", request.tags]
|
|
@@ -650,12 +660,10 @@ class API extends API$1 {
|
|
|
650
660
|
* @deprecated
|
|
651
661
|
* @param request - The request {@link DeleteIPRequest}
|
|
652
662
|
*/
|
|
653
|
-
deleteIP = (request) => this.client.fetch(
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}
|
|
658
|
-
);
|
|
663
|
+
deleteIP = (request) => this.client.fetch({
|
|
664
|
+
method: "DELETE",
|
|
665
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
666
|
+
});
|
|
659
667
|
/**
|
|
660
668
|
* Refresh a Public Gateway's SSH keys. Refresh the SSH keys of a given Public Gateway, specified by its gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to the gateway itself.
|
|
661
669
|
*
|
|
@@ -678,14 +686,12 @@ class API extends API$1 {
|
|
|
678
686
|
* @deprecated
|
|
679
687
|
* @param request - The request {@link MigrateToV2Request}
|
|
680
688
|
*/
|
|
681
|
-
migrateToV2 = (request) => this.client.fetch(
|
|
682
|
-
{
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
);
|
|
689
|
+
migrateToV2 = (request) => this.client.fetch({
|
|
690
|
+
body: "{}",
|
|
691
|
+
headers: jsonContentHeaders,
|
|
692
|
+
method: "POST",
|
|
693
|
+
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/migrate-to-v2`
|
|
694
|
+
});
|
|
689
695
|
}
|
|
690
696
|
export {
|
|
691
697
|
API
|
package/dist/v1/index.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
4
|
export type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayNetworkRequestIpamConfig, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DeleteDHCPEntryRequest, DeleteDHCPRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePATRuleRequest, DHCP, DHCPEntry, DHCPEntryType, EnableIPMobilityRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetDHCPEntryRequest, GetDHCPRequest, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPATRuleRequest, IP, IpamConfig, ListDHCPEntriesRequest, ListDHCPEntriesRequestOrderBy, ListDHCPEntriesResponse, ListDHCPsRequest, ListDHCPsRequestOrderBy, ListDHCPsResponse, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPATRulesRequest, ListPATRulesRequestOrderBy, ListPATRulesResponse, MigrateToV2Request, PATRule, PATRuleProtocol, RefreshSSHKeysRequest, SetDHCPEntriesRequest, SetDHCPEntriesRequestEntry, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesRequestRule, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayNetworkRequestIpamConfig, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest, } from './types.gen.js';
|
|
@@ -121,7 +121,10 @@ const unmarshalGateway = (data) => {
|
|
|
121
121
|
bastionPort: data.bastion_port,
|
|
122
122
|
canUpgradeTo: data.can_upgrade_to,
|
|
123
123
|
createdAt: unmarshalDate(data.created_at),
|
|
124
|
-
gatewayNetworks: unmarshalArrayOfObject(
|
|
124
|
+
gatewayNetworks: unmarshalArrayOfObject(
|
|
125
|
+
data.gateway_networks,
|
|
126
|
+
unmarshalGatewayNetwork
|
|
127
|
+
),
|
|
125
128
|
id: data.id,
|
|
126
129
|
ip: data.ip ? unmarshalIP(data.ip) : void 0,
|
|
127
130
|
ipMobilityEnabled: data.ip_mobility_enabled,
|
|
@@ -186,7 +189,10 @@ const unmarshalListGatewayNetworksResponse = (data) => {
|
|
|
186
189
|
);
|
|
187
190
|
}
|
|
188
191
|
return {
|
|
189
|
-
gatewayNetworks: unmarshalArrayOfObject(
|
|
192
|
+
gatewayNetworks: unmarshalArrayOfObject(
|
|
193
|
+
data.gateway_networks,
|
|
194
|
+
unmarshalGatewayNetwork
|
|
195
|
+
),
|
|
190
196
|
totalCount: data.total_count
|
|
191
197
|
};
|
|
192
198
|
};
|
|
@@ -284,21 +290,17 @@ const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
284
290
|
gateway_id: request.gatewayId,
|
|
285
291
|
private_network_id: request.privateNetworkId,
|
|
286
292
|
...resolveOneOf([
|
|
287
|
-
{
|
|
288
|
-
param: "dhcp_id",
|
|
289
|
-
value: request.dhcpId
|
|
290
|
-
},
|
|
293
|
+
{ param: "dhcp_id", value: request.dhcpId },
|
|
291
294
|
{
|
|
292
295
|
param: "dhcp",
|
|
293
296
|
value: request.dhcp !== void 0 ? marshalCreateDHCPRequest(request.dhcp, defaults) : void 0
|
|
294
297
|
},
|
|
295
|
-
{
|
|
296
|
-
param: "address",
|
|
297
|
-
value: request.address
|
|
298
|
-
},
|
|
298
|
+
{ param: "address", value: request.address },
|
|
299
299
|
{
|
|
300
300
|
param: "ipam_config",
|
|
301
|
-
value: request.ipamConfig !== void 0 ? marshalCreateGatewayNetworkRequestIpamConfig(
|
|
301
|
+
value: request.ipamConfig !== void 0 ? marshalCreateGatewayNetworkRequestIpamConfig(
|
|
302
|
+
request.ipamConfig
|
|
303
|
+
) : void 0
|
|
302
304
|
}
|
|
303
305
|
])
|
|
304
306
|
});
|
|
@@ -329,7 +331,9 @@ const marshalSetDHCPEntriesRequestEntry = (request, defaults) => ({
|
|
|
329
331
|
mac_address: request.macAddress
|
|
330
332
|
});
|
|
331
333
|
const marshalSetDHCPEntriesRequest = (request, defaults) => ({
|
|
332
|
-
dhcp_entries: request.dhcpEntries !== void 0 ? request.dhcpEntries.map(
|
|
334
|
+
dhcp_entries: request.dhcpEntries !== void 0 ? request.dhcpEntries.map(
|
|
335
|
+
(elt) => marshalSetDHCPEntriesRequestEntry(elt)
|
|
336
|
+
) : void 0,
|
|
333
337
|
gateway_network_id: request.gatewayNetworkId
|
|
334
338
|
});
|
|
335
339
|
const marshalSetPATRulesRequestRule = (request, defaults) => ({
|
|
@@ -340,7 +344,9 @@ const marshalSetPATRulesRequestRule = (request, defaults) => ({
|
|
|
340
344
|
});
|
|
341
345
|
const marshalSetPATRulesRequest = (request, defaults) => ({
|
|
342
346
|
gateway_id: request.gatewayId,
|
|
343
|
-
pat_rules: request.patRules.map(
|
|
347
|
+
pat_rules: request.patRules.map(
|
|
348
|
+
(elt) => marshalSetPATRulesRequestRule(elt)
|
|
349
|
+
)
|
|
344
350
|
});
|
|
345
351
|
const marshalUpdateDHCPEntryRequest = (request, defaults) => ({
|
|
346
352
|
ip_address: request.ipAddress
|
|
@@ -368,17 +374,13 @@ const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
368
374
|
enable_dhcp: request.enableDhcp,
|
|
369
375
|
enable_masquerade: request.enableMasquerade,
|
|
370
376
|
...resolveOneOf([
|
|
371
|
-
{
|
|
372
|
-
|
|
373
|
-
value: request.dhcpId
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
param: "address",
|
|
377
|
-
value: request.address
|
|
378
|
-
},
|
|
377
|
+
{ param: "dhcp_id", value: request.dhcpId },
|
|
378
|
+
{ param: "address", value: request.address },
|
|
379
379
|
{
|
|
380
380
|
param: "ipam_config",
|
|
381
|
-
value: request.ipamConfig !== void 0 ? marshalUpdateGatewayNetworkRequestIpamConfig(
|
|
381
|
+
value: request.ipamConfig !== void 0 ? marshalUpdateGatewayNetworkRequestIpamConfig(
|
|
382
|
+
request.ipamConfig
|
|
383
|
+
) : void 0
|
|
382
384
|
}
|
|
383
385
|
])
|
|
384
386
|
});
|
package/dist/v2/api.gen.js
CHANGED
|
@@ -31,7 +31,10 @@ class API extends API$1 {
|
|
|
31
31
|
["order_by", request.orderBy],
|
|
32
32
|
["organization_id", request.organizationId],
|
|
33
33
|
["page", request.page],
|
|
34
|
-
[
|
|
34
|
+
[
|
|
35
|
+
"page_size",
|
|
36
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
37
|
+
],
|
|
35
38
|
["private_network_ids", request.privateNetworkIds],
|
|
36
39
|
["project_id", request.projectId],
|
|
37
40
|
["status", request.status],
|
|
@@ -69,7 +72,9 @@ class API extends API$1 {
|
|
|
69
72
|
* @returns A Promise of Gateway
|
|
70
73
|
*/
|
|
71
74
|
waitForGateway = (request, options) => waitForResource(
|
|
72
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
75
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
76
|
+
!GATEWAY_TRANSIENT_STATUSES.includes(res.status)
|
|
77
|
+
)),
|
|
73
78
|
this.getGateway,
|
|
74
79
|
request,
|
|
75
80
|
options
|
|
@@ -118,9 +123,7 @@ class API extends API$1 {
|
|
|
118
123
|
{
|
|
119
124
|
method: "DELETE",
|
|
120
125
|
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}`,
|
|
121
|
-
urlParams: urlParams(
|
|
122
|
-
["delete_ip", request.deleteIp]
|
|
123
|
-
)
|
|
126
|
+
urlParams: urlParams(["delete_ip", request.deleteIp])
|
|
124
127
|
},
|
|
125
128
|
unmarshalGateway
|
|
126
129
|
);
|
|
@@ -150,7 +153,10 @@ class API extends API$1 {
|
|
|
150
153
|
["masquerade_enabled", request.masqueradeEnabled],
|
|
151
154
|
["order_by", request.orderBy],
|
|
152
155
|
["page", request.page],
|
|
153
|
-
[
|
|
156
|
+
[
|
|
157
|
+
"page_size",
|
|
158
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
159
|
+
],
|
|
154
160
|
["private_network_ids", request.privateNetworkIds],
|
|
155
161
|
["status", request.status]
|
|
156
162
|
)
|
|
@@ -163,7 +169,11 @@ class API extends API$1 {
|
|
|
163
169
|
* @param request - The request {@link ListGatewayNetworksRequest}
|
|
164
170
|
* @returns A Promise of ListGatewayNetworksResponse
|
|
165
171
|
*/
|
|
166
|
-
listGatewayNetworks = (request = {}) => enrichForPagination(
|
|
172
|
+
listGatewayNetworks = (request = {}) => enrichForPagination(
|
|
173
|
+
"gatewayNetworks",
|
|
174
|
+
this.pageOfListGatewayNetworks,
|
|
175
|
+
request
|
|
176
|
+
);
|
|
167
177
|
/**
|
|
168
178
|
* Get a Public Gateway connection to a Private Network. Get details of a given connection between a Public Gateway and a Private Network (this connection = a GatewayNetwork), specified by its `gateway_network_id`. The response object contains details of the connection including the IDs of the Public Gateway and Private Network, the dates the connection was created/updated and its configuration settings.
|
|
169
179
|
*
|
|
@@ -185,7 +195,9 @@ class API extends API$1 {
|
|
|
185
195
|
* @returns A Promise of GatewayNetwork
|
|
186
196
|
*/
|
|
187
197
|
waitForGatewayNetwork = (request, options) => waitForResource(
|
|
188
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
198
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
199
|
+
!GATEWAY_NETWORK_TRANSIENT_STATUSES.includes(res.status)
|
|
200
|
+
)),
|
|
189
201
|
this.getGatewayNetwork,
|
|
190
202
|
request,
|
|
191
203
|
options
|
|
@@ -245,7 +257,10 @@ class API extends API$1 {
|
|
|
245
257
|
["gateway_ids", request.gatewayIds],
|
|
246
258
|
["order_by", request.orderBy],
|
|
247
259
|
["page", request.page],
|
|
248
|
-
[
|
|
260
|
+
[
|
|
261
|
+
"page_size",
|
|
262
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
263
|
+
],
|
|
249
264
|
["private_ips", request.privateIps],
|
|
250
265
|
["protocol", request.protocol]
|
|
251
266
|
)
|
|
@@ -328,12 +343,10 @@ class API extends API$1 {
|
|
|
328
343
|
*
|
|
329
344
|
* @param request - The request {@link DeletePatRuleRequest}
|
|
330
345
|
*/
|
|
331
|
-
deletePatRule = (request) => this.client.fetch(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
);
|
|
346
|
+
deletePatRule = (request) => this.client.fetch({
|
|
347
|
+
method: "DELETE",
|
|
348
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/pat-rules/${validatePathParam("patRuleId", request.patRuleId)}`
|
|
349
|
+
});
|
|
337
350
|
/**
|
|
338
351
|
* List Public Gateway types. List the different Public Gateway commercial offer types available at Scaleway. The response is an array of objects describing the name and technical details of each available gateway type.
|
|
339
352
|
*
|
|
@@ -356,7 +369,10 @@ class API extends API$1 {
|
|
|
356
369
|
["order_by", request.orderBy],
|
|
357
370
|
["organization_id", request.organizationId],
|
|
358
371
|
["page", request.page],
|
|
359
|
-
[
|
|
372
|
+
[
|
|
373
|
+
"page_size",
|
|
374
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
375
|
+
],
|
|
360
376
|
["project_id", request.projectId],
|
|
361
377
|
["reverse", request.reverse],
|
|
362
378
|
["tags", request.tags]
|
|
@@ -423,12 +439,10 @@ class API extends API$1 {
|
|
|
423
439
|
*
|
|
424
440
|
* @param request - The request {@link DeleteIPRequest}
|
|
425
441
|
*/
|
|
426
|
-
deleteIP = (request) => this.client.fetch(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
}
|
|
431
|
-
);
|
|
442
|
+
deleteIP = (request) => this.client.fetch({
|
|
443
|
+
method: "DELETE",
|
|
444
|
+
path: `/vpc-gw/v2/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/ips/${validatePathParam("ipId", request.ipId)}`
|
|
445
|
+
});
|
|
432
446
|
/**
|
|
433
447
|
* Refresh a Public Gateway's SSH keys. Refresh the SSH keys of a given Public Gateway, specified by its gateway ID. This adds any new SSH keys in the gateway's Scaleway Project to the gateway itself.
|
|
434
448
|
*
|
|
@@ -483,12 +497,10 @@ class API extends API$1 {
|
|
|
483
497
|
*
|
|
484
498
|
* @param request - The request {@link DeleteBastionAllowedIPsRequest}
|
|
485
499
|
*/
|
|
486
|
-
deleteBastionAllowedIPs = (request) => this.client.fetch(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
);
|
|
500
|
+
deleteBastionAllowedIPs = (request) => this.client.fetch({
|
|
501
|
+
method: "DELETE",
|
|
502
|
+
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)}`
|
|
503
|
+
});
|
|
492
504
|
}
|
|
493
505
|
export {
|
|
494
506
|
API
|
package/dist/v2/index.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
2
|
export * from './content.gen.js';
|
|
3
3
|
export * from './marshalling.gen.js';
|
|
4
4
|
export type { AddBastionAllowedIPsRequest, AddBastionAllowedIPsResponse, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePatRuleRequest, DeleteBastionAllowedIPsRequest, DeleteGatewayNetworkRequest, DeleteGatewayRequest, DeleteIPRequest, DeletePatRuleRequest, Gateway, GatewayNetwork, GatewayNetworkStatus, GatewayStatus, GatewayType, GetGatewayNetworkRequest, GetGatewayRequest, GetIPRequest, GetPatRuleRequest, IP, ListGatewayNetworksRequest, ListGatewayNetworksRequestOrderBy, ListGatewayNetworksResponse, ListGatewaysRequest, ListGatewaysRequestOrderBy, ListGatewaysResponse, ListGatewayTypesRequest, ListGatewayTypesResponse, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, ListPatRulesRequest, ListPatRulesRequestOrderBy, ListPatRulesResponse, PatRule, PatRuleProtocol, RefreshSSHKeysRequest, SetBastionAllowedIPsRequest, SetBastionAllowedIPsResponse, SetPatRulesRequest, SetPatRulesRequestRule, SetPatRulesResponse, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePatRuleRequest, UpgradeGatewayRequest, } from './types.gen.js';
|
|
@@ -52,7 +52,10 @@ const unmarshalGateway = (data) => {
|
|
|
52
52
|
bastionPort: data.bastion_port,
|
|
53
53
|
canUpgradeTo: data.can_upgrade_to,
|
|
54
54
|
createdAt: unmarshalDate(data.created_at),
|
|
55
|
-
gatewayNetworks: unmarshalArrayOfObject(
|
|
55
|
+
gatewayNetworks: unmarshalArrayOfObject(
|
|
56
|
+
data.gateway_networks,
|
|
57
|
+
unmarshalGatewayNetwork
|
|
58
|
+
),
|
|
56
59
|
id: data.id,
|
|
57
60
|
ipv4: data.ipv4 ? unmarshalIP(data.ipv4) : void 0,
|
|
58
61
|
isLegacy: data.is_legacy,
|
|
@@ -103,7 +106,10 @@ const unmarshalListGatewayNetworksResponse = (data) => {
|
|
|
103
106
|
);
|
|
104
107
|
}
|
|
105
108
|
return {
|
|
106
|
-
gatewayNetworks: unmarshalArrayOfObject(
|
|
109
|
+
gatewayNetworks: unmarshalArrayOfObject(
|
|
110
|
+
data.gateway_networks,
|
|
111
|
+
unmarshalGatewayNetwork
|
|
112
|
+
),
|
|
107
113
|
totalCount: data.total_count
|
|
108
114
|
};
|
|
109
115
|
};
|
|
@@ -224,7 +230,9 @@ const marshalSetPatRulesRequestRule = (request, defaults) => ({
|
|
|
224
230
|
});
|
|
225
231
|
const marshalSetPatRulesRequest = (request, defaults) => ({
|
|
226
232
|
gateway_id: request.gatewayId,
|
|
227
|
-
pat_rules: request.patRules.map(
|
|
233
|
+
pat_rules: request.patRules.map(
|
|
234
|
+
(elt) => marshalSetPatRulesRequestRule(elt)
|
|
235
|
+
)
|
|
228
236
|
});
|
|
229
237
|
const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
230
238
|
enable_masquerade: request.enableMasquerade,
|