@itwin/core-backend 3.3.0-dev.9 → 3.4.0-dev.2
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/CHANGELOG.md +36 -1
- package/lib/cjs/BackendHubAccess.d.ts +32 -15
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.d.ts +2 -2
- package/lib/cjs/BackendLoggerCategory.js +2 -2
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BisCoreSchema.d.ts +1 -1
- package/lib/cjs/BisCoreSchema.js +1 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +10 -11
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +10 -11
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts +28 -6
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +117 -22
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +6 -6
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CodeSpecs.d.ts +1 -1
- package/lib/cjs/CodeSpecs.js +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +2 -2
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +14 -17
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/Element.d.ts +36 -25
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +54 -39
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.d.ts +14 -0
- package/lib/cjs/GeoCoordConfig.d.ts.map +1 -0
- package/lib/cjs/GeoCoordConfig.js +74 -0
- package/lib/cjs/GeoCoordConfig.js.map +1 -0
- package/lib/cjs/HubMock.d.ts +94 -0
- package/lib/cjs/HubMock.d.ts.map +1 -0
- package/lib/cjs/HubMock.js +191 -0
- package/lib/cjs/HubMock.js.map +1 -0
- package/lib/cjs/IModelDb.d.ts +33 -15
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +64 -35
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +75 -33
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +66 -80
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IpcHost.d.ts +2 -2
- package/lib/cjs/IpcHost.d.ts.map +1 -1
- package/lib/cjs/IpcHost.js +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LocalHub.d.ts +163 -0
- package/lib/cjs/LocalHub.d.ts.map +1 -0
- package/lib/cjs/LocalHub.js +588 -0
- package/lib/cjs/LocalHub.js.map +1 -0
- package/lib/cjs/LocalhostIpcHost.d.ts +2 -2
- package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js +16 -0
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/RpcBackend.d.ts +3 -1
- package/lib/cjs/RpcBackend.d.ts.map +1 -1
- package/lib/cjs/RpcBackend.js +27 -3
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +138 -30
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +110 -38
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/SqliteStatement.d.ts +8 -0
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +10 -0
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +6 -6
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +20 -20
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/{ViewStateHydrater.d.ts → ViewStateHydrator.d.ts} +3 -3
- package/lib/cjs/ViewStateHydrator.d.ts.map +1 -0
- package/lib/cjs/{ViewStateHydrater.js → ViewStateHydrator.js} +15 -29
- package/lib/cjs/ViewStateHydrator.js.map +1 -0
- package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +68 -0
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +22 -0
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +53 -0
- package/lib/cjs/assets/Settings/backend.setting.json5 +139 -0
- package/lib/cjs/core-backend.d.ts +10 -8
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +10 -8
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +3 -2
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +7 -2
- package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +8 -12
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/workspace/Settings.d.ts +8 -3
- package/lib/cjs/workspace/Settings.d.ts.map +1 -1
- package/lib/cjs/workspace/Settings.js +9 -0
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.d.ts +76 -0
- package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -0
- package/lib/cjs/workspace/SettingsSchemas.js +192 -0
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -0
- package/lib/cjs/workspace/Workspace.d.ts +240 -144
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js +258 -95
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/package.json +26 -21
- package/lib/cjs/ViewStateHydrater.d.ts.map +0 -1
- package/lib/cjs/ViewStateHydrater.js.map +0 -1
- package/lib/cjs/assets/Settings.schema.json +0 -25
- package/lib/cjs/workspace/SettingsSpecRegistry.d.ts +0 -68
- package/lib/cjs/workspace/SettingsSpecRegistry.d.ts.map +0 -1
- package/lib/cjs/workspace/SettingsSpecRegistry.js +0 -122
- package/lib/cjs/workspace/SettingsSpecRegistry.js.map +0 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cloud/accounts": [
|
|
3
|
+
{
|
|
4
|
+
"name": "gcs/account",
|
|
5
|
+
"accessName": "https://geocoord-workspace.itwinjs.org/",
|
|
6
|
+
"storageType": "azure?customuri=1&sas=1"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"cloud/containers": [
|
|
10
|
+
{
|
|
11
|
+
"name": "gcs/container",
|
|
12
|
+
"accountName": "gcs/account",
|
|
13
|
+
"containerId": "gcs",
|
|
14
|
+
"isPublic": true
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"workspace/databases": [
|
|
18
|
+
{
|
|
19
|
+
"name": "gcs/base",
|
|
20
|
+
"dbName": "base",
|
|
21
|
+
"containerName": "gcs/container",
|
|
22
|
+
"version": "^1",
|
|
23
|
+
"priority": 10000,
|
|
24
|
+
"prefetch": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "gcs/entire-earth",
|
|
28
|
+
"dbName": "allEarth",
|
|
29
|
+
"containerName": "gcs/container",
|
|
30
|
+
"version": "^1",
|
|
31
|
+
"priority": 100
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "gcs/Australia",
|
|
35
|
+
"dbName": "Australia",
|
|
36
|
+
"containerName": "gcs/container",
|
|
37
|
+
"version": "^1",
|
|
38
|
+
"priority": 500
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "gcs/Brazil",
|
|
42
|
+
"dbName": "Brazil",
|
|
43
|
+
"containerName": "gcs/container",
|
|
44
|
+
"version": "^1",
|
|
45
|
+
"priority": 500
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "gcs/Canada",
|
|
49
|
+
"dbName": "Canada",
|
|
50
|
+
"containerName": "gcs/container",
|
|
51
|
+
"version": "^1",
|
|
52
|
+
"priority": 500
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "gcs/France",
|
|
56
|
+
"dbName": "France",
|
|
57
|
+
"containerName": "gcs/container",
|
|
58
|
+
"version": "^1",
|
|
59
|
+
"priority": 500
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "gcs/Germany",
|
|
63
|
+
"dbName": "Germany",
|
|
64
|
+
"containerName": "gcs/container",
|
|
65
|
+
"version": "^1",
|
|
66
|
+
"priority": 500
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "gcs/Japan",
|
|
70
|
+
"dbName": "Japan",
|
|
71
|
+
"containerName": "gcs/container",
|
|
72
|
+
"version": "^1",
|
|
73
|
+
"priority": 500
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "gcs/NewZealand",
|
|
77
|
+
"dbName": "NewZealand",
|
|
78
|
+
"containerName": "gcs/container",
|
|
79
|
+
"version": "^1",
|
|
80
|
+
"priority": 500
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "gcs/Portugal",
|
|
84
|
+
"dbName": "Portugal",
|
|
85
|
+
"containerName": "gcs/container",
|
|
86
|
+
"version": "^1",
|
|
87
|
+
"priority": 500
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "gcs/Slovakia",
|
|
91
|
+
"dbName": "Slovakia",
|
|
92
|
+
"containerName": "gcs/container",
|
|
93
|
+
"version": "^1",
|
|
94
|
+
"priority": 500
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "gcs/SouthAfrica",
|
|
98
|
+
"dbName": "SouthAfrica",
|
|
99
|
+
"containerName": "gcs/container",
|
|
100
|
+
"version": "^1",
|
|
101
|
+
"priority": 500
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "gcs/Spain",
|
|
105
|
+
"dbName": "Spain",
|
|
106
|
+
"containerName": "gcs/container",
|
|
107
|
+
"version": "^1",
|
|
108
|
+
"priority": 500
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "gcs/Switzerland",
|
|
112
|
+
"dbName": "Switzerland",
|
|
113
|
+
"containerName": "gcs/container",
|
|
114
|
+
"version": "^1",
|
|
115
|
+
"priority": 500
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "gcs/UK",
|
|
119
|
+
"dbName": "UK",
|
|
120
|
+
"containerName": "gcs/container",
|
|
121
|
+
"version": "^1",
|
|
122
|
+
"priority": 500
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "gcs/Usa",
|
|
126
|
+
"dbName": "Usa",
|
|
127
|
+
"containerName": "gcs/container",
|
|
128
|
+
"version": "^1",
|
|
129
|
+
"priority": 500
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "gcs/Venezuela",
|
|
133
|
+
"dbName": "Venezuela",
|
|
134
|
+
"containerName": "gcs/container",
|
|
135
|
+
"version": "^1",
|
|
136
|
+
"priority": 500
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
@@ -13,6 +13,8 @@ export * from "./ElementAspect";
|
|
|
13
13
|
export * from "./Entity";
|
|
14
14
|
export * from "./ExportGraphics";
|
|
15
15
|
export * from "./ExternalSource";
|
|
16
|
+
export * from "./LocalHub";
|
|
17
|
+
export * from "./HubMock";
|
|
16
18
|
export * from "./IModelJsFs";
|
|
17
19
|
export * from "./BackendHubAccess";
|
|
18
20
|
export * from "./Relationship";
|
|
@@ -47,7 +49,7 @@ export * from "./DevTools";
|
|
|
47
49
|
export * from "./LocalhostIpcHost";
|
|
48
50
|
export * from "./ElementGraphics";
|
|
49
51
|
export * from "./workspace/Settings";
|
|
50
|
-
export * from "./workspace/
|
|
52
|
+
export * from "./workspace/SettingsSchemas";
|
|
51
53
|
export * from "./workspace/Workspace";
|
|
52
54
|
export * from "./IModelDb";
|
|
53
55
|
/** @docs-package-description
|
|
@@ -71,17 +73,17 @@ export * from "./IModelDb";
|
|
|
71
73
|
*/
|
|
72
74
|
/**
|
|
73
75
|
* @docs-group-description Models
|
|
74
|
-
* Subclasses of [Models]($docs/BIS/
|
|
76
|
+
* Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).
|
|
75
77
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
76
78
|
*/
|
|
77
79
|
/**
|
|
78
80
|
* @docs-group-description Elements
|
|
79
|
-
* Subclasses of [Elements]($docs/BIS/
|
|
81
|
+
* Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).
|
|
80
82
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
81
83
|
*/
|
|
82
84
|
/**
|
|
83
85
|
* @docs-group-description Codes
|
|
84
|
-
* Classes for working with [Codes]($docs/BIS/
|
|
86
|
+
* Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).
|
|
85
87
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
86
88
|
*/
|
|
87
89
|
/**
|
|
@@ -91,16 +93,16 @@ export * from "./IModelDb";
|
|
|
91
93
|
*/
|
|
92
94
|
/**
|
|
93
95
|
* @docs-group-description Relationships
|
|
94
|
-
* Classes that describe the [relationships]($docs/bis/
|
|
96
|
+
* Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.
|
|
95
97
|
*/
|
|
96
98
|
/**
|
|
97
99
|
* @docs-group-description ElementAspects
|
|
98
|
-
* Subclasses of [ElementAspects]($docs/bis/
|
|
100
|
+
* Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).
|
|
99
101
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
100
102
|
*/
|
|
101
103
|
/**
|
|
102
104
|
* @docs-group-description Categories
|
|
103
|
-
* Classes for [Categories]($docs/bis/
|
|
105
|
+
* Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).
|
|
104
106
|
*/
|
|
105
107
|
/**
|
|
106
108
|
* @docs-group-description Symbology
|
|
@@ -167,7 +169,7 @@ export * from "./IModelDb";
|
|
|
167
169
|
* APIs for loading and using Settings and Workspace resources
|
|
168
170
|
*/
|
|
169
171
|
/**
|
|
170
|
-
* @docs-group-description
|
|
172
|
+
* @docs-group-description ViewStateHydrator
|
|
171
173
|
* Class responsible for loading ViewStates.
|
|
172
174
|
*/
|
|
173
175
|
//# sourceMappingURL=core-backend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-backend.d.ts","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":"AAIA,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,a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AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
|
package/lib/cjs/core-backend.js
CHANGED
|
@@ -30,6 +30,8 @@ __exportStar(require("./ElementAspect"), exports);
|
|
|
30
30
|
__exportStar(require("./Entity"), exports);
|
|
31
31
|
__exportStar(require("./ExportGraphics"), exports);
|
|
32
32
|
__exportStar(require("./ExternalSource"), exports);
|
|
33
|
+
__exportStar(require("./LocalHub"), exports);
|
|
34
|
+
__exportStar(require("./HubMock"), exports);
|
|
33
35
|
__exportStar(require("./IModelJsFs"), exports);
|
|
34
36
|
__exportStar(require("./BackendHubAccess"), exports);
|
|
35
37
|
__exportStar(require("./Relationship"), exports);
|
|
@@ -67,7 +69,7 @@ __exportStar(require("./DevTools"), exports);
|
|
|
67
69
|
__exportStar(require("./LocalhostIpcHost"), exports);
|
|
68
70
|
__exportStar(require("./ElementGraphics"), exports);
|
|
69
71
|
__exportStar(require("./workspace/Settings"), exports);
|
|
70
|
-
__exportStar(require("./workspace/
|
|
72
|
+
__exportStar(require("./workspace/SettingsSchemas"), exports);
|
|
71
73
|
__exportStar(require("./workspace/Workspace"), exports);
|
|
72
74
|
__exportStar(require("./IModelDb"), exports); // must be last
|
|
73
75
|
/** @docs-package-description
|
|
@@ -91,17 +93,17 @@ __exportStar(require("./IModelDb"), exports); // must be last
|
|
|
91
93
|
*/
|
|
92
94
|
/**
|
|
93
95
|
* @docs-group-description Models
|
|
94
|
-
* Subclasses of [Models]($docs/BIS/
|
|
96
|
+
* Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).
|
|
95
97
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
96
98
|
*/
|
|
97
99
|
/**
|
|
98
100
|
* @docs-group-description Elements
|
|
99
|
-
* Subclasses of [Elements]($docs/BIS/
|
|
101
|
+
* Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).
|
|
100
102
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
101
103
|
*/
|
|
102
104
|
/**
|
|
103
105
|
* @docs-group-description Codes
|
|
104
|
-
* Classes for working with [Codes]($docs/BIS/
|
|
106
|
+
* Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).
|
|
105
107
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
106
108
|
*/
|
|
107
109
|
/**
|
|
@@ -111,16 +113,16 @@ __exportStar(require("./IModelDb"), exports); // must be last
|
|
|
111
113
|
*/
|
|
112
114
|
/**
|
|
113
115
|
* @docs-group-description Relationships
|
|
114
|
-
* Classes that describe the [relationships]($docs/bis/
|
|
116
|
+
* Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.
|
|
115
117
|
*/
|
|
116
118
|
/**
|
|
117
119
|
* @docs-group-description ElementAspects
|
|
118
|
-
* Subclasses of [ElementAspects]($docs/bis/
|
|
120
|
+
* Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).
|
|
119
121
|
* See [the learning articles]($docs/learning/backend/index.md).
|
|
120
122
|
*/
|
|
121
123
|
/**
|
|
122
124
|
* @docs-group-description Categories
|
|
123
|
-
* Classes for [Categories]($docs/bis/
|
|
125
|
+
* Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).
|
|
124
126
|
*/
|
|
125
127
|
/**
|
|
126
128
|
* @docs-group-description Symbology
|
|
@@ -187,7 +189,7 @@ __exportStar(require("./IModelDb"), exports); // must be last
|
|
|
187
189
|
* APIs for loading and using Settings and Workspace resources
|
|
188
190
|
*/
|
|
189
191
|
/**
|
|
190
|
-
* @docs-group-description
|
|
192
|
+
* @docs-group-description ViewStateHydrator
|
|
191
193
|
* Class responsible for loading ViewStates.
|
|
192
194
|
*/
|
|
193
195
|
//# sourceMappingURL=core-backend.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,
|
|
1
|
+
{"version":3,"file":"core-backend.js","sourceRoot":"","sources":["../../src/core-backend.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,6CAA2B;AAC3B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB;AACvB,uDAAqC;AACrC,mDAAiC;AACjC,4CAA0B;AAC1B,kDAAgC;AAChC,2CAAyB;AACzB,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,+CAA6B;AAC7B,qDAAmC;AACnC,iDAA+B;AAC/B,4CAA0B;AAC1B,+CAA6B;AAC7B,8CAA4B;AAC5B,0DAAwC;AACxC,6CAA2B;AAC3B,0CAAwB;AACxB,2DAAyC;AACzC,+CAA6B;AAC7B,2CAAyB;AACzB,oDAAkC;AAClC,6CAA2B;AAC3B,mDAAiC;AACjC,kDAAgC;AAChC,sDAAoC;AACpC,6DAA2C;AAC3C,+DAA6C;AAC7C,0DAAwC;AACxC,4DAA0C;AAC1C,4DAA6F;AAApF,8GAAA,WAAW,OAAA;AAAE,iHAAA,cAAc,OAAA;AAAE,uHAAA,oBAAoB,OAAA;AAC1D,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+CAA6B;AAC7B,wDAAsC;AACtC,2DAAyC;AACzC,6CAA2B;AAC3B,qDAAmC;AACnC,oDAAkC;AAClC,uDAAqC;AACrC,8DAA4C;AAC5C,wDAAsC;AACtC,6CAA2B,CAAC,eAAe;AAE3C;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;;GAIG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./BriefcaseManager\";\r\nexport * from \"./Category\";\r\nexport * from \"./ChangeSummaryManager\";\r\nexport * from \"./CheckpointManager\";\r\nexport * from \"./ClassRegistry\";\r\nexport * from \"./CodeSpecs\";\r\nexport * from \"./DisplayStyle\";\r\nexport * from \"./ECDb\";\r\nexport * from \"./ECSchemaXmlContext\";\r\nexport * from \"./ECSqlStatement\";\r\nexport * from \"./Element\";\r\nexport * from \"./ElementAspect\";\r\nexport * from \"./Entity\";\r\nexport * from \"./ExportGraphics\";\r\nexport * from \"./ExternalSource\";\r\nexport * from \"./LocalHub\";\r\nexport * from \"./HubMock\";\r\nexport * from \"./IModelJsFs\";\r\nexport * from \"./BackendHubAccess\";\r\nexport * from \"./Relationship\";\r\nexport * from \"./Texture\";\r\nexport * from \"./TxnManager\";\r\nexport * from \"./LineStyle\";\r\nexport * from \"./BackendLoggerCategory\";\r\nexport * from \"./Material\";\r\nexport * from \"./Model\";\r\nexport * from \"./NavigationRelationship\";\r\nexport * from \"./RpcBackend\";\r\nexport * from \"./Schema\";\r\nexport * from \"./SqliteStatement\";\r\nexport * from \"./SQLiteDb\";\r\nexport * from \"./ViewDefinition\";\r\nexport * from \"./BisCoreSchema\";\r\nexport * from \"./ChangedElementsDb\";\r\nexport * from \"./domains/FunctionalSchema\";\r\nexport * from \"./domains/FunctionalElements\";\r\nexport * from \"./domains/GenericSchema\";\r\nexport * from \"./domains/GenericElements\";\r\nexport { CloudSqlite, IModelJsNative, NativeLoggerCategory } from \"@bentley/imodeljs-native\";\r\nexport * from \"./IModelCloneContext\";\r\nexport * from \"./IModelHost\";\r\nexport * from \"./IModelSchemaLoader\";\r\nexport * from \"./IpcHost\";\r\nexport * from \"./NativeAppStorage\";\r\nexport * from \"./NativeHost\";\r\nexport * from \"./CloudStorageBackend\";\r\nexport * from \"./AliCloudStorageService\";\r\nexport * from \"./DevTools\";\r\nexport * from \"./LocalhostIpcHost\";\r\nexport * from \"./ElementGraphics\";\r\nexport * from \"./workspace/Settings\";\r\nexport * from \"./workspace/SettingsSchemas\";\r\nexport * from \"./workspace/Workspace\";\r\nexport * from \"./IModelDb\"; // must be last\r\n\r\n/** @docs-package-description\r\n * The core-backend package always runs on the computer with a local Briefcase.\r\n *\r\n * It contains classes that [backend code]($docs/learning/backend/index.md) can use to work with directly with iModels.\r\n */\r\n/**\r\n * @docs-group-description IModelHost\r\n * Classes for configuring and administering the backend [host]($docs/learning/backend/IModelHost.md).\r\n * See [the learning article]($docs/learning/backend/IModelHost.md).\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Classes for working with [iModels]($docs/learning/iModels.md).\r\n * See [the learning article]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Schema\r\n * Classes for working with [ECSchemas]($docs/learning/backend/SchemasAndElementsInTypeScript.md)\r\n */\r\n/**\r\n * @docs-group-description Models\r\n * Subclasses of [Models]($docs/BIS/guide/fundamentals/model-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Elements\r\n * Subclasses of [Elements]($docs/BIS/guide/fundamentals/element-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Classes for working with [Codes]($docs/BIS/guide/fundamentals/codes.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description ViewDefinitions\r\n * Classes for working with Elements that define what appears in [Views]($docs/learning/frontend/views.md).\r\n * See [the learning articles]($docs/learning/backend/createelements/#orthographicviewdefinition).\r\n */\r\n/**\r\n * @docs-group-description Relationships\r\n * Classes that describe the [relationships]($docs/bis/guide/fundamentals/relationship-fundamentals.md) between elements.\r\n */\r\n/**\r\n * @docs-group-description ElementAspects\r\n * Subclasses of [ElementAspects]($docs/bis/guide/fundamentals/elementaspect-fundamentals.md).\r\n * See [the learning articles]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Categories\r\n * Classes for [Categories]($docs/bis/guide/fundamentals/categories.md).\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Classes for defining the appearance of element geometry\r\n */\r\n/**\r\n * @docs-group-description ECDb\r\n * Classes for working with ECDb.\r\n */\r\n/**\r\n * @docs-group-description SQLiteDb\r\n * Classes for working with SQLiteDb.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * Classes for working with Mobile/Desktop Application.\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Classes for working with [ECSQL]($docs/learning/ECSQL.md)\r\n */\r\n/**\r\n * @docs-group-description SQLite\r\n * Classes for working directly with SQLite\r\n */\r\n/**\r\n * @docs-group-description Portability\r\n * Classes to help write [portable apps]($docs/learning/Portability.md) and libraries that will run on any platform, including web apps, node services, Electron desktops apps, and mobile apps.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Classes for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description CloudStorageBackend\r\n * Classes for working with cloud storage.\r\n */\r\n/**\r\n * @docs-group-description AliCloudStorageService\r\n * Classes for working with cloud storage using AliCloud.\r\n */\r\n/**\r\n * @docs-group-description Authentication\r\n * Classes for working with Authentication.\r\n */\r\n/**\r\n * @docs-group-description Tiles\r\n * APIs for working with tile graphics.\r\n */\r\n/**\r\n * @docs-group-description HubAccess\r\n * APIs for working with IModelHub\r\n */\r\n/**\r\n * @docs-group-description Workspace\r\n * APIs for loading and using Settings and Workspace resources\r\n */\r\n/**\r\n * @docs-group-description ViewStateHydrator\r\n * Class responsible for loading ViewStates.\r\n */\r\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module RpcInterface
|
|
3
3
|
*/
|
|
4
|
-
import { GuidString, Id64String } from "@itwin/core-bentley";
|
|
5
|
-
import { CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse, ElementLoadOptions, ElementProps, EntityQueryParams, FontMapProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps, GeometryContainmentResponseProps, GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, IModelConnectionProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelReadRpcInterface, IModelRpcOpenProps, IModelRpcProps, MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps, ModelProps, RpcInterface, SnapRequestProps, SnapResponseProps, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps } from "@itwin/core-common";
|
|
4
|
+
import { CompressedId64Set, GuidString, Id64String } from "@itwin/core-bentley";
|
|
5
|
+
import { CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse, ElementLoadOptions, ElementProps, EntityQueryParams, FontMapProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps, GeometryContainmentResponseProps, GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, IModelConnectionProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelReadRpcInterface, IModelRpcOpenProps, IModelRpcProps, MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps, ModelProps, RpcInterface, SnapRequestProps, SnapResponseProps, SubCategoryResultRow, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps } from "@itwin/core-common";
|
|
6
6
|
import { Range3dProps } from "@itwin/core-geometry";
|
|
7
7
|
/** The backend implementation of IModelReadRpcInterface.
|
|
8
8
|
* @internal
|
|
@@ -12,6 +12,7 @@ export declare class IModelReadRpcImpl extends RpcInterface implements IModelRea
|
|
|
12
12
|
getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps>;
|
|
13
13
|
getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps>;
|
|
14
14
|
hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps>;
|
|
15
|
+
querySubCategories(tokenProps: IModelRpcProps, compressedCategoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]>;
|
|
15
16
|
queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse>;
|
|
16
17
|
queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse>;
|
|
17
18
|
queryModelRanges(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<Range3dProps[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelReadRpcImpl.d.ts","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"IModelReadRpcImpl.d.ts","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAiB,iBAAiB,EAAE,UAAU,EAAQ,UAAU,EAAwB,MAAM,qBAAqB,CAAC;AAC3H,OAAO,EACC,SAAS,EAAE,+BAA+B,EAAE,sBAAsB,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAC5J,YAAY,EAAkB,iBAAiB,EAAE,YAAY,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,+BAA+B,EACvJ,gCAAgC,EAAE,2BAA2B,EAAE,4BAA4B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B,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,+BAA+B,GAAG,OAAO,CAAC,gCAAgC,CAAC;IAKrI,iBAAiB,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAKtH,6BAA6B,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,sCAAsC,GAAG,OAAO,CAAC,uCAAuC,EAAE,CAAC;IAoC5J,iBAAiB,CAAC,UAAU,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAMzF;;OAEG;IACU,gBAAgB,CAAC,WAAW,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAYnF,gBAAgB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAUjE,oBAAoB,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC;IAMvG,sCAAsC,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC;IAKjJ,sCAAsC,CAAC,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAK3I,gBAAgB,CAAC,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;CAIhI"}
|
|
@@ -18,7 +18,7 @@ const RpcBriefcaseUtility_1 = require("./RpcBriefcaseUtility");
|
|
|
18
18
|
const RpcBackend_1 = require("../RpcBackend");
|
|
19
19
|
const BackendLoggerCategory_1 = require("../BackendLoggerCategory");
|
|
20
20
|
const CustomViewState3dCreator_1 = require("../CustomViewState3dCreator");
|
|
21
|
-
const
|
|
21
|
+
const ViewStateHydrator_1 = require("../ViewStateHydrator");
|
|
22
22
|
/** The backend implementation of IModelReadRpcInterface.
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
@@ -34,9 +34,14 @@ class IModelReadRpcImpl extends core_common_1.RpcInterface {
|
|
|
34
34
|
}
|
|
35
35
|
async hydrateViewState(tokenProps, options) {
|
|
36
36
|
const iModelDb = await RpcBriefcaseUtility_1.RpcBriefcaseUtility.findOpenIModel(RpcBackend_1.RpcTrace.expectCurrentActivity.accessToken, tokenProps);
|
|
37
|
-
const viewHydrater = new
|
|
37
|
+
const viewHydrater = new ViewStateHydrator_1.ViewStateHydrator(iModelDb);
|
|
38
38
|
return viewHydrater.getHydrateResponseProps(options);
|
|
39
39
|
}
|
|
40
|
+
async querySubCategories(tokenProps, compressedCategoryIds) {
|
|
41
|
+
const iModelDb = await RpcBriefcaseUtility_1.RpcBriefcaseUtility.findOpenIModel(RpcBackend_1.RpcTrace.expectCurrentActivity.accessToken, tokenProps);
|
|
42
|
+
const decompressedIds = core_bentley_1.CompressedId64Set.decompressArray(compressedCategoryIds);
|
|
43
|
+
return iModelDb.querySubCategories(decompressedIds);
|
|
44
|
+
}
|
|
40
45
|
async queryRows(tokenProps, request) {
|
|
41
46
|
const iModelDb = await RpcBriefcaseUtility_1.RpcBriefcaseUtility.findOpenIModel(RpcBackend_1.RpcTrace.expectCurrentActivity.accessToken, tokenProps);
|
|
42
47
|
if (iModelDb.isReadonly && request.usePrimaryConn === true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelReadRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2H;AAC3H,oDAO4B;AAC5B,wDAA6D;AAC7D,0CAA8C;AAC9C,wDAAqD;AACrD,wDAA+D;AAE/D,+DAA4D;AAC5D,8CAAyC;AACzC,oEAAiE;AACjE,0EAAuE;AACvE,4DAAyD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;IAEM,KAAK,CAAC,gBAAgB,CAAC,UAA0B,EAAE,gBAAkC;QAC1F,MAAM,EAAE,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,qBAAQ,CAAC,qBAAqB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC5G,OAAO,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC/C,CAAC;CACF;AA1QD,8CA0QC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { BentleyStatus, CompressedId64Set, GuidString, Id64, Id64String, IModelStatus, Logger } from \"@itwin/core-bentley\";\r\nimport {\r\n Code, CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse, ElementLoadOptions, ElementLoadProps,\r\n ElementProps, EntityMetaData, EntityQueryParams, FontMapProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps,\r\n GeometryContainmentResponseProps, GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ImageSourceFormat, IModel,\r\n IModelConnectionProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelError, IModelReadRpcInterface, IModelRpcOpenProps,\r\n IModelRpcProps, MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps, ModelProps, NoContentError, RpcInterface, RpcManager, SnapRequestProps, SnapResponseProps,\r\n SyncMode, TextureData, TextureLoadProps, ViewStateLoadProps, ViewStateProps,\r\n} from \"@itwin/core-common\";\r\nimport { Range3d, Range3dProps } from \"@itwin/core-geometry\";\r\nimport { SpatialCategory } from \"../Category\";\r\nimport { ConcurrentQuery } from \"../ConcurrentQuery\";\r\nimport { generateGeometrySummaries } from \"../GeometrySummary\";\r\nimport { DictionaryModel } from \"../Model\";\r\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\r\nimport { RpcTrace } from \"../RpcBackend\";\r\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\r\nimport { CustomViewState3dCreator } from \"../CustomViewState3dCreator\";\r\nimport { ViewStateHydrater } from \"../ViewStateHydrater\";\r\n\r\n/** The backend implementation of IModelReadRpcInterface.\r\n * @internal\r\n */\r\nexport class IModelReadRpcImpl extends RpcInterface implements IModelReadRpcInterface {\r\n\r\n public static register() { RpcManager.registerImpl(IModelReadRpcInterface, IModelReadRpcImpl); }\r\n\r\n public async getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps> {\r\n return RpcBriefcaseUtility.openWithTimeout(RpcTrace.expectCurrentActivity, tokenProps, SyncMode.FixedVersion);\r\n }\r\n\r\n public async getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const viewCreator = new CustomViewState3dCreator(iModelDb);\r\n return viewCreator.getCustomViewState3dData(options);\r\n }\r\n\r\n public async hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const viewHydrater = new ViewStateHydrater(iModelDb);\r\n return viewHydrater.getHydrateResponseProps(options);\r\n }\r\n\r\n public async queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\r\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\r\n request.usePrimaryConn = false;\r\n }\r\n return ConcurrentQuery.executeQueryRequest(iModelDb.nativeDb, request);\r\n }\r\n public async queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\r\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\r\n request.usePrimaryConn = false;\r\n }\r\n return ConcurrentQuery.executeBlobRequest(iModelDb.nativeDb, request);\r\n }\r\n public async queryModelRanges(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<Range3dProps[]> {\r\n const modelIds = new Set(modelIdsList);\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const ranges: Range3dProps[] = [];\r\n for (const id of modelIds) {\r\n try {\r\n ranges.push(iModelDb.nativeDb.queryModelExtents({ id }).modelExtents);\r\n } catch (err: any) {\r\n if ((err as IModelError).errorNumber === IModelStatus.NoGeometry) { // if there was no geometry, just return null range\r\n ranges.push(new Range3d());\r\n continue;\r\n }\r\n\r\n if (modelIds.size === 1)\r\n throw err; // if they're asking for more than one model, don't throw on error.\r\n continue;\r\n }\r\n }\r\n return ranges;\r\n }\r\n\r\n public async getModelProps(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<ModelProps[]> {\r\n const modelIds = new Set(modelIdsList);\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const modelJsonArray: ModelProps[] = [];\r\n for (const id of modelIds) {\r\n try {\r\n const modelProps = iModelDb.models.getModelJson({ id });\r\n modelJsonArray.push(modelProps);\r\n } catch (error) {\r\n if (modelIds.size === 1)\r\n throw error; // if they're asking for more than one model, don't throw on error.\r\n }\r\n }\r\n return modelJsonArray;\r\n }\r\n\r\n public async queryModelProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ModelProps[]> {\r\n const ids = await this.queryEntityIds(tokenProps, params);\r\n return this.getModelProps(tokenProps, [...ids]);\r\n }\r\n\r\n public async getElementProps(tokenProps: IModelRpcProps, elementIdsList: Id64String[]): Promise<ElementProps[]> {\r\n const elementIds = new Set(elementIdsList);\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const elementProps: ElementProps[] = [];\r\n for (const id of elementIds) {\r\n try {\r\n elementProps.push(iModelDb.elements.getElementJson({ id }));\r\n } catch (error) {\r\n if (elementIds.size === 1)\r\n throw error; // if they're asking for more than one element, don't throw on error.\r\n }\r\n }\r\n return elementProps;\r\n }\r\n\r\n public async loadElementProps(tokenProps: IModelRpcProps, identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined> {\r\n const props: ElementLoadProps = options ? { ...options } : {};\r\n if (typeof identifier === \"string\") {\r\n if (Id64.isId64(identifier))\r\n props.id = identifier;\r\n else\r\n props.federationGuid = identifier;\r\n } else {\r\n props.code = Code.fromJSON(identifier);\r\n }\r\n\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.elements.tryGetElementProps(props);\r\n }\r\n\r\n public async getGeometrySummary(tokenProps: IModelRpcProps, request: GeometrySummaryRequestProps): Promise<string> {\r\n const iModel = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return generateGeometrySummaries(request, iModel);\r\n }\r\n\r\n public async queryElementProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ElementProps[]> {\r\n const ids = await this.queryEntityIds(tokenProps, params);\r\n const res = this.getElementProps(tokenProps, [...ids]);\r\n return res;\r\n }\r\n\r\n public async queryEntityIds(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<Id64String[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const res = iModelDb.queryEntityIds(params);\r\n return [...res];\r\n }\r\n\r\n public async getClassHierarchy(tokenProps: IModelRpcProps, classFullName: string): Promise<string[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const classArray: string[] = [];\r\n while (true) {\r\n const classMetaData: EntityMetaData = iModelDb.getMetaData(classFullName);\r\n classArray.push(classFullName);\r\n if (!classMetaData.baseClasses || classMetaData.baseClasses.length === 0)\r\n break;\r\n\r\n classFullName = classMetaData.baseClasses[0];\r\n }\r\n return classArray;\r\n }\r\n\r\n public async getAllCodeSpecs(tokenProps: IModelRpcProps): Promise<any[]> {\r\n const codeSpecs: any[] = [];\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n iModelDb.withPreparedStatement(\"SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec\", (statement) => {\r\n for (const row of statement)\r\n codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });\r\n });\r\n return codeSpecs;\r\n }\r\n\r\n public async getViewStateData(tokenProps: IModelRpcProps, viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.views.getViewStateData(viewDefinitionId, options);\r\n }\r\n\r\n public async readFontJson(tokenProps: IModelRpcProps): Promise<FontMapProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.nativeDb.readFontMap();\r\n }\r\n\r\n public async requestSnap(tokenProps: IModelRpcProps, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.requestSnap(sessionId, props);\r\n }\r\n\r\n public async cancelSnap(tokenProps: IModelRpcProps, sessionId: string): Promise<void> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.cancelSnap(sessionId);\r\n }\r\n\r\n public async getGeometryContainment(tokenProps: IModelRpcProps, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getGeometryContainment(props);\r\n }\r\n\r\n public async getMassProperties(tokenProps: IModelRpcProps, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getMassProperties(props);\r\n }\r\n\r\n public async getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n\r\n const getSingleCandidateMassProperties = async (candidate: string) => {\r\n try {\r\n const massPropResults: MassPropertiesResponseProps[] = [];\r\n\r\n for (const op of props.operations) {\r\n const massProperties = await iModelDb.getMassProperties({ operation: op, candidates: [candidate] });\r\n massPropResults.push(massProperties);\r\n }\r\n\r\n let singleCandidateResult: MassPropertiesPerCandidateResponseProps = { status: BentleyStatus.ERROR, candidate };\r\n\r\n if (massPropResults.some((r) => r.status !== BentleyStatus.ERROR)) {\r\n singleCandidateResult.status = BentleyStatus.SUCCESS;\r\n for (const r of massPropResults.filter((mpr) => mpr.status !== BentleyStatus.ERROR)) {\r\n singleCandidateResult = { ...singleCandidateResult, ...r };\r\n }\r\n }\r\n\r\n return singleCandidateResult;\r\n } catch {\r\n return { status: BentleyStatus.ERROR, candidate };\r\n }\r\n };\r\n\r\n const promises: Promise<MassPropertiesPerCandidateResponseProps>[] = [];\r\n\r\n for (const candidate of CompressedId64Set.iterable(props.candidates)) {\r\n promises.push(getSingleCandidateMassProperties(candidate));\r\n }\r\n\r\n return Promise.all(promises);\r\n }\r\n\r\n public async getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const el = iModelDb.elements.getElement(id);\r\n return (el === undefined) ? [] : el.getToolTipMessage();\r\n }\r\n\r\n /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.\r\n * @deprecated\r\n */\r\n public async getViewThumbnail(_tokenProps: IModelRpcProps, _viewId: string): Promise<Uint8Array> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, _tokenProps);\r\n const thumbnail = iModelDb.views.getThumbnail(_viewId);\r\n if (undefined === thumbnail || 0 === thumbnail.image.length)\r\n throw new NoContentError();\r\n\r\n const val = new Uint8Array(thumbnail.image.length + 16); // allocate a new buffer 16 bytes larger than the image size\r\n new Uint32Array(val.buffer, 0, 4).set([thumbnail.image.length, thumbnail.format === \"jpeg\" ? ImageSourceFormat.Jpeg : ImageSourceFormat.Png, thumbnail.width, thumbnail.height]); // Put the metadata in the first 16 bytes.\r\n val.set(thumbnail.image, 16); // put the image data at offset 16 after metadata\r\n return val;\r\n }\r\n\r\n public async getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const spec = { namespace: \"dgn_View\", name: \"DefaultView\" };\r\n const blob = iModelDb.queryFilePropertyBlob(spec);\r\n if (undefined === blob || 8 !== blob.length)\r\n return Id64.invalid;\r\n\r\n const view = new Uint32Array(blob.buffer);\r\n return Id64.fromUint32Pair(view[0], view[1]);\r\n }\r\n public async getSpatialCategoryId(tokenProps: IModelRpcProps, categoryName: string): Promise<Id64String | undefined> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const dictionary: DictionaryModel = iModelDb.models.getModel<DictionaryModel>(IModel.dictionaryId);\r\n return SpatialCategory.queryCategoryIdByName(iModelDb, dictionary.id, categoryName);\r\n }\r\n\r\n public async getIModelCoordinatesFromGeoCoordinates(tokenProps: IModelRpcProps, props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getIModelCoordinatesFromGeoCoordinates(props);\r\n }\r\n\r\n public async getGeoCoordinatesFromIModelCoordinates(tokenProps: IModelRpcProps, props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getGeoCoordinatesFromIModelCoordinates(props);\r\n }\r\n\r\n public async queryTextureData(tokenProps: IModelRpcProps, textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> {\r\n const db = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return db.queryTextureData(textureLoadProps);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"IModelReadRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/IModelReadRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2H;AAC3H,oDAO4B;AAC5B,wDAA6D;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AoC;QAClH,MAAM,QAAQ,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,qBAAQ,CAAC,qBAAqB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAClH,OAAO,QAAQ,CAAC,sCAAsC,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAEM,KAAK,CAAC,sCAAsC,CAAC,UAA0B,EAAE,KAAiC;QAC/G,MAAM,QAAQ,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,qBAAQ,CAAC,qBAAqB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAClH,OAAO,QAAQ,CAAC,sCAAsC,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,UAA0B,EAAE,gBAAkC;QAC1F,MAAM,EAAE,GAAG,MAAM,yCAAmB,CAAC,cAAc,CAAC,qBAAQ,CAAC,qBAAqB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC5G,OAAO,EAAE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC/C,CAAC;CACF;AAhRD,8CAgRC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { BentleyStatus, CompressedId64Set, GuidString, Id64, Id64String, IModelStatus, Logger } from \"@itwin/core-bentley\";\r\nimport {\r\n Code, CodeProps, CustomViewState3dCreatorOptions, CustomViewState3dProps, DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse, ElementLoadOptions, ElementLoadProps,\r\n ElementProps, EntityMetaData, EntityQueryParams, FontMapProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeometryContainmentRequestProps,\r\n GeometryContainmentResponseProps, GeometrySummaryRequestProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, ImageSourceFormat, IModel,\r\n IModelConnectionProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelError, IModelReadRpcInterface, IModelRpcOpenProps,\r\n IModelRpcProps, MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps, ModelProps, NoContentError, RpcInterface, RpcManager, SnapRequestProps, SnapResponseProps,\r\n SubCategoryResultRow, SyncMode, TextureData, TextureLoadProps, ViewStateLoadProps,ViewStateProps,\r\n} from \"@itwin/core-common\";\r\nimport { Range3d, Range3dProps } from \"@itwin/core-geometry\";\r\nimport { SpatialCategory } from \"../Category\";\r\nimport { ConcurrentQuery } from \"../ConcurrentQuery\";\r\nimport { generateGeometrySummaries } from \"../GeometrySummary\";\r\nimport { DictionaryModel } from \"../Model\";\r\nimport { RpcBriefcaseUtility } from \"./RpcBriefcaseUtility\";\r\nimport { RpcTrace } from \"../RpcBackend\";\r\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\r\nimport { CustomViewState3dCreator } from \"../CustomViewState3dCreator\";\r\nimport { ViewStateHydrator } from \"../ViewStateHydrator\";\r\n\r\n/** The backend implementation of IModelReadRpcInterface.\r\n * @internal\r\n */\r\nexport class IModelReadRpcImpl extends RpcInterface implements IModelReadRpcInterface {\r\n\r\n public static register() { RpcManager.registerImpl(IModelReadRpcInterface, IModelReadRpcImpl); }\r\n\r\n public async getConnectionProps(tokenProps: IModelRpcOpenProps): Promise<IModelConnectionProps> {\r\n return RpcBriefcaseUtility.openWithTimeout(RpcTrace.expectCurrentActivity, tokenProps, SyncMode.FixedVersion);\r\n }\r\n\r\n public async getCustomViewState3dData(tokenProps: IModelRpcProps, options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const viewCreator = new CustomViewState3dCreator(iModelDb);\r\n return viewCreator.getCustomViewState3dData(options);\r\n }\r\n\r\n public async hydrateViewState(tokenProps: IModelRpcProps, options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const viewHydrater = new ViewStateHydrator(iModelDb);\r\n return viewHydrater.getHydrateResponseProps(options);\r\n }\r\n\r\n public async querySubCategories(tokenProps: IModelRpcProps, compressedCategoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const decompressedIds = CompressedId64Set.decompressArray(compressedCategoryIds);\r\n return iModelDb.querySubCategories(decompressedIds);\r\n }\r\n\r\n public async queryRows(tokenProps: IModelRpcProps, request: DbQueryRequest): Promise<DbQueryResponse> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\r\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\r\n request.usePrimaryConn = false;\r\n }\r\n return ConcurrentQuery.executeQueryRequest(iModelDb.nativeDb, request);\r\n }\r\n public async queryBlob(tokenProps: IModelRpcProps, request: DbBlobRequest): Promise<DbBlobResponse> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n if (iModelDb.isReadonly && request.usePrimaryConn === true) {\r\n Logger.logWarning(BackendLoggerCategory.IModelDb, \"usePrimaryConn is only supported on imodel that is opened in read/write mode. The option will be ignored.\", request);\r\n request.usePrimaryConn = false;\r\n }\r\n return ConcurrentQuery.executeBlobRequest(iModelDb.nativeDb, request);\r\n }\r\n public async queryModelRanges(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<Range3dProps[]> {\r\n const modelIds = new Set(modelIdsList);\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const ranges: Range3dProps[] = [];\r\n for (const id of modelIds) {\r\n try {\r\n ranges.push(iModelDb.nativeDb.queryModelExtents({ id }).modelExtents);\r\n } catch (err: any) {\r\n if ((err as IModelError).errorNumber === IModelStatus.NoGeometry) { // if there was no geometry, just return null range\r\n ranges.push(new Range3d());\r\n continue;\r\n }\r\n\r\n if (modelIds.size === 1)\r\n throw err; // if they're asking for more than one model, don't throw on error.\r\n continue;\r\n }\r\n }\r\n return ranges;\r\n }\r\n\r\n public async getModelProps(tokenProps: IModelRpcProps, modelIdsList: Id64String[]): Promise<ModelProps[]> {\r\n const modelIds = new Set(modelIdsList);\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const modelJsonArray: ModelProps[] = [];\r\n for (const id of modelIds) {\r\n try {\r\n const modelProps = iModelDb.models.getModelJson({ id });\r\n modelJsonArray.push(modelProps);\r\n } catch (error) {\r\n if (modelIds.size === 1)\r\n throw error; // if they're asking for more than one model, don't throw on error.\r\n }\r\n }\r\n return modelJsonArray;\r\n }\r\n\r\n public async queryModelProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ModelProps[]> {\r\n const ids = await this.queryEntityIds(tokenProps, params);\r\n return this.getModelProps(tokenProps, [...ids]);\r\n }\r\n\r\n public async getElementProps(tokenProps: IModelRpcProps, elementIdsList: Id64String[]): Promise<ElementProps[]> {\r\n const elementIds = new Set(elementIdsList);\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const elementProps: ElementProps[] = [];\r\n for (const id of elementIds) {\r\n try {\r\n elementProps.push(iModelDb.elements.getElementJson({ id }));\r\n } catch (error) {\r\n if (elementIds.size === 1)\r\n throw error; // if they're asking for more than one element, don't throw on error.\r\n }\r\n }\r\n return elementProps;\r\n }\r\n\r\n public async loadElementProps(tokenProps: IModelRpcProps, identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined> {\r\n const props: ElementLoadProps = options ? { ...options } : {};\r\n if (typeof identifier === \"string\") {\r\n if (Id64.isId64(identifier))\r\n props.id = identifier;\r\n else\r\n props.federationGuid = identifier;\r\n } else {\r\n props.code = Code.fromJSON(identifier);\r\n }\r\n\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.elements.tryGetElementProps(props);\r\n }\r\n\r\n public async getGeometrySummary(tokenProps: IModelRpcProps, request: GeometrySummaryRequestProps): Promise<string> {\r\n const iModel = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return generateGeometrySummaries(request, iModel);\r\n }\r\n\r\n public async queryElementProps(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<ElementProps[]> {\r\n const ids = await this.queryEntityIds(tokenProps, params);\r\n const res = this.getElementProps(tokenProps, [...ids]);\r\n return res;\r\n }\r\n\r\n public async queryEntityIds(tokenProps: IModelRpcProps, params: EntityQueryParams): Promise<Id64String[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const res = iModelDb.queryEntityIds(params);\r\n return [...res];\r\n }\r\n\r\n public async getClassHierarchy(tokenProps: IModelRpcProps, classFullName: string): Promise<string[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const classArray: string[] = [];\r\n while (true) {\r\n const classMetaData: EntityMetaData = iModelDb.getMetaData(classFullName);\r\n classArray.push(classFullName);\r\n if (!classMetaData.baseClasses || classMetaData.baseClasses.length === 0)\r\n break;\r\n\r\n classFullName = classMetaData.baseClasses[0];\r\n }\r\n return classArray;\r\n }\r\n\r\n public async getAllCodeSpecs(tokenProps: IModelRpcProps): Promise<any[]> {\r\n const codeSpecs: any[] = [];\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n iModelDb.withPreparedStatement(\"SELECT ECInstanceId AS id, name, jsonProperties FROM BisCore.CodeSpec\", (statement) => {\r\n for (const row of statement)\r\n codeSpecs.push({ id: row.id, name: row.name, jsonProperties: JSON.parse(row.jsonProperties) });\r\n });\r\n return codeSpecs;\r\n }\r\n\r\n public async getViewStateData(tokenProps: IModelRpcProps, viewDefinitionId: string, options?: ViewStateLoadProps): Promise<ViewStateProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.views.getViewStateData(viewDefinitionId, options);\r\n }\r\n\r\n public async readFontJson(tokenProps: IModelRpcProps): Promise<FontMapProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.nativeDb.readFontMap();\r\n }\r\n\r\n public async requestSnap(tokenProps: IModelRpcProps, sessionId: string, props: SnapRequestProps): Promise<SnapResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.requestSnap(sessionId, props);\r\n }\r\n\r\n public async cancelSnap(tokenProps: IModelRpcProps, sessionId: string): Promise<void> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.cancelSnap(sessionId);\r\n }\r\n\r\n public async getGeometryContainment(tokenProps: IModelRpcProps, props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getGeometryContainment(props);\r\n }\r\n\r\n public async getMassProperties(tokenProps: IModelRpcProps, props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getMassProperties(props);\r\n }\r\n\r\n public async getMassPropertiesPerCandidate(tokenProps: IModelRpcProps, props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n\r\n const getSingleCandidateMassProperties = async (candidate: string) => {\r\n try {\r\n const massPropResults: MassPropertiesResponseProps[] = [];\r\n\r\n for (const op of props.operations) {\r\n const massProperties = await iModelDb.getMassProperties({ operation: op, candidates: [candidate] });\r\n massPropResults.push(massProperties);\r\n }\r\n\r\n let singleCandidateResult: MassPropertiesPerCandidateResponseProps = { status: BentleyStatus.ERROR, candidate };\r\n\r\n if (massPropResults.some((r) => r.status !== BentleyStatus.ERROR)) {\r\n singleCandidateResult.status = BentleyStatus.SUCCESS;\r\n for (const r of massPropResults.filter((mpr) => mpr.status !== BentleyStatus.ERROR)) {\r\n singleCandidateResult = { ...singleCandidateResult, ...r };\r\n }\r\n }\r\n\r\n return singleCandidateResult;\r\n } catch {\r\n return { status: BentleyStatus.ERROR, candidate };\r\n }\r\n };\r\n\r\n const promises: Promise<MassPropertiesPerCandidateResponseProps>[] = [];\r\n\r\n for (const candidate of CompressedId64Set.iterable(props.candidates)) {\r\n promises.push(getSingleCandidateMassProperties(candidate));\r\n }\r\n\r\n return Promise.all(promises);\r\n }\r\n\r\n public async getToolTipMessage(tokenProps: IModelRpcProps, id: string): Promise<string[]> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const el = iModelDb.elements.getElement(id);\r\n return (el === undefined) ? [] : el.getToolTipMessage();\r\n }\r\n\r\n /** Send a view thumbnail to the frontend. This is a binary transfer with the metadata in a 16-byte prefix header.\r\n * @deprecated\r\n */\r\n public async getViewThumbnail(_tokenProps: IModelRpcProps, _viewId: string): Promise<Uint8Array> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, _tokenProps);\r\n const thumbnail = iModelDb.views.getThumbnail(_viewId);\r\n if (undefined === thumbnail || 0 === thumbnail.image.length)\r\n throw new NoContentError();\r\n\r\n const val = new Uint8Array(thumbnail.image.length + 16); // allocate a new buffer 16 bytes larger than the image size\r\n new Uint32Array(val.buffer, 0, 4).set([thumbnail.image.length, thumbnail.format === \"jpeg\" ? ImageSourceFormat.Jpeg : ImageSourceFormat.Png, thumbnail.width, thumbnail.height]); // Put the metadata in the first 16 bytes.\r\n val.set(thumbnail.image, 16); // put the image data at offset 16 after metadata\r\n return val;\r\n }\r\n\r\n public async getDefaultViewId(tokenProps: IModelRpcProps): Promise<Id64String> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const spec = { namespace: \"dgn_View\", name: \"DefaultView\" };\r\n const blob = iModelDb.queryFilePropertyBlob(spec);\r\n if (undefined === blob || 8 !== blob.length)\r\n return Id64.invalid;\r\n\r\n const view = new Uint32Array(blob.buffer);\r\n return Id64.fromUint32Pair(view[0], view[1]);\r\n }\r\n public async getSpatialCategoryId(tokenProps: IModelRpcProps, categoryName: string): Promise<Id64String | undefined> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n const dictionary: DictionaryModel = iModelDb.models.getModel<DictionaryModel>(IModel.dictionaryId);\r\n return SpatialCategory.queryCategoryIdByName(iModelDb, dictionary.id, categoryName);\r\n }\r\n\r\n public async getIModelCoordinatesFromGeoCoordinates(tokenProps: IModelRpcProps, props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getIModelCoordinatesFromGeoCoordinates(props);\r\n }\r\n\r\n public async getGeoCoordinatesFromIModelCoordinates(tokenProps: IModelRpcProps, props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> {\r\n const iModelDb = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return iModelDb.getGeoCoordinatesFromIModelCoordinates(props);\r\n }\r\n\r\n public async queryTextureData(tokenProps: IModelRpcProps, textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> {\r\n const db = await RpcBriefcaseUtility.findOpenIModel(RpcTrace.expectCurrentActivity.accessToken, tokenProps);\r\n return db.queryTextureData(textureLoadProps);\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RpcBriefcaseUtility.d.ts","sourceRoot":"","sources":["../../../src/rpc-impl/RpcBriefcaseUtility.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"RpcBriefcaseUtility.d.ts","sourceRoot":"","sources":["../../../src/rpc-impl/RpcBriefcaseUtility.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAA0D,MAAM,qBAAqB,CAAC;AAC1G,OAAO,EACL,cAAc,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,cAAc,EAAiB,WAAW,EAAsB,QAAQ,EACpI,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAe,QAAQ,EAAc,MAAM,aAAa,CAAC;AAMhE,gBAAgB;AAChB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,WAAW,CAAC;IACtB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,cAAc,KAAK,MAAM,CAAC,EAAE,CAAC;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AACD;;;GAGG;AACH,qBAAa,mBAAmB;mBAET,eAAe;IA2DpC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAmC;mBAC9C,aAAa;IAYlC;;;;OAIG;WACiB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc;IAQnF;;;OAGG;WACiB,IAAI,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC;WA+DlD,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAE,MAAa,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAIvK"}
|
|
@@ -18,7 +18,7 @@ const IModelHost_1 = require("../IModelHost");
|
|
|
18
18
|
const IModelJsFs_1 = require("../IModelJsFs");
|
|
19
19
|
const loggerCategory = BackendLoggerCategory_1.BackendLoggerCategory.IModelDb;
|
|
20
20
|
/**
|
|
21
|
-
* Utility to open the iModel for
|
|
21
|
+
* Utility to open the iModel for RPC interfaces
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
24
|
class RpcBriefcaseUtility {
|
|
@@ -26,8 +26,7 @@ class RpcBriefcaseUtility {
|
|
|
26
26
|
var _a, _b, _c, _d;
|
|
27
27
|
const { activity, tokenProps } = args;
|
|
28
28
|
const accessToken = activity.accessToken;
|
|
29
|
-
|
|
30
|
-
throw new core_common_1.IModelError(core_bentley_1.BentleyStatus.ERROR, "iModelId is undefined.");
|
|
29
|
+
(0, core_bentley_1.assert)(undefined !== tokenProps.iModelId);
|
|
31
30
|
const iModelId = tokenProps.iModelId;
|
|
32
31
|
let myBriefcaseIds;
|
|
33
32
|
if (args.syncMode === core_common_1.SyncMode.PullOnly) {
|
|
@@ -76,7 +75,7 @@ class RpcBriefcaseUtility {
|
|
|
76
75
|
briefcaseId: args.syncMode === core_common_1.SyncMode.PullOnly ? 0 : undefined, // if briefcaseId is undefined, we'll acquire a new one.
|
|
77
76
|
};
|
|
78
77
|
const props = await BriefcaseManager_1.BriefcaseManager.downloadBriefcase(request);
|
|
79
|
-
return IModelDb_1.BriefcaseDb.open(
|
|
78
|
+
return IModelDb_1.BriefcaseDb.open(props);
|
|
80
79
|
}
|
|
81
80
|
static async openBriefcase(args) {
|
|
82
81
|
if (this._briefcasePromise)
|
|
@@ -96,8 +95,8 @@ class RpcBriefcaseUtility {
|
|
|
96
95
|
*/
|
|
97
96
|
static async findOpenIModel(accessToken, iModel) {
|
|
98
97
|
const iModelDb = IModelDb_1.IModelDb.findByKey(iModel.key);
|
|
99
|
-
// call
|
|
100
|
-
await iModelDb.
|
|
98
|
+
// call refreshContainerSas, just in case this is a V2 checkpoint whose sasToken is about to expire.
|
|
99
|
+
await iModelDb.refreshContainerSas(accessToken);
|
|
101
100
|
return iModelDb;
|
|
102
101
|
}
|
|
103
102
|
/**
|
|
@@ -118,12 +117,9 @@ class RpcBriefcaseUtility {
|
|
|
118
117
|
// note: usage is logged in the function BriefcaseManager.downloadNewBriefcaseAndOpen
|
|
119
118
|
return briefcaseDb;
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
throw new core_common_1.IModelError(core_bentley_1.BentleyStatus.ERROR, "iTwinId is undefined.");
|
|
125
|
-
if (undefined === tokenProps.changeset)
|
|
126
|
-
throw new core_common_1.IModelError(core_bentley_1.BentleyStatus.ERROR, "Changeset is undefined.");
|
|
120
|
+
(0, core_bentley_1.assert)(undefined !== tokenProps.iModelId);
|
|
121
|
+
(0, core_bentley_1.assert)(undefined !== tokenProps.iTwinId);
|
|
122
|
+
(0, core_bentley_1.assert)(undefined !== tokenProps.changeset);
|
|
127
123
|
const checkpoint = {
|
|
128
124
|
iModelId: tokenProps.iModelId,
|
|
129
125
|
iTwinId: tokenProps.iTwinId,
|