@scaleway/sdk-ipam 2.3.1 → 2.4.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.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -52,21 +52,21 @@ export declare class API extends ParentAPI {
52
52
  [Symbol.asyncIterator]: () => AsyncGenerator<IP[], void, void>;
53
53
  };
54
54
  /**
55
- * Attach IP to custom resource. Attach an existing reserved IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
55
+ * Attach private IP to custom resource. Attach an existing reserved private IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
56
56
  *
57
57
  * @param request - The request {@link AttachIPRequest}
58
58
  * @returns A Promise of IP
59
59
  */
60
60
  attachIP: (request: Readonly<AttachIPRequest>) => Promise<IP>;
61
61
  /**
62
- * Detach IP from a custom resource. Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for detaching IP addresses from standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
62
+ * Detach private IP from a custom resource. Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for detaching IP addresses from standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
63
63
  *
64
64
  * @param request - The request {@link DetachIPRequest}
65
65
  * @returns A Promise of IP
66
66
  */
67
67
  detachIP: (request: Readonly<DetachIPRequest>) => Promise<IP>;
68
68
  /**
69
- * Move IP to a custom resource. Move an existing reserved private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
69
+ * Move private IP to a custom resource. Move an existing reserved private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
70
70
  *
71
71
  * @param request - The request {@link MoveIPRequest}
72
72
  * @returns A Promise of IP
@@ -1,12 +1,13 @@
1
1
  import { marshalAttachIPRequest, marshalBookIPRequest, marshalDetachIPRequest, marshalMoveIPRequest, marshalReleaseIPSetRequest, marshalUpdateIPRequest, unmarshalIP, unmarshalListIPsResponse } from "./marshalling.gen.js";
2
- import { API, enrichForPagination, resolveOneOf, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
2
+ import { API as API$1, enrichForPagination, resolveOneOf, toApiLocality, urlParams, validatePathParam } from "@scaleway/sdk-client";
3
+ //#region src/v1/api.gen.ts
3
4
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
4
5
  /**
5
6
  * IPAM API.
6
7
 
7
8
  This API allows you to manage your Scaleway IP addresses with our IP Address Management tool.
8
9
  */
9
- var API$1 = class extends API {
10
+ var API = class extends API$1 {
10
11
  /**
11
12
  * Locality of this API.
12
13
  * type ∈ {'zone','region','global','unspecified'}
@@ -97,7 +98,7 @@ var API$1 = class extends API {
97
98
  */
98
99
  listIPs = (request = {}) => enrichForPagination("ips", this.pageOfListIPs, request);
99
100
  /**
100
- * Attach IP to custom resource. Attach an existing reserved IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
101
+ * Attach private IP to custom resource. Attach an existing reserved private IP from a Private Network subnet to a custom, named resource via its MAC address. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for attaching IP addresses to standard Scaleway resources as it will fail - see the relevant product API for an equivalent method.
101
102
  *
102
103
  * @param request - The request {@link AttachIPRequest}
103
104
  * @returns A Promise of IP
@@ -109,7 +110,7 @@ var API$1 = class extends API {
109
110
  path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}/attach`
110
111
  }, unmarshalIP);
111
112
  /**
112
- * Detach IP from a custom resource. Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for detaching IP addresses from standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
113
+ * Detach private IP from a custom resource. Detach a private IP from a custom resource. An example of a custom resource is a virtual machine hosted on an Elastic Metal server. Do not use this method for detaching IP addresses from standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
113
114
  *
114
115
  * @param request - The request {@link DetachIPRequest}
115
116
  * @returns A Promise of IP
@@ -121,7 +122,7 @@ var API$1 = class extends API {
121
122
  path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}/detach`
122
123
  }, unmarshalIP);
123
124
  /**
124
- * Move IP to a custom resource. Move an existing reserved private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
125
+ * Move private IP to a custom resource. Move an existing reserved private IP from one custom resource (e.g. a virtual machine hosted on an Elastic Metal server) to another custom resource. This will detach it from the first resource, and attach it to the second. Do not use this method for moving IP addresses between standard Scaleway resources (e.g. Instances, Load Balancers) as it will fail - see the relevant product API for an equivalent method.
125
126
  *
126
127
  * @param request - The request {@link MoveIPRequest}
127
128
  * @returns A Promise of IP
@@ -133,4 +134,5 @@ var API$1 = class extends API {
133
134
  path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}/move`
134
135
  }, unmarshalIP);
135
136
  };
136
- export { API$1 as API };
137
+ //#endregion
138
+ export { API };
@@ -2,6 +2,7 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  import { marshalAttachIPRequest, marshalBookIPRequest, marshalDetachIPRequest, marshalMoveIPRequest, marshalReleaseIPSetRequest, marshalUpdateIPRequest, unmarshalIP, unmarshalListIPsResponse } from "./marshalling.gen.js";
3
3
  import { API } from "./api.gen.js";
4
4
  import { validation_rules_gen_exports } from "./validation-rules.gen.js";
5
+ //#region src/v1/index.gen.ts
5
6
  var index_gen_exports = /* @__PURE__ */ __exportAll({
6
7
  API: () => API,
7
8
  ValidationRules: () => validation_rules_gen_exports,
@@ -14,4 +15,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
14
15
  unmarshalIP: () => unmarshalIP,
15
16
  unmarshalListIPsResponse: () => unmarshalListIPsResponse
16
17
  });
17
- export { index_gen_exports };
18
+ //#endregion
19
+ export { API, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalAttachIPRequest, marshalBookIPRequest, marshalDetachIPRequest, marshalMoveIPRequest, marshalReleaseIPSetRequest, marshalUpdateIPRequest, unmarshalIP, unmarshalListIPsResponse };
@@ -1,4 +1,5 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
+ //#region src/v1/marshalling.gen.ts
2
3
  var unmarshalResource = (data) => {
3
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`);
4
5
  return {
@@ -24,7 +25,7 @@ var unmarshalSource = (data) => {
24
25
  zonal: data.zonal
25
26
  };
26
27
  };
27
- const unmarshalIP = (data) => {
28
+ var unmarshalIP = (data) => {
28
29
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'IP' failed as data isn't a dictionary.`);
29
30
  return {
30
31
  address: data.address,
@@ -41,7 +42,7 @@ const unmarshalIP = (data) => {
41
42
  zone: data.zone
42
43
  };
43
44
  };
44
- const unmarshalListIPsResponse = (data) => {
45
+ var unmarshalListIPsResponse = (data) => {
45
46
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListIPsResponse' failed as data isn't a dictionary.`);
46
47
  return {
47
48
  ips: unmarshalArrayOfObject(data.ips, unmarshalIP),
@@ -52,7 +53,7 @@ var marshalCustomResource = (request, defaults) => ({
52
53
  mac_address: request.macAddress,
53
54
  name: request.name
54
55
  });
55
- const marshalAttachIPRequest = (request, defaults) => ({ resource: marshalCustomResource(request.resource, defaults) });
56
+ var marshalAttachIPRequest = (request, defaults) => ({ resource: marshalCustomResource(request.resource, defaults) });
56
57
  var marshalSource = (request, defaults) => ({ ...resolveOneOf([
57
58
  {
58
59
  param: "zonal",
@@ -71,7 +72,7 @@ var marshalSource = (request, defaults) => ({ ...resolveOneOf([
71
72
  value: request.vpcId
72
73
  }
73
74
  ]) });
74
- const marshalBookIPRequest = (request, defaults) => ({
75
+ var marshalBookIPRequest = (request, defaults) => ({
75
76
  address: request.address,
76
77
  is_ipv6: request.isIpv6,
77
78
  project_id: request.projectId ?? defaults.defaultProjectId,
@@ -79,18 +80,19 @@ const marshalBookIPRequest = (request, defaults) => ({
79
80
  source: marshalSource(request.source, defaults),
80
81
  tags: request.tags
81
82
  });
82
- const marshalDetachIPRequest = (request, defaults) => ({ resource: marshalCustomResource(request.resource, defaults) });
83
- const marshalMoveIPRequest = (request, defaults) => ({
83
+ var marshalDetachIPRequest = (request, defaults) => ({ resource: marshalCustomResource(request.resource, defaults) });
84
+ var marshalMoveIPRequest = (request, defaults) => ({
84
85
  from_resource: marshalCustomResource(request.fromResource, defaults),
85
86
  to_resource: request.toResource !== void 0 ? marshalCustomResource(request.toResource, defaults) : void 0
86
87
  });
87
- const marshalReleaseIPSetRequest = (request, defaults) => ({ ip_ids: request.ipIds });
88
+ var marshalReleaseIPSetRequest = (request, defaults) => ({ ip_ids: request.ipIds });
88
89
  var marshalReverse = (request, defaults) => ({
89
90
  address: request.address,
90
91
  hostname: request.hostname
91
92
  });
92
- const marshalUpdateIPRequest = (request, defaults) => ({
93
+ var marshalUpdateIPRequest = (request, defaults) => ({
93
94
  reverses: request.reverses !== void 0 ? request.reverses.map((elt) => marshalReverse(elt, defaults)) : void 0,
94
95
  tags: request.tags
95
96
  });
97
+ //#endregion
96
98
  export { marshalAttachIPRequest, marshalBookIPRequest, marshalDetachIPRequest, marshalMoveIPRequest, marshalReleaseIPSetRequest, marshalUpdateIPRequest, unmarshalIP, unmarshalListIPsResponse };
@@ -0,0 +1,30 @@
1
+ export declare const queriesMetadata: {
2
+ readonly namespace: "ipam";
3
+ readonly version: "v1";
4
+ readonly folderName: "ipamv1";
5
+ readonly services: readonly [{
6
+ readonly apiClass: "API";
7
+ readonly methods: readonly [{
8
+ readonly methodName: "getIP";
9
+ readonly protoName: "GetIP";
10
+ readonly paramsType: "GetIPRequest";
11
+ readonly returnType: "IP";
12
+ readonly isList: false;
13
+ readonly paginationType: "none";
14
+ readonly isPrivate: false;
15
+ readonly description: "\"";
16
+ }, {
17
+ readonly methodName: "listIPs";
18
+ readonly protoName: "ListIPs";
19
+ readonly paramsType: "ListIPsRequest";
20
+ readonly returnType: "ListIPsResponse";
21
+ readonly isList: true;
22
+ readonly paginationType: "offset";
23
+ readonly pageParamKey: "page";
24
+ readonly listItemType: "IP";
25
+ readonly isPrivate: false;
26
+ readonly description: "\"";
27
+ }];
28
+ }];
29
+ };
30
+ export type QueriesMetadata = typeof queriesMetadata;
@@ -0,0 +1,32 @@
1
+ //#region src/v1/metadata.gen.ts
2
+ var queriesMetadata = {
3
+ namespace: "ipam",
4
+ version: "v1",
5
+ folderName: "ipamv1",
6
+ services: [{
7
+ apiClass: "API",
8
+ methods: [{
9
+ methodName: "getIP",
10
+ protoName: "GetIP",
11
+ paramsType: "GetIPRequest",
12
+ returnType: "IP",
13
+ isList: false,
14
+ paginationType: "none",
15
+ isPrivate: false,
16
+ description: "\""
17
+ }, {
18
+ methodName: "listIPs",
19
+ protoName: "ListIPs",
20
+ paramsType: "ListIPsRequest",
21
+ returnType: "ListIPsResponse",
22
+ isList: true,
23
+ paginationType: "offset",
24
+ pageParamKey: "page",
25
+ listItemType: "IP",
26
+ isPrivate: false,
27
+ description: "\""
28
+ }]
29
+ }]
30
+ };
31
+ //#endregion
32
+ export { queriesMetadata };
File without changes
@@ -1,7 +1,9 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ //#region src/v1/validation-rules.gen.ts
2
3
  var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({ ListIPsRequest: () => ListIPsRequest });
3
- const ListIPsRequest = { resourceName: {
4
+ var ListIPsRequest = { resourceName: {
4
5
  maxLength: 63,
5
6
  minLength: 2
6
7
  } };
7
- export { validation_rules_gen_exports };
8
+ //#endregion
9
+ export { ListIPsRequest, validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-ipam",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Scaleway SDK ipam",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.19.6"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.1"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.1"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.1"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",