@scaleway/sdk 2.0.0-alpha.14 → 2.0.0-alpha.16
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/api/billing/v2alpha1/api.gen.js +32 -1
- package/dist/api/billing/v2alpha1/marshalling.gen.js +46 -1
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +3 -1
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -3
- package/dist/api/function/v1beta1/api.gen.js +36 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +3 -3
- package/dist/api/iam/v1alpha1/api.gen.js +28 -2
- package/dist/api/iam/v1alpha1/marshalling.gen.js +26 -1
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +2 -0
- package/dist/api/ipam/v1/marshalling.gen.js +1 -1
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/rdb/v1/marshalling.gen.js +7 -0
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +4 -0
- package/dist/api/std/index.gen.js +1 -0
- package/dist/api/tem/v1alpha1/api.gen.js +8 -2
- package/dist/api/tem/v1alpha1/marshalling.gen.js +13 -0
- package/dist/api/vpcgw/v1/marshalling.gen.js +9 -3
- package/dist/index.cjs +261 -78
- package/dist/index.d.ts +1375 -988
- package/dist/index.js +2 -0
- package/dist/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from './marshalling.gen.js';
|
|
4
|
+
import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse, unmarshalListDiscountsResponse } from './marshalling.gen.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -75,6 +75,37 @@ class API extends API$1 {
|
|
|
75
75
|
urlParams: urlParams(['dl', 1], ['file_type', request.fileType]),
|
|
76
76
|
responseType: 'blob'
|
|
77
77
|
});
|
|
78
|
+
pageOfListDiscounts = (() => {
|
|
79
|
+
var _this4 = this;
|
|
80
|
+
return function (request) {
|
|
81
|
+
if (request === void 0) {
|
|
82
|
+
request = {};
|
|
83
|
+
}
|
|
84
|
+
return _this4.client.fetch({
|
|
85
|
+
method: 'GET',
|
|
86
|
+
path: `/billing/v2alpha1/discounts`,
|
|
87
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
|
|
88
|
+
}, unmarshalListDiscountsResponse);
|
|
89
|
+
};
|
|
90
|
+
})();
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* List all user's discounts. List all discounts for an organization and
|
|
94
|
+
* usable categories/products/offers/references/regions/zones where the
|
|
95
|
+
* discount can be applied.
|
|
96
|
+
*
|
|
97
|
+
* @param request - The request {@link ListDiscountsRequest}
|
|
98
|
+
* @returns A Promise of ListDiscountsResponse
|
|
99
|
+
*/
|
|
100
|
+
listDiscounts = (() => {
|
|
101
|
+
var _this5 = this;
|
|
102
|
+
return function (request) {
|
|
103
|
+
if (request === void 0) {
|
|
104
|
+
request = {};
|
|
105
|
+
}
|
|
106
|
+
return enrichForPagination('discounts', _this5.pageOfListDiscounts, request);
|
|
107
|
+
};
|
|
108
|
+
})();
|
|
78
109
|
}
|
|
79
110
|
|
|
80
111
|
export { API };
|
|
@@ -25,6 +25,51 @@ const unmarshalGetConsumptionResponse = data => {
|
|
|
25
25
|
updatedAt: unmarshalDate(data.updated_at)
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
+
const unmarshalDiscountCoupon = data => {
|
|
29
|
+
if (!isJSONObject(data)) {
|
|
30
|
+
throw new TypeError(`Unmarshalling the type 'DiscountCoupon' failed as data isn't a dictionary.`);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
description: data.description
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const unmarshalDiscountFilter = data => {
|
|
37
|
+
if (!isJSONObject(data)) {
|
|
38
|
+
throw new TypeError(`Unmarshalling the type 'DiscountFilter' failed as data isn't a dictionary.`);
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
type: data.type,
|
|
42
|
+
value: data.value
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
const unmarshalDiscount = data => {
|
|
46
|
+
if (!isJSONObject(data)) {
|
|
47
|
+
throw new TypeError(`Unmarshalling the type 'Discount' failed as data isn't a dictionary.`);
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
coupon: data.coupon ? unmarshalDiscountCoupon(data.coupon) : undefined,
|
|
51
|
+
creationDate: unmarshalDate(data.creation_date),
|
|
52
|
+
description: data.description,
|
|
53
|
+
filters: unmarshalArrayOfObject(data.filters, unmarshalDiscountFilter),
|
|
54
|
+
id: data.id,
|
|
55
|
+
mode: data.mode,
|
|
56
|
+
organizationId: data.organization_id,
|
|
57
|
+
startDate: unmarshalDate(data.start_date),
|
|
58
|
+
stopDate: unmarshalDate(data.stop_date),
|
|
59
|
+
value: data.value,
|
|
60
|
+
valueRemaining: data.value_remaining,
|
|
61
|
+
valueUsed: data.value_used
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const unmarshalListDiscountsResponse = data => {
|
|
65
|
+
if (!isJSONObject(data)) {
|
|
66
|
+
throw new TypeError(`Unmarshalling the type 'ListDiscountsResponse' failed as data isn't a dictionary.`);
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
discounts: unmarshalArrayOfObject(data.discounts, unmarshalDiscount),
|
|
70
|
+
totalCount: data.total_count
|
|
71
|
+
};
|
|
72
|
+
};
|
|
28
73
|
const unmarshalInvoice = data => {
|
|
29
74
|
if (!isJSONObject(data)) {
|
|
30
75
|
throw new TypeError(`Unmarshalling the type 'Invoice' failed as data isn't a dictionary.`);
|
|
@@ -50,4 +95,4 @@ const unmarshalListInvoicesResponse = data => {
|
|
|
50
95
|
};
|
|
51
96
|
};
|
|
52
97
|
|
|
53
|
-
export { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse };
|
|
98
|
+
export { unmarshalGetConsumptionResponse, unmarshalListDiscountsResponse, unmarshalListInvoicesResponse };
|
|
@@ -109,7 +109,9 @@ const unmarshalPlan = data => {
|
|
|
109
109
|
retentionLogsInterval: data.retention_logs_interval,
|
|
110
110
|
retentionMetricsInterval: data.retention_metrics_interval,
|
|
111
111
|
retentionPrice: data.retention_price,
|
|
112
|
-
|
|
112
|
+
retentionTracesInterval: data.retention_traces_interval,
|
|
113
|
+
sampleIngestionPrice: data.sample_ingestion_price,
|
|
114
|
+
tracesIngestionPrice: data.traces_ingestion_price
|
|
113
115
|
};
|
|
114
116
|
};
|
|
115
117
|
const unmarshalCockpit = data => {
|
|
@@ -306,12 +306,12 @@ const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
|
306
306
|
...resolveOneOf([{
|
|
307
307
|
param: 'scw_sqs_config',
|
|
308
308
|
value: request.scwSqsConfig !== undefined ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
|
|
309
|
-
}, {
|
|
310
|
-
param: 'sqs_config',
|
|
311
|
-
value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
|
|
312
309
|
}, {
|
|
313
310
|
param: 'scw_nats_config',
|
|
314
311
|
value: request.scwNatsConfig !== undefined ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
|
|
312
|
+
}, {
|
|
313
|
+
param: 'sqs_config',
|
|
314
|
+
value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
|
|
315
315
|
}])
|
|
316
316
|
});
|
|
317
317
|
const marshalUpdateContainerRequest = (request, defaults) => ({
|
|
@@ -494,12 +494,26 @@ class API extends API$1 {
|
|
|
494
494
|
method: 'DELETE',
|
|
495
495
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
496
496
|
}, unmarshalToken);
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Create a trigger. Create a new trigger for a specified function.
|
|
500
|
+
*
|
|
501
|
+
* @param request - The request {@link CreateTriggerRequest}
|
|
502
|
+
* @returns A Promise of Trigger
|
|
503
|
+
*/
|
|
497
504
|
createTrigger = request => this.client.fetch({
|
|
498
505
|
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
499
506
|
headers: jsonContentHeaders,
|
|
500
507
|
method: 'POST',
|
|
501
508
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
502
509
|
}, unmarshalTrigger);
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Get a trigger. Get a trigger with a specified ID.
|
|
513
|
+
*
|
|
514
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
515
|
+
* @returns A Promise of Trigger
|
|
516
|
+
*/
|
|
503
517
|
getTrigger = request => this.client.fetch({
|
|
504
518
|
method: 'GET',
|
|
505
519
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
@@ -536,6 +550,14 @@ class API extends API$1 {
|
|
|
536
550
|
}, unmarshalListTriggersResponse);
|
|
537
551
|
};
|
|
538
552
|
})();
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* List all triggers. List all triggers belonging to a specified Organization
|
|
556
|
+
* or Project.
|
|
557
|
+
*
|
|
558
|
+
* @param request - The request {@link ListTriggersRequest}
|
|
559
|
+
* @returns A Promise of ListTriggersResponse
|
|
560
|
+
*/
|
|
539
561
|
listTriggers = (() => {
|
|
540
562
|
var _this10 = this;
|
|
541
563
|
return function (request) {
|
|
@@ -545,12 +567,26 @@ class API extends API$1 {
|
|
|
545
567
|
return enrichForPagination('triggers', _this10.pageOfListTriggers, request);
|
|
546
568
|
};
|
|
547
569
|
})();
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Update a trigger. Update a trigger with a specified ID.
|
|
573
|
+
*
|
|
574
|
+
* @param request - The request {@link UpdateTriggerRequest}
|
|
575
|
+
* @returns A Promise of Trigger
|
|
576
|
+
*/
|
|
548
577
|
updateTrigger = request => this.client.fetch({
|
|
549
578
|
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
550
579
|
headers: jsonContentHeaders,
|
|
551
580
|
method: 'PATCH',
|
|
552
581
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
553
582
|
}, unmarshalTrigger);
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Delete a trigger. Delete a trigger with a specified ID.
|
|
586
|
+
*
|
|
587
|
+
* @param request - The request {@link DeleteTriggerRequest}
|
|
588
|
+
* @returns A Promise of Trigger
|
|
589
|
+
*/
|
|
554
590
|
deleteTrigger = request => this.client.fetch({
|
|
555
591
|
method: 'DELETE',
|
|
556
592
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
@@ -347,12 +347,12 @@ const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
|
347
347
|
...resolveOneOf([{
|
|
348
348
|
param: 'scw_sqs_config',
|
|
349
349
|
value: request.scwSqsConfig !== undefined ? marshalCreateTriggerRequestMnqSqsClientConfig(request.scwSqsConfig) : undefined
|
|
350
|
-
}, {
|
|
351
|
-
param: 'sqs_config',
|
|
352
|
-
value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
|
|
353
350
|
}, {
|
|
354
351
|
param: 'scw_nats_config',
|
|
355
352
|
value: request.scwNatsConfig !== undefined ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
|
|
353
|
+
}, {
|
|
354
|
+
param: 'sqs_config',
|
|
355
|
+
value: request.sqsConfig !== undefined ? marshalCreateTriggerRequestSqsClientConfig(request.sqsConfig) : undefined
|
|
356
356
|
}])
|
|
357
357
|
});
|
|
358
358
|
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from '../../../scw/api.js';
|
|
2
2
|
import { urlParams, validatePathParam, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
3
3
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT } from './marshalling.gen.js';
|
|
4
|
+
import { unmarshalListSSHKeysResponse, marshalCreateSSHKeyRequest, unmarshalSSHKey, marshalUpdateSSHKeyRequest, unmarshalListUsersResponse, unmarshalUser, marshalCreateUserRequest, unmarshalListApplicationsResponse, marshalCreateApplicationRequest, unmarshalApplication, marshalUpdateApplicationRequest, unmarshalListGroupsResponse, marshalCreateGroupRequest, unmarshalGroup, marshalUpdateGroupRequest, marshalSetGroupMembersRequest, marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalRemoveGroupMemberRequest, unmarshalListPoliciesResponse, marshalCreatePolicyRequest, unmarshalPolicy, marshalUpdatePolicyRequest, marshalSetRulesRequest, unmarshalSetRulesResponse, unmarshalListRulesResponse, unmarshalListPermissionSetsResponse, unmarshalListAPIKeysResponse, marshalCreateAPIKeyRequest, unmarshalAPIKey, marshalUpdateAPIKeyRequest, unmarshalListQuotaResponse, unmarshalQuotum, unmarshalListJWTsResponse, unmarshalJWT, unmarshalListLogsResponse, unmarshalLog } from './marshalling.gen.js';
|
|
5
5
|
|
|
6
6
|
// This file was automatically generated. DO NOT EDIT.
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -268,7 +268,7 @@ class API extends API$1 {
|
|
|
268
268
|
return _this7.client.fetch({
|
|
269
269
|
method: 'GET',
|
|
270
270
|
path: `/iam/v1alpha1/groups`,
|
|
271
|
-
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
271
|
+
urlParams: urlParams(['application_ids', request.applicationIds], ['group_ids', request.groupIds], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this7.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['user_ids', request.userIds])
|
|
272
272
|
}, unmarshalListGroupsResponse);
|
|
273
273
|
};
|
|
274
274
|
})();
|
|
@@ -778,6 +778,32 @@ class API extends API$1 {
|
|
|
778
778
|
method: 'DELETE',
|
|
779
779
|
path: `/iam/v1alpha1/jwts/${validatePathParam('jti', request.jti)}`
|
|
780
780
|
});
|
|
781
|
+
pageOfListLogs = (() => {
|
|
782
|
+
var _this19 = this;
|
|
783
|
+
return function (request) {
|
|
784
|
+
if (request === void 0) {
|
|
785
|
+
request = {};
|
|
786
|
+
}
|
|
787
|
+
return _this19.client.fetch({
|
|
788
|
+
method: 'GET',
|
|
789
|
+
path: `/iam/v1alpha1/logs`,
|
|
790
|
+
urlParams: urlParams(['action', request.action], ['created_after', request.createdAfter], ['created_before', request.createdBefore], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this19.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this19.client.settings.defaultPageSize], ['resource_type', request.resourceType], ['search', request.search])
|
|
791
|
+
}, unmarshalListLogsResponse);
|
|
792
|
+
};
|
|
793
|
+
})();
|
|
794
|
+
listLogs = (() => {
|
|
795
|
+
var _this20 = this;
|
|
796
|
+
return function (request) {
|
|
797
|
+
if (request === void 0) {
|
|
798
|
+
request = {};
|
|
799
|
+
}
|
|
800
|
+
return enrichForPagination('logs', _this20.pageOfListLogs, request);
|
|
801
|
+
};
|
|
802
|
+
})();
|
|
803
|
+
getLog = request => this.client.fetch({
|
|
804
|
+
method: 'GET',
|
|
805
|
+
path: `/iam/v1alpha1/logs/${validatePathParam('logId', request.logId)}`
|
|
806
|
+
}, unmarshalLog);
|
|
781
807
|
}
|
|
782
808
|
|
|
783
809
|
export { API };
|
|
@@ -67,6 +67,22 @@ const unmarshalGroup = data => {
|
|
|
67
67
|
userIds: data.user_ids
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
+
const unmarshalLog = data => {
|
|
71
|
+
if (!isJSONObject(data)) {
|
|
72
|
+
throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
action: data.action,
|
|
76
|
+
bearerId: data.bearer_id,
|
|
77
|
+
createdAt: unmarshalDate(data.created_at),
|
|
78
|
+
id: data.id,
|
|
79
|
+
ip: data.ip,
|
|
80
|
+
organizationId: data.organization_id,
|
|
81
|
+
resourceId: data.resource_id,
|
|
82
|
+
resourceType: data.resource_type,
|
|
83
|
+
userAgent: data.user_agent
|
|
84
|
+
};
|
|
85
|
+
};
|
|
70
86
|
const unmarshalPolicy = data => {
|
|
71
87
|
if (!isJSONObject(data)) {
|
|
72
88
|
throw new TypeError(`Unmarshalling the type 'Policy' failed as data isn't a dictionary.`);
|
|
@@ -169,6 +185,15 @@ const unmarshalListJWTsResponse = data => {
|
|
|
169
185
|
totalCount: data.total_count
|
|
170
186
|
};
|
|
171
187
|
};
|
|
188
|
+
const unmarshalListLogsResponse = data => {
|
|
189
|
+
if (!isJSONObject(data)) {
|
|
190
|
+
throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
|
|
194
|
+
totalCount: data.total_count
|
|
195
|
+
};
|
|
196
|
+
};
|
|
172
197
|
const unmarshalPermissionSet = data => {
|
|
173
198
|
if (!isJSONObject(data)) {
|
|
174
199
|
throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
|
|
@@ -381,4 +406,4 @@ const marshalUpdateSSHKeyRequest = (request, defaults) => ({
|
|
|
381
406
|
name: request.name
|
|
382
407
|
});
|
|
383
408
|
|
|
384
|
-
export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
|
|
409
|
+
export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListLogsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalLog, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
|
|
@@ -102,6 +102,15 @@ const ListJWTsRequest = {
|
|
|
102
102
|
lessThanOrEqual: 100
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
+
const ListLogsRequest = {
|
|
106
|
+
page: {
|
|
107
|
+
greaterThan: 0
|
|
108
|
+
},
|
|
109
|
+
pageSize: {
|
|
110
|
+
greaterThanOrEqual: 1,
|
|
111
|
+
lessThanOrEqual: 100
|
|
112
|
+
}
|
|
113
|
+
};
|
|
105
114
|
const ListPermissionSetsRequest = {
|
|
106
115
|
page: {
|
|
107
116
|
greaterThan: 0
|
|
@@ -204,4 +213,4 @@ const UpdateSSHKeyRequest = {
|
|
|
204
213
|
}
|
|
205
214
|
};
|
|
206
215
|
|
|
207
|
-
export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
|
|
216
|
+
export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListLogsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
|
|
@@ -13,6 +13,9 @@ const PRIVATE_NIC_TRANSIENT_STATUSES = ['syncing'];
|
|
|
13
13
|
/** Lists transient statutes of the enum {@link SecurityGroupState}. */
|
|
14
14
|
const SECURITY_GROUP_TRANSIENT_STATUSES = ['syncing'];
|
|
15
15
|
|
|
16
|
+
/** Lists transient statutes of the enum {@link ServerIpState}. */
|
|
17
|
+
const SERVER_IP_TRANSIENT_STATUSES = ['pending'];
|
|
18
|
+
|
|
16
19
|
/** Lists transient statutes of the enum {@link ServerState}. */
|
|
17
20
|
const SERVER_TRANSIENT_STATUSES = ['starting', 'stopping'];
|
|
18
21
|
|
|
@@ -28,4 +31,4 @@ const VOLUME_SERVER_TRANSIENT_STATUSES = ['snapshotting', 'fetching', 'resizing'
|
|
|
28
31
|
/** Lists transient statutes of the enum {@link VolumeState}. */
|
|
29
32
|
const VOLUME_TRANSIENT_STATUSES = ['snapshotting', 'fetching', 'resizing', 'saving', 'hotsyncing'];
|
|
30
33
|
|
|
31
|
-
export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
|
|
34
|
+
export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { InstanceV1UtilsAPI as API } from './api.utils.js';
|
|
2
|
-
export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from './content.gen.js';
|
|
2
|
+
export { IMAGE_TRANSIENT_STATUSES, IP_TRANSIENT_STATUSES, PRIVATE_NIC_TRANSIENT_STATUSES, SECURITY_GROUP_TRANSIENT_STATUSES, SERVER_IP_TRANSIENT_STATUSES, SERVER_TRANSIENT_STATUSES, SNAPSHOT_TRANSIENT_STATUSES, TASK_TRANSIENT_STATUSES, VOLUME_SERVER_TRANSIENT_STATUSES, VOLUME_TRANSIENT_STATUSES } from './content.gen.js';
|
|
@@ -242,6 +242,7 @@ const unmarshalServerIp = data => {
|
|
|
242
242
|
id: data.id,
|
|
243
243
|
netmask: data.netmask,
|
|
244
244
|
provisioningMode: data.provisioning_mode,
|
|
245
|
+
state: data.state,
|
|
245
246
|
tags: data.tags
|
|
246
247
|
};
|
|
247
248
|
};
|
|
@@ -1291,6 +1292,7 @@ const marshalServerIp = (request, defaults) => ({
|
|
|
1291
1292
|
id: request.id,
|
|
1292
1293
|
netmask: request.netmask,
|
|
1293
1294
|
provisioning_mode: request.provisioningMode,
|
|
1295
|
+
state: request.state,
|
|
1294
1296
|
tags: request.tags
|
|
1295
1297
|
});
|
|
1296
1298
|
const marshalServerIpv6 = (request, defaults) => ({
|
|
@@ -67,7 +67,7 @@ const marshalBookIPRequest = (request, defaults) => ({
|
|
|
67
67
|
address: request.address,
|
|
68
68
|
is_ipv6: request.isIpv6,
|
|
69
69
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
70
|
-
source:
|
|
70
|
+
source: marshalSource(request.source),
|
|
71
71
|
tags: request.tags
|
|
72
72
|
});
|
|
73
73
|
const marshalUpdateIPRequest = (request, defaults) => ({
|
|
@@ -128,20 +128,14 @@ const unmarshalReplacePinResponse = data => {
|
|
|
128
128
|
pin: data.pin ? unmarshalPin(data.pin) : undefined
|
|
129
129
|
};
|
|
130
130
|
};
|
|
131
|
-
const marshalPinOptions = (request, defaults) => ({
|
|
132
|
-
replication_count: request.replicationCount,
|
|
133
|
-
required_zones: request.requiredZones
|
|
134
|
-
});
|
|
135
131
|
const marshalCreatePinByCIDRequest = (request, defaults) => ({
|
|
136
132
|
cid: request.cid,
|
|
137
133
|
name: request.name,
|
|
138
134
|
origins: request.origins,
|
|
139
|
-
pin_options: request.pinOptions !== undefined ? marshalPinOptions(request.pinOptions) : undefined,
|
|
140
135
|
volume_id: request.volumeId
|
|
141
136
|
});
|
|
142
137
|
const marshalCreatePinByURLRequest = (request, defaults) => ({
|
|
143
138
|
name: request.name,
|
|
144
|
-
pin_options: request.pinOptions !== undefined ? marshalPinOptions(request.pinOptions) : undefined,
|
|
145
139
|
url: request.url,
|
|
146
140
|
volume_id: request.volumeId
|
|
147
141
|
});
|
|
@@ -169,7 +163,6 @@ const marshalReplacePinRequest = (request, defaults) => ({
|
|
|
169
163
|
cid: request.cid,
|
|
170
164
|
name: request.name,
|
|
171
165
|
origins: request.origins,
|
|
172
|
-
pin_options: request.pinOptions !== undefined ? marshalPinOptions(request.pinOptions) : undefined,
|
|
173
166
|
volume_id: request.volumeId
|
|
174
167
|
});
|
|
175
168
|
const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
@@ -672,6 +672,10 @@ const marshalUpdateUserRequest = (request, defaults) => ({
|
|
|
672
672
|
is_admin: request.isAdmin,
|
|
673
673
|
password: request.password
|
|
674
674
|
});
|
|
675
|
+
const marshalUpgradeInstanceRequestMajorUpgradeWorkflow = (request, defaults) => ({
|
|
676
|
+
upgradable_version_id: request.upgradableVersionId,
|
|
677
|
+
with_endpoints: request.withEndpoints
|
|
678
|
+
});
|
|
675
679
|
const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
676
680
|
...resolveOneOf([{
|
|
677
681
|
param: 'node_type',
|
|
@@ -688,6 +692,9 @@ const marshalUpgradeInstanceRequest = (request, defaults) => ({
|
|
|
688
692
|
}, {
|
|
689
693
|
param: 'upgradable_version_id',
|
|
690
694
|
value: request.upgradableVersionId
|
|
695
|
+
}, {
|
|
696
|
+
param: 'major_upgrade_workflow',
|
|
697
|
+
value: request.majorUpgradeWorkflow !== undefined ? marshalUpgradeInstanceRequestMajorUpgradeWorkflow(request.majorUpgradeWorkflow) : undefined
|
|
691
698
|
}])
|
|
692
699
|
});
|
|
693
700
|
|
|
@@ -17,7 +17,7 @@ const jsonContentHeaders = {
|
|
|
17
17
|
*/
|
|
18
18
|
class API extends API$1 {
|
|
19
19
|
/** Lists the available regions of the API. */
|
|
20
|
-
static LOCALITIES = ['fr-par'];
|
|
20
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Create a secret. You must specify the `region` to create a secret.
|
|
@@ -99,7 +99,7 @@ class API extends API$1 {
|
|
|
99
99
|
return _this.client.fetch({
|
|
100
100
|
method: 'GET',
|
|
101
101
|
path: `/secret-manager/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/secrets`,
|
|
102
|
-
urlParams: urlParams(['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['path', request.path], ['project_id', request.projectId], ['tags', request.tags])
|
|
102
|
+
urlParams: urlParams(['is_ephemeral', request.isEphemeral], ['is_managed', request.isManaged], ['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['path', request.path], ['project_id', request.projectId], ['tags', request.tags])
|
|
103
103
|
}, unmarshalListSecretsResponse);
|
|
104
104
|
};
|
|
105
105
|
})();
|
|
@@ -36,6 +36,8 @@ const unmarshalSecret = data => {
|
|
|
36
36
|
return {
|
|
37
37
|
createdAt: unmarshalDate(data.created_at),
|
|
38
38
|
description: data.description,
|
|
39
|
+
ephemeralAction: data.ephemeral_action,
|
|
40
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
39
41
|
id: data.id,
|
|
40
42
|
isManaged: data.is_managed,
|
|
41
43
|
isProtected: data.is_protected,
|
|
@@ -108,6 +110,8 @@ const marshalCreateFolderRequest = (request, defaults) => ({
|
|
|
108
110
|
});
|
|
109
111
|
const marshalCreateSecretRequest = (request, defaults) => ({
|
|
110
112
|
description: request.description,
|
|
113
|
+
ephemeral_action: request.ephemeralAction,
|
|
114
|
+
expires_at: request.expiresAt,
|
|
111
115
|
name: request.name,
|
|
112
116
|
path: request.path,
|
|
113
117
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -134,7 +134,13 @@ class API extends API$1 {
|
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Get information about a domain. Retrieve information about a specific
|
|
137
|
-
* domain using the `region` and `domain_id` parameters.
|
|
137
|
+
* domain using the `region` and `domain_id` parameters. Monitor your domain's
|
|
138
|
+
* reputation and improve **average** and **bad** reputation statuses, using
|
|
139
|
+
* your domain's **Email activity** tab on the [Scaleway
|
|
140
|
+
* console](https://console.scaleway.com/transactional-email/domains) to get a
|
|
141
|
+
* more detailed report. Check out our [dedicated
|
|
142
|
+
* documentation](https://www.scaleway.com/en/docs/managed-services/transactional-email/reference-content/understanding-tem-reputation-score/)
|
|
143
|
+
* to improve your domain's reputation.
|
|
138
144
|
*
|
|
139
145
|
* @param request - The request {@link GetDomainRequest}
|
|
140
146
|
* @returns A Promise of Domain
|
|
@@ -167,7 +173,7 @@ class API extends API$1 {
|
|
|
167
173
|
})();
|
|
168
174
|
|
|
169
175
|
/**
|
|
170
|
-
* List domains. Retrieve domains in a specific
|
|
176
|
+
* List domains. Retrieve domains in a specific Project or in a specific
|
|
171
177
|
* Organization using the `region` parameter.
|
|
172
178
|
*
|
|
173
179
|
* @param request - The request {@link ListDomainsRequest}
|
|
@@ -36,6 +36,18 @@ const unmarshalEmail = data => {
|
|
|
36
36
|
updatedAt: unmarshalDate(data.updated_at)
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
const unmarshalDomainReputation = data => {
|
|
40
|
+
if (!isJSONObject(data)) {
|
|
41
|
+
throw new TypeError(`Unmarshalling the type 'DomainReputation' failed as data isn't a dictionary.`);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
previousScore: data.previous_score,
|
|
45
|
+
previousScoredAt: unmarshalDate(data.previous_scored_at),
|
|
46
|
+
score: data.score,
|
|
47
|
+
scoredAt: unmarshalDate(data.scored_at),
|
|
48
|
+
status: data.status
|
|
49
|
+
};
|
|
50
|
+
};
|
|
39
51
|
const unmarshalDomainStatistics = data => {
|
|
40
52
|
if (!isJSONObject(data)) {
|
|
41
53
|
throw new TypeError(`Unmarshalling the type 'DomainStatistics' failed as data isn't a dictionary.`);
|
|
@@ -62,6 +74,7 @@ const unmarshalDomain = data => {
|
|
|
62
74
|
organizationId: data.organization_id,
|
|
63
75
|
projectId: data.project_id,
|
|
64
76
|
region: data.region,
|
|
77
|
+
reputation: data.reputation ? unmarshalDomainReputation(data.reputation) : undefined,
|
|
65
78
|
revokedAt: unmarshalDate(data.revoked_at),
|
|
66
79
|
spfConfig: data.spf_config,
|
|
67
80
|
statistics: data.statistics ? unmarshalDomainStatistics(data.statistics) : undefined,
|
|
@@ -35,6 +35,7 @@ const unmarshalIpamConfig = data => {
|
|
|
35
35
|
throw new TypeError(`Unmarshalling the type 'IpamConfig' failed as data isn't a dictionary.`);
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
|
+
ipamIpId: data.ipam_ip_id,
|
|
38
39
|
pushDefaultRoute: data.push_default_route
|
|
39
40
|
};
|
|
40
41
|
};
|
|
@@ -242,7 +243,8 @@ const marshalCreateDHCPEntryRequest = (request, defaults) => ({
|
|
|
242
243
|
ip_address: request.ipAddress,
|
|
243
244
|
mac_address: request.macAddress
|
|
244
245
|
});
|
|
245
|
-
const
|
|
246
|
+
const marshalCreateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
|
|
247
|
+
ipam_ip_id: request.ipamIpId,
|
|
246
248
|
push_default_route: request.pushDefaultRoute
|
|
247
249
|
});
|
|
248
250
|
const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
@@ -261,7 +263,7 @@ const marshalCreateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
261
263
|
value: request.address
|
|
262
264
|
}, {
|
|
263
265
|
param: 'ipam_config',
|
|
264
|
-
value: request.ipamConfig !== undefined ?
|
|
266
|
+
value: request.ipamConfig !== undefined ? marshalCreateGatewayNetworkRequestIpamConfig(request.ipamConfig) : undefined
|
|
265
267
|
}])
|
|
266
268
|
});
|
|
267
269
|
const marshalCreateGatewayRequest = (request, defaults) => ({
|
|
@@ -322,6 +324,10 @@ const marshalUpdateDHCPRequest = (request, defaults) => ({
|
|
|
322
324
|
subnet: request.subnet,
|
|
323
325
|
valid_lifetime: request.validLifetime
|
|
324
326
|
});
|
|
327
|
+
const marshalUpdateGatewayNetworkRequestIpamConfig = (request, defaults) => ({
|
|
328
|
+
ipam_ip_id: request.ipamIpId,
|
|
329
|
+
push_default_route: request.pushDefaultRoute
|
|
330
|
+
});
|
|
325
331
|
const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
326
332
|
enable_dhcp: request.enableDhcp,
|
|
327
333
|
enable_masquerade: request.enableMasquerade,
|
|
@@ -333,7 +339,7 @@ const marshalUpdateGatewayNetworkRequest = (request, defaults) => ({
|
|
|
333
339
|
value: request.address
|
|
334
340
|
}, {
|
|
335
341
|
param: 'ipam_config',
|
|
336
|
-
value: request.ipamConfig !== undefined ?
|
|
342
|
+
value: request.ipamConfig !== undefined ? marshalUpdateGatewayNetworkRequestIpamConfig(request.ipamConfig) : undefined
|
|
337
343
|
}])
|
|
338
344
|
});
|
|
339
345
|
const marshalUpdateGatewayRequest = (request, defaults) => ({
|