@scaleway/sdk-qaas 2.7.0 → 2.8.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.
@@ -0,0 +1,3 @@
1
+ # Licenses
2
+
3
+ The app does not bundle any dependencies with licenses.
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated
3
+ * PLEASE DO NOT EDIT HERE
4
+ */
5
+ export * as Qaasv1alpha1 from './v1alpha1/index.gen.js';
@@ -0,0 +1,2 @@
1
+ import { index_gen_exports } from "./v1alpha1/index.gen.js";
2
+ export { index_gen_exports as Qaasv1alpha1 };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is automatically generated
3
+ * PLEASE DO NOT EDIT HERE
4
+ */
5
+ export declare const pkgMetadata: {
6
+ readonly name: "@scaleway/sdk-qaas";
7
+ readonly namespace: "qaas";
8
+ readonly displayName: "Qaas";
9
+ readonly versions: readonly ["v1alpha1"];
10
+ };
11
+ export type Metadata = typeof pkgMetadata;
12
+ export default pkgMetadata;
@@ -0,0 +1,13 @@
1
+ //#region src/metadata.gen.ts
2
+ /**
3
+ * This file is automatically generated
4
+ * PLEASE DO NOT EDIT HERE
5
+ */
6
+ const pkgMetadata = {
7
+ name: "@scaleway/sdk-qaas",
8
+ namespace: "qaas",
9
+ displayName: "Qaas",
10
+ versions: ["v1alpha1"]
11
+ };
12
+ //#endregion
13
+ export { pkgMetadata as default, pkgMetadata };
@@ -0,0 +1,297 @@
1
+ import { API as ParentAPI } from '@scaleway/sdk-client';
2
+ import type { WaitForOptions } from '@scaleway/sdk-client';
3
+ import type { Application, Booking, CancelJobRequest, CancelProcessRequest, CreateJobRequest, CreateModelRequest, CreateProcessRequest, CreateSessionRequest, DeleteJobRequest, DeleteProcessRequest, DeleteSessionRequest, GetApplicationRequest, GetBookingRequest, GetJobCircuitRequest, GetJobRequest, GetModelRequest, GetPlatformRequest, GetProcessRequest, GetSessionRequest, Job, JobCircuit, ListApplicationsRequest, ListApplicationsResponse, ListBookingsRequest, ListBookingsResponse, ListJobResultsRequest, ListJobResultsResponse, ListJobsRequest, ListJobsResponse, ListModelsRequest, ListModelsResponse, ListPlatformsRequest, ListPlatformsResponse, ListProcessResultsRequest, ListProcessResultsResponse, ListProcessesRequest, ListProcessesResponse, ListSessionACLsRequest, ListSessionACLsResponse, ListSessionsRequest, ListSessionsResponse, Model, Platform, Process, Session, TerminateSessionRequest, UpdateBookingRequest, UpdateJobRequest, UpdateProcessRequest, UpdateSessionRequest } from './types.gen.js';
4
+ /**
5
+ * Quantum as a Service API.
6
+
7
+ This API allows you to allocate and program Quantum Processing Units (QPUs) to run quantum algorithms.
8
+ */
9
+ export declare class API extends ParentAPI {
10
+ /**
11
+ * Get job information. Retrieve information about the provided **job ID**, mainly used to get the current status.
12
+ *
13
+ * @param request - The request {@link GetJobRequest}
14
+ * @returns A Promise of Job
15
+ */
16
+ getJob: (request: Readonly<GetJobRequest>) => Promise<Job>;
17
+ /**
18
+ * Waits for {@link Job} to be in a final state.
19
+ *
20
+ * @param request - The request {@link GetJobRequest}
21
+ * @param options - The waiting options
22
+ * @returns A Promise of Job
23
+ */
24
+ waitForJob: (request: Readonly<GetJobRequest>, options?: Readonly<WaitForOptions<Job>>) => Promise<Job>;
25
+ protected pageOfListJobs: (request?: Readonly<ListJobsRequest>) => Promise<ListJobsResponse>;
26
+ /**
27
+ * List all jobs within a project or session. Retrieve information about all jobs within a given session.
28
+ *
29
+ * @param request - The request {@link ListJobsRequest}
30
+ * @returns A Promise of ListJobsResponse
31
+ */
32
+ listJobs: (request?: Readonly<ListJobsRequest>) => Promise<ListJobsResponse> & {
33
+ all: () => Promise<Job[]>;
34
+ [Symbol.asyncIterator]: () => AsyncGenerator<Job[], void, void>;
35
+ };
36
+ protected pageOfListJobResults: (request: Readonly<ListJobResultsRequest>) => Promise<ListJobResultsResponse>;
37
+ /**
38
+ * List all results of a job. Retrieve all intermediate and final results of a job.
39
+ *
40
+ * @param request - The request {@link ListJobResultsRequest}
41
+ * @returns A Promise of ListJobResultsResponse
42
+ */
43
+ listJobResults: (request: Readonly<ListJobResultsRequest>) => Promise<ListJobResultsResponse> & {
44
+ all: () => Promise<import("./types.gen.js").JobResult[]>;
45
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").JobResult[], void, void>;
46
+ };
47
+ /**
48
+ * Create a job. Create a job to be executed inside a QPU session.
49
+ *
50
+ * @param request - The request {@link CreateJobRequest}
51
+ * @returns A Promise of Job
52
+ */
53
+ createJob: (request: Readonly<CreateJobRequest>) => Promise<Job>;
54
+ /**
55
+ * Update job information. Update job information about the provided **job ID**.
56
+ *
57
+ * @param request - The request {@link UpdateJobRequest}
58
+ * @returns A Promise of Job
59
+ */
60
+ updateJob: (request: Readonly<UpdateJobRequest>) => Promise<Job>;
61
+ /**
62
+ * Cancel a job. Cancel the job corresponding to the provided **job ID**.
63
+ *
64
+ * @param request - The request {@link CancelJobRequest}
65
+ * @returns A Promise of Job
66
+ */
67
+ cancelJob: (request: Readonly<CancelJobRequest>) => Promise<Job>;
68
+ /**
69
+ * Delete a job. Delete the job corresponding to the provided **job ID**.
70
+ *
71
+ * @param request - The request {@link DeleteJobRequest}
72
+ */
73
+ deleteJob: (request: Readonly<DeleteJobRequest>) => Promise<void>;
74
+ /**
75
+ * Get a job circuit. Retrieve the circuit of the provided **job ID**.
76
+ *
77
+ * @param request - The request {@link GetJobCircuitRequest}
78
+ * @returns A Promise of JobCircuit
79
+ */
80
+ getJobCircuit: (request: Readonly<GetJobCircuitRequest>) => Promise<JobCircuit>;
81
+ /**
82
+ * Get platform information. Retrieve information about the provided **platform ID**, such as provider name, technology, and type.
83
+ *
84
+ * @param request - The request {@link GetPlatformRequest}
85
+ * @returns A Promise of Platform
86
+ */
87
+ getPlatform: (request: Readonly<GetPlatformRequest>) => Promise<Platform>;
88
+ protected pageOfListPlatforms: (request?: Readonly<ListPlatformsRequest>) => Promise<ListPlatformsResponse>;
89
+ /**
90
+ * List all available platforms. Retrieve information about all platforms.
91
+ *
92
+ * @param request - The request {@link ListPlatformsRequest}
93
+ * @returns A Promise of ListPlatformsResponse
94
+ */
95
+ listPlatforms: (request?: Readonly<ListPlatformsRequest>) => Promise<ListPlatformsResponse> & {
96
+ all: () => Promise<Platform[]>;
97
+ [Symbol.asyncIterator]: () => AsyncGenerator<Platform[], void, void>;
98
+ };
99
+ /**
100
+ * Get session information. Retrieve information about the provided **session ID**, such as name and status.
101
+ *
102
+ * @param request - The request {@link GetSessionRequest}
103
+ * @returns A Promise of Session
104
+ */
105
+ getSession: (request: Readonly<GetSessionRequest>) => Promise<Session>;
106
+ /**
107
+ * Waits for {@link Session} to be in a final state.
108
+ *
109
+ * @param request - The request {@link GetSessionRequest}
110
+ * @param options - The waiting options
111
+ * @returns A Promise of Session
112
+ */
113
+ waitForSession: (request: Readonly<GetSessionRequest>, options?: Readonly<WaitForOptions<Session>>) => Promise<Session>;
114
+ protected pageOfListSessions: (request?: Readonly<ListSessionsRequest>) => Promise<ListSessionsResponse>;
115
+ /**
116
+ * List all sessions. Retrieve information about all QPU sessions.
117
+ *
118
+ * @param request - The request {@link ListSessionsRequest}
119
+ * @returns A Promise of ListSessionsResponse
120
+ */
121
+ listSessions: (request?: Readonly<ListSessionsRequest>) => Promise<ListSessionsResponse> & {
122
+ all: () => Promise<Session[]>;
123
+ [Symbol.asyncIterator]: () => AsyncGenerator<Session[], void, void>;
124
+ };
125
+ /**
126
+ * Create a session. Create a new QPU session for the specified platform. Once ready, jobs can be sent to this session.
127
+ *
128
+ * @param request - The request {@link CreateSessionRequest}
129
+ * @returns A Promise of Session
130
+ */
131
+ createSession: (request: Readonly<CreateSessionRequest>) => Promise<Session>;
132
+ /**
133
+ * Update session information. Update session information of the provided **session ID**.
134
+ *
135
+ * @param request - The request {@link UpdateSessionRequest}
136
+ * @returns A Promise of Session
137
+ */
138
+ updateSession: (request: Readonly<UpdateSessionRequest>) => Promise<Session>;
139
+ /**
140
+ * Terminate an existing session. Terminate a session by its unique ID and cancel all its attached jobs and bookings.
141
+ *
142
+ * @param request - The request {@link TerminateSessionRequest}
143
+ * @returns A Promise of Session
144
+ */
145
+ terminateSession: (request: Readonly<TerminateSessionRequest>) => Promise<Session>;
146
+ /**
147
+ * Delete an existing session. Delete a session by its unique ID and delete all its attached jobs and bookings.
148
+ *
149
+ * @param request - The request {@link DeleteSessionRequest}
150
+ */
151
+ deleteSession: (request: Readonly<DeleteSessionRequest>) => Promise<void>;
152
+ protected pageOfListSessionACLs: (request: Readonly<ListSessionACLsRequest>) => Promise<ListSessionACLsResponse>;
153
+ listSessionACLs: (request: Readonly<ListSessionACLsRequest>) => Promise<ListSessionACLsResponse> & {
154
+ all: () => Promise<import("./types.gen.js").SessionAccess[]>;
155
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").SessionAccess[], void, void>;
156
+ };
157
+ /**
158
+ * Create a process. Create a new process for the specified application on a specified platform.
159
+ *
160
+ * @param request - The request {@link CreateProcessRequest}
161
+ * @returns A Promise of Process
162
+ */
163
+ createProcess: (request: Readonly<CreateProcessRequest>) => Promise<Process>;
164
+ /**
165
+ * Get process information. Retrieve information about the provided **process ID**, such as name, status and progress.
166
+ *
167
+ * @param request - The request {@link GetProcessRequest}
168
+ * @returns A Promise of Process
169
+ */
170
+ getProcess: (request: Readonly<GetProcessRequest>) => Promise<Process>;
171
+ /**
172
+ * Waits for {@link Process} to be in a final state.
173
+ *
174
+ * @param request - The request {@link GetProcessRequest}
175
+ * @param options - The waiting options
176
+ * @returns A Promise of Process
177
+ */
178
+ waitForProcess: (request: Readonly<GetProcessRequest>, options?: Readonly<WaitForOptions<Process>>) => Promise<Process>;
179
+ protected pageOfListProcesses: (request?: Readonly<ListProcessesRequest>) => Promise<ListProcessesResponse>;
180
+ /**
181
+ * List all processes. Retrieve information about all processes.
182
+ *
183
+ * @param request - The request {@link ListProcessesRequest}
184
+ * @returns A Promise of ListProcessesResponse
185
+ */
186
+ listProcesses: (request?: Readonly<ListProcessesRequest>) => Promise<ListProcessesResponse> & {
187
+ all: () => Promise<Process[]>;
188
+ [Symbol.asyncIterator]: () => AsyncGenerator<Process[], void, void>;
189
+ };
190
+ /**
191
+ * Update process information. Update process information of the provided **process ID**.
192
+ *
193
+ * @param request - The request {@link UpdateProcessRequest}
194
+ * @returns A Promise of Process
195
+ */
196
+ updateProcess: (request: Readonly<UpdateProcessRequest>) => Promise<Process>;
197
+ /**
198
+ * Cancel a running process. Cancel a process by its unique ID. Intermediate results are still available.
199
+ *
200
+ * @param request - The request {@link CancelProcessRequest}
201
+ * @returns A Promise of Process
202
+ */
203
+ cancelProcess: (request: Readonly<CancelProcessRequest>) => Promise<Process>;
204
+ /**
205
+ * Delete an existing process. Delete a process by its unique ID and delete all its data.
206
+ *
207
+ * @param request - The request {@link DeleteProcessRequest}
208
+ */
209
+ deleteProcess: (request: Readonly<DeleteProcessRequest>) => Promise<void>;
210
+ protected pageOfListProcessResults: (request: Readonly<ListProcessResultsRequest>) => Promise<ListProcessResultsResponse>;
211
+ /**
212
+ * List all results of a process. Retrieve all intermediate and final result of a process.
213
+ *
214
+ * @param request - The request {@link ListProcessResultsRequest}
215
+ * @returns A Promise of ListProcessResultsResponse
216
+ */
217
+ listProcessResults: (request: Readonly<ListProcessResultsRequest>) => Promise<ListProcessResultsResponse> & {
218
+ all: () => Promise<import("./types.gen.js").ProcessResult[]>;
219
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen.js").ProcessResult[], void, void>;
220
+ };
221
+ /**
222
+ * Get application information. Retrieve information about the provided **application ID**, such as name, type and compatible platforms.
223
+ *
224
+ * @param request - The request {@link GetApplicationRequest}
225
+ * @returns A Promise of Application
226
+ */
227
+ getApplication: (request: Readonly<GetApplicationRequest>) => Promise<Application>;
228
+ protected pageOfListApplications: (request?: Readonly<ListApplicationsRequest>) => Promise<ListApplicationsResponse>;
229
+ /**
230
+ * List all available applications. Retrieve information about all applications.
231
+ *
232
+ * @param request - The request {@link ListApplicationsRequest}
233
+ * @returns A Promise of ListApplicationsResponse
234
+ */
235
+ listApplications: (request?: Readonly<ListApplicationsRequest>) => Promise<ListApplicationsResponse> & {
236
+ all: () => Promise<Application[]>;
237
+ [Symbol.asyncIterator]: () => AsyncGenerator<Application[], void, void>;
238
+ };
239
+ /**
240
+ * Get booking information. Retrieve information about the provided **booking ID**, such as description, status and progress message.
241
+ *
242
+ * @param request - The request {@link GetBookingRequest}
243
+ * @returns A Promise of Booking
244
+ */
245
+ getBooking: (request: Readonly<GetBookingRequest>) => Promise<Booking>;
246
+ /**
247
+ * Waits for {@link Booking} to be in a final state.
248
+ *
249
+ * @param request - The request {@link GetBookingRequest}
250
+ * @param options - The waiting options
251
+ * @returns A Promise of Booking
252
+ */
253
+ waitForBooking: (request: Readonly<GetBookingRequest>, options?: Readonly<WaitForOptions<Booking>>) => Promise<Booking>;
254
+ protected pageOfListBookings: (request?: Readonly<ListBookingsRequest>) => Promise<ListBookingsResponse>;
255
+ /**
256
+ * List all bookings according the filter. Retrieve information about all bookings of the provided **project ID** or ** platform ID**.
257
+ *
258
+ * @param request - The request {@link ListBookingsRequest}
259
+ * @returns A Promise of ListBookingsResponse
260
+ */
261
+ listBookings: (request?: Readonly<ListBookingsRequest>) => Promise<ListBookingsResponse> & {
262
+ all: () => Promise<Booking[]>;
263
+ [Symbol.asyncIterator]: () => AsyncGenerator<Booking[], void, void>;
264
+ };
265
+ /**
266
+ * Update booking information. Update booking information of the provided **booking ID**.
267
+ *
268
+ * @param request - The request {@link UpdateBookingRequest}
269
+ * @returns A Promise of Booking
270
+ */
271
+ updateBooking: (request: Readonly<UpdateBookingRequest>) => Promise<Booking>;
272
+ /**
273
+ * 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.
274
+ *
275
+ * @param request - The request {@link CreateModelRequest}
276
+ * @returns A Promise of Model
277
+ */
278
+ createModel: (request?: Readonly<CreateModelRequest>) => Promise<Model>;
279
+ /**
280
+ * Get model information. Retrieve information about of the provided **model ID**.
281
+ *
282
+ * @param request - The request {@link GetModelRequest}
283
+ * @returns A Promise of Model
284
+ */
285
+ getModel: (request: Readonly<GetModelRequest>) => Promise<Model>;
286
+ protected pageOfListModels: (request?: Readonly<ListModelsRequest>) => Promise<ListModelsResponse>;
287
+ /**
288
+ * List all models attached to the **project ID**. Retrieve information about all models of the provided **project ID**.
289
+ *
290
+ * @param request - The request {@link ListModelsRequest}
291
+ * @returns A Promise of ListModelsResponse
292
+ */
293
+ listModels: (request?: Readonly<ListModelsRequest>) => Promise<ListModelsResponse> & {
294
+ all: () => Promise<Model[]>;
295
+ [Symbol.asyncIterator]: () => AsyncGenerator<Model[], void, void>;
296
+ };
297
+ }
@@ -0,0 +1,198 @@
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 as API$1, enrichForPagination, resolveOneOf, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
+ //#region src/v1alpha1/api.gen.ts
5
+ const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
6
+ /**
7
+ * Quantum as a Service API.
8
+
9
+ This API allows you to allocate and program Quantum Processing Units (QPUs) to run quantum algorithms.
10
+ */
11
+ var API = class extends API$1 {
12
+ constructor(..._args) {
13
+ super(..._args);
14
+ this.getJob = (request) => this.client.fetch({
15
+ method: "GET",
16
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
17
+ }, unmarshalJob);
18
+ this.waitForJob = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!JOB_TRANSIENT_STATUSES.includes(res.status))), this.getJob, request, options);
19
+ this.pageOfListJobs = (request = {}) => this.client.fetch({
20
+ method: "GET",
21
+ path: `/qaas/v1alpha1/jobs`,
22
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tags", request.tags], ...Object.entries(resolveOneOf([{
23
+ param: "session_id",
24
+ value: request.sessionId
25
+ }, {
26
+ default: this.client.settings.defaultProjectId,
27
+ param: "project_id",
28
+ value: request.projectId
29
+ }])))
30
+ }, unmarshalListJobsResponse);
31
+ this.listJobs = (request = {}) => enrichForPagination("jobs", this.pageOfListJobs, request);
32
+ this.pageOfListJobResults = (request) => this.client.fetch({
33
+ method: "GET",
34
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/results`,
35
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
36
+ }, unmarshalListJobResultsResponse);
37
+ this.listJobResults = (request) => enrichForPagination("jobResults", this.pageOfListJobResults, request);
38
+ this.createJob = (request) => this.client.fetch({
39
+ body: JSON.stringify(marshalCreateJobRequest(request, this.client.settings)),
40
+ headers: jsonContentHeaders,
41
+ method: "POST",
42
+ path: `/qaas/v1alpha1/jobs`
43
+ }, unmarshalJob);
44
+ this.updateJob = (request) => this.client.fetch({
45
+ body: JSON.stringify(marshalUpdateJobRequest(request, this.client.settings)),
46
+ headers: jsonContentHeaders,
47
+ method: "PATCH",
48
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
49
+ }, unmarshalJob);
50
+ this.cancelJob = (request) => this.client.fetch({
51
+ body: "{}",
52
+ headers: jsonContentHeaders,
53
+ method: "POST",
54
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/cancel`
55
+ }, unmarshalJob);
56
+ this.deleteJob = (request) => this.client.fetch({
57
+ method: "DELETE",
58
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
59
+ });
60
+ this.getJobCircuit = (request) => this.client.fetch({
61
+ method: "GET",
62
+ path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/circuit`
63
+ }, unmarshalJobCircuit);
64
+ this.getPlatform = (request) => this.client.fetch({
65
+ method: "GET",
66
+ path: `/qaas/v1alpha1/platforms/${validatePathParam("platformId", request.platformId)}`
67
+ }, unmarshalPlatform);
68
+ this.pageOfListPlatforms = (request = {}) => this.client.fetch({
69
+ method: "GET",
70
+ path: `/qaas/v1alpha1/platforms`,
71
+ 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])
72
+ }, unmarshalListPlatformsResponse);
73
+ this.listPlatforms = (request = {}) => enrichForPagination("platforms", this.pageOfListPlatforms, request);
74
+ this.getSession = (request) => this.client.fetch({
75
+ method: "GET",
76
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
77
+ }, unmarshalSession);
78
+ this.waitForSession = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))), this.getSession, request, options);
79
+ this.pageOfListSessions = (request = {}) => this.client.fetch({
80
+ method: "GET",
81
+ path: `/qaas/v1alpha1/sessions`,
82
+ 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])
83
+ }, unmarshalListSessionsResponse);
84
+ this.listSessions = (request = {}) => enrichForPagination("sessions", this.pageOfListSessions, request);
85
+ this.createSession = (request) => this.client.fetch({
86
+ body: JSON.stringify(marshalCreateSessionRequest(request, this.client.settings)),
87
+ headers: jsonContentHeaders,
88
+ method: "POST",
89
+ path: `/qaas/v1alpha1/sessions`
90
+ }, unmarshalSession);
91
+ this.updateSession = (request) => this.client.fetch({
92
+ body: JSON.stringify(marshalUpdateSessionRequest(request, this.client.settings)),
93
+ headers: jsonContentHeaders,
94
+ method: "PATCH",
95
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
96
+ }, unmarshalSession);
97
+ this.terminateSession = (request) => this.client.fetch({
98
+ body: "{}",
99
+ headers: jsonContentHeaders,
100
+ method: "POST",
101
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/terminate`
102
+ }, unmarshalSession);
103
+ this.deleteSession = (request) => this.client.fetch({
104
+ method: "DELETE",
105
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
106
+ });
107
+ this.pageOfListSessionACLs = (request) => this.client.fetch({
108
+ method: "GET",
109
+ path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/acls`,
110
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
111
+ }, unmarshalListSessionACLsResponse);
112
+ this.listSessionACLs = (request) => enrichForPagination("acls", this.pageOfListSessionACLs, request);
113
+ this.createProcess = (request) => this.client.fetch({
114
+ body: JSON.stringify(marshalCreateProcessRequest(request, this.client.settings)),
115
+ headers: jsonContentHeaders,
116
+ method: "POST",
117
+ path: `/qaas/v1alpha1/processes`
118
+ }, unmarshalProcess);
119
+ this.getProcess = (request) => this.client.fetch({
120
+ method: "GET",
121
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
122
+ }, unmarshalProcess);
123
+ this.waitForProcess = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))), this.getProcess, request, options);
124
+ this.pageOfListProcesses = (request = {}) => this.client.fetch({
125
+ method: "GET",
126
+ path: `/qaas/v1alpha1/processes`,
127
+ 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])
128
+ }, unmarshalListProcessesResponse);
129
+ this.listProcesses = (request = {}) => enrichForPagination("processes", this.pageOfListProcesses, request);
130
+ this.updateProcess = (request) => this.client.fetch({
131
+ body: JSON.stringify(marshalUpdateProcessRequest(request, this.client.settings)),
132
+ headers: jsonContentHeaders,
133
+ method: "PATCH",
134
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
135
+ }, unmarshalProcess);
136
+ this.cancelProcess = (request) => this.client.fetch({
137
+ body: "{}",
138
+ headers: jsonContentHeaders,
139
+ method: "POST",
140
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
141
+ }, unmarshalProcess);
142
+ this.deleteProcess = (request) => this.client.fetch({
143
+ method: "DELETE",
144
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
145
+ });
146
+ this.pageOfListProcessResults = (request) => this.client.fetch({
147
+ method: "GET",
148
+ path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
149
+ urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
150
+ }, unmarshalListProcessResultsResponse);
151
+ this.listProcessResults = (request) => enrichForPagination("processResults", this.pageOfListProcessResults, request);
152
+ this.getApplication = (request) => this.client.fetch({
153
+ method: "GET",
154
+ path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
155
+ }, unmarshalApplication);
156
+ this.pageOfListApplications = (request = {}) => this.client.fetch({
157
+ method: "GET",
158
+ path: `/qaas/v1alpha1/applications`,
159
+ urlParams: urlParams(["application_type", request.applicationType], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
160
+ }, unmarshalListApplicationsResponse);
161
+ this.listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
162
+ this.getBooking = (request) => this.client.fetch({
163
+ method: "GET",
164
+ path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
165
+ }, unmarshalBooking);
166
+ this.waitForBooking = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BOOKING_TRANSIENT_STATUSES.includes(res.status))), this.getBooking, request, options);
167
+ this.pageOfListBookings = (request = {}) => this.client.fetch({
168
+ method: "GET",
169
+ path: `/qaas/v1alpha1/bookings`,
170
+ 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])
171
+ }, unmarshalListBookingsResponse);
172
+ this.listBookings = (request = {}) => enrichForPagination("bookings", this.pageOfListBookings, request);
173
+ this.updateBooking = (request) => this.client.fetch({
174
+ body: JSON.stringify(marshalUpdateBookingRequest(request, this.client.settings)),
175
+ headers: jsonContentHeaders,
176
+ method: "PATCH",
177
+ path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
178
+ }, unmarshalBooking);
179
+ this.createModel = (request = {}) => this.client.fetch({
180
+ body: JSON.stringify(marshalCreateModelRequest(request, this.client.settings)),
181
+ headers: jsonContentHeaders,
182
+ method: "POST",
183
+ path: `/qaas/v1alpha1/models`
184
+ }, unmarshalModel);
185
+ this.getModel = (request) => this.client.fetch({
186
+ method: "GET",
187
+ path: `/qaas/v1alpha1/models/${validatePathParam("modelId", request.modelId)}`
188
+ }, unmarshalModel);
189
+ this.pageOfListModels = (request = {}) => this.client.fetch({
190
+ method: "GET",
191
+ path: `/qaas/v1alpha1/models`,
192
+ 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])
193
+ }, unmarshalListModelsResponse);
194
+ this.listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
195
+ }
196
+ };
197
+ //#endregion
198
+ export { API };
@@ -0,0 +1,9 @@
1
+ import type { BookingStatus, JobStatus, ProcessStatus, SessionStatus } from './types.gen.js';
2
+ /** Lists transient statutes of the enum {@link BookingStatus}. */
3
+ export declare const BOOKING_TRANSIENT_STATUSES: BookingStatus[];
4
+ /** Lists transient statutes of the enum {@link JobStatus}. */
5
+ export declare const JOB_TRANSIENT_STATUSES: JobStatus[];
6
+ /** Lists transient statutes of the enum {@link ProcessStatus}. */
7
+ export declare const PROCESS_TRANSIENT_STATUSES: ProcessStatus[];
8
+ /** Lists transient statutes of the enum {@link SessionStatus}. */
9
+ export declare const SESSION_TRANSIENT_STATUSES: SessionStatus[];
@@ -0,0 +1,23 @@
1
+ //#region src/v1alpha1/content.gen.ts
2
+ /** Lists transient statutes of the enum {@link BookingStatus}. */
3
+ const BOOKING_TRANSIENT_STATUSES = [
4
+ "waiting",
5
+ "validating",
6
+ "cancelling"
7
+ ];
8
+ /** Lists transient statutes of the enum {@link JobStatus}. */
9
+ const JOB_TRANSIENT_STATUSES = [
10
+ "waiting",
11
+ "running",
12
+ "cancelling"
13
+ ];
14
+ /** Lists transient statutes of the enum {@link ProcessStatus}. */
15
+ const PROCESS_TRANSIENT_STATUSES = [
16
+ "starting",
17
+ "running",
18
+ "cancelling"
19
+ ];
20
+ /** Lists transient statutes of the enum {@link SessionStatus}. */
21
+ const SESSION_TRANSIENT_STATUSES = ["starting", "stopping"];
22
+ //#endregion
23
+ export { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES };
@@ -0,0 +1,5 @@
1
+ export { API, } from './api.gen.js';
2
+ export * from './content.gen.js';
3
+ export * from './marshalling.gen.js';
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, ListProcessResultsRequest, ListProcessResultsRequestOrderBy, ListProcessResultsResponse, ListProcessesRequest, ListProcessesRequestOrderBy, ListProcessesResponse, 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';
5
+ export * as ValidationRules from './validation-rules.gen.js';
@@ -0,0 +1,42 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
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
+ import { API } from "./api.gen.js";
5
+ import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
+ //#region src/v1alpha1/index.gen.ts
7
+ var index_gen_exports = /* @__PURE__ */ __exportAll({
8
+ API: () => API,
9
+ BOOKING_TRANSIENT_STATUSES: () => BOOKING_TRANSIENT_STATUSES,
10
+ JOB_TRANSIENT_STATUSES: () => JOB_TRANSIENT_STATUSES,
11
+ PROCESS_TRANSIENT_STATUSES: () => PROCESS_TRANSIENT_STATUSES,
12
+ SESSION_TRANSIENT_STATUSES: () => SESSION_TRANSIENT_STATUSES,
13
+ ValidationRules: () => validation_rules_gen_exports,
14
+ marshalCreateJobRequest: () => marshalCreateJobRequest,
15
+ marshalCreateModelRequest: () => marshalCreateModelRequest,
16
+ marshalCreateProcessRequest: () => marshalCreateProcessRequest,
17
+ marshalCreateSessionRequest: () => marshalCreateSessionRequest,
18
+ marshalUpdateBookingRequest: () => marshalUpdateBookingRequest,
19
+ marshalUpdateJobRequest: () => marshalUpdateJobRequest,
20
+ marshalUpdateProcessRequest: () => marshalUpdateProcessRequest,
21
+ marshalUpdateSessionRequest: () => marshalUpdateSessionRequest,
22
+ unmarshalApplication: () => unmarshalApplication,
23
+ unmarshalBooking: () => unmarshalBooking,
24
+ unmarshalJob: () => unmarshalJob,
25
+ unmarshalJobCircuit: () => unmarshalJobCircuit,
26
+ unmarshalListApplicationsResponse: () => unmarshalListApplicationsResponse,
27
+ unmarshalListBookingsResponse: () => unmarshalListBookingsResponse,
28
+ unmarshalListJobResultsResponse: () => unmarshalListJobResultsResponse,
29
+ unmarshalListJobsResponse: () => unmarshalListJobsResponse,
30
+ unmarshalListModelsResponse: () => unmarshalListModelsResponse,
31
+ unmarshalListPlatformsResponse: () => unmarshalListPlatformsResponse,
32
+ unmarshalListProcessResultsResponse: () => unmarshalListProcessResultsResponse,
33
+ unmarshalListProcessesResponse: () => unmarshalListProcessesResponse,
34
+ unmarshalListSessionACLsResponse: () => unmarshalListSessionACLsResponse,
35
+ unmarshalListSessionsResponse: () => unmarshalListSessionsResponse,
36
+ unmarshalModel: () => unmarshalModel,
37
+ unmarshalPlatform: () => unmarshalPlatform,
38
+ unmarshalProcess: () => unmarshalProcess,
39
+ unmarshalSession: () => unmarshalSession
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 };