@itwin/core-backend 5.9.0-dev.1 → 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 (551) hide show
  1. package/CHANGELOG.md +30 -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/BriefcaseManager.js +3 -3
  6. package/lib/cjs/BriefcaseManager.js.map +1 -1
  7. package/lib/cjs/Category.d.ts +37 -7
  8. package/lib/cjs/Category.d.ts.map +1 -1
  9. package/lib/cjs/Category.js +33 -42
  10. package/lib/cjs/Category.js.map +1 -1
  11. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  12. package/lib/cjs/ChangesetECAdaptor.js +5 -2
  13. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  14. package/lib/cjs/ChannelControl.d.ts +29 -0
  15. package/lib/cjs/ChannelControl.d.ts.map +1 -1
  16. package/lib/cjs/ChannelControl.js.map +1 -1
  17. package/lib/cjs/CheckpointManager.js +1 -1
  18. package/lib/cjs/CheckpointManager.js.map +1 -1
  19. package/lib/cjs/CloudSqlite.d.ts +1 -1
  20. package/lib/cjs/CloudSqlite.d.ts.map +1 -1
  21. package/lib/cjs/CloudSqlite.js +68 -13
  22. package/lib/cjs/CloudSqlite.js.map +1 -1
  23. package/lib/cjs/CodeSpecs.d.ts +32 -3
  24. package/lib/cjs/CodeSpecs.d.ts.map +1 -1
  25. package/lib/cjs/CodeSpecs.js +48 -20
  26. package/lib/cjs/CodeSpecs.js.map +1 -1
  27. package/lib/cjs/DisplayStyle.d.ts +18 -3
  28. package/lib/cjs/DisplayStyle.d.ts.map +1 -1
  29. package/lib/cjs/DisplayStyle.js +10 -21
  30. package/lib/cjs/DisplayStyle.js.map +1 -1
  31. package/lib/cjs/EditTxn.d.ts +262 -0
  32. package/lib/cjs/EditTxn.d.ts.map +1 -0
  33. package/lib/cjs/EditTxn.js +548 -0
  34. package/lib/cjs/EditTxn.js.map +1 -0
  35. package/lib/cjs/Element.d.ts +74 -5
  36. package/lib/cjs/Element.d.ts.map +1 -1
  37. package/lib/cjs/Element.js +63 -75
  38. package/lib/cjs/Element.js.map +1 -1
  39. package/lib/cjs/ElementAspect.d.ts +10 -0
  40. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  41. package/lib/cjs/ElementAspect.js +21 -12
  42. package/lib/cjs/ElementAspect.js.map +1 -1
  43. package/lib/cjs/ElementTreeWalker.d.ts +56 -3
  44. package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
  45. package/lib/cjs/ElementTreeWalker.js +53 -40
  46. package/lib/cjs/ElementTreeWalker.js.map +1 -1
  47. package/lib/cjs/ExternalSource.d.ts +11 -2
  48. package/lib/cjs/ExternalSource.d.ts.map +1 -1
  49. package/lib/cjs/ExternalSource.js +10 -8
  50. package/lib/cjs/ExternalSource.js.map +1 -1
  51. package/lib/cjs/IModelDb.d.ts +66 -22
  52. package/lib/cjs/IModelDb.d.ts.map +1 -1
  53. package/lib/cjs/IModelDb.js +175 -289
  54. package/lib/cjs/IModelDb.js.map +1 -1
  55. package/lib/cjs/IModelHost.d.ts +58 -1
  56. package/lib/cjs/IModelHost.d.ts.map +1 -1
  57. package/lib/cjs/IModelHost.js +89 -0
  58. package/lib/cjs/IModelHost.js.map +1 -1
  59. package/lib/cjs/IpcHost.d.ts.map +1 -1
  60. package/lib/cjs/IpcHost.js +35 -15
  61. package/lib/cjs/IpcHost.js.map +1 -1
  62. package/lib/cjs/LineStyle.d.ts +47 -7
  63. package/lib/cjs/LineStyle.d.ts.map +1 -1
  64. package/lib/cjs/LineStyle.js +38 -33
  65. package/lib/cjs/LineStyle.js.map +1 -1
  66. package/lib/cjs/LockControl.d.ts +85 -1
  67. package/lib/cjs/LockControl.d.ts.map +1 -1
  68. package/lib/cjs/LockControl.js.map +1 -1
  69. package/lib/cjs/Material.d.ts +8 -1
  70. package/lib/cjs/Material.d.ts.map +1 -1
  71. package/lib/cjs/Material.js +6 -12
  72. package/lib/cjs/Material.js.map +1 -1
  73. package/lib/cjs/Model.d.ts +59 -20
  74. package/lib/cjs/Model.d.ts.map +1 -1
  75. package/lib/cjs/Model.js +38 -80
  76. package/lib/cjs/Model.js.map +1 -1
  77. package/lib/cjs/Relationship.d.ts +72 -7
  78. package/lib/cjs/Relationship.d.ts.map +1 -1
  79. package/lib/cjs/Relationship.js +39 -21
  80. package/lib/cjs/Relationship.js.map +1 -1
  81. package/lib/cjs/SchemaSync.js +4 -4
  82. package/lib/cjs/SchemaSync.js.map +1 -1
  83. package/lib/cjs/SheetIndex.d.ts +9 -0
  84. package/lib/cjs/SheetIndex.d.ts.map +1 -1
  85. package/lib/cjs/SheetIndex.js +38 -35
  86. package/lib/cjs/SheetIndex.js.map +1 -1
  87. package/lib/cjs/StashManager.js +1 -1
  88. package/lib/cjs/StashManager.js.map +1 -1
  89. package/lib/cjs/Texture.d.ts +6 -0
  90. package/lib/cjs/Texture.d.ts.map +1 -1
  91. package/lib/cjs/Texture.js +6 -14
  92. package/lib/cjs/Texture.js.map +1 -1
  93. package/lib/cjs/TxnManager.d.ts +105 -9
  94. package/lib/cjs/TxnManager.d.ts.map +1 -1
  95. package/lib/cjs/TxnManager.js +194 -15
  96. package/lib/cjs/TxnManager.js.map +1 -1
  97. package/lib/cjs/ViewDefinition.d.ts +21 -1
  98. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  99. package/lib/cjs/ViewDefinition.js +27 -66
  100. package/lib/cjs/ViewDefinition.js.map +1 -1
  101. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  102. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  103. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +33 -27
  104. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  105. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
  106. package/lib/cjs/annotations/TextAnnotationElement.js +6 -5
  107. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
  108. package/lib/cjs/core-backend.d.ts +1 -0
  109. package/lib/cjs/core-backend.d.ts.map +1 -1
  110. package/lib/cjs/core-backend.js +1 -0
  111. package/lib/cjs/core-backend.js.map +1 -1
  112. package/lib/cjs/domains/FunctionalElements.d.ts +6 -2
  113. package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
  114. package/lib/cjs/domains/FunctionalElements.js +8 -13
  115. package/lib/cjs/domains/FunctionalElements.js.map +1 -1
  116. package/lib/cjs/domains/GenericElements.d.ts +11 -4
  117. package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
  118. package/lib/cjs/domains/GenericElements.js +13 -24
  119. package/lib/cjs/domains/GenericElements.js.map +1 -1
  120. package/lib/cjs/internal/ChannelAdmin.d.ts +15 -0
  121. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  122. package/lib/cjs/internal/ChannelAdmin.js +5 -3
  123. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  124. package/lib/cjs/internal/HubMock.d.ts +2 -0
  125. package/lib/cjs/internal/HubMock.d.ts.map +1 -1
  126. package/lib/cjs/internal/HubMock.js +7 -0
  127. package/lib/cjs/internal/HubMock.js.map +1 -1
  128. package/lib/cjs/internal/NoLocks.d.ts.map +1 -1
  129. package/lib/cjs/internal/NoLocks.js +6 -0
  130. package/lib/cjs/internal/NoLocks.js.map +1 -1
  131. package/lib/cjs/internal/ServerBasedLocks.d.ts +12 -0
  132. package/lib/cjs/internal/ServerBasedLocks.d.ts.map +1 -1
  133. package/lib/cjs/internal/ServerBasedLocks.js +285 -4
  134. package/lib/cjs/internal/ServerBasedLocks.js.map +1 -1
  135. package/lib/cjs/internal/Symbols.d.ts +4 -0
  136. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  137. package/lib/cjs/internal/Symbols.js +5 -1
  138. package/lib/cjs/internal/Symbols.js.map +1 -1
  139. package/lib/cjs/internal/annotations/fields.d.ts +3 -2
  140. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
  141. package/lib/cjs/internal/annotations/fields.js +7 -6
  142. package/lib/cjs/internal/annotations/fields.js.map +1 -1
  143. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  144. package/lib/cjs/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  145. package/lib/cjs/internal/workspace/SettingsEditorImpl.js +49 -242
  146. package/lib/cjs/internal/workspace/SettingsEditorImpl.js.map +1 -1
  147. package/lib/cjs/internal/workspace/SettingsImpl.d.ts.map +1 -1
  148. package/lib/cjs/internal/workspace/SettingsImpl.js.map +1 -1
  149. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts +0 -1
  150. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  151. package/lib/cjs/internal/workspace/WorkspaceImpl.js +70 -41
  152. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  153. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  154. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  155. package/lib/cjs/workspace/Settings.d.ts +11 -5
  156. package/lib/cjs/workspace/Settings.d.ts.map +1 -1
  157. package/lib/cjs/workspace/Settings.js.map +1 -1
  158. package/lib/cjs/workspace/SettingsDb.d.ts +20 -99
  159. package/lib/cjs/workspace/SettingsDb.d.ts.map +1 -1
  160. package/lib/cjs/workspace/SettingsDb.js +23 -7
  161. package/lib/cjs/workspace/SettingsDb.js.map +1 -1
  162. package/lib/cjs/workspace/SettingsEditor.d.ts +40 -226
  163. package/lib/cjs/workspace/SettingsEditor.d.ts.map +1 -1
  164. package/lib/cjs/workspace/SettingsEditor.js +86 -25
  165. package/lib/cjs/workspace/SettingsEditor.js.map +1 -1
  166. package/lib/cjs/workspace/Workspace.d.ts +7 -11
  167. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  168. package/lib/cjs/workspace/Workspace.js.map +1 -1
  169. package/lib/cjs/workspace/WorkspaceEditor.d.ts +14 -0
  170. package/lib/cjs/workspace/WorkspaceEditor.d.ts.map +1 -1
  171. package/lib/cjs/workspace/WorkspaceEditor.js +1 -1
  172. package/lib/cjs/workspace/WorkspaceEditor.js.map +1 -1
  173. package/lib/esm/BackendHubAccess.d.ts +38 -0
  174. package/lib/esm/BackendHubAccess.d.ts.map +1 -1
  175. package/lib/esm/BackendHubAccess.js.map +1 -1
  176. package/lib/esm/BriefcaseManager.js +3 -3
  177. package/lib/esm/BriefcaseManager.js.map +1 -1
  178. package/lib/esm/Category.d.ts +37 -7
  179. package/lib/esm/Category.d.ts.map +1 -1
  180. package/lib/esm/Category.js +33 -42
  181. package/lib/esm/Category.js.map +1 -1
  182. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  183. package/lib/esm/ChangesetECAdaptor.js +5 -2
  184. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  185. package/lib/esm/ChannelControl.d.ts +29 -0
  186. package/lib/esm/ChannelControl.d.ts.map +1 -1
  187. package/lib/esm/ChannelControl.js.map +1 -1
  188. package/lib/esm/CheckpointManager.js +1 -1
  189. package/lib/esm/CheckpointManager.js.map +1 -1
  190. package/lib/esm/CloudSqlite.d.ts +1 -1
  191. package/lib/esm/CloudSqlite.d.ts.map +1 -1
  192. package/lib/esm/CloudSqlite.js +69 -14
  193. package/lib/esm/CloudSqlite.js.map +1 -1
  194. package/lib/esm/CodeSpecs.d.ts +32 -3
  195. package/lib/esm/CodeSpecs.d.ts.map +1 -1
  196. package/lib/esm/CodeSpecs.js +49 -21
  197. package/lib/esm/CodeSpecs.js.map +1 -1
  198. package/lib/esm/DisplayStyle.d.ts +18 -3
  199. package/lib/esm/DisplayStyle.d.ts.map +1 -1
  200. package/lib/esm/DisplayStyle.js +10 -21
  201. package/lib/esm/DisplayStyle.js.map +1 -1
  202. package/lib/esm/EditTxn.d.ts +262 -0
  203. package/lib/esm/EditTxn.d.ts.map +1 -0
  204. package/lib/esm/EditTxn.js +543 -0
  205. package/lib/esm/EditTxn.js.map +1 -0
  206. package/lib/esm/Element.d.ts +74 -5
  207. package/lib/esm/Element.d.ts.map +1 -1
  208. package/lib/esm/Element.js +64 -76
  209. package/lib/esm/Element.js.map +1 -1
  210. package/lib/esm/ElementAspect.d.ts +10 -0
  211. package/lib/esm/ElementAspect.d.ts.map +1 -1
  212. package/lib/esm/ElementAspect.js +22 -13
  213. package/lib/esm/ElementAspect.js.map +1 -1
  214. package/lib/esm/ElementTreeWalker.d.ts +56 -3
  215. package/lib/esm/ElementTreeWalker.d.ts.map +1 -1
  216. package/lib/esm/ElementTreeWalker.js +53 -40
  217. package/lib/esm/ElementTreeWalker.js.map +1 -1
  218. package/lib/esm/ExternalSource.d.ts +11 -2
  219. package/lib/esm/ExternalSource.d.ts.map +1 -1
  220. package/lib/esm/ExternalSource.js +10 -8
  221. package/lib/esm/ExternalSource.js.map +1 -1
  222. package/lib/esm/IModelDb.d.ts +66 -22
  223. package/lib/esm/IModelDb.d.ts.map +1 -1
  224. package/lib/esm/IModelDb.js +177 -291
  225. package/lib/esm/IModelDb.js.map +1 -1
  226. package/lib/esm/IModelHost.d.ts +58 -1
  227. package/lib/esm/IModelHost.d.ts.map +1 -1
  228. package/lib/esm/IModelHost.js +91 -2
  229. package/lib/esm/IModelHost.js.map +1 -1
  230. package/lib/esm/IpcHost.d.ts.map +1 -1
  231. package/lib/esm/IpcHost.js +36 -16
  232. package/lib/esm/IpcHost.js.map +1 -1
  233. package/lib/esm/LineStyle.d.ts +47 -7
  234. package/lib/esm/LineStyle.d.ts.map +1 -1
  235. package/lib/esm/LineStyle.js +38 -33
  236. package/lib/esm/LineStyle.js.map +1 -1
  237. package/lib/esm/LockControl.d.ts +85 -1
  238. package/lib/esm/LockControl.d.ts.map +1 -1
  239. package/lib/esm/LockControl.js.map +1 -1
  240. package/lib/esm/Material.d.ts +8 -1
  241. package/lib/esm/Material.d.ts.map +1 -1
  242. package/lib/esm/Material.js +6 -12
  243. package/lib/esm/Material.js.map +1 -1
  244. package/lib/esm/Model.d.ts +59 -20
  245. package/lib/esm/Model.d.ts.map +1 -1
  246. package/lib/esm/Model.js +39 -81
  247. package/lib/esm/Model.js.map +1 -1
  248. package/lib/esm/Relationship.d.ts +72 -7
  249. package/lib/esm/Relationship.d.ts.map +1 -1
  250. package/lib/esm/Relationship.js +40 -22
  251. package/lib/esm/Relationship.js.map +1 -1
  252. package/lib/esm/SchemaSync.js +5 -5
  253. package/lib/esm/SchemaSync.js.map +1 -1
  254. package/lib/esm/SheetIndex.d.ts +9 -0
  255. package/lib/esm/SheetIndex.d.ts.map +1 -1
  256. package/lib/esm/SheetIndex.js +38 -35
  257. package/lib/esm/SheetIndex.js.map +1 -1
  258. package/lib/esm/StashManager.js +1 -1
  259. package/lib/esm/StashManager.js.map +1 -1
  260. package/lib/esm/Texture.d.ts +6 -0
  261. package/lib/esm/Texture.d.ts.map +1 -1
  262. package/lib/esm/Texture.js +6 -14
  263. package/lib/esm/Texture.js.map +1 -1
  264. package/lib/esm/TxnManager.d.ts +105 -9
  265. package/lib/esm/TxnManager.d.ts.map +1 -1
  266. package/lib/esm/TxnManager.js +194 -15
  267. package/lib/esm/TxnManager.js.map +1 -1
  268. package/lib/esm/ViewDefinition.d.ts +21 -1
  269. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  270. package/lib/esm/ViewDefinition.js +27 -66
  271. package/lib/esm/ViewDefinition.js.map +1 -1
  272. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
  273. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
  274. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +33 -27
  275. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
  276. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
  277. package/lib/esm/annotations/TextAnnotationElement.js +6 -5
  278. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
  279. package/lib/esm/core-backend.d.ts +1 -0
  280. package/lib/esm/core-backend.d.ts.map +1 -1
  281. package/lib/esm/core-backend.js +1 -0
  282. package/lib/esm/core-backend.js.map +1 -1
  283. package/lib/esm/domains/FunctionalElements.d.ts +6 -2
  284. package/lib/esm/domains/FunctionalElements.d.ts.map +1 -1
  285. package/lib/esm/domains/FunctionalElements.js +8 -13
  286. package/lib/esm/domains/FunctionalElements.js.map +1 -1
  287. package/lib/esm/domains/GenericElements.d.ts +11 -4
  288. package/lib/esm/domains/GenericElements.d.ts.map +1 -1
  289. package/lib/esm/domains/GenericElements.js +13 -24
  290. package/lib/esm/domains/GenericElements.js.map +1 -1
  291. package/lib/esm/internal/ChannelAdmin.d.ts +15 -0
  292. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  293. package/lib/esm/internal/ChannelAdmin.js +6 -4
  294. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  295. package/lib/esm/internal/HubMock.d.ts +2 -0
  296. package/lib/esm/internal/HubMock.d.ts.map +1 -1
  297. package/lib/esm/internal/HubMock.js +7 -0
  298. package/lib/esm/internal/HubMock.js.map +1 -1
  299. package/lib/esm/internal/NoLocks.d.ts.map +1 -1
  300. package/lib/esm/internal/NoLocks.js +6 -0
  301. package/lib/esm/internal/NoLocks.js.map +1 -1
  302. package/lib/esm/internal/ServerBasedLocks.d.ts +12 -0
  303. package/lib/esm/internal/ServerBasedLocks.d.ts.map +1 -1
  304. package/lib/esm/internal/ServerBasedLocks.js +286 -5
  305. package/lib/esm/internal/ServerBasedLocks.js.map +1 -1
  306. package/lib/esm/internal/Symbols.d.ts +4 -0
  307. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  308. package/lib/esm/internal/Symbols.js +4 -0
  309. package/lib/esm/internal/Symbols.js.map +1 -1
  310. package/lib/esm/internal/annotations/fields.d.ts +3 -2
  311. package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
  312. package/lib/esm/internal/annotations/fields.js +7 -6
  313. package/lib/esm/internal/annotations/fields.js.map +1 -1
  314. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts +18 -3
  315. package/lib/esm/internal/workspace/SettingsEditorImpl.d.ts.map +1 -1
  316. package/lib/esm/internal/workspace/SettingsEditorImpl.js +52 -246
  317. package/lib/esm/internal/workspace/SettingsEditorImpl.js.map +1 -1
  318. package/lib/esm/internal/workspace/SettingsImpl.d.ts.map +1 -1
  319. package/lib/esm/internal/workspace/SettingsImpl.js.map +1 -1
  320. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts +0 -1
  321. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  322. package/lib/esm/internal/workspace/WorkspaceImpl.js +71 -41
  323. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  324. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
  325. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  326. package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
  327. package/lib/esm/test/ElementDrivesElement.test.d.ts +20 -19
  328. package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -1
  329. package/lib/esm/test/ElementDrivesElement.test.js +111 -96
  330. package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
  331. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  332. package/lib/esm/test/IModelHost.test.js +56 -2
  333. package/lib/esm/test/IModelHost.test.js.map +1 -1
  334. package/lib/esm/test/IModelTestUtils.d.ts +23 -23
  335. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  336. package/lib/esm/test/IModelTestUtils.js +466 -449
  337. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  338. package/lib/esm/test/IpcHost.test.js +112 -0
  339. package/lib/esm/test/IpcHost.test.js.map +1 -1
  340. package/lib/esm/test/PropertyDb.test.js +2 -2
  341. package/lib/esm/test/PropertyDb.test.js.map +1 -1
  342. package/lib/esm/test/SquashSchemaAndDataChanges.test.js +27 -18
  343. package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
  344. package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -1
  345. package/lib/esm/test/TestChangeSetUtility.js +11 -7
  346. package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
  347. package/lib/esm/test/TestEditTxn.d.ts +8 -0
  348. package/lib/esm/test/TestEditTxn.d.ts.map +1 -0
  349. package/lib/esm/test/TestEditTxn.js +34 -0
  350. package/lib/esm/test/TestEditTxn.js.map +1 -0
  351. package/lib/esm/test/TestUtils.d.ts +1 -0
  352. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  353. package/lib/esm/test/TestUtils.js +8 -1
  354. package/lib/esm/test/TestUtils.js.map +1 -1
  355. package/lib/esm/test/annotations/Fields.test.js +82 -90
  356. package/lib/esm/test/annotations/Fields.test.js.map +1 -1
  357. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
  358. package/lib/esm/test/annotations/TextAnnotation.test.js +156 -99
  359. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  360. package/lib/esm/test/annotations/TextBlock.test.js +5 -3
  361. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
  362. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
  363. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
  364. package/lib/esm/test/categories/Category.test.js +63 -3
  365. package/lib/esm/test/categories/Category.test.js.map +1 -1
  366. package/lib/esm/test/codespec/CodeSpec.test.js +88 -5
  367. package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
  368. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  369. package/lib/esm/test/ecdb/ECSqlAst.test.js +3 -2
  370. package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
  371. package/lib/esm/test/ecdb/ECSqlQuery.test.js +2 -2
  372. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  373. package/lib/esm/test/ecdb/ECSqlStatement.test.js +0 -1
  374. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  375. package/lib/esm/test/ecdb/QueryReaders.test.js +17 -14
  376. package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
  377. package/lib/esm/test/ecdb/SqliteStatement.test.js +2 -2
  378. package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
  379. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -1
  380. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +30 -28
  381. package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
  382. package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
  383. package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
  384. package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
  385. package/lib/esm/test/element/DeleteDefinitionElements.test.js +159 -143
  386. package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
  387. package/lib/esm/test/element/ElementAspect.test.js +68 -60
  388. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  389. package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -1
  390. package/lib/esm/test/element/ElementDependencyGraph.test.js +51 -43
  391. package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
  392. package/lib/esm/test/element/ElementRoundTrip.test.js +37 -38
  393. package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
  394. package/lib/esm/test/element/ExcludedElements.test.js +2 -2
  395. package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
  396. package/lib/esm/test/element/ExternalSource.test.js +40 -38
  397. package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
  398. package/lib/esm/test/element/NullStructArray.test.js +10 -9
  399. package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
  400. package/lib/esm/test/element/ProjectInformationRecord.test.js +5 -2
  401. package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
  402. package/lib/esm/test/element/SheetInformationAspect.test.js +43 -11
  403. package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
  404. package/lib/esm/test/element/UrlLink.test.js +2 -2
  405. package/lib/esm/test/element/UrlLink.test.js.map +1 -1
  406. package/lib/esm/test/font/IModelDbFonts.test.js +87 -73
  407. package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
  408. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +164 -125
  409. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  410. package/lib/esm/test/hubaccess/BriefcaseManager.test.js +2 -4
  411. package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
  412. package/lib/esm/test/hubaccess/Rebase.test.js +313 -247
  413. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  414. package/lib/esm/test/hubaccess/SemanticRebase.test.js +322 -247
  415. package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
  416. package/lib/esm/test/imodel/Code.test.js +31 -31
  417. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  418. package/lib/esm/test/imodel/ElementTreeWalker.test.js +57 -48
  419. package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
  420. package/lib/esm/test/imodel/IModel.test.js +419 -344
  421. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  422. package/lib/esm/test/imodel/ProjectExtents.test.js +2 -2
  423. package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
  424. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
  425. package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -1
  426. package/lib/esm/test/incrementalSchemaLocater/TestContext.js +2 -2
  427. package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
  428. package/lib/esm/test/index.d.ts +1 -0
  429. package/lib/esm/test/index.d.ts.map +1 -1
  430. package/lib/esm/test/index.js +1 -0
  431. package/lib/esm/test/index.js.map +1 -1
  432. package/lib/esm/test/schema/ClassRegistry.test.js +23 -22
  433. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  434. package/lib/esm/test/schema/FunctionalDomain.test.js +36 -34
  435. package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
  436. package/lib/esm/test/schema/GenericDomain.test.js +114 -94
  437. package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
  438. package/lib/esm/test/schema/IModelSchemaContext.test.js +2 -1
  439. package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
  440. package/lib/esm/test/schema/SchemaImportCallbacks.test.js +207 -192
  441. package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
  442. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +1 -3
  443. package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -1
  444. package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -247
  445. package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
  446. package/lib/esm/test/standalone/ChangeMerge.test.js +101 -82
  447. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  448. package/lib/esm/test/standalone/ChangesetReader.test.js +114 -85
  449. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  450. package/lib/esm/test/standalone/DisplayStyle.test.js +43 -40
  451. package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
  452. package/lib/esm/test/standalone/Drawing.test.js +4 -3
  453. package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
  454. package/lib/esm/test/standalone/EditTxn.test.d.ts +2 -0
  455. package/lib/esm/test/standalone/EditTxn.test.d.ts.map +1 -0
  456. package/lib/esm/test/standalone/EditTxn.test.js +219 -0
  457. package/lib/esm/test/standalone/EditTxn.test.js.map +1 -0
  458. package/lib/esm/test/standalone/ElementMesh.test.js +16 -13
  459. package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
  460. package/lib/esm/test/standalone/ExportGraphics.test.js +26 -20
  461. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  462. package/lib/esm/test/standalone/GeometryChangeEvents.test.js +11 -15
  463. package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
  464. package/lib/esm/test/standalone/GeometryStream.test.js +212 -165
  465. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  466. package/lib/esm/test/standalone/HubMock.test.js +31 -25
  467. package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
  468. package/lib/esm/test/standalone/IModelLimits.test.js +11 -8
  469. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
  470. package/lib/esm/test/standalone/IModelWrite.test.d.ts +2 -2
  471. package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -1
  472. package/lib/esm/test/standalone/IModelWrite.test.js +184 -142
  473. package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
  474. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts +2 -0
  475. package/lib/esm/test/standalone/ITwinWorkspace.test.d.ts.map +1 -0
  476. package/lib/esm/test/standalone/ITwinWorkspace.test.js +236 -0
  477. package/lib/esm/test/standalone/ITwinWorkspace.test.js.map +1 -0
  478. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +25 -22
  479. package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
  480. package/lib/esm/test/standalone/IntegrityCheck.test.js +20 -18
  481. package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
  482. package/lib/esm/test/standalone/MergeConflict.test.d.ts +2 -2
  483. package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -1
  484. package/lib/esm/test/standalone/MergeConflict.test.js +49 -33
  485. package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
  486. package/lib/esm/test/standalone/RenderMaterialElement.test.js +5 -5
  487. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  488. package/lib/esm/test/standalone/RenderTimeline.test.js +3 -2
  489. package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
  490. package/lib/esm/test/standalone/SectionDrawing.test.js +7 -7
  491. package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
  492. package/lib/esm/test/standalone/ServerBasedLocks.test.js +928 -22
  493. package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
  494. package/lib/esm/test/standalone/Settings.test.js +26 -4
  495. package/lib/esm/test/standalone/Settings.test.js.map +1 -1
  496. package/lib/esm/test/standalone/SettingsSchemas.test.js +2 -1
  497. package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
  498. package/lib/esm/test/standalone/SnapshotDb.test.js +3 -1
  499. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  500. package/lib/esm/test/standalone/StandaloneDb.test.js +7 -6
  501. package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
  502. package/lib/esm/test/standalone/Texture.test.js +5 -4
  503. package/lib/esm/test/standalone/Texture.test.js.map +1 -1
  504. package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -1
  505. package/lib/esm/test/standalone/TileCache.test.js +5 -3
  506. package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
  507. package/lib/esm/test/standalone/TileTree.test.js +35 -31
  508. package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
  509. package/lib/esm/test/standalone/TxnManager.test.js +700 -653
  510. package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
  511. package/lib/esm/test/standalone/ViewDefinition.test.js +295 -229
  512. package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
  513. package/lib/esm/test/standalone/Workspace.test.js +72 -22
  514. package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
  515. package/lib/esm/test/workspace/SettingsDb.test.js +28 -456
  516. package/lib/esm/test/workspace/SettingsDb.test.js.map +1 -1
  517. package/lib/esm/workspace/Settings.d.ts +11 -5
  518. package/lib/esm/workspace/Settings.d.ts.map +1 -1
  519. package/lib/esm/workspace/Settings.js.map +1 -1
  520. package/lib/esm/workspace/SettingsDb.d.ts +20 -99
  521. package/lib/esm/workspace/SettingsDb.d.ts.map +1 -1
  522. package/lib/esm/workspace/SettingsDb.js +20 -6
  523. package/lib/esm/workspace/SettingsDb.js.map +1 -1
  524. package/lib/esm/workspace/SettingsEditor.d.ts +40 -226
  525. package/lib/esm/workspace/SettingsEditor.d.ts.map +1 -1
  526. package/lib/esm/workspace/SettingsEditor.js +85 -24
  527. package/lib/esm/workspace/SettingsEditor.js.map +1 -1
  528. package/lib/esm/workspace/Workspace.d.ts +7 -11
  529. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  530. package/lib/esm/workspace/Workspace.js.map +1 -1
  531. package/lib/esm/workspace/WorkspaceEditor.d.ts +14 -0
  532. package/lib/esm/workspace/WorkspaceEditor.d.ts.map +1 -1
  533. package/lib/esm/workspace/WorkspaceEditor.js +1 -1
  534. package/lib/esm/workspace/WorkspaceEditor.js.map +1 -1
  535. package/package.json +14 -14
  536. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts +0 -38
  537. package/lib/cjs/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  538. package/lib/cjs/internal/workspace/SettingsDbImpl.js +0 -108
  539. package/lib/cjs/internal/workspace/SettingsDbImpl.js.map +0 -1
  540. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  541. package/lib/cjs/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  542. package/lib/cjs/internal/workspace/SettingsSqliteDb.js +0 -40
  543. package/lib/cjs/internal/workspace/SettingsSqliteDb.js.map +0 -1
  544. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts +0 -38
  545. package/lib/esm/internal/workspace/SettingsDbImpl.d.ts.map +0 -1
  546. package/lib/esm/internal/workspace/SettingsDbImpl.js +0 -104
  547. package/lib/esm/internal/workspace/SettingsDbImpl.js.map +0 -1
  548. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts +0 -14
  549. package/lib/esm/internal/workspace/SettingsSqliteDb.d.ts.map +0 -1
  550. package/lib/esm/internal/workspace/SettingsSqliteDb.js +0 -36
  551. package/lib/esm/internal/workspace/SettingsSqliteDb.js.map +0 -1
package/lib/cjs/Model.js CHANGED
@@ -14,6 +14,7 @@ const core_geometry_1 = require("@itwin/core-geometry");
14
14
  const core_common_1 = require("@itwin/core-common");
15
15
  const Element_1 = require("./Element");
16
16
  const Entity_1 = require("./Entity");
17
+ const EditTxn_1 = require("./EditTxn");
17
18
  const NavigationRelationship_1 = require("./NavigationRelationship");
18
19
  const Symbols_1 = require("./internal/Symbols");
19
20
  /** A Model is a container for persisting a collection of related elements within an iModel.
@@ -205,12 +206,9 @@ class Model extends Entity_1.Entity {
205
206
  removeUserProperties(nameSpace) { delete this.getAllUserProperties()[nameSpace]; }
206
207
  getJsonProperty(name) { return this.jsonProperties[name]; }
207
208
  setJsonProperty(name, value) { this.jsonProperties[name] = value; }
208
- /** Insert this Model in the iModel */
209
- insert() { return this.id = this.iModel.models.insertModel(this.toJSON()); }
210
- /** Update this Model in the iModel. */
211
- update() { this.iModel.models.updateModel(this.toJSON()); }
212
- /** Delete this Model from the iModel. */
213
- delete() { this.iModel.models.deleteModel(this.id); }
209
+ insert(txn) { return this.id = (txn ?? this.iModel[Symbols_1._implicitTxn]).insertModel(this.toJSON()); }
210
+ update(txn) { (txn ?? this.iModel[Symbols_1._implicitTxn]).updateModel(this.toJSON()); }
211
+ delete(txn) { (txn ?? this.iModel[Symbols_1._implicitTxn]).deleteModel(this.id); }
214
212
  collectReferenceIds(referenceIds) {
215
213
  super.collectReferenceIds(referenceIds);
216
214
  if (this.parentModel)
@@ -354,28 +352,22 @@ exports.SpatialModel = SpatialModel;
354
352
  */
355
353
  class PhysicalModel extends SpatialModel {
356
354
  static get className() { return "PhysicalModel"; }
357
- /** Insert a PhysicalPartition and a PhysicalModel that sub-models it.
358
- * @param iModelDb Insert into this iModel
359
- * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.
360
- * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.
361
- * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
362
- * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).
363
- * @throws [[IModelError]] if there is an insert problem.
364
- */
365
- static insert(iModelDb, parentSubjectId, name, isPlanProjection) {
355
+ static insert(txnOrDb, parentSubjectId, name, isPlanProjection) {
356
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
357
+ const iModelDb = txn.iModel;
366
358
  const partitionProps = {
367
359
  classFullName: Element_1.PhysicalPartition.classFullName,
368
360
  model: core_common_1.IModel.repositoryModelId,
369
361
  parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
370
362
  code: Element_1.PhysicalPartition.createCode(iModelDb, parentSubjectId, name),
371
363
  };
372
- const partitionId = iModelDb.elements.insertElement(partitionProps);
364
+ const partitionId = txn.insertElement(partitionProps);
373
365
  const modelProps = {
374
366
  classFullName: this.classFullName,
375
367
  modeledElement: { id: partitionId },
376
368
  isPlanProjection,
377
369
  };
378
- return iModelDb.models.insertModel(modelProps);
370
+ return txn.insertModel(modelProps);
379
371
  }
380
372
  }
381
373
  exports.PhysicalModel = PhysicalModel;
@@ -385,28 +377,22 @@ exports.PhysicalModel = PhysicalModel;
385
377
  */
386
378
  class SpatialLocationModel extends SpatialModel {
387
379
  static get className() { return "SpatialLocationModel"; }
388
- /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.
389
- * @param iModelDb Insert into this iModel
390
- * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.
391
- * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.
392
- * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.
393
- * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).
394
- * @throws [[IModelError]] if there is an insert problem.
395
- */
396
- static insert(iModelDb, parentSubjectId, name, isPlanProjection) {
380
+ static insert(txnOrDb, parentSubjectId, name, isPlanProjection) {
381
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
382
+ const iModelDb = txn.iModel;
397
383
  const partitionProps = {
398
384
  classFullName: Element_1.SpatialLocationPartition.classFullName,
399
385
  model: core_common_1.IModel.repositoryModelId,
400
386
  parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
401
387
  code: Element_1.SpatialLocationPartition.createCode(iModelDb, parentSubjectId, name),
402
388
  };
403
- const partitionId = iModelDb.elements.insertElement(partitionProps);
389
+ const partitionId = txn.insertElement(partitionProps);
404
390
  const modelProps = {
405
391
  classFullName: this.classFullName,
406
392
  modeledElement: { id: partitionId },
407
393
  isPlanProjection,
408
394
  };
409
- return iModelDb.models.insertModel(modelProps);
395
+ return txn.insertModel(modelProps);
410
396
  }
411
397
  }
412
398
  exports.SpatialLocationModel = SpatialLocationModel;
@@ -460,22 +446,15 @@ exports.GroupInformationModel = GroupInformationModel;
460
446
  */
461
447
  class SheetIndexModel extends InformationModel {
462
448
  static get className() { return "SheetIndexModel"; }
463
- /** Insert a SheetIndex and a SheetIndexModel that sub-models it.
464
- * @param iModelDb Insert into this iModel
465
- * @param parentSubjectId The SheetIndex will be inserted as a child of this Subject element.
466
- * @param name The name of the SheetIndex that the new SheetIndexModel will sub-model.
467
- * @returns The Id of the newly inserted SheetIndexModel.
468
- * @throws [[IModelError]] if there is an insert problem.
469
- */
470
- static insert(iModelDb, parentSubjectId, name) {
471
- const sheetIndex = {
449
+ static insert(txnOrDb, parentSubjectId, name) {
450
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
451
+ const partitionId = txn.insertElement({
472
452
  classFullName: Element_1.SheetIndexPartition.classFullName,
473
453
  model: core_common_1.IModel.repositoryModelId,
474
454
  parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
475
- code: Element_1.SheetIndexPartition.createCode(iModelDb, parentSubjectId, name),
476
- };
477
- const partitionId = iModelDb.elements.insertElement(sheetIndex);
478
- return iModelDb.models.insertModel({
455
+ code: Element_1.SheetIndexPartition.createCode(txn.iModel, parentSubjectId, name),
456
+ });
457
+ return txn.insertModel({
479
458
  classFullName: this.classFullName,
480
459
  modeledElement: { id: partitionId },
481
460
  });
@@ -488,22 +467,15 @@ exports.SheetIndexModel = SheetIndexModel;
488
467
  */
489
468
  class InformationRecordModel extends InformationModel {
490
469
  static get className() { return "InformationRecordModel"; }
491
- /** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.
492
- * @param iModelDb Insert into this iModel
493
- * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.
494
- * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.
495
- * @returns The Id of the newly inserted InformationRecordModel.
496
- * @throws [[IModelError]] if there is an insert problem.
497
- */
498
- static insert(iModelDb, parentSubjectId, name) {
499
- const partitionProps = {
470
+ static insert(txnOrDb, parentSubjectId, name) {
471
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
472
+ const partitionId = txn.insertElement({
500
473
  classFullName: Element_1.InformationRecordPartition.classFullName,
501
474
  model: core_common_1.IModel.repositoryModelId,
502
475
  parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
503
- code: Element_1.InformationRecordPartition.createCode(iModelDb, parentSubjectId, name),
504
- };
505
- const partitionId = iModelDb.elements.insertElement(partitionProps);
506
- return iModelDb.models.insertModel({
476
+ code: Element_1.InformationRecordPartition.createCode(txn.iModel, parentSubjectId, name),
477
+ });
478
+ return txn.insertModel({
507
479
  classFullName: this.classFullName,
508
480
  modeledElement: { id: partitionId },
509
481
  });
@@ -516,22 +488,15 @@ exports.InformationRecordModel = InformationRecordModel;
516
488
  */
517
489
  class DefinitionModel extends InformationModel {
518
490
  static get className() { return "DefinitionModel"; }
519
- /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.
520
- * @param iModelDb Insert into this iModel
521
- * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.
522
- * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.
523
- * @returns The Id of the newly inserted DefinitionModel.
524
- * @throws [[IModelError]] if there is an insert problem.
525
- */
526
- static insert(iModelDb, parentSubjectId, name) {
527
- const partitionProps = {
491
+ static insert(txnOrDb, parentSubjectId, name) {
492
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
493
+ const partitionId = txn.insertElement({
528
494
  classFullName: Element_1.DefinitionPartition.classFullName,
529
495
  model: core_common_1.IModel.repositoryModelId,
530
496
  parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
531
- code: Element_1.DefinitionPartition.createCode(iModelDb, parentSubjectId, name),
532
- };
533
- const partitionId = iModelDb.elements.insertElement(partitionProps);
534
- return iModelDb.models.insertModel({
497
+ code: Element_1.DefinitionPartition.createCode(txn.iModel, parentSubjectId, name),
498
+ });
499
+ return txn.insertModel({
535
500
  classFullName: this.classFullName,
536
501
  modeledElement: { id: partitionId },
537
502
  });
@@ -551,22 +516,15 @@ exports.RepositoryModel = RepositoryModel;
551
516
  */
552
517
  class DocumentListModel extends InformationModel {
553
518
  static get className() { return "DocumentListModel"; }
554
- /** Insert a DocumentPartition and a DocumentListModel that sub-models it.
555
- * @param iModelDb Insert into this iModel
556
- * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.
557
- * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.
558
- * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)
559
- * @throws [[IModelError]] if there is an insert problem.
560
- */
561
- static insert(iModelDb, parentSubjectId, name) {
562
- const partitionProps = {
519
+ static insert(txnOrDb, parentSubjectId, name) {
520
+ const txn = txnOrDb instanceof EditTxn_1.EditTxn ? txnOrDb : txnOrDb[Symbols_1._implicitTxn];
521
+ const partitionId = txn.insertElement({
563
522
  classFullName: Element_1.DocumentPartition.classFullName,
564
523
  model: core_common_1.IModel.repositoryModelId,
565
524
  parent: new NavigationRelationship_1.SubjectOwnsPartitionElements(parentSubjectId),
566
- code: Element_1.DocumentPartition.createCode(iModelDb, parentSubjectId, name),
567
- };
568
- const partitionId = iModelDb.elements.insertElement(partitionProps);
569
- return iModelDb.models.insertModel({
525
+ code: Element_1.DocumentPartition.createCode(txn.iModel, parentSubjectId, name),
526
+ });
527
+ return txn.insertModel({
570
528
  classFullName: this.classFullName,
571
529
  modeledElement: { id: partitionId },
572
530
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/Model.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qBAAqB;AAErB,sDAAwE;AACxE,wDAAwD;AACxD,oDAG4B;AAC5B,uCAAiK;AACjK,qCAA0F;AAE1F,qEAAwE;AACxE,gDAAuE;AA0CvE;;;;GAIG;AACH,MAAa,KAAM,SAAQ,eAAM;IACxB,MAAM,KAAc,SAAS,KAAa,OAAO,OAAO,CAAC,CAAC,CAAC;IAClE,gBAAgB;IACT,MAAM,KAAc,mBAAmB,KAAK,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IACjF,cAAc,CAAiB;IAC/B,IAAI,CAAS;IACb,WAAW,CAAc;IACzB,cAAc,CAAyB;IAChD,SAAS,CAAU;IACnB,UAAU,CAAU;IAE3B,YAAsB,KAAiB,EAAE,MAAgB;QACvD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC/D,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IA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AFD,0CAEC;AAED;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,gBAAgB;IAC9C,MAAM,KAAc,SAAS,KAAa,OAAO,mBAAmB,CAAC,CAAC,CAAC;IAC9E;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAAC,QAAkB,EAAE,eAA2B,EAAE,IAAY;QAChF,MAAM,cAAc,GAAqC;YACvD,aAAa,EAAE,2BAAiB,CAAC,aAAa;YAC9C,KAAK,EAAE,oBAAM,CAAC,iBAAiB;YAC/B,MAAM,EAAE,IAAI,qDAA4B,CAAC,eAAe,CAAC;YACzD,IAAI,EAAE,2BAAiB,CAAC,UAAU,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,CAAC;SACpE,CAAC;QACF,MAAM,WAAW,GAAe,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;QAChF,OAAO,QAAQ,CAAC,MAAM,CAAC,WAAW,CAAC;YACjC,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,8CAsBC;AAED;;;GAGG;AACH,MAAa,SAAU,SAAQ,gBAAgB;IACtC,MAAM,KAAc,SAAS,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;CACvE;AAFD,8BAEC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,eAAe;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;CAC7E;AAFD,0CAEC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,YAAY;IACzC,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;CAC9E;AAFD,4CAEC","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 Models\n */\n\n// cspell:ignore elid\n\nimport { GuidString, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { Point2d, Range3d } from \"@itwin/core-geometry\";\nimport {\n AxisAlignedBox3d, ElementProps, EntityReferenceSet, GeometricModel2dProps, GeometricModel3dProps, GeometricModelProps, IModel,\n InformationPartitionElementProps, ModelProps, RelatedElement,\n} from \"@itwin/core-common\";\nimport { DefinitionPartition, DocumentPartition, InformationRecordPartition, PhysicalPartition, SheetIndexPartition, SpatialLocationPartition } from \"./Element\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { SubjectOwnsPartitionElements } from \"./NavigationRelationship\";\nimport { _cache, _nativeDb, _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `Model.onXxx` static methods\n * @beta\n */\nexport interface OnModelArg {\n /** The iModel for the Model affected. */\n iModel: IModelDb;\n}\n\n/** Argument for the `Model.onXxx` static methods that supply the properties of a Model to be inserted or updated.\n * @beta\n */\nexport interface OnModelPropsArg extends OnModelArg {\n /** The new properties of the Model affected. */\n props: Readonly<ModelProps>;\n}\n\n/** Argument for the `Model.onXxx` static methods that only supply the Id of the affected Model.\n * @beta\n */\nexport interface OnModelIdArg extends OnModelArg {\n /** The Id of the Model affected */\n id: Id64String;\n}\n\n/** Argument for the `Model.onXxxElement` static methods that supply the properties of an Element for a Model.\n * @beta\n */\nexport interface OnElementInModelPropsArg extends OnModelIdArg {\n /** The new properties of an Element for the affected Model */\n elementProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Model.onXxxElement` static methods that supply the Id of an Element for a Model.\n * @beta\n */\nexport interface OnElementInModelIdArg extends OnModelIdArg {\n /** The Id of the Element for the affected Model */\n elementId: Id64String;\n}\n\n/** A Model is a container for persisting a collection of related elements within an iModel.\n * See [[IModelDb.Models]] for how to query and manage the Models in an IModelDb.\n * See [Creating models]($docs/learning/backend/CreateModels.md)\n * @public @preview\n */\nexport class Model extends Entity {\n public static override get className(): string { return \"Model\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n public readonly modeledElement: RelatedElement;\n public readonly name: string;\n public readonly parentModel?: Id64String;\n public readonly jsonProperties: { [key: string]: any };\n public isPrivate: boolean;\n public isTemplate: boolean;\n\n protected constructor(props: ModelProps, iModel: IModelDb) {\n super(props, iModel);\n this.modeledElement = new RelatedElement(props.modeledElement);\n this.name = props.name ? props.name : \"\"; // NB this isn't really a property of Model (it's the code.value of the modeled element), but it comes in ModelProps because it's often needed\n this.parentModel = props.parentModel;\n this.isPrivate = JsonUtils.asBool(props.isPrivate);\n this.isTemplate = JsonUtils.asBool(props.isTemplate);\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /**\n * Model custom HandledProps includes 'isPrivate', 'isTemplate', and 'lastMod'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"isPrivate\", source: \"Class\" },\n { propertyName: \"isTemplate\", source: \"Class\" },\n { propertyName: \"lastMod\", source: \"Class\" },\n ];\n\n /**\n * Model deserializes 'isPrivate', and 'isTemplate', and sets the proper parentModel.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelProps {\n const instance = props.row;\n const modelProps = super.deserialize(props) as ModelProps;\n const modeledElementProps = props.iModel.elements.tryGetElementProps(instance.modeledElement.id);\n if (modeledElementProps) {\n // ModeledElement may be undefined in the case of root Element\n modelProps.name = JsonUtils.asString(modeledElementProps.code.value);\n if (instance.parentModel !== undefined)\n modelProps.parentModel = instance.parentModel.id;\n else\n modelProps.parentModel = modeledElementProps.model;\n }\n if (instance.isPrivate === true)\n modelProps.isPrivate = true;\n if (instance.isTemplate === true)\n modelProps.isTemplate = true;\n return modelProps;\n }\n\n /**\n * Model serializes 'isPrivate', and 'isTemplate'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ModelProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.isPrivate = props.isPrivate ?? false;\n inst.isTemplate = props.isTemplate ?? false;\n return inst;\n }\n\n public override toJSON(): ModelProps {\n const val = super.toJSON() as ModelProps;\n val.name = this.name; // for cloning\n return val;\n }\n\n /** Called before a new Model is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to be inserted\n * @beta\n */\n protected static onInsert(arg: OnModelPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](props.modeledElement.id);\n if (props.parentModel) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parentModel, \"parent model\", \"insert\");\n }\n\n /** Called after a new Model is inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that was inserted\n * @beta\n */\n protected static onInserted(_arg: OnModelIdArg): void {\n // we don't need to tell LockControl about models being created - their ModeledElement does that\n }\n\n /** Called before a Model is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to be updated\n * @beta\n */\n protected static onUpdate(arg: OnModelPropsArg): void {\n const id = arg.props.id!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n arg.iModel.channels[_verifyChannel](id);\n arg.iModel.locks.checkExclusiveLock(id, \"model\", \"update\");\n }\n\n /** Called after a Model is updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that was updated.\n * @beta\n */\n protected static onUpdated(arg: OnModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n /** Called before a Model is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to be deleted\n * @beta\n */\n protected static onDelete(arg: OnModelIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.id);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"model\", \"delete\");\n }\n\n /** Called after a Model was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that was deleted\n * @beta\n */\n protected static onDeleted(arg: OnModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n arg.iModel.elements[_cache].deleteWithModel(arg.id);\n }\n\n /** Called before a prospective Element is to be inserted into an instance of a Model of this class.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to hold the element\n * @beta\n */\n protected static onInsertElement(_arg: OnElementInModelPropsArg): void { }\n\n /** Called after an Element has been inserted into an instance of a Model of this class.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onInsertedElement(arg: OnElementInModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n /** Called when an Element in an instance of a Model of this class is about to be updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onUpdateElement(_arg: OnElementInModelPropsArg): void { }\n\n /** Called after an Element in an instance of a Model of this class has been updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onUpdatedElement(arg: OnElementInModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n /** Called when an Element in an instance of a Model of this class is about to be deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onDeleteElement(_arg: OnElementInModelIdArg): void { }\n\n /** Called after an Element in an instance of a Model of this class has been deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that held the element\n * @beta\n */\n protected static onDeletedElement(arg: OnElementInModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n public getJsonProperty(name: string): any { return this.jsonProperties[name]; }\n public setJsonProperty(name: string, value: any) { this.jsonProperties[name] = value; }\n\n /** Insert this Model in the iModel */\n public insert() { return this.id = this.iModel.models.insertModel(this.toJSON()); }\n /** Update this Model in the iModel. */\n public update() { this.iModel.models.updateModel(this.toJSON()); }\n /** Delete this Model from the iModel. */\n public delete() { this.iModel.models.deleteModel(this.id); }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.parentModel)\n referenceIds.addModel(this.parentModel);\n referenceIds.addElement(this.modeledElement.id);\n }\n}\n\n/** A container for persisting geometric elements.\n * @public @preview\n */\nexport class GeometricModel extends Model {\n public geometryGuid?: GuidString;\n\n public static override get className(): string { return \"GeometricModel\"; }\n\n protected constructor(props: GeometricModelProps, iModel: IModelDb) {\n super(props, iModel);\n this.geometryGuid = props.geometryGuid;\n }\n\n /** Query for the union of the extents of the elements contained by this model.\n * @note This function blocks the JavaScript event loop. Consider using [[queryRange]] instead.\n */\n public queryExtents(): AxisAlignedBox3d {\n const extents = this.iModel[_nativeDb].queryModelExtents({ id: this.id }).modelExtents;\n return Range3d.fromJSON(extents);\n }\n\n /** Query for the union of the extents of all elements contained within this model. */\n public async queryRange(): Promise<AxisAlignedBox3d> {\n return this.iModel.models.queryRange(this.id);\n }\n}\n\n/** A container for persisting 3d geometric elements.\n * @public @preview\n */\nexport abstract class GeometricModel3d extends GeometricModel {\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane.\n * @note The associated ECProperty was added to the BisCore schema in version 1.0.8\n */\n public readonly isPlanProjection: boolean;\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index.\n * @note The associated ECProperty was added to the BisCore schema in version 1.0.8\n */\n public readonly isNotSpatiallyLocated: boolean;\n /** If true, then the elements in this GeometricModel3d are in real-world coordinates and will be in the spatial index. */\n public get isSpatiallyLocated(): boolean { return !this.isNotSpatiallyLocated; }\n\n public static override get className(): string { return \"GeometricModel3d\"; }\n\n protected constructor(props: GeometricModel3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.isNotSpatiallyLocated = JsonUtils.asBool(props.isNotSpatiallyLocated);\n this.isPlanProjection = JsonUtils.asBool(props.isPlanProjection);\n }\n\n /**\n * GeometricModel3d custom HandledProps includes 'isPlanProjection', and 'isNotSpatiallyLocated'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"isPlanProjection\", source: \"Class\" },\n { propertyName: \"isNotSpatiallyLocated\", source: \"Class\" },\n ];\n\n /**\n * GeometricModel3d deserializes 'isPlanProjection', and 'isNotSpatiallyLocated'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): GeometricModel3dProps {\n const modelProps = super.deserialize(props) as GeometricModel3dProps;\n const instance = props.row;\n if (instance.isNotSpatiallyLocated === true || instance.isTemplate === true)\n modelProps.isNotSpatiallyLocated = true;\n if (instance.isPlanProjection === true)\n modelProps.isPlanProjection = true;\n return modelProps;\n }\n\n /**\n * GeometricModel3d serializes 'isPlanProjection', and 'isNotSpatiallyLocated'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: GeometricModel3dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.isNotSpatiallyLocated = props.isNotSpatiallyLocated ?? false;\n inst.isPlanProjection = props.isPlanProjection ?? false;\n return inst;\n }\n\n public override toJSON(): GeometricModel3dProps {\n const val = super.toJSON() as GeometricModel3dProps;\n if (this.isNotSpatiallyLocated)\n val.isNotSpatiallyLocated = true;\n\n if (this.isPlanProjection)\n val.isPlanProjection = true;\n\n return val;\n }\n}\n\n/** A container for persisting 2d geometric elements.\n * @public @preview\n */\nexport abstract class GeometricModel2d extends GeometricModel {\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\n public globalOrigin?: Point2d;\n public static override get className(): string { return \"GeometricModel2d\"; }\n\n protected constructor(props: GeometricModel2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.globalOrigin = props.globalOrigin ? Point2d.fromJSON(props.globalOrigin) : undefined;\n }\n\n public override toJSON(): GeometricModel2dProps {\n const val = super.toJSON() as GeometricModel2dProps;\n if (undefined !== this.globalOrigin)\n val.globalOrigin = Point2d.fromJSON(this.globalOrigin);\n\n return val;\n }\n}\n\n/** A container for persisting 2d graphical elements.\n * @public @preview\n */\nexport abstract class GraphicalModel2d extends GeometricModel2d {\n public static override get className(): string { return \"GraphicalModel2d\"; }\n}\n\n/** A container for persisting GraphicalElement3d instances.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalPartition3d]]\n * @public @preview\n */\nexport abstract class GraphicalModel3d extends GeometricModel3d {\n public static override get className(): string { return \"GraphicalModel3d\"; }\n}\n\n/** A container for persisting 3d geometric elements that are spatially located.\n * @public @preview\n */\nexport abstract class SpatialModel extends GeometricModel3d {\n public static override get className(): string { return \"SpatialModel\"; }\n}\n\n/** A container for persisting physical elements that model physical space.\n * @see [[PhysicalPartition]]\n * @public @preview\n */\nexport class PhysicalModel extends SpatialModel {\n public static override get className(): string { return \"PhysicalModel\"; }\n /** Insert a PhysicalPartition and a PhysicalModel that sub-models it.\n * @param iModelDb Insert into this iModel\n * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.\n * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.\n * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.\n * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String {\n const partitionProps: InformationPartitionElementProps = {\n classFullName: PhysicalPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: PhysicalPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = iModelDb.elements.insertElement(partitionProps);\n const modelProps: GeometricModel3dProps = {\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n isPlanProjection,\n };\n return iModelDb.models.insertModel(modelProps);\n }\n}\n\n/** A container for persisting spatial location elements.\n * @see [[SpatialLocationPartition]]\n * @public @preview\n */\nexport class SpatialLocationModel extends SpatialModel {\n public static override get className(): string { return \"SpatialLocationModel\"; }\n /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it.\n * @param iModelDb Insert into this iModel\n * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.\n * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.\n * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.\n * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String {\n const partitionProps: InformationPartitionElementProps = {\n classFullName: SpatialLocationPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: SpatialLocationPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = iModelDb.elements.insertElement(partitionProps);\n const modelProps: GeometricModel3dProps = {\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n isPlanProjection,\n };\n return iModelDb.models.insertModel(modelProps);\n }\n}\n\n/** A 2d model that holds [[DrawingGraphic]]s. DrawingModels may be dimensional or non-dimensional.\n * @public @preview\n */\nexport class DrawingModel extends GraphicalModel2d {\n public static override get className(): string { return \"DrawingModel\"; }\n}\n\n/** A container for persisting section [[DrawingGraphic]]s.\n * @public @preview\n */\nexport class SectionDrawingModel extends DrawingModel {\n public static override get className(): string { return \"SectionDrawingModel\"; }\n}\n\n/** A container for persisting [[ViewAttachment]]s and [[DrawingGraphic]]s.\n * A SheetModel is a digital representation of a *sheet of paper*. SheetModels are 2d models in bounded paper coordinates.\n * SheetModels may contain annotation Elements as well as references to 2d or 3d Views.\n * @public @preview\n */\nexport class SheetModel extends GraphicalModel2d {\n public static override get className(): string { return \"SheetModel\"; }\n}\n\n/** A container for persisting role elements.\n * @public @preview\n */\nexport class RoleModel extends Model {\n public static override get className(): string { return \"RoleModel\"; }\n}\n\n/** A container for persisting information elements.\n * @public @preview\n */\nexport abstract class InformationModel extends Model {\n public static override get className(): string { return \"InformationModel\"; }\n}\n\n/** A container for persisting group information elements.\n * @see [[GroupInformationPartition]]\n * @public @preview\n */\nexport abstract class GroupInformationModel extends InformationModel {\n public static override get className(): string { return \"GroupInformationModel\"; }\n}\n\n/** A sub-model of a [[SheetIndexPartition]] serving as a container for persisting [[SheetIndexEntry]] and [[SheetIndex]] elements.\n * @beta\n */\nexport class SheetIndexModel extends InformationModel {\n public static override get className(): string { return \"SheetIndexModel\"; }\n\n /** Insert a SheetIndex and a SheetIndexModel that sub-models it.\n * @param iModelDb Insert into this iModel\n * @param parentSubjectId The SheetIndex will be inserted as a child of this Subject element.\n * @param name The name of the SheetIndex that the new SheetIndexModel will sub-model.\n * @returns The Id of the newly inserted SheetIndexModel.\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const sheetIndex: InformationPartitionElementProps = {\n classFullName: SheetIndexPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: SheetIndexPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = iModelDb.elements.insertElement(sheetIndex);\n return iModelDb.models.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** A container for persisting Information Record Elements\n * @see [[InformationRecordPartition]]\n * @public @preview\n */\nexport class InformationRecordModel extends InformationModel {\n public static override get className(): string { return \"InformationRecordModel\"; }\n\n /** Insert a InformationRecordPartition and a InformationRecordModel that sub-models it.\n * @param iModelDb Insert into this iModel\n * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.\n * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.\n * @returns The Id of the newly inserted InformationRecordModel.\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const partitionProps: InformationPartitionElementProps = {\n classFullName: InformationRecordPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: InformationRecordPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = iModelDb.elements.insertElement(partitionProps);\n return iModelDb.models.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** A container for persisting definition elements.\n * @see [[DefinitionPartition]]\n * @public @preview\n */\nexport class DefinitionModel extends InformationModel {\n public static override get className(): string { return \"DefinitionModel\"; }\n\n /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.\n * @param iModelDb Insert into this iModel\n * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.\n * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.\n * @returns The Id of the newly inserted DefinitionModel.\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const partitionProps: InformationPartitionElementProps = {\n classFullName: DefinitionPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: DefinitionPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = iModelDb.elements.insertElement(partitionProps);\n return iModelDb.models.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** The singleton container of repository-related information elements.\n * @public @preview\n */\nexport class RepositoryModel extends DefinitionModel {\n public static override get className(): string { return \"RepositoryModel\"; }\n}\n\n/** Contains a list of document elements.\n * @see [[DocumentPartition]]\n * @public @preview\n */\nexport class DocumentListModel extends InformationModel {\n public static override get className(): string { return \"DocumentListModel\"; }\n /** Insert a DocumentPartition and a DocumentListModel that sub-models it.\n * @param iModelDb Insert into this iModel\n * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.\n * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.\n * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const partitionProps: InformationPartitionElementProps = {\n classFullName: DocumentPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: DocumentPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId: Id64String = iModelDb.elements.insertElement(partitionProps);\n return iModelDb.models.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** A container for persisting link elements.\n * @see [[LinkPartition]]\n * @public @preview\n */\nexport class LinkModel extends InformationModel {\n public static override get className(): string { return \"LinkModel\"; }\n}\n\n/** The singleton container for repository-specific definition elements.\n * @public @preview\n */\nexport class DictionaryModel extends DefinitionModel {\n public static override get className(): string { return \"DictionaryModel\"; }\n}\n\n/** Obtains and displays multi-resolution tiled raster organized according to the WebMercator tiling system.\n * @public @preview\n */\nexport class WebMercatorModel extends SpatialModel {\n public static override get className(): string { return \"WebMercatorModel\"; }\n}\n"]}
1
+ {"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/Model.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qBAAqB;AAErB,sDAAwE;AACxE,wDAAwD;AACxD,oDAG4B;AAC5B,uCAAiK;AACjK,qCAA0F;AAC1F,uCAAo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2B,EAAE,eAA2B,EAAE,IAAY;QACzF,MAAM,GAAG,GAAG,OAAO,YAAY,iBAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAY,CAAC,CAAC;QACzE,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC;YACpC,aAAa,EAAE,2BAAiB,CAAC,aAAa;YAC9C,KAAK,EAAE,oBAAM,CAAC,iBAAiB;YAC/B,MAAM,EAAE,IAAI,qDAA4B,CAAC,eAAe,CAAC;YACzD,IAAI,EAAE,2BAAiB,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,CAAC;SACtE,CAAC,CAAC;QACH,OAAO,GAAG,CAAC,WAAW,CAAC;YACrB,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;CACF;AA1BD,8CA0BC;AAED;;;GAGG;AACH,MAAa,SAAU,SAAQ,gBAAgB;IACtC,MAAM,KAAc,SAAS,KAAa,OAAO,WAAW,CAAC,CAAC,CAAC;CACvE;AAFD,8BAEC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,eAAe;IAC3C,MAAM,KAAc,SAAS,KAAa,OAAO,iBAAiB,CAAC,CAAC,CAAC;CAC7E;AAFD,0CAEC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,YAAY;IACzC,MAAM,KAAc,SAAS,KAAa,OAAO,kBAAkB,CAAC,CAAC,CAAC;CAC9E;AAFD,4CAEC","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 Models\n */\n\n// cspell:ignore elid\n\nimport { GuidString, Id64String, JsonUtils } from \"@itwin/core-bentley\";\nimport { Point2d, Range3d } from \"@itwin/core-geometry\";\nimport {\n AxisAlignedBox3d, ElementProps, EntityReferenceSet, GeometricModel2dProps, GeometricModel3dProps, GeometricModelProps, IModel,\n InformationPartitionElementProps, ModelProps, RelatedElement,\n} from \"@itwin/core-common\";\nimport { DefinitionPartition, DocumentPartition, InformationRecordPartition, PhysicalPartition, SheetIndexPartition, SpatialLocationPartition } from \"./Element\";\nimport { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow, Entity } from \"./Entity\";\nimport { EditTxn } from \"./EditTxn\";\nimport { IModelDb } from \"./IModelDb\";\nimport { SubjectOwnsPartitionElements } from \"./NavigationRelationship\";\nimport { _cache, _implicitTxn, _nativeDb, _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `Model.onXxx` static methods\n * @beta\n */\nexport interface OnModelArg {\n /** The iModel for the Model affected. */\n iModel: IModelDb;\n}\n\n/** Argument for the `Model.onXxx` static methods that supply the properties of a Model to be inserted or updated.\n * @beta\n */\nexport interface OnModelPropsArg extends OnModelArg {\n /** The new properties of the Model affected. */\n props: Readonly<ModelProps>;\n}\n\n/** Argument for the `Model.onXxx` static methods that only supply the Id of the affected Model.\n * @beta\n */\nexport interface OnModelIdArg extends OnModelArg {\n /** The Id of the Model affected */\n id: Id64String;\n}\n\n/** Argument for the `Model.onXxxElement` static methods that supply the properties of an Element for a Model.\n * @beta\n */\nexport interface OnElementInModelPropsArg extends OnModelIdArg {\n /** The new properties of an Element for the affected Model */\n elementProps: Readonly<ElementProps>;\n}\n\n/** Argument for the `Model.onXxxElement` static methods that supply the Id of an Element for a Model.\n * @beta\n */\nexport interface OnElementInModelIdArg extends OnModelIdArg {\n /** The Id of the Element for the affected Model */\n elementId: Id64String;\n}\n\n/** A Model is a container for persisting a collection of related elements within an iModel.\n * See [[IModelDb.Models]] for how to query and manage the Models in an IModelDb.\n * See [Creating models]($docs/learning/backend/CreateModels.md)\n * @public @preview\n */\nexport class Model extends Entity {\n public static override get className(): string { return \"Model\"; }\n /** @internal */\n public static override get protectedOperations() { return [\"onInsert\", \"onUpdate\", \"onDelete\"]; }\n public readonly modeledElement: RelatedElement;\n public readonly name: string;\n public readonly parentModel?: Id64String;\n public readonly jsonProperties: { [key: string]: any };\n public isPrivate: boolean;\n public isTemplate: boolean;\n\n protected constructor(props: ModelProps, iModel: IModelDb) {\n super(props, iModel);\n this.modeledElement = new RelatedElement(props.modeledElement);\n this.name = props.name ? props.name : \"\"; // NB this isn't really a property of Model (it's the code.value of the modeled element), but it comes in ModelProps because it's often needed\n this.parentModel = props.parentModel;\n this.isPrivate = JsonUtils.asBool(props.isPrivate);\n this.isTemplate = JsonUtils.asBool(props.isTemplate);\n this.jsonProperties = { ...props.jsonProperties }; // make sure we have our own copy\n }\n\n /**\n * Model custom HandledProps includes 'isPrivate', 'isTemplate', and 'lastMod'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"isPrivate\", source: \"Class\" },\n { propertyName: \"isTemplate\", source: \"Class\" },\n { propertyName: \"lastMod\", source: \"Class\" },\n ];\n\n /**\n * Model deserializes 'isPrivate', and 'isTemplate', and sets the proper parentModel.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): ModelProps {\n const instance = props.row;\n const modelProps = super.deserialize(props) as ModelProps;\n const modeledElementProps = props.iModel.elements.tryGetElementProps(instance.modeledElement.id);\n if (modeledElementProps) {\n // ModeledElement may be undefined in the case of root Element\n modelProps.name = JsonUtils.asString(modeledElementProps.code.value);\n if (instance.parentModel !== undefined)\n modelProps.parentModel = instance.parentModel.id;\n else\n modelProps.parentModel = modeledElementProps.model;\n }\n if (instance.isPrivate === true)\n modelProps.isPrivate = true;\n if (instance.isTemplate === true)\n modelProps.isTemplate = true;\n return modelProps;\n }\n\n /**\n * Model serializes 'isPrivate', and 'isTemplate'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: ModelProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.isPrivate = props.isPrivate ?? false;\n inst.isTemplate = props.isTemplate ?? false;\n return inst;\n }\n\n public override toJSON(): ModelProps {\n const val = super.toJSON() as ModelProps;\n val.name = this.name; // for cloning\n return val;\n }\n\n /** Called before a new Model is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to be inserted\n * @beta\n */\n protected static onInsert(arg: OnModelPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](props.modeledElement.id);\n if (props.parentModel) // inserting requires shared lock on parent, if present\n iModel.locks.checkSharedLock(props.parentModel, \"parent model\", \"insert\");\n }\n\n /** Called after a new Model is inserted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that was inserted\n * @beta\n */\n protected static onInserted(_arg: OnModelIdArg): void {\n // we don't need to tell LockControl about models being created - their ModeledElement does that\n }\n\n /** Called before a Model is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to be updated\n * @beta\n */\n protected static onUpdate(arg: OnModelPropsArg): void {\n const id = arg.props.id!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n arg.iModel.channels[_verifyChannel](id);\n arg.iModel.locks.checkExclusiveLock(id, \"model\", \"update\");\n }\n\n /** Called after a Model is updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that was updated.\n * @beta\n */\n protected static onUpdated(arg: OnModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n /** Called before a Model is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to be deleted\n * @beta\n */\n protected static onDelete(arg: OnModelIdArg): void {\n arg.iModel.channels[_verifyChannel](arg.id);\n arg.iModel.locks.checkExclusiveLock(arg.id, \"model\", \"delete\");\n }\n\n /** Called after a Model was deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that was deleted\n * @beta\n */\n protected static onDeleted(arg: OnModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n arg.iModel.elements[_cache].deleteWithModel(arg.id);\n }\n\n /** Called before a prospective Element is to be inserted into an instance of a Model of this class.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model to hold the element\n * @beta\n */\n protected static onInsertElement(_arg: OnElementInModelPropsArg): void { }\n\n /** Called after an Element has been inserted into an instance of a Model of this class.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onInsertedElement(arg: OnElementInModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n /** Called when an Element in an instance of a Model of this class is about to be updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onUpdateElement(_arg: OnElementInModelPropsArg): void { }\n\n /** Called after an Element in an instance of a Model of this class has been updated.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onUpdatedElement(arg: OnElementInModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n /** Called when an Element in an instance of a Model of this class is about to be deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model holding the element\n * @beta\n */\n protected static onDeleteElement(_arg: OnElementInModelIdArg): void { }\n\n /** Called after an Element in an instance of a Model of this class has been deleted.\n * @note If you override this method, you must call super.\n * @note `this` is the class of the Model that held the element\n * @beta\n */\n protected static onDeletedElement(arg: OnElementInModelIdArg): void {\n arg.iModel.models[_cache].delete(arg.id);\n }\n\n private getAllUserProperties(): any {\n if (!this.jsonProperties.UserProps)\n this.jsonProperties.UserProps = new Object();\n\n return this.jsonProperties.UserProps;\n }\n\n /** Get a set of JSON user properties by namespace */\n public getUserProperties(namespace: string) { return this.getAllUserProperties()[namespace]; }\n\n /** Change a set of user JSON properties of this Element by namespace. */\n public setUserProperties(nameSpace: string, value: any) { this.getAllUserProperties()[nameSpace] = value; }\n\n /** Remove a set of JSON user properties, specified by namespace, from this Element */\n public removeUserProperties(nameSpace: string) { delete this.getAllUserProperties()[nameSpace]; }\n\n public getJsonProperty(name: string): any { return this.jsonProperties[name]; }\n public setJsonProperty(name: string, value: any) { this.jsonProperties[name] = value; }\n\n /**\n * Insert this Model in the iModel using the supplied EditTxn.\n * @beta\n */\n public insert(txn: EditTxn): Id64String;\n /**\n * Insert this Model in the iModel.\n * @deprecated Use Model.insert(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.\n */\n public insert(): Id64String;\n public insert(txn?: EditTxn) { return this.id = (txn ?? this.iModel[_implicitTxn]).insertModel(this.toJSON()); }\n\n /**\n * Update this Model in the iModel using the supplied EditTxn.\n * @beta\n */\n public update(txn: EditTxn): void;\n /**\n * Update this Model in the iModel.\n * @deprecated Use Model.update(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.\n */\n public update(): void;\n public update(txn?: EditTxn) { (txn ?? this.iModel[_implicitTxn]).updateModel(this.toJSON()); }\n\n /**\n * Delete this Model from the iModel using the supplied EditTxn.\n * @beta\n */\n public delete(txn: EditTxn): void;\n /**\n * Delete this Model from the iModel.\n * @deprecated Use Model.delete(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.\n */\n public delete(): void;\n public delete(txn?: EditTxn) { (txn ?? this.iModel[_implicitTxn]).deleteModel(this.id); }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.parentModel)\n referenceIds.addModel(this.parentModel);\n referenceIds.addElement(this.modeledElement.id);\n }\n}\n\n/** A container for persisting geometric elements.\n * @public @preview\n */\nexport class GeometricModel extends Model {\n public geometryGuid?: GuidString;\n\n public static override get className(): string { return \"GeometricModel\"; }\n\n protected constructor(props: GeometricModelProps, iModel: IModelDb) {\n super(props, iModel);\n this.geometryGuid = props.geometryGuid;\n }\n\n /** Query for the union of the extents of the elements contained by this model.\n * @note This function blocks the JavaScript event loop. Consider using [[queryRange]] instead.\n */\n public queryExtents(): AxisAlignedBox3d {\n const extents = this.iModel[_nativeDb].queryModelExtents({ id: this.id }).modelExtents;\n return Range3d.fromJSON(extents);\n }\n\n /** Query for the union of the extents of all elements contained within this model. */\n public async queryRange(): Promise<AxisAlignedBox3d> {\n return this.iModel.models.queryRange(this.id);\n }\n}\n\n/** A container for persisting 3d geometric elements.\n * @public @preview\n */\nexport abstract class GeometricModel3d extends GeometricModel {\n /** If true, then the elements in this GeometricModel3d are expected to be in an XY plane.\n * @note The associated ECProperty was added to the BisCore schema in version 1.0.8\n */\n public readonly isPlanProjection: boolean;\n /** If true, then the elements in this GeometricModel3d are not in real-world coordinates and will not be in the spatial index.\n * @note The associated ECProperty was added to the BisCore schema in version 1.0.8\n */\n public readonly isNotSpatiallyLocated: boolean;\n /** If true, then the elements in this GeometricModel3d are in real-world coordinates and will be in the spatial index. */\n public get isSpatiallyLocated(): boolean { return !this.isNotSpatiallyLocated; }\n\n public static override get className(): string { return \"GeometricModel3d\"; }\n\n protected constructor(props: GeometricModel3dProps, iModel: IModelDb) {\n super(props, iModel);\n this.isNotSpatiallyLocated = JsonUtils.asBool(props.isNotSpatiallyLocated);\n this.isPlanProjection = JsonUtils.asBool(props.isPlanProjection);\n }\n\n /**\n * GeometricModel3d custom HandledProps includes 'isPlanProjection', and 'isNotSpatiallyLocated'.\n * @inheritdoc\n * @beta\n */\n protected static override readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"isPlanProjection\", source: \"Class\" },\n { propertyName: \"isNotSpatiallyLocated\", source: \"Class\" },\n ];\n\n /**\n * GeometricModel3d deserializes 'isPlanProjection', and 'isNotSpatiallyLocated'.\n * @inheritdoc\n * @beta\n */\n public static override deserialize(props: DeserializeEntityArgs): GeometricModel3dProps {\n const modelProps = super.deserialize(props) as GeometricModel3dProps;\n const instance = props.row;\n if (instance.isNotSpatiallyLocated === true || instance.isTemplate === true)\n modelProps.isNotSpatiallyLocated = true;\n if (instance.isPlanProjection === true)\n modelProps.isPlanProjection = true;\n return modelProps;\n }\n\n /**\n * GeometricModel3d serializes 'isPlanProjection', and 'isNotSpatiallyLocated'.\n * @inheritdoc\n * @beta\n */\n public static override serialize(props: GeometricModel3dProps, _iModel: IModelDb): ECSqlRow {\n const inst = super.serialize(props, _iModel);\n inst.isNotSpatiallyLocated = props.isNotSpatiallyLocated ?? false;\n inst.isPlanProjection = props.isPlanProjection ?? false;\n return inst;\n }\n\n public override toJSON(): GeometricModel3dProps {\n const val = super.toJSON() as GeometricModel3dProps;\n if (this.isNotSpatiallyLocated)\n val.isNotSpatiallyLocated = true;\n\n if (this.isPlanProjection)\n val.isPlanProjection = true;\n\n return val;\n }\n}\n\n/** A container for persisting 2d geometric elements.\n * @public @preview\n */\nexport abstract class GeometricModel2d extends GeometricModel {\n /** The actual coordinates of (0,0) in modeling coordinates. An offset applied to all modeling coordinates. */\n public globalOrigin?: Point2d;\n public static override get className(): string { return \"GeometricModel2d\"; }\n\n protected constructor(props: GeometricModel2dProps, iModel: IModelDb) {\n super(props, iModel);\n this.globalOrigin = props.globalOrigin ? Point2d.fromJSON(props.globalOrigin) : undefined;\n }\n\n public override toJSON(): GeometricModel2dProps {\n const val = super.toJSON() as GeometricModel2dProps;\n if (undefined !== this.globalOrigin)\n val.globalOrigin = Point2d.fromJSON(this.globalOrigin);\n\n return val;\n }\n}\n\n/** A container for persisting 2d graphical elements.\n * @public @preview\n */\nexport abstract class GraphicalModel2d extends GeometricModel2d {\n public static override get className(): string { return \"GraphicalModel2d\"; }\n}\n\n/** A container for persisting GraphicalElement3d instances.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.8\n * @see [[GraphicalPartition3d]]\n * @public @preview\n */\nexport abstract class GraphicalModel3d extends GeometricModel3d {\n public static override get className(): string { return \"GraphicalModel3d\"; }\n}\n\n/** A container for persisting 3d geometric elements that are spatially located.\n * @public @preview\n */\nexport abstract class SpatialModel extends GeometricModel3d {\n public static override get className(): string { return \"SpatialModel\"; }\n}\n\n/** A container for persisting physical elements that model physical space.\n * @see [[PhysicalPartition]]\n * @public @preview\n */\nexport class PhysicalModel extends SpatialModel {\n public static override get className(): string { return \"PhysicalModel\"; }\n /** Insert a PhysicalPartition and a PhysicalModel that sub-models it using an explicit transaction.\n * @param txn The EditTxn used to perform inserts.\n * @param parentSubjectId The PhysicalPartition will be inserted as a child of this Subject element.\n * @param name The name of the PhysicalPartition that the new PhysicalModel will sub-model.\n * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.\n * @returns The Id of the newly inserted PhysicalPartition and PhysicalModel (same value).\n * @throws [[IModelError]] if there is an insert problem.\n * @beta\n */\n public static insert(txn: EditTxn, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;\n /** @deprecated Use PhysicalModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help. */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const iModelDb = txn.iModel;\n const partitionProps: InformationPartitionElementProps = {\n classFullName: PhysicalPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: PhysicalPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = txn.insertElement(partitionProps);\n const modelProps: GeometricModel3dProps = {\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n isPlanProjection,\n };\n return txn.insertModel(modelProps);\n }\n}\n\n/** A container for persisting spatial location elements.\n * @see [[SpatialLocationPartition]]\n * @public @preview\n */\nexport class SpatialLocationModel extends SpatialModel {\n public static override get className(): string { return \"SpatialLocationModel\"; }\n /** Insert a SpatialLocationPartition and a SpatialLocationModel that sub-models it using an explicit transaction.\n * @param txn The EditTxn used to perform inserts.\n * @param parentSubjectId The SpatialLocationPartition will be inserted as a child of this Subject element.\n * @param name The name of the SpatialLocationPartition that the new SpatialLocationModel will sub-model.\n * @param isPlanProjection Optional value (default is false) that indicates if the contents of this model are expected to be in an XY plane.\n * @returns The Id of the newly inserted SpatialLocationPartition and SpatialLocationModel (same value).\n * @throws [[IModelError]] if there is an insert problem.\n * @beta\n */\n public static insert(txn: EditTxn, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;\n /** @deprecated Use SpatialLocationModel.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help. */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, parentSubjectId: Id64String, name: string, isPlanProjection?: boolean): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const iModelDb = txn.iModel;\n const partitionProps: InformationPartitionElementProps = {\n classFullName: SpatialLocationPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: SpatialLocationPartition.createCode(iModelDb, parentSubjectId, name),\n };\n const partitionId = txn.insertElement(partitionProps);\n const modelProps: GeometricModel3dProps = {\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n isPlanProjection,\n };\n return txn.insertModel(modelProps);\n }\n}\n\n/** A 2d model that holds [[DrawingGraphic]]s. DrawingModels may be dimensional or non-dimensional.\n * @public @preview\n */\nexport class DrawingModel extends GraphicalModel2d {\n public static override get className(): string { return \"DrawingModel\"; }\n}\n\n/** A container for persisting section [[DrawingGraphic]]s.\n * @public @preview\n */\nexport class SectionDrawingModel extends DrawingModel {\n public static override get className(): string { return \"SectionDrawingModel\"; }\n}\n\n/** A container for persisting [[ViewAttachment]]s and [[DrawingGraphic]]s.\n * A SheetModel is a digital representation of a *sheet of paper*. SheetModels are 2d models in bounded paper coordinates.\n * SheetModels may contain annotation Elements as well as references to 2d or 3d Views.\n * @public @preview\n */\nexport class SheetModel extends GraphicalModel2d {\n public static override get className(): string { return \"SheetModel\"; }\n}\n\n/** A container for persisting role elements.\n * @public @preview\n */\nexport class RoleModel extends Model {\n public static override get className(): string { return \"RoleModel\"; }\n}\n\n/** A container for persisting information elements.\n * @public @preview\n */\nexport abstract class InformationModel extends Model {\n public static override get className(): string { return \"InformationModel\"; }\n}\n\n/** A container for persisting group information elements.\n * @see [[GroupInformationPartition]]\n * @public @preview\n */\nexport abstract class GroupInformationModel extends InformationModel {\n public static override get className(): string { return \"GroupInformationModel\"; }\n}\n\n/** A sub-model of a [[SheetIndexPartition]] serving as a container for persisting [[SheetIndexEntry]] and [[SheetIndex]] elements.\n * @beta\n */\nexport class SheetIndexModel extends InformationModel {\n public static override get className(): string { return \"SheetIndexModel\"; }\n\n /** Insert a [[SheetIndexPartition]] and a SheetIndexModel that sub-models it.\n * @param txn The active EditTxn.\n * @param parentSubjectId The SheetIndexPartition will be inserted as a child of this Subject element.\n * @param name The name of the SheetIndexPartition that the new SheetIndexModel will sub-model.\n * @returns The Id of the newly inserted SheetIndexModel.\n * @throws [[IModelError]] if there is an insert problem.\n */\n public static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;\n /** @deprecated Use SheetIndexModel.insert(txn, ...) instead. */\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const partitionId = txn.insertElement({\n classFullName: SheetIndexPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: SheetIndexPartition.createCode(txn.iModel, parentSubjectId, name),\n });\n return txn.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** A container for persisting Information Record Elements\n * @see [[InformationRecordPartition]]\n * @public @preview\n */\nexport class InformationRecordModel extends InformationModel {\n public static override get className(): string { return \"InformationRecordModel\"; }\n\n /** Insert an InformationRecordPartition and an InformationRecordModel that sub-models it using an explicit transaction.\n * @param txn The EditTxn used to perform inserts.\n * @param parentSubjectId The InformationRecordPartition will be inserted as a child of this Subject element.\n * @param name The name of the InformationRecordPartition that the new InformationRecordModel will sub-model.\n * @returns The Id of the newly inserted InformationRecordModel.\n * @throws [[IModelError]] if there is an insert problem.\n * @beta\n */\n public static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const partitionId = txn.insertElement({\n classFullName: InformationRecordPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: InformationRecordPartition.createCode(txn.iModel, parentSubjectId, name),\n });\n return txn.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** A container for persisting definition elements.\n * @see [[DefinitionPartition]]\n * @public @preview\n */\nexport class DefinitionModel extends InformationModel {\n public static override get className(): string { return \"DefinitionModel\"; }\n\n /** Insert a DefinitionPartition and a DefinitionModel that sub-models it.\n * @param txn The active EditTxn.\n * @param parentSubjectId The DefinitionPartition will be inserted as a child of this Subject element.\n * @param name The name of the DefinitionPartition that the new DefinitionModel will sub-model.\n * @returns The Id of the newly inserted DefinitionModel.\n * @throws [[IModelError]] if there is an insert problem.\n * @beta\n */\n public static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const partitionId = txn.insertElement({\n classFullName: DefinitionPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: DefinitionPartition.createCode(txn.iModel, parentSubjectId, name),\n });\n return txn.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** The singleton container of repository-related information elements.\n * @public @preview\n */\nexport class RepositoryModel extends DefinitionModel {\n public static override get className(): string { return \"RepositoryModel\"; }\n}\n\n/** Contains a list of document elements.\n * @see [[DocumentPartition]]\n * @public @preview\n */\nexport class DocumentListModel extends InformationModel {\n public static override get className(): string { return \"DocumentListModel\"; }\n\n /** Insert a [[DocumentPartition]] and a DocumentListModel that sub-models it.\n * @param txn The active EditTxn.\n * @param parentSubjectId The DocumentPartition will be inserted as a child of this Subject element.\n * @param name The name of the DocumentPartition that the new DocumentListModel will sub-model.\n * @returns The Id of the newly inserted DocumentPartition and DocumentListModel (same value)\n * @throws [[IModelError]] if there is an insert problem.\n * @beta\n */\n public static insert(txn: EditTxn, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(iModelDb: IModelDb, parentSubjectId: Id64String, name: string): Id64String;\n public static insert(txnOrDb: EditTxn | IModelDb, parentSubjectId: Id64String, name: string): Id64String {\n const txn = txnOrDb instanceof EditTxn ? txnOrDb : txnOrDb[_implicitTxn];\n const partitionId = txn.insertElement({\n classFullName: DocumentPartition.classFullName,\n model: IModel.repositoryModelId,\n parent: new SubjectOwnsPartitionElements(parentSubjectId),\n code: DocumentPartition.createCode(txn.iModel, parentSubjectId, name),\n });\n return txn.insertModel({\n classFullName: this.classFullName,\n modeledElement: { id: partitionId },\n });\n }\n}\n\n/** A container for persisting link elements.\n * @see [[LinkPartition]]\n * @public @preview\n */\nexport class LinkModel extends InformationModel {\n public static override get className(): string { return \"LinkModel\"; }\n}\n\n/** The singleton container for repository-specific definition elements.\n * @public @preview\n */\nexport class DictionaryModel extends DefinitionModel {\n public static override get className(): string { return \"DictionaryModel\"; }\n}\n\n/** Obtains and displays multi-resolution tiled raster organized according to the WebMercator tiling system.\n * @public @preview\n */\nexport class WebMercatorModel extends SpatialModel {\n public static override get className(): string { return \"WebMercatorModel\"; }\n}\n"]}
@@ -4,9 +4,21 @@
4
4
  import { Id64String } from "@itwin/core-bentley";
5
5
  import { EntityReferenceSet, RelationshipProps, SourceAndTarget } from "@itwin/core-common";
6
6
  import { Entity } from "./Entity";
7
+ import { EditTxn } from "./EditTxn";
7
8
  import { IModelDb } from "./IModelDb";
8
9
  import { RelationshipClass } from "@itwin/ecschema-metadata";
9
10
  export type { SourceAndTarget, RelationshipProps } from "@itwin/core-common";
11
+ /** Argument for relationship dependency callbacks.
12
+ * @beta
13
+ */
14
+ export interface OnDependencyArg {
15
+ /** The iModel for the relationship affected by this method. */
16
+ iModel: IModelDb;
17
+ /** The ElementDrivesElement relationship instance affected by this method. */
18
+ props: RelationshipProps;
19
+ /** The transaction for indirect processing. */
20
+ indirectEditTxn: EditTxn;
21
+ }
10
22
  /** Base class for all link table ECRelationships
11
23
  * @public
12
24
  */
@@ -18,26 +30,65 @@ export declare class Relationship extends Entity {
18
30
  toJSON(): RelationshipProps;
19
31
  /** Query metadata for this relationship class from the iModel's schema. Returns cached metadata if available.*/
20
32
  getMetaData(): Promise<RelationshipClass>;
33
+ /**
34
+ * Callback invoked by saveChanges on an ElementDrivesElement relationship when its input has changed or is the output of some upstream relationship whose input has changed.
35
+ * This callback is invoked after the input element has been processed by upstream relationships.
36
+ * A subclass of ElementDrivesElement can re-implement this static method to take some action. onRootChanged may modify the output element only.
37
+ * @beta
38
+ */
39
+ static onRootChangedArg(arg: OnDependencyArg): void;
21
40
  /**
22
41
  * Callback invoked by saveChanges on an ElementDrivesElement relationship when its input has changed or is the output of some upstream relationship whose input has changed.
23
42
  * This callback is invoked after the input element has been processed by upstream relationships.
24
43
  * A subclass of ElementDrivesElement can re-implement this static method to take some action. onRootChanged may modify the output element only.
25
44
  * @param _props The ElementDrivesElement relationship instance.
26
45
  * @param _iModel The iModel
46
+ * @deprecated Use onRootChangedArg instead.
27
47
  */
28
48
  static onRootChanged(_props: RelationshipProps, _iModel: IModelDb): void;
49
+ /**
50
+ * Callback invoked by saveChanges on an ElementDrivesElement relationship when the relationship instance has been deleted.
51
+ * A subclass of ElementDrivesElement can re-implement this static method to take some action.
52
+ * @beta
53
+ */
54
+ static onDeletedDependencyArg(arg: OnDependencyArg): void;
29
55
  /**
30
56
  * Callback invoked by saveChanges on an ElementDrivesElement relationship when the relationship instance has been deleted.
31
57
  * A subclass of ElementDrivesElement can re-implement this static method to take some action.
32
58
  * @param _props The deleted ElementDrivesElement relationship instance.
33
59
  * @param _iModel The iModel
60
+ * @deprecated Use onDeletedDependencyArg instead.
34
61
  */
35
62
  static onDeletedDependency(_props: RelationshipProps, _iModel: IModelDb): void;
36
- /** Insert this Relationship into the iModel. */
63
+ /**
64
+ * Insert this Relationship into the iModel using the supplied EditTxn.
65
+ * @beta
66
+ */
67
+ insert(txn: EditTxn): Id64String;
68
+ /**
69
+ * Insert this Relationship into the iModel.
70
+ * @deprecated Use Relationship.insert(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
71
+ */
37
72
  insert(): Id64String;
38
- /** Update this Relationship in the iModel. */
73
+ /**
74
+ * Update this Relationship in the iModel using the supplied EditTxn.
75
+ * @beta
76
+ */
77
+ update(txn: EditTxn): void;
78
+ /**
79
+ * Update this Relationship in the iModel.
80
+ * @deprecated Use Relationship.update(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
81
+ */
39
82
  update(): void;
40
- /** Delete this Relationship from the iModel. */
83
+ /**
84
+ * Delete this Relationship from the iModel using the supplied EditTxn.
85
+ * @beta
86
+ */
87
+ delete(txn: EditTxn): void;
88
+ /**
89
+ * Delete this Relationship from the iModel.
90
+ * @deprecated Use Relationship.delete(txn) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
91
+ */
41
92
  delete(): void;
42
93
  static getInstance<T extends Relationship>(iModel: IModelDb, criteria: Id64String | SourceAndTarget): T;
43
94
  }
@@ -53,13 +104,22 @@ export declare class ElementRefersToElements extends Relationship {
53
104
  * @return an instance of the specified class.
54
105
  */
55
106
  static create<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): T;
56
- /** Insert a new instance of the Relationship.
57
- * @param iModel The iModel that will contain the relationship
107
+ /** Insert a new instance of the Relationship using an explicit transaction.
108
+ * @param txn The EditTxn used to perform the insert.
58
109
  * @param sourceId The sourceId of the relationship, that is, the driver element
59
110
  * @param targetId The targetId of the relationship, that is, the driven element
60
111
  * @return The Id of the inserted Relationship.
112
+ * @beta
61
113
  */
62
- static insert<T extends ElementRefersToElements>(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): Id64String;
114
+ static insert(txn: EditTxn, sourceId: Id64String, targetId: Id64String): Id64String;
115
+ /** Insert a new instance of the Relationship.
116
+ * @param iModel The iModel that will contain the relationship.
117
+ * @param sourceId The sourceId of the relationship, that is, the driver element.
118
+ * @param targetId The targetId of the relationship, that is, the driven element.
119
+ * @return The Id of the inserted Relationship.
120
+ * @deprecated Use ElementRefersToElements.insert(txn, ...) instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.
121
+ */
122
+ static insert(iModel: IModelDb, sourceId: Id64String, targetId: Id64String): Id64String;
63
123
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
64
124
  }
65
125
  /** Relates a [[DrawingGraphic]] to the [[Element]] that it represents
@@ -360,17 +420,22 @@ export declare class Relationships {
360
420
  * @param props The properties of the new relationship.
361
421
  * @returns The Id of the newly inserted relationship.
362
422
  * @note The id property of the props object is set as a side effect of this function.
423
+ * @deprecated Use EditTxn.insertRelationship instead.
363
424
  */
364
425
  insertInstance(props: RelationshipProps): Id64String;
365
426
  /** Update the properties of an existing relationship instance in the iModel.
366
427
  * @param props the properties of the relationship instance to update. Any properties that are not present will be left unchanged.
428
+ * @deprecated Use EditTxn.updateRelationship instead.
367
429
  */
368
430
  updateInstance(props: RelationshipProps): void;
369
- /** Delete an Relationship instance from this iModel. */
431
+ /** Delete an Relationship instance from this iModel.
432
+ * @deprecated Use EditTxn.deleteRelationship instead.
433
+ */
370
434
  deleteInstance(props: RelationshipProps): void;
371
435
  /** Delete multiple Relationship instances from this iModel.
372
436
  * @param props The properties of the relationship instances to delete.
373
437
  * @remarks This method handles bulk deletion of relationships and supports mixed collections containing instances from different relationship classes.
438
+ * @deprecated Use EditTxn.deleteRelationships instead.
374
439
  */
375
440
  deleteInstances(props: ReadonlyArray<RelationshipProps>): void;
376
441
  /** Get the props of a Relationship instance
@@ -1 +1 @@
1
- {"version":3,"file":"Relationship.d.ts","sourceRoot":"","sources":["../../src/Relationship.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAkB,UAAU,EAAgB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAe,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEzG,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE7E;;GAEG;AACH,qBAAa,YAAa,SAAQ,MAAM;IACtC,WAA2B,SAAS,IAAI,MAAM,CAA2B;IACzE,SAAgB,QAAQ,EAAE,UAAU,CAAC;IACrC,SAAgB,QAAQ,EAAE,UAAU,CAAC;IAErC,SAAS,aAAa,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,QAAQ;IAMhD,MAAM,IAAI,iBAAiB;IAO3C,gHAAgH;IAC1F,WAAW,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAc/D;;;;;;OAMG;WAC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