@shapediver/viewer.session-engine.session-engine 2.12.8 → 3.0.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/implementation/OutputDelayException.js +1 -1
- package/dist/implementation/OutputDelayException.js.map +1 -1
- package/dist/implementation/OutputLoader.d.ts +9 -7
- package/dist/implementation/OutputLoader.d.ts.map +1 -1
- package/dist/implementation/OutputLoader.js +56 -41
- package/dist/implementation/OutputLoader.js.map +1 -1
- package/dist/implementation/SessionData.d.ts +1 -1
- package/dist/implementation/SessionData.d.ts.map +1 -1
- package/dist/implementation/SessionData.js +2 -2
- package/dist/implementation/SessionData.js.map +1 -1
- package/dist/implementation/SessionEngine.d.ts +30 -3
- package/dist/implementation/SessionEngine.d.ts.map +1 -1
- package/dist/implementation/SessionEngine.js +115 -48
- package/dist/implementation/SessionEngine.js.map +1 -1
- package/dist/implementation/SessionOutputData.d.ts +1 -1
- package/dist/implementation/SessionOutputData.d.ts.map +1 -1
- package/dist/implementation/SessionOutputData.js +2 -2
- package/dist/implementation/SessionOutputData.js.map +1 -1
- package/dist/implementation/SessionTreeNode.d.ts +1 -1
- package/dist/implementation/SessionTreeNode.d.ts.map +1 -1
- package/dist/implementation/SessionTreeNode.js +1 -1
- package/dist/implementation/SessionTreeNode.js.map +1 -1
- package/dist/implementation/dto/Export.d.ts +4 -4
- package/dist/implementation/dto/Export.d.ts.map +1 -1
- package/dist/implementation/dto/Export.js +2 -2
- package/dist/implementation/dto/Export.js.map +1 -1
- package/dist/implementation/dto/FileParameter.d.ts +2 -2
- package/dist/implementation/dto/FileParameter.d.ts.map +1 -1
- package/dist/implementation/dto/FileParameter.js +69 -31
- package/dist/implementation/dto/FileParameter.js.map +1 -1
- package/dist/implementation/dto/Output.js +2 -2
- package/dist/implementation/dto/Output.js.map +1 -1
- package/dist/implementation/dto/Parameter.d.ts +6 -6
- package/dist/implementation/dto/Parameter.d.ts.map +1 -1
- package/dist/implementation/dto/Parameter.js +106 -87
- package/dist/implementation/dto/Parameter.js.map +1 -1
- package/dist/index.d.ts +9 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/dist/interfaces/ISessionData.d.ts +2 -2
- package/dist/interfaces/ISessionData.d.ts.map +1 -1
- package/dist/interfaces/ISessionEngine.d.ts +11 -46
- package/dist/interfaces/ISessionEngine.d.ts.map +1 -1
- package/dist/interfaces/ISessionEngine.js +0 -4
- package/dist/interfaces/ISessionEngine.js.map +1 -1
- package/dist/interfaces/ISessionOutputData.d.ts +2 -2
- package/dist/interfaces/ISessionOutputData.d.ts.map +1 -1
- package/dist/interfaces/ISessionTreeNode.d.ts +1 -1
- package/dist/interfaces/dto/IExport.d.ts +2 -2
- package/dist/interfaces/dto/IExport.d.ts.map +1 -1
- package/dist/interfaces/dto/IFileParameter.d.ts +1 -1
- package/dist/interfaces/dto/IFileParameter.d.ts.map +1 -1
- package/dist/interfaces/dto/IOutput.d.ts +13 -13
- package/dist/interfaces/dto/IOutput.d.ts.map +1 -1
- package/dist/interfaces/dto/IOutput.js +1 -0
- package/dist/interfaces/dto/IOutput.js.map +1 -1
- package/dist/interfaces/dto/IParameter.d.ts +3 -3
- package/dist/interfaces/dto/IParameter.d.ts.map +1 -1
- package/package.json +9 -10
- package/src/implementation/OutputDelayException.ts +3 -3
- package/src/implementation/OutputLoader.ts +139 -104
- package/src/implementation/SessionData.ts +9 -9
- package/src/implementation/SessionEngine.ts +133 -53
- package/src/implementation/SessionOutputData.ts +8 -8
- package/src/implementation/SessionTreeNode.ts +8 -5
- package/src/implementation/dto/Export.ts +24 -11
- package/src/implementation/dto/FileParameter.ts +72 -37
- package/src/implementation/dto/Output.ts +2 -2
- package/src/implementation/dto/Parameter.ts +115 -85
- package/src/index.ts +17 -21
- package/src/interfaces/ISessionData.ts +2 -2
- package/src/interfaces/ISessionEngine.ts +19 -60
- package/src/interfaces/ISessionOutputData.ts +2 -2
- package/src/interfaces/ISessionTreeNode.ts +1 -1
- package/src/interfaces/dto/IExport.ts +4 -4
- package/src/interfaces/dto/IFileParameter.ts +2 -2
- package/src/interfaces/dto/IOutput.ts +38 -26
- package/src/interfaces/dto/IParameter.ts +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree';
|
|
2
|
+
import { ShapeDiverResponseOutput } from '@shapediver/sdk.geometry-api-sdk-v2';
|
|
3
3
|
|
|
4
4
|
export interface ISessionOutputData extends ITreeNodeData {
|
|
5
5
|
// #region Properties (1)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShapeDiverResponseExport } from
|
|
1
|
+
import { ShapeDiverResponseExport } from '@shapediver/sdk.geometry-api-sdk-v2';
|
|
2
2
|
|
|
3
3
|
export interface IExport extends ShapeDiverResponseExport {
|
|
4
4
|
// #region Properties (1)
|
|
@@ -7,11 +7,11 @@ export interface IExport extends ShapeDiverResponseExport {
|
|
|
7
7
|
|
|
8
8
|
// #endregion Properties (1)
|
|
9
9
|
|
|
10
|
-
// #region Public Methods (
|
|
10
|
+
// #region Public Methods (3)
|
|
11
11
|
|
|
12
|
-
request(parameters?: { [key: string]:
|
|
12
|
+
request(parameters?: { [key: string]: unknown }): Promise<ShapeDiverResponseExport>;
|
|
13
13
|
updateExport(): void;
|
|
14
14
|
updateExportDefinition(exportDef: ShapeDiverResponseExport): void;
|
|
15
15
|
|
|
16
|
-
// #endregion Public Methods (
|
|
16
|
+
// #endregion Public Methods (3)
|
|
17
17
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IParameter } from './IParameter'
|
|
1
|
+
import { IParameter } from './IParameter';
|
|
2
2
|
|
|
3
3
|
export interface IFileParameter extends IParameter<File | Blob | string> {
|
|
4
4
|
// #region Public Methods (2)
|
|
5
5
|
|
|
6
6
|
getFilename(fileId?: string): Promise<string | undefined>;
|
|
7
|
-
upload(): Promise<string>;
|
|
7
|
+
upload(v?: File | Blob | string): Promise<string>;
|
|
8
8
|
|
|
9
9
|
// #endregion Public Methods (2)
|
|
10
10
|
}
|
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
IAnchor,
|
|
3
|
+
IMaterialContentData,
|
|
4
|
+
IMaterialContentDataV1,
|
|
5
|
+
IMaterialContentDataV2,
|
|
6
|
+
IMaterialContentDataV3,
|
|
7
|
+
ITag2D,
|
|
8
|
+
ITag3D
|
|
9
|
+
} from '@shapediver/viewer.data-engine.shared-types';
|
|
3
10
|
import { ITreeNode } from '@shapediver/viewer.shared.node-tree';
|
|
11
|
+
import { ShapeDiverResponseOutput, ShapeDiverResponseOutputChunk as ShapeDiverResponseOutputChunkBackend, ShapeDiverResponseOutputContent as ShapeDiverResponseOutputContentBackend } from '@shapediver/sdk.geometry-api-sdk-v2';
|
|
4
12
|
|
|
5
|
-
|
|
6
|
-
* Extension of the ShapeDiverResponseOutputContent as the viewer already creates types for them
|
|
7
|
-
*/
|
|
8
|
-
export interface ShapeDiverResponseOutputContent extends ShapeDiverResponseOutputContentBackend {
|
|
9
|
-
// #region Properties (1)
|
|
13
|
+
// #region Interfaces (3)
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
export interface IOutput extends ShapeDiverResponseOutput {
|
|
16
|
+
// #region Properties (4)
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
readonly node?: ITreeNode;
|
|
19
|
+
|
|
20
|
+
format: string[];
|
|
21
|
+
freeze: boolean;
|
|
22
|
+
updateCallback: ((newNode?: ITreeNode, oldNode?: ITreeNode) => void) | null;
|
|
23
|
+
|
|
24
|
+
// #endregion Properties (4)
|
|
25
|
+
|
|
26
|
+
// #region Public Methods (4)
|
|
27
|
+
|
|
28
|
+
triggerUpdateCallback(newNode?: ITreeNode, oldNode?: ITreeNode): void;
|
|
29
|
+
updateOutput(newNode?: ITreeNode, oldNode?: ITreeNode): void;
|
|
30
|
+
updateOutputContent(content: ShapeDiverResponseOutputContent[], preventUpdate?: boolean, waitForViewportUpdate?: boolean): Promise<ITreeNode | undefined>;
|
|
31
|
+
updateOutputDefinition(outputDef: ShapeDiverResponseOutput): void;
|
|
32
|
+
|
|
33
|
+
// #endregion Public Methods (4)
|
|
14
34
|
}
|
|
15
35
|
|
|
16
36
|
/**
|
|
@@ -24,23 +44,15 @@ export interface ShapeDiverResponseOutputChunk extends ShapeDiverResponseOutputC
|
|
|
24
44
|
// #endregion Properties (1)
|
|
25
45
|
}
|
|
26
46
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
format: string[];
|
|
33
|
-
freeze: boolean;
|
|
34
|
-
updateCallback: ((newNode?: ITreeNode, oldNode?: ITreeNode) => void) | null;
|
|
47
|
+
/**
|
|
48
|
+
* Extension of the ShapeDiverResponseOutputContent as the viewer already creates types for them
|
|
49
|
+
*/
|
|
50
|
+
export interface ShapeDiverResponseOutputContent extends ShapeDiverResponseOutputContentBackend {
|
|
51
|
+
// #region Properties (1)
|
|
35
52
|
|
|
36
|
-
|
|
53
|
+
data?: ITag2D[] | ITag3D[] | IAnchor[] | IMaterialContentData | IMaterialContentDataV1 | IMaterialContentDataV2 | IMaterialContentDataV3 | unknown;
|
|
37
54
|
|
|
38
|
-
// #
|
|
39
|
-
|
|
40
|
-
triggerUpdateCallback(newNode?: ITreeNode, oldNode?: ITreeNode): void;
|
|
41
|
-
updateOutput(newNode?: ITreeNode, oldNode?: ITreeNode): void;
|
|
42
|
-
updateOutputContent(content: ShapeDiverResponseOutputContent[], preventUpdate?: boolean, waitForViewportUpdate?: boolean): Promise<ITreeNode | undefined>;
|
|
43
|
-
updateOutputDefinition(outputDef: ShapeDiverResponseOutput): void;
|
|
55
|
+
// #endregion Properties (1)
|
|
56
|
+
}
|
|
44
57
|
|
|
45
|
-
|
|
46
|
-
}
|
|
58
|
+
// #endregion Interfaces (3)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ShapeDiverResponseParameter } from
|
|
1
|
+
import { ShapeDiverResponseParameter } from '@shapediver/sdk.geometry-api-sdk-v2';
|
|
2
2
|
|
|
3
3
|
export interface IParameter<T> extends ShapeDiverResponseParameter {
|
|
4
4
|
// #region Properties (2)
|
|
@@ -10,10 +10,10 @@ export interface IParameter<T> extends ShapeDiverResponseParameter {
|
|
|
10
10
|
|
|
11
11
|
// #region Public Methods (4)
|
|
12
12
|
|
|
13
|
-
isValid(value:
|
|
13
|
+
isValid(value: unknown): boolean;
|
|
14
14
|
resetToDefaultValue(): void;
|
|
15
15
|
resetToSessionValue(): void;
|
|
16
|
-
stringify(): string;
|
|
16
|
+
stringify(value?: unknown): string;
|
|
17
17
|
|
|
18
18
|
// #endregion Public Methods (4)
|
|
19
19
|
}
|