@scaleway/sdk 2.32.0 → 2.33.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.
- package/dist/api/function/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/instance/v1/marshalling.gen.cjs +1 -0
- package/dist/api/instance/v1/marshalling.gen.js +1 -0
- package/dist/api/instance/v1/types.gen.d.ts +6 -1
- package/dist/api/jobs/v1alpha1/api.gen.cjs +13 -0
- package/dist/api/jobs/v1alpha1/api.gen.d.ts +8 -1
- package/dist/api/jobs/v1alpha1/api.gen.js +14 -1
- package/dist/api/jobs/v1alpha1/index.gen.d.ts +1 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +22 -0
- package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +2 -1
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +22 -0
- package/dist/api/jobs/v1alpha1/types.gen.d.ts +14 -0
- package/dist/api/key_manager/v1alpha1/types.gen.d.ts +6 -2
- package/dist/api/tem/v1alpha1/api.gen.cjs +1 -0
- package/dist/api/tem/v1alpha1/api.gen.js +1 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +2 -0
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ export type CronStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' |
|
|
|
3
3
|
export type DomainStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'creating' | 'pending';
|
|
4
4
|
export type FunctionHttpOption = 'unknown_http_option' | 'enabled' | 'redirected';
|
|
5
5
|
export type FunctionPrivacy = 'unknown_privacy' | 'public' | 'private';
|
|
6
|
-
export type FunctionRuntime = 'unknown_runtime' | 'golang' | 'python' | 'python3' | 'node8' | 'node10' | 'node14' | 'node16' | 'node17' | 'python37' | 'python38' | 'python39' | 'python310' | 'go113' | 'go117' | 'go118' | 'node18' | 'rust165' | 'go119' | 'python311' | 'php82' | 'node19' | 'go120' | 'node20' | 'go121';
|
|
6
|
+
export type FunctionRuntime = 'unknown_runtime' | 'golang' | 'python' | 'python3' | 'node8' | 'node10' | 'node14' | 'node16' | 'node17' | 'python37' | 'python38' | 'python39' | 'python310' | 'go113' | 'go117' | 'go118' | 'node18' | 'rust165' | 'go119' | 'python311' | 'php82' | 'node19' | 'go120' | 'node20' | 'go121' | 'node22' | 'python312' | 'php83' | 'go122' | 'rust178';
|
|
7
7
|
export type FunctionStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked' | 'creating' | 'pending' | 'created';
|
|
8
8
|
export type ListCronsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
9
9
|
export type ListDomainsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'hostname_asc' | 'hostname_desc';
|
|
@@ -1239,6 +1239,7 @@ const marshalCreatePlacementGroupRequest = (request, defaults) => ({
|
|
|
1239
1239
|
});
|
|
1240
1240
|
const marshalCreatePrivateNICRequest = (request, defaults) => ({
|
|
1241
1241
|
ip_ids: request.ipIds,
|
|
1242
|
+
ipam_ip_ids: request.ipamIpIds,
|
|
1242
1243
|
private_network_id: request.privateNetworkId,
|
|
1243
1244
|
tags: request.tags
|
|
1244
1245
|
});
|
|
@@ -1237,6 +1237,7 @@ const marshalCreatePlacementGroupRequest = (request, defaults) => ({
|
|
|
1237
1237
|
});
|
|
1238
1238
|
const marshalCreatePrivateNICRequest = (request, defaults) => ({
|
|
1239
1239
|
ip_ids: request.ipIds,
|
|
1240
|
+
ipam_ip_ids: request.ipamIpIds,
|
|
1240
1241
|
private_network_id: request.privateNetworkId,
|
|
1241
1242
|
tags: request.tags
|
|
1242
1243
|
});
|
|
@@ -761,8 +761,13 @@ export type CreatePrivateNICRequest = {
|
|
|
761
761
|
privateNetworkId: string;
|
|
762
762
|
/** Private NIC tags. */
|
|
763
763
|
tags?: string[];
|
|
764
|
-
/** Ip_ids defined from IPAM. */
|
|
764
|
+
/** @deprecated Ip_ids defined from IPAM. */
|
|
765
765
|
ipIds?: string[];
|
|
766
|
+
/**
|
|
767
|
+
* UUID of IPAM ips, to be attached to the instance in the requested private
|
|
768
|
+
* network.
|
|
769
|
+
*/
|
|
770
|
+
ipamIpIds?: string[];
|
|
766
771
|
};
|
|
767
772
|
export interface CreatePrivateNICResponse {
|
|
768
773
|
privateNic?: PrivateNIC;
|
|
@@ -166,5 +166,18 @@ class API extends api.API {
|
|
|
166
166
|
* @returns A Promise of ListJobRunsResponse
|
|
167
167
|
*/
|
|
168
168
|
listJobRuns = (request = {}) => resourcePaginator.enrichForPagination("jobRuns", this.pageOfListJobRuns, request);
|
|
169
|
+
/**
|
|
170
|
+
* List jobs resources for the console.
|
|
171
|
+
*
|
|
172
|
+
* @param request - The request {@link ListJobsResourcesRequest}
|
|
173
|
+
* @returns A Promise of ListJobsResourcesResponse
|
|
174
|
+
*/
|
|
175
|
+
listJobsResources = (request = {}) => this.client.fetch(
|
|
176
|
+
{
|
|
177
|
+
method: "GET",
|
|
178
|
+
path: `/serverless-jobs/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/jobs-resources`
|
|
179
|
+
},
|
|
180
|
+
marshalling_gen.unmarshalListJobsResourcesResponse
|
|
181
|
+
);
|
|
169
182
|
}
|
|
170
183
|
exports.API = API;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region } from '../../../bridge';
|
|
3
|
-
import type { CreateJobDefinitionRequest, DeleteJobDefinitionRequest, GetJobDefinitionRequest, GetJobRunRequest, JobDefinition, JobRun, ListJobDefinitionsRequest, ListJobDefinitionsResponse, ListJobRunsRequest, ListJobRunsResponse, StartJobDefinitionRequest, StartJobDefinitionResponse, StopJobRunRequest, UpdateJobDefinitionRequest } from './types.gen';
|
|
3
|
+
import type { CreateJobDefinitionRequest, DeleteJobDefinitionRequest, GetJobDefinitionRequest, GetJobRunRequest, JobDefinition, JobRun, ListJobDefinitionsRequest, ListJobDefinitionsResponse, ListJobRunsRequest, ListJobRunsResponse, ListJobsResourcesRequest, ListJobsResourcesResponse, StartJobDefinitionRequest, StartJobDefinitionResponse, StopJobRunRequest, UpdateJobDefinitionRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Serverless Jobs API.
|
|
6
6
|
*
|
|
@@ -81,4 +81,11 @@ export declare class API extends ParentAPI {
|
|
|
81
81
|
all: () => Promise<JobRun[]>;
|
|
82
82
|
[Symbol.asyncIterator]: () => AsyncGenerator<JobRun[], void, void>;
|
|
83
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* List jobs resources for the console.
|
|
86
|
+
*
|
|
87
|
+
* @param request - The request {@link ListJobsResourcesRequest}
|
|
88
|
+
* @returns A Promise of ListJobsResourcesResponse
|
|
89
|
+
*/
|
|
90
|
+
listJobsResources: (request?: Readonly<ListJobsResourcesRequest>) => Promise<ListJobsResourcesResponse>;
|
|
84
91
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { API as API$1 } from "../../../scw/api.js";
|
|
2
2
|
import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
3
3
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
4
|
-
import { marshalCreateJobDefinitionRequest, unmarshalJobDefinition, unmarshalListJobDefinitionsResponse, marshalUpdateJobDefinitionRequest, marshalStartJobDefinitionRequest, unmarshalStartJobDefinitionResponse, unmarshalJobRun, unmarshalListJobRunsResponse } from "./marshalling.gen.js";
|
|
4
|
+
import { marshalCreateJobDefinitionRequest, unmarshalJobDefinition, unmarshalListJobDefinitionsResponse, marshalUpdateJobDefinitionRequest, marshalStartJobDefinitionRequest, unmarshalStartJobDefinitionResponse, unmarshalJobRun, unmarshalListJobRunsResponse, unmarshalListJobsResourcesResponse } from "./marshalling.gen.js";
|
|
5
5
|
const jsonContentHeaders = {
|
|
6
6
|
"Content-Type": "application/json; charset=utf-8"
|
|
7
7
|
};
|
|
@@ -164,6 +164,19 @@ class API extends API$1 {
|
|
|
164
164
|
* @returns A Promise of ListJobRunsResponse
|
|
165
165
|
*/
|
|
166
166
|
listJobRuns = (request = {}) => enrichForPagination("jobRuns", this.pageOfListJobRuns, request);
|
|
167
|
+
/**
|
|
168
|
+
* List jobs resources for the console.
|
|
169
|
+
*
|
|
170
|
+
* @param request - The request {@link ListJobsResourcesRequest}
|
|
171
|
+
* @returns A Promise of ListJobsResourcesResponse
|
|
172
|
+
*/
|
|
173
|
+
listJobsResources = (request = {}) => this.client.fetch(
|
|
174
|
+
{
|
|
175
|
+
method: "GET",
|
|
176
|
+
path: `/serverless-jobs/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/jobs-resources`
|
|
177
|
+
},
|
|
178
|
+
unmarshalListJobsResourcesResponse
|
|
179
|
+
);
|
|
167
180
|
}
|
|
168
181
|
export {
|
|
169
182
|
API
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { API } from './api.gen';
|
|
2
2
|
export * from './content.gen';
|
|
3
|
-
export type { CreateJobDefinitionRequest, CreateJobDefinitionRequestCronScheduleConfig, CronSchedule, DeleteJobDefinitionRequest, GetJobDefinitionRequest, GetJobRunRequest, JobDefinition, JobRun, JobRunState, ListJobDefinitionsRequest, ListJobDefinitionsRequestOrderBy, ListJobDefinitionsResponse, ListJobRunsRequest, ListJobRunsRequestOrderBy, ListJobRunsResponse, StartJobDefinitionRequest, StartJobDefinitionResponse, StopJobRunRequest, UpdateJobDefinitionRequest, UpdateJobDefinitionRequestCronScheduleConfig, } from './types.gen';
|
|
3
|
+
export type { CreateJobDefinitionRequest, CreateJobDefinitionRequestCronScheduleConfig, CronSchedule, DeleteJobDefinitionRequest, GetJobDefinitionRequest, GetJobRunRequest, JobDefinition, JobRun, JobRunState, ListJobDefinitionsRequest, ListJobDefinitionsRequestOrderBy, ListJobDefinitionsResponse, ListJobRunsRequest, ListJobRunsRequestOrderBy, ListJobRunsResponse, ListJobsResourcesRequest, ListJobsResourcesResponse, Resource, StartJobDefinitionRequest, StartJobDefinitionResponse, StopJobRunRequest, UpdateJobDefinitionRequest, UpdateJobDefinitionRequestCronScheduleConfig, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -88,6 +88,27 @@ const unmarshalListJobRunsResponse = (data) => {
|
|
|
88
88
|
totalCount: data.total_count
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
+
const unmarshalResource = (data) => {
|
|
92
|
+
if (!json.isJSONObject(data)) {
|
|
93
|
+
throw new TypeError(
|
|
94
|
+
`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
cpuLimit: data.cpu_limit,
|
|
99
|
+
memoryLimit: data.memory_limit
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
const unmarshalListJobsResourcesResponse = (data) => {
|
|
103
|
+
if (!json.isJSONObject(data)) {
|
|
104
|
+
throw new TypeError(
|
|
105
|
+
`Unmarshalling the type 'ListJobsResourcesResponse' failed as data isn't a dictionary.`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
resources: marshalling.unmarshalArrayOfObject(data.resources, unmarshalResource)
|
|
110
|
+
};
|
|
111
|
+
};
|
|
91
112
|
const unmarshalStartJobDefinitionResponse = (data) => {
|
|
92
113
|
if (!json.isJSONObject(data)) {
|
|
93
114
|
throw new TypeError(
|
|
@@ -147,4 +168,5 @@ exports.unmarshalJobDefinition = unmarshalJobDefinition;
|
|
|
147
168
|
exports.unmarshalJobRun = unmarshalJobRun;
|
|
148
169
|
exports.unmarshalListJobDefinitionsResponse = unmarshalListJobDefinitionsResponse;
|
|
149
170
|
exports.unmarshalListJobRunsResponse = unmarshalListJobRunsResponse;
|
|
171
|
+
exports.unmarshalListJobsResourcesResponse = unmarshalListJobsResourcesResponse;
|
|
150
172
|
exports.unmarshalStartJobDefinitionResponse = unmarshalStartJobDefinitionResponse;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateJobDefinitionRequest, JobDefinition, JobRun, ListJobDefinitionsResponse, ListJobRunsResponse, StartJobDefinitionRequest, StartJobDefinitionResponse, UpdateJobDefinitionRequest } from './types.gen';
|
|
2
|
+
import type { CreateJobDefinitionRequest, JobDefinition, JobRun, ListJobDefinitionsResponse, ListJobRunsResponse, ListJobsResourcesResponse, StartJobDefinitionRequest, StartJobDefinitionResponse, UpdateJobDefinitionRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalJobDefinition: (data: unknown) => JobDefinition;
|
|
4
4
|
export declare const unmarshalJobRun: (data: unknown) => JobRun;
|
|
5
5
|
export declare const unmarshalListJobDefinitionsResponse: (data: unknown) => ListJobDefinitionsResponse;
|
|
6
6
|
export declare const unmarshalListJobRunsResponse: (data: unknown) => ListJobRunsResponse;
|
|
7
|
+
export declare const unmarshalListJobsResourcesResponse: (data: unknown) => ListJobsResourcesResponse;
|
|
7
8
|
export declare const unmarshalStartJobDefinitionResponse: (data: unknown) => StartJobDefinitionResponse;
|
|
8
9
|
export declare const marshalCreateJobDefinitionRequest: (request: CreateJobDefinitionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
9
10
|
export declare const marshalStartJobDefinitionRequest: (request: StartJobDefinitionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -86,6 +86,27 @@ const unmarshalListJobRunsResponse = (data) => {
|
|
|
86
86
|
totalCount: data.total_count
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
|
+
const unmarshalResource = (data) => {
|
|
90
|
+
if (!isJSONObject(data)) {
|
|
91
|
+
throw new TypeError(
|
|
92
|
+
`Unmarshalling the type 'Resource' failed as data isn't a dictionary.`
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
cpuLimit: data.cpu_limit,
|
|
97
|
+
memoryLimit: data.memory_limit
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
const unmarshalListJobsResourcesResponse = (data) => {
|
|
101
|
+
if (!isJSONObject(data)) {
|
|
102
|
+
throw new TypeError(
|
|
103
|
+
`Unmarshalling the type 'ListJobsResourcesResponse' failed as data isn't a dictionary.`
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
resources: unmarshalArrayOfObject(data.resources, unmarshalResource)
|
|
108
|
+
};
|
|
109
|
+
};
|
|
89
110
|
const unmarshalStartJobDefinitionResponse = (data) => {
|
|
90
111
|
if (!isJSONObject(data)) {
|
|
91
112
|
throw new TypeError(
|
|
@@ -146,5 +167,6 @@ export {
|
|
|
146
167
|
unmarshalJobRun,
|
|
147
168
|
unmarshalListJobDefinitionsResponse,
|
|
148
169
|
unmarshalListJobRunsResponse,
|
|
170
|
+
unmarshalListJobsResourcesResponse,
|
|
149
171
|
unmarshalStartJobDefinitionResponse
|
|
150
172
|
};
|
|
@@ -58,6 +58,10 @@ export interface JobRun {
|
|
|
58
58
|
*/
|
|
59
59
|
region: Region;
|
|
60
60
|
}
|
|
61
|
+
export interface Resource {
|
|
62
|
+
cpuLimit: number;
|
|
63
|
+
memoryLimit: number;
|
|
64
|
+
}
|
|
61
65
|
export interface UpdateJobDefinitionRequestCronScheduleConfig {
|
|
62
66
|
schedule?: string;
|
|
63
67
|
timezone?: string;
|
|
@@ -153,6 +157,16 @@ export interface ListJobRunsResponse {
|
|
|
153
157
|
jobRuns: JobRun[];
|
|
154
158
|
totalCount: number;
|
|
155
159
|
}
|
|
160
|
+
export type ListJobsResourcesRequest = {
|
|
161
|
+
/**
|
|
162
|
+
* Region to target. If none is passed will use default region from the
|
|
163
|
+
* config.
|
|
164
|
+
*/
|
|
165
|
+
region?: Region;
|
|
166
|
+
};
|
|
167
|
+
export interface ListJobsResourcesResponse {
|
|
168
|
+
resources: Resource[];
|
|
169
|
+
}
|
|
156
170
|
export type StartJobDefinitionRequest = {
|
|
157
171
|
/**
|
|
158
172
|
* Region to target. If none is passed will use default region from the
|
|
@@ -13,7 +13,11 @@ export interface KeyRotationPolicy {
|
|
|
13
13
|
nextRotationAt?: Date;
|
|
14
14
|
}
|
|
15
15
|
export interface KeyUsage {
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Algorithms used to encrypt and decrypt arbitrary payloads.
|
|
18
|
+
*
|
|
19
|
+
* One-of ('usage'): at most one of 'symmetricEncryption' could be set.
|
|
20
|
+
*/
|
|
17
21
|
symmetricEncryption?: KeyAlgorithmSymmetricEncryption;
|
|
18
22
|
}
|
|
19
23
|
export interface Key {
|
|
@@ -180,7 +184,7 @@ export type GenerateDataKeyRequest = {
|
|
|
180
184
|
region?: Region;
|
|
181
185
|
/** ID of the key. */
|
|
182
186
|
keyId: string;
|
|
183
|
-
/**
|
|
187
|
+
/** Encryption algorithm of the data encryption key. */
|
|
184
188
|
algorithm?: DataKeyAlgorithmSymmetricEncryption;
|
|
185
189
|
/**
|
|
186
190
|
* Default value is `false`, meaning that the plaintext is returned. Set it to
|
|
@@ -261,6 +261,7 @@ class API extends api.API {
|
|
|
261
261
|
method: "GET",
|
|
262
262
|
path: `/transactional-email/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks`,
|
|
263
263
|
urlParams: marshalling.urlParams(
|
|
264
|
+
["domain_id", request.domainId],
|
|
264
265
|
["order_by", request.orderBy],
|
|
265
266
|
["organization_id", request.organizationId],
|
|
266
267
|
["page", request.page],
|
|
@@ -259,6 +259,7 @@ class API extends API$1 {
|
|
|
259
259
|
method: "GET",
|
|
260
260
|
path: `/transactional-email/v1alpha1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/webhooks`,
|
|
261
261
|
urlParams: urlParams(
|
|
262
|
+
["domain_id", request.domainId],
|
|
262
263
|
["order_by", request.orderBy],
|
|
263
264
|
["organization_id", request.organizationId],
|
|
264
265
|
["page", request.page],
|
|
@@ -454,6 +454,8 @@ export type ListWebhooksRequest = {
|
|
|
454
454
|
projectId?: string;
|
|
455
455
|
/** (Optional) ID of the Organization for which to list the Webhooks. */
|
|
456
456
|
organizationId?: string;
|
|
457
|
+
/** (Optional) ID of the Domain for which to list the Webhooks. */
|
|
458
|
+
domainId?: string;
|
|
457
459
|
};
|
|
458
460
|
export interface ListWebhooksResponse {
|
|
459
461
|
/** Number of Webhooks matching the requested criteria. */
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.32.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.32.0";
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.33.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "b1c8659c0dce5f463142daf5ef68cf9e39631766"
|
|
43
43
|
}
|