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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (441) hide show
  1. package/CHANGELOG.md +117 -1
  2. package/lib/cjs/BackendHubAccess.d.ts +1 -1
  3. package/lib/cjs/BackendHubAccess.js +1 -1
  4. package/lib/cjs/BackendHubAccess.js.map +1 -1
  5. package/lib/cjs/BisCoreSchema.d.ts.map +1 -1
  6. package/lib/cjs/BisCoreSchema.js +4 -2
  7. package/lib/cjs/BisCoreSchema.js.map +1 -1
  8. package/lib/cjs/BriefcaseManager.d.ts +10 -2
  9. package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
  10. package/lib/cjs/BriefcaseManager.js +16 -0
  11. package/lib/cjs/BriefcaseManager.js.map +1 -1
  12. package/lib/cjs/Category.d.ts +4 -4
  13. package/lib/cjs/Category.js +4 -4
  14. package/lib/cjs/Category.js.map +1 -1
  15. package/lib/cjs/ChangesetECAdaptor.d.ts +67 -8
  16. package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
  17. package/lib/cjs/ChangesetECAdaptor.js +248 -33
  18. package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
  19. package/lib/cjs/ClassRegistry.d.ts +9 -1
  20. package/lib/cjs/ClassRegistry.d.ts.map +1 -1
  21. package/lib/cjs/ClassRegistry.js +9 -1
  22. package/lib/cjs/ClassRegistry.js.map +1 -1
  23. package/lib/cjs/CloudSqlite.js +1 -1
  24. package/lib/cjs/CloudSqlite.js.map +1 -1
  25. package/lib/cjs/CodeSpecs.d.ts +1 -1
  26. package/lib/cjs/CodeSpecs.js +1 -1
  27. package/lib/cjs/CodeSpecs.js.map +1 -1
  28. package/lib/cjs/DisplayStyle.d.ts +4 -4
  29. package/lib/cjs/DisplayStyle.js +3 -3
  30. package/lib/cjs/DisplayStyle.js.map +1 -1
  31. package/lib/cjs/ECDb.d.ts +4 -4
  32. package/lib/cjs/ECDb.d.ts.map +1 -1
  33. package/lib/cjs/ECDb.js +4 -4
  34. package/lib/cjs/ECDb.js.map +1 -1
  35. package/lib/cjs/ECSqlStatement.d.ts +15 -6
  36. package/lib/cjs/ECSqlStatement.d.ts.map +1 -1
  37. package/lib/cjs/ECSqlStatement.js +19 -4
  38. package/lib/cjs/ECSqlStatement.js.map +1 -1
  39. package/lib/cjs/Element.d.ts +54 -51
  40. package/lib/cjs/Element.d.ts.map +1 -1
  41. package/lib/cjs/Element.js +67 -52
  42. package/lib/cjs/Element.js.map +1 -1
  43. package/lib/cjs/ElementAspect.d.ts +8 -8
  44. package/lib/cjs/ElementAspect.d.ts.map +1 -1
  45. package/lib/cjs/ElementAspect.js +8 -8
  46. package/lib/cjs/ElementAspect.js.map +1 -1
  47. package/lib/cjs/Entity.d.ts +10 -7
  48. package/lib/cjs/Entity.d.ts.map +1 -1
  49. package/lib/cjs/Entity.js +35 -13
  50. package/lib/cjs/Entity.js.map +1 -1
  51. package/lib/cjs/ExportGraphics.d.ts +54 -8
  52. package/lib/cjs/ExportGraphics.d.ts.map +1 -1
  53. package/lib/cjs/ExportGraphics.js +158 -59
  54. package/lib/cjs/ExportGraphics.js.map +1 -1
  55. package/lib/cjs/GeographicCRSServices.d.ts +6 -2
  56. package/lib/cjs/GeographicCRSServices.d.ts.map +1 -1
  57. package/lib/cjs/GeographicCRSServices.js +1 -1
  58. package/lib/cjs/GeographicCRSServices.js.map +1 -1
  59. package/lib/cjs/IModelDb.d.ts +37 -26
  60. package/lib/cjs/IModelDb.d.ts.map +1 -1
  61. package/lib/cjs/IModelDb.js +124 -47
  62. package/lib/cjs/IModelDb.js.map +1 -1
  63. package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
  64. package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
  65. package/lib/cjs/IModelElementCloneContext.js +1 -1
  66. package/lib/cjs/IModelElementCloneContext.js.map +1 -1
  67. package/lib/cjs/IModelHost.d.ts +2 -3
  68. package/lib/cjs/IModelHost.d.ts.map +1 -1
  69. package/lib/cjs/IModelHost.js +2 -3
  70. package/lib/cjs/IModelHost.js.map +1 -1
  71. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +36 -0
  72. package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  73. package/lib/cjs/IModelIncrementalSchemaLocater.js +69 -0
  74. package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -0
  75. package/lib/cjs/LocalHub.d.ts.map +1 -1
  76. package/lib/cjs/LocalHub.js +6 -4
  77. package/lib/cjs/LocalHub.js.map +1 -1
  78. package/lib/cjs/Material.d.ts +4 -3
  79. package/lib/cjs/Material.d.ts.map +1 -1
  80. package/lib/cjs/Material.js +5 -5
  81. package/lib/cjs/Material.js.map +1 -1
  82. package/lib/cjs/Model.d.ts +22 -22
  83. package/lib/cjs/Model.js +22 -22
  84. package/lib/cjs/Model.js.map +1 -1
  85. package/lib/cjs/Relationship.d.ts +3 -0
  86. package/lib/cjs/Relationship.d.ts.map +1 -1
  87. package/lib/cjs/Relationship.js +15 -0
  88. package/lib/cjs/Relationship.js.map +1 -1
  89. package/lib/cjs/SQLiteDb.d.ts +1 -1
  90. package/lib/cjs/SQLiteDb.js +1 -1
  91. package/lib/cjs/SQLiteDb.js.map +1 -1
  92. package/lib/cjs/Schema.d.ts +25 -0
  93. package/lib/cjs/Schema.d.ts.map +1 -1
  94. package/lib/cjs/Schema.js +25 -0
  95. package/lib/cjs/Schema.js.map +1 -1
  96. package/lib/cjs/SqliteStatement.d.ts +1 -1
  97. package/lib/cjs/SqliteStatement.d.ts.map +1 -1
  98. package/lib/cjs/SqliteStatement.js +1 -1
  99. package/lib/cjs/SqliteStatement.js.map +1 -1
  100. package/lib/cjs/Texture.d.ts +1 -1
  101. package/lib/cjs/Texture.js +1 -1
  102. package/lib/cjs/Texture.js.map +1 -1
  103. package/lib/cjs/TxnManager.d.ts +4 -4
  104. package/lib/cjs/TxnManager.js +1 -1
  105. package/lib/cjs/TxnManager.js.map +1 -1
  106. package/lib/cjs/ViewDefinition.d.ts +40 -14
  107. package/lib/cjs/ViewDefinition.d.ts.map +1 -1
  108. package/lib/cjs/ViewDefinition.js +42 -14
  109. package/lib/cjs/ViewDefinition.js.map +1 -1
  110. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  111. package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  112. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +110 -0
  113. package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  114. package/lib/cjs/annotations/FrameGeometry.d.ts +51 -0
  115. package/lib/cjs/annotations/FrameGeometry.d.ts.map +1 -0
  116. package/lib/cjs/annotations/FrameGeometry.js +249 -0
  117. package/lib/cjs/annotations/FrameGeometry.js.map +1 -0
  118. package/lib/cjs/annotations/LeaderGeometry.d.ts +53 -0
  119. package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -0
  120. package/lib/cjs/annotations/LeaderGeometry.js +184 -0
  121. package/lib/cjs/annotations/LeaderGeometry.js.map +1 -0
  122. package/lib/cjs/annotations/TextAnnotationElement.d.ts +204 -0
  123. package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -0
  124. package/lib/cjs/annotations/TextAnnotationElement.js +411 -0
  125. package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -0
  126. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +33 -0
  127. package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  128. package/lib/cjs/annotations/TextAnnotationGeometry.js +137 -0
  129. package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -0
  130. package/lib/cjs/annotations/TextBlockGeometry.d.ts +16 -0
  131. package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -0
  132. package/lib/cjs/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  133. package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -0
  134. package/lib/cjs/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  135. package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -0
  136. package/lib/cjs/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +174 -49
  137. package/lib/cjs/annotations/TextBlockLayout.js.map +1 -0
  138. package/lib/cjs/core-backend.d.ts +7 -3
  139. package/lib/cjs/core-backend.d.ts.map +1 -1
  140. package/lib/cjs/core-backend.js +27 -6
  141. package/lib/cjs/core-backend.js.map +1 -1
  142. package/lib/cjs/internal/ElementLRUCache.d.ts +23 -0
  143. package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
  144. package/lib/cjs/internal/ElementLRUCache.js +167 -3
  145. package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
  146. package/lib/cjs/internal/Symbols.d.ts +1 -0
  147. package/lib/cjs/internal/Symbols.d.ts.map +1 -1
  148. package/lib/cjs/internal/Symbols.js +2 -1
  149. package/lib/cjs/internal/Symbols.js.map +1 -1
  150. package/lib/cjs/internal/annotations/fields.d.ts +22 -0
  151. package/lib/cjs/internal/annotations/fields.d.ts.map +1 -0
  152. package/lib/cjs/internal/annotations/fields.js +237 -0
  153. package/lib/cjs/internal/annotations/fields.js.map +1 -0
  154. package/lib/cjs/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  155. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js +1 -1
  156. package/lib/cjs/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  157. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  158. package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  159. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  160. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  161. package/lib/cjs/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  162. package/lib/cjs/workspace/Workspace.d.ts +0 -1
  163. package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
  164. package/lib/cjs/workspace/Workspace.js.map +1 -1
  165. package/lib/esm/BackendHubAccess.d.ts +1 -1
  166. package/lib/esm/BackendHubAccess.js +1 -1
  167. package/lib/esm/BackendHubAccess.js.map +1 -1
  168. package/lib/esm/BisCoreSchema.d.ts.map +1 -1
  169. package/lib/esm/BisCoreSchema.js +4 -2
  170. package/lib/esm/BisCoreSchema.js.map +1 -1
  171. package/lib/esm/BriefcaseManager.d.ts +10 -2
  172. package/lib/esm/BriefcaseManager.d.ts.map +1 -1
  173. package/lib/esm/BriefcaseManager.js +17 -1
  174. package/lib/esm/BriefcaseManager.js.map +1 -1
  175. package/lib/esm/Category.d.ts +4 -4
  176. package/lib/esm/Category.js +4 -4
  177. package/lib/esm/Category.js.map +1 -1
  178. package/lib/esm/ChangesetECAdaptor.d.ts +67 -8
  179. package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
  180. package/lib/esm/ChangesetECAdaptor.js +248 -33
  181. package/lib/esm/ChangesetECAdaptor.js.map +1 -1
  182. package/lib/esm/ClassRegistry.d.ts +9 -1
  183. package/lib/esm/ClassRegistry.d.ts.map +1 -1
  184. package/lib/esm/ClassRegistry.js +9 -1
  185. package/lib/esm/ClassRegistry.js.map +1 -1
  186. package/lib/esm/CloudSqlite.js +1 -1
  187. package/lib/esm/CloudSqlite.js.map +1 -1
  188. package/lib/esm/CodeSpecs.d.ts +1 -1
  189. package/lib/esm/CodeSpecs.js +1 -1
  190. package/lib/esm/CodeSpecs.js.map +1 -1
  191. package/lib/esm/DisplayStyle.d.ts +4 -4
  192. package/lib/esm/DisplayStyle.js +3 -3
  193. package/lib/esm/DisplayStyle.js.map +1 -1
  194. package/lib/esm/ECDb.d.ts +4 -4
  195. package/lib/esm/ECDb.d.ts.map +1 -1
  196. package/lib/esm/ECDb.js +4 -4
  197. package/lib/esm/ECDb.js.map +1 -1
  198. package/lib/esm/ECSqlStatement.d.ts +15 -6
  199. package/lib/esm/ECSqlStatement.d.ts.map +1 -1
  200. package/lib/esm/ECSqlStatement.js +19 -4
  201. package/lib/esm/ECSqlStatement.js.map +1 -1
  202. package/lib/esm/Element.d.ts +54 -51
  203. package/lib/esm/Element.d.ts.map +1 -1
  204. package/lib/esm/Element.js +67 -52
  205. package/lib/esm/Element.js.map +1 -1
  206. package/lib/esm/ElementAspect.d.ts +8 -8
  207. package/lib/esm/ElementAspect.d.ts.map +1 -1
  208. package/lib/esm/ElementAspect.js +8 -8
  209. package/lib/esm/ElementAspect.js.map +1 -1
  210. package/lib/esm/Entity.d.ts +10 -7
  211. package/lib/esm/Entity.d.ts.map +1 -1
  212. package/lib/esm/Entity.js +36 -14
  213. package/lib/esm/Entity.js.map +1 -1
  214. package/lib/esm/ExportGraphics.d.ts +54 -8
  215. package/lib/esm/ExportGraphics.d.ts.map +1 -1
  216. package/lib/esm/ExportGraphics.js +156 -58
  217. package/lib/esm/ExportGraphics.js.map +1 -1
  218. package/lib/esm/GeographicCRSServices.d.ts +6 -2
  219. package/lib/esm/GeographicCRSServices.d.ts.map +1 -1
  220. package/lib/esm/GeographicCRSServices.js +1 -1
  221. package/lib/esm/GeographicCRSServices.js.map +1 -1
  222. package/lib/esm/IModelDb.d.ts +37 -26
  223. package/lib/esm/IModelDb.d.ts.map +1 -1
  224. package/lib/esm/IModelDb.js +128 -51
  225. package/lib/esm/IModelDb.js.map +1 -1
  226. package/lib/esm/IModelElementCloneContext.d.ts +1 -1
  227. package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
  228. package/lib/esm/IModelElementCloneContext.js +1 -1
  229. package/lib/esm/IModelElementCloneContext.js.map +1 -1
  230. package/lib/esm/IModelHost.d.ts +2 -3
  231. package/lib/esm/IModelHost.d.ts.map +1 -1
  232. package/lib/esm/IModelHost.js +2 -3
  233. package/lib/esm/IModelHost.js.map +1 -1
  234. package/lib/esm/IModelIncrementalSchemaLocater.d.ts +36 -0
  235. package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -0
  236. package/lib/esm/IModelIncrementalSchemaLocater.js +65 -0
  237. package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -0
  238. package/lib/esm/LocalHub.d.ts.map +1 -1
  239. package/lib/esm/LocalHub.js +6 -4
  240. package/lib/esm/LocalHub.js.map +1 -1
  241. package/lib/esm/Material.d.ts +4 -3
  242. package/lib/esm/Material.d.ts.map +1 -1
  243. package/lib/esm/Material.js +5 -5
  244. package/lib/esm/Material.js.map +1 -1
  245. package/lib/esm/Model.d.ts +22 -22
  246. package/lib/esm/Model.js +22 -22
  247. package/lib/esm/Model.js.map +1 -1
  248. package/lib/esm/Relationship.d.ts +3 -0
  249. package/lib/esm/Relationship.d.ts.map +1 -1
  250. package/lib/esm/Relationship.js +15 -0
  251. package/lib/esm/Relationship.js.map +1 -1
  252. package/lib/esm/SQLiteDb.d.ts +1 -1
  253. package/lib/esm/SQLiteDb.js +1 -1
  254. package/lib/esm/SQLiteDb.js.map +1 -1
  255. package/lib/esm/Schema.d.ts +25 -0
  256. package/lib/esm/Schema.d.ts.map +1 -1
  257. package/lib/esm/Schema.js +25 -0
  258. package/lib/esm/Schema.js.map +1 -1
  259. package/lib/esm/SqliteStatement.d.ts +1 -1
  260. package/lib/esm/SqliteStatement.d.ts.map +1 -1
  261. package/lib/esm/SqliteStatement.js +1 -1
  262. package/lib/esm/SqliteStatement.js.map +1 -1
  263. package/lib/esm/Texture.d.ts +1 -1
  264. package/lib/esm/Texture.js +1 -1
  265. package/lib/esm/Texture.js.map +1 -1
  266. package/lib/esm/TxnManager.d.ts +4 -4
  267. package/lib/esm/TxnManager.js +1 -1
  268. package/lib/esm/TxnManager.js.map +1 -1
  269. package/lib/esm/ViewDefinition.d.ts +40 -14
  270. package/lib/esm/ViewDefinition.d.ts.map +1 -1
  271. package/lib/esm/ViewDefinition.js +42 -14
  272. package/lib/esm/ViewDefinition.js.map +1 -1
  273. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +61 -0
  274. package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -0
  275. package/lib/esm/annotations/ElementDrivesTextAnnotation.js +105 -0
  276. package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -0
  277. package/lib/esm/annotations/FrameGeometry.d.ts +51 -0
  278. package/lib/esm/annotations/FrameGeometry.d.ts.map +1 -0
  279. package/lib/esm/annotations/FrameGeometry.js +244 -0
  280. package/lib/esm/annotations/FrameGeometry.js.map +1 -0
  281. package/lib/esm/annotations/LeaderGeometry.d.ts +53 -0
  282. package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -0
  283. package/lib/esm/annotations/LeaderGeometry.js +179 -0
  284. package/lib/esm/annotations/LeaderGeometry.js.map +1 -0
  285. package/lib/esm/annotations/TextAnnotationElement.d.ts +204 -0
  286. package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -0
  287. package/lib/esm/annotations/TextAnnotationElement.js +405 -0
  288. package/lib/esm/annotations/TextAnnotationElement.js.map +1 -0
  289. package/lib/esm/annotations/TextAnnotationGeometry.d.ts +33 -0
  290. package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -0
  291. package/lib/esm/annotations/TextAnnotationGeometry.js +134 -0
  292. package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -0
  293. package/lib/esm/annotations/TextBlockGeometry.d.ts +16 -0
  294. package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -0
  295. package/lib/esm/{TextAnnotationGeometry.js → annotations/TextBlockGeometry.js} +28 -70
  296. package/lib/esm/annotations/TextBlockGeometry.js.map +1 -0
  297. package/lib/esm/{TextAnnotationLayout.d.ts → annotations/TextBlockLayout.d.ts} +69 -22
  298. package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -0
  299. package/lib/esm/{TextAnnotationLayout.js → annotations/TextBlockLayout.js} +172 -48
  300. package/lib/esm/annotations/TextBlockLayout.js.map +1 -0
  301. package/lib/esm/core-backend.d.ts +7 -3
  302. package/lib/esm/core-backend.d.ts.map +1 -1
  303. package/lib/esm/core-backend.js +27 -3
  304. package/lib/esm/core-backend.js.map +1 -1
  305. package/lib/esm/internal/ElementLRUCache.d.ts +23 -0
  306. package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
  307. package/lib/esm/internal/ElementLRUCache.js +165 -2
  308. package/lib/esm/internal/ElementLRUCache.js.map +1 -1
  309. package/lib/esm/internal/Symbols.d.ts +1 -0
  310. package/lib/esm/internal/Symbols.d.ts.map +1 -1
  311. package/lib/esm/internal/Symbols.js +1 -0
  312. package/lib/esm/internal/Symbols.js.map +1 -1
  313. package/lib/esm/internal/annotations/fields.d.ts +22 -0
  314. package/lib/esm/internal/annotations/fields.d.ts.map +1 -0
  315. package/lib/esm/internal/annotations/fields.js +231 -0
  316. package/lib/esm/internal/annotations/fields.js.map +1 -0
  317. package/lib/esm/rpc-impl/IModelReadRpcImpl.d.ts +1 -1
  318. package/lib/esm/rpc-impl/IModelReadRpcImpl.js +1 -1
  319. package/lib/esm/rpc-impl/IModelReadRpcImpl.js.map +1 -1
  320. package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts +2 -2
  321. package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
  322. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.d.ts +1 -1
  323. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js +1 -1
  324. package/lib/esm/rpc-impl/SnapshotIModelRpcImpl.js.map +1 -1
  325. package/lib/esm/test/AnnotationTestUtils.d.ts +15 -0
  326. package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -0
  327. package/lib/esm/test/AnnotationTestUtils.js +41 -0
  328. package/lib/esm/test/AnnotationTestUtils.js.map +1 -0
  329. package/lib/esm/test/ElementLRUCache.test.js +224 -1
  330. package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
  331. package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
  332. package/lib/esm/test/IModelTestUtils.js +1 -0
  333. package/lib/esm/test/IModelTestUtils.js.map +1 -1
  334. package/lib/esm/test/TestUtils.d.ts +1 -1
  335. package/lib/esm/test/TestUtils.d.ts.map +1 -1
  336. package/lib/esm/test/TestUtils.js +1 -1
  337. package/lib/esm/test/TestUtils.js.map +1 -1
  338. package/lib/esm/test/annotations/Fields.test.d.ts +2 -0
  339. package/lib/esm/test/annotations/Fields.test.d.ts.map +1 -0
  340. package/lib/esm/test/annotations/Fields.test.js +576 -0
  341. package/lib/esm/test/annotations/Fields.test.js.map +1 -0
  342. package/lib/esm/test/annotations/FrameGeometry.test.d.ts +2 -0
  343. package/lib/esm/test/annotations/FrameGeometry.test.d.ts.map +1 -0
  344. package/lib/esm/test/annotations/FrameGeometry.test.js +86 -0
  345. package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -0
  346. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts +2 -0
  347. package/lib/esm/test/annotations/LeaderGeometry.test.d.ts.map +1 -0
  348. package/lib/esm/test/annotations/LeaderGeometry.test.js +256 -0
  349. package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -0
  350. package/lib/esm/test/annotations/TextAnnotation.test.js +269 -1047
  351. package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
  352. package/lib/esm/test/annotations/TextBlock.test.d.ts +2 -0
  353. package/lib/esm/test/annotations/TextBlock.test.d.ts.map +1 -0
  354. package/lib/esm/test/annotations/TextBlock.test.js +1199 -0
  355. package/lib/esm/test/annotations/TextBlock.test.js.map +1 -0
  356. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts +60 -0
  357. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.d.ts.map +1 -0
  358. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js +69 -0
  359. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -0
  360. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +1442 -0
  361. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -0
  362. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +817 -0
  363. package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -0
  364. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts +2 -0
  365. package/lib/esm/test/ecdb/ConcurrentQuery.test.d.ts.map +1 -0
  366. package/lib/esm/test/ecdb/ConcurrentQuery.test.js +164 -0
  367. package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -0
  368. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js +22 -32
  369. package/lib/esm/test/ecdb/ConcurrentQueryLoad.test.js.map +1 -1
  370. package/lib/esm/test/ecdb/ECDb.test.js +29 -8
  371. package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
  372. package/lib/esm/test/ecdb/ECSqlQuery.test.js +0 -55
  373. package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
  374. package/lib/esm/test/ecdb/ECSqlStatement.test.js +192 -0
  375. package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
  376. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts +2 -0
  377. package/lib/esm/test/hubaccess/ApplyChangeset.test.d.ts.map +1 -0
  378. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +86 -0
  379. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -0
  380. package/lib/esm/test/imodel/IModel.test.js +313 -5
  381. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  382. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts +2 -0
  383. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.d.ts.map +1 -0
  384. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +343 -0
  385. package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -0
  386. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts +2 -0
  387. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.d.ts.map +1 -0
  388. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +207 -0
  389. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -0
  390. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +11 -0
  391. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +1 -0
  392. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +36 -0
  393. package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +1 -0
  394. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +17 -0
  395. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -0
  396. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +116 -0
  397. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -0
  398. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +9 -0
  399. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -0
  400. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +20 -0
  401. package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -0
  402. package/lib/esm/test/misc/GeoServices.test.js +36 -10
  403. package/lib/esm/test/misc/GeoServices.test.js.map +1 -1
  404. package/lib/esm/test/schema/ClassRegistry.test.js +104 -2
  405. package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
  406. package/lib/esm/test/standalone/ChangesetReader.test.js +547 -136
  407. package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
  408. package/lib/esm/test/standalone/ExportGraphics.test.js +53 -1
  409. package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
  410. package/lib/esm/test/standalone/GeometryStream.test.js +49 -1
  411. package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
  412. package/lib/esm/test/standalone/IModelLimits.test.d.ts +2 -0
  413. package/lib/esm/test/standalone/IModelLimits.test.d.ts.map +1 -0
  414. package/lib/esm/test/standalone/IModelLimits.test.js +103 -0
  415. package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -0
  416. package/lib/esm/test/standalone/RenderMaterialElement.test.js +24 -1
  417. package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
  418. package/lib/esm/test/standalone/SnapshotDb.test.js +19 -1
  419. package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
  420. package/lib/esm/workspace/Workspace.d.ts +0 -1
  421. package/lib/esm/workspace/Workspace.d.ts.map +1 -1
  422. package/lib/esm/workspace/Workspace.js.map +1 -1
  423. package/package.json +22 -16
  424. package/lib/cjs/TextAnnotationElement.d.ts +0 -54
  425. package/lib/cjs/TextAnnotationElement.d.ts.map +0 -1
  426. package/lib/cjs/TextAnnotationElement.js +0 -94
  427. package/lib/cjs/TextAnnotationElement.js.map +0 -1
  428. package/lib/cjs/TextAnnotationGeometry.d.ts +0 -32
  429. package/lib/cjs/TextAnnotationGeometry.d.ts.map +0 -1
  430. package/lib/cjs/TextAnnotationGeometry.js.map +0 -1
  431. package/lib/cjs/TextAnnotationLayout.d.ts.map +0 -1
  432. package/lib/cjs/TextAnnotationLayout.js.map +0 -1
  433. package/lib/esm/TextAnnotationElement.d.ts +0 -54
  434. package/lib/esm/TextAnnotationElement.d.ts.map +0 -1
  435. package/lib/esm/TextAnnotationElement.js +0 -89
  436. package/lib/esm/TextAnnotationElement.js.map +0 -1
  437. package/lib/esm/TextAnnotationGeometry.d.ts +0 -32
  438. package/lib/esm/TextAnnotationGeometry.d.ts.map +0 -1
  439. package/lib/esm/TextAnnotationGeometry.js.map +0 -1
  440. package/lib/esm/TextAnnotationLayout.d.ts.map +0 -1
  441. package/lib/esm/TextAnnotationLayout.js.map +0 -1
@@ -31,7 +31,7 @@ export interface OnAspectIdArg extends OnAspectArg {
31
31
  /** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.
32
32
  * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.
33
33
  * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.
34
- * @public
34
+ * @public @preview
35
35
  */
36
36
  export declare class ElementAspect extends Entity {
37
37
  static get className(): string;
@@ -74,30 +74,30 @@ export declare class ElementAspect extends Entity {
74
74
  protected static onDeleted(_arg: OnAspectIdArg): void;
75
75
  }
76
76
  /** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.
77
- * @public
77
+ * @public @preview
78
78
  */
79
79
  export declare class ElementUniqueAspect extends ElementAspect {
80
80
  static get className(): string;
81
81
  }
82
82
  /** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.
83
- * @public
83
+ * @public @preview
84
84
  */
85
85
  export declare class ElementMultiAspect extends ElementAspect {
86
86
  static get className(): string;
87
87
  }
88
88
  /**
89
- * @public
89
+ * @public @preview
90
90
  */
91
91
  export declare class ChannelRootAspect extends ElementUniqueAspect {
92
92
  static get className(): string;
93
93
  /** Insert a ChannelRootAspect on the specified element.
94
- * @deprecated in 4.0 use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.
94
+ * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.
95
95
  */
96
96
  static insert(iModel: IModelDb, ownerId: Id64String, channelName: string): void;
97
97
  }
98
98
  /** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.
99
99
  * @note The associated ECClass was added to the BisCore schema in version 1.0.2
100
- * @public
100
+ * @public @preview
101
101
  */
102
102
  export declare class ExternalSourceAspect extends ElementMultiAspect {
103
103
  static get className(): string;
@@ -145,10 +145,10 @@ export declare class ExternalSourceAspect extends ElementMultiAspect {
145
145
  toJSON(): ExternalSourceAspectProps;
146
146
  protected collectReferenceIds(referenceIds: EntityReferenceSet): void;
147
147
  }
148
- /** @public */
148
+ /** @public @preview */
149
149
  export declare namespace ExternalSourceAspect {
150
150
  /** Standard values for the `Kind` property of `ExternalSourceAspect`.
151
- * @public
151
+ * @public @preview
152
152
  */
153
153
  enum Kind {
154
154
  /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */
@@ -1 +1 @@
1
- {"version":3,"file":"ElementAspect.d.ts","sourceRoot":"","sources":["../../src/ElementAspect.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA0B,kBAAkB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC/I,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAY,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG3D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,MAAM,EAAE,QAAQ,CAAC;IACjB,sDAAsD;IACtD,KAAK,EAAE,UAAU,CAAC;CACnB;AACD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,+DAA+D;IAC/D,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;CACrC;AACD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,kDAAkD;IAClD,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,MAAM;IACvC,WAA2B,SAAS,IAAI,MAAM,CAA4B;IACnE,OAAO,EAAE,cAAc,CAAC;IAE/B,kFAAkF;gBACtE,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,QAAQ;IAKvC,MAAM,IAAI,kBAAkB;IAM5C;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAA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G;AACH,qBAAa,oBAAqB,SAAQ,kBAAkB;IAC1D,WAA2B,SAAS,IAAI,MAAM,CAAmC;IAEjF;;;OAGG;IACI,KAAK,EAAE,cAAc,CAAC;IAC7B,6DAA6D;IACtD,UAAU,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IAChD,IAAI,EAAE,MAAM,CAAC;IACpB,mKAAmK;IAC5J,QAAQ,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACI,OAAO,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACI,cAAc,CAAC,EAAE,MAAM,CAAC;IAC/B,iHAAiH;IAC1G,MAAM,CAAC,EAAE,cAAc,CAAC;IAE/B,kFAAkF;gBACtE,KAAK,EAAE,yBAAyB,EAAE,MAAM,EAAE,QAAQ;IAW9D;;;;;;;;;;;MAWE;WACY,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,KAAK,CAAC;QAAE,SAAS,EAAE,UAAU,CAAC;QAAC,QAAQ,EAAE,UAAU,CAAA;KAAE,CAAC;IAe9I,MAAM,IAAI,yBAAyB;cAYhC,mBAAmB,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI;CAQ/E;AAED,uBAAuB;AACvB,yBAAiB,oBAAoB,CAAC;IACpC;;OAEG;IACH,KAAY,IAAI;QACd,oFAAoF;QACpF,OAAO,YAAY;QACnB,yFAAyF;QACzF,YAAY,iBAAiB;QAC7B;;WAEG;QACH,KAAK,UAAU;KAChB;CACF"}
@@ -15,7 +15,7 @@ const Symbols_1 = require("./internal/Symbols");
15
15
  /** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.
16
16
  * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.
17
17
  * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.
18
- * @public
18
+ * @public @preview
19
19
  */
20
20
  class ElementAspect extends Entity_1.Entity {
21
21
  static get className() { return "ElementAspect"; }
@@ -79,26 +79,26 @@ class ElementAspect extends Entity_1.Entity {
79
79
  }
80
80
  exports.ElementAspect = ElementAspect;
81
81
  /** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.
82
- * @public
82
+ * @public @preview
83
83
  */
84
84
  class ElementUniqueAspect extends ElementAspect {
85
85
  static get className() { return "ElementUniqueAspect"; }
86
86
  }
87
87
  exports.ElementUniqueAspect = ElementUniqueAspect;
88
88
  /** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.
89
- * @public
89
+ * @public @preview
90
90
  */
91
91
  class ElementMultiAspect extends ElementAspect {
92
92
  static get className() { return "ElementMultiAspect"; }
93
93
  }
94
94
  exports.ElementMultiAspect = ElementMultiAspect;
95
95
  /**
96
- * @public
96
+ * @public @preview
97
97
  */
98
98
  class ChannelRootAspect extends ElementUniqueAspect {
99
99
  static get className() { return "ChannelRootAspect"; }
100
100
  /** Insert a ChannelRootAspect on the specified element.
101
- * @deprecated in 4.0 use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.
101
+ * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.
102
102
  */
103
103
  static insert(iModel, ownerId, channelName) {
104
104
  const props = { classFullName: this.classFullName, element: { id: ownerId }, owner: channelName };
@@ -108,7 +108,7 @@ class ChannelRootAspect extends ElementUniqueAspect {
108
108
  exports.ChannelRootAspect = ChannelRootAspect;
109
109
  /** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.
110
110
  * @note The associated ECClass was added to the BisCore schema in version 1.0.2
111
- * @public
111
+ * @public @preview
112
112
  */
113
113
  class ExternalSourceAspect extends ElementMultiAspect {
114
114
  static get className() { return "ExternalSourceAspect"; }
@@ -193,10 +193,10 @@ class ExternalSourceAspect extends ElementMultiAspect {
193
193
  }
194
194
  }
195
195
  exports.ExternalSourceAspect = ExternalSourceAspect;
196
- /** @public */
196
+ /** @public @preview */
197
197
  (function (ExternalSourceAspect) {
198
198
  /** Standard values for the `Kind` property of `ExternalSourceAspect`.
199
- * @public
199
+ * @public @preview
200
200
  */
201
201
  let Kind;
202
202
  (function (Kind) {
@@ -1 +1 @@
1
- {"version":3,"file":"ElementAspect.js","sourceRoot":"","sources":["../../src/ElementAspect.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAA+I;AAC/I,qCAAkC;AAGlC,sDAA2D;AAC3D,gDAAoD;AA0BpD;;;;GAIG;AACH,MAAa,aAAc,SAAQ,eAAM;IAChC,MAAM,KAAc,SAAS,KAAa,OAAO,eAAe,CAAC,CAAC,CAAC;IACnE,OAAO,CAAiB;IAE/B,kFAAkF;IAClF,YAAY,KAAyB,EAAE,MAAgB;QACrD,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,4BAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAE,CAAC,CAAC,+DAA+D;IACzH,CAAC;IAEe,MAAM;QACpB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,EAAwB,CAAC;QACjD,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC3B,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;OAIG;IACO,MAAM,CAAC,QAAQ,CAAC,GAAqB;QAC7C,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;QAC9B,MAAM,CAAC,QAAQ,CAAC,wBAAc,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IAChF,CAAC;IAED;;;OAGG;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G,IAAI,CAAC,OAAO,CAAC;QAC3B,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;QACzC,OAAO,GAAG,CAAC;IACb,CAAC;IAEkB,mBAAmB,CAAC,YAAgC;QACrE,KAAK,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,KAAK;YACZ,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACzC,IAAI,IAAI,CAAC,MAAM;YACb,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AAtFD,oDAsFC;AAED,cAAc;AACd,WAAiB,oBAAoB;IACnC;;OAEG;IACH,IAAY,IASX;IATD,WAAY,IAAI;QACd,oFAAoF;QACpF,2BAAmB,CAAA;QACnB,yFAAyF;QACzF,qCAA6B,CAAA;QAC7B;;WAEG;QACH,uBAAe,CAAA;IACjB,CAAC,EATW,IAAI,GAAJ,yBAAI,KAAJ,yBAAI,QASf;AACH,CAAC,EAdgB,oBAAoB,oCAApB,oBAAoB,QAcpC","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 ElementAspects\n */\n\nimport { ChannelRootAspectProps, ElementAspectProps, EntityReferenceSet, ExternalSourceAspectProps, RelatedElement } from \"@itwin/core-common\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { ECSqlStatement } from \"./ECSqlStatement\";\nimport { DbResult, Id64String } from \"@itwin/core-bentley\";\nimport { _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `ElementAspect.onXxx` static methods\n * @beta\n */\nexport interface OnAspectArg {\n /** The iModel for the aspect affected by this event. */\n iModel: IModelDb;\n /** The model for the aspect affected by this event */\n model: Id64String;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that supply the properties of an aspect to be inserted or updated.\n * @beta\n */\nexport interface OnAspectPropsArg extends OnAspectArg {\n /** The new properties of the aspect affected by this event. */\n props: Readonly<ElementAspectProps>;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that only supply the Id of the affected aspect.\n * @beta\n */\nexport interface OnAspectIdArg extends OnAspectArg {\n /** The Id of the aspect affected by this event */\n aspectId: Id64String;\n}\n\n/** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.\n * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.\n * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.\n * @public\n */\nexport class ElementAspect extends Entity {\n public static override get className(): string { return \"ElementAspect\"; }\n public element: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ElementAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.element = RelatedElement.fromJSON(props.element)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n\n public override toJSON(): ElementAspectProps {\n const val = super.toJSON() as ElementAspectProps;\n val.element = this.element;\n return val;\n }\n\n /** Called before a new ElementAspect is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInsert(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"insert aspect\");\n }\n\n /** Called after a new ElementAspect was inserted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInserted(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdate(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"update aspect\");\n }\n\n /** Called after an ElementAspect was updated.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdated(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDelete(arg: OnAspectIdArg): void {\n const { aspectId, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n const { element } = iModel.elements.getAspect(aspectId);\n iModel.locks.checkExclusiveLock(element.id, \"element\", \"delete aspect\");\n }\n\n /** Called after an ElementAspect was deleted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDeleted(_arg: OnAspectIdArg): void { }\n}\n/** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.\n * @public\n */\nexport class ElementUniqueAspect extends ElementAspect {\n public static override get className(): string { return \"ElementUniqueAspect\"; }\n}\n\n/** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.\n * @public\n */\nexport class ElementMultiAspect extends ElementAspect {\n public static override get className(): string { return \"ElementMultiAspect\"; }\n}\n\n/**\n * @public\n */\nexport class ChannelRootAspect extends ElementUniqueAspect {\n public static override get className(): string { return \"ChannelRootAspect\"; }\n /** Insert a ChannelRootAspect on the specified element.\n * @deprecated in 4.0 use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.\n */\n public static insert(iModel: IModelDb, ownerId: Id64String, channelName: string) {\n const props: ChannelRootAspectProps = { classFullName: this.classFullName, element: { id: ownerId }, owner: channelName };\n iModel.elements.insertAspect(props);\n }\n}\n\n/** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.2\n * @public\n */\nexport class ExternalSourceAspect extends ElementMultiAspect {\n public static override get className(): string { return \"ExternalSourceAspect\"; }\n\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n public scope: RelatedElement;\n /** The identifier of the object in the source repository. */\n public identifier: string;\n /** The kind of object within the source repository. */\n public kind: string;\n /** The cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n public checksum?: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n public version?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n public jsonProperties?: string;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n public source?: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ExternalSourceAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.scope = RelatedElement.fromJSON(props.scope)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n this.source = RelatedElement.fromJSON(props.source);\n this.identifier = props.identifier;\n this.kind = props.kind;\n this.checksum = props.checksum;\n this.version = props.version;\n this.jsonProperties = props.jsonProperties;\n }\n\n /** Look up the elements that contain one or more ExternalSourceAspect with the specified Scope, Kind, and Identifier.\n * The result of this function is an array of all of the ExternalSourceAspects that were found, each associated with the owning element.\n * A given element could have more than one ExternalSourceAspect with the given scope, kind, and identifier.\n * Also, many elements could have ExternalSourceAspect with the same scope, kind, and identifier.\n * Therefore, the result array could have more than one entry with the same elementId.\n * Aspects are never shared. Each aspect has its own unique ECInstanceId.\n * @param iModelDb The iModel to query\n * @param scope The scope of the ExternalSourceAspects to find\n * @param kind The kind of the ExternalSourceAspects to find\n * @param identifier The identifier of the ExternalSourceAspects to find\n * @returns the query results\n */\n public static findAllBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): Array<{ elementId: Id64String, aspectId: Id64String }> {\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\n const found: Array<{ elementId: Id64String, aspectId: Id64String }> = [];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\n statement.bindId(\"scope\", scope);\n statement.bindString(\"kind\", kind);\n statement.bindString(\"identifier\", identifier);\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n found.push({ elementId: statement.getValue(0).getId(), aspectId: statement.getValue(1).getId() });\n }\n });\n return found;\n }\n\n public override toJSON(): ExternalSourceAspectProps {\n const val = super.toJSON() as ExternalSourceAspectProps;\n val.scope = this.scope;\n val.source = this.source;\n val.identifier = this.identifier;\n val.kind = this.kind;\n val.checksum = this.checksum;\n val.version = this.version;\n val.jsonProperties = this.jsonProperties;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.scope)\n referenceIds.addElement(this.scope.id);\n referenceIds.addElement(this.element.id);\n if (this.source)\n referenceIds.addElement(this.source.id);\n }\n}\n\n/** @public */\nexport namespace ExternalSourceAspect {\n /** Standard values for the `Kind` property of `ExternalSourceAspect`.\n * @public\n */\n export enum Kind {\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */\n Element = \"Element\",\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Relationship]] provenance */\n Relationship = \"Relationship\",\n /** Indicates that the [[ExternalSourceAspect]] is storing *scope* provenance\n * @see [[ExternalSourceAspect.scope]]\n */\n Scope = \"Scope\",\n }\n}\n"]}
1
+ {"version":3,"file":"ElementAspect.js","sourceRoot":"","sources":["../../src/ElementAspect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,CAAC;QACzC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACzC,IAAI,IAAI,CAAC,MAAM;YACb,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF;AAtFD,oDAsFC;AAED,uBAAuB;AACvB,WAAiB,oBAAoB;IACnC;;OAEG;IACH,IAAY,IASX;IATD,WAAY,IAAI;QACd,oFAAoF;QACpF,2BAAmB,CAAA;QACnB,yFAAyF;QACzF,qCAA6B,CAAA;QAC7B;;WAEG;QACH,uBAAe,CAAA;IACjB,CAAC,EATW,IAAI,GAAJ,yBAAI,KAAJ,yBAAI,QASf;AACH,CAAC,EAdgB,oBAAoB,oCAApB,oBAAoB,QAcpC","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 ElementAspects\n */\n\nimport { ChannelRootAspectProps, ElementAspectProps, EntityReferenceSet, ExternalSourceAspectProps, RelatedElement } from \"@itwin/core-common\";\nimport { Entity } from \"./Entity\";\nimport { IModelDb } from \"./IModelDb\";\nimport { ECSqlStatement } from \"./ECSqlStatement\";\nimport { DbResult, Id64String } from \"@itwin/core-bentley\";\nimport { _verifyChannel } from \"./internal/Symbols\";\n\n/** Argument for the `ElementAspect.onXxx` static methods\n * @beta\n */\nexport interface OnAspectArg {\n /** The iModel for the aspect affected by this event. */\n iModel: IModelDb;\n /** The model for the aspect affected by this event */\n model: Id64String;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that supply the properties of an aspect to be inserted or updated.\n * @beta\n */\nexport interface OnAspectPropsArg extends OnAspectArg {\n /** The new properties of the aspect affected by this event. */\n props: Readonly<ElementAspectProps>;\n}\n/** Argument for the `ElementAspect.onXxx` static methods that only supply the Id of the affected aspect.\n * @beta\n */\nexport interface OnAspectIdArg extends OnAspectArg {\n /** The Id of the aspect affected by this event */\n aspectId: Id64String;\n}\n\n/** An Element Aspect is a class that defines a set of properties that are related to (and owned by) a single element.\n * Semantically, an ElementAspect can be considered part of the Element. Thus, an ElementAspect is deleted if its owning Element is deleted.\n * BIS Guideline: Subclass ElementUniqueAspect or ElementMultiAspect rather than subclassing ElementAspect directly.\n * @public @preview\n */\nexport class ElementAspect extends Entity {\n public static override get className(): string { return \"ElementAspect\"; }\n public element: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ElementAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.element = RelatedElement.fromJSON(props.element)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n }\n\n public override toJSON(): ElementAspectProps {\n const val = super.toJSON() as ElementAspectProps;\n val.element = this.element;\n return val;\n }\n\n /** Called before a new ElementAspect is inserted.\n * @note throw an exception to disallow the insert\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInsert(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"insert aspect\");\n }\n\n /** Called after a new ElementAspect was inserted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onInserted(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is updated.\n * @note throw an exception to disallow the update\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdate(arg: OnAspectPropsArg): void {\n const { props, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n iModel.locks.checkExclusiveLock(props.element.id, \"element\", \"update aspect\");\n }\n\n /** Called after an ElementAspect was updated.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onUpdated(_arg: OnAspectPropsArg): void { }\n\n /** Called before an ElementAspect is deleted.\n * @note throw an exception to disallow the delete\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDelete(arg: OnAspectIdArg): void {\n const { aspectId, iModel } = arg;\n iModel.channels[_verifyChannel](arg.model);\n const { element } = iModel.elements.getAspect(aspectId);\n iModel.locks.checkExclusiveLock(element.id, \"element\", \"delete aspect\");\n }\n\n /** Called after an ElementAspect was deleted.\n * @note If you override this method, you must call super.\n * @beta\n */\n protected static onDeleted(_arg: OnAspectIdArg): void { }\n}\n/** An Element Unique Aspect is an ElementAspect where there can be only zero or one instance of the Element Aspect class per Element.\n * @public @preview\n */\nexport class ElementUniqueAspect extends ElementAspect {\n public static override get className(): string { return \"ElementUniqueAspect\"; }\n}\n\n/** An Element Multi-Aspect is an ElementAspect where there can be **n** instances of the Element Aspect class per Element.\n * @public @preview\n */\nexport class ElementMultiAspect extends ElementAspect {\n public static override get className(): string { return \"ElementMultiAspect\"; }\n}\n\n/**\n * @public @preview\n */\nexport class ChannelRootAspect extends ElementUniqueAspect {\n public static override get className(): string { return \"ChannelRootAspect\"; }\n /** Insert a ChannelRootAspect on the specified element.\n * @deprecated in 4.0 - will not be removed until after 2026-06-13. Use [[ChannelControl.makeChannelRoot]]. This method does not enforce the rule that channels may not nest and is therefore dangerous.\n */\n public static insert(iModel: IModelDb, ownerId: Id64String, channelName: string) {\n const props: ChannelRootAspectProps = { classFullName: this.classFullName, element: { id: ownerId }, owner: channelName };\n iModel.elements.insertAspect(props);\n }\n}\n\n/** An ElementMultiAspect that stores synchronization information for an Element originating from an external source.\n * @note The associated ECClass was added to the BisCore schema in version 1.0.2\n * @public @preview\n */\nexport class ExternalSourceAspect extends ElementMultiAspect {\n public static override get className(): string { return \"ExternalSourceAspect\"; }\n\n /** An element that scopes the combination of `kind` and `identifier` to uniquely identify the object from the external source.\n * @note Warning: in a future major release the `scope` property will be optional, since the scope is intended to be potentially invalid.\n * all references should treat it as potentially undefined, but we cannot change the type yet since that is a breaking change.\n */\n public scope: RelatedElement;\n /** The identifier of the object in the source repository. */\n public identifier: string;\n /** The kind of object within the source repository. */\n public kind: string;\n /** The cryptographic hash (any algorithm) of the source object's content. If defined, it must be guaranteed to change when the source object's content changes. */\n public checksum?: string;\n /** An optional value that is typically a version number or a pseudo version number like last modified time.\n * It will be used by the synchronization process to detect that a source object is unchanged so that computing a cryptographic hash can be avoided.\n * If present, this value must be guaranteed to change when any of the source object's content changes.\n */\n public version?: string;\n /** A place where additional JSON properties can be stored. For example, provenance information or properties relating to the synchronization process.\n * @note Warning: in a future major release, the type of `jsonProperties` will be changed to object, and itwin.js will automatically stringify it when writing to the iModel.\n * This will be a breaking change, since application code will have to change from supplying a string to supplying an object.\n */\n public jsonProperties?: string;\n /** The source of the imported/synchronized object. Should point to an instance of [ExternalSource]($backend). */\n public source?: RelatedElement;\n\n /** Construct an aspect from its JSON representation and its containing iModel. */\n constructor(props: ExternalSourceAspectProps, iModel: IModelDb) {\n super(props, iModel);\n this.scope = RelatedElement.fromJSON(props.scope)!; // eslint-disable-line @typescript-eslint/no-non-null-assertion\n this.source = RelatedElement.fromJSON(props.source);\n this.identifier = props.identifier;\n this.kind = props.kind;\n this.checksum = props.checksum;\n this.version = props.version;\n this.jsonProperties = props.jsonProperties;\n }\n\n /** Look up the elements that contain one or more ExternalSourceAspect with the specified Scope, Kind, and Identifier.\n * The result of this function is an array of all of the ExternalSourceAspects that were found, each associated with the owning element.\n * A given element could have more than one ExternalSourceAspect with the given scope, kind, and identifier.\n * Also, many elements could have ExternalSourceAspect with the same scope, kind, and identifier.\n * Therefore, the result array could have more than one entry with the same elementId.\n * Aspects are never shared. Each aspect has its own unique ECInstanceId.\n * @param iModelDb The iModel to query\n * @param scope The scope of the ExternalSourceAspects to find\n * @param kind The kind of the ExternalSourceAspects to find\n * @param identifier The identifier of the ExternalSourceAspects to find\n * @returns the query results\n */\n public static findAllBySource(iModelDb: IModelDb, scope: Id64String, kind: string, identifier: string): Array<{ elementId: Id64String, aspectId: Id64String }> {\n const sql = `SELECT Element.Id, ECInstanceId FROM ${ExternalSourceAspect.classFullName} WHERE (Scope.Id=:scope AND Kind=:kind AND Identifier=:identifier)`;\n const found: Array<{ elementId: Id64String, aspectId: Id64String }> = [];\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n iModelDb.withPreparedStatement(sql, (statement: ECSqlStatement) => {\n statement.bindId(\"scope\", scope);\n statement.bindString(\"kind\", kind);\n statement.bindString(\"identifier\", identifier);\n while (DbResult.BE_SQLITE_ROW === statement.step()) {\n found.push({ elementId: statement.getValue(0).getId(), aspectId: statement.getValue(1).getId() });\n }\n });\n return found;\n }\n\n public override toJSON(): ExternalSourceAspectProps {\n const val = super.toJSON() as ExternalSourceAspectProps;\n val.scope = this.scope;\n val.source = this.source;\n val.identifier = this.identifier;\n val.kind = this.kind;\n val.checksum = this.checksum;\n val.version = this.version;\n val.jsonProperties = this.jsonProperties;\n return val;\n }\n\n protected override collectReferenceIds(referenceIds: EntityReferenceSet): void {\n super.collectReferenceIds(referenceIds);\n if (this.scope)\n referenceIds.addElement(this.scope.id);\n referenceIds.addElement(this.element.id);\n if (this.source)\n referenceIds.addElement(this.source.id);\n }\n}\n\n/** @public @preview */\nexport namespace ExternalSourceAspect {\n /** Standard values for the `Kind` property of `ExternalSourceAspect`.\n * @public @preview\n */\n export enum Kind {\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Element]] provenance */\n Element = \"Element\",\n /** Indicates that the [[ExternalSourceAspect]] is storing [[Relationship]] provenance */\n Relationship = \"Relationship\",\n /** Indicates that the [[ExternalSourceAspect]] is storing *scope* provenance\n * @see [[ExternalSourceAspect.scope]]\n */\n Scope = \"Scope\",\n }\n}\n"]}
@@ -5,7 +5,7 @@ import { Id64String } from "@itwin/core-bentley";
5
5
  import { ElementLoadOptions, EntityProps, EntityReferenceSet, PropertyCallback } from "@itwin/core-common";
6
6
  import type { IModelDb } from "./IModelDb";
7
7
  import { Schema } from "./Schema";
8
- import { EntityClass, Property, SchemaItemKey } from "@itwin/ecschema-metadata";
8
+ import { EntityClass, Property, RelationshipClass, SchemaItemKey } from "@itwin/ecschema-metadata";
9
9
  /** Represents a row returned by an ECSql query. The row is returned as a map of property names to values.
10
10
  * ECSqlRow has same schema as declared in ECSchema for the class and similar to if ECSQL SELECT * FROM <schema>:<class> were executed.
11
11
  * @beta */
@@ -36,7 +36,7 @@ export interface CustomHandledProperty {
36
36
  /** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].
37
37
  * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).
38
38
  * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].
39
- * @public
39
+ * @public @preview
40
40
  */
41
41
  export declare class Entity {
42
42
  /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types
@@ -56,7 +56,8 @@ export declare class Entity {
56
56
  * @public @preview
57
57
  */
58
58
  static get schemaItemKey(): SchemaItemKey;
59
- private _metadata?;
59
+ /** Cached Metadata for the ECClass */
60
+ protected _metadata?: EntityClass | RelationshipClass;
60
61
  /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.
61
62
  * This property makes such code slightly less tedious to read and write.
62
63
  * @internal
@@ -96,7 +97,7 @@ export declare class Entity {
96
97
  * @param func The callback to be invoked on each property
97
98
  * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.
98
99
  * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
99
- * @deprecated in 5.0. Please use `forEach` to get the metadata and iterate over the properties instead.
100
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `forEach` to get the metadata and iterate over the properties instead.
100
101
  *
101
102
  * @example
102
103
  * ```typescript
@@ -136,12 +137,14 @@ export declare class Entity {
136
137
  * @public @preview
137
138
  */
138
139
  get schemaItemKey(): SchemaItemKey;
139
- /** query metadata for this entity class from the iModel's schema
140
+ /** Query metadata for this entity class from the iModel's schema. Returns cached metadata if available.
140
141
  * @throws [[IModelError]] if there is a problem querying the schema
141
142
  * @returns The metadata for the current entity
142
143
  * @public @preview
143
144
  */
144
- getMetaData(): Promise<EntityClass>;
145
+ getMetaData(): Promise<EntityClass | RelationshipClass>;
146
+ /** @internal */
147
+ getMetaDataSync(): EntityClass | RelationshipClass;
145
148
  /** @internal */
146
149
  static get protectedOperations(): string[];
147
150
  /** return whether this Entity class is a subclass of another Entity class
@@ -178,7 +181,7 @@ export declare class Entity {
178
181
  */
179
182
  export type PropertyHandler = (name: string, property: Property) => void;
180
183
  /** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.
181
- * @public
184
+ * @public @preview
182
185
  */
183
186
  export type EntityClassType<T> = Function & {
184
187
  prototype: T;
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAoB,MAAM,oBAAoB,CAAC;AAC7H,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAGhF;;WAEW;AACX,MAAM,WAAW,QAAQ;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB;AAED;WACW;AACX,MAAM,WAAW,qBAAqB;IACpC,yBAAyB;IACzB,GAAG,EAAE,QAAQ,CAAC;IACd,2CAA2C;IAC3C,MAAM,EAAE,QAAQ,CAAC;IACjB,oCAAoC;IACpC,OAAO,CAAC,EAAE;QACR,2CAA2C;QAC3C,OAAO,CAAC,EAAE,kBAAkB,CAAC;KAC9B,CAAA;CACF;AAED;WACW;AACX,MAAM,WAAW,qBAAqB;IACpC,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,oCAAoC;IAC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,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,QAAQ,GAAG;IAAE,SAAS,EAAE,CAAC,CAAA;CAAE,CAAC"}
package/lib/cjs/Entity.js CHANGED
@@ -15,7 +15,7 @@ const Symbols_1 = require("./internal/Symbols");
15
15
  /** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].
16
16
  * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).
17
17
  * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].
18
- * @public
18
+ * @public @preview
19
19
  */
20
20
  class Entity {
21
21
  /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types
@@ -38,6 +38,7 @@ class Entity {
38
38
  // We cannot cache this here because the className gets overridden in subclasses
39
39
  return new ecschema_metadata_1.SchemaItemKey(this.className, this.schema.schemaKey);
40
40
  }
41
+ /** Cached Metadata for the ECClass */
41
42
  _metadata;
42
43
  /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.
43
44
  * This property makes such code slightly less tedious to read and write.
@@ -138,7 +139,7 @@ class Entity {
138
139
  * @param func The callback to be invoked on each property
139
140
  * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.
140
141
  * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.
141
- * @deprecated in 5.0. Please use `forEach` to get the metadata and iterate over the properties instead.
142
+ * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `forEach` to get the metadata and iterate over the properties instead.
142
143
  *
143
144
  * @example
144
145
  * ```typescript
@@ -173,12 +174,15 @@ class Entity {
173
174
  * ```
174
175
  */
175
176
  forEach(func, includeCustom = true) {
176
- const metaData = this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey, ecschema_metadata_1.EntityClass);
177
- if (!metaData)
178
- throw new Error(`Cannot get metadata for ${this.classFullName}`);
179
- for (const property of metaData.getPropertiesSync()) {
180
- if (includeCustom || !property.customAttributes?.has(`BisCore.CustomHandledProperty`))
181
- func(property.name, property);
177
+ const item = this._metadata ?? this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey);
178
+ if (ecschema_metadata_1.EntityClass.isEntityClass(item) || ecschema_metadata_1.RelationshipClass.isRelationshipClass(item)) {
179
+ for (const property of item.getPropertiesSync()) {
180
+ if (includeCustom || !property.customAttributes?.has(`BisCore.CustomHandledProperty`))
181
+ func(property.name, property);
182
+ }
183
+ }
184
+ else {
185
+ throw new Error(`Cannot get metadata for ${this.classFullName}. Class is not an EntityClass or RelationshipClass.`);
182
186
  }
183
187
  }
184
188
  /** Get the full BIS class name of this Entity in the form "schema:class" */
@@ -190,19 +194,37 @@ class Entity {
190
194
  * @public @preview
191
195
  */
192
196
  get schemaItemKey() { return this._ctor.schemaItemKey; }
193
- /** query metadata for this entity class from the iModel's schema
197
+ /** Query metadata for this entity class from the iModel's schema. Returns cached metadata if available.
194
198
  * @throws [[IModelError]] if there is a problem querying the schema
195
199
  * @returns The metadata for the current entity
196
200
  * @public @preview
197
201
  */
198
202
  async getMetaData() {
199
- if (!this._metadata) {
200
- this._metadata = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, ecschema_metadata_1.EntityClass);
203
+ if (this._metadata) {
204
+ return this._metadata;
205
+ }
206
+ const ecClass = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, ecschema_metadata_1.ECClass);
207
+ if (ecschema_metadata_1.EntityClass.isEntityClass(ecClass) || ecschema_metadata_1.RelationshipClass.isRelationshipClass(ecClass)) {
208
+ this._metadata = ecClass;
209
+ return this._metadata;
210
+ }
211
+ else {
212
+ throw new Error(`Cannot get metadata for ${this.classFullName}`);
213
+ }
214
+ }
215
+ /** @internal */
216
+ getMetaDataSync() {
217
+ if (this._metadata) {
218
+ return this._metadata;
219
+ }
220
+ const ecClass = this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey, ecschema_metadata_1.ECClass);
221
+ if (ecschema_metadata_1.EntityClass.isEntityClass(ecClass) || ecschema_metadata_1.RelationshipClass.isRelationshipClass(ecClass)) {
222
+ this._metadata = ecClass;
223
+ return this._metadata;
201
224
  }
202
- if (!this._metadata) {
225
+ else {
203
226
  throw new Error(`Cannot get metadata for ${this.classFullName}`);
204
227
  }
205
- return this._metadata;
206
228
  }
207
229
  /** @internal */
208
230
  static get protectedOperations() { return []; }
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAA6H;AAG7H,gEAAgF;AAChF,gDAA+C;AAgC/C;;;;GAIG;AACH,MAAa,MAAM;IACjB;;OAEG;IACa,kBAAkB,GAAG,IAAa,CAAC;IACnD,0CAA0C;IACnC,MAAM,CAAC,MAAM,CAAgB,CAAC,mGAAmG;IAExI,IAAY,KAAK,KAAoB,OAAO,IAAI,CAAC,WAA4B,CAAC,CAAC,CAAC;IAEhF;;;;OAIG;IACI,MAAM,KAAK,SAAS,KAAa,OAAO,QAAQ,CAAC,CAAC,CAAC;IAE1D;;OAEG;IACI,MAAM,KAAK,aAAa;QAC7B,gFAAgF;QAChF,OAAO,IAAI,iCAAa,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAClE,CAAC;IAEO,SAAS,CAAe;IAEhC;;;OAGG;IACH,IAAW,KAAK,KAAU,OAAO,IAAI,CAAC,CAAC,CAAC;IAExC,yDAAyD;IACzD,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAExE,4DAA4D;IAC5D,IAAW,SAAS,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAE/D,iDAAiD;IAC1C,MAAM,CAA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mB,KAAe,OAAO,EAAE,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACI,MAAM,CAAC,EAAE,CAAC,UAAyB;QACxC,6EAA6E;QAC7E,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,YAAY,UAAU,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;OAKG;IACI,eAAe;QACpB,MAAM,YAAY,GAAG,IAAI,gCAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACO,mBAAmB,CAAC,aAAiC;QAC7D,OAAO,CAAC,2BAA2B;IACrC,CAAC;;AArQH,wBAsQC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Schema\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ElementLoadOptions, EntityProps, EntityReferenceSet, PropertyCallback, PropertyMetaData } from \"@itwin/core-common\";\nimport type { IModelDb } from \"./IModelDb\";\nimport { Schema } from \"./Schema\";\nimport { EntityClass, Property, SchemaItemKey } from \"@itwin/ecschema-metadata\";\nimport { _nativeDb } from \"./internal/Symbols\";\n\n/** Represents a row returned by an ECSql query. The row is returned as a map of property names to values.\n * ECSqlRow has same schema as declared in ECSchema for the class and similar to if ECSQL SELECT * FROM <schema>:<class> were executed.\n * @beta */\nexport interface ECSqlRow {\n [key: string]: any\n}\n\n/** Set of properties that are used to deserialize an [[EntityProps]] from an ECSqlRow.\n * @beta */\nexport interface DeserializeEntityArgs {\n /** Row to deserialize */\n row: ECSqlRow;\n /** The IModel that contains this Entity */\n iModel: IModelDb;\n /** The options used when loading */\n options?: {\n /** Options used when loading an element */\n element?: ElementLoadOptions;\n }\n}\n\n/** A property of an [[Entity]] that needs to be custom handled during deserialization and serialization.\n * @beta */\nexport interface CustomHandledProperty {\n /** The name of the property as it appears in the ECSqlRow */\n readonly propertyName: string;\n /** Where the property is defined */\n readonly source: \"Class\" | \"Computed\";\n}\n\n/** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].\n * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).\n * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].\n * @public\n */\nexport class Entity {\n /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types\n * are never substitutable for one another. To obtain an EntityProps from an Entity, use [[Entity.toJSON]].\n */\n public readonly isInstanceOfEntity = true as const;\n /** The Schema that defines this class. */\n public static schema: typeof Schema; // TODO: Schema key on the static level, but it requires a version which may differ between imodels\n\n private get _ctor(): typeof Entity { return this.constructor as typeof Entity; }\n\n /** The name of the BIS class associated with this class.\n * @note Every subclass of Entity **MUST** override this method to identify its BIS class.\n * Failure to do so will ordinarily result in an error when the class is registered, since there may only\n * be one JavaScript class for a given BIS class (usually the errant class will collide with its superclass.)\n */\n public static get className(): string { return \"Entity\"; }\n\n /** Serves as a unique identifier for this class. Typed variant of [[classFullName]].\n * @public @preview\n */\n public static get schemaItemKey(): SchemaItemKey {\n // We cannot cache this here because the className gets overridden in subclasses\n return new SchemaItemKey(this.className, this.schema.schemaKey);\n }\n\n private _metadata?: EntityClass;\n\n /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.\n * This property makes such code slightly less tedious to read and write.\n * @internal\n */\n public get asAny(): any { return this; }\n\n /** The name of the BIS Schema that defines this class */\n public get schemaName(): string { return this._ctor.schema.schemaName; }\n\n /** The name of the BIS class associated with this class. */\n public get className(): string { return this._ctor.className; }\n\n /** The [[IModelDb]] that contains this Entity */\n public iModel: IModelDb;\n\n /** The Id of this Entity. May be invalid if the Entity has not yet been saved in the database. */\n public id: Id64String;\n\n\n protected constructor(props: EntityProps, iModel: IModelDb) {\n this.iModel = iModel;\n this.id = Id64.fromJSON(props.id);\n // copy all auto-handled properties from input to the object being constructed\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.forEachProperty((propName: string, meta: PropertyMetaData) => (this as any)[propName] = meta.createProperty((props as any)[propName]), false);\n }\n\n /** Invoke the constructor of the specified `Entity` subclass.\n * @internal\n */\n public static instantiate(subclass: typeof Entity, props: EntityProps, iModel: IModelDb): Entity {\n return new subclass(props, iModel);\n }\n\n /** List of properties that are need to be custom handled during deserialization and serialization.\n * These properties differ between the ECSql instance of an Entity and the Entity itself.\n * @beta */\n protected static readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"id\", source: \"Class\" },\n { propertyName: \"className\", source: \"Class\" },\n { propertyName: \"jsonProperties\", source: \"Class\" }\n ];\n\n /** Get the list of properties that are custom handled by this class and its superclasses.\n * @internal */\n private static getCustomHandledProperties(): readonly CustomHandledProperty[] {\n if (this.name === \"Entity\") {\n return this._customHandledProps;\n }\n\n const superClass = Object.getPrototypeOf(this) as typeof Entity;\n return [\n ...superClass.getCustomHandledProperties(),\n ...this._customHandledProps,\n ];\n }\n\n /** Converts an ECSqlRow of an Entity to an EntityProps. This is used to deserialize an Entity from the database.\n * @beta */\n public static deserialize(props: DeserializeEntityArgs): EntityProps {\n const enProps: EntityProps = {\n classFullName: props.row.classFullName,\n id: props.row.id,\n }\n\n // Handles cases where id64 ints are stored in the jsonProperties and converts them to hex before parsing as a json object in js\n if (props.row.jsonProperties) {\n enProps.jsonProperties = JSON.parse(props.iModel[_nativeDb].patchJsonProperties(props.row.jsonProperties));\n }\n // Auto handles all properties that are not in the 'customHandledProperties' list\n const customHandledProperties = this.getCustomHandledProperties();\n Object.keys(props.row)\n .filter((propertyName) => customHandledProperties.find((val) => val.propertyName === propertyName) === undefined)\n .forEach((propertyName) => (enProps as ECSqlRow)[propertyName] = props.row[propertyName]\n );\n // Handles custom relClassNames to use '.' instead of ':'\n Object.keys(enProps).forEach((propertyName) => {\n if ((enProps as ECSqlRow)[propertyName].relClassName !== undefined && propertyName !== \"modeledElement\" && propertyName !== \"parentModel\") {\n (enProps as ECSqlRow)[propertyName].relClassName = (enProps as ECSqlRow)[propertyName].relClassName.replace(':', '.');\n }\n });\n return enProps;\n }\n\n /** Converts an EntityProps to an ECSqlRow. This is used to serialize an Entity to prepare to write it to the database.\n * @beta */\n public static serialize(props: EntityProps, _iModel: IModelDb): ECSqlRow {\n const inst: ECSqlRow = {\n classFullName: props.classFullName,\n id: props.id,\n }\n\n const customHandledProperties = this.getCustomHandledProperties();\n Object.keys(props)\n .filter((propertyName) => customHandledProperties.find((val) => val.propertyName === propertyName) === undefined)\n .forEach((propertyName) => inst[propertyName] = (props as ECSqlRow)[propertyName]\n );\n return inst;\n }\n\n /** Obtain the JSON representation of this Entity. Subclasses of [[Entity]] typically override this method to return their corresponding sub-type of [EntityProps]($common) -\n * for example, [[GeometricElement.toJSON]] returns a [GeometricElementProps]($common).\n */\n public toJSON(): EntityProps {\n const val: any = {};\n val.classFullName = this.classFullName;\n if (Id64.isValid(this.id))\n val.id = this.id;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.forEachProperty((propName: string) => val[propName] = (this as any)[propName], false);\n return val;\n }\n\n /** Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n * @deprecated in 5.0. Please use `forEach` to get the metadata and iterate over the properties instead.\n *\n * @example\n * ```typescript\n * // Deprecated method\n * entity.forEachProperty((name, propMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * });\n *\n * // New method\n * entity.forEach((name, property) => {\n * console.log(`Property name: ${name}, Property type: ${property.propertyType}`);\n * });\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public forEachProperty(func: PropertyCallback, includeCustom: boolean = true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.iModel.forEachMetaData(this.classFullName, true, func, includeCustom);\n }\n\n /**\n * Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property.\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n * @throws Error if metadata for the class cannot be retrieved.\n *\n * @example\n * ```typescript\n * entity.forEach((name, property) => {\n * console.log(`Property name: ${name}, Property type: ${property.propertyType}`);\n * });\n * ```\n */\n public forEach(func: PropertyHandler, includeCustom: boolean = true) {\n const metaData = this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey, EntityClass);\n if (!metaData)\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n\n for (const property of metaData.getPropertiesSync()) {\n if (includeCustom || !property.customAttributes?.has(`BisCore.CustomHandledProperty`))\n func(property.name, property);\n }\n }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\" */\n public static get classFullName(): string { return `${this.schema.schemaName}:${this.className}`; }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\". */\n public get classFullName(): string { return this._ctor.classFullName; }\n /**\n * Get the item key used by the ecschema-metadata package to identify this entity class\n * @public @preview\n */\n public get schemaItemKey(): SchemaItemKey { return this._ctor.schemaItemKey; }\n\n /** query metadata for this entity class from the iModel's schema\n * @throws [[IModelError]] if there is a problem querying the schema\n * @returns The metadata for the current entity\n * @public @preview\n */\n public async getMetaData(): Promise<EntityClass> {\n if (!this._metadata) {\n this._metadata = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, EntityClass);\n }\n\n if (!this._metadata) {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n\n return this._metadata;\n }\n\n\n /** @internal */\n public static get protectedOperations(): string[] { return []; }\n\n /** return whether this Entity class is a subclass of another Entity class\n * @note the subclass-ness is checked according to JavaScript inheritance, to check the underlying raw EC class's\n * inheritance, you can use [ECClass.is]($ecschema-metadata)\n * @note this should have a type of `is<T extends typeof Entity>(otherClass: T): this is T` but can't because of\n * typescript's restriction on the `this` type in static methods\n */\n public static is(otherClass: typeof Entity): boolean {\n // inline of @itwin/core-bentley's isSubclassOf due to protected constructor.\n return this === otherClass || this.prototype instanceof otherClass;\n }\n\n /** whether this JavaScript class was generated for this ECClass because there was no registered custom implementation\n * ClassRegistry overrides this when generating a class\n * @internal\n */\n public static get isGeneratedClass() { return false; }\n\n /** Get the set of this entity's *entity references*, [EntityReferenceSet]($backend). An *entity reference* is any id\n * stored on the entity, in its EC properties or json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @see this.collectReferenceIds\n * @beta\n */\n public getReferenceIds(): EntityReferenceSet {\n const referenceIds = new EntityReferenceSet();\n this.collectReferenceIds(referenceIds);\n return referenceIds;\n }\n\n /** Collect the Ids of this entity's *references* at this level of the class hierarchy.\n * A *reference* is any entity referenced by this entity's EC Data, including json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @param _referenceIds The Id64Set to populate with reference Ids.\n * @note This should be overridden (with `super` called) at each level the class hierarchy that introduces references.\n * @see getReferenceIds\n * @beta\n */\n protected collectReferenceIds(_referenceIds: EntityReferenceSet): void {\n return; // no references by default\n }\n}\n\n/** A callback function to process properties of an Entity\n * @public @preview\n */\nexport type PropertyHandler = (name: string, property: Property) => void;\n\n/** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.\n * @public\n */\nexport type EntityClassType<T> = Function & { prototype: T }; // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n"]}
1
+ {"version":3,"file":"Entity.js","sourceRoot":"","sources":["../../src/Entity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,oDAA6H;AAG7H,gEAA4G;AAC5G,gDAA+C;AAgC/C;;;;GAIG;AACH,MAAa,MAAM;IACjB;;OAEG;IACa,k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CAAC,OAAO,CAAC,IAAI,qCAAiB,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;YACzF,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC;YACzB,OAAO,IAAI,CAAC,SAAS,CAAC;QACxB,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,gBAAgB;IACT,MAAM,KAAK,mBAAmB,KAAe,OAAO,EAAE,CAAC,CAAC,CAAC;IAEhE;;;;;OAKG;IACI,MAAM,CAAC,EAAE,CAAC,UAAyB;QACxC,6EAA6E;QAC7E,OAAO,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,SAAS,YAAY,UAAU,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,MAAM,KAAK,gBAAgB,KAAK,OAAO,KAAK,CAAC,CAAC,CAAC;IAEtD;;;;;OAKG;IACI,eAAe;QACpB,MAAM,YAAY,GAAG,IAAI,gCAAkB,EAAE,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QACvC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACO,mBAAmB,CAAC,aAAiC;QAC7D,OAAO,CAAC,2BAA2B;IACrC,CAAC;;AAxRH,wBAyRC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Schema\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { ElementLoadOptions, EntityProps, EntityReferenceSet, PropertyCallback, PropertyMetaData } from \"@itwin/core-common\";\nimport type { IModelDb } from \"./IModelDb\";\nimport { Schema } from \"./Schema\";\nimport { ECClass, EntityClass, Property, RelationshipClass, SchemaItemKey } from \"@itwin/ecschema-metadata\";\nimport { _nativeDb } from \"./internal/Symbols\";\n\n/** Represents a row returned by an ECSql query. The row is returned as a map of property names to values.\n * ECSqlRow has same schema as declared in ECSchema for the class and similar to if ECSQL SELECT * FROM <schema>:<class> were executed.\n * @beta */\nexport interface ECSqlRow {\n [key: string]: any\n}\n\n/** Set of properties that are used to deserialize an [[EntityProps]] from an ECSqlRow.\n * @beta */\nexport interface DeserializeEntityArgs {\n /** Row to deserialize */\n row: ECSqlRow;\n /** The IModel that contains this Entity */\n iModel: IModelDb;\n /** The options used when loading */\n options?: {\n /** Options used when loading an element */\n element?: ElementLoadOptions;\n }\n}\n\n/** A property of an [[Entity]] that needs to be custom handled during deserialization and serialization.\n * @beta */\nexport interface CustomHandledProperty {\n /** The name of the property as it appears in the ECSqlRow */\n readonly propertyName: string;\n /** Where the property is defined */\n readonly source: \"Class\" | \"Computed\";\n}\n\n/** Represents one of the fundamental building block in an [[IModelDb]]: as an [[Element]], [[Model]], or [[Relationship]].\n * Every subclass of Entity represents one BIS [ECClass]($ecschema-metadata).\n * An Entity is typically instantiated from an [EntityProps]($common) and can be converted back to this representation via [[Entity.toJSON]].\n * @public @preview\n */\nexport class Entity {\n /** An immutable property used to discriminate between [[Entity]] and [EntityProps]($common), used to inform the TypeScript compiler that these two types\n * are never substitutable for one another. To obtain an EntityProps from an Entity, use [[Entity.toJSON]].\n */\n public readonly isInstanceOfEntity = true as const;\n /** The Schema that defines this class. */\n public static schema: typeof Schema; // TODO: Schema key on the static level, but it requires a version which may differ between imodels\n\n private get _ctor(): typeof Entity { return this.constructor as typeof Entity; }\n\n /** The name of the BIS class associated with this class.\n * @note Every subclass of Entity **MUST** override this method to identify its BIS class.\n * Failure to do so will ordinarily result in an error when the class is registered, since there may only\n * be one JavaScript class for a given BIS class (usually the errant class will collide with its superclass.)\n */\n public static get className(): string { return \"Entity\"; }\n\n /** Serves as a unique identifier for this class. Typed variant of [[classFullName]].\n * @public @preview\n */\n public static get schemaItemKey(): SchemaItemKey {\n // We cannot cache this here because the className gets overridden in subclasses\n return new SchemaItemKey(this.className, this.schema.schemaKey);\n }\n\n /** Cached Metadata for the ECClass */\n protected _metadata?: EntityClass | RelationshipClass;\n\n /** When working with an Entity it can be useful to set property values directly, bypassing the compiler's type checking.\n * This property makes such code slightly less tedious to read and write.\n * @internal\n */\n public get asAny(): any { return this; }\n\n /** The name of the BIS Schema that defines this class */\n public get schemaName(): string { return this._ctor.schema.schemaName; }\n\n /** The name of the BIS class associated with this class. */\n public get className(): string { return this._ctor.className; }\n\n /** The [[IModelDb]] that contains this Entity */\n public iModel: IModelDb;\n\n /** The Id of this Entity. May be invalid if the Entity has not yet been saved in the database. */\n public id: Id64String;\n\n\n protected constructor(props: EntityProps, iModel: IModelDb) {\n this.iModel = iModel;\n this.id = Id64.fromJSON(props.id);\n // copy all auto-handled properties from input to the object being constructed\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.forEachProperty((propName: string, meta: PropertyMetaData) => (this as any)[propName] = meta.createProperty((props as any)[propName]), false);\n }\n\n /** Invoke the constructor of the specified `Entity` subclass.\n * @internal\n */\n public static instantiate(subclass: typeof Entity, props: EntityProps, iModel: IModelDb): Entity {\n return new subclass(props, iModel);\n }\n\n /** List of properties that are need to be custom handled during deserialization and serialization.\n * These properties differ between the ECSql instance of an Entity and the Entity itself.\n * @beta */\n protected static readonly _customHandledProps: CustomHandledProperty[] = [\n { propertyName: \"id\", source: \"Class\" },\n { propertyName: \"className\", source: \"Class\" },\n { propertyName: \"jsonProperties\", source: \"Class\" }\n ];\n\n /** Get the list of properties that are custom handled by this class and its superclasses.\n * @internal */\n private static getCustomHandledProperties(): readonly CustomHandledProperty[] {\n if (this.name === \"Entity\") {\n return this._customHandledProps;\n }\n\n const superClass = Object.getPrototypeOf(this) as typeof Entity;\n return [\n ...superClass.getCustomHandledProperties(),\n ...this._customHandledProps,\n ];\n }\n\n /** Converts an ECSqlRow of an Entity to an EntityProps. This is used to deserialize an Entity from the database.\n * @beta */\n public static deserialize(props: DeserializeEntityArgs): EntityProps {\n const enProps: EntityProps = {\n classFullName: props.row.classFullName,\n id: props.row.id,\n }\n\n // Handles cases where id64 ints are stored in the jsonProperties and converts them to hex before parsing as a json object in js\n if (props.row.jsonProperties) {\n enProps.jsonProperties = JSON.parse(props.iModel[_nativeDb].patchJsonProperties(props.row.jsonProperties));\n }\n // Auto handles all properties that are not in the 'customHandledProperties' list\n const customHandledProperties = this.getCustomHandledProperties();\n Object.keys(props.row)\n .filter((propertyName) => customHandledProperties.find((val) => val.propertyName === propertyName) === undefined)\n .forEach((propertyName) => (enProps as ECSqlRow)[propertyName] = props.row[propertyName]\n );\n // Handles custom relClassNames to use '.' instead of ':'\n Object.keys(enProps).forEach((propertyName) => {\n if ((enProps as ECSqlRow)[propertyName].relClassName !== undefined && propertyName !== \"modeledElement\" && propertyName !== \"parentModel\") {\n (enProps as ECSqlRow)[propertyName].relClassName = (enProps as ECSqlRow)[propertyName].relClassName.replace(':', '.');\n }\n });\n return enProps;\n }\n\n /** Converts an EntityProps to an ECSqlRow. This is used to serialize an Entity to prepare to write it to the database.\n * @beta */\n public static serialize(props: EntityProps, _iModel: IModelDb): ECSqlRow {\n const inst: ECSqlRow = {\n classFullName: props.classFullName,\n id: props.id,\n }\n\n const customHandledProperties = this.getCustomHandledProperties();\n Object.keys(props)\n .filter((propertyName) => customHandledProperties.find((val) => val.propertyName === propertyName) === undefined)\n .forEach((propertyName) => inst[propertyName] = (props as ECSqlRow)[propertyName]\n );\n return inst;\n }\n\n /** Obtain the JSON representation of this Entity. Subclasses of [[Entity]] typically override this method to return their corresponding sub-type of [EntityProps]($common) -\n * for example, [[GeometricElement.toJSON]] returns a [GeometricElementProps]($common).\n */\n public toJSON(): EntityProps {\n const val: any = {};\n val.classFullName = this.classFullName;\n if (Id64.isValid(this.id))\n val.id = this.id;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.forEachProperty((propName: string) => val[propName] = (this as any)[propName], false);\n return val;\n }\n\n /** Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n * @deprecated in 5.0 - will not be removed until after 2026-06-13. Please use `forEach` to get the metadata and iterate over the properties instead.\n *\n * @example\n * ```typescript\n * // Deprecated method\n * entity.forEachProperty((name, propMetaData) => {\n * console.log(`Property name: ${name}, Property type: ${propMetaData.primitiveType}`);\n * });\n *\n * // New method\n * entity.forEach((name, property) => {\n * console.log(`Property name: ${name}, Property type: ${property.propertyType}`);\n * });\n * ```\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public forEachProperty(func: PropertyCallback, includeCustom: boolean = true) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this.iModel.forEachMetaData(this.classFullName, true, func, includeCustom);\n }\n\n /**\n * Call a function for each property of this Entity.\n * @param func The callback to be invoked on each property.\n * @param includeCustom If true (default), include custom-handled properties in the iteration. Otherwise, skip custom-handled properties.\n * @note Custom-handled properties are core properties that have behavior enforced by C++ handlers.\n * @throws Error if metadata for the class cannot be retrieved.\n *\n * @example\n * ```typescript\n * entity.forEach((name, property) => {\n * console.log(`Property name: ${name}, Property type: ${property.propertyType}`);\n * });\n * ```\n */\n public forEach(func: PropertyHandler, includeCustom: boolean = true) {\n const item = this._metadata ?? this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey);\n\n if (EntityClass.isEntityClass(item) || RelationshipClass.isRelationshipClass(item)) {\n for (const property of item.getPropertiesSync()) {\n if (includeCustom || !property.customAttributes?.has(`BisCore.CustomHandledProperty`))\n func(property.name, property);\n }\n } else {\n throw new Error(`Cannot get metadata for ${this.classFullName}. Class is not an EntityClass or RelationshipClass.`);\n }\n }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\" */\n public static get classFullName(): string { return `${this.schema.schemaName}:${this.className}`; }\n\n /** Get the full BIS class name of this Entity in the form \"schema:class\". */\n public get classFullName(): string { return this._ctor.classFullName; }\n /**\n * Get the item key used by the ecschema-metadata package to identify this entity class\n * @public @preview\n */\n public get schemaItemKey(): SchemaItemKey { return this._ctor.schemaItemKey; }\n\n /** Query metadata for this entity class from the iModel's schema. Returns cached metadata if available.\n * @throws [[IModelError]] if there is a problem querying the schema\n * @returns The metadata for the current entity\n * @public @preview\n */\n public async getMetaData(): Promise<EntityClass | RelationshipClass> {\n if (this._metadata) {\n return this._metadata;\n }\n\n const ecClass = await this.iModel.schemaContext.getSchemaItem(this.schemaItemKey, ECClass);\n if (EntityClass.isEntityClass(ecClass) || RelationshipClass.isRelationshipClass(ecClass)) {\n this._metadata = ecClass;\n return this._metadata;\n } else {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n }\n\n /** @internal */\n public getMetaDataSync(): EntityClass | RelationshipClass {\n if (this._metadata) {\n return this._metadata;\n }\n\n const ecClass = this.iModel.schemaContext.getSchemaItemSync(this.schemaItemKey, ECClass);\n if (EntityClass.isEntityClass(ecClass) || RelationshipClass.isRelationshipClass(ecClass)) {\n this._metadata = ecClass;\n return this._metadata;\n } else {\n throw new Error(`Cannot get metadata for ${this.classFullName}`);\n }\n }\n \n /** @internal */\n public static get protectedOperations(): string[] { return []; }\n\n /** return whether this Entity class is a subclass of another Entity class\n * @note the subclass-ness is checked according to JavaScript inheritance, to check the underlying raw EC class's\n * inheritance, you can use [ECClass.is]($ecschema-metadata)\n * @note this should have a type of `is<T extends typeof Entity>(otherClass: T): this is T` but can't because of\n * typescript's restriction on the `this` type in static methods\n */\n public static is(otherClass: typeof Entity): boolean {\n // inline of @itwin/core-bentley's isSubclassOf due to protected constructor.\n return this === otherClass || this.prototype instanceof otherClass;\n }\n\n /** whether this JavaScript class was generated for this ECClass because there was no registered custom implementation\n * ClassRegistry overrides this when generating a class\n * @internal\n */\n public static get isGeneratedClass() { return false; }\n\n /** Get the set of this entity's *entity references*, [EntityReferenceSet]($backend). An *entity reference* is any id\n * stored on the entity, in its EC properties or json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @see this.collectReferenceIds\n * @beta\n */\n public getReferenceIds(): EntityReferenceSet {\n const referenceIds = new EntityReferenceSet();\n this.collectReferenceIds(referenceIds);\n return referenceIds;\n }\n\n /** Collect the Ids of this entity's *references* at this level of the class hierarchy.\n * A *reference* is any entity referenced by this entity's EC Data, including json fields.\n * This is important for cloning operations but can be useful in other situations as well.\n * @param _referenceIds The Id64Set to populate with reference Ids.\n * @note This should be overridden (with `super` called) at each level the class hierarchy that introduces references.\n * @see getReferenceIds\n * @beta\n */\n protected collectReferenceIds(_referenceIds: EntityReferenceSet): void {\n return; // no references by default\n }\n}\n\n/** A callback function to process properties of an Entity\n * @public @preview\n */\nexport type PropertyHandler = (name: string, property: Property) => void;\n\n/** Parameter type that can accept both abstract constructor types and non-abstract constructor types for `instanceof` to test.\n * @public @preview\n */\nexport type EntityClassType<T> = Function & { prototype: T }; // eslint-disable-line @typescript-eslint/no-unsafe-function-type\n"]}
@@ -49,7 +49,7 @@ export interface ExportGraphicsMesh {
49
49
  normals: Float32Array;
50
50
  /** Parameters (uvs) for this mesh, laid out in the pattern XYXY */
51
51
  params: Float32Array;
52
- /** If true, clients should assume both sides of the mesh are visible and not cull backfaces. */
52
+ /** If true, clients should assume both sides of the mesh are visible and not cull back faces. */
53
53
  isTwoSided: boolean;
54
54
  }
55
55
  /** Info provided to ExportGraphicsFunction about graphics.
@@ -273,18 +273,19 @@ export declare class ExportGraphicsMeshVisitor extends PolyfaceData implements P
273
273
  private _nextFacetIndex;
274
274
  private _numWrap;
275
275
  private _polyface;
276
- private constructor();
276
+ protected constructor(facets: ExportGraphicsMesh, numWrap: number);
277
277
  /** Create a visitor for iterating the facets of `polyface`, with indicated number of points to be added to each facet to produce closed point arrays
278
278
  * Typical wrap counts are:
279
- * * 0 -- leave the point arrays with "missing final edge"
279
+ * * 0 -- leave the point arrays with "missing final edge" (default)
280
280
  * * 1 -- add point 0 as closure point
281
281
  * * 2 -- add points 0 and 1 as closure and wrap point. This is useful when vertex visit requires two adjacent vectors, e.g. for cross products.
282
282
  */
283
- static create(polyface: ExportGraphicsMesh, numWrap: number): ExportGraphicsMeshVisitor;
284
- /** Reset the iterator to start at the first facet of the polyface. */
283
+ static create(polyface: ExportGraphicsMesh, numWrap?: number): ExportGraphicsMeshVisitor;
284
+ /** Restart the visitor at the first facet. */
285
285
  reset(): void;
286
286
  /** Select a facet by simple index. */
287
287
  moveToReadIndex(facetIndex: number): boolean;
288
+ /** Load data for the next facet. */
288
289
  moveToNextFacet(): boolean;
289
290
  /** Set the number of vertices to replicate in visitor arrays. */
290
291
  setNumWrap(numWrap: number): void;
@@ -300,12 +301,12 @@ export declare class ExportGraphicsMeshVisitor extends PolyfaceData implements P
300
301
  * Use the artificial paramIndex, which matches pointIndex.
301
302
  */
302
303
  clientNormalIndex(i: number): number;
303
- /** Return the color index of vertex i within the currently loaded facet */
304
+ /** Always returns -1 since we never have colors. */
304
305
  clientColorIndex(_i: number): number;
305
- /** Return the aux data index of vertex i within the currently loaded facet */
306
+ /** Always returns -1 since we never have auxiliary data. */
306
307
  clientAuxIndex(_i: number): number;
307
308
  /** return the client polyface */
308
- clientPolyface(): Polyface;
309
+ clientPolyface(): Polyface | undefined;
309
310
  /** clear the contents of all arrays. Use this along with transferDataFrom methods to build up new facets */
310
311
  clearArrays(): void;
311
312
  /** transfer interpolated data from the other visitor.
@@ -314,5 +315,50 @@ export declare class ExportGraphicsMeshVisitor extends PolyfaceData implements P
314
315
  pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void;
315
316
  /** transfer data from a specified index of the other visitor as new data in this visitor. */
316
317
  pushDataFrom(other: PolyfaceVisitor, index: number): void;
318
+ /** Return the number of facets this visitor is able to visit */
319
+ getVisitableFacetCount(): number;
320
+ /** Create a visitor for a subset of the facets visitable by the instance. */
321
+ createSubsetVisitor(facetIndices: number[], numWrap?: number): ExportGraphicsMeshSubsetVisitor;
322
+ }
323
+ /**
324
+ * An `ExportGraphicsMeshSubsetVisitor` is an `ExportGraphicsMeshVisitor` which only visits a subset of the facets.
325
+ * * The subset is defined by an array of facet indices provided when this visitor is created.
326
+ * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.
327
+ * @public
328
+ */
329
+ export declare class ExportGraphicsMeshSubsetVisitor extends ExportGraphicsMeshVisitor {
330
+ private _facetIndices;
331
+ private _currentSubsetIndex;
332
+ private _nextSubsetIndex;
333
+ private constructor();
334
+ private isValidSubsetIndex;
335
+ /**
336
+ * Create a visitor for iterating a subset of the facets of `polyface`.
337
+ * @param polyface reference to the client polyface, supplying facets
338
+ * @param facetIndices array of indices of facets in the client polyface to visit. This array is cloned.
339
+ * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.
340
+ */
341
+ static createSubsetVisitor(polyface: ExportGraphicsMesh, facetIndices: number[], numWrap?: number): ExportGraphicsMeshSubsetVisitor;
342
+ /**
343
+ * Advance the iterator to a particular facet in the subset of client polyface facets.
344
+ * @param subsetIndex index into the subset array, not to be confused with the client facet index.
345
+ * @return whether the iterator was successfully moved.
346
+ */
347
+ moveToReadIndex(subsetIndex: number): boolean;
348
+ /**
349
+ * Advance the iterator to the next facet in the subset of client polyface facets.
350
+ * @return whether the iterator was successfully moved.
351
+ */
352
+ moveToNextFacet(): boolean;
353
+ /** Restart the visitor at the first facet. */
354
+ reset(): void;
355
+ /**
356
+ * Return the client polyface facet index (aka "readIndex") for the given subset index.
357
+ * @param subsetIndex index into the subset array. Default is the subset index of the currently visited facet.
358
+ * @return valid client polyface facet index, or `undefined` if invalid subset index.
359
+ */
360
+ parentFacetIndex(subsetIndex?: number): number | undefined;
361
+ /** Return the number of facets this visitor is able to visit. */
362
+ getVisitableFacetCount(): number;
317
363
  }
318
364
  //# sourceMappingURL=ExportGraphics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExportGraphics.d.ts","sourceRoot":"","sources":["../../src/ExportGraphics.ts"],"names":[],"mappings":"AAIA;;GAEG;A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