@scaleway/sdk 2.0.0-alpha.15 → 2.0.0-alpha.17
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/baremetal/v1/marshalling.gen.js +4 -4
- 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 +27 -1
- 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 +34 -32
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -7
- package/dist/api/jobs/index.js +2 -0
- package/dist/api/jobs/v1alpha1/api.gen.js +111 -0
- package/dist/api/jobs/v1alpha1/content.gen.js +7 -0
- package/dist/api/jobs/v1alpha1/index.gen.js +7 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +84 -0
- package/dist/api/jobs/v1alpha1/validation-rules.gen.js +45 -0
- package/dist/api/k8s/v1/marshalling.gen.js +4 -4
- package/dist/api/lb/v1/marshalling.gen.js +24 -24
- package/dist/api/rdb/v1/marshalling.gen.js +11 -4
- package/dist/api/registry/v1/marshalling.gen.js +4 -4
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +6 -1
- 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/test/v1/marshalling.gen.js +4 -4
- package/dist/api/vpcgw/v1/marshalling.gen.js +9 -3
- package/dist/index.cjs +873 -472
- package/dist/index.d.ts +2032 -1396
- package/dist/index.js +30 -26
- package/dist/node_modules/@scaleway/random-name/dist/index.js +13 -0
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { API as API$1 } from '../../../scw/api.js';
|
|
2
|
+
import { unmarshalServiceInfo } from '../../../scw/custom-marshalling.js';
|
|
3
|
+
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
+
import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
|
|
5
|
+
import { marshalCreateJobDefinitionRequest, unmarshalJobDefinition, unmarshalListJobDefinitionsResponse, marshalUpdateJobDefinitionRequest, unmarshalJobRun, unmarshalListJobRunsResponse } from './marshalling.gen.js';
|
|
6
|
+
|
|
7
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
8
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
9
|
+
const jsonContentHeaders = {
|
|
10
|
+
'Content-Type': 'application/json; charset=utf-8'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** Serverless Jobs API. */
|
|
14
|
+
class API extends API$1 {
|
|
15
|
+
/** Lists the available regions of the API. */
|
|
16
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
17
|
+
getServiceInfo = (() => {
|
|
18
|
+
var _this = this;
|
|
19
|
+
return function (request) {
|
|
20
|
+
if (request === void 0) {
|
|
21
|
+
request = {};
|
|
22
|
+
}
|
|
23
|
+
return _this.client.fetch({
|
|
24
|
+
method: 'GET',
|
|
25
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}`
|
|
26
|
+
}, unmarshalServiceInfo);
|
|
27
|
+
};
|
|
28
|
+
})();
|
|
29
|
+
createJobDefinition = request => this.client.fetch({
|
|
30
|
+
body: JSON.stringify(marshalCreateJobDefinitionRequest(request, this.client.settings)),
|
|
31
|
+
headers: jsonContentHeaders,
|
|
32
|
+
method: 'POST',
|
|
33
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions`
|
|
34
|
+
}, unmarshalJobDefinition);
|
|
35
|
+
getJobDefinition = request => this.client.fetch({
|
|
36
|
+
method: 'GET',
|
|
37
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}`
|
|
38
|
+
}, unmarshalJobDefinition);
|
|
39
|
+
pageOfListJobDefinitions = (() => {
|
|
40
|
+
var _this2 = this;
|
|
41
|
+
return function (request) {
|
|
42
|
+
if (request === void 0) {
|
|
43
|
+
request = {};
|
|
44
|
+
}
|
|
45
|
+
return _this2.client.fetch({
|
|
46
|
+
method: 'GET',
|
|
47
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? _this2.client.settings.defaultRegion)}/job-definitions`,
|
|
48
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
49
|
+
}, unmarshalListJobDefinitionsResponse);
|
|
50
|
+
};
|
|
51
|
+
})();
|
|
52
|
+
listJobDefinitions = (() => {
|
|
53
|
+
var _this3 = this;
|
|
54
|
+
return function (request) {
|
|
55
|
+
if (request === void 0) {
|
|
56
|
+
request = {};
|
|
57
|
+
}
|
|
58
|
+
return enrichForPagination('jobDefinitions', _this3.pageOfListJobDefinitions, request);
|
|
59
|
+
};
|
|
60
|
+
})();
|
|
61
|
+
updateJobDefinition = request => this.client.fetch({
|
|
62
|
+
body: JSON.stringify(marshalUpdateJobDefinitionRequest(request, this.client.settings)),
|
|
63
|
+
headers: jsonContentHeaders,
|
|
64
|
+
method: 'PATCH',
|
|
65
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}`
|
|
66
|
+
}, unmarshalJobDefinition);
|
|
67
|
+
deleteJobDefinition = request => this.client.fetch({
|
|
68
|
+
method: 'DELETE',
|
|
69
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}`
|
|
70
|
+
});
|
|
71
|
+
startJobDefinition = request => this.client.fetch({
|
|
72
|
+
body: '{}',
|
|
73
|
+
headers: jsonContentHeaders,
|
|
74
|
+
method: 'POST',
|
|
75
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-definitions/${validatePathParam('jobDefinitionId', request.jobDefinitionId)}/start`
|
|
76
|
+
}, unmarshalJobRun);
|
|
77
|
+
getJobRun = request => this.client.fetch({
|
|
78
|
+
method: 'GET',
|
|
79
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}`
|
|
80
|
+
}, unmarshalJobRun);
|
|
81
|
+
stopJobRun = request => this.client.fetch({
|
|
82
|
+
body: '{}',
|
|
83
|
+
headers: jsonContentHeaders,
|
|
84
|
+
method: 'POST',
|
|
85
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/job-runs/${validatePathParam('jobRunId', request.jobRunId)}/stop`
|
|
86
|
+
}, unmarshalJobRun);
|
|
87
|
+
pageOfListJobRuns = (() => {
|
|
88
|
+
var _this4 = this;
|
|
89
|
+
return function (request) {
|
|
90
|
+
if (request === void 0) {
|
|
91
|
+
request = {};
|
|
92
|
+
}
|
|
93
|
+
return _this4.client.fetch({
|
|
94
|
+
method: 'GET',
|
|
95
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/job-runs`,
|
|
96
|
+
urlParams: urlParams(['job_definition_id', request.jobDefinitionId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
97
|
+
}, unmarshalListJobRunsResponse);
|
|
98
|
+
};
|
|
99
|
+
})();
|
|
100
|
+
listJobRuns = (() => {
|
|
101
|
+
var _this5 = this;
|
|
102
|
+
return function (request) {
|
|
103
|
+
if (request === void 0) {
|
|
104
|
+
request = {};
|
|
105
|
+
}
|
|
106
|
+
return enrichForPagination('jobRuns', _this5.pageOfListJobRuns, request);
|
|
107
|
+
};
|
|
108
|
+
})();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { API };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
/** Lists transient statutes of the enum {@link JobRunState}. */
|
|
5
|
+
const JOB_RUN_TRANSIENT_STATUSES = ['queued', 'scheduled', 'running'];
|
|
6
|
+
|
|
7
|
+
export { JOB_RUN_TRANSIENT_STATUSES };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export { JOB_RUN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
3
|
+
import * as validationRules_gen from './validation-rules.gen.js';
|
|
4
|
+
export { validationRules_gen as ValidationRules };
|
|
5
|
+
|
|
6
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
2
|
+
import { isJSONObject } from '../../../helpers/json.js';
|
|
3
|
+
import { unmarshalDate, unmarshalArrayOfObject } from '../../../helpers/marshalling.js';
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
6
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
+
const unmarshalJobDefinition = data => {
|
|
8
|
+
if (!isJSONObject(data)) {
|
|
9
|
+
throw new TypeError(`Unmarshalling the type 'JobDefinition' failed as data isn't a dictionary.`);
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
command: data.command,
|
|
13
|
+
cpuLimit: data.cpu_limit,
|
|
14
|
+
createdAt: unmarshalDate(data.created_at),
|
|
15
|
+
description: data.description,
|
|
16
|
+
environmentVariables: data.environment_variables,
|
|
17
|
+
imageUri: data.image_uri,
|
|
18
|
+
jobDefinitionId: data.job_definition_id,
|
|
19
|
+
jobTimeout: data.job_timeout,
|
|
20
|
+
memoryLimit: data.memory_limit,
|
|
21
|
+
name: data.name,
|
|
22
|
+
projectId: data.project_id,
|
|
23
|
+
region: data.region,
|
|
24
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
const unmarshalJobRun = data => {
|
|
28
|
+
if (!isJSONObject(data)) {
|
|
29
|
+
throw new TypeError(`Unmarshalling the type 'JobRun' failed as data isn't a dictionary.`);
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
createdAt: unmarshalDate(data.created_at),
|
|
33
|
+
errorMessage: data.error_message,
|
|
34
|
+
exitCode: data.exit_code,
|
|
35
|
+
jobDefinitionId: data.job_definition_id,
|
|
36
|
+
jobRunId: data.job_run_id,
|
|
37
|
+
region: data.region,
|
|
38
|
+
runDuration: data.run_duration,
|
|
39
|
+
state: data.state,
|
|
40
|
+
terminatedAt: unmarshalDate(data.terminated_at),
|
|
41
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
const unmarshalListJobDefinitionsResponse = data => {
|
|
45
|
+
if (!isJSONObject(data)) {
|
|
46
|
+
throw new TypeError(`Unmarshalling the type 'ListJobDefinitionsResponse' failed as data isn't a dictionary.`);
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
jobDefinitions: unmarshalArrayOfObject(data.job_definitions, unmarshalJobDefinition),
|
|
50
|
+
totalCount: data.total_count
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const unmarshalListJobRunsResponse = data => {
|
|
54
|
+
if (!isJSONObject(data)) {
|
|
55
|
+
throw new TypeError(`Unmarshalling the type 'ListJobRunsResponse' failed as data isn't a dictionary.`);
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
jobRuns: unmarshalArrayOfObject(data.job_runs, unmarshalJobRun),
|
|
59
|
+
totalCount: data.total_count
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
const marshalCreateJobDefinitionRequest = (request, defaults) => ({
|
|
63
|
+
command: request.command,
|
|
64
|
+
cpu_limit: request.cpuLimit,
|
|
65
|
+
description: request.description,
|
|
66
|
+
environment_variables: request.environmentVariables !== undefined ? request.environmentVariables : undefined,
|
|
67
|
+
image_uri: request.imageUri,
|
|
68
|
+
job_timeout: request.jobTimeout,
|
|
69
|
+
memory_limit: request.memoryLimit,
|
|
70
|
+
name: request.name || randomName('job'),
|
|
71
|
+
project_id: request.projectId ?? defaults.defaultProjectId
|
|
72
|
+
});
|
|
73
|
+
const marshalUpdateJobDefinitionRequest = (request, defaults) => ({
|
|
74
|
+
command: request.command,
|
|
75
|
+
cpu_limit: request.cpuLimit,
|
|
76
|
+
description: request.description,
|
|
77
|
+
environment_variables: request.environmentVariables,
|
|
78
|
+
image_uri: request.imageUri,
|
|
79
|
+
job_timeout: request.jobTimeout,
|
|
80
|
+
memory_limit: request.memoryLimit,
|
|
81
|
+
name: request.name
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export { marshalCreateJobDefinitionRequest, marshalUpdateJobDefinitionRequest, unmarshalJobDefinition, unmarshalJobRun, unmarshalListJobDefinitionsResponse, unmarshalListJobRunsResponse };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// This file was automatically generated. DO NOT EDIT.
|
|
2
|
+
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
3
|
+
|
|
4
|
+
const CreateJobDefinitionRequest = {
|
|
5
|
+
cpuLimit: {
|
|
6
|
+
greaterThan: 0
|
|
7
|
+
},
|
|
8
|
+
memoryLimit: {
|
|
9
|
+
greaterThan: 0
|
|
10
|
+
},
|
|
11
|
+
name: {
|
|
12
|
+
minLength: 3
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const ListJobDefinitionsRequest = {
|
|
16
|
+
page: {
|
|
17
|
+
greaterThanOrEqual: 1
|
|
18
|
+
},
|
|
19
|
+
pageSize: {
|
|
20
|
+
greaterThanOrEqual: 1,
|
|
21
|
+
lessThanOrEqual: 1000
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const ListJobRunsRequest = {
|
|
25
|
+
page: {
|
|
26
|
+
greaterThanOrEqual: 1
|
|
27
|
+
},
|
|
28
|
+
pageSize: {
|
|
29
|
+
greaterThanOrEqual: 1,
|
|
30
|
+
lessThanOrEqual: 1000
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const UpdateJobDefinitionRequest = {
|
|
34
|
+
cpuLimit: {
|
|
35
|
+
greaterThan: 0
|
|
36
|
+
},
|
|
37
|
+
memoryLimit: {
|
|
38
|
+
greaterThan: 0
|
|
39
|
+
},
|
|
40
|
+
name: {
|
|
41
|
+
minLength: 3
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { CreateJobDefinitionRequest, ListJobDefinitionsRequest, ListJobRunsRequest, UpdateJobDefinitionRequest };
|
|
@@ -321,13 +321,13 @@ const marshalCreateClusterRequest = (request, defaults) => ({
|
|
|
321
321
|
type: request.type,
|
|
322
322
|
version: request.version,
|
|
323
323
|
...resolveOneOf([{
|
|
324
|
-
default: defaults.defaultOrganizationId,
|
|
325
|
-
param: 'organization_id',
|
|
326
|
-
value: request.organizationId
|
|
327
|
-
}, {
|
|
328
324
|
default: defaults.defaultProjectId,
|
|
329
325
|
param: 'project_id',
|
|
330
326
|
value: request.projectId
|
|
327
|
+
}, {
|
|
328
|
+
default: defaults.defaultOrganizationId,
|
|
329
|
+
param: 'organization_id',
|
|
330
|
+
value: request.organizationId
|
|
331
331
|
}])
|
|
332
332
|
});
|
|
333
333
|
const marshalCreatePoolRequestUpgradePolicy = (request, defaults) => ({
|
|
@@ -631,13 +631,13 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
|
|
|
631
631
|
const marshalCreateIpRequest = (request, defaults) => ({
|
|
632
632
|
reverse: request.reverse,
|
|
633
633
|
...resolveOneOf([{
|
|
634
|
-
default: defaults.defaultOrganizationId,
|
|
635
|
-
param: 'organization_id',
|
|
636
|
-
value: request.organizationId
|
|
637
|
-
}, {
|
|
638
634
|
default: defaults.defaultProjectId,
|
|
639
635
|
param: 'project_id',
|
|
640
636
|
value: request.projectId
|
|
637
|
+
}, {
|
|
638
|
+
default: defaults.defaultOrganizationId,
|
|
639
|
+
param: 'organization_id',
|
|
640
|
+
value: request.organizationId
|
|
641
641
|
}])
|
|
642
642
|
});
|
|
643
643
|
const marshalCreateLbRequest = (request, defaults) => ({
|
|
@@ -649,13 +649,13 @@ const marshalCreateLbRequest = (request, defaults) => ({
|
|
|
649
649
|
tags: request.tags,
|
|
650
650
|
type: request.type,
|
|
651
651
|
...resolveOneOf([{
|
|
652
|
-
default: defaults.defaultOrganizationId,
|
|
653
|
-
param: 'organization_id',
|
|
654
|
-
value: request.organizationId
|
|
655
|
-
}, {
|
|
656
652
|
default: defaults.defaultProjectId,
|
|
657
653
|
param: 'project_id',
|
|
658
654
|
value: request.projectId
|
|
655
|
+
}, {
|
|
656
|
+
default: defaults.defaultOrganizationId,
|
|
657
|
+
param: 'organization_id',
|
|
658
|
+
value: request.organizationId
|
|
659
659
|
}])
|
|
660
660
|
});
|
|
661
661
|
const marshalRouteMatch = (request, defaults) => ({
|
|
@@ -681,13 +681,13 @@ const marshalSubscriberWebhookConfig = (request, defaults) => ({
|
|
|
681
681
|
const marshalCreateSubscriberRequest = (request, defaults) => ({
|
|
682
682
|
name: request.name,
|
|
683
683
|
...resolveOneOf([{
|
|
684
|
-
default: defaults.defaultOrganizationId,
|
|
685
|
-
param: 'organization_id',
|
|
686
|
-
value: request.organizationId
|
|
687
|
-
}, {
|
|
688
684
|
default: defaults.defaultProjectId,
|
|
689
685
|
param: 'project_id',
|
|
690
686
|
value: request.projectId
|
|
687
|
+
}, {
|
|
688
|
+
default: defaults.defaultOrganizationId,
|
|
689
|
+
param: 'organization_id',
|
|
690
|
+
value: request.organizationId
|
|
691
691
|
}]),
|
|
692
692
|
...resolveOneOf([{
|
|
693
693
|
param: 'email_config',
|
|
@@ -869,13 +869,13 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
|
|
|
869
869
|
const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
870
870
|
reverse: request.reverse,
|
|
871
871
|
...resolveOneOf([{
|
|
872
|
-
default: defaults.defaultOrganizationId,
|
|
873
|
-
param: 'organization_id',
|
|
874
|
-
value: request.organizationId
|
|
875
|
-
}, {
|
|
876
872
|
default: defaults.defaultProjectId,
|
|
877
873
|
param: 'project_id',
|
|
878
874
|
value: request.projectId
|
|
875
|
+
}, {
|
|
876
|
+
default: defaults.defaultOrganizationId,
|
|
877
|
+
param: 'organization_id',
|
|
878
|
+
value: request.organizationId
|
|
879
879
|
}])
|
|
880
880
|
});
|
|
881
881
|
const marshalZonedApiCreateLbRequest = (request, defaults) => ({
|
|
@@ -887,13 +887,13 @@ const marshalZonedApiCreateLbRequest = (request, defaults) => ({
|
|
|
887
887
|
tags: request.tags,
|
|
888
888
|
type: request.type,
|
|
889
889
|
...resolveOneOf([{
|
|
890
|
-
default: defaults.defaultOrganizationId,
|
|
891
|
-
param: 'organization_id',
|
|
892
|
-
value: request.organizationId
|
|
893
|
-
}, {
|
|
894
890
|
default: defaults.defaultProjectId,
|
|
895
891
|
param: 'project_id',
|
|
896
892
|
value: request.projectId
|
|
893
|
+
}, {
|
|
894
|
+
default: defaults.defaultOrganizationId,
|
|
895
|
+
param: 'organization_id',
|
|
896
|
+
value: request.organizationId
|
|
897
897
|
}])
|
|
898
898
|
});
|
|
899
899
|
const marshalZonedApiCreateRouteRequest = (request, defaults) => ({
|
|
@@ -904,13 +904,13 @@ const marshalZonedApiCreateRouteRequest = (request, defaults) => ({
|
|
|
904
904
|
const marshalZonedApiCreateSubscriberRequest = (request, defaults) => ({
|
|
905
905
|
name: request.name,
|
|
906
906
|
...resolveOneOf([{
|
|
907
|
-
default: defaults.defaultOrganizationId,
|
|
908
|
-
param: 'organization_id',
|
|
909
|
-
value: request.organizationId
|
|
910
|
-
}, {
|
|
911
907
|
default: defaults.defaultProjectId,
|
|
912
908
|
param: 'project_id',
|
|
913
909
|
value: request.projectId
|
|
910
|
+
}, {
|
|
911
|
+
default: defaults.defaultOrganizationId,
|
|
912
|
+
param: 'organization_id',
|
|
913
|
+
value: request.organizationId
|
|
914
914
|
}]),
|
|
915
915
|
...resolveOneOf([{
|
|
916
916
|
param: 'email_config',
|
|
@@ -568,13 +568,13 @@ const marshalCreateInstanceRequest = (request, defaults) => ({
|
|
|
568
568
|
volume_size: request.volumeSize,
|
|
569
569
|
volume_type: request.volumeType,
|
|
570
570
|
...resolveOneOf([{
|
|
571
|
-
default: defaults.defaultOrganizationId,
|
|
572
|
-
param: 'organization_id',
|
|
573
|
-
value: request.organizationId
|
|
574
|
-
}, {
|
|
575
571
|
default: defaults.defaultProjectId,
|
|
576
572
|
param: 'project_id',
|
|
577
573
|
value: request.projectId
|
|
574
|
+
}, {
|
|
575
|
+
default: defaults.defaultOrganizationId,
|
|
576
|
+
param: 'organization_id',
|
|
577
|
+
value: request.organizationId
|
|
578
578
|
}])
|
|
579
579
|
});
|
|
580
580
|
const marshalReadReplicaEndpointSpecPrivateNetworkIpamConfig = (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
|
|
|
@@ -88,13 +88,13 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
88
88
|
is_public: request.isPublic,
|
|
89
89
|
name: request.name || randomName('ns'),
|
|
90
90
|
...resolveOneOf([{
|
|
91
|
-
default: defaults.defaultOrganizationId,
|
|
92
|
-
param: 'organization_id',
|
|
93
|
-
value: request.organizationId
|
|
94
|
-
}, {
|
|
95
91
|
default: defaults.defaultProjectId,
|
|
96
92
|
param: 'project_id',
|
|
97
93
|
value: request.projectId
|
|
94
|
+
}, {
|
|
95
|
+
default: defaults.defaultOrganizationId,
|
|
96
|
+
param: 'organization_id',
|
|
97
|
+
value: request.organizationId
|
|
98
98
|
}])
|
|
99
99
|
});
|
|
100
100
|
const marshalUpdateImageRequest = (request, defaults) => ({
|
|
@@ -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
|
})();
|
|
@@ -12,7 +12,8 @@ const unmarshalFolder = data => {
|
|
|
12
12
|
id: data.id,
|
|
13
13
|
name: data.name,
|
|
14
14
|
path: data.path,
|
|
15
|
-
projectId: data.project_id
|
|
15
|
+
projectId: data.project_id,
|
|
16
|
+
region: data.region
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
const unmarshalSecretVersion = data => {
|
|
@@ -36,6 +37,8 @@ const unmarshalSecret = data => {
|
|
|
36
37
|
return {
|
|
37
38
|
createdAt: unmarshalDate(data.created_at),
|
|
38
39
|
description: data.description,
|
|
40
|
+
ephemeralAction: data.ephemeral_action,
|
|
41
|
+
expiresAt: unmarshalDate(data.expires_at),
|
|
39
42
|
id: data.id,
|
|
40
43
|
isManaged: data.is_managed,
|
|
41
44
|
isProtected: data.is_protected,
|
|
@@ -108,6 +111,8 @@ const marshalCreateFolderRequest = (request, defaults) => ({
|
|
|
108
111
|
});
|
|
109
112
|
const marshalCreateSecretRequest = (request, defaults) => ({
|
|
110
113
|
description: request.description,
|
|
114
|
+
ephemeral_action: request.ephemeralAction,
|
|
115
|
+
expires_at: request.expiresAt,
|
|
111
116
|
name: request.name,
|
|
112
117
|
path: request.path,
|
|
113
118
|
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,
|
|
@@ -54,13 +54,13 @@ const marshalCreateHumanRequest = (request, defaults) => ({
|
|
|
54
54
|
name: request.name,
|
|
55
55
|
shoe_size: request.shoeSize,
|
|
56
56
|
...resolveOneOf([{
|
|
57
|
-
default: defaults.defaultOrganizationId,
|
|
58
|
-
param: 'organization_id',
|
|
59
|
-
value: request.organizationId
|
|
60
|
-
}, {
|
|
61
57
|
default: defaults.defaultProjectId,
|
|
62
58
|
param: 'project_id',
|
|
63
59
|
value: request.projectId
|
|
60
|
+
}, {
|
|
61
|
+
default: defaults.defaultOrganizationId,
|
|
62
|
+
param: 'organization_id',
|
|
63
|
+
value: request.organizationId
|
|
64
64
|
}])
|
|
65
65
|
});
|
|
66
66
|
const marshalRegisterRequest = (request, defaults) => ({
|
|
@@ -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) => ({
|