@scaleway/sdk-qaas 2.3.0 → 2.3.2
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/_virtual/_rolldown/runtime.js +2 -0
- package/dist/v1alpha1/api.gen.js +5 -3
- package/dist/v1alpha1/content.gen.js +6 -4
- package/dist/v1alpha1/index.gen.js +3 -1
- package/dist/v1alpha1/marshalling.gen.js +28 -26
- package/dist/v1alpha1/types.gen.js +0 -0
- package/dist/v1alpha1/validation-rules.gen.js +5 -3
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __exportAll = (all, no_symbols) => {
|
|
3
4
|
let target = {};
|
|
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
|
|
|
8
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
10
|
return target;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { __exportAll };
|
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
2
|
import { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession } from "./marshalling.gen.js";
|
|
3
|
-
import { API, enrichForPagination, resolveOneOf, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
3
|
+
import { API as API$1, enrichForPagination, resolveOneOf, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
+
//#region src/v1alpha1/api.gen.ts
|
|
4
5
|
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
6
|
/**
|
|
6
7
|
* Quantum as a Service API.
|
|
7
8
|
|
|
8
9
|
This API allows you to allocate and program Quantum Processing Units (QPUs) to run quantum algorithms.
|
|
9
10
|
*/
|
|
10
|
-
var API
|
|
11
|
+
var API = class extends API$1 {
|
|
11
12
|
/**
|
|
12
13
|
* Get job information. Retrieve information about the provided **job ID**, mainly used to get the current status.
|
|
13
14
|
*
|
|
@@ -401,4 +402,5 @@ var API$1 = class extends API {
|
|
|
401
402
|
*/
|
|
402
403
|
listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
|
|
403
404
|
};
|
|
404
|
-
|
|
405
|
+
//#endregion
|
|
406
|
+
export { API };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
+
//#region src/v1alpha1/content.gen.ts
|
|
1
2
|
/** Lists transient statutes of the enum {@link BookingStatus}. */
|
|
2
|
-
|
|
3
|
+
var BOOKING_TRANSIENT_STATUSES = [
|
|
3
4
|
"waiting",
|
|
4
5
|
"validating",
|
|
5
6
|
"cancelling"
|
|
6
7
|
];
|
|
7
8
|
/** Lists transient statutes of the enum {@link JobStatus}. */
|
|
8
|
-
|
|
9
|
+
var JOB_TRANSIENT_STATUSES = [
|
|
9
10
|
"waiting",
|
|
10
11
|
"running",
|
|
11
12
|
"cancelling"
|
|
12
13
|
];
|
|
13
14
|
/** Lists transient statutes of the enum {@link ProcessStatus}. */
|
|
14
|
-
|
|
15
|
+
var PROCESS_TRANSIENT_STATUSES = [
|
|
15
16
|
"starting",
|
|
16
17
|
"running",
|
|
17
18
|
"cancelling"
|
|
18
19
|
];
|
|
19
20
|
/** Lists transient statutes of the enum {@link SessionStatus}. */
|
|
20
|
-
|
|
21
|
+
var SESSION_TRANSIENT_STATUSES = ["starting", "stopping"];
|
|
22
|
+
//#endregion
|
|
21
23
|
export { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES };
|
|
@@ -3,6 +3,7 @@ import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_S
|
|
|
3
3
|
import { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession } from "./marshalling.gen.js";
|
|
4
4
|
import { API } from "./api.gen.js";
|
|
5
5
|
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
+
//#region src/v1alpha1/index.gen.ts
|
|
6
7
|
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
7
8
|
API: () => API,
|
|
8
9
|
BOOKING_TRANSIENT_STATUSES: () => BOOKING_TRANSIENT_STATUSES,
|
|
@@ -37,4 +38,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
37
38
|
unmarshalProcess: () => unmarshalProcess,
|
|
38
39
|
unmarshalSession: () => unmarshalSession
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
//#endregion
|
|
42
|
+
export { API, BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
|
-
|
|
2
|
+
//#region src/v1alpha1/marshalling.gen.ts
|
|
3
|
+
var unmarshalJobCircuit = (data) => {
|
|
3
4
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobCircuit' failed as data isn't a dictionary.`);
|
|
4
5
|
return {
|
|
5
6
|
percevalCircuit: data.perceval_circuit,
|
|
6
7
|
qiskitCircuit: data.qiskit_circuit
|
|
7
8
|
};
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
var unmarshalApplication = (data) => {
|
|
10
11
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
|
|
11
12
|
return {
|
|
12
13
|
compatiblePlatformIds: data.compatible_platform_ids,
|
|
@@ -16,7 +17,7 @@ const unmarshalApplication = (data) => {
|
|
|
16
17
|
type: data.type
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
|
-
|
|
20
|
+
var unmarshalBooking = (data) => {
|
|
20
21
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Booking' failed as data isn't a dictionary.`);
|
|
21
22
|
return {
|
|
22
23
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -30,7 +31,7 @@ const unmarshalBooking = (data) => {
|
|
|
30
31
|
updatedAt: unmarshalDate(data.updated_at)
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
var unmarshalJob = (data) => {
|
|
34
35
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Job' failed as data isn't a dictionary.`);
|
|
35
36
|
return {
|
|
36
37
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -48,7 +49,7 @@ const unmarshalJob = (data) => {
|
|
|
48
49
|
updatedAt: unmarshalDate(data.updated_at)
|
|
49
50
|
};
|
|
50
51
|
};
|
|
51
|
-
|
|
52
|
+
var unmarshalModel = (data) => {
|
|
52
53
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Model' failed as data isn't a dictionary.`);
|
|
53
54
|
return {
|
|
54
55
|
createdAt: unmarshalDate(data.created_at),
|
|
@@ -80,7 +81,7 @@ var unmarshalPlatformHardware = (data) => {
|
|
|
80
81
|
vram: data.vram
|
|
81
82
|
};
|
|
82
83
|
};
|
|
83
|
-
|
|
84
|
+
var unmarshalPlatform = (data) => {
|
|
84
85
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`);
|
|
85
86
|
return {
|
|
86
87
|
availability: data.availability,
|
|
@@ -105,7 +106,7 @@ const unmarshalPlatform = (data) => {
|
|
|
105
106
|
version: data.version
|
|
106
107
|
};
|
|
107
108
|
};
|
|
108
|
-
|
|
109
|
+
var unmarshalProcess = (data) => {
|
|
109
110
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Process' failed as data isn't a dictionary.`);
|
|
110
111
|
return {
|
|
111
112
|
applicationId: data.application_id,
|
|
@@ -125,7 +126,7 @@ const unmarshalProcess = (data) => {
|
|
|
125
126
|
updatedAt: unmarshalDate(data.updated_at)
|
|
126
127
|
};
|
|
127
128
|
};
|
|
128
|
-
|
|
129
|
+
var unmarshalSession = (data) => {
|
|
129
130
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Session' failed as data isn't a dictionary.`);
|
|
130
131
|
return {
|
|
131
132
|
bookingId: data.booking_id,
|
|
@@ -151,14 +152,14 @@ const unmarshalSession = (data) => {
|
|
|
151
152
|
waitingJobCount: data.waiting_job_count
|
|
152
153
|
};
|
|
153
154
|
};
|
|
154
|
-
|
|
155
|
+
var unmarshalListApplicationsResponse = (data) => {
|
|
155
156
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
|
|
156
157
|
return {
|
|
157
158
|
applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
|
|
158
159
|
totalCount: data.total_count
|
|
159
160
|
};
|
|
160
161
|
};
|
|
161
|
-
|
|
162
|
+
var unmarshalListBookingsResponse = (data) => {
|
|
162
163
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBookingsResponse' failed as data isn't a dictionary.`);
|
|
163
164
|
return {
|
|
164
165
|
bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
@@ -174,28 +175,28 @@ var unmarshalJobResult = (data) => {
|
|
|
174
175
|
url: data.url
|
|
175
176
|
};
|
|
176
177
|
};
|
|
177
|
-
|
|
178
|
+
var unmarshalListJobResultsResponse = (data) => {
|
|
178
179
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobResultsResponse' failed as data isn't a dictionary.`);
|
|
179
180
|
return {
|
|
180
181
|
jobResults: unmarshalArrayOfObject(data.job_results, unmarshalJobResult),
|
|
181
182
|
totalCount: data.total_count
|
|
182
183
|
};
|
|
183
184
|
};
|
|
184
|
-
|
|
185
|
+
var unmarshalListJobsResponse = (data) => {
|
|
185
186
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobsResponse' failed as data isn't a dictionary.`);
|
|
186
187
|
return {
|
|
187
188
|
jobs: unmarshalArrayOfObject(data.jobs, unmarshalJob),
|
|
188
189
|
totalCount: data.total_count
|
|
189
190
|
};
|
|
190
191
|
};
|
|
191
|
-
|
|
192
|
+
var unmarshalListModelsResponse = (data) => {
|
|
192
193
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`);
|
|
193
194
|
return {
|
|
194
195
|
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
195
196
|
totalCount: data.total_count
|
|
196
197
|
};
|
|
197
198
|
};
|
|
198
|
-
|
|
199
|
+
var unmarshalListPlatformsResponse = (data) => {
|
|
199
200
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPlatformsResponse' failed as data isn't a dictionary.`);
|
|
200
201
|
return {
|
|
201
202
|
platforms: unmarshalArrayOfObject(data.platforms, unmarshalPlatform),
|
|
@@ -210,28 +211,28 @@ var unmarshalProcessResult = (data) => {
|
|
|
210
211
|
result: data.result
|
|
211
212
|
};
|
|
212
213
|
};
|
|
213
|
-
|
|
214
|
+
var unmarshalListProcessResultsResponse = (data) => {
|
|
214
215
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessResultsResponse' failed as data isn't a dictionary.`);
|
|
215
216
|
return {
|
|
216
217
|
processResults: unmarshalArrayOfObject(data.process_results, unmarshalProcessResult),
|
|
217
218
|
totalCount: data.total_count
|
|
218
219
|
};
|
|
219
220
|
};
|
|
220
|
-
|
|
221
|
+
var unmarshalListProcessesResponse = (data) => {
|
|
221
222
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessesResponse' failed as data isn't a dictionary.`);
|
|
222
223
|
return {
|
|
223
224
|
processes: unmarshalArrayOfObject(data.processes, unmarshalProcess),
|
|
224
225
|
totalCount: data.total_count
|
|
225
226
|
};
|
|
226
227
|
};
|
|
227
|
-
|
|
228
|
+
var unmarshalListSessionACLsResponse = (data) => {
|
|
228
229
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionACLsResponse' failed as data isn't a dictionary.`);
|
|
229
230
|
return {
|
|
230
231
|
acls: data.acls,
|
|
231
232
|
totalCount: data.total_count
|
|
232
233
|
};
|
|
233
234
|
};
|
|
234
|
-
|
|
235
|
+
var unmarshalListSessionsResponse = (data) => {
|
|
235
236
|
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionsResponse' failed as data isn't a dictionary.`);
|
|
236
237
|
return {
|
|
237
238
|
sessions: unmarshalArrayOfObject(data.sessions, unmarshalSession),
|
|
@@ -245,7 +246,7 @@ var marshalJobCircuit = (request, defaults) => ({ ...resolveOneOf([{
|
|
|
245
246
|
param: "qiskit_circuit",
|
|
246
247
|
value: request.qiskitCircuit
|
|
247
248
|
}]) });
|
|
248
|
-
|
|
249
|
+
var marshalCreateJobRequest = (request, defaults) => ({
|
|
249
250
|
circuit: marshalJobCircuit(request.circuit, defaults),
|
|
250
251
|
max_duration: request.maxDuration,
|
|
251
252
|
model_id: request.modelId,
|
|
@@ -254,11 +255,11 @@ const marshalCreateJobRequest = (request, defaults) => ({
|
|
|
254
255
|
session_id: request.sessionId,
|
|
255
256
|
tags: request.tags
|
|
256
257
|
});
|
|
257
|
-
|
|
258
|
+
var marshalCreateModelRequest = (request, defaults) => ({
|
|
258
259
|
payload: request.payload,
|
|
259
260
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
260
261
|
});
|
|
261
|
-
|
|
262
|
+
var marshalCreateProcessRequest = (request, defaults) => ({
|
|
262
263
|
application_id: request.applicationId,
|
|
263
264
|
input: request.input,
|
|
264
265
|
name: request.name,
|
|
@@ -272,7 +273,7 @@ var marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
|
|
|
272
273
|
started_at: request.startedAt,
|
|
273
274
|
time_zone: request.timeZone
|
|
274
275
|
});
|
|
275
|
-
|
|
276
|
+
var marshalCreateSessionRequest = (request, defaults) => ({
|
|
276
277
|
booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(request.bookingDemand, defaults) : void 0,
|
|
277
278
|
deduplication_id: request.deduplicationId,
|
|
278
279
|
max_duration: request.maxDuration,
|
|
@@ -284,19 +285,20 @@ const marshalCreateSessionRequest = (request, defaults) => ({
|
|
|
284
285
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
285
286
|
tags: request.tags
|
|
286
287
|
});
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
var marshalUpdateBookingRequest = (request, defaults) => ({ description: request.description });
|
|
289
|
+
var marshalUpdateJobRequest = (request, defaults) => ({
|
|
289
290
|
name: request.name,
|
|
290
291
|
tags: request.tags
|
|
291
292
|
});
|
|
292
|
-
|
|
293
|
+
var marshalUpdateProcessRequest = (request, defaults) => ({
|
|
293
294
|
name: request.name,
|
|
294
295
|
tags: request.tags
|
|
295
296
|
});
|
|
296
|
-
|
|
297
|
+
var marshalUpdateSessionRequest = (request, defaults) => ({
|
|
297
298
|
max_duration: request.maxDuration,
|
|
298
299
|
max_idle_duration: request.maxIdleDuration,
|
|
299
300
|
name: request.name,
|
|
300
301
|
tags: request.tags
|
|
301
302
|
});
|
|
303
|
+
//#endregion
|
|
302
304
|
export { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession };
|
|
File without changes
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/v1alpha1/validation-rules.gen.ts
|
|
2
3
|
var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
|
|
3
4
|
CreateJobRequest: () => CreateJobRequest,
|
|
4
5
|
CreateProcessRequest: () => CreateProcessRequest
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
var CreateJobRequest = { name: { minLength: 1 } };
|
|
8
|
+
var CreateProcessRequest = { name: { minLength: 1 } };
|
|
9
|
+
//#endregion
|
|
10
|
+
export { CreateJobRequest, CreateProcessRequest, validation_rules_gen_exports };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-qaas",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "Scaleway SDK qaas",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"node": ">=20.19.6"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@scaleway/random-name": "5.1.
|
|
30
|
-
"@scaleway/sdk-std": "2.2.
|
|
29
|
+
"@scaleway/random-name": "5.1.4",
|
|
30
|
+
"@scaleway/sdk-std": "2.2.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@scaleway/sdk-client": "^2.2.
|
|
33
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^2.2.
|
|
36
|
+
"@scaleway/sdk-client": "^2.2.2"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"package:check": "pnpm publint",
|