@scaleway/sdk-vpcgw 2.2.0 → 2.3.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/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 -697
- package/dist/v1/content.gen.js +10 -11
- package/dist/v1/index.gen.d.ts +1 -1
- package/dist/v1/index.gen.js +38 -36
- package/dist/v1/marshalling.gen.js +266 -377
- package/dist/v2/api.gen.js +343 -506
- package/dist/v2/content.gen.js +10 -11
- package/dist/v2/index.gen.d.ts +1 -1
- package/dist/v2/index.gen.js +32 -30
- package/dist/v2/marshalling.gen.js +144 -243
- 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.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { API } from './api.gen.js';
|
|
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';
|
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,288 +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
|
-
status: data.status,
|
|
67
|
-
tags: data.tags,
|
|
68
|
-
type: data.type,
|
|
69
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
70
|
-
version: data.version,
|
|
71
|
-
zone: data.zone
|
|
72
|
-
};
|
|
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
|
+
};
|
|
73
58
|
};
|
|
74
59
|
const unmarshalPatRule = (data) => {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
publicPort: data.public_port,
|
|
88
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
89
|
-
zone: data.zone
|
|
90
|
-
};
|
|
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
|
+
};
|
|
91
72
|
};
|
|
92
73
|
const unmarshalAddBastionAllowedIPsResponse = (data) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
ipRanges: data.ip_ranges
|
|
100
|
-
};
|
|
74
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AddBastionAllowedIPsResponse' failed as data isn't a dictionary.`);
|
|
75
|
+
return { ipRanges: data.ip_ranges };
|
|
101
76
|
};
|
|
102
77
|
const unmarshalListGatewayNetworksResponse = (data) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return {
|
|
109
|
-
gatewayNetworks: unmarshalArrayOfObject(
|
|
110
|
-
data.gateway_networks,
|
|
111
|
-
unmarshalGatewayNetwork
|
|
112
|
-
),
|
|
113
|
-
totalCount: data.total_count
|
|
114
|
-
};
|
|
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
|
+
};
|
|
115
83
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
bandwidth: data.bandwidth,
|
|
124
|
-
name: data.name,
|
|
125
|
-
zone: data.zone
|
|
126
|
-
};
|
|
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
|
+
};
|
|
127
91
|
};
|
|
128
92
|
const unmarshalListGatewayTypesResponse = (data) => {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
`Unmarshalling the type 'ListGatewayTypesResponse' failed as data isn't a dictionary.`
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
return {
|
|
135
|
-
types: unmarshalArrayOfObject(data.types, unmarshalGatewayType)
|
|
136
|
-
};
|
|
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) };
|
|
137
95
|
};
|
|
138
96
|
const unmarshalListGatewaysResponse = (data) => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return {
|
|
145
|
-
gateways: unmarshalArrayOfObject(data.gateways, unmarshalGateway),
|
|
146
|
-
totalCount: data.total_count
|
|
147
|
-
};
|
|
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
|
+
};
|
|
148
102
|
};
|
|
149
103
|
const unmarshalListIPsResponse = (data) => {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return {
|
|
156
|
-
ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
|
|
157
|
-
totalCount: data.total_count
|
|
158
|
-
};
|
|
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
|
+
};
|
|
159
109
|
};
|
|
160
110
|
const unmarshalListPatRulesResponse = (data) => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return {
|
|
167
|
-
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule),
|
|
168
|
-
totalCount: data.total_count
|
|
169
|
-
};
|
|
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
|
+
};
|
|
170
116
|
};
|
|
171
117
|
const unmarshalSetBastionAllowedIPsResponse = (data) => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
return {
|
|
178
|
-
ipRanges: data.ip_ranges
|
|
179
|
-
};
|
|
118
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'SetBastionAllowedIPsResponse' failed as data isn't a dictionary.`);
|
|
119
|
+
return { ipRanges: data.ip_ranges };
|
|
180
120
|
};
|
|
181
121
|
const unmarshalSetPatRulesResponse = (data) => {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
`Unmarshalling the type 'SetPatRulesResponse' failed as data isn't a dictionary.`
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
return {
|
|
188
|
-
patRules: unmarshalArrayOfObject(data.pat_rules, unmarshalPatRule)
|
|
189
|
-
};
|
|
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) };
|
|
190
124
|
};
|
|
191
|
-
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({
|
|
192
|
-
ip_range: request.ipRange
|
|
193
|
-
});
|
|
125
|
+
const marshalAddBastionAllowedIPsRequest = (request, defaults) => ({ ip_range: request.ipRange });
|
|
194
126
|
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
200
132
|
});
|
|
201
133
|
const marshalCreateGatewayRequest = (request, defaults) => ({
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
|
|
210
142
|
});
|
|
211
143
|
const marshalCreateIPRequest = (request, defaults) => ({
|
|
212
|
-
|
|
213
|
-
|
|
144
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
145
|
+
tags: request.tags
|
|
214
146
|
});
|
|
215
147
|
const marshalCreatePatRuleRequest = (request, defaults) => ({
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
148
|
+
gateway_id: request.gatewayId,
|
|
149
|
+
private_ip: request.privateIp,
|
|
150
|
+
private_port: request.privatePort,
|
|
151
|
+
protocol: request.protocol,
|
|
152
|
+
public_port: request.publicPort
|
|
221
153
|
});
|
|
222
|
-
const marshalSetBastionAllowedIPsRequest = (request, defaults) => ({
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
protocol: request.protocol,
|
|
229
|
-
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
|
|
230
160
|
});
|
|
231
161
|
const marshalSetPatRulesRequest = (request, defaults) => ({
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
(elt) => marshalSetPatRulesRequestRule(elt)
|
|
235
|
-
)
|
|
162
|
+
gateway_id: request.gatewayId,
|
|
163
|
+
pat_rules: request.patRules.map((elt) => marshalSetPatRulesRequestRule(elt, defaults))
|
|
236
164
|
});
|
|
237
165
|
const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
166
|
+
enable_masquerade: request.enableMasquerade,
|
|
167
|
+
ipam_ip_id: request.ipamIpId,
|
|
168
|
+
push_default_route: request.pushDefaultRoute
|
|
241
169
|
});
|
|
242
170
|
const marshalUpdateGatewayRequest = (request, defaults) => ({
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
171
|
+
bastion_port: request.bastionPort,
|
|
172
|
+
enable_bastion: request.enableBastion,
|
|
173
|
+
enable_smtp: request.enableSmtp,
|
|
174
|
+
name: request.name,
|
|
175
|
+
tags: request.tags
|
|
248
176
|
});
|
|
249
177
|
const marshalUpdateIPRequest = (request, defaults) => ({
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
178
|
+
gateway_id: request.gatewayId,
|
|
179
|
+
reverse: request.reverse,
|
|
180
|
+
tags: request.tags
|
|
253
181
|
});
|
|
254
182
|
const marshalUpdatePatRuleRequest = (request, defaults) => ({
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
});
|
|
260
|
-
const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
261
|
-
type: request.type
|
|
183
|
+
private_ip: request.privateIp,
|
|
184
|
+
private_port: request.privatePort,
|
|
185
|
+
protocol: request.protocol,
|
|
186
|
+
public_port: request.publicPort
|
|
262
187
|
});
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
marshalCreateGatewayNetworkRequest,
|
|
266
|
-
marshalCreateGatewayRequest,
|
|
267
|
-
marshalCreateIPRequest,
|
|
268
|
-
marshalCreatePatRuleRequest,
|
|
269
|
-
marshalSetBastionAllowedIPsRequest,
|
|
270
|
-
marshalSetPatRulesRequest,
|
|
271
|
-
marshalUpdateGatewayNetworkRequest,
|
|
272
|
-
marshalUpdateGatewayRequest,
|
|
273
|
-
marshalUpdateIPRequest,
|
|
274
|
-
marshalUpdatePatRuleRequest,
|
|
275
|
-
marshalUpgradeGatewayRequest,
|
|
276
|
-
unmarshalAddBastionAllowedIPsResponse,
|
|
277
|
-
unmarshalGateway,
|
|
278
|
-
unmarshalGatewayNetwork,
|
|
279
|
-
unmarshalIP,
|
|
280
|
-
unmarshalListGatewayNetworksResponse,
|
|
281
|
-
unmarshalListGatewayTypesResponse,
|
|
282
|
-
unmarshalListGatewaysResponse,
|
|
283
|
-
unmarshalListIPsResponse,
|
|
284
|
-
unmarshalListPatRulesResponse,
|
|
285
|
-
unmarshalPatRule,
|
|
286
|
-
unmarshalSetBastionAllowedIPsResponse,
|
|
287
|
-
unmarshalSetPatRulesResponse
|
|
288
|
-
};
|
|
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.0",
|
|
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.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|