@scaleway/sdk-qaas 1.1.5 → 1.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.
@@ -1,21 +1,42 @@
1
1
  import type { Money } from '@scaleway/sdk-client';
2
2
  export type ApplicationType = 'unknown_type' | 'vqe';
3
+ export type BookingStatus = 'unknown_status' | 'waiting' | 'validating' | 'validated' | 'cancelling' | 'cancelled' | 'error';
3
4
  export type JobStatus = 'unknown_status' | 'waiting' | 'error' | 'running' | 'completed' | 'cancelling' | 'cancelled';
4
5
  export type ListApplicationsRequestOrderBy = 'name_asc' | 'name_desc' | 'type_asc' | 'type_desc';
6
+ export type ListBookingsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'started_at_desc' | 'started_at_asc';
5
7
  export type ListJobResultsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
6
8
  export type ListJobsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'status_asc' | 'status_desc' | 'platform_name_asc' | 'platform_name_desc' | 'name_asc' | 'name_desc' | 'session_name_asc' | 'session_name_desc';
9
+ export type ListModelsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
7
10
  export type ListPlatformsRequestOrderBy = 'name_asc' | 'name_desc' | 'provider_name_asc' | 'provider_name_desc' | 'type_asc' | 'type_desc' | 'technology_asc' | 'technology_desc' | 'backend_name_asc' | 'backend_name_desc';
8
11
  export type ListProcessResultsRequestOrderBy = 'created_at_desc' | 'created_at_asc';
9
12
  export type ListProcessesRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc' | 'started_at_asc' | 'started_at_desc' | 'status_asc' | 'status_desc';
10
13
  export type ListSessionACLsRequestOrderBy = 'access_asc' | 'access_desc';
11
14
  export type ListSessionsRequestOrderBy = 'name_asc' | 'name_desc' | 'started_at_asc' | 'started_at_desc' | 'status_asc' | 'status_desc' | 'created_at_desc' | 'created_at_asc';
12
15
  export type PlatformAvailability = 'unknown_availability' | 'available' | 'shortage' | 'scarce' | 'maintenance';
13
- export type PlatformTechnology = 'unknown_technology' | 'photonic' | 'general_purpose' | 'trapped_ion' | 'superconducting';
16
+ export type PlatformTechnology = 'unknown_technology' | 'photonic' | 'general_purpose' | 'trapped_ion' | 'superconducting' | 'neutral_atom';
14
17
  export type PlatformType = 'unknown_type' | 'simulator' | 'qpu';
15
18
  export type ProcessStatus = 'unknown_status' | 'error' | 'starting' | 'running' | 'completed' | 'cancelling' | 'cancelled';
16
19
  export type SessionAccess = 'unknown_access' | 'full' | 'read_session' | 'read_write_session' | 'read_job_result' | 'read_job_circuit' | 'read_job' | 'read_write_job';
17
20
  export type SessionOriginType = 'unknown_origin_type' | 'customer' | 'process';
18
21
  export type SessionStatus = 'unknown_status' | 'running' | 'stopped' | 'starting' | 'stopping';
22
+ export interface PlatformBookingRequirement {
23
+ /**
24
+ * Minimal duration of any booking based on this platform.
25
+ */
26
+ minDuration?: string;
27
+ /**
28
+ * Maximal duration of any bookings based on this platform.
29
+ */
30
+ maxDuration?: string;
31
+ /**
32
+ * Allowed time to cancel a booking attached to this platform before the beginning of the session.
33
+ */
34
+ maxCancellationDuration?: string;
35
+ /**
36
+ * Allowed planification time from now where the platform can be booked in the future.
37
+ */
38
+ maxPlanificationDuration?: string;
39
+ }
19
40
  export interface PlatformHardware {
20
41
  /**
21
42
  * Product name of the hardware.
@@ -56,6 +77,11 @@ export interface JobCircuit {
56
77
  */
57
78
  qiskitCircuit?: string;
58
79
  }
80
+ export interface CreateSessionRequestBookingDemand {
81
+ startedAt?: Date;
82
+ finishedAt?: Date;
83
+ description?: string;
84
+ }
59
85
  export interface Application {
60
86
  /**
61
87
  * Unique ID of the application.
@@ -78,6 +104,40 @@ export interface Application {
78
104
  */
79
105
  inputTemplate: string;
80
106
  }
107
+ export interface Booking {
108
+ /**
109
+ * Unique ID of the booking.
110
+ */
111
+ id: string;
112
+ /**
113
+ * Time at which the booking was created.
114
+ */
115
+ createdAt?: Date;
116
+ /**
117
+ * Time at which the booking starts.
118
+ */
119
+ startedAt?: Date;
120
+ /**
121
+ * Time at which the booking was updated.
122
+ */
123
+ updatedAt?: Date;
124
+ /**
125
+ * Time at which the booking finishes.
126
+ */
127
+ finishedAt?: Date;
128
+ /**
129
+ * Status of the booking.
130
+ */
131
+ status: BookingStatus;
132
+ /**
133
+ * Description of the booking slot.
134
+ */
135
+ description: string;
136
+ /**
137
+ * Any progress message of the booking.
138
+ */
139
+ progressMessage: string;
140
+ }
81
141
  export interface JobResult {
82
142
  /**
83
143
  * ID of the parent job.
@@ -141,6 +201,32 @@ export interface Job {
141
201
  * Result of the job, if the job is finished.
142
202
  */
143
203
  resultDistribution?: string;
204
+ /**
205
+ * Computation model ID executed by the job.
206
+ */
207
+ modelId?: string;
208
+ /**
209
+ * Execution parameters for this job.
210
+ */
211
+ parameters?: string;
212
+ }
213
+ export interface Model {
214
+ /**
215
+ * Unique ID of the model.
216
+ */
217
+ id: string;
218
+ /**
219
+ * Time at which the model was created.
220
+ */
221
+ createdAt?: Date;
222
+ /**
223
+ * Storage URL of the model.
224
+ */
225
+ url?: string;
226
+ /**
227
+ * Project ID in which the model has been created.
228
+ */
229
+ projectId: string;
144
230
  }
145
231
  export interface Platform {
146
232
  /**
@@ -207,6 +293,22 @@ export interface Platform {
207
293
  * Specifications of the underlying hardware.
208
294
  */
209
295
  hardware?: PlatformHardware;
296
+ /**
297
+ * Booking constraints to fit if the platform is bookable.
298
+ */
299
+ bookingRequirement?: PlatformBookingRequirement;
300
+ /**
301
+ * English description of the platform.
302
+ */
303
+ description: string;
304
+ /**
305
+ * Documentation link to external documentation to learn more on this platform.
306
+ */
307
+ documentationUrl: string;
308
+ /**
309
+ * Specify if the platform is bookable.
310
+ */
311
+ isBookable: boolean;
210
312
  }
211
313
  export interface ProcessResult {
212
314
  /**
@@ -244,7 +346,7 @@ export interface Process {
244
346
  */
245
347
  attachedSessionIds: string[];
246
348
  /**
247
- * Tme at which the process was created.
349
+ * Time at which the process was created.
248
350
  */
249
351
  createdAt?: Date;
250
352
  /**
@@ -357,6 +459,18 @@ export interface Session {
357
459
  * Any progress of the session.
358
460
  */
359
461
  progressMessage?: string;
462
+ /**
463
+ * An optional booking unique ID of an attached booking.
464
+ */
465
+ bookingId?: string;
466
+ /**
467
+ * Default computation model ID to be executed by job assigned to this session.
468
+ */
469
+ modelId?: string;
470
+ /**
471
+ * Platform configuration parameters applied to this session.
472
+ */
473
+ parameters?: string;
360
474
  }
361
475
  export type CancelJobRequest = {
362
476
  /**
@@ -391,6 +505,24 @@ export type CreateJobRequest = {
391
505
  * Maximum duration of the job.
392
506
  */
393
507
  maxDuration?: string;
508
+ /**
509
+ * Computation model ID to be executed by the job.
510
+ */
511
+ modelId?: string;
512
+ /**
513
+ * Execution parameters for this job.
514
+ */
515
+ parameters?: string;
516
+ };
517
+ export type CreateModelRequest = {
518
+ /**
519
+ * Project ID to attach this model.
520
+ */
521
+ projectId?: string;
522
+ /**
523
+ * The serialized model data.
524
+ */
525
+ payload?: string;
394
526
  };
395
527
  export type CreateProcessRequest = {
396
528
  /**
@@ -447,6 +579,18 @@ export type CreateSessionRequest = {
447
579
  * Deduplication ID of the session.
448
580
  */
449
581
  deduplicationId?: string;
582
+ /**
583
+ * A booking demand to schedule the session, only applicable if the platform is bookable.
584
+ */
585
+ bookingDemand?: CreateSessionRequestBookingDemand;
586
+ /**
587
+ * Default computation model ID to be executed by job assigned to this session.
588
+ */
589
+ modelId?: string;
590
+ /**
591
+ * Optional platform configuration parameters applied to this session.
592
+ */
593
+ parameters?: string;
450
594
  };
451
595
  export type DeleteJobRequest = {
452
596
  /**
@@ -472,6 +616,12 @@ export type GetApplicationRequest = {
472
616
  */
473
617
  applicationId: string;
474
618
  };
619
+ export type GetBookingRequest = {
620
+ /**
621
+ * Unique ID of the booking.
622
+ */
623
+ bookingId: string;
624
+ };
475
625
  export type GetJobCircuitRequest = {
476
626
  /**
477
627
  * Unique ID of the job.
@@ -484,6 +634,12 @@ export type GetJobRequest = {
484
634
  */
485
635
  jobId: string;
486
636
  };
637
+ export type GetModelRequest = {
638
+ /**
639
+ * Unique ID of the model.
640
+ */
641
+ modelId: string;
642
+ };
487
643
  export type GetPlatformRequest = {
488
644
  /**
489
645
  * Unique ID of the platform.
@@ -534,6 +690,38 @@ export interface ListApplicationsResponse {
534
690
  */
535
691
  applications: Application[];
536
692
  }
693
+ export type ListBookingsRequest = {
694
+ /**
695
+ * List bookings belonging to this project ID.
696
+ */
697
+ projectId?: string;
698
+ /**
699
+ * List bookings attached to this platform ID.
700
+ */
701
+ platformId?: string;
702
+ /**
703
+ * Page number.
704
+ */
705
+ page?: number;
706
+ /**
707
+ * Maximum number of results to return per page.
708
+ */
709
+ pageSize?: number;
710
+ /**
711
+ * Sort order of the returned results.
712
+ */
713
+ orderBy?: ListBookingsRequestOrderBy;
714
+ };
715
+ export interface ListBookingsResponse {
716
+ /**
717
+ * Total number of bookings.
718
+ */
719
+ totalCount: number;
720
+ /**
721
+ * List of bookings.
722
+ */
723
+ bookings: Booking[];
724
+ }
537
725
  export type ListJobResultsRequest = {
538
726
  /**
539
727
  * ID of the job.
@@ -602,6 +790,34 @@ export interface ListJobsResponse {
602
790
  */
603
791
  jobs: Job[];
604
792
  }
793
+ export type ListModelsRequest = {
794
+ /**
795
+ * List models belonging to this project ID.
796
+ */
797
+ projectId?: string;
798
+ /**
799
+ * Page number.
800
+ */
801
+ page?: number;
802
+ /**
803
+ * Maximum number of results to return per page.
804
+ */
805
+ pageSize?: number;
806
+ /**
807
+ * Sort order of the returned results.
808
+ */
809
+ orderBy?: ListModelsRequestOrderBy;
810
+ };
811
+ export interface ListModelsResponse {
812
+ /**
813
+ * Total number of models.
814
+ */
815
+ totalCount: number;
816
+ /**
817
+ * List of models.
818
+ */
819
+ models: Model[];
820
+ }
605
821
  export type ListPlatformsRequest = {
606
822
  /**
607
823
  * List platforms with this provider name.
@@ -762,6 +978,16 @@ export type TerminateSessionRequest = {
762
978
  */
763
979
  sessionId: string;
764
980
  };
981
+ export type UpdateBookingRequest = {
982
+ /**
983
+ * Unique ID of the booking.
984
+ */
985
+ bookingId: string;
986
+ /**
987
+ * Description of the booking slot.
988
+ */
989
+ description?: string;
990
+ };
765
991
  export type UpdateJobRequest = {
766
992
  /**
767
993
  * Unique ID of the job.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-qaas",
3
- "version": "1.1.5",
3
+ "version": "1.3.0",
4
4
  "description": "Scaleway SDK qaas",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,17 +26,17 @@
26
26
  "directory": "packages_generated/qaas"
27
27
  },
28
28
  "engines": {
29
- "node": ">=20.19.1"
29
+ "node": ">=20.19.4"
30
30
  },
31
31
  "dependencies": {
32
- "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.5"
32
+ "@scaleway/random-name": "5.1.2",
33
+ "@scaleway/sdk-std": "1.0.6"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.3.0"
36
+ "@scaleway/sdk-client": "^1.3.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.3.0"
39
+ "@scaleway/sdk-client": "^1.3.1"
40
40
  },
41
41
  "scripts": {
42
42
  "package:check": "pnpm publint",