@itwin/core-backend 3.7.8 → 3.7.9

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 (247) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/AliCloudStorageService.d.ts +23 -23
  3. package/lib/cjs/AliCloudStorageService.js +71 -71
  4. package/lib/cjs/AliCloudStorageService.js.map +1 -1
  5. package/lib/cjs/BackendHubAccess.d.ts +224 -224
  6. package/lib/cjs/BackendHubAccess.js +41 -41
  7. package/lib/cjs/BackendHubAccess.js.map +1 -1
  8. package/lib/cjs/BackendLoggerCategory.d.ts +91 -91
  9. package/lib/cjs/BackendLoggerCategory.js +99 -99
  10. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  11. package/lib/cjs/BisCoreSchema.d.ts +21 -21
  12. package/lib/cjs/BisCoreSchema.js +60 -60
  13. package/lib/cjs/BisCoreSchema.js.map +1 -1
  14. package/lib/cjs/BriefcaseManager.d.ts +170 -170
  15. package/lib/cjs/BriefcaseManager.js +414 -414
  16. package/lib/cjs/BriefcaseManager.js.map +1 -1
  17. package/lib/cjs/Category.d.ts +153 -153
  18. package/lib/cjs/Category.js +243 -243
  19. package/lib/cjs/Category.js.map +1 -1
  20. package/lib/cjs/ChangeSummaryManager.d.ts +187 -187
  21. package/lib/cjs/ChangeSummaryManager.js +447 -447
  22. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  23. package/lib/cjs/ChangedElementsDb.d.ts +99 -99
  24. package/lib/cjs/ChangedElementsDb.js +165 -165
  25. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  26. package/lib/cjs/ChangedElementsManager.d.ts +39 -39
  27. package/lib/cjs/ChangedElementsManager.js +88 -88
  28. package/lib/cjs/ChangedElementsManager.js.map +1 -1
  29. package/lib/cjs/CheckpointManager.d.ts +121 -121
  30. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  31. package/lib/cjs/CheckpointManager.js +363 -356
  32. package/lib/cjs/CheckpointManager.js.map +1 -1
  33. package/lib/cjs/ClassRegistry.d.ts +79 -79
  34. package/lib/cjs/ClassRegistry.js +250 -250
  35. package/lib/cjs/ClassRegistry.js.map +1 -1
  36. package/lib/cjs/CloudSqlite.d.ts +350 -350
  37. package/lib/cjs/CloudSqlite.js +153 -153
  38. package/lib/cjs/CloudSqlite.js.map +1 -1
  39. package/lib/cjs/CloudStorageBackend.d.ts +58 -58
  40. package/lib/cjs/CloudStorageBackend.js +173 -173
  41. package/lib/cjs/CloudStorageBackend.js.map +1 -1
  42. package/lib/cjs/CodeService.d.ts +396 -396
  43. package/lib/cjs/CodeService.js +63 -63
  44. package/lib/cjs/CodeService.js.map +1 -1
  45. package/lib/cjs/CodeSpecs.d.ts +55 -55
  46. package/lib/cjs/CodeSpecs.js +124 -124
  47. package/lib/cjs/CodeSpecs.js.map +1 -1
  48. package/lib/cjs/ConcurrentQuery.d.ts +13 -13
  49. package/lib/cjs/ConcurrentQuery.js +36 -36
  50. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  51. package/lib/cjs/CustomViewState3dCreator.d.ts +21 -21
  52. package/lib/cjs/CustomViewState3dCreator.js +82 -82
  53. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  54. package/lib/cjs/DevTools.d.ts +71 -71
  55. package/lib/cjs/DevTools.js +154 -154
  56. package/lib/cjs/DevTools.js.map +1 -1
  57. package/lib/cjs/DisplayStyle.d.ts +106 -106
  58. package/lib/cjs/DisplayStyle.js +256 -256
  59. package/lib/cjs/DisplayStyle.js.map +1 -1
  60. package/lib/cjs/ECDb.d.ts +194 -194
  61. package/lib/cjs/ECDb.js +355 -355
  62. package/lib/cjs/ECDb.js.map +1 -1
  63. package/lib/cjs/ECSchemaXmlContext.d.ts +18 -18
  64. package/lib/cjs/ECSchemaXmlContext.js +41 -41
  65. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  66. package/lib/cjs/ECSqlStatement.d.ts +473 -473
  67. package/lib/cjs/ECSqlStatement.js +791 -791
  68. package/lib/cjs/ECSqlStatement.js.map +1 -1
  69. package/lib/cjs/Element.d.ts +1109 -1109
  70. package/lib/cjs/Element.js +1427 -1427
  71. package/lib/cjs/Element.js.map +1 -1
  72. package/lib/cjs/ElementAspect.d.ts +179 -179
  73. package/lib/cjs/ElementAspect.js +211 -211
  74. package/lib/cjs/ElementAspect.js.map +1 -1
  75. package/lib/cjs/ElementGraphics.d.ts +9 -9
  76. package/lib/cjs/ElementGraphics.js +41 -41
  77. package/lib/cjs/ElementGraphics.js.map +1 -1
  78. package/lib/cjs/ElementTreeWalker.d.ts +162 -162
  79. package/lib/cjs/ElementTreeWalker.js +409 -409
  80. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  81. package/lib/cjs/Entity.d.ts +106 -106
  82. package/lib/cjs/Entity.js +134 -134
  83. package/lib/cjs/Entity.js.map +1 -1
  84. package/lib/cjs/EntityReferences.d.ts +49 -49
  85. package/lib/cjs/EntityReferences.js +95 -95
  86. package/lib/cjs/EntityReferences.js.map +1 -1
  87. package/lib/cjs/ExportGraphics.d.ts +317 -317
  88. package/lib/cjs/ExportGraphics.js +208 -208
  89. package/lib/cjs/ExportGraphics.js.map +1 -1
  90. package/lib/cjs/ExternalSource.d.ts +96 -96
  91. package/lib/cjs/ExternalSource.js +131 -131
  92. package/lib/cjs/ExternalSource.js.map +1 -1
  93. package/lib/cjs/GeoCoordConfig.d.ts +19 -19
  94. package/lib/cjs/GeoCoordConfig.js +85 -85
  95. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  96. package/lib/cjs/GeometrySummary.d.ts +4 -4
  97. package/lib/cjs/GeometrySummary.js +380 -380
  98. package/lib/cjs/GeometrySummary.js.map +1 -1
  99. package/lib/cjs/HubMock.d.ts +94 -94
  100. package/lib/cjs/HubMock.js +222 -222
  101. package/lib/cjs/HubMock.js.map +1 -1
  102. package/lib/cjs/IModelCloneContext.d.ts +8 -8
  103. package/lib/cjs/IModelCloneContext.js +15 -15
  104. package/lib/cjs/IModelCloneContext.js.map +1 -1
  105. package/lib/cjs/IModelDb.d.ts +1213 -1213
  106. package/lib/cjs/IModelDb.js +2392 -2392
  107. package/lib/cjs/IModelDb.js.map +1 -1
  108. package/lib/cjs/IModelElementCloneContext.d.ts +89 -89
  109. package/lib/cjs/IModelElementCloneContext.js +159 -159
  110. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  111. package/lib/cjs/IModelHost.d.ts +370 -369
  112. package/lib/cjs/IModelHost.d.ts.map +1 -1
  113. package/lib/cjs/IModelHost.js +497 -496
  114. package/lib/cjs/IModelHost.js.map +1 -1
  115. package/lib/cjs/IModelJsFs.d.ts +62 -62
  116. package/lib/cjs/IModelJsFs.js +140 -140
  117. package/lib/cjs/IModelJsFs.js.map +1 -1
  118. package/lib/cjs/IpcHost.d.ts +104 -104
  119. package/lib/cjs/IpcHost.js +278 -278
  120. package/lib/cjs/IpcHost.js.map +1 -1
  121. package/lib/cjs/LineStyle.d.ts +311 -311
  122. package/lib/cjs/LineStyle.js +295 -295
  123. package/lib/cjs/LineStyle.js.map +1 -1
  124. package/lib/cjs/LocalHub.d.ts +162 -162
  125. package/lib/cjs/LocalHub.js +585 -585
  126. package/lib/cjs/LocalHub.js.map +1 -1
  127. package/lib/cjs/LocalhostIpcHost.d.ts +21 -21
  128. package/lib/cjs/LocalhostIpcHost.js +81 -81
  129. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  130. package/lib/cjs/Material.d.ts +131 -131
  131. package/lib/cjs/Material.js +181 -181
  132. package/lib/cjs/Material.js.map +1 -1
  133. package/lib/cjs/Model.d.ts +392 -392
  134. package/lib/cjs/Model.js +485 -485
  135. package/lib/cjs/Model.js.map +1 -1
  136. package/lib/cjs/NativeAppStorage.d.ts +51 -51
  137. package/lib/cjs/NativeAppStorage.js +202 -202
  138. package/lib/cjs/NativeAppStorage.js.map +1 -1
  139. package/lib/cjs/NativeHost.d.ts +52 -52
  140. package/lib/cjs/NativeHost.js +163 -163
  141. package/lib/cjs/NativeHost.js.map +1 -1
  142. package/lib/cjs/NavigationRelationship.d.ts +156 -156
  143. package/lib/cjs/NavigationRelationship.js +225 -225
  144. package/lib/cjs/NavigationRelationship.js.map +1 -1
  145. package/lib/cjs/PromiseMemoizer.d.ts +51 -51
  146. package/lib/cjs/PromiseMemoizer.js +101 -101
  147. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  148. package/lib/cjs/PropertyStore.d.ts +132 -132
  149. package/lib/cjs/PropertyStore.js +11 -11
  150. package/lib/cjs/PropertyStore.js.map +1 -1
  151. package/lib/cjs/Relationship.d.ts +416 -416
  152. package/lib/cjs/Relationship.js +494 -494
  153. package/lib/cjs/Relationship.js.map +1 -1
  154. package/lib/cjs/RpcBackend.d.ts +5 -5
  155. package/lib/cjs/RpcBackend.js +32 -32
  156. package/lib/cjs/RpcBackend.js.map +1 -1
  157. package/lib/cjs/SQLiteDb.d.ts +219 -219
  158. package/lib/cjs/SQLiteDb.js +214 -214
  159. package/lib/cjs/SQLiteDb.js.map +1 -1
  160. package/lib/cjs/Schema.d.ts +55 -55
  161. package/lib/cjs/Schema.js +83 -83
  162. package/lib/cjs/Schema.js.map +1 -1
  163. package/lib/cjs/ServerBasedLocks.d.ts +57 -57
  164. package/lib/cjs/ServerBasedLocks.js +168 -168
  165. package/lib/cjs/ServerBasedLocks.js.map +1 -1
  166. package/lib/cjs/SqliteStatement.d.ts +360 -360
  167. package/lib/cjs/SqliteStatement.js +586 -586
  168. package/lib/cjs/SqliteStatement.js.map +1 -1
  169. package/lib/cjs/Texture.d.ts +58 -58
  170. package/lib/cjs/Texture.js +82 -82
  171. package/lib/cjs/Texture.js.map +1 -1
  172. package/lib/cjs/TileStorage.d.ts +25 -18
  173. package/lib/cjs/TileStorage.d.ts.map +1 -1
  174. package/lib/cjs/TileStorage.js +102 -90
  175. package/lib/cjs/TileStorage.js.map +1 -1
  176. package/lib/cjs/TxnManager.d.ts +202 -202
  177. package/lib/cjs/TxnManager.js +356 -356
  178. package/lib/cjs/TxnManager.js.map +1 -1
  179. package/lib/cjs/ViewDefinition.d.ts +439 -439
  180. package/lib/cjs/ViewDefinition.js +646 -646
  181. package/lib/cjs/ViewDefinition.js.map +1 -1
  182. package/lib/cjs/ViewStateHydrator.d.ts +13 -13
  183. package/lib/cjs/ViewStateHydrator.js +103 -103
  184. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  185. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  186. package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +67 -67
  187. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +31 -31
  188. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +52 -52
  189. package/lib/cjs/assets/Settings/backend.setting.json5 +138 -138
  190. package/lib/cjs/core-backend.d.ts +184 -184
  191. package/lib/cjs/core-backend.js +204 -204
  192. package/lib/cjs/core-backend.js.map +1 -1
  193. package/lib/cjs/domains/FunctionalElements.d.ts +101 -101
  194. package/lib/cjs/domains/FunctionalElements.js +145 -145
  195. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  196. package/lib/cjs/domains/FunctionalSchema.d.ts +13 -13
  197. package/lib/cjs/domains/FunctionalSchema.js +40 -40
  198. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  199. package/lib/cjs/domains/GenericElements.d.ts +177 -177
  200. package/lib/cjs/domains/GenericElements.js +263 -263
  201. package/lib/cjs/domains/GenericElements.js.map +1 -1
  202. package/lib/cjs/domains/GenericSchema.d.ts +10 -10
  203. package/lib/cjs/domains/GenericSchema.js +28 -28
  204. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  205. package/lib/cjs/rpc/multipart.d.ts +11 -11
  206. package/lib/cjs/rpc/multipart.js +71 -71
  207. package/lib/cjs/rpc/multipart.js.map +1 -1
  208. package/lib/cjs/rpc/tracing.d.ts +28 -28
  209. package/lib/cjs/rpc/tracing.js +74 -74
  210. package/lib/cjs/rpc/tracing.js.map +1 -1
  211. package/lib/cjs/rpc/web/logging.d.ts +9 -9
  212. package/lib/cjs/rpc/web/logging.js +43 -43
  213. package/lib/cjs/rpc/web/logging.js.map +1 -1
  214. package/lib/cjs/rpc/web/request.d.ts +6 -6
  215. package/lib/cjs/rpc/web/request.js +74 -74
  216. package/lib/cjs/rpc/web/request.js.map +1 -1
  217. package/lib/cjs/rpc/web/response.d.ts +6 -6
  218. package/lib/cjs/rpc/web/response.js +106 -106
  219. package/lib/cjs/rpc/web/response.js.map +1 -1
  220. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts +15 -15
  221. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js +32 -32
  222. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  223. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +47 -47
  224. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +294 -294
  225. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  226. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts +22 -22
  227. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +211 -211
  228. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  229. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +36 -36
  230. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +168 -168
  231. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  232. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +16 -16
  233. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +43 -43
  234. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  235. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts +15 -15
  236. package/lib/cjs/rpc-impl/WipRpcImpl.js +37 -37
  237. package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -1
  238. package/lib/cjs/workspace/Settings.d.ts +186 -186
  239. package/lib/cjs/workspace/Settings.js +155 -155
  240. package/lib/cjs/workspace/Settings.js.map +1 -1
  241. package/lib/cjs/workspace/SettingsSchemas.d.ts +75 -75
  242. package/lib/cjs/workspace/SettingsSchemas.js +191 -191
  243. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  244. package/lib/cjs/workspace/Workspace.d.ts +414 -414
  245. package/lib/cjs/workspace/Workspace.js +543 -543
  246. package/lib/cjs/workspace/Workspace.js.map +1 -1
  247. package/package.json +17 -16
@@ -1,44 +1,44 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module RpcInterface
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.SnapshotIModelRpcImpl = void 0;
11
- const core_common_1 = require("@itwin/core-common");
12
- const IModelDb_1 = require("../IModelDb");
13
- const IModelHost_1 = require("../IModelHost");
14
- /** The backend implementation of SnapshotIModelRpcInterface.
15
- * @internal
16
- */
17
- class SnapshotIModelRpcImpl extends core_common_1.RpcInterface {
18
- static register() { core_common_1.RpcManager.registerImpl(core_common_1.SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }
19
- /** Ask the backend to open a snapshot iModel from a file name that is resolved by the backend. */
20
- async openFile(filePath, opts) {
21
- let resolvedFileName = filePath;
22
- if (IModelHost_1.IModelHost.snapshotFileNameResolver) {
23
- resolvedFileName = IModelHost_1.IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath);
24
- if (undefined === resolvedFileName)
25
- throw new core_common_1.IModelNotFoundResponse();
26
- }
27
- return IModelDb_1.SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();
28
- }
29
- /** Ask the backend to open a snapshot iModel from a key that is resolved by the backend. */
30
- async openRemote(fileKey, opts) {
31
- var _a;
32
- const resolvedFileName = (_a = IModelHost_1.IModelHost.snapshotFileNameResolver) === null || _a === void 0 ? void 0 : _a.resolveKey(fileKey);
33
- if (undefined === resolvedFileName)
34
- throw new core_common_1.IModelNotFoundResponse();
35
- return IModelDb_1.SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();
36
- }
37
- /** Ask the backend to close a snapshot iModel. */
38
- async close(tokenProps) {
39
- IModelDb_1.SnapshotDb.findByKey(tokenProps.key).close();
40
- return true;
41
- }
42
- }
43
- exports.SnapshotIModelRpcImpl = SnapshotIModelRpcImpl;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module RpcInterface
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.SnapshotIModelRpcImpl = void 0;
11
+ const core_common_1 = require("@itwin/core-common");
12
+ const IModelDb_1 = require("../IModelDb");
13
+ const IModelHost_1 = require("../IModelHost");
14
+ /** The backend implementation of SnapshotIModelRpcInterface.
15
+ * @internal
16
+ */
17
+ class SnapshotIModelRpcImpl extends core_common_1.RpcInterface {
18
+ static register() { core_common_1.RpcManager.registerImpl(core_common_1.SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }
19
+ /** Ask the backend to open a snapshot iModel from a file name that is resolved by the backend. */
20
+ async openFile(filePath, opts) {
21
+ let resolvedFileName = filePath;
22
+ if (IModelHost_1.IModelHost.snapshotFileNameResolver) {
23
+ resolvedFileName = IModelHost_1.IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath);
24
+ if (undefined === resolvedFileName)
25
+ throw new core_common_1.IModelNotFoundResponse();
26
+ }
27
+ return IModelDb_1.SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();
28
+ }
29
+ /** Ask the backend to open a snapshot iModel from a key that is resolved by the backend. */
30
+ async openRemote(fileKey, opts) {
31
+ var _a;
32
+ const resolvedFileName = (_a = IModelHost_1.IModelHost.snapshotFileNameResolver) === null || _a === void 0 ? void 0 : _a.resolveKey(fileKey);
33
+ if (undefined === resolvedFileName)
34
+ throw new core_common_1.IModelNotFoundResponse();
35
+ return IModelDb_1.SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();
36
+ }
37
+ /** Ask the backend to close a snapshot iModel. */
38
+ async close(tokenProps) {
39
+ IModelDb_1.SnapshotDb.findByKey(tokenProps.key).close();
40
+ return true;
41
+ }
42
+ }
43
+ exports.SnapshotIModelRpcImpl = SnapshotIModelRpcImpl;
44
44
  //# sourceMappingURL=SnapshotIModelRpcImpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SnapshotIModelRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/SnapshotIModelRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAE4B;AAC5B,0CAAyC;AACzC,8CAA2C;AAE3C;;GAEG;AACH,MAAa,qBAAsB,SAAQ,0BAAY;IAC9C,MAAM,CAAC,QAAQ,KAAK,wBAAU,CAAC,YAAY,CAAC,wCAA0B,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAExG,kGAAkG;IAC3F,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,IAA0B;QAChE,IAAI,gBAAgB,GAAuB,QAAQ,CAAC;QACpD,IAAI,uBAAU,CAAC,wBAAwB,EAAE;YACvC,gBAAgB,GAAG,uBAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YACpF,IAAI,SAAS,KAAK,gBAAgB;gBAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC;SACtC;QACD,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC1E,CAAC;IAED,4FAA4F;IACrF,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,IAA0B;;QACjE,MAAM,gBAAgB,GAAG,MAAA,uBAAU,CAAC,wBAAwB,0CAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QAClF,IAAI,SAAS,KAAK,gBAAgB;YAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC;QAErC,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC/F,CAAC;IAED,kDAAkD;IAC3C,KAAK,CAAC,KAAK,CAAC,UAA0B;QAC3C,qBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,sDA4BC","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 {\r\n IModelConnectionProps, IModelNotFoundResponse, IModelRpcProps, RpcInterface, RpcManager, SnapshotIModelRpcInterface, SnapshotOpenOptions,\r\n} from \"@itwin/core-common\";\r\nimport { SnapshotDb } from \"../IModelDb\";\r\nimport { IModelHost } from \"../IModelHost\";\r\n\r\n/** The backend implementation of SnapshotIModelRpcInterface.\r\n * @internal\r\n */\r\nexport class SnapshotIModelRpcImpl extends RpcInterface implements SnapshotIModelRpcInterface { // eslint-disable-line deprecation/deprecation\r\n public static register() { RpcManager.registerImpl(SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }\r\n\r\n /** Ask the backend to open a snapshot iModel from a file name that is resolved by the backend. */\r\n public async openFile(filePath: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\r\n let resolvedFileName: string | undefined = filePath;\r\n if (IModelHost.snapshotFileNameResolver) {\r\n resolvedFileName = IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath);\r\n if (undefined === resolvedFileName)\r\n throw new IModelNotFoundResponse();\r\n }\r\n return SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();\r\n }\r\n\r\n /** Ask the backend to open a snapshot iModel from a key that is resolved by the backend. */\r\n public async openRemote(fileKey: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\r\n const resolvedFileName = IModelHost.snapshotFileNameResolver?.resolveKey(fileKey);\r\n if (undefined === resolvedFileName)\r\n throw new IModelNotFoundResponse();\r\n\r\n return SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();\r\n }\r\n\r\n /** Ask the backend to close a snapshot iModel. */\r\n public async close(tokenProps: IModelRpcProps): Promise<boolean> {\r\n SnapshotDb.findByKey(tokenProps.key).close();\r\n return true;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SnapshotIModelRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/SnapshotIModelRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAE4B;AAC5B,0CAAyC;AACzC,8CAA2C;AAE3C;;GAEG;AACH,MAAa,qBAAsB,SAAQ,0BAAY;IAC9C,MAAM,CAAC,QAAQ,KAAK,wBAAU,CAAC,YAAY,CAAC,wCAA0B,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAExG,kGAAkG;IAC3F,KAAK,CAAC,QAAQ,CAAC,QAAgB,EAAE,IAA0B;QAChE,IAAI,gBAAgB,GAAuB,QAAQ,CAAC;QACpD,IAAI,uBAAU,CAAC,wBAAwB,EAAE;YACvC,gBAAgB,GAAG,uBAAU,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YACpF,IAAI,SAAS,KAAK,gBAAgB;gBAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC;SACtC;QACD,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC1E,CAAC;IAED,4FAA4F;IACrF,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,IAA0B;;QACjE,MAAM,gBAAgB,GAAG,MAAA,uBAAU,CAAC,wBAAwB,0CAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QAClF,IAAI,SAAS,KAAK,gBAAgB;YAChC,MAAM,IAAI,oCAAsB,EAAE,CAAC;QAErC,OAAO,qBAAU,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAC/F,CAAC;IAED,kDAAkD;IAC3C,KAAK,CAAC,KAAK,CAAC,UAA0B;QAC3C,qBAAU,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,sDA4BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\n\nimport {\n IModelConnectionProps, IModelNotFoundResponse, IModelRpcProps, RpcInterface, RpcManager, SnapshotIModelRpcInterface, SnapshotOpenOptions,\n} from \"@itwin/core-common\";\nimport { SnapshotDb } from \"../IModelDb\";\nimport { IModelHost } from \"../IModelHost\";\n\n/** The backend implementation of SnapshotIModelRpcInterface.\n * @internal\n */\nexport class SnapshotIModelRpcImpl extends RpcInterface implements SnapshotIModelRpcInterface { // eslint-disable-line deprecation/deprecation\n public static register() { RpcManager.registerImpl(SnapshotIModelRpcInterface, SnapshotIModelRpcImpl); }\n\n /** Ask the backend to open a snapshot iModel from a file name that is resolved by the backend. */\n public async openFile(filePath: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n let resolvedFileName: string | undefined = filePath;\n if (IModelHost.snapshotFileNameResolver) {\n resolvedFileName = IModelHost.snapshotFileNameResolver.tryResolveFileName(filePath);\n if (undefined === resolvedFileName)\n throw new IModelNotFoundResponse();\n }\n return SnapshotDb.openFile(resolvedFileName, opts).getConnectionProps();\n }\n\n /** Ask the backend to open a snapshot iModel from a key that is resolved by the backend. */\n public async openRemote(fileKey: string, opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> {\n const resolvedFileName = IModelHost.snapshotFileNameResolver?.resolveKey(fileKey);\n if (undefined === resolvedFileName)\n throw new IModelNotFoundResponse();\n\n return SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();\n }\n\n /** Ask the backend to close a snapshot iModel. */\n public async close(tokenProps: IModelRpcProps): Promise<boolean> {\n SnapshotDb.findByKey(tokenProps.key).close();\n return true;\n }\n}\n"]}
@@ -1,16 +1,16 @@
1
- /** @packageDocumentation
2
- * @module RpcInterface
3
- */
4
- import { ChangedElements, IModelRpcProps, RpcInterface, WipRpcInterface } from "@itwin/core-common";
5
- /** The backend implementation of WipRpcInterface.
6
- * @internal
7
- */
8
- export declare class WipRpcImpl extends RpcInterface implements WipRpcInterface {
9
- static register(): void;
10
- placeholder(_tokenProps: IModelRpcProps): Promise<string>;
11
- isChangeCacheAttached(tokenProps: IModelRpcProps): Promise<boolean>;
12
- attachChangeCache(tokenProps: IModelRpcProps): Promise<void>;
13
- getChangedElements(tokenProps: IModelRpcProps, startChangesetId: string, endChangesetId: string): Promise<ChangedElements | undefined>;
14
- isChangesetProcessed(tokenProps: IModelRpcProps, changesetId: string): Promise<boolean>;
15
- }
1
+ /** @packageDocumentation
2
+ * @module RpcInterface
3
+ */
4
+ import { ChangedElements, IModelRpcProps, RpcInterface, WipRpcInterface } from "@itwin/core-common";
5
+ /** The backend implementation of WipRpcInterface.
6
+ * @internal
7
+ */
8
+ export declare class WipRpcImpl extends RpcInterface implements WipRpcInterface {
9
+ static register(): void;
10
+ placeholder(_tokenProps: IModelRpcProps): Promise<string>;
11
+ isChangeCacheAttached(tokenProps: IModelRpcProps): Promise<boolean>;
12
+ attachChangeCache(tokenProps: IModelRpcProps): Promise<void>;
13
+ getChangedElements(tokenProps: IModelRpcProps, startChangesetId: string, endChangesetId: string): Promise<ChangedElements | undefined>;
14
+ isChangesetProcessed(tokenProps: IModelRpcProps, changesetId: string): Promise<boolean>;
15
+ }
16
16
  //# sourceMappingURL=WipRpcImpl.d.ts.map
@@ -1,38 +1,38 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module RpcInterface
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.WipRpcImpl = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const core_common_1 = require("@itwin/core-common");
13
- const ChangedElementsManager_1 = require("../ChangedElementsManager");
14
- const ChangeSummaryManager_1 = require("../ChangeSummaryManager");
15
- const IModelDb_1 = require("../IModelDb");
16
- /** The backend implementation of WipRpcInterface.
17
- * @internal
18
- */
19
- class WipRpcImpl extends core_common_1.RpcInterface {
20
- static register() { core_common_1.RpcManager.registerImpl(core_common_1.WipRpcInterface, WipRpcImpl); }
21
- async placeholder(_tokenProps) { return "placeholder"; }
22
- async isChangeCacheAttached(tokenProps) {
23
- return ChangeSummaryManager_1.ChangeSummaryManager.isChangeCacheAttached(IModelDb_1.BriefcaseDb.findByKey(tokenProps.key));
24
- }
25
- async attachChangeCache(tokenProps) {
26
- ChangeSummaryManager_1.ChangeSummaryManager.attachChangeCache(IModelDb_1.BriefcaseDb.findByKey(tokenProps.key));
27
- }
28
- async getChangedElements(tokenProps, startChangesetId, endChangesetId) {
29
- (0, core_bentley_1.assert)(undefined !== tokenProps.iModelId);
30
- return ChangedElementsManager_1.ChangedElementsManager.getChangedElements(tokenProps.iModelId, startChangesetId, endChangesetId);
31
- }
32
- async isChangesetProcessed(tokenProps, changesetId) {
33
- (0, core_bentley_1.assert)(undefined !== tokenProps.iModelId);
34
- return ChangedElementsManager_1.ChangedElementsManager.isProcessed(tokenProps.iModelId, changesetId);
35
- }
36
- }
37
- exports.WipRpcImpl = WipRpcImpl;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module RpcInterface
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.WipRpcImpl = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const core_common_1 = require("@itwin/core-common");
13
+ const ChangedElementsManager_1 = require("../ChangedElementsManager");
14
+ const ChangeSummaryManager_1 = require("../ChangeSummaryManager");
15
+ const IModelDb_1 = require("../IModelDb");
16
+ /** The backend implementation of WipRpcInterface.
17
+ * @internal
18
+ */
19
+ class WipRpcImpl extends core_common_1.RpcInterface {
20
+ static register() { core_common_1.RpcManager.registerImpl(core_common_1.WipRpcInterface, WipRpcImpl); }
21
+ async placeholder(_tokenProps) { return "placeholder"; }
22
+ async isChangeCacheAttached(tokenProps) {
23
+ return ChangeSummaryManager_1.ChangeSummaryManager.isChangeCacheAttached(IModelDb_1.BriefcaseDb.findByKey(tokenProps.key));
24
+ }
25
+ async attachChangeCache(tokenProps) {
26
+ ChangeSummaryManager_1.ChangeSummaryManager.attachChangeCache(IModelDb_1.BriefcaseDb.findByKey(tokenProps.key));
27
+ }
28
+ async getChangedElements(tokenProps, startChangesetId, endChangesetId) {
29
+ (0, core_bentley_1.assert)(undefined !== tokenProps.iModelId);
30
+ return ChangedElementsManager_1.ChangedElementsManager.getChangedElements(tokenProps.iModelId, startChangesetId, endChangesetId);
31
+ }
32
+ async isChangesetProcessed(tokenProps, changesetId) {
33
+ (0, core_bentley_1.assert)(undefined !== tokenProps.iModelId);
34
+ return ChangedElementsManager_1.ChangedElementsManager.isProcessed(tokenProps.iModelId, changesetId);
35
+ }
36
+ }
37
+ exports.WipRpcImpl = WipRpcImpl;
38
38
  //# sourceMappingURL=WipRpcImpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WipRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/WipRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,oDAAgH;AAChH,sEAAmE;AACnE,kEAA+D;AAC/D,0CAA0C;AAE1C;;GAEG;AACH,MAAa,UAAW,SAAQ,0BAAY;IAEnC,MAAM,CAAC,QAAQ,KAAK,wBAAU,CAAC,YAAY,CAAC,6BAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3E,KAAK,CAAC,WAAW,CAAC,WAA2B,IAAqB,OAAO,aAAa,CAAC,CAAC,CAAC;IAEzF,KAAK,CAAC,qBAAqB,CAAC,UAA0B;QAC3D,OAAO,2CAAoB,CAAC,qBAAqB,CAAC,sBAAW,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3F,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,UAA0B;QACvD,2CAAoB,CAAC,iBAAiB,CAAC,sBAAW,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,UAA0B,EAAE,gBAAwB,EAAE,cAAsB;QAC1G,IAAA,qBAAM,EAAC,SAAS,KAAK,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC1C,OAAO,+CAAsB,CAAC,kBAAkB,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAC1G,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,UAA0B,EAAE,WAAmB;QAC/E,IAAA,qBAAM,EAAC,SAAS,KAAK,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC1C,OAAO,+CAAsB,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC;CACF;AAtBD,gCAsBC","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 { assert } from \"@itwin/core-bentley\";\r\nimport { ChangedElements, IModelRpcProps, RpcInterface, RpcManager, WipRpcInterface } from \"@itwin/core-common\";\r\nimport { ChangedElementsManager } from \"../ChangedElementsManager\";\r\nimport { ChangeSummaryManager } from \"../ChangeSummaryManager\";\r\nimport { BriefcaseDb } from \"../IModelDb\";\r\n\r\n/** The backend implementation of WipRpcInterface.\r\n * @internal\r\n */\r\nexport class WipRpcImpl extends RpcInterface implements WipRpcInterface { // eslint-disable-line deprecation/deprecation\r\n\r\n public static register() { RpcManager.registerImpl(WipRpcInterface, WipRpcImpl); }\r\n public async placeholder(_tokenProps: IModelRpcProps): Promise<string> { return \"placeholder\"; }\r\n\r\n public async isChangeCacheAttached(tokenProps: IModelRpcProps): Promise<boolean> {\r\n return ChangeSummaryManager.isChangeCacheAttached(BriefcaseDb.findByKey(tokenProps.key));\r\n }\r\n\r\n public async attachChangeCache(tokenProps: IModelRpcProps): Promise<void> {\r\n ChangeSummaryManager.attachChangeCache(BriefcaseDb.findByKey(tokenProps.key));\r\n }\r\n\r\n public async getChangedElements(tokenProps: IModelRpcProps, startChangesetId: string, endChangesetId: string): Promise<ChangedElements | undefined> {\r\n assert(undefined !== tokenProps.iModelId);\r\n return ChangedElementsManager.getChangedElements(tokenProps.iModelId, startChangesetId, endChangesetId);\r\n }\r\n\r\n public async isChangesetProcessed(tokenProps: IModelRpcProps, changesetId: string): Promise<boolean> {\r\n assert(undefined !== tokenProps.iModelId);\r\n return ChangedElementsManager.isProcessed(tokenProps.iModelId, changesetId);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"WipRpcImpl.js","sourceRoot":"","sources":["../../../src/rpc-impl/WipRpcImpl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,oDAAgH;AAChH,sEAAmE;AACnE,kEAA+D;AAC/D,0CAA0C;AAE1C;;GAEG;AACH,MAAa,UAAW,SAAQ,0BAAY;IAEnC,MAAM,CAAC,QAAQ,KAAK,wBAAU,CAAC,YAAY,CAAC,6BAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAC3E,KAAK,CAAC,WAAW,CAAC,WAA2B,IAAqB,OAAO,aAAa,CAAC,CAAC,CAAC;IAEzF,KAAK,CAAC,qBAAqB,CAAC,UAA0B;QAC3D,OAAO,2CAAoB,CAAC,qBAAqB,CAAC,sBAAW,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3F,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,UAA0B;QACvD,2CAAoB,CAAC,iBAAiB,CAAC,sBAAW,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAAC,UAA0B,EAAE,gBAAwB,EAAE,cAAsB;QAC1G,IAAA,qBAAM,EAAC,SAAS,KAAK,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC1C,OAAO,+CAAsB,CAAC,kBAAkB,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAC1G,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,UAA0B,EAAE,WAAmB;QAC/E,IAAA,qBAAM,EAAC,SAAS,KAAK,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC1C,OAAO,+CAAsB,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC;CACF;AAtBD,gCAsBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { ChangedElements, IModelRpcProps, RpcInterface, RpcManager, WipRpcInterface } from \"@itwin/core-common\";\nimport { ChangedElementsManager } from \"../ChangedElementsManager\";\nimport { ChangeSummaryManager } from \"../ChangeSummaryManager\";\nimport { BriefcaseDb } from \"../IModelDb\";\n\n/** The backend implementation of WipRpcInterface.\n * @internal\n */\nexport class WipRpcImpl extends RpcInterface implements WipRpcInterface { // eslint-disable-line deprecation/deprecation\n\n public static register() { RpcManager.registerImpl(WipRpcInterface, WipRpcImpl); }\n public async placeholder(_tokenProps: IModelRpcProps): Promise<string> { return \"placeholder\"; }\n\n public async isChangeCacheAttached(tokenProps: IModelRpcProps): Promise<boolean> {\n return ChangeSummaryManager.isChangeCacheAttached(BriefcaseDb.findByKey(tokenProps.key));\n }\n\n public async attachChangeCache(tokenProps: IModelRpcProps): Promise<void> {\n ChangeSummaryManager.attachChangeCache(BriefcaseDb.findByKey(tokenProps.key));\n }\n\n public async getChangedElements(tokenProps: IModelRpcProps, startChangesetId: string, endChangesetId: string): Promise<ChangedElements | undefined> {\n assert(undefined !== tokenProps.iModelId);\n return ChangedElementsManager.getChangedElements(tokenProps.iModelId, startChangesetId, endChangesetId);\n }\n\n public async isChangesetProcessed(tokenProps: IModelRpcProps, changesetId: string): Promise<boolean> {\n assert(undefined !== tokenProps.iModelId);\n return ChangedElementsManager.isProcessed(tokenProps.iModelId, changesetId);\n }\n}\n"]}
@@ -1,187 +1,187 @@
1
- /** @packageDocumentation
2
- * @module Workspace
3
- */
4
- import { BeEvent, JSONSchemaType } from "@itwin/core-bentley";
5
- import { LocalDirName, LocalFileName } from "@itwin/core-common";
6
- /** The type of a Setting, according to its schema
7
- * @beta
8
- */
9
- export declare type SettingType = JSONSchemaType;
10
- /**
11
- * The name of a Setting. SettingNames must be valid JavaScript property names, defined in a [[SettingSchema]].
12
- * @see [SettingName]($docs/learning/backend/Workspace#settingnames)
13
- * @beta
14
- */
15
- export declare type SettingName = string;
16
- /** The name of a [[SettingDictionary]]. `SettingDictionary`s are stored in [[Settings]] and may be removed by DictionaryName.
17
- * DictionaryNames must be valid JavaScript property names.
18
- * @beta
19
- */
20
- export declare type DictionaryName = string;
21
- /**
22
- * A function called by [[Settings.resolveSetting]] for every SettingDictionary with a Setting that matches a name. The
23
- * SettingDictionaries are sorted by priority and this function is called in priority order with the highest priority first.
24
- * When this function returns a non-undefined value, the iteration is stopped and that value is returned. In this way,
25
- * applications can "combine" the prioritized Setting values as appropriate. The default implementation of this function
26
- * used by [[Settings.getSetting]] merely returns a clone of the value the first time it is called, so the highest priority
27
- * value is returned.
28
- * @beta
29
- */
30
- export declare type SettingResolver<T> = (val: T, dict: DictionaryName, priority: SettingsPriority) => T | undefined;
31
- /** An entry in the array returned by [[Settings.inspectSetting]]
32
- * @beta
33
- *
34
- */
35
- export interface SettingInspector<T> {
36
- value: T;
37
- dictionary: DictionaryName;
38
- priority: number;
39
- }
40
- /** An object with string-named members (as opposed to an array object).
41
- * @beta
42
- */
43
- export interface SettingObject {
44
- [name: string]: SettingType;
45
- }
46
- /**
47
- * An object with Settings as its members. A SettingDictionary also has a name and generally comes from a parsed JSON file, but
48
- * may also be created in memory by applications
49
- * @beta
50
- */
51
- export declare type SettingDictionary = SettingObject;
52
- /**
53
- * Values for SettingsPriority determine the sort order for Settings. Higher values take precedence over lower values.
54
- * @beta
55
- */
56
- export declare enum SettingsPriority {
57
- /** values supplied default-settings files */
58
- defaults = 100,
59
- /** values supplied by applications at runtime */
60
- application = 200,
61
- /** values that apply to all iTwins for an organization. */
62
- organization = 300,
63
- /** values that apply to all iModels in an iTwin. */
64
- iTwin = 400,
65
- /** values that apply to a single iModel. */
66
- iModel = 500
67
- }
68
- /** The current set of Settings for a Workspace.
69
- * @beta
70
- */
71
- export interface Settings {
72
- /** @internal */
73
- close(): void;
74
- /** Event raised whenever a SettingsDictionary is added or removed. */
75
- readonly onSettingsChanged: BeEvent<() => void>;
76
- /** Add a SettingDictionary from a local settings file. The file should be in [JSON5](https://json5.org/) format. It is read
77
- * and parsed and the fileName is used as the DictionaryName.
78
- * @param fileName the name of a local settings file of the SettingDictionary. This becomes the DictionaryName.
79
- * @param priority the SettingsPriority for the SettingDictionary
80
- * @note If the SettingDictionary was previously added, the new content overrides the old content.
81
- */
82
- addFile(fileName: LocalFileName, priority: SettingsPriority): void;
83
- /** Add all files in the supplied directory with the extension ".json" or ".json5"
84
- * @param dirName the name of a local settings directory
85
- */
86
- addDirectory(dirName: LocalDirName, priority: SettingsPriority): void;
87
- /** Add a SettingDictionary from a JSON5 stringified string. The string is parsed and the resultant object is added as a SettingDictionary.
88
- * @param dictionaryName the name of the SettingDictionary
89
- * @param priority the SettingsPriority for the SettingDictionary
90
- * @param settingsJson the JSON5 stringified string to be parsed.
91
- * @note If the SettingDictionary was previously added, the new content overrides the old content.
92
- */
93
- addJson(dictionaryName: DictionaryName, priority: SettingsPriority, settingsJson: string): void;
94
- /** Add a SettingDictionary object.
95
- * @param dictionaryName the name of the SettingDictionary
96
- * @param priority the SettingsPriority for the SettingDictionary
97
- * @param settings the SettingDictionary object to be added.
98
- * @note If the SettingDictionary was previously added, the new content overrides the old content.
99
- */
100
- addDictionary(dictionaryName: DictionaryName, priority: SettingsPriority, settings: SettingDictionary): void;
101
- /** Remove a SettingDictionary by name. */
102
- dropDictionary(dictionaryName: DictionaryName): void;
103
- /**
104
- * Resolve a setting, by name, using a SettingResolver.
105
- * @param settingName The name of the setting to resolve
106
- * @param resolver function to be called for each SettingDictionary with a matching Setting. Iteration stops when it returns a non-undefined value.
107
- * @param defaultValue value returned if settingName is not present in any SettingDictionary or resolver never returned a value.
108
- * @returns the resolved setting value.
109
- */
110
- resolveSetting<T extends SettingType>(settingName: SettingName, resolver: SettingResolver<T>, defaultValue: T): T;
111
- resolveSetting<T extends SettingType>(settingName: SettingName, resolver: SettingResolver<T>, defaultValue?: T): T | undefined;
112
- /** Get the highest priority setting for a SettingName.
113
- * @param settingName The name of the setting
114
- * @param defaultValue value returned if settingName is not present in any SettingDictionary.
115
- * @note This method is generic on SettingType, but no type checking is actually performed at run time. So, if you
116
- * use this method to get a setting with an expected type, but its value is a different type, the return type of this method will be wrong.
117
- * You must always type check the result. Use the non-generic "get" methods (e.g. [[getString]]) if you only want the value
118
- * if its type is correct.
119
- */
120
- getSetting<T extends SettingType>(settingName: SettingName, defaultValue?: T): T | undefined;
121
- /** Get a string setting by SettingName.
122
- * @param settingName The name of the setting
123
- * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not a string.
124
- */
125
- getString(settingName: SettingName, defaultValue: string): string;
126
- getString(settingName: SettingName, defaultValue?: string): string | undefined;
127
- /** Get a boolean setting by SettingName.
128
- * @param settingName The name of the setting
129
- * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not a boolean.
130
- */
131
- getBoolean(settingName: SettingName, defaultValue: boolean): boolean;
132
- getBoolean(settingName: SettingName, defaultValue?: boolean): boolean | undefined;
133
- /** Get a number setting by SettingName.
134
- * @param settingName The name of the setting
135
- * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not a number.
136
- */
137
- getNumber(settingName: SettingName, defaultValue: number): number;
138
- getNumber(settingName: SettingName): number | undefined;
139
- /** Get an object setting by SettingName.
140
- * @param settingName The name of the setting
141
- * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not an object.
142
- */
143
- getObject<T extends object>(settingName: SettingName, defaultValue: T): T;
144
- getObject<T extends object>(settingName: SettingName): T | undefined;
145
- /** Get an array setting by SettingName.
146
- * @param settingName The name of the setting
147
- * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not an array.
148
- */
149
- getArray<T extends SettingType>(settingName: SettingName, defaultValue: Array<T>): Array<T>;
150
- getArray<T extends SettingType>(settingName: SettingName): Array<T> | undefined;
151
- /** Get an array of [[SettingInspector] objects, sorted in priority order, for all Settings that match a SettingName.
152
- * @note this method is mainly for debugging and diagnostics.
153
- */
154
- inspectSetting<T extends SettingType>(name: SettingName): SettingInspector<T>[];
155
- }
156
- /**
157
- * Internal implementation of Settings interface.
158
- * @internal
159
- */
160
- export declare class BaseSettings implements Settings {
161
- private _dictionaries;
162
- protected verifyPriority(_priority: SettingsPriority): void;
163
- close(): void;
164
- readonly onSettingsChanged: BeEvent<() => void>;
165
- addFile(fileName: LocalFileName, priority: SettingsPriority): void;
166
- addDirectory(dirName: LocalDirName, priority: SettingsPriority): void;
167
- addJson(dictionaryName: string, priority: SettingsPriority, settingsJson: string): void;
168
- addDictionary(dictionaryName: string, priority: SettingsPriority, settings: SettingDictionary): void;
169
- dropDictionary(dictionaryName: DictionaryName, raiseEvent?: boolean): boolean;
170
- resolveSetting<T extends SettingType>(name: SettingName, resolver: SettingResolver<T>, defaultValue?: T): T | undefined;
171
- getSetting<T extends SettingType>(name: SettingName, defaultValue?: T): T | undefined;
172
- /** for debugging. Returns an array of all values for a setting, sorted by priority.
173
- * @note values are not cloned. Do not modify objects or arrays.
174
- */
175
- inspectSetting<T extends SettingType>(name: SettingName): SettingInspector<T>[];
176
- getString(name: SettingName, defaultValue: string): string;
177
- getString(name: SettingName): string | undefined;
178
- getBoolean(name: SettingName, defaultValue: boolean): boolean;
179
- getBoolean(name: SettingName): boolean | undefined;
180
- getNumber(name: SettingName, defaultValue: number): number;
181
- getNumber(name: SettingName): number | undefined;
182
- getObject<T extends object>(name: SettingName, defaultValue: T): T;
183
- getObject<T extends object>(name: SettingName): T | undefined;
184
- getArray<T extends SettingType>(name: SettingName, defaultValue: Array<T>): Array<T>;
185
- getArray<T extends SettingType>(name: SettingName): Array<T> | undefined;
186
- }
1
+ /** @packageDocumentation
2
+ * @module Workspace
3
+ */
4
+ import { BeEvent, JSONSchemaType } from "@itwin/core-bentley";
5
+ import { LocalDirName, LocalFileName } from "@itwin/core-common";
6
+ /** The type of a Setting, according to its schema
7
+ * @beta
8
+ */
9
+ export declare type SettingType = JSONSchemaType;
10
+ /**
11
+ * The name of a Setting. SettingNames must be valid JavaScript property names, defined in a [[SettingSchema]].
12
+ * @see [SettingName]($docs/learning/backend/Workspace#settingnames)
13
+ * @beta
14
+ */
15
+ export declare type SettingName = string;
16
+ /** The name of a [[SettingDictionary]]. `SettingDictionary`s are stored in [[Settings]] and may be removed by DictionaryName.
17
+ * DictionaryNames must be valid JavaScript property names.
18
+ * @beta
19
+ */
20
+ export declare type DictionaryName = string;
21
+ /**
22
+ * A function called by [[Settings.resolveSetting]] for every SettingDictionary with a Setting that matches a name. The
23
+ * SettingDictionaries are sorted by priority and this function is called in priority order with the highest priority first.
24
+ * When this function returns a non-undefined value, the iteration is stopped and that value is returned. In this way,
25
+ * applications can "combine" the prioritized Setting values as appropriate. The default implementation of this function
26
+ * used by [[Settings.getSetting]] merely returns a clone of the value the first time it is called, so the highest priority
27
+ * value is returned.
28
+ * @beta
29
+ */
30
+ export declare type SettingResolver<T> = (val: T, dict: DictionaryName, priority: SettingsPriority) => T | undefined;
31
+ /** An entry in the array returned by [[Settings.inspectSetting]]
32
+ * @beta
33
+ *
34
+ */
35
+ export interface SettingInspector<T> {
36
+ value: T;
37
+ dictionary: DictionaryName;
38
+ priority: number;
39
+ }
40
+ /** An object with string-named members (as opposed to an array object).
41
+ * @beta
42
+ */
43
+ export interface SettingObject {
44
+ [name: string]: SettingType;
45
+ }
46
+ /**
47
+ * An object with Settings as its members. A SettingDictionary also has a name and generally comes from a parsed JSON file, but
48
+ * may also be created in memory by applications
49
+ * @beta
50
+ */
51
+ export declare type SettingDictionary = SettingObject;
52
+ /**
53
+ * Values for SettingsPriority determine the sort order for Settings. Higher values take precedence over lower values.
54
+ * @beta
55
+ */
56
+ export declare enum SettingsPriority {
57
+ /** values supplied default-settings files */
58
+ defaults = 100,
59
+ /** values supplied by applications at runtime */
60
+ application = 200,
61
+ /** values that apply to all iTwins for an organization. */
62
+ organization = 300,
63
+ /** values that apply to all iModels in an iTwin. */
64
+ iTwin = 400,
65
+ /** values that apply to a single iModel. */
66
+ iModel = 500
67
+ }
68
+ /** The current set of Settings for a Workspace.
69
+ * @beta
70
+ */
71
+ export interface Settings {
72
+ /** @internal */
73
+ close(): void;
74
+ /** Event raised whenever a SettingsDictionary is added or removed. */
75
+ readonly onSettingsChanged: BeEvent<() => void>;
76
+ /** Add a SettingDictionary from a local settings file. The file should be in [JSON5](https://json5.org/) format. It is read
77
+ * and parsed and the fileName is used as the DictionaryName.
78
+ * @param fileName the name of a local settings file of the SettingDictionary. This becomes the DictionaryName.
79
+ * @param priority the SettingsPriority for the SettingDictionary
80
+ * @note If the SettingDictionary was previously added, the new content overrides the old content.
81
+ */
82
+ addFile(fileName: LocalFileName, priority: SettingsPriority): void;
83
+ /** Add all files in the supplied directory with the extension ".json" or ".json5"
84
+ * @param dirName the name of a local settings directory
85
+ */
86
+ addDirectory(dirName: LocalDirName, priority: SettingsPriority): void;
87
+ /** Add a SettingDictionary from a JSON5 stringified string. The string is parsed and the resultant object is added as a SettingDictionary.
88
+ * @param dictionaryName the name of the SettingDictionary
89
+ * @param priority the SettingsPriority for the SettingDictionary
90
+ * @param settingsJson the JSON5 stringified string to be parsed.
91
+ * @note If the SettingDictionary was previously added, the new content overrides the old content.
92
+ */
93
+ addJson(dictionaryName: DictionaryName, priority: SettingsPriority, settingsJson: string): void;
94
+ /** Add a SettingDictionary object.
95
+ * @param dictionaryName the name of the SettingDictionary
96
+ * @param priority the SettingsPriority for the SettingDictionary
97
+ * @param settings the SettingDictionary object to be added.
98
+ * @note If the SettingDictionary was previously added, the new content overrides the old content.
99
+ */
100
+ addDictionary(dictionaryName: DictionaryName, priority: SettingsPriority, settings: SettingDictionary): void;
101
+ /** Remove a SettingDictionary by name. */
102
+ dropDictionary(dictionaryName: DictionaryName): void;
103
+ /**
104
+ * Resolve a setting, by name, using a SettingResolver.
105
+ * @param settingName The name of the setting to resolve
106
+ * @param resolver function to be called for each SettingDictionary with a matching Setting. Iteration stops when it returns a non-undefined value.
107
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary or resolver never returned a value.
108
+ * @returns the resolved setting value.
109
+ */
110
+ resolveSetting<T extends SettingType>(settingName: SettingName, resolver: SettingResolver<T>, defaultValue: T): T;
111
+ resolveSetting<T extends SettingType>(settingName: SettingName, resolver: SettingResolver<T>, defaultValue?: T): T | undefined;
112
+ /** Get the highest priority setting for a SettingName.
113
+ * @param settingName The name of the setting
114
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary.
115
+ * @note This method is generic on SettingType, but no type checking is actually performed at run time. So, if you
116
+ * use this method to get a setting with an expected type, but its value is a different type, the return type of this method will be wrong.
117
+ * You must always type check the result. Use the non-generic "get" methods (e.g. [[getString]]) if you only want the value
118
+ * if its type is correct.
119
+ */
120
+ getSetting<T extends SettingType>(settingName: SettingName, defaultValue?: T): T | undefined;
121
+ /** Get a string setting by SettingName.
122
+ * @param settingName The name of the setting
123
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not a string.
124
+ */
125
+ getString(settingName: SettingName, defaultValue: string): string;
126
+ getString(settingName: SettingName, defaultValue?: string): string | undefined;
127
+ /** Get a boolean setting by SettingName.
128
+ * @param settingName The name of the setting
129
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not a boolean.
130
+ */
131
+ getBoolean(settingName: SettingName, defaultValue: boolean): boolean;
132
+ getBoolean(settingName: SettingName, defaultValue?: boolean): boolean | undefined;
133
+ /** Get a number setting by SettingName.
134
+ * @param settingName The name of the setting
135
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not a number.
136
+ */
137
+ getNumber(settingName: SettingName, defaultValue: number): number;
138
+ getNumber(settingName: SettingName): number | undefined;
139
+ /** Get an object setting by SettingName.
140
+ * @param settingName The name of the setting
141
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not an object.
142
+ */
143
+ getObject<T extends object>(settingName: SettingName, defaultValue: T): T;
144
+ getObject<T extends object>(settingName: SettingName): T | undefined;
145
+ /** Get an array setting by SettingName.
146
+ * @param settingName The name of the setting
147
+ * @param defaultValue value returned if settingName is not present in any SettingDictionary, or if the highest priority setting is not an array.
148
+ */
149
+ getArray<T extends SettingType>(settingName: SettingName, defaultValue: Array<T>): Array<T>;
150
+ getArray<T extends SettingType>(settingName: SettingName): Array<T> | undefined;
151
+ /** Get an array of [[SettingInspector] objects, sorted in priority order, for all Settings that match a SettingName.
152
+ * @note this method is mainly for debugging and diagnostics.
153
+ */
154
+ inspectSetting<T extends SettingType>(name: SettingName): SettingInspector<T>[];
155
+ }
156
+ /**
157
+ * Internal implementation of Settings interface.
158
+ * @internal
159
+ */
160
+ export declare class BaseSettings implements Settings {
161
+ private _dictionaries;
162
+ protected verifyPriority(_priority: SettingsPriority): void;
163
+ close(): void;
164
+ readonly onSettingsChanged: BeEvent<() => void>;
165
+ addFile(fileName: LocalFileName, priority: SettingsPriority): void;
166
+ addDirectory(dirName: LocalDirName, priority: SettingsPriority): void;
167
+ addJson(dictionaryName: string, priority: SettingsPriority, settingsJson: string): void;
168
+ addDictionary(dictionaryName: string, priority: SettingsPriority, settings: SettingDictionary): void;
169
+ dropDictionary(dictionaryName: DictionaryName, raiseEvent?: boolean): boolean;
170
+ resolveSetting<T extends SettingType>(name: SettingName, resolver: SettingResolver<T>, defaultValue?: T): T | undefined;
171
+ getSetting<T extends SettingType>(name: SettingName, defaultValue?: T): T | undefined;
172
+ /** for debugging. Returns an array of all values for a setting, sorted by priority.
173
+ * @note values are not cloned. Do not modify objects or arrays.
174
+ */
175
+ inspectSetting<T extends SettingType>(name: SettingName): SettingInspector<T>[];
176
+ getString(name: SettingName, defaultValue: string): string;
177
+ getString(name: SettingName): string | undefined;
178
+ getBoolean(name: SettingName, defaultValue: boolean): boolean;
179
+ getBoolean(name: SettingName): boolean | undefined;
180
+ getNumber(name: SettingName, defaultValue: number): number;
181
+ getNumber(name: SettingName): number | undefined;
182
+ getObject<T extends object>(name: SettingName, defaultValue: T): T;
183
+ getObject<T extends object>(name: SettingName): T | undefined;
184
+ getArray<T extends SettingType>(name: SettingName, defaultValue: Array<T>): Array<T>;
185
+ getArray<T extends SettingType>(name: SettingName): Array<T> | undefined;
186
+ }
187
187
  //# sourceMappingURL=Settings.d.ts.map