@itwin/core-common 5.0.0-dev.8 → 5.0.0-dev.83

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 (724) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/lib/cjs/AmbientOcclusion.js +17 -9
  3. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  4. package/lib/cjs/AnalysisStyle.d.ts +0 -3
  5. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  6. package/lib/cjs/AnalysisStyle.js +20 -4
  7. package/lib/cjs/AnalysisStyle.js.map +1 -1
  8. package/lib/cjs/Atmosphere.js +39 -21
  9. package/lib/cjs/Atmosphere.js.map +1 -1
  10. package/lib/cjs/BackgroundMapProvider.js +4 -0
  11. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  12. package/lib/cjs/BackgroundMapSettings.js +19 -0
  13. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  14. package/lib/cjs/BlobReader.js +8 -6
  15. package/lib/cjs/BlobReader.js.map +1 -1
  16. package/lib/cjs/BriefcaseTypes.d.ts +2 -2
  17. package/lib/cjs/BriefcaseTypes.d.ts.map +1 -1
  18. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  19. package/lib/cjs/Camera.js +3 -0
  20. package/lib/cjs/Camera.js.map +1 -1
  21. package/lib/cjs/ChangesetProps.d.ts +1 -1
  22. package/lib/cjs/ChangesetProps.js.map +1 -1
  23. package/lib/cjs/ClipStyle.js +31 -5
  24. package/lib/cjs/ClipStyle.js.map +1 -1
  25. package/lib/cjs/Code.d.ts +0 -5
  26. package/lib/cjs/Code.d.ts.map +1 -1
  27. package/lib/cjs/Code.js +16 -11
  28. package/lib/cjs/Code.js.map +1 -1
  29. package/lib/cjs/ColorDef.js +11 -10
  30. package/lib/cjs/ColorDef.js.map +1 -1
  31. package/lib/cjs/ConcurrentQuery.d.ts +37 -1
  32. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  33. package/lib/cjs/ConcurrentQuery.js +16 -3
  34. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  35. package/lib/cjs/ContextRealityModel.js +53 -27
  36. package/lib/cjs/ContextRealityModel.js.map +1 -1
  37. package/lib/cjs/ContourDisplay.js +40 -5
  38. package/lib/cjs/ContourDisplay.js.map +1 -1
  39. package/lib/cjs/DisplayStyleSettings.js +95 -63
  40. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  41. package/lib/cjs/ECSqlReader.d.ts +2 -0
  42. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  43. package/lib/cjs/ECSqlReader.js +56 -50
  44. package/lib/cjs/ECSqlReader.js.map +1 -1
  45. package/lib/cjs/ElementProps.d.ts.map +1 -1
  46. package/lib/cjs/ElementProps.js +7 -3
  47. package/lib/cjs/ElementProps.js.map +1 -1
  48. package/lib/cjs/EntityProps.js +31 -0
  49. package/lib/cjs/EntityProps.js.map +1 -1
  50. package/lib/cjs/Environment.js +25 -2
  51. package/lib/cjs/Environment.js.map +1 -1
  52. package/lib/cjs/FeatureIndex.js +15 -6
  53. package/lib/cjs/FeatureIndex.js.map +1 -1
  54. package/lib/cjs/FeatureSymbology.d.ts +25 -73
  55. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  56. package/lib/cjs/FeatureSymbology.js +88 -103
  57. package/lib/cjs/FeatureSymbology.js.map +1 -1
  58. package/lib/cjs/FeatureTable.d.ts +6 -108
  59. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  60. package/lib/cjs/FeatureTable.js +13 -329
  61. package/lib/cjs/FeatureTable.js.map +1 -1
  62. package/lib/cjs/Fonts.d.ts +68 -10
  63. package/lib/cjs/Fonts.d.ts.map +1 -1
  64. package/lib/cjs/Fonts.js +19 -4
  65. package/lib/cjs/Fonts.js.map +1 -1
  66. package/lib/cjs/Frustum.js +2 -2
  67. package/lib/cjs/Frustum.js.map +1 -1
  68. package/lib/cjs/GeoCoordinateServices.d.ts +1 -0
  69. package/lib/cjs/GeoCoordinateServices.d.ts.map +1 -1
  70. package/lib/cjs/GeoCoordinateServices.js +2 -1
  71. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  72. package/lib/cjs/GeometryParams.js +58 -0
  73. package/lib/cjs/GeometryParams.js.map +1 -1
  74. package/lib/cjs/Gradient.d.ts +3 -4
  75. package/lib/cjs/Gradient.d.ts.map +1 -1
  76. package/lib/cjs/Gradient.js +21 -19
  77. package/lib/cjs/Gradient.js.map +1 -1
  78. package/lib/cjs/GraphicParams.js +14 -12
  79. package/lib/cjs/GraphicParams.js.map +1 -1
  80. package/lib/cjs/GroundPlane.js +8 -2
  81. package/lib/cjs/GroundPlane.js.map +1 -1
  82. package/lib/cjs/HSLColor.js +6 -0
  83. package/lib/cjs/HSLColor.js.map +1 -1
  84. package/lib/cjs/HSVColor.js +6 -0
  85. package/lib/cjs/HSVColor.js.map +1 -1
  86. package/lib/cjs/HiddenLine.d.ts +17 -18
  87. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  88. package/lib/cjs/HiddenLine.js +24 -5
  89. package/lib/cjs/HiddenLine.js.map +1 -1
  90. package/lib/cjs/Hilite.js +10 -0
  91. package/lib/cjs/Hilite.js.map +1 -1
  92. package/lib/cjs/IModel.d.ts +3 -12
  93. package/lib/cjs/IModel.d.ts.map +1 -1
  94. package/lib/cjs/IModel.js +47 -23
  95. package/lib/cjs/IModel.js.map +1 -1
  96. package/lib/cjs/IModelError.d.ts +0 -2
  97. package/lib/cjs/IModelError.d.ts.map +1 -1
  98. package/lib/cjs/IModelError.js +3 -8
  99. package/lib/cjs/IModelError.js.map +1 -1
  100. package/lib/cjs/IModelVersion.js +4 -0
  101. package/lib/cjs/IModelVersion.js.map +1 -1
  102. package/lib/cjs/ITwinError.d.ts +63 -27
  103. package/lib/cjs/ITwinError.d.ts.map +1 -1
  104. package/lib/cjs/ITwinError.js +93 -45
  105. package/lib/cjs/ITwinError.js.map +1 -1
  106. package/lib/cjs/Image.d.ts +22 -8
  107. package/lib/cjs/Image.d.ts.map +1 -1
  108. package/lib/cjs/Image.js +20 -4
  109. package/lib/cjs/Image.js.map +1 -1
  110. package/lib/cjs/IpcAppProps.d.ts +2 -0
  111. package/lib/cjs/IpcAppProps.d.ts.map +1 -1
  112. package/lib/cjs/IpcAppProps.js.map +1 -1
  113. package/lib/cjs/LightSettings.js +39 -1
  114. package/lib/cjs/LightSettings.js.map +1 -1
  115. package/lib/cjs/Localization.d.ts +0 -10
  116. package/lib/cjs/Localization.d.ts.map +1 -1
  117. package/lib/cjs/Localization.js +0 -1
  118. package/lib/cjs/Localization.js.map +1 -1
  119. package/lib/cjs/MapImagerySettings.js +3 -2
  120. package/lib/cjs/MapImagerySettings.js.map +1 -1
  121. package/lib/cjs/MapLayerSettings.d.ts +20 -0
  122. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  123. package/lib/cjs/MapLayerSettings.js +50 -1
  124. package/lib/cjs/MapLayerSettings.js.map +1 -1
  125. package/lib/cjs/MassProperties.d.ts +2 -0
  126. package/lib/cjs/MassProperties.d.ts.map +1 -1
  127. package/lib/cjs/MassProperties.js.map +1 -1
  128. package/lib/cjs/ModelClipGroup.js +6 -0
  129. package/lib/cjs/ModelClipGroup.js.map +1 -1
  130. package/lib/cjs/OctEncodedNormal.js +4 -0
  131. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  132. package/lib/cjs/PlanProjectionSettings.d.ts +1 -2
  133. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  134. package/lib/cjs/PlanProjectionSettings.js +8 -1
  135. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  136. package/lib/cjs/PlanarClipMask.d.ts +0 -12
  137. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  138. package/lib/cjs/PlanarClipMask.js +24 -2
  139. package/lib/cjs/PlanarClipMask.js.map +1 -1
  140. package/lib/cjs/QPoint.d.ts +5 -5
  141. package/lib/cjs/QPoint.d.ts.map +1 -1
  142. package/lib/cjs/QPoint.js +37 -29
  143. package/lib/cjs/QPoint.js.map +1 -1
  144. package/lib/cjs/RealityModelDisplaySettings.js +81 -4
  145. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  146. package/lib/cjs/RenderMaterial.d.ts +0 -43
  147. package/lib/cjs/RenderMaterial.d.ts.map +1 -1
  148. package/lib/cjs/RenderMaterial.js +6 -51
  149. package/lib/cjs/RenderMaterial.js.map +1 -1
  150. package/lib/cjs/RenderPolyline.d.ts +36 -0
  151. package/lib/cjs/RenderPolyline.d.ts.map +1 -0
  152. package/lib/cjs/RenderPolyline.js +26 -0
  153. package/lib/cjs/RenderPolyline.js.map +1 -0
  154. package/lib/cjs/RenderSchedule.d.ts +1 -2
  155. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  156. package/lib/cjs/RenderSchedule.js +138 -11
  157. package/lib/cjs/RenderSchedule.js.map +1 -1
  158. package/lib/cjs/RenderTexture.d.ts +5 -23
  159. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  160. package/lib/cjs/RenderTexture.js +13 -16
  161. package/lib/cjs/RenderTexture.js.map +1 -1
  162. package/lib/cjs/RgbColor.js +3 -0
  163. package/lib/cjs/RgbColor.js.map +1 -1
  164. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  165. package/lib/cjs/RpcInterface.js +7 -1
  166. package/lib/cjs/RpcInterface.js.map +1 -1
  167. package/lib/cjs/SkyBox.js +17 -4
  168. package/lib/cjs/SkyBox.js.map +1 -1
  169. package/lib/cjs/SolarShadows.js +5 -1
  170. package/lib/cjs/SolarShadows.js.map +1 -1
  171. package/lib/cjs/SpatialClassification.js +19 -1
  172. package/lib/cjs/SpatialClassification.js.map +1 -1
  173. package/lib/cjs/SubCategoryAppearance.js +35 -1
  174. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  175. package/lib/cjs/SubCategoryOverride.js +16 -2
  176. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  177. package/lib/cjs/TerrainSettings.d.ts +0 -7
  178. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  179. package/lib/cjs/TerrainSettings.js +19 -0
  180. package/lib/cjs/TerrainSettings.js.map +1 -1
  181. package/lib/cjs/TextureMapping.d.ts +17 -14
  182. package/lib/cjs/TextureMapping.d.ts.map +1 -1
  183. package/lib/cjs/TextureMapping.js +47 -19
  184. package/lib/cjs/TextureMapping.js.map +1 -1
  185. package/lib/cjs/ThematicDisplay.js +53 -2
  186. package/lib/cjs/ThematicDisplay.js.map +1 -1
  187. package/lib/cjs/Thumbnail.d.ts +1 -1
  188. package/lib/cjs/Thumbnail.js.map +1 -1
  189. package/lib/cjs/Tween.js +28 -19
  190. package/lib/cjs/Tween.js.map +1 -1
  191. package/lib/cjs/ViewDetails.js +10 -6
  192. package/lib/cjs/ViewDetails.js.map +1 -1
  193. package/lib/cjs/ViewFlags.d.ts +1 -3
  194. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  195. package/lib/cjs/ViewFlags.js +86 -5
  196. package/lib/cjs/ViewFlags.js.map +1 -1
  197. package/lib/cjs/ViewProps.d.ts +0 -4
  198. package/lib/cjs/ViewProps.d.ts.map +1 -1
  199. package/lib/cjs/ViewProps.js.map +1 -1
  200. package/lib/cjs/WhiteOnWhiteReversalSettings.js +7 -2
  201. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  202. package/lib/cjs/annotation/TextAnnotation.js +10 -0
  203. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  204. package/lib/cjs/annotation/TextBlock.js +27 -6
  205. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  206. package/lib/cjs/annotation/TextStyle.js +65 -19
  207. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  208. package/lib/cjs/core-common.d.ts +1 -2
  209. package/lib/cjs/core-common.d.ts.map +1 -1
  210. package/lib/cjs/core-common.js +1 -2
  211. package/lib/cjs/core-common.js.map +1 -1
  212. package/lib/cjs/geometry/AdditionalTransform.js +12 -0
  213. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  214. package/lib/cjs/geometry/AreaPattern.js +17 -0
  215. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  216. package/lib/cjs/geometry/BoundingSphere.js +4 -0
  217. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  218. package/lib/cjs/geometry/Cartographic.js +23 -20
  219. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  220. package/lib/cjs/geometry/CoordinateReferenceSystem.js +62 -0
  221. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  222. package/lib/cjs/geometry/ElementGeometry.js +26 -8
  223. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  224. package/lib/cjs/geometry/ElementGeometryFB.js +54 -108
  225. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  226. package/lib/cjs/geometry/FrustumPlanes.js +1 -0
  227. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  228. package/lib/cjs/geometry/GeodeticDatum.js +100 -0
  229. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  230. package/lib/cjs/geometry/GeodeticEllipsoid.js +16 -0
  231. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  232. package/lib/cjs/geometry/GeometryStream.js +19 -6
  233. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  234. package/lib/cjs/geometry/ImageGraphic.js +10 -0
  235. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  236. package/lib/cjs/geometry/LineStyle.js +14 -0
  237. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  238. package/lib/cjs/geometry/Placement.js +6 -0
  239. package/lib/cjs/geometry/Placement.js.map +1 -1
  240. package/lib/cjs/geometry/Projection.js +75 -0
  241. package/lib/cjs/geometry/Projection.js.map +1 -1
  242. package/lib/cjs/geometry/TextString.js +18 -0
  243. package/lib/cjs/geometry/TextString.js.map +1 -1
  244. package/lib/cjs/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  245. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -0
  246. package/lib/cjs/internal/BackendTypes.js.map +1 -0
  247. package/lib/cjs/internal/PackedFeatureTable.d.ts +111 -0
  248. package/lib/cjs/internal/PackedFeatureTable.d.ts.map +1 -0
  249. package/lib/cjs/internal/PackedFeatureTable.js +359 -0
  250. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -0
  251. package/lib/cjs/internal/RenderMaterialParams.d.ts +47 -0
  252. package/lib/cjs/internal/RenderMaterialParams.d.ts.map +1 -0
  253. package/lib/cjs/internal/RenderMaterialParams.js +68 -0
  254. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -0
  255. package/lib/cjs/internal/RenderMesh.d.ts +52 -0
  256. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -0
  257. package/lib/cjs/{Render.js → internal/RenderMesh.js} +12 -31
  258. package/lib/cjs/internal/RenderMesh.js.map +1 -0
  259. package/lib/cjs/internal/RenderTextureParams.d.ts +25 -0
  260. package/lib/cjs/internal/RenderTextureParams.d.ts.map +1 -0
  261. package/lib/cjs/internal/RenderTextureParams.js +37 -0
  262. package/lib/cjs/internal/RenderTextureParams.js.map +1 -0
  263. package/lib/cjs/internal/cross-package.d.ts +5 -0
  264. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  265. package/lib/cjs/internal/cross-package.js +16 -0
  266. package/lib/cjs/internal/cross-package.js.map +1 -1
  267. package/lib/cjs/ipc/IpcSession.js +1 -0
  268. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  269. package/lib/cjs/ipc/IpcSocket.d.ts +3 -0
  270. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  271. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  272. package/lib/cjs/ipc/IpcWebSocket.js +7 -6
  273. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  274. package/lib/cjs/ipc/IpcWebSocketTransport.js +8 -7
  275. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  276. package/lib/cjs/rpc/DevToolsRpcInterface.js +6 -6
  277. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  278. package/lib/cjs/rpc/IModelReadRpcInterface.js +8 -11
  279. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  280. package/lib/cjs/rpc/IModelTileRpcInterface.js +4 -4
  281. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  282. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  283. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  284. package/lib/cjs/rpc/TestRpcManager.js +1 -4
  285. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  286. package/lib/cjs/rpc/core/RpcConfiguration.js +51 -64
  287. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  288. package/lib/cjs/rpc/core/RpcControl.js +29 -38
  289. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  290. package/lib/cjs/rpc/core/RpcInvocation.js +19 -13
  291. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  292. package/lib/cjs/rpc/core/RpcMarshaling.d.ts +1 -4
  293. package/lib/cjs/rpc/core/RpcMarshaling.d.ts.map +1 -1
  294. package/lib/cjs/rpc/core/RpcMarshaling.js +5 -4
  295. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  296. package/lib/cjs/rpc/core/RpcOperation.js +29 -31
  297. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  298. package/lib/cjs/rpc/core/RpcPendingQueue.js +17 -16
  299. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  300. package/lib/cjs/rpc/core/RpcProtocol.js +32 -30
  301. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  302. package/lib/cjs/rpc/core/RpcPush.js +15 -8
  303. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  304. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  305. package/lib/cjs/rpc/core/RpcRegistry.js +10 -9
  306. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  307. package/lib/cjs/rpc/core/RpcRequest.d.ts +2 -2
  308. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  309. package/lib/cjs/rpc/core/RpcRequest.js +51 -29
  310. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  311. package/lib/cjs/rpc/core/RpcRoutingToken.js +4 -2
  312. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  313. package/lib/cjs/rpc/core/RpcSessionInvocation.js +5 -10
  314. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  315. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js +11 -17
  316. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  317. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  318. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  319. package/lib/cjs/rpc/web/OpenAPI.js +2 -0
  320. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  321. package/lib/cjs/rpc/web/RpcMultipart.d.ts +1 -1
  322. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  323. package/lib/cjs/rpc/web/RpcMultipart.js +13 -12
  324. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  325. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts +3 -0
  326. package/lib/cjs/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  327. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -6
  328. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  329. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  330. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  331. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +6 -6
  332. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  333. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  334. package/lib/cjs/rpc/web/WebAppRpcRequest.js +27 -27
  335. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  336. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  337. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  338. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +14 -8
  339. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  340. package/lib/cjs/tile/B3dmTileIO.js +7 -0
  341. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  342. package/lib/cjs/tile/CompositeTileIO.js +3 -0
  343. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  344. package/lib/cjs/tile/GltfTileIO.js +4 -3
  345. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  346. package/lib/cjs/tile/I3dmTileIO.js +8 -0
  347. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  348. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  349. package/lib/cjs/tile/IModelTileIO.js +26 -3
  350. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  351. package/lib/cjs/tile/PntsTileIO.js +5 -0
  352. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  353. package/lib/cjs/tile/TileIO.js +2 -0
  354. package/lib/cjs/tile/TileIO.js.map +1 -1
  355. package/lib/cjs/tile/TileMetadata.js +9 -1
  356. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  357. package/lib/esm/AmbientOcclusion.js +17 -9
  358. package/lib/esm/AmbientOcclusion.js.map +1 -1
  359. package/lib/esm/AnalysisStyle.d.ts +0 -3
  360. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  361. package/lib/esm/AnalysisStyle.js +20 -4
  362. package/lib/esm/AnalysisStyle.js.map +1 -1
  363. package/lib/esm/Atmosphere.js +39 -21
  364. package/lib/esm/Atmosphere.js.map +1 -1
  365. package/lib/esm/BackgroundMapProvider.js +4 -0
  366. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  367. package/lib/esm/BackgroundMapSettings.js +19 -0
  368. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  369. package/lib/esm/BlobReader.js +8 -6
  370. package/lib/esm/BlobReader.js.map +1 -1
  371. package/lib/esm/BriefcaseTypes.d.ts +2 -2
  372. package/lib/esm/BriefcaseTypes.d.ts.map +1 -1
  373. package/lib/esm/BriefcaseTypes.js.map +1 -1
  374. package/lib/esm/Camera.js +3 -0
  375. package/lib/esm/Camera.js.map +1 -1
  376. package/lib/esm/ChangesetProps.d.ts +1 -1
  377. package/lib/esm/ChangesetProps.js.map +1 -1
  378. package/lib/esm/ClipStyle.js +31 -5
  379. package/lib/esm/ClipStyle.js.map +1 -1
  380. package/lib/esm/Code.d.ts +0 -5
  381. package/lib/esm/Code.d.ts.map +1 -1
  382. package/lib/esm/Code.js +16 -11
  383. package/lib/esm/Code.js.map +1 -1
  384. package/lib/esm/ColorDef.js +11 -10
  385. package/lib/esm/ColorDef.js.map +1 -1
  386. package/lib/esm/ConcurrentQuery.d.ts +37 -1
  387. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  388. package/lib/esm/ConcurrentQuery.js +16 -3
  389. package/lib/esm/ConcurrentQuery.js.map +1 -1
  390. package/lib/esm/ContextRealityModel.js +53 -27
  391. package/lib/esm/ContextRealityModel.js.map +1 -1
  392. package/lib/esm/ContourDisplay.js +40 -5
  393. package/lib/esm/ContourDisplay.js.map +1 -1
  394. package/lib/esm/DisplayStyleSettings.js +95 -63
  395. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  396. package/lib/esm/ECSqlReader.d.ts +2 -0
  397. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  398. package/lib/esm/ECSqlReader.js +56 -50
  399. package/lib/esm/ECSqlReader.js.map +1 -1
  400. package/lib/esm/ElementProps.d.ts.map +1 -1
  401. package/lib/esm/ElementProps.js +8 -4
  402. package/lib/esm/ElementProps.js.map +1 -1
  403. package/lib/esm/EntityProps.js +31 -0
  404. package/lib/esm/EntityProps.js.map +1 -1
  405. package/lib/esm/Environment.js +25 -2
  406. package/lib/esm/Environment.js.map +1 -1
  407. package/lib/esm/FeatureIndex.js +15 -6
  408. package/lib/esm/FeatureIndex.js.map +1 -1
  409. package/lib/esm/FeatureSymbology.d.ts +25 -73
  410. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  411. package/lib/esm/FeatureSymbology.js +88 -103
  412. package/lib/esm/FeatureSymbology.js.map +1 -1
  413. package/lib/esm/FeatureTable.d.ts +6 -108
  414. package/lib/esm/FeatureTable.d.ts.map +1 -1
  415. package/lib/esm/FeatureTable.js +11 -324
  416. package/lib/esm/FeatureTable.js.map +1 -1
  417. package/lib/esm/Fonts.d.ts +68 -10
  418. package/lib/esm/Fonts.d.ts.map +1 -1
  419. package/lib/esm/Fonts.js +19 -4
  420. package/lib/esm/Fonts.js.map +1 -1
  421. package/lib/esm/Frustum.js +2 -2
  422. package/lib/esm/Frustum.js.map +1 -1
  423. package/lib/esm/GeoCoordinateServices.d.ts +1 -0
  424. package/lib/esm/GeoCoordinateServices.d.ts.map +1 -1
  425. package/lib/esm/GeoCoordinateServices.js +2 -1
  426. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  427. package/lib/esm/GeometryParams.js +58 -0
  428. package/lib/esm/GeometryParams.js.map +1 -1
  429. package/lib/esm/Gradient.d.ts +3 -4
  430. package/lib/esm/Gradient.d.ts.map +1 -1
  431. package/lib/esm/Gradient.js +21 -19
  432. package/lib/esm/Gradient.js.map +1 -1
  433. package/lib/esm/GraphicParams.js +14 -12
  434. package/lib/esm/GraphicParams.js.map +1 -1
  435. package/lib/esm/GroundPlane.js +8 -2
  436. package/lib/esm/GroundPlane.js.map +1 -1
  437. package/lib/esm/HSLColor.js +6 -0
  438. package/lib/esm/HSLColor.js.map +1 -1
  439. package/lib/esm/HSVColor.js +6 -0
  440. package/lib/esm/HSVColor.js.map +1 -1
  441. package/lib/esm/HiddenLine.d.ts +17 -18
  442. package/lib/esm/HiddenLine.d.ts.map +1 -1
  443. package/lib/esm/HiddenLine.js +24 -5
  444. package/lib/esm/HiddenLine.js.map +1 -1
  445. package/lib/esm/Hilite.js +10 -0
  446. package/lib/esm/Hilite.js.map +1 -1
  447. package/lib/esm/IModel.d.ts +3 -12
  448. package/lib/esm/IModel.d.ts.map +1 -1
  449. package/lib/esm/IModel.js +47 -23
  450. package/lib/esm/IModel.js.map +1 -1
  451. package/lib/esm/IModelError.d.ts +0 -2
  452. package/lib/esm/IModelError.d.ts.map +1 -1
  453. package/lib/esm/IModelError.js +2 -1
  454. package/lib/esm/IModelError.js.map +1 -1
  455. package/lib/esm/IModelVersion.js +4 -0
  456. package/lib/esm/IModelVersion.js.map +1 -1
  457. package/lib/esm/ITwinError.d.ts +63 -27
  458. package/lib/esm/ITwinError.d.ts.map +1 -1
  459. package/lib/esm/ITwinError.js +87 -44
  460. package/lib/esm/ITwinError.js.map +1 -1
  461. package/lib/esm/Image.d.ts +22 -8
  462. package/lib/esm/Image.d.ts.map +1 -1
  463. package/lib/esm/Image.js +19 -4
  464. package/lib/esm/Image.js.map +1 -1
  465. package/lib/esm/IpcAppProps.d.ts +2 -0
  466. package/lib/esm/IpcAppProps.d.ts.map +1 -1
  467. package/lib/esm/IpcAppProps.js.map +1 -1
  468. package/lib/esm/LightSettings.js +39 -1
  469. package/lib/esm/LightSettings.js.map +1 -1
  470. package/lib/esm/Localization.d.ts +0 -10
  471. package/lib/esm/Localization.d.ts.map +1 -1
  472. package/lib/esm/Localization.js +0 -1
  473. package/lib/esm/Localization.js.map +1 -1
  474. package/lib/esm/MapImagerySettings.js +3 -2
  475. package/lib/esm/MapImagerySettings.js.map +1 -1
  476. package/lib/esm/MapLayerSettings.d.ts +20 -0
  477. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  478. package/lib/esm/MapLayerSettings.js +50 -1
  479. package/lib/esm/MapLayerSettings.js.map +1 -1
  480. package/lib/esm/MassProperties.d.ts +2 -0
  481. package/lib/esm/MassProperties.d.ts.map +1 -1
  482. package/lib/esm/MassProperties.js.map +1 -1
  483. package/lib/esm/ModelClipGroup.js +6 -0
  484. package/lib/esm/ModelClipGroup.js.map +1 -1
  485. package/lib/esm/OctEncodedNormal.js +4 -0
  486. package/lib/esm/OctEncodedNormal.js.map +1 -1
  487. package/lib/esm/PlanProjectionSettings.d.ts +1 -2
  488. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  489. package/lib/esm/PlanProjectionSettings.js +8 -1
  490. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  491. package/lib/esm/PlanarClipMask.d.ts +0 -12
  492. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  493. package/lib/esm/PlanarClipMask.js +24 -2
  494. package/lib/esm/PlanarClipMask.js.map +1 -1
  495. package/lib/esm/QPoint.d.ts +5 -5
  496. package/lib/esm/QPoint.d.ts.map +1 -1
  497. package/lib/esm/QPoint.js +37 -29
  498. package/lib/esm/QPoint.js.map +1 -1
  499. package/lib/esm/RealityModelDisplaySettings.js +81 -4
  500. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  501. package/lib/esm/RenderMaterial.d.ts +0 -43
  502. package/lib/esm/RenderMaterial.d.ts.map +1 -1
  503. package/lib/esm/RenderMaterial.js +6 -51
  504. package/lib/esm/RenderMaterial.js.map +1 -1
  505. package/lib/esm/RenderPolyline.d.ts +36 -0
  506. package/lib/esm/RenderPolyline.d.ts.map +1 -0
  507. package/lib/esm/RenderPolyline.js +23 -0
  508. package/lib/esm/RenderPolyline.js.map +1 -0
  509. package/lib/esm/RenderSchedule.d.ts +1 -2
  510. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  511. package/lib/esm/RenderSchedule.js +138 -11
  512. package/lib/esm/RenderSchedule.js.map +1 -1
  513. package/lib/esm/RenderTexture.d.ts +5 -23
  514. package/lib/esm/RenderTexture.d.ts.map +1 -1
  515. package/lib/esm/RenderTexture.js +13 -16
  516. package/lib/esm/RenderTexture.js.map +1 -1
  517. package/lib/esm/RgbColor.js +3 -0
  518. package/lib/esm/RgbColor.js.map +1 -1
  519. package/lib/esm/RpcInterface.d.ts.map +1 -1
  520. package/lib/esm/RpcInterface.js +8 -2
  521. package/lib/esm/RpcInterface.js.map +1 -1
  522. package/lib/esm/SkyBox.js +17 -4
  523. package/lib/esm/SkyBox.js.map +1 -1
  524. package/lib/esm/SolarShadows.js +5 -1
  525. package/lib/esm/SolarShadows.js.map +1 -1
  526. package/lib/esm/SpatialClassification.js +19 -1
  527. package/lib/esm/SpatialClassification.js.map +1 -1
  528. package/lib/esm/SubCategoryAppearance.js +35 -1
  529. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  530. package/lib/esm/SubCategoryOverride.js +16 -2
  531. package/lib/esm/SubCategoryOverride.js.map +1 -1
  532. package/lib/esm/TerrainSettings.d.ts +0 -7
  533. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  534. package/lib/esm/TerrainSettings.js +19 -0
  535. package/lib/esm/TerrainSettings.js.map +1 -1
  536. package/lib/esm/TextureMapping.d.ts +17 -14
  537. package/lib/esm/TextureMapping.d.ts.map +1 -1
  538. package/lib/esm/TextureMapping.js +47 -19
  539. package/lib/esm/TextureMapping.js.map +1 -1
  540. package/lib/esm/ThematicDisplay.js +53 -2
  541. package/lib/esm/ThematicDisplay.js.map +1 -1
  542. package/lib/esm/Thumbnail.d.ts +1 -1
  543. package/lib/esm/Thumbnail.js.map +1 -1
  544. package/lib/esm/Tween.js +28 -19
  545. package/lib/esm/Tween.js.map +1 -1
  546. package/lib/esm/ViewDetails.js +10 -6
  547. package/lib/esm/ViewDetails.js.map +1 -1
  548. package/lib/esm/ViewFlags.d.ts +1 -3
  549. package/lib/esm/ViewFlags.d.ts.map +1 -1
  550. package/lib/esm/ViewFlags.js +86 -5
  551. package/lib/esm/ViewFlags.js.map +1 -1
  552. package/lib/esm/ViewProps.d.ts +0 -4
  553. package/lib/esm/ViewProps.d.ts.map +1 -1
  554. package/lib/esm/ViewProps.js.map +1 -1
  555. package/lib/esm/WhiteOnWhiteReversalSettings.js +7 -2
  556. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  557. package/lib/esm/annotation/TextAnnotation.js +10 -0
  558. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  559. package/lib/esm/annotation/TextBlock.js +27 -6
  560. package/lib/esm/annotation/TextBlock.js.map +1 -1
  561. package/lib/esm/annotation/TextStyle.js +65 -19
  562. package/lib/esm/annotation/TextStyle.js.map +1 -1
  563. package/lib/esm/core-common.d.ts +1 -2
  564. package/lib/esm/core-common.d.ts.map +1 -1
  565. package/lib/esm/core-common.js +1 -2
  566. package/lib/esm/core-common.js.map +1 -1
  567. package/lib/esm/geometry/AdditionalTransform.js +12 -0
  568. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  569. package/lib/esm/geometry/AreaPattern.js +17 -0
  570. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  571. package/lib/esm/geometry/BoundingSphere.js +4 -0
  572. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  573. package/lib/esm/geometry/Cartographic.js +23 -20
  574. package/lib/esm/geometry/Cartographic.js.map +1 -1
  575. package/lib/esm/geometry/CoordinateReferenceSystem.js +62 -0
  576. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  577. package/lib/esm/geometry/ElementGeometry.js +26 -8
  578. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  579. package/lib/esm/geometry/ElementGeometryFB.js +54 -108
  580. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  581. package/lib/esm/geometry/FrustumPlanes.js +1 -0
  582. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  583. package/lib/esm/geometry/GeodeticDatum.js +100 -0
  584. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  585. package/lib/esm/geometry/GeodeticEllipsoid.js +16 -0
  586. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  587. package/lib/esm/geometry/GeometryStream.js +19 -6
  588. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  589. package/lib/esm/geometry/ImageGraphic.js +10 -0
  590. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  591. package/lib/esm/geometry/LineStyle.js +14 -0
  592. package/lib/esm/geometry/LineStyle.js.map +1 -1
  593. package/lib/esm/geometry/Placement.js +6 -0
  594. package/lib/esm/geometry/Placement.js.map +1 -1
  595. package/lib/esm/geometry/Projection.js +75 -0
  596. package/lib/esm/geometry/Projection.js.map +1 -1
  597. package/lib/esm/geometry/TextString.js +18 -0
  598. package/lib/esm/geometry/TextString.js.map +1 -1
  599. package/lib/esm/{BackendTypes.d.ts → internal/BackendTypes.d.ts} +1 -0
  600. package/lib/esm/internal/BackendTypes.d.ts.map +1 -0
  601. package/lib/esm/internal/BackendTypes.js.map +1 -0
  602. package/lib/esm/internal/PackedFeatureTable.d.ts +111 -0
  603. package/lib/esm/internal/PackedFeatureTable.d.ts.map +1 -0
  604. package/lib/esm/internal/PackedFeatureTable.js +352 -0
  605. package/lib/esm/internal/PackedFeatureTable.js.map +1 -0
  606. package/lib/esm/internal/RenderMaterialParams.d.ts +47 -0
  607. package/lib/esm/internal/RenderMaterialParams.d.ts.map +1 -0
  608. package/lib/esm/internal/RenderMaterialParams.js +64 -0
  609. package/lib/esm/internal/RenderMaterialParams.js.map +1 -0
  610. package/lib/esm/internal/RenderMesh.d.ts +52 -0
  611. package/lib/esm/internal/RenderMesh.d.ts.map +1 -0
  612. package/lib/esm/{Render.js → internal/RenderMesh.js} +11 -29
  613. package/lib/esm/internal/RenderMesh.js.map +1 -0
  614. package/lib/esm/internal/RenderTextureParams.d.ts +25 -0
  615. package/lib/esm/internal/RenderTextureParams.d.ts.map +1 -0
  616. package/lib/esm/internal/RenderTextureParams.js +33 -0
  617. package/lib/esm/internal/RenderTextureParams.js.map +1 -0
  618. package/lib/esm/internal/cross-package.d.ts +5 -0
  619. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  620. package/lib/esm/internal/cross-package.js +4 -1
  621. package/lib/esm/internal/cross-package.js.map +1 -1
  622. package/lib/esm/ipc/IpcSession.js +1 -0
  623. package/lib/esm/ipc/IpcSession.js.map +1 -1
  624. package/lib/esm/ipc/IpcSocket.d.ts +3 -0
  625. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  626. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  627. package/lib/esm/ipc/IpcWebSocket.js +7 -6
  628. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  629. package/lib/esm/ipc/IpcWebSocketTransport.js +8 -7
  630. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  631. package/lib/esm/rpc/DevToolsRpcInterface.js +6 -6
  632. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  633. package/lib/esm/rpc/IModelReadRpcInterface.js +8 -11
  634. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  635. package/lib/esm/rpc/IModelTileRpcInterface.js +4 -4
  636. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  637. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  638. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  639. package/lib/esm/rpc/TestRpcManager.js +1 -4
  640. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  641. package/lib/esm/rpc/core/RpcConfiguration.js +51 -64
  642. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  643. package/lib/esm/rpc/core/RpcControl.js +29 -38
  644. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  645. package/lib/esm/rpc/core/RpcInvocation.js +19 -13
  646. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  647. package/lib/esm/rpc/core/RpcMarshaling.d.ts +1 -4
  648. package/lib/esm/rpc/core/RpcMarshaling.d.ts.map +1 -1
  649. package/lib/esm/rpc/core/RpcMarshaling.js +2 -1
  650. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  651. package/lib/esm/rpc/core/RpcOperation.js +29 -31
  652. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  653. package/lib/esm/rpc/core/RpcPendingQueue.js +17 -16
  654. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  655. package/lib/esm/rpc/core/RpcProtocol.js +32 -30
  656. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  657. package/lib/esm/rpc/core/RpcPush.js +15 -8
  658. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  659. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  660. package/lib/esm/rpc/core/RpcRegistry.js +10 -9
  661. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  662. package/lib/esm/rpc/core/RpcRequest.d.ts +2 -2
  663. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  664. package/lib/esm/rpc/core/RpcRequest.js +51 -29
  665. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  666. package/lib/esm/rpc/core/RpcRoutingToken.js +4 -2
  667. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  668. package/lib/esm/rpc/core/RpcSessionInvocation.js +5 -10
  669. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  670. package/lib/esm/rpc/web/BentleyCloudRpcManager.js +11 -17
  671. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  672. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +16 -19
  673. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  674. package/lib/esm/rpc/web/OpenAPI.js +2 -0
  675. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  676. package/lib/esm/rpc/web/RpcMultipart.d.ts +1 -1
  677. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  678. package/lib/esm/rpc/web/RpcMultipart.js +14 -13
  679. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  680. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts +3 -0
  681. package/lib/esm/rpc/web/WebAppRpcLogging.d.ts.map +1 -1
  682. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -6
  683. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  684. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +1 -1
  685. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  686. package/lib/esm/rpc/web/WebAppRpcProtocol.js +6 -6
  687. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  688. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  689. package/lib/esm/rpc/web/WebAppRpcRequest.js +27 -27
  690. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  691. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts +0 -2
  692. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  693. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +14 -8
  694. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  695. package/lib/esm/tile/B3dmTileIO.js +7 -0
  696. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  697. package/lib/esm/tile/CompositeTileIO.js +3 -0
  698. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  699. package/lib/esm/tile/GltfTileIO.js +4 -3
  700. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  701. package/lib/esm/tile/I3dmTileIO.js +8 -0
  702. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  703. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  704. package/lib/esm/tile/IModelTileIO.js +26 -3
  705. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  706. package/lib/esm/tile/PntsTileIO.js +5 -0
  707. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  708. package/lib/esm/tile/TileIO.js +2 -0
  709. package/lib/esm/tile/TileIO.js.map +1 -1
  710. package/lib/esm/tile/TileMetadata.js +9 -1
  711. package/lib/esm/tile/TileMetadata.js.map +1 -1
  712. package/package.json +14 -14
  713. package/lib/cjs/BackendTypes.d.ts.map +0 -1
  714. package/lib/cjs/BackendTypes.js.map +0 -1
  715. package/lib/cjs/Render.d.ts +0 -85
  716. package/lib/cjs/Render.d.ts.map +0 -1
  717. package/lib/cjs/Render.js.map +0 -1
  718. package/lib/esm/BackendTypes.d.ts.map +0 -1
  719. package/lib/esm/BackendTypes.js.map +0 -1
  720. package/lib/esm/Render.d.ts +0 -85
  721. package/lib/esm/Render.d.ts.map +0 -1
  722. package/lib/esm/Render.js.map +0 -1
  723. /package/lib/cjs/{BackendTypes.js → internal/BackendTypes.js} +0 -0
  724. /package/lib/esm/{BackendTypes.js → internal/BackendTypes.js} +0 -0
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { LoggingMetaData } from "@itwin/core-bentley";
5
5
  import { LockState } from "./IModelError";
6
+ import { BriefcaseId } from "./BriefcaseTypes";
6
7
  /**
7
8
  * Detailed information about a particular object Lock that is causing the Lock update conflict.
8
9
  * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.
@@ -17,20 +18,34 @@ export interface InUseLock {
17
18
  */
18
19
  state: LockState;
19
20
  /** An array of Briefcase ids that hold this lock. */
20
- briefcaseIds: number[];
21
+ briefcaseIds: BriefcaseId[];
21
22
  }
23
+ /**
24
+ * iTwinjs Core namespace namespace for a developer/application.
25
+ * @beta
26
+ */
27
+ export declare const iTwinjsCoreNamespace = "itwinjs-core";
28
+ /**
29
+ * error keys object used to describe an error keys for a developer/application.
30
+ * @beta
31
+ */
32
+ export declare const iTwinErrorKeys: {
33
+ readonly inUseLocks: "in-use-locks";
34
+ readonly channelNest: "channel-may-not-nest";
35
+ readonly channelNotAllowed: "channel-not-allowed";
36
+ readonly channelRootExists: "channel-root-exists";
37
+ };
38
+ /**
39
+ * Record for all itwin error messages.
40
+ * @beta
41
+ */
42
+ export declare const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string>;
22
43
  /**
23
44
  * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.
24
45
  * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.
25
- * When extending ITwinError, one should typically add a type guard function and a function to throw the error either to a namespace for their error or as standalone functions.
26
- * See [[InUseLocksError.throwInUseLocksError]] and [[InUseLocksError.isInUseLocksError]] for examples of how to throw and check that an error is of type InUseLocksError.
27
- * * Example of catching a ITwinError:
28
- * ``` ts
29
- * [[include:ITwinError.catchAndHandleITwinError]]
30
- * ```
31
46
  * @beta
32
47
  */
33
- export interface ITwinError {
48
+ export interface ITwinError extends Error {
34
49
  /** namespace for the error. This is a unique qualifier for the errorKey. */
35
50
  namespace: string;
36
51
  /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */
@@ -48,25 +63,46 @@ export interface ITwinError {
48
63
  * @beta
49
64
  */
50
65
  export interface InUseLocksError extends ITwinError {
51
- namespace: "itwinjs-core";
52
- errorKey: "in-use-locks";
53
66
  inUseLocks: InUseLock[];
54
67
  }
55
- /** @beta */
56
- export declare namespace InUseLocksError {
57
- /**
58
- * type guard function that returns whether or not the passed in parameter is an [[InUseLocksError]].
59
- * it first checks [[ITwinError.isITwinError]] and then checks that the namespace property is "itwinjs-core" and the errorKey property is "in-use-locks".
60
- */
61
- function isInUseLocksError(error: unknown): error is InUseLocksError;
62
- /** throws an error which passes the [[isInUseLocksError]] type guard function */
63
- function throwInUseLocksError(inUseLocks: InUseLock[], message?: string, metadata?: LoggingMetaData): never;
64
- }
65
- /** @beta */
66
- export declare namespace ITwinError {
67
- /** type guard function that returns whether or not the passed in parameter is an [[ITwinError]] */
68
- function isITwinError(error: unknown): error is ITwinError;
69
- /** get the meta data associated with this ITwinError, if any. */
70
- function getMetaData(err: ITwinError): object | undefined;
71
- }
68
+ /**
69
+ * A function which will be used to construct an [[ITwinError]].
70
+ * @param namespace The namespace associated with the error.
71
+ * @param errorKey The errorKey associated with the error.
72
+ * @param message The message associated with the error.
73
+ * @param metadata Metadata associated with the error.
74
+ * @beta
75
+ */
76
+ export declare function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError;
77
+ /**
78
+ * A function which constructs a detailed error for example [[ InUseLocksError ]] above.
79
+ * @param namespace The namespace associated with the error.
80
+ * @param errorKey The errorKey associated with the error.
81
+ * @param details Other details associated with the error.
82
+ * @param message The message associated with the error.
83
+ * @param metadata Metadata associated with the error.
84
+ * @beta
85
+ */
86
+ export declare function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T;
87
+ /**
88
+ * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
89
+ * @param namespace The namespace associated with the error.
90
+ * @param errorKey The errorKey associated with the error.
91
+ * @beta
92
+ */
93
+ export declare function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string): (error: unknown) => error is T;
94
+ /**
95
+ * get the meta data associated with this ITwinError, if any.
96
+ * @param error The error for which metadata is required.
97
+ * @beta
98
+ */
99
+ export declare function getITwinErrorMetaData(error: ITwinError): object | undefined;
100
+ /**
101
+ * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
102
+ * @param error The error which is to ve verified.
103
+ * @param namespace The namespace associated with the error.
104
+ * @param errorKey The errorKey associated with the error.
105
+ * @beta
106
+ */
107
+ export declare function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError;
72
108
  //# sourceMappingURL=ITwinError.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ITwinError.d.ts","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAgB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;GAI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AE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,UAAU,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,eAAe,GAAG,CAAC,CAKrL;AAED;;;;;EAKE;AACF,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WACrF,OAAO,KAAG,KAAK,IAAI,CAAC,CACpC;AAED;;;;EAIE;AACF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE3E;AAED;;;;;;EAME;AACF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,IAAI,UAAU,CAKvG"}
@@ -7,49 +7,97 @@
7
7
  * @module iModels
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ITwinError = exports.InUseLocksError = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- /** @beta */
13
- var InUseLocksError;
14
- (function (InUseLocksError) {
15
- /**
16
- * type guard function that returns whether or not the passed in parameter is an [[InUseLocksError]].
17
- * it first checks [[ITwinError.isITwinError]] and then checks that the namespace property is "itwinjs-core" and the errorKey property is "in-use-locks".
18
- */
19
- function isInUseLocksError(error) {
20
- return ITwinError.isITwinError(error) && error.namespace === "itwinjs-core" && error.errorKey === "in-use-locks";
21
- }
22
- InUseLocksError.isInUseLocksError = isInUseLocksError;
23
- /** throws an error which passes the [[isInUseLocksError]] type guard function */
24
- function throwInUseLocksError(inUseLocks, message, metadata) {
25
- const errorObject = new Error();
26
- errorObject.name = "InUseLocksError"; // optional but makes it so that when the error is thrown and not caught we see InUseLocksError: 'message' instead of Error: 'message'
27
- Error.captureStackTrace(errorObject, throwInUseLocksError); // optional: whether we want to hide throwInUseLocksError or not from the stack. not super important
28
- const lockError = {
29
- namespace: "itwinjs-core",
30
- errorKey: "in-use-locks",
31
- message: message ?? "One or more objects are already locked by another briefcase.",
32
- metadata,
33
- inUseLocks,
34
- };
35
- Object.assign(errorObject, lockError);
36
- throw errorObject;
37
- }
38
- InUseLocksError.throwInUseLocksError = throwInUseLocksError;
39
- })(InUseLocksError || (exports.InUseLocksError = InUseLocksError = {}));
40
- /** @beta */
41
- var ITwinError;
42
- (function (ITwinError) {
43
- /** type guard function that returns whether or not the passed in parameter is an [[ITwinError]] */
44
- function isITwinError(error) {
45
- return error !== undefined && error !== null && typeof error === "object" && "namespace" in error && "errorKey" in error && "message" in error;
46
- }
47
- ITwinError.isITwinError = isITwinError;
48
- /** get the meta data associated with this ITwinError, if any. */
49
- function getMetaData(err) {
50
- return core_bentley_1.BentleyError.getMetaData(err.metadata);
51
- }
52
- ITwinError.getMetaData = getMetaData;
53
- })(ITwinError || (exports.ITwinError = ITwinError = {}));
54
- ;
10
+ exports.iTwinErrorMessages = exports.iTwinErrorKeys = exports.iTwinjsCoreNamespace = void 0;
11
+ exports.constructITwinError = constructITwinError;
12
+ exports.constructDetailedError = constructDetailedError;
13
+ exports.createITwinErrorTypeAsserter = createITwinErrorTypeAsserter;
14
+ exports.getITwinErrorMetaData = getITwinErrorMetaData;
15
+ exports.isITwinError = isITwinError;
16
+ /**
17
+ * iTwinjs Core namespace namespace for a developer/application.
18
+ * @beta
19
+ */
20
+ exports.iTwinjsCoreNamespace = "itwinjs-core";
21
+ /**
22
+ * error keys object used to describe an error keys for a developer/application.
23
+ * @beta
24
+ */
25
+ exports.iTwinErrorKeys = {
26
+ inUseLocks: "in-use-locks",
27
+ channelNest: "channel-may-not-nest",
28
+ channelNotAllowed: "channel-not-allowed",
29
+ channelRootExists: "channel-root-exists"
30
+ };
31
+ /**
32
+ * Record for all itwin error messages.
33
+ * @beta
34
+ */
35
+ exports.iTwinErrorMessages = {
36
+ "inUseLocks": () => 'Objects are locked by another briefcase',
37
+ "channelNest": (id) => `Channel ${id} may not nest`,
38
+ "channelNotAllowed": (id) => `Channel ${id} is not allowed`,
39
+ "channelRootExists": (id) => `Channel ${id} root already exist`,
40
+ };
41
+ /**
42
+ * A function which will be used to construct an [[ITwinError]].
43
+ * @param namespace The namespace associated with the error.
44
+ * @param errorKey The errorKey associated with the error.
45
+ * @param message The message associated with the error.
46
+ * @param metadata Metadata associated with the error.
47
+ * @beta
48
+ */
49
+ function constructITwinError(namespace, errorKey, message, metadata) {
50
+ const error = new Error();
51
+ error.message = message ?? `${errorKey} occurred`;
52
+ error.name = `${namespace}:${errorKey}`;
53
+ error.namespace = namespace;
54
+ error.errorKey = errorKey;
55
+ error.metadata = metadata;
56
+ Error.captureStackTrace(error, constructITwinError); // Optional, but this would hide constructITwinError from stack.
57
+ return error;
58
+ }
59
+ /**
60
+ * A function which constructs a detailed error for example [[ InUseLocksError ]] above.
61
+ * @param namespace The namespace associated with the error.
62
+ * @param errorKey The errorKey associated with the error.
63
+ * @param details Other details associated with the error.
64
+ * @param message The message associated with the error.
65
+ * @param metadata Metadata associated with the error.
66
+ * @beta
67
+ */
68
+ function constructDetailedError(namespace, errorKey, details, message, metadata) {
69
+ const baseError = constructITwinError(namespace, errorKey, message, metadata);
70
+ Error.captureStackTrace(baseError, constructDetailedError); // Optional, but this would hide constructDetailedError from stack.
71
+ return Object.assign(baseError, details);
72
+ }
73
+ /**
74
+ * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]
75
+ * @param namespace The namespace associated with the error.
76
+ * @param errorKey The errorKey associated with the error.
77
+ * @beta
78
+ */
79
+ function createITwinErrorTypeAsserter(namespace, errorKey) {
80
+ return (error) => isITwinError(error, namespace, errorKey);
81
+ }
82
+ /**
83
+ * get the meta data associated with this ITwinError, if any.
84
+ * @param error The error for which metadata is required.
85
+ * @beta
86
+ */
87
+ function getITwinErrorMetaData(error) {
88
+ return (typeof error.metadata === "function") ? error.metadata() : error.metadata;
89
+ }
90
+ /**
91
+ * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]
92
+ * @param error The error which is to ve verified.
93
+ * @param namespace The namespace associated with the error.
94
+ * @param errorKey The errorKey associated with the error.
95
+ * @beta
96
+ */
97
+ function isITwinError(error, namespace, errorKey) {
98
+ return error !== undefined && error !== null && typeof error === "object"
99
+ && "namespace" in error && "errorKey" in error && "message" in error
100
+ && (namespace === undefined || error.namespace === namespace)
101
+ && (errorKey === undefined || error.errorKey === errorKey);
102
+ }
55
103
  //# sourceMappingURL=ITwinError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoE;AAuDpE,YAAY;AACZ,IAAiB,eAAe,CA0B/B;AA1BD,WAAiB,eAAe;IAE9B;;;OAGG;IACH,SAAgB,iBAAiB,CAAC,KAAc;QAC9C,OAAO,UAAU,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,cAAc,IAAI,KAAK,CAAC,QAAQ,KAAK,cAAc,CAAC;IACnH,CAAC;IAFe,iCAAiB,oBAEhC,CAAA;IAED,iFAAiF;IACjF,SAAgB,oBAAoB,CAAC,UAAuB,EAAE,OAAgB,EAAE,QAA0B;QACxG,MAAM,WAAW,GAAG,IAAI,KAAK,EAAE,CAAC;QAChC,WAAW,CAAC,IAAI,GAAG,iBAAiB,CAAC,CAAC,sIAAsI;QAC5K,KAAK,CAAC,iBAAiB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,oGAAoG;QAChK,MAAM,SAAS,GAAoB;YACjC,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,cAAc;YACxB,OAAO,EAAE,OAAO,IAAI,8DAA8D;YAClF,QAAQ;YACR,UAAU;SACX,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QACtC,MAAM,WAAW,CAAC;IACpB,CAAC;IAbe,oCAAoB,uBAanC,CAAA;AAEH,CAAC,EA1BgB,eAAe,+BAAf,eAAe,QA0B/B;AACD,YAAY;AACZ,IAAiB,UAAU,CAW1B;AAXD,WAAiB,UAAU;IACzB,mGAAmG;IACnG,SAAgB,YAAY,CAAC,KAAc;QACzC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC;IACjJ,CAAC;IAFe,uBAAY,eAE3B,CAAA;IAED,iEAAiE;IACjE,SAAgB,WAAW,CAAC,GAAe;QACzC,OAAO,2BAAY,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAFe,sBAAW,cAE1B,CAAA;AAEH,CAAC,EAXgB,UAAU,0BAAV,UAAU,QAW1B;AAAA,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { BentleyError, LoggingMetaData } from \"@itwin/core-bentley\";\nimport { LockState } from \"./IModelError\";\n\n/**\n * Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @beta\n */\nexport interface InUseLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: number[];\n}\n\n/**\n * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.\n * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.\n * When extending ITwinError, one should typically add a type guard function and a function to throw the error either to a namespace for their error or as standalone functions.\n * See [[InUseLocksError.throwInUseLocksError]] and [[InUseLocksError.isInUseLocksError]] for examples of how to throw and check that an error is of type InUseLocksError.\n * * Example of catching a ITwinError:\n * ``` ts\n * [[include:ITwinError.catchAndHandleITwinError]]\n * ```\n * @beta\n */\nexport interface ITwinError {\n /** namespace for the error. This is a unique qualifier for the errorKey. */\n namespace: string;\n /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */\n errorKey: string;\n /** explanation of what went wrong. Intended to be read by a developer. */\n message: string;\n /** stack trace of the error. */\n stack?: string;\n /** metadata about the exception. */\n metadata?: LoggingMetaData;\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @beta\n*/\nexport interface InUseLocksError extends ITwinError {\n namespace: \"itwinjs-core\";\n errorKey: \"in-use-locks\";\n inUseLocks: InUseLock[];\n}\n\n/** @beta */\nexport namespace InUseLocksError {\n\n /**\n * type guard function that returns whether or not the passed in parameter is an [[InUseLocksError]].\n * it first checks [[ITwinError.isITwinError]] and then checks that the namespace property is \"itwinjs-core\" and the errorKey property is \"in-use-locks\".\n */\n export function isInUseLocksError(error: unknown): error is InUseLocksError {\n return ITwinError.isITwinError(error) && error.namespace === \"itwinjs-core\" && error.errorKey === \"in-use-locks\";\n }\n\n /** throws an error which passes the [[isInUseLocksError]] type guard function */\n export function throwInUseLocksError(inUseLocks: InUseLock[], message?: string, metadata?: LoggingMetaData): never {\n const errorObject = new Error();\n errorObject.name = \"InUseLocksError\"; // optional but makes it so that when the error is thrown and not caught we see InUseLocksError: 'message' instead of Error: 'message'\n Error.captureStackTrace(errorObject, throwInUseLocksError); // optional: whether we want to hide throwInUseLocksError or not from the stack. not super important\n const lockError: InUseLocksError = {\n namespace: \"itwinjs-core\",\n errorKey: \"in-use-locks\",\n message: message ?? \"One or more objects are already locked by another briefcase.\",\n metadata,\n inUseLocks,\n };\n Object.assign(errorObject, lockError);\n throw errorObject;\n }\n\n}\n/** @beta */\nexport namespace ITwinError {\n /** type guard function that returns whether or not the passed in parameter is an [[ITwinError]] */\n export function isITwinError(error: unknown): error is ITwinError {\n return error !== undefined && error !== null && typeof error === \"object\" && \"namespace\" in error && \"errorKey\" in error && \"message\" in error;\n }\n\n /** get the meta data associated with this ITwinError, if any. */\n export function getMetaData(err: ITwinError): object | undefined {\n return BentleyError.getMetaData(err.metadata);\n }\n\n};\n"]}
1
+ {"version":3,"file":"ITwinError.js","sourceRoot":"","sources":["../../src/ITwinError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuFH,kDAWC;AAWD,wDAKC;AAQD,oEAEC;AAOD,sDAEC;AASD,oCAKC;AA5HD;;;GAGG;AACU,QAAA,oBAAoB,GAAG,cAAc,CAAC;AAEnD;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC5B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,sBAAsB;IACnC,iBAAiB,EAAE,qBAAqB;IACxC,iBAAiB,EAAE,qBAAqB;CAChC,CAAC;AAEX;;;GAGG;AACU,QAAA,kBAAkB,GAAoE;IACjG,YAAY,EAAE,GAAG,EAAE,CAAC,yCAAyC;IAC7D,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,eAAe;IACnD,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,iBAAiB;IAC3D,mBAAmB,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,WAAW,EAAE,qBAAqB;CAChE,CAAC;AA8BF;;;;;;;EAOE;AACF,SAAgB,mBAAmB,CAAC,SAAiB,EAAE,QAAgB,EAAE,OAAgB,EAAE,QAA0B;IAEnH,MAAM,KAAK,GAAG,IAAI,KAAK,EAAgB,CAAC;IACxC,KAAK,CAAC,OAAO,GAAG,OAAO,IAAI,GAAG,QAAQ,WAAW,CAAC;IAClD,KAAK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AAI,UAAU,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK;WACjE,CAAC,SAAS,KAAK,SAAS,IAAK,KAAoB,CAAC,SAAS,KAAK,SAAS,CAAC;WAC1E,CAAC,QAAQ,KAAK,SAAS,IAAK,KAAoB,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module iModels\n */\n\nimport { LoggingMetaData } from \"@itwin/core-bentley\";\nimport { LockState } from \"./IModelError\";\nimport { BriefcaseId } from \"./BriefcaseTypes\";\n\n/**\n * Detailed information about a particular object Lock that is causing the Lock update conflict.\n * An example of a lock update conflict would be attempting to use [LockControl.acquireLocks]($backend) on an object that is already locked by another Briefcase.\n * @beta\n */\nexport interface InUseLock {\n /** Id of the object that is causing conflict. */\n objectId: string;\n /**\n * The level of conflicting lock. Possible values are {@link LockState.Shared}, {@link LockState.Exclusive}.\n * See {@link LockState}.\n */\n state: LockState;\n /** An array of Briefcase ids that hold this lock. */\n briefcaseIds: BriefcaseId[];\n}\n\n/**\n * iTwinjs Core namespace namespace for a developer/application.\n * @beta\n */\nexport const iTwinjsCoreNamespace = \"itwinjs-core\";\n\n/**\n * error keys object used to describe an error keys for a developer/application.\n * @beta\n */\nexport const iTwinErrorKeys = {\n inUseLocks: \"in-use-locks\",\n channelNest: \"channel-may-not-nest\",\n channelNotAllowed: \"channel-not-allowed\",\n channelRootExists: \"channel-root-exists\"\n} as const;\n\n/**\n * Record for all itwin error messages.\n * @beta\n */\nexport const iTwinErrorMessages: Record<keyof typeof iTwinErrorKeys, (...args: any[]) => string> = {\n \"inUseLocks\": () => 'Objects are locked by another briefcase',\n \"channelNest\": (id) => `Channel ${id} may not nest`,\n \"channelNotAllowed\": (id) => `Channel ${id} is not allowed`,\n \"channelRootExists\": (id) => `Channel ${id} root already exist`,\n};\n\n\n/**\n * An interface used to describe an error for a developer/application. The message is not intended to be displayed to an end user.\n * This error interface should be extended when needing to throw errors with extra properties defined on them. See [[InUseLocksError]] for an example.\n * @beta\n */\nexport interface ITwinError extends Error {\n /** namespace for the error. This is a unique qualifier for the errorKey. */\n namespace: string;\n /** unique key for error, within namespace. All errorKeys within the same namespace must be unique. */\n errorKey: string;\n /** explanation of what went wrong. Intended to be read by a developer. */\n message: string;\n /** stack trace of the error. */\n stack?: string;\n /** metadata about the exception. */\n metadata?: LoggingMetaData;\n}\n\n/**\n * An error raised when there is a lock conflict detected.\n * Typically this error would be thrown by [LockControl.acquireLocks]($backend) when you are requesting a lock on an element that is already held by another briefcase.\n * @beta\n*/\nexport interface InUseLocksError extends ITwinError {\n inUseLocks: InUseLock[];\n}\n\n/**\n* A function which will be used to construct an [[ITwinError]].\n* @param namespace The namespace associated with the error.\n* @param errorKey The errorKey associated with the error.\n* @param message The message associated with the error.\n* @param metadata Metadata associated with the error.\n* @beta\n*/\nexport function constructITwinError(namespace: string, errorKey: string, message?: string, metadata?: LoggingMetaData): ITwinError {\n\n const error = new Error() as ITwinError;\n error.message = message ?? `${errorKey} occurred`;\n error.name = `${namespace}:${errorKey}`;\n error.namespace = namespace;\n error.errorKey = errorKey;\n error.metadata = metadata;\n\n Error.captureStackTrace(error, constructITwinError); // Optional, but this would hide constructITwinError from stack.\n return error;\n}\n\n/**\n* A function which constructs a detailed error for example [[ InUseLocksError ]] above.\n* @param namespace The namespace associated with the error.\n* @param errorKey The errorKey associated with the error.\n* @param details Other details associated with the error.\n* @param message The message associated with the error.\n* @param metadata Metadata associated with the error.\n* @beta\n*/\nexport function constructDetailedError<T extends ITwinError>(namespace: string, errorKey: string, details: Omit<T, keyof ITwinError>, message?: string, metadata?: LoggingMetaData): T {\n const baseError = constructITwinError(namespace, errorKey, message, metadata);\n\n Error.captureStackTrace(baseError, constructDetailedError); // Optional, but this would hide constructDetailedError from stack.\n return Object.assign(baseError, details) as T;\n}\n\n/**\n * a high level function that returns a type asserter function which would return whether or not the passed in parameter is an [[ITwinError]]\n * @param namespace The namespace associated with the error.\n * @param errorKey The errorKey associated with the error.\n * @beta\n*/\nexport function createITwinErrorTypeAsserter<T extends ITwinError>(namespace: string, errorKey: string) {\n return (error: unknown): error is T => isITwinError(error, namespace, errorKey);\n}\n\n/**\n * get the meta data associated with this ITwinError, if any.\n * @param error The error for which metadata is required.\n * @beta\n*/\nexport function getITwinErrorMetaData(error: ITwinError): object | undefined {\n return (typeof error.metadata === \"function\") ? error.metadata() : error.metadata;\n}\n\n/**\n * type guard function that returns whether or not the passed in parameter is an [[ITwinError]]\n * @param error The error which is to ve verified.\n * @param namespace The namespace associated with the error.\n * @param errorKey The errorKey associated with the error.\n * @beta\n*/\nexport function isITwinError(error: unknown, namespace?: string, errorKey?: string): error is ITwinError {\n return error !== undefined && error !== null && typeof error === \"object\"\n && \"namespace\" in error && \"errorKey\" in error && \"message\" in error\n && (namespace === undefined || (error as ITwinError).namespace === namespace)\n && (errorKey === undefined || (error as ITwinError).errorKey === errorKey);\n}\n"]}
@@ -40,12 +40,9 @@ export declare class ImageBuffer {
40
40
  * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.
41
41
  */
42
42
  static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer;
43
- /** @internal */
44
- protected static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean;
45
- /** @internal */
46
- protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number;
47
- /** @internal */
48
- protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number);
43
+ private static isValidData;
44
+ private static computeHeight;
45
+ private constructor();
49
46
  }
50
47
  /** Returns whether the input is a power of two.
51
48
  * @note Floating point inputs are truncated.
@@ -71,8 +68,10 @@ export declare enum ImageSourceFormat {
71
68
  */
72
69
  Svg = 3
73
70
  }
74
- /** @internal */
75
- export declare function isValidImageSourceFormat(format: ImageSourceFormat): boolean;
71
+ /** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.
72
+ * @public
73
+ */
74
+ export declare function isValidImageSourceFormat(format: number): format is ImageSourceFormat;
76
75
  /** Image data encoded and compressed in either Jpeg or Png format.
77
76
  * @public
78
77
  */
@@ -84,4 +83,19 @@ export declare class ImageSource {
84
83
  /** Construct a new ImageSource, which takes ownership of the Uint8Array. */
85
84
  constructor(data: Uint8Array | string, format: ImageSourceFormat);
86
85
  }
86
+ /** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded
87
+ * in string format as an Svg.
88
+ * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.
89
+ * @public
90
+ */
91
+ export interface BinaryImageSource {
92
+ /** The format in which the [[data]] is encoded. */
93
+ readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;
94
+ /** The image data encoded according to [[format]]. */
95
+ readonly data: Uint8Array;
96
+ }
97
+ /** Returns true if `source` is a [[BinaryImageSource]].
98
+ * @public
99
+ */
100
+ export declare function isBinaryImageSource(source: ImageSource): source is BinaryImageSource;
87
101
  //# sourceMappingURL=Image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;;GAKG;AACH,oBAAY,iBAAiB;IAC3B,uCAAuC;IACvC,IAAI,IAAI;IACR,sCAAsC;IACtC,GAAG,IAAI;IACP,wBAAwB;IACxB,KAAK,IAAI;CACV;AAED;;GAEG;AACH,qBAAa,WAAW;IACtB,sGAAsG;IACtG,SAAgB,IAAI,EAAE,UAAU,CAAC;IACjC,wCAAwC;IACxC,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAC1C,+BAA+B;IAC/B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,IAAI,MAAM,CAAyD;IAE9F,0FAA0F;WAC5E,mBAAmB,CAAC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M,CAAC;IAC1C,4BAA4B;IAC5B,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAE1C,4EAA4E;gBACzD,IAAI,EAAE,UAAU,GAAG,MAAM,EAAE,MAAM,EAAE,iBAAiB;CAIxE;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC,IAAI,GAAG,iBAAiB,CAAC,GAAG,CAAC;IAChE,sDAAsD;IACtD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,iBAAiB,CAEpF"}
package/lib/cjs/Image.js CHANGED
@@ -11,6 +11,7 @@ exports.ImageSource = exports.ImageSourceFormat = exports.ImageBuffer = exports.
11
11
  exports.isPowerOfTwo = isPowerOfTwo;
12
12
  exports.nextHighestPowerOfTwo = nextHighestPowerOfTwo;
13
13
  exports.isValidImageSourceFormat = isValidImageSourceFormat;
14
+ exports.isBinaryImageSource = isBinaryImageSource;
14
15
  /** Format of an [[ImageBuffer]].
15
16
  * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.
16
17
  * @see [[ImageBuffer.getNumBytesPerPixel]]
@@ -30,6 +31,12 @@ var ImageBufferFormat;
30
31
  * @public
31
32
  */
32
33
  class ImageBuffer {
34
+ /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */
35
+ data;
36
+ /** Format of the bytes in the image. */
37
+ format;
38
+ /** Width of image in pixels */
39
+ width;
33
40
  /** Return the number of bytes allocated for each pixel. */
34
41
  get numBytesPerPixel() { return ImageBuffer.getNumBytesPerPixel(this.format); }
35
42
  /** Determine the number of bytes allocated to a single pixel for the specified format. */
@@ -55,16 +62,13 @@ class ImageBuffer {
55
62
  throw new Error("The number of bytes supplied for ImageBuffer do not match its width and format.");
56
63
  return new ImageBuffer(data, format, width);
57
64
  }
58
- /** @internal */
59
65
  static isValidData(data, format, width) {
60
66
  const height = this.computeHeight(data, format, width);
61
67
  return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;
62
68
  }
63
- /** @internal */
64
69
  static computeHeight(data, format, width) {
65
70
  return data.length / (width * this.getNumBytesPerPixel(format));
66
71
  }
67
- /** @internal */
68
72
  constructor(data, format, width) {
69
73
  this.data = data;
70
74
  this.format = format;
@@ -104,7 +108,9 @@ var ImageSourceFormat;
104
108
  */
105
109
  ImageSourceFormat[ImageSourceFormat["Svg"] = 3] = "Svg";
106
110
  })(ImageSourceFormat || (exports.ImageSourceFormat = ImageSourceFormat = {}));
107
- /** @internal */
111
+ /** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.
112
+ * @public
113
+ */
108
114
  function isValidImageSourceFormat(format) {
109
115
  switch (format) {
110
116
  case ImageSourceFormat.Jpeg:
@@ -119,6 +125,10 @@ function isValidImageSourceFormat(format) {
119
125
  * @public
120
126
  */
121
127
  class ImageSource {
128
+ /** The content of the image, compressed */
129
+ data;
130
+ /** The compression type. */
131
+ format;
122
132
  /** Construct a new ImageSource, which takes ownership of the Uint8Array. */
123
133
  constructor(data, format) {
124
134
  this.data = data;
@@ -126,4 +136,10 @@ class ImageSource {
126
136
  }
127
137
  }
128
138
  exports.ImageSource = ImageSource;
139
+ /** Returns true if `source` is a [[BinaryImageSource]].
140
+ * @public
141
+ */
142
+ function isBinaryImageSource(source) {
143
+ return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;
144
+ }
129
145
  //# sourceMappingURL=Image.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAiFH,oCAEC;AAMD,sDAMC;AAkBD,4DASC;AAxHD;;;;;GAKG;AACH,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAA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5B,KAAK,iBAAiB,CAAC,GAAG,CAAC;QAC3B,KAAK,iBAAiB,CAAC,GAAG;YACxB,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAa,WAAW;IAMtB,4EAA4E;IAC5E,YAAmB,IAAyB,EAAE,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC","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 Rendering\n */\n\n/** Format of an [[ImageBuffer]].\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\n * @see [[ImageBuffer.getNumBytesPerPixel]]\n * @public\n * @extensions\n */\nexport enum ImageBufferFormat {\n /** RGBA format - 4 bytes per pixel. */\n Rgba = 0,\n /** RGB format - 3 bytes per pixel. */\n Rgb = 2,\n /** 1 byte per pixel. */\n Alpha = 5,\n}\n\n/** Uncompressed rectangular bitmap image data.\n * @public\n */\nexport class ImageBuffer {\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\n public readonly data: Uint8Array;\n /** Format of the bytes in the image. */\n public readonly format: ImageBufferFormat;\n /** Width of image in pixels */\n public readonly width: number;\n\n /** Return the number of bytes allocated for each pixel. */\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\n\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\n switch (format) {\n case ImageBufferFormat.Alpha: return 1;\n case ImageBufferFormat.Rgb: return 3;\n default: return 4;\n }\n }\n\n /** Get the height of this image in pixels. */\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\n\n /** Create a new ImageBuffer.\n * @note The ImageBuffer takes ownership of the input Uint8Array.\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\n * @param format The format of the image.\n * @param width The width of the image in pixels.\n * @returns A new ImageBuffer.\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\n */\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\n if (!this.isValidData(data, format, width))\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\n\n return new ImageBuffer(data, format, width);\n }\n\n /** @internal */\n protected static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\n const height = this.computeHeight(data, format, width);\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\n }\n\n /** @internal */\n protected static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\n return data.length / (width * this.getNumBytesPerPixel(format));\n }\n\n /** @internal */\n protected constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\n this.data = data;\n this.format = format;\n this.width = width;\n }\n}\n\n/** Returns whether the input is a power of two.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function isPowerOfTwo(num: number): boolean {\n return 0 === (num & (num - 1));\n}\n\n/** Returns the first power-of-two value greater than or equal to the input.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function nextHighestPowerOfTwo(num: number): number {\n --num;\n for (let i = 1; i < 32; i <<= 1)\n num = num | num >> i;\n\n return num + 1;\n}\n\n/** The format of an ImageSource.\n * @public\n * @extensions\n */\nexport enum ImageSourceFormat {\n /** Image data is stored with JPEG compression. */\n Jpeg = 0,\n /** Image data is stored with PNG compression. */\n Png = 2,\n /** Image is stored as an Svg stream.\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\n */\n Svg = 3,\n}\n\n/** @internal */\nexport function isValidImageSourceFormat(format: ImageSourceFormat): boolean {\n switch (format) {\n case ImageSourceFormat.Jpeg:\n case ImageSourceFormat.Png:\n case ImageSourceFormat.Svg:\n return true;\n default:\n return false;\n }\n}\n\n/** Image data encoded and compressed in either Jpeg or Png format.\n * @public\n */\nexport class ImageSource {\n /** The content of the image, compressed */\n public readonly data: Uint8Array | string;\n /** The compression type. */\n public readonly format: ImageSourceFormat;\n\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\n this.data = data;\n this.format = format;\n }\n}\n"]}
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../src/Image.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AA8EH,oCAEC;AAMD,sDAMC;AAoBD,4DASC;AAiCD,kDAEC;AA1JD;;;;;GAKG;AACH,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAuC;IACvC,yDAAQ,CAAA;IACR,sCAAsC;IACtC,uDAAO,CAAA;IACP,wBAAwB;IACxB,2DAAS,CAAA;AACX,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAa,WAAW;IACtB,sGAAsG;IACtF,IAAI,CAAa;IACjC,wCAAwC;IACxB,MAAM,CAAoB;IAC1C,+BAA+B;IACf,KAAK,CAAS;IAE9B,2DAA2D;IAC3D,IAAW,gBAAgB,KAAa,OAAO,WAAW,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAE9F,0FAA0F;IACnF,MAAM,CAAC,mBAAmB,CAAC,MAAyB;QACzD,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,iBAAiB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC;YACvC,KAAK,iBAAiB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,8CAA8C;IAC9C,IAAW,MAAM,KAAa,OAAO,WAAW,CAAC,aAAa,CAAC,I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C,CAAC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,GAAW;IAC/C,EAAE,GAAG,CAAC;IACN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC;QAC7B,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;IAEvB,OAAO,GAAG,GAAG,CAAC,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B,kDAAkD;IAClD,yDAAQ,CAAA;IACR,iDAAiD;IACjD,uDAAO,CAAA;IACP;;OAEG;IACH,uDAAO,CAAA;AACT,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B;AAED;;GAEG;AACH,SAAgB,wBAAwB,CAAC,MAAc;IACrD,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,iBAAiB,CAAC,IAAI,CAAC;QAC5B,KAAK,iBAAiB,CAAC,GAAG,CAAC;QAC3B,KAAK,iBAAiB,CAAC,GAAG;YACxB,OAAO,IAAI,CAAC;QACd;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAa,WAAW;IACtB,2CAA2C;IAC3B,IAAI,CAAsB;IAC1C,4BAA4B;IACZ,MAAM,CAAoB;IAE1C,4EAA4E;IAC5E,YAAmB,IAAyB,EAAE,MAAyB;QACrE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAXD,kCAWC;AAcD;;GAEG;AACH,SAAgB,mBAAmB,CAAC,MAAmB;IACrD,OAAO,MAAM,CAAC,MAAM,KAAK,iBAAiB,CAAC,GAAG,IAAI,MAAM,CAAC,IAAI,YAAY,UAAU,CAAC;AACtF,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\n/** Format of an [[ImageBuffer]].\n * The format determines how many bytes are allocated for each pixel in the buffer and the semantics of each byte.\n * @see [[ImageBuffer.getNumBytesPerPixel]]\n * @public\n * @extensions\n */\nexport enum ImageBufferFormat {\n /** RGBA format - 4 bytes per pixel. */\n Rgba = 0,\n /** RGB format - 3 bytes per pixel. */\n Rgb = 2,\n /** 1 byte per pixel. */\n Alpha = 5,\n}\n\n/** Uncompressed rectangular bitmap image data.\n * @public\n */\nexport class ImageBuffer {\n /** Image data in which each pixel occupies 1 or more bytes depending of the [[ImageBufferFormat]]. */\n public readonly data: Uint8Array;\n /** Format of the bytes in the image. */\n public readonly format: ImageBufferFormat;\n /** Width of image in pixels */\n public readonly width: number;\n\n /** Return the number of bytes allocated for each pixel. */\n public get numBytesPerPixel(): number { return ImageBuffer.getNumBytesPerPixel(this.format); }\n\n /** Determine the number of bytes allocated to a single pixel for the specified format. */\n public static getNumBytesPerPixel(format: ImageBufferFormat): number {\n switch (format) {\n case ImageBufferFormat.Alpha: return 1;\n case ImageBufferFormat.Rgb: return 3;\n default: return 4;\n }\n }\n\n /** Get the height of this image in pixels. */\n public get height(): number { return ImageBuffer.computeHeight(this.data, this.format, this.width); }\n\n /** Create a new ImageBuffer.\n * @note The ImageBuffer takes ownership of the input Uint8Array.\n * @param data The uncompressed image bytes. Must be a multiple of the width times the number of bytes per pixel specified by the format.\n * @param format The format of the image.\n * @param width The width of the image in pixels.\n * @returns A new ImageBuffer.\n * @throws Error if the length of the Uint8Array is not appropriate for the specified width and format.\n */\n public static create(data: Uint8Array, format: ImageBufferFormat, width: number): ImageBuffer {\n if (!this.isValidData(data, format, width))\n throw new Error(\"The number of bytes supplied for ImageBuffer do not match its width and format.\");\n\n return new ImageBuffer(data, format, width);\n }\n\n private static isValidData(data: Uint8Array, format: ImageBufferFormat, width: number): boolean {\n const height = this.computeHeight(data, format, width);\n return width > 0 && height > 0 && Math.floor(width) === width && Math.floor(height) === height;\n }\n\n private static computeHeight(data: Uint8Array, format: ImageBufferFormat, width: number): number {\n return data.length / (width * this.getNumBytesPerPixel(format));\n }\n\n private constructor(data: Uint8Array, format: ImageBufferFormat, width: number) {\n this.data = data;\n this.format = format;\n this.width = width;\n }\n}\n\n/** Returns whether the input is a power of two.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function isPowerOfTwo(num: number): boolean {\n return 0 === (num & (num - 1));\n}\n\n/** Returns the first power-of-two value greater than or equal to the input.\n * @note Floating point inputs are truncated.\n * @public\n */\nexport function nextHighestPowerOfTwo(num: number): number {\n --num;\n for (let i = 1; i < 32; i <<= 1)\n num = num | num >> i;\n\n return num + 1;\n}\n\n/** The format of an ImageSource.\n * @public\n * @extensions\n */\nexport enum ImageSourceFormat {\n /** Image data is stored with JPEG compression. */\n Jpeg = 0,\n /** Image data is stored with PNG compression. */\n Png = 2,\n /** Image is stored as an Svg stream.\n * @note SVG is only valid for ImageSources in JavaScript. It *may not* be used for persistent textures.\n */\n Svg = 3,\n}\n\n/** Returns true if the numeric `format` value is a valid member of the [[ImageSourceFormat]] enumeration.\n * @public\n */\nexport function isValidImageSourceFormat(format: number): format is ImageSourceFormat {\n switch (format) {\n case ImageSourceFormat.Jpeg:\n case ImageSourceFormat.Png:\n case ImageSourceFormat.Svg:\n return true;\n default:\n return false;\n }\n}\n\n/** Image data encoded and compressed in either Jpeg or Png format.\n * @public\n */\nexport class ImageSource {\n /** The content of the image, compressed */\n public readonly data: Uint8Array | string;\n /** The compression type. */\n public readonly format: ImageSourceFormat;\n\n /** Construct a new ImageSource, which takes ownership of the Uint8Array. */\n public constructor(data: Uint8Array | string, format: ImageSourceFormat) {\n this.data = data;\n this.format = format;\n }\n}\n\n/** An [[ImageSource]] encoded in binary form as a Jpeg or Png, as opposed to one encoded\n * in string format as an Svg.\n * Only binary ImageSources can be used for [[Texture]]s stored in [[IModelDb]]s.\n * @public\n */\nexport interface BinaryImageSource {\n /** The format in which the [[data]] is encoded. */\n readonly format: ImageSourceFormat.Jpeg | ImageSourceFormat.Png;\n /** The image data encoded according to [[format]]. */\n readonly data: Uint8Array;\n}\n\n/** Returns true if `source` is a [[BinaryImageSource]].\n * @public\n */\nexport function isBinaryImageSource(source: ImageSource): source is BinaryImageSource {\n return source.format !== ImageSourceFormat.Svg && source.data instanceof Uint8Array;\n}\n"]}
@@ -136,6 +136,8 @@ export interface IpcAppFunctions {
136
136
  closeIModel: (key: string) => Promise<void>;
137
137
  /** see BriefcaseConnection.saveChanges */
138
138
  saveChanges: (key: string, description?: string) => Promise<void>;
139
+ /** see BriefcaseConnection.abandonChanges */
140
+ abandonChanges: (key: string) => Promise<void>;
139
141
  /** see BriefcaseTxns.hasPendingTxns */
140
142
  hasPendingTxns: (key: string) => Promise<boolean>;
141
143
  /** see BriefcaseTxns.isUndoPossible */
@@ -1 +1 @@
1
- {"version":3,"file":"IpcAppProps.d.ts","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAClJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,C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AC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}
1
+ {"version":3,"file":"IpcAppProps.js","sourceRoot":"","sources":["../../src/IpcAppProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAuBH;;GAEG;AACI,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,sBAAc,CAAC,SAAS,gBAAgB,QAAQ,EAAE,CAAC;AAAvG,QAAA,wBAAwB,4BAA+E;AAwBpH,gBAAgB;AACH,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE,sBAAsB;IACjC,SAAS,EAAE,4BAA4B;IACvC,IAAI,EAAE,mBAAmB;IACzB,YAAY,EAAE,4BAA4B;CAClC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { GuidString, Id64String, IModelStatus, LogLevel, OpenMode } from \"@itwin/core-bentley\";\nimport { Range3dProps, XYZProps } from \"@itwin/core-geometry\";\nimport { OpenBriefcaseProps, OpenCheckpointArgs } from \"./BriefcaseTypes\";\nimport { ChangedEntities } from \"./ChangedEntities\";\nimport { ChangesetIndex, ChangesetIndexAndId } from \"./ChangesetProps\";\nimport { GeographicCRSProps } from \"./geometry/CoordinateReferenceSystem\";\nimport { EcefLocationProps, IModelConnectionProps, IModelRpcProps, RootSubjectProps, SnapshotOpenOptions, StandaloneOpenOptions } from \"./IModel\";\nimport { ModelGeometryChangesProps } from \"./ModelGeometryChanges\";\n\n/** Options for pulling changes into iModel.\n * @internal\n */\nexport interface PullChangesOptions {\n /** Enables progress reporting. */\n reportProgress?: boolean;\n /** Interval for reporting progress (in milliseconds). */\n progressInterval?: number;\n /** Enables checks for abort. */\n enableCancellation?: boolean;\n}\n\n/** Get IPC channel name used for reporting progress of pulling changes into iModel.\n * @internal\n */\nexport const getPullChangesIpcChannel = (iModelId: string) => `${ipcAppChannels.functions}/pullChanges/${iModelId}`;\n\n/** Identifies a list of tile content Ids belonging to a single tile tree.\n * @internal\n */\nexport interface TileTreeContentIds {\n treeId: string;\n contentIds: string[];\n}\n\n/** Specifies a [GeometricModel]($backend)'s Id and a Guid identifying the current state of the geometry contained within the model.\n * @see [TxnManager.onModelGeometryChanged]($backend) and [BriefcaseTxns.onModelGeometryChanged]($frontend).\n * @public\n * @extensions\n */\nexport interface ModelIdAndGeometryGuid {\n /** The model's Id. */\n id: Id64String;\n /** A unique identifier for the current state of the model's geometry. If the guid differs between two revisions of the same iModel, it indicates that the geometry differs.\n * This is primarily an implementation detail used to determine whether [Tile]($frontend)s produced for one revision are compatible with another revision.\n */\n guid: GuidString;\n}\n\n/** @internal */\nexport const ipcAppChannels = {\n functions: \"itwinjs-core/ipc-app\",\n appNotify: \"itwinjs-core/ipcApp-notify\",\n txns: \"itwinjs-core/txns\",\n editingScope: \"itwinjs-core/editing-scope\",\n} as const;\n\n/**\n * Interface implemented by the frontend [NotificationHandler]($common) to be notified of events from IpcApp backend.\n * @internal\n */\nexport interface IpcAppNotifications {\n notifyApp: () => void;\n}\n\n/** @internal */\nexport interface NotifyEntitiesChangedMetadata {\n /** Class full name (\"Schema:Class\") */\n name: string;\n /** The indices in [[NotifyEntitiesChangedArgs.meta]] of each of this class's **direct** base classes. */\n bases: number[];\n}\n\n/** Arguments supplied to [[TxnNotifications.notifyElementsChanged]] and [[TxnNotifications.notifyModelsChanged]].\n * @internal\n */\nexport interface NotifyEntitiesChangedArgs extends ChangedEntities {\n /** An array of the same length as [[ChangedEntities.inserted]] (or empty if that array is undefined), containing the index in the [[meta]] array at which the\n * metadata for each entity's class is located.\n */\n insertedMeta: number[];\n /** See insertedMeta. */\n updatedMeta: number[];\n /** See insertedMeta. */\n deletedMeta: number[];\n\n /** Metadata describing each unique class of entity in this set of changes, followed by each unique direct or indirect base class of those classes. */\n meta: NotifyEntitiesChangedMetadata[];\n}\n\n/** Interface implemented by the frontend [NotificationHandler]($common) to be notified of changes to an iModel.\n * @see [TxnManager]($backend) for the source of these events.\n * @see [BriefcaseTxns]($frontend) for the frontend implementation.\n * @internal\n */\nexport interface TxnNotifications {\n notifyElementsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyModelsChanged: (changes: NotifyEntitiesChangedArgs) => void;\n notifyGeometryGuidsChanged: (changes: ModelIdAndGeometryGuid[]) => void;\n notifyCommit: () => void;\n notifyCommitted: (hasPendingTxns: boolean, time: number) => void;\n notifyReplayExternalTxns: () => void;\n notifyReplayedExternalTxns: () => void;\n notifyChangesApplied: () => void;\n notifyBeforeUndoRedo: (isUndo: boolean) => void;\n notifyAfterUndoRedo: (isUndo: boolean) => void;\n notifyPulledChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n notifyPushedChanges: (parentChangeSetId: ChangesetIndexAndId) => void;\n\n notifyIModelNameChanged: (name: string) => void;\n notifyRootSubjectChanged: (subject: RootSubjectProps) => void;\n notifyProjectExtentsChanged: (extents: Range3dProps) => void;\n notifyGlobalOriginChanged: (origin: XYZProps) => void;\n notifyEcefLocationChanged: (ecef: EcefLocationProps | undefined) => void;\n notifyGeographicCoordinateSystemChanged: (gcs: GeographicCRSProps | undefined) => void;\n}\n\n/**\n * Interface registered by the frontend [NotificationHandler]($common) to be notified of changes to an iModel during an [GraphicalEditingScope]($frontend).\n * @internal\n */\nexport interface EditingScopeNotifications {\n notifyGeometryChanged: (modelProps: ModelGeometryChangesProps[]) => void;\n}\n\n/**\n * The methods that may be invoked via Ipc from the frontend of an IpcApp and are implemented on its backend.\n * @internal\n */\nexport interface IpcAppFunctions {\n /** Send frontend log to backend.\n * @param _level Specify log level.\n * @param _category Specify log category.\n * @param _message Specify log message.\n * @param _metaData metaData if any.\n */\n log: (_timestamp: number, _level: LogLevel, _category: string, _message: string, _metaData?: any) => Promise<void>;\n\n /** see BriefcaseConnection.openFile */\n openBriefcase: (args: OpenBriefcaseProps) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openCheckpoint: (args: OpenCheckpointArgs) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.openStandalone */\n openStandalone: (filePath: string, openMode: OpenMode, opts?: StandaloneOpenOptions) => Promise<IModelConnectionProps>;\n /** see SnapshotConnection.openFile */\n openSnapshot: (filePath: string, opts?: SnapshotOpenOptions) => Promise<IModelConnectionProps>;\n /** see BriefcaseConnection.close */\n closeIModel: (key: string) => Promise<void>;\n /** see BriefcaseConnection.saveChanges */\n saveChanges: (key: string, description?: string) => Promise<void>;\n /** see BriefcaseConnection.abandonChanges */\n abandonChanges: (key: string) => Promise<void>;\n /** see BriefcaseTxns.hasPendingTxns */\n hasPendingTxns: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isUndoPossible */\n isUndoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.isRedoPossible */\n isRedoPossible: (key: string) => Promise<boolean>;\n /** see BriefcaseTxns.getUndoString */\n getUndoString: (key: string) => Promise<string>;\n /** see BriefcaseTxns.getRedoString */\n getRedoString: (key: string) => Promise<string>;\n\n /** see BriefcaseConnection.pullChanges */\n pullChanges: (key: string, toIndex?: ChangesetIndex, options?: PullChangesOptions) => Promise<ChangesetIndexAndId>;\n /** Cancels pull of changes. */\n cancelPullChangesRequest: (key: string) => Promise<void>;\n /** see BriefcaseConnection.pushChanges */\n pushChanges: (key: string, description: string) => Promise<ChangesetIndexAndId>;\n /** Cancels currently pending or active generation of tile content. */\n cancelTileContentRequests: (tokenProps: IModelRpcProps, _contentIds: TileTreeContentIds[]) => Promise<void>;\n\n /** Cancel element graphics requests.\n * @see [[IModelTileRpcInterface.requestElementGraphics]].\n */\n cancelElementGraphicsRequests: (key: string, _requestIds: string[]) => Promise<void>;\n\n toggleGraphicalEditingScope: (key: string, _startSession: boolean) => Promise<boolean>;\n isGraphicalEditingSupported: (key: string) => Promise<boolean>;\n\n reverseTxns: (key: string, numOperations: number) => Promise<IModelStatus>;\n reverseAllTxn: (key: string) => Promise<IModelStatus>;\n reinstateTxn: (key: string) => Promise<IModelStatus>;\n restartTxnSession: (key: string) => Promise<void>;\n\n /** Query the number of concurrent threads supported by the host's IO or CPU thread pool. */\n queryConcurrency: (pool: \"io\" | \"cpu\") => Promise<number>;\n}\n\n"]}