@scaleway/sdk-qaas 2.5.0 → 2.6.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.
@@ -0,0 +1,3 @@
1
+ # Licenses
2
+
3
+ The app does not bundle any dependencies with licenses.
@@ -2,11 +2,11 @@
2
2
  * This file is automatically generated
3
3
  * PLEASE DO NOT EDIT HERE
4
4
  */
5
- export type Metadata = {
6
- name: string;
7
- namespace: string;
8
- displayName: string;
9
- versions: string[];
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
10
  };
11
- export declare const pkgMetadata: Metadata;
11
+ export type Metadata = typeof pkgMetadata;
12
12
  export default pkgMetadata;
@@ -1,9 +1,13 @@
1
- import metadata_gen_default from "./metadata2.gen.js";
2
1
  //#region src/metadata.gen.ts
3
2
  /**
4
3
  * This file is automatically generated
5
4
  * PLEASE DO NOT EDIT HERE
6
5
  */
7
- var pkgMetadata = metadata_gen_default;
6
+ const pkgMetadata = {
7
+ name: "@scaleway/sdk-qaas",
8
+ namespace: "qaas",
9
+ displayName: "Qaas",
10
+ versions: ["v1alpha1"]
11
+ };
8
12
  //#endregion
9
13
  export { pkgMetadata as default, pkgMetadata };
@@ -21,7 +21,7 @@ export declare class API extends ParentAPI {
21
21
  * @param options - The waiting options
22
22
  * @returns A Promise of Job
23
23
  */
24
- waitForJob: (request: Readonly<GetJobRequest>, options?: Readonly<WaitForOptions<Job>>) => Promise<Job>;
24
+ waitForJob: (request: Readonly<GetJobRequest>, options?: Readonly<WaitForOptions<Job>> | undefined) => Promise<Job>;
25
25
  protected pageOfListJobs: (request?: Readonly<ListJobsRequest>) => Promise<ListJobsResponse>;
26
26
  /**
27
27
  * List all jobs within a project or session. Retrieve information about all jobs within a given session.
@@ -110,7 +110,7 @@ export declare class API extends ParentAPI {
110
110
  * @param options - The waiting options
111
111
  * @returns A Promise of Session
112
112
  */
113
- waitForSession: (request: Readonly<GetSessionRequest>, options?: Readonly<WaitForOptions<Session>>) => Promise<Session>;
113
+ waitForSession: (request: Readonly<GetSessionRequest>, options?: Readonly<WaitForOptions<Session>> | undefined) => Promise<Session>;
114
114
  protected pageOfListSessions: (request?: Readonly<ListSessionsRequest>) => Promise<ListSessionsResponse>;
115
115
  /**
116
116
  * List all sessions. Retrieve information about all QPU sessions.
@@ -175,7 +175,7 @@ export declare class API extends ParentAPI {
175
175
  * @param options - The waiting options
176
176
  * @returns A Promise of Process
177
177
  */
178
- waitForProcess: (request: Readonly<GetProcessRequest>, options?: Readonly<WaitForOptions<Process>>) => Promise<Process>;
178
+ waitForProcess: (request: Readonly<GetProcessRequest>, options?: Readonly<WaitForOptions<Process>> | undefined) => Promise<Process>;
179
179
  protected pageOfListProcesses: (request?: Readonly<ListProcessesRequest>) => Promise<ListProcessesResponse>;
180
180
  /**
181
181
  * List all processes. Retrieve information about all processes.
@@ -250,7 +250,7 @@ export declare class API extends ParentAPI {
250
250
  * @param options - The waiting options
251
251
  * @returns A Promise of Booking
252
252
  */
253
- waitForBooking: (request: Readonly<GetBookingRequest>, options?: Readonly<WaitForOptions<Booking>>) => Promise<Booking>;
253
+ waitForBooking: (request: Readonly<GetBookingRequest>, options?: Readonly<WaitForOptions<Booking>> | undefined) => Promise<Booking>;
254
254
  protected pageOfListBookings: (request?: Readonly<ListBookingsRequest>) => Promise<ListBookingsResponse>;
255
255
  /**
256
256
  * List all bookings according the filter. Retrieve information about all bookings of the provided **project ID** or ** platform ID**.
@@ -2,405 +2,197 @@ import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_S
2
2
  import { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession } from "./marshalling.gen.js";
3
3
  import { API as API$1, enrichForPagination, resolveOneOf, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
4
  //#region src/v1alpha1/api.gen.ts
5
- var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
+ const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
6
6
  /**
7
7
  * Quantum as a Service API.
8
8
 
9
9
  This API allows you to allocate and program Quantum Processing Units (QPUs) to run quantum algorithms.
10
10
  */
11
11
  var API = class extends API$1 {
12
- /**
13
- * Get job information. Retrieve information about the provided **job ID**, mainly used to get the current status.
14
- *
15
- * @param request - The request {@link GetJobRequest}
16
- * @returns A Promise of Job
17
- */
18
- getJob = (request) => this.client.fetch({
19
- method: "GET",
20
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
21
- }, unmarshalJob);
22
- /**
23
- * Waits for {@link Job} to be in a final state.
24
- *
25
- * @param request - The request {@link GetJobRequest}
26
- * @param options - The waiting options
27
- * @returns A Promise of Job
28
- */
29
- waitForJob = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!JOB_TRANSIENT_STATUSES.includes(res.status))), this.getJob, request, options);
30
- pageOfListJobs = (request = {}) => this.client.fetch({
31
- method: "GET",
32
- path: `/qaas/v1alpha1/jobs`,
33
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tags", request.tags], ...Object.entries(resolveOneOf([{
34
- param: "session_id",
35
- value: request.sessionId
36
- }, {
37
- default: this.client.settings.defaultProjectId,
38
- param: "project_id",
39
- value: request.projectId
40
- }])))
41
- }, unmarshalListJobsResponse);
42
- /**
43
- * List all jobs within a project or session. Retrieve information about all jobs within a given session.
44
- *
45
- * @param request - The request {@link ListJobsRequest}
46
- * @returns A Promise of ListJobsResponse
47
- */
48
- listJobs = (request = {}) => enrichForPagination("jobs", this.pageOfListJobs, request);
49
- pageOfListJobResults = (request) => this.client.fetch({
50
- method: "GET",
51
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/results`,
52
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
53
- }, unmarshalListJobResultsResponse);
54
- /**
55
- * List all results of a job. Retrieve all intermediate and final results of a job.
56
- *
57
- * @param request - The request {@link ListJobResultsRequest}
58
- * @returns A Promise of ListJobResultsResponse
59
- */
60
- listJobResults = (request) => enrichForPagination("jobResults", this.pageOfListJobResults, request);
61
- /**
62
- * Create a job. Create a job to be executed inside a QPU session.
63
- *
64
- * @param request - The request {@link CreateJobRequest}
65
- * @returns A Promise of Job
66
- */
67
- createJob = (request) => this.client.fetch({
68
- body: JSON.stringify(marshalCreateJobRequest(request, this.client.settings)),
69
- headers: jsonContentHeaders,
70
- method: "POST",
71
- path: `/qaas/v1alpha1/jobs`
72
- }, unmarshalJob);
73
- /**
74
- * Update job information. Update job information about the provided **job ID**.
75
- *
76
- * @param request - The request {@link UpdateJobRequest}
77
- * @returns A Promise of Job
78
- */
79
- updateJob = (request) => this.client.fetch({
80
- body: JSON.stringify(marshalUpdateJobRequest(request, this.client.settings)),
81
- headers: jsonContentHeaders,
82
- method: "PATCH",
83
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
84
- }, unmarshalJob);
85
- /**
86
- * Cancel a job. Cancel the job corresponding to the provided **job ID**.
87
- *
88
- * @param request - The request {@link CancelJobRequest}
89
- * @returns A Promise of Job
90
- */
91
- cancelJob = (request) => this.client.fetch({
92
- body: "{}",
93
- headers: jsonContentHeaders,
94
- method: "POST",
95
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/cancel`
96
- }, unmarshalJob);
97
- /**
98
- * Delete a job. Delete the job corresponding to the provided **job ID**.
99
- *
100
- * @param request - The request {@link DeleteJobRequest}
101
- */
102
- deleteJob = (request) => this.client.fetch({
103
- method: "DELETE",
104
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
105
- });
106
- /**
107
- * Get a job circuit. Retrieve the circuit of the provided **job ID**.
108
- *
109
- * @param request - The request {@link GetJobCircuitRequest}
110
- * @returns A Promise of JobCircuit
111
- */
112
- getJobCircuit = (request) => this.client.fetch({
113
- method: "GET",
114
- path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/circuit`
115
- }, unmarshalJobCircuit);
116
- /**
117
- * Get platform information. Retrieve information about the provided **platform ID**, such as provider name, technology, and type.
118
- *
119
- * @param request - The request {@link GetPlatformRequest}
120
- * @returns A Promise of Platform
121
- */
122
- getPlatform = (request) => this.client.fetch({
123
- method: "GET",
124
- path: `/qaas/v1alpha1/platforms/${validatePathParam("platformId", request.platformId)}`
125
- }, unmarshalPlatform);
126
- pageOfListPlatforms = (request = {}) => this.client.fetch({
127
- method: "GET",
128
- path: `/qaas/v1alpha1/platforms`,
129
- 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])
130
- }, unmarshalListPlatformsResponse);
131
- /**
132
- * List all available platforms. Retrieve information about all platforms.
133
- *
134
- * @param request - The request {@link ListPlatformsRequest}
135
- * @returns A Promise of ListPlatformsResponse
136
- */
137
- listPlatforms = (request = {}) => enrichForPagination("platforms", this.pageOfListPlatforms, request);
138
- /**
139
- * Get session information. Retrieve information about the provided **session ID**, such as name and status.
140
- *
141
- * @param request - The request {@link GetSessionRequest}
142
- * @returns A Promise of Session
143
- */
144
- getSession = (request) => this.client.fetch({
145
- method: "GET",
146
- path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
147
- }, unmarshalSession);
148
- /**
149
- * Waits for {@link Session} to be in a final state.
150
- *
151
- * @param request - The request {@link GetSessionRequest}
152
- * @param options - The waiting options
153
- * @returns A Promise of Session
154
- */
155
- waitForSession = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))), this.getSession, request, options);
156
- pageOfListSessions = (request = {}) => this.client.fetch({
157
- method: "GET",
158
- path: `/qaas/v1alpha1/sessions`,
159
- 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])
160
- }, unmarshalListSessionsResponse);
161
- /**
162
- * List all sessions. Retrieve information about all QPU sessions.
163
- *
164
- * @param request - The request {@link ListSessionsRequest}
165
- * @returns A Promise of ListSessionsResponse
166
- */
167
- listSessions = (request = {}) => enrichForPagination("sessions", this.pageOfListSessions, request);
168
- /**
169
- * Create a session. Create a new QPU session for the specified platform. Once ready, jobs can be sent to this session.
170
- *
171
- * @param request - The request {@link CreateSessionRequest}
172
- * @returns A Promise of Session
173
- */
174
- createSession = (request) => this.client.fetch({
175
- body: JSON.stringify(marshalCreateSessionRequest(request, this.client.settings)),
176
- headers: jsonContentHeaders,
177
- method: "POST",
178
- path: `/qaas/v1alpha1/sessions`
179
- }, unmarshalSession);
180
- /**
181
- * Update session information. Update session information of the provided **session ID**.
182
- *
183
- * @param request - The request {@link UpdateSessionRequest}
184
- * @returns A Promise of Session
185
- */
186
- updateSession = (request) => this.client.fetch({
187
- body: JSON.stringify(marshalUpdateSessionRequest(request, this.client.settings)),
188
- headers: jsonContentHeaders,
189
- method: "PATCH",
190
- path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
191
- }, unmarshalSession);
192
- /**
193
- * Terminate an existing session. Terminate a session by its unique ID and cancel all its attached jobs and bookings.
194
- *
195
- * @param request - The request {@link TerminateSessionRequest}
196
- * @returns A Promise of Session
197
- */
198
- terminateSession = (request) => this.client.fetch({
199
- body: "{}",
200
- headers: jsonContentHeaders,
201
- method: "POST",
202
- path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/terminate`
203
- }, unmarshalSession);
204
- /**
205
- * Delete an existing session. Delete a session by its unique ID and delete all its attached jobs and bookings.
206
- *
207
- * @param request - The request {@link DeleteSessionRequest}
208
- */
209
- deleteSession = (request) => this.client.fetch({
210
- method: "DELETE",
211
- path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
212
- });
213
- pageOfListSessionACLs = (request) => this.client.fetch({
214
- method: "GET",
215
- path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/acls`,
216
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
217
- }, unmarshalListSessionACLsResponse);
218
- listSessionACLs = (request) => enrichForPagination("acls", this.pageOfListSessionACLs, request);
219
- /**
220
- * Create a process. Create a new process for the specified application on a specified platform.
221
- *
222
- * @param request - The request {@link CreateProcessRequest}
223
- * @returns A Promise of Process
224
- */
225
- createProcess = (request) => this.client.fetch({
226
- body: JSON.stringify(marshalCreateProcessRequest(request, this.client.settings)),
227
- headers: jsonContentHeaders,
228
- method: "POST",
229
- path: `/qaas/v1alpha1/processes`
230
- }, unmarshalProcess);
231
- /**
232
- * Get process information. Retrieve information about the provided **process ID**, such as name, status and progress.
233
- *
234
- * @param request - The request {@link GetProcessRequest}
235
- * @returns A Promise of Process
236
- */
237
- getProcess = (request) => this.client.fetch({
238
- method: "GET",
239
- path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
240
- }, unmarshalProcess);
241
- /**
242
- * Waits for {@link Process} to be in a final state.
243
- *
244
- * @param request - The request {@link GetProcessRequest}
245
- * @param options - The waiting options
246
- * @returns A Promise of Process
247
- */
248
- waitForProcess = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))), this.getProcess, request, options);
249
- pageOfListProcesses = (request = {}) => this.client.fetch({
250
- method: "GET",
251
- path: `/qaas/v1alpha1/processes`,
252
- 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])
253
- }, unmarshalListProcessesResponse);
254
- /**
255
- * List all processes. Retrieve information about all processes.
256
- *
257
- * @param request - The request {@link ListProcessesRequest}
258
- * @returns A Promise of ListProcessesResponse
259
- */
260
- listProcesses = (request = {}) => enrichForPagination("processes", this.pageOfListProcesses, request);
261
- /**
262
- * Update process information. Update process information of the provided **process ID**.
263
- *
264
- * @param request - The request {@link UpdateProcessRequest}
265
- * @returns A Promise of Process
266
- */
267
- updateProcess = (request) => this.client.fetch({
268
- body: JSON.stringify(marshalUpdateProcessRequest(request, this.client.settings)),
269
- headers: jsonContentHeaders,
270
- method: "PATCH",
271
- path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
272
- }, unmarshalProcess);
273
- /**
274
- * Cancel a running process. Cancel a process by its unique ID. Intermediate results are still available.
275
- *
276
- * @param request - The request {@link CancelProcessRequest}
277
- * @returns A Promise of Process
278
- */
279
- cancelProcess = (request) => this.client.fetch({
280
- body: "{}",
281
- headers: jsonContentHeaders,
282
- method: "POST",
283
- path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
284
- }, unmarshalProcess);
285
- /**
286
- * Delete an existing process. Delete a process by its unique ID and delete all its data.
287
- *
288
- * @param request - The request {@link DeleteProcessRequest}
289
- */
290
- deleteProcess = (request) => this.client.fetch({
291
- method: "DELETE",
292
- path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
293
- });
294
- pageOfListProcessResults = (request) => this.client.fetch({
295
- method: "GET",
296
- path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
297
- urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
298
- }, unmarshalListProcessResultsResponse);
299
- /**
300
- * List all results of a process. Retrieve all intermediate and final result of a process.
301
- *
302
- * @param request - The request {@link ListProcessResultsRequest}
303
- * @returns A Promise of ListProcessResultsResponse
304
- */
305
- listProcessResults = (request) => enrichForPagination("processResults", this.pageOfListProcessResults, request);
306
- /**
307
- * Get application information. Retrieve information about the provided **application ID**, such as name, type and compatible platforms.
308
- *
309
- * @param request - The request {@link GetApplicationRequest}
310
- * @returns A Promise of Application
311
- */
312
- getApplication = (request) => this.client.fetch({
313
- method: "GET",
314
- path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
315
- }, unmarshalApplication);
316
- pageOfListApplications = (request = {}) => this.client.fetch({
317
- method: "GET",
318
- path: `/qaas/v1alpha1/applications`,
319
- urlParams: urlParams(["application_type", request.applicationType], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
320
- }, unmarshalListApplicationsResponse);
321
- /**
322
- * List all available applications. Retrieve information about all applications.
323
- *
324
- * @param request - The request {@link ListApplicationsRequest}
325
- * @returns A Promise of ListApplicationsResponse
326
- */
327
- listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
328
- /**
329
- * Get booking information. Retrieve information about the provided **booking ID**, such as description, status and progress message.
330
- *
331
- * @param request - The request {@link GetBookingRequest}
332
- * @returns A Promise of Booking
333
- */
334
- getBooking = (request) => this.client.fetch({
335
- method: "GET",
336
- path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
337
- }, unmarshalBooking);
338
- /**
339
- * Waits for {@link Booking} to be in a final state.
340
- *
341
- * @param request - The request {@link GetBookingRequest}
342
- * @param options - The waiting options
343
- * @returns A Promise of Booking
344
- */
345
- waitForBooking = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BOOKING_TRANSIENT_STATUSES.includes(res.status))), this.getBooking, request, options);
346
- pageOfListBookings = (request = {}) => this.client.fetch({
347
- method: "GET",
348
- path: `/qaas/v1alpha1/bookings`,
349
- 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])
350
- }, unmarshalListBookingsResponse);
351
- /**
352
- * List all bookings according the filter. Retrieve information about all bookings of the provided **project ID** or ** platform ID**.
353
- *
354
- * @param request - The request {@link ListBookingsRequest}
355
- * @returns A Promise of ListBookingsResponse
356
- */
357
- listBookings = (request = {}) => enrichForPagination("bookings", this.pageOfListBookings, request);
358
- /**
359
- * Update booking information. Update booking information of the provided **booking ID**.
360
- *
361
- * @param request - The request {@link UpdateBookingRequest}
362
- * @returns A Promise of Booking
363
- */
364
- updateBooking = (request) => this.client.fetch({
365
- body: JSON.stringify(marshalUpdateBookingRequest(request, this.client.settings)),
366
- headers: jsonContentHeaders,
367
- method: "PATCH",
368
- path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
369
- }, unmarshalBooking);
370
- /**
371
- * 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.
372
- *
373
- * @param request - The request {@link CreateModelRequest}
374
- * @returns A Promise of Model
375
- */
376
- createModel = (request = {}) => this.client.fetch({
377
- body: JSON.stringify(marshalCreateModelRequest(request, this.client.settings)),
378
- headers: jsonContentHeaders,
379
- method: "POST",
380
- path: `/qaas/v1alpha1/models`
381
- }, unmarshalModel);
382
- /**
383
- * Get model information. Retrieve information about of the provided **model ID**.
384
- *
385
- * @param request - The request {@link GetModelRequest}
386
- * @returns A Promise of Model
387
- */
388
- getModel = (request) => this.client.fetch({
389
- method: "GET",
390
- path: `/qaas/v1alpha1/models/${validatePathParam("modelId", request.modelId)}`
391
- }, unmarshalModel);
392
- pageOfListModels = (request = {}) => this.client.fetch({
393
- method: "GET",
394
- path: `/qaas/v1alpha1/models`,
395
- 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])
396
- }, unmarshalListModelsResponse);
397
- /**
398
- * List all models attached to the **project ID**. Retrieve information about all models of the provided **project ID**.
399
- *
400
- * @param request - The request {@link ListModelsRequest}
401
- * @returns A Promise of ListModelsResponse
402
- */
403
- listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
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
+ }
404
196
  };
405
197
  //#endregion
406
198
  export { API };
@@ -1,23 +1,23 @@
1
1
  //#region src/v1alpha1/content.gen.ts
2
2
  /** Lists transient statutes of the enum {@link BookingStatus}. */
3
- var BOOKING_TRANSIENT_STATUSES = [
3
+ const BOOKING_TRANSIENT_STATUSES = [
4
4
  "waiting",
5
5
  "validating",
6
6
  "cancelling"
7
7
  ];
8
8
  /** Lists transient statutes of the enum {@link JobStatus}. */
9
- var JOB_TRANSIENT_STATUSES = [
9
+ const JOB_TRANSIENT_STATUSES = [
10
10
  "waiting",
11
11
  "running",
12
12
  "cancelling"
13
13
  ];
14
14
  /** Lists transient statutes of the enum {@link ProcessStatus}. */
15
- var PROCESS_TRANSIENT_STATUSES = [
15
+ const PROCESS_TRANSIENT_STATUSES = [
16
16
  "starting",
17
17
  "running",
18
18
  "cancelling"
19
19
  ];
20
20
  /** Lists transient statutes of the enum {@link SessionStatus}. */
21
- var SESSION_TRANSIENT_STATUSES = ["starting", "stopping"];
21
+ const SESSION_TRANSIENT_STATUSES = ["starting", "stopping"];
22
22
  //#endregion
23
23
  export { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES };
@@ -1,13 +1,13 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
2
2
  //#region src/v1alpha1/marshalling.gen.ts
3
- var unmarshalJobCircuit = (data) => {
3
+ const unmarshalJobCircuit = (data) => {
4
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobCircuit' failed as data isn't a dictionary.`);
5
5
  return {
6
6
  percevalCircuit: data.perceval_circuit,
7
7
  qiskitCircuit: data.qiskit_circuit
8
8
  };
9
9
  };
10
- var unmarshalApplication = (data) => {
10
+ const unmarshalApplication = (data) => {
11
11
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
12
12
  return {
13
13
  compatiblePlatformIds: data.compatible_platform_ids,
@@ -17,7 +17,7 @@ var unmarshalApplication = (data) => {
17
17
  type: data.type
18
18
  };
19
19
  };
20
- var unmarshalBooking = (data) => {
20
+ const unmarshalBooking = (data) => {
21
21
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Booking' failed as data isn't a dictionary.`);
22
22
  return {
23
23
  createdAt: unmarshalDate(data.created_at),
@@ -31,7 +31,7 @@ var unmarshalBooking = (data) => {
31
31
  updatedAt: unmarshalDate(data.updated_at)
32
32
  };
33
33
  };
34
- var unmarshalJob = (data) => {
34
+ const unmarshalJob = (data) => {
35
35
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Job' failed as data isn't a dictionary.`);
36
36
  return {
37
37
  createdAt: unmarshalDate(data.created_at),
@@ -49,7 +49,7 @@ var unmarshalJob = (data) => {
49
49
  updatedAt: unmarshalDate(data.updated_at)
50
50
  };
51
51
  };
52
- var unmarshalModel = (data) => {
52
+ const unmarshalModel = (data) => {
53
53
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Model' failed as data isn't a dictionary.`);
54
54
  return {
55
55
  createdAt: unmarshalDate(data.created_at),
@@ -58,7 +58,7 @@ var unmarshalModel = (data) => {
58
58
  url: data.url
59
59
  };
60
60
  };
61
- var unmarshalPlatformBookingRequirement = (data) => {
61
+ const unmarshalPlatformBookingRequirement = (data) => {
62
62
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformBookingRequirement' failed as data isn't a dictionary.`);
63
63
  return {
64
64
  maxBookingPerDay: data.max_booking_per_day,
@@ -70,7 +70,7 @@ var unmarshalPlatformBookingRequirement = (data) => {
70
70
  minPlanificationDuration: data.min_planification_duration
71
71
  };
72
72
  };
73
- var unmarshalPlatformHardware = (data) => {
73
+ const unmarshalPlatformHardware = (data) => {
74
74
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformHardware' failed as data isn't a dictionary.`);
75
75
  return {
76
76
  gpus: data.gpus,
@@ -81,7 +81,7 @@ var unmarshalPlatformHardware = (data) => {
81
81
  vram: data.vram
82
82
  };
83
83
  };
84
- var unmarshalPlatform = (data) => {
84
+ const unmarshalPlatform = (data) => {
85
85
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`);
86
86
  return {
87
87
  availability: data.availability,
@@ -106,7 +106,7 @@ var unmarshalPlatform = (data) => {
106
106
  version: data.version
107
107
  };
108
108
  };
109
- var unmarshalProcess = (data) => {
109
+ const unmarshalProcess = (data) => {
110
110
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Process' failed as data isn't a dictionary.`);
111
111
  return {
112
112
  applicationId: data.application_id,
@@ -126,7 +126,7 @@ var unmarshalProcess = (data) => {
126
126
  updatedAt: unmarshalDate(data.updated_at)
127
127
  };
128
128
  };
129
- var unmarshalSession = (data) => {
129
+ const unmarshalSession = (data) => {
130
130
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Session' failed as data isn't a dictionary.`);
131
131
  return {
132
132
  bookingId: data.booking_id,
@@ -152,21 +152,21 @@ var unmarshalSession = (data) => {
152
152
  waitingJobCount: data.waiting_job_count
153
153
  };
154
154
  };
155
- var unmarshalListApplicationsResponse = (data) => {
155
+ const unmarshalListApplicationsResponse = (data) => {
156
156
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
157
157
  return {
158
158
  applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
159
159
  totalCount: data.total_count
160
160
  };
161
161
  };
162
- var unmarshalListBookingsResponse = (data) => {
162
+ const unmarshalListBookingsResponse = (data) => {
163
163
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBookingsResponse' failed as data isn't a dictionary.`);
164
164
  return {
165
165
  bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
166
166
  totalCount: data.total_count
167
167
  };
168
168
  };
169
- var unmarshalJobResult = (data) => {
169
+ const unmarshalJobResult = (data) => {
170
170
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobResult' failed as data isn't a dictionary.`);
171
171
  return {
172
172
  createdAt: unmarshalDate(data.created_at),
@@ -175,35 +175,35 @@ var unmarshalJobResult = (data) => {
175
175
  url: data.url
176
176
  };
177
177
  };
178
- var unmarshalListJobResultsResponse = (data) => {
178
+ const unmarshalListJobResultsResponse = (data) => {
179
179
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobResultsResponse' failed as data isn't a dictionary.`);
180
180
  return {
181
181
  jobResults: unmarshalArrayOfObject(data.job_results, unmarshalJobResult),
182
182
  totalCount: data.total_count
183
183
  };
184
184
  };
185
- var unmarshalListJobsResponse = (data) => {
185
+ const unmarshalListJobsResponse = (data) => {
186
186
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobsResponse' failed as data isn't a dictionary.`);
187
187
  return {
188
188
  jobs: unmarshalArrayOfObject(data.jobs, unmarshalJob),
189
189
  totalCount: data.total_count
190
190
  };
191
191
  };
192
- var unmarshalListModelsResponse = (data) => {
192
+ const unmarshalListModelsResponse = (data) => {
193
193
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`);
194
194
  return {
195
195
  models: unmarshalArrayOfObject(data.models, unmarshalModel),
196
196
  totalCount: data.total_count
197
197
  };
198
198
  };
199
- var unmarshalListPlatformsResponse = (data) => {
199
+ const unmarshalListPlatformsResponse = (data) => {
200
200
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPlatformsResponse' failed as data isn't a dictionary.`);
201
201
  return {
202
202
  platforms: unmarshalArrayOfObject(data.platforms, unmarshalPlatform),
203
203
  totalCount: data.total_count
204
204
  };
205
205
  };
206
- var unmarshalProcessResult = (data) => {
206
+ const unmarshalProcessResult = (data) => {
207
207
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProcessResult' failed as data isn't a dictionary.`);
208
208
  return {
209
209
  createdAt: unmarshalDate(data.created_at),
@@ -211,42 +211,42 @@ var unmarshalProcessResult = (data) => {
211
211
  result: data.result
212
212
  };
213
213
  };
214
- var unmarshalListProcessResultsResponse = (data) => {
214
+ const unmarshalListProcessResultsResponse = (data) => {
215
215
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessResultsResponse' failed as data isn't a dictionary.`);
216
216
  return {
217
217
  processResults: unmarshalArrayOfObject(data.process_results, unmarshalProcessResult),
218
218
  totalCount: data.total_count
219
219
  };
220
220
  };
221
- var unmarshalListProcessesResponse = (data) => {
221
+ const unmarshalListProcessesResponse = (data) => {
222
222
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessesResponse' failed as data isn't a dictionary.`);
223
223
  return {
224
224
  processes: unmarshalArrayOfObject(data.processes, unmarshalProcess),
225
225
  totalCount: data.total_count
226
226
  };
227
227
  };
228
- var unmarshalListSessionACLsResponse = (data) => {
228
+ const unmarshalListSessionACLsResponse = (data) => {
229
229
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionACLsResponse' failed as data isn't a dictionary.`);
230
230
  return {
231
231
  acls: data.acls,
232
232
  totalCount: data.total_count
233
233
  };
234
234
  };
235
- var unmarshalListSessionsResponse = (data) => {
235
+ const unmarshalListSessionsResponse = (data) => {
236
236
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionsResponse' failed as data isn't a dictionary.`);
237
237
  return {
238
238
  sessions: unmarshalArrayOfObject(data.sessions, unmarshalSession),
239
239
  totalCount: data.total_count
240
240
  };
241
241
  };
242
- var marshalJobCircuit = (request, defaults) => ({ ...resolveOneOf([{
242
+ const marshalJobCircuit = (request, defaults) => ({ ...resolveOneOf([{
243
243
  param: "perceval_circuit",
244
244
  value: request.percevalCircuit
245
245
  }, {
246
246
  param: "qiskit_circuit",
247
247
  value: request.qiskitCircuit
248
248
  }]) });
249
- var marshalCreateJobRequest = (request, defaults) => ({
249
+ const marshalCreateJobRequest = (request, defaults) => ({
250
250
  circuit: marshalJobCircuit(request.circuit, defaults),
251
251
  max_duration: request.maxDuration,
252
252
  model_id: request.modelId,
@@ -255,11 +255,11 @@ var marshalCreateJobRequest = (request, defaults) => ({
255
255
  session_id: request.sessionId,
256
256
  tags: request.tags
257
257
  });
258
- var marshalCreateModelRequest = (request, defaults) => ({
258
+ const marshalCreateModelRequest = (request, defaults) => ({
259
259
  payload: request.payload,
260
260
  project_id: request.projectId ?? defaults.defaultProjectId
261
261
  });
262
- var marshalCreateProcessRequest = (request, defaults) => ({
262
+ const marshalCreateProcessRequest = (request, defaults) => ({
263
263
  application_id: request.applicationId,
264
264
  input: request.input,
265
265
  name: request.name,
@@ -267,13 +267,13 @@ var marshalCreateProcessRequest = (request, defaults) => ({
267
267
  project_id: request.projectId ?? defaults.defaultProjectId,
268
268
  tags: request.tags
269
269
  });
270
- var marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
270
+ const marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
271
271
  description: request.description,
272
272
  finished_at: request.finishedAt,
273
273
  started_at: request.startedAt,
274
274
  time_zone: request.timeZone
275
275
  });
276
- var marshalCreateSessionRequest = (request, defaults) => ({
276
+ const marshalCreateSessionRequest = (request, defaults) => ({
277
277
  booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(request.bookingDemand, defaults) : void 0,
278
278
  deduplication_id: request.deduplicationId,
279
279
  max_duration: request.maxDuration,
@@ -285,16 +285,16 @@ var marshalCreateSessionRequest = (request, defaults) => ({
285
285
  project_id: request.projectId ?? defaults.defaultProjectId,
286
286
  tags: request.tags
287
287
  });
288
- var marshalUpdateBookingRequest = (request, defaults) => ({ description: request.description });
289
- var marshalUpdateJobRequest = (request, defaults) => ({
288
+ const marshalUpdateBookingRequest = (request, defaults) => ({ description: request.description });
289
+ const marshalUpdateJobRequest = (request, defaults) => ({
290
290
  name: request.name,
291
291
  tags: request.tags
292
292
  });
293
- var marshalUpdateProcessRequest = (request, defaults) => ({
293
+ const marshalUpdateProcessRequest = (request, defaults) => ({
294
294
  name: request.name,
295
295
  tags: request.tags
296
296
  });
297
- var marshalUpdateSessionRequest = (request, defaults) => ({
297
+ const marshalUpdateSessionRequest = (request, defaults) => ({
298
298
  max_duration: request.maxDuration,
299
299
  max_idle_duration: request.maxIdleDuration,
300
300
  name: request.name,
@@ -1,5 +1,5 @@
1
1
  //#region src/v1alpha1/metadata.gen.ts
2
- var queriesMetadata = {
2
+ const queriesMetadata = {
3
3
  namespace: "qaas",
4
4
  version: "v1alpha1",
5
5
  folderName: "qaasv1alpha1",
@@ -4,7 +4,7 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
4
4
  CreateJobRequest: () => CreateJobRequest,
5
5
  CreateProcessRequest: () => CreateProcessRequest
6
6
  });
7
- var CreateJobRequest = { name: { minLength: 1 } };
8
- var CreateProcessRequest = { name: { minLength: 1 } };
7
+ const CreateJobRequest = { name: { minLength: 1 } };
8
+ const CreateProcessRequest = { name: { minLength: 1 } };
9
9
  //#endregion
10
10
  export { CreateJobRequest, CreateProcessRequest, validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-qaas",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "description": "Scaleway SDK qaas",
5
5
  "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "directory": "packages_generated/qaas"
9
+ },
6
10
  "files": [
7
11
  "README.md",
8
12
  "dist"
@@ -26,27 +30,24 @@
26
30
  "default": "./dist/*/metadata.gen.js"
27
31
  }
28
32
  },
29
- "repository": {
30
- "type": "git",
31
- "directory": "packages_generated/qaas"
32
- },
33
- "engines": {
34
- "node": ">=20.19.6"
35
- },
36
33
  "dependencies": {
37
34
  "@scaleway/random-name": "5.1.4",
38
- "@scaleway/sdk-std": "2.3.0"
35
+ "@scaleway/sdk-std": "2.4.1"
36
+ },
37
+ "devDependencies": {
38
+ "@scaleway/sdk-client": "^2.3.1",
39
+ "@repo/configs": "^0.1.1"
39
40
  },
40
41
  "peerDependencies": {
41
- "@scaleway/sdk-client": "^2.2.2"
42
+ "@scaleway/sdk-client": "^2.3.1"
42
43
  },
43
- "devDependencies": {
44
- "@scaleway/sdk-client": "^2.2.2"
44
+ "engines": {
45
+ "node": ">=20.19.6"
45
46
  },
46
47
  "scripts": {
47
48
  "package:check": "pnpm publint",
48
- "typecheck": "tsc --noEmit",
49
- "type:generate": "tsc --declaration -p tsconfig.build.json",
49
+ "typecheck": "tsgo --noEmit",
50
+ "type:generate": "tsgo --declaration -p tsconfig.build.json",
50
51
  "build": "vite build --config vite.config.ts && pnpm run type:generate",
51
52
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
52
53
  }
package/LICENSE DELETED
@@ -1,191 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- https://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- Copyright 2019 Scaleway.
180
-
181
- Licensed under the Apache License, Version 2.0 (the "License");
182
- you may not use this file except in compliance with the License.
183
- You may obtain a copy of the License at
184
-
185
- https://www.apache.org/licenses/LICENSE-2.0
186
-
187
- Unless required by applicable law or agreed to in writing, software
188
- distributed under the License is distributed on an "AS IS" BASIS,
189
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
- See the License for the specific language governing permissions and
191
- limitations under the License.
@@ -1,6 +0,0 @@
1
- {
2
- "name": "@scaleway/sdk-qaas",
3
- "namespace": "qaas",
4
- "displayName": "Qaas",
5
- "versions": ["v1alpha1"]
6
- }
@@ -1,8 +0,0 @@
1
- var metadata_gen_default = {
2
- name: "@scaleway/sdk-qaas",
3
- namespace: "qaas",
4
- displayName: "Qaas",
5
- versions: ["v1alpha1"]
6
- };
7
- //#endregion
8
- export { metadata_gen_default as default };