@scaleway/sdk-interlink 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.
@@ -10,11 +10,7 @@ class API extends API$1 {
10
10
  * type ∈ {'zone','region','global','unspecified'}
11
11
  */
12
12
  static LOCALITY = toApiLocality({
13
- regions: [
14
- "fr-par",
15
- "nl-ams",
16
- "pl-waw"
17
- ]
13
+ regions: ["fr-par", "nl-ams", "pl-waw"]
18
14
  });
19
15
  pageOfListDedicatedConnections = (request = {}) => this.client.fetch(
20
16
  {
@@ -26,7 +22,10 @@ class API extends API$1 {
26
22
  ["order_by", request.orderBy],
27
23
  ["organization_id", request.organizationId],
28
24
  ["page", request.page],
29
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
25
+ [
26
+ "page_size",
27
+ request.pageSize ?? this.client.settings.defaultPageSize
28
+ ],
30
29
  ["pop_id", request.popId],
31
30
  ["project_id", request.projectId],
32
31
  ["status", request.status],
@@ -41,7 +40,11 @@ class API extends API$1 {
41
40
  * @param request - The request {@link ListDedicatedConnectionsRequest}
42
41
  * @returns A Promise of ListDedicatedConnectionsResponse
43
42
  */
44
- listDedicatedConnections = (request = {}) => enrichForPagination("connections", this.pageOfListDedicatedConnections, request);
43
+ listDedicatedConnections = (request = {}) => enrichForPagination(
44
+ "connections",
45
+ this.pageOfListDedicatedConnections,
46
+ request
47
+ );
45
48
  /**
46
49
  * Get a dedicated connection. For self-hosted users, get a dedicated physical connection corresponding to the given ID. The response object includes information such as the connection's name, status and total bandwidth.
47
50
  *
@@ -63,7 +66,11 @@ class API extends API$1 {
63
66
  * @returns A Promise of DedicatedConnection
64
67
  */
65
68
  waitForDedicatedConnection = (request, options) => waitForResource(
66
- options?.stop ?? ((res) => Promise.resolve(!DEDICATED_CONNECTION_TRANSIENT_STATUSES.includes(res.status))),
69
+ options?.stop ?? ((res) => Promise.resolve(
70
+ !DEDICATED_CONNECTION_TRANSIENT_STATUSES.includes(
71
+ res.status
72
+ )
73
+ )),
67
74
  this.getDedicatedConnection,
68
75
  request,
69
76
  options
@@ -75,7 +82,10 @@ class API extends API$1 {
75
82
  urlParams: urlParams(
76
83
  ["order_by", request.orderBy],
77
84
  ["page", request.page],
78
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
85
+ [
86
+ "page_size",
87
+ request.pageSize ?? this.client.settings.defaultPageSize
88
+ ],
79
89
  ["pop_ids", request.popIds]
80
90
  )
81
91
  },
@@ -112,7 +122,10 @@ class API extends API$1 {
112
122
  ["name", request.name],
113
123
  ["order_by", request.orderBy],
114
124
  ["page", request.page],
115
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
125
+ [
126
+ "page_size",
127
+ request.pageSize ?? this.client.settings.defaultPageSize
128
+ ],
116
129
  ["partner_id", request.partnerId]
117
130
  )
118
131
  },
@@ -152,7 +165,10 @@ class API extends API$1 {
152
165
  ["order_by", request.orderBy],
153
166
  ["organization_id", request.organizationId],
154
167
  ["page", request.page],
155
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
168
+ [
169
+ "page_size",
170
+ request.pageSize ?? this.client.settings.defaultPageSize
171
+ ],
156
172
  ["pairing_key", request.pairingKey],
157
173
  ["partner_id", request.partnerId],
158
174
  ["pop_id", request.popId],
@@ -193,7 +209,9 @@ class API extends API$1 {
193
209
  * @returns A Promise of Link
194
210
  */
195
211
  waitForLink = (request, options) => waitForResource(
196
- options?.stop ?? ((res) => Promise.resolve(!LINK_TRANSIENT_STATUSES.includes(res.status))),
212
+ options?.stop ?? ((res) => Promise.resolve(
213
+ !LINK_TRANSIENT_STATUSES.includes(res.status)
214
+ )),
197
215
  this.getLink,
198
216
  request,
199
217
  options
@@ -368,7 +386,10 @@ class API extends API$1 {
368
386
  ["order_by", request.orderBy],
369
387
  ["organization_id", request.organizationId],
370
388
  ["page", request.page],
371
- ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
389
+ [
390
+ "page_size",
391
+ request.pageSize ?? this.client.settings.defaultPageSize
392
+ ],
372
393
  ["project_id", request.projectId],
373
394
  ["tags", request.tags]
374
395
  )
@@ -381,7 +402,11 @@ class API extends API$1 {
381
402
  * @param request - The request {@link ListRoutingPoliciesRequest}
382
403
  * @returns A Promise of ListRoutingPoliciesResponse
383
404
  */
384
- listRoutingPolicies = (request = {}) => enrichForPagination("routingPolicies", this.pageOfListRoutingPolicies, request);
405
+ listRoutingPolicies = (request = {}) => enrichForPagination(
406
+ "routingPolicies",
407
+ this.pageOfListRoutingPolicies,
408
+ request
409
+ );
385
410
  /**
386
411
  * Get routing policy. Get a routing policy for the given routing policy ID. The response object gives information including the policy's name, tags and prefix filters.
387
412
  *
@@ -434,12 +459,10 @@ class API extends API$1 {
434
459
  *
435
460
  * @param request - The request {@link DeleteRoutingPolicyRequest}
436
461
  */
437
- deleteRoutingPolicy = (request) => this.client.fetch(
438
- {
439
- method: "DELETE",
440
- path: `/interlink/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${validatePathParam("routingPolicyId", request.routingPolicyId)}`
441
- }
442
- );
462
+ deleteRoutingPolicy = (request) => this.client.fetch({
463
+ method: "DELETE",
464
+ path: `/interlink/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/routing-policies/${validatePathParam("routingPolicyId", request.routingPolicyId)}`
465
+ });
443
466
  }
444
467
  export {
445
468
  API
@@ -1,9 +1,5 @@
1
- const DEDICATED_CONNECTION_TRANSIENT_STATUSES = [
2
- "configuring"
3
- ];
4
- const LINK_TRANSIENT_STATUSES = [
5
- "configuring"
6
- ];
1
+ const DEDICATED_CONNECTION_TRANSIENT_STATUSES = ["configuring"];
2
+ const LINK_TRANSIENT_STATUSES = ["configuring"];
7
3
  export {
8
4
  DEDICATED_CONNECTION_TRANSIENT_STATUSES,
9
5
  LINK_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 { AttachRoutingPolicyRequest, AttachVpcRequest, BgpConfig, BgpStatus, CreateLinkRequest, CreateRoutingPolicyRequest, DedicatedConnection, DedicatedConnectionStatus, DeleteLinkRequest, DeleteRoutingPolicyRequest, DetachRoutingPolicyRequest, DetachVpcRequest, DisableRoutePropagationRequest, EnableRoutePropagationRequest, GetDedicatedConnectionRequest, GetLinkRequest, GetPartnerRequest, GetPopRequest, GetRoutingPolicyRequest, Link, LinkKind, LinkStatus, ListDedicatedConnectionsRequest, ListDedicatedConnectionsRequestOrderBy, ListDedicatedConnectionsResponse, ListLinksRequest, ListLinksRequestOrderBy, ListLinksResponse, ListPartnersRequest, ListPartnersRequestOrderBy, ListPartnersResponse, ListPopsRequest, ListPopsRequestOrderBy, ListPopsResponse, ListRoutingPoliciesRequest, ListRoutingPoliciesRequestOrderBy, ListRoutingPoliciesResponse, Partner, PartnerHost, Pop, Range, RoutingPolicy, SelfHost, SetRoutingPolicyRequest, UpdateLinkRequest, UpdateRoutingPolicyRequest, } from './types.gen.js';
@@ -160,7 +160,10 @@ const unmarshalListDedicatedConnectionsResponse = (data) => {
160
160
  );
161
161
  }
162
162
  return {
163
- connections: unmarshalArrayOfObject(data.connections, unmarshalDedicatedConnection),
163
+ connections: unmarshalArrayOfObject(
164
+ data.connections,
165
+ unmarshalDedicatedConnection
166
+ ),
164
167
  totalCount: data.total_count
165
168
  };
166
169
  };
@@ -204,7 +207,10 @@ const unmarshalListRoutingPoliciesResponse = (data) => {
204
207
  );
205
208
  }
206
209
  return {
207
- routingPolicies: unmarshalArrayOfObject(data.routing_policies, unmarshalRoutingPolicy),
210
+ routingPolicies: unmarshalArrayOfObject(
211
+ data.routing_policies,
212
+ unmarshalRoutingPolicy
213
+ ),
208
214
  totalCount: data.total_count
209
215
  };
210
216
  };
@@ -225,14 +231,8 @@ const marshalCreateLinkRequest = (request, defaults) => ({
225
231
  tags: request.tags,
226
232
  vlan: request.vlan,
227
233
  ...resolveOneOf([
228
- {
229
- param: "connection_id",
230
- value: request.connectionId
231
- },
232
- {
233
- param: "partner_id",
234
- value: request.partnerId
235
- }
234
+ { param: "connection_id", value: request.connectionId },
235
+ { param: "partner_id", value: request.partnerId }
236
236
  ])
237
237
  });
238
238
  const marshalCreateRoutingPolicyRequest = (request, defaults) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-interlink",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "Scaleway SDK interlink",
5
5
  "license": "Apache-2.0",
6
6
  "files": [