@scaleway/sdk-interlink 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.
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -10,7 +10,11 @@ class API extends API$1 {
|
|
|
10
10
|
* type ∈ {'zone','region','global','unspecified'}
|
|
11
11
|
*/
|
|
12
12
|
static LOCALITY = toApiLocality({
|
|
13
|
-
regions: [
|
|
13
|
+
regions: [
|
|
14
|
+
"fr-par",
|
|
15
|
+
"nl-ams",
|
|
16
|
+
"pl-waw"
|
|
17
|
+
]
|
|
14
18
|
});
|
|
15
19
|
pageOfListDedicatedConnections = (request = {}) => this.client.fetch(
|
|
16
20
|
{
|
|
@@ -22,10 +26,7 @@ class API extends API$1 {
|
|
|
22
26
|
["order_by", request.orderBy],
|
|
23
27
|
["organization_id", request.organizationId],
|
|
24
28
|
["page", request.page],
|
|
25
|
-
[
|
|
26
|
-
"page_size",
|
|
27
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
28
|
-
],
|
|
29
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
29
30
|
["pop_id", request.popId],
|
|
30
31
|
["project_id", request.projectId],
|
|
31
32
|
["status", request.status],
|
|
@@ -40,11 +41,7 @@ class API extends API$1 {
|
|
|
40
41
|
* @param request - The request {@link ListDedicatedConnectionsRequest}
|
|
41
42
|
* @returns A Promise of ListDedicatedConnectionsResponse
|
|
42
43
|
*/
|
|
43
|
-
listDedicatedConnections = (request = {}) => enrichForPagination(
|
|
44
|
-
"connections",
|
|
45
|
-
this.pageOfListDedicatedConnections,
|
|
46
|
-
request
|
|
47
|
-
);
|
|
44
|
+
listDedicatedConnections = (request = {}) => enrichForPagination("connections", this.pageOfListDedicatedConnections, request);
|
|
48
45
|
/**
|
|
49
46
|
* 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.
|
|
50
47
|
*
|
|
@@ -66,11 +63,7 @@ class API extends API$1 {
|
|
|
66
63
|
* @returns A Promise of DedicatedConnection
|
|
67
64
|
*/
|
|
68
65
|
waitForDedicatedConnection = (request, options) => waitForResource(
|
|
69
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
70
|
-
!DEDICATED_CONNECTION_TRANSIENT_STATUSES.includes(
|
|
71
|
-
res.status
|
|
72
|
-
)
|
|
73
|
-
)),
|
|
66
|
+
options?.stop ?? ((res) => Promise.resolve(!DEDICATED_CONNECTION_TRANSIENT_STATUSES.includes(res.status))),
|
|
74
67
|
this.getDedicatedConnection,
|
|
75
68
|
request,
|
|
76
69
|
options
|
|
@@ -82,10 +75,7 @@ class API extends API$1 {
|
|
|
82
75
|
urlParams: urlParams(
|
|
83
76
|
["order_by", request.orderBy],
|
|
84
77
|
["page", request.page],
|
|
85
|
-
[
|
|
86
|
-
"page_size",
|
|
87
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
88
|
-
],
|
|
78
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
89
79
|
["pop_ids", request.popIds]
|
|
90
80
|
)
|
|
91
81
|
},
|
|
@@ -122,10 +112,7 @@ class API extends API$1 {
|
|
|
122
112
|
["name", request.name],
|
|
123
113
|
["order_by", request.orderBy],
|
|
124
114
|
["page", request.page],
|
|
125
|
-
[
|
|
126
|
-
"page_size",
|
|
127
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
128
|
-
],
|
|
115
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
129
116
|
["partner_id", request.partnerId]
|
|
130
117
|
)
|
|
131
118
|
},
|
|
@@ -165,10 +152,7 @@ class API extends API$1 {
|
|
|
165
152
|
["order_by", request.orderBy],
|
|
166
153
|
["organization_id", request.organizationId],
|
|
167
154
|
["page", request.page],
|
|
168
|
-
[
|
|
169
|
-
"page_size",
|
|
170
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
171
|
-
],
|
|
155
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
172
156
|
["pairing_key", request.pairingKey],
|
|
173
157
|
["partner_id", request.partnerId],
|
|
174
158
|
["pop_id", request.popId],
|
|
@@ -209,9 +193,7 @@ class API extends API$1 {
|
|
|
209
193
|
* @returns A Promise of Link
|
|
210
194
|
*/
|
|
211
195
|
waitForLink = (request, options) => waitForResource(
|
|
212
|
-
options?.stop ?? ((res) => Promise.resolve(
|
|
213
|
-
!LINK_TRANSIENT_STATUSES.includes(res.status)
|
|
214
|
-
)),
|
|
196
|
+
options?.stop ?? ((res) => Promise.resolve(!LINK_TRANSIENT_STATUSES.includes(res.status))),
|
|
215
197
|
this.getLink,
|
|
216
198
|
request,
|
|
217
199
|
options
|
|
@@ -386,10 +368,7 @@ class API extends API$1 {
|
|
|
386
368
|
["order_by", request.orderBy],
|
|
387
369
|
["organization_id", request.organizationId],
|
|
388
370
|
["page", request.page],
|
|
389
|
-
[
|
|
390
|
-
"page_size",
|
|
391
|
-
request.pageSize ?? this.client.settings.defaultPageSize
|
|
392
|
-
],
|
|
371
|
+
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
393
372
|
["project_id", request.projectId],
|
|
394
373
|
["tags", request.tags]
|
|
395
374
|
)
|
|
@@ -402,11 +381,7 @@ class API extends API$1 {
|
|
|
402
381
|
* @param request - The request {@link ListRoutingPoliciesRequest}
|
|
403
382
|
* @returns A Promise of ListRoutingPoliciesResponse
|
|
404
383
|
*/
|
|
405
|
-
listRoutingPolicies = (request = {}) => enrichForPagination(
|
|
406
|
-
"routingPolicies",
|
|
407
|
-
this.pageOfListRoutingPolicies,
|
|
408
|
-
request
|
|
409
|
-
);
|
|
384
|
+
listRoutingPolicies = (request = {}) => enrichForPagination("routingPolicies", this.pageOfListRoutingPolicies, request);
|
|
410
385
|
/**
|
|
411
386
|
* 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.
|
|
412
387
|
*
|
|
@@ -459,10 +434,12 @@ class API extends API$1 {
|
|
|
459
434
|
*
|
|
460
435
|
* @param request - The request {@link DeleteRoutingPolicyRequest}
|
|
461
436
|
*/
|
|
462
|
-
deleteRoutingPolicy = (request) => this.client.fetch(
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
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
|
+
);
|
|
466
443
|
}
|
|
467
444
|
export {
|
|
468
445
|
API
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
const DEDICATED_CONNECTION_TRANSIENT_STATUSES = [
|
|
2
|
-
|
|
1
|
+
const DEDICATED_CONNECTION_TRANSIENT_STATUSES = [
|
|
2
|
+
"configuring"
|
|
3
|
+
];
|
|
4
|
+
const LINK_TRANSIENT_STATUSES = [
|
|
5
|
+
"configuring"
|
|
6
|
+
];
|
|
3
7
|
export {
|
|
4
8
|
DEDICATED_CONNECTION_TRANSIENT_STATUSES,
|
|
5
9
|
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,10 +160,7 @@ const unmarshalListDedicatedConnectionsResponse = (data) => {
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
return {
|
|
163
|
-
connections: unmarshalArrayOfObject(
|
|
164
|
-
data.connections,
|
|
165
|
-
unmarshalDedicatedConnection
|
|
166
|
-
),
|
|
163
|
+
connections: unmarshalArrayOfObject(data.connections, unmarshalDedicatedConnection),
|
|
167
164
|
totalCount: data.total_count
|
|
168
165
|
};
|
|
169
166
|
};
|
|
@@ -207,10 +204,7 @@ const unmarshalListRoutingPoliciesResponse = (data) => {
|
|
|
207
204
|
);
|
|
208
205
|
}
|
|
209
206
|
return {
|
|
210
|
-
routingPolicies: unmarshalArrayOfObject(
|
|
211
|
-
data.routing_policies,
|
|
212
|
-
unmarshalRoutingPolicy
|
|
213
|
-
),
|
|
207
|
+
routingPolicies: unmarshalArrayOfObject(data.routing_policies, unmarshalRoutingPolicy),
|
|
214
208
|
totalCount: data.total_count
|
|
215
209
|
};
|
|
216
210
|
};
|
|
@@ -231,8 +225,14 @@ const marshalCreateLinkRequest = (request, defaults) => ({
|
|
|
231
225
|
tags: request.tags,
|
|
232
226
|
vlan: request.vlan,
|
|
233
227
|
...resolveOneOf([
|
|
234
|
-
{
|
|
235
|
-
|
|
228
|
+
{
|
|
229
|
+
param: "connection_id",
|
|
230
|
+
value: request.connectionId
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
param: "partner_id",
|
|
234
|
+
value: request.partnerId
|
|
235
|
+
}
|
|
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.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Scaleway SDK interlink",
|
|
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.
|
|
30
|
+
"@scaleway/sdk-std": "2.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@scaleway/sdk-client": "^2.1.0"
|