@itwin/core-backend 4.0.0-dev.52 → 4.0.0-dev.54

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 (265) hide show
  1. package/lib/cjs/AliCloudStorageService.d.ts +23 -23
  2. package/lib/cjs/AliCloudStorageService.js +71 -71
  3. package/lib/cjs/AliCloudStorageService.js.map +1 -1
  4. package/lib/cjs/BackendHubAccess.d.ts +224 -224
  5. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  6. package/lib/cjs/BackendHubAccess.js +41 -41
  7. package/lib/cjs/BackendHubAccess.js.map +1 -1
  8. package/lib/cjs/BackendLoggerCategory.d.ts +90 -91
  9. package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
  10. package/lib/cjs/BackendLoggerCategory.js +98 -99
  11. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  12. package/lib/cjs/BisCoreSchema.d.ts +21 -21
  13. package/lib/cjs/BisCoreSchema.js +60 -60
  14. package/lib/cjs/BisCoreSchema.js.map +1 -1
  15. package/lib/cjs/BriefcaseManager.d.ts +170 -170
  16. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  17. package/lib/cjs/BriefcaseManager.js +408 -408
  18. package/lib/cjs/BriefcaseManager.js.map +1 -1
  19. package/lib/cjs/Category.d.ts +153 -153
  20. package/lib/cjs/Category.js +243 -243
  21. package/lib/cjs/Category.js.map +1 -1
  22. package/lib/cjs/ChangeSummaryManager.d.ts +187 -187
  23. package/lib/cjs/ChangeSummaryManager.js +446 -446
  24. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  25. package/lib/cjs/ChangedElementsDb.d.ts +99 -99
  26. package/lib/cjs/ChangedElementsDb.js +165 -165
  27. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  28. package/lib/cjs/ChangedElementsManager.d.ts +39 -39
  29. package/lib/cjs/ChangedElementsManager.js +88 -88
  30. package/lib/cjs/ChangedElementsManager.js.map +1 -1
  31. package/lib/cjs/ChannelControl.d.ts +69 -69
  32. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  33. package/lib/cjs/ChannelControl.js +88 -88
  34. package/lib/cjs/ChannelControl.js.map +1 -1
  35. package/lib/cjs/CheckpointManager.d.ts +121 -121
  36. package/lib/cjs/CheckpointManager.d.ts.map +1 -1
  37. package/lib/cjs/CheckpointManager.js +351 -351
  38. package/lib/cjs/CheckpointManager.js.map +1 -1
  39. package/lib/cjs/ClassRegistry.d.ts +79 -79
  40. package/lib/cjs/ClassRegistry.js +254 -249
  41. package/lib/cjs/ClassRegistry.js.map +1 -1
  42. package/lib/cjs/CloudSqlite.d.ts +355 -355
  43. package/lib/cjs/CloudSqlite.js +154 -154
  44. package/lib/cjs/CloudSqlite.js.map +1 -1
  45. package/lib/cjs/CloudStorageBackend.d.ts +58 -58
  46. package/lib/cjs/CloudStorageBackend.js +170 -170
  47. package/lib/cjs/CloudStorageBackend.js.map +1 -1
  48. package/lib/cjs/CodeService.d.ts +396 -396
  49. package/lib/cjs/CodeService.js +63 -63
  50. package/lib/cjs/CodeService.js.map +1 -1
  51. package/lib/cjs/CodeSpecs.d.ts +55 -55
  52. package/lib/cjs/CodeSpecs.js +124 -124
  53. package/lib/cjs/CodeSpecs.js.map +1 -1
  54. package/lib/cjs/ConcurrentQuery.d.ts +13 -13
  55. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  56. package/lib/cjs/ConcurrentQuery.js +36 -36
  57. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  58. package/lib/cjs/CustomViewState3dCreator.d.ts +21 -21
  59. package/lib/cjs/CustomViewState3dCreator.js +82 -82
  60. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  61. package/lib/cjs/DevTools.d.ts +74 -73
  62. package/lib/cjs/DevTools.d.ts.map +1 -1
  63. package/lib/cjs/DevTools.js +156 -156
  64. package/lib/cjs/DevTools.js.map +1 -1
  65. package/lib/cjs/DisplayStyle.d.ts +106 -106
  66. package/lib/cjs/DisplayStyle.js +253 -253
  67. package/lib/cjs/DisplayStyle.js.map +1 -1
  68. package/lib/cjs/ECDb.d.ts +194 -194
  69. package/lib/cjs/ECDb.js +353 -353
  70. package/lib/cjs/ECDb.js.map +1 -1
  71. package/lib/cjs/ECSchemaXmlContext.d.ts +18 -18
  72. package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -1
  73. package/lib/cjs/ECSchemaXmlContext.js +41 -41
  74. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  75. package/lib/cjs/ECSqlStatement.d.ts +473 -473
  76. package/lib/cjs/ECSqlStatement.js +791 -791
  77. package/lib/cjs/ECSqlStatement.js.map +1 -1
  78. package/lib/cjs/Element.d.ts +1113 -1113
  79. package/lib/cjs/Element.js +1424 -1424
  80. package/lib/cjs/Element.js.map +1 -1
  81. package/lib/cjs/ElementAspect.d.ts +176 -176
  82. package/lib/cjs/ElementAspect.js +203 -203
  83. package/lib/cjs/ElementAspect.js.map +1 -1
  84. package/lib/cjs/ElementGraphics.d.ts +9 -9
  85. package/lib/cjs/ElementGraphics.js +41 -41
  86. package/lib/cjs/ElementGraphics.js.map +1 -1
  87. package/lib/cjs/ElementTreeWalker.d.ts +162 -162
  88. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  89. package/lib/cjs/ElementTreeWalker.js +409 -409
  90. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  91. package/lib/cjs/Entity.d.ts +106 -106
  92. package/lib/cjs/Entity.d.ts.map +1 -1
  93. package/lib/cjs/Entity.js +134 -134
  94. package/lib/cjs/Entity.js.map +1 -1
  95. package/lib/cjs/EntityReferences.d.ts +49 -49
  96. package/lib/cjs/EntityReferences.d.ts.map +1 -1
  97. package/lib/cjs/EntityReferences.js +95 -95
  98. package/lib/cjs/EntityReferences.js.map +1 -1
  99. package/lib/cjs/ExportGraphics.d.ts +317 -317
  100. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  101. package/lib/cjs/ExportGraphics.js +208 -208
  102. package/lib/cjs/ExportGraphics.js.map +1 -1
  103. package/lib/cjs/ExternalSource.d.ts +96 -96
  104. package/lib/cjs/ExternalSource.js +131 -131
  105. package/lib/cjs/ExternalSource.js.map +1 -1
  106. package/lib/cjs/GeoCoordConfig.d.ts +19 -19
  107. package/lib/cjs/GeoCoordConfig.js +85 -85
  108. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  109. package/lib/cjs/GeometrySummary.d.ts +4 -4
  110. package/lib/cjs/GeometrySummary.js +380 -380
  111. package/lib/cjs/GeometrySummary.js.map +1 -1
  112. package/lib/cjs/HubMock.d.ts +94 -94
  113. package/lib/cjs/HubMock.js +220 -220
  114. package/lib/cjs/HubMock.js.map +1 -1
  115. package/lib/cjs/IModelCloneContext.d.ts +8 -8
  116. package/lib/cjs/IModelCloneContext.d.ts.map +1 -1
  117. package/lib/cjs/IModelCloneContext.js +15 -15
  118. package/lib/cjs/IModelCloneContext.js.map +1 -1
  119. package/lib/cjs/IModelDb.d.ts +1216 -1216
  120. package/lib/cjs/IModelDb.d.ts.map +1 -1
  121. package/lib/cjs/IModelDb.js +2387 -2386
  122. package/lib/cjs/IModelDb.js.map +1 -1
  123. package/lib/cjs/IModelElementCloneContext.d.ts +89 -89
  124. package/lib/cjs/IModelElementCloneContext.js +159 -159
  125. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  126. package/lib/cjs/IModelHost.d.ts +369 -369
  127. package/lib/cjs/IModelHost.js +488 -488
  128. package/lib/cjs/IModelHost.js.map +1 -1
  129. package/lib/cjs/IModelJsFs.d.ts +62 -62
  130. package/lib/cjs/IModelJsFs.js +139 -139
  131. package/lib/cjs/IModelJsFs.js.map +1 -1
  132. package/lib/cjs/IpcHost.d.ts +104 -104
  133. package/lib/cjs/IpcHost.js +276 -276
  134. package/lib/cjs/IpcHost.js.map +1 -1
  135. package/lib/cjs/LineStyle.d.ts +311 -311
  136. package/lib/cjs/LineStyle.js +295 -295
  137. package/lib/cjs/LineStyle.js.map +1 -1
  138. package/lib/cjs/LocalHub.d.ts +162 -162
  139. package/lib/cjs/LocalHub.d.ts.map +1 -1
  140. package/lib/cjs/LocalHub.js +580 -580
  141. package/lib/cjs/LocalHub.js.map +1 -1
  142. package/lib/cjs/LocalhostIpcHost.d.ts +20 -20
  143. package/lib/cjs/LocalhostIpcHost.js +79 -79
  144. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  145. package/lib/cjs/Material.d.ts +131 -131
  146. package/lib/cjs/Material.js +180 -180
  147. package/lib/cjs/Material.js.map +1 -1
  148. package/lib/cjs/Model.d.ts +392 -392
  149. package/lib/cjs/Model.js +489 -489
  150. package/lib/cjs/Model.js.map +1 -1
  151. package/lib/cjs/NativeAppStorage.d.ts +51 -51
  152. package/lib/cjs/NativeAppStorage.js +202 -202
  153. package/lib/cjs/NativeAppStorage.js.map +1 -1
  154. package/lib/cjs/NativeHost.d.ts +52 -52
  155. package/lib/cjs/NativeHost.js +160 -160
  156. package/lib/cjs/NativeHost.js.map +1 -1
  157. package/lib/cjs/NavigationRelationship.d.ts +156 -156
  158. package/lib/cjs/NavigationRelationship.js +225 -225
  159. package/lib/cjs/NavigationRelationship.js.map +1 -1
  160. package/lib/cjs/PromiseMemoizer.d.ts +51 -51
  161. package/lib/cjs/PromiseMemoizer.d.ts.map +1 -1
  162. package/lib/cjs/PromiseMemoizer.js +101 -101
  163. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  164. package/lib/cjs/PropertyStore.d.ts +132 -132
  165. package/lib/cjs/PropertyStore.js +11 -11
  166. package/lib/cjs/PropertyStore.js.map +1 -1
  167. package/lib/cjs/Relationship.d.ts +416 -416
  168. package/lib/cjs/Relationship.js +494 -494
  169. package/lib/cjs/Relationship.js.map +1 -1
  170. package/lib/cjs/RpcBackend.d.ts +5 -5
  171. package/lib/cjs/RpcBackend.js +32 -32
  172. package/lib/cjs/RpcBackend.js.map +1 -1
  173. package/lib/cjs/SQLiteDb.d.ts +219 -219
  174. package/lib/cjs/SQLiteDb.js +212 -212
  175. package/lib/cjs/SQLiteDb.js.map +1 -1
  176. package/lib/cjs/Schema.d.ts +55 -55
  177. package/lib/cjs/Schema.js +83 -83
  178. package/lib/cjs/Schema.js.map +1 -1
  179. package/lib/cjs/ServerBasedLocks.d.ts +57 -57
  180. package/lib/cjs/ServerBasedLocks.js +168 -168
  181. package/lib/cjs/ServerBasedLocks.js.map +1 -1
  182. package/lib/cjs/SqliteStatement.d.ts +360 -360
  183. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  184. package/lib/cjs/SqliteStatement.js +586 -586
  185. package/lib/cjs/SqliteStatement.js.map +1 -1
  186. package/lib/cjs/Texture.d.ts +58 -58
  187. package/lib/cjs/Texture.js +82 -82
  188. package/lib/cjs/Texture.js.map +1 -1
  189. package/lib/cjs/TileStorage.d.ts +18 -18
  190. package/lib/cjs/TileStorage.js +87 -87
  191. package/lib/cjs/TileStorage.js.map +1 -1
  192. package/lib/cjs/TxnManager.d.ts +202 -202
  193. package/lib/cjs/TxnManager.d.ts.map +1 -1
  194. package/lib/cjs/TxnManager.js +356 -356
  195. package/lib/cjs/TxnManager.js.map +1 -1
  196. package/lib/cjs/ViewDefinition.d.ts +435 -435
  197. package/lib/cjs/ViewDefinition.js +646 -646
  198. package/lib/cjs/ViewDefinition.js.map +1 -1
  199. package/lib/cjs/ViewStateHydrator.d.ts +13 -13
  200. package/lib/cjs/ViewStateHydrator.js +103 -103
  201. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  202. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  203. package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +67 -67
  204. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +31 -31
  205. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +52 -52
  206. package/lib/cjs/assets/Settings/backend.setting.json5 +138 -138
  207. package/lib/cjs/core-backend.d.ts +185 -185
  208. package/lib/cjs/core-backend.js +209 -205
  209. package/lib/cjs/core-backend.js.map +1 -1
  210. package/lib/cjs/domains/FunctionalElements.d.ts +101 -101
  211. package/lib/cjs/domains/FunctionalElements.js +145 -145
  212. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  213. package/lib/cjs/domains/FunctionalSchema.d.ts +13 -13
  214. package/lib/cjs/domains/FunctionalSchema.js +39 -39
  215. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  216. package/lib/cjs/domains/GenericElements.d.ts +177 -177
  217. package/lib/cjs/domains/GenericElements.js +263 -263
  218. package/lib/cjs/domains/GenericElements.js.map +1 -1
  219. package/lib/cjs/domains/GenericSchema.d.ts +10 -10
  220. package/lib/cjs/domains/GenericSchema.js +28 -28
  221. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  222. package/lib/cjs/rpc/multipart.d.ts +11 -11
  223. package/lib/cjs/rpc/multipart.js +71 -71
  224. package/lib/cjs/rpc/multipart.js.map +1 -1
  225. package/lib/cjs/rpc/tracing.d.ts +28 -28
  226. package/lib/cjs/rpc/tracing.js +73 -73
  227. package/lib/cjs/rpc/tracing.js.map +1 -1
  228. package/lib/cjs/rpc/web/logging.d.ts +9 -9
  229. package/lib/cjs/rpc/web/logging.js +43 -43
  230. package/lib/cjs/rpc/web/logging.js.map +1 -1
  231. package/lib/cjs/rpc/web/request.d.ts +6 -6
  232. package/lib/cjs/rpc/web/request.js +73 -73
  233. package/lib/cjs/rpc/web/request.js.map +1 -1
  234. package/lib/cjs/rpc/web/response.d.ts +6 -6
  235. package/lib/cjs/rpc/web/response.js +105 -105
  236. package/lib/cjs/rpc/web/response.js.map +1 -1
  237. package/lib/cjs/rpc-impl/DevToolsRpcImpl.d.ts +15 -15
  238. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js +32 -32
  239. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  240. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +47 -47
  241. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +293 -293
  242. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  243. package/lib/cjs/rpc-impl/IModelTileRpcImpl.d.ts +22 -22
  244. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js +202 -202
  245. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  246. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +36 -36
  247. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +166 -166
  248. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  249. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +16 -16
  250. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +42 -42
  251. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  252. package/lib/cjs/rpc-impl/WipRpcImpl.d.ts +15 -15
  253. package/lib/cjs/rpc-impl/WipRpcImpl.js +37 -37
  254. package/lib/cjs/rpc-impl/WipRpcImpl.js.map +1 -1
  255. package/lib/cjs/workspace/Settings.d.ts +186 -186
  256. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  257. package/lib/cjs/workspace/Settings.js +154 -154
  258. package/lib/cjs/workspace/Settings.js.map +1 -1
  259. package/lib/cjs/workspace/SettingsSchemas.d.ts +75 -75
  260. package/lib/cjs/workspace/SettingsSchemas.js +190 -190
  261. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  262. package/lib/cjs/workspace/Workspace.d.ts +414 -414
  263. package/lib/cjs/workspace/Workspace.js +537 -537
  264. package/lib/cjs/workspace/Workspace.js.map +1 -1
  265. package/package.json +12 -12
@@ -1,43 +1,43 @@
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
- const resolvedFileName = IModelHost_1.IModelHost.snapshotFileNameResolver?.resolveKey(fileKey);
32
- if (undefined === resolvedFileName)
33
- throw new core_common_1.IModelNotFoundResponse();
34
- return IModelDb_1.SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();
35
- }
36
- /** Ask the backend to close a snapshot iModel. */
37
- async close(tokenProps) {
38
- IModelDb_1.SnapshotDb.findByKey(tokenProps.key).close();
39
- return true;
40
- }
41
- }
42
- 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
+ const resolvedFileName = IModelHost_1.IModelHost.snapshotFileNameResolver?.resolveKey(fileKey);
32
+ if (undefined === resolvedFileName)
33
+ throw new core_common_1.IModelNotFoundResponse();
34
+ return IModelDb_1.SnapshotDb.openFile(resolvedFileName, { key: fileKey, ...opts }).getConnectionProps();
35
+ }
36
+ /** Ask the backend to close a snapshot iModel. */
37
+ async close(tokenProps) {
38
+ IModelDb_1.SnapshotDb.findByKey(tokenProps.key).close();
39
+ return true;
40
+ }
41
+ }
42
+ exports.SnapshotIModelRpcImpl = SnapshotIModelRpcImpl;
43
43
  //# 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,uBAAU,CAAC,wBAAwB,EAAE,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,uBAAU,CAAC,wBAAwB,EAAE,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 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 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 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 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 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