@scaleway/sdk-qaas 2.6.2 → 2.6.4
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/package.json +9 -8
- package/dist/.vite/license.md +0 -3
- package/dist/_virtual/_rolldown/runtime.js +0 -13
- package/dist/index.gen.d.ts +0 -5
- package/dist/index.gen.js +0 -2
- package/dist/metadata.gen.d.ts +0 -12
- package/dist/metadata.gen.js +0 -13
- package/dist/v1alpha1/api.gen.d.ts +0 -297
- package/dist/v1alpha1/api.gen.js +0 -198
- package/dist/v1alpha1/content.gen.d.ts +0 -9
- package/dist/v1alpha1/content.gen.js +0 -23
- package/dist/v1alpha1/index.gen.d.ts +0 -5
- package/dist/v1alpha1/index.gen.js +0 -42
- package/dist/v1alpha1/marshalling.gen.d.ts +0 -28
- package/dist/v1alpha1/marshalling.gen.js +0 -304
- package/dist/v1alpha1/metadata.gen.d.ts +0 -196
- package/dist/v1alpha1/metadata.gen.js +0 -217
- package/dist/v1alpha1/types.gen.d.ts +0 -1057
- package/dist/v1alpha1/types.gen.js +0 -0
- package/dist/v1alpha1/validation-rules.gen.d.ts +0 -10
- package/dist/v1alpha1/validation-rules.gen.js +0 -10
package/dist/v1alpha1/api.gen.js
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
2
|
-
import { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession } from "./marshalling.gen.js";
|
|
3
|
-
import { API as API$1, enrichForPagination, resolveOneOf, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
|
|
4
|
-
//#region src/v1alpha1/api.gen.ts
|
|
5
|
-
const jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
|
|
6
|
-
/**
|
|
7
|
-
* Quantum as a Service API.
|
|
8
|
-
|
|
9
|
-
This API allows you to allocate and program Quantum Processing Units (QPUs) to run quantum algorithms.
|
|
10
|
-
*/
|
|
11
|
-
var API = class extends API$1 {
|
|
12
|
-
constructor(..._args) {
|
|
13
|
-
super(..._args);
|
|
14
|
-
this.getJob = (request) => this.client.fetch({
|
|
15
|
-
method: "GET",
|
|
16
|
-
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
17
|
-
}, unmarshalJob);
|
|
18
|
-
this.waitForJob = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!JOB_TRANSIENT_STATUSES.includes(res.status))), this.getJob, request, options);
|
|
19
|
-
this.pageOfListJobs = (request = {}) => this.client.fetch({
|
|
20
|
-
method: "GET",
|
|
21
|
-
path: `/qaas/v1alpha1/jobs`,
|
|
22
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["tags", request.tags], ...Object.entries(resolveOneOf([{
|
|
23
|
-
param: "session_id",
|
|
24
|
-
value: request.sessionId
|
|
25
|
-
}, {
|
|
26
|
-
default: this.client.settings.defaultProjectId,
|
|
27
|
-
param: "project_id",
|
|
28
|
-
value: request.projectId
|
|
29
|
-
}])))
|
|
30
|
-
}, unmarshalListJobsResponse);
|
|
31
|
-
this.listJobs = (request = {}) => enrichForPagination("jobs", this.pageOfListJobs, request);
|
|
32
|
-
this.pageOfListJobResults = (request) => this.client.fetch({
|
|
33
|
-
method: "GET",
|
|
34
|
-
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/results`,
|
|
35
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
36
|
-
}, unmarshalListJobResultsResponse);
|
|
37
|
-
this.listJobResults = (request) => enrichForPagination("jobResults", this.pageOfListJobResults, request);
|
|
38
|
-
this.createJob = (request) => this.client.fetch({
|
|
39
|
-
body: JSON.stringify(marshalCreateJobRequest(request, this.client.settings)),
|
|
40
|
-
headers: jsonContentHeaders,
|
|
41
|
-
method: "POST",
|
|
42
|
-
path: `/qaas/v1alpha1/jobs`
|
|
43
|
-
}, unmarshalJob);
|
|
44
|
-
this.updateJob = (request) => this.client.fetch({
|
|
45
|
-
body: JSON.stringify(marshalUpdateJobRequest(request, this.client.settings)),
|
|
46
|
-
headers: jsonContentHeaders,
|
|
47
|
-
method: "PATCH",
|
|
48
|
-
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
49
|
-
}, unmarshalJob);
|
|
50
|
-
this.cancelJob = (request) => this.client.fetch({
|
|
51
|
-
body: "{}",
|
|
52
|
-
headers: jsonContentHeaders,
|
|
53
|
-
method: "POST",
|
|
54
|
-
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/cancel`
|
|
55
|
-
}, unmarshalJob);
|
|
56
|
-
this.deleteJob = (request) => this.client.fetch({
|
|
57
|
-
method: "DELETE",
|
|
58
|
-
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}`
|
|
59
|
-
});
|
|
60
|
-
this.getJobCircuit = (request) => this.client.fetch({
|
|
61
|
-
method: "GET",
|
|
62
|
-
path: `/qaas/v1alpha1/jobs/${validatePathParam("jobId", request.jobId)}/circuit`
|
|
63
|
-
}, unmarshalJobCircuit);
|
|
64
|
-
this.getPlatform = (request) => this.client.fetch({
|
|
65
|
-
method: "GET",
|
|
66
|
-
path: `/qaas/v1alpha1/platforms/${validatePathParam("platformId", request.platformId)}`
|
|
67
|
-
}, unmarshalPlatform);
|
|
68
|
-
this.pageOfListPlatforms = (request = {}) => this.client.fetch({
|
|
69
|
-
method: "GET",
|
|
70
|
-
path: `/qaas/v1alpha1/platforms`,
|
|
71
|
-
urlParams: urlParams(["backend_name", request.backendName], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["platform_technology", request.platformTechnology], ["platform_type", request.platformType], ["provider_name", request.providerName])
|
|
72
|
-
}, unmarshalListPlatformsResponse);
|
|
73
|
-
this.listPlatforms = (request = {}) => enrichForPagination("platforms", this.pageOfListPlatforms, request);
|
|
74
|
-
this.getSession = (request) => this.client.fetch({
|
|
75
|
-
method: "GET",
|
|
76
|
-
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
77
|
-
}, unmarshalSession);
|
|
78
|
-
this.waitForSession = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!SESSION_TRANSIENT_STATUSES.includes(res.status))), this.getSession, request, options);
|
|
79
|
-
this.pageOfListSessions = (request = {}) => this.client.fetch({
|
|
80
|
-
method: "GET",
|
|
81
|
-
path: `/qaas/v1alpha1/sessions`,
|
|
82
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["platform_id", request.platformId], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["tags", request.tags])
|
|
83
|
-
}, unmarshalListSessionsResponse);
|
|
84
|
-
this.listSessions = (request = {}) => enrichForPagination("sessions", this.pageOfListSessions, request);
|
|
85
|
-
this.createSession = (request) => this.client.fetch({
|
|
86
|
-
body: JSON.stringify(marshalCreateSessionRequest(request, this.client.settings)),
|
|
87
|
-
headers: jsonContentHeaders,
|
|
88
|
-
method: "POST",
|
|
89
|
-
path: `/qaas/v1alpha1/sessions`
|
|
90
|
-
}, unmarshalSession);
|
|
91
|
-
this.updateSession = (request) => this.client.fetch({
|
|
92
|
-
body: JSON.stringify(marshalUpdateSessionRequest(request, this.client.settings)),
|
|
93
|
-
headers: jsonContentHeaders,
|
|
94
|
-
method: "PATCH",
|
|
95
|
-
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
96
|
-
}, unmarshalSession);
|
|
97
|
-
this.terminateSession = (request) => this.client.fetch({
|
|
98
|
-
body: "{}",
|
|
99
|
-
headers: jsonContentHeaders,
|
|
100
|
-
method: "POST",
|
|
101
|
-
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/terminate`
|
|
102
|
-
}, unmarshalSession);
|
|
103
|
-
this.deleteSession = (request) => this.client.fetch({
|
|
104
|
-
method: "DELETE",
|
|
105
|
-
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}`
|
|
106
|
-
});
|
|
107
|
-
this.pageOfListSessionACLs = (request) => this.client.fetch({
|
|
108
|
-
method: "GET",
|
|
109
|
-
path: `/qaas/v1alpha1/sessions/${validatePathParam("sessionId", request.sessionId)}/acls`,
|
|
110
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
111
|
-
}, unmarshalListSessionACLsResponse);
|
|
112
|
-
this.listSessionACLs = (request) => enrichForPagination("acls", this.pageOfListSessionACLs, request);
|
|
113
|
-
this.createProcess = (request) => this.client.fetch({
|
|
114
|
-
body: JSON.stringify(marshalCreateProcessRequest(request, this.client.settings)),
|
|
115
|
-
headers: jsonContentHeaders,
|
|
116
|
-
method: "POST",
|
|
117
|
-
path: `/qaas/v1alpha1/processes`
|
|
118
|
-
}, unmarshalProcess);
|
|
119
|
-
this.getProcess = (request) => this.client.fetch({
|
|
120
|
-
method: "GET",
|
|
121
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
122
|
-
}, unmarshalProcess);
|
|
123
|
-
this.waitForProcess = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!PROCESS_TRANSIENT_STATUSES.includes(res.status))), this.getProcess, request, options);
|
|
124
|
-
this.pageOfListProcesses = (request = {}) => this.client.fetch({
|
|
125
|
-
method: "GET",
|
|
126
|
-
path: `/qaas/v1alpha1/processes`,
|
|
127
|
-
urlParams: urlParams(["application_id", request.applicationId], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId], ["tags", request.tags])
|
|
128
|
-
}, unmarshalListProcessesResponse);
|
|
129
|
-
this.listProcesses = (request = {}) => enrichForPagination("processes", this.pageOfListProcesses, request);
|
|
130
|
-
this.updateProcess = (request) => this.client.fetch({
|
|
131
|
-
body: JSON.stringify(marshalUpdateProcessRequest(request, this.client.settings)),
|
|
132
|
-
headers: jsonContentHeaders,
|
|
133
|
-
method: "PATCH",
|
|
134
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
135
|
-
}, unmarshalProcess);
|
|
136
|
-
this.cancelProcess = (request) => this.client.fetch({
|
|
137
|
-
body: "{}",
|
|
138
|
-
headers: jsonContentHeaders,
|
|
139
|
-
method: "POST",
|
|
140
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/cancel`
|
|
141
|
-
}, unmarshalProcess);
|
|
142
|
-
this.deleteProcess = (request) => this.client.fetch({
|
|
143
|
-
method: "DELETE",
|
|
144
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}`
|
|
145
|
-
});
|
|
146
|
-
this.pageOfListProcessResults = (request) => this.client.fetch({
|
|
147
|
-
method: "GET",
|
|
148
|
-
path: `/qaas/v1alpha1/processes/${validatePathParam("processId", request.processId)}/results`,
|
|
149
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
150
|
-
}, unmarshalListProcessResultsResponse);
|
|
151
|
-
this.listProcessResults = (request) => enrichForPagination("processResults", this.pageOfListProcessResults, request);
|
|
152
|
-
this.getApplication = (request) => this.client.fetch({
|
|
153
|
-
method: "GET",
|
|
154
|
-
path: `/qaas/v1alpha1/applications/${validatePathParam("applicationId", request.applicationId)}`
|
|
155
|
-
}, unmarshalApplication);
|
|
156
|
-
this.pageOfListApplications = (request = {}) => this.client.fetch({
|
|
157
|
-
method: "GET",
|
|
158
|
-
path: `/qaas/v1alpha1/applications`,
|
|
159
|
-
urlParams: urlParams(["application_type", request.applicationType], ["name", request.name], ["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize])
|
|
160
|
-
}, unmarshalListApplicationsResponse);
|
|
161
|
-
this.listApplications = (request = {}) => enrichForPagination("applications", this.pageOfListApplications, request);
|
|
162
|
-
this.getBooking = (request) => this.client.fetch({
|
|
163
|
-
method: "GET",
|
|
164
|
-
path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
|
|
165
|
-
}, unmarshalBooking);
|
|
166
|
-
this.waitForBooking = (request, options) => waitForResource(options?.stop ?? ((res) => Promise.resolve(!BOOKING_TRANSIENT_STATUSES.includes(res.status))), this.getBooking, request, options);
|
|
167
|
-
this.pageOfListBookings = (request = {}) => this.client.fetch({
|
|
168
|
-
method: "GET",
|
|
169
|
-
path: `/qaas/v1alpha1/bookings`,
|
|
170
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["platform_id", request.platformId], ["project_id", request.projectId])
|
|
171
|
-
}, unmarshalListBookingsResponse);
|
|
172
|
-
this.listBookings = (request = {}) => enrichForPagination("bookings", this.pageOfListBookings, request);
|
|
173
|
-
this.updateBooking = (request) => this.client.fetch({
|
|
174
|
-
body: JSON.stringify(marshalUpdateBookingRequest(request, this.client.settings)),
|
|
175
|
-
headers: jsonContentHeaders,
|
|
176
|
-
method: "PATCH",
|
|
177
|
-
path: `/qaas/v1alpha1/bookings/${validatePathParam("bookingId", request.bookingId)}`
|
|
178
|
-
}, unmarshalBooking);
|
|
179
|
-
this.createModel = (request = {}) => this.client.fetch({
|
|
180
|
-
body: JSON.stringify(marshalCreateModelRequest(request, this.client.settings)),
|
|
181
|
-
headers: jsonContentHeaders,
|
|
182
|
-
method: "POST",
|
|
183
|
-
path: `/qaas/v1alpha1/models`
|
|
184
|
-
}, unmarshalModel);
|
|
185
|
-
this.getModel = (request) => this.client.fetch({
|
|
186
|
-
method: "GET",
|
|
187
|
-
path: `/qaas/v1alpha1/models/${validatePathParam("modelId", request.modelId)}`
|
|
188
|
-
}, unmarshalModel);
|
|
189
|
-
this.pageOfListModels = (request = {}) => this.client.fetch({
|
|
190
|
-
method: "GET",
|
|
191
|
-
path: `/qaas/v1alpha1/models`,
|
|
192
|
-
urlParams: urlParams(["order_by", request.orderBy], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["project_id", request.projectId ?? this.client.settings.defaultProjectId])
|
|
193
|
-
}, unmarshalListModelsResponse);
|
|
194
|
-
this.listModels = (request = {}) => enrichForPagination("models", this.pageOfListModels, request);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
//#endregion
|
|
198
|
-
export { API };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { BookingStatus, JobStatus, ProcessStatus, SessionStatus } from './types.gen.js';
|
|
2
|
-
/** Lists transient statutes of the enum {@link BookingStatus}. */
|
|
3
|
-
export declare const BOOKING_TRANSIENT_STATUSES: BookingStatus[];
|
|
4
|
-
/** Lists transient statutes of the enum {@link JobStatus}. */
|
|
5
|
-
export declare const JOB_TRANSIENT_STATUSES: JobStatus[];
|
|
6
|
-
/** Lists transient statutes of the enum {@link ProcessStatus}. */
|
|
7
|
-
export declare const PROCESS_TRANSIENT_STATUSES: ProcessStatus[];
|
|
8
|
-
/** Lists transient statutes of the enum {@link SessionStatus}. */
|
|
9
|
-
export declare const SESSION_TRANSIENT_STATUSES: SessionStatus[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region src/v1alpha1/content.gen.ts
|
|
2
|
-
/** Lists transient statutes of the enum {@link BookingStatus}. */
|
|
3
|
-
const BOOKING_TRANSIENT_STATUSES = [
|
|
4
|
-
"waiting",
|
|
5
|
-
"validating",
|
|
6
|
-
"cancelling"
|
|
7
|
-
];
|
|
8
|
-
/** Lists transient statutes of the enum {@link JobStatus}. */
|
|
9
|
-
const JOB_TRANSIENT_STATUSES = [
|
|
10
|
-
"waiting",
|
|
11
|
-
"running",
|
|
12
|
-
"cancelling"
|
|
13
|
-
];
|
|
14
|
-
/** Lists transient statutes of the enum {@link ProcessStatus}. */
|
|
15
|
-
const PROCESS_TRANSIENT_STATUSES = [
|
|
16
|
-
"starting",
|
|
17
|
-
"running",
|
|
18
|
-
"cancelling"
|
|
19
|
-
];
|
|
20
|
-
/** Lists transient statutes of the enum {@link SessionStatus}. */
|
|
21
|
-
const SESSION_TRANSIENT_STATUSES = ["starting", "stopping"];
|
|
22
|
-
//#endregion
|
|
23
|
-
export { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { API, } from './api.gen.js';
|
|
2
|
-
export * from './content.gen.js';
|
|
3
|
-
export * from './marshalling.gen.js';
|
|
4
|
-
export type { Application, ApplicationType, Booking, BookingStatus, CancelJobRequest, CancelProcessRequest, CreateJobRequest, CreateModelRequest, CreateProcessRequest, CreateSessionRequest, CreateSessionRequestBookingDemand, DeleteJobRequest, DeleteProcessRequest, DeleteSessionRequest, GetApplicationRequest, GetBookingRequest, GetJobCircuitRequest, GetJobRequest, GetModelRequest, GetPlatformRequest, GetProcessRequest, GetSessionRequest, Job, JobCircuit, JobResult, JobStatus, ListApplicationsRequest, ListApplicationsRequestOrderBy, ListApplicationsResponse, ListBookingsRequest, ListBookingsRequestOrderBy, ListBookingsResponse, ListJobResultsRequest, ListJobResultsRequestOrderBy, ListJobResultsResponse, ListJobsRequest, ListJobsRequestOrderBy, ListJobsResponse, ListModelsRequest, ListModelsRequestOrderBy, ListModelsResponse, ListPlatformsRequest, ListPlatformsRequestOrderBy, ListPlatformsResponse, ListProcessResultsRequest, ListProcessResultsRequestOrderBy, ListProcessResultsResponse, ListProcessesRequest, ListProcessesRequestOrderBy, ListProcessesResponse, ListSessionACLsRequest, ListSessionACLsRequestOrderBy, ListSessionACLsResponse, ListSessionsRequest, ListSessionsRequestOrderBy, ListSessionsResponse, Model, Platform, PlatformAvailability, PlatformBookingRequirement, PlatformHardware, PlatformTechnology, PlatformType, Process, ProcessResult, ProcessStatus, Session, SessionAccess, SessionOriginType, SessionStatus, TerminateSessionRequest, UpdateBookingRequest, UpdateJobRequest, UpdateProcessRequest, UpdateSessionRequest, } from './types.gen.js';
|
|
5
|
-
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
3
|
-
import { marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession } from "./marshalling.gen.js";
|
|
4
|
-
import { API } from "./api.gen.js";
|
|
5
|
-
import { validation_rules_gen_exports } from "./validation-rules.gen.js";
|
|
6
|
-
//#region src/v1alpha1/index.gen.ts
|
|
7
|
-
var index_gen_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
-
API: () => API,
|
|
9
|
-
BOOKING_TRANSIENT_STATUSES: () => BOOKING_TRANSIENT_STATUSES,
|
|
10
|
-
JOB_TRANSIENT_STATUSES: () => JOB_TRANSIENT_STATUSES,
|
|
11
|
-
PROCESS_TRANSIENT_STATUSES: () => PROCESS_TRANSIENT_STATUSES,
|
|
12
|
-
SESSION_TRANSIENT_STATUSES: () => SESSION_TRANSIENT_STATUSES,
|
|
13
|
-
ValidationRules: () => validation_rules_gen_exports,
|
|
14
|
-
marshalCreateJobRequest: () => marshalCreateJobRequest,
|
|
15
|
-
marshalCreateModelRequest: () => marshalCreateModelRequest,
|
|
16
|
-
marshalCreateProcessRequest: () => marshalCreateProcessRequest,
|
|
17
|
-
marshalCreateSessionRequest: () => marshalCreateSessionRequest,
|
|
18
|
-
marshalUpdateBookingRequest: () => marshalUpdateBookingRequest,
|
|
19
|
-
marshalUpdateJobRequest: () => marshalUpdateJobRequest,
|
|
20
|
-
marshalUpdateProcessRequest: () => marshalUpdateProcessRequest,
|
|
21
|
-
marshalUpdateSessionRequest: () => marshalUpdateSessionRequest,
|
|
22
|
-
unmarshalApplication: () => unmarshalApplication,
|
|
23
|
-
unmarshalBooking: () => unmarshalBooking,
|
|
24
|
-
unmarshalJob: () => unmarshalJob,
|
|
25
|
-
unmarshalJobCircuit: () => unmarshalJobCircuit,
|
|
26
|
-
unmarshalListApplicationsResponse: () => unmarshalListApplicationsResponse,
|
|
27
|
-
unmarshalListBookingsResponse: () => unmarshalListBookingsResponse,
|
|
28
|
-
unmarshalListJobResultsResponse: () => unmarshalListJobResultsResponse,
|
|
29
|
-
unmarshalListJobsResponse: () => unmarshalListJobsResponse,
|
|
30
|
-
unmarshalListModelsResponse: () => unmarshalListModelsResponse,
|
|
31
|
-
unmarshalListPlatformsResponse: () => unmarshalListPlatformsResponse,
|
|
32
|
-
unmarshalListProcessResultsResponse: () => unmarshalListProcessResultsResponse,
|
|
33
|
-
unmarshalListProcessesResponse: () => unmarshalListProcessesResponse,
|
|
34
|
-
unmarshalListSessionACLsResponse: () => unmarshalListSessionACLsResponse,
|
|
35
|
-
unmarshalListSessionsResponse: () => unmarshalListSessionsResponse,
|
|
36
|
-
unmarshalModel: () => unmarshalModel,
|
|
37
|
-
unmarshalPlatform: () => unmarshalPlatform,
|
|
38
|
-
unmarshalProcess: () => unmarshalProcess,
|
|
39
|
-
unmarshalSession: () => unmarshalSession
|
|
40
|
-
});
|
|
41
|
-
//#endregion
|
|
42
|
-
export { API, BOOKING_TRANSIENT_STATUSES, JOB_TRANSIENT_STATUSES, PROCESS_TRANSIENT_STATUSES, SESSION_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, marshalCreateJobRequest, marshalCreateModelRequest, marshalCreateProcessRequest, marshalCreateSessionRequest, marshalUpdateBookingRequest, marshalUpdateJobRequest, marshalUpdateProcessRequest, marshalUpdateSessionRequest, unmarshalApplication, unmarshalBooking, unmarshalJob, unmarshalJobCircuit, unmarshalListApplicationsResponse, unmarshalListBookingsResponse, unmarshalListJobResultsResponse, unmarshalListJobsResponse, unmarshalListModelsResponse, unmarshalListPlatformsResponse, unmarshalListProcessResultsResponse, unmarshalListProcessesResponse, unmarshalListSessionACLsResponse, unmarshalListSessionsResponse, unmarshalModel, unmarshalPlatform, unmarshalProcess, unmarshalSession };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { JobCircuit, Application, Booking, Job, Model, Platform, Process, Session, ListApplicationsResponse, ListBookingsResponse, ListJobResultsResponse, ListJobsResponse, ListModelsResponse, ListPlatformsResponse, ListProcessResultsResponse, ListProcessesResponse, ListSessionACLsResponse, ListSessionsResponse, CreateJobRequest, CreateModelRequest, CreateProcessRequest, CreateSessionRequest, UpdateBookingRequest, UpdateJobRequest, UpdateProcessRequest, UpdateSessionRequest } from './types.gen.js';
|
|
3
|
-
export declare const unmarshalJobCircuit: (data: unknown) => JobCircuit;
|
|
4
|
-
export declare const unmarshalApplication: (data: unknown) => Application;
|
|
5
|
-
export declare const unmarshalBooking: (data: unknown) => Booking;
|
|
6
|
-
export declare const unmarshalJob: (data: unknown) => Job;
|
|
7
|
-
export declare const unmarshalModel: (data: unknown) => Model;
|
|
8
|
-
export declare const unmarshalPlatform: (data: unknown) => Platform;
|
|
9
|
-
export declare const unmarshalProcess: (data: unknown) => Process;
|
|
10
|
-
export declare const unmarshalSession: (data: unknown) => Session;
|
|
11
|
-
export declare const unmarshalListApplicationsResponse: (data: unknown) => ListApplicationsResponse;
|
|
12
|
-
export declare const unmarshalListBookingsResponse: (data: unknown) => ListBookingsResponse;
|
|
13
|
-
export declare const unmarshalListJobResultsResponse: (data: unknown) => ListJobResultsResponse;
|
|
14
|
-
export declare const unmarshalListJobsResponse: (data: unknown) => ListJobsResponse;
|
|
15
|
-
export declare const unmarshalListModelsResponse: (data: unknown) => ListModelsResponse;
|
|
16
|
-
export declare const unmarshalListPlatformsResponse: (data: unknown) => ListPlatformsResponse;
|
|
17
|
-
export declare const unmarshalListProcessResultsResponse: (data: unknown) => ListProcessResultsResponse;
|
|
18
|
-
export declare const unmarshalListProcessesResponse: (data: unknown) => ListProcessesResponse;
|
|
19
|
-
export declare const unmarshalListSessionACLsResponse: (data: unknown) => ListSessionACLsResponse;
|
|
20
|
-
export declare const unmarshalListSessionsResponse: (data: unknown) => ListSessionsResponse;
|
|
21
|
-
export declare const marshalCreateJobRequest: (request: CreateJobRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
22
|
-
export declare const marshalCreateModelRequest: (request: CreateModelRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
23
|
-
export declare const marshalCreateProcessRequest: (request: CreateProcessRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
24
|
-
export declare const marshalCreateSessionRequest: (request: CreateSessionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
25
|
-
export declare const marshalUpdateBookingRequest: (request: UpdateBookingRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
26
|
-
export declare const marshalUpdateJobRequest: (request: UpdateJobRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
27
|
-
export declare const marshalUpdateProcessRequest: (request: UpdateProcessRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
28
|
-
export declare const marshalUpdateSessionRequest: (request: UpdateSessionRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
|
-
//#region src/v1alpha1/marshalling.gen.ts
|
|
3
|
-
const unmarshalJobCircuit = (data) => {
|
|
4
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobCircuit' failed as data isn't a dictionary.`);
|
|
5
|
-
return {
|
|
6
|
-
percevalCircuit: data.perceval_circuit,
|
|
7
|
-
qiskitCircuit: data.qiskit_circuit
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
const unmarshalApplication = (data) => {
|
|
11
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
|
|
12
|
-
return {
|
|
13
|
-
compatiblePlatformIds: data.compatible_platform_ids,
|
|
14
|
-
id: data.id,
|
|
15
|
-
inputTemplate: data.input_template,
|
|
16
|
-
name: data.name,
|
|
17
|
-
type: data.type
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
const unmarshalBooking = (data) => {
|
|
21
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Booking' failed as data isn't a dictionary.`);
|
|
22
|
-
return {
|
|
23
|
-
createdAt: unmarshalDate(data.created_at),
|
|
24
|
-
description: data.description,
|
|
25
|
-
finishedAt: unmarshalDate(data.finished_at),
|
|
26
|
-
id: data.id,
|
|
27
|
-
progressMessage: data.progress_message,
|
|
28
|
-
startedAt: unmarshalDate(data.started_at),
|
|
29
|
-
status: data.status,
|
|
30
|
-
timeZone: data.time_zone,
|
|
31
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
const unmarshalJob = (data) => {
|
|
35
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Job' failed as data isn't a dictionary.`);
|
|
36
|
-
return {
|
|
37
|
-
createdAt: unmarshalDate(data.created_at),
|
|
38
|
-
id: data.id,
|
|
39
|
-
jobDuration: data.job_duration,
|
|
40
|
-
modelId: data.model_id,
|
|
41
|
-
name: data.name,
|
|
42
|
-
parameters: data.parameters,
|
|
43
|
-
progressMessage: data.progress_message,
|
|
44
|
-
resultDistribution: data.result_distribution,
|
|
45
|
-
sessionId: data.session_id,
|
|
46
|
-
startedAt: unmarshalDate(data.started_at),
|
|
47
|
-
status: data.status,
|
|
48
|
-
tags: data.tags,
|
|
49
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
const unmarshalModel = (data) => {
|
|
53
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Model' failed as data isn't a dictionary.`);
|
|
54
|
-
return {
|
|
55
|
-
createdAt: unmarshalDate(data.created_at),
|
|
56
|
-
id: data.id,
|
|
57
|
-
projectId: data.project_id,
|
|
58
|
-
url: data.url
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
const unmarshalPlatformBookingRequirement = (data) => {
|
|
62
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformBookingRequirement' failed as data isn't a dictionary.`);
|
|
63
|
-
return {
|
|
64
|
-
maxBookingPerDay: data.max_booking_per_day,
|
|
65
|
-
maxBookingPerWeek: data.max_booking_per_week,
|
|
66
|
-
maxCancellationDuration: data.max_cancellation_duration,
|
|
67
|
-
maxDuration: data.max_duration,
|
|
68
|
-
maxPlanificationDuration: data.max_planification_duration,
|
|
69
|
-
minDuration: data.min_duration,
|
|
70
|
-
minPlanificationDuration: data.min_planification_duration
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
const unmarshalPlatformHardware = (data) => {
|
|
74
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PlatformHardware' failed as data isn't a dictionary.`);
|
|
75
|
-
return {
|
|
76
|
-
gpus: data.gpus,
|
|
77
|
-
gpusNetwork: data.gpus_network,
|
|
78
|
-
name: data.name,
|
|
79
|
-
ram: data.ram,
|
|
80
|
-
vcpus: data.vcpus,
|
|
81
|
-
vram: data.vram
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
const unmarshalPlatform = (data) => {
|
|
85
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Platform' failed as data isn't a dictionary.`);
|
|
86
|
-
return {
|
|
87
|
-
availability: data.availability,
|
|
88
|
-
backendName: data.backend_name,
|
|
89
|
-
bookingRequirement: data.booking_requirement ? unmarshalPlatformBookingRequirement(data.booking_requirement) : void 0,
|
|
90
|
-
description: data.description,
|
|
91
|
-
documentationUrl: data.documentation_url,
|
|
92
|
-
hardware: data.hardware ? unmarshalPlatformHardware(data.hardware) : void 0,
|
|
93
|
-
id: data.id,
|
|
94
|
-
isBookable: data.is_bookable,
|
|
95
|
-
maxCircuitCount: data.max_circuit_count,
|
|
96
|
-
maxQubitCount: data.max_qubit_count,
|
|
97
|
-
maxShotCount: data.max_shot_count,
|
|
98
|
-
metadata: data.metadata,
|
|
99
|
-
name: data.name,
|
|
100
|
-
pricePerCircuit: data.price_per_circuit ? unmarshalMoney(data.price_per_circuit) : void 0,
|
|
101
|
-
pricePerHour: data.price_per_hour ? unmarshalMoney(data.price_per_hour) : void 0,
|
|
102
|
-
pricePerShot: data.price_per_shot ? unmarshalMoney(data.price_per_shot) : void 0,
|
|
103
|
-
providerName: data.provider_name,
|
|
104
|
-
technology: data.technology,
|
|
105
|
-
type: data.type,
|
|
106
|
-
version: data.version
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
const unmarshalProcess = (data) => {
|
|
110
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Process' failed as data isn't a dictionary.`);
|
|
111
|
-
return {
|
|
112
|
-
applicationId: data.application_id,
|
|
113
|
-
attachedSessionIds: data.attached_session_ids,
|
|
114
|
-
createdAt: unmarshalDate(data.created_at),
|
|
115
|
-
finishedAt: unmarshalDate(data.finished_at),
|
|
116
|
-
id: data.id,
|
|
117
|
-
input: data.input,
|
|
118
|
-
name: data.name,
|
|
119
|
-
platformId: data.platform_id,
|
|
120
|
-
progress: data.progress,
|
|
121
|
-
progressMessage: data.progress_message,
|
|
122
|
-
projectId: data.project_id,
|
|
123
|
-
startedAt: unmarshalDate(data.started_at),
|
|
124
|
-
status: data.status,
|
|
125
|
-
tags: data.tags,
|
|
126
|
-
updatedAt: unmarshalDate(data.updated_at)
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
const unmarshalSession = (data) => {
|
|
130
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Session' failed as data isn't a dictionary.`);
|
|
131
|
-
return {
|
|
132
|
-
bookingId: data.booking_id,
|
|
133
|
-
createdAt: unmarshalDate(data.created_at),
|
|
134
|
-
deduplicationId: data.deduplication_id,
|
|
135
|
-
finishedJobCount: data.finished_job_count,
|
|
136
|
-
id: data.id,
|
|
137
|
-
maxDuration: data.max_duration,
|
|
138
|
-
maxIdleDuration: data.max_idle_duration,
|
|
139
|
-
modelId: data.model_id,
|
|
140
|
-
name: data.name,
|
|
141
|
-
originId: data.origin_id,
|
|
142
|
-
originType: data.origin_type,
|
|
143
|
-
parameters: data.parameters,
|
|
144
|
-
platformId: data.platform_id,
|
|
145
|
-
progressMessage: data.progress_message,
|
|
146
|
-
projectId: data.project_id,
|
|
147
|
-
startedAt: unmarshalDate(data.started_at),
|
|
148
|
-
status: data.status,
|
|
149
|
-
tags: data.tags,
|
|
150
|
-
terminatedAt: unmarshalDate(data.terminated_at),
|
|
151
|
-
updatedAt: unmarshalDate(data.updated_at),
|
|
152
|
-
waitingJobCount: data.waiting_job_count
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
const unmarshalListApplicationsResponse = (data) => {
|
|
156
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
|
|
157
|
-
return {
|
|
158
|
-
applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
|
|
159
|
-
totalCount: data.total_count
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
const unmarshalListBookingsResponse = (data) => {
|
|
163
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListBookingsResponse' failed as data isn't a dictionary.`);
|
|
164
|
-
return {
|
|
165
|
-
bookings: unmarshalArrayOfObject(data.bookings, unmarshalBooking),
|
|
166
|
-
totalCount: data.total_count
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
const unmarshalJobResult = (data) => {
|
|
170
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'JobResult' failed as data isn't a dictionary.`);
|
|
171
|
-
return {
|
|
172
|
-
createdAt: unmarshalDate(data.created_at),
|
|
173
|
-
jobId: data.job_id,
|
|
174
|
-
result: data.result,
|
|
175
|
-
url: data.url
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
const unmarshalListJobResultsResponse = (data) => {
|
|
179
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobResultsResponse' failed as data isn't a dictionary.`);
|
|
180
|
-
return {
|
|
181
|
-
jobResults: unmarshalArrayOfObject(data.job_results, unmarshalJobResult),
|
|
182
|
-
totalCount: data.total_count
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
const unmarshalListJobsResponse = (data) => {
|
|
186
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListJobsResponse' failed as data isn't a dictionary.`);
|
|
187
|
-
return {
|
|
188
|
-
jobs: unmarshalArrayOfObject(data.jobs, unmarshalJob),
|
|
189
|
-
totalCount: data.total_count
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
const unmarshalListModelsResponse = (data) => {
|
|
193
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListModelsResponse' failed as data isn't a dictionary.`);
|
|
194
|
-
return {
|
|
195
|
-
models: unmarshalArrayOfObject(data.models, unmarshalModel),
|
|
196
|
-
totalCount: data.total_count
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
const unmarshalListPlatformsResponse = (data) => {
|
|
200
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPlatformsResponse' failed as data isn't a dictionary.`);
|
|
201
|
-
return {
|
|
202
|
-
platforms: unmarshalArrayOfObject(data.platforms, unmarshalPlatform),
|
|
203
|
-
totalCount: data.total_count
|
|
204
|
-
};
|
|
205
|
-
};
|
|
206
|
-
const unmarshalProcessResult = (data) => {
|
|
207
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ProcessResult' failed as data isn't a dictionary.`);
|
|
208
|
-
return {
|
|
209
|
-
createdAt: unmarshalDate(data.created_at),
|
|
210
|
-
processId: data.process_id,
|
|
211
|
-
result: data.result
|
|
212
|
-
};
|
|
213
|
-
};
|
|
214
|
-
const unmarshalListProcessResultsResponse = (data) => {
|
|
215
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessResultsResponse' failed as data isn't a dictionary.`);
|
|
216
|
-
return {
|
|
217
|
-
processResults: unmarshalArrayOfObject(data.process_results, unmarshalProcessResult),
|
|
218
|
-
totalCount: data.total_count
|
|
219
|
-
};
|
|
220
|
-
};
|
|
221
|
-
const unmarshalListProcessesResponse = (data) => {
|
|
222
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListProcessesResponse' failed as data isn't a dictionary.`);
|
|
223
|
-
return {
|
|
224
|
-
processes: unmarshalArrayOfObject(data.processes, unmarshalProcess),
|
|
225
|
-
totalCount: data.total_count
|
|
226
|
-
};
|
|
227
|
-
};
|
|
228
|
-
const unmarshalListSessionACLsResponse = (data) => {
|
|
229
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionACLsResponse' failed as data isn't a dictionary.`);
|
|
230
|
-
return {
|
|
231
|
-
acls: data.acls,
|
|
232
|
-
totalCount: data.total_count
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
const unmarshalListSessionsResponse = (data) => {
|
|
236
|
-
if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListSessionsResponse' failed as data isn't a dictionary.`);
|
|
237
|
-
return {
|
|
238
|
-
sessions: unmarshalArrayOfObject(data.sessions, unmarshalSession),
|
|
239
|
-
totalCount: data.total_count
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
const marshalJobCircuit = (request, defaults) => ({ ...resolveOneOf([{
|
|
243
|
-
param: "perceval_circuit",
|
|
244
|
-
value: request.percevalCircuit
|
|
245
|
-
}, {
|
|
246
|
-
param: "qiskit_circuit",
|
|
247
|
-
value: request.qiskitCircuit
|
|
248
|
-
}]) });
|
|
249
|
-
const marshalCreateJobRequest = (request, defaults) => ({
|
|
250
|
-
circuit: marshalJobCircuit(request.circuit, defaults),
|
|
251
|
-
max_duration: request.maxDuration,
|
|
252
|
-
model_id: request.modelId,
|
|
253
|
-
name: request.name,
|
|
254
|
-
parameters: request.parameters,
|
|
255
|
-
session_id: request.sessionId,
|
|
256
|
-
tags: request.tags
|
|
257
|
-
});
|
|
258
|
-
const marshalCreateModelRequest = (request, defaults) => ({
|
|
259
|
-
payload: request.payload,
|
|
260
|
-
project_id: request.projectId ?? defaults.defaultProjectId
|
|
261
|
-
});
|
|
262
|
-
const marshalCreateProcessRequest = (request, defaults) => ({
|
|
263
|
-
application_id: request.applicationId,
|
|
264
|
-
input: request.input,
|
|
265
|
-
name: request.name,
|
|
266
|
-
platform_id: request.platformId,
|
|
267
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
268
|
-
tags: request.tags
|
|
269
|
-
});
|
|
270
|
-
const marshalCreateSessionRequestBookingDemand = (request, defaults) => ({
|
|
271
|
-
description: request.description,
|
|
272
|
-
finished_at: request.finishedAt,
|
|
273
|
-
started_at: request.startedAt,
|
|
274
|
-
time_zone: request.timeZone
|
|
275
|
-
});
|
|
276
|
-
const marshalCreateSessionRequest = (request, defaults) => ({
|
|
277
|
-
booking_demand: request.bookingDemand !== void 0 ? marshalCreateSessionRequestBookingDemand(request.bookingDemand, defaults) : void 0,
|
|
278
|
-
deduplication_id: request.deduplicationId,
|
|
279
|
-
max_duration: request.maxDuration,
|
|
280
|
-
max_idle_duration: request.maxIdleDuration,
|
|
281
|
-
model_id: request.modelId,
|
|
282
|
-
name: request.name,
|
|
283
|
-
parameters: request.parameters,
|
|
284
|
-
platform_id: request.platformId,
|
|
285
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
286
|
-
tags: request.tags
|
|
287
|
-
});
|
|
288
|
-
const marshalUpdateBookingRequest = (request, defaults) => ({ description: request.description });
|
|
289
|
-
const marshalUpdateJobRequest = (request, defaults) => ({
|
|
290
|
-
name: request.name,
|
|
291
|
-
tags: request.tags
|
|
292
|
-
});
|
|
293
|
-
const marshalUpdateProcessRequest = (request, defaults) => ({
|
|
294
|
-
name: request.name,
|
|
295
|
-
tags: request.tags
|
|
296
|
-
});
|
|
297
|
-
const marshalUpdateSessionRequest = (request, defaults) => ({
|
|
298
|
-
max_duration: request.maxDuration,
|
|
299
|
-
max_idle_duration: request.maxIdleDuration,
|
|
300
|
-
name: request.name,
|
|
301
|
-
tags: request.tags
|
|
302
|
-
});
|
|
303
|
-
//#endregion
|
|
304
|
-
export { 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 };
|