@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,333 @@
|
|
|
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
|
+
QueryComputationStatus,
|
|
19
|
+
ReqCache,
|
|
20
|
+
ReqCustomization,
|
|
21
|
+
ReqCustomizationOrCache,
|
|
22
|
+
ReqOutputDefinitions,
|
|
23
|
+
ResComputeOutputs,
|
|
24
|
+
ResError,
|
|
25
|
+
ResGetCachedOutputs,
|
|
26
|
+
ResListOutputVersions,
|
|
27
|
+
ResUpdateOutputDefinitions,
|
|
28
|
+
} from '../models/index';
|
|
29
|
+
|
|
30
|
+
export interface ComputeOutputsRequest {
|
|
31
|
+
sessionId: string;
|
|
32
|
+
reqCustomization: ReqCustomization;
|
|
33
|
+
ignoreUnknownParams?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface GetCachedOutputsRequest {
|
|
37
|
+
sessionId: string;
|
|
38
|
+
reqCacheReqCustomization: ReqCache | ReqCustomization | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ListOutputVersionsRequest {
|
|
42
|
+
sessionId: string;
|
|
43
|
+
outputId: string;
|
|
44
|
+
statusComputation?: QueryComputationStatus;
|
|
45
|
+
statusCollect?: QueryComputationStatus;
|
|
46
|
+
offset?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UpdateOutputDefinitionsRequest {
|
|
50
|
+
modelId: string;
|
|
51
|
+
reqOutputDefinitions: ReqOutputDefinitions;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
export class OutputApi extends BaseAPI {
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Creates request options for computeOutputs without sending the request
|
|
61
|
+
*/
|
|
62
|
+
async computeOutputsRequestOpts(requestParameters: ComputeOutputsRequest): Promise<runtime.RequestOpts> {
|
|
63
|
+
if (requestParameters['sessionId'] == null) {
|
|
64
|
+
throw new runtime.RequiredError(
|
|
65
|
+
'sessionId',
|
|
66
|
+
'Required parameter "sessionId" was null or undefined when calling computeOutputs().'
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (requestParameters['reqCustomization'] == null) {
|
|
71
|
+
throw new runtime.RequiredError(
|
|
72
|
+
'reqCustomization',
|
|
73
|
+
'Required parameter "reqCustomization" was null or undefined when calling computeOutputs().'
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const queryParameters: any = {};
|
|
78
|
+
|
|
79
|
+
if (requestParameters['ignoreUnknownParams'] != null) {
|
|
80
|
+
queryParameters['ignoreUnknownParams'] = requestParameters['ignoreUnknownParams'];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
84
|
+
|
|
85
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
86
|
+
|
|
87
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
88
|
+
const token = this.configuration.accessToken;
|
|
89
|
+
const tokenString = await token("JwtAuth", []);
|
|
90
|
+
|
|
91
|
+
if (tokenString) {
|
|
92
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
let urlPath = `/api/v2/session/{sessionId}/output`;
|
|
97
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
path: urlPath,
|
|
101
|
+
method: 'PUT',
|
|
102
|
+
headers: headerParameters,
|
|
103
|
+
query: queryParameters,
|
|
104
|
+
body: requestParameters['reqCustomization'],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Permissions: * `compute.output.*` - __required__.
|
|
110
|
+
* Compute all outputs for given parameter values.
|
|
111
|
+
*/
|
|
112
|
+
async computeOutputsRaw(requestParameters: ComputeOutputsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResComputeOutputs>> {
|
|
113
|
+
const requestOptions = await this.computeOutputsRequestOpts(requestParameters);
|
|
114
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
115
|
+
|
|
116
|
+
return new runtime.JSONApiResponse(response);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Permissions: * `compute.output.*` - __required__.
|
|
121
|
+
* Compute all outputs for given parameter values.
|
|
122
|
+
*/
|
|
123
|
+
async computeOutputs(sessionId: string, reqCustomization: ReqCustomization, ignoreUnknownParams?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResComputeOutputs> {
|
|
124
|
+
const response = await this.computeOutputsRaw({ sessionId: sessionId, reqCustomization: reqCustomization, ignoreUnknownParams: ignoreUnknownParams }, initOverrides);
|
|
125
|
+
return await response.value();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Creates request options for getCachedOutputs without sending the request
|
|
130
|
+
*/
|
|
131
|
+
async getCachedOutputsRequestOpts(requestParameters: GetCachedOutputsRequest): Promise<runtime.RequestOpts> {
|
|
132
|
+
if (requestParameters['sessionId'] == null) {
|
|
133
|
+
throw new runtime.RequiredError(
|
|
134
|
+
'sessionId',
|
|
135
|
+
'Required parameter "sessionId" was null or undefined when calling getCachedOutputs().'
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (requestParameters['reqCacheReqCustomization'] === undefined) {
|
|
140
|
+
throw new runtime.RequiredError(
|
|
141
|
+
'reqCacheReqCustomization',
|
|
142
|
+
'Required parameter "reqCacheReqCustomization" was undefined when calling getCachedOutputs().'
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const queryParameters: any = {};
|
|
147
|
+
|
|
148
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
149
|
+
|
|
150
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
151
|
+
|
|
152
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
153
|
+
const token = this.configuration.accessToken;
|
|
154
|
+
const tokenString = await token("JwtAuth", []);
|
|
155
|
+
|
|
156
|
+
if (tokenString) {
|
|
157
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
let urlPath = `/api/v2/session/{sessionId}/output/cache`;
|
|
162
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
path: urlPath,
|
|
166
|
+
method: 'PUT',
|
|
167
|
+
headers: headerParameters,
|
|
168
|
+
query: queryParameters,
|
|
169
|
+
body: requestParameters['reqCacheReqCustomization'],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Permissions: * `cache.output.get.*` - __required__.
|
|
175
|
+
* Get output from cache / check if computation is done.
|
|
176
|
+
*/
|
|
177
|
+
async getCachedOutputsRaw(requestParameters: GetCachedOutputsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResGetCachedOutputs>> {
|
|
178
|
+
const requestOptions = await this.getCachedOutputsRequestOpts(requestParameters);
|
|
179
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
180
|
+
|
|
181
|
+
return new runtime.JSONApiResponse(response);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Permissions: * `cache.output.get.*` - __required__.
|
|
186
|
+
* Get output from cache / check if computation is done.
|
|
187
|
+
*/
|
|
188
|
+
async getCachedOutputs(sessionId: string, reqCacheReqCustomization: ReqCache | ReqCustomization | null, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResGetCachedOutputs> {
|
|
189
|
+
const response = await this.getCachedOutputsRaw({ sessionId: sessionId, reqCacheReqCustomization: reqCacheReqCustomization }, initOverrides);
|
|
190
|
+
return await response.value();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Creates request options for listOutputVersions without sending the request
|
|
195
|
+
*/
|
|
196
|
+
async listOutputVersionsRequestOpts(requestParameters: ListOutputVersionsRequest): Promise<runtime.RequestOpts> {
|
|
197
|
+
if (requestParameters['sessionId'] == null) {
|
|
198
|
+
throw new runtime.RequiredError(
|
|
199
|
+
'sessionId',
|
|
200
|
+
'Required parameter "sessionId" was null or undefined when calling listOutputVersions().'
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (requestParameters['outputId'] == null) {
|
|
205
|
+
throw new runtime.RequiredError(
|
|
206
|
+
'outputId',
|
|
207
|
+
'Required parameter "outputId" was null or undefined when calling listOutputVersions().'
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const queryParameters: any = {};
|
|
212
|
+
|
|
213
|
+
if (requestParameters['statusComputation'] != null) {
|
|
214
|
+
queryParameters['statusComputation'] = requestParameters['statusComputation'];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (requestParameters['statusCollect'] != null) {
|
|
218
|
+
queryParameters['statusCollect'] = requestParameters['statusCollect'];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (requestParameters['offset'] != null) {
|
|
222
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
226
|
+
|
|
227
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
228
|
+
const token = this.configuration.accessToken;
|
|
229
|
+
const tokenString = await token("JwtAuth", []);
|
|
230
|
+
|
|
231
|
+
if (tokenString) {
|
|
232
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
let urlPath = `/api/v2/session/{sessionId}/output/{outputId}/list`;
|
|
237
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
238
|
+
urlPath = urlPath.replace('{outputId}', encodeURIComponent(String(requestParameters['outputId'])));
|
|
239
|
+
|
|
240
|
+
return {
|
|
241
|
+
path: urlPath,
|
|
242
|
+
method: 'GET',
|
|
243
|
+
headers: headerParameters,
|
|
244
|
+
query: queryParameters,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Permissions: * `cache.output.list.*` - __required__.
|
|
250
|
+
* List output versions.
|
|
251
|
+
*/
|
|
252
|
+
async listOutputVersionsRaw(requestParameters: ListOutputVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResListOutputVersions>> {
|
|
253
|
+
const requestOptions = await this.listOutputVersionsRequestOpts(requestParameters);
|
|
254
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
255
|
+
|
|
256
|
+
return new runtime.JSONApiResponse(response);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Permissions: * `cache.output.list.*` - __required__.
|
|
261
|
+
* List output versions.
|
|
262
|
+
*/
|
|
263
|
+
async listOutputVersions(sessionId: string, outputId: string, statusComputation?: QueryComputationStatus, statusCollect?: QueryComputationStatus, offset?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResListOutputVersions> {
|
|
264
|
+
const response = await this.listOutputVersionsRaw({ sessionId: sessionId, outputId: outputId, statusComputation: statusComputation, statusCollect: statusCollect, offset: offset }, initOverrides);
|
|
265
|
+
return await response.value();
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Creates request options for updateOutputDefinitions without sending the request
|
|
270
|
+
*/
|
|
271
|
+
async updateOutputDefinitionsRequestOpts(requestParameters: UpdateOutputDefinitionsRequest): Promise<runtime.RequestOpts> {
|
|
272
|
+
if (requestParameters['modelId'] == null) {
|
|
273
|
+
throw new runtime.RequiredError(
|
|
274
|
+
'modelId',
|
|
275
|
+
'Required parameter "modelId" was null or undefined when calling updateOutputDefinitions().'
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (requestParameters['reqOutputDefinitions'] == null) {
|
|
280
|
+
throw new runtime.RequiredError(
|
|
281
|
+
'reqOutputDefinitions',
|
|
282
|
+
'Required parameter "reqOutputDefinitions" was null or undefined when calling updateOutputDefinitions().'
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const queryParameters: any = {};
|
|
287
|
+
|
|
288
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
289
|
+
|
|
290
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
291
|
+
|
|
292
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
293
|
+
const token = this.configuration.accessToken;
|
|
294
|
+
const tokenString = await token("JwtAuth", []);
|
|
295
|
+
|
|
296
|
+
if (tokenString) {
|
|
297
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
let urlPath = `/api/v2/model/{modelId}/output`;
|
|
302
|
+
urlPath = urlPath.replace('{modelId}', encodeURIComponent(String(requestParameters['modelId'])));
|
|
303
|
+
|
|
304
|
+
return {
|
|
305
|
+
path: urlPath,
|
|
306
|
+
method: 'PATCH',
|
|
307
|
+
headers: headerParameters,
|
|
308
|
+
query: queryParameters,
|
|
309
|
+
body: requestParameters['reqOutputDefinitions'],
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Permissions: * `set.output.ui` - __required__.
|
|
315
|
+
* Update definition of outputs.
|
|
316
|
+
*/
|
|
317
|
+
async updateOutputDefinitionsRaw(requestParameters: UpdateOutputDefinitionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResUpdateOutputDefinitions>> {
|
|
318
|
+
const requestOptions = await this.updateOutputDefinitionsRequestOpts(requestParameters);
|
|
319
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
320
|
+
|
|
321
|
+
return new runtime.JSONApiResponse(response);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Permissions: * `set.output.ui` - __required__.
|
|
326
|
+
* Update definition of outputs.
|
|
327
|
+
*/
|
|
328
|
+
async updateOutputDefinitions(modelId: string, reqOutputDefinitions: ReqOutputDefinitions, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResUpdateOutputDefinitions> {
|
|
329
|
+
const response = await this.updateOutputDefinitionsRaw({ modelId: modelId, reqOutputDefinitions: reqOutputDefinitions }, initOverrides);
|
|
330
|
+
return await response.value();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
ResError,
|
|
19
|
+
} from '../models/index';
|
|
20
|
+
|
|
21
|
+
export interface ConfirmScriptRequest {
|
|
22
|
+
scriptId: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DenyScriptRequest {
|
|
26
|
+
scriptId: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export class ScriptApi extends BaseAPI {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Creates request options for confirmScript without sending the request
|
|
36
|
+
*/
|
|
37
|
+
async confirmScriptRequestOpts(requestParameters: ConfirmScriptRequest): Promise<runtime.RequestOpts> {
|
|
38
|
+
if (requestParameters['scriptId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError(
|
|
40
|
+
'scriptId',
|
|
41
|
+
'Required parameter "scriptId" was null or undefined when calling confirmScript().'
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const queryParameters: any = {};
|
|
46
|
+
|
|
47
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
48
|
+
|
|
49
|
+
if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
|
|
50
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let urlPath = `/api/v2/script/{scriptId}/confirm`;
|
|
54
|
+
urlPath = urlPath.replace('{scriptId}', encodeURIComponent(String(requestParameters['scriptId'])));
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
path: urlPath,
|
|
58
|
+
method: 'GET',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Permissions: * `script.confirm.*` - __required__.
|
|
66
|
+
* Confirm script.
|
|
67
|
+
*/
|
|
68
|
+
async confirmScriptRaw(requestParameters: ConfirmScriptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
|
69
|
+
const requestOptions = await this.confirmScriptRequestOpts(requestParameters);
|
|
70
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
71
|
+
|
|
72
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
73
|
+
return new runtime.JSONApiResponse<string>(response);
|
|
74
|
+
} else {
|
|
75
|
+
return new runtime.TextApiResponse(response) as any;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Permissions: * `script.confirm.*` - __required__.
|
|
81
|
+
* Confirm script.
|
|
82
|
+
*/
|
|
83
|
+
async confirmScript(scriptId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
|
84
|
+
const response = await this.confirmScriptRaw({ scriptId: scriptId }, initOverrides);
|
|
85
|
+
return await response.value();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Creates request options for denyScript without sending the request
|
|
90
|
+
*/
|
|
91
|
+
async denyScriptRequestOpts(requestParameters: DenyScriptRequest): Promise<runtime.RequestOpts> {
|
|
92
|
+
if (requestParameters['scriptId'] == null) {
|
|
93
|
+
throw new runtime.RequiredError(
|
|
94
|
+
'scriptId',
|
|
95
|
+
'Required parameter "scriptId" was null or undefined when calling denyScript().'
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const queryParameters: any = {};
|
|
100
|
+
|
|
101
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
102
|
+
|
|
103
|
+
if (this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined)) {
|
|
104
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let urlPath = `/api/v2/script/{scriptId}/deny`;
|
|
108
|
+
urlPath = urlPath.replace('{scriptId}', encodeURIComponent(String(requestParameters['scriptId'])));
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
path: urlPath,
|
|
112
|
+
method: 'GET',
|
|
113
|
+
headers: headerParameters,
|
|
114
|
+
query: queryParameters,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Permissions: * `script.deny.*` - __required__.
|
|
120
|
+
* Deny script.
|
|
121
|
+
*/
|
|
122
|
+
async denyScriptRaw(requestParameters: DenyScriptRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
|
123
|
+
const requestOptions = await this.denyScriptRequestOpts(requestParameters);
|
|
124
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
125
|
+
|
|
126
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
127
|
+
return new runtime.JSONApiResponse<string>(response);
|
|
128
|
+
} else {
|
|
129
|
+
return new runtime.TextApiResponse(response) as any;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Permissions: * `script.deny.*` - __required__.
|
|
135
|
+
* Deny script.
|
|
136
|
+
*/
|
|
137
|
+
async denyScript(scriptId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
|
138
|
+
const response = await this.denyScriptRaw({ scriptId: scriptId }, initOverrides);
|
|
139
|
+
return await response.value();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
}
|