@scaleway/sdk-ipam 2.1.1 → 2.2.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.
@@ -9,11 +9,7 @@ class API extends API$1 {
9
9
  * type ∈ {'zone','region','global','unspecified'}
10
10
  */
11
11
  static LOCALITY = toApiLocality({
12
- regions: [
13
- "fr-par",
14
- "nl-ams",
15
- "pl-waw"
16
- ]
12
+ regions: ["fr-par", "nl-ams", "pl-waw"]
17
13
  });
18
14
  /**
19
15
  * Reserve a new IP. Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network.
@@ -37,24 +33,20 @@ class API extends API$1 {
37
33
  *
38
34
  * @param request - The request {@link ReleaseIPRequest}
39
35
  */
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
- );
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
+ });
58
50
  /**
59
51
  * Get an IP. Retrieve details of an existing IP, specified by its IP ID.
60
52
  *
@@ -97,7 +89,10 @@ class API extends API$1 {
97
89
  ["order_by", request.orderBy],
98
90
  ["organization_id", request.organizationId],
99
91
  ["page", request.page],
100
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
92
+ [
93
+ "page_size",
94
+ request.pageSize ?? this.client.settings.defaultPageSize
95
+ ],
101
96
  ["project_id", request.projectId],
102
97
  ["resource_id", request.resourceId],
103
98
  ["resource_ids", request.resourceIds],
@@ -106,24 +101,14 @@ class API extends API$1 {
106
101
  ["resource_types", request.resourceTypes],
107
102
  ["tags", request.tags],
108
103
  ["vpc_id", request.vpcId],
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
- ]))
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
+ )
127
112
  )
128
113
  },
129
114
  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,22 +77,10 @@ const marshalAttachIPRequest = (request, defaults) => ({
77
77
  });
78
78
  const marshalSource = (request, defaults) => ({
79
79
  ...resolveOneOf([
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
- }
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 }
96
84
  ])
97
85
  });
98
86
  const marshalBookIPRequest = (request, defaults) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-ipam",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Scaleway SDK ipam",
5
5
  "license": "Apache-2.0",
6
6
  "files": [