@shapediver/viewer.session-engine.session-engine 3.14.8 → 3.14.10
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/OutputLoader.d.ts.map +1 -1
- package/dist/implementation/OutputLoader.js +4 -0
- package/dist/implementation/OutputLoader.js.map +1 -1
- package/dist/implementation/SessionEngine.d.ts.map +1 -1
- package/dist/implementation/SessionEngine.js +0 -4
- package/dist/implementation/SessionEngine.js.map +1 -1
- package/dist/implementation/SessionEngineCore.d.ts +49 -75
- package/dist/implementation/SessionEngineCore.d.ts.map +1 -1
- package/dist/implementation/SessionEngineCore.js +88 -265
- package/dist/implementation/SessionEngineCore.js.map +1 -1
- package/dist/implementation/SessionEngineFacade.d.ts +16 -11
- package/dist/implementation/SessionEngineFacade.d.ts.map +1 -1
- package/dist/implementation/SessionEngineFacade.js +19 -18
- package/dist/implementation/SessionEngineFacade.js.map +1 -1
- package/dist/implementation/managers/CustomizationManager.d.ts +41 -6
- package/dist/implementation/managers/CustomizationManager.d.ts.map +1 -1
- package/dist/implementation/managers/CustomizationManager.js +114 -56
- package/dist/implementation/managers/CustomizationManager.js.map +1 -1
- package/dist/implementation/managers/ExportManager.d.ts +49 -5
- package/dist/implementation/managers/ExportManager.d.ts.map +1 -1
- package/dist/implementation/managers/ExportManager.js +105 -42
- package/dist/implementation/managers/ExportManager.js.map +1 -1
- package/dist/implementation/managers/FileUploadManager.d.ts +41 -3
- package/dist/implementation/managers/FileUploadManager.d.ts.map +1 -1
- package/dist/implementation/managers/FileUploadManager.js +110 -67
- package/dist/implementation/managers/FileUploadManager.js.map +1 -1
- package/dist/implementation/managers/ModelStateManager.d.ts +42 -4
- package/dist/implementation/managers/ModelStateManager.d.ts.map +1 -1
- package/dist/implementation/managers/ModelStateManager.js +71 -24
- package/dist/implementation/managers/ModelStateManager.js.map +1 -1
- package/dist/implementation/managers/OutputManager.d.ts +48 -10
- package/dist/implementation/managers/OutputManager.d.ts.map +1 -1
- package/dist/implementation/managers/OutputManager.js +144 -84
- package/dist/implementation/managers/OutputManager.js.map +1 -1
- package/dist/implementation/managers/ParameterManager.d.ts +51 -4
- package/dist/implementation/managers/ParameterManager.d.ts.map +1 -1
- package/dist/implementation/managers/ParameterManager.js +164 -13
- package/dist/implementation/managers/ParameterManager.js.map +1 -1
- package/dist/implementation/managers/SettingsManager.d.ts +27 -2
- package/dist/implementation/managers/SettingsManager.d.ts.map +1 -1
- package/dist/implementation/managers/SettingsManager.js +120 -74
- package/dist/implementation/managers/SettingsManager.js.map +1 -1
- package/dist/implementation/managers/UtilsManager.d.ts +79 -17
- package/dist/implementation/managers/UtilsManager.d.ts.map +1 -1
- package/dist/implementation/managers/UtilsManager.js +187 -126
- package/dist/implementation/managers/UtilsManager.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { Configuration, ResBase
|
|
1
|
+
import { Configuration, ResBase } from "@shapediver/sdk.geometry-api-sdk-v2";
|
|
2
2
|
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
-
import { IExport } from "../interfaces/dto/IExport";
|
|
4
|
-
import { IOutput } from "../interfaces/dto/IOutput";
|
|
5
|
-
import { IParameter } from "../interfaces/dto/IParameter";
|
|
6
3
|
import { ISessionEngineCreationDefinition } from "../interfaces/ISessionEngine";
|
|
7
4
|
import { CustomizationManager } from "./managers/CustomizationManager";
|
|
8
5
|
import { ExportManager } from "./managers/ExportManager";
|
|
@@ -12,122 +9,87 @@ import { OutputManager } from "./managers/OutputManager";
|
|
|
12
9
|
import { ParameterManager } from "./managers/ParameterManager";
|
|
13
10
|
import { SettingsManager } from "./managers/SettingsManager";
|
|
14
11
|
import { UtilsManager } from "./managers/UtilsManager";
|
|
12
|
+
/**
|
|
13
|
+
* Core class of the Session Engine.
|
|
14
|
+
*
|
|
15
|
+
* The SessionEngineCore is the main entry point to create and manage sessions.
|
|
16
|
+
* The manager instances for parameters, outputs, exports, etc. can be accessed via their respective properties.
|
|
17
|
+
*/
|
|
15
18
|
export declare class SessionEngineCore {
|
|
16
|
-
private readonly
|
|
19
|
+
private readonly _customizationManager;
|
|
17
20
|
private readonly _eventEngine;
|
|
18
|
-
private readonly
|
|
21
|
+
private readonly _exportManager;
|
|
22
|
+
private readonly _fileUploadManager;
|
|
19
23
|
private readonly _guid?;
|
|
20
24
|
private readonly _httpClient;
|
|
21
25
|
private readonly _id;
|
|
22
|
-
private readonly
|
|
26
|
+
private readonly _modelStateManager;
|
|
23
27
|
private readonly _modelViewUrl;
|
|
24
|
-
private readonly
|
|
25
|
-
private readonly
|
|
26
|
-
private readonly _parameterValues;
|
|
27
|
-
private readonly _parameters;
|
|
28
|
+
private readonly _outputManager;
|
|
29
|
+
private readonly _parameterManager;
|
|
28
30
|
private readonly _performanceEvaluator;
|
|
29
31
|
private readonly _sessionEngineId;
|
|
30
|
-
private readonly
|
|
32
|
+
private readonly _settingsManager;
|
|
31
33
|
private readonly _ticket?;
|
|
32
|
-
private readonly
|
|
33
|
-
private _customizationBusyModes;
|
|
34
|
-
private _customizationProcess?;
|
|
35
|
-
private _allowOutputLoading;
|
|
34
|
+
private readonly _utilsManager;
|
|
36
35
|
private _automaticSceneUpdate;
|
|
37
36
|
private _closeOnFailure;
|
|
38
37
|
private _closed;
|
|
39
|
-
private _customizeOnParameterChange;
|
|
40
|
-
private _dataCache;
|
|
41
38
|
private _excludeViewports;
|
|
42
39
|
private _headers;
|
|
43
|
-
private _ignoreUnknownParams?;
|
|
44
40
|
private _initialized;
|
|
45
41
|
private _jwtToken?;
|
|
46
42
|
private _loadSdtf;
|
|
47
43
|
private _modelId?;
|
|
48
|
-
private _modelState?;
|
|
49
|
-
private _modelStateId?;
|
|
50
|
-
private _modelStateValidationMode?;
|
|
51
44
|
private _node;
|
|
52
45
|
private _refreshJwtToken?;
|
|
53
46
|
private _responseDto?;
|
|
54
47
|
private _sdkConfig;
|
|
55
48
|
private _sessionId?;
|
|
56
49
|
private _updateCallback;
|
|
57
|
-
private _throwOnCustomizationError;
|
|
58
|
-
private readonly _settingsManager;
|
|
59
|
-
private readonly _outputManager;
|
|
60
|
-
private readonly _utilsManager;
|
|
61
|
-
private readonly _exportManager;
|
|
62
|
-
private readonly _fileUploadManager;
|
|
63
|
-
private readonly _parameterManager;
|
|
64
|
-
private readonly _customizationManager;
|
|
65
|
-
private readonly _modelStateManager;
|
|
66
50
|
/**
|
|
67
51
|
* Can be use to initialize a session with the ticket/guid and modelViewUrl and returns a scene graph node with the result.
|
|
68
52
|
* Can be use to customize the session with updated parameters to get the updated scene graph node.
|
|
69
53
|
*/
|
|
70
54
|
constructor(properties: ISessionEngineCreationDefinition);
|
|
71
|
-
get modelStateManager(): ModelStateManager;
|
|
72
|
-
get customizationManager(): CustomizationManager;
|
|
73
|
-
get parameterManager(): ParameterManager;
|
|
74
|
-
get modelStateId(): string | undefined;
|
|
75
|
-
get fileUploadManager(): FileUploadManager;
|
|
76
|
-
get closeOnFailure(): () => Promise<void>;
|
|
77
|
-
get utilsManager(): UtilsManager;
|
|
78
|
-
get initialized(): boolean;
|
|
79
|
-
set initialized(value: boolean);
|
|
80
|
-
get customizationBusyModes(): string[];
|
|
81
|
-
set customizationBusyModes(value: string[]);
|
|
82
|
-
get outputManager(): OutputManager;
|
|
83
|
-
get closed(): boolean;
|
|
84
|
-
set node(value: ITreeNode);
|
|
85
|
-
get throwOnCustomizationError(): boolean;
|
|
86
|
-
get customizationProcess(): string | undefined;
|
|
87
|
-
set customizationProcess(value: string | undefined);
|
|
88
|
-
get sessionId(): string | undefined;
|
|
89
|
-
get settingsManager(): SettingsManager;
|
|
90
|
-
get responseDto(): ResBase | undefined;
|
|
91
|
-
get sdkConfig(): Configuration;
|
|
92
|
-
get modelId(): string | undefined;
|
|
93
55
|
get automaticSceneUpdate(): boolean;
|
|
94
56
|
set automaticSceneUpdate(value: boolean);
|
|
95
|
-
get
|
|
96
|
-
get
|
|
97
|
-
|
|
57
|
+
get closeOnFailure(): () => Promise<void>;
|
|
58
|
+
get closed(): boolean;
|
|
59
|
+
get customizationManager(): CustomizationManager;
|
|
98
60
|
get excludeViewports(): string[];
|
|
99
61
|
set excludeViewports(value: string[]);
|
|
100
|
-
get
|
|
101
|
-
|
|
102
|
-
};
|
|
62
|
+
get exportManager(): ExportManager;
|
|
63
|
+
get fileUploadManager(): FileUploadManager;
|
|
103
64
|
get guid(): string | undefined;
|
|
104
65
|
get id(): string;
|
|
66
|
+
get initialized(): boolean;
|
|
67
|
+
set initialized(value: boolean);
|
|
105
68
|
get jwtToken(): string | undefined;
|
|
106
69
|
get loadSdtf(): boolean;
|
|
107
|
-
get ignoreUnknownParams(): boolean | undefined;
|
|
108
|
-
get exportManager(): ExportManager;
|
|
109
|
-
get allowOutputLoading(): boolean;
|
|
110
70
|
set loadSdtf(value: boolean);
|
|
111
|
-
get
|
|
71
|
+
get modelId(): string | undefined;
|
|
72
|
+
get modelStateManager(): ModelStateManager;
|
|
112
73
|
get modelViewUrl(): string;
|
|
113
74
|
get node(): ITreeNode;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
get outputsFreeze(): {
|
|
118
|
-
[key: string]: boolean;
|
|
119
|
-
};
|
|
120
|
-
get parameterValues(): {
|
|
121
|
-
[key: string]: string;
|
|
122
|
-
};
|
|
123
|
-
get parameters(): {
|
|
124
|
-
[key: string]: IParameter<unknown>;
|
|
125
|
-
};
|
|
75
|
+
set node(value: ITreeNode);
|
|
76
|
+
get outputManager(): OutputManager;
|
|
77
|
+
get parameterManager(): ParameterManager;
|
|
126
78
|
get refreshJwtToken(): (() => Promise<string>) | undefined;
|
|
127
79
|
set refreshJwtToken(value: (() => Promise<string>) | undefined);
|
|
80
|
+
get responseDto(): ResBase | undefined;
|
|
81
|
+
get sdkConfig(): Configuration;
|
|
82
|
+
get sessionId(): string | undefined;
|
|
83
|
+
get settingsManager(): SettingsManager;
|
|
128
84
|
get ticket(): string | undefined;
|
|
129
85
|
get updateCallback(): ((newNode?: ITreeNode, oldNode?: ITreeNode) => void) | null;
|
|
130
86
|
set updateCallback(value: ((newNode?: ITreeNode, oldNode?: ITreeNode) => void) | null);
|
|
87
|
+
get utilsManager(): UtilsManager;
|
|
88
|
+
/**
|
|
89
|
+
* Closes the session.
|
|
90
|
+
*
|
|
91
|
+
* @param retry whether to retry closing the session in case of failure
|
|
92
|
+
*/
|
|
131
93
|
close(retry?: boolean): Promise<void>;
|
|
132
94
|
/**
|
|
133
95
|
* Initializes the session with the ticket and modelViewUrl.
|
|
@@ -137,7 +99,19 @@ export declare class SessionEngineCore {
|
|
|
137
99
|
init(parameterValues?: {
|
|
138
100
|
[key: string]: string;
|
|
139
101
|
}, retry?: boolean): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* Sets the JWT token for the session.
|
|
104
|
+
*
|
|
105
|
+
* @param value the JWT token
|
|
106
|
+
* @param retry whether to retry setting the token in case of failure
|
|
107
|
+
*/
|
|
140
108
|
setJwtToken(value: string, retry?: boolean): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Updates the response DTO of the session engine core.
|
|
111
|
+
*
|
|
112
|
+
* @param responseDto The new response DTO
|
|
113
|
+
* @param initialParameters Optional initial parameters to consider when updating
|
|
114
|
+
*/
|
|
141
115
|
updateResponseDto(responseDto: ResBase, initialParameters?: {
|
|
142
116
|
[key: string]: string;
|
|
143
117
|
}): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionEngineCore.d.ts","sourceRoot":"","sources":["../../src/implementation/SessionEngineCore.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,aAAa,EACb,OAAO,
|
|
1
|
+
{"version":3,"file":"SessionEngineCore.d.ts","sourceRoot":"","sources":["../../src/implementation/SessionEngineCore.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,aAAa,EACb,OAAO,EAIP,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAC,SAAS,EAAW,MAAM,qCAAqC,CAAC;AAWxE,O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