@itwin/core-backend 5.1.0-dev.9 → 5.2.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/CHANGELOG.md +117 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js +4 -2
  7. package/lib/cjs/BisCoreSchema.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.d.ts +10 -2
  9. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseManager.js +16 -0
  11. package/lib/cjs/BriefcaseManager.js.map +1 -1
  12. package/lib/cjs/Category.d.ts +4 -4
  13. package/lib/cjs/Category.js +4 -4
  14. package/lib/cjs/Category.js.map +1 -1
  15. package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
  16. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  17. package/lib/cjs/ChangesetECAdaptor.js +248 -33
  18. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  19. package/lib/cjs/ClassRegistry.d.ts +9 -1
  20. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  21. package/lib/cjs/ClassRegistry.js +9 -1
  22. package/lib/cjs/ClassRegistry.js.map +1 -1
  23. package/lib/cjs/CloudSqlite.js +1 -1
  24. package/lib/cjs/CloudSqlite.js.map +1 -1
  25. package/lib/cjs/CodeSpecs.d.ts +1 -1
  26. package/lib/cjs/CodeSpecs.js +1 -1
  27. package/lib/cjs/CodeSpecs.js.map +1 -1
  28. package/lib/cjs/DisplayStyle.d.ts +4 -4
  29. package/lib/cjs/DisplayStyle.js +3 -3
  30. package/lib/cjs/DisplayStyle.js.map +1 -1
  31. package/lib/cjs/ECDb.d.ts +4 -4
  32. package/lib/cjs/ECDb.d.ts.map +1 -1
  33. package/lib/cjs/ECDb.js +4 -4
  34. package/lib/cjs/ECDb.js.map +1 -1
  35. package/lib/cjs/ECSqlStatement.d.ts +15 -6
  36. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  37. package/lib/cjs/ECSqlStatement.js +19 -4
  38. package/lib/cjs/ECSqlStatement.js.map +1 -1
  39. package/lib/cjs/Element.d.ts +54 -51
  40. package/lib/cjs/Element.d.ts.map +1 -1
  41. package/lib/cjs/Element.js +67 -52
  42. package/lib/cjs/Element.js.map +1 -1
  43. package/lib/cjs/ElementAspect.d.ts +8 -8
  44. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  45. package/lib/cjs/ElementAspect.js +8 -8
  46. package/lib/cjs/ElementAspect.js.map +1 -1
  47. package/lib/cjs/Entity.d.ts +10 -7
  48. package/lib/cjs/Entity.d.ts.map +1 -1
  49. package/lib/cjs/Entity.js +35 -13
  50. package/lib/cjs/Entity.js.map +1 -1
  51. package/lib/cjs/ExportGraphics.d.ts +54 -8
  52. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  53. package/lib/cjs/ExportGraphics.js +158 -59
  54. package/lib/cjs/ExportGraphics.js.map +1 -1
  55. package/lib/cjs/GeographicCRSServices.d.ts +6 -2
  56. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  57. package/lib/cjs/GeographicCRSServices.js +1 -1
  58. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  59. package/lib/cjs/IModelDb.d.ts +37 -26
  60. package/lib/cjs/IModelDb.d.ts.map +1 -1
  61. package/lib/cjs/IModelDb.js +124 -47
  62. package/lib/cjs/IModelDb.js.map +1 -1
  63. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  64. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  65. package/lib/cjs/IModelElementCloneContext.js +1 -1
  66. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  67. package/lib/cjs/IModelHost.d.ts +2 -3
  68. package/lib/cjs/IModelHost.d.ts.map +1 -1
  69. package/lib/cjs/IModelHost.js +2 -3
  70. package/lib/cjs/IModelHost.js.map +1 -1
  71. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
  72. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  73. package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
  74. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
  75. package/lib/cjs/LocalHub.d.ts.map +1 -1
  76. package/lib/cjs/LocalHub.js +6 -4
  77. package/lib/cjs/LocalHub.js.map +1 -1
  78. package/lib/cjs/Material.d.ts +4 -3
  79. package/lib/cjs/Material.d.ts.map +1 -1
  80. package/lib/cjs/Material.js +5 -5
  81. package/lib/cjs/Material.js.map +1 -1
  82. package/lib/cjs/Model.d.ts +22 -22
  83. package/lib/cjs/Model.js +22 -22
  84. package/lib/cjs/Model.js.map +1 -1
  85. package/lib/cjs/Relationship.d.ts +3 -0
  86. package/lib/cjs/Relationship.d.ts.map +1 -1
  87. package/lib/cjs/Relationship.js +15 -0
  88. package/lib/cjs/Relationship.js.map +1 -1
  89. package/lib/cjs/SQLiteDb.d.ts +1 -1
  90. package/lib/cjs/SQLiteDb.js +1 -1
  91. package/lib/cjs/SQLiteDb.js.map +1 -1
  92. package/lib/cjs/Schema.d.ts +25 -0
  93. package/lib/cjs/Schema.d.ts.map +1 -1
  94. package/lib/cjs/Schema.js +25 -0
  95. package/lib/cjs/Schema.js.map +1 -1
  96. package/lib/cjs/SqliteStatement.d.ts +1 -1
  97. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  98. package/lib/cjs/SqliteStatement.js +1 -1
  99. package/lib/cjs/SqliteStatement.js.map +1 -1
  100. package/lib/cjs/Texture.d.ts +1 -1
  101. package/lib/cjs/Texture.js +1 -1
  102. package/lib/cjs/Texture.js.map +1 -1
  103. package/lib/cjs/TxnManager.d.ts +4 -4
  104. package/lib/cjs/TxnManager.js +1 -1
  105. package/lib/cjs/TxnManager.js.map +1 -1
  106. package/lib/cjs/ViewDefinition.d.ts +40 -14
  107. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  108. package/lib/cjs/ViewDefinition.js +42 -14
  109. package/lib/cjs/ViewDefinition.js.map +1 -1
  110. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  111. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  112. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
  113. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  114. package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
  115. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
  116. package/lib/cjs/annotations/FrameGeometry.js +249 -0
  117. package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
  118. package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
  119. package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
  120. package/lib/cjs/annotations/LeaderGeometry.js +184 -0
  121. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
  122. package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
  123. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
  124. package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
  125. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
  126. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
  127. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  128. package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
  129. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
  130. package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
  131. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
  132. package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  133. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
  134. package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  135. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
  136. package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
  137. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
  138. package/lib/cjs/core-backend.d.ts +7 -3
  139. package/lib/cjs/core-backend.d.ts.map +1 -1
  140. package/lib/cjs/core-backend.js +27 -6
  141. package/lib/cjs/core-backend.js.map +1 -1
  142. package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
  143. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
  144. package/lib/cjs/internal/ElementLRUCache.js +167 -3
  145. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  146. package/lib/cjs/internal/Symbols.d.ts +1 -0
  147. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  148. package/lib/cjs/internal/Symbols.js +2 -1
  149. package/lib/cjs/internal/Symbols.js.map +1 -1
  150. package/lib/cjs/internal/annotations/fields.d.ts +22 -0
  151. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
  152. package/lib/cjs/internal/annotations/fields.js +237 -0
  153. package/lib/cjs/internal/annotations/fields.js.map +1 -0
  154. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  155. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  156. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  157. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  158. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  159. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  160. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  161. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  162. package/lib/cjs/workspace/Workspace.d.ts +0 -1
  163. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  164. package/lib/cjs/workspace/Workspace.js.map +1 -1
  165. package/lib/esm/BackendHubAccess.d.ts +1 -1
  166. package/lib/esm/BackendHubAccess.js +1 -1
  167. package/lib/esm/BackendHubAccess.js.map +1 -1
  168. package/lib/esm/BisCoreSchema.d.ts.map +1 -1
  169. package/lib/esm/BisCoreSchema.js +4 -2
  170. package/lib/esm/BisCoreSchema.js.map +1 -1
  171. package/lib/esm/BriefcaseManager.d.ts +10 -2
  172. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  173. package/lib/esm/BriefcaseManager.js +17 -1
  174. package/lib/esm/BriefcaseManager.js.map +1 -1
  175. package/lib/esm/Category.d.ts +4 -4
  176. package/lib/esm/Category.js +4 -4
  177. package/lib/esm/Category.js.map +1 -1
  178. package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
  179. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  180. package/lib/esm/ChangesetECAdaptor.js +248 -33
  181. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  182. package/lib/esm/ClassRegistry.d.ts +9 -1
  183. package/lib/esm/ClassRegistry.d.ts.map +1 -1
  184. package/lib/esm/ClassRegistry.js +9 -1
  185. package/lib/esm/ClassRegistry.js.map +1 -1
  186. package/lib/esm/CloudSqlite.js +1 -1
  187. package/lib/esm/CloudSqlite.js.map +1 -1
  188. package/lib/esm/CodeSpecs.d.ts +1 -1
  189. package/lib/esm/CodeSpecs.js +1 -1
  190. package/lib/esm/CodeSpecs.js.map +1 -1
  191. package/lib/esm/DisplayStyle.d.ts +4 -4
  192. package/lib/esm/DisplayStyle.js +3 -3
  193. package/lib/esm/DisplayStyle.js.map +1 -1
  194. package/lib/esm/ECDb.d.ts +4 -4
  195. package/lib/esm/ECDb.d.ts.map +1 -1
  196. package/lib/esm/ECDb.js +4 -4
  197. package/lib/esm/ECDb.js.map +1 -1
  198. package/lib/esm/ECSqlStatement.d.ts +15 -6
  199. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  200. package/lib/esm/ECSqlStatement.js +19 -4
  201. package/lib/esm/ECSqlStatement.js.map +1 -1
  202. package/lib/esm/Element.d.ts +54 -51
  203. package/lib/esm/Element.d.ts.map +1 -1
  204. package/lib/esm/Element.js +67 -52
  205. package/lib/esm/Element.js.map +1 -1
  206. package/lib/esm/ElementAspect.d.ts +8 -8
  207. package/lib/esm/ElementAspect.d.ts.map +1 -1
  208. package/lib/esm/ElementAspect.js +8 -8
  209. package/lib/esm/ElementAspect.js.map +1 -1
  210. package/lib/esm/Entity.d.ts +10 -7
  211. package/lib/esm/Entity.d.ts.map +1 -1
  212. package/lib/esm/Entity.js +36 -14
  213. package/lib/esm/Entity.js.map +1 -1
  214. package/lib/esm/ExportGraphics.d.ts +54 -8
  215. package/lib/esm/ExportGraphics.d.ts.map +1 -1
  216. package/lib/esm/ExportGraphics.js +156 -58
  217. package/lib/esm/ExportGraphics.js.map +1 -1
  218. package/lib/esm/GeographicCRSServices.d.ts +6 -2
  219. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  220. package/lib/esm/GeographicCRSServices.js +1 -1
  221. package/lib/esm/GeographicCRSServices.js.map +1 -1
  222. package/lib/esm/IModelDb.d.ts +37 -26
  223. package/lib/esm/IModelDb.d.ts.map +1 -1
  224. package/lib/esm/IModelDb.js +128 -51
  225. package/lib/esm/IModelDb.js.map +1 -1
  226. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  227. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  228. package/lib/esm/IModelElementCloneContext.js +1 -1
  229. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  230. package/lib/esm/IModelHost.d.ts +2 -3
  231. package/lib/esm/IModelHost.d.ts.map +1 -1
  232. package/lib/esm/IModelHost.js +2 -3
  233. package/lib/esm/IModelHost.js.map +1 -1
  234. package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
  235. package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  236. package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
  237. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
  238. package/lib/esm/LocalHub.d.ts.map +1 -1
  239. package/lib/esm/LocalHub.js +6 -4
  240. package/lib/esm/LocalHub.js.map +1 -1
  241. package/lib/esm/Material.d.ts +4 -3
  242. package/lib/esm/Material.d.ts.map +1 -1
  243. package/lib/esm/Material.js +5 -5
  244. package/lib/esm/Material.js.map +1 -1
  245. package/lib/esm/Model.d.ts +22 -22
  246. package/lib/esm/Model.js +22 -22
  247. package/lib/esm/Model.js.map +1 -1
  248. package/lib/esm/Relationship.d.ts +3 -0
  249. package/lib/esm/Relationship.d.ts.map +1 -1
  250. package/lib/esm/Relationship.js +15 -0
  251. package/lib/esm/Relationship.js.map +1 -1
  252. package/lib/esm/SQLiteDb.d.ts +1 -1
  253. package/lib/esm/SQLiteDb.js +1 -1
  254. package/lib/esm/SQLiteDb.js.map +1 -1
  255. package/lib/esm/Schema.d.ts +25 -0
  256. package/lib/esm/Schema.d.ts.map +1 -1
  257. package/lib/esm/Schema.js +25 -0
  258. package/lib/esm/Schema.js.map +1 -1
  259. package/lib/esm/SqliteStatement.d.ts +1 -1
  260. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  261. package/lib/esm/SqliteStatement.js +1 -1
  262. package/lib/esm/SqliteStatement.js.map +1 -1
  263. package/lib/esm/Texture.d.ts +1 -1
  264. package/lib/esm/Texture.js +1 -1
  265. package/lib/esm/Texture.js.map +1 -1
  266. package/lib/esm/TxnManager.d.ts +4 -4
  267. package/lib/esm/TxnManager.js +1 -1
  268. package/lib/esm/TxnManager.js.map +1 -1
  269. package/lib/esm/ViewDefinition.d.ts +40 -14
  270. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  271. package/lib/esm/ViewDefinition.js +42 -14
  272. package/lib/esm/ViewDefinition.js.map +1 -1
  273. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  274. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  275. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
  276. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  277. package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
  278. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
  279. package/lib/esm/annotations/FrameGeometry.js +244 -0
  280. package/lib/esm/annotations/FrameGeometry.js.map +1 -0
  281. package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
  282. package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
  283. package/lib/esm/annotations/LeaderGeometry.js +179 -0
  284. package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
  285. package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
  286. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
  287. package/lib/esm/annotations/TextAnnotationElement.js +405 -0
  288. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
  289. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
  290. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  291. package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
  292. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
  293. package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
  294. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
  295. package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  296. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
  297. package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  298. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
  299. package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
  300. package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
  301. package/lib/esm/core-backend.d.ts +7 -3
  302. package/lib/esm/core-backend.d.ts.map +1 -1
  303. package/lib/esm/core-backend.js +27 -3
  304. package/lib/esm/core-backend.js.map +1 -1
  305. package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
  306. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
  307. package/lib/esm/internal/ElementLRUCache.js +165 -2
  308. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  309. package/lib/esm/internal/Symbols.d.ts +1 -0
  310. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  311. package/lib/esm/internal/Symbols.js +1 -0
  312. package/lib/esm/internal/Symbols.js.map +1 -1
  313. package/lib/esm/internal/annotations/fields.d.ts +22 -0
  314. package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
  315. package/lib/esm/internal/annotations/fields.js +231 -0
  316. package/lib/esm/internal/annotations/fields.js.map +1 -0
  317. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  318. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  319. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  320. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  321. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  322. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  323. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  324. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  325. package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
  326. package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
  327. package/lib/esm/test/AnnotationTestUtils.js +41 -0
  328. package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
  329. package/lib/esm/test/ElementLRUCache.test.js +224 -1
  330. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  331. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  332. package/lib/esm/test/IModelTestUtils.js +1 -0
  333. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  334. package/lib/esm/test/TestUtils.d.ts +1 -1
  335. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  336. package/lib/esm/test/TestUtils.js +1 -1
  337. package/lib/esm/test/TestUtils.js.map +1 -1
  338. package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
  339. package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
  340. package/lib/esm/test/annotations/Fields.test.js +576 -0
  341. package/lib/esm/test/annotations/Fields.test.js.map +1 -0
  342. package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
  343. package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
  344. package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
  345. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
  346. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
  347. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
  348. package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
  349. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
  350. package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
  351. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  352. package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
  353. package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
  354. package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
  355. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
  356. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
  357. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
  358. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
  359. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
  360. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
  361. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
  362. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
  363. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
  364. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
  365. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
  366. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
  367. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
  368. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +22 -32
  369. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  370. package/lib/esm/test/ecdb/ECDb.test.js +29 -8
  371. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  372. package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
  373. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  374. package/lib/esm/test/ecdb/ECSqlStatement.test.js +192 -0
  375. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  376. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
  377. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
  378. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
  379. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
  380. package/lib/esm/test/imodel/IModel.test.js +313 -5
  381. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  382. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
  383. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
  384. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
  385. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
  386. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
  387. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
  388. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
  389. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
  390. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
  391. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
  392. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
  393. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
  394. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
  395. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
  396. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
  397. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
  398. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
  399. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
  400. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
  401. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
  402. package/lib/esm/test/misc/GeoServices.test.js +36 -10
  403. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  404. package/lib/esm/test/schema/ClassRegistry.test.js +104 -2
  405. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  406. package/lib/esm/test/standalone/ChangesetReader.test.js +547 -136
  407. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  408. package/lib/esm/test/standalone/ExportGraphics.test.js +53 -1
  409. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  410. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  411. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  412. package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
  413. package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
  414. package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
  415. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
  416. package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
  417. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  418. package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
  419. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  420. package/lib/esm/workspace/Workspace.d.ts +0 -1
  421. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  422. package/lib/esm/workspace/Workspace.js.map +1 -1
  423. package/package.json +22 -16
  424. package/lib/cjs/TextAnnotationElement.d.ts +0 -54
  425. package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
  426. package/lib/cjs/TextAnnotationElement.js +0 -94
  427. package/lib/cjs/TextAnnotationElement.js.map +0 -1
  428. package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
  429. package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
  430. package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
  431. package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
  432. package/lib/cjs/TextAnnotationLayout.js.map +0 -1
  433. package/lib/esm/TextAnnotationElement.d.ts +0 -54
  434. package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
  435. package/lib/esm/TextAnnotationElement.js +0 -89
  436. package/lib/esm/TextAnnotationElement.js.map +0 -1
  437. package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
  438. package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
  439. package/lib/esm/TextAnnotationGeometry.js.map +0 -1
  440. package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
  441. package/lib/esm/TextAnnotationLayout.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Workspace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IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAhBe,wBAAc,iBAgB7B,CAAA;AACH,CAAC,EAtFgB,SAAS,yBAAT,SAAS,QAsFzB","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 Workspace\n */\n\nimport { AccessToken, BeEvent, ITwinError, Logger, Optional, UnexpectedErrors } from \"@itwin/core-bentley\";\nimport { LocalDirName, LocalFileName } from \"@itwin/core-common\";\nimport { CloudSqlite } from \"../CloudSqlite\";\nimport { SQLiteDb } from \"../SQLiteDb\";\nimport { SettingName, Settings, SettingsDictionary, SettingsPriority } from \"./Settings\";\nimport type { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\n\n/** The unique identifier of a [[WorkspaceContainer]]. This becomes the base name for a local file directory holding the container's [[WorkspaceDb]]s.\n * A valid `WorkspaceContainerId` must conform to the following constraints:\n * - Consist solely of a combination of lower case letters, numbers, and dashes.\n * - May not start or end with a dash.\n * - Must be at least 3 characters long and no longer than 63 characters.\n * @beta\n */\nexport type WorkspaceContainerId = string;\n\n/** Properties describing a [[WorkspaceContainer]] for methods like [[Workspace.getContainerAsync]].\n * @beta\n */\nexport interface WorkspaceContainerProps extends Optional<CloudSqlite.ContainerAccessProps, \"accessToken\"> {\n /** Whether to synchronize the container via [[CloudSqlite.CloudContainer.checkForChanges]] whenever it is connected to a [[CloudSqlite.CloudCache]].\n * @note This property defaults to `true`.\n */\n readonly syncOnConnect?: boolean;\n /** A user-friendly description of the container's contents. */\n readonly description?: string;\n /** A message to display to the user if problems occur while loading the container. */\n readonly loadingHelp?: string;\n}\n\n/** The base name of a [[WorkspaceDb]], without any version information.\n * The name must conform to the following constraints:\n * - Case-insensitively unique among all [[WorkspaceDb]]s in the same [[WorkspaceContainer]].\n * - Between 1 and 255 characters in length.\n * - A legal filename on both [Windows](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions) and UNIX.\n * - Contain none of the following characters: forward or backward slash, period, single or double quote, backtick, and \"#\".\n * - Begin or end with a whitespace character.\n * @see [[WorkspaceDbFullName]] for the fully-specified name, including version information.\n * @beta\n */\nexport type WorkspaceDbName = string;\n\n/** The fully-specified name of a [[WorkspaceDb]], combining its [[WorkspaceDbName]] and [[WorkspaceDbVersion]] in the format \"name:version\".\n * @beta\n */\nexport type WorkspaceDbFullName = string;\n\n/** A [semver](https://github.com/npm/node-semver) string describing the version of a [[WorkspaceDb]], e.g., \"4.2.11\".\n * @beta\n */\nexport type WorkspaceDbVersion = CloudSqlite.DbVersion;\n\n/** A [semver string](https://github.com/npm/node-semver?tab=readme-ov-file#ranges) describing a range of acceptable [[WorkspaceDbVersion]]s,\n * e.g., \">=1.2.7 <1.3.0\".\n * @beta\n */\nexport type WorkspaceDbVersionRange = CloudSqlite.DbVersionRange;\n\n/** Specifies the name and version of a [[WorkspaceDb]].\n * @beta\n */\nexport type WorkspaceDbNameAndVersion = Optional<CloudSqlite.DbNameAndVersion, \"dbName\">;\n\n/** Properties that specify how to load a [[WorkspaceDb]] within a [[WorkspaceContainer]].\n * @beta\n */\nexport interface WorkspaceDbProps extends WorkspaceDbNameAndVersion {\n /** If true, allow semver [prerelease versions](https://github.com/npm/node-semver?tab=readme-ov-file#prerelease-tags), e.g., \"1.4.2-beta.0\".\n * By default, only released version are allowed.\n */\n readonly includePrerelease?: boolean;\n /** If true, start a prefetch operation whenever this [[WorkspaceDb]] is opened, to begin downloading pages of the database before they are needed. */\n readonly prefetch?: boolean;\n}\n\n/** Properties describing a [[WorkspaceDb]] and the [[WorkspaceContainer]] containing it.\n * @beta\n */\nexport type WorkspaceDbCloudProps = WorkspaceDbProps & WorkspaceContainerProps;\n\n/** A function supplied as [[WorkspaceDbQueryResourcesArgs.callback]] to be invoked to process the requested resources.\n * @beta\n */\nexport type WorkspaceDbQueryResourcesCallback = (resourceNames: Iterable<string>) => void;\n\n/** Arguments supplied to [[WorkspaceDb.queryResources]].\n * @beta\n */\nexport interface WorkspaceDbQueryResourcesArgs {\n /** The type of resource to query. */\n type?: \"string\" | \"blob\";\n /** A pattern against which to compare the name of each resource, using [[nameCompare]] as the comparison operator.\n * Only resources whose names match the pattern will be included in the query results.\n */\n namePattern?: string;\n /** The comparison operator by which to compare the name of each resource to [[namePattern]].\n * Only resources whose names match the pattern will be included in the query results.\n * Ignored if [[namePattern]] is undefined.\n */\n nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\n /** A function invoked to process the resources that match the query criterion. */\n callback: WorkspaceDbQueryResourcesCallback;\n}\n\n/** Metadata stored inside a [[WorkspaceDb]] describing the database's contents, to help users understand the purpose of the [[WorkspaceDb]], who to\n * contact with questions about it, and so on.\n * @note Only the [[workspaceName]] field is required, and users may add additional fields for their own purposes.\n * @note Since the information is stored inside of the [[WorkspaceDb]], it is versioned along with the rest of the contents.\n * @beta\n */\nexport interface WorkspaceDbManifest {\n /** The name of the [[WorkspaceDb]] to be shown in user interfaces. Organizations should attempt to make this name informative enough\n * so that uses may refer to this name in conversations. It should also be unique enough that there's no confusion when it appears in\n * lists of WorkspaceDbs.\n * @note it is possible and valid to change the workspaceName between new version of a WorkspaceDb (e.g. incorporating a date).\n */\n readonly workspaceName: string;\n /** A description of the contents of this [[WorkspaceDb]] to help users understand its purpose and appropriate usage. */\n readonly description?: string;\n /** The name of the person to contact with questions about this [[WorkspaceDb]]. */\n readonly contactName?: string;\n /** The name of the person who last modified this [[WorkspaceDb]]. */\n readonly lastEditedBy?: string;\n}\n\n/**\n * An exception thrown when attempting to load a [[WorkspaceDb]] or some of its data; for example, if the [[WorkspaceDb]] could not be found or the user\n * is not authorized to access its [[WorkspaceContainer]].\n * @beta\n */\nexport interface WorkspaceDbLoadError extends ITwinError {\n /** The properties of the [[WorkspaceDb]] that was attempted to load, including the identity of its [[WorkspaceContainer]]. */\n wsDbProps?: WorkspaceDbProps & Partial<WorkspaceDbCloudProps>;\n /** The [[WorkspaceDb]] in which the error occurred, if available. */\n wsDb?: WorkspaceDb;\n}\n\n/** An exception that may occur while opening an [[IModelDb]] if any problems are detected while loading its [[IModelDb.workspace]].\n * This exception is never actually thrown; instead, after the iModel is opened, the exception is forwarded to [[Workspace.exceptionDiagnosticFn]]\n * so that the user can be notified of the problems.\n * @beta\n */\nexport interface WorkspaceDbLoadErrors extends ITwinError {\n /** An array of problems that were encountered attempting to load [[WorkspaceDb]]s for an [[IModelDb]]. The most common problem\n * is that the user doesn't have read access to one or more [[WorkspaceContainer]]s used by the iModel's [[Workspace]]..\n */\n wsLoadErrors?: WorkspaceDbLoadError[];\n}\n\n/** Specifies a resource inside a [[WorkspaceDb]] that holds a [[SettingsDictionary]] to load into [[Workspace.settings]].\n * Settings of this type named [[WorkspaceSettingNames.settingsWorkspaces]] are automatically loaded by [[Workspace.loadSettingsDictionary]].\n * @beta\n */\nexport interface WorkspaceDbSettingsProps extends WorkspaceDbCloudProps {\n /** The name of the resource holding the stringified JSON of the [[SettingsDictionary]]. */\n resourceName: string;\n /** The priority to assign to the [[SettingsDictionary]]. */\n priority: SettingsPriority;\n}\n\n/** The name of a blob, string, or file resource stored in a [[WorkspaceDb]].\n * Resource names must conform to the following constraints:\n * - At least 1 character and no more than 1024 characters in length.\n * - No leading or trailing whitespace characters.\n * Each resource of a given type must has a unique name within the [[WorkspaceDb]]. It is technically possible, but discouraged, to define\n * resources with the same name but different types.\n * @beta\n */\nexport type WorkspaceResourceName = string;\n\n/** A SQLite database in a [[Workspace]] containing named resources that the application is configured to use.\n * Resources are referred to by their [[WorkspaceResourceName]]s and can represent any number of things, including:\n * - Fonts and [TextStyle]($common)s used when placing [TextAnnotation]($common)s.\n * - [GeographicCRS]($common)es used to define the coordinate reference system of an iTwin.\n * - [[SettingsDictionary]]'s that contribute to the [[Workspace.settings]].\n * - Files that can be extracted temporarily to the local file system to be accessed by programs directly from disk.\n *\n * Ultimately, each resource is stored in one of the following formats:\n * - A `string`, which is often a stringified `JSON` representation of the resource;\n * - A binary `blob`; or\n * - An embedded file.\n *\n * Strings and blobs can be accessed directly using [[getString]] and [[getBlob]]. Files must first be copied to the local file system using [[getFile]], and should be avoided unless the software\n * that uses them is written to access them from disk.\n *\n * A `WorkspaceDb` resides in a [[WorkspaceContainer]] that can be published to the cloud. Once published, the `WorkspaceDb` becomes immutable.\n * However, multiple versions of a single `WorkspaceDb` can be created, allowing the [[Workspace]] contents to evolve over time.\n * `WorkspaceDb`s use [semantic versioning](https://github.com/npm/node-semver).\n *\n * The set of available `WorkspaceDb`s available for use for specific purposes are defined in the [[Workspace]]'s [[Settings]]. You can obtain\n * a single `WorkspaceDb` using [[WorkspaceContainer.getWorkspaceDb]], but more commonly you will use [[Workspace.getWorkspaceDbs]] to obtain\n * a list of all of the `WorkspaceDb`s, sorted by priority, that correspond to a given [[SettingName]].\n *\n * You can create new `WorkspaceDb`s (or new versions of existing `WorkspaceDb`s) using [[WorkspaceEditor]].\n * @beta\n */\nexport interface WorkspaceDb {\n /** @internal */\n [_implementationProhibited]: unknown;\n /** The [[WorkspaceContainer]] in which this db resides. */\n readonly container: WorkspaceContainer;\n /** The base name of this WorkspaceDb, without version */\n readonly dbName: WorkspaceDbName;\n /** An event raised before this WorkspaceDb is [[close]]d. */\n readonly onClose: BeEvent<() => void>;\n /** The name by which the WorkspaceDb can be opened. This will be either a local file name or the name of a database in a [[CloudSqlite.CloudContainer]]. */\n readonly dbFileName: string;\n /** The underlying SQLite database that stores this WorkspaceDb's resources. */\n readonly sqliteDb: SQLiteDb;\n /** Whether the underlying [[sqliteDb]] is currently [[open]]ed. */\n readonly isOpen: boolean;\n /** The manifest that describes the contents and context of this WorkspaceDb. */\n readonly manifest: WorkspaceDbManifest;\n /** The version of this WorkspaceDb */\n readonly version: WorkspaceDbVersion;\n\n /** Open the underlying [[sqliteDb]] to perform a query. Generally WorkspaceDbs are left closed and opened/closed as they're used. However,\n * when there will be significant activity against a WorkspaceDb, it may be useful to open it before the operations and close it afterwards.\n * Methods like [[queryResources]] open the SQLite database automatically and [[close]] it before they return.\n */\n open(): void;\n\n /** Close the underlying [[sqliteDb]]. You should call this after [[open]]ing the database and completing your query. */\n close(): void;\n\n /** Look up a string resource by name, if one exists. */\n getString(rscName: WorkspaceResourceName): string | undefined;\n\n /** Look up a binary resource by name, if one exists. */\n getBlob(rscName: WorkspaceResourceName): Uint8Array | undefined;\n\n /** Get a BlobIO reader for a blob WorkspaceResource.\n * @note when finished, caller *must* call `close` on the BlobIO.\n * @internal\n */\n getBlobReader(rscName: WorkspaceResourceName): SQLiteDb.BlobIO;\n\n /**\n * Extract a local copy of a file resource from this WorkspaceDb, if present.\n * @param rscName The name of the file resource in the WorkspaceDb\n * @param targetFileName optional name for extracted file. Some applications require files in specific locations or filenames. If\n * you know the full path to use for the extracted file, you can supply it. Generally, it is best to *not* supply the filename and\n * keep the extracted files in the directory specified by [[WorkspaceContainer.filesDir]].\n * @returns the full path to a file on the local file system, or undefined if the no file named `rscName` exists.\n * @note The file is copied from the file into the local file system so it may be accessed directly. This happens only\n * as necessary, if the local file doesn't exist, or if it is out-of-date because it was updated in the file.\n * For this reason, you should not save the local file name, and instead call this method every time you access it, so its\n * content is always holds the correct version.\n * @note The filename will be a hash value, not the resource name.\n * @note Workspace resource files are set as read-only as they are copied from the file.\n * To edit them, you must first copy them to another location.\n */\n getFile(rscName: WorkspaceResourceName, targetFileName?: LocalFileName): LocalFileName | undefined;\n\n /**\n * Ensure that the contents of this `WorkspaceDb` are downloaded into the local cache so that it may be accessed offline.\n * Until the promise resolves, the `WorkspaceDb` is not fully downloaded, but it *may* be safely accessed during the download.\n * To determine the progress of the download, use the `localBlocks` and `totalBlocks` values returned by `CloudContainer.queryDatabase`.\n * @returns a [[CloudSqlite.CloudPrefetch]] object that can be used to await and/or cancel the prefetch.\n * @throws if this WorkspaceDb is not from a [[CloudSqlite.CloudContainer]].\n */\n prefetch(opts?: CloudSqlite.PrefetchProps): CloudSqlite.CloudPrefetch;\n\n /** Find resources of a particular type with names matching a specified pattern.\n * The matching resources will be supplied to [[WorkspaceDbQueryResourcesArgs.callbackk]].\n * @see [[Workspace.queryResources]] to query resources within multiple `WorkspaceDb`s.\n */\n queryResources(args: WorkspaceDbQueryResourcesArgs): void;\n\n /** @internal */\n queryFileResource(rscName: WorkspaceResourceName): { localFileName: LocalFileName, info: IModelJsNative.EmbedFileQuery } | undefined;\n}\n\n/** Options supplied to [[IModelHost.startup]] via [[IModelHostOptions.workspace]] to customize the initialization of [[IModelHost.appWorkspace]].\n * @beta\n */\nexport interface WorkspaceOpts {\n /** The local directory for non-cloud-based [[WorkspaceDb]] files. The [[Workspace]] API will look in this directory\n * for files named `${containerId}/${dbId}.itwin-workspace`.\n * @note if not supplied, defaults to \"iTwin/Workspace\" in the user-local folder.\n */\n containerDir?: LocalDirName;\n\n /** The name(s) of one or more local JSON files containing [[SettingsDictionary]]s to load when initializing the [[Workspace]]. */\n settingsFiles?: LocalFileName | LocalFileName[];\n}\n\n/** Arguments supplied to [[Workspace.getContainer]] and [[WorkspaceEditor.getContainer]].\n * @beta\n */\nexport interface GetWorkspaceContainerArgs extends WorkspaceContainerProps {\n /** Token required to access the container. */\n accessToken: AccessToken;\n}\n\n/**\n * Settings and resources that customize an application for the current session.\n * See the [learning article]($docs/learning/backend/Workspace) for a detailed overiew and examples.\n * @beta\n */\nexport interface Workspace {\n /** @internal */\n [_implementationProhibited]: unknown;\n\n /** The directory for local WorkspaceDb files with the name `${containerId}/${dbId}.itwin-workspace`.\n * @internal\n */\n readonly containerDir: LocalDirName;\n\n /** The current [[Settings]] for this Workspace */\n readonly settings: Settings;\n\n /** Get the cloud cache for cloud-based [[WorkspaceContainer]]s. */\n getCloudCache(): CloudSqlite.CloudCache;\n\n /** Search for a container previously opened by [[getContainer]] or [[getContainerAsync]].\n * @param containerId The id of the container\n * @returns the [[WorkspaceContainer]] for `containerId`, or `undefined` if no such container has been opened.\n * @internal\n */\n findContainer(containerId: WorkspaceContainerId): WorkspaceContainer | undefined;\n\n /** Obtain the [[WorkspaceContainer]] specified by `props`.\n * @param props The properties of the `WorkspaceContainer`, opening it if it is not already opened.\n * Otherwise it is created.\n * @note This function allows a `WorkspaceContainer.Props` without its [AccessToken]($bentley). It will attempt to obtain one from the [[BlobContainer]] service,\n * hence this function is async.\n * @see [[getContainer]] to obtain a container synchronously.\n */\n getContainerAsync(props: WorkspaceContainerProps): Promise<WorkspaceContainer>;\n\n /** Get a WorkspaceContainer with a supplied access token. This function is synchronous and may be used if:\n * - a valid [AccessToken]($bentley) is already available;\n * - the container has already been previously prefetched in another session (this is useful for offline usage); or\n * - the container is public and doesn't require an [AccessToken]($bentley).\n * @see [[getContainerAsync]] to obtain a container asynchronously if the above conditions do not apply.\n */\n getContainer(props: GetWorkspaceContainerArgs): WorkspaceContainer;\n\n /** Load a [[SettingsDictionary]] from the specified [[WorkspaceDb]] and add it to this workspace's current [[Settings]].\n * @note this function will load the dictionaries from the supplied list, and it will also call itself recursively for any entries in\n * the loaded Settings with the name [[WorkspaceSettingNames.settingsWorkspaces]]. In this manner, WorkspaceSettings may be \"chained\" together so that loading one\n * causes its \"dependent\" WorkspaceSettings to be loaded. Its `Promise` is resolved after all have been loaded (or failed to load).\n */\n loadSettingsDictionary(\n /** The properties of the [[WorkspaceDb]], plus the resourceName and [[SettingsPriority]]. May be either a single value or an array of them */\n props: WorkspaceDbSettingsProps | WorkspaceDbSettingsProps[],\n /** If present, an array that is populated with a list of problems while attempting to load the [[SettingsDictionary]](s). */\n problems?: WorkspaceDbLoadError[]\n ): Promise<void>;\n\n /** Get a single [[WorkspaceDb]]. */\n getWorkspaceDb(props: WorkspaceDbCloudProps): Promise<WorkspaceDb>;\n\n /**\n * Resolve the value of all [[Setting]]s from this workspace with the supplied `settingName` into an array of [[WorkspaceDbCloudProps]]\n * that can be used to query or load workspace resources. The settings must each be an array of type [[WorkspaceDbSettingsProps]].\n * The returned array will be sorted according to their [[SettingsPriority]], with the first entry being the highest priority [[WorkspaceDb]].\n * @note The list is built by combining, in order, all of the settings with the supplied [[SettingName]]. It may therefore include the\n * properties of same WorkspaceDb multiple times. This list is automatically de-duped by [[getWorkspaceDb]].\n * @note This function is rarely used directly. Usually it is called by [[getWorkspaceDbs]]. However, this function is synchronous and may sometimes\n * be useful for editors, tests, or diagnostics.\n */\n resolveWorkspaceDbSetting(\n /** the name of the setting. */\n settingName: SettingName,\n /** optional filter to choose specific WorkspaceDbs from the settings values. If present, only those WorkspaceDbs for which the filter returns `true` will be included. */\n filter?: Workspace.DbListFilter): WorkspaceDbCloudProps[];\n\n /**\n * Get a sorted array of [[WorkspaceDb]]s that can be used to query or load resources. If the arguments supply a `settingName`, this function will\n * use [[resolveWorkspaceDbSetting]] to get get the array of [[WorkspaceDbCloudProps]].\n * @returns A `Promise` resolving to an array of [[WorkspaceDb]]s sorted by [[SettingsPriority]] so that resources found in WorkspaceDbs earlier in the list take precedence\n * over ones with the same name in later WorkspaceDbs. No WorkspaceDb will appear more than once in the list.\n * @note this function may request an [AccessToken]($bentley) for each WorkspaceDb if necessary, and hence is asynchronous.\n */\n getWorkspaceDbs(\n args: Workspace.DbListOrSettingName & {\n /** if supplied, this array is populated with a list of problems (e.g. no read permission) attempting to load WorkspacesDbs. */\n problems?: WorkspaceDbLoadError[];\n /** only valid when called with a settingName, if so passed as `filter` argument to [[resolveWorkspaceDbSetting]] */\n filter?: Workspace.DbListFilter;\n }): Promise<WorkspaceDb[]>;\n}\n\n/**\n * A WorkspaceContainer is a type of [[CloudSqlite.CloudContainer]] that holds one or more [[WorkspaceDb]]s. Normally a WorkspaceContainer will hold (many versions of) a single WorkspaceDb.\n * Each version of a WorkspaceDb is treated as immutable after it is created and is stored in the WorkspaceContainer indefinitely. That means that\n * older versions of the WorkspaceDb may continue to be used, for example by archived projects. For programmers familiar with [NPM](https://www.npmjs.com/), this is conceptually\n * similar and versioning follows the same rules as NPM using [Semantic Versioning](https://semver.org/).\n * @note It is possible to store more than one WorkspaceDb in the same WorkspaceContainer, but access rights are administered per WorkspaceContainer.\n * That is, if a user has rights to access a WorkspaceContainer, that right applies to all WorkspaceDbs in the WorkspaceContainer.\n * @note Not every WorkspaceContainer is associated with a [[CloudSqlite.CloudContainer]] - WorkspaceContainers may also be loaded from the local file system.\n * In this case, [[cloudContainer]] will be `undefined`.\n * @see [[Workspace.getContainer]] and [[Workspace.getContainerAsync]] to load a container.\n * @beta\n */\nexport interface WorkspaceContainer {\n /** @internal */\n [_implementationProhibited]: unknown;\n /** the local directory where this WorkspaceContainer will store temporary files extracted for file-resources.\n * @internal\n */\n readonly filesDir: LocalDirName;\n /** The workspace into which this container was loaded. */\n readonly workspace: Workspace;\n /** Cloud container for this WorkspaceContainer, or `undefined` if this is a local WorkspaceContainer. */\n readonly cloudContainer?: CloudSqlite.CloudContainer;\n /** Properties supplied when this container was loaded */\n readonly fromProps: WorkspaceContainerProps;\n\n /** @internal */\n addWorkspaceDb(toAdd: WorkspaceDb): void;\n\n /**\n * Find the fully-qualified name of a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`.\n * @throws Error if no version satisfying the criteria exists.\n */\n resolveDbFileName(props: WorkspaceDbProps): WorkspaceDbFullName;\n\n /** Obtain a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`. */\n getWorkspaceDb(props?: WorkspaceDbProps): WorkspaceDb;\n\n /** Close and remove a currently opened [[WorkspaceDb]] from this Workspace.\n * @internal\n */\n closeWorkspaceDb(container: WorkspaceDb): void;\n}\n\nfunction makeSettingName(name: string) {\n return `${\"itwin/core/workspace\"}/${name}`;\n}\n\n/** The names of various [[Setting]]s with special meaning to the [[Workspace]] system.\n * @beta\n */\nexport namespace WorkspaceSettingNames {\n /** The name of a setting that, when present in a [[WorkspaceDb]] loaded by [[Workspace.loadSettingsDictionary]], will automatically\n * be used to find and load additional [[SettingsDictionary]]'s in other [[WorkspaceDb]]s. This permits you to chain the settings inside on [[WorkspaceDb]]\n * to others upon which they depend.\n * This setting's value is an array of [[WorkspaceDbSettingsProps]]s.\n */\n export const settingsWorkspaces = makeSettingName(\"settingsWorkspaces\");\n}\n\n/** A function supplied as part of a [[QueryWorkspaceResourcesArgs]] to iterate the resources retrieved by [[Workspace.queryResources]].\n * The `resources` object should only be used inside the function - it is an error to attempt to iterate it after the function returns.\n * @beta\n */\nexport type QueryWorkspaceResourcesCallback = (resources: Iterable<{ name: string, db: WorkspaceDb }>) => void;\n\n/** Arguments supplied to [[Workspace.queryResources]] defining the query criteria and the list of [[WorkspaceDb]]s to query.\n * @beta\n */\nexport interface QueryWorkspaceResourcesArgs {\n /** The list of `WorkspaceDb`s to query, in the order in which they are to be queried.\n * @see [[Workspace.resolveWorkspaceDbSetting]] or [[Workspace.getWorkspaceDbs]] to obtain an appropriate list of `WorkspaceDb`s.\n */\n dbs: WorkspaceDb[];\n /** The type of resource to query. */\n type?: \"string\" | \"blob\";\n /** A pattern against which to compare the name of each resource, using [[nameCompare]] as the comparison operator.\n * Only resources whose names match the pattern will be included in the query results.\n */\n namePattern?: string;\n /** The comparison operator by which to compare the name of each resource to [[namePattern]].\n * Only resources whose names match the pattern will be included in the query results.\n * Ignored i [[namePattern]] is undefined.\n */\n nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\n /** A function invoked to process the resources that match the query criteria. */\n callback: QueryWorkspaceResourcesCallback;\n}\n\nfunction getWorkspaceResource(dbs: WorkspaceDb[], name: string, type: \"string\" | \"blob\"): string | Uint8Array | undefined {\n for (const db of dbs) {\n const val = type === \"blob\" ? db.getBlob(name) : db.getString(name);\n if (undefined !== val) {\n return val;\n }\n }\n\n return undefined;\n}\n\n/** Arguments supplied to [[Workspace.getStringResource]] and [[WOrkspace.getBlobResource]].\n * @beta\n */\nexport interface GetWorkspaceResourceArgs {\n /** The list of `WorkspaceDb`s to search, in the order in which they are to be searched.\n * @see [[Workspace.resolveWorkspaceDbSetting]] or [[Workspace.getWorkspaceDbs]] to obtain an appropriate list of `WorkspaceDb`s.\n */\n dbs: WorkspaceDb[];\n /** The name of the resource to find. */\n name: WorkspaceResourceName;\n}\n\n/** @beta */\nexport namespace Workspace {\n /** A function invoked to handle exceptions produced while loading workspace data.\n * Applications can override this function to notify the user and/or attempt to diagnose the problem.\n * The default implementation simply logs each exception.\n */\n export let exceptionDiagnosticFn = (e: WorkspaceDbLoadErrors) => { // eslint-disable-line prefer-const\n if (e instanceof Error)\n Logger.logException(BackendLoggerCategory.Workspace, e);\n else\n UnexpectedErrors.handle(e);\n };\n\n /** Arguments supplied to [[Workspace.onSettingsDictionaryLoadedFn]] for every [[SettingsDictionary]] that is loaded from a [[WorkspaceDb]]. */\n export interface SettingsDictionaryLoaded {\n /** The dictionary that was loaded */\n dict: SettingsDictionary;\n /** The WorkspaceDb from which the dictionary was loaded. */\n from: WorkspaceDb;\n }\n\n /** A function invoked each time any [[SettingsDictionary]] is loaded from a [[WorkspaceDb]].\n * Applications can override this function to notify the user and/or record diagnostics.\n * The default implementation simply records an information message in the [Logger]($bentley).\n */\n export let onSettingsDictionaryLoadedFn = (loaded: SettingsDictionaryLoaded) => { // eslint-disable-line prefer-const\n Logger.logInfo(BackendLoggerCategory.Workspace, `loaded setting dictionary ${loaded.dict.props.name} from ${loaded.from.dbFileName}`);\n };\n\n /** Either an array of [[WorkspaceDbCloudProps]] or the name of a [[Setting]] that resolves to an array of [[WorkspaceDbCloudProps]].\n * Used by [[Workspace.getWorkspaceDbs]].\n */\n export type DbListOrSettingName = { readonly dbs: WorkspaceDbCloudProps[], readonly settingName?: never } | { readonly settingName: SettingName, readonly dbs?: never };\n\n /** In arguments supplied to [[Workspace.getWorkspaceDbs]] and [[Workspace.resolveWorkspaceDbSetting]], an optional function used to exclude some\n * [[WorkspaceDb]]s. Only those [[WorkspaceDb]]s for which the function returns `true` will be included.\n */\n export type DbListFilter = (\n /** The properties of the WorkspaceDb to be returned */\n dbProp: WorkspaceDbCloudProps,\n /** The SettingsDictionary holding the [[WorkspaceSettingNames.settingsWorkspace]] setting. May be used, for example, to determine the\n * [[SettingsPriority]] of the dictionary.\n */\n dict: SettingsDictionary\n ) => boolean;\n\n /** Searches a list of [[WorkspaceDb]]s for a string resource of a given name.\n * The list is searched in order, and the first resource with the request name is returned.\n * If no such resource exists, the function returns `undefined`.\n * @see [[WorkspaceDb.getString]] if you only need to search a single `WorkspaceDb`.\n * @beta\n */\n export function getStringResource(args: GetWorkspaceResourceArgs): string | undefined {\n return getWorkspaceResource(args.dbs, args.name, \"string\") as string | undefined;\n }\n\n /** Searches a list of [[WorkspaceDb]]s for a blob resource of a given name.\n * The list is searched in order, and the first resource with the request name is returned.\n * If no such resource exists, the function returns `undefined`.\n * @see [[WorkspaceDb.getblob]] if you only need to search a single `WorkspaceDb`.\n * @beta\n */\n export function getBlobResource(args: GetWorkspaceResourceArgs): Uint8Array | undefined {\n return getWorkspaceResource(args.dbs, args.name, \"blob\") as Uint8Array | undefined;\n }\n\n /** Query a list of [[WorkspaceDb]]s to find resources of a particular type with names matching a specified pattern.\n * @see [[WorkspaceDb.queryResources]] if you only need to query a single `WorkspaceDb`.\n * @beta\n */\n export function queryResources(args: QueryWorkspaceResourcesArgs): void {\n const resources: Array<{ name: string, db: WorkspaceDb }> = [];\n for (const db of args.dbs) {\n db.queryResources({\n type: args.type,\n namePattern: args.namePattern,\n nameCompare: args.nameCompare,\n callback: (names) => {\n for (const name of names) {\n resources.push({ db, name });\n }\n },\n });\n }\n\n args.callback(resources);\n }\n}\n"]}
1
+ {"version":3,"file":"Workspace.js","sourceRoot":"","sources":["../../../src/workspace/Workspace.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA2G;AAM3G,oEAAiE;AACjE,iDAAgE;AAuahE,SAAS,eAAe,CA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;QAC9D,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAuB,CAAC;IACnF,CAAC;IAFe,2BAAiB,oBAEhC,CAAA;IAED;;;;;OAKG;IACH,SAAgB,eAAe,CAAC,IAA8B;QAC5D,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,CAA2B,CAAC;IACrF,CAAC;IAFe,yBAAe,kBAE9B,CAAA;IAED;;;OAGG;IACH,SAAgB,cAAc,CAAC,IAAiC;QAC9D,MAAM,SAAS,GAA6C,EAAE,CAAC;QAC/D,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC1B,EAAE,CAAC,cAAc,CAAC;gBAChB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;wBACzB,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;oBAC/B,CAAC;gBACH,CAAC;aACF,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC3B,CAAC;IAhBe,wBAAc,iBAgB7B,CAAA;AACH,CAAC,EAtFgB,SAAS,yBAAT,SAAS,QAsFzB","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 Workspace\n */\n\nimport { AccessToken, BeEvent, ITwinError, Logger, Optional, UnexpectedErrors } from \"@itwin/core-bentley\";\nimport { LocalDirName, LocalFileName } from \"@itwin/core-common\";\nimport { CloudSqlite } from \"../CloudSqlite\";\nimport { SQLiteDb } from \"../SQLiteDb\";\nimport { SettingName, Settings, SettingsDictionary, SettingsPriority } from \"./Settings\";\nimport type { IModelJsNative } from \"@bentley/imodeljs-native\";\nimport { BackendLoggerCategory } from \"../BackendLoggerCategory\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\n\n/** The unique identifier of a [[WorkspaceContainer]]. This becomes the base name for a local file directory holding the container's [[WorkspaceDb]]s.\n * A valid `WorkspaceContainerId` must conform to the following constraints:\n * - Consist solely of a combination of lower case letters, numbers, and dashes.\n * - May not start or end with a dash.\n * - Must be at least 3 characters long and no longer than 63 characters.\n * @beta\n */\nexport type WorkspaceContainerId = string;\n\n/** Properties describing a [[WorkspaceContainer]] for methods like [[Workspace.getContainerAsync]].\n * @beta\n */\nexport interface WorkspaceContainerProps extends Optional<CloudSqlite.ContainerAccessProps, \"accessToken\"> {\n /** Whether to synchronize the container via [[CloudSqlite.CloudContainer.checkForChanges]] whenever it is connected to a [[CloudSqlite.CloudCache]].\n * @note This property defaults to `true`.\n */\n readonly syncOnConnect?: boolean;\n /** A user-friendly description of the container's contents. */\n readonly description?: string;\n /** A message to display to the user if problems occur while loading the container. */\n readonly loadingHelp?: string;\n}\n\n/** The base name of a [[WorkspaceDb]], without any version information.\n * The name must conform to the following constraints:\n * - Case-insensitively unique among all [[WorkspaceDb]]s in the same [[WorkspaceContainer]].\n * - Between 1 and 255 characters in length.\n * - A legal filename on both [Windows](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions) and UNIX.\n * - Contain none of the following characters: forward or backward slash, period, single or double quote, backtick, and \"#\".\n * - Begin or end with a whitespace character.\n * @see [[WorkspaceDbFullName]] for the fully-specified name, including version information.\n * @beta\n */\nexport type WorkspaceDbName = string;\n\n/** The fully-specified name of a [[WorkspaceDb]], combining its [[WorkspaceDbName]] and [[WorkspaceDbVersion]] in the format \"name:version\".\n * @beta\n */\nexport type WorkspaceDbFullName = string;\n\n/** A [semver](https://github.com/npm/node-semver) string describing the version of a [[WorkspaceDb]], e.g., \"4.2.11\".\n * @beta\n */\nexport type WorkspaceDbVersion = CloudSqlite.DbVersion;\n\n/** A [semver string](https://github.com/npm/node-semver?tab=readme-ov-file#ranges) describing a range of acceptable [[WorkspaceDbVersion]]s,\n * e.g., \">=1.2.7 <1.3.0\".\n * @beta\n */\nexport type WorkspaceDbVersionRange = CloudSqlite.DbVersionRange;\n\n/** Specifies the name and version of a [[WorkspaceDb]].\n * @beta\n */\nexport type WorkspaceDbNameAndVersion = Optional<CloudSqlite.DbNameAndVersion, \"dbName\">;\n\n/** Properties that specify how to load a [[WorkspaceDb]] within a [[WorkspaceContainer]].\n * @beta\n */\nexport interface WorkspaceDbProps extends WorkspaceDbNameAndVersion {\n /** If true, allow semver [prerelease versions](https://github.com/npm/node-semver?tab=readme-ov-file#prerelease-tags), e.g., \"1.4.2-beta.0\".\n * By default, only released version are allowed.\n */\n readonly includePrerelease?: boolean;\n /** If true, start a prefetch operation whenever this [[WorkspaceDb]] is opened, to begin downloading pages of the database before they are needed. */\n readonly prefetch?: boolean;\n}\n\n/** Properties describing a [[WorkspaceDb]] and the [[WorkspaceContainer]] containing it.\n * @beta\n */\nexport type WorkspaceDbCloudProps = WorkspaceDbProps & WorkspaceContainerProps;\n\n/** A function supplied as [[WorkspaceDbQueryResourcesArgs.callback]] to be invoked to process the requested resources.\n * @beta\n */\nexport type WorkspaceDbQueryResourcesCallback = (resourceNames: Iterable<string>) => void;\n\n/** Arguments supplied to [[WorkspaceDb.queryResources]].\n * @beta\n */\nexport interface WorkspaceDbQueryResourcesArgs {\n /** The type of resource to query. */\n type?: \"string\" | \"blob\";\n /** A pattern against which to compare the name of each resource, using [[nameCompare]] as the comparison operator.\n * Only resources whose names match the pattern will be included in the query results.\n */\n namePattern?: string;\n /** The comparison operator by which to compare the name of each resource to [[namePattern]].\n * Only resources whose names match the pattern will be included in the query results.\n * Ignored if [[namePattern]] is undefined.\n */\n nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\n /** A function invoked to process the resources that match the query criterion. */\n callback: WorkspaceDbQueryResourcesCallback;\n}\n\n/** Metadata stored inside a [[WorkspaceDb]] describing the database's contents, to help users understand the purpose of the [[WorkspaceDb]], who to\n * contact with questions about it, and so on.\n * @note Only the [[workspaceName]] field is required, and users may add additional fields for their own purposes.\n * @note Since the information is stored inside of the [[WorkspaceDb]], it is versioned along with the rest of the contents.\n * @beta\n */\nexport interface WorkspaceDbManifest {\n /** The name of the [[WorkspaceDb]] to be shown in user interfaces. Organizations should attempt to make this name informative enough\n * so that uses may refer to this name in conversations. It should also be unique enough that there's no confusion when it appears in\n * lists of WorkspaceDbs.\n * @note it is possible and valid to change the workspaceName between new version of a WorkspaceDb (e.g. incorporating a date).\n */\n readonly workspaceName: string;\n /** A description of the contents of this [[WorkspaceDb]] to help users understand its purpose and appropriate usage. */\n readonly description?: string;\n /** The name of the person to contact with questions about this [[WorkspaceDb]]. */\n readonly contactName?: string;\n /** The name of the person who last modified this [[WorkspaceDb]]. */\n readonly lastEditedBy?: string;\n}\n\n/**\n * An exception thrown when attempting to load a [[WorkspaceDb]] or some of its data; for example, if the [[WorkspaceDb]] could not be found or the user\n * is not authorized to access its [[WorkspaceContainer]].\n * @beta\n */\nexport interface WorkspaceDbLoadError extends ITwinError {\n /** The properties of the [[WorkspaceDb]] that was attempted to load, including the identity of its [[WorkspaceContainer]]. */\n wsDbProps?: WorkspaceDbProps & Partial<WorkspaceDbCloudProps>;\n /** The [[WorkspaceDb]] in which the error occurred, if available. */\n wsDb?: WorkspaceDb;\n}\n\n/** An exception that may occur while opening an [[IModelDb]] if any problems are detected while loading its [[IModelDb.workspace]].\n * This exception is never actually thrown; instead, after the iModel is opened, the exception is forwarded to [[Workspace.exceptionDiagnosticFn]]\n * so that the user can be notified of the problems.\n * @beta\n */\nexport interface WorkspaceDbLoadErrors extends ITwinError {\n /** An array of problems that were encountered attempting to load [[WorkspaceDb]]s for an [[IModelDb]]. The most common problem\n * is that the user doesn't have read access to one or more [[WorkspaceContainer]]s used by the iModel's [[Workspace]]..\n */\n wsLoadErrors?: WorkspaceDbLoadError[];\n}\n\n/** Specifies a resource inside a [[WorkspaceDb]] that holds a [[SettingsDictionary]] to load into [[Workspace.settings]].\n * Settings of this type named [[WorkspaceSettingNames.settingsWorkspaces]] are automatically loaded by [[Workspace.loadSettingsDictionary]].\n * @beta\n */\nexport interface WorkspaceDbSettingsProps extends WorkspaceDbCloudProps {\n /** The name of the resource holding the stringified JSON of the [[SettingsDictionary]]. */\n resourceName: string;\n /** The priority to assign to the [[SettingsDictionary]]. */\n priority: SettingsPriority;\n}\n\n/** The name of a blob, string, or file resource stored in a [[WorkspaceDb]].\n * Resource names must conform to the following constraints:\n * - At least 1 character and no more than 1024 characters in length.\n * - No leading or trailing whitespace characters.\n * Each resource of a given type must has a unique name within the [[WorkspaceDb]]. It is technically possible, but discouraged, to define\n * resources with the same name but different types.\n * @beta\n */\nexport type WorkspaceResourceName = string;\n\n/** A SQLite database in a [[Workspace]] containing named resources that the application is configured to use.\n * Resources are referred to by their [[WorkspaceResourceName]]s and can represent any number of things, including:\n * - [GeographicCRS]($common)es used to define the coordinate reference system of an iTwin.\n * - [[SettingsDictionary]]'s that contribute to the [[Workspace.settings]].\n * - Files that can be extracted temporarily to the local file system to be accessed by programs directly from disk.\n *\n * Ultimately, each resource is stored in one of the following formats:\n * - A `string`, which is often a stringified `JSON` representation of the resource;\n * - A binary `blob`; or\n * - An embedded file.\n *\n * Strings and blobs can be accessed directly using [[getString]] and [[getBlob]]. Files must first be copied to the local file system using [[getFile]], and should be avoided unless the software\n * that uses them is written to access them from disk.\n *\n * A `WorkspaceDb` resides in a [[WorkspaceContainer]] that can be published to the cloud. Once published, the `WorkspaceDb` becomes immutable.\n * However, multiple versions of a single `WorkspaceDb` can be created, allowing the [[Workspace]] contents to evolve over time.\n * `WorkspaceDb`s use [semantic versioning](https://github.com/npm/node-semver).\n *\n * The set of available `WorkspaceDb`s available for use for specific purposes are defined in the [[Workspace]]'s [[Settings]]. You can obtain\n * a single `WorkspaceDb` using [[WorkspaceContainer.getWorkspaceDb]], but more commonly you will use [[Workspace.getWorkspaceDbs]] to obtain\n * a list of all of the `WorkspaceDb`s, sorted by priority, that correspond to a given [[SettingName]].\n *\n * You can create new `WorkspaceDb`s (or new versions of existing `WorkspaceDb`s) using [[WorkspaceEditor]].\n * @beta\n */\nexport interface WorkspaceDb {\n /** @internal */\n [_implementationProhibited]: unknown;\n /** The [[WorkspaceContainer]] in which this db resides. */\n readonly container: WorkspaceContainer;\n /** The base name of this WorkspaceDb, without version */\n readonly dbName: WorkspaceDbName;\n /** An event raised before this WorkspaceDb is [[close]]d. */\n readonly onClose: BeEvent<() => void>;\n /** The name by which the WorkspaceDb can be opened. This will be either a local file name or the name of a database in a [[CloudSqlite.CloudContainer]]. */\n readonly dbFileName: string;\n /** The underlying SQLite database that stores this WorkspaceDb's resources. */\n readonly sqliteDb: SQLiteDb;\n /** Whether the underlying [[sqliteDb]] is currently [[open]]ed. */\n readonly isOpen: boolean;\n /** The manifest that describes the contents and context of this WorkspaceDb. */\n readonly manifest: WorkspaceDbManifest;\n /** The version of this WorkspaceDb */\n readonly version: WorkspaceDbVersion;\n\n /** Open the underlying [[sqliteDb]] to perform a query. Generally WorkspaceDbs are left closed and opened/closed as they're used. However,\n * when there will be significant activity against a WorkspaceDb, it may be useful to open it before the operations and close it afterwards.\n * Methods like [[queryResources]] open the SQLite database automatically and [[close]] it before they return.\n */\n open(): void;\n\n /** Close the underlying [[sqliteDb]]. You should call this after [[open]]ing the database and completing your query. */\n close(): void;\n\n /** Look up a string resource by name, if one exists. */\n getString(rscName: WorkspaceResourceName): string | undefined;\n\n /** Look up a binary resource by name, if one exists. */\n getBlob(rscName: WorkspaceResourceName): Uint8Array | undefined;\n\n /** Get a BlobIO reader for a blob WorkspaceResource.\n * @note when finished, caller *must* call `close` on the BlobIO.\n * @internal\n */\n getBlobReader(rscName: WorkspaceResourceName): SQLiteDb.BlobIO;\n\n /**\n * Extract a local copy of a file resource from this WorkspaceDb, if present.\n * @param rscName The name of the file resource in the WorkspaceDb\n * @param targetFileName optional name for extracted file. Some applications require files in specific locations or filenames. If\n * you know the full path to use for the extracted file, you can supply it. Generally, it is best to *not* supply the filename and\n * keep the extracted files in the directory specified by [[WorkspaceContainer.filesDir]].\n * @returns the full path to a file on the local file system, or undefined if the no file named `rscName` exists.\n * @note The file is copied from the file into the local file system so it may be accessed directly. This happens only\n * as necessary, if the local file doesn't exist, or if it is out-of-date because it was updated in the file.\n * For this reason, you should not save the local file name, and instead call this method every time you access it, so its\n * content is always holds the correct version.\n * @note The filename will be a hash value, not the resource name.\n * @note Workspace resource files are set as read-only as they are copied from the file.\n * To edit them, you must first copy them to another location.\n */\n getFile(rscName: WorkspaceResourceName, targetFileName?: LocalFileName): LocalFileName | undefined;\n\n /**\n * Ensure that the contents of this `WorkspaceDb` are downloaded into the local cache so that it may be accessed offline.\n * Until the promise resolves, the `WorkspaceDb` is not fully downloaded, but it *may* be safely accessed during the download.\n * To determine the progress of the download, use the `localBlocks` and `totalBlocks` values returned by `CloudContainer.queryDatabase`.\n * @returns a [[CloudSqlite.CloudPrefetch]] object that can be used to await and/or cancel the prefetch.\n * @throws if this WorkspaceDb is not from a [[CloudSqlite.CloudContainer]].\n */\n prefetch(opts?: CloudSqlite.PrefetchProps): CloudSqlite.CloudPrefetch;\n\n /** Find resources of a particular type with names matching a specified pattern.\n * The matching resources will be supplied to [[WorkspaceDbQueryResourcesArgs.callbackk]].\n * @see [[Workspace.queryResources]] to query resources within multiple `WorkspaceDb`s.\n */\n queryResources(args: WorkspaceDbQueryResourcesArgs): void;\n\n /** @internal */\n queryFileResource(rscName: WorkspaceResourceName): { localFileName: LocalFileName, info: IModelJsNative.EmbedFileQuery } | undefined;\n}\n\n/** Options supplied to [[IModelHost.startup]] via [[IModelHostOptions.workspace]] to customize the initialization of [[IModelHost.appWorkspace]].\n * @beta\n */\nexport interface WorkspaceOpts {\n /** The local directory for non-cloud-based [[WorkspaceDb]] files. The [[Workspace]] API will look in this directory\n * for files named `${containerId}/${dbId}.itwin-workspace`.\n * @note if not supplied, defaults to \"iTwin/Workspace\" in the user-local folder.\n */\n containerDir?: LocalDirName;\n\n /** The name(s) of one or more local JSON files containing [[SettingsDictionary]]s to load when initializing the [[Workspace]]. */\n settingsFiles?: LocalFileName | LocalFileName[];\n}\n\n/** Arguments supplied to [[Workspace.getContainer]] and [[WorkspaceEditor.getContainer]].\n * @beta\n */\nexport interface GetWorkspaceContainerArgs extends WorkspaceContainerProps {\n /** Token required to access the container. */\n accessToken: AccessToken;\n}\n\n/**\n * Settings and resources that customize an application for the current session.\n * See the [learning article]($docs/learning/backend/Workspace) for a detailed overiew and examples.\n * @beta\n */\nexport interface Workspace {\n /** @internal */\n [_implementationProhibited]: unknown;\n\n /** The directory for local WorkspaceDb files with the name `${containerId}/${dbId}.itwin-workspace`.\n * @internal\n */\n readonly containerDir: LocalDirName;\n\n /** The current [[Settings]] for this Workspace */\n readonly settings: Settings;\n\n /** Get the cloud cache for cloud-based [[WorkspaceContainer]]s. */\n getCloudCache(): CloudSqlite.CloudCache;\n\n /** Search for a container previously opened by [[getContainer]] or [[getContainerAsync]].\n * @param containerId The id of the container\n * @returns the [[WorkspaceContainer]] for `containerId`, or `undefined` if no such container has been opened.\n * @internal\n */\n findContainer(containerId: WorkspaceContainerId): WorkspaceContainer | undefined;\n\n /** Obtain the [[WorkspaceContainer]] specified by `props`.\n * @param props The properties of the `WorkspaceContainer`, opening it if it is not already opened.\n * Otherwise it is created.\n * @note This function allows a `WorkspaceContainer.Props` without its [AccessToken]($bentley). It will attempt to obtain one from the [[BlobContainer]] service,\n * hence this function is async.\n * @see [[getContainer]] to obtain a container synchronously.\n */\n getContainerAsync(props: WorkspaceContainerProps): Promise<WorkspaceContainer>;\n\n /** Get a WorkspaceContainer with a supplied access token. This function is synchronous and may be used if:\n * - a valid [AccessToken]($bentley) is already available;\n * - the container has already been previously prefetched in another session (this is useful for offline usage); or\n * - the container is public and doesn't require an [AccessToken]($bentley).\n * @see [[getContainerAsync]] to obtain a container asynchronously if the above conditions do not apply.\n */\n getContainer(props: GetWorkspaceContainerArgs): WorkspaceContainer;\n\n /** Load a [[SettingsDictionary]] from the specified [[WorkspaceDb]] and add it to this workspace's current [[Settings]].\n * @note this function will load the dictionaries from the supplied list, and it will also call itself recursively for any entries in\n * the loaded Settings with the name [[WorkspaceSettingNames.settingsWorkspaces]]. In this manner, WorkspaceSettings may be \"chained\" together so that loading one\n * causes its \"dependent\" WorkspaceSettings to be loaded. Its `Promise` is resolved after all have been loaded (or failed to load).\n */\n loadSettingsDictionary(\n /** The properties of the [[WorkspaceDb]], plus the resourceName and [[SettingsPriority]]. May be either a single value or an array of them */\n props: WorkspaceDbSettingsProps | WorkspaceDbSettingsProps[],\n /** If present, an array that is populated with a list of problems while attempting to load the [[SettingsDictionary]](s). */\n problems?: WorkspaceDbLoadError[]\n ): Promise<void>;\n\n /** Get a single [[WorkspaceDb]]. */\n getWorkspaceDb(props: WorkspaceDbCloudProps): Promise<WorkspaceDb>;\n\n /**\n * Resolve the value of all [[Setting]]s from this workspace with the supplied `settingName` into an array of [[WorkspaceDbCloudProps]]\n * that can be used to query or load workspace resources. The settings must each be an array of type [[WorkspaceDbSettingsProps]].\n * The returned array will be sorted according to their [[SettingsPriority]], with the first entry being the highest priority [[WorkspaceDb]].\n * @note The list is built by combining, in order, all of the settings with the supplied [[SettingName]]. It may therefore include the\n * properties of same WorkspaceDb multiple times. This list is automatically de-duped by [[getWorkspaceDb]].\n * @note This function is rarely used directly. Usually it is called by [[getWorkspaceDbs]]. However, this function is synchronous and may sometimes\n * be useful for editors, tests, or diagnostics.\n */\n resolveWorkspaceDbSetting(\n /** the name of the setting. */\n settingName: SettingName,\n /** optional filter to choose specific WorkspaceDbs from the settings values. If present, only those WorkspaceDbs for which the filter returns `true` will be included. */\n filter?: Workspace.DbListFilter): WorkspaceDbCloudProps[];\n\n /**\n * Get a sorted array of [[WorkspaceDb]]s that can be used to query or load resources. If the arguments supply a `settingName`, this function will\n * use [[resolveWorkspaceDbSetting]] to get get the array of [[WorkspaceDbCloudProps]].\n * @returns A `Promise` resolving to an array of [[WorkspaceDb]]s sorted by [[SettingsPriority]] so that resources found in WorkspaceDbs earlier in the list take precedence\n * over ones with the same name in later WorkspaceDbs. No WorkspaceDb will appear more than once in the list.\n * @note this function may request an [AccessToken]($bentley) for each WorkspaceDb if necessary, and hence is asynchronous.\n */\n getWorkspaceDbs(\n args: Workspace.DbListOrSettingName & {\n /** if supplied, this array is populated with a list of problems (e.g. no read permission) attempting to load WorkspacesDbs. */\n problems?: WorkspaceDbLoadError[];\n /** only valid when called with a settingName, if so passed as `filter` argument to [[resolveWorkspaceDbSetting]] */\n filter?: Workspace.DbListFilter;\n }): Promise<WorkspaceDb[]>;\n}\n\n/**\n * A WorkspaceContainer is a type of [[CloudSqlite.CloudContainer]] that holds one or more [[WorkspaceDb]]s. Normally a WorkspaceContainer will hold (many versions of) a single WorkspaceDb.\n * Each version of a WorkspaceDb is treated as immutable after it is created and is stored in the WorkspaceContainer indefinitely. That means that\n * older versions of the WorkspaceDb may continue to be used, for example by archived projects. For programmers familiar with [NPM](https://www.npmjs.com/), this is conceptually\n * similar and versioning follows the same rules as NPM using [Semantic Versioning](https://semver.org/).\n * @note It is possible to store more than one WorkspaceDb in the same WorkspaceContainer, but access rights are administered per WorkspaceContainer.\n * That is, if a user has rights to access a WorkspaceContainer, that right applies to all WorkspaceDbs in the WorkspaceContainer.\n * @note Not every WorkspaceContainer is associated with a [[CloudSqlite.CloudContainer]] - WorkspaceContainers may also be loaded from the local file system.\n * In this case, [[cloudContainer]] will be `undefined`.\n * @see [[Workspace.getContainer]] and [[Workspace.getContainerAsync]] to load a container.\n * @beta\n */\nexport interface WorkspaceContainer {\n /** @internal */\n [_implementationProhibited]: unknown;\n /** the local directory where this WorkspaceContainer will store temporary files extracted for file-resources.\n * @internal\n */\n readonly filesDir: LocalDirName;\n /** The workspace into which this container was loaded. */\n readonly workspace: Workspace;\n /** Cloud container for this WorkspaceContainer, or `undefined` if this is a local WorkspaceContainer. */\n readonly cloudContainer?: CloudSqlite.CloudContainer;\n /** Properties supplied when this container was loaded */\n readonly fromProps: WorkspaceContainerProps;\n\n /** @internal */\n addWorkspaceDb(toAdd: WorkspaceDb): void;\n\n /**\n * Find the fully-qualified name of a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`.\n * @throws Error if no version satisfying the criteria exists.\n */\n resolveDbFileName(props: WorkspaceDbProps): WorkspaceDbFullName;\n\n /** Obtain a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`. */\n getWorkspaceDb(props?: WorkspaceDbProps): WorkspaceDb;\n\n /** Close and remove a currently opened [[WorkspaceDb]] from this Workspace.\n * @internal\n */\n closeWorkspaceDb(container: WorkspaceDb): void;\n}\n\nfunction makeSettingName(name: string) {\n return `${\"itwin/core/workspace\"}/${name}`;\n}\n\n/** The names of various [[Setting]]s with special meaning to the [[Workspace]] system.\n * @beta\n */\nexport namespace WorkspaceSettingNames {\n /** The name of a setting that, when present in a [[WorkspaceDb]] loaded by [[Workspace.loadSettingsDictionary]], will automatically\n * be used to find and load additional [[SettingsDictionary]]'s in other [[WorkspaceDb]]s. This permits you to chain the settings inside on [[WorkspaceDb]]\n * to others upon which they depend.\n * This setting's value is an array of [[WorkspaceDbSettingsProps]]s.\n */\n export const settingsWorkspaces = makeSettingName(\"settingsWorkspaces\");\n}\n\n/** A function supplied as part of a [[QueryWorkspaceResourcesArgs]] to iterate the resources retrieved by [[Workspace.queryResources]].\n * The `resources` object should only be used inside the function - it is an error to attempt to iterate it after the function returns.\n * @beta\n */\nexport type QueryWorkspaceResourcesCallback = (resources: Iterable<{ name: string, db: WorkspaceDb }>) => void;\n\n/** Arguments supplied to [[Workspace.queryResources]] defining the query criteria and the list of [[WorkspaceDb]]s to query.\n * @beta\n */\nexport interface QueryWorkspaceResourcesArgs {\n /** The list of `WorkspaceDb`s to query, in the order in which they are to be queried.\n * @see [[Workspace.resolveWorkspaceDbSetting]] or [[Workspace.getWorkspaceDbs]] to obtain an appropriate list of `WorkspaceDb`s.\n */\n dbs: WorkspaceDb[];\n /** The type of resource to query. */\n type?: \"string\" | \"blob\";\n /** A pattern against which to compare the name of each resource, using [[nameCompare]] as the comparison operator.\n * Only resources whose names match the pattern will be included in the query results.\n */\n namePattern?: string;\n /** The comparison operator by which to compare the name of each resource to [[namePattern]].\n * Only resources whose names match the pattern will be included in the query results.\n * Ignored i [[namePattern]] is undefined.\n */\n nameCompare?: \"GLOB\" | \"LIKE\" | \"NOT GLOB\" | \"NOT LIKE\" | \"=\" | \"<\" | \">\";\n /** A function invoked to process the resources that match the query criteria. */\n callback: QueryWorkspaceResourcesCallback;\n}\n\nfunction getWorkspaceResource(dbs: WorkspaceDb[], name: string, type: \"string\" | \"blob\"): string | Uint8Array | undefined {\n for (const db of dbs) {\n const val = type === \"blob\" ? db.getBlob(name) : db.getString(name);\n if (undefined !== val) {\n return val;\n }\n }\n\n return undefined;\n}\n\n/** Arguments supplied to [[Workspace.getStringResource]] and [[WOrkspace.getBlobResource]].\n * @beta\n */\nexport interface GetWorkspaceResourceArgs {\n /** The list of `WorkspaceDb`s to search, in the order in which they are to be searched.\n * @see [[Workspace.resolveWorkspaceDbSetting]] or [[Workspace.getWorkspaceDbs]] to obtain an appropriate list of `WorkspaceDb`s.\n */\n dbs: WorkspaceDb[];\n /** The name of the resource to find. */\n name: WorkspaceResourceName;\n}\n\n/** @beta */\nexport namespace Workspace {\n /** A function invoked to handle exceptions produced while loading workspace data.\n * Applications can override this function to notify the user and/or attempt to diagnose the problem.\n * The default implementation simply logs each exception.\n */\n export let exceptionDiagnosticFn = (e: WorkspaceDbLoadErrors) => { // eslint-disable-line prefer-const\n if (e instanceof Error)\n Logger.logException(BackendLoggerCategory.Workspace, e);\n else\n UnexpectedErrors.handle(e);\n };\n\n /** Arguments supplied to [[Workspace.onSettingsDictionaryLoadedFn]] for every [[SettingsDictionary]] that is loaded from a [[WorkspaceDb]]. */\n export interface SettingsDictionaryLoaded {\n /** The dictionary that was loaded */\n dict: SettingsDictionary;\n /** The WorkspaceDb from which the dictionary was loaded. */\n from: WorkspaceDb;\n }\n\n /** A function invoked each time any [[SettingsDictionary]] is loaded from a [[WorkspaceDb]].\n * Applications can override this function to notify the user and/or record diagnostics.\n * The default implementation simply records an information message in the [Logger]($bentley).\n */\n export let onSettingsDictionaryLoadedFn = (loaded: SettingsDictionaryLoaded) => { // eslint-disable-line prefer-const\n Logger.logInfo(BackendLoggerCategory.Workspace, `loaded setting dictionary ${loaded.dict.props.name} from ${loaded.from.dbFileName}`);\n };\n\n /** Either an array of [[WorkspaceDbCloudProps]] or the name of a [[Setting]] that resolves to an array of [[WorkspaceDbCloudProps]].\n * Used by [[Workspace.getWorkspaceDbs]].\n */\n export type DbListOrSettingName = { readonly dbs: WorkspaceDbCloudProps[], readonly settingName?: never } | { readonly settingName: SettingName, readonly dbs?: never };\n\n /** In arguments supplied to [[Workspace.getWorkspaceDbs]] and [[Workspace.resolveWorkspaceDbSetting]], an optional function used to exclude some\n * [[WorkspaceDb]]s. Only those [[WorkspaceDb]]s for which the function returns `true` will be included.\n */\n export type DbListFilter = (\n /** The properties of the WorkspaceDb to be returned */\n dbProp: WorkspaceDbCloudProps,\n /** The SettingsDictionary holding the [[WorkspaceSettingNames.settingsWorkspace]] setting. May be used, for example, to determine the\n * [[SettingsPriority]] of the dictionary.\n */\n dict: SettingsDictionary\n ) => boolean;\n\n /** Searches a list of [[WorkspaceDb]]s for a string resource of a given name.\n * The list is searched in order, and the first resource with the request name is returned.\n * If no such resource exists, the function returns `undefined`.\n * @see [[WorkspaceDb.getString]] if you only need to search a single `WorkspaceDb`.\n * @beta\n */\n export function getStringResource(args: GetWorkspaceResourceArgs): string | undefined {\n return getWorkspaceResource(args.dbs, args.name, \"string\") as string | undefined;\n }\n\n /** Searches a list of [[WorkspaceDb]]s for a blob resource of a given name.\n * The list is searched in order, and the first resource with the request name is returned.\n * If no such resource exists, the function returns `undefined`.\n * @see [[WorkspaceDb.getblob]] if you only need to search a single `WorkspaceDb`.\n * @beta\n */\n export function getBlobResource(args: GetWorkspaceResourceArgs): Uint8Array | undefined {\n return getWorkspaceResource(args.dbs, args.name, \"blob\") as Uint8Array | undefined;\n }\n\n /** Query a list of [[WorkspaceDb]]s to find resources of a particular type with names matching a specified pattern.\n * @see [[WorkspaceDb.queryResources]] if you only need to query a single `WorkspaceDb`.\n * @beta\n */\n export function queryResources(args: QueryWorkspaceResourcesArgs): void {\n const resources: Array<{ name: string, db: WorkspaceDb }> = [];\n for (const db of args.dbs) {\n db.queryResources({\n type: args.type,\n namePattern: args.namePattern,\n nameCompare: args.nameCompare,\n callback: (names) => {\n for (const name of names) {\n resources.push({ db, name });\n }\n },\n });\n }\n\n args.callback(resources);\n }\n}\n"]}
@@ -20,7 +20,7 @@ export declare class LockConflict extends IModelError {
20
20
  briefcaseAlias: string, msg: "shared lock is held" | "exclusive lock is already held");
21
21
  }
22
22
  /** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
23
- * @deprecated in 4.7 Use [LockState]($common)
23
+ * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)
24
24
  * @public
25
25
  */
26
26
  export declare enum LockState {
@@ -24,7 +24,7 @@ export class LockConflict extends IModelError {
24
24
  }
25
25
  }
26
26
  /** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
27
- * @deprecated in 4.7 Use [LockState]($common)
27
+ * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)
28
28
  * @public
29
29
  */
30
30
  export var LockState;
@@ -1 +1 @@
1
- {"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAuC,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAEyB,WAAW,GAE1C,MAAM,oBAAoB,CAAC;AAI5B;;EAEE;AACF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAGzB;IAEA;IAJlB;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","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 HubAccess\n */\n\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\nimport {\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, ProgressFunction } from \"./CheckpointManager\";\nimport type { TokenArg } from \"./IModelDb\";\n\n/** Exception thrown if lock cannot be acquired.\n * @beta\n*/\nexport class LockConflict extends IModelError {\n public constructor(\n /** Id of Briefcase holding lock */\n public readonly briefcaseId: BriefcaseId,\n /** Alias of Briefcase holding lock */\n public readonly briefcaseAlias: string,\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\n ) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @deprecated in 4.7 Use [LockState]($common)\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/**\n * The properties to access a V2 checkpoint through a daemon.\n * @public\n */\nexport interface V2CheckpointAccessProps {\n /** blob store account name. */\n readonly accountName: string;\n /** AccessToken that grants access to the container. */\n readonly sasToken: AccessToken;\n /** The name of the iModel's blob store container holding all checkpoints. */\n readonly containerId: string;\n /** The name of the virtual file within the container, used for the checkpoint */\n readonly dbName: string;\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\n readonly storageType: string;\n}\n\n/**\n * Maps element Ids to their corresponding [LockState]($common)s.\n * @public\n */\nexport type LockMap = Map<Id64String, CommonLockState>;\n\n/**\n * The properties of a lock that may be obtained from a lock server.\n * @public\n */\nexport interface LockProps {\n /** The elementId for the lock */\n readonly id: Id64String;\n /** the lock state */\n readonly state: CommonLockState;\n}\n\n/**\n * Argument for cancelling and tracking download progress.\n * @public\n */\nexport interface DownloadProgressArg {\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\n progressCallback?: ProgressFunction;\n}\n\n/**\n * Argument for methods that must supply an iTwinId\n * @public\n */\nexport interface ITwinIdArg {\n readonly iTwinId: GuidString;\n}\n\n/**\n * Argument for methods that must supply an IModelId\n * @public\n */\nexport interface IModelIdArg extends TokenArg {\n readonly iModelId: GuidString;\n}\n\n/**\n * Argument for acquiring a new BriefcaseId\n * @public\n */\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\n readonly briefcaseAlias?: string;\n}\n\n/** Argument for methods that must supply an IModel name and iTwinId\n * @public\n */\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\n readonly iModelName: string;\n}\n\n/** Argument for methods that must supply an IModelId and a BriefcaseId\n * @public\n */\nexport interface BriefcaseIdArg extends IModelIdArg {\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Argument for methods that must supply a briefcaseId and a changeset\n * @public\n */\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a changeset\n * @public\n */\nexport interface ChangesetArg extends IModelIdArg {\n readonly changeset: ChangesetIndexOrId;\n}\n\n/** Argument for downloading a changeset.\n * @public\n */\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\n /** Directory where the changeset should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/** @internal */\nexport interface ChangesetIndexArg extends IModelIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a range of Changesets.\n * @public\n */\nexport interface ChangesetRangeArg extends IModelIdArg {\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\n readonly range?: ChangesetRange;\n}\n\n/** Argument for downloading a changeset range.\n * @public\n */\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\n /** Directory where the changesets should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/**\n * Arguments to create a new iModel in iModelHub\n * @public\n */\nexport interface CreateNewIModelProps extends IModelNameArg {\n readonly description?: string;\n readonly version0?: LocalFileName;\n readonly noLocks?: true;\n}\n\n/**\n * Methods for accessing services of IModelHub from an iTwin.js backend.\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\n * @public\n */\nexport interface BackendHubAccess {\n /** Download all the changesets in the specified range. */\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\n /** Download a single changeset. */\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\n /** Query the changeset properties given a ChangesetIndex */\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\n /** Query an array of changeset properties given a range of ChangesetIndexes */\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\n /** Get the ChangesetProps of the most recent changeset */\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for an IModelVersion */\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for a named version */\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\n\n /** Acquire a new briefcaseId for the supplied iModelId\n * @note usually there should only be one briefcase per iModel per user.\n */\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** get an array of the briefcases assigned to a user. */\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\n\n /** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\n\n /**\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\n * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\n */\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\n\n /** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\n\n /** Release all currently held locks */\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\n\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\n\n /** create a new iModel. Returns the Guid of the newly created iModel */\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\n\n /** delete an iModel */\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"BackendHubAccess.js","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAuC,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAEyB,WAAW,GAE1C,MAAM,oBAAoB,CAAC;AAI5B;;EAEE;AACF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAGzB;IAEA;IAJlB;IACE,mCAAmC;IACnB,WAAwB;IACxC,sCAAsC;IACtB,cAAsB,EACtC,GAA6D;QAE7D,KAAK,CAAC,eAAe,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;QALxC,gBAAW,GAAX,WAAW,CAAa;QAExB,mBAAc,GAAd,cAAc,CAAQ;IAIxC,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,SASX;AATD,WAAY,SAAS;IACnB,gCAAgC;IAChC,yCAAQ,CAAA;IACR,mJAAmJ;IACnJ,6CAAU,CAAA;IACV;;OAEG;IACH,mDAAa,CAAA;AACf,CAAC,EATW,SAAS,KAAT,SAAS,QASpB","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 HubAccess\n */\n\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\nimport {\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\n LockState as CommonLockState, IModelError, IModelVersion,\n LocalDirName, LocalFileName,\n} from \"@itwin/core-common\";\nimport { CheckpointProps, ProgressFunction } from \"./CheckpointManager\";\nimport type { TokenArg } from \"./IModelDb\";\n\n/** Exception thrown if lock cannot be acquired.\n * @beta\n*/\nexport class LockConflict extends IModelError {\n public constructor(\n /** Id of Briefcase holding lock */\n public readonly briefcaseId: BriefcaseId,\n /** Alias of Briefcase holding lock */\n public readonly briefcaseAlias: string,\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\n ) {\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\n }\n}\n\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\n * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)\n * @public\n */\nexport enum LockState {\n /** The element is not locked */\n None = 0,\n /** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */\n Shared = 1,\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\n */\n Exclusive = 2,\n}\n\n/**\n * The properties to access a V2 checkpoint through a daemon.\n * @public\n */\nexport interface V2CheckpointAccessProps {\n /** blob store account name. */\n readonly accountName: string;\n /** AccessToken that grants access to the container. */\n readonly sasToken: AccessToken;\n /** The name of the iModel's blob store container holding all checkpoints. */\n readonly containerId: string;\n /** The name of the virtual file within the container, used for the checkpoint */\n readonly dbName: string;\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\n readonly storageType: string;\n}\n\n/**\n * Maps element Ids to their corresponding [LockState]($common)s.\n * @public\n */\nexport type LockMap = Map<Id64String, CommonLockState>;\n\n/**\n * The properties of a lock that may be obtained from a lock server.\n * @public\n */\nexport interface LockProps {\n /** The elementId for the lock */\n readonly id: Id64String;\n /** the lock state */\n readonly state: CommonLockState;\n}\n\n/**\n * Argument for cancelling and tracking download progress.\n * @public\n */\nexport interface DownloadProgressArg {\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\n progressCallback?: ProgressFunction;\n}\n\n/**\n * Argument for methods that must supply an iTwinId\n * @public\n */\nexport interface ITwinIdArg {\n readonly iTwinId: GuidString;\n}\n\n/**\n * Argument for methods that must supply an IModelId\n * @public\n */\nexport interface IModelIdArg extends TokenArg {\n readonly iModelId: GuidString;\n}\n\n/**\n * Argument for acquiring a new BriefcaseId\n * @public\n */\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\n readonly briefcaseAlias?: string;\n}\n\n/** Argument for methods that must supply an IModel name and iTwinId\n * @public\n */\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\n readonly iModelName: string;\n}\n\n/** Argument for methods that must supply an IModelId and a BriefcaseId\n * @public\n */\nexport interface BriefcaseIdArg extends IModelIdArg {\n readonly briefcaseId: BriefcaseId;\n}\n\n/** Argument for methods that must supply a briefcaseId and a changeset\n * @public\n */\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a changeset\n * @public\n */\nexport interface ChangesetArg extends IModelIdArg {\n readonly changeset: ChangesetIndexOrId;\n}\n\n/** Argument for downloading a changeset.\n * @public\n */\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\n /** Directory where the changeset should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/** @internal */\nexport interface ChangesetIndexArg extends IModelIdArg {\n readonly changeset: ChangesetIdWithIndex;\n}\n\n/** Argument for methods that must supply an IModelId and a range of Changesets.\n * @public\n */\nexport interface ChangesetRangeArg extends IModelIdArg {\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\n readonly range?: ChangesetRange;\n}\n\n/** Argument for downloading a changeset range.\n * @public\n */\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\n /** Directory where the changesets should be downloaded. */\n targetDir: LocalDirName;\n}\n\n/**\n * Arguments to create a new iModel in iModelHub\n * @public\n */\nexport interface CreateNewIModelProps extends IModelNameArg {\n readonly description?: string;\n readonly version0?: LocalFileName;\n readonly noLocks?: true;\n}\n\n/**\n * Methods for accessing services of IModelHub from an iTwin.js backend.\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\n * @public\n */\nexport interface BackendHubAccess {\n /** Download all the changesets in the specified range. */\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\n /** Download a single changeset. */\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\n /** Query the changeset properties given a ChangesetIndex */\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\n /** Query an array of changeset properties given a range of ChangesetIndexes */\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\n /** Get the ChangesetProps of the most recent changeset */\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for an IModelVersion */\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\n /** Get the ChangesetProps for a named version */\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\n\n /** Acquire a new briefcaseId for the supplied iModelId\n * @note usually there should only be one briefcase per iModel per user.\n */\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\n\n /** get an array of the briefcases assigned to a user. */\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\n\n /** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\n\n /**\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\n * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\n */\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\n\n /** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\n\n /** Release all currently held locks */\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\n\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\n\n /** create a new iModel. Returns the Guid of the newly created iModel */\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\n\n /** delete an iModel */\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BisCoreSchema.d.ts","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAO3C;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,WAA2B,UAAU,IAAI,MAAM,CAAsB;IACrE,WAAkB,cAAc,IAAI,MAAM,CAAsH;IAEhK,gBAAgB;WACF,cAAc;CAuB7B"}
1
+ {"version":3,"file":"BisCoreSchema.d.ts","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAIA;;GAEG;AAYH,OAAO,EAAE,MAAM,EAAW,MAAM,UAAU,CAAC;AAQ3C;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,WAA2B,UAAU,IAAI,MAAM,CAAsB;IACrE,WAAkB,cAAc,IAAI,MAAM,CAAsH;IAEhK,gBAAgB;WACF,cAAc;CAwB7B"}
@@ -19,7 +19,8 @@ import { Schema, Schemas } from "./Schema";
19
19
  import * as textureMod from "./Texture";
20
20
  import * as viewMod from "./ViewDefinition";
21
21
  import * as displayStyleMod from "./DisplayStyle";
22
- import * as annotationsMod from "./TextAnnotationElement";
22
+ import * as annotationsMod from "./annotations/TextAnnotationElement";
23
+ import * as elementDrivesTextAnnotation from "./annotations/ElementDrivesTextAnnotation";
23
24
  import * as sheetIndex from "./SheetIndex";
24
25
  /**
25
26
  * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.
@@ -54,7 +55,8 @@ export class BisCoreSchema extends Schema {
54
55
  externalSourceMod,
55
56
  displayStyleMod,
56
57
  annotationsMod,
57
- sheetIndex
58
+ sheetIndex,
59
+ elementDrivesTextAnnotation,
58
60
  ].forEach((module) => ClassRegistry.registerModule(module, this));
59
61
  }
60
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,iBAAiB,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAc,SAAQ,MAAM;IAChC,MAAM,KAAc,UAAU,KAAa,OAAO,SAAS,CAAC,CAAC,CAAC;IAC9D,MAAM,KAAK,cAAc,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,aAAa,CAAC,UAAU,eAAe,CAAC,CAAC,CAAC,CAAC;IAEhK,gBAAgB;IACT,MAAM,CAAC,cAAc;QAC1B,IAAI,IAAI,KAAK,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC;YACvD,OAAO;QAET,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,sHAAsH;QACtH;YACE,UAAU;YACV,SAAS;YACT,QAAQ;YACR,WAAW;YACX,OAAO;YACP,OAAO;YACP,UAAU;YACV,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,cAAc;YACd,UAAU;SACX,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACF","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 Schema\n */\n\nimport * as path from \"path\";\nimport * as categoryMod from \"./Category\";\nimport { ClassRegistry } from \"./ClassRegistry\";\nimport * as elementMod from \"./Element\";\nimport * as aspectMod from \"./ElementAspect\";\nimport * as externalSourceMod from \"./ExternalSource\";\nimport { KnownLocations } from \"./IModelHost\";\nimport * as materialMod from \"./Material\";\nimport * as modelMod from \"./Model\";\nimport * as linkMod from \"./Relationship\";\nimport { Schema, Schemas } from \"./Schema\";\nimport * as textureMod from \"./Texture\";\nimport * as viewMod from \"./ViewDefinition\";\nimport * as displayStyleMod from \"./DisplayStyle\";\nimport * as annotationsMod from \"./TextAnnotationElement\";\nimport * as sheetIndex from \"./SheetIndex\";\n\n/**\n * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.\n *\n * It is automatically registered when [[IModelHost.startup]] is called.\n *\n * Example:\n * ``` ts\n * [[include:BisCore.registerSchemaAndGetClass]]\n * ```\n * @public\n */\nexport class BisCoreSchema extends Schema {\n public static override get schemaName(): string { return \"BisCore\"; }\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${BisCoreSchema.schemaName}.ecschema.xml`); }\n\n /** @internal */\n public static registerSchema() {\n if (this === Schemas.getRegisteredSchema(this.schemaName))\n return;\n\n Schemas.unregisterSchema(this.schemaName);\n Schemas.registerSchema(this);\n\n // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter.\n [\n elementMod,\n aspectMod,\n modelMod,\n categoryMod,\n viewMod,\n linkMod,\n textureMod,\n materialMod,\n externalSourceMod,\n displayStyleMod,\n annotationsMod,\n sheetIndex\n ].forEach((module) => ClassRegistry.registerModule(module, this));\n }\n}\n"]}
1
+ {"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,MA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,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAE7B,sHAAsH;QACtH;YACE,UAAU;YACV,SAAS;YACT,QAAQ;YACR,WAAW;YACX,OAAO;YACP,OAAO;YACP,UAAU;YACV,WAAW;YACX,iBAAiB;YACjB,eAAe;YACf,cAAc;YACd,UAAU;YACV,2BAA2B;SAC5B,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACpE,CAAC;CACF","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 Schema\n */\n\nimport * as path from \"path\";\nimport * as categoryMod from \"./Category\";\nimport { ClassRegistry } from \"./ClassRegistry\";\nimport * as elementMod from \"./Element\";\nimport * as aspectMod from \"./ElementAspect\";\nimport * as externalSourceMod from \"./ExternalSource\";\nimport { KnownLocations } from \"./IModelHost\";\nimport * as materialMod from \"./Material\";\nimport * as modelMod from \"./Model\";\nimport * as linkMod from \"./Relationship\";\nimport { Schema, Schemas } from \"./Schema\";\nimport * as textureMod from \"./Texture\";\nimport * as viewMod from \"./ViewDefinition\";\nimport * as displayStyleMod from \"./DisplayStyle\";\nimport * as annotationsMod from \"./annotations/TextAnnotationElement\";\nimport * as elementDrivesTextAnnotation from \"./annotations/ElementDrivesTextAnnotation\";\nimport * as sheetIndex from \"./SheetIndex\";\n\n/**\n * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.\n *\n * It is automatically registered when [[IModelHost.startup]] is called.\n *\n * Example:\n * ``` ts\n * [[include:BisCore.registerSchemaAndGetClass]]\n * ```\n * @public\n */\nexport class BisCoreSchema extends Schema {\n public static override get schemaName(): string { return \"BisCore\"; }\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${BisCoreSchema.schemaName}.ecschema.xml`); }\n\n /** @internal */\n public static registerSchema() {\n if (this === Schemas.getRegisteredSchema(this.schemaName))\n return;\n\n Schemas.unregisterSchema(this.schemaName);\n Schemas.registerSchema(this);\n\n // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter.\n [\n elementMod,\n aspectMod,\n modelMod,\n categoryMod,\n viewMod,\n linkMod,\n textureMod,\n materialMod,\n externalSourceMod,\n displayStyleMod,\n annotationsMod,\n sheetIndex,\n elementDrivesTextAnnotation,\n ].forEach((module) => ClassRegistry.registerModule(module, this));\n }\n}\n"]}
@@ -2,8 +2,8 @@
2
2
  * @module iModels
3
3
  */
4
4
  import { AccessToken, BeDuration, GuidString, Optional } from "@itwin/core-bentley";
5
- import { BriefcaseId, BriefcaseProps, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange, LocalBriefcaseProps, LocalDirName, LocalFileName, RequestNewBriefcaseProps } from "@itwin/core-common";
6
- import { AcquireNewBriefcaseIdArg, IModelNameArg } from "./BackendHubAccess";
5
+ import { BriefcaseId, BriefcaseProps, ChangesetFileProps, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange, LocalBriefcaseProps, LocalDirName, LocalFileName, RequestNewBriefcaseProps } from "@itwin/core-common";
6
+ import { AcquireNewBriefcaseIdArg, DownloadChangesetArg, DownloadChangesetRangeArg, IModelNameArg } from "./BackendHubAccess";
7
7
  import { ProgressFunction } from "./CheckpointManager";
8
8
  import { BriefcaseDb, IModelDb, TokenArg } from "./IModelDb";
9
9
  /** The argument for [[BriefcaseManager.downloadBriefcase]]
@@ -174,6 +174,14 @@ export declare class BriefcaseManager {
174
174
  * - returns true if the delete was successful.
175
175
  */
176
176
  private static deleteFolderContents;
177
+ /** Download all the changesets in the specified range.
178
+ * @beta
179
+ */
180
+ static downloadChangesets(arg: DownloadChangesetRangeArg): Promise<ChangesetFileProps[]>;
181
+ /** Download a single changeset.
182
+ * @beta
183
+ */
184
+ static downloadChangeset(arg: DownloadChangesetArg): Promise<ChangesetFileProps>;
177
185
  /** Query the hub for the properties for a ChangesetIndex or ChangesetId */
178
186
  static queryChangeset(arg: {
179
187
  iModelId: GuidString;
@@ -1 +1 @@
1
- {"version":3,"file":"BriefcaseManager.d.ts","sourceRoot":"","sources":["../../src/BriefcaseManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EACL,WAAW,EAAE,UAAU,EAAmB,UAAU,EAAmD,QAAQ,EAChH,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EAAoB,cAAc,EAAsB,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAA6C,mBAAmB,EACrM,YAAY,EAAE,aAAa,EAAE,wBAAwB,EACtD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAsC,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAS7D;;EAEE;AACF,MAAM,WAAW,sBAAuB,SAAQ,QAAQ,EAAE,wBAAwB;IAChF;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAC/C,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAC;IACpB,8IAA8I;IAC9I,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,oGAAoG;IACpG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,8FAA8F;IAC9F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,uFAAuF;IACvF,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC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import { BeDuration, ChangeSetStatus, IModelHubStatus, IModelStatus, Logger, OpenMode, StopWatch, } from "@itwin/core-bentley";
10
+ import { BeDuration, ChangeSetStatus, DbResult, IModelHubStatus, IModelStatus, Logger, OpenMode, StopWatch } from "@itwin/core-bentley";
11
11
  import { BriefcaseIdValue, ChangesetType, IModelError, IModelVersion, } from "@itwin/core-common";
12
12
  import { BackendLoggerCategory } from "./BackendLoggerCategory";
13
13
  import { CheckpointManager } from "./CheckpointManager";
@@ -300,6 +300,18 @@ export class BriefcaseManager {
300
300
  }
301
301
  return status;
302
302
  }
303
+ /** Download all the changesets in the specified range.
304
+ * @beta
305
+ */
306
+ static async downloadChangesets(arg) {
307
+ return IModelHost[_hubAccess].downloadChangesets(arg);
308
+ }
309
+ /** Download a single changeset.
310
+ * @beta
311
+ */
312
+ static async downloadChangeset(arg) {
313
+ return IModelHost[_hubAccess].downloadChangeset(arg);
314
+ }
303
315
  /** Query the hub for the properties for a ChangesetIndex or ChangesetId */
304
316
  static async queryChangeset(arg) {
305
317
  return IModelHost[_hubAccess].queryChangeset({ ...arg, accessToken: await IModelHost.getAccessToken() });
@@ -464,6 +476,10 @@ export class BriefcaseManager {
464
476
  if (!fileSize) // either undefined or 0 means error
465
477
  throw new IModelError(IModelStatus.NoContent, "error creating changeset");
466
478
  changesetProps.size = fileSize;
479
+ const id = IModelNative.platform.DgnDb.computeChangesetId(changesetProps);
480
+ if (id !== changesetProps.id) {
481
+ throw new IModelError(DbResult.BE_SQLITE_ERROR_InvalidChangeSetVersion, `Changeset id ${changesetProps.id} does not match computed id ${id}.`);
482
+ }
467
483
  let retryCount = arg.pushRetryCount ?? 3;
468
484
  while (true) {
469
485
  try {