@itwin/core-backend 5.8.0-dev.2 → 5.8.0-dev.20

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 (540) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/lib/cjs/BackendHubAccess.js.map +1 -1
  3. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  4. package/lib/cjs/BisCoreSchema.js.map +1 -1
  5. package/lib/cjs/BlobContainerService.js.map +1 -1
  6. package/lib/cjs/BriefcaseManager.js.map +1 -1
  7. package/lib/cjs/CatalogDb.js.map +1 -1
  8. package/lib/cjs/Category.js.map +1 -1
  9. package/lib/cjs/ChangeSummaryManager.js +2 -2
  10. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  11. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  12. package/lib/cjs/ChangesetECAdaptor.js +248 -248
  13. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  14. package/lib/cjs/ChannelControl.js.map +1 -1
  15. package/lib/cjs/CheckpointManager.js.map +1 -1
  16. package/lib/cjs/ClassRegistry.js +5 -5
  17. package/lib/cjs/ClassRegistry.js.map +1 -1
  18. package/lib/cjs/CloudSqlite.js.map +1 -1
  19. package/lib/cjs/CodeService.js.map +1 -1
  20. package/lib/cjs/CodeSpecs.js.map +1 -1
  21. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  22. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  23. package/lib/cjs/DevTools.js.map +1 -1
  24. package/lib/cjs/DisplayStyle.js.map +1 -1
  25. package/lib/cjs/ECDb.d.ts +26 -0
  26. package/lib/cjs/ECDb.d.ts.map +1 -1
  27. package/lib/cjs/ECDb.js +53 -2
  28. package/lib/cjs/ECDb.js.map +1 -1
  29. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  30. package/lib/cjs/ECSqlRowExecutor.d.ts +66 -0
  31. package/lib/cjs/ECSqlRowExecutor.d.ts.map +1 -0
  32. package/lib/cjs/ECSqlRowExecutor.js +135 -0
  33. package/lib/cjs/ECSqlRowExecutor.js.map +1 -0
  34. package/lib/cjs/ECSqlStatement.d.ts +13 -1
  35. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  36. package/lib/cjs/ECSqlStatement.js +30 -0
  37. package/lib/cjs/ECSqlStatement.js.map +1 -1
  38. package/lib/cjs/ECSqlSyncReader.d.ts +104 -0
  39. package/lib/cjs/ECSqlSyncReader.d.ts.map +1 -0
  40. package/lib/cjs/ECSqlSyncReader.js +191 -0
  41. package/lib/cjs/ECSqlSyncReader.js.map +1 -0
  42. package/lib/cjs/Element.js.map +1 -1
  43. package/lib/cjs/ElementAspect.js.map +1 -1
  44. package/lib/cjs/ElementGraphics.js.map +1 -1
  45. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  46. package/lib/cjs/Entity.js.map +1 -1
  47. package/lib/cjs/EntityReferences.js.map +1 -1
  48. package/lib/cjs/ExportGraphics.js.map +1 -1
  49. package/lib/cjs/ExternalSource.js.map +1 -1
  50. package/lib/cjs/FontFile.js.map +1 -1
  51. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  52. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  53. package/lib/cjs/GeometrySummary.js +47 -47
  54. package/lib/cjs/GeometrySummary.js.map +1 -1
  55. package/lib/cjs/IModelDb.d.ts +26 -1
  56. package/lib/cjs/IModelDb.d.ts.map +1 -1
  57. package/lib/cjs/IModelDb.js +63 -11
  58. package/lib/cjs/IModelDb.js.map +1 -1
  59. package/lib/cjs/IModelDbFonts.js.map +1 -1
  60. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  61. package/lib/cjs/IModelHost.js.map +1 -1
  62. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  63. package/lib/cjs/IModelJsFs.js.map +1 -1
  64. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  65. package/lib/cjs/IpcHost.d.ts.map +1 -1
  66. package/lib/cjs/IpcHost.js +28 -4
  67. package/lib/cjs/IpcHost.js.map +1 -1
  68. package/lib/cjs/LineStyle.d.ts +6 -0
  69. package/lib/cjs/LineStyle.d.ts.map +1 -1
  70. package/lib/cjs/LineStyle.js +41 -32
  71. package/lib/cjs/LineStyle.js.map +1 -1
  72. package/lib/cjs/LocalHub.d.ts +17 -10
  73. package/lib/cjs/LocalHub.d.ts.map +1 -1
  74. package/lib/cjs/LocalHub.js +127 -29
  75. package/lib/cjs/LocalHub.js.map +1 -1
  76. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  77. package/lib/cjs/LockControl.js.map +1 -1
  78. package/lib/cjs/Material.js.map +1 -1
  79. package/lib/cjs/Model.js.map +1 -1
  80. package/lib/cjs/NativeAppStorage.js.map +1 -1
  81. package/lib/cjs/NativeHost.js.map +1 -1
  82. package/lib/cjs/NavigationRelationship.js.map +1 -1
  83. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  84. package/lib/cjs/PropertyStore.js.map +1 -1
  85. package/lib/cjs/Relationship.js.map +1 -1
  86. package/lib/cjs/RpcBackend.js.map +1 -1
  87. package/lib/cjs/SQLiteDb.js.map +1 -1
  88. package/lib/cjs/Schema.js.map +1 -1
  89. package/lib/cjs/SchemaSync.js.map +1 -1
  90. package/lib/cjs/SchemaUtils.js.map +1 -1
  91. package/lib/cjs/SheetIndex.js.map +1 -1
  92. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  93. package/lib/cjs/SqliteStatement.js.map +1 -1
  94. package/lib/cjs/StashManager.js.map +1 -1
  95. package/lib/cjs/Texture.js.map +1 -1
  96. package/lib/cjs/TileStorage.js.map +1 -1
  97. package/lib/cjs/TxnManager.js.map +1 -1
  98. package/lib/cjs/ViewDefinition.js.map +1 -1
  99. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  100. package/lib/cjs/ViewStore.js.map +1 -1
  101. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  102. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  103. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  104. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  105. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  106. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  107. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  108. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  109. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  110. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  111. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  112. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  113. package/lib/cjs/core-backend.d.ts +3 -0
  114. package/lib/cjs/core-backend.d.ts.map +1 -1
  115. package/lib/cjs/core-backend.js +3 -0
  116. package/lib/cjs/core-backend.js.map +1 -1
  117. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  118. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  119. package/lib/cjs/domains/GenericElements.js.map +1 -1
  120. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  121. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  122. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  123. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  124. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  125. package/lib/cjs/internal/HubMock.js.map +1 -1
  126. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  127. package/lib/cjs/internal/IntegrityCheck.js.map +1 -1
  128. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  129. package/lib/cjs/internal/NoLocks.js.map +1 -1
  130. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  131. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  132. package/lib/cjs/internal/Symbols.js.map +1 -1
  133. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  134. package/lib/cjs/internal/cross-package.js.map +1 -1
  135. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts +38 -0
  136. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts.map +1 -0
  137. package/lib/cjs/internal/workspace/SettingsDbImpl.js +108 -0
  138. package/lib/cjs/internal/workspace/SettingsDbImpl.js.map +1 -0
  139. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts +7 -0
  140. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts.map +1 -0
  141. package/lib/cjs/internal/workspace/SettingsEditorImpl.js +266 -0
  142. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -0
  143. package/lib/cjs/internal/workspace/SettingsImpl.d.ts +1 -0
  144. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
  145. package/lib/cjs/internal/workspace/SettingsImpl.js +8 -4
  146. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  147. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  148. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts +14 -0
  149. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts.map +1 -0
  150. package/lib/cjs/internal/workspace/SettingsSqliteDb.js +40 -0
  151. package/lib/cjs/internal/workspace/SettingsSqliteDb.js.map +1 -0
  152. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +1 -0
  153. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  154. package/lib/cjs/internal/workspace/WorkspaceImpl.js +67 -16
  155. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  156. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  157. package/lib/cjs/rpc/multipart.js.map +1 -1
  158. package/lib/cjs/rpc/tracing.js.map +1 -1
  159. package/lib/cjs/rpc/web/logging.js.map +1 -1
  160. package/lib/cjs/rpc/web/request.js.map +1 -1
  161. package/lib/cjs/rpc/web/response.js.map +1 -1
  162. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  163. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  164. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  165. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  166. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  167. package/lib/cjs/workspace/Settings.d.ts +8 -0
  168. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  169. package/lib/cjs/workspace/Settings.js.map +1 -1
  170. package/lib/cjs/workspace/SettingsDb.d.ts +109 -0
  171. package/lib/cjs/workspace/SettingsDb.d.ts.map +1 -0
  172. package/lib/cjs/workspace/SettingsDb.js +19 -0
  173. package/lib/cjs/workspace/SettingsDb.js.map +1 -0
  174. package/lib/cjs/workspace/SettingsEditor.d.ts +250 -0
  175. package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -0
  176. package/lib/cjs/workspace/SettingsEditor.js +53 -0
  177. package/lib/cjs/workspace/SettingsEditor.js.map +1 -0
  178. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  179. package/lib/cjs/workspace/Workspace.d.ts +42 -19
  180. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  181. package/lib/cjs/workspace/Workspace.js.map +1 -1
  182. package/lib/cjs/workspace/WorkspaceEditor.d.ts +32 -1
  183. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  184. package/lib/cjs/workspace/WorkspaceEditor.js +19 -0
  185. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  186. package/lib/esm/BackendHubAccess.js.map +1 -1
  187. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  188. package/lib/esm/BisCoreSchema.js.map +1 -1
  189. package/lib/esm/BlobContainerService.js.map +1 -1
  190. package/lib/esm/BriefcaseManager.js.map +1 -1
  191. package/lib/esm/CatalogDb.js.map +1 -1
  192. package/lib/esm/Category.js.map +1 -1
  193. package/lib/esm/ChangeSummaryManager.js +2 -2
  194. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  195. package/lib/esm/ChangedElementsDb.js.map +1 -1
  196. package/lib/esm/ChangesetECAdaptor.js +248 -248
  197. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  198. package/lib/esm/ChannelControl.js.map +1 -1
  199. package/lib/esm/CheckpointManager.js.map +1 -1
  200. package/lib/esm/ClassRegistry.js +5 -5
  201. package/lib/esm/ClassRegistry.js.map +1 -1
  202. package/lib/esm/CloudSqlite.js.map +1 -1
  203. package/lib/esm/CodeService.js.map +1 -1
  204. package/lib/esm/CodeSpecs.js.map +1 -1
  205. package/lib/esm/ConcurrentQuery.js.map +1 -1
  206. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  207. package/lib/esm/DevTools.js.map +1 -1
  208. package/lib/esm/DisplayStyle.js.map +1 -1
  209. package/lib/esm/ECDb.d.ts +26 -0
  210. package/lib/esm/ECDb.d.ts.map +1 -1
  211. package/lib/esm/ECDb.js +54 -3
  212. package/lib/esm/ECDb.js.map +1 -1
  213. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  214. package/lib/esm/ECSqlRowExecutor.d.ts +66 -0
  215. package/lib/esm/ECSqlRowExecutor.d.ts.map +1 -0
  216. package/lib/esm/ECSqlRowExecutor.js +131 -0
  217. package/lib/esm/ECSqlRowExecutor.js.map +1 -0
  218. package/lib/esm/ECSqlStatement.d.ts +13 -1
  219. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  220. package/lib/esm/ECSqlStatement.js +30 -0
  221. package/lib/esm/ECSqlStatement.js.map +1 -1
  222. package/lib/esm/ECSqlSyncReader.d.ts +104 -0
  223. package/lib/esm/ECSqlSyncReader.d.ts.map +1 -0
  224. package/lib/esm/ECSqlSyncReader.js +187 -0
  225. package/lib/esm/ECSqlSyncReader.js.map +1 -0
  226. package/lib/esm/Element.js.map +1 -1
  227. package/lib/esm/ElementAspect.js.map +1 -1
  228. package/lib/esm/ElementGraphics.js.map +1 -1
  229. package/lib/esm/ElementTreeWalker.js.map +1 -1
  230. package/lib/esm/Entity.js.map +1 -1
  231. package/lib/esm/EntityReferences.js.map +1 -1
  232. package/lib/esm/ExportGraphics.js.map +1 -1
  233. package/lib/esm/ExternalSource.js.map +1 -1
  234. package/lib/esm/FontFile.js.map +1 -1
  235. package/lib/esm/GeoCoordConfig.js.map +1 -1
  236. package/lib/esm/GeographicCRSServices.js.map +1 -1
  237. package/lib/esm/GeometrySummary.js +47 -47
  238. package/lib/esm/GeometrySummary.js.map +1 -1
  239. package/lib/esm/IModelDb.d.ts +26 -1
  240. package/lib/esm/IModelDb.d.ts.map +1 -1
  241. package/lib/esm/IModelDb.js +63 -11
  242. package/lib/esm/IModelDb.js.map +1 -1
  243. package/lib/esm/IModelDbFonts.js.map +1 -1
  244. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  245. package/lib/esm/IModelHost.js.map +1 -1
  246. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  247. package/lib/esm/IModelJsFs.js.map +1 -1
  248. package/lib/esm/ImageSourceConversion.js.map +1 -1
  249. package/lib/esm/IpcHost.d.ts.map +1 -1
  250. package/lib/esm/IpcHost.js +28 -4
  251. package/lib/esm/IpcHost.js.map +1 -1
  252. package/lib/esm/LineStyle.d.ts +6 -0
  253. package/lib/esm/LineStyle.d.ts.map +1 -1
  254. package/lib/esm/LineStyle.js +41 -32
  255. package/lib/esm/LineStyle.js.map +1 -1
  256. package/lib/esm/LocalHub.d.ts +17 -10
  257. package/lib/esm/LocalHub.d.ts.map +1 -1
  258. package/lib/esm/LocalHub.js +128 -30
  259. package/lib/esm/LocalHub.js.map +1 -1
  260. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  261. package/lib/esm/LockControl.js.map +1 -1
  262. package/lib/esm/Material.js.map +1 -1
  263. package/lib/esm/Model.js.map +1 -1
  264. package/lib/esm/NativeAppStorage.js.map +1 -1
  265. package/lib/esm/NativeHost.js.map +1 -1
  266. package/lib/esm/NavigationRelationship.js.map +1 -1
  267. package/lib/esm/PromiseMemoizer.js.map +1 -1
  268. package/lib/esm/PropertyStore.js.map +1 -1
  269. package/lib/esm/Relationship.js.map +1 -1
  270. package/lib/esm/RpcBackend.js.map +1 -1
  271. package/lib/esm/SQLiteDb.js.map +1 -1
  272. package/lib/esm/Schema.js.map +1 -1
  273. package/lib/esm/SchemaSync.js.map +1 -1
  274. package/lib/esm/SchemaUtils.js.map +1 -1
  275. package/lib/esm/SheetIndex.js.map +1 -1
  276. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  277. package/lib/esm/SqliteStatement.js.map +1 -1
  278. package/lib/esm/StashManager.js.map +1 -1
  279. package/lib/esm/Texture.js.map +1 -1
  280. package/lib/esm/TileStorage.js.map +1 -1
  281. package/lib/esm/TxnManager.js.map +1 -1
  282. package/lib/esm/ViewDefinition.js.map +1 -1
  283. package/lib/esm/ViewStateHydrator.js.map +1 -1
  284. package/lib/esm/ViewStore.js.map +1 -1
  285. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  286. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  287. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  288. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  289. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  290. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  291. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  292. package/lib/esm/core-backend.d.ts +3 -0
  293. package/lib/esm/core-backend.d.ts.map +1 -1
  294. package/lib/esm/core-backend.js +3 -0
  295. package/lib/esm/core-backend.js.map +1 -1
  296. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  297. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  298. package/lib/esm/domains/GenericElements.js.map +1 -1
  299. package/lib/esm/domains/GenericSchema.js.map +1 -1
  300. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  301. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  302. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  303. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  304. package/lib/esm/internal/HubMock.js.map +1 -1
  305. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  306. package/lib/esm/internal/IntegrityCheck.js.map +1 -1
  307. package/lib/esm/internal/NativePlatform.js.map +1 -1
  308. package/lib/esm/internal/NoLocks.js.map +1 -1
  309. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  310. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  311. package/lib/esm/internal/Symbols.js.map +1 -1
  312. package/lib/esm/internal/annotations/fields.js.map +1 -1
  313. package/lib/esm/internal/cross-package.js.map +1 -1
  314. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts +38 -0
  315. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts.map +1 -0
  316. package/lib/esm/internal/workspace/SettingsDbImpl.js +104 -0
  317. package/lib/esm/internal/workspace/SettingsDbImpl.js.map +1 -0
  318. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts +7 -0
  319. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts.map +1 -0
  320. package/lib/esm/internal/workspace/SettingsEditorImpl.js +263 -0
  321. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -0
  322. package/lib/esm/internal/workspace/SettingsImpl.d.ts +1 -0
  323. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -1
  324. package/lib/esm/internal/workspace/SettingsImpl.js +5 -2
  325. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  326. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  327. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts +14 -0
  328. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts.map +1 -0
  329. package/lib/esm/internal/workspace/SettingsSqliteDb.js +36 -0
  330. package/lib/esm/internal/workspace/SettingsSqliteDb.js.map +1 -0
  331. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +1 -0
  332. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  333. package/lib/esm/internal/workspace/WorkspaceImpl.js +67 -17
  334. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  335. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  336. package/lib/esm/rpc/multipart.js.map +1 -1
  337. package/lib/esm/rpc/tracing.js.map +1 -1
  338. package/lib/esm/rpc/web/logging.js.map +1 -1
  339. package/lib/esm/rpc/web/request.js.map +1 -1
  340. package/lib/esm/rpc/web/response.js.map +1 -1
  341. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  342. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  343. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  344. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  345. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  346. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  347. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  348. package/lib/esm/test/AttachDb.test.js +11 -11
  349. package/lib/esm/test/AttachDb.test.js.map +1 -1
  350. package/lib/esm/test/ElementDrivesElement.test.js +23 -23
  351. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  352. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  353. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  354. package/lib/esm/test/IModelHost.test.js.map +1 -1
  355. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  356. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  357. package/lib/esm/test/IpcHost.test.js +64 -13
  358. package/lib/esm/test/IpcHost.test.js.map +1 -1
  359. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  360. package/lib/esm/test/PrintElementTree.js.map +1 -1
  361. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  362. package/lib/esm/test/RevisionUtility.js.map +1 -1
  363. package/lib/esm/test/SchemaUtils.test.js +25 -25
  364. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  365. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  366. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +129 -129
  367. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  368. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  369. package/lib/esm/test/TestUtils.js.map +1 -1
  370. package/lib/esm/test/annotations/Fields.test.js +53 -53
  371. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  372. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  373. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  374. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  375. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  376. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  377. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  378. package/lib/esm/test/categories/Category.test.js.map +1 -1
  379. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  380. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  381. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  382. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +19 -19
  383. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  384. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  385. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  386. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  387. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  388. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  389. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  390. package/lib/esm/test/ecdb/ECSqlAst.test.js +65 -65
  391. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  392. package/lib/esm/test/ecdb/ECSqlQuery.test.js +100 -12
  393. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  394. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -332
  395. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  396. package/lib/esm/test/ecdb/ECSqlSyncReader.test.d.ts +2 -0
  397. package/lib/esm/test/ecdb/ECSqlSyncReader.test.d.ts.map +1 -0
  398. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js +122 -0
  399. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js.map +1 -0
  400. package/lib/esm/test/ecdb/QueryReaders.test.d.ts +2 -0
  401. package/lib/esm/test/ecdb/QueryReaders.test.d.ts.map +1 -0
  402. package/lib/esm/test/ecdb/QueryReaders.test.js +1462 -0
  403. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -0
  404. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  405. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -1
  406. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +4 -1
  407. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  408. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  409. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  410. package/lib/esm/test/ecsql/src/ECSqlTestParser.d.ts +1 -1
  411. package/lib/esm/test/ecsql/src/ECSqlTestParser.d.ts.map +1 -1
  412. package/lib/esm/test/ecsql/src/ECSqlTestParser.js +11 -5
  413. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  414. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js +186 -100
  415. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  416. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  417. package/lib/esm/test/element/ElementAspect.test.js +22 -22
  418. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  419. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  420. package/lib/esm/test/element/ElementRoundTrip.test.js +139 -139
  421. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  422. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  423. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  424. package/lib/esm/test/element/NullStructArray.test.js +13 -13
  425. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  426. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  427. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  428. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  429. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  430. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  431. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +32 -32
  432. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  433. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  434. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  435. package/lib/esm/test/hubaccess/Rebase.test.js +56 -56
  436. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  437. package/lib/esm/test/hubaccess/SemanticRebase.test.js +145 -145
  438. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  439. package/lib/esm/test/imageData.js.map +1 -1
  440. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  441. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  442. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  443. package/lib/esm/test/imodel/IModel.test.js +44 -44
  444. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  445. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  446. package/lib/esm/test/imodel/SchemaXmlImport.test.js +13 -13
  447. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  448. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  449. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  450. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  451. package/lib/esm/test/index.js.map +1 -1
  452. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  453. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  454. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  455. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  456. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  457. package/lib/esm/test/rpc/response.test.js.map +1 -1
  458. package/lib/esm/test/schema/ClassRegistry.test.js +99 -99
  459. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  460. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  461. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  462. package/lib/esm/test/schema/IModelSchemaContext.test.js +9 -9
  463. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  464. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +19 -19
  465. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  466. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  467. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  468. package/lib/esm/test/standalone/ChangesetReader.test.js +135 -135
  469. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  470. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  471. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  472. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  473. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  474. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  475. package/lib/esm/test/standalone/ExportGraphics.test.js +14 -14
  476. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  477. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  478. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  479. package/lib/esm/test/standalone/HubMock.test.js +177 -7
  480. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  481. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  482. package/lib/esm/test/standalone/IModelWrite.test.js +27 -27
  483. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  484. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  485. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  486. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  487. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  488. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  489. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  490. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  491. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  492. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  493. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  494. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  495. package/lib/esm/test/standalone/Settings.test.js +18 -0
  496. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  497. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  498. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  499. package/lib/esm/test/standalone/StandaloneDb.test.js +51 -1
  500. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  501. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  502. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  503. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  504. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  505. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  506. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  507. package/lib/esm/test/standalone/Workspace.test.js +213 -0
  508. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  509. package/lib/esm/test/standalone/iModelDb.test.d.ts +2 -0
  510. package/lib/esm/test/standalone/iModelDb.test.d.ts.map +1 -0
  511. package/lib/esm/test/standalone/iModelDb.test.js +35 -0
  512. package/lib/esm/test/standalone/iModelDb.test.js.map +1 -0
  513. package/lib/esm/test/workspace/SettingsDb.test.d.ts +2 -0
  514. package/lib/esm/test/workspace/SettingsDb.test.d.ts.map +1 -0
  515. package/lib/esm/test/workspace/SettingsDb.test.js +465 -0
  516. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -0
  517. package/lib/esm/workspace/Settings.d.ts +8 -0
  518. package/lib/esm/workspace/Settings.d.ts.map +1 -1
  519. package/lib/esm/workspace/Settings.js.map +1 -1
  520. package/lib/esm/workspace/SettingsDb.d.ts +109 -0
  521. package/lib/esm/workspace/SettingsDb.d.ts.map +1 -0
  522. package/lib/esm/workspace/SettingsDb.js +16 -0
  523. package/lib/esm/workspace/SettingsDb.js.map +1 -0
  524. package/lib/esm/workspace/SettingsEditor.d.ts +250 -0
  525. package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -0
  526. package/lib/esm/workspace/SettingsEditor.js +50 -0
  527. package/lib/esm/workspace/SettingsEditor.js.map +1 -0
  528. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  529. package/lib/esm/workspace/Workspace.d.ts +42 -19
  530. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  531. package/lib/esm/workspace/Workspace.js.map +1 -1
  532. package/lib/esm/workspace/WorkspaceEditor.d.ts +32 -1
  533. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -1
  534. package/lib/esm/workspace/WorkspaceEditor.js +19 -0
  535. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  536. package/package.json +15 -15
  537. package/lib/esm/test/ecdb/ECSqlReader.test.d.ts +0 -2
  538. package/lib/esm/test/ecdb/ECSqlReader.test.d.ts.map +0 -1
  539. package/lib/esm/test/ecdb/ECSqlReader.test.js +0 -669
  540. package/lib/esm/test/ecdb/ECSqlReader.test.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Workspace
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.settingsResourceName = void 0;
11
+ const Symbols_1 = require("../internal/Symbols");
12
+ /** The default resource name used to store settings in a [[SettingsDb]].
13
+ * This is the key under which all settings are stored in the SQLite `strings` table.
14
+ * When loading settings at runtime via [[Workspace.loadSettingsDictionary]], the `resourceName` defaults
15
+ * to this value, ensuring the read and write paths always agree on which key to use.
16
+ * @internal
17
+ */
18
+ exports.settingsResourceName = "settings";
19
+ //# sourceMappingURL=SettingsDb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsDb.js","sourceRoot":"","sources":["../../../src/workspace/SettingsDb.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,iDAAgE;AAyGhE;;;;;GAKG;AACU,QAAA,oBAAoB,GAAG,UAAU,CAAC","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 { Setting, SettingName, SettingsContainer, SettingsPriority } from \"./Settings\";\nimport { CloudSqliteContainer, WorkspaceContainerId, WorkspaceDbName } from \"./Workspace\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\n\n/** Metadata stored inside a [[SettingsDb]] describing the database's contents, to help users understand\n * the purpose of the [[SettingsDb]] and who to contact with questions about it.\n * @note Only the `settingsName` field is required, and users may add additional fields for their own purposes.\n * @note Since the information is stored inside the [[SettingsDb]], it is versioned along with the rest of the contents.\n * @beta\n */\nexport interface SettingsDbManifest {\n /** The name of the [[SettingsDb]] to be shown in user interfaces. Organizations should attempt to make this name\n * informative enough so that users may refer to it in conversations.\n */\n readonly settingsName: string;\n /** A description of the contents of this [[SettingsDb]] to help users understand its purpose and appropriate usage. */\n readonly description?: string;\n /** The name of the person to contact with questions about this [[SettingsDb]]. */\n readonly contactName?: string;\n /** The name of the person who last modified this [[SettingsDb]]. */\n readonly lastEditedBy?: string;\n}\n\n/** Properties that specify how to load a [[SettingsDb]] within a [[CloudSqliteContainer]].\n * @beta\n */\nexport interface SettingsDbProps {\n /** The base name of the [[SettingsDb]], without any version information. Default: `\"settings-db\"`. */\n readonly dbName?: WorkspaceDbName;\n /** The [semver](https://github.com/npm/node-semver) version string or range for the desired [[SettingsDb]].\n * If not specified, the latest available version is used.\n */\n readonly version?: string;\n}\n\n/** Arguments for obtaining a [[SettingsDb]] from a previously-loaded container.\n * @beta\n */\nexport interface GetSettingsDbArgs {\n /** The [[WorkspaceContainerId]] of the cloud container that holds the [[SettingsDb]].\n * This is an opaque GUID assigned by the BlobContainer service when the container is created — it is\n * **not** the same as an iTwinId or iModelId.\n */\n readonly containerId: WorkspaceContainerId;\n /** The priority to assign to dictionaries loaded from this [[SettingsDb]]. */\n readonly priority: SettingsPriority;\n /** The name of the [[SettingsDb]] to retrieve. Default: `\"settings-db\"`. */\n readonly dbName?: WorkspaceDbName;\n /** The semantic version string or range for the desired [[SettingsDb]].\n * If not specified, the latest available version is used.\n */\n readonly version?: string;\n}\n\n/** A CloudSQLite database dedicated to storing settings as key-value pairs. Unlike a general-purpose [[WorkspaceDb]],\n * a `SettingsDb` restricts its API surface to settings-only operations, providing a focused interface\n * for reading settings by name.\n *\n * Internally, all settings are stored in a single JSON blob. Each setting is a named entry in a [[SettingsContainer]].\n *\n * A `SettingsDb` resides in a [[CloudSqliteContainer]] and can be published to the cloud. Once published,\n * the `SettingsDb` becomes immutable; however, multiple versions may be created to allow settings to evolve over time.\n * @beta\n */\nexport interface SettingsDb {\n /** @internal */\n [_implementationProhibited]: unknown;\n /** The [[CloudSqliteContainer]] in which this database resides. */\n readonly container: CloudSqliteContainer;\n /** The base name of this SettingsDb, without version. */\n readonly dbName: string;\n /** The resolved [semver](https://github.com/npm/node-semver) version of this SettingsDb.\n * @note For local (non-cloud) containers, this property returns `\"0.0.0\"`.\n */\n readonly version: string;\n /** The priority assigned to dictionaries loaded from this SettingsDb. */\n readonly priority: SettingsPriority;\n /** Whether the underlying database is currently open. */\n readonly isOpen: boolean;\n /** The manifest describing the contents of this SettingsDb. */\n readonly manifest: SettingsDbManifest;\n\n /** Open the underlying database for querying. When performing significant activity against a SettingsDb,\n * open it before the operations and [[close]] it afterwards.\n * @note Explicit open/close is a performance optimization for batches of operations. Individual methods like\n * [[getSetting]] and [[getSettings]] will auto-open and auto-close the database if it is not already open.\n */\n open(): void;\n\n /** Close the underlying database. You should call this after [[open]]ing the database and completing your queries.\n * @note For [[EditableSettingsDb]] instances, if the container's write lock is currently held, closing persists\n * any pending changes and updates the manifest's `lastEditedBy` field with the current write lock holder.\n */\n close(): void;\n\n /** Return a copy of the value of the setting named `settingName`, or `undefined` if not found.\n * The returned value is always cloned using [[Setting.clone]].\n * @param settingName The name of the setting to retrieve.\n */\n getSetting<T extends Setting>(settingName: SettingName): T | undefined;\n\n /** Return a deep copy of all settings stored in this SettingsDb as a [[SettingsContainer]].\n * @note The returned object is a fresh copy — mutating it will not affect the stored settings.\n */\n getSettings(): SettingsContainer;\n}\n\n/** The default resource name used to store settings in a [[SettingsDb]].\n * This is the key under which all settings are stored in the SQLite `strings` table.\n * When loading settings at runtime via [[Workspace.loadSettingsDictionary]], the `resourceName` defaults\n * to this value, ensuring the read and write paths always agree on which key to use.\n * @internal\n */\nexport const settingsResourceName = \"settings\";\n"]}
@@ -0,0 +1,250 @@
1
+ /** @packageDocumentation
2
+ * @module Workspace
3
+ */
4
+ import { LocalFileName } from "@itwin/core-common";
5
+ import { GuidString } from "@itwin/core-bentley";
6
+ import { Setting, SettingName, SettingsContainer } from "./Settings";
7
+ import { BlobContainer } from "../BlobContainerService";
8
+ import { CloudSqliteContainer, GetWorkspaceContainerArgs, Workspace, WorkspaceContainerProps, WorkspaceDbName, WorkspaceDbNameAndVersion, WorkspaceDbVersion } from "./Workspace";
9
+ import { SettingsDb, SettingsDbManifest, SettingsDbProps } from "./SettingsDb";
10
+ import { _implementationProhibited } from "../internal/Symbols";
11
+ import { CloudSqlite } from "../CloudSqlite";
12
+ /** @beta */
13
+ export declare namespace SettingsEditor {
14
+ /**
15
+ * Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.
16
+ * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.
17
+ * @note It is illegal to have more than one SettingsEditor active in a single session.
18
+ */
19
+ function construct(): SettingsEditor;
20
+ /**
21
+ * Create a new, empty, [[SettingsDb]] file on the local filesystem for importing settings dictionaries.
22
+ * @note Do not pass an untrusted or unintended path in `localFileName`.
23
+ * This helper creates or overwrites the file at that location; callers that need fail-if-exists behavior should check first.
24
+ */
25
+ function createEmptyDb(args: {
26
+ localFileName: LocalFileName;
27
+ manifest: SettingsDbManifest;
28
+ }): void;
29
+ /** Arguments for [[SettingsEditor.queryContainers]] and [[SettingsEditor.findContainers]]. */
30
+ interface QuerySettingsContainersArgs {
31
+ /** The iTwinId whose settings containers should be queried. */
32
+ iTwinId: GuidString;
33
+ /** Optional iModelId to further scope the query to containers associated with a specific iModel. */
34
+ iModelId?: GuidString;
35
+ /** Optional label filter. */
36
+ label?: string;
37
+ }
38
+ /**
39
+ * Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.
40
+ * This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that
41
+ * automatically filters by `containerType: "settings"`.
42
+ * @param args - The query arguments including the iTwinId.
43
+ * @returns A promise that resolves to the matching container metadata entries.
44
+ * @note Requires [[IModelHost.authorizationClient]] to be configured.
45
+ */
46
+ function queryContainers(args: QuerySettingsContainersArgs): Promise<BlobContainer.MetadataResponse[]>;
47
+ }
48
+ /** Arguments supplied to [[SettingsEditor.createNewCloudContainer]] to create a new [[EditableSettingsCloudContainer]].
49
+ * The created container will automatically have `containerType: "settings"` in its metadata, enabling discovery
50
+ * via `BlobContainer.service.queryContainersMetadata({ containerType: "settings" })`.
51
+ * @beta
52
+ */
53
+ export interface CreateNewSettingsContainerArgs {
54
+ /**
55
+ * The scope of the container. This determines the ownership of the container, how RBAC rights are assigned,
56
+ * and the location of the datacenter.
57
+ */
58
+ scope: BlobContainer.Scope;
59
+ /** The manifest to be stored in the default SettingsDb in the new container. */
60
+ manifest: SettingsDbManifest;
61
+ /** Metadata stored by the BlobContainer service. The `containerType` field is omitted here because it is
62
+ * automatically set to `"settings"` when the container is created (mirroring the `"workspace"` convention for WorkspaceDb containers).
63
+ */
64
+ metadata: Omit<BlobContainer.Metadata, "containerType">;
65
+ /** The name of the default [[SettingsDb]] created inside the new container.
66
+ * Default: "settings-db";
67
+ */
68
+ dbName?: WorkspaceDbName;
69
+ }
70
+ /** Arguments supplied to [[EditableSettingsCloudContainer.createNewSettingsDbVersion]].
71
+ * @beta
72
+ */
73
+ export interface CreateNewSettingsDbVersionArgs {
74
+ /**
75
+ * The properties that determine the source [[SettingsDb]] to serve as the basis for the new version.
76
+ * This is usually the latest version, but it is possible to create patches to older versions.
77
+ */
78
+ fromProps?: SettingsDbProps;
79
+ /** The type of version increment to apply to the source version. */
80
+ versionType: CloudSqlite.SemverIncrement;
81
+ /** For prerelease versions, a string that becomes part of the version name. */
82
+ identifier?: string;
83
+ }
84
+ /** The result of creating a new version of a [[SettingsDb]].
85
+ * @beta
86
+ */
87
+ export interface SettingsDbVersionResult {
88
+ /** The name and version of the source SettingsDb. */
89
+ oldDb: WorkspaceDbNameAndVersion;
90
+ /** The name and version of the newly-created SettingsDb. */
91
+ newDb: WorkspaceDbNameAndVersion;
92
+ }
93
+ /** Arguments supplied to [[EditableSettingsCloudContainer.createDb]] to create a new [[SettingsDb]] in a container.
94
+ * @beta
95
+ */
96
+ export interface CreateSettingsDbArgs {
97
+ /** The name of the new SettingsDb. Default: `"settings-db"`. */
98
+ dbName?: WorkspaceDbName;
99
+ /** The initial version of the new SettingsDb. Default: `"0.0.0"`. */
100
+ version?: WorkspaceDbVersion;
101
+ /** The manifest for the new SettingsDb. */
102
+ manifest: SettingsDbManifest;
103
+ }
104
+ /** Arguments supplied to [[EditableSettingsDb.updateSetting]] to add or update a single [[Setting]].
105
+ * @beta
106
+ */
107
+ export interface UpdateSettingArgs {
108
+ /** The [[SettingName]] of the setting to add or update. */
109
+ readonly settingName: SettingName;
110
+ /** The new value for the setting. */
111
+ readonly value: Setting;
112
+ }
113
+ /**
114
+ * A [[CloudSqliteContainer]] opened for editing settings by a [[SettingsEditor]].
115
+ * You can create new [[SettingsDb]]s or new versions of existing [[SettingsDb]]s inside it.
116
+ * Before actually making any changes to the container's contents, you must first obtain an exclusive write lock on it via
117
+ * [[acquireWriteLock]]. Only one user can hold the write lock at any given time. When you have finished making changes,
118
+ * you can use [[releaseWriteLock]] to publish your changes, or [[abandonChanges]] to discard them.
119
+ * @note Settings containers are separate from workspace containers, providing independent write locks.
120
+ * Editing settings does not block workspace resource editing, and vice versa.
121
+ * @beta
122
+ */
123
+ export interface EditableSettingsCloudContainer extends CloudSqliteContainer {
124
+ /**
125
+ * Create a copy of an existing [[SettingsDb]] in this container with a new [[WorkspaceDbVersion]].
126
+ * The copy should be modified with new content before the write lock is released,
127
+ * and thereafter may never be modified again.
128
+ * @param args - The properties that determine the source SettingsDb and the version increment to apply.
129
+ * @returns A promise that resolves to an object containing the old and new SettingsDb names and versions.
130
+ */
131
+ createNewSettingsDbVersion(args: CreateNewSettingsDbVersionArgs): Promise<SettingsDbVersionResult>;
132
+ /**
133
+ * Create a new, empty [[SettingsDb]].
134
+ * @param args - The arguments for creating the new SettingsDb.
135
+ * @returns A promise that resolves to an EditableSettingsDb.
136
+ */
137
+ createDb(args: CreateSettingsDbArgs): Promise<EditableSettingsDb>;
138
+ /**
139
+ * Get the cloud properties of this container.
140
+ */
141
+ readonly cloudProps: WorkspaceContainerProps | undefined;
142
+ /**
143
+ * Get an editable [[SettingsDb]] to add, delete, or update settings *within a newly created version* of a SettingsDb.
144
+ * Repeated calls that resolve to the same SettingsDb return the same cached instance.
145
+ * @param props - The properties of the SettingsDb.
146
+ * @returns An EditableSettingsDb for modifying settings.
147
+ * @throws if the targeted SettingsDb has already been published and is immutable. Use [[createNewSettingsDbVersion]] first to create an editable version.
148
+ */
149
+ getEditableDb(props?: SettingsDbProps): EditableSettingsDb;
150
+ /**
151
+ * Acquire the write lock on the container. Use [[releaseWriteLock]] to release the lock after publishing your changes, or
152
+ * [[abandonChanges]] to release the lock and discard your changes.
153
+ * Only one user can hold the write lock at any given time. However, readers can continue to read the published contents of the container while
154
+ * a writer holds the write lock. Readers will only see the writer's changes after they are published by [[releaseWriteLock]].
155
+ * @param user - The name of the user acquiring the write lock.
156
+ * @throws if the write lock is already held by another user.
157
+ */
158
+ acquireWriteLock(user: string): void;
159
+ /**
160
+ * Release the write lock on the container. This should be called after all changes to the container's contents are complete. It
161
+ * publishes and uploads the changes made to any [[SettingsDb]]s while the lock was held, after which those dbs become immutable.
162
+ */
163
+ releaseWriteLock(): void;
164
+ /**
165
+ * Abandon any changes made to the container and release the write lock. Any newly created versions of SettingsDbs are discarded.
166
+ */
167
+ abandonChanges(): void;
168
+ }
169
+ /**
170
+ * An editable [[SettingsDb]]. This is used only by tools to allow administrators to create and modify SettingsDbs.
171
+ * For cloud-based SettingsDbs, the container's write token must be obtained via [[EditableSettingsCloudContainer.acquireWriteLock]] before the methods in this interface may be used.
172
+ * Normally, only admins will have write access.
173
+ * Only one admin at a time may be editing a settings container.
174
+ * @note Unlike [[EditableWorkspaceDb]], this interface only supports settings operations — no blob, file, or string resource methods.
175
+ * @beta
176
+ */
177
+ export interface EditableSettingsDb extends SettingsDb {
178
+ /** The editable container that owns this SettingsDb. */
179
+ readonly container: EditableSettingsCloudContainer;
180
+ /**
181
+ * Update the contents of the manifest in this SettingsDb.
182
+ * @note This replaces the stored manifest entirely; omitted fields are lost.
183
+ * @param manifest - The updated manifest.
184
+ */
185
+ updateManifest(manifest: SettingsDbManifest): void;
186
+ /**
187
+ * Replace all settings in this SettingsDb with the given container.
188
+ * @param settings - The settings object to store.
189
+ */
190
+ updateSettings(settings: SettingsContainer): void;
191
+ /**
192
+ * Add or update a single [[Setting]] by name.
193
+ * If a setting with the given name already exists, its value is replaced.
194
+ * If it does not exist, it is added. Other settings are preserved.
195
+ * @param args - The arguments specifying the setting name and value.
196
+ */
197
+ updateSetting(args: UpdateSettingArgs): void;
198
+ /**
199
+ * Remove a single [[Setting]] by name. Other settings are preserved.
200
+ * @param settingName - The name of the setting to remove.
201
+ */
202
+ removeSetting(settingName: SettingName): void;
203
+ }
204
+ /** An object that permits administrators to modify the contents of settings containers.
205
+ * Use [[SettingsEditor.construct]] to obtain a SettingsEditor, and [[close]] when finished using it.
206
+ * Only one SettingsEditor may be in use at any given time.
207
+ * Use [[getContainer]] to edit an existing container, or [[createNewCloudContainer]] to create a new container.
208
+ * @beta
209
+ */
210
+ export interface SettingsEditor {
211
+ /** @internal */
212
+ [_implementationProhibited]: unknown;
213
+ /**
214
+ * The workspace dedicated to this editor.
215
+ * @note This workspace is independent from [[IModelHost.appWorkspace]] and all [[IModelDb.workspace]]s.
216
+ */
217
+ readonly workspace: Workspace;
218
+ /**
219
+ * Retrieves a container for the editor with the specified properties and access token.
220
+ */
221
+ getContainer(args: GetWorkspaceContainerArgs): EditableSettingsCloudContainer;
222
+ /**
223
+ * Asynchronously retrieves a container for the editor with the specified properties.
224
+ */
225
+ getContainerAsync(props: WorkspaceContainerProps): Promise<EditableSettingsCloudContainer>;
226
+ /**
227
+ * Creates a new cloud container for holding SettingsDbs, from the [[BlobContainer]] service.
228
+ * The container is automatically assigned `containerType: "settings"` in its metadata and
229
+ * initialized with a default [[SettingsDb]].
230
+ * @param args - The arguments for creating the container, including scope, metadata, and manifest.
231
+ * @returns A promise that resolves to the new EditableSettingsCloudContainer.
232
+ * @note The current user must have administrator rights for the iTwin for the container.
233
+ * @note Requires [[IModelHost.authorizationClient]] to be configured.
234
+ */
235
+ createNewCloudContainer(args: CreateNewSettingsContainerArgs): Promise<EditableSettingsCloudContainer>;
236
+ /**
237
+ * Find and open existing settings containers by querying the [[BlobContainer]] service.
238
+ * This is a convenience method that queries for all settings containers matching the given iTwinId
239
+ * (and optionally iModelId), requests write access tokens, and opens each matching container.
240
+ * @param args - The query arguments including iTwinId and optionally iModelId and label.
241
+ * @returns A promise that resolves to an array of opened [[EditableSettingsCloudContainer]]s.
242
+ * @note Requires [[IModelHost.authorizationClient]] and [[BlobContainer.service]] to be configured.
243
+ */
244
+ findContainers(args: SettingsEditor.QuerySettingsContainersArgs): Promise<EditableSettingsCloudContainer[]>;
245
+ /**
246
+ * Closes this editor. All settings containers are dropped.
247
+ */
248
+ close(): void;
249
+ }
250
+ //# sourceMappingURL=SettingsEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsEditor.d.ts","sourceRoot":"","sources":["../../../src/workspace/SettingsEditor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,SAAS,EAAE,uBAAuB,EAAE,e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;IAEnD;;;;OAIG;IACH,cAAc,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEnD;;;OAGG;IACH,cAAc,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAElD;;;;;OAKG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAE7C;;;OAGG;IACH,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CAC/C;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,gBAAgB;IAChB,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAErC;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAE9B;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,yBAAyB,GAAG,8BAA8B,CAAC;IAE9E;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAE3F;;;;;;;;OAQG;IACH,uBAAuB,CAAC,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAEvG;;;;;;;OAOG;IACH,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,2BAA2B,GAAG,OAAO,CAAC,8BAA8B,EAAE,CAAC,CAAC;IAE5G;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Workspace
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.SettingsEditor = void 0;
11
+ const BlobContainerService_1 = require("../BlobContainerService");
12
+ const SettingsSqliteDb_1 = require("../internal/workspace/SettingsSqliteDb");
13
+ const SettingsEditorImpl_1 = require("../internal/workspace/SettingsEditorImpl");
14
+ const Symbols_1 = require("../internal/Symbols");
15
+ const IModelHost_1 = require("../IModelHost");
16
+ /** @beta */
17
+ var SettingsEditor;
18
+ (function (SettingsEditor) {
19
+ /**
20
+ * Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.
21
+ * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.
22
+ * @note It is illegal to have more than one SettingsEditor active in a single session.
23
+ */
24
+ function construct() {
25
+ return (0, SettingsEditorImpl_1.constructSettingsEditor)();
26
+ }
27
+ SettingsEditor.construct = construct;
28
+ /**
29
+ * Create a new, empty, [[SettingsDb]] file on the local filesystem for importing settings dictionaries.
30
+ * @note Do not pass an untrusted or unintended path in `localFileName`.
31
+ * This helper creates or overwrites the file at that location; callers that need fail-if-exists behavior should check first.
32
+ */
33
+ function createEmptyDb(args) {
34
+ SettingsSqliteDb_1.SettingsSqliteDb.createNewDb(args.localFileName, args);
35
+ }
36
+ SettingsEditor.createEmptyDb = createEmptyDb;
37
+ /**
38
+ * Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.
39
+ * This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that
40
+ * automatically filters by `containerType: "settings"`.
41
+ * @param args - The query arguments including the iTwinId.
42
+ * @returns A promise that resolves to the matching container metadata entries.
43
+ * @note Requires [[IModelHost.authorizationClient]] to be configured.
44
+ */
45
+ async function queryContainers(args) {
46
+ if (undefined === BlobContainerService_1.BlobContainer.service)
47
+ throw new Error("BlobContainer.service is not available. Ensure IModelHost is initialized with a valid configuration.");
48
+ const userToken = await IModelHost_1.IModelHost.getAccessToken();
49
+ return BlobContainerService_1.BlobContainer.service.queryContainersMetadata(userToken, { ...args, containerType: "settings" });
50
+ }
51
+ SettingsEditor.queryContainers = queryContainers;
52
+ })(SettingsEditor || (exports.SettingsEditor = SettingsEditor = {}));
53
+ //# sourceMappingURL=SettingsEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsEditor.js","sourceRoot":"","sources":["../../../src/workspace/SettingsEditor.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG;;GAEG;;;AAKH,kEAAwD;AAGxD,6EAA0E;AAC1E,iFAAmF;AACnF,iDAAgE;AAEhE,8CAA2C;AAE3C,YAAY;AACZ,IAAiB,cAAc,CA0C9B;AA1CD,WAAiB,cAAc;IAC7B;;;;OAIG;IACH,SAAgB,SAAS;QACvB,OAAO,IAAA,4CAAuB,GAAE,CAAC;IACnC,CAAC;IAFe,wBAAS,YAExB,CAAA;IAED;;;;OAIG;IACH,SAAgB,aAAa,CAAC,IAAoE;QAChG,mCAAgB,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAFe,4BAAa,gBAE5B,CAAA;IAYD;;;;;;;OAOG;IACI,KAAK,UAAU,eAAe,CAAC,IAAiC;QACrE,IAAI,SAAS,KAAK,oCAAa,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,sGAAsG,CAAC,CAAC;QACjK,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,UAAU,EAAE,CAAC,CAAC;IAC1G,CAAC;IAJqB,8BAAe,kBAIpC,CAAA;AACH,CAAC,EA1CgB,cAAc,8BAAd,cAAc,QA0C9B","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 { Setting, SettingName, SettingsContainer } from \"./Settings\";\nimport { BlobContainer } from \"../BlobContainerService\";\nimport { CloudSqliteContainer, GetWorkspaceContainerArgs, Workspace, WorkspaceContainerProps, WorkspaceDbName, WorkspaceDbNameAndVersion, WorkspaceDbVersion } from \"./Workspace\";\nimport { SettingsDb, SettingsDbManifest, SettingsDbProps } from \"./SettingsDb\";\nimport { SettingsSqliteDb } from \"../internal/workspace/SettingsSqliteDb\";\nimport { constructSettingsEditor } from \"../internal/workspace/SettingsEditorImpl\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\nimport { CloudSqlite } from \"../CloudSqlite\";\nimport { IModelHost } from \"../IModelHost\";\n\n/** @beta */\nexport namespace SettingsEditor {\n /**\n * Create a new [[SettingsEditor]] for creating new versions of [[SettingsDb]]s.\n * @note The caller becomes the owner of the SettingsEditor and is responsible for calling [[SettingsEditor.close]] on it when finished.\n * @note It is illegal to have more than one SettingsEditor active in a single session.\n */\n export function construct(): SettingsEditor {\n return constructSettingsEditor();\n }\n\n /**\n * Create a new, empty, [[SettingsDb]] file on the local filesystem for importing settings dictionaries.\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: SettingsDbManifest }): void {\n SettingsSqliteDb.createNewDb(args.localFileName, args);\n }\n\n /** Arguments for [[SettingsEditor.queryContainers]] and [[SettingsEditor.findContainers]]. */\n export interface QuerySettingsContainersArgs {\n /** The iTwinId whose settings 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 }\n\n /**\n * Query the [[BlobContainer]] service for all settings containers associated with a given iTwin.\n * This is a convenience wrapper around `BlobContainer.service.queryContainersMetadata` that\n * automatically filters by `containerType: \"settings\"`.\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: QuerySettingsContainersArgs): Promise<BlobContainer.MetadataResponse[]> {\n if (undefined === BlobContainer.service) 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: \"settings\" });\n }\n}\n\n/** Arguments supplied to [[SettingsEditor.createNewCloudContainer]] to create a new [[EditableSettingsCloudContainer]].\n * The created container will automatically have `containerType: \"settings\"` in its metadata, enabling discovery\n * via `BlobContainer.service.queryContainersMetadata({ containerType: \"settings\" })`.\n * @beta\n */\nexport interface CreateNewSettingsContainerArgs {\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 SettingsDb in the new container. */\n manifest: SettingsDbManifest;\n /** Metadata stored by the BlobContainer service. The `containerType` field is omitted here because it is\n * automatically set to `\"settings\"` when the container is created (mirroring the `\"workspace\"` convention for WorkspaceDb containers).\n */\n metadata: Omit<BlobContainer.Metadata, \"containerType\">;\n /** The name of the default [[SettingsDb]] created inside the new container.\n * Default: \"settings-db\";\n */\n dbName?: WorkspaceDbName;\n}\n\n/** Arguments supplied to [[EditableSettingsCloudContainer.createNewSettingsDbVersion]].\n * @beta\n */\nexport interface CreateNewSettingsDbVersionArgs {\n /**\n * The properties that determine the source [[SettingsDb]] 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?: SettingsDbProps;\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/** The result of creating a new version of a [[SettingsDb]].\n * @beta\n */\nexport interface SettingsDbVersionResult {\n /** The name and version of the source SettingsDb. */\n oldDb: WorkspaceDbNameAndVersion;\n /** The name and version of the newly-created SettingsDb. */\n newDb: WorkspaceDbNameAndVersion;\n}\n\n/** Arguments supplied to [[EditableSettingsCloudContainer.createDb]] to create a new [[SettingsDb]] in a container.\n * @beta\n */\nexport interface CreateSettingsDbArgs {\n /** The name of the new SettingsDb. Default: `\"settings-db\"`. */\n dbName?: WorkspaceDbName;\n /** The initial version of the new SettingsDb. Default: `\"0.0.0\"`. */\n version?: WorkspaceDbVersion;\n /** The manifest for the new SettingsDb. */\n manifest: SettingsDbManifest;\n}\n\n/** Arguments supplied to [[EditableSettingsDb.updateSetting]] to add or update a single [[Setting]].\n * @beta\n */\nexport interface UpdateSettingArgs {\n /** The [[SettingName]] of the setting to add or update. */\n readonly settingName: SettingName;\n /** The new value for the setting. */\n readonly value: Setting;\n}\n\n/**\n * A [[CloudSqliteContainer]] opened for editing settings by a [[SettingsEditor]].\n * You can create new [[SettingsDb]]s or new versions of existing [[SettingsDb]]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 * @note Settings containers are separate from workspace containers, providing independent write locks.\n * Editing settings does not block workspace resource editing, and vice versa.\n * @beta\n */\nexport interface EditableSettingsCloudContainer extends CloudSqliteContainer {\n /**\n * Create a copy of an existing [[SettingsDb]] 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 * @param args - The properties that determine the source SettingsDb and the version increment to apply.\n * @returns A promise that resolves to an object containing the old and new SettingsDb names and versions.\n */\n createNewSettingsDbVersion(args: CreateNewSettingsDbVersionArgs): Promise<SettingsDbVersionResult>;\n\n /**\n * Create a new, empty [[SettingsDb]].\n * @param args - The arguments for creating the new SettingsDb.\n * @returns A promise that resolves to an EditableSettingsDb.\n */\n createDb(args: CreateSettingsDbArgs): Promise<EditableSettingsDb>;\n\n /**\n * Get the cloud properties of this container.\n */\n readonly cloudProps: WorkspaceContainerProps | undefined;\n\n /**\n * Get an editable [[SettingsDb]] to add, delete, or update settings *within a newly created version* of a SettingsDb.\n * Repeated calls that resolve to the same SettingsDb return the same cached instance.\n * @param props - The properties of the SettingsDb.\n * @returns An EditableSettingsDb for modifying settings.\n * @throws if the targeted SettingsDb has already been published and is immutable. Use [[createNewSettingsDbVersion]] first to create an editable version.\n */\n getEditableDb(props?: SettingsDbProps): EditableSettingsDb;\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 user 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 * @throws if the write lock is already held by another user.\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 [[SettingsDb]]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 SettingsDbs are discarded.\n */\n abandonChanges(): void;\n}\n\n/**\n * An editable [[SettingsDb]]. This is used only by tools to allow administrators to create and modify SettingsDbs.\n * For cloud-based SettingsDbs, the container's write token must be obtained via [[EditableSettingsCloudContainer.acquireWriteLock]] before the methods in this interface may be used.\n * Normally, only admins will have write access.\n * Only one admin at a time may be editing a settings container.\n * @note Unlike [[EditableWorkspaceDb]], this interface only supports settings operations — no blob, file, or string resource methods.\n * @beta\n */\nexport interface EditableSettingsDb extends SettingsDb {\n /** The editable container that owns this SettingsDb. */\n readonly container: EditableSettingsCloudContainer;\n\n /**\n * Update the contents of the manifest in this SettingsDb.\n * @note This replaces the stored manifest entirely; omitted fields are lost.\n * @param manifest - The updated manifest.\n */\n updateManifest(manifest: SettingsDbManifest): void;\n\n /**\n * Replace all settings in this SettingsDb with the given container.\n * @param settings - The settings object to store.\n */\n updateSettings(settings: SettingsContainer): void;\n\n /**\n * Add or update a single [[Setting]] by name.\n * If a setting with the given name already exists, its value is replaced.\n * If it does not exist, it is added. Other settings are preserved.\n * @param args - The arguments specifying the setting name and value.\n */\n updateSetting(args: UpdateSettingArgs): void;\n\n /**\n * Remove a single [[Setting]] by name. Other settings are preserved.\n * @param settingName - The name of the setting to remove.\n */\n removeSetting(settingName: SettingName): void;\n}\n\n/** An object that permits administrators to modify the contents of settings containers.\n * Use [[SettingsEditor.construct]] to obtain a SettingsEditor, and [[close]] when finished using it.\n * Only one SettingsEditor may be in use at any given time.\n * Use [[getContainer]] to edit an existing container, or [[createNewCloudContainer]] to create a new container.\n * @beta\n */\nexport interface SettingsEditor {\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.\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): EditableSettingsCloudContainer;\n\n /**\n * Asynchronously retrieves a container for the editor with the specified properties.\n */\n getContainerAsync(props: WorkspaceContainerProps): Promise<EditableSettingsCloudContainer>;\n\n /**\n * Creates a new cloud container for holding SettingsDbs, from the [[BlobContainer]] service.\n * The container is automatically assigned `containerType: \"settings\"` in its metadata and\n * initialized with a default [[SettingsDb]].\n * @param args - The arguments for creating the container, including scope, metadata, and manifest.\n * @returns A promise that resolves to the new EditableSettingsCloudContainer.\n * @note The current user must have administrator rights for the iTwin for the container.\n * @note Requires [[IModelHost.authorizationClient]] to be configured.\n */\n createNewCloudContainer(args: CreateNewSettingsContainerArgs): Promise<EditableSettingsCloudContainer>;\n\n /**\n * Find and open existing settings containers by querying the [[BlobContainer]] service.\n * This is a convenience method that queries for all settings 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 [[EditableSettingsCloudContainer]]s.\n * @note Requires [[IModelHost.authorizationClient]] and [[BlobContainer.service]] to be configured.\n */\n findContainers(args: SettingsEditor.QuerySettingsContainersArgs): Promise<EditableSettingsCloudContainer[]>;\n\n /**\n * Closes this editor. All settings containers are dropped.\n */\n close(): void;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsSchemas.js","sourceRoot":"","sources":["../../../src/workspace/SettingsSchemas.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAIH,iDAAgE","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 { BeEvent, JSONSchema, JSONSchemaTypeName } from \"@itwin/core-bentley\";\r\nimport { LocalDirName, LocalFileName } from \"@itwin/core-common\";\r\nimport { _implementationProhibited } from \"../internal/Symbols\";\r\nimport { SettingName } from \"./Settings\";\r\n\r\n/** Metadata describing a single [[Setting]] as part of a [[SettingGroupSchema]].\r\n * Every setting has a [[type]], which can be one of the following:\r\n * - A primitive type like `string` or `number`;\r\n * - An object containing any number of named properties, each with their own types; or\r\n * - An array of elements, all of the same type.\r\n * This metadata is used to validate setting values against the schema, and to enable user interfaces by which\r\n * users can view and modify their settings.\r\n * @beta\r\n */\r\nexport interface SettingSchema extends Readonly<JSONSchema> {\r\n /** For arrays only, the metadata describing every element in the array. */\r\n readonly items?: SettingSchema;\r\n /** The name of the [[Setting]]'s data type. */\r\n readonly type: JSONSchemaTypeName;\r\n /** For objects and arrays only, the name of a [[SettingSchema]] that provides a base definition for this type.\r\n * The name is expected to refer to a type definition registered with [[SettingsSchema.typeDefs]].\r\n * Therefore, it must be the full name, including the [[SettingGroupSchema.schemaPrefix]].\r\n */\r\n readonly extends?: string;\r\n /** For objects only, the name and metadata of each of the object's properties. */\r\n readonly properties?: { [name: SettingName]: SettingSchema };\r\n /** For arrays only, specifies how [[SettingsDictionary.getArray]] resolves the value of the setting.\r\n * By default, like other types of settings, the setting uses the value of the setting from the highest-priority dictionary.\r\n * If `combineArray` is `true`, then the value of the setting is computed by combining the elements of every array from every dictionary,\r\n * ordered by priority and eliminating duplicate elements.\r\n * Two elements are considered duplicates of one another if [[Setting.areEqual]] returns `true`.\r\n */\r\n readonly combineArray?: boolean;\r\n}\r\n\r\n/** Metadata describing a group of related [[SettingSchema]]s. You can register setting schema groups via [[SettingsSchemas.addGroup]] and\r\n * remove them via [[SettingsSchemas.removeGroup]].\r\n *\r\n * All of the settings share the same [[schemaPrefix]], which must be unique amongst all other groups.\r\n * The prefix is combined with the name of each [[SettingSchema]] in the group to form the fully-qualified name used to refer\r\n * to the setting outside of the group, e.g., when accessing [[SettingsSchemas.settingDefs]] or in [[SettingSchema.extends]].\r\n * In the following example, the fully-qualified name of the setting named \"metric\" is \"format/units/metric\".\r\n *\r\n * ```json\r\n * {\r\n * \"schemaPrefix\": \"format/units\",\r\n * \"settingDefs\": {\r\n * \"metric\": { \"type\": \"boolean\" }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * A group can also define [[SettingSchema]]s that, rather than describing actual [[Setting]]s, instead describe types that can be extended by [[Setting]]s via\r\n * [[SettingSchema.extends]]. A [[SettingSchema]] can refer to type definitions defined in its own group or any other group.\r\n * @beta\r\n */\r\nexport interface SettingGroupSchema {\r\n /** Uniquely identifies this group amongst all other groups.\r\n * The prefix can use forward-slashes to define logical subgroups - for example, two related groups with the prefixes \"units/metric\" and \"units/imperial\".\r\n * The user interface may parse these prefixes to display both groups under a \"units\" tab or expandable tree view node.\r\n *\r\n * @note Schema prefixes beginning with \"itwin\" are reserved for use by iTwin.js.\r\n */\r\n readonly schemaPrefix: string;\r\n /** Metadata for each [[Setting]] in this group. */\r\n readonly settingDefs?: { [name: string]: SettingSchema | undefined };\r\n /** Metadata for types that can be extended by other [[Setting]]s via [[SettingSchema.extends]]. */\r\n readonly typeDefs?: { [name: string]: SettingSchema | undefined };\r\n /** An integer used when displaying a list of schemas in a user interface, to sort schemas with a lower `order` before those with a `higher` order. */\r\n readonly order?: number;\r\n /** A description of this group suitable for displaying to a user. */\r\n readonly description: string;\r\n}\r\n\r\n/**\r\n * The registry of available [[SettingGroupSchema]]s.\r\n * The registry is used for editing Settings files and for finding default values for settings.\r\n * @beta\r\n */\r\n\r\n/** The registry of metadata describing groups of [[SettingSchema]]s available to the current session.\r\n * The schemas are used to look up the default values of [[Setting]]s, validate that their values are of the type dictated by the schema, and\r\n * query metadata like [[SettingsSchema.combineArray]] that modify their behavior.\r\n * They can also be used to drive a user interface that enables end users to edit [[Settings]].\r\n *\r\n * When [[IModelHost.startup]] is invoked at the beginning of a session, schemas delivered with the application - like those describing\r\n * [[Workspace]]s - are automatically loaded.\r\n * The application can manually register additional schemas using methods like [[addGroup]], [[addFile]], [[addDirectory]], and [[addJson]].\r\n * When [[IModelHost.shutdown]] is invoked at the end of a session, all registered schemas are unregistered.\r\n *\r\n * See the [learning article]($docs/learning/backend/Workspace) for a detailed overiew and examples.\r\n *\r\n * @see [[IModelHost.settingsSchemas]] to access the registry for the current session.\r\n * @beta\r\n */\r\nexport interface SettingsSchemas {\r\n /** @internal */\r\n readonly [_implementationProhibited]: unknown;\r\n\r\n /** The map of each individual registered [[SettingSchema]] defining a [[Setting]], accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]). */\r\n readonly settingDefs: ReadonlyMap<SettingName, SettingSchema>;\r\n\r\n /** The map of each individual registered [[SettingSchema]] defining a type that can be extended by other [[SettingSchema]]s via [[SettingSchema.extends]],\r\n * accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]).\r\n */\r\n readonly typeDefs: ReadonlyMap<SettingName, SettingSchema>;\r\n\r\n /** An event raised whenever schemas are added or removed. */\r\n readonly onSchemaChanged: BeEvent<() => void>;\r\n\r\n /**\r\n * Ensure that the setting value supplied is valid according to its [[SettingSchema]].\r\n * If no schema has been registered for the setting, no validation is performed.\r\n * @param value The value of the setting to validate against the schema.\r\n * @param settingName The fully-qualified setting name.\r\n * @returns `value` if `value` matches the schema corresponding to `settingName`, or if no such schema has been registered.\r\n * @throws Error if `value` is invalid according to the schema.\r\n */\r\n validateSetting<T>(value: T, settingName: SettingName): T;\r\n\r\n /** Register one or more [[SettingGroupSchema]]s.\r\n * If a group with the same [[SettingGroupSchema.prefix]] was previously registered, it will be replaced.\r\n * Each [[SettingSchema]] in the group will be added to [[settingDefs]] or [[typeDefs]].\r\n */\r\n addGroup(settingsGroup: SettingGroupSchema | SettingGroupSchema[]): void;\r\n\r\n /** Invokes [[addGroup]] for a [[SettingGroupSchema]] supplied as stringified json5. */\r\n addJson(settingSchema: string): void;\r\n\r\n /** Invokes [[addGroup]] for a json5 file containiner a [[SettingGroupSchema]]. */\r\n addFile(fileName: LocalFileName): void;\r\n\r\n /** Invokes [[addFile]] for every json and json5 file in the specified directory. */\r\n addDirectory(dirName: LocalDirName): void;\r\n\r\n /** Unregisters all [[settingDefs]] and [[typeDefs]] with the specified [[SettingGroupSchema.schemaPrefix]]. */\r\n removeGroup(schemaPrefix: string): void;\r\n}\r\n"]}
1
+ {"version":3,"file":"SettingsSchemas.js","sourceRoot":"","sources":["../../../src/workspace/SettingsSchemas.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAIH,iDAAgE","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 { BeEvent, JSONSchema, JSONSchemaTypeName } from \"@itwin/core-bentley\";\nimport { LocalDirName, LocalFileName } from \"@itwin/core-common\";\nimport { _implementationProhibited } from \"../internal/Symbols\";\nimport { SettingName } from \"./Settings\";\n\n/** Metadata describing a single [[Setting]] as part of a [[SettingGroupSchema]].\n * Every setting has a [[type]], which can be one of the following:\n * - A primitive type like `string` or `number`;\n * - An object containing any number of named properties, each with their own types; or\n * - An array of elements, all of the same type.\n * This metadata is used to validate setting values against the schema, and to enable user interfaces by which\n * users can view and modify their settings.\n * @beta\n */\nexport interface SettingSchema extends Readonly<JSONSchema> {\n /** For arrays only, the metadata describing every element in the array. */\n readonly items?: SettingSchema;\n /** The name of the [[Setting]]'s data type. */\n readonly type: JSONSchemaTypeName;\n /** For objects and arrays only, the name of a [[SettingSchema]] that provides a base definition for this type.\n * The name is expected to refer to a type definition registered with [[SettingsSchema.typeDefs]].\n * Therefore, it must be the full name, including the [[SettingGroupSchema.schemaPrefix]].\n */\n readonly extends?: string;\n /** For objects only, the name and metadata of each of the object's properties. */\n readonly properties?: { [name: SettingName]: SettingSchema };\n /** For arrays only, specifies how [[SettingsDictionary.getArray]] resolves the value of the setting.\n * By default, like other types of settings, the setting uses the value of the setting from the highest-priority dictionary.\n * If `combineArray` is `true`, then the value of the setting is computed by combining the elements of every array from every dictionary,\n * ordered by priority and eliminating duplicate elements.\n * Two elements are considered duplicates of one another if [[Setting.areEqual]] returns `true`.\n */\n readonly combineArray?: boolean;\n}\n\n/** Metadata describing a group of related [[SettingSchema]]s. You can register setting schema groups via [[SettingsSchemas.addGroup]] and\n * remove them via [[SettingsSchemas.removeGroup]].\n *\n * All of the settings share the same [[schemaPrefix]], which must be unique amongst all other groups.\n * The prefix is combined with the name of each [[SettingSchema]] in the group to form the fully-qualified name used to refer\n * to the setting outside of the group, e.g., when accessing [[SettingsSchemas.settingDefs]] or in [[SettingSchema.extends]].\n * In the following example, the fully-qualified name of the setting named \"metric\" is \"format/units/metric\".\n *\n * ```json\n * {\n * \"schemaPrefix\": \"format/units\",\n * \"settingDefs\": {\n * \"metric\": { \"type\": \"boolean\" }\n * }\n * }\n * ```\n *\n * A group can also define [[SettingSchema]]s that, rather than describing actual [[Setting]]s, instead describe types that can be extended by [[Setting]]s via\n * [[SettingSchema.extends]]. A [[SettingSchema]] can refer to type definitions defined in its own group or any other group.\n * @beta\n */\nexport interface SettingGroupSchema {\n /** Uniquely identifies this group amongst all other groups.\n * The prefix can use forward-slashes to define logical subgroups - for example, two related groups with the prefixes \"units/metric\" and \"units/imperial\".\n * The user interface may parse these prefixes to display both groups under a \"units\" tab or expandable tree view node.\n *\n * @note Schema prefixes beginning with \"itwin\" are reserved for use by iTwin.js.\n */\n readonly schemaPrefix: string;\n /** Metadata for each [[Setting]] in this group. */\n readonly settingDefs?: { [name: string]: SettingSchema | undefined };\n /** Metadata for types that can be extended by other [[Setting]]s via [[SettingSchema.extends]]. */\n readonly typeDefs?: { [name: string]: SettingSchema | undefined };\n /** An integer used when displaying a list of schemas in a user interface, to sort schemas with a lower `order` before those with a `higher` order. */\n readonly order?: number;\n /** A description of this group suitable for displaying to a user. */\n readonly description: string;\n}\n\n/**\n * The registry of available [[SettingGroupSchema]]s.\n * The registry is used for editing Settings files and for finding default values for settings.\n * @beta\n */\n\n/** The registry of metadata describing groups of [[SettingSchema]]s available to the current session.\n * The schemas are used to look up the default values of [[Setting]]s, validate that their values are of the type dictated by the schema, and\n * query metadata like [[SettingsSchema.combineArray]] that modify their behavior.\n * They can also be used to drive a user interface that enables end users to edit [[Settings]].\n *\n * When [[IModelHost.startup]] is invoked at the beginning of a session, schemas delivered with the application - like those describing\n * [[Workspace]]s - are automatically loaded.\n * The application can manually register additional schemas using methods like [[addGroup]], [[addFile]], [[addDirectory]], and [[addJson]].\n * When [[IModelHost.shutdown]] is invoked at the end of a session, all registered schemas are unregistered.\n *\n * See the [learning article]($docs/learning/backend/Workspace) for a detailed overiew and examples.\n *\n * @see [[IModelHost.settingsSchemas]] to access the registry for the current session.\n * @beta\n */\nexport interface SettingsSchemas {\n /** @internal */\n readonly [_implementationProhibited]: unknown;\n\n /** The map of each individual registered [[SettingSchema]] defining a [[Setting]], accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]). */\n readonly settingDefs: ReadonlyMap<SettingName, SettingSchema>;\n\n /** The map of each individual registered [[SettingSchema]] defining a type that can be extended by other [[SettingSchema]]s via [[SettingSchema.extends]],\n * accessed by its fully-qualified name (including its [[SettingGroupSchema.schemaPrefix]]).\n */\n readonly typeDefs: ReadonlyMap<SettingName, SettingSchema>;\n\n /** An event raised whenever schemas are added or removed. */\n readonly onSchemaChanged: BeEvent<() => void>;\n\n /**\n * Ensure that the setting value supplied is valid according to its [[SettingSchema]].\n * If no schema has been registered for the setting, no validation is performed.\n * @param value The value of the setting to validate against the schema.\n * @param settingName The fully-qualified setting name.\n * @returns `value` if `value` matches the schema corresponding to `settingName`, or if no such schema has been registered.\n * @throws Error if `value` is invalid according to the schema.\n */\n validateSetting<T>(value: T, settingName: SettingName): T;\n\n /** Register one or more [[SettingGroupSchema]]s.\n * If a group with the same [[SettingGroupSchema.prefix]] was previously registered, it will be replaced.\n * Each [[SettingSchema]] in the group will be added to [[settingDefs]] or [[typeDefs]].\n */\n addGroup(settingsGroup: SettingGroupSchema | SettingGroupSchema[]): void;\n\n /** Invokes [[addGroup]] for a [[SettingGroupSchema]] supplied as stringified json5. */\n addJson(settingSchema: string): void;\n\n /** Invokes [[addGroup]] for a json5 file containiner a [[SettingGroupSchema]]. */\n addFile(fileName: LocalFileName): void;\n\n /** Invokes [[addFile]] for every json and json5 file in the specified directory. */\n addDirectory(dirName: LocalDirName): void;\n\n /** Unregisters all [[settingDefs]] and [[typeDefs]] with the specified [[SettingGroupSchema.schemaPrefix]]. */\n removeGroup(schemaPrefix: string): void;\n}\n"]}
@@ -2,10 +2,11 @@
2
2
  * @module Workspace
3
3
  */
4
4
  import { AccessToken, BeEvent, ITwinError, Optional } from "@itwin/core-bentley";
5
- import { LocalDirName, LocalFileName } from "@itwin/core-common";
5
+ import { DbCloudContainerInfo, LocalDirName, LocalFileName } from "@itwin/core-common";
6
6
  import { CloudSqlite } from "../CloudSqlite";
7
7
  import { SQLiteDb } from "../SQLiteDb";
8
8
  import { SettingName, Settings, SettingsDictionary, SettingsPriority } from "./Settings";
9
+ import { GetSettingsDbArgs, SettingsDb } from "./SettingsDb";
9
10
  import type { IModelJsNative } from "@bentley/imodeljs-native";
10
11
  import { _implementationProhibited } from "../internal/Symbols";
11
12
  /** The unique identifier of a [[WorkspaceContainer]]. This becomes the base name for a local file directory holding the container's [[WorkspaceDb]]s.
@@ -71,7 +72,8 @@ export interface WorkspaceDbProps extends WorkspaceDbNameAndVersion {
71
72
  /** Properties describing a [[WorkspaceDb]] and the [[WorkspaceContainer]] containing it.
72
73
  * @beta
73
74
  */
74
- export type WorkspaceDbCloudProps = WorkspaceDbProps & WorkspaceContainerProps;
75
+ export interface WorkspaceDbCloudProps extends WorkspaceDbProps, WorkspaceContainerProps, DbCloudContainerInfo {
76
+ }
75
77
  /** A function supplied as [[WorkspaceDbQueryResourcesArgs.callback]] to be invoked to process the requested resources.
76
78
  * @beta
77
79
  */
@@ -141,8 +143,12 @@ export interface WorkspaceDbLoadErrors extends ITwinError {
141
143
  * @beta
142
144
  */
143
145
  export interface WorkspaceDbSettingsProps extends WorkspaceDbCloudProps {
144
- /** The name of the resource holding the stringified JSON of the [[SettingsDictionary]]. */
145
- resourceName: string;
146
+ /** The name of the resource holding the stringified JSON of the [[SettingsDictionary]].
147
+ * Defaults to `"settings"`, which matches the key used by
148
+ * [[EditableSettingsDb.updateSettings]] to write settings. You should generally omit this
149
+ * field unless you need to load settings stored under a non-standard key.
150
+ */
151
+ resourceName?: string;
146
152
  /** The priority to assign to the [[SettingsDictionary]]. */
147
153
  priority: SettingsPriority;
148
154
  }
@@ -318,6 +324,13 @@ export interface Workspace {
318
324
  problems?: WorkspaceDbLoadError[]): Promise<void>;
319
325
  /** Get a single [[WorkspaceDb]]. */
320
326
  getWorkspaceDb(props: WorkspaceDbCloudProps): Promise<WorkspaceDb>;
327
+ /** Get a [[SettingsDb]] from a previously-loaded settings container in this workspace.
328
+ * @param args The arguments identifying which SettingsDb to retrieve.
329
+ * @returns The SettingsDb from the matching container.
330
+ * @throws if no container matching [[GetSettingsDbArgs.containerId]] has been loaded into this workspace, or if the container does not hold a SettingsDb.
331
+ * @note The container must already be loaded via [[getContainer]] or [[getContainerAsync]] before calling this method.
332
+ */
333
+ getSettingsDb(args: GetSettingsDbArgs): SettingsDb;
321
334
  /**
322
335
  * Resolve the value of all [[Setting]]s from this workspace with the supplied `settingName` into an array of [[WorkspaceDbCloudProps]]
323
336
  * that can be used to query or load workspace resources. The settings must each be an array of type [[WorkspaceDbSettingsProps]].
@@ -347,38 +360,48 @@ export interface Workspace {
347
360
  }): Promise<WorkspaceDb[]>;
348
361
  }
349
362
  /**
350
- * A WorkspaceContainer is a type of [[CloudSqlite.CloudContainer]] that holds one or more [[WorkspaceDb]]s. Normally a WorkspaceContainer will hold (many versions of) a single WorkspaceDb.
351
- * Each version of a WorkspaceDb is treated as immutable after it is created and is stored in the WorkspaceContainer indefinitely. That means that
352
- * older versions of the WorkspaceDb may continue to be used, for example by archived projects. For programmers familiar with [NPM](https://www.npmjs.com/), this is conceptually
353
- * similar and versioning follows the same rules as NPM using [Semantic Versioning](https://semver.org/).
354
- * @note It is possible to store more than one WorkspaceDb in the same WorkspaceContainer, but access rights are administered per WorkspaceContainer.
355
- * That is, if a user has rights to access a WorkspaceContainer, that right applies to all WorkspaceDbs in the WorkspaceContainer.
356
- * @note Not every WorkspaceContainer is associated with a [[CloudSqlite.CloudContainer]] - WorkspaceContainers may also be loaded from the local file system.
363
+ * Base interface for containers backed by [[CloudSqlite]] that hold versioned databases (e.g. [[WorkspaceDb]]s or [[SettingsDb]]s).
364
+ * Provides the shared infrastructure for cloud access, local file caching, and semver-based database resolution.
365
+ * @note Not every container is associated with a [[CloudSqlite.CloudContainer]] containers may also be loaded from the local file system.
357
366
  * In this case, [[cloudContainer]] will be `undefined`.
358
- * @see [[Workspace.getContainer]] and [[Workspace.getContainerAsync]] to load a container.
367
+ * @see [[WorkspaceContainer]] for workspace-specific containers.
359
368
  * @beta
360
369
  */
361
- export interface WorkspaceContainer {
370
+ export interface CloudSqliteContainer {
362
371
  /** @internal */
363
372
  [_implementationProhibited]: unknown;
364
- /** the local directory where this WorkspaceContainer will store temporary files extracted for file-resources.
373
+ /** the local directory where this container will store temporary files extracted for file-resources.
365
374
  * @internal
366
375
  */
367
376
  readonly filesDir: LocalDirName;
368
377
  /** The workspace into which this container was loaded. */
369
378
  readonly workspace: Workspace;
370
- /** Cloud container for this WorkspaceContainer, or `undefined` if this is a local WorkspaceContainer. */
379
+ /** Cloud container for this container, or `undefined` if this is a local container. */
371
380
  readonly cloudContainer?: CloudSqlite.CloudContainer;
372
381
  /** Properties supplied when this container was loaded */
373
382
  readonly fromProps: WorkspaceContainerProps;
374
- /** @internal */
375
- addWorkspaceDb(toAdd: WorkspaceDb): void;
376
383
  /**
377
- * Find the fully-qualified name of a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`.
384
+ * Find the fully-qualified name of a database satisfying the name and version criteria specified by `props`.
378
385
  * @throws Error if no version satisfying the criteria exists.
379
386
  */
380
387
  resolveDbFileName(props: WorkspaceDbProps): WorkspaceDbFullName;
381
- /** Obtain a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`. */
388
+ }
389
+ /**
390
+ * A [[CloudSqliteContainer]] that holds one or more [[WorkspaceDb]]s. Normally a WorkspaceContainer will hold (many versions of) a single WorkspaceDb.
391
+ * Each version of a WorkspaceDb is treated as immutable after it is created and is stored in the WorkspaceContainer indefinitely. That means that
392
+ * older versions of the WorkspaceDb may continue to be used, for example by archived projects. For programmers familiar with [NPM](https://www.npmjs.com/), this is conceptually
393
+ * similar and versioning follows the same rules as NPM using [Semantic Versioning](https://semver.org/).
394
+ * @note It is possible to store more than one WorkspaceDb in the same WorkspaceContainer, but access rights are administered per WorkspaceContainer.
395
+ * That is, if a user has rights to access a WorkspaceContainer, that right applies to all WorkspaceDbs in the WorkspaceContainer.
396
+ * @see [[Workspace.getContainer]] and [[Workspace.getContainerAsync]] to load a container.
397
+ * @beta
398
+ */
399
+ export interface WorkspaceContainer extends CloudSqliteContainer {
400
+ /** @internal */
401
+ addWorkspaceDb(toAdd: WorkspaceDb): void;
402
+ /** Obtain a [[WorkspaceDb]] satisfying the name and version criteria specified by `props`.
403
+ * Repeated calls that resolve to the same WorkspaceDb return the same cached instance until it is closed.
404
+ */
382
405
  getWorkspaceDb(props?: WorkspaceDbProps): WorkspaceDb;
383
406
  /** Close and remove a currently opened [[WorkspaceDb]] from this Workspace.
384
407
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"Workspace.d.ts","sourceRoot":"","sources":["../../../src/workspace/Workspace.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAU,QAAQ,EAAoB,MAAM,qBAAqB,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,QAAQ,CAAC,WAAW,CAAC,oBAAoB,EAAE,aAAa,CAAC;IACxG;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;IACjC,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,sFAAsF;IACtF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC;;GAEG;AACH,M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