@scaleway/sdk-flexibleip 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 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
@@ -1,4 +1,2 @@
1
- import * as index_gen from "./v1alpha1/index.gen.js";
2
- export {
3
- index_gen as Flexibleipv1alpha1
4
- };
1
+ import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
+ export { index_gen_exports as Flexibleipv1alpha1 };
@@ -1,217 +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, unmarshalFlexibleIP, unmarshalListFlexibleIPsResponse, marshalUpdateFlexibleIPRequest, marshalAttachFlexibleIPRequest, unmarshalAttachFlexibleIPsResponse, marshalDetachFlexibleIPRequest, unmarshalDetachFlexibleIPsResponse, marshalGenerateMACAddrRequest, marshalDuplicateMACAddrRequest, marshalMoveMACAddrRequest } from "./marshalling.gen.js";
4
- const jsonContentHeaders = {
5
- "Content-Type": "application/json; charset=utf-8"
6
- };
7
- class API extends API$1 {
8
- /**
9
- * Locality of this API.
10
- * type ∈ {'zone','region','global','unspecified'}
11
- */
12
- static LOCALITY = toApiLocality({
13
- zones: [
14
- "fr-par-1",
15
- "fr-par-2",
16
- "nl-ams-1",
17
- "nl-ams-2",
18
- "pl-waw-2",
19
- "pl-waw-3"
20
- ]
21
- });
22
- /**
23
- * Create a new flexible IP. Generate a new flexible IP within a given zone, specifying its configuration including Project ID and description.
24
- *
25
- * @param request - The request {@link CreateFlexibleIPRequest}
26
- * @returns A Promise of FlexibleIP
27
- */
28
- createFlexibleIP = (request) => this.client.fetch(
29
- {
30
- body: JSON.stringify(
31
- marshalCreateFlexibleIPRequest(request, this.client.settings)
32
- ),
33
- headers: jsonContentHeaders,
34
- method: "POST",
35
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips`
36
- },
37
- unmarshalFlexibleIP
38
- );
39
- /**
40
- * 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.
41
- *
42
- * @param request - The request {@link GetFlexibleIPRequest}
43
- * @returns A Promise of FlexibleIP
44
- */
45
- getFlexibleIP = (request) => this.client.fetch(
46
- {
47
- method: "GET",
48
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}`
49
- },
50
- unmarshalFlexibleIP
51
- );
52
- /**
53
- * Waits for {@link FlexibleIP} to be in a final state.
54
- *
55
- * @param request - The request {@link GetFlexibleIPRequest}
56
- * @param options - The waiting options
57
- * @returns A Promise of FlexibleIP
58
- */
59
- waitForFlexibleIP = (request, options) => waitForResource(
60
- options?.stop ?? ((res) => Promise.resolve(
61
- !FLEXIBLE_IP_TRANSIENT_STATUSES.includes(res.status)
62
- )),
63
- this.getFlexibleIP,
64
- request,
65
- options
66
- );
67
- pageOfListFlexibleIPs = (request = {}) => this.client.fetch(
68
- {
69
- method: "GET",
70
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips`,
71
- urlParams: urlParams(
72
- ["order_by", request.orderBy],
73
- ["organization_id", request.organizationId],
74
- ["page", request.page],
75
- [
76
- "page_size",
77
- request.pageSize ?? this.client.settings.defaultPageSize
78
- ],
79
- ["project_id", request.projectId],
80
- ["server_ids", request.serverIds],
81
- ["status", request.status],
82
- ["tags", request.tags]
83
- )
84
- },
85
- unmarshalListFlexibleIPsResponse
86
- );
87
- /**
88
- * List flexible IPs. List all flexible IPs within a given zone.
89
- *
90
- * @param request - The request {@link ListFlexibleIPsRequest}
91
- * @returns A Promise of ListFlexibleIPsResponse
92
- */
93
- listFlexibleIPs = (request = {}) => enrichForPagination("flexibleIps", this.pageOfListFlexibleIPs, request);
94
- /**
95
- * 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.
96
- *
97
- * @param request - The request {@link UpdateFlexibleIPRequest}
98
- * @returns A Promise of FlexibleIP
99
- */
100
- updateFlexibleIP = (request) => this.client.fetch(
101
- {
102
- body: JSON.stringify(
103
- marshalUpdateFlexibleIPRequest(request, this.client.settings)
104
- ),
105
- headers: jsonContentHeaders,
106
- method: "PATCH",
107
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}`
108
- },
109
- unmarshalFlexibleIP
110
- );
111
- /**
112
- * 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.
113
- *
114
- * @param request - The request {@link DeleteFlexibleIPRequest}
115
- */
116
- deleteFlexibleIP = (request) => this.client.fetch({
117
- method: "DELETE",
118
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}`
119
- });
120
- /**
121
- * Attach an existing flexible IP to a server. Attach an existing flexible IP to a specified Elastic Metal server.
122
- *
123
- * @param request - The request {@link AttachFlexibleIPRequest}
124
- * @returns A Promise of AttachFlexibleIPsResponse
125
- */
126
- attachFlexibleIP = (request) => this.client.fetch(
127
- {
128
- body: JSON.stringify(
129
- marshalAttachFlexibleIPRequest(request, this.client.settings)
130
- ),
131
- headers: jsonContentHeaders,
132
- method: "POST",
133
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/attach`
134
- },
135
- unmarshalAttachFlexibleIPsResponse
136
- );
137
- /**
138
- * Detach an existing flexible IP from a server. Detach an existing flexible IP from a specified Elastic Metal server.
139
- *
140
- * @param request - The request {@link DetachFlexibleIPRequest}
141
- * @returns A Promise of DetachFlexibleIPsResponse
142
- */
143
- detachFlexibleIP = (request) => this.client.fetch(
144
- {
145
- body: JSON.stringify(
146
- marshalDetachFlexibleIPRequest(request, this.client.settings)
147
- ),
148
- headers: jsonContentHeaders,
149
- method: "POST",
150
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/detach`
151
- },
152
- unmarshalDetachFlexibleIPsResponse
153
- );
154
- /**
155
- * Generate a virtual MAC address on an existing flexible IP. Generate a virtual MAC (Media Access Control) address on an existing flexible IP.
156
- *
157
- * @param request - The request {@link GenerateMACAddrRequest}
158
- * @returns A Promise of FlexibleIP
159
- */
160
- generateMACAddr = (request) => this.client.fetch(
161
- {
162
- body: JSON.stringify(
163
- marshalGenerateMACAddrRequest(request, this.client.settings)
164
- ),
165
- headers: jsonContentHeaders,
166
- method: "POST",
167
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac`
168
- },
169
- unmarshalFlexibleIP
170
- );
171
- /**
172
- * 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.
173
- *
174
- * @param request - The request {@link DuplicateMACAddrRequest}
175
- * @returns A Promise of FlexibleIP
176
- */
177
- duplicateMACAddr = (request) => this.client.fetch(
178
- {
179
- body: JSON.stringify(
180
- marshalDuplicateMACAddrRequest(request, this.client.settings)
181
- ),
182
- headers: jsonContentHeaders,
183
- method: "POST",
184
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac/duplicate`
185
- },
186
- unmarshalFlexibleIP
187
- );
188
- /**
189
- * 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.
190
- *
191
- * @param request - The request {@link MoveMACAddrRequest}
192
- * @returns A Promise of FlexibleIP
193
- */
194
- moveMACAddr = (request) => this.client.fetch(
195
- {
196
- body: JSON.stringify(
197
- marshalMoveMACAddrRequest(request, this.client.settings)
198
- ),
199
- headers: jsonContentHeaders,
200
- method: "POST",
201
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac/move`
202
- },
203
- unmarshalFlexibleIP
204
- );
205
- /**
206
- * Detach a given virtual MAC address from an existing flexible IP. Detach a given MAC (Media Access Control) address from an existing flexible IP.
207
- *
208
- * @param request - The request {@link DeleteMACAddrRequest}
209
- */
210
- deleteMACAddr = (request) => this.client.fetch({
211
- method: "DELETE",
212
- path: `/flexible-ip/v1alpha1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/fips/${validatePathParam("fipId", request.fipId)}/mac`
213
- });
214
- }
215
- export {
216
- 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
+ });
217
155
  };
156
+ export { API$1 as API };
@@ -1,12 +1,5 @@
1
- const FLEXIBLE_IP_TRANSIENT_STATUSES = [
2
- "updating",
3
- "detaching"
4
- ];
5
- const MAC_ADDRESS_TRANSIENT_STATUSES = [
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,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 { AttachFlexibleIPRequest, AttachFlexibleIPsResponse, CreateFlexibleIPRequest, DeleteFlexibleIPRequest, DeleteMACAddrRequest, DetachFlexibleIPRequest, DetachFlexibleIPsResponse, DuplicateMACAddrRequest, FlexibleIP, FlexibleIPStatus, GenerateMACAddrRequest, GetFlexibleIPRequest, ListFlexibleIPsRequest, ListFlexibleIPsRequestOrderBy, ListFlexibleIPsResponse, MACAddress, MACAddressStatus, MACAddressType, MoveMACAddrRequest, UpdateFlexibleIPRequest, } from './types.gen.js';
@@ -1,21 +1,23 @@
1
- import { API } from "./api.gen.js";
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 * as validationRules_gen from "./validation-rules.gen.js";
5
- export {
6
- API,
7
- FLEXIBLE_IP_TRANSIENT_STATUSES,
8
- MAC_ADDRESS_TRANSIENT_STATUSES,
9
- validationRules_gen as ValidationRules,
10
- marshalAttachFlexibleIPRequest,
11
- marshalCreateFlexibleIPRequest,
12
- marshalDetachFlexibleIPRequest,
13
- marshalDuplicateMACAddrRequest,
14
- marshalGenerateMACAddrRequest,
15
- marshalMoveMACAddrRequest,
16
- marshalUpdateFlexibleIPRequest,
17
- unmarshalAttachFlexibleIPsResponse,
18
- unmarshalDetachFlexibleIPsResponse,
19
- unmarshalFlexibleIP,
20
- unmarshalListFlexibleIPsResponse
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, unmarshalDate, unmarshalArrayOfObject } from "@scaleway/sdk-client";
2
- const unmarshalMACAddress = (data) => {
3
- if (!isJSONObject(data)) {
4
- throw new TypeError(
5
- `Unmarshalling the type 'MACAddress' failed as data isn't a dictionary.`
6
- );
7
- }
8
- return {
9
- createdAt: unmarshalDate(data.created_at),
10
- id: data.id,
11
- macAddress: data.mac_address,
12
- macType: data.mac_type,
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
- if (!isJSONObject(data)) {
20
- throw new TypeError(
21
- `Unmarshalling the type 'FlexibleIP' failed as data isn't a dictionary.`
22
- );
23
- }
24
- return {
25
- createdAt: unmarshalDate(data.created_at),
26
- description: data.description,
27
- id: data.id,
28
- ipAddress: data.ip_address,
29
- macAddress: data.mac_address ? unmarshalMACAddress(data.mac_address) : void 0,
30
- organizationId: data.organization_id,
31
- projectId: data.project_id,
32
- reverse: data.reverse,
33
- serverId: data.server_id,
34
- status: data.status,
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
- if (!isJSONObject(data)) {
42
- throw new TypeError(
43
- `Unmarshalling the type 'AttachFlexibleIPsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
53
- throw new TypeError(
54
- `Unmarshalling the type 'DetachFlexibleIPsResponse' failed as data isn't a dictionary.`
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
- if (!isJSONObject(data)) {
64
- throw new TypeError(
65
- `Unmarshalling the type 'ListFlexibleIPsResponse' failed as data isn't a dictionary.`
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
- fips_ids: request.fipsIds,
75
- server_id: request.serverId
54
+ fips_ids: request.fipsIds,
55
+ server_id: request.serverId
76
56
  });
77
57
  const marshalCreateFlexibleIPRequest = (request, defaults) => ({
78
- description: request.description,
79
- is_ipv6: request.isIpv6,
80
- project_id: request.projectId ?? defaults.defaultProjectId,
81
- reverse: request.reverse,
82
- server_id: request.serverId,
83
- tags: request.tags
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
- description: request.description,
99
- reverse: request.reverse,
100
- tags: request.tags
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
- page: {
3
- greaterThan: 0
4
- },
5
- pageSize: {
6
- greaterThan: 0,
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.2.0",
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.1.0"
30
+ "@scaleway/sdk-std": "2.2.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.1.0"
33
+ "@scaleway/sdk-client": "^2.2.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.1.0"
36
+ "@scaleway/sdk-client": "^2.2.0"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",