@scaleway/sdk-qaas 1.1.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.
- package/LICENSE +191 -0
- package/dist/index.gen.cjs +4 -0
- package/dist/index.gen.d.ts +5 -0
- package/dist/index.gen.js +4 -0
- package/dist/v1alpha1/api.gen.cjs +510 -0
- package/dist/v1alpha1/api.gen.d.ts +239 -0
- package/dist/v1alpha1/api.gen.js +510 -0
- package/dist/v1alpha1/content.gen.cjs +19 -0
- package/dist/v1alpha1/content.gen.d.ts +7 -0
- package/dist/v1alpha1/content.gen.js +19 -0
- package/dist/v1alpha1/index.gen.cjs +31 -0
- package/dist/v1alpha1/index.gen.d.ts +5 -0
- package/dist/v1alpha1/index.gen.js +31 -0
- package/dist/v1alpha1/marshalling.gen.cjs +322 -0
- package/dist/v1alpha1/marshalling.gen.d.ts +22 -0
- package/dist/v1alpha1/marshalling.gen.js +322 -0
- package/dist/v1alpha1/types.gen.d.ts +814 -0
- package/dist/v1alpha1/validation-rules.gen.cjs +14 -0
- package/dist/v1alpha1/validation-rules.gen.d.ts +10 -0
- package/dist/v1alpha1/validation-rules.gen.js +14 -0
- package/package.json +51 -0
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import { API as API$1, validatePathParam, waitForResource, urlParams, resolveOneOf, enrichForPagination } from "@scaleway/sdk-client";
|
|
2
|
+
import { JOB_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
+
import { unmarshalJob, unmarshalListJobsResponse, unmarshalListJobResultsResponse, marshalCreateJobRequest, marshalUpdateJobRequest, unmarshalJobCircuit, unmarshalPlatform, unmarshalListPlatformsResponse, unmarshalSession, unmarshalListSessionsResponse, marshalCreateSessionRequest, marshalUpdateSessionRequest, unmarshalListSessionACLsResponse, marshalCreateProcessRequest, unmarshalProcess, unmarshalListProcessesResponse, marshalUpdateProcessRequest, unmarshalListProcessResultsResponse, unmarshalApplication, unmarshalListApplicationsResponse } from "./marshalling.gen.js";
|
|
4
|
+
const jsonContentHeaders = {
|
|
5
|
+
"Content-Type": "application/json; charset=utf-8"
|
|
6
|
+
};
|
|
7
|
+
class API extends API$1 {
|
|
8
|
+
/**
|
|
9
|
+
* Get job information. Retrieve information about the provided **job ID**, such as status, payload, and result.
|
|
10
|
+
*
|
|
11
|
+
* @param request - The request {@link GetJobRequest}
|
|
12
|
+
* @returns A Promise of Job
|
|
13
|
+
*/
|
|
14
|
+
getJob = (request) => this.client.fetch(
|
|
15
|
+
{
|
|
16
|
+
method: "GET",
|
|
17
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
18
|
+
},
|
|
19
|
+
unmarshalJob
|
|
20
|
+
);
|
|
21
|
+
/**
|
|
22
|
+
* Waits for {@link Job} to be in a final state.
|
|
23
|
+
*
|
|
24
|
+
* @param request - The request {@link GetJobRequest}
|
|
25
|
+
* @param options - The waiting options
|
|
26
|
+
* @returns A Promise of Job
|
|
27
|
+
*/
|
|
28
|
+
waitForJob = (request, options) => waitForResource(
|
|
29
|
+
options?.stop ?? ((res) => Promise.resolve(!JOB_TRANSIENT_STATUSES.includes(res.status))),
|
|
30
|
+
this.getJob,
|
|
31
|
+
request,
|
|
32
|
+
options
|
|
33
|
+
);
|
|
34
|
+
pageOfListJobs = (request = {}) => this.client.fetch(
|
|
35
|
+
{
|
|
36
|
+
method: "GET",
|
|
37
|
+
path: `/qaas/v1alpha1/jobs`,
|
|
38
|
+
urlParams: urlParams(
|
|
39
|
+
["order_by", request.orderBy],
|
|
40
|
+
["page", request.page],
|
|
41
|
+
[
|
|
42
|
+
"page_size",
|
|
43
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
44
|
+
],
|
|
45
|
+
["tags", request.tags],
|
|
46
|
+
...Object.entries(
|
|
47
|
+
resolveOneOf([
|
|
48
|
+
{ param: "session_id", value: request.sessionId },
|
|
49
|
+
{
|
|
50
|
+
default: this.client.settings.defaultProjectId,
|
|
51
|
+
param: "project_id",
|
|
52
|
+
value: request.projectId
|
|
53
|
+
}
|
|
54
|
+
])
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
},
|
|
58
|
+
unmarshalListJobsResponse
|
|
59
|
+
);
|
|
60
|
+
/**
|
|
61
|
+
* List all jobs within a project or session. Retrieve information about all jobs within a given project or session.
|
|
62
|
+
*
|
|
63
|
+
* @param request - The request {@link ListJobsRequest}
|
|
64
|
+
* @returns A Promise of ListJobsResponse
|
|
65
|
+
*/
|
|
66
|
+
listJobs = (request = {}) => enrichForPagination("jobs", this.pageOfListJobs, request);
|
|
67
|
+
pageOfListJobResults = (request) => this.client.fetch(
|
|
68
|
+
{
|
|
69
|
+
method: "GET",
|
|
70
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/results`,
|
|
71
|
+
urlParams: urlParams(
|
|
72
|
+
["order_by", request.orderBy],
|
|
73
|
+
["page", request.page],
|
|
74
|
+
[
|
|
75
|
+
"page_size",
|
|
76
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
77
|
+
]
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
unmarshalListJobResultsResponse
|
|
81
|
+
);
|
|
82
|
+
/**
|
|
83
|
+
* List all results of a job. Retrieve all intermediate and final results of a job.
|
|
84
|
+
*
|
|
85
|
+
* @param request - The request {@link ListJobResultsRequest}
|
|
86
|
+
* @returns A Promise of ListJobResultsResponse
|
|
87
|
+
*/
|
|
88
|
+
listJobResults = (request) => enrichForPagination("jobResults", this.pageOfListJobResults, request);
|
|
89
|
+
/**
|
|
90
|
+
* Create a job. Create a job to be executed inside a session.
|
|
91
|
+
*
|
|
92
|
+
* @param request - The request {@link CreateJobRequest}
|
|
93
|
+
* @returns A Promise of Job
|
|
94
|
+
*/
|
|
95
|
+
createJob = (request) => this.client.fetch(
|
|
96
|
+
{
|
|
97
|
+
body: JSON.stringify(
|
|
98
|
+
marshalCreateJobRequest(request, this.client.settings)
|
|
99
|
+
),
|
|
100
|
+
headers: jsonContentHeaders,
|
|
101
|
+
method: "POST",
|
|
102
|
+
path: `/qaas/v1alpha1/jobs`
|
|
103
|
+
},
|
|
104
|
+
unmarshalJob
|
|
105
|
+
);
|
|
106
|
+
/**
|
|
107
|
+
* Update job information. Update job information about the provided **job ID**.
|
|
108
|
+
*
|
|
109
|
+
* @param request - The request {@link UpdateJobRequest}
|
|
110
|
+
* @returns A Promise of Job
|
|
111
|
+
*/
|
|
112
|
+
updateJob = (request) => this.client.fetch(
|
|
113
|
+
{
|
|
114
|
+
body: JSON.stringify(
|
|
115
|
+
marshalUpdateJobRequest(request, this.client.settings)
|
|
116
|
+
),
|
|
117
|
+
headers: jsonContentHeaders,
|
|
118
|
+
method: "PATCH",
|
|
119
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
120
|
+
},
|
|
121
|
+
unmarshalJob
|
|
122
|
+
);
|
|
123
|
+
/**
|
|
124
|
+
* Cancel a job. Cancel the job corresponding to the provided **job ID**.
|
|
125
|
+
*
|
|
126
|
+
* @param request - The request {@link CancelJobRequest}
|
|
127
|
+
* @returns A Promise of Job
|
|
128
|
+
*/
|
|
129
|
+
cancelJob = (request) => this.client.fetch(
|
|
130
|
+
{
|
|
131
|
+
body: "{}",
|
|
132
|
+
headers: jsonContentHeaders,
|
|
133
|
+
method: "POST",
|
|
134
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/cancel`
|
|
135
|
+
},
|
|
136
|
+
unmarshalJob
|
|
137
|
+
);
|
|
138
|
+
/**
|
|
139
|
+
* Delete a job. Delete the job corresponding to the provided **job ID**.
|
|
140
|
+
*
|
|
141
|
+
* @param request - The request {@link DeleteJobRequest}
|
|
142
|
+
*/
|
|
143
|
+
deleteJob = (request) => this.client.fetch({
|
|
144
|
+
method: "DELETE",
|
|
145
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
146
|
+
});
|
|
147
|
+
/**
|
|
148
|
+
* Get a job circuit. Retrieve the circuit of the provided **job ID**.
|
|
149
|
+
*
|
|
150
|
+
* @param request - The request {@link GetJobCircuitRequest}
|
|
151
|
+
* @returns A Promise of JobCircuit
|
|
152
|
+
*/
|
|
153
|
+
getJobCircuit = (request) => this.client.fetch(
|
|
154
|
+
{
|
|
155
|
+
method: "GET",
|
|
156
|
+
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/circuit`
|
|
157
|
+
},
|
|
158
|
+
unmarshalJobCircuit
|
|
159
|
+
);
|
|
160
|
+
/**
|
|
161
|
+
* Get platform information. Retrieve information about the provided **platform ID**, such as provider name, technology, and type.
|
|
162
|
+
*
|
|
163
|
+
* @param request - The request {@link GetPlatformRequest}
|
|
164
|
+
* @returns A Promise of Platform
|
|
165
|
+
*/
|
|
166
|
+
getPlatform = (request) => this.client.fetch(
|
|
167
|
+
{
|
|
168
|
+
method: "GET",
|
|
169
|
+
path: `/qaas/v1alpha1/platforms/${validatePathParam("platformId", request.platformId)}`
|
|
170
|
+
},
|
|
171
|
+
unmarshalPlatform
|
|
172
|
+
);
|
|
173
|
+
pageOfListPlatforms = (request = {}) => this.client.fetch(
|
|
174
|
+
{
|
|
175
|
+
method: "GET",
|
|
176
|
+
path: `/qaas/v1alpha1/platforms`,
|
|
177
|
+
urlParams: urlParams(
|
|
178
|
+
["backend_name", request.backendName],
|
|
179
|
+
["name", request.name],
|
|
180
|
+
["order_by", request.orderBy],
|
|
181
|
+
["page", request.page],
|
|
182
|
+
[
|
|
183
|
+
"page_size",
|
|
184
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
185
|
+
],
|
|
186
|
+
["platform_technology", request.platformTechnology],
|
|
187
|
+
["platform_type", request.platformType],
|
|
188
|
+
["provider_name", request.providerName]
|
|
189
|
+
)
|
|
190
|
+
},
|
|
191
|
+
unmarshalListPlatformsResponse
|
|
192
|
+
);
|
|
193
|
+
/**
|
|
194
|
+
* List all available platforms. Retrieve information about all platforms.
|
|
195
|
+
*
|
|
196
|
+
* @param request - The request {@link ListPlatformsRequest}
|
|
197
|
+
* @returns A Promise of ListPlatformsResponse
|
|
198
|
+
*/
|
|
199
|
+
listPlatforms = (request = {}) => enrichForPagination("platforms", this.pageOfListPlatforms, request);
|
|
200
|
+
/**
|
|
201
|
+
* Get session infrormation. Retrieve information about the provided **session ID**, such as name, status, and number of executed jobs.
|
|
202
|
+
*
|
|
203
|
+
* @param request - The request {@link GetSessionRequest}
|
|
204
|
+
* @returns A Promise of Session
|
|
205
|
+
*/
|
|
206
|
+
getSession = (request) => this.client.fetch(
|
|
207
|
+
{
|
|
208
|
+
method: "GET",
|
|
209
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
210
|
+
},
|
|
211
|
+
unmarshalSession
|
|
212
|
+
);
|
|
213
|
+
/**
|
|
214
|
+
* Waits for {@link Session} to be in a final state.
|
|
215
|
+
*
|
|
216
|
+
* @param request - The request {@link GetSessionRequest}
|
|
217
|
+
* @param options - The waiting options
|
|
218
|
+
* @returns A Promise of Session
|
|
219
|
+
*/
|
|
220
|
+
waitForSession = (request, options) => waitForResource(
|
|
221
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
222
|
+
!SESSION_TRANSIENT_STATUSES.includes(res.status)
|
|
223
|
+
)),
|
|
224
|
+
this.getSession,
|
|
225
|
+
request,
|
|
226
|
+
options
|
|
227
|
+
);
|
|
228
|
+
pageOfListSessions = (request = {}) => this.client.fetch(
|
|
229
|
+
{
|
|
230
|
+
method: "GET",
|
|
231
|
+
path: `/qaas/v1alpha1/sessions`,
|
|
232
|
+
urlParams: urlParams(
|
|
233
|
+
["order_by", request.orderBy],
|
|
234
|
+
["page", request.page],
|
|
235
|
+
[
|
|
236
|
+
"page_size",
|
|
237
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
238
|
+
],
|
|
239
|
+
["platform_id", request.platformId],
|
|
240
|
+
[
|
|
241
|
+
"project_id",
|
|
242
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
243
|
+
],
|
|
244
|
+
["tags", request.tags]
|
|
245
|
+
)
|
|
246
|
+
},
|
|
247
|
+
unmarshalListSessionsResponse
|
|
248
|
+
);
|
|
249
|
+
/**
|
|
250
|
+
* List all sessions. Retrieve information about all sessions.
|
|
251
|
+
*
|
|
252
|
+
* @param request - The request {@link ListSessionsRequest}
|
|
253
|
+
* @returns A Promise of ListSessionsResponse
|
|
254
|
+
*/
|
|
255
|
+
listSessions = (request = {}) => enrichForPagination("sessions", this.pageOfListSessions, request);
|
|
256
|
+
/**
|
|
257
|
+
* Create a session. Create a dedicated session for the specified platform.
|
|
258
|
+
*
|
|
259
|
+
* @param request - The request {@link CreateSessionRequest}
|
|
260
|
+
* @returns A Promise of Session
|
|
261
|
+
*/
|
|
262
|
+
createSession = (request) => this.client.fetch(
|
|
263
|
+
{
|
|
264
|
+
body: JSON.stringify(
|
|
265
|
+
marshalCreateSessionRequest(request, this.client.settings)
|
|
266
|
+
),
|
|
267
|
+
headers: jsonContentHeaders,
|
|
268
|
+
method: "POST",
|
|
269
|
+
path: `/qaas/v1alpha1/sessions`
|
|
270
|
+
},
|
|
271
|
+
unmarshalSession
|
|
272
|
+
);
|
|
273
|
+
/**
|
|
274
|
+
* Update session information. Update session information of the provided **session ID**.
|
|
275
|
+
*
|
|
276
|
+
* @param request - The request {@link UpdateSessionRequest}
|
|
277
|
+
* @returns A Promise of Session
|
|
278
|
+
*/
|
|
279
|
+
updateSession = (request) => this.client.fetch(
|
|
280
|
+
{
|
|
281
|
+
body: JSON.stringify(
|
|
282
|
+
marshalUpdateSessionRequest(request, this.client.settings)
|
|
283
|
+
),
|
|
284
|
+
headers: jsonContentHeaders,
|
|
285
|
+
method: "PATCH",
|
|
286
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
287
|
+
},
|
|
288
|
+
unmarshalSession
|
|
289
|
+
);
|
|
290
|
+
/**
|
|
291
|
+
* Terminate an existing session. Terminate a session by its unique ID and cancel all its attached jobs.
|
|
292
|
+
*
|
|
293
|
+
* @param request - The request {@link TerminateSessionRequest}
|
|
294
|
+
* @returns A Promise of Session
|
|
295
|
+
*/
|
|
296
|
+
terminateSession = (request) => this.client.fetch(
|
|
297
|
+
{
|
|
298
|
+
body: "{}",
|
|
299
|
+
headers: jsonContentHeaders,
|
|
300
|
+
method: "POST",
|
|
301
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/terminate`
|
|
302
|
+
},
|
|
303
|
+
unmarshalSession
|
|
304
|
+
);
|
|
305
|
+
/**
|
|
306
|
+
* Delete an existing session. Delete a session by its unique ID and delete all its attached jobs.
|
|
307
|
+
*
|
|
308
|
+
* @param request - The request {@link DeleteSessionRequest}
|
|
309
|
+
*/
|
|
310
|
+
deleteSession = (request) => this.client.fetch({
|
|
311
|
+
method: "DELETE",
|
|
312
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
313
|
+
});
|
|
314
|
+
pageOfListSessionACLs = (request) => this.client.fetch(
|
|
315
|
+
{
|
|
316
|
+
method: "GET",
|
|
317
|
+
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/acls`,
|
|
318
|
+
urlParams: urlParams(
|
|
319
|
+
["order_by", request.orderBy],
|
|
320
|
+
["page", request.page],
|
|
321
|
+
[
|
|
322
|
+
"page_size",
|
|
323
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
324
|
+
]
|
|
325
|
+
)
|
|
326
|
+
},
|
|
327
|
+
unmarshalListSessionACLsResponse
|
|
328
|
+
);
|
|
329
|
+
listSessionACLs = (request) => enrichForPagination("acls", this.pageOfListSessionACLs, request);
|
|
330
|
+
/**
|
|
331
|
+
* Create a process. Create a new process for the specified application on a specified platform.
|
|
332
|
+
*
|
|
333
|
+
* @param request - The request {@link CreateProcessRequest}
|
|
334
|
+
* @returns A Promise of Process
|
|
335
|
+
*/
|
|
336
|
+
createProcess = (request) => this.client.fetch(
|
|
337
|
+
{
|
|
338
|
+
body: JSON.stringify(
|
|
339
|
+
marshalCreateProcessRequest(request, this.client.settings)
|
|
340
|
+
),
|
|
341
|
+
headers: jsonContentHeaders,
|
|
342
|
+
method: "POST",
|
|
343
|
+
path: `/qaas/v1alpha1/processes`
|
|
344
|
+
},
|
|
345
|
+
unmarshalProcess
|
|
346
|
+
);
|
|
347
|
+
/**
|
|
348
|
+
* Get process infrormation. Retrieve information about the provided **process ID**, such as name, status and progress.
|
|
349
|
+
*
|
|
350
|
+
* @param request - The request {@link GetProcessRequest}
|
|
351
|
+
* @returns A Promise of Process
|
|
352
|
+
*/
|
|
353
|
+
getProcess = (request) => this.client.fetch(
|
|
354
|
+
{
|
|
355
|
+
method: "GET",
|
|
356
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
357
|
+
},
|
|
358
|
+
unmarshalProcess
|
|
359
|
+
);
|
|
360
|
+
/**
|
|
361
|
+
* Waits for {@link Process} to be in a final state.
|
|
362
|
+
*
|
|
363
|
+
* @param request - The request {@link GetProcessRequest}
|
|
364
|
+
* @param options - The waiting options
|
|
365
|
+
* @returns A Promise of Process
|
|
366
|
+
*/
|
|
367
|
+
waitForProcess = (request, options) => waitForResource(
|
|
368
|
+
options?.stop ?? ((res) => Promise.resolve(
|
|
369
|
+
!PROCESS_TRANSIENT_STATUSES.includes(res.status)
|
|
370
|
+
)),
|
|
371
|
+
this.getProcess,
|
|
372
|
+
request,
|
|
373
|
+
options
|
|
374
|
+
);
|
|
375
|
+
pageOfListProcesses = (request = {}) => this.client.fetch(
|
|
376
|
+
{
|
|
377
|
+
method: "GET",
|
|
378
|
+
path: `/qaas/v1alpha1/processes`,
|
|
379
|
+
urlParams: urlParams(
|
|
380
|
+
["application_id", request.applicationId],
|
|
381
|
+
["order_by", request.orderBy],
|
|
382
|
+
["page", request.page],
|
|
383
|
+
[
|
|
384
|
+
"page_size",
|
|
385
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
386
|
+
],
|
|
387
|
+
[
|
|
388
|
+
"project_id",
|
|
389
|
+
request.projectId ?? this.client.settings.defaultProjectId
|
|
390
|
+
],
|
|
391
|
+
["tags", request.tags]
|
|
392
|
+
)
|
|
393
|
+
},
|
|
394
|
+
unmarshalListProcessesResponse
|
|
395
|
+
);
|
|
396
|
+
/**
|
|
397
|
+
* List all processes. Retrieve information about all processes.
|
|
398
|
+
*
|
|
399
|
+
* @param request - The request {@link ListProcessesRequest}
|
|
400
|
+
* @returns A Promise of ListProcessesResponse
|
|
401
|
+
*/
|
|
402
|
+
listProcesses = (request = {}) => enrichForPagination("processes", this.pageOfListProcesses, request);
|
|
403
|
+
/**
|
|
404
|
+
* Update process information. Update process information of the provided **process ID**.
|
|
405
|
+
*
|
|
406
|
+
* @param request - The request {@link UpdateProcessRequest}
|
|
407
|
+
* @returns A Promise of Process
|
|
408
|
+
*/
|
|
409
|
+
updateProcess = (request) => this.client.fetch(
|
|
410
|
+
{
|
|
411
|
+
body: JSON.stringify(
|
|
412
|
+
marshalUpdateProcessRequest(request, this.client.settings)
|
|
413
|
+
),
|
|
414
|
+
headers: jsonContentHeaders,
|
|
415
|
+
method: "PATCH",
|
|
416
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
417
|
+
},
|
|
418
|
+
unmarshalProcess
|
|
419
|
+
);
|
|
420
|
+
/**
|
|
421
|
+
* Cancel a running process. Cancel a process by its unique ID. Intermediate results are still available.
|
|
422
|
+
*
|
|
423
|
+
* @param request - The request {@link CancelProcessRequest}
|
|
424
|
+
* @returns A Promise of Process
|
|
425
|
+
*/
|
|
426
|
+
cancelProcess = (request) => this.client.fetch(
|
|
427
|
+
{
|
|
428
|
+
body: "{}",
|
|
429
|
+
headers: jsonContentHeaders,
|
|
430
|
+
method: "POST",
|
|
431
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
|
|
432
|
+
},
|
|
433
|
+
unmarshalProcess
|
|
434
|
+
);
|
|
435
|
+
/**
|
|
436
|
+
* Delete an existing process. Delete a process by its unique ID and delete all its data.
|
|
437
|
+
*
|
|
438
|
+
* @param request - The request {@link DeleteProcessRequest}
|
|
439
|
+
*/
|
|
440
|
+
deleteProcess = (request) => this.client.fetch({
|
|
441
|
+
method: "DELETE",
|
|
442
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
443
|
+
});
|
|
444
|
+
pageOfListProcessResults = (request) => this.client.fetch(
|
|
445
|
+
{
|
|
446
|
+
method: "GET",
|
|
447
|
+
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
|
|
448
|
+
urlParams: urlParams(
|
|
449
|
+
["order_by", request.orderBy],
|
|
450
|
+
["page", request.page],
|
|
451
|
+
[
|
|
452
|
+
"page_size",
|
|
453
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
454
|
+
]
|
|
455
|
+
)
|
|
456
|
+
},
|
|
457
|
+
unmarshalListProcessResultsResponse
|
|
458
|
+
);
|
|
459
|
+
/**
|
|
460
|
+
* List all results of a process. Retrieve all intermediate and final result of a process.
|
|
461
|
+
*
|
|
462
|
+
* @param request - The request {@link ListProcessResultsRequest}
|
|
463
|
+
* @returns A Promise of ListProcessResultsResponse
|
|
464
|
+
*/
|
|
465
|
+
listProcessResults = (request) => enrichForPagination(
|
|
466
|
+
"processResults",
|
|
467
|
+
this.pageOfListProcessResults,
|
|
468
|
+
request
|
|
469
|
+
);
|
|
470
|
+
/**
|
|
471
|
+
* Get application information. Retrieve information about the provided **applcation ID**, such as name, type and compatible platforms.
|
|
472
|
+
*
|
|
473
|
+
* @param request - The request {@link GetApplicationRequest}
|
|
474
|
+
* @returns A Promise of Application
|
|
475
|
+
*/
|
|
476
|
+
getApplication = (request) => this.client.fetch(
|
|
477
|
+
{
|
|
478
|
+
method: "GET",
|
|
479
|
+
path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
|
|
480
|
+
},
|
|
481
|
+
unmarshalApplication
|
|
482
|
+
);
|
|
483
|
+
pageOfListApplications = (request = {}) => this.client.fetch(
|
|
484
|
+
{
|
|
485
|
+
method: "GET",
|
|
486
|
+
path: `/qaas/v1alpha1/applications`,
|
|
487
|
+
urlParams: urlParams(
|
|
488
|
+
["application_type", request.applicationType],
|
|
489
|
+
["name", request.name],
|
|
490
|
+
["order_by", request.orderBy],
|
|
491
|
+
["page", request.page],
|
|
492
|
+
[
|
|
493
|
+
"page_size",
|
|
494
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
495
|
+
]
|
|
496
|
+
)
|
|
497
|
+
},
|
|
498
|
+
unmarshalListApplicationsResponse
|
|
499
|
+
);
|
|
500
|
+
/**
|
|
501
|
+
* List all available applications. Retrieve information about all applications.
|
|
502
|
+
*
|
|
503
|
+
* @param request - The request {@link ListApplicationsRequest}
|
|
504
|
+
* @returns A Promise of ListApplicationsResponse
|
|
505
|
+
*/
|
|
506
|
+
listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
|
|
507
|
+
}
|
|
508
|
+
export {
|
|
509
|
+
API
|
|
510
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const JOB_TRANSIENT_STATUSES = [
|
|
4
|
+
"waiting",
|
|
5
|
+
"running",
|
|
6
|
+
"cancelling"
|
|
7
|
+
];
|
|
8
|
+
const PROCESS_TRANSIENT_STATUSES = [
|
|
9
|
+
"starting",
|
|
10
|
+
"running",
|
|
11
|
+
"cancelling"
|
|
12
|
+
];
|
|
13
|
+
const SESSION_TRANSIENT_STATUSES = [
|
|
14
|
+
"starting",
|
|
15
|
+
"stopping"
|
|
16
|
+
];
|
|
17
|
+
exports.JOB_TRANSIENT_STATUSES = JOB_TRANSIENT_STATUSES;
|
|
18
|
+
exports.PROCESS_TRANSIENT_STATUSES = PROCESS_TRANSIENT_STATUSES;
|
|
19
|
+
exports.SESSION_TRANSIENT_STATUSES = SESSION_TRANSIENT_STATUSES;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JobStatus, ProcessStatus, SessionStatus } from './types.gen';
|
|
2
|
+
/** Lists transient statutes of the enum {@link JobStatus}. */
|
|
3
|
+
export declare const JOB_TRANSIENT_STATUSES: JobStatus[];
|
|
4
|
+
/** Lists transient statutes of the enum {@link ProcessStatus}. */
|
|
5
|
+
export declare const PROCESS_TRANSIENT_STATUSES: ProcessStatus[];
|
|
6
|
+
/** Lists transient statutes of the enum {@link SessionStatus}. */
|
|
7
|
+
export declare const SESSION_TRANSIENT_STATUSES: SessionStatus[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const JOB_TRANSIENT_STATUSES = [
|
|
2
|
+
"waiting",
|
|
3
|
+
"running",
|
|
4
|
+
"cancelling"
|
|
5
|
+
];
|
|
6
|
+
const PROCESS_TRANSIENT_STATUSES = [
|
|
7
|
+
"starting",
|
|
8
|
+
"running",
|
|
9
|
+
"cancelling"
|
|
10
|
+
];
|
|
11
|
+
const SESSION_TRANSIENT_STATUSES = [
|
|
12
|
+
"starting",
|
|
13
|
+
"stopping"
|
|
14
|
+
];
|
|
15
|
+
export {
|
|
16
|
+
JOB_TRANSIENT_STATUSES,
|
|
17
|
+
PROCESS_TRANSIENT_STATUSES,
|
|
18
|
+
SESSION_TRANSIENT_STATUSES
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const api_gen = require("./api.gen.cjs");
|
|
4
|
+
const content_gen = require("./content.gen.cjs");
|
|
5
|
+
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
6
|
+
const validationRules_gen = require("./validation-rules.gen.cjs");
|
|
7
|
+
exports.API = api_gen.API;
|
|
8
|
+
exports.JOB_TRANSIENT_STATUSES = content_gen.JOB_TRANSIENT_STATUSES;
|
|
9
|
+
exports.PROCESS_TRANSIENT_STATUSES = content_gen.PROCESS_TRANSIENT_STATUSES;
|
|
10
|
+
exports.SESSION_TRANSIENT_STATUSES = content_gen.SESSION_TRANSIENT_STATUSES;
|
|
11
|
+
exports.marshalCreateJobRequest = marshalling_gen.marshalCreateJobRequest;
|
|
12
|
+
exports.marshalCreateProcessRequest = marshalling_gen.marshalCreateProcessRequest;
|
|
13
|
+
exports.marshalCreateSessionRequest = marshalling_gen.marshalCreateSessionRequest;
|
|
14
|
+
exports.marshalUpdateJobRequest = marshalling_gen.marshalUpdateJobRequest;
|
|
15
|
+
exports.marshalUpdateProcessRequest = marshalling_gen.marshalUpdateProcessRequest;
|
|
16
|
+
exports.marshalUpdateSessionRequest = marshalling_gen.marshalUpdateSessionRequest;
|
|
17
|
+
exports.unmarshalApplication = marshalling_gen.unmarshalApplication;
|
|
18
|
+
exports.unmarshalJob = marshalling_gen.unmarshalJob;
|
|
19
|
+
exports.unmarshalJobCircuit = marshalling_gen.unmarshalJobCircuit;
|
|
20
|
+
exports.unmarshalListApplicationsResponse = marshalling_gen.unmarshalListApplicationsResponse;
|
|
21
|
+
exports.unmarshalListJobResultsResponse = marshalling_gen.unmarshalListJobResultsResponse;
|
|
22
|
+
exports.unmarshalListJobsResponse = marshalling_gen.unmarshalListJobsResponse;
|
|
23
|
+
exports.unmarshalListPlatformsResponse = marshalling_gen.unmarshalListPlatformsResponse;
|
|
24
|
+
exports.unmarshalListProcessResultsResponse = marshalling_gen.unmarshalListProcessResultsResponse;
|
|
25
|
+
exports.unmarshalListProcessesResponse = marshalling_gen.unmarshalListProcessesResponse;
|
|
26
|
+
exports.unmarshalListSessionACLsResponse = marshalling_gen.unmarshalListSessionACLsResponse;
|
|
27
|
+
exports.unmarshalListSessionsResponse = marshalling_gen.unmarshalListSessionsResponse;
|
|
28
|
+
exports.unmarshalPlatform = marshalling_gen.unmarshalPlatform;
|
|
29
|
+
exports.unmarshalProcess = marshalling_gen.unmarshalProcess;
|
|
30
|
+
exports.unmarshalSession = marshalling_gen.unmarshalSession;
|
|
31
|
+
exports.ValidationRules = validationRules_gen;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { API } from './api.gen';
|
|
2
|
+
export * from './content.gen';
|
|
3
|
+
export * from './marshalling.gen';
|
|
4
|
+
export type { Application, ApplicationType, CancelJobRequest, CancelProcessRequest, CreateJobRequest, CreateProcessRequest, CreateSessionRequest, DeleteJobRequest, DeleteProcessRequest, DeleteSessionRequest, GetApplicationRequest, GetJobCircuitRequest, GetJobRequest, GetPlatformRequest, GetProcessRequest, GetSessionRequest, Job, JobCircuit, JobResult, JobStatus, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, ListJobResultsRequest, ListJobResultsRequestOrderBy, ListJobResultsResponse, ListJobsRequest, ListJobsRequestOrderBy, ListJobsResponse, ListPlatformsRequest, ListPlatformsRequestOrderBy, ListPlatformsResponse, ListProcessResultsRequest, ListProcessResultsRequestOrderBy, ListProcessResultsResponse, ListProcessesRequest, ListProcessesRequestOrderBy, ListProcessesResponse, ListSessionACLsRequest, ListSessionACLsRequestOrderBy, ListSessionACLsResponse, ListSessionsRequest, ListSessionsRequestOrderBy, ListSessionsResponse, Platform, PlatformAvailability, PlatformHardware, PlatformTechnology, PlatformType, Process, ProcessResult, ProcessStatus, Session, SessionAccess, SessionOriginType, SessionStatus, TerminateSessionRequest, UpdateJobRequest, UpdateProcessRequest, UpdateSessionRequest, } from './types.gen';
|
|
5
|
+
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { API } from "./api.gen.js";
|
|
2
|
+
import { JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
+
import { marshalCreateJobRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalPlatform, unmarshalProcess, unmarshalSession } from "./marshalling.gen.js";
|
|
4
|
+
import * as validationRules_gen from "./validation-rules.gen.js";
|
|
5
|
+
export {
|
|
6
|
+
API,
|
|
7
|
+
JOB_TRANSIENT_STATUSES,
|
|
8
|
+
PROCESS_TRANSIENT_STATUSES,
|
|
9
|
+
SESSION_TRANSIENT_STATUSES,
|
|
10
|
+
validationRules_gen as ValidationRules,
|
|
11
|
+
marshalCreateJobRequest,
|
|
12
|
+
marshalCreateProcessRequest,
|
|
13
|
+
marshalCreateSessionRequest,
|
|
14
|
+
marshalUpdateJobRequest,
|
|
15
|
+
marshalUpdateProcessRequest,
|
|
16
|
+
marshalUpdateSessionRequest,
|
|
17
|
+
unmarshalApplication,
|
|
18
|
+
unmarshalJob,
|
|
19
|
+
unmarshalJobCircuit,
|
|
20
|
+
unmarshalListApplicationsResponse,
|
|
21
|
+
unmarshalListJobResultsResponse,
|
|
22
|
+
unmarshalListJobsResponse,
|
|
23
|
+
unmarshalListPlatformsResponse,
|
|
24
|
+
unmarshalListProcessResultsResponse,
|
|
25
|
+
unmarshalListProcessesResponse,
|
|
26
|
+
unmarshalListSessionACLsResponse,
|
|
27
|
+
unmarshalListSessionsResponse,
|
|
28
|
+
unmarshalPlatform,
|
|
29
|
+
unmarshalProcess,
|
|
30
|
+
unmarshalSession
|
|
31
|
+
};
|