@shapediver/sdk.geometry-api-sdk-v2 1.8.3 → 1.9.1
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/dist/ShapeDiverErrors.d.ts.map +1 -1
- package/dist/ShapeDiverErrors.js +1 -1
- package/dist/ShapeDiverErrors.js.map +1 -1
- package/dist/ShapeDiverSdk.d.ts.map +1 -1
- package/dist/ShapeDiverSdk.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/ShapeDiverAnalyticsApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverAnalyticsApi.js +3 -1
- package/dist/resources/ShapeDiverAnalyticsApi.js.map +1 -1
- package/dist/resources/ShapeDiverArSceneApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverArSceneApi.js.map +1 -1
- package/dist/resources/ShapeDiverAssetApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverAssetApi.js.map +1 -1
- package/dist/resources/ShapeDiverExportApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverExportApi.js.map +1 -1
- package/dist/resources/ShapeDiverFileApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverFileApi.js +4 -8
- package/dist/resources/ShapeDiverFileApi.js.map +1 -1
- package/dist/resources/ShapeDiverGltfApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverGltfApi.js +4 -1
- package/dist/resources/ShapeDiverGltfApi.js.map +1 -1
- package/dist/resources/ShapeDiverModelApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverModelApi.js +52 -15
- package/dist/resources/ShapeDiverModelApi.js.map +1 -1
- package/dist/resources/ShapeDiverOutputApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverOutputApi.js +12 -4
- package/dist/resources/ShapeDiverOutputApi.js.map +1 -1
- package/dist/resources/ShapeDiverSdtfApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverSdtfApi.js +9 -3
- package/dist/resources/ShapeDiverSdtfApi.js.map +1 -1
- package/dist/resources/ShapeDiverSessionApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverSessionApi.js +3 -1
- package/dist/resources/ShapeDiverSessionApi.js.map +1 -1
- package/dist/resources/ShapeDiverSystemApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverSystemApi.js +18 -6
- package/dist/resources/ShapeDiverSystemApi.js.map +1 -1
- package/dist/resources/ShapeDiverTextureApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverTextureApi.js +3 -1
- package/dist/resources/ShapeDiverTextureApi.js.map +1 -1
- package/dist/resources/ShapeDiverUtilsApi.d.ts +3 -5
- package/dist/resources/ShapeDiverUtilsApi.d.ts.map +1 -1
- package/dist/resources/ShapeDiverUtilsApi.js +32 -15
- package/dist/resources/ShapeDiverUtilsApi.js.map +1 -1
- package/dist/utils/utils.d.ts +3 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +35 -9
- package/dist/utils/utils.js.map +1 -1
- package/package.json +2 -2
- package/src/ShapeDiverErrors.ts +24 -23
- package/src/ShapeDiverSdk.ts +110 -109
- package/src/index.ts +15 -16
- package/src/resources/ShapeDiverAnalyticsApi.ts +30 -18
- package/src/resources/ShapeDiverArSceneApi.ts +68 -69
- package/src/resources/ShapeDiverAssetApi.ts +207 -183
- package/src/resources/ShapeDiverExportApi.ts +92 -77
- package/src/resources/ShapeDiverFileApi.ts +127 -108
- package/src/resources/ShapeDiverGltfApi.ts +41 -30
- package/src/resources/ShapeDiverModelApi.ts +351 -240
- package/src/resources/ShapeDiverOutputApi.ts +92 -56
- package/src/resources/ShapeDiverSdtfApi.ts +88 -54
- package/src/resources/ShapeDiverSessionApi.ts +104 -82
- package/src/resources/ShapeDiverSystemApi.ts +106 -70
- package/src/resources/ShapeDiverTextureApi.ts +24 -18
- package/src/resources/ShapeDiverUtilsApi.ts +294 -231
- package/src/utils/utils.ts +100 -54
|
@@ -1,64 +1,100 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@shapediver/api.geometry-api-dto-v2"
|
|
7
|
-
import {
|
|
8
|
-
|
|
2
|
+
ShapeDiverRequestCache,
|
|
3
|
+
ShapeDiverRequestCustomization,
|
|
4
|
+
ShapeDiverRequestOutputDefinition,
|
|
5
|
+
ShapeDiverResponseDto,
|
|
6
|
+
} from "@shapediver/api.geometry-api-dto-v2";
|
|
7
|
+
import {
|
|
8
|
+
BaseResourceApi,
|
|
9
|
+
ShapeDiverSdkApi,
|
|
10
|
+
} from "@shapediver/sdk.geometry-api-sdk-core";
|
|
11
|
+
import { sendRequest } from "../utils/utils";
|
|
9
12
|
|
|
10
13
|
export class ShapeDiverOutputApi extends BaseResourceApi {
|
|
14
|
+
constructor(api: ShapeDiverSdkApi) {
|
|
15
|
+
super(api);
|
|
16
|
+
}
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* @param body
|
|
33
|
-
*/
|
|
34
|
-
async getCache (sessionId: string, body: ShapeDiverRequestCache): Promise<ShapeDiverResponseDto> {
|
|
35
|
-
return await sendRequest(async () =>
|
|
36
|
-
(await this.api.put<ShapeDiverResponseDto>(this.buildSessionUri(sessionId) + "/output/cache", body))[1],
|
|
37
|
-
)
|
|
38
|
-
}
|
|
18
|
+
/**
|
|
19
|
+
* Request a specific version of an output.
|
|
20
|
+
*
|
|
21
|
+
* @param sessionId
|
|
22
|
+
* @param body
|
|
23
|
+
*/
|
|
24
|
+
async customize(
|
|
25
|
+
sessionId: string,
|
|
26
|
+
body: ShapeDiverRequestCustomization,
|
|
27
|
+
): Promise<ShapeDiverResponseDto> {
|
|
28
|
+
return await sendRequest(
|
|
29
|
+
async () =>
|
|
30
|
+
(
|
|
31
|
+
await this.api.put<ShapeDiverResponseDto>(
|
|
32
|
+
this.buildSessionUri(sessionId) + "/output",
|
|
33
|
+
body,
|
|
34
|
+
)
|
|
35
|
+
)[1],
|
|
36
|
+
);
|
|
37
|
+
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Check if a specific version of a requested output has been computed yet.
|
|
41
|
+
*
|
|
42
|
+
* @param sessionId
|
|
43
|
+
* @param body
|
|
44
|
+
*/
|
|
45
|
+
async getCache(
|
|
46
|
+
sessionId: string,
|
|
47
|
+
body: ShapeDiverRequestCache,
|
|
48
|
+
): Promise<ShapeDiverResponseDto> {
|
|
49
|
+
return await sendRequest(
|
|
50
|
+
async () =>
|
|
51
|
+
(
|
|
52
|
+
await this.api.put<ShapeDiverResponseDto>(
|
|
53
|
+
this.buildSessionUri(sessionId) + "/output/cache",
|
|
54
|
+
body,
|
|
55
|
+
)
|
|
56
|
+
)[1],
|
|
57
|
+
);
|
|
58
|
+
}
|
|
51
59
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Updates the definitions of the given outputs.
|
|
62
|
+
*
|
|
63
|
+
* @param modelId
|
|
64
|
+
* @param body
|
|
65
|
+
*/
|
|
66
|
+
async updateDefinitions(
|
|
67
|
+
modelId: string,
|
|
68
|
+
body: ShapeDiverRequestOutputDefinition,
|
|
69
|
+
): Promise<ShapeDiverResponseDto> {
|
|
70
|
+
return await sendRequest(
|
|
71
|
+
async () =>
|
|
72
|
+
(
|
|
73
|
+
await this.api.patch<ShapeDiverResponseDto>(
|
|
74
|
+
this.buildModelUri(modelId) + "/output",
|
|
75
|
+
body,
|
|
76
|
+
)
|
|
77
|
+
)[1],
|
|
78
|
+
);
|
|
79
|
+
}
|
|
63
80
|
|
|
81
|
+
/**
|
|
82
|
+
* List all cached versions of the specified output.
|
|
83
|
+
*
|
|
84
|
+
* @param sessionId
|
|
85
|
+
* @param outputId
|
|
86
|
+
*/
|
|
87
|
+
async listVersions(
|
|
88
|
+
sessionId: string,
|
|
89
|
+
outputId: string,
|
|
90
|
+
): Promise<ShapeDiverResponseDto> {
|
|
91
|
+
return await sendRequest(
|
|
92
|
+
async () =>
|
|
93
|
+
(
|
|
94
|
+
await this.api.get<ShapeDiverResponseDto>(
|
|
95
|
+
this.buildSessionUri(sessionId) + "/output/" + outputId + "/list",
|
|
96
|
+
)
|
|
97
|
+
)[1],
|
|
98
|
+
);
|
|
99
|
+
}
|
|
64
100
|
}
|
|
@@ -1,61 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
ShapeDiverRequestSdtfUpload,
|
|
3
|
+
ShapeDiverResponseDto,
|
|
4
|
+
} from "@shapediver/api.geometry-api-dto-v2";
|
|
5
|
+
import {
|
|
6
|
+
BaseResourceApi,
|
|
7
|
+
ShapeDiverSdkApi,
|
|
8
|
+
ShapeDiverSdkApiResponseType,
|
|
9
|
+
} from "@shapediver/sdk.geometry-api-sdk-core";
|
|
10
|
+
import { sendRequest } from "../utils/utils";
|
|
4
11
|
|
|
5
12
|
export class ShapeDiverSdtfApi extends BaseResourceApi {
|
|
13
|
+
constructor(api: ShapeDiverSdkApi) {
|
|
14
|
+
super(api);
|
|
15
|
+
}
|
|
6
16
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
17
|
+
/**
|
|
18
|
+
* List all sdTF-assets of the given namespace.
|
|
19
|
+
*
|
|
20
|
+
* @param sessionId
|
|
21
|
+
* @param namespace
|
|
22
|
+
*/
|
|
23
|
+
async list(
|
|
24
|
+
sessionId: string,
|
|
25
|
+
namespace: string,
|
|
26
|
+
): Promise<ShapeDiverResponseDto> {
|
|
27
|
+
return await sendRequest(
|
|
28
|
+
async () =>
|
|
29
|
+
(
|
|
30
|
+
await this.api.get<ShapeDiverResponseDto>(
|
|
31
|
+
`${this.buildSessionUri(sessionId)}/sdtf/${namespace}/list`,
|
|
32
|
+
)
|
|
33
|
+
)[1],
|
|
34
|
+
);
|
|
35
|
+
}
|
|
10
36
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Download a sdTF-asset.
|
|
39
|
+
*
|
|
40
|
+
* @param sessionId
|
|
41
|
+
* @param sdtfId - Format: "<namespace>/<sdTF id>"
|
|
42
|
+
*/
|
|
43
|
+
async get(sessionId: string, sdtfId: string): Promise<ArrayBuffer> {
|
|
44
|
+
return await sendRequest(
|
|
45
|
+
async () =>
|
|
46
|
+
(
|
|
47
|
+
await this.api.get<ArrayBuffer>(
|
|
48
|
+
`${this.buildSessionUri(sessionId)}/sdtf/${sdtfId}`,
|
|
49
|
+
{ responseType: ShapeDiverSdkApiResponseType.DATA },
|
|
50
|
+
)
|
|
51
|
+
)[1],
|
|
52
|
+
);
|
|
53
|
+
}
|
|
21
54
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
* @param sdtfId
|
|
42
|
-
*/
|
|
43
|
-
async delete (sessionId: string, sdtfId: string): Promise<ShapeDiverResponseDto> {
|
|
44
|
-
return await sendRequest(async () =>
|
|
45
|
-
(await this.api.delete<ShapeDiverResponseDto>(`${ this.buildSessionUri(sessionId) }/sdtf/${ sdtfId }`))[1],
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Request an Upload-URL for a sdTF-asset.
|
|
51
|
-
*
|
|
52
|
-
* @param sessionId
|
|
53
|
-
* @param body
|
|
54
|
-
*/
|
|
55
|
-
async requestUpload (sessionId: string, body: ShapeDiverRequestSdtfUpload): Promise<ShapeDiverResponseDto> {
|
|
56
|
-
return await sendRequest(async () =>
|
|
57
|
-
(await this.api.post<ShapeDiverResponseDto>(this.buildSessionUri(sessionId) + "/sdtf/upload", body))[1],
|
|
58
|
-
)
|
|
59
|
-
}
|
|
55
|
+
/**
|
|
56
|
+
* Delete a sdTF-asset.
|
|
57
|
+
*
|
|
58
|
+
* @param sessionId
|
|
59
|
+
* @param sdtfId
|
|
60
|
+
*/
|
|
61
|
+
async delete(
|
|
62
|
+
sessionId: string,
|
|
63
|
+
sdtfId: string,
|
|
64
|
+
): Promise<ShapeDiverResponseDto> {
|
|
65
|
+
return await sendRequest(
|
|
66
|
+
async () =>
|
|
67
|
+
(
|
|
68
|
+
await this.api.delete<ShapeDiverResponseDto>(
|
|
69
|
+
`${this.buildSessionUri(sessionId)}/sdtf/${sdtfId}`,
|
|
70
|
+
)
|
|
71
|
+
)[1],
|
|
72
|
+
);
|
|
73
|
+
}
|
|
60
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Request an Upload-URL for a sdTF-asset.
|
|
77
|
+
*
|
|
78
|
+
* @param sessionId
|
|
79
|
+
* @param body
|
|
80
|
+
*/
|
|
81
|
+
async requestUpload(
|
|
82
|
+
sessionId: string,
|
|
83
|
+
body: ShapeDiverRequestSdtfUpload,
|
|
84
|
+
): Promise<ShapeDiverResponseDto> {
|
|
85
|
+
return await sendRequest(
|
|
86
|
+
async () =>
|
|
87
|
+
(
|
|
88
|
+
await this.api.post<ShapeDiverResponseDto>(
|
|
89
|
+
this.buildSessionUri(sessionId) + "/sdtf/upload",
|
|
90
|
+
body,
|
|
91
|
+
)
|
|
92
|
+
)[1],
|
|
93
|
+
);
|
|
94
|
+
}
|
|
61
95
|
}
|
|
@@ -1,91 +1,113 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@shapediver/api.geometry-api-dto-v2"
|
|
7
|
-
import {
|
|
8
|
-
|
|
2
|
+
ShapeDiverRequestCustomization,
|
|
3
|
+
ShapeDiverRequestExport,
|
|
4
|
+
ShapeDiverRequestTicket,
|
|
5
|
+
ShapeDiverResponseDto,
|
|
6
|
+
} from "@shapediver/api.geometry-api-dto-v2";
|
|
7
|
+
import {
|
|
8
|
+
BaseResourceApi,
|
|
9
|
+
ShapeDiverSdkApi,
|
|
10
|
+
} from "@shapediver/sdk.geometry-api-sdk-core";
|
|
11
|
+
import { sendRequest } from "../utils/utils";
|
|
9
12
|
|
|
10
13
|
export class ShapeDiverSessionApi extends BaseResourceApi {
|
|
14
|
+
constructor(api: ShapeDiverSdkApi) {
|
|
15
|
+
super(api);
|
|
16
|
+
}
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* Create a new session for a ShapeDiver Model via a ticket.
|
|
34
|
-
*
|
|
35
|
-
* @param ticket
|
|
36
|
-
* @param request - Optional customization or export request.
|
|
37
|
-
*/
|
|
38
|
-
async init(
|
|
39
|
-
ticket: string,
|
|
40
|
-
request?: ShapeDiverRequestCustomization | ShapeDiverRequestExport,
|
|
41
|
-
): Promise<ShapeDiverResponseDto> {
|
|
42
|
-
return await sendRequest(async () =>
|
|
43
|
-
(await this.api.post<ShapeDiverResponseDto>(this.buildTicketUri(ticket), request))[1],
|
|
44
|
-
)
|
|
45
|
-
}
|
|
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
|
+
async ticket(
|
|
26
|
+
modelId: string,
|
|
27
|
+
body: ShapeDiverRequestTicket,
|
|
28
|
+
): Promise<ShapeDiverResponseDto> {
|
|
29
|
+
return await sendRequest(
|
|
30
|
+
async () =>
|
|
31
|
+
(
|
|
32
|
+
await this.api.post<ShapeDiverResponseDto>(
|
|
33
|
+
this.buildModelUri(modelId) + "/ticket",
|
|
34
|
+
body,
|
|
35
|
+
)
|
|
36
|
+
)[1],
|
|
37
|
+
);
|
|
38
|
+
}
|
|
46
39
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Create a new session for a ShapeDiver Model via a ticket.
|
|
42
|
+
*
|
|
43
|
+
* @param ticket
|
|
44
|
+
* @param request - Optional customization or export request.
|
|
45
|
+
*/
|
|
46
|
+
async init(
|
|
47
|
+
ticket: string,
|
|
48
|
+
request?: ShapeDiverRequestCustomization | ShapeDiverRequestExport,
|
|
49
|
+
): Promise<ShapeDiverResponseDto> {
|
|
50
|
+
return await sendRequest(
|
|
51
|
+
async () =>
|
|
52
|
+
(
|
|
53
|
+
await this.api.post<ShapeDiverResponseDto>(
|
|
54
|
+
this.buildTicketUri(ticket),
|
|
55
|
+
request,
|
|
56
|
+
)
|
|
57
|
+
)[1],
|
|
58
|
+
);
|
|
59
|
+
}
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Create a new session for a ShapeDiver Model.
|
|
63
|
+
*
|
|
64
|
+
* @param ticket
|
|
65
|
+
* @param request - Optional customization or export request.
|
|
66
|
+
*/
|
|
67
|
+
async initForModel(
|
|
68
|
+
modelId: string,
|
|
69
|
+
request?: ShapeDiverRequestCustomization | ShapeDiverRequestExport,
|
|
70
|
+
): Promise<ShapeDiverResponseDto> {
|
|
71
|
+
return await sendRequest(
|
|
72
|
+
async () =>
|
|
73
|
+
(
|
|
74
|
+
await this.api.post<ShapeDiverResponseDto>(
|
|
75
|
+
this.buildModelUri(modelId) + "/session",
|
|
76
|
+
request,
|
|
77
|
+
)
|
|
78
|
+
)[1],
|
|
79
|
+
);
|
|
80
|
+
}
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
/**
|
|
83
|
+
* Get the full description of a ShapeDiver Model.
|
|
84
|
+
*
|
|
85
|
+
* @param sessionId
|
|
86
|
+
*/
|
|
87
|
+
async default(sessionId: string): Promise<ShapeDiverResponseDto> {
|
|
88
|
+
return await sendRequest(
|
|
89
|
+
async () =>
|
|
90
|
+
(
|
|
91
|
+
await this.api.get<ShapeDiverResponseDto>(
|
|
92
|
+
this.buildSessionUri(sessionId) + "/default",
|
|
93
|
+
)
|
|
94
|
+
)[1],
|
|
95
|
+
);
|
|
96
|
+
}
|
|
90
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Close the specified session.
|
|
100
|
+
*
|
|
101
|
+
* @param sessionId
|
|
102
|
+
*/
|
|
103
|
+
async close(sessionId: string): Promise<ShapeDiverResponseDto> {
|
|
104
|
+
return await sendRequest(
|
|
105
|
+
async () =>
|
|
106
|
+
(
|
|
107
|
+
await this.api.post<ShapeDiverResponseDto>(
|
|
108
|
+
this.buildSessionUri(sessionId) + "/close",
|
|
109
|
+
)
|
|
110
|
+
)[1],
|
|
111
|
+
);
|
|
112
|
+
}
|
|
91
113
|
}
|