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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (751) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +38 -0
  3. package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BackendLoggerCategory.js.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js.map +1 -1
  7. package/lib/cjs/BlobContainerService.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.js +3 -3
  9. package/lib/cjs/BriefcaseManager.js.map +1 -1
  10. package/lib/cjs/CatalogDb.js.map +1 -1
  11. package/lib/cjs/Category.d.ts +37 -7
  12. package/lib/cjs/Category.d.ts.map +1 -1
  13. package/lib/cjs/Category.js +33 -42
  14. package/lib/cjs/Category.js.map +1 -1
  15. package/lib/cjs/ChangeSummaryManager.js +2 -2
  16. package/lib/cjs/ChangeSummaryManager.js.map +1 -1
  17. package/lib/cjs/ChangedElementsDb.js.map +1 -1
  18. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  19. package/lib/cjs/ChangesetECAdaptor.js +253 -250
  20. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  21. package/lib/cjs/ChannelControl.d.ts +29 -0
  22. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  23. package/lib/cjs/ChannelControl.js.map +1 -1
  24. package/lib/cjs/CheckpointManager.js +1 -1
  25. package/lib/cjs/CheckpointManager.js.map +1 -1
  26. package/lib/cjs/ClassRegistry.js +5 -5
  27. package/lib/cjs/ClassRegistry.js.map +1 -1
  28. package/lib/cjs/CloudSqlite.d.ts +1 -1
  29. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  30. package/lib/cjs/CloudSqlite.js +68 -13
  31. package/lib/cjs/CloudSqlite.js.map +1 -1
  32. package/lib/cjs/CodeService.js.map +1 -1
  33. package/lib/cjs/CodeSpecs.d.ts +32 -3
  34. package/lib/cjs/CodeSpecs.d.ts.map +1 -1
  35. package/lib/cjs/CodeSpecs.js +48 -20
  36. package/lib/cjs/CodeSpecs.js.map +1 -1
  37. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  38. package/lib/cjs/CustomViewState3dCreator.js.map +1 -1
  39. package/lib/cjs/DevTools.js.map +1 -1
  40. package/lib/cjs/DisplayStyle.d.ts +18 -3
  41. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  42. package/lib/cjs/DisplayStyle.js +10 -21
  43. package/lib/cjs/DisplayStyle.js.map +1 -1
  44. package/lib/cjs/ECDb.js.map +1 -1
  45. package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
  46. package/lib/cjs/ECSqlRowExecutor.js.map +1 -1
  47. package/lib/cjs/ECSqlStatement.js.map +1 -1
  48. package/lib/cjs/ECSqlSyncReader.js.map +1 -1
  49. package/lib/cjs/EditTxn.d.ts +262 -0
  50. package/lib/cjs/EditTxn.d.ts.map +1 -0
  51. package/lib/cjs/EditTxn.js +548 -0
  52. package/lib/cjs/EditTxn.js.map +1 -0
  53. package/lib/cjs/Element.d.ts +74 -5
  54. package/lib/cjs/Element.d.ts.map +1 -1
  55. package/lib/cjs/Element.js +63 -75
  56. package/lib/cjs/Element.js.map +1 -1
  57. package/lib/cjs/ElementAspect.d.ts +10 -0
  58. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  59. package/lib/cjs/ElementAspect.js +21 -12
  60. package/lib/cjs/ElementAspect.js.map +1 -1
  61. package/lib/cjs/ElementGraphics.js.map +1 -1
  62. package/lib/cjs/ElementTreeWalker.d.ts +56 -3
  63. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  64. package/lib/cjs/ElementTreeWalker.js +53 -40
  65. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  66. package/lib/cjs/Entity.js.map +1 -1
  67. package/lib/cjs/EntityReferences.js.map +1 -1
  68. package/lib/cjs/ExportGraphics.js.map +1 -1
  69. package/lib/cjs/ExternalSource.d.ts +11 -2
  70. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  71. package/lib/cjs/ExternalSource.js +10 -8
  72. package/lib/cjs/ExternalSource.js.map +1 -1
  73. package/lib/cjs/FontFile.js.map +1 -1
  74. package/lib/cjs/GeoCoordConfig.js.map +1 -1
  75. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  76. package/lib/cjs/GeometrySummary.js +47 -47
  77. package/lib/cjs/GeometrySummary.js.map +1 -1
  78. package/lib/cjs/IModelDb.d.ts +66 -22
  79. package/lib/cjs/IModelDb.d.ts.map +1 -1
  80. package/lib/cjs/IModelDb.js +183 -297
  81. package/lib/cjs/IModelDb.js.map +1 -1
  82. package/lib/cjs/IModelDbFonts.js.map +1 -1
  83. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  84. package/lib/cjs/IModelHost.d.ts +58 -1
  85. package/lib/cjs/IModelHost.d.ts.map +1 -1
  86. package/lib/cjs/IModelHost.js +89 -0
  87. package/lib/cjs/IModelHost.js.map +1 -1
  88. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
  89. package/lib/cjs/IModelJsFs.js.map +1 -1
  90. package/lib/cjs/ImageSourceConversion.js.map +1 -1
  91. package/lib/cjs/IpcHost.d.ts.map +1 -1
  92. package/lib/cjs/IpcHost.js +15 -6
  93. package/lib/cjs/IpcHost.js.map +1 -1
  94. package/lib/cjs/LineStyle.d.ts +47 -7
  95. package/lib/cjs/LineStyle.d.ts.map +1 -1
  96. package/lib/cjs/LineStyle.js +38 -33
  97. package/lib/cjs/LineStyle.js.map +1 -1
  98. package/lib/cjs/LocalHub.js +1 -1
  99. package/lib/cjs/LocalHub.js.map +1 -1
  100. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  101. package/lib/cjs/LockControl.d.ts +85 -1
  102. package/lib/cjs/LockControl.d.ts.map +1 -1
  103. package/lib/cjs/LockControl.js.map +1 -1
  104. package/lib/cjs/Material.d.ts +8 -1
  105. package/lib/cjs/Material.d.ts.map +1 -1
  106. package/lib/cjs/Material.js +6 -12
  107. package/lib/cjs/Material.js.map +1 -1
  108. package/lib/cjs/Model.d.ts +59 -20
  109. package/lib/cjs/Model.d.ts.map +1 -1
  110. package/lib/cjs/Model.js +38 -80
  111. package/lib/cjs/Model.js.map +1 -1
  112. package/lib/cjs/NativeAppStorage.js.map +1 -1
  113. package/lib/cjs/NativeHost.js.map +1 -1
  114. package/lib/cjs/NavigationRelationship.js.map +1 -1
  115. package/lib/cjs/PromiseMemoizer.js.map +1 -1
  116. package/lib/cjs/PropertyStore.js.map +1 -1
  117. package/lib/cjs/Relationship.d.ts +72 -7
  118. package/lib/cjs/Relationship.d.ts.map +1 -1
  119. package/lib/cjs/Relationship.js +39 -21
  120. package/lib/cjs/Relationship.js.map +1 -1
  121. package/lib/cjs/RpcBackend.js.map +1 -1
  122. package/lib/cjs/SQLiteDb.js.map +1 -1
  123. package/lib/cjs/Schema.js.map +1 -1
  124. package/lib/cjs/SchemaSync.js +4 -4
  125. package/lib/cjs/SchemaSync.js.map +1 -1
  126. package/lib/cjs/SchemaUtils.js.map +1 -1
  127. package/lib/cjs/SheetIndex.d.ts +9 -0
  128. package/lib/cjs/SheetIndex.d.ts.map +1 -1
  129. package/lib/cjs/SheetIndex.js +38 -35
  130. package/lib/cjs/SheetIndex.js.map +1 -1
  131. package/lib/cjs/SqliteChangesetReader.js.map +1 -1
  132. package/lib/cjs/SqliteStatement.js.map +1 -1
  133. package/lib/cjs/StashManager.js +1 -1
  134. package/lib/cjs/StashManager.js.map +1 -1
  135. package/lib/cjs/Texture.d.ts +6 -0
  136. package/lib/cjs/Texture.d.ts.map +1 -1
  137. package/lib/cjs/Texture.js +6 -14
  138. package/lib/cjs/Texture.js.map +1 -1
  139. package/lib/cjs/TileStorage.js.map +1 -1
  140. package/lib/cjs/TxnManager.d.ts +105 -9
  141. package/lib/cjs/TxnManager.d.ts.map +1 -1
  142. package/lib/cjs/TxnManager.js +194 -15
  143. package/lib/cjs/TxnManager.js.map +1 -1
  144. package/lib/cjs/ViewDefinition.d.ts +21 -1
  145. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  146. package/lib/cjs/ViewDefinition.js +27 -66
  147. package/lib/cjs/ViewDefinition.js.map +1 -1
  148. package/lib/cjs/ViewStateHydrator.js.map +1 -1
  149. package/lib/cjs/ViewStore.js.map +1 -1
  150. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  151. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  152. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +33 -27
  153. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  154. package/lib/cjs/annotations/FrameGeometry.js.map +1 -1
  155. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
  156. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
  157. package/lib/cjs/annotations/TextAnnotationElement.js +6 -5
  158. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  159. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
  160. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
  161. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
  162. package/lib/cjs/assets/IModelChange.02.00.00.ecschema.xml +90 -90
  163. package/lib/cjs/assets/Settings/Schemas/Base.Schema.json +32 -32
  164. package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +27 -27
  165. package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +94 -94
  166. package/lib/cjs/assets/Settings/backend.setting.json5 +21 -21
  167. package/lib/cjs/core-backend.d.ts +1 -0
  168. package/lib/cjs/core-backend.d.ts.map +1 -1
  169. package/lib/cjs/core-backend.js +1 -0
  170. package/lib/cjs/core-backend.js.map +1 -1
  171. package/lib/cjs/domains/FunctionalElements.d.ts +6 -2
  172. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  173. package/lib/cjs/domains/FunctionalElements.js +8 -13
  174. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  175. package/lib/cjs/domains/FunctionalSchema.js.map +1 -1
  176. package/lib/cjs/domains/GenericElements.d.ts +11 -4
  177. package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
  178. package/lib/cjs/domains/GenericElements.js +13 -24
  179. package/lib/cjs/domains/GenericElements.js.map +1 -1
  180. package/lib/cjs/domains/GenericSchema.js.map +1 -1
  181. package/lib/cjs/internal/ChangesetConflictArgs.js.map +1 -1
  182. package/lib/cjs/internal/ChannelAdmin.d.ts +15 -0
  183. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  184. package/lib/cjs/internal/ChannelAdmin.js +5 -3
  185. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  186. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  187. package/lib/cjs/internal/FontFileImpl.js.map +1 -1
  188. package/lib/cjs/internal/HubMock.d.ts +2 -0
  189. package/lib/cjs/internal/HubMock.d.ts.map +1 -1
  190. package/lib/cjs/internal/HubMock.js +7 -0
  191. package/lib/cjs/internal/HubMock.js.map +1 -1
  192. package/lib/cjs/internal/IModelDbFontsImpl.js.map +1 -1
  193. package/lib/cjs/internal/IntegrityCheck.js.map +1 -1
  194. package/lib/cjs/internal/NativePlatform.js.map +1 -1
  195. package/lib/cjs/internal/NoLocks.d.ts.map +1 -1
  196. package/lib/cjs/internal/NoLocks.js +6 -0
  197. package/lib/cjs/internal/NoLocks.js.map +1 -1
  198. package/lib/cjs/internal/OnlineStatus.js.map +1 -1
  199. package/lib/cjs/internal/ServerBasedLocks.d.ts +12 -0
  200. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  201. package/lib/cjs/internal/ServerBasedLocks.js +285 -4
  202. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  203. package/lib/cjs/internal/Symbols.d.ts +4 -0
  204. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  205. package/lib/cjs/internal/Symbols.js +5 -1
  206. package/lib/cjs/internal/Symbols.js.map +1 -1
  207. package/lib/cjs/internal/annotations/fields.d.ts +3 -2
  208. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  209. package/lib/cjs/internal/annotations/fields.js +7 -6
  210. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  211. package/lib/cjs/internal/cross-package.js.map +1 -1
  212. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  213. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  214. package/lib/cjs/internal/workspace/SettingsEditorImpl.js +49 -242
  215. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -1
  216. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
  217. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  218. package/lib/cjs/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  219. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +0 -1
  220. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  221. package/lib/cjs/internal/workspace/WorkspaceImpl.js +70 -41
  222. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  223. package/lib/cjs/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  224. package/lib/cjs/rpc/multipart.js.map +1 -1
  225. package/lib/cjs/rpc/tracing.js.map +1 -1
  226. package/lib/cjs/rpc/web/logging.js.map +1 -1
  227. package/lib/cjs/rpc/web/request.js.map +1 -1
  228. package/lib/cjs/rpc/web/response.js.map +1 -1
  229. package/lib/cjs/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  230. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  231. package/lib/cjs/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  232. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  233. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  234. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  235. package/lib/cjs/workspace/Settings.d.ts +11 -5
  236. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  237. package/lib/cjs/workspace/Settings.js.map +1 -1
  238. package/lib/cjs/workspace/SettingsDb.d.ts +20 -99
  239. package/lib/cjs/workspace/SettingsDb.d.ts.map +1 -1
  240. package/lib/cjs/workspace/SettingsDb.js +23 -7
  241. package/lib/cjs/workspace/SettingsDb.js.map +1 -1
  242. package/lib/cjs/workspace/SettingsEditor.d.ts +40 -226
  243. package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -1
  244. package/lib/cjs/workspace/SettingsEditor.js +86 -25
  245. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  246. package/lib/cjs/workspace/SettingsSchemas.js.map +1 -1
  247. package/lib/cjs/workspace/Workspace.d.ts +7 -11
  248. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  249. package/lib/cjs/workspace/Workspace.js.map +1 -1
  250. package/lib/cjs/workspace/WorkspaceEditor.d.ts +14 -0
  251. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  252. package/lib/cjs/workspace/WorkspaceEditor.js +1 -1
  253. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  254. package/lib/esm/BackendHubAccess.d.ts +38 -0
  255. package/lib/esm/BackendHubAccess.d.ts.map +1 -1
  256. package/lib/esm/BackendHubAccess.js.map +1 -1
  257. package/lib/esm/BackendLoggerCategory.js.map +1 -1
  258. package/lib/esm/BisCoreSchema.js.map +1 -1
  259. package/lib/esm/BlobContainerService.js.map +1 -1
  260. package/lib/esm/BriefcaseManager.js +3 -3
  261. package/lib/esm/BriefcaseManager.js.map +1 -1
  262. package/lib/esm/CatalogDb.js.map +1 -1
  263. package/lib/esm/Category.d.ts +37 -7
  264. package/lib/esm/Category.d.ts.map +1 -1
  265. package/lib/esm/Category.js +33 -42
  266. package/lib/esm/Category.js.map +1 -1
  267. package/lib/esm/ChangeSummaryManager.js +2 -2
  268. package/lib/esm/ChangeSummaryManager.js.map +1 -1
  269. package/lib/esm/ChangedElementsDb.js.map +1 -1
  270. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  271. package/lib/esm/ChangesetECAdaptor.js +253 -250
  272. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  273. package/lib/esm/ChannelControl.d.ts +29 -0
  274. package/lib/esm/ChannelControl.d.ts.map +1 -1
  275. package/lib/esm/ChannelControl.js.map +1 -1
  276. package/lib/esm/CheckpointManager.js +1 -1
  277. package/lib/esm/CheckpointManager.js.map +1 -1
  278. package/lib/esm/ClassRegistry.js +5 -5
  279. package/lib/esm/ClassRegistry.js.map +1 -1
  280. package/lib/esm/CloudSqlite.d.ts +1 -1
  281. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  282. package/lib/esm/CloudSqlite.js +69 -14
  283. package/lib/esm/CloudSqlite.js.map +1 -1
  284. package/lib/esm/CodeService.js.map +1 -1
  285. package/lib/esm/CodeSpecs.d.ts +32 -3
  286. package/lib/esm/CodeSpecs.d.ts.map +1 -1
  287. package/lib/esm/CodeSpecs.js +49 -21
  288. package/lib/esm/CodeSpecs.js.map +1 -1
  289. package/lib/esm/ConcurrentQuery.js.map +1 -1
  290. package/lib/esm/CustomViewState3dCreator.js.map +1 -1
  291. package/lib/esm/DevTools.js.map +1 -1
  292. package/lib/esm/DisplayStyle.d.ts +18 -3
  293. package/lib/esm/DisplayStyle.d.ts.map +1 -1
  294. package/lib/esm/DisplayStyle.js +10 -21
  295. package/lib/esm/DisplayStyle.js.map +1 -1
  296. package/lib/esm/ECDb.js.map +1 -1
  297. package/lib/esm/ECSchemaXmlContext.js.map +1 -1
  298. package/lib/esm/ECSqlRowExecutor.js.map +1 -1
  299. package/lib/esm/ECSqlStatement.js.map +1 -1
  300. package/lib/esm/ECSqlSyncReader.js.map +1 -1
  301. package/lib/esm/EditTxn.d.ts +262 -0
  302. package/lib/esm/EditTxn.d.ts.map +1 -0
  303. package/lib/esm/EditTxn.js +543 -0
  304. package/lib/esm/EditTxn.js.map +1 -0
  305. package/lib/esm/Element.d.ts +74 -5
  306. package/lib/esm/Element.d.ts.map +1 -1
  307. package/lib/esm/Element.js +64 -76
  308. package/lib/esm/Element.js.map +1 -1
  309. package/lib/esm/ElementAspect.d.ts +10 -0
  310. package/lib/esm/ElementAspect.d.ts.map +1 -1
  311. package/lib/esm/ElementAspect.js +22 -13
  312. package/lib/esm/ElementAspect.js.map +1 -1
  313. package/lib/esm/ElementGraphics.js.map +1 -1
  314. package/lib/esm/ElementTreeWalker.d.ts +56 -3
  315. package/lib/esm/ElementTreeWalker.d.ts.map +1 -1
  316. package/lib/esm/ElementTreeWalker.js +53 -40
  317. package/lib/esm/ElementTreeWalker.js.map +1 -1
  318. package/lib/esm/Entity.js.map +1 -1
  319. package/lib/esm/EntityReferences.js.map +1 -1
  320. package/lib/esm/ExportGraphics.js.map +1 -1
  321. package/lib/esm/ExternalSource.d.ts +11 -2
  322. package/lib/esm/ExternalSource.d.ts.map +1 -1
  323. package/lib/esm/ExternalSource.js +10 -8
  324. package/lib/esm/ExternalSource.js.map +1 -1
  325. package/lib/esm/FontFile.js.map +1 -1
  326. package/lib/esm/GeoCoordConfig.js.map +1 -1
  327. package/lib/esm/GeographicCRSServices.js.map +1 -1
  328. package/lib/esm/GeometrySummary.js +47 -47
  329. package/lib/esm/GeometrySummary.js.map +1 -1
  330. package/lib/esm/IModelDb.d.ts +66 -22
  331. package/lib/esm/IModelDb.d.ts.map +1 -1
  332. package/lib/esm/IModelDb.js +185 -299
  333. package/lib/esm/IModelDb.js.map +1 -1
  334. package/lib/esm/IModelDbFonts.js.map +1 -1
  335. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  336. package/lib/esm/IModelHost.d.ts +58 -1
  337. package/lib/esm/IModelHost.d.ts.map +1 -1
  338. package/lib/esm/IModelHost.js +91 -2
  339. package/lib/esm/IModelHost.js.map +1 -1
  340. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
  341. package/lib/esm/IModelJsFs.js.map +1 -1
  342. package/lib/esm/ImageSourceConversion.js.map +1 -1
  343. package/lib/esm/IpcHost.d.ts.map +1 -1
  344. package/lib/esm/IpcHost.js +16 -7
  345. package/lib/esm/IpcHost.js.map +1 -1
  346. package/lib/esm/LineStyle.d.ts +47 -7
  347. package/lib/esm/LineStyle.d.ts.map +1 -1
  348. package/lib/esm/LineStyle.js +38 -33
  349. package/lib/esm/LineStyle.js.map +1 -1
  350. package/lib/esm/LocalHub.js +1 -1
  351. package/lib/esm/LocalHub.js.map +1 -1
  352. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  353. package/lib/esm/LockControl.d.ts +85 -1
  354. package/lib/esm/LockControl.d.ts.map +1 -1
  355. package/lib/esm/LockControl.js.map +1 -1
  356. package/lib/esm/Material.d.ts +8 -1
  357. package/lib/esm/Material.d.ts.map +1 -1
  358. package/lib/esm/Material.js +6 -12
  359. package/lib/esm/Material.js.map +1 -1
  360. package/lib/esm/Model.d.ts +59 -20
  361. package/lib/esm/Model.d.ts.map +1 -1
  362. package/lib/esm/Model.js +39 -81
  363. package/lib/esm/Model.js.map +1 -1
  364. package/lib/esm/NativeAppStorage.js.map +1 -1
  365. package/lib/esm/NativeHost.js.map +1 -1
  366. package/lib/esm/NavigationRelationship.js.map +1 -1
  367. package/lib/esm/PromiseMemoizer.js.map +1 -1
  368. package/lib/esm/PropertyStore.js.map +1 -1
  369. package/lib/esm/Relationship.d.ts +72 -7
  370. package/lib/esm/Relationship.d.ts.map +1 -1
  371. package/lib/esm/Relationship.js +40 -22
  372. package/lib/esm/Relationship.js.map +1 -1
  373. package/lib/esm/RpcBackend.js.map +1 -1
  374. package/lib/esm/SQLiteDb.js.map +1 -1
  375. package/lib/esm/Schema.js.map +1 -1
  376. package/lib/esm/SchemaSync.js +5 -5
  377. package/lib/esm/SchemaSync.js.map +1 -1
  378. package/lib/esm/SchemaUtils.js.map +1 -1
  379. package/lib/esm/SheetIndex.d.ts +9 -0
  380. package/lib/esm/SheetIndex.d.ts.map +1 -1
  381. package/lib/esm/SheetIndex.js +38 -35
  382. package/lib/esm/SheetIndex.js.map +1 -1
  383. package/lib/esm/SqliteChangesetReader.js.map +1 -1
  384. package/lib/esm/SqliteStatement.js.map +1 -1
  385. package/lib/esm/StashManager.js +1 -1
  386. package/lib/esm/StashManager.js.map +1 -1
  387. package/lib/esm/Texture.d.ts +6 -0
  388. package/lib/esm/Texture.d.ts.map +1 -1
  389. package/lib/esm/Texture.js +6 -14
  390. package/lib/esm/Texture.js.map +1 -1
  391. package/lib/esm/TileStorage.js.map +1 -1
  392. package/lib/esm/TxnManager.d.ts +105 -9
  393. package/lib/esm/TxnManager.d.ts.map +1 -1
  394. package/lib/esm/TxnManager.js +194 -15
  395. package/lib/esm/TxnManager.js.map +1 -1
  396. package/lib/esm/ViewDefinition.d.ts +21 -1
  397. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  398. package/lib/esm/ViewDefinition.js +27 -66
  399. package/lib/esm/ViewDefinition.js.map +1 -1
  400. package/lib/esm/ViewStateHydrator.js.map +1 -1
  401. package/lib/esm/ViewStore.js.map +1 -1
  402. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  403. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  404. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +33 -27
  405. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  406. package/lib/esm/annotations/FrameGeometry.js.map +1 -1
  407. package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
  408. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
  409. package/lib/esm/annotations/TextAnnotationElement.js +6 -5
  410. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  411. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
  412. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
  413. package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
  414. package/lib/esm/core-backend.d.ts +1 -0
  415. package/lib/esm/core-backend.d.ts.map +1 -1
  416. package/lib/esm/core-backend.js +1 -0
  417. package/lib/esm/core-backend.js.map +1 -1
  418. package/lib/esm/domains/FunctionalElements.d.ts +6 -2
  419. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -1
  420. package/lib/esm/domains/FunctionalElements.js +8 -13
  421. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  422. package/lib/esm/domains/FunctionalSchema.js.map +1 -1
  423. package/lib/esm/domains/GenericElements.d.ts +11 -4
  424. package/lib/esm/domains/GenericElements.d.ts.map +1 -1
  425. package/lib/esm/domains/GenericElements.js +13 -24
  426. package/lib/esm/domains/GenericElements.js.map +1 -1
  427. package/lib/esm/domains/GenericSchema.js.map +1 -1
  428. package/lib/esm/internal/ChangesetConflictArgs.js.map +1 -1
  429. package/lib/esm/internal/ChannelAdmin.d.ts +15 -0
  430. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  431. package/lib/esm/internal/ChannelAdmin.js +6 -4
  432. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  433. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  434. package/lib/esm/internal/FontFileImpl.js.map +1 -1
  435. package/lib/esm/internal/HubMock.d.ts +2 -0
  436. package/lib/esm/internal/HubMock.d.ts.map +1 -1
  437. package/lib/esm/internal/HubMock.js +7 -0
  438. package/lib/esm/internal/HubMock.js.map +1 -1
  439. package/lib/esm/internal/IModelDbFontsImpl.js.map +1 -1
  440. package/lib/esm/internal/IntegrityCheck.js.map +1 -1
  441. package/lib/esm/internal/NativePlatform.js.map +1 -1
  442. package/lib/esm/internal/NoLocks.d.ts.map +1 -1
  443. package/lib/esm/internal/NoLocks.js +6 -0
  444. package/lib/esm/internal/NoLocks.js.map +1 -1
  445. package/lib/esm/internal/OnlineStatus.js.map +1 -1
  446. package/lib/esm/internal/ServerBasedLocks.d.ts +12 -0
  447. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -1
  448. package/lib/esm/internal/ServerBasedLocks.js +286 -5
  449. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  450. package/lib/esm/internal/Symbols.d.ts +4 -0
  451. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  452. package/lib/esm/internal/Symbols.js +4 -0
  453. package/lib/esm/internal/Symbols.js.map +1 -1
  454. package/lib/esm/internal/annotations/fields.d.ts +3 -2
  455. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  456. package/lib/esm/internal/annotations/fields.js +7 -6
  457. package/lib/esm/internal/annotations/fields.js.map +1 -1
  458. package/lib/esm/internal/cross-package.js.map +1 -1
  459. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  460. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  461. package/lib/esm/internal/workspace/SettingsEditorImpl.js +52 -246
  462. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -1
  463. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -1
  464. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  465. package/lib/esm/internal/workspace/SettingsSchemasImpl.js.map +1 -1
  466. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +0 -1
  467. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  468. package/lib/esm/internal/workspace/WorkspaceImpl.js +71 -41
  469. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  470. package/lib/esm/internal/workspace/WorkspaceSqliteDb.js.map +1 -1
  471. package/lib/esm/rpc/multipart.js.map +1 -1
  472. package/lib/esm/rpc/tracing.js.map +1 -1
  473. package/lib/esm/rpc/web/logging.js.map +1 -1
  474. package/lib/esm/rpc/web/request.js.map +1 -1
  475. package/lib/esm/rpc/web/response.js.map +1 -1
  476. package/lib/esm/rpc-impl/DevToolsRpcImpl.js.map +1 -1
  477. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  478. package/lib/esm/rpc-impl/IModelTileRpcImpl.js.map +1 -1
  479. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  480. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  481. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  482. package/lib/esm/test/AdvancedEqual.js.map +1 -1
  483. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  484. package/lib/esm/test/AttachDb.test.js +11 -11
  485. package/lib/esm/test/AttachDb.test.js.map +1 -1
  486. package/lib/esm/test/ElementDrivesElement.test.d.ts +20 -19
  487. package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -1
  488. package/lib/esm/test/ElementDrivesElement.test.js +134 -119
  489. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  490. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  491. package/lib/esm/test/GeometryTestUtil.js.map +1 -1
  492. package/lib/esm/test/IModelHost.test.js +56 -2
  493. package/lib/esm/test/IModelHost.test.js.map +1 -1
  494. package/lib/esm/test/IModelTestUtils.d.ts +23 -23
  495. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  496. package/lib/esm/test/IModelTestUtils.js +466 -449
  497. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  498. package/lib/esm/test/ImageSourceConversion.test.js.map +1 -1
  499. package/lib/esm/test/IpcHost.test.js.map +1 -1
  500. package/lib/esm/test/KnownTestLocations.js.map +1 -1
  501. package/lib/esm/test/PrintElementTree.js.map +1 -1
  502. package/lib/esm/test/PropertyDb.test.js +2 -2
  503. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  504. package/lib/esm/test/RevisionUtility.js.map +1 -1
  505. package/lib/esm/test/SchemaUtils.test.js +25 -25
  506. package/lib/esm/test/SchemaUtils.test.js.map +1 -1
  507. package/lib/esm/test/SequentialLogMatcher.js.map +1 -1
  508. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +156 -147
  509. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  510. package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -1
  511. package/lib/esm/test/TestChangeSetUtility.js +11 -7
  512. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  513. package/lib/esm/test/TestEditTxn.d.ts +8 -0
  514. package/lib/esm/test/TestEditTxn.d.ts.map +1 -0
  515. package/lib/esm/test/TestEditTxn.js +34 -0
  516. package/lib/esm/test/TestEditTxn.js.map +1 -0
  517. package/lib/esm/test/TestUtils.d.ts +1 -0
  518. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  519. package/lib/esm/test/TestUtils.js +8 -1
  520. package/lib/esm/test/TestUtils.js.map +1 -1
  521. package/lib/esm/test/annotations/Fields.test.js +135 -143
  522. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  523. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  524. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
  525. package/lib/esm/test/annotations/TextAnnotation.test.js +156 -99
  526. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  527. package/lib/esm/test/annotations/TextBlock.test.js +5 -3
  528. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  529. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  530. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  531. package/lib/esm/test/categories/Category.test.js +63 -3
  532. package/lib/esm/test/categories/Category.test.js.map +1 -1
  533. package/lib/esm/test/codespec/CodeSpec.test.js +88 -5
  534. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  535. package/lib/esm/test/ecdb/CTE.test.js +88 -88
  536. package/lib/esm/test/ecdb/CTE.test.js.map +1 -1
  537. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +19 -19
  538. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
  539. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +15 -15
  540. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  541. package/lib/esm/test/ecdb/ECDb.test.js +72 -72
  542. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  543. package/lib/esm/test/ecdb/ECDbTestHelper.js.map +1 -1
  544. package/lib/esm/test/ecdb/ECSchemaXmlContext.test.js.map +1 -1
  545. package/lib/esm/test/ecdb/ECSqlAst.test.js +68 -67
  546. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  547. package/lib/esm/test/ecdb/ECSqlQuery.test.js +6 -6
  548. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  549. package/lib/esm/test/ecdb/ECSqlStatement.test.js +332 -333
  550. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  551. package/lib/esm/test/ecdb/ECSqlSyncReader.test.js.map +1 -1
  552. package/lib/esm/test/ecdb/QueryReaders.test.js +47 -44
  553. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
  554. package/lib/esm/test/ecdb/SqliteStatement.test.js +2 -2
  555. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  556. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -1
  557. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +30 -28
  558. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  559. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js +21 -21
  560. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  561. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  562. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  563. package/lib/esm/test/element/DeleteDefinitionElements.test.js +159 -143
  564. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  565. package/lib/esm/test/element/ElementAspect.test.js +90 -82
  566. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  567. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -1
  568. package/lib/esm/test/element/ElementDependencyGraph.test.js +51 -43
  569. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  570. package/lib/esm/test/element/ElementRoundTrip.test.js +176 -177
  571. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  572. package/lib/esm/test/element/ExcludedElements.test.js +2 -2
  573. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  574. package/lib/esm/test/element/ExternalSource.test.js +40 -38
  575. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  576. package/lib/esm/test/element/NullStructArray.test.js +23 -22
  577. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  578. package/lib/esm/test/element/ProjectInformationRecord.test.js +5 -2
  579. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  580. package/lib/esm/test/element/SheetInformationAspect.test.js +43 -11
  581. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  582. package/lib/esm/test/element/UrlLink.test.js +2 -2
  583. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  584. package/lib/esm/test/font/FontFile.test.js.map +1 -1
  585. package/lib/esm/test/font/IModelDbFonts.test.js +87 -73
  586. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  587. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +194 -155
  588. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  589. package/lib/esm/test/hubaccess/BriefcaseManager.test.js +2 -4
  590. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  591. package/lib/esm/test/hubaccess/CheckpointManager.test.js.map +1 -1
  592. package/lib/esm/test/hubaccess/Rebase.test.js +369 -303
  593. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  594. package/lib/esm/test/hubaccess/SemanticRebase.test.js +467 -392
  595. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  596. package/lib/esm/test/imageData.js.map +1 -1
  597. package/lib/esm/test/imodel/Code.test.js +31 -31
  598. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  599. package/lib/esm/test/imodel/ElementTreeWalker.test.js +57 -48
  600. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  601. package/lib/esm/test/imodel/GetTextureImage.test.js.map +1 -1
  602. package/lib/esm/test/imodel/IModel.test.js +463 -388
  603. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  604. package/lib/esm/test/imodel/ProjectExtents.test.js +2 -2
  605. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  606. package/lib/esm/test/imodel/SchemaXmlImport.test.js +13 -13
  607. package/lib/esm/test/imodel/SchemaXmlImport.test.js.map +1 -1
  608. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  609. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  610. package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -1
  611. package/lib/esm/test/incrementalSchemaLocater/TestContext.js +2 -2
  612. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  613. package/lib/esm/test/index.d.ts +1 -0
  614. package/lib/esm/test/index.d.ts.map +1 -1
  615. package/lib/esm/test/index.js +1 -0
  616. package/lib/esm/test/index.js.map +1 -1
  617. package/lib/esm/test/misc/DevTools.test.js.map +1 -1
  618. package/lib/esm/test/misc/EntitySubClasses.test.js.map +1 -1
  619. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  620. package/lib/esm/test/misc/PromiseMemoizer.test.js.map +1 -1
  621. package/lib/esm/test/native/DgnDbWorker.test.js.map +1 -1
  622. package/lib/esm/test/rpc/response.test.js.map +1 -1
  623. package/lib/esm/test/schema/ClassRegistry.test.js +122 -121
  624. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  625. package/lib/esm/test/schema/FunctionalDomain.test.js +36 -34
  626. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  627. package/lib/esm/test/schema/GenericDomain.test.js +114 -94
  628. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  629. package/lib/esm/test/schema/IModelSchemaContext.test.js +11 -10
  630. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  631. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +226 -211
  632. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  633. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +1 -3
  634. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -1
  635. package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -247
  636. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  637. package/lib/esm/test/standalone/ChangeMerge.test.js +101 -82
  638. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  639. package/lib/esm/test/standalone/ChangesetReader.test.js +242 -213
  640. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  641. package/lib/esm/test/standalone/CustomViewState3dCreator.test.js.map +1 -1
  642. package/lib/esm/test/standalone/DisplayStyle.test.js +43 -40
  643. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  644. package/lib/esm/test/standalone/Drawing.test.js +4 -3
  645. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  646. package/lib/esm/test/standalone/EditTxn.test.d.ts +2 -0
  647. package/lib/esm/test/standalone/EditTxn.test.d.ts.map +1 -0
  648. package/lib/esm/test/standalone/EditTxn.test.js +219 -0
  649. package/lib/esm/test/standalone/EditTxn.test.js.map +1 -0
  650. package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
  651. package/lib/esm/test/standalone/ElementMesh.test.js +16 -13
  652. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  653. package/lib/esm/test/standalone/ExportGraphics.test.js +40 -34
  654. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  655. package/lib/esm/test/standalone/GeometryChangeEvents.test.js +11 -15
  656. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  657. package/lib/esm/test/standalone/GeometryStream.test.js +212 -165
  658. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  659. package/lib/esm/test/standalone/HubMock.test.js +31 -25
  660. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  661. package/lib/esm/test/standalone/IModelLimits.test.js +11 -8
  662. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  663. package/lib/esm/test/standalone/IModelWrite.test.d.ts +2 -2
  664. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -1
  665. package/lib/esm/test/standalone/IModelWrite.test.js +211 -169
  666. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  667. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts +2 -0
  668. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts.map +1 -0
  669. package/lib/esm/test/standalone/ITwinWorkspace.test.js +236 -0
  670. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -0
  671. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +25 -22
  672. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  673. package/lib/esm/test/standalone/IntegrityCheck.test.js +20 -18
  674. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  675. package/lib/esm/test/standalone/MergeConflict.test.d.ts +2 -2
  676. package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -1
  677. package/lib/esm/test/standalone/MergeConflict.test.js +49 -33
  678. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  679. package/lib/esm/test/standalone/NativeAppStorage.test.js.map +1 -1
  680. package/lib/esm/test/standalone/RenderMaterialElement.test.js +5 -5
  681. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  682. package/lib/esm/test/standalone/RenderTimeline.test.js +3 -2
  683. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  684. package/lib/esm/test/standalone/SQLiteDb.test.js.map +1 -1
  685. package/lib/esm/test/standalone/SchemaUtils.test.js.map +1 -1
  686. package/lib/esm/test/standalone/SectionDrawing.test.js +7 -7
  687. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  688. package/lib/esm/test/standalone/ServerBasedLocks.test.js +928 -22
  689. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  690. package/lib/esm/test/standalone/Setting.test.js.map +1 -1
  691. package/lib/esm/test/standalone/Settings.test.js +26 -4
  692. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  693. package/lib/esm/test/standalone/SettingsSchemas.test.js +2 -1
  694. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  695. package/lib/esm/test/standalone/SnapshotDb.test.js +3 -1
  696. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  697. package/lib/esm/test/standalone/StandaloneDb.test.js +27 -26
  698. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  699. package/lib/esm/test/standalone/Texture.test.js +5 -4
  700. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  701. package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -1
  702. package/lib/esm/test/standalone/TileCache.test.js +5 -3
  703. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  704. package/lib/esm/test/standalone/TileTree.test.js +35 -31
  705. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  706. package/lib/esm/test/standalone/TxnManager.test.js +700 -653
  707. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  708. package/lib/esm/test/standalone/ViewDefinition.test.js +295 -229
  709. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  710. package/lib/esm/test/standalone/ViewStoreDb.test.js.map +1 -1
  711. package/lib/esm/test/standalone/Workspace.test.js +72 -22
  712. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  713. package/lib/esm/test/standalone/iModelDb.test.js.map +1 -1
  714. package/lib/esm/test/workspace/SettingsDb.test.js +28 -456
  715. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -1
  716. package/lib/esm/workspace/Settings.d.ts +11 -5
  717. package/lib/esm/workspace/Settings.d.ts.map +1 -1
  718. package/lib/esm/workspace/Settings.js.map +1 -1
  719. package/lib/esm/workspace/SettingsDb.d.ts +20 -99
  720. package/lib/esm/workspace/SettingsDb.d.ts.map +1 -1
  721. package/lib/esm/workspace/SettingsDb.js +20 -6
  722. package/lib/esm/workspace/SettingsDb.js.map +1 -1
  723. package/lib/esm/workspace/SettingsEditor.d.ts +40 -226
  724. package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -1
  725. package/lib/esm/workspace/SettingsEditor.js +85 -24
  726. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  727. package/lib/esm/workspace/SettingsSchemas.js.map +1 -1
  728. package/lib/esm/workspace/Workspace.d.ts +7 -11
  729. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  730. package/lib/esm/workspace/Workspace.js.map +1 -1
  731. package/lib/esm/workspace/WorkspaceEditor.d.ts +14 -0
  732. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -1
  733. package/lib/esm/workspace/WorkspaceEditor.js +1 -1
  734. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  735. package/package.json +13 -13
  736. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts +0 -38
  737. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  738. package/lib/cjs/internal/workspace/SettingsDbImpl.js +0 -108
  739. package/lib/cjs/internal/workspace/SettingsDbImpl.js.map +0 -1
  740. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  741. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  742. package/lib/cjs/internal/workspace/SettingsSqliteDb.js +0 -40
  743. package/lib/cjs/internal/workspace/SettingsSqliteDb.js.map +0 -1
  744. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts +0 -38
  745. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  746. package/lib/esm/internal/workspace/SettingsDbImpl.js +0 -104
  747. package/lib/esm/internal/workspace/SettingsDbImpl.js.map +0 -1
  748. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  749. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  750. package/lib/esm/internal/workspace/SettingsSqliteDb.js +0 -36
  751. package/lib/esm/internal/workspace/SettingsSqliteDb.js.map +0 -1
@@ -49,6 +49,9 @@ export interface LockControl {
49
49
  * If any required lock is not available, this method throws an exception and *none* of the requested locks are acquired.
50
50
  * @note Acquiring the exclusive lock on an element requires also obtaining a shared lock on all its owner elements. This method will
51
51
  * attempt to acquire all necessary locks for both sets of input ids.
52
+ * @note Calling this method after reversing or reinstating a Txn indicates the start of a brand new Txn with the current Txn ID,
53
+ * making it invalid to call [[abandonLocksForReversedTxn]] or [[acquireLocksForReinstatingTxn]] for previously-reversed
54
+ * Txns with the current ID or greater.
52
55
  */
53
56
  acquireLocks(arg: {
54
57
  /** if present, one or more elements to obtain shared lock */
@@ -56,18 +59,99 @@ export interface LockControl {
56
59
  /** if present, one or more elements to obtain exclusive lock */
57
60
  exclusive?: Id64Arg;
58
61
  }): Promise<void>;
59
- /** Release all locks currently held by this briefcase from the locker server.
62
+ /** Release all locks currently held by this briefcase from the lock server after editing the associated elements.
60
63
  * This is typically done on your behalf by [[BriefcaseDb.pushChanges]].
64
+ * If you are abandoning changes instead of pushing them, you should call [[abandonAllLocks]] instead.
61
65
  * You may want to do it manually when abandoning all of your briefcase's local changes.
62
66
  * You cannot release your locks if your briefcase contains local changes.
63
67
  * @throws Error if the briefcase has local changes, or if any other error occurs while releasing the locks.
64
68
  */
65
69
  releaseAllLocks(): Promise<void>;
70
+ /**
71
+ * Abandons all locks currently held by this briefcase when none of the associated elements have
72
+ * been or will be modified. This is only valid to do when none of the elements protected by
73
+ * the currently-held locks have been edited, or if all edits have been reversed or abandoned without
74
+ * pushing them.
75
+ * @beta
76
+ *
77
+ * The locks are released on the IModelHub, but the changeset associated with the locks is not updated,
78
+ * reflecting the fact that the associated elements were not edited.
79
+ */
80
+ abandonAllLocks(): Promise<void>;
66
81
  /**
67
82
  * Release all locks currently held by this Briefcase from the lock server.
68
83
  * Not possible to release locks unless push or abandon all changes. Should only be called internally.
69
84
  * @internal
70
85
  */
71
86
  [_releaseAllLocks]: () => Promise<void>;
87
+ /**
88
+ * Abandons the locks that were acquired during a given Txn and all later Txns, all of which must already
89
+ * have been reversed.
90
+ * @beta
91
+ *
92
+ * @param txnId The ID of the first Txn whose locks should be abandoned. This must either be a Txn that has
93
+ * already been reversed, or the [[TxnManager.getCurrentTxnId]]. In either case, the current Txn must not
94
+ * have any unsaved changes.
95
+ * @returns A promise that resolves to true if any locks were successfully abandoned. False if there were no locks to abandon,
96
+ * which may be the case if the Txns did not acquire any locks or if they were already abandoned. The Promise rejects
97
+ * with an ITwinError if the Txn has not been reversed, the current Txn has unsaved changes, or if any other error occurs
98
+ * while releasing the locks.
99
+ * @note This method also implicitly calls [[abandonLocksForCurrentUnsavedTxn]]. Locks acquired in the current,
100
+ * unsaved Txn will be abandoned when calling this method. However, they can not be re-acquired using
101
+ * [[acquireLocksForReinstatingTxn]]. This is because there is no way to recover these unsaved changes after abandoning
102
+ * them, so it is rarely useful to re-acquire the locks associated with irrecoverable changes.
103
+ */
104
+ abandonLocksForReversedTxn(txnId: Id64String): Promise<boolean>;
105
+ /**
106
+ * Abandons the locks that were acquired during the current, unsaved Txn. Any changes in the unsaved Txn must be abandoned
107
+ * before calling this method.
108
+ * @beta
109
+ *
110
+ * @returns A promise that resolves to true if any locks were successfully abandoned. False if there were no locks to abandon,
111
+ * which may be the case if the current Txn did not acquire any locks or if they were already abandoned. The Promise rejects
112
+ * with an ITwinError if the current Txn has unsaved changes, or if any other error occurs while releasing the locks.
113
+ */
114
+ abandonLocksForCurrentUnsavedTxn(): Promise<boolean>;
115
+ /**
116
+ * Re-acquire the locks that were previously acquired during a given Txn and all previous Txns. These locks are
117
+ * expected to have previously been released with {@link LockControl.abandonLocksForReversedTxn}. This is used
118
+ * just before reinstating a previously-reversed Txn to ensure that the necessary locks are held for the
119
+ * reinstated changes.
120
+ * @beta
121
+ *
122
+ * It is possible that the locks may no longer be available, in which case the returned Promise will reject
123
+ * with an exception.
124
+ *
125
+ * @param txnId The ID of the last Txn whose locks should be re-acquired.
126
+ * @returns A promise that resolves to true if any locks were successfully acquired. False if there were no locks to acquire,
127
+ * which may be the case if the Txn in question did not acquire any locks or if they were already re-acquired. The Promise
128
+ * rejects with an ITwinError if the Txn does not exist, the current Txn has unsaved changes, the locks cannot be acquired,
129
+ * or if any other error occurs while acquiring the locks.
130
+ */
131
+ acquireLocksForReinstatingTxn(txnId: Id64String): Promise<boolean>;
132
+ /**
133
+ * Checks whether the locks originally acquired for a specified reversed Txn, and all earlier Txns, were either not abandoned
134
+ * or have already been re-acquired.
135
+ * @beta
136
+ *
137
+ * If this method returns true, it is safe to reinstate the given Txn with [[TxnManager.reinstateTxn]]. If it returns false,
138
+ * the necessary locks must be acquired first, either by calling [[TxnManager.reinstateTxnAsync]] or by explicitly calling
139
+ * [[acquireLocksForReinstatingTxn]] first.
140
+ *
141
+ * @param txnId The ID of the Txn to check.
142
+ * @returns True if the necessary locks are currently held, false otherwise.
143
+ */
144
+ holdsNecessaryLocksForReinstatingTxn(txnId: Id64String): boolean;
145
+ /**
146
+ * Clears the records of locks acquired for a given Txn and all later Txns from the local lock database. Call this after
147
+ * a Txn becomes unreachable. This allows an ID to potentially be reused for a different Txn in the future.
148
+ * @beta
149
+ *
150
+ * After invoking this method, {@link LockControl.abandonLocksForReversedTxn} and {@link LockControl.acquireLocksForReinstatingTxn} will no
151
+ * longer be able to operate on this Txn or any later Txns.
152
+ *
153
+ * @param txnId The ID of the first Txn whose lock records should be cleared.
154
+ */
155
+ clearTxnLockRecords(txnId: Id64String): void;
72
156
  }
73
157
  //# sourceMappingURL=LockControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LockControl.d.ts","sourceRoot":"","sources":["../../src/LockControl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE7G;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,eAAe;IACf,QAAQ,CAAC,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAE9C;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,KAAK,IAAI,CAAC;IAE/C;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1E;;;OAGG;IACH,eAAe,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvE;;OAEG;IACH,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC;IAE5C;;OAEG;IACH,eAAe,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC;IAEzC;;;;;OAKG;IACH,YAAY,CAAC,GAAG,EAAE;QAChB,6DAA6D;QAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,gEAAgE;QAChE,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElB;;;;;OAKG;IACH,eAAe,I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,CAAC,IAAI,CAAC,CAAC;IAElB;;;;;;OAMG;IACH,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC;;;;;;;;;OASG;IACH,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC;;;;OAIG;IACH,CAAC,gBAAgB,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC;;;;;;;;;;;;;;;;OAgBG;IACH,0BAA0B,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEhE;;;;;;;;OAQG;IACH,gCAAgC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAErD;;;;;;;;;;;;;;;OAeG;IACH,6BAA6B,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnE;;;;;;;;;;;OAWG;IACH,oCAAoC,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC;IAEjE;;;;;;;;;OASG;IACH,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"LockControl.js","sourceRoot":"","sources":["../../src/LockControl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAGH,gDAA6G","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 iModels\r\n */\r\n\r\nimport { Id64Arg, Id64String } from \"@itwin/core-bentley\";\r\nimport { _close, _elementWasCreated, _implementationProhibited, _releaseAllLocks } from \"./internal/Symbols\";\r\n\r\n/**\r\n * Interface for acquiring element locks to [coordinate simultaneous edits]($docs/learning/backend/ConcurrencyControl.md) from multiple briefcases.\r\n * @see [[IModelDb.locks]] to access the locks for an iModel.\r\n * @public\r\n */\r\nexport interface LockControl {\r\n /** @internal*/\r\n readonly [_implementationProhibited]: unknown;\r\n\r\n /**\r\n * true if this LockControl uses a server-based concurrency approach.\r\n */\r\n readonly isServerBased: boolean;\r\n\r\n /**\r\n * Close the local lock control database\r\n * @internal\r\n */\r\n [_close]: () => void;\r\n\r\n /**\r\n * Notification that a new element was just created. Called by [[Element.onInserted]]\r\n * @internal\r\n */\r\n [_elementWasCreated]: (id: Id64String) => void;\r\n\r\n /**\r\n * Throw if locks are required and the exclusive lock is not held on the supplied element.\r\n * Note: there is no need to check the shared locks on parents/models since an element cannot hold the exclusive lock without first obtaining them.\r\n * Called by functions like [[Element.onUpdate]], [[Element.onDelete]], etc.\r\n */\r\n checkExclusiveLock(id: Id64String, type: string, operation: string): void;\r\n\r\n /**\r\n * Throw if locks are required and a shared lock is not held on the supplied element.\r\n * Called by [[Element.onInsert]] to ensure shared lock is held on the new element's model and parent element.\r\n */\r\n checkSharedLock(id: Id64String, type: string, operation: string): void;\r\n\r\n /**\r\n * Determine whether the owning iModel currently holds the exclusive lock on the specified element.\r\n */\r\n holdsExclusiveLock(id: Id64String): boolean;\r\n\r\n /**\r\n * Determine whether the owning iModel currently holds a shared lock on the specified element.\r\n */\r\n holdsSharedLock(id: Id64String): boolean;\r\n\r\n /**\r\n * Acquire locks on one or more elements from the lock server, if required and not already held.\r\n * If any required lock is not available, this method throws an exception and *none* of the requested locks are acquired.\r\n * @note Acquiring the exclusive lock on an element requires also obtaining a shared lock on all its owner elements. This method will\r\n * attempt to acquire all necessary locks for both sets of input ids.\r\n */\r\n acquireLocks(arg: {\r\n /** if present, one or more elements to obtain shared lock */\r\n shared?: Id64Arg;\r\n /** if present, one or more elements to obtain exclusive lock */\r\n exclusive?: Id64Arg;\r\n }): Promise<void>;\r\n\r\n /** Release all locks currently held by this briefcase from the locker server.\r\n * This is typically done on your behalf by [[BriefcaseDb.pushChanges]].\r\n * You may want to do it manually when abandoning all of your briefcase's local changes.\r\n * You cannot release your locks if your briefcase contains local changes.\r\n * @throws Error if the briefcase has local changes, or if any other error occurs while releasing the locks.\r\n */\r\n releaseAllLocks(): Promise<void>;\r\n\r\n /**\r\n * Release all locks currently held by this Briefcase from the lock server.\r\n * Not possible to release locks unless push or abandon all changes. Should only be called internally.\r\n * @internal\r\n */\r\n [_releaseAllLocks]: () => Promise<void>;\r\n}\r\n"]}
1
+ {"version":3,"file":"LockControl.js","sourceRoot":"","sources":["../../src/LockControl.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAGH,gDAA6G","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 iModels\n */\n\nimport { Id64Arg, Id64String } from \"@itwin/core-bentley\";\nimport { _close, _elementWasCreated, _implementationProhibited, _releaseAllLocks } from \"./internal/Symbols\";\n\n/**\n * Interface for acquiring element locks to [coordinate simultaneous edits]($docs/learning/backend/ConcurrencyControl.md) from multiple briefcases.\n * @see [[IModelDb.locks]] to access the locks for an iModel.\n * @public\n */\nexport interface LockControl {\n /** @internal*/\n readonly [_implementationProhibited]: unknown;\n\n /**\n * true if this LockControl uses a server-based concurrency approach.\n */\n readonly isServerBased: boolean;\n\n /**\n * Close the local lock control database\n * @internal\n */\n [_close]: () => void;\n\n /**\n * Notification that a new element was just created. Called by [[Element.onInserted]]\n * @internal\n */\n [_elementWasCreated]: (id: Id64String) => void;\n\n /**\n * Throw if locks are required and the exclusive lock is not held on the supplied element.\n * Note: there is no need to check the shared locks on parents/models since an element cannot hold the exclusive lock without first obtaining them.\n * Called by functions like [[Element.onUpdate]], [[Element.onDelete]], etc.\n */\n checkExclusiveLock(id: Id64String, type: string, operation: string): void;\n\n /**\n * Throw if locks are required and a shared lock is not held on the supplied element.\n * Called by [[Element.onInsert]] to ensure shared lock is held on the new element's model and parent element.\n */\n checkSharedLock(id: Id64String, type: string, operation: string): void;\n\n /**\n * Determine whether the owning iModel currently holds the exclusive lock on the specified element.\n */\n holdsExclusiveLock(id: Id64String): boolean;\n\n /**\n * Determine whether the owning iModel currently holds a shared lock on the specified element.\n */\n holdsSharedLock(id: Id64String): boolean;\n\n /**\n * Acquire locks on one or more elements from the lock server, if required and not already held.\n * If any required lock is not available, this method throws an exception and *none* of the requested locks are acquired.\n * @note Acquiring the exclusive lock on an element requires also obtaining a shared lock on all its owner elements. This method will\n * attempt to acquire all necessary locks for both sets of input ids.\n * @note Calling this method after reversing or reinstating a Txn indicates the start of a brand new Txn with the current Txn ID,\n * making it invalid to call [[abandonLocksForReversedTxn]] or [[acquireLocksForReinstatingTxn]] for previously-reversed\n * Txns with the current ID or greater.\n */\n acquireLocks(arg: {\n /** if present, one or more elements to obtain shared lock */\n shared?: Id64Arg;\n /** if present, one or more elements to obtain exclusive lock */\n exclusive?: Id64Arg;\n }): Promise<void>;\n\n /** Release all locks currently held by this briefcase from the lock server after editing the associated elements.\n * This is typically done on your behalf by [[BriefcaseDb.pushChanges]].\n * If you are abandoning changes instead of pushing them, you should call [[abandonAllLocks]] instead.\n * You may want to do it manually when abandoning all of your briefcase's local changes.\n * You cannot release your locks if your briefcase contains local changes.\n * @throws Error if the briefcase has local changes, or if any other error occurs while releasing the locks.\n */\n releaseAllLocks(): Promise<void>;\n\n /**\n * Abandons all locks currently held by this briefcase when none of the associated elements have\n * been or will be modified. This is only valid to do when none of the elements protected by\n * the currently-held locks have been edited, or if all edits have been reversed or abandoned without\n * pushing them.\n * @beta\n *\n * The locks are released on the IModelHub, but the changeset associated with the locks is not updated,\n * reflecting the fact that the associated elements were not edited.\n */\n abandonAllLocks(): Promise<void>;\n\n /**\n * Release all locks currently held by this Briefcase from the lock server.\n * Not possible to release locks unless push or abandon all changes. Should only be called internally.\n * @internal\n */\n [_releaseAllLocks]: () => Promise<void>;\n\n /**\n * Abandons the locks that were acquired during a given Txn and all later Txns, all of which must already\n * have been reversed.\n * @beta\n *\n * @param txnId The ID of the first Txn whose locks should be abandoned. This must either be a Txn that has\n * already been reversed, or the [[TxnManager.getCurrentTxnId]]. In either case, the current Txn must not\n * have any unsaved changes.\n * @returns A promise that resolves to true if any locks were successfully abandoned. False if there were no locks to abandon,\n * which may be the case if the Txns did not acquire any locks or if they were already abandoned. The Promise rejects\n * with an ITwinError if the Txn has not been reversed, the current Txn has unsaved changes, or if any other error occurs\n * while releasing the locks.\n * @note This method also implicitly calls [[abandonLocksForCurrentUnsavedTxn]]. Locks acquired in the current,\n * unsaved Txn will be abandoned when calling this method. However, they can not be re-acquired using\n * [[acquireLocksForReinstatingTxn]]. This is because there is no way to recover these unsaved changes after abandoning\n * them, so it is rarely useful to re-acquire the locks associated with irrecoverable changes.\n */\n abandonLocksForReversedTxn(txnId: Id64String): Promise<boolean>;\n\n /**\n * Abandons the locks that were acquired during the current, unsaved Txn. Any changes in the unsaved Txn must be abandoned\n * before calling this method.\n * @beta\n *\n * @returns A promise that resolves to true if any locks were successfully abandoned. False if there were no locks to abandon,\n * which may be the case if the current Txn did not acquire any locks or if they were already abandoned. The Promise rejects\n * with an ITwinError if the current Txn has unsaved changes, or if any other error occurs while releasing the locks.\n */\n abandonLocksForCurrentUnsavedTxn(): Promise<boolean>;\n\n /**\n * Re-acquire the locks that were previously acquired during a given Txn and all previous Txns. These locks are\n * expected to have previously been released with {@link LockControl.abandonLocksForReversedTxn}. This is used\n * just before reinstating a previously-reversed Txn to ensure that the necessary locks are held for the\n * reinstated changes.\n * @beta\n *\n * It is possible that the locks may no longer be available, in which case the returned Promise will reject\n * with an exception.\n *\n * @param txnId The ID of the last Txn whose locks should be re-acquired.\n * @returns A promise that resolves to true if any locks were successfully acquired. False if there were no locks to acquire,\n * which may be the case if the Txn in question did not acquire any locks or if they were already re-acquired. The Promise\n * rejects with an ITwinError if the Txn does not exist, the current Txn has unsaved changes, the locks cannot be acquired,\n * or if any other error occurs while acquiring the locks.\n */\n acquireLocksForReinstatingTxn(txnId: Id64String): Promise<boolean>;\n\n /**\n * Checks whether the locks originally acquired for a specified reversed Txn, and all earlier Txns, were either not abandoned\n * or have already been re-acquired.\n * @beta\n *\n * If this method returns true, it is safe to reinstate the given Txn with [[TxnManager.reinstateTxn]]. If it returns false,\n * the necessary locks must be acquired first, either by calling [[TxnManager.reinstateTxnAsync]] or by explicitly calling\n * [[acquireLocksForReinstatingTxn]] first.\n *\n * @param txnId The ID of the Txn to check.\n * @returns True if the necessary locks are currently held, false otherwise.\n */\n holdsNecessaryLocksForReinstatingTxn(txnId: Id64String): boolean;\n\n /**\n * Clears the records of locks acquired for a given Txn and all later Txns from the local lock database. Call this after\n * a Txn becomes unreachable. This allows an ID to potentially be reused for a different Txn in the future.\n * @beta\n *\n * After invoking this method, {@link LockControl.abandonLocksForReversedTxn} and {@link LockControl.acquireLocksForReinstatingTxn} will no\n * longer be able to operate on this Txn or any later Txns.\n *\n * @param txnId The ID of the first Txn whose lock records should be cleared.\n */\n clearTxnLockRecords(txnId: Id64String): void;\n}\n"]}
@@ -4,6 +4,7 @@
4
4
  import { Id64String } from "@itwin/core-bentley";
5
5
  import { Code, CodeScopeProps, ElementProps, NormalMapProps, RenderMaterialProps, RgbFactorProps, TextureMapProps } from "@itwin/core-common";
6
6
  import { DefinitionElement } from "./Element";
7
+ import { EditTxn } from "./EditTxn";
7
8
  import { IModelDb } from "./IModelDb";
8
9
  import { IModelElementCloneContext } from "./IModelElementCloneContext";
9
10
  import { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from "./Entity";
@@ -76,12 +77,18 @@ export declare class RenderMaterialElement extends DefinitionElement {
76
77
  static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement;
77
78
  /**
78
79
  * Insert a new RenderMaterial into a model.
79
- * @param iModelDb Insert into this iModel
80
+ * @param txn The EditTxn to use
80
81
  * @param definitionModelId Insert the new Texture into this DefinitionModel
81
82
  * @param materialName The name/CodeValue of the RenderMaterial
82
83
  * @param params Parameters object which describes how to construct the RenderMaterial
83
84
  * @returns The Id of the newly inserted RenderMaterial element.
84
85
  * @throws [[IModelError]] if unable to insert the element.
86
+ * @beta
87
+ */
88
+ static insert(txn: EditTxn, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;
89
+ /**
90
+ * Insert a new RenderMaterial into a model.
91
+ * @deprecated Use RenderMaterialElement.insert(txn, ...) instead.
85
92
  */
86
93
  static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;
87
94
  /** @beta */
@@ -1 +1 @@
1
- {"version":3,"file":"Material.d.ts","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAa,MAAM,qBAAqB,CAAC;AAClE,OAAO,EACQ,IAAI,EAAE,cAAc,EAAoC,YAAY,EAAE,cAAc,EAAgC,mBAAmB,EAAE,cAAc,EAAE,eAAe,EACtL,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAIlF;;;GAGG;AACH,8BAAsB,gBAAiB,SAAQ,iBAAiB;IAC9D,WAA2B,SAAS,IAAI,MAAM,CAA+B;IAC7E;;;;OAIG;WACW,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAIjG;;;;;;OAMG;WACW,MAAM,CAAC,CAAC,SAAS,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;CAQzH;AAED;;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,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,2BAA2B,GAAG,UAAU;IAO9I,YAAY;qBACoB,QAAQ,CAAC,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY;CAgBlI;AAED,cAAc;AACd,yBAAiB,qBAAqB,CAAC;IACrC;;;;OAIG;IACH,MAAa,MAAM;QACjB,mEAAmE;QAC5D,WAAW,EAAE,MAAM,CAAC;QAC3B,qDAAqD;QAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;QAC5B,iHAAiH;QAC1G,KAAK,CAAC,EAAE,cAAc,CAAC;QAC9B,kEAAkE;QAC3D,aAAa,CAAC,EAAE,cAAc,CAAC;QACtC;;WAEG;QACI,MAAM,CAAC,EAAE,MAAM,CAAC;QACvB;;;;WAIG;QACI,QAAQ,CAAC,EAAE,MAAM,CAAC;QACzB,wEAAwE;QACjE,OAAO,CAAC,EAAE,MAAM,CAAC;QACxB,yEAAyE;QAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;QACzB,wBAAwB;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACxB,wBAAwB;QACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;QAC/B;;;WAGG;QACI,UAAU,CAAC,EAAE,eAAe,CAAC;QACpC;;;;WAIG;QACI,SAAS,CAAC,EAAE,cAAc,GAAG;YAClC;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;QAEF,gJAAgJ;oBAC7H,WAAW,EAAE,MAAM;KAGvC;CACF;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,qBAAqB,CAAC,MAAM;CAChF"}
@@ -11,6 +11,8 @@ exports.RenderMaterialElement = exports.PhysicalMaterial = void 0;
11
11
  const core_bentley_1 = require("@itwin/core-bentley");
12
12
  const core_common_1 = require("@itwin/core-common");
13
13
  const Element_1 = require("./Element");
14
+ const EditTxn_1 = require("./EditTxn");
15
+ const Symbols_1 = require("./internal/Symbols");
14
16
  /* eslint-disable @typescript-eslint/naming-convention */
15
17
  /** A PhysicalMaterial defines the matter that makes up physical elements.
16
18
  * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.
@@ -182,18 +184,10 @@ class RenderMaterialElement extends Element_1.DefinitionElement {
182
184
  };
183
185
  return new RenderMaterialElement(renderMaterialProps, iModelDb);
184
186
  }
185
- /**
186
- * Insert a new RenderMaterial into a model.
187
- * @param iModelDb Insert into this iModel
188
- * @param definitionModelId Insert the new Texture into this DefinitionModel
189
- * @param materialName The name/CodeValue of the RenderMaterial
190
- * @param params Parameters object which describes how to construct the RenderMaterial
191
- * @returns The Id of the newly inserted RenderMaterial element.
192
- * @throws [[IModelError]] if unable to insert the element.
193
- */
194
- static insert(iModelDb, definitionModelId, materialName, params) {
195
- const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);
196
- return iModelDb.elements.insertElement(renderMaterial.toJSON());
187
+ static insert(txnOrDb, definitionModelId, materialName, params) {
188
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
189
+ const renderMaterial = this.create(txn.iModel, definitionModelId, materialName, params);
190
+ return renderMaterial.insert(txn);
197
191
  }
198
192
  /** @beta */
199
193
  static async onCloned(context, sourceProps, targetProps) {
@@ -1 +1 @@
1
- {"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkE;AAClE,oDAE4B;AAC5B,uCAA8C;AAK9C,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,2BAAiB;IACvD,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;IAC7E;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,MAAgB,EAAE,iBAAiC,EAAE,IAAY;QACxF,MAAM,QAAQ,GAAa,MAAM,CAAC,S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ACX,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,IAAI,mBAAI,CAAC,OAAO,CAAC,CAAC;QACrJ,CAAC;IACH,CAAC;;AApLH,sDAqLC;AAED,cAAc;AACd,WAAiB,qBAAqB;IACpC;;;;OAIG;IACH,MAAa,MAAM;QACjB,mEAAmE;QAC5D,WAAW,CAAS;QAC3B,qDAAqD;QAC9C,WAAW,CAAU;QAC5B,iHAAiH;QAC1G,KAAK,CAAkB;QAC9B,kEAAkE;QAC3D,aAAa,CAAkB;QACtC;;WAEG;QACI,MAAM,CAAU;QACvB;;;;WAIG;QACI,QAAQ,CAAU;QACzB,wEAAwE;QACjE,OAAO,CAAU;QACxB,yEAAyE;QAClE,QAAQ,CAAU;QACzB,wBAAwB;QACjB,OAAO,CAAU;QACxB,wBAAwB;QACjB,YAAY,CAAY;QAC/B;;;WAGG;QACI,UAAU,CAAmB;QACpC;;;;WAIG;QACI,SAAS,CAKd;QAEF,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IAhDY,4BAAM,SAgDlB,CAAA;AACH,CAAC,EAvDgB,qBAAqB,qCAArB,qBAAqB,QAuDrC","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 Elements\r\n */\r\n\r\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\r\nimport {\r\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\r\n} from \"@itwin/core-common\";\r\nimport { DefinitionElement } from \"./Element\";\r\nimport { IModelDb } from \"./IModelDb\";\r\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\r\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** A PhysicalMaterial defines the matter that makes up physical elements.\r\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\r\n * @public\r\n */\r\nexport abstract class PhysicalMaterial extends DefinitionElement {\r\n public static override get className(): string { return \"PhysicalMaterial\"; }\r\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n */\r\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\r\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\r\n }\r\n /** Create a PhysicalMaterial\r\n * @param iModelDb The IModelDb\r\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\r\n * @param name The name (codeValue) of the PhysicalMaterial\r\n * @returns The newly constructed PhysicalMaterial\r\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\r\n */\r\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\r\n const elementProps: DefinitionElementProps = {\r\n classFullName: this.classFullName,\r\n model: definitionModelId,\r\n code: this.createCode(iModelDb, definitionModelId, name),\r\n };\r\n return iModelDb.elements.createElement(elementProps);\r\n }\r\n}\r\n\r\n/** Defines a rendering material.\r\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\r\n * @public\r\n */\r\nexport class RenderMaterialElement extends DefinitionElement {\r\n public static override get className(): string { return \"RenderMaterial\"; }\r\n\r\n /** The name of a palette that can be used to categorize multiple materials. */\r\n public paletteName: string;\r\n /** An optional description of the material. */\r\n public description?: string;\r\n\r\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\r\n super(props, iModel);\r\n this.paletteName = props.paletteName;\r\n this.description = props.description;\r\n }\r\n\r\n public override toJSON(): RenderMaterialProps {\r\n const val = super.toJSON() as RenderMaterialProps;\r\n val.paletteName = this.paletteName;\r\n val.description = this.description;\r\n return val;\r\n }\r\n\r\n /**\r\n * RenderMaterialElement custom HandledProps includes 'paletteName'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\r\n { propertyName: \"paletteName\", source: \"Class\" },\r\n ];\r\n\r\n /**\r\n * RenderMaterialElement deserializes 'paletteName'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override deserialize(props: DeserializeEntityArgs): RenderMaterialProps {\r\n const elProps = super.deserialize(props) as RenderMaterialProps;\r\n const instance = props.row;\r\n elProps.paletteName = JsonUtils.asString(instance.paletteName);\r\n return elProps;\r\n }\r\n\r\n /**\r\n * RenderMaterialElement serializes 'paletteName'.\r\n * @inheritdoc\r\n * @beta\r\n */\r\n public static override serialize(props: RenderMaterialProps, iModel: IModelDb): ECSqlRow {\r\n const inst = super.serialize(props, iModel);\r\n inst.paletteName = props.paletteName;\r\n return inst;\r\n }\r\n\r\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\r\n * @param iModel The IModelDb\r\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\r\n * @param name The RenderMaterial name\r\n */\r\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\r\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\r\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\r\n }\r\n /**\r\n * Create a RenderMaterial with given parameters.\r\n * @param iModelDb The iModel\r\n * @param definitionModelId The [[DefinitionModel]]\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The newly constructed RenderMaterial element.\r\n * @throws [[IModelError]] if unable to create the element.\r\n */\r\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\r\n let maps: RenderMaterialAssetMapsProps | undefined;\r\n const pbr_normal = params.normalMap?.scale;\r\n if (params.patternMap || params.normalMap) {\r\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\r\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\r\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\r\n const pat = params.patternMap;\r\n if (pat && undefined !== pat[key])\r\n obj[key] = pat[key];\r\n else if (params.normalMap && undefined !== params.normalMap[key])\r\n obj[key] = params.normalMap[key];\r\n }\r\n\r\n const baseProps: TexMap = {};\r\n choose(baseProps, \"pattern_angle\");\r\n choose(baseProps, \"pattern_u_flip\");\r\n choose(baseProps, \"pattern_flip\");\r\n choose(baseProps, \"pattern_scale\");\r\n choose(baseProps, \"pattern_offset\");\r\n choose(baseProps, \"pattern_scalemode\");\r\n choose(baseProps, \"pattern_mapping\");\r\n choose(baseProps, \"pattern_weight\");\r\n choose(baseProps, \"pattern_useconstantlod\");\r\n choose(baseProps, \"pattern_constantlod_repetitions\");\r\n choose(baseProps, \"pattern_constantlod_offset\");\r\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\r\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\r\n\r\n maps = {};\r\n if (params.patternMap)\r\n maps.Pattern = { ...params.patternMap, ...baseProps };\r\n\r\n if (params.normalMap) {\r\n maps.Normal = {\r\n ...params.normalMap,\r\n ...baseProps,\r\n };\r\n\r\n delete (maps.Normal as any).scale;\r\n }\r\n }\r\n\r\n const renderMaterialProps: RenderMaterialProps = {\r\n classFullName: this.classFullName,\r\n code: this.createCode(iModelDb, definitionModelId, materialName),\r\n paletteName: params.paletteName,\r\n description: params.description,\r\n jsonProperties: {\r\n materialAssets: {\r\n renderMaterial: {\r\n HasBaseColor: params.color !== undefined,\r\n color: params.color,\r\n HasSpecularColor: params.specularColor !== undefined,\r\n specular_color: params.specularColor,\r\n HasFinish: params.finish !== undefined,\r\n finish: params.finish,\r\n HasTransmit: params.transmit !== undefined ? true : undefined,\r\n transmit: params.transmit,\r\n HasDiffuse: params.diffuse !== undefined,\r\n diffuse: params.diffuse,\r\n HasSpecular: params.specular !== undefined,\r\n specular: params.specular,\r\n HasReflect: params.reflect !== undefined,\r\n reflect: params.reflect,\r\n HasReflectColor: params.reflectColor !== undefined,\r\n reflect_color: params.reflectColor,\r\n Map: maps,\r\n pbr_normal,\r\n },\r\n },\r\n },\r\n model: definitionModelId,\r\n isPrivate: false,\r\n };\r\n\r\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\r\n }\r\n\r\n /**\r\n * Insert a new RenderMaterial into a model.\r\n * @param iModelDb Insert into this iModel\r\n * @param definitionModelId Insert the new Texture into this DefinitionModel\r\n * @param materialName The name/CodeValue of the RenderMaterial\r\n * @param params Parameters object which describes how to construct the RenderMaterial\r\n * @returns The Id of the newly inserted RenderMaterial element.\r\n * @throws [[IModelError]] if unable to insert the element.\r\n */\r\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\r\n const renderMaterial = this.create(iModelDb, definitionModelId, materialName, params);\r\n return iModelDb.elements.insertElement(renderMaterial.toJSON());\r\n }\r\n\r\n /** @beta */\r\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\r\n await super.onCloned(context, sourceProps, targetProps);\r\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\r\n if (typeof mapName !== \"string\")\r\n continue;\r\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\r\n // sourceMap could be null/undefined, keep it the same in targetProps\r\n if (!sourceMap) {\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\r\n continue;\r\n }\r\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\r\n continue;\r\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\r\n }\r\n }\r\n}\r\n\r\n/** @public */\r\nexport namespace RenderMaterialElement {\r\n /** Parameters used to construct a [[RenderMaterial]].\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @deprecated in 3.6 - might be removed in next major version. Because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\r\n */\r\n export class Params {\r\n /** A required palette name that categorizes this RenderMaterial */\r\n public paletteName: string;\r\n /** An optional description of this RenderMaterial */\r\n public description?: string;\r\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\r\n public color?: RgbFactorProps;\r\n /** The color to use for specular illumination. Default: black. */\r\n public specularColor?: RgbFactorProps;\r\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\r\n * Default: 0.\r\n */\r\n public finish?: number;\r\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\r\n * If defined, then the material transparency overrides the transparency of whatever surface the material is applied to.\r\n * If undefined, the material has no effect on surface transparency.\r\n * Default: undefined.\r\n */\r\n public transmit?: number;\r\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\r\n public diffuse?: number;\r\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\r\n public specular?: number;\r\n /** Currently unused. */\r\n public reflect?: number;\r\n /** Currently unused. */\r\n public reflectColor?: number[];\r\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public patternMap?: TextureMapProps;\r\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\r\n * surface's geometry.\r\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\r\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\r\n */\r\n public normalMap?: NormalMapProps & {\r\n /** A factor by which to multiply the components of the normal vectors read from the texture.\r\n * Default: 1.\r\n */\r\n scale?: number;\r\n };\r\n\r\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\r\n public constructor(paletteName: string) {\r\n this.paletteName = paletteName;\r\n }\r\n }\r\n}\r\n\r\n/** Parameters used to create a [[RenderMaterial]] element.\r\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\r\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\r\n * @public\r\n */\r\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line @typescript-eslint/no-deprecated, @typescript-eslint/no-empty-object-type\r\n}\r\n"]}
1
+ {"version":3,"file":"Material.js","sourceRoot":"","sources":["../../src/Material.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAkE;AAClE,oDAE4B;AAC5B,uCAA8C;AAC9C,uCAAoC;AAIpC,gDAAkD;AAElD,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,gBAAiB,SAAQ,2BAAiB;IACvD,MAAM,KAAc,SAAS,KAAa,OAA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AAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;gBAClF,SAAS;YACX,CAAC;YACD,IAAI,CAAC,mBAAI,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,SAAS,KAAK,SAAS;gBACzE,SAAS;YACX,WAAW,CAAC,cAAc,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC,SAAS,IAAI,mBAAI,CAAC,OAAO,CAAC,CAAC;QACrJ,CAAC;IACH,CAAC;;AA5LH,sDA6LC;AAED,cAAc;AACd,WAAiB,qBAAqB;IACpC;;;;OAIG;IACH,MAAa,MAAM;QACjB,mEAAmE;QAC5D,WAAW,CAAS;QAC3B,qDAAqD;QAC9C,WAAW,CAAU;QAC5B,iHAAiH;QAC1G,KAAK,CAAkB;QAC9B,kEAAkE;QAC3D,aAAa,CAAkB;QACtC;;WAEG;QACI,MAAM,CAAU;QACvB;;;;WAIG;QACI,QAAQ,CAAU;QACzB,wEAAwE;QACjE,OAAO,CAAU;QACxB,yEAAyE;QAClE,QAAQ,CAAU;QACzB,wBAAwB;QACjB,OAAO,CAAU;QACxB,wBAAwB;QACjB,YAAY,CAAY;QAC/B;;;WAGG;QACI,UAAU,CAAmB;QACpC;;;;WAIG;QACI,SAAS,CAKd;QAEF,gJAAgJ;QAChJ,YAAmB,WAAmB;YACpC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QACjC,CAAC;KACF;IAhDY,4BAAM,SAgDlB,CAAA;AACH,CAAC,EAvDgB,qBAAqB,qCAArB,qBAAqB,QAuDrC","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 Elements\n */\n\nimport { Id64, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport {\n BisCodeSpec, Code, CodeScopeProps, CodeSpec, DefinitionElementProps, ElementProps, NormalMapProps, RenderMaterialAssetMapsProps, RenderMaterialProps, RgbFactorProps, TextureMapProps,\n} from \"@itwin/core-common\";\nimport { DefinitionElement } from \"./Element\";\nimport { EditTxn } from \"./EditTxn\";\nimport { IModelDb } from \"./IModelDb\";\nimport { IModelElementCloneContext } from \"./IModelElementCloneContext\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from \"./Entity\";\nimport { _implicitTxn } from \"./internal/Symbols\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/** A PhysicalMaterial defines the matter that makes up physical elements.\n * @note See [[RenderMaterialElement]] for the DefinitionElement used to define rendering characteristics.\n * @public\n */\nexport abstract class PhysicalMaterial extends DefinitionElement {\n public static override get className(): string { return \"PhysicalMaterial\"; }\n /** Create a Code for a PhysicalMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n */\n public static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.physicalMaterial);\n return new Code({ spec: codeSpec.id, scope: definitionModelId, value: name });\n }\n /** Create a PhysicalMaterial\n * @param iModelDb The IModelDb\n * @param definitionModelId The Id of the DefinitionModel that will contain the PhysicalMaterial and provide the scope for its name.\n * @param name The name (codeValue) of the PhysicalMaterial\n * @returns The newly constructed PhysicalMaterial\n * @throws [[IModelError]] if there is a problem creating the PhysicalMaterial\n */\n public static create<T extends PhysicalMaterial>(iModelDb: IModelDb, definitionModelId: CodeScopeProps, name: string): T {\n const elementProps: DefinitionElementProps = {\n classFullName: this.classFullName,\n model: definitionModelId,\n code: this.createCode(iModelDb, definitionModelId, name),\n };\n return iModelDb.elements.createElement(elementProps);\n }\n}\n\n/** Defines a rendering material.\n * @note See [[PhysicalMaterial]] for the DefinitionElement used to define the matter that makes up physical elements.\n * @public\n */\nexport class RenderMaterialElement extends DefinitionElement {\n public static override get className(): string { return \"RenderMaterial\"; }\n\n /** The name of a palette that can be used to categorize multiple materials. */\n public paletteName: string;\n /** An optional description of the material. */\n public description?: string;\n\n private constructor(props: RenderMaterialProps, iModel: IModelDb) {\n super(props, iModel);\n this.paletteName = props.paletteName;\n this.description = props.description;\n }\n\n public override toJSON(): RenderMaterialProps {\n const val = super.toJSON() as RenderMaterialProps;\n val.paletteName = this.paletteName;\n val.description = this.description;\n return val;\n }\n\n /**\n * RenderMaterialElement custom HandledProps includes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"paletteName\", source: \"Class\" },\n ];\n\n /**\n * RenderMaterialElement deserializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): RenderMaterialProps {\n const elProps = super.deserialize(props) as RenderMaterialProps;\n const instance = props.row;\n elProps.paletteName = JsonUtils.asString(instance.paletteName);\n return elProps;\n }\n\n /**\n * RenderMaterialElement serializes 'paletteName'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: RenderMaterialProps, iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, iModel);\n inst.paletteName = props.paletteName;\n return inst;\n }\n\n /** Create a Code for a RenderMaterial given a name that is meant to be unique within the scope of the specified DefinitionModel.\n * @param iModel The IModelDb\n * @param scopeModelId The Id of the DefinitionModel that contains the RenderMaterial and provides the scope for its name.\n * @param name The RenderMaterial name\n */\n public static createCode(iModel: IModelDb, scopeModelId: CodeScopeProps, name: string): Code {\n const codeSpec: CodeSpec = iModel.codeSpecs.getByName(BisCodeSpec.renderMaterial);\n return 0 === name.length ? Code.createEmpty() : new Code({ spec: codeSpec.id, scope: scopeModelId, value: name });\n }\n /**\n * Create a RenderMaterial with given parameters.\n * @param iModelDb The iModel\n * @param definitionModelId The [[DefinitionModel]]\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The newly constructed RenderMaterial element.\n * @throws [[IModelError]] if unable to create the element.\n */\n public static create(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): RenderMaterialElement {\n let maps: RenderMaterialAssetMapsProps | undefined;\n const pbr_normal = params.normalMap?.scale;\n if (params.patternMap || params.normalMap) {\n // If both normal and pattern map are present, their texture mapping modes, angles, scales, etc are expected to match.\n type TexMap = Omit<TextureMapProps, \"TextureId\">;\n function choose<K extends keyof TexMap>(obj: TexMap, key: K): void {\n const pat = params.patternMap;\n if (pat && undefined !== pat[key])\n obj[key] = pat[key];\n else if (params.normalMap && undefined !== params.normalMap[key])\n obj[key] = params.normalMap[key];\n }\n\n const baseProps: TexMap = {};\n choose(baseProps, \"pattern_angle\");\n choose(baseProps, \"pattern_u_flip\");\n choose(baseProps, \"pattern_flip\");\n choose(baseProps, \"pattern_scale\");\n choose(baseProps, \"pattern_offset\");\n choose(baseProps, \"pattern_scalemode\");\n choose(baseProps, \"pattern_mapping\");\n choose(baseProps, \"pattern_weight\");\n choose(baseProps, \"pattern_useconstantlod\");\n choose(baseProps, \"pattern_constantlod_repetitions\");\n choose(baseProps, \"pattern_constantlod_offset\");\n choose(baseProps, \"pattern_constantlod_mindistanceclamp\");\n choose(baseProps, \"pattern_constantlod_maxdistanceclamp\");\n\n maps = {};\n if (params.patternMap)\n maps.Pattern = { ...params.patternMap, ...baseProps };\n\n if (params.normalMap) {\n maps.Normal = {\n ...params.normalMap,\n ...baseProps,\n };\n\n delete (maps.Normal as any).scale;\n }\n }\n\n const renderMaterialProps: RenderMaterialProps = {\n classFullName: this.classFullName,\n code: this.createCode(iModelDb, definitionModelId, materialName),\n paletteName: params.paletteName,\n description: params.description,\n jsonProperties: {\n materialAssets: {\n renderMaterial: {\n HasBaseColor: params.color !== undefined,\n color: params.color,\n HasSpecularColor: params.specularColor !== undefined,\n specular_color: params.specularColor,\n HasFinish: params.finish !== undefined,\n finish: params.finish,\n HasTransmit: params.transmit !== undefined ? true : undefined,\n transmit: params.transmit,\n HasDiffuse: params.diffuse !== undefined,\n diffuse: params.diffuse,\n HasSpecular: params.specular !== undefined,\n specular: params.specular,\n HasReflect: params.reflect !== undefined,\n reflect: params.reflect,\n HasReflectColor: params.reflectColor !== undefined,\n reflect_color: params.reflectColor,\n Map: maps,\n pbr_normal,\n },\n },\n },\n model: definitionModelId,\n isPrivate: false,\n };\n\n return new RenderMaterialElement(renderMaterialProps, iModelDb);\n }\n\n /**\n * Insert a new RenderMaterial into a model.\n * @param txn The EditTxn to use\n * @param definitionModelId Insert the new Texture into this DefinitionModel\n * @param materialName The name/CodeValue of the RenderMaterial\n * @param params Parameters object which describes how to construct the RenderMaterial\n * @returns The Id of the newly inserted RenderMaterial element.\n * @throws [[IModelError]] if unable to insert the element.\n * @beta\n */\n public static insert(txn: EditTxn, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;\n /**\n * Insert a new RenderMaterial into a model.\n * @deprecated Use RenderMaterialElement.insert(txn, ...) instead.\n */\n public static insert(iModelDb: IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, definitionModelId: Id64String, materialName: string, params: RenderMaterialElementParams): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const renderMaterial = this.create(txn.iModel, definitionModelId, materialName, params);\n return renderMaterial.insert(txn);\n }\n\n /** @beta */\n protected static override async onCloned(context: IModelElementCloneContext, sourceProps: ElementProps, targetProps: ElementProps) {\n await super.onCloned(context, sourceProps, targetProps);\n for (const mapName in sourceProps.jsonProperties?.materialAssets?.renderMaterial?.Map ?? {}) {\n if (typeof mapName !== \"string\")\n continue;\n const sourceMap = sourceProps.jsonProperties.materialAssets.renderMaterial.Map[mapName];\n // sourceMap could be null/undefined, keep it the same in targetProps\n if (!sourceMap) {\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName] = sourceMap;\n continue;\n }\n if (!Id64.isValid(sourceMap.TextureId) || sourceMap.TextureId === undefined)\n continue;\n targetProps.jsonProperties.materialAssets.renderMaterial.Map[mapName].TextureId = context.findTargetElementId(sourceMap.TextureId ?? Id64.invalid);\n }\n }\n}\n\n/** @public */\nexport namespace RenderMaterialElement {\n /** Parameters used to construct a [[RenderMaterial]].\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @deprecated in 3.6 - might be removed in next major version. Because it is not useful to use a `class` - just use [[RenderMaterialElementParams]] directly instead.\n */\n export class Params {\n /** A required palette name that categorizes this RenderMaterial */\n public paletteName: string;\n /** An optional description of this RenderMaterial */\n public description?: string;\n /** If defined, the color to use for surface fill or diffuse illumination, overriding the surface's own color. */\n public color?: RgbFactorProps;\n /** The color to use for specular illumination. Default: black. */\n public specularColor?: RgbFactorProps;\n /** The specular exponent describing the surface's shininess, in the range 0 through 128.\n * Default: 0.\n */\n public finish?: number;\n /** A transparency to be applied to the surface, ranging from 0 (fully opaque) to 1 (fully transparent).\n * If defined, then the material transparency overrides the transparency of whatever surface the material is applied to.\n * If undefined, the material has no effect on surface transparency.\n * Default: undefined.\n */\n public transmit?: number;\n /** The surface's diffuse reflectivity from 0.0 to 1.0. Default: 0.6. */\n public diffuse?: number;\n /** The surface's specular reflectivity from 0.0 to 1.0. Default: 0.0. */\n public specular?: number;\n /** Currently unused. */\n public reflect?: number;\n /** Currently unused. */\n public reflectColor?: number[];\n /** Specifies a texture image to map onto the surface, replacing or mixing with the surface's own color and transparency.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public patternMap?: TextureMapProps;\n /** Specifies a [normal map](https://en.wikipedia.org/wiki/Normal_mapping) to apply to the surface to simulate more surface detail than is present in the\n * surface's geometry.\n * @note With the exception of `TextureId`, the [TextureMapProps]($common) of [[patternMap]] and [[normalMap]] are expected to be identical. If a property is defined in both\n * [[patternMap]]] and [[normalMap]], the value in [[patternMap]] takes precedence.\n */\n public normalMap?: NormalMapProps & {\n /** A factor by which to multiply the components of the normal vectors read from the texture.\n * Default: 1.\n */\n scale?: number;\n };\n\n /** Construct a new RenderMaterial.Params object with the specified paletteName. Alter the public members on that object to specify settings. */\n public constructor(paletteName: string) {\n this.paletteName = paletteName;\n }\n }\n}\n\n/** Parameters used to create a [[RenderMaterial]] element.\n * The persistent JSON representation - [RenderMaterialAssetProps]($common) - is quite verbose and unwieldy. This representation simplifies it somewhat.\n * @see [[RenderMaterialElement.create]] and [[RenderMaterialElement.insert]] to create a [[RenderMaterial]] from parameters of this type.\n * @public\n */\nexport interface RenderMaterialElementParams extends RenderMaterialElement.Params { // eslint-disable-line @typescript-eslint/no-deprecated, @typescript-eslint/no-empty-object-type\n}\n"]}
@@ -5,6 +5,7 @@ import { GuidString, Id64String } from "@itwin/core-bentley";
5
5
  import { Point2d } from "@itwin/core-geometry";
6
6
  import { AxisAlignedBox3d, ElementProps, EntityReferenceSet, GeometricModel2dProps, GeometricModel3dProps, GeometricModelProps, ModelProps, RelatedElement } from "@itwin/core-common";
7
7
  import { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from "./Entity";
8
+ import { EditTxn } from "./EditTxn";
8
9
  import { IModelDb } from "./IModelDb";
9
10
  /** Argument for the `Model.onXxx` static methods
10
11
  * @beta
@@ -165,11 +166,35 @@ export declare class Model extends Entity {
165
166
  removeUserProperties(nameSpace: string): void;
166
167
  getJsonProperty(name: string): any;
167
168
  setJsonProperty(name: string, value: any): void;
168
- /** Insert this Model in the iModel */
169
- insert(): string;
170
- /** Update this Model in the iModel. */
169
+ /**
170
+ * Insert this Model in the iModel using the supplied EditTxn.
171
+ * @beta
172
+ */
173
+ insert(txn: EditTxn): Id64String;
174
+ /**
175
+ * Insert this Model in the iModel.
176
+ * @deprecated Use Model.insert(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
177
+ */
178
+ insert(): Id64String;
179
+ /**
180
+ * Update this Model in the iModel using the supplied EditTxn.
181
+ * @beta
182
+ */
183
+ update(txn: EditTxn): void;
184
+ /**
185
+ * Update this Model in the iModel.
186
+ * @deprecated Use Model.update(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
187
+ */
171
188
  update(): void;
172
- /** Delete this Model from the iModel. */
189
+ /**
190
+ * Delete this Model from the iModel using the supplied EditTxn.
191
+ * @beta
192
+ */
193
+ delete(txn: EditTxn): void;
194
+ /**
195
+ * Delete this Model from the iModel.
196
+ * @deprecated Use Model.delete(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
197
+ */
173
198
  delete(): void;
174
199
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
175
200
  }
@@ -259,14 +284,17 @@ export declare abstract class SpatialModel extends GeometricModel3d {
259
284
  */
260
285
  export declare class PhysicalModel extends SpatialModel {
261
286
  static get className(): string;
262
- /** Insert a PhysicalPartition and a PhysicalModel that sub-models it.
263
- * @param iModelDb Insert into this iModel
287
+ /** Insert a PhysicalPartition and a PhysicalModel that sub-models it using an explicit transaction.
288
+ * @param txn The EditTxn used to perform inserts.
264
289
  * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.
265
290
  * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.
266
291
  * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
267
292
  * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).
268
293
  * @throws [[IModelError]] if there is an insert problem.
294
+ * @beta
269
295
  */
296
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
297
+ /** @deprecated Use PhysicalModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help. */
270
298
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
271
299
  }
272
300
  /** A container for persisting spatial location elements.
@@ -275,14 +303,17 @@ export declare class PhysicalModel extends SpatialModel {
275
303
  */
276
304
  export declare class SpatialLocationModel extends SpatialModel {
277
305
  static get className(): string;
278
- /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.
279
- * @param iModelDb Insert into this iModel
306
+ /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it using an explicit transaction.
307
+ * @param txn The EditTxn used to perform inserts.
280
308
  * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.
281
309
  * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.
282
310
  * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
283
311
  * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).
284
312
  * @throws [[IModelError]] if there is an insert problem.
313
+ * @beta
285
314
  */
315
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
316
+ /** @deprecated Use SpatialLocationModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help. */
286
317
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;
287
318
  }
288
319
  /** A 2d model that holds [[DrawingGraphic]]s. DrawingModels may be dimensional or non-dimensional.
@@ -329,13 +360,15 @@ export declare abstract class GroupInformationModel extends InformationModel {
329
360
  */
330
361
  export declare class SheetIndexModel extends InformationModel {
331
362
  static get className(): string;
332
- /** Insert a SheetIndex and a SheetIndexModel that sub-models it.
333
- * @param iModelDb Insert into this iModel
334
- * @param parentSubjectId The SheetIndex will be inserted as a child of this Subject element.
335
- * @param name The name of the SheetIndex that the new SheetIndexModel will sub-model.
336
- * @returns The Id of the newly inserted SheetIndexModel.
337
- * @throws [[IModelError]] if there is an insert problem.
338
- */
363
+ /** Insert a [[SheetIndexPartition]] and a SheetIndexModel that sub-models it.
364
+ * @param txn The active EditTxn.
365
+ * @param parentSubjectId The SheetIndexPartition will be inserted as a child of this Subject element.
366
+ * @param name The name of the SheetIndexPartition that the new SheetIndexModel will sub-model.
367
+ * @returns The Id of the newly inserted SheetIndexModel.
368
+ * @throws [[IModelError]] if there is an insert problem.
369
+ */
370
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
371
+ /** @deprecated Use SheetIndexModel.insert(txn, ...) instead. */
339
372
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
340
373
  }
341
374
  /** A container for persisting Information Record Elements
@@ -344,13 +377,15 @@ export declare class SheetIndexModel extends InformationModel {
344
377
  */
345
378
  export declare class InformationRecordModel extends InformationModel {
346
379
  static get className(): string;
347
- /** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.
348
- * @param iModelDb Insert into this iModel
380
+ /** Insert an InformationRecordPartition and an InformationRecordModel that sub-models it using an explicit transaction.
381
+ * @param txn The EditTxn used to perform inserts.
349
382
  * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.
350
383
  * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.
351
384
  * @returns The Id of the newly inserted InformationRecordModel.
352
385
  * @throws [[IModelError]] if there is an insert problem.
386
+ * @beta
353
387
  */
388
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
354
389
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
355
390
  }
356
391
  /** A container for persisting definition elements.
@@ -360,12 +395,14 @@ export declare class InformationRecordModel extends InformationModel {
360
395
  export declare class DefinitionModel extends InformationModel {
361
396
  static get className(): string;
362
397
  /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.
363
- * @param iModelDb Insert into this iModel
398
+ * @param txn The active EditTxn.
364
399
  * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.
365
400
  * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.
366
401
  * @returns The Id of the newly inserted DefinitionModel.
367
402
  * @throws [[IModelError]] if there is an insert problem.
403
+ * @beta
368
404
  */
405
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
369
406
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
370
407
  }
371
408
  /** The singleton container of repository-related information elements.
@@ -380,13 +417,15 @@ export declare class RepositoryModel extends DefinitionModel {
380
417
  */
381
418
  export declare class DocumentListModel extends InformationModel {
382
419
  static get className(): string;
383
- /** Insert a DocumentPartition and a DocumentListModel that sub-models it.
384
- * @param iModelDb Insert into this iModel
420
+ /** Insert a [[DocumentPartition]] and a DocumentListModel that sub-models it.
421
+ * @param txn The active EditTxn.
385
422
  * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.
386
423
  * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.
387
424
  * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)
388
425
  * @throws [[IModelError]] if there is an insert problem.
426
+ * @beta
389
427
  */
428
+ static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;
390
429
  static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;
391
430
  }
392
431
  /** A container for persisting link elements.
@@ -1 +1 @@
1
- {"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/Model.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAa,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAW,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,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