@scaleway/sdk-ipam 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,11 @@ class API extends API$1 {
9
9
  * type ∈ {'zone','region','global','unspecified'}
10
10
  */
11
11
  static LOCALITY = toApiLocality({
12
- regions: ["fr-par", "nl-ams", "pl-waw"]
12
+ regions: [
13
+ "fr-par",
14
+ "nl-ams",
15
+ "pl-waw"
16
+ ]
13
17
  });
14
18
  /**
15
19
  * Reserve a new IP. Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network.
@@ -33,20 +37,24 @@ class API extends API$1 {
33
37
  *
34
38
  * @param request - The request {@link ReleaseIPRequest}
35
39
  */
36
- releaseIP = (request) => this.client.fetch({
37
- body: "{}",
38
- headers: jsonContentHeaders,
39
- method: "DELETE",
40
- path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
41
- });
42
- releaseIPSet = (request = {}) => this.client.fetch({
43
- body: JSON.stringify(
44
- marshalReleaseIPSetRequest(request, this.client.settings)
45
- ),
46
- headers: jsonContentHeaders,
47
- method: "POST",
48
- path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ip-sets/release`
49
- });
40
+ releaseIP = (request) => this.client.fetch(
41
+ {
42
+ body: "{}",
43
+ headers: jsonContentHeaders,
44
+ method: "DELETE",
45
+ path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ips/${validatePathParam("ipId", request.ipId)}`
46
+ }
47
+ );
48
+ releaseIPSet = (request = {}) => this.client.fetch(
49
+ {
50
+ body: JSON.stringify(
51
+ marshalReleaseIPSetRequest(request, this.client.settings)
52
+ ),
53
+ headers: jsonContentHeaders,
54
+ method: "POST",
55
+ path: `/ipam/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/ip-sets/release`
56
+ }
57
+ );
50
58
  /**
51
59
  * Get an IP. Retrieve details of an existing IP, specified by its IP ID.
52
60
  *
@@ -89,10 +97,7 @@ class API extends API$1 {
89
97
  ["order_by", request.orderBy],
90
98
  ["organization_id", request.organizationId],
91
99
  ["page", request.page],
92
- [
93
- "page_size",
94
- request.pageSize ?? this.client.settings.defaultPageSize
95
- ],
100
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
96
101
  ["project_id", request.projectId],
97
102
  ["resource_id", request.resourceId],
98
103
  ["resource_ids", request.resourceIds],
@@ -101,14 +106,24 @@ class API extends API$1 {
101
106
  ["resource_types", request.resourceTypes],
102
107
  ["tags", request.tags],
103
108
  ["vpc_id", request.vpcId],
104
- ...Object.entries(
105
- resolveOneOf([
106
- { param: "zonal", value: request.zonal },
107
- { param: "private_network_id", value: request.privateNetworkId },
108
- { param: "subnet_id", value: request.subnetId },
109
- { param: "source_vpc_id", value: request.sourceVpcId }
110
- ])
111
- )
109
+ ...Object.entries(resolveOneOf([
110
+ {
111
+ param: "zonal",
112
+ value: request.zonal
113
+ },
114
+ {
115
+ param: "private_network_id",
116
+ value: request.privateNetworkId
117
+ },
118
+ {
119
+ param: "subnet_id",
120
+ value: request.subnetId
121
+ },
122
+ {
123
+ param: "source_vpc_id",
124
+ value: request.sourceVpcId
125
+ }
126
+ ]))
112
127
  )
113
128
  },
114
129
  unmarshalListIPsResponse
@@ -1,4 +1,4 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './marshalling.gen.js';
3
3
  export type { AttachIPRequest, BookIPRequest, CustomResource, DetachIPRequest, GetIPRequest, IP, ListIPsRequest, ListIPsRequestOrderBy, ListIPsResponse, MoveIPRequest, ReleaseIPRequest, ReleaseIPSetRequest, Resource, ResourceType, Reverse, Source, UpdateIPRequest, } from './types.gen.js';
4
4
  export * as ValidationRules from './validation-rules.gen.js';
@@ -77,10 +77,22 @@ const marshalAttachIPRequest = (request, defaults) => ({
77
77
  });
78
78
  const marshalSource = (request, defaults) => ({
79
79
  ...resolveOneOf([
80
- { param: "zonal", value: request.zonal },
81
- { param: "private_network_id", value: request.privateNetworkId },
82
- { param: "subnet_id", value: request.subnetId },
83
- { param: "vpc_id", value: request.vpcId }
80
+ {
81
+ param: "zonal",
82
+ value: request.zonal
83
+ },
84
+ {
85
+ param: "private_network_id",
86
+ value: request.privateNetworkId
87
+ },
88
+ {
89
+ param: "subnet_id",
90
+ value: request.subnetId
91
+ },
92
+ {
93
+ param: "vpc_id",
94
+ value: request.vpcId
95
+ }
84
96
  ])
85
97
  });
86
98
  const marshalBookIPRequest = (request, defaults) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-ipam",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Scaleway SDK ipam",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
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.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"