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