@shapediver/sdk.geometry-api-sdk-v2 1.0.6
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 +7 -0
- package/README.md +88 -0
- package/dist/ShapeDiverSdk.d.ts +45 -0
- package/dist/ShapeDiverSdk.d.ts.map +1 -0
- package/dist/ShapeDiverSdk.js +76 -0
- package/dist/ShapeDiverSdk.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/resources/ShapeDiverAnalyticsApi.d.ts +12 -0
- package/dist/resources/ShapeDiverAnalyticsApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverAnalyticsApi.js +30 -0
- package/dist/resources/ShapeDiverAnalyticsApi.js.map +1 -0
- package/dist/resources/ShapeDiverAssetApi.d.ts +40 -0
- package/dist/resources/ShapeDiverAssetApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverAssetApi.js +75 -0
- package/dist/resources/ShapeDiverAssetApi.js.map +1 -0
- package/dist/resources/ShapeDiverExportApi.d.ts +27 -0
- package/dist/resources/ShapeDiverExportApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverExportApi.js +53 -0
- package/dist/resources/ShapeDiverExportApi.js.map +1 -0
- package/dist/resources/ShapeDiverFileApi.d.ts +36 -0
- package/dist/resources/ShapeDiverFileApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverFileApi.js +66 -0
- package/dist/resources/ShapeDiverFileApi.js.map +1 -0
- package/dist/resources/ShapeDiverGltfApi.d.ts +15 -0
- package/dist/resources/ShapeDiverGltfApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverGltfApi.js +34 -0
- package/dist/resources/ShapeDiverGltfApi.js.map +1 -0
- package/dist/resources/ShapeDiverModelApi.d.ts +71 -0
- package/dist/resources/ShapeDiverModelApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverModelApi.js +125 -0
- package/dist/resources/ShapeDiverModelApi.js.map +1 -0
- package/dist/resources/ShapeDiverOutputApi.d.ts +27 -0
- package/dist/resources/ShapeDiverOutputApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverOutputApi.js +53 -0
- package/dist/resources/ShapeDiverOutputApi.js.map +1 -0
- package/dist/resources/ShapeDiverSdtfApi.d.ts +34 -0
- package/dist/resources/ShapeDiverSdtfApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverSdtfApi.js +64 -0
- package/dist/resources/ShapeDiverSdtfApi.js.map +1 -0
- package/dist/resources/ShapeDiverSessionApi.d.ts +32 -0
- package/dist/resources/ShapeDiverSessionApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverSessionApi.js +62 -0
- package/dist/resources/ShapeDiverSessionApi.js.map +1 -0
- package/dist/resources/ShapeDiverSystemApi.d.ts +33 -0
- package/dist/resources/ShapeDiverSystemApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverSystemApi.js +63 -0
- package/dist/resources/ShapeDiverSystemApi.js.map +1 -0
- package/dist/resources/ShapeDiverUtilsApi.d.ts +71 -0
- package/dist/resources/ShapeDiverUtilsApi.d.ts.map +1 -0
- package/dist/resources/ShapeDiverUtilsApi.js +171 -0
- package/dist/resources/ShapeDiverUtilsApi.js.map +1 -0
- package/dist/utils/utils.d.ts +3 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +9 -0
- package/dist/utils/utils.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ShapeDiverRequestGltfUploadQueryConversion, ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
2
|
+
import { BaseResourceApi, ShapeDiverSdkApi } from "@shapediver/sdk.geometry-api-sdk-core";
|
|
3
|
+
export declare class ShapeDiverGltfApi extends BaseResourceApi {
|
|
4
|
+
constructor(api: ShapeDiverSdkApi);
|
|
5
|
+
/**
|
|
6
|
+
* Upload a glTF file.
|
|
7
|
+
*
|
|
8
|
+
* @param sessionId
|
|
9
|
+
* @param body
|
|
10
|
+
* @param type
|
|
11
|
+
* @param queryConvert
|
|
12
|
+
*/
|
|
13
|
+
upload(sessionId: string, body: ArrayBuffer, type: string, queryConvert?: ShapeDiverRequestGltfUploadQueryConversion): Promise<ShapeDiverResponseDto>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ShapeDiverGltfApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverGltfApi.d.ts","sourceRoot":"","sources":["../../src/resources/ShapeDiverGltfApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0CAA0C,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AACvH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEzF,qBAAa,iBAAkB,SAAQ,eAAe;gBAErC,GAAG,EAAE,gBAAgB;IAIlC;;;;;;;OAOG;IACG,MAAM,CACR,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,MAAM,EACZ,YAAY,GAAE,0CAA4F,GAC3G,OAAO,CAAC,qBAAqB,CAAC;CAQpC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ShapeDiverGltfApi = void 0;
|
|
13
|
+
const api_geometry_api_dto_v2_1 = require("@shapediver/api.geometry-api-dto-v2");
|
|
14
|
+
const sdk_geometry_api_sdk_core_1 = require("@shapediver/sdk.geometry-api-sdk-core");
|
|
15
|
+
class ShapeDiverGltfApi extends sdk_geometry_api_sdk_core_1.BaseResourceApi {
|
|
16
|
+
constructor(api) {
|
|
17
|
+
super(api);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Upload a glTF file.
|
|
21
|
+
*
|
|
22
|
+
* @param sessionId
|
|
23
|
+
* @param body
|
|
24
|
+
* @param type
|
|
25
|
+
* @param queryConvert
|
|
26
|
+
*/
|
|
27
|
+
upload(sessionId, body, type, queryConvert = api_geometry_api_dto_v2_1.ShapeDiverRequestGltfUploadQueryConversion.NONE) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return yield this.api.post(`${this.buildSessionUri(sessionId)}/gltf?conversion=${queryConvert}`, body, { contentType: type });
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ShapeDiverGltfApi = ShapeDiverGltfApi;
|
|
34
|
+
//# sourceMappingURL=ShapeDiverGltfApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverGltfApi.js","sourceRoot":"","sources":["../../src/resources/ShapeDiverGltfApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iFAAuH;AACvH,qFAAyF;AAEzF,MAAa,iBAAkB,SAAQ,2CAAe;IAElD,YAAa,GAAqB;QAC9B,KAAK,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;;;;;;OAOG;IACG,MAAM,CACR,SAAiB,EACjB,IAAiB,EACjB,IAAY,EACZ,eAA2D,oEAA0C,CAAC,IAAI;;YAE1G,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CACtB,GAAI,IAAI,CAAC,eAAe,CAAC,SAAS,CAAE,oBAAqB,YAAa,EAAE,EACxE,IAAI,EACJ,EAAE,WAAW,EAAE,IAAI,EAAE,CACxB,CAAA;QACL,CAAC;KAAA;CAEJ;AA3BD,8CA2BC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ShapeDiverRequestConfigure, ShapeDiverRequestCustomization, ShapeDiverRequestModel, ShapeDiverRequestParameterDefinition, ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
2
|
+
import { BaseResourceApi, ShapeDiverSdkApi } from "@shapediver/sdk.geometry-api-sdk-core";
|
|
3
|
+
export declare class ShapeDiverModelApi extends BaseResourceApi {
|
|
4
|
+
constructor(api: ShapeDiverSdkApi);
|
|
5
|
+
/**
|
|
6
|
+
* Get information about a ShapeDiver Model.
|
|
7
|
+
*
|
|
8
|
+
* @param modelId
|
|
9
|
+
*/
|
|
10
|
+
get(modelId: string): Promise<ShapeDiverResponseDto>;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new ShapeDiver Model.
|
|
13
|
+
*
|
|
14
|
+
* @param body
|
|
15
|
+
*/
|
|
16
|
+
create(body: ShapeDiverRequestModel): Promise<ShapeDiverResponseDto>;
|
|
17
|
+
/**
|
|
18
|
+
* Update properties of a ShapeDiver Model.
|
|
19
|
+
*
|
|
20
|
+
* @param modelId
|
|
21
|
+
* @param body
|
|
22
|
+
*/
|
|
23
|
+
update(modelId: string, body: ShapeDiverRequestModel): Promise<ShapeDiverResponseDto>;
|
|
24
|
+
/**
|
|
25
|
+
* Delete a ShapeDiver Model.
|
|
26
|
+
*
|
|
27
|
+
* @param modelId
|
|
28
|
+
*/
|
|
29
|
+
delete(modelId: string): Promise<ShapeDiverResponseDto>;
|
|
30
|
+
/**
|
|
31
|
+
* Get configurations of the viewer.
|
|
32
|
+
*
|
|
33
|
+
* @param modelId
|
|
34
|
+
*/
|
|
35
|
+
getConfig(modelId: string): Promise<ShapeDiverResponseDto>;
|
|
36
|
+
/**
|
|
37
|
+
* Create viewer configurations.
|
|
38
|
+
*
|
|
39
|
+
* @param modelId
|
|
40
|
+
* @param body
|
|
41
|
+
*/
|
|
42
|
+
createConfig(modelId: string, body: ShapeDiverRequestConfigure): Promise<ShapeDiverResponseDto>;
|
|
43
|
+
/**
|
|
44
|
+
* Update viewer configurations.
|
|
45
|
+
*
|
|
46
|
+
* @param modelId
|
|
47
|
+
* @param body
|
|
48
|
+
*/
|
|
49
|
+
updateConfig(modelId: string, body: ShapeDiverRequestConfigure): Promise<ShapeDiverResponseDto>;
|
|
50
|
+
/**
|
|
51
|
+
* Download the Grasshopper file of the ShapeDiver Model.
|
|
52
|
+
*
|
|
53
|
+
* @param modelId
|
|
54
|
+
*/
|
|
55
|
+
getFile(modelId: string): Promise<ArrayBuffer>;
|
|
56
|
+
/**
|
|
57
|
+
* Set the default parameters for the ShapeDiver Model.
|
|
58
|
+
*
|
|
59
|
+
* @param modelId
|
|
60
|
+
* @param body
|
|
61
|
+
*/
|
|
62
|
+
setDefaultParams(modelId: string, body: ShapeDiverRequestCustomization): Promise<ShapeDiverResponseDto>;
|
|
63
|
+
/**
|
|
64
|
+
* Updates the definitions of the given parameters.
|
|
65
|
+
*
|
|
66
|
+
* @param modelId
|
|
67
|
+
* @param body
|
|
68
|
+
*/
|
|
69
|
+
updateParameterDefinitions(modelId: string, body: ShapeDiverRequestParameterDefinition): Promise<ShapeDiverResponseDto>;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=ShapeDiverModelApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverModelApi.d.ts","sourceRoot":"","sources":["../../src/resources/ShapeDiverModelApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,0BAA0B,EAC1B,8BAA8B,EAC9B,sBAAsB,EACtB,oCAAoC,EACpC,qBAAqB,EACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAgC,MAAM,uCAAuC,CAAA;AAEvH,qBAAa,kBAAmB,SAAQ,eAAe;gBAEtC,GAAG,EAAE,gBAAgB;IAIlC;;;;OAIG;IACG,GAAG,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI3D;;;;OAIG;IACG,MAAM,CAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI3E;;;;;OAKG;IACG,MAAM,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI5F;;;;OAIG;IACG,MAAM,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI9D;;;;OAIG;IACG,SAAS,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIjE;;;;;OAKG;IACG,YAAY,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAItG;;;;;OAKG;IACG,YAAY,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAItG;;;;OAIG;IACG,OAAO,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAQrD;;;;;OAKG;IACG,gBAAgB,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI9G;;;;;OAKG;IACG,0BAA0B,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,oCAAoC,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAIjI"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ShapeDiverModelApi = void 0;
|
|
13
|
+
const sdk_geometry_api_sdk_core_1 = require("@shapediver/sdk.geometry-api-sdk-core");
|
|
14
|
+
class ShapeDiverModelApi extends sdk_geometry_api_sdk_core_1.BaseResourceApi {
|
|
15
|
+
constructor(api) {
|
|
16
|
+
super(api);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get information about a ShapeDiver Model.
|
|
20
|
+
*
|
|
21
|
+
* @param modelId
|
|
22
|
+
*/
|
|
23
|
+
get(modelId) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
return yield this.api.get(this.buildModelUri(modelId));
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create a new ShapeDiver Model.
|
|
30
|
+
*
|
|
31
|
+
* @param body
|
|
32
|
+
*/
|
|
33
|
+
create(body) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return yield this.api.post(this.commonPath, body);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Update properties of a ShapeDiver Model.
|
|
40
|
+
*
|
|
41
|
+
* @param modelId
|
|
42
|
+
* @param body
|
|
43
|
+
*/
|
|
44
|
+
update(modelId, body) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield this.api.put(this.buildModelUri(modelId), body);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Delete a ShapeDiver Model.
|
|
51
|
+
*
|
|
52
|
+
* @param modelId
|
|
53
|
+
*/
|
|
54
|
+
delete(modelId) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
return yield this.api.delete(this.buildModelUri(modelId));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get configurations of the viewer.
|
|
61
|
+
*
|
|
62
|
+
* @param modelId
|
|
63
|
+
*/
|
|
64
|
+
getConfig(modelId) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
return yield this.api.get(this.buildModelUri(modelId) + "/config");
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create viewer configurations.
|
|
71
|
+
*
|
|
72
|
+
* @param modelId
|
|
73
|
+
* @param body
|
|
74
|
+
*/
|
|
75
|
+
createConfig(modelId, body) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
return yield this.api.post(this.buildModelUri(modelId) + "/config", body);
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Update viewer configurations.
|
|
82
|
+
*
|
|
83
|
+
* @param modelId
|
|
84
|
+
* @param body
|
|
85
|
+
*/
|
|
86
|
+
updateConfig(modelId, body) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return yield this.api.patch(this.buildModelUri(modelId) + "/config", body);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Download the Grasshopper file of the ShapeDiver Model.
|
|
93
|
+
*
|
|
94
|
+
* @param modelId
|
|
95
|
+
*/
|
|
96
|
+
getFile(modelId) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return yield this.api.get(this.buildModelUri(modelId) + "/file/download", undefined, sdk_geometry_api_sdk_core_1.ShapeDiverSdkApiResponseType.DATA);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Set the default parameters for the ShapeDiver Model.
|
|
103
|
+
*
|
|
104
|
+
* @param modelId
|
|
105
|
+
* @param body
|
|
106
|
+
*/
|
|
107
|
+
setDefaultParams(modelId, body) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
return yield this.api.patch(this.buildModelUri(modelId) + "/parameter/defval", body);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Updates the definitions of the given parameters.
|
|
114
|
+
*
|
|
115
|
+
* @param modelId
|
|
116
|
+
* @param body
|
|
117
|
+
*/
|
|
118
|
+
updateParameterDefinitions(modelId, body) {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
return yield this.api.patch(this.buildModelUri(modelId) + "/parameter", body);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.ShapeDiverModelApi = ShapeDiverModelApi;
|
|
125
|
+
//# sourceMappingURL=ShapeDiverModelApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverModelApi.js","sourceRoot":"","sources":["../../src/resources/ShapeDiverModelApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAOA,qFAAuH;AAEvH,MAAa,kBAAmB,SAAQ,2CAAe;IAEnD,YAAa,GAAqB;QAC9B,KAAK,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;;;OAIG;IACG,GAAG,CAAE,OAAe;;YACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;QACjF,CAAC;KAAA;IAED;;;;OAIG;IACG,MAAM,CAAE,IAA4B;;YACtC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAwB,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;QAC5E,CAAC;KAAA;IAED;;;;;OAKG;IACG,MAAM,CAAE,OAAe,EAAE,IAA4B;;YACvD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAA;QACvF,CAAC;KAAA;IAED;;;;OAIG;IACG,MAAM,CAAE,OAAe;;YACzB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;QACpF,CAAC;KAAA;IAED;;;;OAIG;IACG,SAAS,CAAE,OAAe;;YAC5B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAA;QAC7F,CAAC;KAAA;IAED;;;;;OAKG;IACG,YAAY,CAAE,OAAe,EAAE,IAAgC;;YACjE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,CAAA;QACpG,CAAC;KAAA;IAED;;;;;OAKG;IACG,YAAY,CAAE,OAAe,EAAE,IAAgC;;YACjE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,CAAA;QACrG,CAAC;KAAA;IAED;;;;OAIG;IACG,OAAO,CAAE,OAAe;;YAC1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACrB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,gBAAgB,EAC9C,SAAS,EACT,wDAA4B,CAAC,IAAI,CACpC,CAAA;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,gBAAgB,CAAE,OAAe,EAAE,IAAoC;;YACzE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,mBAAmB,EAAE,IAAI,CAAC,CAAA;QAC/G,CAAC;KAAA;IAED;;;;;OAKG;IACG,0BAA0B,CAAE,OAAe,EAAE,IAA0C;;YACzF,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,YAAY,EAAE,IAAI,CAAC,CAAA;QACxG,CAAC;KAAA;CAEJ;AAzGD,gDAyGC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ShapeDiverRequestCache, ShapeDiverRequestCustomization, ShapeDiverRequestOutputDefinition, ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
2
|
+
import { BaseResourceApi, ShapeDiverSdkApi } from "@shapediver/sdk.geometry-api-sdk-core";
|
|
3
|
+
export declare class ShapeDiverOutputApi extends BaseResourceApi {
|
|
4
|
+
constructor(api: ShapeDiverSdkApi);
|
|
5
|
+
/**
|
|
6
|
+
* Request a specific version of an output.
|
|
7
|
+
*
|
|
8
|
+
* @param sessionId
|
|
9
|
+
* @param body
|
|
10
|
+
*/
|
|
11
|
+
customize(sessionId: string, body: ShapeDiverRequestCustomization): Promise<ShapeDiverResponseDto>;
|
|
12
|
+
/**
|
|
13
|
+
* Check if a specific version of a requested output has been computed yet.
|
|
14
|
+
*
|
|
15
|
+
* @param sessionId
|
|
16
|
+
* @param body
|
|
17
|
+
*/
|
|
18
|
+
getCache(sessionId: string, body: ShapeDiverRequestCache): Promise<ShapeDiverResponseDto>;
|
|
19
|
+
/**
|
|
20
|
+
* Updates the definitions of the given outputs.
|
|
21
|
+
*
|
|
22
|
+
* @param modelId
|
|
23
|
+
* @param body
|
|
24
|
+
*/
|
|
25
|
+
updateDefinitions(modelId: string, body: ShapeDiverRequestOutputDefinition): Promise<ShapeDiverResponseDto>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=ShapeDiverOutputApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverOutputApi.d.ts","sourceRoot":"","sources":["../../src/resources/ShapeDiverOutputApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,sBAAsB,EACtB,8BAA8B,EAC9B,iCAAiC,EACjC,qBAAqB,EACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEzF,qBAAa,mBAAoB,SAAQ,eAAe;gBAEvC,GAAG,EAAE,gBAAgB;IAIlC;;;;;OAKG;IACG,SAAS,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIzG;;;;;OAKG;IACG,QAAQ,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIhG;;;;;OAKG;IACG,iBAAiB,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAIrH"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ShapeDiverOutputApi = void 0;
|
|
13
|
+
const sdk_geometry_api_sdk_core_1 = require("@shapediver/sdk.geometry-api-sdk-core");
|
|
14
|
+
class ShapeDiverOutputApi extends sdk_geometry_api_sdk_core_1.BaseResourceApi {
|
|
15
|
+
constructor(api) {
|
|
16
|
+
super(api);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Request a specific version of an output.
|
|
20
|
+
*
|
|
21
|
+
* @param sessionId
|
|
22
|
+
* @param body
|
|
23
|
+
*/
|
|
24
|
+
customize(sessionId, body) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.api.put(this.buildSessionUri(sessionId) + "/output", body);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Check if a specific version of a requested output has been computed yet.
|
|
31
|
+
*
|
|
32
|
+
* @param sessionId
|
|
33
|
+
* @param body
|
|
34
|
+
*/
|
|
35
|
+
getCache(sessionId, body) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
return yield this.api.put(this.buildSessionUri(sessionId) + "/output/cache", body);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Updates the definitions of the given outputs.
|
|
42
|
+
*
|
|
43
|
+
* @param modelId
|
|
44
|
+
* @param body
|
|
45
|
+
*/
|
|
46
|
+
updateDefinitions(modelId, body) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return yield this.api.patch(this.buildModelUri(modelId) + "/output", body);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ShapeDiverOutputApi = ShapeDiverOutputApi;
|
|
53
|
+
//# sourceMappingURL=ShapeDiverOutputApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverOutputApi.js","sourceRoot":"","sources":["../../src/resources/ShapeDiverOutputApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,qFAAyF;AAEzF,MAAa,mBAAoB,SAAQ,2CAAe;IAEpD,YAAa,GAAqB;QAC9B,KAAK,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;;;;OAKG;IACG,SAAS,CAAE,SAAiB,EAAE,IAAoC;;YACpE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,CAAA;QACvG,CAAC;KAAA;IAED;;;;;OAKG;IACG,QAAQ,CAAE,SAAiB,EAAE,IAA4B;;YAC3D,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,eAAe,EAAE,IAAI,CAAC,CAAA;QAC7G,CAAC;KAAA;IAED;;;;;OAKG;IACG,iBAAiB,CAAE,OAAe,EAAE,IAAuC;;YAC7E,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,CAAA;QACrG,CAAC;KAAA;CAEJ;AApCD,kDAoCC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ShapeDiverRequestSdtfUpload, ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
2
|
+
import { BaseResourceApi, ShapeDiverSdkApi } from "@shapediver/sdk.geometry-api-sdk-core";
|
|
3
|
+
export declare class ShapeDiverSdtfApi extends BaseResourceApi {
|
|
4
|
+
constructor(api: ShapeDiverSdkApi);
|
|
5
|
+
/**
|
|
6
|
+
* List all sdTF-assets of the given namespace.
|
|
7
|
+
*
|
|
8
|
+
* @param sessionId
|
|
9
|
+
* @param namespace
|
|
10
|
+
*/
|
|
11
|
+
list(sessionId: string, namespace: string): Promise<ShapeDiverResponseDto>;
|
|
12
|
+
/**
|
|
13
|
+
* Download a sdTF-asset.
|
|
14
|
+
*
|
|
15
|
+
* @param sessionId
|
|
16
|
+
* @param sdtfId - Format: "<namespace>/<sdTF id>"
|
|
17
|
+
*/
|
|
18
|
+
get(sessionId: string, sdtfId: string): Promise<ArrayBuffer>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete a sdTF-asset.
|
|
21
|
+
*
|
|
22
|
+
* @param sessionId
|
|
23
|
+
* @param sdtfId
|
|
24
|
+
*/
|
|
25
|
+
delete(sessionId: string, sdtfId: string): Promise<ShapeDiverResponseDto>;
|
|
26
|
+
/**
|
|
27
|
+
* Request an Upload-URL for a sdTF-asset.
|
|
28
|
+
*
|
|
29
|
+
* @param sessionId
|
|
30
|
+
* @param body
|
|
31
|
+
*/
|
|
32
|
+
requestUpload(sessionId: string, body: ShapeDiverRequestSdtfUpload): Promise<ShapeDiverResponseDto>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=ShapeDiverSdtfApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverSdtfApi.d.ts","sourceRoot":"","sources":["../../src/resources/ShapeDiverSdtfApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AACxG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAgC,MAAM,uCAAuC,CAAA;AAEvH,qBAAa,iBAAkB,SAAQ,eAAe;gBAErC,GAAG,EAAE,gBAAgB;IAIlC;;;;;OAKG;IACG,IAAI,CAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIjF;;;;;OAKG;IACG,GAAG,CAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAQnE;;;;;OAKG;IACG,MAAM,CAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIhF;;;;;OAKG;IACG,aAAa,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAI7G"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ShapeDiverSdtfApi = void 0;
|
|
13
|
+
const sdk_geometry_api_sdk_core_1 = require("@shapediver/sdk.geometry-api-sdk-core");
|
|
14
|
+
class ShapeDiverSdtfApi extends sdk_geometry_api_sdk_core_1.BaseResourceApi {
|
|
15
|
+
constructor(api) {
|
|
16
|
+
super(api);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* List all sdTF-assets of the given namespace.
|
|
20
|
+
*
|
|
21
|
+
* @param sessionId
|
|
22
|
+
* @param namespace
|
|
23
|
+
*/
|
|
24
|
+
list(sessionId, namespace) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.api.get(`${this.buildSessionUri(sessionId)}/sdtf/${namespace}/list`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Download a sdTF-asset.
|
|
31
|
+
*
|
|
32
|
+
* @param sessionId
|
|
33
|
+
* @param sdtfId - Format: "<namespace>/<sdTF id>"
|
|
34
|
+
*/
|
|
35
|
+
get(sessionId, sdtfId) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
return yield this.api.get(`${this.buildSessionUri(sessionId)}/sdtf/${sdtfId}`, undefined, sdk_geometry_api_sdk_core_1.ShapeDiverSdkApiResponseType.DATA);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Delete a sdTF-asset.
|
|
42
|
+
*
|
|
43
|
+
* @param sessionId
|
|
44
|
+
* @param sdtfId
|
|
45
|
+
*/
|
|
46
|
+
delete(sessionId, sdtfId) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return yield this.api.delete(`${this.buildSessionUri(sessionId)}/sdtf/${sdtfId}`);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Request an Upload-URL for a sdTF-asset.
|
|
53
|
+
*
|
|
54
|
+
* @param sessionId
|
|
55
|
+
* @param body
|
|
56
|
+
*/
|
|
57
|
+
requestUpload(sessionId, body) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
return yield this.api.post(this.buildSessionUri(sessionId) + "/sdtf/upload", body);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.ShapeDiverSdtfApi = ShapeDiverSdtfApi;
|
|
64
|
+
//# sourceMappingURL=ShapeDiverSdtfApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverSdtfApi.js","sourceRoot":"","sources":["../../src/resources/ShapeDiverSdtfApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qFAAuH;AAEvH,MAAa,iBAAkB,SAAQ,2CAAe;IAElD,YAAa,GAAqB;QAC9B,KAAK,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;;;;OAKG;IACG,IAAI,CAAE,SAAiB,EAAE,SAAiB;;YAC5C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,GAAI,IAAI,CAAC,eAAe,CAAC,SAAS,CAAE,SAAU,SAAU,OAAO,CAAC,CAAA;QACrH,CAAC;KAAA;IAED;;;;;OAKG;IACG,GAAG,CAAE,SAAiB,EAAE,MAAc;;YACxC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CACrB,GAAI,IAAI,CAAC,eAAe,CAAC,SAAS,CAAE,SAAU,MAAO,EAAE,EACvD,SAAS,EACT,wDAA4B,CAAC,IAAI,CACpC,CAAA;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,MAAM,CAAE,SAAiB,EAAE,MAAc;;YAC3C,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAwB,GAAI,IAAI,CAAC,eAAe,CAAC,SAAS,CAAE,SAAU,MAAO,EAAE,CAAC,CAAA;QAChH,CAAC;KAAA;IAED;;;;;OAKG;IACG,aAAa,CAAE,SAAiB,EAAE,IAAiC;;YACrE,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAwB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,cAAc,EAAE,IAAI,CAAC,CAAA;QAC7G,CAAC;KAAA;CAEJ;AAlDD,8CAkDC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ShapeDiverRequestTicket, ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
2
|
+
import { BaseResourceApi, ShapeDiverSdkApi } from "@shapediver/sdk.geometry-api-sdk-core";
|
|
3
|
+
export declare class ShapeDiverSessionApi extends BaseResourceApi {
|
|
4
|
+
constructor(api: ShapeDiverSdkApi);
|
|
5
|
+
/**
|
|
6
|
+
* Create a new ticket that allows to initialize new sessions for the
|
|
7
|
+
* specified model.
|
|
8
|
+
*
|
|
9
|
+
* @param modelId
|
|
10
|
+
* @param body
|
|
11
|
+
*/
|
|
12
|
+
ticket(modelId: string, body: ShapeDiverRequestTicket): Promise<ShapeDiverResponseDto>;
|
|
13
|
+
/**
|
|
14
|
+
* Create a new session for a ShapeDiver Model.
|
|
15
|
+
*
|
|
16
|
+
* @param ticket
|
|
17
|
+
*/
|
|
18
|
+
init(ticket: string): Promise<ShapeDiverResponseDto>;
|
|
19
|
+
/**
|
|
20
|
+
* Get the full description of a ShapeDiver Model.
|
|
21
|
+
*
|
|
22
|
+
* @param sessionId
|
|
23
|
+
*/
|
|
24
|
+
default(sessionId: string): Promise<ShapeDiverResponseDto>;
|
|
25
|
+
/**
|
|
26
|
+
* Close the specified session.
|
|
27
|
+
*
|
|
28
|
+
* @param sessionId
|
|
29
|
+
*/
|
|
30
|
+
close(sessionId: string): Promise<ShapeDiverResponseDto>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ShapeDiverSessionApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverSessionApi.d.ts","sourceRoot":"","sources":["../../src/resources/ShapeDiverSessionApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AACpG,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEzF,qBAAa,oBAAqB,SAAQ,eAAe;gBAExC,GAAG,EAAE,gBAAgB;IAIlC;;;;;;OAMG;IACG,MAAM,CAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI7F;;;;OAIG;IACG,IAAI,CAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI3D;;;;OAIG;IACG,OAAO,CAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIjE;;;;OAIG;IACG,KAAK,CAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAIlE"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ShapeDiverSessionApi = void 0;
|
|
13
|
+
const sdk_geometry_api_sdk_core_1 = require("@shapediver/sdk.geometry-api-sdk-core");
|
|
14
|
+
class ShapeDiverSessionApi extends sdk_geometry_api_sdk_core_1.BaseResourceApi {
|
|
15
|
+
constructor(api) {
|
|
16
|
+
super(api);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Create a new ticket that allows to initialize new sessions for the
|
|
20
|
+
* specified model.
|
|
21
|
+
*
|
|
22
|
+
* @param modelId
|
|
23
|
+
* @param body
|
|
24
|
+
*/
|
|
25
|
+
ticket(modelId, body) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
return yield this.api.post(this.buildModelUri(modelId) + "/ticket", body);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create a new session for a ShapeDiver Model.
|
|
32
|
+
*
|
|
33
|
+
* @param ticket
|
|
34
|
+
*/
|
|
35
|
+
init(ticket) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
return yield this.api.post(this.buildTicketUri(ticket));
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the full description of a ShapeDiver Model.
|
|
42
|
+
*
|
|
43
|
+
* @param sessionId
|
|
44
|
+
*/
|
|
45
|
+
default(sessionId) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return yield this.api.get(this.buildSessionUri(sessionId) + "/default");
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Close the specified session.
|
|
52
|
+
*
|
|
53
|
+
* @param sessionId
|
|
54
|
+
*/
|
|
55
|
+
close(sessionId) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
return yield this.api.post(this.buildSessionUri(sessionId) + "/close");
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.ShapeDiverSessionApi = ShapeDiverSessionApi;
|
|
62
|
+
//# sourceMappingURL=ShapeDiverSessionApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverSessionApi.js","sourceRoot":"","sources":["../../src/resources/ShapeDiverSessionApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qFAAyF;AAEzF,MAAa,oBAAqB,SAAQ,2CAAe;IAErD,YAAa,GAAqB;QAC9B,KAAK,CAAC,GAAG,CAAC,CAAA;IACd,CAAC;IAED;;;;;;OAMG;IACG,MAAM,CAAE,OAAe,EAAE,IAA6B;;YACxD,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAwB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,CAAA;QACpG,CAAC;KAAA;IAED;;;;OAIG;IACG,IAAI,CAAE,MAAc;;YACtB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAwB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAA;QAClF,CAAC;KAAA;IAED;;;;OAIG;IACG,OAAO,CAAE,SAAiB;;YAC5B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAwB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,CAAA;QAClG,CAAC;KAAA;IAED;;;;OAIG;IACG,KAAK,CAAE,SAAiB;;YAC1B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAwB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAA;QACjG,CAAC;KAAA;CAEJ;AA5CD,oDA4CC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ShapeDiverRequestAuthorizationGroup, ShapeDiverRequestLogMessage, ShapeDiverResponseDto } from "@shapediver/api.geometry-api-dto-v2";
|
|
2
|
+
import { BaseResourceApi, ShapeDiverSdkApi } from "@shapediver/sdk.geometry-api-sdk-core";
|
|
3
|
+
export declare class ShapeDiverSystemApi extends BaseResourceApi {
|
|
4
|
+
constructor(api: ShapeDiverSdkApi);
|
|
5
|
+
/**
|
|
6
|
+
* Log the specified message.
|
|
7
|
+
*
|
|
8
|
+
* @param sessionId
|
|
9
|
+
* @param body
|
|
10
|
+
*/
|
|
11
|
+
log(sessionId: string, body: ShapeDiverRequestLogMessage): Promise<ShapeDiverResponseDto>;
|
|
12
|
+
/**
|
|
13
|
+
* Remove a model with all it's components.
|
|
14
|
+
*
|
|
15
|
+
* **WARNING: This operation cannot be undone!**
|
|
16
|
+
*
|
|
17
|
+
* @param modelId
|
|
18
|
+
*/
|
|
19
|
+
pruneModel(modelId: string): Promise<ShapeDiverResponseDto>;
|
|
20
|
+
/**
|
|
21
|
+
* Decrypt the given ticket.
|
|
22
|
+
*
|
|
23
|
+
* @param ticket
|
|
24
|
+
*/
|
|
25
|
+
decryptTicket(ticket: string): Promise<ShapeDiverResponseDto>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new authentication group.
|
|
28
|
+
*
|
|
29
|
+
* @param body
|
|
30
|
+
*/
|
|
31
|
+
authGroup(body: ShapeDiverRequestAuthorizationGroup): Promise<ShapeDiverResponseDto>;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=ShapeDiverSystemApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShapeDiverSystemApi.d.ts","sourceRoot":"","sources":["../../src/resources/ShapeDiverSystemApi.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mCAAmC,EACnC,2BAA2B,EAC3B,qBAAqB,EACxB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AAEzF,qBAAa,mBAAoB,SAAQ,eAAe;gBAEvC,GAAG,EAAE,gBAAgB;IAIlC;;;;;OAKG;IACG,GAAG,CAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIhG;;;;;;OAMG;IACG,UAAU,CAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIlE;;;;OAIG;IACG,aAAa,CAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAIpE;;;;OAIG;IACG,SAAS,CAAE,IAAI,EAAE,mCAAmC,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAI9F"}
|