@scaleway/sdk-qaas 2.2.0 → 2.2.1

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.
@@ -38,21 +38,19 @@ class API extends API$1 {
38
38
  urlParams: urlParams(
39
39
  ["order_by", request.orderBy],
40
40
  ["page", request.page],
41
- [
42
- "page_size",
43
- request.pageSize ?? this.client.settings.defaultPageSize
44
- ],
41
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
45
42
  ["tags", request.tags],
46
- ...Object.entries(
47
- resolveOneOf([
48
- { param: "session_id", value: request.sessionId },
49
- {
50
- default: this.client.settings.defaultProjectId,
51
- param: "project_id",
52
- value: request.projectId
53
- }
54
- ])
55
- )
43
+ ...Object.entries(resolveOneOf([
44
+ {
45
+ param: "session_id",
46
+ value: request.sessionId
47
+ },
48
+ {
49
+ default: this.client.settings.defaultProjectId,
50
+ param: "project_id",
51
+ value: request.projectId
52
+ }
53
+ ]))
56
54
  )
57
55
  },
58
56
  unmarshalListJobsResponse
@@ -71,10 +69,7 @@ class API extends API$1 {
71
69
  urlParams: urlParams(
72
70
  ["order_by", request.orderBy],
73
71
  ["page", request.page],
74
- [
75
- "page_size",
76
- request.pageSize ?? this.client.settings.defaultPageSize
77
- ]
72
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
78
73
  )
79
74
  },
80
75
  unmarshalListJobResultsResponse
@@ -140,10 +135,12 @@ class API extends API$1 {
140
135
  *
141
136
  * @param request - The request {@link DeleteJobRequest}
142
137
  */
143
- deleteJob = (request) => this.client.fetch({
144
- method: "DELETE",
145
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
146
- });
138
+ deleteJob = (request) => this.client.fetch(
139
+ {
140
+ method: "DELETE",
141
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
142
+ }
143
+ );
147
144
  /**
148
145
  * Get a job circuit. Retrieve the circuit of the provided **job ID**.
149
146
  *
@@ -179,10 +176,7 @@ class API extends API$1 {
179
176
  ["name", request.name],
180
177
  ["order_by", request.orderBy],
181
178
  ["page", request.page],
182
- [
183
- "page_size",
184
- request.pageSize ?? this.client.settings.defaultPageSize
185
- ],
179
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
186
180
  ["platform_technology", request.platformTechnology],
187
181
  ["platform_type", request.platformType],
188
182
  ["provider_name", request.providerName]
@@ -218,9 +212,7 @@ class API extends API$1 {
218
212
  * @returns A Promise of Session
219
213
  */
220
214
  waitForSession = (request, options) => waitForResource(
221
- options?.stop ?? ((res) => Promise.resolve(
222
- !SESSION_TRANSIENT_STATUSES.includes(res.status)
223
- )),
215
+ options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))),
224
216
  this.getSession,
225
217
  request,
226
218
  options
@@ -232,15 +224,9 @@ class API extends API$1 {
232
224
  urlParams: urlParams(
233
225
  ["order_by", request.orderBy],
234
226
  ["page", request.page],
235
- [
236
- "page_size",
237
- request.pageSize ?? this.client.settings.defaultPageSize
238
- ],
227
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
239
228
  ["platform_id", request.platformId],
240
- [
241
- "project_id",
242
- request.projectId ?? this.client.settings.defaultProjectId
243
- ],
229
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
244
230
  ["tags", request.tags]
245
231
  )
246
232
  },
@@ -307,10 +293,12 @@ class API extends API$1 {
307
293
  *
308
294
  * @param request - The request {@link DeleteSessionRequest}
309
295
  */
310
- deleteSession = (request) => this.client.fetch({
311
- method: "DELETE",
312
- path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
313
- });
296
+ deleteSession = (request) => this.client.fetch(
297
+ {
298
+ method: "DELETE",
299
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
300
+ }
301
+ );
314
302
  pageOfListSessionACLs = (request) => this.client.fetch(
315
303
  {
316
304
  method: "GET",
@@ -318,10 +306,7 @@ class API extends API$1 {
318
306
  urlParams: urlParams(
319
307
  ["order_by", request.orderBy],
320
308
  ["page", request.page],
321
- [
322
- "page_size",
323
- request.pageSize ?? this.client.settings.defaultPageSize
324
- ]
309
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
325
310
  )
326
311
  },
327
312
  unmarshalListSessionACLsResponse
@@ -365,9 +350,7 @@ class API extends API$1 {
365
350
  * @returns A Promise of Process
366
351
  */
367
352
  waitForProcess = (request, options) => waitForResource(
368
- options?.stop ?? ((res) => Promise.resolve(
369
- !PROCESS_TRANSIENT_STATUSES.includes(res.status)
370
- )),
353
+ options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))),
371
354
  this.getProcess,
372
355
  request,
373
356
  options
@@ -380,14 +363,8 @@ class API extends API$1 {
380
363
  ["application_id", request.applicationId],
381
364
  ["order_by", request.orderBy],
382
365
  ["page", request.page],
383
- [
384
- "page_size",
385
- request.pageSize ?? this.client.settings.defaultPageSize
386
- ],
387
- [
388
- "project_id",
389
- request.projectId ?? this.client.settings.defaultProjectId
390
- ],
366
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
367
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId],
391
368
  ["tags", request.tags]
392
369
  )
393
370
  },
@@ -437,10 +414,12 @@ class API extends API$1 {
437
414
  *
438
415
  * @param request - The request {@link DeleteProcessRequest}
439
416
  */
440
- deleteProcess = (request) => this.client.fetch({
441
- method: "DELETE",
442
- path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
443
- });
417
+ deleteProcess = (request) => this.client.fetch(
418
+ {
419
+ method: "DELETE",
420
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
421
+ }
422
+ );
444
423
  pageOfListProcessResults = (request) => this.client.fetch(
445
424
  {
446
425
  method: "GET",
@@ -448,10 +427,7 @@ class API extends API$1 {
448
427
  urlParams: urlParams(
449
428
  ["order_by", request.orderBy],
450
429
  ["page", request.page],
451
- [
452
- "page_size",
453
- request.pageSize ?? this.client.settings.defaultPageSize
454
- ]
430
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
455
431
  )
456
432
  },
457
433
  unmarshalListProcessResultsResponse
@@ -462,11 +438,7 @@ class API extends API$1 {
462
438
  * @param request - The request {@link ListProcessResultsRequest}
463
439
  * @returns A Promise of ListProcessResultsResponse
464
440
  */
465
- listProcessResults = (request) => enrichForPagination(
466
- "processResults",
467
- this.pageOfListProcessResults,
468
- request
469
- );
441
+ listProcessResults = (request) => enrichForPagination("processResults", this.pageOfListProcessResults, request);
470
442
  /**
471
443
  * Get application information. Retrieve information about the provided **application ID**, such as name, type and compatible platforms.
472
444
  *
@@ -489,10 +461,7 @@ class API extends API$1 {
489
461
  ["name", request.name],
490
462
  ["order_by", request.orderBy],
491
463
  ["page", request.page],
492
- [
493
- "page_size",
494
- request.pageSize ?? this.client.settings.defaultPageSize
495
- ]
464
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize]
496
465
  )
497
466
  },
498
467
  unmarshalListApplicationsResponse
@@ -525,9 +494,7 @@ class API extends API$1 {
525
494
  * @returns A Promise of Booking
526
495
  */
527
496
  waitForBooking = (request, options) => waitForResource(
528
- options?.stop ?? ((res) => Promise.resolve(
529
- !BOOKING_TRANSIENT_STATUSES.includes(res.status)
530
- )),
497
+ options?.stop ?? ((res) => Promise.resolve(!BOOKING_TRANSIENT_STATUSES.includes(res.status))),
531
498
  this.getBooking,
532
499
  request,
533
500
  options
@@ -539,10 +506,7 @@ class API extends API$1 {
539
506
  urlParams: urlParams(
540
507
  ["order_by", request.orderBy],
541
508
  ["page", request.page],
542
- [
543
- "page_size",
544
- request.pageSize ?? this.client.settings.defaultPageSize
545
- ],
509
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
546
510
  ["platform_id", request.platformId],
547
511
  ["project_id", request.projectId]
548
512
  )
@@ -610,14 +574,8 @@ class API extends API$1 {
610
574
  urlParams: urlParams(
611
575
  ["order_by", request.orderBy],
612
576
  ["page", request.page],
613
- [
614
- "page_size",
615
- request.pageSize ?? this.client.settings.defaultPageSize
616
- ],
617
- [
618
- "project_id",
619
- request.projectId ?? this.client.settings.defaultProjectId
620
- ]
577
+ ["page_size", request.pageSize ?? this.client.settings.defaultPageSize],
578
+ ["project_id", request.projectId ?? this.client.settings.defaultProjectId]
621
579
  )
622
580
  },
623
581
  unmarshalListModelsResponse
@@ -1,4 +1,4 @@
1
- export { API } from './api.gen.js';
1
+ export { API, } from './api.gen.js';
2
2
  export * from './content.gen.js';
3
3
  export * from './marshalling.gen.js';
4
4
  export type { Application, ApplicationType, Booking, BookingStatus, CancelJobRequest, CancelProcessRequest, CreateJobRequest, CreateModelRequest, CreateProcessRequest, CreateSessionRequest, CreateSessionRequestBookingDemand, DeleteJobRequest, DeleteProcessRequest, DeleteSessionRequest, GetApplicationRequest, GetBookingRequest, GetJobCircuitRequest, GetJobRequest, GetModelRequest, GetPlatformRequest, GetProcessRequest, GetSessionRequest, Job, JobCircuit, JobResult, JobStatus, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, ListBookingsRequest, ListBookingsRequestOrderBy, ListBookingsResponse, ListJobResultsRequest, ListJobResultsRequestOrderBy, ListJobResultsResponse, ListJobsRequest, ListJobsRequestOrderBy, ListJobsResponse, ListModelsRequest, ListModelsRequestOrderBy, ListModelsResponse, ListPlatformsRequest, ListPlatformsRequestOrderBy, ListPlatformsResponse, ListProcessesRequest, ListProcessesRequestOrderBy, ListProcessesResponse, ListProcessResultsRequest, ListProcessResultsRequestOrderBy, ListProcessResultsResponse, ListSessionACLsRequest, ListSessionACLsRequestOrderBy, ListSessionACLsResponse, ListSessionsRequest, ListSessionsRequestOrderBy, ListSessionsResponse, Model, Platform, PlatformAvailability, PlatformBookingRequirement, PlatformHardware, PlatformTechnology, PlatformType, Process, ProcessResult, ProcessStatus, Session, SessionAccess, SessionOriginType, SessionStatus, TerminateSessionRequest, UpdateBookingRequest, UpdateJobRequest, UpdateProcessRequest, UpdateSessionRequest, } from './types.gen.js';
@@ -198,10 +198,7 @@ const unmarshalListApplicationsResponse = (data) => {
198
198
  );
199
199
  }
200
200
  return {
201
- applications: unmarshalArrayOfObject(
202
- data.applications,
203
- unmarshalApplication
204
- ),
201
+ applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
205
202
  totalCount: data.total_count
206
203
  };
207
204
  };
@@ -292,10 +289,7 @@ const unmarshalListProcessResultsResponse = (data) => {
292
289
  );
293
290
  }
294
291
  return {
295
- processResults: unmarshalArrayOfObject(
296
- data.process_results,
297
- unmarshalProcessResult
298
- ),
292
+ processResults: unmarshalArrayOfObject(data.process_results, unmarshalProcessResult),
299
293
  totalCount: data.total_count
300
294
  };
301
295
  };
@@ -334,8 +328,14 @@ const unmarshalListSessionsResponse = (data) => {
334
328
  };
335
329
  const marshalJobCircuit = (request, defaults) => ({
336
330
  ...resolveOneOf([
337
- { param: "perceval_circuit", value: request.percevalCircuit },
338
- { param: "qiskit_circuit", value: request.qiskitCircuit }
331
+ {
332
+ param: "perceval_circuit",
333
+ value: request.percevalCircuit
334
+ },
335
+ {
336
+ param: "qiskit_circuit",
337
+ value: request.qiskitCircuit
338
+ }
339
339
  ])
340
340
  });
341
341
  const marshalCreateJobRequest = (request, defaults) => ({
@@ -366,9 +366,7 @@ const marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
366
366
  time_zone: request.timeZone
367
367
  });
368
368
  const marshalCreateSessionRequest = (request, defaults) => ({
369
- booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(
370
- request.bookingDemand
371
- ) : void 0,
369
+ booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(request.bookingDemand) : void 0,
372
370
  deduplication_id: request.deduplicationId,
373
371
  max_duration: request.maxDuration,
374
372
  max_idle_duration: request.maxIdleDuration,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-qaas",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "Scaleway SDK qaas",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.1.0"
30
+ "@scaleway/sdk-std": "2.1.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@scaleway/sdk-client": "^2.1.0"