@scaleway/sdk-qaas 2.2.1 → 2.3.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/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +11 -0
- package/dist/index.gen.js +2 -4
- package/dist/v1alpha1/api.gen.js +403 -592
- package/dist/v1alpha1/content.gen.js +15 -19
- package/dist/v1alpha1/index.gen.js +38 -36
- package/dist/v1alpha1/marshalling.gen.js +247 -369
- package/dist/v1alpha1/validation-rules.gen.js +8 -14
- package/package.json +4 -4
package/dist/v1alpha1/api.gen.js
CHANGED
|
@@ -1,593 +1,404 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
cancelProcess = (request) => this.client.fetch(
|
|
404
|
-
{
|
|
405
|
-
body: "{}",
|
|
406
|
-
headers: jsonContentHeaders,
|
|
407
|
-
method: "POST",
|
|
408
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
|
|
409
|
-
},
|
|
410
|
-
unmarshalProcess
|
|
411
|
-
);
|
|
412
|
-
/**
|
|
413
|
-
* Delete an existing process. Delete a process by its unique ID and delete all its data.
|
|
414
|
-
*
|
|
415
|
-
* @param request - The request {@link DeleteProcessRequest}
|
|
416
|
-
*/
|
|
417
|
-
deleteProcess = (request) => this.client.fetch(
|
|
418
|
-
{
|
|
419
|
-
method: "DELETE",
|
|
420
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
421
|
-
}
|
|
422
|
-
);
|
|
423
|
-
pageOfListProcessResults = (request) => this.client.fetch(
|
|
424
|
-
{
|
|
425
|
-
method: "GET",
|
|
426
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
|
|
427
|
-
urlParams: urlParams(
|
|
428
|
-
["order_by", request.orderBy],
|
|
429
|
-
["page", request.page],
|
|
430
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
431
|
-
)
|
|
432
|
-
},
|
|
433
|
-
unmarshalListProcessResultsResponse
|
|
434
|
-
);
|
|
435
|
-
/**
|
|
436
|
-
* List all results of a process. Retrieve all intermediate and final result of a process.
|
|
437
|
-
*
|
|
438
|
-
* @param request - The request {@link ListProcessResultsRequest}
|
|
439
|
-
* @returns A Promise of ListProcessResultsResponse
|
|
440
|
-
*/
|
|
441
|
-
listProcessResults = (request) => enrichForPagination("processResults", this.pageOfListProcessResults, request);
|
|
442
|
-
/**
|
|
443
|
-
* Get application information. Retrieve information about the provided **application ID**, such as name, type and compatible platforms.
|
|
444
|
-
*
|
|
445
|
-
* @param request - The request {@link GetApplicationRequest}
|
|
446
|
-
* @returns A Promise of Application
|
|
447
|
-
*/
|
|
448
|
-
getApplication = (request) => this.client.fetch(
|
|
449
|
-
{
|
|
450
|
-
method: "GET",
|
|
451
|
-
path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
|
|
452
|
-
},
|
|
453
|
-
unmarshalApplication
|
|
454
|
-
);
|
|
455
|
-
pageOfListApplications = (request = {}) => this.client.fetch(
|
|
456
|
-
{
|
|
457
|
-
method: "GET",
|
|
458
|
-
path: `/qaas/v1alpha1/applications`,
|
|
459
|
-
urlParams: urlParams(
|
|
460
|
-
["application_type", request.applicationType],
|
|
461
|
-
["name", request.name],
|
|
462
|
-
["order_by", request.orderBy],
|
|
463
|
-
["page", request.page],
|
|
464
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
|
|
465
|
-
)
|
|
466
|
-
},
|
|
467
|
-
unmarshalListApplicationsResponse
|
|
468
|
-
);
|
|
469
|
-
/**
|
|
470
|
-
* List all available applications. Retrieve information about all applications.
|
|
471
|
-
*
|
|
472
|
-
* @param request - The request {@link ListApplicationsRequest}
|
|
473
|
-
* @returns A Promise of ListApplicationsResponse
|
|
474
|
-
*/
|
|
475
|
-
listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
|
|
476
|
-
/**
|
|
477
|
-
* Get booking information. Retrieve information about the provided **booking ID**, such as description, status and progress message.
|
|
478
|
-
*
|
|
479
|
-
* @param request - The request {@link GetBookingRequest}
|
|
480
|
-
* @returns A Promise of Booking
|
|
481
|
-
*/
|
|
482
|
-
getBooking = (request) => this.client.fetch(
|
|
483
|
-
{
|
|
484
|
-
method: "GET",
|
|
485
|
-
path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
|
|
486
|
-
},
|
|
487
|
-
unmarshalBooking
|
|
488
|
-
);
|
|
489
|
-
/**
|
|
490
|
-
* Waits for {@link Booking} to be in a final state.
|
|
491
|
-
*
|
|
492
|
-
* @param request - The request {@link GetBookingRequest}
|
|
493
|
-
* @param options - The waiting options
|
|
494
|
-
* @returns A Promise of Booking
|
|
495
|
-
*/
|
|
496
|
-
waitForBooking = (request, options) => waitForResource(
|
|
497
|
-
options?.stop ?? ((res) => Promise.resolve(!BOOKING_TRANSIENT_STATUSES.includes(res.status))),
|
|
498
|
-
this.getBooking,
|
|
499
|
-
request,
|
|
500
|
-
options
|
|
501
|
-
);
|
|
502
|
-
pageOfListBookings = (request = {}) => this.client.fetch(
|
|
503
|
-
{
|
|
504
|
-
method: "GET",
|
|
505
|
-
path: `/qaas/v1alpha1/bookings`,
|
|
506
|
-
urlParams: urlParams(
|
|
507
|
-
["order_by", request.orderBy],
|
|
508
|
-
["page", request.page],
|
|
509
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
510
|
-
["platform_id", request.platformId],
|
|
511
|
-
["project_id", request.projectId]
|
|
512
|
-
)
|
|
513
|
-
},
|
|
514
|
-
unmarshalListBookingsResponse
|
|
515
|
-
);
|
|
516
|
-
/**
|
|
517
|
-
* List all bookings according the filter. Retrieve information about all bookings of the provided **project ID** or ** platform ID**.
|
|
518
|
-
*
|
|
519
|
-
* @param request - The request {@link ListBookingsRequest}
|
|
520
|
-
* @returns A Promise of ListBookingsResponse
|
|
521
|
-
*/
|
|
522
|
-
listBookings = (request = {}) => enrichForPagination("bookings", this.pageOfListBookings, request);
|
|
523
|
-
/**
|
|
524
|
-
* Update booking information. Update booking information of the provided **booking ID**.
|
|
525
|
-
*
|
|
526
|
-
* @param request - The request {@link UpdateBookingRequest}
|
|
527
|
-
* @returns A Promise of Booking
|
|
528
|
-
*/
|
|
529
|
-
updateBooking = (request) => this.client.fetch(
|
|
530
|
-
{
|
|
531
|
-
body: JSON.stringify(
|
|
532
|
-
marshalUpdateBookingRequest(request, this.client.settings)
|
|
533
|
-
),
|
|
534
|
-
headers: jsonContentHeaders,
|
|
535
|
-
method: "PATCH",
|
|
536
|
-
path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
|
|
537
|
-
},
|
|
538
|
-
unmarshalBooking
|
|
539
|
-
);
|
|
540
|
-
/**
|
|
541
|
-
* Create a new model. Create and register a new model that can be executed through next jobs. A model can also be assigned to a Session.
|
|
542
|
-
*
|
|
543
|
-
* @param request - The request {@link CreateModelRequest}
|
|
544
|
-
* @returns A Promise of Model
|
|
545
|
-
*/
|
|
546
|
-
createModel = (request = {}) => this.client.fetch(
|
|
547
|
-
{
|
|
548
|
-
body: JSON.stringify(
|
|
549
|
-
marshalCreateModelRequest(request, this.client.settings)
|
|
550
|
-
),
|
|
551
|
-
headers: jsonContentHeaders,
|
|
552
|
-
method: "POST",
|
|
553
|
-
path: `/qaas/v1alpha1/models`
|
|
554
|
-
},
|
|
555
|
-
unmarshalModel
|
|
556
|
-
);
|
|
557
|
-
/**
|
|
558
|
-
* Get model information. Retrieve information about of the provided **model ID**.
|
|
559
|
-
*
|
|
560
|
-
* @param request - The request {@link GetModelRequest}
|
|
561
|
-
* @returns A Promise of Model
|
|
562
|
-
*/
|
|
563
|
-
getModel = (request) => this.client.fetch(
|
|
564
|
-
{
|
|
565
|
-
method: "GET",
|
|
566
|
-
path: `/qaas/v1alpha1/models/${validatePathParam("modelId", request.modelId)}`
|
|
567
|
-
},
|
|
568
|
-
unmarshalModel
|
|
569
|
-
);
|
|
570
|
-
pageOfListModels = (request = {}) => this.client.fetch(
|
|
571
|
-
{
|
|
572
|
-
method: "GET",
|
|
573
|
-
path: `/qaas/v1alpha1/models`,
|
|
574
|
-
urlParams: urlParams(
|
|
575
|
-
["order_by", request.orderBy],
|
|
576
|
-
["page", request.page],
|
|
577
|
-
["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
|
|
578
|
-
["project_id", request.projectId ?? this.client.settings.defaultProjectId]
|
|
579
|
-
)
|
|
580
|
-
},
|
|
581
|
-
unmarshalListModelsResponse
|
|
582
|
-
);
|
|
583
|
-
/**
|
|
584
|
-
* List all models attached to the **project ID**. Retrieve information about all models of the provided **project ID**.
|
|
585
|
-
*
|
|
586
|
-
* @param request - The request {@link ListModelsRequest}
|
|
587
|
-
* @returns A Promise of ListModelsResponse
|
|
588
|
-
*/
|
|
589
|
-
listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
|
|
590
|
-
}
|
|
591
|
-
export {
|
|
592
|
-
API
|
|
1
|
+
import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
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";
|
|
4
|
+
var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
5
|
+
/**
|
|
6
|
+
* Quantum as a Service API.
|
|
7
|
+
|
|
8
|
+
This API allows you to allocate and program Quantum Processing Units (QPUs) to run quantum algorithms.
|
|
9
|
+
*/
|
|
10
|
+
var API$1 = class extends API {
|
|
11
|
+
/**
|
|
12
|
+
* Get job information. Retrieve information about the provided **job ID**, mainly used to get the current status.
|
|
13
|
+
*
|
|
14
|
+
* @param request - The request {@link GetJobRequest}
|
|
15
|
+
* @returns A Promise of Job
|
|
16
|
+
*/
|
|
17
|
+
getJob = (request) => this.client.fetch({
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
20
|
+
}, unmarshalJob);
|
|
21
|
+
/**
|
|
22
|
+
* Waits for {@link Job} to be in a final state.
|
|
23
|
+
*
|
|
24
|
+
* @param request - The request {@link GetJobRequest}
|
|
25
|
+
* @param options - The waiting options
|
|
26
|
+
* @returns A Promise of Job
|
|
27
|
+
*/
|
|
28
|
+
waitForJob = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!JOB_TRANSIENT_STATUSES.includes(res.status))), this.getJob, request, options);
|
|
29
|
+
pageOfListJobs = (request = {}) => this.client.fetch({
|
|
30
|
+
method: "GET",
|
|
31
|
+
path: `/qaas/v1alpha1/jobs`,
|
|
32
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tags", request.tags], ...Object.entries(resolveOneOf([{
|
|
33
|
+
param: "session_id",
|
|
34
|
+
value: request.sessionId
|
|
35
|
+
}, {
|
|
36
|
+
default: this.client.settings.defaultProjectId,
|
|
37
|
+
param: "project_id",
|
|
38
|
+
value: request.projectId
|
|
39
|
+
}])))
|
|
40
|
+
}, unmarshalListJobsResponse);
|
|
41
|
+
/**
|
|
42
|
+
* List all jobs within a project or session. Retrieve information about all jobs within a given session.
|
|
43
|
+
*
|
|
44
|
+
* @param request - The request {@link ListJobsRequest}
|
|
45
|
+
* @returns A Promise of ListJobsResponse
|
|
46
|
+
*/
|
|
47
|
+
listJobs = (request = {}) => enrichForPagination("jobs", this.pageOfListJobs, request);
|
|
48
|
+
pageOfListJobResults = (request) => this.client.fetch({
|
|
49
|
+
method: "GET",
|
|
50
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/results`,
|
|
51
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
52
|
+
}, unmarshalListJobResultsResponse);
|
|
53
|
+
/**
|
|
54
|
+
* List all results of a job. Retrieve all intermediate and final results of a job.
|
|
55
|
+
*
|
|
56
|
+
* @param request - The request {@link ListJobResultsRequest}
|
|
57
|
+
* @returns A Promise of ListJobResultsResponse
|
|
58
|
+
*/
|
|
59
|
+
listJobResults = (request) => enrichForPagination("jobResults", this.pageOfListJobResults, request);
|
|
60
|
+
/**
|
|
61
|
+
* Create a job. Create a job to be executed inside a QPU session.
|
|
62
|
+
*
|
|
63
|
+
* @param request - The request {@link CreateJobRequest}
|
|
64
|
+
* @returns A Promise of Job
|
|
65
|
+
*/
|
|
66
|
+
createJob = (request) => this.client.fetch({
|
|
67
|
+
body: JSON.stringify(marshalCreateJobRequest(request, this.client.settings)),
|
|
68
|
+
headers: jsonContentHeaders,
|
|
69
|
+
method: "POST",
|
|
70
|
+
path: `/qaas/v1alpha1/jobs`
|
|
71
|
+
}, unmarshalJob);
|
|
72
|
+
/**
|
|
73
|
+
* Update job information. Update job information about the provided **job ID**.
|
|
74
|
+
*
|
|
75
|
+
* @param request - The request {@link UpdateJobRequest}
|
|
76
|
+
* @returns A Promise of Job
|
|
77
|
+
*/
|
|
78
|
+
updateJob = (request) => this.client.fetch({
|
|
79
|
+
body: JSON.stringify(marshalUpdateJobRequest(request, this.client.settings)),
|
|
80
|
+
headers: jsonContentHeaders,
|
|
81
|
+
method: "PATCH",
|
|
82
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
83
|
+
}, unmarshalJob);
|
|
84
|
+
/**
|
|
85
|
+
* Cancel a job. Cancel the job corresponding to the provided **job ID**.
|
|
86
|
+
*
|
|
87
|
+
* @param request - The request {@link CancelJobRequest}
|
|
88
|
+
* @returns A Promise of Job
|
|
89
|
+
*/
|
|
90
|
+
cancelJob = (request) => this.client.fetch({
|
|
91
|
+
body: "{}",
|
|
92
|
+
headers: jsonContentHeaders,
|
|
93
|
+
method: "POST",
|
|
94
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/cancel`
|
|
95
|
+
}, unmarshalJob);
|
|
96
|
+
/**
|
|
97
|
+
* Delete a job. Delete the job corresponding to the provided **job ID**.
|
|
98
|
+
*
|
|
99
|
+
* @param request - The request {@link DeleteJobRequest}
|
|
100
|
+
*/
|
|
101
|
+
deleteJob = (request) => this.client.fetch({
|
|
102
|
+
method: "DELETE",
|
|
103
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* Get a job circuit. Retrieve the circuit of the provided **job ID**.
|
|
107
|
+
*
|
|
108
|
+
* @param request - The request {@link GetJobCircuitRequest}
|
|
109
|
+
* @returns A Promise of JobCircuit
|
|
110
|
+
*/
|
|
111
|
+
getJobCircuit = (request) => this.client.fetch({
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/circuit`
|
|
114
|
+
}, unmarshalJobCircuit);
|
|
115
|
+
/**
|
|
116
|
+
* Get platform information. Retrieve information about the provided **platform ID**, such as provider name, technology, and type.
|
|
117
|
+
*
|
|
118
|
+
* @param request - The request {@link GetPlatformRequest}
|
|
119
|
+
* @returns A Promise of Platform
|
|
120
|
+
*/
|
|
121
|
+
getPlatform = (request) => this.client.fetch({
|
|
122
|
+
method: "GET",
|
|
123
|
+
path: `/qaas/v1alpha1/platforms/${validatePathParam("platformId", request.platformId)}`
|
|
124
|
+
}, unmarshalPlatform);
|
|
125
|
+
pageOfListPlatforms = (request = {}) => this.client.fetch({
|
|
126
|
+
method: "GET",
|
|
127
|
+
path: `/qaas/v1alpha1/platforms`,
|
|
128
|
+
urlParams: urlParams(["backend_name", request.backendName], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["platform_technology", request.platformTechnology], ["platform_type", request.platformType], ["provider_name", request.providerName])
|
|
129
|
+
}, unmarshalListPlatformsResponse);
|
|
130
|
+
/**
|
|
131
|
+
* List all available platforms. Retrieve information about all platforms.
|
|
132
|
+
*
|
|
133
|
+
* @param request - The request {@link ListPlatformsRequest}
|
|
134
|
+
* @returns A Promise of ListPlatformsResponse
|
|
135
|
+
*/
|
|
136
|
+
listPlatforms = (request = {}) => enrichForPagination("platforms", this.pageOfListPlatforms, request);
|
|
137
|
+
/**
|
|
138
|
+
* Get session information. Retrieve information about the provided **session ID**, such as name and status.
|
|
139
|
+
*
|
|
140
|
+
* @param request - The request {@link GetSessionRequest}
|
|
141
|
+
* @returns A Promise of Session
|
|
142
|
+
*/
|
|
143
|
+
getSession = (request) => this.client.fetch({
|
|
144
|
+
method: "GET",
|
|
145
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
146
|
+
}, unmarshalSession);
|
|
147
|
+
/**
|
|
148
|
+
* Waits for {@link Session} to be in a final state.
|
|
149
|
+
*
|
|
150
|
+
* @param request - The request {@link GetSessionRequest}
|
|
151
|
+
* @param options - The waiting options
|
|
152
|
+
* @returns A Promise of Session
|
|
153
|
+
*/
|
|
154
|
+
waitForSession = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))), this.getSession, request, options);
|
|
155
|
+
pageOfListSessions = (request = {}) => this.client.fetch({
|
|
156
|
+
method: "GET",
|
|
157
|
+
path: `/qaas/v1alpha1/sessions`,
|
|
158
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["platform_id", request.platformId], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["tags", request.tags])
|
|
159
|
+
}, unmarshalListSessionsResponse);
|
|
160
|
+
/**
|
|
161
|
+
* List all sessions. Retrieve information about all QPU sessions.
|
|
162
|
+
*
|
|
163
|
+
* @param request - The request {@link ListSessionsRequest}
|
|
164
|
+
* @returns A Promise of ListSessionsResponse
|
|
165
|
+
*/
|
|
166
|
+
listSessions = (request = {}) => enrichForPagination("sessions", this.pageOfListSessions, request);
|
|
167
|
+
/**
|
|
168
|
+
* Create a session. Create a new QPU session for the specified platform. Once ready, jobs can be sent to this session.
|
|
169
|
+
*
|
|
170
|
+
* @param request - The request {@link CreateSessionRequest}
|
|
171
|
+
* @returns A Promise of Session
|
|
172
|
+
*/
|
|
173
|
+
createSession = (request) => this.client.fetch({
|
|
174
|
+
body: JSON.stringify(marshalCreateSessionRequest(request, this.client.settings)),
|
|
175
|
+
headers: jsonContentHeaders,
|
|
176
|
+
method: "POST",
|
|
177
|
+
path: `/qaas/v1alpha1/sessions`
|
|
178
|
+
}, unmarshalSession);
|
|
179
|
+
/**
|
|
180
|
+
* Update session information. Update session information of the provided **session ID**.
|
|
181
|
+
*
|
|
182
|
+
* @param request - The request {@link UpdateSessionRequest}
|
|
183
|
+
* @returns A Promise of Session
|
|
184
|
+
*/
|
|
185
|
+
updateSession = (request) => this.client.fetch({
|
|
186
|
+
body: JSON.stringify(marshalUpdateSessionRequest(request, this.client.settings)),
|
|
187
|
+
headers: jsonContentHeaders,
|
|
188
|
+
method: "PATCH",
|
|
189
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
190
|
+
}, unmarshalSession);
|
|
191
|
+
/**
|
|
192
|
+
* Terminate an existing session. Terminate a session by its unique ID and cancel all its attached jobs and bookings.
|
|
193
|
+
*
|
|
194
|
+
* @param request - The request {@link TerminateSessionRequest}
|
|
195
|
+
* @returns A Promise of Session
|
|
196
|
+
*/
|
|
197
|
+
terminateSession = (request) => this.client.fetch({
|
|
198
|
+
body: "{}",
|
|
199
|
+
headers: jsonContentHeaders,
|
|
200
|
+
method: "POST",
|
|
201
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/terminate`
|
|
202
|
+
}, unmarshalSession);
|
|
203
|
+
/**
|
|
204
|
+
* Delete an existing session. Delete a session by its unique ID and delete all its attached jobs and bookings.
|
|
205
|
+
*
|
|
206
|
+
* @param request - The request {@link DeleteSessionRequest}
|
|
207
|
+
*/
|
|
208
|
+
deleteSession = (request) => this.client.fetch({
|
|
209
|
+
method: "DELETE",
|
|
210
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
211
|
+
});
|
|
212
|
+
pageOfListSessionACLs = (request) => this.client.fetch({
|
|
213
|
+
method: "GET",
|
|
214
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/acls`,
|
|
215
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
216
|
+
}, unmarshalListSessionACLsResponse);
|
|
217
|
+
listSessionACLs = (request) => enrichForPagination("acls", this.pageOfListSessionACLs, request);
|
|
218
|
+
/**
|
|
219
|
+
* Create a process. Create a new process for the specified application on a specified platform.
|
|
220
|
+
*
|
|
221
|
+
* @param request - The request {@link CreateProcessRequest}
|
|
222
|
+
* @returns A Promise of Process
|
|
223
|
+
*/
|
|
224
|
+
createProcess = (request) => this.client.fetch({
|
|
225
|
+
body: JSON.stringify(marshalCreateProcessRequest(request, this.client.settings)),
|
|
226
|
+
headers: jsonContentHeaders,
|
|
227
|
+
method: "POST",
|
|
228
|
+
path: `/qaas/v1alpha1/processes`
|
|
229
|
+
}, unmarshalProcess);
|
|
230
|
+
/**
|
|
231
|
+
* Get process information. Retrieve information about the provided **process ID**, such as name, status and progress.
|
|
232
|
+
*
|
|
233
|
+
* @param request - The request {@link GetProcessRequest}
|
|
234
|
+
* @returns A Promise of Process
|
|
235
|
+
*/
|
|
236
|
+
getProcess = (request) => this.client.fetch({
|
|
237
|
+
method: "GET",
|
|
238
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
239
|
+
}, unmarshalProcess);
|
|
240
|
+
/**
|
|
241
|
+
* Waits for {@link Process} to be in a final state.
|
|
242
|
+
*
|
|
243
|
+
* @param request - The request {@link GetProcessRequest}
|
|
244
|
+
* @param options - The waiting options
|
|
245
|
+
* @returns A Promise of Process
|
|
246
|
+
*/
|
|
247
|
+
waitForProcess = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))), this.getProcess, request, options);
|
|
248
|
+
pageOfListProcesses = (request = {}) => this.client.fetch({
|
|
249
|
+
method: "GET",
|
|
250
|
+
path: `/qaas/v1alpha1/processes`,
|
|
251
|
+
urlParams: urlParams(["application_id", request.applicationId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["tags", request.tags])
|
|
252
|
+
}, unmarshalListProcessesResponse);
|
|
253
|
+
/**
|
|
254
|
+
* List all processes. Retrieve information about all processes.
|
|
255
|
+
*
|
|
256
|
+
* @param request - The request {@link ListProcessesRequest}
|
|
257
|
+
* @returns A Promise of ListProcessesResponse
|
|
258
|
+
*/
|
|
259
|
+
listProcesses = (request = {}) => enrichForPagination("processes", this.pageOfListProcesses, request);
|
|
260
|
+
/**
|
|
261
|
+
* Update process information. Update process information of the provided **process ID**.
|
|
262
|
+
*
|
|
263
|
+
* @param request - The request {@link UpdateProcessRequest}
|
|
264
|
+
* @returns A Promise of Process
|
|
265
|
+
*/
|
|
266
|
+
updateProcess = (request) => this.client.fetch({
|
|
267
|
+
body: JSON.stringify(marshalUpdateProcessRequest(request, this.client.settings)),
|
|
268
|
+
headers: jsonContentHeaders,
|
|
269
|
+
method: "PATCH",
|
|
270
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
271
|
+
}, unmarshalProcess);
|
|
272
|
+
/**
|
|
273
|
+
* Cancel a running process. Cancel a process by its unique ID. Intermediate results are still available.
|
|
274
|
+
*
|
|
275
|
+
* @param request - The request {@link CancelProcessRequest}
|
|
276
|
+
* @returns A Promise of Process
|
|
277
|
+
*/
|
|
278
|
+
cancelProcess = (request) => this.client.fetch({
|
|
279
|
+
body: "{}",
|
|
280
|
+
headers: jsonContentHeaders,
|
|
281
|
+
method: "POST",
|
|
282
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
|
|
283
|
+
}, unmarshalProcess);
|
|
284
|
+
/**
|
|
285
|
+
* Delete an existing process. Delete a process by its unique ID and delete all its data.
|
|
286
|
+
*
|
|
287
|
+
* @param request - The request {@link DeleteProcessRequest}
|
|
288
|
+
*/
|
|
289
|
+
deleteProcess = (request) => this.client.fetch({
|
|
290
|
+
method: "DELETE",
|
|
291
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
292
|
+
});
|
|
293
|
+
pageOfListProcessResults = (request) => this.client.fetch({
|
|
294
|
+
method: "GET",
|
|
295
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
|
|
296
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
297
|
+
}, unmarshalListProcessResultsResponse);
|
|
298
|
+
/**
|
|
299
|
+
* List all results of a process. Retrieve all intermediate and final result of a process.
|
|
300
|
+
*
|
|
301
|
+
* @param request - The request {@link ListProcessResultsRequest}
|
|
302
|
+
* @returns A Promise of ListProcessResultsResponse
|
|
303
|
+
*/
|
|
304
|
+
listProcessResults = (request) => enrichForPagination("processResults", this.pageOfListProcessResults, request);
|
|
305
|
+
/**
|
|
306
|
+
* Get application information. Retrieve information about the provided **application ID**, such as name, type and compatible platforms.
|
|
307
|
+
*
|
|
308
|
+
* @param request - The request {@link GetApplicationRequest}
|
|
309
|
+
* @returns A Promise of Application
|
|
310
|
+
*/
|
|
311
|
+
getApplication = (request) => this.client.fetch({
|
|
312
|
+
method: "GET",
|
|
313
|
+
path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
|
|
314
|
+
}, unmarshalApplication);
|
|
315
|
+
pageOfListApplications = (request = {}) => this.client.fetch({
|
|
316
|
+
method: "GET",
|
|
317
|
+
path: `/qaas/v1alpha1/applications`,
|
|
318
|
+
urlParams: urlParams(["application_type", request.applicationType], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
319
|
+
}, unmarshalListApplicationsResponse);
|
|
320
|
+
/**
|
|
321
|
+
* List all available applications. Retrieve information about all applications.
|
|
322
|
+
*
|
|
323
|
+
* @param request - The request {@link ListApplicationsRequest}
|
|
324
|
+
* @returns A Promise of ListApplicationsResponse
|
|
325
|
+
*/
|
|
326
|
+
listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
|
|
327
|
+
/**
|
|
328
|
+
* Get booking information. Retrieve information about the provided **booking ID**, such as description, status and progress message.
|
|
329
|
+
*
|
|
330
|
+
* @param request - The request {@link GetBookingRequest}
|
|
331
|
+
* @returns A Promise of Booking
|
|
332
|
+
*/
|
|
333
|
+
getBooking = (request) => this.client.fetch({
|
|
334
|
+
method: "GET",
|
|
335
|
+
path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
|
|
336
|
+
}, unmarshalBooking);
|
|
337
|
+
/**
|
|
338
|
+
* Waits for {@link Booking} to be in a final state.
|
|
339
|
+
*
|
|
340
|
+
* @param request - The request {@link GetBookingRequest}
|
|
341
|
+
* @param options - The waiting options
|
|
342
|
+
* @returns A Promise of Booking
|
|
343
|
+
*/
|
|
344
|
+
waitForBooking = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BOOKING_TRANSIENT_STATUSES.includes(res.status))), this.getBooking, request, options);
|
|
345
|
+
pageOfListBookings = (request = {}) => this.client.fetch({
|
|
346
|
+
method: "GET",
|
|
347
|
+
path: `/qaas/v1alpha1/bookings`,
|
|
348
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["platform_id", request.platformId], ["project_id", request.projectId])
|
|
349
|
+
}, unmarshalListBookingsResponse);
|
|
350
|
+
/**
|
|
351
|
+
* List all bookings according the filter. Retrieve information about all bookings of the provided **project ID** or ** platform ID**.
|
|
352
|
+
*
|
|
353
|
+
* @param request - The request {@link ListBookingsRequest}
|
|
354
|
+
* @returns A Promise of ListBookingsResponse
|
|
355
|
+
*/
|
|
356
|
+
listBookings = (request = {}) => enrichForPagination("bookings", this.pageOfListBookings, request);
|
|
357
|
+
/**
|
|
358
|
+
* Update booking information. Update booking information of the provided **booking ID**.
|
|
359
|
+
*
|
|
360
|
+
* @param request - The request {@link UpdateBookingRequest}
|
|
361
|
+
* @returns A Promise of Booking
|
|
362
|
+
*/
|
|
363
|
+
updateBooking = (request) => this.client.fetch({
|
|
364
|
+
body: JSON.stringify(marshalUpdateBookingRequest(request, this.client.settings)),
|
|
365
|
+
headers: jsonContentHeaders,
|
|
366
|
+
method: "PATCH",
|
|
367
|
+
path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
|
|
368
|
+
}, unmarshalBooking);
|
|
369
|
+
/**
|
|
370
|
+
* Create a new model. Create and register a new model that can be executed through next jobs. A model can also be assigned to a Session.
|
|
371
|
+
*
|
|
372
|
+
* @param request - The request {@link CreateModelRequest}
|
|
373
|
+
* @returns A Promise of Model
|
|
374
|
+
*/
|
|
375
|
+
createModel = (request = {}) => this.client.fetch({
|
|
376
|
+
body: JSON.stringify(marshalCreateModelRequest(request, this.client.settings)),
|
|
377
|
+
headers: jsonContentHeaders,
|
|
378
|
+
method: "POST",
|
|
379
|
+
path: `/qaas/v1alpha1/models`
|
|
380
|
+
}, unmarshalModel);
|
|
381
|
+
/**
|
|
382
|
+
* Get model information. Retrieve information about of the provided **model ID**.
|
|
383
|
+
*
|
|
384
|
+
* @param request - The request {@link GetModelRequest}
|
|
385
|
+
* @returns A Promise of Model
|
|
386
|
+
*/
|
|
387
|
+
getModel = (request) => this.client.fetch({
|
|
388
|
+
method: "GET",
|
|
389
|
+
path: `/qaas/v1alpha1/models/${validatePathParam("modelId", request.modelId)}`
|
|
390
|
+
}, unmarshalModel);
|
|
391
|
+
pageOfListModels = (request = {}) => this.client.fetch({
|
|
392
|
+
method: "GET",
|
|
393
|
+
path: `/qaas/v1alpha1/models`,
|
|
394
|
+
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
395
|
+
}, unmarshalListModelsResponse);
|
|
396
|
+
/**
|
|
397
|
+
* List all models attached to the **project ID**. Retrieve information about all models of the provided **project ID**.
|
|
398
|
+
*
|
|
399
|
+
* @param request - The request {@link ListModelsRequest}
|
|
400
|
+
* @returns A Promise of ListModelsResponse
|
|
401
|
+
*/
|
|
402
|
+
listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
|
|
593
403
|
};
|
|
404
|
+
export { API$1 as API };
|