@itwin/core-common 4.10.0-dev.8 → 5.0.0-dev.0

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 (323) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/lib/cjs/BackendTypes.d.ts +0 -2
  3. package/lib/cjs/BackendTypes.d.ts.map +1 -1
  4. package/lib/cjs/BackgroundMapProvider.js +1 -1
  5. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  6. package/lib/cjs/BackgroundMapSettings.js +2 -2
  7. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  8. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  9. package/lib/cjs/Code.d.ts +8 -0
  10. package/lib/cjs/Code.d.ts.map +1 -1
  11. package/lib/cjs/Code.js +8 -0
  12. package/lib/cjs/Code.js.map +1 -1
  13. package/lib/cjs/ColorDef.d.ts.map +1 -1
  14. package/lib/cjs/ColorDef.js +0 -3
  15. package/lib/cjs/ColorDef.js.map +1 -1
  16. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  17. package/lib/cjs/ContourDisplay.d.ts +216 -0
  18. package/lib/cjs/ContourDisplay.d.ts.map +1 -0
  19. package/lib/cjs/ContourDisplay.js +300 -0
  20. package/lib/cjs/ContourDisplay.js.map +1 -0
  21. package/lib/cjs/DisplayStyleSettings.d.ts +9 -0
  22. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  23. package/lib/cjs/DisplayStyleSettings.js +16 -0
  24. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  25. package/lib/cjs/ECSqlReader.d.ts.map +1 -1
  26. package/lib/cjs/ECSqlReader.js +1 -10
  27. package/lib/cjs/ECSqlReader.js.map +1 -1
  28. package/lib/cjs/ElementMesh.js +2 -3
  29. package/lib/cjs/ElementMesh.js.map +1 -1
  30. package/lib/cjs/ElementProps.d.ts +25 -0
  31. package/lib/cjs/ElementProps.d.ts.map +1 -1
  32. package/lib/cjs/ElementProps.js +3 -3
  33. package/lib/cjs/ElementProps.js.map +1 -1
  34. package/lib/cjs/FeatureSymbology.d.ts +36 -5
  35. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  36. package/lib/cjs/FeatureSymbology.js +127 -40
  37. package/lib/cjs/FeatureSymbology.js.map +1 -1
  38. package/lib/cjs/GeoCoordinateServices.js +2 -2
  39. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  40. package/lib/cjs/IModel.js.map +1 -1
  41. package/lib/cjs/IModelError.d.ts +5 -3
  42. package/lib/cjs/IModelError.d.ts.map +1 -1
  43. package/lib/cjs/IModelError.js +5 -2
  44. package/lib/cjs/IModelError.js.map +1 -1
  45. package/lib/cjs/ITwinError.d.ts +72 -0
  46. package/lib/cjs/ITwinError.d.ts.map +1 -0
  47. package/lib/cjs/ITwinError.js +55 -0
  48. package/lib/cjs/ITwinError.js.map +1 -0
  49. package/lib/cjs/Image.js +4 -4
  50. package/lib/cjs/Image.js.map +1 -1
  51. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  52. package/lib/cjs/MapLayerSettings.js +0 -1
  53. package/lib/cjs/MapLayerSettings.js.map +1 -1
  54. package/lib/cjs/QPoint.d.ts +1 -1
  55. package/lib/cjs/RenderMaterial.js +4 -4
  56. package/lib/cjs/RenderMaterial.js.map +1 -1
  57. package/lib/cjs/RenderTexture.js.map +1 -1
  58. package/lib/cjs/RpcInterface.js +1 -1
  59. package/lib/cjs/RpcInterface.js.map +1 -1
  60. package/lib/cjs/RpcManager.d.ts.map +1 -1
  61. package/lib/cjs/RpcManager.js.map +1 -1
  62. package/lib/cjs/SolarCalculate.js +4 -5
  63. package/lib/cjs/SolarCalculate.js.map +1 -1
  64. package/lib/cjs/SpatialClassification.js.map +1 -1
  65. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  66. package/lib/cjs/TextureMapping.js.map +1 -1
  67. package/lib/cjs/TileProps.js +2 -2
  68. package/lib/cjs/TileProps.js.map +1 -1
  69. package/lib/cjs/Tween.d.ts.map +1 -1
  70. package/lib/cjs/Tween.js +0 -1
  71. package/lib/cjs/Tween.js.map +1 -1
  72. package/lib/cjs/ViewProps.d.ts +1 -1
  73. package/lib/cjs/ViewProps.d.ts.map +1 -1
  74. package/lib/cjs/ViewProps.js.map +1 -1
  75. package/lib/cjs/core-common.d.ts +2 -0
  76. package/lib/cjs/core-common.d.ts.map +1 -1
  77. package/lib/cjs/core-common.js +2 -0
  78. package/lib/cjs/core-common.js.map +1 -1
  79. package/lib/cjs/geometry/ElementGeometry.js +3 -3
  80. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  81. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  82. package/lib/cjs/geometry/GeometryStream.js +2 -2
  83. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  84. package/lib/cjs/geometry/Placement.d.ts +3 -0
  85. package/lib/cjs/geometry/Placement.d.ts.map +1 -1
  86. package/lib/cjs/geometry/Placement.js +3 -0
  87. package/lib/cjs/geometry/Placement.js.map +1 -1
  88. package/lib/cjs/internal/Snapping.d.ts +7 -1
  89. package/lib/cjs/internal/Snapping.d.ts.map +1 -1
  90. package/lib/cjs/internal/Snapping.js.map +1 -1
  91. package/lib/cjs/ipc/IpcSocket.d.ts +15 -2
  92. package/lib/cjs/ipc/IpcSocket.d.ts.map +1 -1
  93. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  94. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  95. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  96. package/lib/cjs/rpc/IModelReadRpcInterface.js +12 -12
  97. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  98. package/lib/cjs/rpc/IModelTileRpcInterface.js +1 -1
  99. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  100. package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +3 -0
  101. package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts.map +1 -1
  102. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +3 -0
  103. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  104. package/lib/cjs/rpc/TestRpcManager.d.ts.map +1 -1
  105. package/lib/cjs/rpc/TestRpcManager.js +0 -1
  106. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  107. package/lib/cjs/rpc/WipRpcInterface.d.ts +1 -0
  108. package/lib/cjs/rpc/WipRpcInterface.d.ts.map +1 -1
  109. package/lib/cjs/rpc/WipRpcInterface.js +2 -1
  110. package/lib/cjs/rpc/WipRpcInterface.js.map +1 -1
  111. package/lib/cjs/rpc/core/RpcConfiguration.d.ts.map +1 -1
  112. package/lib/cjs/rpc/core/RpcConfiguration.js +1 -1
  113. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  114. package/lib/cjs/rpc/core/RpcConstants.d.ts +1 -1
  115. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  116. package/lib/cjs/rpc/core/RpcConstants.js +1 -1
  117. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  118. package/lib/cjs/rpc/core/RpcControl.d.ts.map +1 -1
  119. package/lib/cjs/rpc/core/RpcControl.js +0 -1
  120. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  121. package/lib/cjs/rpc/core/RpcInvocation.js +1 -1
  122. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  123. package/lib/cjs/rpc/core/RpcMarshaling.js +1 -1
  124. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  125. package/lib/cjs/rpc/core/RpcOperation.d.ts.map +1 -1
  126. package/lib/cjs/rpc/core/RpcOperation.js +0 -1
  127. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  128. package/lib/cjs/rpc/core/RpcPendingQueue.js +1 -1
  129. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  130. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  131. package/lib/cjs/rpc/core/RpcPush.d.ts.map +1 -1
  132. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  133. package/lib/cjs/rpc/core/RpcRegistry.d.ts.map +1 -1
  134. package/lib/cjs/rpc/core/RpcRegistry.js +0 -2
  135. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  136. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  137. package/lib/cjs/rpc/core/RpcRequest.js +1 -2
  138. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  139. package/lib/cjs/rpc/core/RpcRequestContext.d.ts.map +1 -1
  140. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  141. package/lib/cjs/rpc/core/RpcRoutingToken.d.ts.map +1 -1
  142. package/lib/cjs/rpc/core/RpcRoutingToken.js +0 -1
  143. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  144. package/lib/cjs/rpc/core/RpcSessionInvocation.js +1 -1
  145. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  146. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  147. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  148. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js +0 -1
  149. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  150. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  151. package/lib/cjs/rpc/web/RpcMultipart.d.ts.map +1 -1
  152. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  153. package/lib/cjs/rpc/web/WebAppRpcLogging.js +1 -1
  154. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  155. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +0 -2
  156. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  157. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  158. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  159. package/lib/cjs/rpc/web/WebAppRpcRequest.js +1 -1
  160. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  161. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  162. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js +0 -1
  163. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  164. package/lib/cjs/tile/TileIO.js +4 -4
  165. package/lib/cjs/tile/TileIO.js.map +1 -1
  166. package/lib/cjs/tile/TileMetadata.js +13 -13
  167. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  168. package/lib/esm/BackendTypes.d.ts +0 -2
  169. package/lib/esm/BackendTypes.d.ts.map +1 -1
  170. package/lib/esm/BackgroundMapProvider.js +1 -1
  171. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  172. package/lib/esm/BackgroundMapSettings.js +2 -2
  173. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  174. package/lib/esm/BriefcaseTypes.js.map +1 -1
  175. package/lib/esm/Code.d.ts +8 -0
  176. package/lib/esm/Code.d.ts.map +1 -1
  177. package/lib/esm/Code.js +8 -0
  178. package/lib/esm/Code.js.map +1 -1
  179. package/lib/esm/ColorDef.d.ts.map +1 -1
  180. package/lib/esm/ColorDef.js +0 -3
  181. package/lib/esm/ColorDef.js.map +1 -1
  182. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  183. package/lib/esm/ContourDisplay.d.ts +216 -0
  184. package/lib/esm/ContourDisplay.d.ts.map +1 -0
  185. package/lib/esm/ContourDisplay.js +293 -0
  186. package/lib/esm/ContourDisplay.js.map +1 -0
  187. package/lib/esm/DisplayStyleSettings.d.ts +9 -0
  188. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  189. package/lib/esm/DisplayStyleSettings.js +16 -0
  190. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  191. package/lib/esm/ECSqlReader.d.ts.map +1 -1
  192. package/lib/esm/ECSqlReader.js +1 -10
  193. package/lib/esm/ECSqlReader.js.map +1 -1
  194. package/lib/esm/ElementMesh.js +1 -1
  195. package/lib/esm/ElementMesh.js.map +1 -1
  196. package/lib/esm/ElementProps.d.ts +25 -0
  197. package/lib/esm/ElementProps.d.ts.map +1 -1
  198. package/lib/esm/ElementProps.js.map +1 -1
  199. package/lib/esm/FeatureSymbology.d.ts +36 -5
  200. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  201. package/lib/esm/FeatureSymbology.js +127 -40
  202. package/lib/esm/FeatureSymbology.js.map +1 -1
  203. package/lib/esm/IModel.js.map +1 -1
  204. package/lib/esm/IModelError.d.ts +5 -3
  205. package/lib/esm/IModelError.d.ts.map +1 -1
  206. package/lib/esm/IModelError.js +5 -2
  207. package/lib/esm/IModelError.js.map +1 -1
  208. package/lib/esm/ITwinError.d.ts +72 -0
  209. package/lib/esm/ITwinError.d.ts.map +1 -0
  210. package/lib/esm/ITwinError.js +52 -0
  211. package/lib/esm/ITwinError.js.map +1 -0
  212. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  213. package/lib/esm/MapLayerSettings.js +0 -1
  214. package/lib/esm/MapLayerSettings.js.map +1 -1
  215. package/lib/esm/QPoint.d.ts +1 -1
  216. package/lib/esm/RenderMaterial.js +4 -4
  217. package/lib/esm/RenderMaterial.js.map +1 -1
  218. package/lib/esm/RenderTexture.js.map +1 -1
  219. package/lib/esm/RpcInterface.js +1 -1
  220. package/lib/esm/RpcInterface.js.map +1 -1
  221. package/lib/esm/RpcManager.d.ts.map +1 -1
  222. package/lib/esm/RpcManager.js.map +1 -1
  223. package/lib/esm/SpatialClassification.js.map +1 -1
  224. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  225. package/lib/esm/TextureMapping.js.map +1 -1
  226. package/lib/esm/Tween.d.ts.map +1 -1
  227. package/lib/esm/Tween.js +0 -1
  228. package/lib/esm/Tween.js.map +1 -1
  229. package/lib/esm/ViewProps.d.ts +1 -1
  230. package/lib/esm/ViewProps.d.ts.map +1 -1
  231. package/lib/esm/ViewProps.js.map +1 -1
  232. package/lib/esm/core-common.d.ts +2 -0
  233. package/lib/esm/core-common.d.ts.map +1 -1
  234. package/lib/esm/core-common.js +2 -0
  235. package/lib/esm/core-common.js.map +1 -1
  236. package/lib/esm/geometry/ElementGeometry.js +3 -3
  237. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  238. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  239. package/lib/esm/geometry/GeometryStream.js +2 -2
  240. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  241. package/lib/esm/geometry/Placement.d.ts +3 -0
  242. package/lib/esm/geometry/Placement.d.ts.map +1 -1
  243. package/lib/esm/geometry/Placement.js +3 -0
  244. package/lib/esm/geometry/Placement.js.map +1 -1
  245. package/lib/esm/internal/Snapping.d.ts +7 -1
  246. package/lib/esm/internal/Snapping.d.ts.map +1 -1
  247. package/lib/esm/internal/Snapping.js.map +1 -1
  248. package/lib/esm/ipc/IpcSocket.d.ts +15 -2
  249. package/lib/esm/ipc/IpcSocket.d.ts.map +1 -1
  250. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  251. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  252. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  253. package/lib/esm/rpc/IModelReadRpcInterface.js +12 -12
  254. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  255. package/lib/esm/rpc/IModelTileRpcInterface.js +1 -1
  256. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  257. package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +3 -0
  258. package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts.map +1 -1
  259. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +3 -0
  260. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  261. package/lib/esm/rpc/TestRpcManager.d.ts.map +1 -1
  262. package/lib/esm/rpc/TestRpcManager.js +0 -1
  263. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  264. package/lib/esm/rpc/WipRpcInterface.d.ts +1 -0
  265. package/lib/esm/rpc/WipRpcInterface.d.ts.map +1 -1
  266. package/lib/esm/rpc/WipRpcInterface.js +2 -1
  267. package/lib/esm/rpc/WipRpcInterface.js.map +1 -1
  268. package/lib/esm/rpc/core/RpcConfiguration.d.ts.map +1 -1
  269. package/lib/esm/rpc/core/RpcConfiguration.js +1 -1
  270. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  271. package/lib/esm/rpc/core/RpcConstants.d.ts +1 -1
  272. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  273. package/lib/esm/rpc/core/RpcConstants.js +1 -1
  274. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  275. package/lib/esm/rpc/core/RpcControl.d.ts.map +1 -1
  276. package/lib/esm/rpc/core/RpcControl.js +0 -1
  277. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  278. package/lib/esm/rpc/core/RpcInvocation.js +1 -1
  279. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  280. package/lib/esm/rpc/core/RpcMarshaling.js +1 -1
  281. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  282. package/lib/esm/rpc/core/RpcOperation.d.ts.map +1 -1
  283. package/lib/esm/rpc/core/RpcOperation.js +0 -1
  284. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  285. package/lib/esm/rpc/core/RpcPendingQueue.js +1 -1
  286. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  287. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  288. package/lib/esm/rpc/core/RpcPush.d.ts.map +1 -1
  289. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  290. package/lib/esm/rpc/core/RpcRegistry.d.ts.map +1 -1
  291. package/lib/esm/rpc/core/RpcRegistry.js +0 -2
  292. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  293. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  294. package/lib/esm/rpc/core/RpcRequest.js +1 -2
  295. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  296. package/lib/esm/rpc/core/RpcRequestContext.d.ts.map +1 -1
  297. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  298. package/lib/esm/rpc/core/RpcRoutingToken.d.ts.map +1 -1
  299. package/lib/esm/rpc/core/RpcRoutingToken.js +0 -1
  300. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  301. package/lib/esm/rpc/core/RpcSessionInvocation.js +1 -1
  302. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  303. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  304. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.d.ts.map +1 -1
  305. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js +0 -1
  306. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  307. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  308. package/lib/esm/rpc/web/RpcMultipart.d.ts.map +1 -1
  309. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  310. package/lib/esm/rpc/web/WebAppRpcLogging.js +1 -1
  311. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  312. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +0 -2
  313. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  314. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  315. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  316. package/lib/esm/rpc/web/WebAppRpcRequest.js +1 -1
  317. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  318. package/lib/esm/rpc/web/multipart/RpcMultipartParser.d.ts.map +1 -1
  319. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js +0 -1
  320. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  321. package/lib/esm/tile/TileMetadata.js +1 -1
  322. package/lib/esm/tile/TileMetadata.js.map +1 -1
  323. package/package.json +14 -15
@@ -1 +1 @@
1
- {"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,gBAAgB;AAChB,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,MAAM,KAAW,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACpG,CAAC;IAFe,4BAAQ,WAEvB,CAAA;IAED,SAAgB,SAAS;QACvB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACrG,CAAC;IAFe,6BAAS,YAExB,CAAA;IAED,SAAgB,IAAI,CAAC,OAA4B;QAC/C,OAAO,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,SAAS,CAAC;IACjH,CAAC;IAFe,wBAAI,OAEnB,CAAA;AACH,CAAC,EAZgB,mBAAmB,KAAnB,mBAAmB,QAYnC;AAED,gBAAgB;AAChB,MAAM,OAAgB,YAAY;IAMhC;QAFU,cAAS,GAAG,IAAI,GAAG,EAA4B,CAAC;QAGxD,YAA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AI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,MAAM;YACjD,OAAO;QAET,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,eAAe;QAC3B,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW;oBAC/B,IAAI,GAAG,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners!.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH,gBAAgB;AAChB,MAAM,CAAN,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,MAAM,KAAW,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE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AC,IAAI,CAAC;gBACxB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW;oBAC/B,IAAI,GAAG,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DevToolsRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/DevToolsRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,+DAAQ,CAAA;IAER,oFAAoF;IACpF,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,MAAM,OAAgB,oBAAqB,SAAQ,YAAY;IAC7D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA2B,OAAO,UAAU,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAUlH;;;gGAG4F;IAC5F,iEAAiE;IAC1D,KAAK,CAAC,IAAI,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAErG,qEAAqE;IAC9D,KAAK,CAAC,KAAK,CAAC,YAA4B,EAAE,QAA8B,IAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElI,uEAAuE;IAChE,KAAK,CAAC,QAAQ,CAAC,YAA4B;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACrD,QAAQ,CAAC,aAAa,GAAG,MAAM,UAAU,CAAC,0BAA0B,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gFAAgF;IACzE,KAAK,CAAC,WAAW,CAAC,YAA4B,EAAE,eAAuB,EAAE,SAAmB,IAAmC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA1BvK,2CAA2C;AACpB,kCAAa,GAAG,sBAAsB,CAAC;AAE9D;;GAEG;AACW,qCAAgB,GAAG,OAAO,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { LogLevel } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** Options to get the backend statistics\r\n * @internal\r\n */\r\nexport enum DevToolsStatsOptions {\r\n None = 0,\r\n\r\n /** All unitized values are setup as formatted strings with the appropriate units */\r\n FormatUnits = 1,\r\n}\r\n\r\n/** The purpose of this class is to house RPC methods for developer tools.\r\n * Note that this should NOT be used in production environments.\r\n * @internal\r\n */\r\nexport abstract class DevToolsRpcInterface extends RpcInterface { // eslint-disable-line deprecation/deprecation\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): DevToolsRpcInterface { return RpcManager.getClientForInterface(DevToolsRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"DevToolsRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The DevToolsRpcInterface will remain at 0.x since it is for testing only and not intended for production.\r\n */\r\n public static interfaceVersion = \"0.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n // Sends a ping and returns true if the backend received the ping\r\n public async ping(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend performance and memory statistics\r\n public async stats(_iModelToken: IModelRpcProps, _options: DevToolsStatsOptions): Promise<any> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend versions (application and iModelJs)\r\n public async versions(_iModelToken: IModelRpcProps): Promise<any> {\r\n const versions = await this.forward(arguments) || {};\r\n versions.availableRpcs = await RpcManager.describeAvailableEndpoints();\r\n return versions;\r\n }\r\n\r\n // Sets a new log level for the specified category and returns the old log level\r\n public async setLogLevel(_iModelToken: IModelRpcProps, _loggerCategory: string, _logLevel: LogLevel): Promise<LogLevel | undefined> { return this.forward(arguments); }\r\n}\r\n"]}
1
+ {"version":3,"file":"DevToolsRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/DevToolsRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,+DAAQ,CAAA;IAER,oFAAoF;IACpF,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,MAAM,OAAgB,oBAAqB,SAAQ,YAAY;IAC7D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA2B,OAAO,UAAU,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAUlH;;;gGAG4F;IAC5F,iEAAiE;IAC1D,KAAK,CAAC,IAAI,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAErG,qEAAqE;IAC9D,KAAK,CAAC,KAAK,CAAC,YAA4B,EAAE,QAA8B,IAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElI,uEAAuE;IAChE,KAAK,CAAC,QAAQ,CAAC,YAA4B;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACrD,QAAQ,CAAC,aAAa,GAAG,MAAM,UAAU,CAAC,0BAA0B,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gFAAgF;IACzE,KAAK,CAAC,WAAW,CAAC,YAA4B,EAAE,eAAuB,EAAE,SAAmB,IAAmC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA1BvK,2CAA2C;AACpB,kCAAa,GAAG,sBAAsB,CAAC;AAE9D;;GAEG;AACW,qCAAgB,GAAG,OAAO,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { LogLevel } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** Options to get the backend statistics\r\n * @internal\r\n */\r\nexport enum DevToolsStatsOptions {\r\n None = 0,\r\n\r\n /** All unitized values are setup as formatted strings with the appropriate units */\r\n FormatUnits = 1,\r\n}\r\n\r\n/** The purpose of this class is to house RPC methods for developer tools.\r\n * Note that this should NOT be used in production environments.\r\n * @internal\r\n */\r\nexport abstract class DevToolsRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): DevToolsRpcInterface { return RpcManager.getClientForInterface(DevToolsRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"DevToolsRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The DevToolsRpcInterface will remain at 0.x since it is for testing only and not intended for production.\r\n */\r\n public static interfaceVersion = \"0.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n // Sends a ping and returns true if the backend received the ping\r\n public async ping(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend performance and memory statistics\r\n public async stats(_iModelToken: IModelRpcProps, _options: DevToolsStatsOptions): Promise<any> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend versions (application and iModelJs)\r\n public async versions(_iModelToken: IModelRpcProps): Promise<any> {\r\n const versions = await this.forward(arguments) || {};\r\n versions.availableRpcs = await RpcManager.describeAvailableEndpoints();\r\n return versions;\r\n }\r\n\r\n // Sets a new log level for the specified category and returns the old log level\r\n public async setLogLevel(_iModelToken: IModelRpcProps, _loggerCategory: string, _logLevel: LogLevel): Promise<LogLevel | undefined> { return this.forward(arguments); }\r\n}\r\n"]}
@@ -86,39 +86,39 @@ IModelReadRpcInterface.interfaceName = "IModelReadRpcInterface";
86
86
  /** The semantic version of the interface. */
87
87
  IModelReadRpcInterface.interfaceVersion = "3.7.0";
88
88
  __decorate([
89
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
89
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
90
90
  ], IModelReadRpcInterface.prototype, "getConnectionProps", null);
91
91
  __decorate([
92
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
92
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
93
93
  ], IModelReadRpcInterface.prototype, "querySubCategories", null);
94
94
  __decorate([
95
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
95
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
96
96
  ], IModelReadRpcInterface.prototype, "queryAllUsedSpatialSubCategories", null);
97
97
  __decorate([
98
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
98
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
99
99
  ], IModelReadRpcInterface.prototype, "getModelProps", null);
100
100
  __decorate([
101
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
101
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
102
102
  ], IModelReadRpcInterface.prototype, "queryModelRanges", null);
103
103
  __decorate([
104
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
104
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
105
105
  ], IModelReadRpcInterface.prototype, "queryModelExtents", null);
106
106
  __decorate([
107
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
107
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
108
108
  ], IModelReadRpcInterface.prototype, "getClassHierarchy", null);
109
109
  __decorate([
110
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
110
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
111
111
  ], IModelReadRpcInterface.prototype, "getViewStateData", null);
112
112
  __decorate([
113
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
113
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
114
114
  ], IModelReadRpcInterface.prototype, "getDefaultViewId", null);
115
115
  __decorate([
116
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
116
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
117
117
  ], IModelReadRpcInterface.prototype, "getCustomViewState3dData", null);
118
118
  __decorate([
119
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
119
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
120
120
  ], IModelReadRpcInterface.prototype, "hydrateViewState", null);
121
121
  __decorate([
122
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
122
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
123
123
  ], IModelReadRpcInterface.prototype, "getGeoCoordinatesFromIModelCoordinates", null);
124
124
  //# sourceMappingURL=IModelReadRpcInterface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IModelReadRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelReadRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;AAoBH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,mBAAmB;IAA/D;;QACS,6BAAwB,GAAY,IAAI,CAAC;QAChC,YAAO,GAAG,kBAAkB,CAAC;IAC/C,CAAC;CAAA;AAwBD;;;;GAIG;AACH,MAAM,OAAgB,sBAAuB,SAAQ,YAAY;IAC/D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA6B,OAAO,UAAU,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAEtH,0FAA0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AC,CAAC,8CAA8C;+DACwB;AAG/H;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;8DAC8D;AAMrK;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;8DACA;AAEvG;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;sEAC+D;AAEtK;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;8DAC2D;AAQlK;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;oFAC2E","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { CompressedId64Set, GuidString, Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Range3dProps } from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"../Code\";\r\nimport { DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse } from \"../ConcurrentQuery\";\r\nimport { ElementMeshRequestProps } from \"../ElementMesh\";\r\nimport { ElementLoadOptions, ElementProps } from \"../ElementProps\";\r\nimport { EntityQueryParams } from \"../EntityProps\";\r\nimport { FontMapProps } from \"../Fonts\";\r\nimport {\r\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps,\r\n} from \"../GeoCoordinateServices\";\r\nimport { GeometryContainmentRequestProps, GeometryContainmentResponseProps } from \"../GeometryContainment\";\r\nimport { GeometrySummaryRequestProps } from \"../GeometrySummary\";\r\nimport { IModelConnectionProps, IModelRpcOpenProps, IModelRpcProps } from \"../IModel\";\r\nimport {\r\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\r\n} from \"../MassProperties\";\r\nimport { ModelProps } from \"../ModelProps\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { SnapRequestProps, SnapResponseProps } from \"../internal/Snapping\";\r\nimport { TextureData, TextureLoadProps } from \"../TextureProps\";\r\nimport {\r\n CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, SubCategoryResultRow,\r\n ViewStateLoadProps, ViewStateProps,\r\n} from \"../ViewProps\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcNotFoundResponse } from \"./core/RpcControl\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\n/** Response if the IModelDb was not found at the backend\r\n * (if the service has moved)\r\n * @public\r\n */\r\nexport class IModelNotFoundResponse extends RpcNotFoundResponse { // eslint-disable-line deprecation/deprecation\r\n public isIModelNotFoundResponse: boolean = true;\r\n public override message = \"iModel not found\";\r\n}\r\n\r\n/** Describes the volume of geometry contained with a [GeometricModel]($backend) as returned by\r\n * [IModelConnection.Models.queryExtents]($frontend) and [IModelDb.Models.queryExtents]($backend).\r\n * @public\r\n */\r\nexport interface ModelExtentsProps {\r\n /** The Id of the model, or [Id64.invalid]($bentley) if the input model Id was not a well-formed [Id64String]($bentley). */\r\n id: Id64String;\r\n /** The volume of geometry contained within the model.\r\n * This range will be null (@see [Range3d.isNull]($geometry)) if [[status]] is not [IModelStatus.Success]($bentley) or the model contains no geometry.\r\n */\r\n extents: Range3dProps;\r\n /** A status code indicating what if any error occurred obtaining the model's extents. For example:\r\n * - [IModelStatus.InvalidId]($bentley) if the input model Id was not a well-formed [Id64String]($bentley);\r\n * - [IModelStatus.NotFound]($bentley) if no model with the specified Id exists in the [[IModel]];\r\n * - [IModelStatus.WrongModel]($bentley) if the specified model is not a [GeometricModel]($backend); or\r\n * - [IModelStatus.Success]($bentley) if the extents were successfully obtained.\r\n *\r\n * If `status` is anything other than [IModelStatus.Success]($bentley), [[extents]] will be a null range.\r\n */\r\n status: IModelStatus;\r\n}\r\n\r\n/** The RPC interface for reading from an iModel.\r\n * All operations only require read-only access.\r\n * This interface is not normally used directly. See IModelConnection for higher-level and more convenient API for accessing iModels from a frontend.\r\n * @internal\r\n */\r\nexport abstract class IModelReadRpcInterface extends RpcInterface { // eslint-disable-line deprecation/deprecation\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface); }\r\n\r\n /** Returns the IModelReadRpcInterface instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelReadRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getConnectionProps(_iModelToken: IModelRpcOpenProps): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n public async queryRows(_iModelToken: IModelRpcProps, _request: DbQueryRequest): Promise<DbQueryResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async querySubCategories(_iModelToken: IModelRpcProps, _categoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async queryAllUsedSpatialSubCategories(_iModelToken: IModelRpcProps): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n public async queryBlob(_iModelToken: IModelRpcProps, _request: DbBlobRequest): Promise<DbBlobResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getModelProps(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async queryModelRanges(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<Range3dProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async queryModelExtents(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelExtentsProps[]> { return this.forward(arguments); }\r\n public async queryModelProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ModelProps[]> { return this.forward(arguments); }\r\n public async getElementProps(_iModelToken: IModelRpcProps, _elementIds: Id64String[]): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryElementProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryEntityIds(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<Id64String[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getClassHierarchy(_iModelToken: IModelRpcProps, _startClassName: string): Promise<string[]> { return this.forward(arguments); }\r\n public async getAllCodeSpecs(_iModelToken: IModelRpcProps): Promise<any[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getViewStateData(_iModelToken: IModelRpcProps, _viewDefinitionId: string, _options?: ViewStateLoadProps): Promise<ViewStateProps> { return this.forward(arguments); }\r\n public async readFontJson(_iModelToken: IModelRpcProps): Promise<FontMapProps> { return this.forward(arguments); }\r\n public async getToolTipMessage(_iModelToken: IModelRpcProps, _elementId: string): Promise<string[]> { return this.forward(arguments); }\r\n /** @deprecated in 3.x use ViewStore apis. */\r\n public async getViewThumbnail(_iModelToken: IModelRpcProps, _viewId: string): Promise<Uint8Array> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getDefaultViewId(_iModelToken: IModelRpcProps): Promise<Id64String> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getCustomViewState3dData(_iModelToken: IModelRpcProps, _options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async hydrateViewState(_iModelToken: IModelRpcProps, _options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> { return this.forward(arguments); }\r\n public async requestSnap(_iModelToken: IModelRpcProps, _sessionId: string, _props: SnapRequestProps): Promise<SnapResponseProps> { return this.forward(arguments); }\r\n public async cancelSnap(_iModelToken: IModelRpcProps, _sessionId: string): Promise<void> { return this.forward(arguments); }\r\n public async getGeometryContainment(_iModelToken: IModelRpcProps, _props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> { return this.forward(arguments); }\r\n public async getMassProperties(_iModelToken: IModelRpcProps, _props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> { return this.forward(arguments); }\r\n public async getMassPropertiesPerCandidate(_iModelToken: IModelRpcProps, _props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { return this.forward(arguments); }\r\n public async getIModelCoordinatesFromGeoCoordinates(_iModelToken: IModelRpcProps, _props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async getGeoCoordinatesFromIModelCoordinates(_iModelToken: IModelRpcProps, _props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> { return this.forward(arguments); }\r\n public async getGeometrySummary(_iModelToken: IModelRpcProps, _props: GeometrySummaryRequestProps): Promise<string> { return this.forward(arguments); }\r\n public async queryTextureData(_iModelToken: IModelRpcProps, _textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> { return this.forward(arguments); }\r\n public async loadElementProps(_iModelToken: IModelRpcProps, _elementIdentifier: Id64String | GuidString | CodeProps, _options?: ElementLoadOptions): Promise<ElementProps | undefined> {\r\n return this.forward(arguments);\r\n }\r\n public async generateElementMeshes(_iModelToken: IModelRpcProps, _props: ElementMeshRequestProps): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n /** @internal */\r\n public async callViewStore(_iModelToken: IModelRpcProps, _version: string, _forWrite: boolean, _methodName: string, ..._args: any[]): Promise<any> { return this.forward(arguments); }\r\n}\r\n"]}
1
+ {"version":3,"file":"IModelReadRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelReadRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;AAoBH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;;GAGG;AACH,MAAM,OAAO,sBAAuB,SAAQ,mB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Y,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;8DAC4E;AAEpI;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;+DACkF;AAM1I;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;+DACuE;AAG/H;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;8DAC6G;AAMrK;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;8DAC+C;AAEvG;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;sEAC8G;AAEtK;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;8DAC0G;AAQlK;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;oFAC0H","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { CompressedId64Set, GuidString, Id64String, IModelStatus } from \"@itwin/core-bentley\";\r\nimport { Range3dProps } from \"@itwin/core-geometry\";\r\nimport { CodeProps } from \"../Code\";\r\nimport { DbBlobRequest, DbBlobResponse, DbQueryRequest, DbQueryResponse } from \"../ConcurrentQuery\";\r\nimport { ElementMeshRequestProps } from \"../ElementMesh\";\r\nimport { ElementLoadOptions, ElementProps } from \"../ElementProps\";\r\nimport { EntityQueryParams } from \"../EntityProps\";\r\nimport { FontMapProps } from \"../Fonts\";\r\nimport {\r\n GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps,\r\n} from \"../GeoCoordinateServices\";\r\nimport { GeometryContainmentRequestProps, GeometryContainmentResponseProps } from \"../GeometryContainment\";\r\nimport { GeometrySummaryRequestProps } from \"../GeometrySummary\";\r\nimport { IModelConnectionProps, IModelRpcOpenProps, IModelRpcProps } from \"../IModel\";\r\nimport {\r\n MassPropertiesPerCandidateRequestProps, MassPropertiesPerCandidateResponseProps, MassPropertiesRequestProps, MassPropertiesResponseProps,\r\n} from \"../MassProperties\";\r\nimport { ModelProps } from \"../ModelProps\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { SnapRequestProps, SnapResponseProps } from \"../internal/Snapping\";\r\nimport { TextureData, TextureLoadProps } from \"../TextureProps\";\r\nimport {\r\n CustomViewState3dCreatorOptions, CustomViewState3dProps, HydrateViewStateRequestProps, HydrateViewStateResponseProps, SubCategoryResultRow,\r\n ViewStateLoadProps, ViewStateProps,\r\n} from \"../ViewProps\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcNotFoundResponse } from \"./core/RpcControl\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\n/** Response if the IModelDb was not found at the backend\r\n * (if the service has moved)\r\n * @public\r\n */\r\nexport class IModelNotFoundResponse extends RpcNotFoundResponse {\r\n public isIModelNotFoundResponse: boolean = true;\r\n public override message = \"iModel not found\";\r\n}\r\n\r\n/** Describes the volume of geometry contained with a [GeometricModel]($backend) as returned by\r\n * [IModelConnection.Models.queryExtents]($frontend) and [IModelDb.Models.queryExtents]($backend).\r\n * @public\r\n */\r\nexport interface ModelExtentsProps {\r\n /** The Id of the model, or [Id64.invalid]($bentley) if the input model Id was not a well-formed [Id64String]($bentley). */\r\n id: Id64String;\r\n /** The volume of geometry contained within the model.\r\n * This range will be null (@see [Range3d.isNull]($geometry)) if [[status]] is not [IModelStatus.Success]($bentley) or the model contains no geometry.\r\n */\r\n extents: Range3dProps;\r\n /** A status code indicating what if any error occurred obtaining the model's extents. For example:\r\n * - [IModelStatus.InvalidId]($bentley) if the input model Id was not a well-formed [Id64String]($bentley);\r\n * - [IModelStatus.NotFound]($bentley) if no model with the specified Id exists in the [[IModel]];\r\n * - [IModelStatus.WrongModel]($bentley) if the specified model is not a [GeometricModel]($backend); or\r\n * - [IModelStatus.Success]($bentley) if the extents were successfully obtained.\r\n *\r\n * If `status` is anything other than [IModelStatus.Success]($bentley), [[extents]] will be a null range.\r\n */\r\n status: IModelStatus;\r\n}\r\n\r\n/** The RPC interface for reading from an iModel.\r\n * All operations only require read-only access.\r\n * This interface is not normally used directly. See IModelConnection for higher-level and more convenient API for accessing iModels from a frontend.\r\n * @internal\r\n */\r\nexport abstract class IModelReadRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface); }\r\n\r\n /** Returns the IModelReadRpcInterface instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): IModelReadRpcInterface { return RpcManager.getClientForInterface(IModelReadRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelReadRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getConnectionProps(_iModelToken: IModelRpcOpenProps): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n public async queryRows(_iModelToken: IModelRpcProps, _request: DbQueryRequest): Promise<DbQueryResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async querySubCategories(_iModelToken: IModelRpcProps, _categoryIds: CompressedId64Set): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async queryAllUsedSpatialSubCategories(_iModelToken: IModelRpcProps): Promise<SubCategoryResultRow[]> { return this.forward(arguments); }\r\n public async queryBlob(_iModelToken: IModelRpcProps, _request: DbBlobRequest): Promise<DbBlobResponse> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getModelProps(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async queryModelRanges(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<Range3dProps[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async queryModelExtents(_iModelToken: IModelRpcProps, _modelIds: Id64String[]): Promise<ModelExtentsProps[]> { return this.forward(arguments); }\r\n public async queryModelProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ModelProps[]> { return this.forward(arguments); }\r\n public async getElementProps(_iModelToken: IModelRpcProps, _elementIds: Id64String[]): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryElementProps(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<ElementProps[]> { return this.forward(arguments); }\r\n public async queryEntityIds(_iModelToken: IModelRpcProps, _params: EntityQueryParams): Promise<Id64String[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getClassHierarchy(_iModelToken: IModelRpcProps, _startClassName: string): Promise<string[]> { return this.forward(arguments); }\r\n public async getAllCodeSpecs(_iModelToken: IModelRpcProps): Promise<any[]> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getViewStateData(_iModelToken: IModelRpcProps, _viewDefinitionId: string, _options?: ViewStateLoadProps): Promise<ViewStateProps> { return this.forward(arguments); }\r\n public async readFontJson(_iModelToken: IModelRpcProps): Promise<FontMapProps> { return this.forward(arguments); }\r\n public async getToolTipMessage(_iModelToken: IModelRpcProps, _elementId: string): Promise<string[]> { return this.forward(arguments); }\r\n /** @deprecated in 3.x use ViewStore apis. */\r\n public async getViewThumbnail(_iModelToken: IModelRpcProps, _viewId: string): Promise<Uint8Array> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getDefaultViewId(_iModelToken: IModelRpcProps): Promise<Id64String> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getCustomViewState3dData(_iModelToken: IModelRpcProps, _options: CustomViewState3dCreatorOptions): Promise<CustomViewState3dProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async hydrateViewState(_iModelToken: IModelRpcProps, _options: HydrateViewStateRequestProps): Promise<HydrateViewStateResponseProps> { return this.forward(arguments); }\r\n public async requestSnap(_iModelToken: IModelRpcProps, _sessionId: string, _props: SnapRequestProps): Promise<SnapResponseProps> { return this.forward(arguments); }\r\n public async cancelSnap(_iModelToken: IModelRpcProps, _sessionId: string): Promise<void> { return this.forward(arguments); }\r\n public async getGeometryContainment(_iModelToken: IModelRpcProps, _props: GeometryContainmentRequestProps): Promise<GeometryContainmentResponseProps> { return this.forward(arguments); }\r\n public async getMassProperties(_iModelToken: IModelRpcProps, _props: MassPropertiesRequestProps): Promise<MassPropertiesResponseProps> { return this.forward(arguments); }\r\n public async getMassPropertiesPerCandidate(_iModelToken: IModelRpcProps, _props: MassPropertiesPerCandidateRequestProps): Promise<MassPropertiesPerCandidateResponseProps[]> { return this.forward(arguments); }\r\n public async getIModelCoordinatesFromGeoCoordinates(_iModelToken: IModelRpcProps, _props: IModelCoordinatesRequestProps): Promise<IModelCoordinatesResponseProps> { return this.forward(arguments); }\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async getGeoCoordinatesFromIModelCoordinates(_iModelToken: IModelRpcProps, _props: GeoCoordinatesRequestProps): Promise<GeoCoordinatesResponseProps> { return this.forward(arguments); }\r\n public async getGeometrySummary(_iModelToken: IModelRpcProps, _props: GeometrySummaryRequestProps): Promise<string> { return this.forward(arguments); }\r\n public async queryTextureData(_iModelToken: IModelRpcProps, _textureLoadProps: TextureLoadProps): Promise<TextureData | undefined> { return this.forward(arguments); }\r\n public async loadElementProps(_iModelToken: IModelRpcProps, _elementIdentifier: Id64String | GuidString | CodeProps, _options?: ElementLoadOptions): Promise<ElementProps | undefined> {\r\n return this.forward(arguments);\r\n }\r\n public async generateElementMeshes(_iModelToken: IModelRpcProps, _props: ElementMeshRequestProps): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n /** @internal */\r\n public async callViewStore(_iModelToken: IModelRpcProps, _version: string, _forWrite: boolean, _methodName: string, ..._args: any[]): Promise<any> { return this.forward(arguments); }\r\n}\r\n"]}
@@ -71,6 +71,6 @@ IModelTileRpcInterface.interfaceName = "IModelTileRpcInterface";
71
71
  /** The semantic version of the interface. */
72
72
  IModelTileRpcInterface.interfaceVersion = "3.2.0";
73
73
  __decorate([
74
- RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation
74
+ RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)
75
75
  ], IModelTileRpcInterface.prototype, "requestTileTreeProps", null);
76
76
  //# sourceMappingURL=IModelTileRpcInterface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IModelTileRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelTileRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C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O,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;;AA5DD,2CAA2C;AACpB,oCAAa,GAAG,wBAAwB,CAAC;AAEhE,6CAA6C;AAC/B,uCAAgB,GAAG,OAAO,CAAC;AAkB5B;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,8CAA8C;kEACyB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport type { TransferConfig } from \"@itwin/object-storage-core/lib/common\";\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { ElementGraphicsRequestProps } from \"../tile/ElementGraphics\";\r\nimport { IModelTileTreeProps, TileContentIdentifier, TileContentSource, TileVersionInfo } from \"../TileProps\";\r\n\r\n/** @public */\r\nexport abstract class IModelTileRpcInterface extends RpcInterface { // eslint-disable-line deprecation/deprecation\r\n public static getClient(): IModelTileRpcInterface { return RpcManager.getClientForInterface(IModelTileRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelTileRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.2.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n /** Get storage config required to download tiles from the tile cache.\r\n * @returns undefined if the backend does not support caching. In that case, tiles must be requested using [[generateTileContent]].\r\n * @beta\r\n */\r\n public async getTileCacheConfig(_tokenProps: IModelRpcProps): Promise<TransferConfig | undefined> {\r\n const response = await this.forward(arguments);\r\n return response && { ...response, expiration: new Date(response.expiration) };\r\n }\r\n\r\n /** @internal */\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable) // eslint-disable-line deprecation/deprecation\r\n public async requestTileTreeProps(_tokenProps: IModelRpcProps, _id: string): Promise<IModelTileTreeProps> { return this.forward(arguments); }\r\n\r\n /** Ask the backend to generate content for the specified tile. This function, unlike the deprecated `requestTileContent`, does not check the cloud storage tile cache -\r\n * Use `CloudStorageTileCache.retrieve` for that.\r\n * @returns TileContentSource - if Backend, use retrieveTileContent. If ExternalCache, use TileAdmin.requestCachedTileContent\r\n * @internal\r\n */\r\n public async generateTileContent(_rpcProps: IModelRpcProps, _treeId: string, _contentId: string, _guid: string | undefined): Promise<TileContentSource> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** Retrieves tile content from the backend once it's generated by generateTileContent.\r\n * @internal\r\n */\r\n public async retrieveTileContent(_rpcProps: IModelRpcProps, _key: TileContentIdentifier): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @internal */\r\n public async queryVersionInfo(): Promise<TileVersionInfo> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** This is a temporary workaround for folks developing authoring applications, to be removed when proper support for such applications is introduced.\r\n * Given a set of model Ids, it purges any associated tile tree state on the back-end so that the next request for the tile tree or content will recreate that state.\r\n * Invoked after a modification is made to the model(s).\r\n * If no array of model Ids is supplied, it purges *all* tile trees, which can be quite inefficient.\r\n * @internal\r\n */\r\n public async purgeTileTrees(_tokenProps: IModelRpcProps, _modelIds: Id64Array | undefined): Promise<void> { return this.forward(arguments); }\r\n\r\n /** Requests graphics for a single element in \"iMdl\" format.\r\n * @returns graphics in iMdl format, or `undefined` if the element's geometry produced no graphics or the request was canceled before completion.\r\n * @throws IModelError on bad request (nonexistent element, duplicate request Id, etc).\r\n * @internal\r\n */\r\n public async requestElementGraphics(_rpcProps: IModelRpcProps, _request: ElementGraphicsRequestProps): Promise<Uint8Array | undefined> {\r\n return this.forward(arguments);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IModelTileRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/IModelTileRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,cAAc;AACd,MAAM,OAAgB,sBAAuB,SAAQ,YAAY;IACxD,MAAM,CAAC,SAAS,KAA6B,OAAO,UAAU,CAAC,qBAAqB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAQtH;;;iGAG6F;IAE7F;;;OAGG;IACI,KAAK,CAAC,kBAAkB,CAAC,WAA2B;QACzD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC/C,OAAO,QAAQ,IAAI,EAAE,GAAG,QAAQ,EAAE,UAAU,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;IAChF,CAAC;IAED,gBAAgB;IAEH,AAAN,KAAK,CAAC,oBAAoB,CAAC,WAA2B,EAAE,GAAW,IAAkC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE7I;;;;OAIG;IACI,KAAK,CAAC,mBAAmB,CAAC,SAAyB,EAAE,OAAe,EAAE,UAAkB,EAAE,KAAyB;QACxH,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,mBAAmB,CAAC,SAAyB,EAAE,IAA2B;QACrF,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,gBAAgB;IACT,KAAK,CAAC,gBAAgB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,cAAc,CAAC,WAA2B,EAAE,SAAgC,IAAmB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE7I;;;;OAIG;IACI,KAAK,CAAC,sBAAsB,CAAC,SAAyB,EAAE,QAAqC;QAClG,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;;AA5DD,2CAA2C;AACpB,oCAAa,GAAG,wBAAwB,CAAC;AAEhE,6CAA6C;AAC/B,uCAAgB,GAAG,OAAO,CAAC;AAkB5B;IADZ,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,CAAC;kEACwE","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport type { TransferConfig } from \"@itwin/object-storage-core/lib/common\";\r\nimport { Id64Array } from \"@itwin/core-bentley\";\r\nimport { RpcResponseCacheControl } from \"./core/RpcConstants\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { ElementGraphicsRequestProps } from \"../tile/ElementGraphics\";\r\nimport { IModelTileTreeProps, TileContentIdentifier, TileContentSource, TileVersionInfo } from \"../TileProps\";\r\n\r\n/** @public */\r\nexport abstract class IModelTileRpcInterface extends RpcInterface {\r\n public static getClient(): IModelTileRpcInterface { return RpcManager.getClientForInterface(IModelTileRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"IModelTileRpcInterface\";\r\n\r\n /** The semantic version of the interface. */\r\n public static interfaceVersion = \"3.2.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n /** Get storage config required to download tiles from the tile cache.\r\n * @returns undefined if the backend does not support caching. In that case, tiles must be requested using [[generateTileContent]].\r\n * @beta\r\n */\r\n public async getTileCacheConfig(_tokenProps: IModelRpcProps): Promise<TransferConfig | undefined> {\r\n const response = await this.forward(arguments);\r\n return response && { ...response, expiration: new Date(response.expiration) };\r\n }\r\n\r\n /** @internal */\r\n @RpcOperation.allowResponseCaching(RpcResponseCacheControl.Immutable)\r\n public async requestTileTreeProps(_tokenProps: IModelRpcProps, _id: string): Promise<IModelTileTreeProps> { return this.forward(arguments); }\r\n\r\n /** Ask the backend to generate content for the specified tile. This function, unlike the deprecated `requestTileContent`, does not check the cloud storage tile cache -\r\n * Use `CloudStorageTileCache.retrieve` for that.\r\n * @returns TileContentSource - if Backend, use retrieveTileContent. If ExternalCache, use TileAdmin.requestCachedTileContent\r\n * @internal\r\n */\r\n public async generateTileContent(_rpcProps: IModelRpcProps, _treeId: string, _contentId: string, _guid: string | undefined): Promise<TileContentSource> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** Retrieves tile content from the backend once it's generated by generateTileContent.\r\n * @internal\r\n */\r\n public async retrieveTileContent(_rpcProps: IModelRpcProps, _key: TileContentIdentifier): Promise<Uint8Array> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** @internal */\r\n public async queryVersionInfo(): Promise<TileVersionInfo> {\r\n return this.forward(arguments);\r\n }\r\n\r\n /** This is a temporary workaround for folks developing authoring applications, to be removed when proper support for such applications is introduced.\r\n * Given a set of model Ids, it purges any associated tile tree state on the back-end so that the next request for the tile tree or content will recreate that state.\r\n * Invoked after a modification is made to the model(s).\r\n * If no array of model Ids is supplied, it purges *all* tile trees, which can be quite inefficient.\r\n * @internal\r\n */\r\n public async purgeTileTrees(_tokenProps: IModelRpcProps, _modelIds: Id64Array | undefined): Promise<void> { return this.forward(arguments); }\r\n\r\n /** Requests graphics for a single element in \"iMdl\" format.\r\n * @returns graphics in iMdl format, or `undefined` if the element's geometry produced no graphics or the request was canceled before completion.\r\n * @throws IModelError on bad request (nonexistent element, duplicate request Id, etc).\r\n * @internal\r\n */\r\n public async requestElementGraphics(_rpcProps: IModelRpcProps, _request: ElementGraphicsRequestProps): Promise<Uint8Array | undefined> {\r\n return this.forward(arguments);\r\n }\r\n}\r\n"]}
@@ -18,6 +18,9 @@ export declare abstract class SnapshotIModelRpcInterface extends RpcInterface {
18
18
  /** The version of the interface. */
19
19
  static interfaceVersion: string;
20
20
  openFile(_filePath: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps>;
21
+ /**
22
+ * @deprecated in 4.10. Use [[CheckpointConnection.openRemote]].
23
+ */
21
24
  openRemote(_key: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps>;
22
25
  close(_iModelRpcProps: IModelRpcProps): Promise<boolean>;
23
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SnapshotIModelRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/rpc/SnapshotIModelRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD;;;GAGG;AACH,8BAAsB,0BAA2B,SAAQ,YAAY;IACnE,+EAA+E;WACjE,SAAS,IAAI,0BAA0B;IAErD,qGAAqG;WACvF,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,0BAA0B;IAErF,2CAA2C;IAC3C,gBAAuB,aAAa,gCAAgC;IAEpE,oCAAoC;IACpC,OAAc,gBAAgB,SAAW;IAQ5B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAGxF,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAErF,KAAK,CAAC,eAAe,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;CACtE"}
1
+ {"version":3,"file":"SnapshotIModelRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/rpc/SnapshotIModelRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD;;;GAGG;AACH,8BAAsB,0BAA2B,SAAQ,YAAY;IACnE,+EAA+E;WACjE,SAAS,IAAI,0BAA0B;IAErD,qGAAqG;WACvF,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,0BAA0B;IAErF,2CAA2C;IAC3C,gBAAuB,aAAa,gCAAgC;IAEpE,oCAAoC;IACpC,OAAc,gBAAgB,SAAW;IAQ5B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAErG;;OAEG;IAEU,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAErF,KAAK,CAAC,eAAe,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;CACtE"}
@@ -29,6 +29,9 @@ export class SnapshotIModelRpcInterface extends RpcInterface {
29
29
  NOTE: Please consult the README in this folder for the semantic versioning rules.
30
30
  ===========================================================================================*/
31
31
  async openFile(_filePath, _opts) { return this.forward(arguments); }
32
+ /**
33
+ * @deprecated in 4.10. Use [[CheckpointConnection.openRemote]].
34
+ */
32
35
  async openRemote(_key, _opts) { return this.forward(arguments); }
33
36
  async close(_iModelRpcProps) { return this.forward(arguments); }
34
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SnapshotIModelRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/SnapshotIModelRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,MAAM,eAAe,GAA8B,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhH;;;GAGG;AACH,MAAM,OAAgB,0BAA2B,SAAQ,YAAY;IACnE,+EAA+E;IACxE,MAAM,CAAC,SAAS,KAAiC,OAAO,UAAU,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAE9H,qGAAqG;IAC9F,MAAM,CAAC,mBAAmB,CAAC,KAAsB,IAAgC,OAAO,UAAU,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAQrK;;;iGAG6F;IAGhF,AAAN,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAG5H,AAAN,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE/H,KAAK,CAAC,KAAK,CAAC,eAA+B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AAjBzG,2CAA2C;AACpB,wCAAa,GAAG,4BAA4B,CAAC;AAEpE,oCAAoC;AACtB,2CAAgB,GAAG,OAAO,CAAC;AAQ5B;IADZ,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC;0DAC2F;AAG5H;IADZ,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC;4DACwF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { IModelConnectionProps, IModelRpcProps, SnapshotOpenOptions } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRequestTokenSupplier_T } from \"./core/RpcRequest\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\nconst unknownIModelId: RpcRequestTokenSupplier_T = (req) => ({ iModelId: \"undefined\", key: req.parameters[0] });\r\n\r\n/** The RPC interface for working with *snapshot* iModels.\r\n * This interface is intended for desktop and mobile products. Web products are discouraged from registering this interface.\r\n * @internal\r\n */\r\nexport abstract class SnapshotIModelRpcInterface extends RpcInterface { // eslint-disable-line deprecation/deprecation\r\n /** Returns the SnapshotIModelRpcInterface client instance for the frontend. */\r\n public static getClient(): SnapshotIModelRpcInterface { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface); }\r\n\r\n /** Returns the SnapshotIModelRpcInterface client instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): SnapshotIModelRpcInterface { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"SnapshotIModelRpcInterface\";\r\n\r\n /** The version of the interface. */\r\n public static interfaceVersion = \"2.0.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n @RpcOperation.setRoutingProps(unknownIModelId)\r\n public async openFile(_filePath: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n\r\n @RpcOperation.setRoutingProps(unknownIModelId)\r\n public async openRemote(_key: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n\r\n public async close(_iModelRpcProps: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n}\r\n"]}
1
+ {"version":3,"file":"SnapshotIModelRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/SnapshotIModelRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,MAAM,eAAe,GAA8B,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEhH;;;GAGG;AACH,MAAM,OAAgB,0BAA2B,SAAQ,YAAY;IACnE,+EAA+E;IACxE,MAAM,CAAC,SAAS,KAAiC,OAAO,UAAU,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAE9H,qGAAqG;IAC9F,MAAM,CAAC,mBAAmB,CAAC,KAAsB,IAAgC,OAAO,UAAU,CAAC,qBAAqB,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;IAQrK;;;iGAG6F;IAGhF,AAAN,KAAK,CAAC,QAAQ,CAAC,SAAiB,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEzI;;OAEG;IAEU,AAAN,KAAK,CAAC,UAAU,CAAC,IAAY,EAAE,KAA2B,IAAoC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAE/H,KAAK,CAAC,KAAK,CAAC,eAA+B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AApBzG,2CAA2C;AACpB,wCAAa,GAAG,4BAA4B,CAAC;AAEpE,oCAAoC;AACtB,2CAAgB,GAAG,OAAO,CAAC;AAQ5B;IADZ,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC;0DAC2F;AAM5H;IADZ,YAAY,CAAC,eAAe,CAAC,eAAe,CAAC;4DACwF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { IModelConnectionProps, IModelRpcProps, SnapshotOpenOptions } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\nimport { RpcOperation } from \"./core/RpcOperation\";\r\nimport { RpcRequestTokenSupplier_T } from \"./core/RpcRequest\";\r\nimport { RpcRoutingToken } from \"./core/RpcRoutingToken\";\r\n\r\nconst unknownIModelId: RpcRequestTokenSupplier_T = (req) => ({ iModelId: \"undefined\", key: req.parameters[0] });\r\n\r\n/** The RPC interface for working with *snapshot* iModels.\r\n * This interface is intended for desktop and mobile products. Web products are discouraged from registering this interface.\r\n * @internal\r\n */\r\nexport abstract class SnapshotIModelRpcInterface extends RpcInterface {\r\n /** Returns the SnapshotIModelRpcInterface client instance for the frontend. */\r\n public static getClient(): SnapshotIModelRpcInterface { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface); }\r\n\r\n /** Returns the SnapshotIModelRpcInterface client instance for a custom RPC routing configuration. */\r\n public static getClientForRouting(token: RpcRoutingToken): SnapshotIModelRpcInterface { return RpcManager.getClientForInterface(SnapshotIModelRpcInterface, token); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"SnapshotIModelRpcInterface\";\r\n\r\n /** The version of the interface. */\r\n public static interfaceVersion = \"2.0.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ===========================================================================================*/\r\n\r\n @RpcOperation.setRoutingProps(unknownIModelId)\r\n public async openFile(_filePath: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n\r\n /**\r\n * @deprecated in 4.10. Use [[CheckpointConnection.openRemote]].\r\n */\r\n @RpcOperation.setRoutingProps(unknownIModelId)\r\n public async openRemote(_key: string, _opts?: SnapshotOpenOptions): Promise<IModelConnectionProps> { return this.forward(arguments); }\r\n\r\n public async close(_iModelRpcProps: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TestRpcManager.d.ts","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAKzD;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAc;WACX,UAAU,CAAC,UAAU,EAAE,sBAAsB,EAAE;CAW9D"}
1
+ {"version":3,"file":"TestRpcManager.d.ts","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAc;WACX,UAAU,CAAC,UAAU,EAAE,sBAAsB,EAAE;CAW9D"}
@@ -6,7 +6,6 @@
6
6
  * @module RpcInterface
7
7
  */
8
8
  import { RpcConfiguration, RpcDefaultConfiguration } from "./core/RpcConfiguration";
9
- /* eslint-disable deprecation/deprecation */
10
9
  /** An RpcManager that uses RpcDefaultConfiguration/RpcDirectProtocol to make client stubs invoke
11
10
  * registered server impls as direct method calls within the same JavaScript context. In other words,
12
11
  * TestRpcManager sets up a protocol that uses our remoting mechanism but cuts out the communication
@@ -1 +1 @@
1
- {"version":3,"file":"TestRpcManager.js","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEpF,4CAA4C;AAE5C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,cAAc;IAClB,MAAM,CAAC,UAAU,CAAC,UAAoC;QAC3D,MAAM,MAAM,GAAG,KAAM,SAAQ,uBAAuB;YAArC;;gBACG,eAAU,GAAQ,GAAG,EAAE,CAAC,UAAU,CAAC;YACrD,CAAC;SAAA,CAAC;QAEF,KAAK,MAAM,GAAG,IAAI,UAAU;YAC1B,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAC;QAE9D,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACjD,gBAAgB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { RpcInterfaceDefinition } from \"../RpcInterface\";\r\nimport { RpcConfiguration, RpcDefaultConfiguration } from \"./core/RpcConfiguration\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** An RpcManager that uses RpcDefaultConfiguration/RpcDirectProtocol to make client stubs invoke\r\n * registered server impls as direct method calls within the same JavaScript context. In other words,\r\n * TestRpcManager sets up a protocol that uses our remoting mechanism but cuts out the communication\r\n * part of it. (No IPC or XHR is used or required.)\r\n * Nevertheless, all of the rest of the call marshalling and operation monitoring mechanism is used.\r\n * That makes TestRpcManager a way to write simple, single-process integration tests for frontends\r\n * and backends that actually use RpcInterfaces. Note that to write such a single-process integration\r\n * test, you must make *both* client and server use TestRpcManager to configure their RpcInterfaces.\r\n * It will not work if one side uses TestRpcManager and the other uses some other protocol (say, cloud).\r\n * That means that you must actually program the backend to know when it is running in direct test\r\n * mode and to employ TestRpcManager in that case.\r\n * @internal\r\n */\r\nexport class TestRpcManager {\r\n public static initialize(interfaces: RpcInterfaceDefinition[]) {\r\n const config = class extends RpcDefaultConfiguration {\r\n public override interfaces: any = () => interfaces;\r\n };\r\n\r\n for (const def of interfaces)\r\n RpcConfiguration.assign(def, () => RpcDefaultConfiguration);\r\n\r\n const instance = RpcConfiguration.obtain(config);\r\n RpcConfiguration.initializeInterfaces(instance);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"TestRpcManager.js","sourceRoot":"","sources":["../../../src/rpc/TestRpcManager.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEpF;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,cAAc;IAClB,MAAM,CAAC,UAAU,CAAC,UAAoC;QAC3D,MAAM,MAAM,GAAG,KAAM,SAAQ,uBAAuB;YAArC;;gBACG,eAAU,GAAQ,GAAG,EAAE,CAAC,UAAU,CAAC;YACrD,CAAC;SAAA,CAAC;QAEF,KAAK,MAAM,GAAG,IAAI,UAAU;YAC1B,gBAAgB,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAC;QAE9D,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACjD,gBAAgB,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { RpcInterfaceDefinition } from \"../RpcInterface\";\r\nimport { RpcConfiguration, RpcDefaultConfiguration } from \"./core/RpcConfiguration\";\r\n\r\n/** An RpcManager that uses RpcDefaultConfiguration/RpcDirectProtocol to make client stubs invoke\r\n * registered server impls as direct method calls within the same JavaScript context. In other words,\r\n * TestRpcManager sets up a protocol that uses our remoting mechanism but cuts out the communication\r\n * part of it. (No IPC or XHR is used or required.)\r\n * Nevertheless, all of the rest of the call marshalling and operation monitoring mechanism is used.\r\n * That makes TestRpcManager a way to write simple, single-process integration tests for frontends\r\n * and backends that actually use RpcInterfaces. Note that to write such a single-process integration\r\n * test, you must make *both* client and server use TestRpcManager to configure their RpcInterfaces.\r\n * It will not work if one side uses TestRpcManager and the other uses some other protocol (say, cloud).\r\n * That means that you must actually program the backend to know when it is running in direct test\r\n * mode and to employ TestRpcManager in that case.\r\n * @internal\r\n */\r\nexport class TestRpcManager {\r\n public static initialize(interfaces: RpcInterfaceDefinition[]) {\r\n const config = class extends RpcDefaultConfiguration {\r\n public override interfaces: any = () => interfaces;\r\n };\r\n\r\n for (const def of interfaces)\r\n RpcConfiguration.assign(def, () => RpcDefaultConfiguration);\r\n\r\n const instance = RpcConfiguration.obtain(config);\r\n RpcConfiguration.initializeInterfaces(instance);\r\n }\r\n}\r\n"]}
@@ -11,6 +11,7 @@ import { RpcInterface } from "../RpcInterface";
11
11
  * Once stable, the goal is to move methods out to their rightful home.
12
12
  * Apps/services should understand the *flux* implied by registering this RpcInterface and should be in control of both the client and server before even considering using it.
13
13
  * @internal
14
+ * @deprecated in 4.10. If any of these methods are needed in the frontend, they should be rewritten using IPC or HTTP protocol.
14
15
  */
15
16
  export declare abstract class WipRpcInterface extends RpcInterface {
16
17
  /** Returns the IModelReadRpcInterface instance for the frontend. */
@@ -1 +1 @@
1
- {"version":3,"file":"WipRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/rpc/WipRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;;;;;GAOG;AACH,8BAAsB,eAAgB,SAAQ,YAAY;IACxD,oEAAoE;WACtD,SAAS,IAAI,eAAe;IAE1C,2CAA2C;IAC3C,gBAAuB,aAAa,qBAAqB;IAEzD;;OAEG;IACH,OAAc,gBAAgB,SAAW;IAM5B,WAAW,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAC1D,qBAAqB,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IACrE,iBAAiB,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAC9D,kBAAkB,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAC1I,oBAAoB,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CACxG"}
1
+ {"version":3,"file":"WipRpcInterface.d.ts","sourceRoot":"","sources":["../../../src/rpc/WipRpcInterface.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;;;;;;GAQG;AACH,8BAAsB,eAAgB,SAAQ,YAAY;IACxD,oEAAoE;WACtD,SAAS,IAAI,eAAe;IAE1C,2CAA2C;IAC3C,gBAAuB,aAAa,qBAAqB;IAEzD;;OAEG;IACH,OAAc,gBAAgB,SAAW;IAM5B,WAAW,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAC1D,qBAAqB,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IACrE,iBAAiB,CAAC,YAAY,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAC9D,kBAAkB,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAC1I,oBAAoB,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CACxG"}
@@ -14,10 +14,11 @@ import { RpcManager } from "../RpcManager";
14
14
  * Once stable, the goal is to move methods out to their rightful home.
15
15
  * Apps/services should understand the *flux* implied by registering this RpcInterface and should be in control of both the client and server before even considering using it.
16
16
  * @internal
17
+ * @deprecated in 4.10. If any of these methods are needed in the frontend, they should be rewritten using IPC or HTTP protocol.
17
18
  */
18
19
  export class WipRpcInterface extends RpcInterface {
19
20
  /** Returns the IModelReadRpcInterface instance for the frontend. */
20
- static getClient() { return RpcManager.getClientForInterface(WipRpcInterface); }
21
+ static getClient() { return RpcManager.getClientForInterface(WipRpcInterface); } // eslint-disable-line @typescript-eslint/no-deprecated
21
22
  /*===========================================================================================
22
23
  NOTE: Any add/remove/change to the methods below requires an update of the interface version.
23
24
  NOTE: Please consult the README in this folder for the semantic versioning rules.
@@ -1 +1 @@
1
- {"version":3,"file":"WipRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/WipRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;GAOG;AACH,MAAM,OAAgB,eAAgB,SAAQ,YAAY;IACxD,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAAsB,OAAO,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAUxG;;;gGAG4F;IACrF,KAAK,CAAC,WAAW,CAAC,YAA4B,IAAqB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,2DAA2D;IAChK,KAAK,CAAC,qBAAqB,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/G,KAAK,CAAC,iBAAiB,CAAC,YAA4B,IAAmB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACxG,KAAK,CAAC,kBAAkB,CAAC,YAA4B,EAAE,iBAAyB,EAAE,eAAuB,IAA0C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpL,KAAK,CAAC,oBAAoB,CAAC,YAA4B,EAAE,YAAoB,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AAhB3I,2CAA2C;AACpB,6BAAa,GAAG,iBAAiB,CAAC;AAEzD;;GAEG;AACW,gCAAgB,GAAG,OAAO,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { ChangedElements } from \"../ChangedElements\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** The purpose of this class is to house WIP RPC methods. For example:\r\n * - WIP methods where signatures or behavior is still changing\r\n * - Experimental methods that we may decide are a bad idea and never release\r\n * The idea is to house these WIP RPC methods away from other RpcInterfaces that have stated compatibility goals.\r\n * Once stable, the goal is to move methods out to their rightful home.\r\n * Apps/services should understand the *flux* implied by registering this RpcInterface and should be in control of both the client and server before even considering using it.\r\n * @internal\r\n */\r\nexport abstract class WipRpcInterface extends RpcInterface { // eslint-disable-line deprecation/deprecation\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): WipRpcInterface { return RpcManager.getClientForInterface(WipRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"WipRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The WipRpcInterface will never progress to 1.0 since it is never intended to be public.\r\n */\r\n public static interfaceVersion = \"0.5.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n public async placeholder(_iModelToken: IModelRpcProps): Promise<string> { return this.forward(arguments); } // here to test that WipRpcInterface is configured properly\r\n public async isChangeCacheAttached(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n public async attachChangeCache(_iModelToken: IModelRpcProps): Promise<void> { return this.forward(arguments); }\r\n public async getChangedElements(_iModelToken: IModelRpcProps, _startChangesetId: string, _endChangesetId: string): Promise<ChangedElements | undefined> { return this.forward(arguments); }\r\n public async isChangesetProcessed(_iModelToken: IModelRpcProps, _changesetId: string): Promise<boolean> { return this.forward(arguments); }\r\n}\r\n"]}
1
+ {"version":3,"file":"WipRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/WipRpcInterface.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,OAAgB,eAAgB,SAAQ,YAAY;IACxD,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAAsB,OAAO,UAAU,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,uDAAuD;IAUhK;;;gGAG4F;IACrF,KAAK,CAAC,WAAW,CAAC,YAA4B,IAAqB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,2DAA2D;IAChK,KAAK,CAAC,qBAAqB,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/G,KAAK,CAAC,iBAAiB,CAAC,YAA4B,IAAmB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACxG,KAAK,CAAC,kBAAkB,CAAC,YAA4B,EAAE,iBAAyB,EAAE,eAAuB,IAA0C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpL,KAAK,CAAC,oBAAoB,CAAC,YAA4B,EAAE,YAAoB,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AAhB3I,2CAA2C;AACpB,6BAAa,GAAG,iBAAiB,CAAC;AAEzD;;GAEG;AACW,gCAAgB,GAAG,OAAO,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { ChangedElements } from \"../ChangedElements\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** The purpose of this class is to house WIP RPC methods. For example:\r\n * - WIP methods where signatures or behavior is still changing\r\n * - Experimental methods that we may decide are a bad idea and never release\r\n * The idea is to house these WIP RPC methods away from other RpcInterfaces that have stated compatibility goals.\r\n * Once stable, the goal is to move methods out to their rightful home.\r\n * Apps/services should understand the *flux* implied by registering this RpcInterface and should be in control of both the client and server before even considering using it.\r\n * @internal\r\n * @deprecated in 4.10. If any of these methods are needed in the frontend, they should be rewritten using IPC or HTTP protocol.\r\n */\r\nexport abstract class WipRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): WipRpcInterface { return RpcManager.getClientForInterface(WipRpcInterface); } // eslint-disable-line @typescript-eslint/no-deprecated\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"WipRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The WipRpcInterface will never progress to 1.0 since it is never intended to be public.\r\n */\r\n public static interfaceVersion = \"0.5.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n public async placeholder(_iModelToken: IModelRpcProps): Promise<string> { return this.forward(arguments); } // here to test that WipRpcInterface is configured properly\r\n public async isChangeCacheAttached(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n public async attachChangeCache(_iModelToken: IModelRpcProps): Promise<void> { return this.forward(arguments); }\r\n public async getChangedElements(_iModelToken: IModelRpcProps, _startChangesetId: string, _endChangesetId: string): Promise<ChangedElements | undefined> { return this.forward(arguments); }\r\n public async isChangesetProcessed(_iModelToken: IModelRpcProps, _changesetId: string): Promise<boolean> { return this.forward(arguments); }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RpcConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConfiguration.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,gBAAgB;AAChB,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,KAAK;IAAE,QAAO,gBAAgB,CAAA;CAAE,CAAC;AAElG,gBAAgB;AAChB,MAAM,WAAW,aAAc,SAAQ,wBAAwB;IAAG,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAA;CAAE;AAEzH,gBAAgB;AAChB,yBAAiB,aAAa,CAAC;IAC7B,SAAgB,MAAM,IAAI,aAAa,CAGtC;CACF;AAED;;;GAGG;AACH,8BAAsB,gBAAgB;IACpC;;OAEG;IACH,OAAc,eAAe,EAAE,OAAO,CAAS;IAE/C,iGAAiG;IACjG,OAAc,wBAAwB,EAAE,OAAO,CAAS;IAExD;;;OAGG;IACH,OAAc,UAAU,EAAE,OAAO,CAAS;IAE1C;;;;OAIG;IACH,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M,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;cAItC,IAAI;CAGrB"}
@@ -171,7 +171,7 @@ export class RpcDirectRequest extends RpcRequest {
171
171
  resolve(this.fulfillment.status);
172
172
  }
173
173
  catch (err) {
174
- reject(err);
174
+ reject(err); // eslint-disable-line @typescript-eslint/prefer-promise-reject-errors
175
175
  }
176
176
  });
177
177
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RpcConfiguration.js","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConfiguration.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAUpD,gBAAgB;AAChB,MAAM,KAAW,aAAa,CAK7B;AALD,WAAiB,aAAa;IAC5B,SAAgB,MAAM;QACpB,MAAM,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,OAAyB,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,OAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IAC7G,CAAC;IAHe,oBAAM,SAGrB,CAAA;AACH,CAAC,EALgB,aAAa,KAAb,aAAa,QAK7B;AAED;;;GAGG;AACH,MAAM,OAAgB,gBAAgB;IAAtC;QAuEE,gBAAgB;QACT,aAAQ,GAA6B,EAAE,CAAC;QAU/C,gBAAgB;QACT,4BAAuB,GAAY,IAAI,CAAC;QAK/C,4GAA4G;QACrG,kCAA6B,GAAG,KAAK,CAAC;QAE7C,+EAA+E;QACxE,wBAAmB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------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\nimport { RpcInterface, RpcInterfaceDefinition } from \"../../RpcInterface\";\r\nimport { RpcManager } from \"../../RpcManager\";\r\nimport { RpcControlChannel } from \"./RpcControl\";\r\nimport { SerializedRpcActivity } from \"./RpcInvocation\";\r\nimport { RpcProtocol, RpcRequestFulfillment } from \"./RpcProtocol\";\r\nimport { INSTANCE } from \"./RpcRegistry\";\r\nimport { RpcRequest } from \"./RpcRequest\";\r\nimport { RpcRequestContext } from \"./RpcRequestContext\";\r\nimport { RpcRoutingToken } from \"./RpcRoutingToken\";\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** @internal */\r\nexport type RpcConfigurationSupplier = (routing?: RpcRoutingToken) => { new(): RpcConfiguration }; // eslint-disable-line @typescript-eslint/prefer-function-type\r\n\r\n/** @internal */\r\nexport interface RpcRoutingMap extends RpcConfigurationSupplier { configurations: Map<number, RpcConfigurationSupplier> }\r\n\r\n/** @internal */\r\nexport namespace RpcRoutingMap {\r\n export function create(): RpcRoutingMap {\r\n const configurations = new Map();\r\n return Object.assign((routing?: RpcRoutingToken) => configurations.get(routing!.id)(), { configurations });\r\n }\r\n}\r\n\r\n/** A RpcConfiguration specifies how calls on an RPC interface will be marshalled, plus other operating parameters.\r\n * RpcConfiguration is the base class for specific configurations.\r\n * @beta\r\n */\r\nexport abstract class RpcConfiguration {\r\n /** Whether development mode is enabled.\r\n * @note This parameter determines whether developer convenience features like backend stack traces are available.\r\n */\r\n public static developmentMode: boolean = false;\r\n\r\n /** Whether frontend checks that are relevant in a cloud-hosted routing scenario are disabled. */\r\n public static disableRoutingValidation: boolean = false;\r\n\r\n /** Whether strict mode is enabled.\r\n * This parameter determines system behaviors relating to strict checking:\r\n * - Whether an error is thrown if the type marshaling system encounters an unregistered type (only in strict mode).\r\n */\r\n public static strictMode: boolean = false;\r\n\r\n /**\r\n * Whether to throw an error when the IModelRpcProps in the operation parameter list differs from the token in the URL.\r\n * @note By default, a warning is logged and the operation is allowed to proceed.\r\n * @note The parameter token is always replaced by the url token (unless RpcOperationPolicy.allowTokenMismatch is set).\r\n */\r\n public static throwOnTokenMismatch = false;\r\n\r\n /** @internal Sets the configuration supplier for an RPC interface class. */\r\n public static assign<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>, supplier: RpcConfigurationSupplier): void {\r\n const map = definition.prototype.configurationSupplier as RpcRoutingMap | undefined;\r\n if (!map || typeof (map.configurations) === \"undefined\") {\r\n definition.prototype.configurationSupplier = supplier;\r\n } else {\r\n map.configurations.set(RpcRoutingToken.default.id, supplier);\r\n }\r\n }\r\n\r\n /** Sets the configuration supplier for an RPC interface class for a given routing. */\r\n public static assignWithRouting<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>, routing: RpcRoutingToken, configuration: new () => RpcConfiguration): void {\r\n if (!definition.prototype.configurationSupplier) {\r\n RpcConfiguration.assign(definition, RpcRoutingMap.create());\r\n }\r\n\r\n let map = definition.prototype.configurationSupplier as RpcRoutingMap;\r\n if (typeof (map.configurations) === \"undefined\") {\r\n const existing = map as RpcConfigurationSupplier;\r\n map = RpcRoutingMap.create();\r\n RpcConfiguration.assign(definition, map);\r\n map.configurations.set(RpcRoutingToken.default.id, existing);\r\n }\r\n\r\n const supplier = () => configuration;\r\n map.configurations.set(routing.id, supplier);\r\n }\r\n\r\n /** Obtains the instance of an RPC configuration class. */\r\n public static obtain<T extends RpcConfiguration>(configurationConstructor: new () => T): T {\r\n let instance = (configurationConstructor as any)[INSTANCE] as T;\r\n if (!instance)\r\n instance = (configurationConstructor as any)[INSTANCE] = new configurationConstructor();\r\n\r\n return instance;\r\n }\r\n\r\n /** @internal Enables passing of application-specific context with each RPC request. */\r\n public static requestContext: RpcRequestContext = {\r\n getId: (_request: RpcRequest): string => \"\",\r\n serialize: async (request: RpcRequest): Promise<SerializedRpcActivity> => ({\r\n id: request.id,\r\n applicationId: \"\",\r\n applicationVersion: \"\",\r\n sessionId: \"\",\r\n authorization: \"\",\r\n }),\r\n };\r\n\r\n /** @internal */\r\n public attached: RpcInterfaceDefinition[] = [];\r\n\r\n /** The protocol of the configuration.\r\n * @internal\r\n */\r\n public abstract readonly protocol: RpcProtocol;\r\n\r\n /** The RPC interfaces managed by the configuration. */\r\n public abstract readonly interfaces: () => RpcInterfaceDefinition[];\r\n\r\n /** @internal */\r\n public allowAttachedInterfaces: boolean = true;\r\n\r\n /** @internal */\r\n public get attachedInterfaces(): ReadonlyArray<RpcInterfaceDefinition> { return this.attached; }\r\n\r\n /** The target interval (in milliseconds) between connection attempts for pending RPC operation requests. */\r\n public pendingOperationRetryInterval = 10000;\r\n\r\n /** The maximum number of transient faults permitted before request failure. */\r\n public transientFaultLimit = 4;\r\n\r\n /** @internal */\r\n public readonly routing: RpcRoutingToken = RpcRoutingToken.default;\r\n\r\n /** The control channel for the configuration.\r\n * @internal\r\n */\r\n public readonly controlChannel = RpcControlChannel.obtain(this);\r\n\r\n /** @internal */\r\n public attach<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>): void {\r\n if (!this.allowAttachedInterfaces) {\r\n return;\r\n }\r\n\r\n if (this.interfaces().indexOf(definition) !== -1 || this.attached.indexOf(definition) !== -1) {\r\n return;\r\n }\r\n\r\n this.attached.push(definition);\r\n RpcConfiguration.assign(definition, () => this.constructor as any);\r\n RpcManager.initializeInterface(definition);\r\n }\r\n\r\n /** Initializes the RPC interfaces managed by the configuration. */\r\n public static initializeInterfaces(configuration: RpcConfiguration) {\r\n configuration.interfaces().forEach((definition) => RpcManager.initializeInterface(definition));\r\n }\r\n\r\n /** @internal */\r\n public static supply(definition: RpcInterface): RpcConfiguration {\r\n return RpcConfiguration.obtain(definition.configurationSupplier ? definition.configurationSupplier(definition.routing) : RpcDefaultConfiguration);\r\n }\r\n\r\n /** @internal */\r\n public onRpcClientInitialized(definition: RpcInterfaceDefinition, client: RpcInterface): void {\r\n this.protocol.onRpcClientInitialized(definition, client);\r\n }\r\n\r\n /** @internal */\r\n public onRpcImplInitialized(definition: RpcInterfaceDefinition, impl: RpcInterface): void {\r\n this.protocol.onRpcImplInitialized(definition, impl);\r\n }\r\n\r\n /** @internal */\r\n public onRpcClientTerminated(definition: RpcInterfaceDefinition, client: RpcInterface): void {\r\n this.protocol.onRpcClientTerminated(definition, client);\r\n }\r\n\r\n /** @internal */\r\n public onRpcImplTerminated(definition: RpcInterfaceDefinition, impl: RpcInterface): void {\r\n this.protocol.onRpcImplTerminated(definition, impl);\r\n }\r\n}\r\n\r\n/** A default configuration that can be used for basic testing within a library.\r\n * @internal\r\n */\r\nexport class RpcDefaultConfiguration extends RpcConfiguration {\r\n public interfaces = () => [];\r\n public protocol: RpcProtocol = new RpcDirectProtocol(this);\r\n}\r\n\r\n/** A default protocol that can be used for basic testing within a library.\r\n * @internal\r\n */\r\nexport class RpcDirectProtocol extends RpcProtocol {\r\n public readonly requestType = RpcDirectRequest;\r\n}\r\n\r\n/** A default request type that can be used for basic testing within a library.\r\n * @internal\r\n */\r\nexport class RpcDirectRequest extends RpcRequest {\r\n public headers: Map<string, string> = new Map();\r\n public fulfillment: RpcRequestFulfillment | undefined = undefined;\r\n\r\n protected async send() {\r\n const request = await this.protocol.serialize(this);\r\n return new Promise<number>(async (resolve, reject) => {\r\n try {\r\n this.fulfillment = await this.protocol.fulfill(request);\r\n resolve(this.fulfillment.status);\r\n } catch (err) {\r\n reject(err);\r\n }\r\n });\r\n }\r\n\r\n protected setHeader(name: string, value: string): void {\r\n this.headers.set(name, value);\r\n }\r\n\r\n protected async load() {\r\n return this.fulfillment!.result;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"RpcConfiguration.js","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConfiguration.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,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,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QACS,YAAO,GAAwB,IAAI,GAAG,EAAE,CAAC;QACzC,gBAAW,GAAsC,SAAS,CAAC;IAqBpE,CAAC;IAnBW,KAAK,CAAC,IAAI;QAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpD,OAAO,IAAI,OAAO,CAAS,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YACnD,IAAI,CAAC;gBACH,IAAI,CAAC,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;gBACxD,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,sEAAsE;YACrF,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAES,SAAS,CAAC,IAAY,EAAE,KAAa;QAC7C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAChC,CAAC;IAES,KAAK,CAAC,IAAI;QAClB,OAAO,IAAI,CAAC,WAAY,CAAC,MAAM,CAAC;IAClC,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\nimport { RpcInterface, RpcInterfaceDefinition } from \"../../RpcInterface\";\r\nimport { RpcManager } from \"../../RpcManager\";\r\nimport { RpcControlChannel } from \"./RpcControl\";\r\nimport { SerializedRpcActivity } from \"./RpcInvocation\";\r\nimport { RpcProtocol, RpcRequestFulfillment } from \"./RpcProtocol\";\r\nimport { INSTANCE } from \"./RpcRegistry\";\r\nimport { RpcRequest } from \"./RpcRequest\";\r\nimport { RpcRequestContext } from \"./RpcRequestContext\";\r\nimport { RpcRoutingToken } from \"./RpcRoutingToken\";\r\n\r\n/** @internal */\r\nexport type RpcConfigurationSupplier = (routing?: RpcRoutingToken) => { new(): RpcConfiguration }; // eslint-disable-line @typescript-eslint/prefer-function-type\r\n\r\n/** @internal */\r\nexport interface RpcRoutingMap extends RpcConfigurationSupplier { configurations: Map<number, RpcConfigurationSupplier> }\r\n\r\n/** @internal */\r\nexport namespace RpcRoutingMap {\r\n export function create(): RpcRoutingMap {\r\n const configurations = new Map();\r\n return Object.assign((routing?: RpcRoutingToken) => configurations.get(routing!.id)(), { configurations });\r\n }\r\n}\r\n\r\n/** A RpcConfiguration specifies how calls on an RPC interface will be marshalled, plus other operating parameters.\r\n * RpcConfiguration is the base class for specific configurations.\r\n * @beta\r\n */\r\nexport abstract class RpcConfiguration {\r\n /** Whether development mode is enabled.\r\n * @note This parameter determines whether developer convenience features like backend stack traces are available.\r\n */\r\n public static developmentMode: boolean = false;\r\n\r\n /** Whether frontend checks that are relevant in a cloud-hosted routing scenario are disabled. */\r\n public static disableRoutingValidation: boolean = false;\r\n\r\n /** Whether strict mode is enabled.\r\n * This parameter determines system behaviors relating to strict checking:\r\n * - Whether an error is thrown if the type marshaling system encounters an unregistered type (only in strict mode).\r\n */\r\n public static strictMode: boolean = false;\r\n\r\n /**\r\n * Whether to throw an error when the IModelRpcProps in the operation parameter list differs from the token in the URL.\r\n * @note By default, a warning is logged and the operation is allowed to proceed.\r\n * @note The parameter token is always replaced by the url token (unless RpcOperationPolicy.allowTokenMismatch is set).\r\n */\r\n public static throwOnTokenMismatch = false;\r\n\r\n /** @internal Sets the configuration supplier for an RPC interface class. */\r\n public static assign<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>, supplier: RpcConfigurationSupplier): void {\r\n const map = definition.prototype.configurationSupplier as RpcRoutingMap | undefined;\r\n if (!map || typeof (map.configurations) === \"undefined\") {\r\n definition.prototype.configurationSupplier = supplier;\r\n } else {\r\n map.configurations.set(RpcRoutingToken.default.id, supplier);\r\n }\r\n }\r\n\r\n /** Sets the configuration supplier for an RPC interface class for a given routing. */\r\n public static assignWithRouting<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>, routing: RpcRoutingToken, configuration: new () => RpcConfiguration): void {\r\n if (!definition.prototype.configurationSupplier) {\r\n RpcConfiguration.assign(definition, RpcRoutingMap.create());\r\n }\r\n\r\n let map = definition.prototype.configurationSupplier as RpcRoutingMap;\r\n if (typeof (map.configurations) === \"undefined\") {\r\n const existing = map as RpcConfigurationSupplier;\r\n map = RpcRoutingMap.create();\r\n RpcConfiguration.assign(definition, map);\r\n map.configurations.set(RpcRoutingToken.default.id, existing);\r\n }\r\n\r\n const supplier = () => configuration;\r\n map.configurations.set(routing.id, supplier);\r\n }\r\n\r\n /** Obtains the instance of an RPC configuration class. */\r\n public static obtain<T extends RpcConfiguration>(configurationConstructor: new () => T): T {\r\n let instance = (configurationConstructor as any)[INSTANCE] as T;\r\n if (!instance)\r\n instance = (configurationConstructor as any)[INSTANCE] = new configurationConstructor();\r\n\r\n return instance;\r\n }\r\n\r\n /** @internal Enables passing of application-specific context with each RPC request. */\r\n public static requestContext: RpcRequestContext = {\r\n getId: (_request: RpcRequest): string => \"\",\r\n serialize: async (request: RpcRequest): Promise<SerializedRpcActivity> => ({\r\n id: request.id,\r\n applicationId: \"\",\r\n applicationVersion: \"\",\r\n sessionId: \"\",\r\n authorization: \"\",\r\n }),\r\n };\r\n\r\n /** @internal */\r\n public attached: RpcInterfaceDefinition[] = [];\r\n\r\n /** The protocol of the configuration.\r\n * @internal\r\n */\r\n public abstract readonly protocol: RpcProtocol;\r\n\r\n /** The RPC interfaces managed by the configuration. */\r\n public abstract readonly interfaces: () => RpcInterfaceDefinition[];\r\n\r\n /** @internal */\r\n public allowAttachedInterfaces: boolean = true;\r\n\r\n /** @internal */\r\n public get attachedInterfaces(): ReadonlyArray<RpcInterfaceDefinition> { return this.attached; }\r\n\r\n /** The target interval (in milliseconds) between connection attempts for pending RPC operation requests. */\r\n public pendingOperationRetryInterval = 10000;\r\n\r\n /** The maximum number of transient faults permitted before request failure. */\r\n public transientFaultLimit = 4;\r\n\r\n /** @internal */\r\n public readonly routing: RpcRoutingToken = RpcRoutingToken.default;\r\n\r\n /** The control channel for the configuration.\r\n * @internal\r\n */\r\n public readonly controlChannel = RpcControlChannel.obtain(this);\r\n\r\n /** @internal */\r\n public attach<T extends RpcInterface>(definition: RpcInterfaceDefinition<T>): void {\r\n if (!this.allowAttachedInterfaces) {\r\n return;\r\n }\r\n\r\n if (this.interfaces().indexOf(definition) !== -1 || this.attached.indexOf(definition) !== -1) {\r\n return;\r\n }\r\n\r\n this.attached.push(definition);\r\n RpcConfiguration.assign(definition, () => this.constructor as any);\r\n RpcManager.initializeInterface(definition);\r\n }\r\n\r\n /** Initializes the RPC interfaces managed by the configuration. */\r\n public static initializeInterfaces(configuration: RpcConfiguration) {\r\n configuration.interfaces().forEach((definition) => RpcManager.initializeInterface(definition));\r\n }\r\n\r\n /** @internal */\r\n public static supply(definition: RpcInterface): RpcConfiguration {\r\n return RpcConfiguration.obtain(definition.configurationSupplier ? definition.configurationSupplier(definition.routing) : RpcDefaultConfiguration);\r\n }\r\n\r\n /** @internal */\r\n public onRpcClientInitialized(definition: RpcInterfaceDefinition, client: RpcInterface): void {\r\n this.protocol.onRpcClientInitialized(definition, client);\r\n }\r\n\r\n /** @internal */\r\n public onRpcImplInitialized(definition: RpcInterfaceDefinition, impl: RpcInterface): void {\r\n this.protocol.onRpcImplInitialized(definition, impl);\r\n }\r\n\r\n /** @internal */\r\n public onRpcClientTerminated(definition: RpcInterfaceDefinition, client: RpcInterface): void {\r\n this.protocol.onRpcClientTerminated(definition, client);\r\n }\r\n\r\n /** @internal */\r\n public onRpcImplTerminated(definition: RpcInterfaceDefinition, impl: RpcInterface): void {\r\n this.protocol.onRpcImplTerminated(definition, impl);\r\n }\r\n}\r\n\r\n/** A default configuration that can be used for basic testing within a library.\r\n * @internal\r\n */\r\nexport class RpcDefaultConfiguration extends RpcConfiguration {\r\n public interfaces = () => [];\r\n public protocol: RpcProtocol = new RpcDirectProtocol(this);\r\n}\r\n\r\n/** A default protocol that can be used for basic testing within a library.\r\n * @internal\r\n */\r\nexport class RpcDirectProtocol extends RpcProtocol {\r\n public readonly requestType = RpcDirectRequest;\r\n}\r\n\r\n/** A default request type that can be used for basic testing within a library.\r\n * @internal\r\n */\r\nexport class RpcDirectRequest extends RpcRequest {\r\n public headers: Map<string, string> = new Map();\r\n public fulfillment: RpcRequestFulfillment | undefined = undefined;\r\n\r\n protected async send() {\r\n const request = await this.protocol.serialize(this);\r\n return new Promise<number>(async (resolve, reject) => {\r\n try {\r\n this.fulfillment = await this.protocol.fulfill(request);\r\n resolve(this.fulfillment.status);\r\n } catch (err) {\r\n reject(err); // eslint-disable-line @typescript-eslint/prefer-promise-reject-errors\r\n }\r\n });\r\n }\r\n\r\n protected setHeader(name: string, value: string): void {\r\n this.headers.set(name, value);\r\n }\r\n\r\n protected async load() {\r\n return this.fulfillment!.result;\r\n }\r\n}\r\n"]}
@@ -50,7 +50,7 @@ export declare enum RpcRequestStatus {
50
50
  }
51
51
  /** @public @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future. */
52
52
  export declare namespace RpcRequestStatus {
53
- function isTransientError(status: RpcRequestStatus): boolean;
53
+ function isTransientError(status: RpcRequestStatus): status is RpcRequestStatus.BadGateway | RpcRequestStatus.ServiceUnavailable | RpcRequestStatus.GatewayTimeout | RpcRequestStatus.RequestTimeout | RpcRequestStatus.TooManyRequests;
54
54
  }
55
55
  /** RPC request event types.
56
56
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"RpcConstants.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConstants.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH;;GAEG;AACH,oBAAY,uBAAuB;IACjC,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,cAAc,IAAA;IACd,cAAc,IAAA;IACd,eAAe,IAAA;IACf,uBAAuB,IAAA;IACvB,oBAAoB,IAAA;IACpB,oBAAoB,IAAA;IACpB,iBAAiB,IAAA;IACjB,eAAe,IAAA;IACf,sBAAsB,IAAA;IACtB,sBAAsB,IAAA;IACtB,uBAAuB,KAAA;IACvB,oBAAoB,KAAA;IACpB,wBAAwB,KAAA;CACzB;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,OAAO,IAAA;IACP,OAAO,IAAA;IACP,SAAS,IAAA;IACT,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,SAAS,IAAA;IACT,UAAU,KAAA;IACV,kBAAkB,KAAA;IAClB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,eAAe,KAAA;CAChB;AAED,+GAA+G;AAC/G,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,WAGxD;CACF;AAED;;;GAGG;AACH,oBAAY,eAAe;IACzB,aAAa,IAAA;IACb,qBAAqB,IAAA;IACrB,sBAAsB,IAAA;CACvB;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AAED;;;GAGG;AACH,oBAAY,WAAW;IACrB,QAAQ,IAAA;IACR,OAAO,IAAA;CACR;AAID,gBAAgB;AAChB,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC"}
1
+ {"version":3,"file":"RpcConstants.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConstants.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH;;GAEG;AACH,oBAAY,uBAAuB;IACjC,IAAI,IAAA;IACJ,SAAS,IAAA;CACV;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,cAAc,IAAA;IACd,cAAc,IAAA;IACd,eAAe,IAAA;IACf,uBAAuB,IAAA;IACvB,oBAAoB,IAAA;IACpB,oBAAoB,IAAA;IACpB,iBAAiB,IAAA;IACjB,eAAe,IAAA;IACf,sBAAsB,IAAA;IACtB,sBAAsB,IAAA;IACtB,uBAAuB,KAAA;IACvB,oBAAoB,KAAA;IACpB,wBAAwB,KAAA;CACzB;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B,OAAO,IAAA;IACP,OAAO,IAAA;IACP,SAAS,IAAA;IACT,OAAO,IAAA;IACP,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,SAAS,IAAA;IACT,SAAS,IAAA;IACT,UAAU,KAAA;IACV,kBAAkB,KAAA;IAClB,cAAc,KAAA;IACd,cAAc,KAAA;IACd,eAAe,KAAA;CAChB;AAED,+GAA+G;AAC/G,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,sLAGxD;CACF;AAED;;;GAGG;AACH,oBAAY,eAAe;IACzB,aAAa,IAAA;IACb,qBAAqB,IAAA;IACrB,sBAAsB,IAAA;CACvB;AAED;;;GAGG;AACH,oBAAY,cAAc;IACxB,OAAO,IAAA;IACP,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,SAAS,IAAA;IACT,MAAM,IAAA;CACP;AAED;;;GAGG;AACH,oBAAY,WAAW;IACrB,QAAQ,IAAA;IACR,OAAO,IAAA;CACR;AAID,gBAAgB;AAChB,eAAO,MAAM,iBAAiB;;;;;;CAM7B,CAAC"}
@@ -5,7 +5,7 @@
5
5
  /** @packageDocumentation
6
6
  * @module RpcInterface
7
7
  */
8
- /* eslint-disable deprecation/deprecation */
8
+ /* eslint-disable @typescript-eslint/no-deprecated */
9
9
  /** Describes available options for RPC response caching.
10
10
  * @public
11
11
  */
@@ -1 +1 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AAgB,CAAC,cAAc;eACxI,MAAM,KAAK,gBAAgB,CAAC,cAAc,IAAI,MAAM,KAAK,gBAAgB,CAAC,eAAe,CAAC;IACjG,CAAC;IAHe,iCAAgB,mBAG/B,CAAA;AACH,CAAC,EALgB,gBAAgB,KAAhB,gBAAgB,QAKhC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,uEAAa,CAAA;IACb,uFAAqB,CAAA;IACrB,yFAAsB,CAAA;AACxB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAO,CAAA;IACP,mDAAI,CAAA;IACJ,uDAAM,CAAA;IACN,6DAAS,CAAA;IACT,uDAAM,CAAA;AACR,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,qDAAQ,CAAA;IACR,mDAAO,CAAA;AACT,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,yDAAyD;AAEzD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,0BAA0B;IAClC,SAAS,EAAE,qBAAqB;CACjC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\n/* eslint-disable deprecation/deprecation */\r\n\r\n/** Describes available options for RPC response caching.\r\n * @public\r\n */\r\nexport enum RpcResponseCacheControl {\r\n None,\r\n Immutable,\r\n}\r\n\r\n/** RPC protocol event types.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcProtocolEvent {\r\n RequestCreated,\r\n ResponseLoaded,\r\n ResponseLoading,\r\n ConnectionErrorReceived,\r\n UnknownErrorReceived,\r\n BackendErrorReceived,\r\n ConnectionAborted,\r\n RequestReceived,\r\n BackendResponseCreated,\r\n BackendReportedPending,\r\n BackendReportedNotFound,\r\n BackendErrorOccurred,\r\n BackendReportedNoContent,\r\n}\r\n\r\n/** The status of an RPC operation request.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcRequestStatus {\r\n Unknown,\r\n Created,\r\n Submitted,\r\n Pending,\r\n Resolved,\r\n Rejected,\r\n Disposed,\r\n NotFound,\r\n Cancelled,\r\n NoContent,\r\n BadGateway,\r\n ServiceUnavailable,\r\n GatewayTimeout,\r\n RequestTimeout,\r\n TooManyRequests\r\n}\r\n\r\n/** @public @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future. */\r\nexport namespace RpcRequestStatus { // eslint-disable-line @typescript-eslint/no-redeclare\r\n export function isTransientError(status: RpcRequestStatus) {\r\n return status === RpcRequestStatus.BadGateway || status === RpcRequestStatus.ServiceUnavailable || status === RpcRequestStatus.GatewayTimeout\r\n || status === RpcRequestStatus.RequestTimeout || status === RpcRequestStatus.TooManyRequests;\r\n }\r\n}\r\n\r\n/** RPC request event types.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcRequestEvent {\r\n StatusChanged,\r\n PendingUpdateReceived,\r\n TransientErrorReceived\r\n}\r\n\r\n/** RPC content types.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcContentType {\r\n Unknown,\r\n Text,\r\n Binary,\r\n Multipart,\r\n Stream,\r\n}\r\n\r\n/** Endpoints for RPC protocols.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcEndpoint {\r\n Frontend,\r\n Backend,\r\n}\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** @internal */\r\nexport const WEB_RPC_CONSTANTS = {\r\n CONTENT: \"Content-Type\",\r\n TEXT: \"text/plain\",\r\n ANY_TEXT: \"text/\",\r\n BINARY: \"application/octet-stream\",\r\n MULTIPART: \"multipart/form-data\",\r\n};\r\n"]}
1
+ {"version":3,"file":"RpcConstants.js","sourceRoot":"","sources":["../../../../src/rpc/core/RpcConstants.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,qDAAqD;AAErD;;GAEG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,+EAAS,CAAA;AACX,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC1B,2EAAc,CAAA;IACd,2EAAc,CAAA;IACd,6EAAe,CAAA;IACf,6FAAuB,CAAA;IACvB,uFAAoB,CAAA;IACpB,uFAAoB,CAAA;IACpB,iFAAiB,CAAA;IACjB,6EAAe,CAAA;IACf,2FAAsB,CAAA;IACtB,2FAAsB,CAAA;IACtB,8FAAuB,CAAA;IACvB,wFAAoB,CAAA;IACpB,gGAAwB,CAAA;AAC1B,CAAC,EAdW,gBAAgB,KAAhB,gBAAgB,QAc3B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gBAgBX;AAhBD,WAAY,gBAAgB;IAC1B,6DAAO,CAAA;IACP,6DAAO,CAAA;IACP,iEAAS,CAAA;IACT,6DAAO,CAAA;IACP,+DAAQ,CAAA;IACR,+DAAQ,CAAA;IACR,+DAAQ,CAAA;IACR,+DAAQ,CAAA;IACR,iEAAS,CAAA;IACT,iEAAS,CAAA;IACT,oEAAU,CAAA;IACV,oFAAkB,CAAA;IAClB,4EAAc,CAAA;IACd,4EAAc,CAAA;IACd,8EAAe,CAAA;AACjB,CAAC,EAhBW,gBAAgB,KAAhB,gBAAgB,QAgB3B;AAED,+GAA+G;AAC/G,WAAiB,gBAAgB;IAC/B,SAAgB,gBAAgB,CAAC,MAAwB;QACvD,OAAO,MAAM,KAAK,gBAAgB,CAAC,UAAU,IAAI,MAAM,KAAK,gBAAgB,CAAC,kBAAkB,IAAI,MAAM,KAAK,gBAAgB,CAAC,cAAc;eACxI,MAAM,KAAK,gBAAgB,CAAC,cAAc,IAAI,MAAM,KAAK,gBAAgB,CAAC,eAAe,CAAC;IACjG,CAAC;IAHe,iCAAgB,mBAG/B,CAAA;AACH,CAAC,EALgB,gBAAgB,KAAhB,gBAAgB,QAKhC;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,uEAAa,CAAA;IACb,uFAAqB,CAAA;IACrB,yFAAsB,CAAA;AACxB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yDAAO,CAAA;IACP,mDAAI,CAAA;IACJ,uDAAM,CAAA;IACN,6DAAS,CAAA;IACT,uDAAM,CAAA;AACR,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,qDAAQ,CAAA;IACR,mDAAO,CAAA;AACT,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,yDAAyD;AAEzD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,0BAA0B;IAClC,SAAS,EAAE,qBAAqB;CACjC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n\r\n/** Describes available options for RPC response caching.\r\n * @public\r\n */\r\nexport enum RpcResponseCacheControl {\r\n None,\r\n Immutable,\r\n}\r\n\r\n/** RPC protocol event types.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcProtocolEvent {\r\n RequestCreated,\r\n ResponseLoaded,\r\n ResponseLoading,\r\n ConnectionErrorReceived,\r\n UnknownErrorReceived,\r\n BackendErrorReceived,\r\n ConnectionAborted,\r\n RequestReceived,\r\n BackendResponseCreated,\r\n BackendReportedPending,\r\n BackendReportedNotFound,\r\n BackendErrorOccurred,\r\n BackendReportedNoContent,\r\n}\r\n\r\n/** The status of an RPC operation request.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcRequestStatus {\r\n Unknown,\r\n Created,\r\n Submitted,\r\n Pending,\r\n Resolved,\r\n Rejected,\r\n Disposed,\r\n NotFound,\r\n Cancelled,\r\n NoContent,\r\n BadGateway,\r\n ServiceUnavailable,\r\n GatewayTimeout,\r\n RequestTimeout,\r\n TooManyRequests\r\n}\r\n\r\n/** @public @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future. */\r\nexport namespace RpcRequestStatus {\r\n export function isTransientError(status: RpcRequestStatus) {\r\n return status === RpcRequestStatus.BadGateway || status === RpcRequestStatus.ServiceUnavailable || status === RpcRequestStatus.GatewayTimeout\r\n || status === RpcRequestStatus.RequestTimeout || status === RpcRequestStatus.TooManyRequests;\r\n }\r\n}\r\n\r\n/** RPC request event types.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcRequestEvent {\r\n StatusChanged,\r\n PendingUpdateReceived,\r\n TransientErrorReceived\r\n}\r\n\r\n/** RPC content types.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcContentType {\r\n Unknown,\r\n Text,\r\n Binary,\r\n Multipart,\r\n Stream,\r\n}\r\n\r\n/** Endpoints for RPC protocols.\r\n * @public\r\n * @deprecated in 3.6. The RPC system will be significantly refactored (or replaced) in the future.\r\n */\r\nexport enum RpcEndpoint {\r\n Frontend,\r\n Backend,\r\n}\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\n\r\n/** @internal */\r\nexport const WEB_RPC_CONSTANTS = {\r\n CONTENT: \"Content-Type\",\r\n TEXT: \"text/plain\",\r\n ANY_TEXT: \"text/\",\r\n BINARY: \"application/octet-stream\",\r\n MULTIPART: \"multipart/form-data\",\r\n};\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RpcControl.d.ts","sourceRoot":"","sources":["../../../../src/rpc/core/RpcControl.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,qBAAqB,EAAc,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD;;GAEG;AACH,8BAAsB,kBAAkB;IAC/B,OAAO,SAAwB;CACvC;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,kBAAkB;IACxD,uDAAuD;IACvC,OAAO,EAAE,MAAM,CAAC;IAEhC,qCAAqC;gBAClB,OAAO,GAAE,MAAW;CAIxC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,kBAAkB;IACzC,OAAO,SAAe;CACvC;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,gBAAgB;IAChB,OAAc,QAAQ,EAAE,iBAAiB,EAAE,CAAM;IACjD,OAAO,CAAC,MAAM,CAAC,WAAW,CAAK;IAC/B,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B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,kBAAkB,CAA4D;IAEtF,gBAAgB;WACF,iBAAiB;IAI/B,OAAO;IAKP,gBAAgB;IACH,iBAAiB;IAS9B,gBAAgB;WACF,MAAM,CAAC,aAAa,EAAE,gBAAgB,GAAG,iBAAiB;IAWxE,OAAO,CAAC,iBAAiB,CAIvB;IAEF,OAAO,CAAC,YAAY,CAelB;IAEF,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,cAAc;IAatB,gBAAgB;IACT,UAAU;IAgBjB,gBAAgB;IACT,sBAAsB,CAAC,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO;CAc/E"}
@@ -15,7 +15,6 @@ import { RpcManager } from "../../RpcManager";
15
15
  import { RpcConfiguration } from "./RpcConfiguration";
16
16
  import { RpcOperation } from "./RpcOperation";
17
17
  import { RpcRegistry } from "./RpcRegistry";
18
- /* eslint-disable deprecation/deprecation */
19
18
  /** An RPC operation control response.
20
19
  * @public
21
20
  */