@scaleway/sdk-vpcgw 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +3 -6
- package/dist/v1/api.gen.js +490 -691
- package/dist/v1/content.gen.js +10 -11
- package/dist/v1/index.gen.js +38 -36
- package/dist/v1/marshalling.gen.js +266 -375
- package/dist/v2/api.gen.js +343 -494
- package/dist/v2/content.gen.js +10 -11
- package/dist/v2/index.gen.js +32 -30
- package/dist/v2/marshalling.gen.js +144 -235
- package/package.json +4 -4
package/dist/v2/content.gen.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
/** Lists transient statutes of the enum {@link GatewayNetworkStatus}. */
|
|
1
2
|
const GATEWAY_NETWORK_TRANSIENT_STATUSES = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
"attaching",
|
|
4
|
+
"configuring",
|
|
5
|
+
"detaching"
|
|
5
6
|
];
|
|
7
|
+
/** Lists transient statutes of the enum {@link GatewayStatus}. */
|
|
6
8
|
const GATEWAY_TRANSIENT_STATUSES = [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"allocating",
|
|
10
|
+
"configuring",
|
|
11
|
+
"stopping",
|
|
12
|
+
"deleting"
|
|
11
13
|
];
|
|
12
|
-
export {
|
|
13
|
-
GATEWAY_NETWORK_TRANSIENT_STATUSES,
|
|
14
|
-
GATEWAY_TRANSIENT_STATUSES
|
|
15
|
-
};
|
|
14
|
+
export { GATEWAY_NETWORK_TRANSIENT_STATUSES, GATEWAY_TRANSIENT_STATUSES };
|
package/dist/v2/index.gen.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
4
|
+
import { API } from "./api.gen.js";
|
|
5
|
+
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
API: () => API,
|
|
7
|
+
GATEWAY_NETWORK_TRANSIENT_STATUSES: () => GATEWAY_NETWORK_TRANSIENT_STATUSES,
|
|
8
|
+
GATEWAY_TRANSIENT_STATUSES: () => GATEWAY_TRANSIENT_STATUSES,
|
|
9
|
+
marshalAddBastionAllowedIPsRequest: () => marshalAddBastionAllowedIPsRequest,
|
|
10
|
+
marshalCreateGatewayNetworkRequest: () => marshalCreateGatewayNetworkRequest,
|
|
11
|
+
marshalCreateGatewayRequest: () => marshalCreateGatewayRequest,
|
|
12
|
+
marshalCreateIPRequest: () => marshalCreateIPRequest,
|
|
13
|
+
marshalCreatePatRuleRequest: () => marshalCreatePatRuleRequest,
|
|
14
|
+
marshalSetBastionAllowedIPsRequest: () => marshalSetBastionAllowedIPsRequest,
|
|
15
|
+
marshalSetPatRulesRequest: () => marshalSetPatRulesRequest,
|
|
16
|
+
marshalUpdateGatewayNetworkRequest: () => marshalUpdateGatewayNetworkRequest,
|
|
17
|
+
marshalUpdateGatewayRequest: () => marshalUpdateGatewayRequest,
|
|
18
|
+
marshalUpdateIPRequest: () => marshalUpdateIPRequest,
|
|
19
|
+
marshalUpdatePatRuleRequest: () => marshalUpdatePatRuleRequest,
|
|
20
|
+
marshalUpgradeGatewayRequest: () => marshalUpgradeGatewayRequest,
|
|
21
|
+
unmarshalAddBastionAllowedIPsResponse: () => unmarshalAddBastionAllowedIPsResponse,
|
|
22
|
+
unmarshalGateway: () => unmarshalGateway,
|
|
23
|
+
unmarshalGatewayNetwork: () => unmarshalGatewayNetwork,
|
|
24
|
+
unmarshalIP: () => unmarshalIP,
|
|
25
|
+
unmarshalListGatewayNetworksResponse: () => unmarshalListGatewayNetworksResponse,
|
|
26
|
+
unmarshalListGatewayTypesResponse: () => unmarshalListGatewayTypesResponse,
|
|
27
|
+
unmarshalListGatewaysResponse: () => unmarshalListGatewaysResponse,
|
|
28
|
+
unmarshalListIPsResponse: () => unmarshalListIPsResponse,
|
|
29
|
+
unmarshalListPatRulesResponse: () => unmarshalListPatRulesResponse,
|
|
30
|
+
unmarshalPatRule: () => unmarshalPatRule,
|
|
31
|
+
unmarshalSetBastionAllowedIPsResponse: () => unmarshalSetBastionAllowedIPsResponse,
|
|
32
|
+
unmarshalSetPatRulesResponse: () => unmarshalSetPatRulesResponse
|
|
33
|
+
});
|
|
34
|
+
export { index_gen_exports };
|
|
@@ -1,280 +1,189 @@
|
|
|
1
|
-
import randomName from "@scaleway/random-name";
|
|
2
1
|
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
+
import randomName from "@scaleway/random-name";
|
|
3
3
|
const unmarshalGatewayNetwork = (data) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
status: data.status,
|
|
19
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
20
|
-
zone: data.zone
|
|
21
|
-
};
|
|
4
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayNetwork' failed as data isn't a dictionary.`);
|
|
5
|
+
return {
|
|
6
|
+
createdAt: unmarshalDate(data.created_at),
|
|
7
|
+
gatewayId: data.gateway_id,
|
|
8
|
+
id: data.id,
|
|
9
|
+
ipamIpId: data.ipam_ip_id,
|
|
10
|
+
macAddress: data.mac_address,
|
|
11
|
+
masqueradeEnabled: data.masquerade_enabled,
|
|
12
|
+
privateNetworkId: data.private_network_id,
|
|
13
|
+
pushDefaultRoute: data.push_default_route,
|
|
14
|
+
status: data.status,
|
|
15
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
16
|
+
zone: data.zone
|
|
17
|
+
};
|
|
22
18
|
};
|
|
23
19
|
const unmarshalIP = (data) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
tags: data.tags,
|
|
38
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
39
|
-
zone: data.zone
|
|
40
|
-
};
|
|
20
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
|
|
21
|
+
return {
|
|
22
|
+
address: data.address,
|
|
23
|
+
createdAt: unmarshalDate(data.created_at),
|
|
24
|
+
gatewayId: data.gateway_id,
|
|
25
|
+
id: data.id,
|
|
26
|
+
organizationId: data.organization_id,
|
|
27
|
+
projectId: data.project_id,
|
|
28
|
+
reverse: data.reverse,
|
|
29
|
+
tags: data.tags,
|
|
30
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
31
|
+
zone: data.zone
|
|
32
|
+
};
|
|
41
33
|
};
|
|
42
34
|
const unmarshalGateway = (data) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
67
|
-
version: data.version,
|
|
68
|
-
zone: data.zone
|
|
69
|
-
};
|
|
35
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Gateway' failed as data isn't a dictionary.`);
|
|
36
|
+
return {
|
|
37
|
+
bandwidth: data.bandwidth,
|
|
38
|
+
bastionAllowedIps: data.bastion_allowed_ips,
|
|
39
|
+
bastionEnabled: data.bastion_enabled,
|
|
40
|
+
bastionPort: data.bastion_port,
|
|
41
|
+
canUpgradeTo: data.can_upgrade_to,
|
|
42
|
+
createdAt: unmarshalDate(data.created_at),
|
|
43
|
+
gatewayNetworks: unmarshalArrayOfObject(data.gateway_networks, unmarshalGatewayNetwork),
|
|
44
|
+
id: data.id,
|
|
45
|
+
ipv4: data.ipv4 ? unmarshalIP(data.ipv4) : void 0,
|
|
46
|
+
isLegacy: data.is_legacy,
|
|
47
|
+
name: data.name,
|
|
48
|
+
organizationId: data.organization_id,
|
|
49
|
+
projectId: data.project_id,
|
|
50
|
+
smtpEnabled: data.smtp_enabled,
|
|
51
|
+
status: data.status,
|
|
52
|
+
tags: data.tags,
|
|
53
|
+
type: data.type,
|
|
54
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
55
|
+
version: data.version,
|
|
56
|
+
zone: data.zone
|
|
57
|
+
};
|
|
70
58
|
};
|
|
71
59
|
const unmarshalPatRule = (data) => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
publicPort: data.public_port,
|
|
85
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
86
|
-
zone: data.zone
|
|
87
|
-
};
|
|
60
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PatRule' failed as data isn't a dictionary.`);
|
|
61
|
+
return {
|
|
62
|
+
createdAt: unmarshalDate(data.created_at),
|
|
63
|
+
gatewayId: data.gateway_id,
|
|
64
|
+
id: data.id,
|
|
65
|
+
privateIp: data.private_ip,
|
|
66
|
+
privatePort: data.private_port,
|
|
67
|
+
protocol: data.protocol,
|
|
68
|
+
publicPort: data.public_port,
|
|
69
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
70
|
+
zone: data.zone
|
|
71
|
+
};
|
|
88
72
|
};
|
|
89
73
|
const unmarshalAddBastionAllowedIPsResponse = (data) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
return {
|
|
96
|
-
ipRanges: data.ip_ranges
|
|
97
|
-
};
|
|
74
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`);
|
|
75
|
+
return { ipRanges: data.ip_ranges };
|
|
98
76
|
};
|
|
99
77
|
const unmarshalListGatewayNetworksResponse = (data) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
gatewayNetworks: unmarshalArrayOfObject(data.gateway_networks, unmarshalGatewayNetwork),
|
|
107
|
-
totalCount: data.total_count
|
|
108
|
-
};
|
|
78
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayNetworksResponse' failed as data isn't a dictionary.`);
|
|
79
|
+
return {
|
|
80
|
+
gatewayNetworks: unmarshalArrayOfObject(data.gateway_networks, unmarshalGatewayNetwork),
|
|
81
|
+
totalCount: data.total_count
|
|
82
|
+
};
|
|
109
83
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
bandwidth: data.bandwidth,
|
|
118
|
-
name: data.name,
|
|
119
|
-
zone: data.zone
|
|
120
|
-
};
|
|
84
|
+
var unmarshalGatewayType = (data) => {
|
|
85
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'GatewayType' failed as data isn't a dictionary.`);
|
|
86
|
+
return {
|
|
87
|
+
bandwidth: data.bandwidth,
|
|
88
|
+
name: data.name,
|
|
89
|
+
zone: data.zone
|
|
90
|
+
};
|
|
121
91
|
};
|
|
122
92
|
const unmarshalListGatewayTypesResponse = (data) => {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
`Unmarshalling the type 'ListGatewayTypesResponse' failed as data isn't a dictionary.`
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
return {
|
|
129
|
-
types: unmarshalArrayOfObject(data.types, unmarshalGatewayType)
|
|
130
|
-
};
|
|
93
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewayTypesResponse' failed as data isn't a dictionary.`);
|
|
94
|
+
return { types: unmarshalArrayOfObject(data.types, unmarshalGatewayType) };
|
|
131
95
|
};
|
|
132
96
|
const unmarshalListGatewaysResponse = (data) => {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return {
|
|
139
|
-
gateways: unmarshalArrayOfObject(data.gateways, unmarshalGateway),
|
|
140
|
-
totalCount: data.total_count
|
|
141
|
-
};
|
|
97
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListGatewaysResponse' failed as data isn't a dictionary.`);
|
|
98
|
+
return {
|
|
99
|
+
gateways: unmarshalArrayOfObject(data.gateways, unmarshalGateway),
|
|
100
|
+
totalCount: data.total_count
|
|
101
|
+
};
|
|
142
102
|
};
|
|
143
103
|
const unmarshalListIPsResponse = (data) => {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return {
|
|
150
|
-
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
151
|
-
totalCount: data.total_count
|
|
152
|
-
};
|
|
104
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary.`);
|
|
105
|
+
return {
|
|
106
|
+
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
107
|
+
totalCount: data.total_count
|
|
108
|
+
};
|
|
153
109
|
};
|
|
154
110
|
const unmarshalListPatRulesResponse = (data) => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule),
|
|
162
|
-
totalCount: data.total_count
|
|
163
|
-
};
|
|
111
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPatRulesResponse' failed as data isn't a dictionary.`);
|
|
112
|
+
return {
|
|
113
|
+
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule),
|
|
114
|
+
totalCount: data.total_count
|
|
115
|
+
};
|
|
164
116
|
};
|
|
165
117
|
const unmarshalSetBastionAllowedIPsResponse = (data) => {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
return {
|
|
172
|
-
ipRanges: data.ip_ranges
|
|
173
|
-
};
|
|
118
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`);
|
|
119
|
+
return { ipRanges: data.ip_ranges };
|
|
174
120
|
};
|
|
175
121
|
const unmarshalSetPatRulesResponse = (data) => {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
`Unmarshalling the type 'SetPatRulesResponse' failed as data isn't a dictionary.`
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
return {
|
|
182
|
-
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
|
|
183
|
-
};
|
|
122
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetPatRulesResponse' failed as data isn't a dictionary.`);
|
|
123
|
+
return { patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule) };
|
|
184
124
|
};
|
|
185
|
-
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
|
|
186
|
-
ip_range: request.ipRange
|
|
187
|
-
});
|
|
125
|
+
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({ ip_range: request.ipRange });
|
|
188
126
|
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
127
|
+
enable_masquerade: request.enableMasquerade,
|
|
128
|
+
gateway_id: request.gatewayId,
|
|
129
|
+
ipam_ip_id: request.ipamIpId,
|
|
130
|
+
private_network_id: request.privateNetworkId,
|
|
131
|
+
push_default_route: request.pushDefaultRoute
|
|
194
132
|
});
|
|
195
133
|
const marshalCreateGatewayRequest = (request, defaults) => ({
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
134
|
+
bastion_port: request.bastionPort,
|
|
135
|
+
enable_bastion: request.enableBastion,
|
|
136
|
+
enable_smtp: request.enableSmtp,
|
|
137
|
+
ip_id: request.ipId,
|
|
138
|
+
name: request.name || randomName("gw"),
|
|
139
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
140
|
+
tags: request.tags,
|
|
141
|
+
type: request.type
|
|
204
142
|
});
|
|
205
143
|
const marshalCreateIPRequest = (request, defaults) => ({
|
|
206
|
-
|
|
207
|
-
|
|
144
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
145
|
+
tags: request.tags
|
|
208
146
|
});
|
|
209
147
|
const marshalCreatePatRuleRequest = (request, defaults) => ({
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
148
|
+
gateway_id: request.gatewayId,
|
|
149
|
+
private_ip: request.privateIp,
|
|
150
|
+
private_port: request.privatePort,
|
|
151
|
+
protocol: request.protocol,
|
|
152
|
+
public_port: request.publicPort
|
|
215
153
|
});
|
|
216
|
-
const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
protocol: request.protocol,
|
|
223
|
-
public_port: request.publicPort
|
|
154
|
+
const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({ ip_ranges: request.ipRanges });
|
|
155
|
+
var marshalSetPatRulesRequestRule = (request, defaults) => ({
|
|
156
|
+
private_ip: request.privateIp,
|
|
157
|
+
private_port: request.privatePort,
|
|
158
|
+
protocol: request.protocol,
|
|
159
|
+
public_port: request.publicPort
|
|
224
160
|
});
|
|
225
161
|
const marshalSetPatRulesRequest = (request, defaults) => ({
|
|
226
|
-
|
|
227
|
-
|
|
162
|
+
gateway_id: request.gatewayId,
|
|
163
|
+
pat_rules: request.patRules.map((elt) => marshalSetPatRulesRequestRule(elt, defaults))
|
|
228
164
|
});
|
|
229
165
|
const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
166
|
+
enable_masquerade: request.enableMasquerade,
|
|
167
|
+
ipam_ip_id: request.ipamIpId,
|
|
168
|
+
push_default_route: request.pushDefaultRoute
|
|
233
169
|
});
|
|
234
170
|
const marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
171
|
+
bastion_port: request.bastionPort,
|
|
172
|
+
enable_bastion: request.enableBastion,
|
|
173
|
+
enable_smtp: request.enableSmtp,
|
|
174
|
+
name: request.name,
|
|
175
|
+
tags: request.tags
|
|
240
176
|
});
|
|
241
177
|
const marshalUpdateIPRequest = (request, defaults) => ({
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
178
|
+
gateway_id: request.gatewayId,
|
|
179
|
+
reverse: request.reverse,
|
|
180
|
+
tags: request.tags
|
|
245
181
|
});
|
|
246
182
|
const marshalUpdatePatRuleRequest = (request, defaults) => ({
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
});
|
|
252
|
-
const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
253
|
-
type: request.type
|
|
183
|
+
private_ip: request.privateIp,
|
|
184
|
+
private_port: request.privatePort,
|
|
185
|
+
protocol: request.protocol,
|
|
186
|
+
public_port: request.publicPort
|
|
254
187
|
});
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
marshalCreateGatewayNetworkRequest,
|
|
258
|
-
marshalCreateGatewayRequest,
|
|
259
|
-
marshalCreateIPRequest,
|
|
260
|
-
marshalCreatePatRuleRequest,
|
|
261
|
-
marshalSetBastionAllowedIPsRequest,
|
|
262
|
-
marshalSetPatRulesRequest,
|
|
263
|
-
marshalUpdateGatewayNetworkRequest,
|
|
264
|
-
marshalUpdateGatewayRequest,
|
|
265
|
-
marshalUpdateIPRequest,
|
|
266
|
-
marshalUpdatePatRuleRequest,
|
|
267
|
-
marshalUpgradeGatewayRequest,
|
|
268
|
-
unmarshalAddBastionAllowedIPsResponse,
|
|
269
|
-
unmarshalGateway,
|
|
270
|
-
unmarshalGatewayNetwork,
|
|
271
|
-
unmarshalIP,
|
|
272
|
-
unmarshalListGatewayNetworksResponse,
|
|
273
|
-
unmarshalListGatewayTypesResponse,
|
|
274
|
-
unmarshalListGatewaysResponse,
|
|
275
|
-
unmarshalListIPsResponse,
|
|
276
|
-
unmarshalListPatRulesResponse,
|
|
277
|
-
unmarshalPatRule,
|
|
278
|
-
unmarshalSetBastionAllowedIPsResponse,
|
|
279
|
-
unmarshalSetPatRulesResponse
|
|
280
|
-
};
|
|
188
|
+
const marshalUpgradeGatewayRequest = (request, defaults) => ({ type: request.type });
|
|
189
|
+
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-vpcgw",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Scaleway SDK vpcgw",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@scaleway/random-name": "5.1.2",
|
|
30
|
-
"@scaleway/sdk-std": "2.
|
|
30
|
+
"@scaleway/sdk-std": "2.2.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.1
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.1
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.1"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|