@shapediver/viewer.session-engine.session-engine 2.12.7 → 3.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.
Files changed (79) hide show
  1. package/dist/implementation/OutputDelayException.js +1 -1
  2. package/dist/implementation/OutputDelayException.js.map +1 -1
  3. package/dist/implementation/OutputLoader.d.ts +9 -7
  4. package/dist/implementation/OutputLoader.d.ts.map +1 -1
  5. package/dist/implementation/OutputLoader.js +56 -41
  6. package/dist/implementation/OutputLoader.js.map +1 -1
  7. package/dist/implementation/SessionData.d.ts +1 -1
  8. package/dist/implementation/SessionData.d.ts.map +1 -1
  9. package/dist/implementation/SessionData.js +2 -2
  10. package/dist/implementation/SessionData.js.map +1 -1
  11. package/dist/implementation/SessionEngine.d.ts +30 -3
  12. package/dist/implementation/SessionEngine.d.ts.map +1 -1
  13. package/dist/implementation/SessionEngine.js +115 -48
  14. package/dist/implementation/SessionEngine.js.map +1 -1
  15. package/dist/implementation/SessionOutputData.d.ts +1 -1
  16. package/dist/implementation/SessionOutputData.d.ts.map +1 -1
  17. package/dist/implementation/SessionOutputData.js +2 -2
  18. package/dist/implementation/SessionOutputData.js.map +1 -1
  19. package/dist/implementation/SessionTreeNode.d.ts +1 -1
  20. package/dist/implementation/SessionTreeNode.d.ts.map +1 -1
  21. package/dist/implementation/SessionTreeNode.js +1 -1
  22. package/dist/implementation/SessionTreeNode.js.map +1 -1
  23. package/dist/implementation/dto/Export.d.ts +4 -4
  24. package/dist/implementation/dto/Export.d.ts.map +1 -1
  25. package/dist/implementation/dto/Export.js +2 -2
  26. package/dist/implementation/dto/Export.js.map +1 -1
  27. package/dist/implementation/dto/FileParameter.d.ts +2 -2
  28. package/dist/implementation/dto/FileParameter.d.ts.map +1 -1
  29. package/dist/implementation/dto/FileParameter.js +69 -31
  30. package/dist/implementation/dto/FileParameter.js.map +1 -1
  31. package/dist/implementation/dto/Output.js +2 -2
  32. package/dist/implementation/dto/Output.js.map +1 -1
  33. package/dist/implementation/dto/Parameter.d.ts +6 -6
  34. package/dist/implementation/dto/Parameter.d.ts.map +1 -1
  35. package/dist/implementation/dto/Parameter.js +106 -87
  36. package/dist/implementation/dto/Parameter.js.map +1 -1
  37. package/dist/index.d.ts +9 -10
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +7 -10
  40. package/dist/index.js.map +1 -1
  41. package/dist/interfaces/ISessionData.d.ts +2 -2
  42. package/dist/interfaces/ISessionData.d.ts.map +1 -1
  43. package/dist/interfaces/ISessionEngine.d.ts +11 -46
  44. package/dist/interfaces/ISessionEngine.d.ts.map +1 -1
  45. package/dist/interfaces/ISessionEngine.js +0 -4
  46. package/dist/interfaces/ISessionEngine.js.map +1 -1
  47. package/dist/interfaces/ISessionOutputData.d.ts +2 -2
  48. package/dist/interfaces/ISessionOutputData.d.ts.map +1 -1
  49. package/dist/interfaces/ISessionTreeNode.d.ts +1 -1
  50. package/dist/interfaces/dto/IExport.d.ts +2 -2
  51. package/dist/interfaces/dto/IExport.d.ts.map +1 -1
  52. package/dist/interfaces/dto/IFileParameter.d.ts +1 -1
  53. package/dist/interfaces/dto/IFileParameter.d.ts.map +1 -1
  54. package/dist/interfaces/dto/IOutput.d.ts +13 -13
  55. package/dist/interfaces/dto/IOutput.d.ts.map +1 -1
  56. package/dist/interfaces/dto/IOutput.js +1 -0
  57. package/dist/interfaces/dto/IOutput.js.map +1 -1
  58. package/dist/interfaces/dto/IParameter.d.ts +3 -3
  59. package/dist/interfaces/dto/IParameter.d.ts.map +1 -1
  60. package/package.json +9 -10
  61. package/src/implementation/OutputDelayException.ts +3 -3
  62. package/src/implementation/OutputLoader.ts +139 -104
  63. package/src/implementation/SessionData.ts +9 -9
  64. package/src/implementation/SessionEngine.ts +133 -53
  65. package/src/implementation/SessionOutputData.ts +8 -8
  66. package/src/implementation/SessionTreeNode.ts +8 -5
  67. package/src/implementation/dto/Export.ts +24 -11
  68. package/src/implementation/dto/FileParameter.ts +72 -37
  69. package/src/implementation/dto/Output.ts +2 -2
  70. package/src/implementation/dto/Parameter.ts +115 -85
  71. package/src/index.ts +17 -21
  72. package/src/interfaces/ISessionData.ts +2 -2
  73. package/src/interfaces/ISessionEngine.ts +19 -60
  74. package/src/interfaces/ISessionOutputData.ts +2 -2
  75. package/src/interfaces/ISessionTreeNode.ts +1 -1
  76. package/src/interfaces/dto/IExport.ts +4 -4
  77. package/src/interfaces/dto/IFileParameter.ts +2 -2
  78. package/src/interfaces/dto/IOutput.ts +38 -26
  79. package/src/interfaces/dto/IParameter.ts +3 -3
@@ -1,5 +1,5 @@
1
- import { ShapeDiverResponseOutput } from "@shapediver/sdk.geometry-api-sdk-v2";
2
- import { ITreeNodeData } from "@shapediver/viewer.shared.node-tree";
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 { ITreeNode } from "@shapediver/viewer.shared.node-tree";
1
+ import { ITreeNode } from '@shapediver/viewer.shared.node-tree';
2
2
 
3
3
  export interface ISessionTreeNode extends ITreeNode {
4
4
  // #region Properties (1)
@@ -1,4 +1,4 @@
1
- import { ShapeDiverResponseExport } from "@shapediver/sdk.geometry-api-sdk-v2";
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 (2)
10
+ // #region Public Methods (3)
11
11
 
12
- request(parameters?: { [key: string]: string }): Promise<ShapeDiverResponseExport>;
12
+ request(parameters?: { [key: string]: unknown }): Promise<ShapeDiverResponseExport>;
13
13
  updateExport(): void;
14
14
  updateExportDefinition(exportDef: ShapeDiverResponseExport): void;
15
15
 
16
- // #endregion Public Methods (2)
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 { ShapeDiverResponseOutput, ShapeDiverResponseOutputContent as ShapeDiverResponseOutputContentBackend, ShapeDiverResponseOutputChunk as ShapeDiverResponseOutputChunkBackend } from '@shapediver/sdk.geometry-api-sdk-v2';
2
- import { IAnchor, IMaterialContentData, IMaterialContentDataV1, IMaterialContentDataV2, IMaterialContentDataV3, ITag2D, ITag3D } from '@shapediver/viewer.data-engine.shared-types';
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
- data?: ITag2D[] | ITag3D[] | IAnchor[] | IMaterialContentData | IMaterialContentDataV1 | IMaterialContentDataV2 | IMaterialContentDataV3 | any;
15
+ export interface IOutput extends ShapeDiverResponseOutput {
16
+ // #region Properties (4)
12
17
 
13
- // #endregion Properties (1)
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
- export interface IOutput extends ShapeDiverResponseOutput {
28
- // #region Properties (3)
29
-
30
- readonly node?: ITreeNode;
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
- // #endregion Properties (3)
53
+ data?: ITag2D[] | ITag3D[] | IAnchor[] | IMaterialContentData | IMaterialContentDataV1 | IMaterialContentDataV2 | IMaterialContentDataV3 | unknown;
37
54
 
38
- // #region Public Methods (1)
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
- // #endregion Public Methods (1)
46
- }
58
+ // #endregion Interfaces (3)
@@ -1,4 +1,4 @@
1
- import { ShapeDiverResponseParameter } from "@shapediver/sdk.geometry-api-sdk-v2";
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: any): boolean;
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
  }