@scaleway/sdk-flexibleip 2.2.1 → 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 +2 -4
- package/dist/v1alpha1/api.gen.js +154 -214
- package/dist/v1alpha1/content.gen.js +5 -12
- package/dist/v1alpha1/index.gen.js +21 -19
- package/dist/v1alpha1/marshalling.gen.js +59 -99
- package/dist/v1alpha1/validation-rules.gen.js +8 -10
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -83,6 +83,7 @@ const api = new Flexibleip.v1.API(client)
|
|
|
83
83
|
## Support
|
|
84
84
|
|
|
85
85
|
We love feedback! Feel free to reach us on:
|
|
86
|
+
|
|
86
87
|
- [Scaleway Slack community](https://slack.scaleway.com/) - Join us on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)
|
|
87
88
|
- [GitHub Issues](https://github.com/scaleway/scaleway-sdk-js/issues)
|
|
88
89
|
|
|
@@ -93,4 +94,3 @@ This repository is at its early stage and is still in active development. If you
|
|
|
93
94
|
## License
|
|
94
95
|
|
|
95
96
|
This project is Apache 2.0 licensed. See the [LICENSE](https://github.com/scaleway/scaleway-sdk-js/blob/master/LICENSE) file for details.
|
|
96
|
-
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __exportAll = (all, no_symbols) => {
|
|
3
|
+
let target = {};
|
|
4
|
+
for (var name in all) __defProp(target, name, {
|
|
5
|
+
get: all[name],
|
|
6
|
+
enumerable: true
|
|
7
|
+
});
|
|
8
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
|
+
return target;
|
|
10
|
+
};
|
|
11
|
+
export { __exportAll };
|
package/dist/index.gen.js
CHANGED
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,216 +1,156 @@
|
|
|
1
|
-
import { API as API$1, toApiLocality, validatePathParam, waitForResource, urlParams, enrichForPagination } from "@scaleway/sdk-client";
|
|
2
1
|
import { FLEXIBLE_IP_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalCreateFlexibleIPRequest,
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
*/
|
|
157
|
-
generateMACAddr = (request) => this.client.fetch(
|
|
158
|
-
{
|
|
159
|
-
body: JSON.stringify(
|
|
160
|
-
marshalGenerateMACAddrRequest(request, this.client.settings)
|
|
161
|
-
),
|
|
162
|
-
headers: jsonContentHeaders,
|
|
163
|
-
method: "POST",
|
|
164
|
-
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac`
|
|
165
|
-
},
|
|
166
|
-
unmarshalFlexibleIP
|
|
167
|
-
);
|
|
168
|
-
/**
|
|
169
|
-
* Duplicate a virtual MAC address to another flexible IP. Duplicate a virtual MAC address from a given flexible IP to another flexible IP attached to the same server.
|
|
170
|
-
*
|
|
171
|
-
* @param request - The request {@link DuplicateMACAddrRequest}
|
|
172
|
-
* @returns A Promise of FlexibleIP
|
|
173
|
-
*/
|
|
174
|
-
duplicateMACAddr = (request) => this.client.fetch(
|
|
175
|
-
{
|
|
176
|
-
body: JSON.stringify(
|
|
177
|
-
marshalDuplicateMACAddrRequest(request, this.client.settings)
|
|
178
|
-
),
|
|
179
|
-
headers: jsonContentHeaders,
|
|
180
|
-
method: "POST",
|
|
181
|
-
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac/duplicate`
|
|
182
|
-
},
|
|
183
|
-
unmarshalFlexibleIP
|
|
184
|
-
);
|
|
185
|
-
/**
|
|
186
|
-
* Relocate an existing virtual MAC address to a different flexible IP. Relocate a virtual MAC (Media Access Control) address from an existing flexible IP to a different flexible IP.
|
|
187
|
-
*
|
|
188
|
-
* @param request - The request {@link MoveMACAddrRequest}
|
|
189
|
-
* @returns A Promise of FlexibleIP
|
|
190
|
-
*/
|
|
191
|
-
moveMACAddr = (request) => this.client.fetch(
|
|
192
|
-
{
|
|
193
|
-
body: JSON.stringify(
|
|
194
|
-
marshalMoveMACAddrRequest(request, this.client.settings)
|
|
195
|
-
),
|
|
196
|
-
headers: jsonContentHeaders,
|
|
197
|
-
method: "POST",
|
|
198
|
-
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac/move`
|
|
199
|
-
},
|
|
200
|
-
unmarshalFlexibleIP
|
|
201
|
-
);
|
|
202
|
-
/**
|
|
203
|
-
* Detach a given virtual MAC address from an existing flexible IP. Detach a given MAC (Media Access Control) address from an existing flexible IP.
|
|
204
|
-
*
|
|
205
|
-
* @param request - The request {@link DeleteMACAddrRequest}
|
|
206
|
-
*/
|
|
207
|
-
deleteMACAddr = (request) => this.client.fetch(
|
|
208
|
-
{
|
|
209
|
-
method: "DELETE",
|
|
210
|
-
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac`
|
|
211
|
-
}
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
export {
|
|
215
|
-
API
|
|
2
|
+
import { marshalAttachFlexibleIPRequest, marshalCreateFlexibleIPRequest, marshalDetachFlexibleIPRequest, marshalDuplicateMACAddrRequest, marshalGenerateMACAddrRequest, marshalMoveMACAddrRequest, marshalUpdateFlexibleIPRequest, unmarshalAttachFlexibleIPsResponse, unmarshalDetachFlexibleIPsResponse, unmarshalFlexibleIP, unmarshalListFlexibleIPsResponse } from "./marshalling.gen.js";
|
|
3
|
+
import { API, enrichForPagination, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
|
+
/**
|
|
6
|
+
* Elastic Metal - Flexible IP API.
|
|
7
|
+
|
|
8
|
+
This API allows you to manage your Elastic Metal servers' flexible public IP addresses.
|
|
9
|
+
*/
|
|
10
|
+
var API$1 = class extends API {
|
|
11
|
+
/**
|
|
12
|
+
* Locality of this API.
|
|
13
|
+
* type ∈ {'zone','region','global','unspecified'}
|
|
14
|
+
*/
|
|
15
|
+
static LOCALITY = toApiLocality({ zones: [
|
|
16
|
+
"fr-par-1",
|
|
17
|
+
"fr-par-2",
|
|
18
|
+
"nl-ams-1",
|
|
19
|
+
"nl-ams-2",
|
|
20
|
+
"pl-waw-2",
|
|
21
|
+
"pl-waw-3"
|
|
22
|
+
] });
|
|
23
|
+
/**
|
|
24
|
+
* Create a new flexible IP. Generate a new flexible IP within a given zone, specifying its configuration including Project ID and description.
|
|
25
|
+
*
|
|
26
|
+
* @param request - The request {@link CreateFlexibleIPRequest}
|
|
27
|
+
* @returns A Promise of FlexibleIP
|
|
28
|
+
*/
|
|
29
|
+
createFlexibleIP = (request) => this.client.fetch({
|
|
30
|
+
body: JSON.stringify(marshalCreateFlexibleIPRequest(request, this.client.settings)),
|
|
31
|
+
headers: jsonContentHeaders,
|
|
32
|
+
method: "POST",
|
|
33
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips`
|
|
34
|
+
}, unmarshalFlexibleIP);
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing flexible IP. Retrieve information about an existing flexible IP, specified by its ID and zone. Its full details, including Project ID, description and status, are returned in the response object.
|
|
37
|
+
*
|
|
38
|
+
* @param request - The request {@link GetFlexibleIPRequest}
|
|
39
|
+
* @returns A Promise of FlexibleIP
|
|
40
|
+
*/
|
|
41
|
+
getFlexibleIP = (request) => this.client.fetch({
|
|
42
|
+
method: "GET",
|
|
43
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}`
|
|
44
|
+
}, unmarshalFlexibleIP);
|
|
45
|
+
/**
|
|
46
|
+
* Waits for {@link FlexibleIP} to be in a final state.
|
|
47
|
+
*
|
|
48
|
+
* @param request - The request {@link GetFlexibleIPRequest}
|
|
49
|
+
* @param options - The waiting options
|
|
50
|
+
* @returns A Promise of FlexibleIP
|
|
51
|
+
*/
|
|
52
|
+
waitForFlexibleIP = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!FLEXIBLE_IP_TRANSIENT_STATUSES.includes(res.status))), this.getFlexibleIP, request, options);
|
|
53
|
+
pageOfListFlexibleIPs = (request = {}) => this.client.fetch({
|
|
54
|
+
method: "GET",
|
|
55
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips`,
|
|
56
|
+
urlParams: urlParams(["order_by", request.orderBy], ["organization_id", request.organizationId], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId], ["server_ids", request.serverIds], ["status", request.status], ["tags", request.tags])
|
|
57
|
+
}, unmarshalListFlexibleIPsResponse);
|
|
58
|
+
/**
|
|
59
|
+
* List flexible IPs. List all flexible IPs within a given zone.
|
|
60
|
+
*
|
|
61
|
+
* @param request - The request {@link ListFlexibleIPsRequest}
|
|
62
|
+
* @returns A Promise of ListFlexibleIPsResponse
|
|
63
|
+
*/
|
|
64
|
+
listFlexibleIPs = (request = {}) => enrichForPagination("flexibleIps", this.pageOfListFlexibleIPs, request);
|
|
65
|
+
/**
|
|
66
|
+
* Update an existing flexible IP. Update the parameters of an existing flexible IP, specified by its ID and zone. These parameters include tags and description.
|
|
67
|
+
*
|
|
68
|
+
* @param request - The request {@link UpdateFlexibleIPRequest}
|
|
69
|
+
* @returns A Promise of FlexibleIP
|
|
70
|
+
*/
|
|
71
|
+
updateFlexibleIP = (request) => this.client.fetch({
|
|
72
|
+
body: JSON.stringify(marshalUpdateFlexibleIPRequest(request, this.client.settings)),
|
|
73
|
+
headers: jsonContentHeaders,
|
|
74
|
+
method: "PATCH",
|
|
75
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}`
|
|
76
|
+
}, unmarshalFlexibleIP);
|
|
77
|
+
/**
|
|
78
|
+
* Delete an existing flexible IP. Delete an existing flexible IP, specified by its ID and zone. Note that deleting a flexible IP is permanent and cannot be undone.
|
|
79
|
+
*
|
|
80
|
+
* @param request - The request {@link DeleteFlexibleIPRequest}
|
|
81
|
+
*/
|
|
82
|
+
deleteFlexibleIP = (request) => this.client.fetch({
|
|
83
|
+
method: "DELETE",
|
|
84
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}`
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* Attach an existing flexible IP to a server. Attach an existing flexible IP to a specified Elastic Metal server.
|
|
88
|
+
*
|
|
89
|
+
* @param request - The request {@link AttachFlexibleIPRequest}
|
|
90
|
+
* @returns A Promise of AttachFlexibleIPsResponse
|
|
91
|
+
*/
|
|
92
|
+
attachFlexibleIP = (request) => this.client.fetch({
|
|
93
|
+
body: JSON.stringify(marshalAttachFlexibleIPRequest(request, this.client.settings)),
|
|
94
|
+
headers: jsonContentHeaders,
|
|
95
|
+
method: "POST",
|
|
96
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/attach`
|
|
97
|
+
}, unmarshalAttachFlexibleIPsResponse);
|
|
98
|
+
/**
|
|
99
|
+
* Detach an existing flexible IP from a server. Detach an existing flexible IP from a specified Elastic Metal server.
|
|
100
|
+
*
|
|
101
|
+
* @param request - The request {@link DetachFlexibleIPRequest}
|
|
102
|
+
* @returns A Promise of DetachFlexibleIPsResponse
|
|
103
|
+
*/
|
|
104
|
+
detachFlexibleIP = (request) => this.client.fetch({
|
|
105
|
+
body: JSON.stringify(marshalDetachFlexibleIPRequest(request, this.client.settings)),
|
|
106
|
+
headers: jsonContentHeaders,
|
|
107
|
+
method: "POST",
|
|
108
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/detach`
|
|
109
|
+
}, unmarshalDetachFlexibleIPsResponse);
|
|
110
|
+
/**
|
|
111
|
+
* Generate a virtual MAC address on an existing flexible IP. Generate a virtual MAC (Media Access Control) address on an existing flexible IP.
|
|
112
|
+
*
|
|
113
|
+
* @param request - The request {@link GenerateMACAddrRequest}
|
|
114
|
+
* @returns A Promise of FlexibleIP
|
|
115
|
+
*/
|
|
116
|
+
generateMACAddr = (request) => this.client.fetch({
|
|
117
|
+
body: JSON.stringify(marshalGenerateMACAddrRequest(request, this.client.settings)),
|
|
118
|
+
headers: jsonContentHeaders,
|
|
119
|
+
method: "POST",
|
|
120
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac`
|
|
121
|
+
}, unmarshalFlexibleIP);
|
|
122
|
+
/**
|
|
123
|
+
* Duplicate a virtual MAC address to another flexible IP. Duplicate a virtual MAC address from a given flexible IP to another flexible IP attached to the same server.
|
|
124
|
+
*
|
|
125
|
+
* @param request - The request {@link DuplicateMACAddrRequest}
|
|
126
|
+
* @returns A Promise of FlexibleIP
|
|
127
|
+
*/
|
|
128
|
+
duplicateMACAddr = (request) => this.client.fetch({
|
|
129
|
+
body: JSON.stringify(marshalDuplicateMACAddrRequest(request, this.client.settings)),
|
|
130
|
+
headers: jsonContentHeaders,
|
|
131
|
+
method: "POST",
|
|
132
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac/duplicate`
|
|
133
|
+
}, unmarshalFlexibleIP);
|
|
134
|
+
/**
|
|
135
|
+
* Relocate an existing virtual MAC address to a different flexible IP. Relocate a virtual MAC (Media Access Control) address from an existing flexible IP to a different flexible IP.
|
|
136
|
+
*
|
|
137
|
+
* @param request - The request {@link MoveMACAddrRequest}
|
|
138
|
+
* @returns A Promise of FlexibleIP
|
|
139
|
+
*/
|
|
140
|
+
moveMACAddr = (request) => this.client.fetch({
|
|
141
|
+
body: JSON.stringify(marshalMoveMACAddrRequest(request, this.client.settings)),
|
|
142
|
+
headers: jsonContentHeaders,
|
|
143
|
+
method: "POST",
|
|
144
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac/move`
|
|
145
|
+
}, unmarshalFlexibleIP);
|
|
146
|
+
/**
|
|
147
|
+
* Detach a given virtual MAC address from an existing flexible IP. Detach a given MAC (Media Access Control) address from an existing flexible IP.
|
|
148
|
+
*
|
|
149
|
+
* @param request - The request {@link DeleteMACAddrRequest}
|
|
150
|
+
*/
|
|
151
|
+
deleteMACAddr = (request) => this.client.fetch({
|
|
152
|
+
method: "DELETE",
|
|
153
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac`
|
|
154
|
+
});
|
|
216
155
|
};
|
|
156
|
+
export { API$1 as API };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
];
|
|
5
|
-
|
|
6
|
-
"updating",
|
|
7
|
-
"deleting"
|
|
8
|
-
];
|
|
9
|
-
export {
|
|
10
|
-
FLEXIBLE_IP_TRANSIENT_STATUSES,
|
|
11
|
-
MAC_ADDRESS_TRANSIENT_STATUSES
|
|
12
|
-
};
|
|
1
|
+
/** Lists transient statutes of the enum {@link FlexibleIPStatus}. */
|
|
2
|
+
const FLEXIBLE_IP_TRANSIENT_STATUSES = ["updating", "detaching"];
|
|
3
|
+
/** Lists transient statutes of the enum {@link MACAddressStatus}. */
|
|
4
|
+
const MAC_ADDRESS_TRANSIENT_STATUSES = ["updating", "deleting"];
|
|
5
|
+
export { FLEXIBLE_IP_TRANSIENT_STATUSES, MAC_ADDRESS_TRANSIENT_STATUSES };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { FLEXIBLE_IP_TRANSIENT_STATUSES, MAC_ADDRESS_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
3
|
import { marshalAttachFlexibleIPRequest, marshalCreateFlexibleIPRequest, marshalDetachFlexibleIPRequest, marshalDuplicateMACAddrRequest, marshalGenerateMACAddrRequest, marshalMoveMACAddrRequest, marshalUpdateFlexibleIPRequest, unmarshalAttachFlexibleIPsResponse, unmarshalDetachFlexibleIPsResponse, unmarshalFlexibleIP, unmarshalListFlexibleIPsResponse } from "./marshalling.gen.js";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
4
|
+
import { API } from "./api.gen.js";
|
|
5
|
+
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
+
API: () => API,
|
|
8
|
+
FLEXIBLE_IP_TRANSIENT_STATUSES: () => FLEXIBLE_IP_TRANSIENT_STATUSES,
|
|
9
|
+
MAC_ADDRESS_TRANSIENT_STATUSES: () => MAC_ADDRESS_TRANSIENT_STATUSES,
|
|
10
|
+
ValidationRules: () => validation_rules_gen_exports,
|
|
11
|
+
marshalAttachFlexibleIPRequest: () => marshalAttachFlexibleIPRequest,
|
|
12
|
+
marshalCreateFlexibleIPRequest: () => marshalCreateFlexibleIPRequest,
|
|
13
|
+
marshalDetachFlexibleIPRequest: () => marshalDetachFlexibleIPRequest,
|
|
14
|
+
marshalDuplicateMACAddrRequest: () => marshalDuplicateMACAddrRequest,
|
|
15
|
+
marshalGenerateMACAddrRequest: () => marshalGenerateMACAddrRequest,
|
|
16
|
+
marshalMoveMACAddrRequest: () => marshalMoveMACAddrRequest,
|
|
17
|
+
marshalUpdateFlexibleIPRequest: () => marshalUpdateFlexibleIPRequest,
|
|
18
|
+
unmarshalAttachFlexibleIPsResponse: () => unmarshalAttachFlexibleIPsResponse,
|
|
19
|
+
unmarshalDetachFlexibleIPsResponse: () => unmarshalDetachFlexibleIPsResponse,
|
|
20
|
+
unmarshalFlexibleIP: () => unmarshalFlexibleIP,
|
|
21
|
+
unmarshalListFlexibleIPsResponse: () => unmarshalListFlexibleIPsResponse
|
|
22
|
+
});
|
|
23
|
+
export { index_gen_exports };
|
|
@@ -1,114 +1,74 @@
|
|
|
1
|
-
import { isJSONObject,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
status: data.status,
|
|
14
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
15
|
-
zone: data.zone
|
|
16
|
-
};
|
|
1
|
+
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
|
|
2
|
+
var unmarshalMACAddress = (data) => {
|
|
3
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'MACAddress' failed as data isn't a dictionary.`);
|
|
4
|
+
return {
|
|
5
|
+
createdAt: unmarshalDate(data.created_at),
|
|
6
|
+
id: data.id,
|
|
7
|
+
macAddress: data.mac_address,
|
|
8
|
+
macType: data.mac_type,
|
|
9
|
+
status: data.status,
|
|
10
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
11
|
+
zone: data.zone
|
|
12
|
+
};
|
|
17
13
|
};
|
|
18
14
|
const unmarshalFlexibleIP = (data) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
tags: data.tags,
|
|
36
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
37
|
-
zone: data.zone
|
|
38
|
-
};
|
|
15
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'FlexibleIP' failed as data isn't a dictionary.`);
|
|
16
|
+
return {
|
|
17
|
+
createdAt: unmarshalDate(data.created_at),
|
|
18
|
+
description: data.description,
|
|
19
|
+
id: data.id,
|
|
20
|
+
ipAddress: data.ip_address,
|
|
21
|
+
macAddress: data.mac_address ? unmarshalMACAddress(data.mac_address) : void 0,
|
|
22
|
+
organizationId: data.organization_id,
|
|
23
|
+
projectId: data.project_id,
|
|
24
|
+
reverse: data.reverse,
|
|
25
|
+
serverId: data.server_id,
|
|
26
|
+
status: data.status,
|
|
27
|
+
tags: data.tags,
|
|
28
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
29
|
+
zone: data.zone
|
|
30
|
+
};
|
|
39
31
|
};
|
|
40
32
|
const unmarshalAttachFlexibleIPsResponse = (data) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
48
|
-
totalCount: data.total_count
|
|
49
|
-
};
|
|
33
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'AttachFlexibleIPsResponse' failed as data isn't a dictionary.`);
|
|
34
|
+
return {
|
|
35
|
+
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
36
|
+
totalCount: data.total_count
|
|
37
|
+
};
|
|
50
38
|
};
|
|
51
39
|
const unmarshalDetachFlexibleIPsResponse = (data) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
59
|
-
totalCount: data.total_count
|
|
60
|
-
};
|
|
40
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DetachFlexibleIPsResponse' failed as data isn't a dictionary.`);
|
|
41
|
+
return {
|
|
42
|
+
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
43
|
+
totalCount: data.total_count
|
|
44
|
+
};
|
|
61
45
|
};
|
|
62
46
|
const unmarshalListFlexibleIPsResponse = (data) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
70
|
-
totalCount: data.total_count
|
|
71
|
-
};
|
|
47
|
+
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFlexibleIPsResponse' failed as data isn't a dictionary.`);
|
|
48
|
+
return {
|
|
49
|
+
flexibleIps: unmarshalArrayOfObject(data.flexible_ips, unmarshalFlexibleIP),
|
|
50
|
+
totalCount: data.total_count
|
|
51
|
+
};
|
|
72
52
|
};
|
|
73
53
|
const marshalAttachFlexibleIPRequest = (request, defaults) => ({
|
|
74
|
-
|
|
75
|
-
|
|
54
|
+
fips_ids: request.fipsIds,
|
|
55
|
+
server_id: request.serverId
|
|
76
56
|
});
|
|
77
57
|
const marshalCreateFlexibleIPRequest = (request, defaults) => ({
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
const marshalDetachFlexibleIPRequest = (request, defaults) => ({
|
|
86
|
-
fips_ids: request.fipsIds
|
|
87
|
-
});
|
|
88
|
-
const marshalDuplicateMACAddrRequest = (request, defaults) => ({
|
|
89
|
-
duplicate_from_fip_id: request.duplicateFromFipId
|
|
90
|
-
});
|
|
91
|
-
const marshalGenerateMACAddrRequest = (request, defaults) => ({
|
|
92
|
-
mac_type: request.macType
|
|
93
|
-
});
|
|
94
|
-
const marshalMoveMACAddrRequest = (request, defaults) => ({
|
|
95
|
-
dst_fip_id: request.dstFipId
|
|
58
|
+
description: request.description,
|
|
59
|
+
is_ipv6: request.isIpv6,
|
|
60
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
61
|
+
reverse: request.reverse,
|
|
62
|
+
server_id: request.serverId,
|
|
63
|
+
tags: request.tags
|
|
96
64
|
});
|
|
65
|
+
const marshalDetachFlexibleIPRequest = (request, defaults) => ({ fips_ids: request.fipsIds });
|
|
66
|
+
const marshalDuplicateMACAddrRequest = (request, defaults) => ({ duplicate_from_fip_id: request.duplicateFromFipId });
|
|
67
|
+
const marshalGenerateMACAddrRequest = (request, defaults) => ({ mac_type: request.macType });
|
|
68
|
+
const marshalMoveMACAddrRequest = (request, defaults) => ({ dst_fip_id: request.dstFipId });
|
|
97
69
|
const marshalUpdateFlexibleIPRequest = (request, defaults) => ({
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
70
|
+
description: request.description,
|
|
71
|
+
reverse: request.reverse,
|
|
72
|
+
tags: request.tags
|
|
101
73
|
});
|
|
102
|
-
export {
|
|
103
|
-
marshalAttachFlexibleIPRequest,
|
|
104
|
-
marshalCreateFlexibleIPRequest,
|
|
105
|
-
marshalDetachFlexibleIPRequest,
|
|
106
|
-
marshalDuplicateMACAddrRequest,
|
|
107
|
-
marshalGenerateMACAddrRequest,
|
|
108
|
-
marshalMoveMACAddrRequest,
|
|
109
|
-
marshalUpdateFlexibleIPRequest,
|
|
110
|
-
unmarshalAttachFlexibleIPsResponse,
|
|
111
|
-
unmarshalDetachFlexibleIPsResponse,
|
|
112
|
-
unmarshalFlexibleIP,
|
|
113
|
-
unmarshalListFlexibleIPsResponse
|
|
114
|
-
};
|
|
74
|
+
export { marshalAttachFlexibleIPRequest, marshalCreateFlexibleIPRequest, marshalDetachFlexibleIPRequest, marshalDuplicateMACAddrRequest, marshalGenerateMACAddrRequest, marshalMoveMACAddrRequest, marshalUpdateFlexibleIPRequest, unmarshalAttachFlexibleIPsResponse, unmarshalDetachFlexibleIPsResponse, unmarshalFlexibleIP, unmarshalListFlexibleIPsResponse };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({ ListFlexibleIPsRequest: () => ListFlexibleIPsRequest });
|
|
1
3
|
const ListFlexibleIPsRequest = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
lessThanOrEqual: 100
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
ListFlexibleIPsRequest
|
|
4
|
+
page: { greaterThan: 0 },
|
|
5
|
+
pageSize: {
|
|
6
|
+
greaterThan: 0,
|
|
7
|
+
lessThanOrEqual: 100
|
|
8
|
+
}
|
|
12
9
|
};
|
|
10
|
+
export { validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-flexibleip",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Scaleway SDK flexibleip",
|
|
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",
|