@shapediver/sdk.geometry-api-sdk-v2 3.7.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 +21 -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 +31 -38
- 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,327 @@
|
|
|
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
|
+
ReqSdtfDefinition,
|
|
19
|
+
ResDeleteSdtf,
|
|
20
|
+
ResError,
|
|
21
|
+
ResListSdtfs,
|
|
22
|
+
ResUploadSdtf,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
|
|
25
|
+
export interface DeleteSdtfRequest {
|
|
26
|
+
sessionId: string;
|
|
27
|
+
namespace: string;
|
|
28
|
+
sdtfId: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DownloadSdtfRequest {
|
|
32
|
+
sessionId: string;
|
|
33
|
+
namespace: string;
|
|
34
|
+
sdtfId: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ListSdtfsRequest {
|
|
38
|
+
sessionId: string;
|
|
39
|
+
namespace: string;
|
|
40
|
+
offset?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface UploadSdtfRequest {
|
|
44
|
+
sessionId: string;
|
|
45
|
+
reqSdtfDefinition: Array<ReqSdtfDefinition>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export class SdtfApi extends BaseAPI {
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Creates request options for deleteSdtf without sending the request
|
|
55
|
+
*/
|
|
56
|
+
async deleteSdtfRequestOpts(requestParameters: DeleteSdtfRequest): Promise<runtime.RequestOpts> {
|
|
57
|
+
if (requestParameters['sessionId'] == null) {
|
|
58
|
+
throw new runtime.RequiredError(
|
|
59
|
+
'sessionId',
|
|
60
|
+
'Required parameter "sessionId" was null or undefined when calling deleteSdtf().'
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (requestParameters['namespace'] == null) {
|
|
65
|
+
throw new runtime.RequiredError(
|
|
66
|
+
'namespace',
|
|
67
|
+
'Required parameter "namespace" was null or undefined when calling deleteSdtf().'
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (requestParameters['sdtfId'] == null) {
|
|
72
|
+
throw new runtime.RequiredError(
|
|
73
|
+
'sdtfId',
|
|
74
|
+
'Required parameter "sdtfId" was null or undefined when calling deleteSdtf().'
|
|
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}/sdtf/{namespace}/{sdtfId}`;
|
|
92
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
93
|
+
urlPath = urlPath.replace('{namespace}', encodeURIComponent(String(requestParameters['namespace'])));
|
|
94
|
+
urlPath = urlPath.replace('{sdtfId}', encodeURIComponent(String(requestParameters['sdtfId'])));
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'DELETE',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Permissions: * `asset.sdtf.delete.*` - __required__.
|
|
106
|
+
* Delete a sdTF-assets.
|
|
107
|
+
*/
|
|
108
|
+
async deleteSdtfRaw(requestParameters: DeleteSdtfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResDeleteSdtf>> {
|
|
109
|
+
const requestOptions = await this.deleteSdtfRequestOpts(requestParameters);
|
|
110
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
111
|
+
|
|
112
|
+
return new runtime.JSONApiResponse(response);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Permissions: * `asset.sdtf.delete.*` - __required__.
|
|
117
|
+
* Delete a sdTF-assets.
|
|
118
|
+
*/
|
|
119
|
+
async deleteSdtf(sessionId: string, namespace: string, sdtfId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResDeleteSdtf> {
|
|
120
|
+
const response = await this.deleteSdtfRaw({ sessionId: sessionId, namespace: namespace, sdtfId: sdtfId }, initOverrides);
|
|
121
|
+
return await response.value();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Creates request options for downloadSdtf without sending the request
|
|
126
|
+
*/
|
|
127
|
+
async downloadSdtfRequestOpts(requestParameters: DownloadSdtfRequest): Promise<runtime.RequestOpts> {
|
|
128
|
+
if (requestParameters['sessionId'] == null) {
|
|
129
|
+
throw new runtime.RequiredError(
|
|
130
|
+
'sessionId',
|
|
131
|
+
'Required parameter "sessionId" was null or undefined when calling downloadSdtf().'
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (requestParameters['namespace'] == null) {
|
|
136
|
+
throw new runtime.RequiredError(
|
|
137
|
+
'namespace',
|
|
138
|
+
'Required parameter "namespace" was null or undefined when calling downloadSdtf().'
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (requestParameters['sdtfId'] == null) {
|
|
143
|
+
throw new runtime.RequiredError(
|
|
144
|
+
'sdtfId',
|
|
145
|
+
'Required parameter "sdtfId" was null or undefined when calling downloadSdtf().'
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const queryParameters: any = {};
|
|
150
|
+
|
|
151
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
152
|
+
|
|
153
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
154
|
+
const token = this.configuration.accessToken;
|
|
155
|
+
const tokenString = await token("JwtAuth", []);
|
|
156
|
+
|
|
157
|
+
if (tokenString) {
|
|
158
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
let urlPath = `/api/v2/session/{sessionId}/sdtf/{namespace}/{sdtfId}`;
|
|
163
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
164
|
+
urlPath = urlPath.replace('{namespace}', encodeURIComponent(String(requestParameters['namespace'])));
|
|
165
|
+
urlPath = urlPath.replace('{sdtfId}', encodeURIComponent(String(requestParameters['sdtfId'])));
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
path: urlPath,
|
|
169
|
+
method: 'GET',
|
|
170
|
+
headers: headerParameters,
|
|
171
|
+
query: queryParameters,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Permissions: * `asset.sdtf.get.*` - __required__.
|
|
177
|
+
* Download a sdTF-asset.
|
|
178
|
+
*/
|
|
179
|
+
async downloadSdtfRaw(requestParameters: DownloadSdtfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
180
|
+
const requestOptions = await this.downloadSdtfRequestOpts(requestParameters);
|
|
181
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
182
|
+
|
|
183
|
+
return new runtime.BlobApiResponse(response);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Permissions: * `asset.sdtf.get.*` - __required__.
|
|
188
|
+
* Download a sdTF-asset.
|
|
189
|
+
*/
|
|
190
|
+
async downloadSdtf(sessionId: string, namespace: string, sdtfId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
191
|
+
const response = await this.downloadSdtfRaw({ sessionId: sessionId, namespace: namespace, sdtfId: sdtfId }, initOverrides);
|
|
192
|
+
return await response.value();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Creates request options for listSdtfs without sending the request
|
|
197
|
+
*/
|
|
198
|
+
async listSdtfsRequestOpts(requestParameters: ListSdtfsRequest): Promise<runtime.RequestOpts> {
|
|
199
|
+
if (requestParameters['sessionId'] == null) {
|
|
200
|
+
throw new runtime.RequiredError(
|
|
201
|
+
'sessionId',
|
|
202
|
+
'Required parameter "sessionId" was null or undefined when calling listSdtfs().'
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (requestParameters['namespace'] == null) {
|
|
207
|
+
throw new runtime.RequiredError(
|
|
208
|
+
'namespace',
|
|
209
|
+
'Required parameter "namespace" was null or undefined when calling listSdtfs().'
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
const queryParameters: any = {};
|
|
214
|
+
|
|
215
|
+
if (requestParameters['offset'] != null) {
|
|
216
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
220
|
+
|
|
221
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
222
|
+
const token = this.configuration.accessToken;
|
|
223
|
+
const tokenString = await token("JwtAuth", []);
|
|
224
|
+
|
|
225
|
+
if (tokenString) {
|
|
226
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
let urlPath = `/api/v2/session/{sessionId}/sdtf/{namespace}/list`;
|
|
231
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
232
|
+
urlPath = urlPath.replace('{namespace}', encodeURIComponent(String(requestParameters['namespace'])));
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
path: urlPath,
|
|
236
|
+
method: 'GET',
|
|
237
|
+
headers: headerParameters,
|
|
238
|
+
query: queryParameters,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Permissions: * `asset.sdtf.list.*` - __required__.
|
|
244
|
+
* List all sdTF-assets of a namespace.
|
|
245
|
+
*/
|
|
246
|
+
async listSdtfsRaw(requestParameters: ListSdtfsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResListSdtfs>> {
|
|
247
|
+
const requestOptions = await this.listSdtfsRequestOpts(requestParameters);
|
|
248
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
249
|
+
|
|
250
|
+
return new runtime.JSONApiResponse(response);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Permissions: * `asset.sdtf.list.*` - __required__.
|
|
255
|
+
* List all sdTF-assets of a namespace.
|
|
256
|
+
*/
|
|
257
|
+
async listSdtfs(sessionId: string, namespace: string, offset?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResListSdtfs> {
|
|
258
|
+
const response = await this.listSdtfsRaw({ sessionId: sessionId, namespace: namespace, offset: offset }, initOverrides);
|
|
259
|
+
return await response.value();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Creates request options for uploadSdtf without sending the request
|
|
264
|
+
*/
|
|
265
|
+
async uploadSdtfRequestOpts(requestParameters: UploadSdtfRequest): Promise<runtime.RequestOpts> {
|
|
266
|
+
if (requestParameters['sessionId'] == null) {
|
|
267
|
+
throw new runtime.RequiredError(
|
|
268
|
+
'sessionId',
|
|
269
|
+
'Required parameter "sessionId" was null or undefined when calling uploadSdtf().'
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
if (requestParameters['reqSdtfDefinition'] == null) {
|
|
274
|
+
throw new runtime.RequiredError(
|
|
275
|
+
'reqSdtfDefinition',
|
|
276
|
+
'Required parameter "reqSdtfDefinition" was null or undefined when calling uploadSdtf().'
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const queryParameters: any = {};
|
|
281
|
+
|
|
282
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
283
|
+
|
|
284
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
285
|
+
|
|
286
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
287
|
+
const token = this.configuration.accessToken;
|
|
288
|
+
const tokenString = await token("JwtAuth", []);
|
|
289
|
+
|
|
290
|
+
if (tokenString) {
|
|
291
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
let urlPath = `/api/v2/session/{sessionId}/sdtf/upload`;
|
|
296
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
297
|
+
|
|
298
|
+
return {
|
|
299
|
+
path: urlPath,
|
|
300
|
+
method: 'POST',
|
|
301
|
+
headers: headerParameters,
|
|
302
|
+
query: queryParameters,
|
|
303
|
+
body: requestParameters['reqSdtfDefinition'],
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Permissions: * `asset.sdtf.create.*` - __required__.
|
|
309
|
+
* Request upload URL for a sdTF-asset.
|
|
310
|
+
*/
|
|
311
|
+
async uploadSdtfRaw(requestParameters: UploadSdtfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResUploadSdtf>> {
|
|
312
|
+
const requestOptions = await this.uploadSdtfRequestOpts(requestParameters);
|
|
313
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
314
|
+
|
|
315
|
+
return new runtime.JSONApiResponse(response);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Permissions: * `asset.sdtf.create.*` - __required__.
|
|
320
|
+
* Request upload URL for a sdTF-asset.
|
|
321
|
+
*/
|
|
322
|
+
async uploadSdtf(sessionId: string, reqSdtfDefinition: Array<ReqSdtfDefinition>, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResUploadSdtf> {
|
|
323
|
+
const response = await this.uploadSdtfRaw({ sessionId: sessionId, reqSdtfDefinition: reqSdtfDefinition }, initOverrides);
|
|
324
|
+
return await response.value();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
}
|