@itwin/core-backend 5.8.2 → 5.9.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (751) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +38 -0
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js.map +1 -1
  7. package/lib/cjs/BlobContainerService.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.js +3 -3
  9. package/lib/cjs/BriefcaseManager.js.map +1 -1
  10. package/lib/cjs/CatalogDb.js.map +1 -1
  11. package/lib/cjs/Category.d.ts +37 -7
  12. package/lib/cjs/Category.d.ts.map +1 -1
  13. package/lib/cjs/Category.js +33 -42
  14. package/lib/cjs/Category.js.map +1 -1
  15. package/lib/cjs/ChangeSummaryManager.js +2 -2
  16. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  17. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  18. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  19. package/lib/cjs/ChangesetECAdaptor.js +253 -250
  20. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  21. package/lib/cjs/ChannelControl.d.ts +29 -0
  22. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  23. package/lib/cjs/ChannelControl.js.map +1 -1
  24. package/lib/cjs/CheckpointManager.js +1 -1
  25. package/lib/cjs/CheckpointManager.js.map +1 -1
  26. package/lib/cjs/ClassRegistry.js +5 -5
  27. package/lib/cjs/ClassRegistry.js.map +1 -1
  28. package/lib/cjs/CloudSqlite.d.ts +1 -1
  29. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  30. package/lib/cjs/CloudSqlite.js +68 -13
  31. package/lib/cjs/CloudSqlite.js.map +1 -1
  32. package/lib/cjs/CodeService.js.map +1 -1
  33. package/lib/cjs/CodeSpecs.d.ts +32 -3
  34. package/lib/cjs/CodeSpecs.d.ts.map +1 -1
  35. package/lib/cjs/CodeSpecs.js +48 -20
  36. package/lib/cjs/CodeSpecs.js.map +1 -1
  37. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  38. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  39. package/lib/cjs/DevTools.js.map +1 -1
  40. package/lib/cjs/DisplayStyle.d.ts +18 -3
  41. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  42. package/lib/cjs/DisplayStyle.js +10 -21
  43. package/lib/cjs/DisplayStyle.js.map +1 -1
  44. package/lib/cjs/ECDb.js.map +1 -1
  45. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  46. package/lib/cjs/ECSqlRowExecutor.js.map +1 -1
  47. package/lib/cjs/ECSqlStatement.js.map +1 -1
  48. package/lib/cjs/ECSqlSyncReader.js.map +1 -1
  49. package/lib/cjs/EditTxn.d.ts +262 -0
  50. package/lib/cjs/EditTxn.d.ts.map +1 -0
  51. package/lib/cjs/EditTxn.js +548 -0
  52. package/lib/cjs/EditTxn.js.map +1 -0
  53. package/lib/cjs/Element.d.ts +74 -5
  54. package/lib/cjs/Element.d.ts.map +1 -1
  55. package/lib/cjs/Element.js +63 -75
  56. package/lib/cjs/Element.js.map +1 -1
  57. package/lib/cjs/ElementAspect.d.ts +10 -0
  58. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  59. package/lib/cjs/ElementAspect.js +21 -12
  60. package/lib/cjs/ElementAspect.js.map +1 -1
  61. package/lib/cjs/ElementGraphics.js.map +1 -1
  62. package/lib/cjs/ElementTreeWalker.d.ts +56 -3
  63. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  64. package/lib/cjs/ElementTreeWalker.js +53 -40
  65. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  66. package/lib/cjs/Entity.js.map +1 -1
  67. package/lib/cjs/EntityReferences.js.map +1 -1
  68. package/lib/cjs/ExportGraphics.js.map +1 -1
  69. package/lib/cjs/ExternalSource.d.ts +11 -2
  70. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  71. package/lib/cjs/ExternalSource.js +10 -8
  72. package/lib/cjs/ExternalSource.js.map +1 -1
  73. package/lib/cjs/FontFile.js.map +1 -1
  74. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  75. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  76. package/lib/cjs/GeometrySummary.js +47 -47
  77. package/lib/cjs/GeometrySummary.js.map +1 -1
  78. package/lib/cjs/IModelDb.d.ts +66 -22
  79. package/lib/cjs/IModelDb.d.ts.map +1 -1
  80. package/lib/cjs/IModelDb.js +183 -297
  81. package/lib/cjs/IModelDb.js.map +1 -1
  82. package/lib/cjs/IModelDbFonts.js.map +1 -1
  83. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  84. package/lib/cjs/IModelHost.d.ts +58 -1
  85. package/lib/cjs/IModelHost.d.ts.map +1 -1
  86. package/lib/cjs/IModelHost.js +89 -0
  87. package/lib/cjs/IModelHost.js.map +1 -1
  88. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  89. package/lib/cjs/IModelJsFs.js.map +1 -1
  90. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  91. package/lib/cjs/IpcHost.d.ts.map +1 -1
  92. package/lib/cjs/IpcHost.js +15 -6
  93. package/lib/cjs/IpcHost.js.map +1 -1
  94. package/lib/cjs/LineStyle.d.ts +47 -7
  95. package/lib/cjs/LineStyle.d.ts.map +1 -1
  96. package/lib/cjs/LineStyle.js +38 -33
  97. package/lib/cjs/LineStyle.js.map +1 -1
  98. package/lib/cjs/LocalHub.js +1 -1
  99. package/lib/cjs/LocalHub.js.map +1 -1
  100. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  101. package/lib/cjs/LockControl.d.ts +85 -1
  102. package/lib/cjs/LockControl.d.ts.map +1 -1
  103. package/lib/cjs/LockControl.js.map +1 -1
  104. package/lib/cjs/Material.d.ts +8 -1
  105. package/lib/cjs/Material.d.ts.map +1 -1
  106. package/lib/cjs/Material.js +6 -12
  107. package/lib/cjs/Material.js.map +1 -1
  108. package/lib/cjs/Model.d.ts +59 -20
  109. package/lib/cjs/Model.d.ts.map +1 -1
  110. package/lib/cjs/Model.js +38 -80
  111. package/lib/cjs/Model.js.map +1 -1
  112. package/lib/cjs/NativeAppStorage.js.map +1 -1
  113. package/lib/cjs/NativeHost.js.map +1 -1
  114. package/lib/cjs/NavigationRelationship.js.map +1 -1
  115. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  116. package/lib/cjs/PropertyStore.js.map +1 -1
  117. package/lib/cjs/Relationship.d.ts +72 -7
  118. package/lib/cjs/Relationship.d.ts.map +1 -1
  119. package/lib/cjs/Relationship.js +39 -21
  120. package/lib/cjs/Relationship.js.map +1 -1
  121. package/lib/cjs/RpcBackend.js.map +1 -1
  122. package/lib/cjs/SQLiteDb.js.map +1 -1
  123. package/lib/cjs/Schema.js.map +1 -1
  124. package/lib/cjs/SchemaSync.js +4 -4
  125. package/lib/cjs/SchemaSync.js.map +1 -1
  126. package/lib/cjs/SchemaUtils.js.map +1 -1
  127. package/lib/cjs/SheetIndex.d.ts +9 -0
  128. package/lib/cjs/SheetIndex.d.ts.map +1 -1
  129. package/lib/cjs/SheetIndex.js +38 -35
  130. package/lib/cjs/SheetIndex.js.map +1 -1
  131. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  132. package/lib/cjs/SqliteStatement.js.map +1 -1
  133. package/lib/cjs/StashManager.js +1 -1
  134. package/lib/cjs/StashManager.js.map +1 -1
  135. package/lib/cjs/Texture.d.ts +6 -0
  136. package/lib/cjs/Texture.d.ts.map +1 -1
  137. package/lib/cjs/Texture.js +6 -14
  138. package/lib/cjs/Texture.js.map +1 -1
  139. package/lib/cjs/TileStorage.js.map +1 -1
  140. package/lib/cjs/TxnManager.d.ts +105 -9
  141. package/lib/cjs/TxnManager.d.ts.map +1 -1
  142. package/lib/cjs/TxnManager.js +194 -15
  143. package/lib/cjs/TxnManager.js.map +1 -1
  144. package/lib/cjs/ViewDefinition.d.ts +21 -1
  145. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  146. package/lib/cjs/ViewDefinition.js +27 -66
  147. package/lib/cjs/ViewDefinition.js.map +1 -1
  148. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  149. package/lib/cjs/ViewStore.js.map +1 -1
  150. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  151. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  152. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +33 -27
  153. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  154. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  155. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  156. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
  157. package/lib/cjs/annotations/TextAnnotationElement.js +6 -5
  158. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  159. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  160. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  161. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  162. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  163. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  164. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  165. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  166. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  167. package/lib/cjs/core-backend.d.ts +1 -0
  168. package/lib/cjs/core-backend.d.ts.map +1 -1
  169. package/lib/cjs/core-backend.js +1 -0
  170. package/lib/cjs/core-backend.js.map +1 -1
  171. package/lib/cjs/domains/FunctionalElements.d.ts +6 -2
  172. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  173. package/lib/cjs/domains/FunctionalElements.js +8 -13
  174. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  175. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  176. package/lib/cjs/domains/GenericElements.d.ts +11 -4
  177. package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
  178. package/lib/cjs/domains/GenericElements.js +13 -24
  179. package/lib/cjs/domains/GenericElements.js.map +1 -1
  180. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  181. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  182. package/lib/cjs/internal/ChannelAdmin.d.ts +15 -0
  183. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  184. package/lib/cjs/internal/ChannelAdmin.js +5 -3
  185. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  186. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  187. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  188. package/lib/cjs/internal/HubMock.d.ts +2 -0
  189. package/lib/cjs/internal/HubMock.d.ts.map +1 -1
  190. package/lib/cjs/internal/HubMock.js +7 -0
  191. package/lib/cjs/internal/HubMock.js.map +1 -1
  192. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  193. package/lib/cjs/internal/IntegrityCheck.js.map +1 -1
  194. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  195. package/lib/cjs/internal/NoLocks.d.ts.map +1 -1
  196. package/lib/cjs/internal/NoLocks.js +6 -0
  197. package/lib/cjs/internal/NoLocks.js.map +1 -1
  198. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  199. package/lib/cjs/internal/ServerBasedLocks.d.ts +12 -0
  200. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  201. package/lib/cjs/internal/ServerBasedLocks.js +285 -4
  202. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  203. package/lib/cjs/internal/Symbols.d.ts +4 -0
  204. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  205. package/lib/cjs/internal/Symbols.js +5 -1
  206. package/lib/cjs/internal/Symbols.js.map +1 -1
  207. package/lib/cjs/internal/annotations/fields.d.ts +3 -2
  208. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  209. package/lib/cjs/internal/annotations/fields.js +7 -6
  210. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  211. package/lib/cjs/internal/cross-package.js.map +1 -1
  212. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  213. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  214. package/lib/cjs/internal/workspace/SettingsEditorImpl.js +49 -242
  215. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -1
  216. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
  217. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  218. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  219. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +0 -1
  220. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  221. package/lib/cjs/internal/workspace/WorkspaceImpl.js +70 -41
  222. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  223. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  224. package/lib/cjs/rpc/multipart.js.map +1 -1
  225. package/lib/cjs/rpc/tracing.js.map +1 -1
  226. package/lib/cjs/rpc/web/logging.js.map +1 -1
  227. package/lib/cjs/rpc/web/request.js.map +1 -1
  228. package/lib/cjs/rpc/web/response.js.map +1 -1
  229. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  230. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  231. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  232. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  233. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  234. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  235. package/lib/cjs/workspace/Settings.d.ts +11 -5
  236. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  237. package/lib/cjs/workspace/Settings.js.map +1 -1
  238. package/lib/cjs/workspace/SettingsDb.d.ts +20 -99
  239. package/lib/cjs/workspace/SettingsDb.d.ts.map +1 -1
  240. package/lib/cjs/workspace/SettingsDb.js +23 -7
  241. package/lib/cjs/workspace/SettingsDb.js.map +1 -1
  242. package/lib/cjs/workspace/SettingsEditor.d.ts +40 -226
  243. package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -1
  244. package/lib/cjs/workspace/SettingsEditor.js +86 -25
  245. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  246. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  247. package/lib/cjs/workspace/Workspace.d.ts +7 -11
  248. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  249. package/lib/cjs/workspace/Workspace.js.map +1 -1
  250. package/lib/cjs/workspace/WorkspaceEditor.d.ts +14 -0
  251. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  252. package/lib/cjs/workspace/WorkspaceEditor.js +1 -1
  253. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  254. package/lib/esm/BackendHubAccess.d.ts +38 -0
  255. package/lib/esm/BackendHubAccess.d.ts.map +1 -1
  256. package/lib/esm/BackendHubAccess.js.map +1 -1
  257. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  258. package/lib/esm/BisCoreSchema.js.map +1 -1
  259. package/lib/esm/BlobContainerService.js.map +1 -1
  260. package/lib/esm/BriefcaseManager.js +3 -3
  261. package/lib/esm/BriefcaseManager.js.map +1 -1
  262. package/lib/esm/CatalogDb.js.map +1 -1
  263. package/lib/esm/Category.d.ts +37 -7
  264. package/lib/esm/Category.d.ts.map +1 -1
  265. package/lib/esm/Category.js +33 -42
  266. package/lib/esm/Category.js.map +1 -1
  267. package/lib/esm/ChangeSummaryManager.js +2 -2
  268. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  269. package/lib/esm/ChangedElementsDb.js.map +1 -1
  270. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  271. package/lib/esm/ChangesetECAdaptor.js +253 -250
  272. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  273. package/lib/esm/ChannelControl.d.ts +29 -0
  274. package/lib/esm/ChannelControl.d.ts.map +1 -1
  275. package/lib/esm/ChannelControl.js.map +1 -1
  276. package/lib/esm/CheckpointManager.js +1 -1
  277. package/lib/esm/CheckpointManager.js.map +1 -1
  278. package/lib/esm/ClassRegistry.js +5 -5
  279. package/lib/esm/ClassRegistry.js.map +1 -1
  280. package/lib/esm/CloudSqlite.d.ts +1 -1
  281. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  282. package/lib/esm/CloudSqlite.js +69 -14
  283. package/lib/esm/CloudSqlite.js.map +1 -1
  284. package/lib/esm/CodeService.js.map +1 -1
  285. package/lib/esm/CodeSpecs.d.ts +32 -3
  286. package/lib/esm/CodeSpecs.d.ts.map +1 -1
  287. package/lib/esm/CodeSpecs.js +49 -21
  288. package/lib/esm/CodeSpecs.js.map +1 -1
  289. package/lib/esm/ConcurrentQuery.js.map +1 -1
  290. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  291. package/lib/esm/DevTools.js.map +1 -1
  292. package/lib/esm/DisplayStyle.d.ts +18 -3
  293. package/lib/esm/DisplayStyle.d.ts.map +1 -1
  294. package/lib/esm/DisplayStyle.js +10 -21
  295. package/lib/esm/DisplayStyle.js.map +1 -1
  296. package/lib/esm/ECDb.js.map +1 -1
  297. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  298. package/lib/esm/ECSqlRowExecutor.js.map +1 -1
  299. package/lib/esm/ECSqlStatement.js.map +1 -1
  300. package/lib/esm/ECSqlSyncReader.js.map +1 -1
  301. package/lib/esm/EditTxn.d.ts +262 -0
  302. package/lib/esm/EditTxn.d.ts.map +1 -0
  303. package/lib/esm/EditTxn.js +543 -0
  304. package/lib/esm/EditTxn.js.map +1 -0
  305. package/lib/esm/Element.d.ts +74 -5
  306. package/lib/esm/Element.d.ts.map +1 -1
  307. package/lib/esm/Element.js +64 -76
  308. package/lib/esm/Element.js.map +1 -1
  309. package/lib/esm/ElementAspect.d.ts +10 -0
  310. package/lib/esm/ElementAspect.d.ts.map +1 -1
  311. package/lib/esm/ElementAspect.js +22 -13
  312. package/lib/esm/ElementAspect.js.map +1 -1
  313. package/lib/esm/ElementGraphics.js.map +1 -1
  314. package/lib/esm/ElementTreeWalker.d.ts +56 -3
  315. package/lib/esm/ElementTreeWalker.d.ts.map +1 -1
  316. package/lib/esm/ElementTreeWalker.js +53 -40
  317. package/lib/esm/ElementTreeWalker.js.map +1 -1
  318. package/lib/esm/Entity.js.map +1 -1
  319. package/lib/esm/EntityReferences.js.map +1 -1
  320. package/lib/esm/ExportGraphics.js.map +1 -1
  321. package/lib/esm/ExternalSource.d.ts +11 -2
  322. package/lib/esm/ExternalSource.d.ts.map +1 -1
  323. package/lib/esm/ExternalSource.js +10 -8
  324. package/lib/esm/ExternalSource.js.map +1 -1
  325. package/lib/esm/FontFile.js.map +1 -1
  326. package/lib/esm/GeoCoordConfig.js.map +1 -1
  327. package/lib/esm/GeographicCRSServices.js.map +1 -1
  328. package/lib/esm/GeometrySummary.js +47 -47
  329. package/lib/esm/GeometrySummary.js.map +1 -1
  330. package/lib/esm/IModelDb.d.ts +66 -22
  331. package/lib/esm/IModelDb.d.ts.map +1 -1
  332. package/lib/esm/IModelDb.js +185 -299
  333. package/lib/esm/IModelDb.js.map +1 -1
  334. package/lib/esm/IModelDbFonts.js.map +1 -1
  335. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  336. package/lib/esm/IModelHost.d.ts +58 -1
  337. package/lib/esm/IModelHost.d.ts.map +1 -1
  338. package/lib/esm/IModelHost.js +91 -2
  339. package/lib/esm/IModelHost.js.map +1 -1
  340. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  341. package/lib/esm/IModelJsFs.js.map +1 -1
  342. package/lib/esm/ImageSourceConversion.js.map +1 -1
  343. package/lib/esm/IpcHost.d.ts.map +1 -1
  344. package/lib/esm/IpcHost.js +16 -7
  345. package/lib/esm/IpcHost.js.map +1 -1
  346. package/lib/esm/LineStyle.d.ts +47 -7
  347. package/lib/esm/LineStyle.d.ts.map +1 -1
  348. package/lib/esm/LineStyle.js +38 -33
  349. package/lib/esm/LineStyle.js.map +1 -1
  350. package/lib/esm/LocalHub.js +1 -1
  351. package/lib/esm/LocalHub.js.map +1 -1
  352. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  353. package/lib/esm/LockControl.d.ts +85 -1
  354. package/lib/esm/LockControl.d.ts.map +1 -1
  355. package/lib/esm/LockControl.js.map +1 -1
  356. package/lib/esm/Material.d.ts +8 -1
  357. package/lib/esm/Material.d.ts.map +1 -1
  358. package/lib/esm/Material.js +6 -12
  359. package/lib/esm/Material.js.map +1 -1
  360. package/lib/esm/Model.d.ts +59 -20
  361. package/lib/esm/Model.d.ts.map +1 -1
  362. package/lib/esm/Model.js +39 -81
  363. package/lib/esm/Model.js.map +1 -1
  364. package/lib/esm/NativeAppStorage.js.map +1 -1
  365. package/lib/esm/NativeHost.js.map +1 -1
  366. package/lib/esm/NavigationRelationship.js.map +1 -1
  367. package/lib/esm/PromiseMemoizer.js.map +1 -1
  368. package/lib/esm/PropertyStore.js.map +1 -1
  369. package/lib/esm/Relationship.d.ts +72 -7
  370. package/lib/esm/Relationship.d.ts.map +1 -1
  371. package/lib/esm/Relationship.js +40 -22
  372. package/lib/esm/Relationship.js.map +1 -1
  373. package/lib/esm/RpcBackend.js.map +1 -1
  374. package/lib/esm/SQLiteDb.js.map +1 -1
  375. package/lib/esm/Schema.js.map +1 -1
  376. package/lib/esm/SchemaSync.js +5 -5
  377. package/lib/esm/SchemaSync.js.map +1 -1
  378. package/lib/esm/SchemaUtils.js.map +1 -1
  379. package/lib/esm/SheetIndex.d.ts +9 -0
  380. package/lib/esm/SheetIndex.d.ts.map +1 -1
  381. package/lib/esm/SheetIndex.js +38 -35
  382. package/lib/esm/SheetIndex.js.map +1 -1
  383. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  384. package/lib/esm/SqliteStatement.js.map +1 -1
  385. package/lib/esm/StashManager.js +1 -1
  386. package/lib/esm/StashManager.js.map +1 -1
  387. package/lib/esm/Texture.d.ts +6 -0
  388. package/lib/esm/Texture.d.ts.map +1 -1
  389. package/lib/esm/Texture.js +6 -14
  390. package/lib/esm/Texture.js.map +1 -1
  391. package/lib/esm/TileStorage.js.map +1 -1
  392. package/lib/esm/TxnManager.d.ts +105 -9
  393. package/lib/esm/TxnManager.d.ts.map +1 -1
  394. package/lib/esm/TxnManager.js +194 -15
  395. package/lib/esm/TxnManager.js.map +1 -1
  396. package/lib/esm/ViewDefinition.d.ts +21 -1
  397. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  398. package/lib/esm/ViewDefinition.js +27 -66
  399. package/lib/esm/ViewDefinition.js.map +1 -1
  400. package/lib/esm/ViewStateHydrator.js.map +1 -1
  401. package/lib/esm/ViewStore.js.map +1 -1
  402. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  403. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  404. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +33 -27
  405. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  406. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  407. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  408. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
  409. package/lib/esm/annotations/TextAnnotationElement.js +6 -5
  410. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  411. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  412. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  413. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  414. package/lib/esm/core-backend.d.ts +1 -0
  415. package/lib/esm/core-backend.d.ts.map +1 -1
  416. package/lib/esm/core-backend.js +1 -0
  417. package/lib/esm/core-backend.js.map +1 -1
  418. package/lib/esm/domains/FunctionalElements.d.ts +6 -2
  419. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -1
  420. package/lib/esm/domains/FunctionalElements.js +8 -13
  421. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  422. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  423. package/lib/esm/domains/GenericElements.d.ts +11 -4
  424. package/lib/esm/domains/GenericElements.d.ts.map +1 -1
  425. package/lib/esm/domains/GenericElements.js +13 -24
  426. package/lib/esm/domains/GenericElements.js.map +1 -1
  427. package/lib/esm/domains/GenericSchema.js.map +1 -1
  428. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  429. package/lib/esm/internal/ChannelAdmin.d.ts +15 -0
  430. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  431. package/lib/esm/internal/ChannelAdmin.js +6 -4
  432. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  433. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  434. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  435. package/lib/esm/internal/HubMock.d.ts +2 -0
  436. package/lib/esm/internal/HubMock.d.ts.map +1 -1
  437. package/lib/esm/internal/HubMock.js +7 -0
  438. package/lib/esm/internal/HubMock.js.map +1 -1
  439. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  440. package/lib/esm/internal/IntegrityCheck.js.map +1 -1
  441. package/lib/esm/internal/NativePlatform.js.map +1 -1
  442. package/lib/esm/internal/NoLocks.d.ts.map +1 -1
  443. package/lib/esm/internal/NoLocks.js +6 -0
  444. package/lib/esm/internal/NoLocks.js.map +1 -1
  445. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  446. package/lib/esm/internal/ServerBasedLocks.d.ts +12 -0
  447. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -1
  448. package/lib/esm/internal/ServerBasedLocks.js +286 -5
  449. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  450. package/lib/esm/internal/Symbols.d.ts +4 -0
  451. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  452. package/lib/esm/internal/Symbols.js +4 -0
  453. package/lib/esm/internal/Symbols.js.map +1 -1
  454. package/lib/esm/internal/annotations/fields.d.ts +3 -2
  455. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  456. package/lib/esm/internal/annotations/fields.js +7 -6
  457. package/lib/esm/internal/annotations/fields.js.map +1 -1
  458. package/lib/esm/internal/cross-package.js.map +1 -1
  459. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  460. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  461. package/lib/esm/internal/workspace/SettingsEditorImpl.js +52 -246
  462. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -1
  463. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -1
  464. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  465. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  466. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +0 -1
  467. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  468. package/lib/esm/internal/workspace/WorkspaceImpl.js +71 -41
  469. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  470. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  471. package/lib/esm/rpc/multipart.js.map +1 -1
  472. package/lib/esm/rpc/tracing.js.map +1 -1
  473. package/lib/esm/rpc/web/logging.js.map +1 -1
  474. package/lib/esm/rpc/web/request.js.map +1 -1
  475. package/lib/esm/rpc/web/response.js.map +1 -1
  476. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  477. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  478. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  479. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  480. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  481. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  482. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  483. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  484. package/lib/esm/test/AttachDb.test.js +11 -11
  485. package/lib/esm/test/AttachDb.test.js.map +1 -1
  486. package/lib/esm/test/ElementDrivesElement.test.d.ts +20 -19
  487. package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -1
  488. package/lib/esm/test/ElementDrivesElement.test.js +134 -119
  489. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  490. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  491. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  492. package/lib/esm/test/IModelHost.test.js +56 -2
  493. package/lib/esm/test/IModelHost.test.js.map +1 -1
  494. package/lib/esm/test/IModelTestUtils.d.ts +23 -23
  495. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  496. package/lib/esm/test/IModelTestUtils.js +466 -449
  497. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  498. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  499. package/lib/esm/test/IpcHost.test.js.map +1 -1
  500. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  501. package/lib/esm/test/PrintElementTree.js.map +1 -1
  502. package/lib/esm/test/PropertyDb.test.js +2 -2
  503. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  504. package/lib/esm/test/RevisionUtility.js.map +1 -1
  505. package/lib/esm/test/SchemaUtils.test.js +25 -25
  506. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  507. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  508. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +156 -147
  509. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  510. package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -1
  511. package/lib/esm/test/TestChangeSetUtility.js +11 -7
  512. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  513. package/lib/esm/test/TestEditTxn.d.ts +8 -0
  514. package/lib/esm/test/TestEditTxn.d.ts.map +1 -0
  515. package/lib/esm/test/TestEditTxn.js +34 -0
  516. package/lib/esm/test/TestEditTxn.js.map +1 -0
  517. package/lib/esm/test/TestUtils.d.ts +1 -0
  518. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  519. package/lib/esm/test/TestUtils.js +8 -1
  520. package/lib/esm/test/TestUtils.js.map +1 -1
  521. package/lib/esm/test/annotations/Fields.test.js +135 -143
  522. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  523. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  524. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  525. package/lib/esm/test/annotations/TextAnnotation.test.js +156 -99
  526. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  527. package/lib/esm/test/annotations/TextBlock.test.js +5 -3
  528. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  529. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  530. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  531. package/lib/esm/test/categories/Category.test.js +63 -3
  532. package/lib/esm/test/categories/Category.test.js.map +1 -1
  533. package/lib/esm/test/codespec/CodeSpec.test.js +88 -5
  534. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  535. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  536. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  537. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +19 -19
  538. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  539. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  540. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  541. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  542. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  543. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  544. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  545. package/lib/esm/test/ecdb/ECSqlAst.test.js +68 -67
  546. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  547. package/lib/esm/test/ecdb/ECSqlQuery.test.js +6 -6
  548. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  549. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -333
  550. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  551. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js.map +1 -1
  552. package/lib/esm/test/ecdb/QueryReaders.test.js +47 -44
  553. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
  554. package/lib/esm/test/ecdb/SqliteStatement.test.js +2 -2
  555. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  556. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -1
  557. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +30 -28
  558. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  559. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  560. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  561. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  562. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  563. package/lib/esm/test/element/DeleteDefinitionElements.test.js +159 -143
  564. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  565. package/lib/esm/test/element/ElementAspect.test.js +90 -82
  566. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  567. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -1
  568. package/lib/esm/test/element/ElementDependencyGraph.test.js +51 -43
  569. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  570. package/lib/esm/test/element/ElementRoundTrip.test.js +176 -177
  571. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  572. package/lib/esm/test/element/ExcludedElements.test.js +2 -2
  573. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  574. package/lib/esm/test/element/ExternalSource.test.js +40 -38
  575. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  576. package/lib/esm/test/element/NullStructArray.test.js +23 -22
  577. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  578. package/lib/esm/test/element/ProjectInformationRecord.test.js +5 -2
  579. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  580. package/lib/esm/test/element/SheetInformationAspect.test.js +43 -11
  581. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  582. package/lib/esm/test/element/UrlLink.test.js +2 -2
  583. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  584. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  585. package/lib/esm/test/font/IModelDbFonts.test.js +87 -73
  586. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  587. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +194 -155
  588. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  589. package/lib/esm/test/hubaccess/BriefcaseManager.test.js +2 -4
  590. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  591. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  592. package/lib/esm/test/hubaccess/Rebase.test.js +369 -303
  593. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  594. package/lib/esm/test/hubaccess/SemanticRebase.test.js +467 -392
  595. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  596. package/lib/esm/test/imageData.js.map +1 -1
  597. package/lib/esm/test/imodel/Code.test.js +31 -31
  598. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  599. package/lib/esm/test/imodel/ElementTreeWalker.test.js +57 -48
  600. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  601. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  602. package/lib/esm/test/imodel/IModel.test.js +463 -388
  603. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  604. package/lib/esm/test/imodel/ProjectExtents.test.js +2 -2
  605. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  606. package/lib/esm/test/imodel/SchemaXmlImport.test.js +13 -13
  607. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  608. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  609. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  610. package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -1
  611. package/lib/esm/test/incrementalSchemaLocater/TestContext.js +2 -2
  612. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  613. package/lib/esm/test/index.d.ts +1 -0
  614. package/lib/esm/test/index.d.ts.map +1 -1
  615. package/lib/esm/test/index.js +1 -0
  616. package/lib/esm/test/index.js.map +1 -1
  617. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  618. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  619. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  620. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  621. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  622. package/lib/esm/test/rpc/response.test.js.map +1 -1
  623. package/lib/esm/test/schema/ClassRegistry.test.js +122 -121
  624. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  625. package/lib/esm/test/schema/FunctionalDomain.test.js +36 -34
  626. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  627. package/lib/esm/test/schema/GenericDomain.test.js +114 -94
  628. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  629. package/lib/esm/test/schema/IModelSchemaContext.test.js +11 -10
  630. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  631. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +226 -211
  632. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  633. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +1 -3
  634. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -1
  635. package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -247
  636. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  637. package/lib/esm/test/standalone/ChangeMerge.test.js +101 -82
  638. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  639. package/lib/esm/test/standalone/ChangesetReader.test.js +242 -213
  640. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  641. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  642. package/lib/esm/test/standalone/DisplayStyle.test.js +43 -40
  643. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  644. package/lib/esm/test/standalone/Drawing.test.js +4 -3
  645. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  646. package/lib/esm/test/standalone/EditTxn.test.d.ts +2 -0
  647. package/lib/esm/test/standalone/EditTxn.test.d.ts.map +1 -0
  648. package/lib/esm/test/standalone/EditTxn.test.js +219 -0
  649. package/lib/esm/test/standalone/EditTxn.test.js.map +1 -0
  650. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  651. package/lib/esm/test/standalone/ElementMesh.test.js +16 -13
  652. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  653. package/lib/esm/test/standalone/ExportGraphics.test.js +40 -34
  654. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  655. package/lib/esm/test/standalone/GeometryChangeEvents.test.js +11 -15
  656. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  657. package/lib/esm/test/standalone/GeometryStream.test.js +212 -165
  658. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  659. package/lib/esm/test/standalone/HubMock.test.js +31 -25
  660. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  661. package/lib/esm/test/standalone/IModelLimits.test.js +11 -8
  662. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  663. package/lib/esm/test/standalone/IModelWrite.test.d.ts +2 -2
  664. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -1
  665. package/lib/esm/test/standalone/IModelWrite.test.js +211 -169
  666. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  667. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts +2 -0
  668. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts.map +1 -0
  669. package/lib/esm/test/standalone/ITwinWorkspace.test.js +236 -0
  670. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -0
  671. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +25 -22
  672. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  673. package/lib/esm/test/standalone/IntegrityCheck.test.js +20 -18
  674. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  675. package/lib/esm/test/standalone/MergeConflict.test.d.ts +2 -2
  676. package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -1
  677. package/lib/esm/test/standalone/MergeConflict.test.js +49 -33
  678. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  679. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  680. package/lib/esm/test/standalone/RenderMaterialElement.test.js +5 -5
  681. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  682. package/lib/esm/test/standalone/RenderTimeline.test.js +3 -2
  683. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  684. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  685. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  686. package/lib/esm/test/standalone/SectionDrawing.test.js +7 -7
  687. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  688. package/lib/esm/test/standalone/ServerBasedLocks.test.js +928 -22
  689. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  690. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  691. package/lib/esm/test/standalone/Settings.test.js +26 -4
  692. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  693. package/lib/esm/test/standalone/SettingsSchemas.test.js +2 -1
  694. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  695. package/lib/esm/test/standalone/SnapshotDb.test.js +3 -1
  696. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  697. package/lib/esm/test/standalone/StandaloneDb.test.js +27 -26
  698. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  699. package/lib/esm/test/standalone/Texture.test.js +5 -4
  700. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  701. package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -1
  702. package/lib/esm/test/standalone/TileCache.test.js +5 -3
  703. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  704. package/lib/esm/test/standalone/TileTree.test.js +35 -31
  705. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  706. package/lib/esm/test/standalone/TxnManager.test.js +700 -653
  707. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  708. package/lib/esm/test/standalone/ViewDefinition.test.js +295 -229
  709. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  710. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  711. package/lib/esm/test/standalone/Workspace.test.js +72 -22
  712. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  713. package/lib/esm/test/standalone/iModelDb.test.js.map +1 -1
  714. package/lib/esm/test/workspace/SettingsDb.test.js +28 -456
  715. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -1
  716. package/lib/esm/workspace/Settings.d.ts +11 -5
  717. package/lib/esm/workspace/Settings.d.ts.map +1 -1
  718. package/lib/esm/workspace/Settings.js.map +1 -1
  719. package/lib/esm/workspace/SettingsDb.d.ts +20 -99
  720. package/lib/esm/workspace/SettingsDb.d.ts.map +1 -1
  721. package/lib/esm/workspace/SettingsDb.js +20 -6
  722. package/lib/esm/workspace/SettingsDb.js.map +1 -1
  723. package/lib/esm/workspace/SettingsEditor.d.ts +40 -226
  724. package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -1
  725. package/lib/esm/workspace/SettingsEditor.js +85 -24
  726. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  727. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  728. package/lib/esm/workspace/Workspace.d.ts +7 -11
  729. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  730. package/lib/esm/workspace/Workspace.js.map +1 -1
  731. package/lib/esm/workspace/WorkspaceEditor.d.ts +14 -0
  732. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -1
  733. package/lib/esm/workspace/WorkspaceEditor.js +1 -1
  734. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  735. package/package.json +13 -13
  736. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts +0 -38
  737. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  738. package/lib/cjs/internal/workspace/SettingsDbImpl.js +0 -108
  739. package/lib/cjs/internal/workspace/SettingsDbImpl.js.map +0 -1
  740. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  741. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  742. package/lib/cjs/internal/workspace/SettingsSqliteDb.js +0 -40
  743. package/lib/cjs/internal/workspace/SettingsSqliteDb.js.map +0 -1
  744. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts +0 -38
  745. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  746. package/lib/esm/internal/workspace/SettingsDbImpl.js +0 -104
  747. package/lib/esm/internal/workspace/SettingsDbImpl.js.map +0 -1
  748. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  749. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  750. package/lib/esm/internal/workspace/SettingsSqliteDb.js +0 -36
  751. package/lib/esm/internal/workspace/SettingsSqliteDb.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"WorkspaceEditor.js","sourceRoot":"","sources":["../../../src/workspace/WorkspaceEditor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAMH,kEAAwD;AAKxD,+EAA4E;AAC5E,uEAA+E;AAC/E,iDAAgE;AAEhE,8CAA2C;AAE3C,YAAY;AACZ,IAAiB,eAAe,CA2C/B;AA3CD,WAAiB,eAAe;IAC9B;;;;OAIG;IACH,SAAgB,SAAS;QACvB,OAAO,IAAA,wCAAwB,GAAE,CAAC;IACpC,CAAC;IAFe,yBAAS,YAExB,CAAA;IAED;;;;OAIG;IACH,SAAgB,aAAa,CAAC,IAAqE;QACjG,qCAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAFe,6BAAa,gBAE5B,CAAA;IAYD;;;;;;;OAOG;IACI,KAAK,UAAU,eAAe,CAAC,IAAkC;QACtE,IAAI,SAAS,KAAK,oCAAa,CAAC,OAAO;YACrC,MAAM,IAAI,KAAK,CAAC,sGAAsG,CAAC,CAAC;QAC1H,MAAM,SAAS,GAAG,MAAM,uBAAU,CAAC,cAAc,EAAE,CAAC;QACpD,OAAO,oCAAa,CAAC,OAAO,CAAC,uBAAuB,CAAC,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3G,CAAC;IALqB,+BAAe,kBAKpC,CAAA;AACH,CAAC,EA3CgB,eAAe,+BAAf,eAAe,QA2C/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Workspace\r\n */\r\n\r\nimport { LocalFileName } from \"@itwin/core-common\";\r\nimport { GuidString } from \"@itwin/core-bentley\";\r\nimport { SQLiteDb } from \"../SQLiteDb\";\r\nimport { SettingsContainer } from \"./Settings\";\r\nimport { BlobContainer } from \"../BlobContainerService\";\r\nimport {\r\n GetWorkspaceContainerArgs, Workspace, WorkspaceContainer, WorkspaceContainerProps, WorkspaceDb, WorkspaceDbCloudProps, WorkspaceDbManifest, WorkspaceDbName, WorkspaceDbNameAndVersion,\r\n WorkspaceDbProps, WorkspaceDbVersion, WorkspaceResourceName,\r\n} from \"./Workspace\";\r\nimport { WorkspaceSqliteDb } from \"../internal/workspace/WorkspaceSqliteDb\";\r\nimport { constructWorkspaceEditor } from \"../internal/workspace/WorkspaceImpl\";\r\nimport { _implementationProhibited } from \"../internal/Symbols\";\r\nimport { CloudSqlite } from \"../CloudSqlite\";\r\nimport { IModelHost } from \"../IModelHost\";\r\n\r\n/** @beta */\r\nexport namespace WorkspaceEditor {\r\n /**\r\n * Create a new [[WorkspaceEditor]] for creating new versions of [[WorkspaceDb]]s.\r\n * @note the caller becomes the owner of the Workspace.Editor and is responsible for calling [[WorkspaceEditor.close]] on it when they are finished using it.\r\n * @note It is illegal to have more than one Workspace.Editor active in a single session.\r\n */\r\n export function construct(): WorkspaceEditor {\r\n return constructWorkspaceEditor();\r\n }\r\n\r\n /**\r\n * Create a new, empty, [[EditableWorkspaceDb]] file on the local filesystem for importing [[Workspace]] resources.\r\n * @note Do not pass an untrusted or unintended path in `localFileName`.\r\n * This helper creates or overwrites the file at that location; callers that need fail-if-exists behavior should check first.\r\n */\r\n export function createEmptyDb(args: { localFileName: LocalFileName, manifest: WorkspaceDbManifest }): void {\r\n WorkspaceSqliteDb.createNewDb(args.localFileName, args);\r\n }\r\n\r\n /** Arguments for [[WorkspaceEditor.queryContainers]] and [[WorkspaceEditor.findContainers]]. */\r\n export interface QueryWorkspaceContainersArgs {\r\n /** The iTwinId whose workspace containers should be queried. */\r\n iTwinId: GuidString;\r\n /** Optional iModelId to further scope the query to containers associated with a specific iModel. */\r\n iModelId?: GuidString;\r\n /** Optional label filter. */\r\n label?: string;\r\n }\r\n\r\n /**\r\n * Query the [[BlobContainer]] service for all workspace containers associated with a given iTwin.\r\n * This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that\r\n * automatically filters by `containerType: \"workspace\"`.\r\n * @param args - The query arguments including the iTwinId.\r\n * @returns A promise that resolves to the matching container metadata entries.\r\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\r\n */\r\n export async function queryContainers(args: QueryWorkspaceContainersArgs): Promise<BlobContainer.MetadataResponse[]> {\r\n if (undefined === BlobContainer.service)\r\n throw new Error(\"BlobContainer.service is not available. Ensure IModelHost is initialized with a valid configuration.\");\r\n const userToken = await IModelHost.getAccessToken();\r\n return BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: \"workspace\" });\r\n }\r\n}\r\n\r\n/** Arguments supplied to [[WorkspaceEditor.createNewCloudContainer]] to create a new [[EditableWorkspaceContainer]].\r\n * @beta\r\n */\r\nexport interface CreateNewWorkspaceContainerArgs {\r\n /**\r\n * The scope of the container. This determines the ownership of the container, how RBAC rights are assigned,\r\n * and the location of the datacenter\r\n */\r\n scope: BlobContainer.Scope;\r\n /** The manifest to be stored in the default WorkspaceDb in the new container. */\r\n manifest: WorkspaceDbManifest;\r\n /** Metadata stored by the BlobContainer service */\r\n metadata: Omit<BlobContainer.Metadata, \"containerType\">;\r\n /** The name of the default [[WorkspaceDb]] created inside the new container.\r\n * Default: \"workspace-db\";\r\n */\r\n dbName?: WorkspaceDbName;\r\n}\r\n\r\n/**\r\n * A [[WorkspaceContainer]] opened for editing by a [[WorkspaceEditor]].\r\n * You can create new [[WorkspaceDb]]s or new versions of existing [[WorkspaceDb]]s inside it.\r\n * Before actually making any changes to the container's contents, you must first obtain an exclusive write lock on it via\r\n * [[acquireWriteLock]]. Only one user can hold the write lock at any given time. When you have finished making changes,\r\n * you can use [[releaseWriteLock]] to publish your changes, or [[abandonChanges]] to discard them.\r\n * @beta\r\n */\r\nexport interface EditableWorkspaceContainer extends WorkspaceContainer {\r\n /**\r\n * Create a copy of an existing [[WorkspaceDb]] in this container with a new [[WorkspaceDbVersion]].\r\n * The copy should be modified with new content before the write lock is released,\r\n * and thereafter may never be modified again.\r\n * @note The copy actually shares all of the data with the original, but with copy-on-write if/when data in the new WorkspaceDb is modified.\r\n * @param props - The properties that determine the source WorkspaceDb to serve as the basis for the new version.\r\n * @returns A promise that resolves to an object containing the old and new WorkspaceDb names and versions.\r\n */\r\n createNewWorkspaceDbVersion(props: CreateNewWorkspaceDbVersionArgs): Promise<{ oldDb: WorkspaceDbNameAndVersion, newDb: WorkspaceDbNameAndVersion }>;\r\n\r\n /**\r\n * Create a new, empty [[WorkspaceDb]].\r\n * @param args - The arguments for creating the new WorkspaceDb. If `args.version` is omitted for a cloud container, the new db is created as version `0.0.0`.\r\n * @returns A promise that resolves to an EditableWorkspaceDb.\r\n */\r\n createDb(args: { dbName?: WorkspaceDbName, version?: WorkspaceDbVersion, manifest: WorkspaceDbManifest }): Promise<EditableWorkspaceDb>;\r\n\r\n /**\r\n * Get the cloud properties of this container.\r\n */\r\n readonly cloudProps: WorkspaceContainerProps | undefined;\r\n\r\n /**\r\n * Get an editable [[WorkspaceDb]] to add, delete, or update resources *within a newly created version* of a WorkspaceDb.\r\n * Repeated calls that resolve to the same WorkspaceDb return the same cached instance until it is closed.\r\n * @param props - The properties of the WorkspaceDb.\r\n */\r\n getEditableDb(props: WorkspaceDbProps): EditableWorkspaceDb;\r\n\r\n /**\r\n * Acquire the write lock on the container. Use [[releaseWriteLock]] to release the lock after publishing your changes, or\r\n * [[abandonChanges]] to release the lock and discard your changes.\r\n * Only one use can hold the write lock at any given time. However, readers can continue to read the published contents of the container while\r\n * a writer holds the write lock. Readers will only see the writer's changes after they are published by [[releaseWriteLock]].\r\n * @param user - The name of the user acquiring the write lock.\r\n */\r\n acquireWriteLock(user: string): void;\r\n\r\n /**\r\n * Release the write lock on the container. This should be called after all changes to the container's contents are complete. It\r\n * publishes and uploads the changes made to any [[WorkspaceDb]]s while the lock was held, after which those dbs become immutable.\r\n */\r\n releaseWriteLock(): void;\r\n\r\n /**\r\n * Abandon any changes made to the container and release the write lock. Any newly created versions of WorkspaceDbs are discarded.\r\n */\r\n abandonChanges(): void;\r\n}\r\n\r\n/**\r\n * Arguments supplied to [[Workspace.createNewWorkspaceDbVersion]].\r\n * @beta\r\n */\r\nexport interface CreateNewWorkspaceDbVersionArgs {\r\n /**\r\n * The properties that determine the source [[WorkspaceDb]] to serve as the basis for the new version.\r\n * This is usually the latest version, but it is possible to create patches to older versions.\r\n */\r\n fromProps?: WorkspaceDbProps;\r\n /** The type of version increment to apply to the source version. */\r\n versionType: CloudSqlite.SemverIncrement;\r\n /** For prerelease versions, a string that becomes part of the version name. */\r\n identifier?: string;\r\n}\r\n\r\n/**\r\n * An editable [[WorkspaceDb]]. This is used only by tools to allow administrators to create and modify WorkspaceDbs.\r\n * For cloud-based WorkspaceDbs, the container's write token must be obtained via [[EditableWorkspaceContainer.acquireWriteLock]] before the methods in this interface may be used.\r\n * Normally, only admins will have write access to a [[Workspace]].\r\n * Only one admin at a time may be editing a Workspace.\r\n * @beta\r\n */\r\nexport interface EditableWorkspaceDb extends WorkspaceDb {\r\n readonly container: EditableWorkspaceContainer;\r\n /**\r\n * The cloud properties of the [[WorkspaceDb]], if this is a cloud-based WorkspaceDb.\r\n */\r\n get cloudProps(): WorkspaceDbCloudProps | undefined;\r\n\r\n /**\r\n * Update the contents of the manifest in this WorkspaceDb.\r\n * @param manifest - The updated manifest.\r\n */\r\n updateManifest(manifest: WorkspaceDbManifest): void;\r\n\r\n /**\r\n * Add or update a resource in this WorkspaceDb that can be loaded as a [[SettingsDictionary]].\r\n * The `settings` will be stored as stringified JSON.\r\n * @param settings - The settings object to add or update.\r\n * @param rscName - The name of the settings resource. Defaults to \"settingsDictionary\" if undefined.\r\n */\r\n updateSettingsResource(settings: SettingsContainer, rscName?: string): void;\r\n\r\n /**\r\n * Add a new string resource to this WorkspaceDb.\r\n * @param rscName - The name of the string resource.\r\n * @param val - The string to save.\r\n * @throws if a string resource named `rscName` already exists.\r\n */\r\n addString(rscName: WorkspaceResourceName, val: string): void;\r\n\r\n /**\r\n * Update an existing string resource with a new value, or add it if it does not exist.\r\n * @param rscName - The name of the string resource.\r\n * @param val - The new value.\r\n */\r\n updateString(rscName: WorkspaceResourceName, val: string): void;\r\n\r\n /**\r\n * Remove a string resource.\r\n * @param rscName - The name of the string resource to remove.\r\n */\r\n removeString(rscName: WorkspaceResourceName): void;\r\n\r\n /**\r\n * Add a new binary resource to this WorkspaceDb.\r\n * @param rscName - The name of the blob resource.\r\n * @param val - The blob to save.\r\n * @throws if a blob resource named `rscName` already exists.\r\n */\r\n addBlob(rscName: WorkspaceResourceName, val: Uint8Array): void;\r\n\r\n /**\r\n * Update an existing blob resource with a new value, or add it if it does not exist.\r\n * @param rscName - The name of the blob resource.\r\n * @param val - The new value.\r\n */\r\n updateBlob(rscName: WorkspaceResourceName, val: Uint8Array): void;\r\n\r\n /**\r\n * Get a BlobIO writer for a previously-added blob WorkspaceResource.\r\n * @param rscName - The name of the blob resource.\r\n * @returns A BlobIO writer.\r\n * @note After writing is complete, the caller must call `close` on the BlobIO and must call `saveChanges` on the `db`.\r\n * @internal\r\n */\r\n getBlobWriter(rscName: WorkspaceResourceName): SQLiteDb.BlobIO;\r\n\r\n /**\r\n * Remove a binary resource.\r\n * @param rscName - The name of the blob resource to remove.\r\n */\r\n removeBlob(rscName: WorkspaceResourceName): void;\r\n\r\n /**\r\n * Copy the contents of an existing local file into this WorkspaceDb as a file resource.\r\n * @param rscName - The name of the file resource.\r\n * @param localFileName - The name of a local file to be read.\r\n * @param fileExt - The extension to be appended to the generated fileName when this WorkspaceDb is extracted from the WorkspaceDb.\r\n * By default, the characters after the last \".\" in `localFileName` are used. Pass this argument to override that.\r\n */\r\n addFile(rscName: WorkspaceResourceName, localFileName: LocalFileName, fileExt?: string): void;\r\n\r\n /**\r\n * Replace an existing file resource with the contents of another local file.\r\n * @param rscName - The name of the file resource.\r\n * @param localFileName - The name of a local file to be read.\r\n * @throws If the file resource does not exist.\r\n */\r\n updateFile(rscName: WorkspaceResourceName, localFileName: LocalFileName): void;\r\n\r\n /**\r\n * Remove a file resource.\r\n * @param rscName - The name of the file resource to remove.\r\n */\r\n removeFile(rscName: WorkspaceResourceName): void;\r\n}\r\n\r\n/** An object that permits administrators to modify the contents of a [[Workspace]].\r\n * Use [[WorkspaceEditor.construct]] to obtain a WorkspaceEditor, and [[close]] when finished using it.\r\n * Only one WorkspaceEditor may be in use at any given time.\r\n * Use [[getContainer]] to edit an existing [[WorkspaceContainer]], or [[createNewCloudContainer]] to create a new [[WorkspaceContainer]].\r\n * @beta\r\n */\r\nexport interface WorkspaceEditor {\r\n /** @internal */\r\n [_implementationProhibited]: unknown;\r\n\r\n /**\r\n * The workspace dedicated to this editor.\r\n * @note This workspace is independent from [[IModelHost.appWorkspace]] and all [[IModelDb.workspace]]s. It has its own [[Settings]] and [[WorkspaceDb]]s.\r\n */\r\n readonly workspace: Workspace;\r\n\r\n /**\r\n * Retrieves a container for the editor with the specified properties and access token.\r\n */\r\n getContainer(args: GetWorkspaceContainerArgs): EditableWorkspaceContainer;\r\n\r\n /**\r\n * Asynchronously retrieves a container for the editor with the specified properties.\r\n */\r\n getContainerAsync(props: WorkspaceContainerProps): Promise<EditableWorkspaceContainer>;\r\n\r\n /**\r\n * Creates a new cloud container for holding WorkspaceDbs, from the [[BlobContainer]] service.\r\n * @note The current user must have administrator rights for the iTwin for the container.\r\n */\r\n createNewCloudContainer(args: CreateNewWorkspaceContainerArgs): Promise<EditableWorkspaceContainer>;\r\n\r\n /**\r\n * Find and open existing workspace containers by querying the [[BlobContainer]] service.\r\n * This is a convenience method that queries for all workspace containers matching the given iTwinId\r\n * (and optionally iModelId), requests write access tokens, and opens each matching container.\r\n * @param args - The query arguments including iTwinId and optionally iModelId and label.\r\n * @returns A promise that resolves to an array of opened [[EditableWorkspaceContainer]]s.\r\n * @note Requires [[IModelHost.authorizationClient]] and [[BlobContainer.service]] to be configured.\r\n */\r\n findContainers(args: WorkspaceEditor.QueryWorkspaceContainersArgs): Promise<EditableWorkspaceContainer[]>;\r\n\r\n /**\r\n * Closes this editor. All [[workspace]] containers are dropped.\r\n */\r\n close(): void;\r\n}\r\n"]}
1
+ {"version":3,"file":"WorkspaceEditor.js","sourceRoot":"","sources":["../../../src/workspace/WorkspaceEditor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAMH,kEAAwD;AAKxD,+EAA4E;AAC5E,uEAA+E;AAC/E,iDAAgE;AAEhE,8CAA2C;AAE3C,YAAY;AACZ,IAAiB,eAAe,CA6C/B;AA7CD,WAAiB,eAAe;IAC9B;;;;OAIG;IACH,SAAgB,SAAS;QACvB,OAAO,IAAA,wCAAwB,GAAE,CAAC;IACpC,CAAC;IAFe,yBAAS,YAExB,CAAA;IAED;;;;OAIG;IACH,SAAgB,aAAa,CAAC,IAAqE;QACjG,qCAAiB,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAFe,6BAAa,gBAE5B,CAAA;IAcD;;;;;;;OAOG;IACI,KAAK,UAAU,eAAe,CAAC,IAAkC;QACtE,IAAI,SAAS,KAAK,oCAAa,CAAC,OAAO;YACrC,MAAM,IAAI,KAAK,CAAC,sGAAsG,CAAC,CAAC;QAC1H,MAAM,SAAS,GAAG,MAAM,uBAAU,CAAC,cAAc,EAAE,CAAC;QACpD,OAAO,oCAAa,CAAC,OAAO,CAAC,uBAAuB,CAAC,SAAS,EAAE,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,WAAW,EAAE,CAAC,CAAC;IACjI,CAAC;IALqB,+BAAe,kBAKpC,CAAA;AACH,CAAC,EA7CgB,eAAe,+BAAf,eAAe,QA6C/B","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 { LocalFileName } from \"@itwin/core-common\";\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { SQLiteDb } from \"../SQLiteDb\";\nimport { SettingsContainer } from \"./Settings\";\nimport { BlobContainer } from \"../BlobContainerService\";\nimport {\n GetWorkspaceContainerArgs, Workspace, WorkspaceContainer, WorkspaceContainerProps, WorkspaceDb, WorkspaceDbCloudProps, WorkspaceDbManifest, WorkspaceDbName, WorkspaceDbNameAndVersion,\n WorkspaceDbProps, WorkspaceDbVersion, WorkspaceResourceName,\n} from \"./Workspace\";\nimport { WorkspaceSqliteDb } from \"../internal/workspace/WorkspaceSqliteDb\";\nimport { constructWorkspaceEditor } from \"../internal/workspace/WorkspaceImpl\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\nimport { CloudSqlite } from \"../CloudSqlite\";\nimport { IModelHost } from \"../IModelHost\";\n\n/** @beta */\nexport namespace WorkspaceEditor {\n /**\n * Create a new [[WorkspaceEditor]] for creating new versions of [[WorkspaceDb]]s.\n * @note the caller becomes the owner of the Workspace.Editor and is responsible for calling [[WorkspaceEditor.close]] on it when they are finished using it.\n * @note It is illegal to have more than one Workspace.Editor active in a single session.\n */\n export function construct(): WorkspaceEditor {\n return constructWorkspaceEditor();\n }\n\n /**\n * Create a new, empty, [[EditableWorkspaceDb]] file on the local filesystem for importing [[Workspace]] resources.\n * @note Do not pass an untrusted or unintended path in `localFileName`.\n * This helper creates or overwrites the file at that location; callers that need fail-if-exists behavior should check first.\n */\n export function createEmptyDb(args: { localFileName: LocalFileName, manifest: WorkspaceDbManifest }): void {\n WorkspaceSqliteDb.createNewDb(args.localFileName, args);\n }\n\n /** Arguments for [[WorkspaceEditor.queryContainers]] and [[WorkspaceEditor.findContainers]]. */\n export interface QueryWorkspaceContainersArgs {\n /** The iTwinId whose workspace containers should be queried. */\n iTwinId: GuidString;\n /** Optional iModelId to further scope the query to containers associated with a specific iModel. */\n iModelId?: GuidString;\n /** Optional label filter. */\n label?: string;\n /** The type of container to query. Defaults to `\"workspace\"`. */\n containerType?: \"workspace\" | \"settings\";\n }\n\n /**\n * Query the [[BlobContainer]] service for all workspace containers associated with a given iTwin.\n * This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that\n * automatically filters by `containerType: \"workspace\"`.\n * @param args - The query arguments including the iTwinId.\n * @returns A promise that resolves to the matching container metadata entries.\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\n */\n export async function queryContainers(args: QueryWorkspaceContainersArgs): Promise<BlobContainer.MetadataResponse[]> {\n if (undefined === BlobContainer.service)\n throw new Error(\"BlobContainer.service is not available. Ensure IModelHost is initialized with a valid configuration.\");\n const userToken = await IModelHost.getAccessToken();\n return BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: args.containerType ?? \"workspace\" });\n }\n}\n\n/** Arguments supplied to [[WorkspaceEditor.createNewCloudContainer]] to create a new [[EditableWorkspaceContainer]].\n * @beta\n */\nexport interface CreateNewWorkspaceContainerArgs {\n /**\n * The scope of the container. This determines the ownership of the container, how RBAC rights are assigned,\n * and the location of the datacenter\n */\n scope: BlobContainer.Scope;\n /** The manifest to be stored in the default WorkspaceDb in the new container. */\n manifest: WorkspaceDbManifest;\n /** Metadata stored by the BlobContainer service */\n metadata: Omit<BlobContainer.Metadata, \"containerType\">;\n /** The type of container to create. Defaults to `\"workspace\"`. */\n containerType?: \"workspace\" | \"settings\";\n /** The name of the default [[WorkspaceDb]] created inside the new container.\n * Default: \"workspace-db\";\n */\n dbName?: WorkspaceDbName;\n}\n\n/**\n * A [[WorkspaceContainer]] opened for editing by a [[WorkspaceEditor]].\n * You can create new [[WorkspaceDb]]s or new versions of existing [[WorkspaceDb]]s inside it.\n * Before actually making any changes to the container's contents, you must first obtain an exclusive write lock on it via\n * [[acquireWriteLock]]. Only one user can hold the write lock at any given time. When you have finished making changes,\n * you can use [[releaseWriteLock]] to publish your changes, or [[abandonChanges]] to discard them.\n * @beta\n */\nexport interface EditableWorkspaceContainer extends WorkspaceContainer {\n /**\n * Create a copy of an existing [[WorkspaceDb]] in this container with a new [[WorkspaceDbVersion]].\n * The copy should be modified with new content before the write lock is released,\n * and thereafter may never be modified again.\n * @note The copy actually shares all of the data with the original, but with copy-on-write if/when data in the new WorkspaceDb is modified.\n * @param props - The properties that determine the source WorkspaceDb to serve as the basis for the new version.\n * @returns A promise that resolves to an object containing the old and new WorkspaceDb names and versions.\n */\n createNewWorkspaceDbVersion(props: CreateNewWorkspaceDbVersionArgs): Promise<{ oldDb: WorkspaceDbNameAndVersion, newDb: WorkspaceDbNameAndVersion }>;\n\n /**\n * Create a new, empty [[WorkspaceDb]].\n * @param args - The arguments for creating the new WorkspaceDb. If `args.version` is omitted for a cloud container, the new db is created as version `0.0.0`.\n * @returns A promise that resolves to an EditableWorkspaceDb.\n */\n createDb(args: { dbName?: WorkspaceDbName, version?: WorkspaceDbVersion, manifest: WorkspaceDbManifest }): Promise<EditableWorkspaceDb>;\n\n /**\n * Get the cloud properties of this container.\n */\n readonly cloudProps: WorkspaceContainerProps | undefined;\n\n /**\n * Get an editable [[WorkspaceDb]] to add, delete, or update resources *within a newly created version* of a WorkspaceDb.\n * Repeated calls that resolve to the same WorkspaceDb return the same cached instance until it is closed.\n * @param props - The properties of the WorkspaceDb.\n */\n getEditableDb(props: WorkspaceDbProps): EditableWorkspaceDb;\n\n /**\n * Acquire the write lock on the container. Use [[releaseWriteLock]] to release the lock after publishing your changes, or\n * [[abandonChanges]] to release the lock and discard your changes.\n * Only one use can hold the write lock at any given time. However, readers can continue to read the published contents of the container while\n * a writer holds the write lock. Readers will only see the writer's changes after they are published by [[releaseWriteLock]].\n * @param user - The name of the user acquiring the write lock.\n */\n acquireWriteLock(user: string): void;\n\n /**\n * Release the write lock on the container. This should be called after all changes to the container's contents are complete. It\n * publishes and uploads the changes made to any [[WorkspaceDb]]s while the lock was held, after which those dbs become immutable.\n */\n releaseWriteLock(): void;\n\n /**\n * Abandon any changes made to the container and release the write lock. Any newly created versions of WorkspaceDbs are discarded.\n */\n abandonChanges(): void;\n\n /**\n * Acquire the write lock, get or create an editable tip [[WorkspaceDb]], open it, run `operation`,\n * then close the db and release the lock.\n * If the current tip has already been published, a new prerelease version is created automatically.\n * On error the lock is released and changes are abandoned.\n * @param user - The name of the user acquiring the write lock.\n * @param operation - A callback invoked with the opened [[EditableWorkspaceDb]].\n * @param props - Properties identifying which db to operate on. Defaults to the container's default db.\n */\n withEditableDb(user: string, operation: (db: EditableWorkspaceDb) => void, props?: WorkspaceDbProps): Promise<void>;\n}\n\n/**\n * Arguments supplied to [[Workspace.createNewWorkspaceDbVersion]].\n * @beta\n */\nexport interface CreateNewWorkspaceDbVersionArgs {\n /**\n * The properties that determine the source [[WorkspaceDb]] to serve as the basis for the new version.\n * This is usually the latest version, but it is possible to create patches to older versions.\n */\n fromProps?: WorkspaceDbProps;\n /** The type of version increment to apply to the source version. */\n versionType: CloudSqlite.SemverIncrement;\n /** For prerelease versions, a string that becomes part of the version name. */\n identifier?: string;\n}\n\n/**\n * An editable [[WorkspaceDb]]. This is used only by tools to allow administrators to create and modify WorkspaceDbs.\n * For cloud-based WorkspaceDbs, the container's write token must be obtained via [[EditableWorkspaceContainer.acquireWriteLock]] before the methods in this interface may be used.\n * Normally, only admins will have write access to a [[Workspace]].\n * Only one admin at a time may be editing a Workspace.\n * @beta\n */\nexport interface EditableWorkspaceDb extends WorkspaceDb {\n readonly container: EditableWorkspaceContainer;\n /**\n * The cloud properties of the [[WorkspaceDb]], if this is a cloud-based WorkspaceDb.\n */\n get cloudProps(): WorkspaceDbCloudProps | undefined;\n\n /**\n * Update the contents of the manifest in this WorkspaceDb.\n * @param manifest - The updated manifest.\n */\n updateManifest(manifest: WorkspaceDbManifest): void;\n\n /**\n * Add or update a resource in this WorkspaceDb that can be loaded as a [[SettingsDictionary]].\n * The `settings` will be stored as stringified JSON.\n * @param settings - The settings object to add or update.\n * @param rscName - The name of the settings resource. Defaults to \"settingsDictionary\" if undefined.\n */\n updateSettingsResource(settings: SettingsContainer, rscName?: string): void;\n\n /**\n * Add a new string resource to this WorkspaceDb.\n * @param rscName - The name of the string resource.\n * @param val - The string to save.\n * @throws if a string resource named `rscName` already exists.\n */\n addString(rscName: WorkspaceResourceName, val: string): void;\n\n /**\n * Update an existing string resource with a new value, or add it if it does not exist.\n * @param rscName - The name of the string resource.\n * @param val - The new value.\n */\n updateString(rscName: WorkspaceResourceName, val: string): void;\n\n /**\n * Remove a string resource.\n * @param rscName - The name of the string resource to remove.\n */\n removeString(rscName: WorkspaceResourceName): void;\n\n /**\n * Add a new binary resource to this WorkspaceDb.\n * @param rscName - The name of the blob resource.\n * @param val - The blob to save.\n * @throws if a blob resource named `rscName` already exists.\n */\n addBlob(rscName: WorkspaceResourceName, val: Uint8Array): void;\n\n /**\n * Update an existing blob resource with a new value, or add it if it does not exist.\n * @param rscName - The name of the blob resource.\n * @param val - The new value.\n */\n updateBlob(rscName: WorkspaceResourceName, val: Uint8Array): void;\n\n /**\n * Get a BlobIO writer for a previously-added blob WorkspaceResource.\n * @param rscName - The name of the blob resource.\n * @returns A BlobIO writer.\n * @note After writing is complete, the caller must call `close` on the BlobIO and must call `saveChanges` on the `db`.\n * @internal\n */\n getBlobWriter(rscName: WorkspaceResourceName): SQLiteDb.BlobIO;\n\n /**\n * Remove a binary resource.\n * @param rscName - The name of the blob resource to remove.\n */\n removeBlob(rscName: WorkspaceResourceName): void;\n\n /**\n * Copy the contents of an existing local file into this WorkspaceDb as a file resource.\n * @param rscName - The name of the file resource.\n * @param localFileName - The name of a local file to be read.\n * @param fileExt - The extension to be appended to the generated fileName when this WorkspaceDb is extracted from the WorkspaceDb.\n * By default, the characters after the last \".\" in `localFileName` are used. Pass this argument to override that.\n */\n addFile(rscName: WorkspaceResourceName, localFileName: LocalFileName, fileExt?: string): void;\n\n /**\n * Replace an existing file resource with the contents of another local file.\n * @param rscName - The name of the file resource.\n * @param localFileName - The name of a local file to be read.\n * @throws If the file resource does not exist.\n */\n updateFile(rscName: WorkspaceResourceName, localFileName: LocalFileName): void;\n\n /**\n * Remove a file resource.\n * @param rscName - The name of the file resource to remove.\n */\n removeFile(rscName: WorkspaceResourceName): void;\n}\n\n/** An object that permits administrators to modify the contents of a [[Workspace]].\n * Use [[WorkspaceEditor.construct]] to obtain a WorkspaceEditor, and [[close]] when finished using it.\n * Only one WorkspaceEditor may be in use at any given time.\n * Use [[getContainer]] to edit an existing [[WorkspaceContainer]], or [[createNewCloudContainer]] to create a new [[WorkspaceContainer]].\n * @beta\n */\nexport interface WorkspaceEditor {\n /** @internal */\n [_implementationProhibited]: unknown;\n\n /**\n * The workspace dedicated to this editor.\n * @note This workspace is independent from [[IModelHost.appWorkspace]] and all [[IModelDb.workspace]]s. It has its own [[Settings]] and [[WorkspaceDb]]s.\n */\n readonly workspace: Workspace;\n\n /**\n * Retrieves a container for the editor with the specified properties and access token.\n */\n getContainer(args: GetWorkspaceContainerArgs): EditableWorkspaceContainer;\n\n /**\n * Asynchronously retrieves a container for the editor with the specified properties.\n */\n getContainerAsync(props: WorkspaceContainerProps): Promise<EditableWorkspaceContainer>;\n\n /**\n * Creates a new cloud container for holding WorkspaceDbs, from the [[BlobContainer]] service.\n * @note The current user must have administrator rights for the iTwin for the container.\n */\n createNewCloudContainer(args: CreateNewWorkspaceContainerArgs): Promise<EditableWorkspaceContainer>;\n\n /**\n * Find and open existing workspace containers by querying the [[BlobContainer]] service.\n * This is a convenience method that queries for all workspace containers matching the given iTwinId\n * (and optionally iModelId), requests write access tokens, and opens each matching container.\n * @param args - The query arguments including iTwinId and optionally iModelId and label.\n * @returns A promise that resolves to an array of opened [[EditableWorkspaceContainer]]s.\n * @note Requires [[IModelHost.authorizationClient]] and [[BlobContainer.service]] to be configured.\n */\n findContainers(args: WorkspaceEditor.QueryWorkspaceContainersArgs): Promise<EditableWorkspaceContainer[]>;\n\n /**\n * Closes this editor. All [[workspace]] containers are dropped.\n */\n close(): void;\n}\n"]}
@@ -197,10 +197,48 @@ export interface BackendHubAccess {
197
197
  * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.
198
198
  */
199
199
  acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;
200
+ /**
201
+ * Abandons the specified locks when none of the associated elements have
202
+ * been or will be modified. Depending on the {@link LockState} specified for the lock,
203
+ * it may be returned to the {@link LockState.Shared} state or released entirely. It is only
204
+ * valid to call this method when none of the elements protected by the locks have been edited, or if all edits
205
+ * have been reversed or abandoned without pushing them.
206
+ *
207
+ * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.
208
+ *
209
+ * It is an error to specify {@link LockState.Exclusive} for any element, to specify {@link LockState.Shared}
210
+ * for an element where the Exclusive lock is not currently held, or to include any element for which no lock
211
+ * is currently held.
212
+ *
213
+ * This method is optional, so not all IModelHubs will implement it. If this method is not implemented
214
+ * explicitly by an IModelHub, it will be implemented implicitly by calling
215
+ * {@link BackendHubAccess.acquireLocks} with the same locks and passing `changeset.id=""` and
216
+ * `changeset.index=0` in the first argument to indicate that the lock state should change without updating
217
+ * the changeset associated with the locks.
218
+ *
219
+ * @beta
220
+ */
221
+ abandonLocks?: (arg: BriefcaseIdArg, locks: LockMap) => Promise<void>;
200
222
  /** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */
201
223
  queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;
202
224
  /** Release all currently held locks */
203
225
  releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;
226
+ /**
227
+ * Abandons all currently held locks when none of the associated elements have been or will be modified.
228
+ * It is only valid to call this method when none of the elements protected by the locks have been edited,
229
+ * or if all edits have been reversed or abandoned without pushing them.
230
+ *
231
+ * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.
232
+ *
233
+ * This method is optional, so not all IModelHubs will implement it. If this method is not implemented
234
+ * explicitly by an IModelHub, it will be implemented implicitly by calling
235
+ * {@link BackendHubAccess.releaseAllLocks}, passing `changeset.id=""` and `changeset.index=0` in the
236
+ * first argument to indicate that the lock state should change without updating the changeset associated
237
+ * with the locks.
238
+ *
239
+ * @beta
240
+ */
241
+ abandonAllLocks?: (arg: BriefcaseIdArg) => Promise<void>;
204
242
  /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */
205
243
  queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;
206
244
  /** create a new iModel. Returns the Guid of the newly created iModel */
@@ -1 +1 @@
1
- {"version":3,"file":"BackendHubAccess.d.ts","sourceRoot":"","sources":["../../src/BackendHubAccess.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAmB,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EACL,WAAW,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EACzH,SAAS,IAAI,eAAe,EAAE,WAAW,EAAE,aAAa,EACxD,YAAY,EAAE,aAAa,EAC5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;EAEE;AACF,qBAAa,YAAa,SAAQ,WAAW;IAEzC,mCAAmC;aACnB,WAAW,EAA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AAe,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":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module HubAccess\r\n */\r\n\r\nimport { AccessToken, GuidString, Id64String, IModelHubStatus } from \"@itwin/core-bentley\";\r\nimport {\r\n BriefcaseId, ChangesetFileProps, ChangesetIdWithIndex, ChangesetIndex, ChangesetIndexOrId, ChangesetProps, ChangesetRange,\r\n LockState as CommonLockState, IModelError, IModelVersion,\r\n LocalDirName, LocalFileName,\r\n} from \"@itwin/core-common\";\r\nimport { CheckpointProps, ProgressFunction } from \"./CheckpointManager\";\r\nimport type { TokenArg } from \"./IModelDb\";\r\n\r\n/** Exception thrown if lock cannot be acquired.\r\n * @beta\r\n*/\r\nexport class LockConflict extends IModelError {\r\n public constructor(\r\n /** Id of Briefcase holding lock */\r\n public readonly briefcaseId: BriefcaseId,\r\n /** Alias of Briefcase holding lock */\r\n public readonly briefcaseAlias: string,\r\n msg: \"shared lock is held\" | \"exclusive lock is already held\",\r\n ) {\r\n super(IModelHubStatus.LockOwnedByAnotherBriefcase, msg);\r\n }\r\n}\r\n\r\n/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).\r\n * @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)\r\n * @public\r\n */\r\nexport enum LockState {\r\n /** The element is not locked */\r\n None = 0,\r\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. */\r\n Shared = 1,\r\n /** A Lock that permits modifications to an element and blocks other users from making modifications to it.\r\n * Holding an exclusive lock on an \"owner\" (a model or a parent element), implicitly exclusively locks all its members.\r\n */\r\n Exclusive = 2,\r\n}\r\n\r\n/**\r\n * The properties to access a V2 checkpoint through a daemon.\r\n * @public\r\n */\r\nexport interface V2CheckpointAccessProps {\r\n /** blob store account name. */\r\n readonly accountName: string;\r\n /** AccessToken that grants access to the container. */\r\n readonly sasToken: AccessToken;\r\n /** The name of the iModel's blob store container holding all checkpoints. */\r\n readonly containerId: string;\r\n /** The name of the virtual file within the container, used for the checkpoint */\r\n readonly dbName: string;\r\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\r\n readonly storageType: string;\r\n}\r\n\r\n/**\r\n * Maps element Ids to their corresponding [LockState]($common)s.\r\n * @public\r\n */\r\nexport type LockMap = Map<Id64String, CommonLockState>;\r\n\r\n/**\r\n * The properties of a lock that may be obtained from a lock server.\r\n * @public\r\n */\r\nexport interface LockProps {\r\n /** The elementId for the lock */\r\n readonly id: Id64String;\r\n /** the lock state */\r\n readonly state: CommonLockState;\r\n}\r\n\r\n/**\r\n * Argument for cancelling and tracking download progress.\r\n * @public\r\n */\r\nexport interface DownloadProgressArg {\r\n /** Called to show progress during a download. If this function returns non-zero, the download is aborted. */\r\n progressCallback?: ProgressFunction;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an iTwinId\r\n * @public\r\n */\r\nexport interface ITwinIdArg {\r\n readonly iTwinId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for methods that must supply an IModelId\r\n * @public\r\n */\r\nexport interface IModelIdArg extends TokenArg {\r\n readonly iModelId: GuidString;\r\n}\r\n\r\n/**\r\n * Argument for acquiring a new BriefcaseId\r\n * @public\r\n */\r\nexport interface AcquireNewBriefcaseIdArg extends IModelIdArg {\r\n /** A string to be reported to other users to identify this briefcase, for example in the case of conflicts or lock collisions. */\r\n readonly briefcaseAlias?: string;\r\n /** A string to represent the device that holds the briefcase. */\r\n readonly deviceName?: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModel name and iTwinId\r\n * @public\r\n */\r\nexport interface IModelNameArg extends TokenArg, ITwinIdArg {\r\n readonly iModelName: string;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a BriefcaseId\r\n * @public\r\n */\r\nexport interface BriefcaseIdArg extends IModelIdArg {\r\n readonly briefcaseId: BriefcaseId;\r\n}\r\n\r\n/** Argument for methods that must supply a briefcaseId and a changeset\r\n * @public\r\n */\r\nexport interface BriefcaseDbArg extends BriefcaseIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a changeset\r\n * @public\r\n */\r\nexport interface ChangesetArg extends IModelIdArg {\r\n readonly changeset: ChangesetIndexOrId;\r\n}\r\n\r\n/** Argument for downloading a changeset.\r\n * @public\r\n */\r\nexport interface DownloadChangesetArg extends ChangesetArg, DownloadProgressArg {\r\n /** Directory where the changeset should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/** @internal */\r\nexport interface ChangesetIndexArg extends IModelIdArg {\r\n readonly changeset: ChangesetIdWithIndex;\r\n}\r\n\r\n/** Argument for methods that must supply an IModelId and a range of Changesets.\r\n * @public\r\n */\r\nexport interface ChangesetRangeArg extends IModelIdArg {\r\n /** the range of changesets desired. If is undefined, *all* changesets are returned. */\r\n readonly range?: ChangesetRange;\r\n}\r\n\r\n/** Argument for downloading a changeset range.\r\n * @public\r\n */\r\nexport interface DownloadChangesetRangeArg extends ChangesetRangeArg, DownloadProgressArg {\r\n /** Directory where the changesets should be downloaded. */\r\n targetDir: LocalDirName;\r\n}\r\n\r\n/**\r\n * Arguments to create a new iModel in iModelHub\r\n * @public\r\n */\r\nexport interface CreateNewIModelProps extends IModelNameArg {\r\n readonly description?: string;\r\n readonly version0?: LocalFileName;\r\n readonly noLocks?: true;\r\n}\r\n\r\n/**\r\n * Methods for accessing services of IModelHub from an iTwin.js backend.\r\n * Generally direct access to these methods should not be required, since higher-level apis are provided.\r\n * @public\r\n */\r\nexport interface BackendHubAccess {\r\n /** Download all the changesets in the specified range. */\r\n downloadChangesets: (arg: DownloadChangesetRangeArg) => Promise<ChangesetFileProps[]>;\r\n /** Download a single changeset. */\r\n downloadChangeset: (arg: DownloadChangesetArg) => Promise<ChangesetFileProps>;\r\n /** Query the changeset properties given a ChangesetIndex */\r\n queryChangeset: (arg: ChangesetArg) => Promise<ChangesetProps>;\r\n /** Query an array of changeset properties given a range of ChangesetIndexes */\r\n queryChangesets: (arg: ChangesetRangeArg) => Promise<ChangesetProps[]>;\r\n /** Push a changeset to iModelHub. Returns the newly pushed changeset's index */\r\n pushChangeset: (arg: IModelIdArg & { changesetProps: ChangesetFileProps }) => Promise<ChangesetIndex>;\r\n /** Get the ChangesetProps of the most recent changeset */\r\n getLatestChangeset: (arg: IModelIdArg) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for an IModelVersion */\r\n getChangesetFromVersion: (arg: IModelIdArg & { version: IModelVersion }) => Promise<ChangesetProps>;\r\n /** Get the ChangesetProps for a named version */\r\n getChangesetFromNamedVersion: (arg: IModelIdArg & { versionName: string }) => Promise<ChangesetProps>;\r\n\r\n /** Acquire a new briefcaseId for the supplied iModelId\r\n * @note usually there should only be one briefcase per iModel per user.\r\n */\r\n acquireNewBriefcaseId: (arg: AcquireNewBriefcaseIdArg) => Promise<BriefcaseId>;\r\n /** Release a briefcaseId. After this call it is illegal to generate changesets for the released briefcaseId. */\r\n releaseBriefcase: (arg: BriefcaseIdArg) => Promise<void>;\r\n\r\n /** get an array of the briefcases assigned to a user. */\r\n getMyBriefcaseIds: (arg: IModelIdArg) => Promise<BriefcaseId[]>;\r\n\r\n /** Get the access props for a V2 checkpoint. Returns undefined if no V2 checkpoint exists. */\r\n queryV2Checkpoint: (arg: CheckpointProps) => Promise<V2CheckpointAccessProps | undefined>;\r\n\r\n /**\r\n * acquire one or more locks. Throws if unsuccessful. If *any* lock cannot be obtained, no locks are acquired\r\n * @throws ConflictingLocksError if one or more requested locks are held by other briefcases.\r\n */\r\n acquireLocks: (arg: BriefcaseDbArg, locks: LockMap) => Promise<void>;\r\n\r\n /** Get the list of all held locks for a briefcase. This can be very expensive and is currently used only for tests. */\r\n queryAllLocks: (arg: BriefcaseDbArg) => Promise<LockProps[]>;\r\n\r\n /** Release all currently held locks */\r\n releaseAllLocks: (arg: BriefcaseDbArg) => Promise<void>;\r\n\r\n /** Get the iModelId of an iModel by name. Undefined if no iModel with that name exists. */\r\n queryIModelByName: (arg: IModelNameArg) => Promise<GuidString | undefined>;\r\n\r\n /** create a new iModel. Returns the Guid of the newly created iModel */\r\n createNewIModel: (arg: CreateNewIModelProps) => Promise<GuidString>;\r\n\r\n /** delete an iModel */\r\n deleteIModel: (arg: IModelIdArg & ITwinIdArg) => Promise<void>;\r\n}\r\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 /** A string to represent the device that holds the briefcase. */\n readonly deviceName?: 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 /**\n * Abandons the specified locks when none of the associated elements have\n * been or will be modified. Depending on the {@link LockState} specified for the lock,\n * it may be returned to the {@link LockState.Shared} state or released entirely. It is only\n * valid to call this method when none of the elements protected by the locks have been edited, or if all edits\n * have been reversed or abandoned without pushing them.\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.\n *\n * It is an error to specify {@link LockState.Exclusive} for any element, to specify {@link LockState.Shared}\n * for an element where the Exclusive lock is not currently held, or to include any element for which no lock\n * is currently held.\n *\n * This method is optional, so not all IModelHubs will implement it. If this method is not implemented\n * explicitly by an IModelHub, it will be implemented implicitly by calling\n * {@link BackendHubAccess.acquireLocks} with the same locks and passing `changeset.id=\"\"` and\n * `changeset.index=0` in the first argument to indicate that the lock state should change without updating\n * the changeset associated with the locks.\n *\n * @beta\n */\n abandonLocks?: (arg: BriefcaseIdArg, 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 /**\n * Abandons all currently held locks when none of the associated elements have been or will be modified.\n * It is only valid to call this method when none of the elements protected by the locks have been edited,\n * or if all edits have been reversed or abandoned without pushing them.\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated.\n *\n * This method is optional, so not all IModelHubs will implement it. If this method is not implemented\n * explicitly by an IModelHub, it will be implemented implicitly by calling\n * {@link BackendHubAccess.releaseAllLocks}, passing `changeset.id=\"\"` and `changeset.index=0` in the\n * first argument to indicate that the lock state should change without updating the changeset associated\n * with the locks.\n *\n * @beta\n */\n abandonAllLocks?: (arg: BriefcaseIdArg) => 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":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,qBAsGX;AAtGD,WAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,qEAA4C,CAAA;IAE5C;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,2DAAkC,CAAA;IAElC;;;;OAIG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;;OAGG;IACH,2DAAkC,CAAA;IAElC;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mFAA0D,CAAA;IAE1D;;OAEG;IACH,2EAAkD,CAAA;IAElD;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;OAEG;IACH,mEAA0C,CAAA;IAE1C;;OAEG;IACH,yDAAgC,CAAA;IAEhC;;OAEG;IACH,yEAAgD,CAAA;IAChD;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;;;OAIG;IACH,mEAA0C,CAAA;IAE1C;;;OAGG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6EAAoD,CAAA;IAEpD,gBAAgB;IAChB,6DAAoC,CAAA;AACtC,CAAC,EAtGW,qBAAqB,KAArB,qBAAqB,QAsGhC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Logging\r\n */\r\n\r\n/** Logger categories used by this package\r\n * @note All logger categories in this package start with the `core-backend` prefix.\r\n * @see [Logger]($bentley)\r\n * @public\r\n */\r\nexport enum BackendLoggerCategory {\r\n /** The logger category used by API related to authorization */\r\n Authorization = \"core-backend.Authorization\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CodeSpecs]]\r\n */\r\n CodeSpecs = \"core-backend.CodeSpecs\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[CustomViewState3dCreator]]\r\n */\r\n CustomViewState3dCreator = \"core-backend.CustomViewState3dCreator\",\r\n\r\n /** The logger category used by the [[DevTools]] class and related classes.\r\n * @internal\r\n */\r\n DevTools = \"core-backend.DevTools\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ChangeSummaryManager]]\r\n * - [[ECDb]]\r\n * - [[ECSqlStatement]]\r\n */\r\n ECDb = \"core-backend.ECDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Functional]]\r\n */\r\n Functional = \"core-backend.Functional\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[LinearReferencing]]\r\n */\r\n LinearReferencing = \"core-backend.LinearReferencing\",\r\n\r\n /** The logger category used by the following classes:\r\n * - BriefcaseManager\r\n * - [[IModelDb]]\r\n */\r\n IModelDb = \"core-backend.IModelDb\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[IModelHost]]\r\n */\r\n IModelHost = \"core-backend.IModelHost\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileRequestMemoizer\r\n */\r\n IModelTileRequestRpc = \"core-backend.IModelTileRequestRpc\",\r\n\r\n /** The logger category used by the following classes:\r\n * - IModelTileRpcImpl (Tile Uploading)\r\n */\r\n IModelTileUpload = \"core-backend.IModelTileUpload\",\r\n\r\n /** The logger category used by the following classes:\r\n * - TileStorage (tile upload/download)\r\n */\r\n IModelTileStorage = \"core-backend.IModelTileStorage\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Relationship]]\r\n */\r\n Relationship = \"core-backend.Relationship\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[Schemas]]\r\n */\r\n Schemas = \"core-backend.Schemas\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[PromiseMemoizer]]\r\n */\r\n PromiseMemoizer = \"core-backend.PromiseMemoizer\",\r\n /** The logger category used by the following classes:\r\n * - [[EventSink]]\r\n */\r\n EventSink = \"core-backend.EventSink\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[StashManager]]\r\n * - [[StashError]]\r\n * @internal\r\n */\r\n StashManager = \"core-backend.StashManager\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[NativeHost]], [[NativeAppStorage]]\r\n * @internal\r\n */\r\n NativeApp = \"core-backend.NativeApp\",\r\n\r\n /** The logger category used by the following classes:\r\n * - [[ViewStateHydrator]]\r\n * @internal\r\n */\r\n ViewStateHydrator = \"core-backend.ViewStateHydrator\",\r\n\r\n /** @internal */\r\n Workspace = \"core-backend.Workspace\",\r\n}\r\n"]}
1
+ {"version":3,"file":"BackendLoggerCategory.js","sourceRoot":"","sources":["../../src/BackendLoggerCategory.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH;;;;GAIG;AACH,MAAM,CAAN,IAAY,qBAsGX;AAtGD,WAAY,qBAAqB;IAC/B,+DAA+D;IAC/D,qEAA4C,CAAA;IAE5C;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;OAEG;IACH,2FAAkE,CAAA;IAElE;;OAEG;IACH,2DAAkC,CAAA;IAElC;;;;OAIG;IACH,mDAA0B,CAAA;IAE1B;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;;OAGG;IACH,2DAAkC,CAAA;IAElC;;OAEG;IACH,+DAAsC,CAAA;IAEtC;;OAEG;IACH,mFAA0D,CAAA;IAE1D;;OAEG;IACH,2EAAkD,CAAA;IAElD;;OAEG;IACH,6EAAoD,CAAA;IAEpD;;OAEG;IACH,mEAA0C,CAAA;IAE1C;;OAEG;IACH,yDAAgC,CAAA;IAEhC;;OAEG;IACH,yEAAgD,CAAA;IAChD;;OAEG;IACH,6DAAoC,CAAA;IAEpC;;;;OAIG;IACH,mEAA0C,CAAA;IAE1C;;;OAGG;IACH,6DAAoC,CAAA;IAEpC;;;OAGG;IACH,6EAAoD,CAAA;IAEpD,gBAAgB;IAChB,6DAAoC,CAAA;AACtC,CAAC,EAtGW,qBAAqB,KAArB,qBAAqB,QAsGhC","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 Logging\n */\n\n/** Logger categories used by this package\n * @note All logger categories in this package start with the `core-backend` prefix.\n * @see [Logger]($bentley)\n * @public\n */\nexport enum BackendLoggerCategory {\n /** The logger category used by API related to authorization */\n Authorization = \"core-backend.Authorization\",\n\n /** The logger category used by the following classes:\n * - [[CodeSpecs]]\n */\n CodeSpecs = \"core-backend.CodeSpecs\",\n\n /** The logger category used by the following classes:\n * - [[CustomViewState3dCreator]]\n */\n CustomViewState3dCreator = \"core-backend.CustomViewState3dCreator\",\n\n /** The logger category used by the [[DevTools]] class and related classes.\n * @internal\n */\n DevTools = \"core-backend.DevTools\",\n\n /** The logger category used by the following classes:\n * - [[ChangeSummaryManager]]\n * - [[ECDb]]\n * - [[ECSqlStatement]]\n */\n ECDb = \"core-backend.ECDb\",\n\n /** The logger category used by the following classes:\n * - [[Functional]]\n */\n Functional = \"core-backend.Functional\",\n\n /** The logger category used by the following classes:\n * - [[LinearReferencing]]\n */\n LinearReferencing = \"core-backend.LinearReferencing\",\n\n /** The logger category used by the following classes:\n * - BriefcaseManager\n * - [[IModelDb]]\n */\n IModelDb = \"core-backend.IModelDb\",\n\n /** The logger category used by the following classes:\n * - [[IModelHost]]\n */\n IModelHost = \"core-backend.IModelHost\",\n\n /** The logger category used by the following classes:\n * - TileRequestMemoizer\n */\n IModelTileRequestRpc = \"core-backend.IModelTileRequestRpc\",\n\n /** The logger category used by the following classes:\n * - IModelTileRpcImpl (Tile Uploading)\n */\n IModelTileUpload = \"core-backend.IModelTileUpload\",\n\n /** The logger category used by the following classes:\n * - TileStorage (tile upload/download)\n */\n IModelTileStorage = \"core-backend.IModelTileStorage\",\n\n /** The logger category used by the following classes:\n * - [[Relationship]]\n */\n Relationship = \"core-backend.Relationship\",\n\n /** The logger category used by the following classes:\n * - [[Schemas]]\n */\n Schemas = \"core-backend.Schemas\",\n\n /** The logger category used by the following classes:\n * - [[PromiseMemoizer]]\n */\n PromiseMemoizer = \"core-backend.PromiseMemoizer\",\n /** The logger category used by the following classes:\n * - [[EventSink]]\n */\n EventSink = \"core-backend.EventSink\",\n\n /** The logger category used by the following classes:\n * - [[StashManager]]\n * - [[StashError]]\n * @internal\n */\n StashManager = \"core-backend.StashManager\",\n\n /** The logger category used by the following classes:\n * - [[NativeHost]], [[NativeAppStorage]]\n * @internal\n */\n NativeApp = \"core-backend.NativeApp\",\n\n /** The logger category used by the following classes:\n * - [[ViewStateHydrator]]\n * @internal\n */\n ViewStateHydrator = \"core-backend.ViewStateHydrator\",\n\n /** @internal */\n Workspace = \"core-backend.Workspace\",\n}\n"]}
@@ -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,qCAAqC,CAAC;AACtE,OAAO,KAAK,2BAA2B,MAAM,2CAA2C,CAAC;AACzF,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;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":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Schema\r\n */\r\n\r\nimport * as path from \"path\";\r\nimport * as categoryMod from \"./Category\";\r\nimport { ClassRegistry } from \"./ClassRegistry\";\r\nimport * as elementMod from \"./Element\";\r\nimport * as aspectMod from \"./ElementAspect\";\r\nimport * as externalSourceMod from \"./ExternalSource\";\r\nimport { KnownLocations } from \"./IModelHost\";\r\nimport * as materialMod from \"./Material\";\r\nimport * as modelMod from \"./Model\";\r\nimport * as linkMod from \"./Relationship\";\r\nimport { Schema, Schemas } from \"./Schema\";\r\nimport * as textureMod from \"./Texture\";\r\nimport * as viewMod from \"./ViewDefinition\";\r\nimport * as displayStyleMod from \"./DisplayStyle\";\r\nimport * as annotationsMod from \"./annotations/TextAnnotationElement\";\r\nimport * as elementDrivesTextAnnotation from \"./annotations/ElementDrivesTextAnnotation\";\r\nimport * as sheetIndex from \"./SheetIndex\";\r\n\r\n/**\r\n * The [BisCore]($docs/bis/guide/fundamentals/schemas-domains.md) schema is the lowest level Schema in an iModel.\r\n *\r\n * It is automatically registered when [[IModelHost.startup]] is called.\r\n *\r\n * Example:\r\n * ``` ts\r\n * [[include:BisCore.registerSchemaAndGetClass]]\r\n * ```\r\n * @public\r\n */\r\nexport class BisCoreSchema extends Schema {\r\n public static override get schemaName(): string { return \"BisCore\"; }\r\n public static get schemaFilePath(): string { return path.join(KnownLocations.nativeAssetsDir, \"ECSchemas\", \"Dgn\", `${BisCoreSchema.schemaName}.ecschema.xml`); }\r\n\r\n /** @internal */\r\n public static registerSchema() {\r\n if (this === Schemas.getRegisteredSchema(this.schemaName))\r\n return;\r\n\r\n Schemas.unregisterSchema(this.schemaName);\r\n Schemas.registerSchema(this);\r\n\r\n // this list should include all backend .ts files with implementations of Entity-based classes. Order does not matter.\r\n [\r\n elementMod,\r\n aspectMod,\r\n modelMod,\r\n categoryMod,\r\n viewMod,\r\n linkMod,\r\n textureMod,\r\n materialMod,\r\n externalSourceMod,\r\n displayStyleMod,\r\n annotationsMod,\r\n sheetIndex,\r\n elementDrivesTextAnnotation,\r\n ].forEach((module) => ClassRegistry.registerModule(module, this));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BisCoreSchema.js","sourceRoot":"","sources":["../../src/BisCoreSchema.ts"],"names":[],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ET,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;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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,KAAW,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,KAAb,aAAa,QA2K7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module BlobContainers\r\n */\r\n\r\n// spell:ignore datacenter\r\n\r\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\r\nimport { SettingsContainer } from \"./workspace/Settings\";\r\n\r\n/**\r\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\r\n * @beta\r\n */\r\nexport namespace BlobContainer {\r\n\r\n /** Object that implements the methods to create, delete, and request access to a container. */\r\n export let service: BlobContainer.ContainerService | undefined;\r\n\r\n /** name of cloud provider for a container. */\r\n export type Provider = \"azure\" | \"google\";\r\n\r\n /** the name of the container within its `Scope` */\r\n export type ContainerId = string;\r\n\r\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\r\n export type UserToken = AccessToken;\r\n\r\n /** token that authenticates access to a container for either read or write. */\r\n export type ContainerToken = AccessToken;\r\n\r\n /**\r\n * The scope for a container. This determines:\r\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\r\n * - the administrators who may configure RBAC permissions\r\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\r\n * determines the region for data residency requirements.\r\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\r\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\r\n */\r\n export interface Scope {\r\n /** iTwinId of the owner of this container. */\r\n iTwinId: Id64String;\r\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\r\n iModelId?: Id64String;\r\n /** the user GUID an individual, if this container is private. */\r\n ownerGuid?: GuidString;\r\n }\r\n\r\n /**\r\n * Metadata about the use of a container so that:\r\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\r\n * - usage reports can aggregate types of containers\r\n * - applications can identify their containers\r\n * - applications can store properties about their containers\r\n */\r\n export interface Metadata {\r\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\r\n containerType: string;\r\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\r\n label: string;\r\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\r\n description?: string;\r\n /** optional properties for the container */\r\n json?: SettingsContainer;\r\n }\r\n\r\n /**\r\n * Properties returned by queryContainersMetadata\r\n */\r\n export interface MetadataResponse extends Metadata {\r\n containerId: string;\r\n }\r\n\r\n /** Properties returned by `Service.requestToken` */\r\n export interface TokenProps {\r\n /**\r\n * Expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\r\n * and must be refreshed before it expires\r\n */\r\n token: ContainerToken;\r\n /** Scope of the container. */\r\n scope: Scope;\r\n /** Name of the blob storage provider. */\r\n provider: Provider;\r\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\r\n expiration: Date;\r\n /** Metadata of the container. */\r\n metadata: Metadata;\r\n /** Base URI of the storage account that hosts the container */\r\n baseUri: string;\r\n }\r\n\r\n /** The URI and Id of the container. */\r\n export interface UriAndId {\r\n baseUri: string;\r\n containerId: ContainerId;\r\n }\r\n\r\n /** Information required to access an existing container. */\r\n export interface AccessContainerProps extends UriAndId {\r\n userToken: UserToken;\r\n }\r\n\r\n /** Information about a newly created container. */\r\n export interface CreatedContainerProps extends UriAndId {\r\n /** name of the blob storage provider. */\r\n provider: Provider;\r\n }\r\n\r\n /**\r\n * Access level to request for token.\r\n * - `\"write\"`: request a writeable AccessToken.\r\n * - `\"read\"`: request a read-only AccessToken.\r\n * - `\"admin\"`: request a admin AccessToken.\r\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\r\n * If the user is not authorized for the level requested, an exception is thrown.\r\n */\r\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\r\n\r\n /** Information required to request an access token for a container. */\r\n export interface RequestTokenProps extends Omit<AccessContainerProps, \"baseUri\"> {\r\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\r\n accessLevel?: RequestAccessLevel;\r\n /** the number of seconds before the token should expire.\r\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\r\n */\r\n durationSeconds?: number;\r\n }\r\n\r\n /** Information required to create a new container. */\r\n export interface CreateNewContainerProps {\r\n /** the scope of the new container */\r\n scope: Scope;\r\n /** metadata to be stored on the new container */\r\n metadata: Metadata;\r\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\r\n userToken: UserToken;\r\n /**\r\n * the id for the container. Useful for tests.\r\n * @internal\r\n */\r\n containerId?: ContainerId;\r\n }\r\n\r\n /**\r\n * Query Parameters for querying containers\r\n */\r\n export interface QueryContainerProps {\r\n /** the iTwinId of the containers to query */\r\n iTwinId: GuidString;\r\n /** optional iModelId of the containers to query */\r\n iModelId?: GuidString;\r\n /** optional containerType of the containers to query */\r\n containerType?: GuidString;\r\n /** optional label of the containers to query */\r\n label?: GuidString;\r\n }\r\n\r\n /** Methods to create, delete, and access blob containers. */\r\n export interface ContainerService {\r\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\r\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\r\n\r\n /**\r\n * Delete an existing blob container.\r\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\r\n */\r\n delete(container: AccessContainerProps): Promise<void>;\r\n\r\n /** query the Scope for a container */\r\n queryScope(container: AccessContainerProps): Promise<Scope>;\r\n\r\n /** query the Metadata for a specific container */\r\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\r\n\r\n /** Returns all containers and their metadata associated with a given iTwinId. Can be further queried by label and containerType. */\r\n queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;\r\n\r\n /** update the json properties of this container */\r\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\r\n\r\n /** Request a `ContainerToken` for a container. Throws on failure. */\r\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BlobContainerService.js","sourceRoot":"","sources":["../../src/BlobContainerService.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAOH;;;GAGG;AACH,MAAM,KAAW,aAAa,CA2K7B;AA3KD,WAAiB,aAAa;AA2K9B,CAAC,EA3KgB,aAAa,KAAb,aAAa,QA2K7B","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 BlobContainers\n */\n\n// spell:ignore datacenter\n\nimport { AccessToken, GuidString, Id64String } from \"@itwin/core-bentley\";\nimport { SettingsContainer } from \"./workspace/Settings\";\n\n/**\n * Types and functions for creating, deleting and authorizing access to cloud-based blob containers for an iTwin.\n * @beta\n */\nexport namespace BlobContainer {\n\n /** Object that implements the methods to create, delete, and request access to a container. */\n export let service: BlobContainer.ContainerService | undefined;\n\n /** name of cloud provider for a container. */\n export type Provider = \"azure\" | \"google\";\n\n /** the name of the container within its `Scope` */\n export type ContainerId = string;\n\n /** token that authenticates a user. This token is required to obtain a `ContainerToken`. */\n export type UserToken = AccessToken;\n\n /** token that authenticates access to a container for either read or write. */\n export type ContainerToken = AccessToken;\n\n /**\n * The scope for a container. This determines:\n * - the \"owner\" organization, including the contract that governs its legal and commercial terms and obligations\n * - the administrators who may configure RBAC permissions\n * - the datacenter for the container. Every container resides in a datacenter as determined by the iTwinId. This\n * determines the region for data residency requirements.\n * - the lifecycle constraints for the container. No container can outlive its iTwin or its iModel (if defined). That is,\n * when the iTwin/iModel is deleted (either explicitly or due to contract expiration), the container is also deleted.\n */\n export interface Scope {\n /** iTwinId of the owner of this container. */\n iTwinId: Id64String;\n /** optionally, an iModelId within the iTwin. If present, container is deleted when the iModel is deleted. */\n iModelId?: Id64String;\n /** the user GUID an individual, if this container is private. */\n ownerGuid?: GuidString;\n }\n\n /**\n * Metadata about the use of a container so that:\n * - administrators can understand why a container exists for assigning RBAC permissions appropriately\n * - usage reports can aggregate types of containers\n * - applications can identify their containers\n * - applications can store properties about their containers\n */\n export interface Metadata {\n /** The machine-readable string that describes what the container is being used for (e.g. \"workspace\"). Always lowercase and singular. */\n containerType: string;\n /** Human-readable name for the container. This will be displayed in the administrator RBAC panel, and on usage reports. Not required to be unique.*/\n label: string;\n /** Optional human-readable explanation of the information held in the container. This will be displayed in the administrator RBAC panel, and on usage reports. */\n description?: string;\n /** optional properties for the container */\n json?: SettingsContainer;\n }\n\n /**\n * Properties returned by queryContainersMetadata\n */\n export interface MetadataResponse extends Metadata {\n containerId: string;\n }\n\n /** Properties returned by `Service.requestToken` */\n export interface TokenProps {\n /**\n * Expiring token that provides the requested access to the container. Should be used in all subsequent requests for blobs within the container,\n * and must be refreshed before it expires\n */\n token: ContainerToken;\n /** Scope of the container. */\n scope: Scope;\n /** Name of the blob storage provider. */\n provider: Provider;\n /** Time at which the token will expire. The token should be refreshed (that is, a new token should be requested) before this time. */\n expiration: Date;\n /** Metadata of the container. */\n metadata: Metadata;\n /** Base URI of the storage account that hosts the container */\n baseUri: string;\n }\n\n /** The URI and Id of the container. */\n export interface UriAndId {\n baseUri: string;\n containerId: ContainerId;\n }\n\n /** Information required to access an existing container. */\n export interface AccessContainerProps extends UriAndId {\n userToken: UserToken;\n }\n\n /** Information about a newly created container. */\n export interface CreatedContainerProps extends UriAndId {\n /** name of the blob storage provider. */\n provider: Provider;\n }\n\n /**\n * Access level to request for token.\n * - `\"write\"`: request a writeable AccessToken.\n * - `\"read\"`: request a read-only AccessToken.\n * - `\"admin\"`: request a admin AccessToken.\n * - `\"writeIfPossible\"`: first request a writeable AccessToken. If the user is not authorized for write, request a read-only AccessToken.\n * If the user is not authorized for the level requested, an exception is thrown.\n */\n export type RequestAccessLevel = \"write\" | \"read\" | \"admin\" | \"writeIfPossible\";\n\n /** Information required to request an access token for a container. */\n export interface RequestTokenProps extends Omit<AccessContainerProps, \"baseUri\"> {\n /** the level of access requested. If not specified, defaults to `\"writeIfPossible\"`. */\n accessLevel?: RequestAccessLevel;\n /** the number of seconds before the token should expire.\n * @note A maximum duration is determined by the service. If no value is supplied, or the value is larger than the maximum, the maximum duration is used.\n */\n durationSeconds?: number;\n }\n\n /** Information required to create a new container. */\n export interface CreateNewContainerProps {\n /** the scope of the new container */\n scope: Scope;\n /** metadata to be stored on the new container */\n metadata: Metadata;\n /** The user's access token. The user must be authorized with \"create container\" RBAC role for the iTwin. */\n userToken: UserToken;\n /**\n * the id for the container. Useful for tests.\n * @internal\n */\n containerId?: ContainerId;\n }\n\n /**\n * Query Parameters for querying containers\n */\n export interface QueryContainerProps {\n /** the iTwinId of the containers to query */\n iTwinId: GuidString;\n /** optional iModelId of the containers to query */\n iModelId?: GuidString;\n /** optional containerType of the containers to query */\n containerType?: GuidString;\n /** optional label of the containers to query */\n label?: GuidString;\n }\n\n /** Methods to create, delete, and access blob containers. */\n export interface ContainerService {\n /** Create a new blob container. Throws on failure (e.g. access denied or container already exists.) */\n create(props: CreateNewContainerProps): Promise<CreatedContainerProps>;\n\n /**\n * Delete an existing blob container.\n * @note This method requires that the user be authorized with \"delete container\" RBAC role for the iTwin.\n */\n delete(container: AccessContainerProps): Promise<void>;\n\n /** query the Scope for a container */\n queryScope(container: AccessContainerProps): Promise<Scope>;\n\n /** query the Metadata for a specific container */\n queryMetadata(container: AccessContainerProps): Promise<Metadata>;\n\n /** Returns all containers and their metadata associated with a given iTwinId. Can be further queried by label and containerType. */\n queryContainersMetadata(userToken: UserToken, args: QueryContainerProps): Promise<MetadataResponse[]>;\n\n /** update the json properties of this container */\n updateJson(container: AccessContainerProps, json: SettingsContainer): Promise<void>;\n\n /** Request a `ContainerToken` for a container. Throws on failure. */\n requestToken(props: RequestTokenProps): Promise<TokenProps>;\n }\n}\n"]}
@@ -559,7 +559,7 @@ export class BriefcaseManager {
559
559
  if (err instanceof Error) {
560
560
  Logger.logError(loggerCategory, `Error applying changeset with id ${stopwatch.description}: ${err.message}`);
561
561
  }
562
- db.abandonChanges();
562
+ db[_nativeDb].abandonChanges();
563
563
  throw err;
564
564
  }
565
565
  }
@@ -609,7 +609,7 @@ export class BriefcaseManager {
609
609
  this.dropRestorePoint(db, name);
610
610
  const stash = await StashManager.stash({ db, description: this.makeRestorePointKey(name) });
611
611
  db[_nativeDb].saveLocalValue(this.makeRestorePointKey(name), stash.id);
612
- db.saveChanges("Create restore point");
612
+ db[_nativeDb].saveChanges("Create restore point");
613
613
  Logger.logTrace(loggerCategory, `Created restore point ${name}`, () => stash);
614
614
  return stash;
615
615
  }
@@ -626,7 +626,7 @@ export class BriefcaseManager {
626
626
  if (restorePointId) {
627
627
  StashManager.dropStash({ db, stash: restorePointId });
628
628
  db[_nativeDb].deleteLocalValue(this.makeRestorePointKey(name));
629
- db.saveChanges("Drop restore point");
629
+ db[_nativeDb].saveChanges("Drop restore point");
630
630
  Logger.logTrace(loggerCategory, `Dropped restore point ${name}`);
631
631
  }
632
632
  }