@shapediver/sdk.geometry-api-sdk-v2 3.6.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/UtilsApi.d.ts +16 -29
- package/dist/UtilsApi.d.ts.map +1 -1
- package/dist/UtilsApi.js +133 -135
- package/dist/UtilsApi.js.map +1 -1
- package/dist/base.d.ts +2 -5
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +30 -36
- package/dist/base.js.map +1 -1
- package/dist/client/apis/AnalyticsApi.d.ts +38 -0
- package/dist/client/apis/AnalyticsApi.d.ts.map +1 -0
- package/dist/client/apis/AnalyticsApi.js +245 -0
- package/dist/client/apis/AnalyticsApi.js.map +1 -0
- package/dist/client/apis/ArSceneApi.d.ts +23 -0
- package/dist/client/apis/ArSceneApi.d.ts.map +1 -0
- package/dist/client/apis/ArSceneApi.js +140 -0
- package/dist/client/apis/ArSceneApi.js.map +1 -0
- package/dist/client/apis/AssetsApi.d.ts +54 -0
- package/dist/client/apis/AssetsApi.d.ts.map +1 -0
- package/dist/client/apis/AssetsApi.js +329 -0
- package/dist/client/apis/AssetsApi.js.map +1 -0
- package/dist/client/apis/AuthApi.d.ts +8 -0
- package/dist/client/apis/AuthApi.d.ts.map +1 -0
- package/dist/client/apis/AuthApi.js +77 -0
- package/dist/client/apis/AuthApi.js.map +1 -0
- package/dist/client/apis/AuthGroupApi.d.ts +12 -0
- package/dist/client/apis/AuthGroupApi.d.ts.map +1 -0
- package/dist/client/apis/AuthGroupApi.js +89 -0
- package/dist/client/apis/AuthGroupApi.js.map +1 -0
- package/dist/client/apis/ExportApi.d.ts +38 -0
- package/dist/client/apis/ExportApi.d.ts.map +1 -0
- package/dist/client/apis/ExportApi.js +230 -0
- package/dist/client/apis/ExportApi.js.map +1 -0
- package/dist/client/apis/FileApi.d.ts +45 -0
- package/dist/client/apis/FileApi.d.ts.map +1 -0
- package/dist/client/apis/FileApi.js +271 -0
- package/dist/client/apis/FileApi.js.map +1 -0
- package/dist/client/apis/GltfApi.d.ts +14 -0
- package/dist/client/apis/GltfApi.d.ts.map +1 -0
- package/dist/client/apis/GltfApi.js +96 -0
- package/dist/client/apis/GltfApi.js.map +1 -0
- package/dist/client/apis/LogApi.d.ts +13 -0
- package/dist/client/apis/LogApi.d.ts.map +1 -0
- package/dist/client/apis/LogApi.js +93 -0
- package/dist/client/apis/LogApi.js.map +1 -0
- package/dist/client/apis/ModelApi.d.ts +129 -0
- package/dist/client/apis/ModelApi.d.ts.map +1 -0
- package/dist/client/apis/ModelApi.js +762 -0
- package/dist/client/apis/ModelApi.js.map +1 -0
- package/dist/client/apis/ModelStateApi.d.ts +57 -0
- package/dist/client/apis/ModelStateApi.d.ts.map +1 -0
- package/dist/client/apis/ModelStateApi.js +328 -0
- package/dist/client/apis/ModelStateApi.js.map +1 -0
- package/dist/client/apis/OutputApi.d.ts +38 -0
- package/dist/client/apis/OutputApi.d.ts.map +1 -0
- package/dist/client/apis/OutputApi.js +230 -0
- package/dist/client/apis/OutputApi.js.map +1 -0
- package/dist/client/apis/ScriptApi.d.ts +17 -0
- package/dist/client/apis/ScriptApi.d.ts.map +1 -0
- package/dist/client/apis/ScriptApi.js +127 -0
- package/dist/client/apis/ScriptApi.js.map +1 -0
- package/dist/client/apis/SdtfApi.d.ts +37 -0
- package/dist/client/apis/SdtfApi.d.ts.map +1 -0
- package/dist/client/apis/SdtfApi.js +227 -0
- package/dist/client/apis/SdtfApi.js.map +1 -0
- package/dist/client/apis/SessionApi.d.ts +51 -0
- package/dist/client/apis/SessionApi.d.ts.map +1 -0
- package/dist/client/apis/SessionApi.js +300 -0
- package/dist/client/apis/SessionApi.js.map +1 -0
- package/dist/client/apis/SystemApi.d.ts +28 -0
- package/dist/client/apis/SystemApi.d.ts.map +1 -0
- package/dist/client/apis/SystemApi.js +235 -0
- package/dist/client/apis/SystemApi.js.map +1 -0
- package/dist/client/apis/TextureApi.d.ts +13 -0
- package/dist/client/apis/TextureApi.d.ts.map +1 -0
- package/dist/client/apis/TextureApi.js +91 -0
- package/dist/client/apis/TextureApi.js.map +1 -0
- package/dist/client/apis/index.d.ts +18 -0
- package/dist/client/apis/index.d.ts.map +1 -0
- package/dist/client/apis/index.js +34 -0
- package/dist/client/apis/index.js.map +1 -0
- package/dist/client/index.d.ts +3 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +3 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/models/index.d.ts +1671 -0
- package/dist/client/models/index.d.ts.map +1 -0
- package/dist/client/models/index.js +239 -0
- package/dist/client/models/index.js.map +1 -0
- package/dist/client/runtime.d.ts +154 -0
- package/dist/client/runtime.d.ts.map +1 -0
- package/dist/client/runtime.js +323 -0
- package/dist/client/runtime.js.map +1 -0
- package/dist/configuration.d.ts +2 -7
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +36 -16
- package/dist/configuration.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/utils.d.ts +2 -3
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +16 -13
- package/dist/utils.js.map +1 -1
- package/package.json +3 -9
- package/src/UtilsApi.ts +252 -324
- package/src/base.ts +48 -46
- package/src/client/apis/AnalyticsApi.ts +347 -0
- package/src/client/apis/ArSceneApi.ts +172 -0
- package/src/client/apis/AssetsApi.ts +474 -0
- package/src/client/apis/AuthApi.ts +63 -0
- package/src/client/apis/AuthGroupApi.ts +89 -0
- package/src/client/apis/ExportApi.ts +332 -0
- package/src/client/apis/FileApi.ts +401 -0
- package/src/client/apis/GltfApi.ts +101 -0
- package/src/client/apis/LogApi.ts +96 -0
- package/src/client/apis/ModelApi.ts +1206 -0
- package/src/client/apis/ModelStateApi.ts +479 -0
- package/src/client/apis/OutputApi.ts +333 -0
- package/src/client/apis/ScriptApi.ts +142 -0
- package/src/client/apis/SdtfApi.ts +327 -0
- package/src/client/apis/SessionApi.ts +435 -0
- package/src/client/apis/SystemApi.ts +301 -0
- package/src/client/apis/TextureApi.ts +91 -0
- package/src/client/apis/index.ts +19 -0
- package/src/client/index.ts +3 -16
- package/src/client/models/index.ts +7367 -0
- package/src/client/runtime.ts +442 -0
- package/src/configuration.ts +62 -37
- package/src/error.ts +2 -2
- package/src/index.ts +2 -1
- package/src/utils.ts +53 -25
- package/dist/client/api.d.ts +0 -2111
- package/dist/client/api.d.ts.map +0 -1
- package/dist/client/api.js +0 -3576
- package/dist/client/api.js.map +0 -1
- package/dist/client/base.d.ts +0 -32
- package/dist/client/base.d.ts.map +0 -1
- package/dist/client/base.js +0 -37
- package/dist/client/base.js.map +0 -1
- package/dist/client/common.d.ts +0 -15
- package/dist/client/common.d.ts.map +0 -1
- package/dist/client/common.js +0 -117
- package/dist/client/common.js.map +0 -1
- package/dist/client/configuration.d.ts +0 -37
- package/dist/client/configuration.d.ts.map +0 -1
- package/dist/client/configuration.js +0 -23
- package/dist/client/configuration.js.map +0 -1
- package/src/client/api.ts +0 -11052
- package/src/client/base.ts +0 -62
- package/src/client/common.ts +0 -127
- package/src/client/configuration.ts +0 -121
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Geometry Backend API v2
|
|
5
|
+
* The ShapeDiver Geometry Backend system is used to: * host Grasshopper models in a secure, reliable, scalable, and performant way, * run computations of Grasshopper models, * and cache and output the results of computations and exports.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.5.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import { BaseAPI } from '../../base';
|
|
17
|
+
import type {
|
|
18
|
+
ReqCustomizationOrExport,
|
|
19
|
+
ReqTicket,
|
|
20
|
+
ResCloseSession,
|
|
21
|
+
ResCreateSessionByModel,
|
|
22
|
+
ResCreateSessionByTicket,
|
|
23
|
+
ResCreateTicket,
|
|
24
|
+
ResDecryptTicket,
|
|
25
|
+
ResError,
|
|
26
|
+
ResGetSessionDefaults,
|
|
27
|
+
} from '../models/index';
|
|
28
|
+
|
|
29
|
+
export interface CloseSessionRequest {
|
|
30
|
+
sessionId: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface CreateSessionByModelRequest {
|
|
34
|
+
modelId: string;
|
|
35
|
+
modelStateId?: string;
|
|
36
|
+
ignoreUnknownParams?: boolean;
|
|
37
|
+
strictModelStateValidation?: boolean;
|
|
38
|
+
reqCustomizationOrExport?: ReqCustomizationOrExport;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface CreateSessionByTicketRequest {
|
|
42
|
+
ticketId: string;
|
|
43
|
+
modelStateId?: string;
|
|
44
|
+
ignoreUnknownParams?: boolean;
|
|
45
|
+
strictModelStateValidation?: boolean;
|
|
46
|
+
reqCustomizationOrExport?: ReqCustomizationOrExport;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CreateTicketRequest {
|
|
50
|
+
modelId: string;
|
|
51
|
+
reqTicket: ReqTicket;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface DecryptTicketRequest {
|
|
55
|
+
ticketEncrypted: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface GetSessionDefaultsRequest {
|
|
59
|
+
sessionId: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
export class SessionApi extends BaseAPI {
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Creates request options for closeSession without sending the request
|
|
69
|
+
*/
|
|
70
|
+
async closeSessionRequestOpts(requestParameters: CloseSessionRequest): Promise<runtime.RequestOpts> {
|
|
71
|
+
if (requestParameters['sessionId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError(
|
|
73
|
+
'sessionId',
|
|
74
|
+
'Required parameter "sessionId" was null or undefined when calling closeSession().'
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const queryParameters: any = {};
|
|
79
|
+
|
|
80
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
81
|
+
|
|
82
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
83
|
+
const token = this.configuration.accessToken;
|
|
84
|
+
const tokenString = await token("JwtAuth", []);
|
|
85
|
+
|
|
86
|
+
if (tokenString) {
|
|
87
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let urlPath = `/api/v2/session/{sessionId}/close`;
|
|
92
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
path: urlPath,
|
|
96
|
+
method: 'POST',
|
|
97
|
+
headers: headerParameters,
|
|
98
|
+
query: queryParameters,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Close session.
|
|
104
|
+
*/
|
|
105
|
+
async closeSessionRaw(requestParameters: CloseSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResCloseSession>> {
|
|
106
|
+
const requestOptions = await this.closeSessionRequestOpts(requestParameters);
|
|
107
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
108
|
+
|
|
109
|
+
return new runtime.JSONApiResponse(response);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Close session.
|
|
114
|
+
*/
|
|
115
|
+
async closeSession(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResCloseSession> {
|
|
116
|
+
const response = await this.closeSessionRaw({ sessionId: sessionId }, initOverrides);
|
|
117
|
+
return await response.value();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Creates request options for createSessionByModel without sending the request
|
|
122
|
+
*/
|
|
123
|
+
async createSessionByModelRequestOpts(requestParameters: CreateSessionByModelRequest): Promise<runtime.RequestOpts> {
|
|
124
|
+
if (requestParameters['modelId'] == null) {
|
|
125
|
+
throw new runtime.RequiredError(
|
|
126
|
+
'modelId',
|
|
127
|
+
'Required parameter "modelId" was null or undefined when calling createSessionByModel().'
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const queryParameters: any = {};
|
|
132
|
+
|
|
133
|
+
if (requestParameters['modelStateId'] != null) {
|
|
134
|
+
queryParameters['modelStateId'] = requestParameters['modelStateId'];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (requestParameters['ignoreUnknownParams'] != null) {
|
|
138
|
+
queryParameters['ignoreUnknownParams'] = requestParameters['ignoreUnknownParams'];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (requestParameters['strictModelStateValidation'] != null) {
|
|
142
|
+
queryParameters['strictModelStateValidation'] = requestParameters['strictModelStateValidation'];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
146
|
+
|
|
147
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
148
|
+
|
|
149
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
150
|
+
const token = this.configuration.accessToken;
|
|
151
|
+
const tokenString = await token("JwtAuth", []);
|
|
152
|
+
|
|
153
|
+
if (tokenString) {
|
|
154
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
let urlPath = `/api/v2/model/{modelId}/session`;
|
|
159
|
+
urlPath = urlPath.replace('{modelId}', encodeURIComponent(String(requestParameters['modelId'])));
|
|
160
|
+
|
|
161
|
+
return {
|
|
162
|
+
path: urlPath,
|
|
163
|
+
method: 'POST',
|
|
164
|
+
headers: headerParameters,
|
|
165
|
+
query: queryParameters,
|
|
166
|
+
body: requestParameters['reqCustomizationOrExport'],
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Permissions: * `auth.session` - __required__. * `get.parameter.*` - optional: adds _parameters_ to response. * Output: * If body contains a computation request: `compute.output.*` - __required__. * If no computation request: `compute.output.*` - optional: adds _output for default parameter_ to response. * otherwise tries: `get.output.*` - optional: adds _output definitions_ to response. * Export: * Body contains an export request: `compute.export.*` - __required__. * No export request: `get.export.*` - optional: adds _export definitions_ to response.
|
|
172
|
+
* Initialize new session by model ID.
|
|
173
|
+
*/
|
|
174
|
+
async createSessionByModelRaw(requestParameters: CreateSessionByModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResCreateSessionByModel>> {
|
|
175
|
+
const requestOptions = await this.createSessionByModelRequestOpts(requestParameters);
|
|
176
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
177
|
+
|
|
178
|
+
return new runtime.JSONApiResponse(response);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Permissions: * `auth.session` - __required__. * `get.parameter.*` - optional: adds _parameters_ to response. * Output: * If body contains a computation request: `compute.output.*` - __required__. * If no computation request: `compute.output.*` - optional: adds _output for default parameter_ to response. * otherwise tries: `get.output.*` - optional: adds _output definitions_ to response. * Export: * Body contains an export request: `compute.export.*` - __required__. * No export request: `get.export.*` - optional: adds _export definitions_ to response.
|
|
183
|
+
* Initialize new session by model ID.
|
|
184
|
+
*/
|
|
185
|
+
async createSessionByModel(modelId: string, modelStateId?: string, ignoreUnknownParams?: boolean, strictModelStateValidation?: boolean, reqCustomizationOrExport?: ReqCustomizationOrExport, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResCreateSessionByModel> {
|
|
186
|
+
const response = await this.createSessionByModelRaw({ modelId: modelId, modelStateId: modelStateId, ignoreUnknownParams: ignoreUnknownParams, strictModelStateValidation: strictModelStateValidation, reqCustomizationOrExport: reqCustomizationOrExport }, initOverrides);
|
|
187
|
+
return await response.value();
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Creates request options for createSessionByTicket without sending the request
|
|
192
|
+
*/
|
|
193
|
+
async createSessionByTicketRequestOpts(requestParameters: CreateSessionByTicketRequest): Promise<runtime.RequestOpts> {
|
|
194
|
+
if (requestParameters['ticketId'] == null) {
|
|
195
|
+
throw new runtime.RequiredError(
|
|
196
|
+
'ticketId',
|
|
197
|
+
'Required parameter "ticketId" was null or undefined when calling createSessionByTicket().'
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const queryParameters: any = {};
|
|
202
|
+
|
|
203
|
+
if (requestParameters['modelStateId'] != null) {
|
|
204
|
+
queryParameters['modelStateId'] = requestParameters['modelStateId'];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (requestParameters['ignoreUnknownParams'] != null) {
|
|
208
|
+
queryParameters['ignoreUnknownParams'] = requestParameters['ignoreUnknownParams'];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (requestParameters['strictModelStateValidation'] != null) {
|
|
212
|
+
queryParameters['strictModelStateValidation'] = requestParameters['strictModelStateValidation'];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
216
|
+
|
|
217
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
218
|
+
|
|
219
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
220
|
+
const token = this.configuration.accessToken;
|
|
221
|
+
const tokenString = await token("JwtAuth", []);
|
|
222
|
+
|
|
223
|
+
if (tokenString) {
|
|
224
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
let urlPath = `/api/v2/ticket/{ticketId}`;
|
|
229
|
+
urlPath = urlPath.replace('{ticketId}', encodeURIComponent(String(requestParameters['ticketId'])));
|
|
230
|
+
|
|
231
|
+
return {
|
|
232
|
+
path: urlPath,
|
|
233
|
+
method: 'POST',
|
|
234
|
+
headers: headerParameters,
|
|
235
|
+
query: queryParameters,
|
|
236
|
+
body: requestParameters['reqCustomizationOrExport'],
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Permissions: * `get.parameter.*` - optional: adds _parameters_ to response. * Output: * If body contains a computation request: `compute.output.*` - __required__. * If no computation request: `compute.output.*` - optional: adds _output for default parameter_ to response. * otherwise tries: `get.output.*` - optional: adds _output definitions_ to response. * Export: * Body contains an export request: `compute.export.*` - __required__. * No export request: `get.export.*` - optional: adds _export definitions_ to response.
|
|
242
|
+
* Initialize new session by ticket.
|
|
243
|
+
*/
|
|
244
|
+
async createSessionByTicketRaw(requestParameters: CreateSessionByTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResCreateSessionByTicket>> {
|
|
245
|
+
const requestOptions = await this.createSessionByTicketRequestOpts(requestParameters);
|
|
246
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
247
|
+
|
|
248
|
+
return new runtime.JSONApiResponse(response);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Permissions: * `get.parameter.*` - optional: adds _parameters_ to response. * Output: * If body contains a computation request: `compute.output.*` - __required__. * If no computation request: `compute.output.*` - optional: adds _output for default parameter_ to response. * otherwise tries: `get.output.*` - optional: adds _output definitions_ to response. * Export: * Body contains an export request: `compute.export.*` - __required__. * No export request: `get.export.*` - optional: adds _export definitions_ to response.
|
|
253
|
+
* Initialize new session by ticket.
|
|
254
|
+
*/
|
|
255
|
+
async createSessionByTicket(ticketId: string, modelStateId?: string, ignoreUnknownParams?: boolean, strictModelStateValidation?: boolean, reqCustomizationOrExport?: ReqCustomizationOrExport, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResCreateSessionByTicket> {
|
|
256
|
+
const response = await this.createSessionByTicketRaw({ ticketId: ticketId, modelStateId: modelStateId, ignoreUnknownParams: ignoreUnknownParams, strictModelStateValidation: strictModelStateValidation, reqCustomizationOrExport: reqCustomizationOrExport }, initOverrides);
|
|
257
|
+
return await response.value();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Creates request options for createTicket without sending the request
|
|
262
|
+
*/
|
|
263
|
+
async createTicketRequestOpts(requestParameters: CreateTicketRequest): Promise<runtime.RequestOpts> {
|
|
264
|
+
if (requestParameters['modelId'] == null) {
|
|
265
|
+
throw new runtime.RequiredError(
|
|
266
|
+
'modelId',
|
|
267
|
+
'Required parameter "modelId" was null or undefined when calling createTicket().'
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (requestParameters['reqTicket'] == null) {
|
|
272
|
+
throw new runtime.RequiredError(
|
|
273
|
+
'reqTicket',
|
|
274
|
+
'Required parameter "reqTicket" was null or undefined when calling createTicket().'
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const queryParameters: any = {};
|
|
279
|
+
|
|
280
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
281
|
+
|
|
282
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
283
|
+
|
|
284
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
285
|
+
const token = this.configuration.accessToken;
|
|
286
|
+
const tokenString = await token("JwtAuth", []);
|
|
287
|
+
|
|
288
|
+
if (tokenString) {
|
|
289
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
let urlPath = `/api/v2/model/{modelId}/ticket`;
|
|
294
|
+
urlPath = urlPath.replace('{modelId}', encodeURIComponent(String(requestParameters['modelId'])));
|
|
295
|
+
|
|
296
|
+
return {
|
|
297
|
+
path: urlPath,
|
|
298
|
+
method: 'POST',
|
|
299
|
+
headers: headerParameters,
|
|
300
|
+
query: queryParameters,
|
|
301
|
+
body: requestParameters['reqTicket'],
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Subject-Restriction: __backend__. Permissions: * `setting.auth.ticket.create.*` - __required__. * `setting.auth.ticket.get.*` - optional: adds _settings.auth.ticket_ to response. * `setting.auth.token.get.*` - optional: adds _settings.auth.token_ to response. * `setting.compute.get.*` - optional: adds _settings.compute_ to response. * `file.upload` - optional: adds _file.upload_ to response. * `file.download` - optional: adds _file.download_ to response. * `get.statistic.*` - optional: adds _statistic_ to response.
|
|
307
|
+
* Create a new ticket that allows to initialize a new session.
|
|
308
|
+
*/
|
|
309
|
+
async createTicketRaw(requestParameters: CreateTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResCreateTicket>> {
|
|
310
|
+
const requestOptions = await this.createTicketRequestOpts(requestParameters);
|
|
311
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
312
|
+
|
|
313
|
+
return new runtime.JSONApiResponse(response);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Subject-Restriction: __backend__. Permissions: * `setting.auth.ticket.create.*` - __required__. * `setting.auth.ticket.get.*` - optional: adds _settings.auth.ticket_ to response. * `setting.auth.token.get.*` - optional: adds _settings.auth.token_ to response. * `setting.compute.get.*` - optional: adds _settings.compute_ to response. * `file.upload` - optional: adds _file.upload_ to response. * `file.download` - optional: adds _file.download_ to response. * `get.statistic.*` - optional: adds _statistic_ to response.
|
|
318
|
+
* Create a new ticket that allows to initialize a new session.
|
|
319
|
+
*/
|
|
320
|
+
async createTicket(modelId: string, reqTicket: ReqTicket, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResCreateTicket> {
|
|
321
|
+
const response = await this.createTicketRaw({ modelId: modelId, reqTicket: reqTicket }, initOverrides);
|
|
322
|
+
return await response.value();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Creates request options for decryptTicket without sending the request
|
|
327
|
+
*/
|
|
328
|
+
async decryptTicketRequestOpts(requestParameters: DecryptTicketRequest): Promise<runtime.RequestOpts> {
|
|
329
|
+
if (requestParameters['ticketEncrypted'] == null) {
|
|
330
|
+
throw new runtime.RequiredError(
|
|
331
|
+
'ticketEncrypted',
|
|
332
|
+
'Required parameter "ticketEncrypted" was null or undefined when calling decryptTicket().'
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
const queryParameters: any = {};
|
|
337
|
+
|
|
338
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
339
|
+
|
|
340
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
341
|
+
const token = this.configuration.accessToken;
|
|
342
|
+
const tokenString = await token("JwtAuth", []);
|
|
343
|
+
|
|
344
|
+
if (tokenString) {
|
|
345
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
let urlPath = `/api/v2/ticket/{ticketEncrypted}`;
|
|
350
|
+
urlPath = urlPath.replace('{ticketEncrypted}', encodeURIComponent(String(requestParameters['ticketEncrypted'])));
|
|
351
|
+
|
|
352
|
+
return {
|
|
353
|
+
path: urlPath,
|
|
354
|
+
method: 'GET',
|
|
355
|
+
headers: headerParameters,
|
|
356
|
+
query: queryParameters,
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Subject-Restriction: __backend__. Permissions: * `setting.auth.ticket.decrypt.*` - __required__.
|
|
362
|
+
* Decrypt the given ticket and return its details.
|
|
363
|
+
*/
|
|
364
|
+
async decryptTicketRaw(requestParameters: DecryptTicketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResDecryptTicket>> {
|
|
365
|
+
const requestOptions = await this.decryptTicketRequestOpts(requestParameters);
|
|
366
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
367
|
+
|
|
368
|
+
return new runtime.JSONApiResponse(response);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Subject-Restriction: __backend__. Permissions: * `setting.auth.ticket.decrypt.*` - __required__.
|
|
373
|
+
* Decrypt the given ticket and return its details.
|
|
374
|
+
*/
|
|
375
|
+
async decryptTicket(ticketEncrypted: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResDecryptTicket> {
|
|
376
|
+
const response = await this.decryptTicketRaw({ ticketEncrypted: ticketEncrypted }, initOverrides);
|
|
377
|
+
return await response.value();
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Creates request options for getSessionDefaults without sending the request
|
|
382
|
+
*/
|
|
383
|
+
async getSessionDefaultsRequestOpts(requestParameters: GetSessionDefaultsRequest): Promise<runtime.RequestOpts> {
|
|
384
|
+
if (requestParameters['sessionId'] == null) {
|
|
385
|
+
throw new runtime.RequiredError(
|
|
386
|
+
'sessionId',
|
|
387
|
+
'Required parameter "sessionId" was null or undefined when calling getSessionDefaults().'
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const queryParameters: any = {};
|
|
392
|
+
|
|
393
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
394
|
+
|
|
395
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
396
|
+
const token = this.configuration.accessToken;
|
|
397
|
+
const tokenString = await token("JwtAuth", []);
|
|
398
|
+
|
|
399
|
+
if (tokenString) {
|
|
400
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
let urlPath = `/api/v2/session/{sessionId}/default`;
|
|
405
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
406
|
+
|
|
407
|
+
return {
|
|
408
|
+
path: urlPath,
|
|
409
|
+
method: 'GET',
|
|
410
|
+
headers: headerParameters,
|
|
411
|
+
query: queryParameters,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Permissions: * `get.parameter.*` - optional: adds _parameter defaults_ to response. * `get.export.*` - optional: adds _export definitions_ to response. * `compute.output.*` - optional: adds _outputs for default parameters_ to response. * `get.output.*` - optional: adds _output definitions_ to response.
|
|
417
|
+
* Get session defaults (corresponds to the content of the session initialization request).
|
|
418
|
+
*/
|
|
419
|
+
async getSessionDefaultsRaw(requestParameters: GetSessionDefaultsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResGetSessionDefaults>> {
|
|
420
|
+
const requestOptions = await this.getSessionDefaultsRequestOpts(requestParameters);
|
|
421
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
422
|
+
|
|
423
|
+
return new runtime.JSONApiResponse(response);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Permissions: * `get.parameter.*` - optional: adds _parameter defaults_ to response. * `get.export.*` - optional: adds _export definitions_ to response. * `compute.output.*` - optional: adds _outputs for default parameters_ to response. * `get.output.*` - optional: adds _output definitions_ to response.
|
|
428
|
+
* Get session defaults (corresponds to the content of the session initialization request).
|
|
429
|
+
*/
|
|
430
|
+
async getSessionDefaults(sessionId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResGetSessionDefaults> {
|
|
431
|
+
const response = await this.getSessionDefaultsRaw({ sessionId: sessionId }, initOverrides);
|
|
432
|
+
return await response.value();
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
}
|