@itwin/core-common 3.3.0-dev.9 → 3.4.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/lib/cjs/AmbientOcclusion.d.ts +2 -2
  3. package/lib/cjs/AmbientOcclusion.d.ts.map +1 -1
  4. package/lib/cjs/AmbientOcclusion.js +9 -9
  5. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  6. package/lib/cjs/AnalysisStyle.d.ts +7 -7
  7. package/lib/cjs/AnalysisStyle.d.ts.map +1 -1
  8. package/lib/cjs/AnalysisStyle.js.map +1 -1
  9. package/lib/cjs/BackgroundMapProvider.d.ts +2 -2
  10. package/lib/cjs/BackgroundMapProvider.js +1 -1
  11. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  12. package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
  13. package/lib/cjs/BackgroundMapSettings.d.ts.map +1 -1
  14. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  15. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  16. package/lib/cjs/ChangedEntities.d.ts +1 -1
  17. package/lib/cjs/ChangedEntities.js.map +1 -1
  18. package/lib/cjs/Code.d.ts +7 -7
  19. package/lib/cjs/Code.d.ts.map +1 -1
  20. package/lib/cjs/Code.js +5 -5
  21. package/lib/cjs/Code.js.map +1 -1
  22. package/lib/cjs/ColorDef.d.ts +2 -0
  23. package/lib/cjs/ColorDef.d.ts.map +1 -1
  24. package/lib/cjs/ColorDef.js +4 -0
  25. package/lib/cjs/ColorDef.js.map +1 -1
  26. package/lib/cjs/ContextRealityModel.d.ts +6 -6
  27. package/lib/cjs/ContextRealityModel.d.ts.map +1 -1
  28. package/lib/cjs/ContextRealityModel.js.map +1 -1
  29. package/lib/cjs/DisplayStyleSettings.d.ts +58 -57
  30. package/lib/cjs/DisplayStyleSettings.d.ts.map +1 -1
  31. package/lib/cjs/DisplayStyleSettings.js +23 -26
  32. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  33. package/lib/cjs/ElementProps.d.ts +6 -6
  34. package/lib/cjs/ElementProps.d.ts.map +1 -1
  35. package/lib/cjs/ElementProps.js.map +1 -1
  36. package/lib/cjs/EmphasizeElementsProps.d.ts +8 -8
  37. package/lib/cjs/EmphasizeElementsProps.d.ts.map +1 -1
  38. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  39. package/lib/cjs/EntityProps.d.ts +2 -2
  40. package/lib/cjs/EntityProps.d.ts.map +1 -1
  41. package/lib/cjs/EntityProps.js.map +1 -1
  42. package/lib/cjs/Environment.d.ts +2 -2
  43. package/lib/cjs/Environment.d.ts.map +1 -1
  44. package/lib/cjs/Environment.js.map +1 -1
  45. package/lib/cjs/FeatureIndex.d.ts +0 -1
  46. package/lib/cjs/FeatureIndex.d.ts.map +1 -1
  47. package/lib/cjs/FeatureIndex.js +0 -1
  48. package/lib/cjs/FeatureIndex.js.map +1 -1
  49. package/lib/cjs/FeatureSymbology.d.ts +40 -9
  50. package/lib/cjs/FeatureSymbology.d.ts.map +1 -1
  51. package/lib/cjs/FeatureSymbology.js +41 -6
  52. package/lib/cjs/FeatureSymbology.js.map +1 -1
  53. package/lib/cjs/FeatureTable.d.ts +6 -2
  54. package/lib/cjs/FeatureTable.d.ts.map +1 -1
  55. package/lib/cjs/FeatureTable.js +26 -6
  56. package/lib/cjs/FeatureTable.js.map +1 -1
  57. package/lib/cjs/Gradient.d.ts +5 -1
  58. package/lib/cjs/Gradient.d.ts.map +1 -1
  59. package/lib/cjs/Gradient.js +17 -23
  60. package/lib/cjs/Gradient.js.map +1 -1
  61. package/lib/cjs/HiddenLine.d.ts +3 -3
  62. package/lib/cjs/HiddenLine.d.ts.map +1 -1
  63. package/lib/cjs/HiddenLine.js.map +1 -1
  64. package/lib/cjs/IModel.d.ts +9 -6
  65. package/lib/cjs/IModel.d.ts.map +1 -1
  66. package/lib/cjs/IModel.js.map +1 -1
  67. package/lib/cjs/IModelError.d.ts +3 -3
  68. package/lib/cjs/IModelError.d.ts.map +1 -1
  69. package/lib/cjs/IModelError.js +1 -2
  70. package/lib/cjs/IModelError.js.map +1 -1
  71. package/lib/cjs/LightSettings.d.ts +4 -4
  72. package/lib/cjs/LightSettings.d.ts.map +1 -1
  73. package/lib/cjs/LightSettings.js.map +1 -1
  74. package/lib/cjs/MapImagerySettings.d.ts +7 -7
  75. package/lib/cjs/MapImagerySettings.d.ts.map +1 -1
  76. package/lib/cjs/MapImagerySettings.js +3 -3
  77. package/lib/cjs/MapImagerySettings.js.map +1 -1
  78. package/lib/cjs/MapLayerSettings.d.ts +21 -14
  79. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  80. package/lib/cjs/MapLayerSettings.js +6 -6
  81. package/lib/cjs/MapLayerSettings.js.map +1 -1
  82. package/lib/cjs/ModelProps.d.ts +1 -1
  83. package/lib/cjs/ModelProps.js.map +1 -1
  84. package/lib/cjs/PlanProjectionSettings.d.ts +4 -4
  85. package/lib/cjs/PlanProjectionSettings.d.ts.map +1 -1
  86. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  87. package/lib/cjs/PlanarClipMask.d.ts +11 -11
  88. package/lib/cjs/PlanarClipMask.d.ts.map +1 -1
  89. package/lib/cjs/PlanarClipMask.js.map +1 -1
  90. package/lib/cjs/RenderSchedule.d.ts +66 -8
  91. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  92. package/lib/cjs/RenderSchedule.js +228 -8
  93. package/lib/cjs/RenderSchedule.js.map +1 -1
  94. package/lib/cjs/RgbColor.d.ts +1 -0
  95. package/lib/cjs/RgbColor.d.ts.map +1 -1
  96. package/lib/cjs/RgbColor.js +4 -0
  97. package/lib/cjs/RgbColor.js.map +1 -1
  98. package/lib/cjs/RpcInterface.d.ts.map +1 -1
  99. package/lib/cjs/RpcInterface.js +91 -4
  100. package/lib/cjs/RpcInterface.js.map +1 -1
  101. package/lib/cjs/SpatialClassification.d.ts +9 -9
  102. package/lib/cjs/SpatialClassification.d.ts.map +1 -1
  103. package/lib/cjs/SpatialClassification.js +1 -1
  104. package/lib/cjs/SpatialClassification.js.map +1 -1
  105. package/lib/cjs/SubCategoryAppearance.d.ts +10 -10
  106. package/lib/cjs/SubCategoryAppearance.d.ts.map +1 -1
  107. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  108. package/lib/cjs/SubCategoryOverride.d.ts +6 -6
  109. package/lib/cjs/SubCategoryOverride.d.ts.map +1 -1
  110. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  111. package/lib/cjs/ViewFlags.d.ts +3 -3
  112. package/lib/cjs/ViewFlags.d.ts.map +1 -1
  113. package/lib/cjs/ViewFlags.js.map +1 -1
  114. package/lib/cjs/ViewProps.d.ts +3 -1
  115. package/lib/cjs/ViewProps.d.ts.map +1 -1
  116. package/lib/cjs/ViewProps.js.map +1 -1
  117. package/lib/cjs/core-common.d.ts +7 -1
  118. package/lib/cjs/core-common.d.ts.map +1 -1
  119. package/lib/cjs/core-common.js +7 -1
  120. package/lib/cjs/core-common.js.map +1 -1
  121. package/lib/cjs/ipc/IpcSession.d.ts +24 -0
  122. package/lib/cjs/ipc/IpcSession.d.ts.map +1 -0
  123. package/lib/cjs/ipc/IpcSession.js +28 -0
  124. package/lib/cjs/ipc/IpcSession.js.map +1 -0
  125. package/lib/cjs/ipc/IpcWebSocket.d.ts +3 -0
  126. package/lib/cjs/ipc/IpcWebSocket.d.ts.map +1 -1
  127. package/lib/cjs/ipc/IpcWebSocket.js +28 -14
  128. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  129. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +4 -2
  130. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  131. package/lib/cjs/rpc/IModelReadRpcInterface.js +42 -2
  132. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  133. package/lib/cjs/rpc/IModelTileRpcInterface.d.ts.map +1 -1
  134. package/lib/cjs/rpc/IModelTileRpcInterface.js +16 -2
  135. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  136. package/lib/cjs/rpc/core/RpcControl.d.ts +2 -0
  137. package/lib/cjs/rpc/core/RpcControl.d.ts.map +1 -1
  138. package/lib/cjs/rpc/core/RpcControl.js +13 -1
  139. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  140. package/lib/cjs/rpc/core/RpcInvocation.d.ts.map +1 -1
  141. package/lib/cjs/rpc/core/RpcInvocation.js +17 -4
  142. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcProtocol.d.ts +6 -2
  144. package/lib/cjs/rpc/core/RpcProtocol.d.ts.map +1 -1
  145. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  146. package/lib/cjs/rpc/core/RpcRequest.d.ts +11 -6
  147. package/lib/cjs/rpc/core/RpcRequest.d.ts.map +1 -1
  148. package/lib/cjs/rpc/core/RpcRequest.js +12 -14
  149. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcSessionInvocation.d.ts +11 -0
  151. package/lib/cjs/rpc/core/RpcSessionInvocation.d.ts.map +1 -0
  152. package/lib/cjs/rpc/core/RpcSessionInvocation.js +60 -0
  153. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -0
  154. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +0 -5
  155. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  156. package/lib/cjs/rpc/web/WebAppRpcProtocol.js +0 -47
  157. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  158. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts +2 -3
  159. package/lib/cjs/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  160. package/lib/cjs/rpc/web/WebAppRpcRequest.js +25 -20
  161. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  162. package/lib/cjs/tile/ElementGraphics.d.ts +4 -0
  163. package/lib/cjs/tile/ElementGraphics.d.ts.map +1 -1
  164. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  165. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  166. package/lib/cjs/tile/IModelTileIO.js +2 -2
  167. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  168. package/lib/esm/AmbientOcclusion.d.ts +2 -2
  169. package/lib/esm/AmbientOcclusion.d.ts.map +1 -1
  170. package/lib/esm/AmbientOcclusion.js +9 -9
  171. package/lib/esm/AmbientOcclusion.js.map +1 -1
  172. package/lib/esm/AnalysisStyle.d.ts +7 -7
  173. package/lib/esm/AnalysisStyle.d.ts.map +1 -1
  174. package/lib/esm/AnalysisStyle.js.map +1 -1
  175. package/lib/esm/BackgroundMapProvider.d.ts +2 -2
  176. package/lib/esm/BackgroundMapProvider.js +1 -1
  177. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  178. package/lib/esm/BackgroundMapSettings.d.ts +2 -2
  179. package/lib/esm/BackgroundMapSettings.d.ts.map +1 -1
  180. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  181. package/lib/esm/BriefcaseTypes.js.map +1 -1
  182. package/lib/esm/ChangedEntities.d.ts +1 -1
  183. package/lib/esm/ChangedEntities.js.map +1 -1
  184. package/lib/esm/Code.d.ts +7 -7
  185. package/lib/esm/Code.d.ts.map +1 -1
  186. package/lib/esm/Code.js +5 -5
  187. package/lib/esm/Code.js.map +1 -1
  188. package/lib/esm/ColorDef.d.ts +2 -0
  189. package/lib/esm/ColorDef.d.ts.map +1 -1
  190. package/lib/esm/ColorDef.js +4 -0
  191. package/lib/esm/ColorDef.js.map +1 -1
  192. package/lib/esm/ContextRealityModel.d.ts +6 -6
  193. package/lib/esm/ContextRealityModel.d.ts.map +1 -1
  194. package/lib/esm/ContextRealityModel.js.map +1 -1
  195. package/lib/esm/DisplayStyleSettings.d.ts +58 -57
  196. package/lib/esm/DisplayStyleSettings.d.ts.map +1 -1
  197. package/lib/esm/DisplayStyleSettings.js +23 -26
  198. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  199. package/lib/esm/ElementProps.d.ts +6 -6
  200. package/lib/esm/ElementProps.d.ts.map +1 -1
  201. package/lib/esm/ElementProps.js.map +1 -1
  202. package/lib/esm/EmphasizeElementsProps.d.ts +8 -8
  203. package/lib/esm/EmphasizeElementsProps.d.ts.map +1 -1
  204. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  205. package/lib/esm/EntityProps.d.ts +2 -2
  206. package/lib/esm/EntityProps.d.ts.map +1 -1
  207. package/lib/esm/EntityProps.js.map +1 -1
  208. package/lib/esm/Environment.d.ts +2 -2
  209. package/lib/esm/Environment.d.ts.map +1 -1
  210. package/lib/esm/Environment.js.map +1 -1
  211. package/lib/esm/FeatureIndex.d.ts +0 -1
  212. package/lib/esm/FeatureIndex.d.ts.map +1 -1
  213. package/lib/esm/FeatureIndex.js +0 -1
  214. package/lib/esm/FeatureIndex.js.map +1 -1
  215. package/lib/esm/FeatureSymbology.d.ts +40 -9
  216. package/lib/esm/FeatureSymbology.d.ts.map +1 -1
  217. package/lib/esm/FeatureSymbology.js +41 -6
  218. package/lib/esm/FeatureSymbology.js.map +1 -1
  219. package/lib/esm/FeatureTable.d.ts +6 -2
  220. package/lib/esm/FeatureTable.d.ts.map +1 -1
  221. package/lib/esm/FeatureTable.js +26 -6
  222. package/lib/esm/FeatureTable.js.map +1 -1
  223. package/lib/esm/Gradient.d.ts +5 -1
  224. package/lib/esm/Gradient.d.ts.map +1 -1
  225. package/lib/esm/Gradient.js +17 -23
  226. package/lib/esm/Gradient.js.map +1 -1
  227. package/lib/esm/HiddenLine.d.ts +3 -3
  228. package/lib/esm/HiddenLine.d.ts.map +1 -1
  229. package/lib/esm/HiddenLine.js.map +1 -1
  230. package/lib/esm/IModel.d.ts +9 -6
  231. package/lib/esm/IModel.d.ts.map +1 -1
  232. package/lib/esm/IModel.js.map +1 -1
  233. package/lib/esm/IModelError.d.ts +3 -3
  234. package/lib/esm/IModelError.d.ts.map +1 -1
  235. package/lib/esm/IModelError.js +1 -1
  236. package/lib/esm/IModelError.js.map +1 -1
  237. package/lib/esm/LightSettings.d.ts +4 -4
  238. package/lib/esm/LightSettings.d.ts.map +1 -1
  239. package/lib/esm/LightSettings.js.map +1 -1
  240. package/lib/esm/MapImagerySettings.d.ts +7 -7
  241. package/lib/esm/MapImagerySettings.d.ts.map +1 -1
  242. package/lib/esm/MapImagerySettings.js +3 -3
  243. package/lib/esm/MapImagerySettings.js.map +1 -1
  244. package/lib/esm/MapLayerSettings.d.ts +21 -14
  245. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  246. package/lib/esm/MapLayerSettings.js +6 -6
  247. package/lib/esm/MapLayerSettings.js.map +1 -1
  248. package/lib/esm/ModelProps.d.ts +1 -1
  249. package/lib/esm/ModelProps.js.map +1 -1
  250. package/lib/esm/PlanProjectionSettings.d.ts +4 -4
  251. package/lib/esm/PlanProjectionSettings.d.ts.map +1 -1
  252. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  253. package/lib/esm/PlanarClipMask.d.ts +11 -11
  254. package/lib/esm/PlanarClipMask.d.ts.map +1 -1
  255. package/lib/esm/PlanarClipMask.js.map +1 -1
  256. package/lib/esm/RenderSchedule.d.ts +66 -8
  257. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  258. package/lib/esm/RenderSchedule.js +229 -9
  259. package/lib/esm/RenderSchedule.js.map +1 -1
  260. package/lib/esm/RgbColor.d.ts +1 -0
  261. package/lib/esm/RgbColor.d.ts.map +1 -1
  262. package/lib/esm/RgbColor.js +4 -0
  263. package/lib/esm/RgbColor.js.map +1 -1
  264. package/lib/esm/RpcInterface.d.ts.map +1 -1
  265. package/lib/esm/RpcInterface.js +91 -4
  266. package/lib/esm/RpcInterface.js.map +1 -1
  267. package/lib/esm/SpatialClassification.d.ts +9 -9
  268. package/lib/esm/SpatialClassification.d.ts.map +1 -1
  269. package/lib/esm/SpatialClassification.js +1 -1
  270. package/lib/esm/SpatialClassification.js.map +1 -1
  271. package/lib/esm/SubCategoryAppearance.d.ts +10 -10
  272. package/lib/esm/SubCategoryAppearance.d.ts.map +1 -1
  273. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  274. package/lib/esm/SubCategoryOverride.d.ts +6 -6
  275. package/lib/esm/SubCategoryOverride.d.ts.map +1 -1
  276. package/lib/esm/SubCategoryOverride.js.map +1 -1
  277. package/lib/esm/ViewFlags.d.ts +3 -3
  278. package/lib/esm/ViewFlags.d.ts.map +1 -1
  279. package/lib/esm/ViewFlags.js.map +1 -1
  280. package/lib/esm/ViewProps.d.ts +3 -1
  281. package/lib/esm/ViewProps.d.ts.map +1 -1
  282. package/lib/esm/ViewProps.js.map +1 -1
  283. package/lib/esm/core-common.d.ts +7 -1
  284. package/lib/esm/core-common.d.ts.map +1 -1
  285. package/lib/esm/core-common.js +7 -1
  286. package/lib/esm/core-common.js.map +1 -1
  287. package/lib/esm/ipc/IpcSession.d.ts +24 -0
  288. package/lib/esm/ipc/IpcSession.d.ts.map +1 -0
  289. package/lib/esm/ipc/IpcSession.js +24 -0
  290. package/lib/esm/ipc/IpcSession.js.map +1 -0
  291. package/lib/esm/ipc/IpcWebSocket.d.ts +3 -0
  292. package/lib/esm/ipc/IpcWebSocket.d.ts.map +1 -1
  293. package/lib/esm/ipc/IpcWebSocket.js +28 -14
  294. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  295. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +4 -2
  296. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  297. package/lib/esm/rpc/IModelReadRpcInterface.js +41 -1
  298. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  299. package/lib/esm/rpc/IModelTileRpcInterface.d.ts.map +1 -1
  300. package/lib/esm/rpc/IModelTileRpcInterface.js +15 -1
  301. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  302. package/lib/esm/rpc/core/RpcControl.d.ts +2 -0
  303. package/lib/esm/rpc/core/RpcControl.d.ts.map +1 -1
  304. package/lib/esm/rpc/core/RpcControl.js +13 -1
  305. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  306. package/lib/esm/rpc/core/RpcInvocation.d.ts.map +1 -1
  307. package/lib/esm/rpc/core/RpcInvocation.js +18 -5
  308. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  309. package/lib/esm/rpc/core/RpcProtocol.d.ts +6 -2
  310. package/lib/esm/rpc/core/RpcProtocol.d.ts.map +1 -1
  311. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  312. package/lib/esm/rpc/core/RpcRequest.d.ts +11 -6
  313. package/lib/esm/rpc/core/RpcRequest.d.ts.map +1 -1
  314. package/lib/esm/rpc/core/RpcRequest.js +6 -8
  315. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcSessionInvocation.d.ts +11 -0
  317. package/lib/esm/rpc/core/RpcSessionInvocation.d.ts.map +1 -0
  318. package/lib/esm/rpc/core/RpcSessionInvocation.js +56 -0
  319. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -0
  320. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +0 -5
  321. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts.map +1 -1
  322. package/lib/esm/rpc/web/WebAppRpcProtocol.js +0 -47
  323. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  324. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts +2 -3
  325. package/lib/esm/rpc/web/WebAppRpcRequest.d.ts.map +1 -1
  326. package/lib/esm/rpc/web/WebAppRpcRequest.js +25 -20
  327. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  328. package/lib/esm/tile/ElementGraphics.d.ts +4 -0
  329. package/lib/esm/tile/ElementGraphics.d.ts.map +1 -1
  330. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  331. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  332. package/lib/esm/tile/IModelTileIO.js +2 -2
  333. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  334. package/package.json +13 -13
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module RpcInterface
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.RpcSessionInvocation = void 0;
11
+ const RpcConfiguration_1 = require("./RpcConfiguration");
12
+ const RpcConstants_1 = require("./RpcConstants");
13
+ const RpcInvocation_1 = require("./RpcInvocation");
14
+ const RpcMarshaling_1 = require("./RpcMarshaling");
15
+ const RpcProtocol_1 = require("./RpcProtocol");
16
+ const RpcRequest_1 = require("./RpcRequest");
17
+ class SessionConfiguration extends RpcConfiguration_1.RpcConfiguration {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.interfaces = () => [];
21
+ }
22
+ get protocol() { return SessionProtocol.instance; }
23
+ }
24
+ class SessionProtocol extends RpcProtocol_1.RpcProtocol {
25
+ constructor() {
26
+ super(new SessionConfiguration());
27
+ this.requestType = RpcRequest_1.RpcRequest;
28
+ this.supportsStatusCategory = true;
29
+ }
30
+ }
31
+ SessionProtocol.instance = new SessionProtocol();
32
+ /** @internal */
33
+ class RpcSessionInvocation extends RpcInvocation_1.RpcInvocation {
34
+ static create(request) {
35
+ const serializedRequest = {
36
+ id: request.context.id,
37
+ applicationId: request.context.applicationId,
38
+ applicationVersion: request.context.applicationVersion,
39
+ sessionId: request.context.sessionId,
40
+ authorization: "",
41
+ operation: {
42
+ interfaceDefinition: request.definition.interfaceName,
43
+ interfaceVersion: request.definition.interfaceVersion,
44
+ operationName: request.operation,
45
+ },
46
+ method: request.operation,
47
+ path: "",
48
+ parameters: RpcMarshaling_1.RpcSerializedValue.create(),
49
+ parametersOverride: request.parameters,
50
+ caching: RpcConstants_1.RpcResponseCacheControl.None,
51
+ protocolVersion: parseInt(request.context.protocolVersion, 10),
52
+ };
53
+ return new RpcSessionInvocation(SessionProtocol.instance, serializedRequest);
54
+ }
55
+ get rejected() {
56
+ return this.status === RpcConstants_1.RpcRequestStatus.Rejected;
57
+ }
58
+ }
59
+ exports.RpcSessionInvocation = RpcSessionInvocation;
60
+ //# sourceMappingURL=RpcSessionInvocation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RpcSessionInvocation.js","sourceRoot":"","sources":["../../../../src/rpc/core/RpcSessionInvocation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,yDAAsD;AACtD,iDAA2E;AAC3E,mDAAgD;AAChD,mDAAqD;AACrD,+CAAkE;AAClE,6CAA0C;AAE1C,MAAM,oBAAqB,SAAQ,mCAAgB;IAAnD;;QACS,eAAU,GAAG,GAAG,EAAE,CAAC,EAAE,CAAC;IAE/B,CAAC;IADC,IAAW,QAAQ,KAAK,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC3D;AAED,MAAM,eAAgB,SAAQ,yBAAW;IAIvC;QAAgB,KAAK,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;QAF3C,gBAAW,GAAG,uBAAU,CAAC;QAChB,2BAAsB,GAAG,IAAI,CAAC;IACK,CAAC;;AAHtC,wBAAQ,GAAG,IAAI,eAAe,EAAE,CAAC;AAMjD,gBAAgB;AAChB,MAAa,oBAAqB,SAAQ,6BAAa;IAC9C,MAAM,CAAC,MAAM,CAAC,OAA8B;QACjD,MAAM,iBAAiB,GAAyB;YAC9C,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE;YACtB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa;YAC5C,kBAAkB,EAAE,OAAO,CAAC,OAAO,CAAC,kBAAkB;YACtD,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS;YACpC,aAAa,EAAE,EAAE;YACjB,SAAS,EAAE;gBACT,mBAAmB,EAAE,OAAO,CAAC,UAAU,CAAC,aAAa;gBACrD,gBAAgB,EAAE,OAAO,CAAC,UAAU,CAAC,gBAAgB;gBACrD,aAAa,EAAE,OAAO,CAAC,SAAS;aACjC;YACD,MAAM,EAAE,OAAO,CAAC,SAAS;YACzB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,kCAAkB,CAAC,MAAM,EAAE;YACvC,kBAAkB,EAAE,OAAO,CAAC,UAAU;YACtC,OAAO,EAAE,sCAAuB,CAAC,IAAI;YACrC,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC/D,CAAC;QAEF,OAAO,IAAI,oBAAoB,CAAC,eAAe,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAC/E,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,MAAM,KAAK,+BAAgB,CAAC,QAAQ,CAAC;IACnD,CAAC;CACF;AA3BD,oDA2BC","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 { InterceptedRpcRequest } from \"../../ipc/IpcSession\";\r\nimport { RpcConfiguration } from \"./RpcConfiguration\";\r\nimport { RpcRequestStatus, RpcResponseCacheControl } from \"./RpcConstants\";\r\nimport { RpcInvocation } from \"./RpcInvocation\";\r\nimport { RpcSerializedValue } from \"./RpcMarshaling\";\r\nimport { RpcProtocol, SerializedRpcRequest } from \"./RpcProtocol\";\r\nimport { RpcRequest } from \"./RpcRequest\";\r\n\r\nclass SessionConfiguration extends RpcConfiguration {\r\n public interfaces = () => [];\r\n public get protocol() { return SessionProtocol.instance; }\r\n}\r\n\r\nclass SessionProtocol extends RpcProtocol {\r\n public static instance = new SessionProtocol();\r\n public requestType = RpcRequest;\r\n public override supportsStatusCategory = true;\r\n constructor() { super(new SessionConfiguration()); }\r\n}\r\n\r\n/** @internal */\r\nexport class RpcSessionInvocation extends RpcInvocation {\r\n public static create(request: InterceptedRpcRequest): RpcSessionInvocation {\r\n const serializedRequest: SerializedRpcRequest = {\r\n id: request.context.id,\r\n applicationId: request.context.applicationId,\r\n applicationVersion: request.context.applicationVersion,\r\n sessionId: request.context.sessionId,\r\n authorization: \"\",\r\n operation: {\r\n interfaceDefinition: request.definition.interfaceName,\r\n interfaceVersion: request.definition.interfaceVersion,\r\n operationName: request.operation,\r\n },\r\n method: request.operation,\r\n path: \"\",\r\n parameters: RpcSerializedValue.create(),\r\n parametersOverride: request.parameters,\r\n caching: RpcResponseCacheControl.None,\r\n protocolVersion: parseInt(request.context.protocolVersion, 10),\r\n };\r\n\r\n return new RpcSessionInvocation(SessionProtocol.instance, serializedRequest);\r\n }\r\n\r\n public get rejected() {\r\n return this.status === RpcRequestStatus.Rejected;\r\n }\r\n}\r\n"]}
@@ -52,11 +52,6 @@ export interface HttpServerResponse extends Writable {
52
52
  */
53
53
  export declare abstract class WebAppRpcProtocol extends RpcProtocol {
54
54
  preserveStreams: boolean;
55
- private _initialized;
56
- /** @internal */
57
- allowedHeaders: Set<string>;
58
- /** @internal */
59
- initialize(): Promise<void>;
60
55
  /** Convenience handler for an RPC operation get request for an HTTP server. */
61
56
  handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse): Promise<void>;
62
57
  /** Convenience handler for an RPC operation post request for an HTTP server. */
@@ -1 +1 @@
1
- {"version":3,"file":"WebAppRpcProtocol.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAGH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,M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/C,UAAU,EAAE,MAAM,CAAM;IAE/B,+CAA+C;IAC/C,SAAgB,WAAW,0BAAoB;IAE/C,2EAA2E;IAC3D,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB;IAczD,2EAA2E;IAC3D,OAAO,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM;IAczC,sBAAsB,UAAQ;IAE9C,+DAA+D;IACxD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIvC;;OAEG;IACH,IAAW,kBAAkB,0BAA8C;IAE3E;;OAEG;aACa,gCAAgC,CAAC,UAAU,EAAE,YAAY,GAAG,gBAAgB,EAAE;IAE9F,mCAAmC;gBAChB,aAAa,EAAE,gBAAgB;CAInD"}
@@ -8,37 +8,11 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.WebAppRpcProtocol = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const RpcConfiguration_1 = require("../core/RpcConfiguration");
13
11
  const RpcConstants_1 = require("../core/RpcConstants");
14
12
  const RpcProtocol_1 = require("../core/RpcProtocol");
15
13
  const OpenAPI_1 = require("./OpenAPI");
16
14
  const WebAppRpcLogging_1 = require("./WebAppRpcLogging");
17
15
  const WebAppRpcRequest_1 = require("./WebAppRpcRequest");
18
- const CommonLoggerCategory_1 = require("../../CommonLoggerCategory");
19
- const RpcInterface_1 = require("../../RpcInterface");
20
- const RpcManager_1 = require("../../RpcManager");
21
- const RpcRoutingToken_1 = require("../core/RpcRoutingToken");
22
- class InitializeInterface extends RpcInterface_1.RpcInterface {
23
- async initialize() { return this.forward(arguments); }
24
- static createRequest(protocol) {
25
- const routing = RpcRoutingToken_1.RpcRoutingToken.generate();
26
- const config = class extends RpcConfiguration_1.RpcConfiguration {
27
- constructor() {
28
- super(...arguments);
29
- this.interfaces = () => [InitializeInterface];
30
- this.protocol = protocol;
31
- }
32
- };
33
- RpcConfiguration_1.RpcConfiguration.assignWithRouting(InitializeInterface, routing, config);
34
- const instance = RpcConfiguration_1.RpcConfiguration.obtain(config);
35
- RpcConfiguration_1.RpcConfiguration.initializeInterfaces(instance);
36
- const client = RpcManager_1.RpcManager.getClientForInterface(InitializeInterface, routing);
37
- return new (protocol.requestType)(client, "initialize", []);
38
- }
39
- }
40
- InitializeInterface.interfaceName = "InitializeInterface";
41
- InitializeInterface.interfaceVersion = "1.0.0";
42
16
  /** The HTTP application protocol.
43
17
  * @internal
44
18
  */
@@ -47,8 +21,6 @@ class WebAppRpcProtocol extends RpcProtocol_1.RpcProtocol {
47
21
  constructor(configuration) {
48
22
  super(configuration);
49
23
  this.preserveStreams = true;
50
- /** @internal */
51
- this.allowedHeaders = new Set();
52
24
  /** An optional prefix for RPC operation URI paths. */
53
25
  this.pathPrefix = "";
54
26
  /** The RPC request class for this protocol. */
@@ -56,25 +28,6 @@ class WebAppRpcProtocol extends RpcProtocol_1.RpcProtocol {
56
28
  this.supportsStatusCategory = true;
57
29
  this.events.addListener(WebAppRpcLogging_1.WebAppRpcLogging.logProtocolEvent);
58
30
  }
59
- /** @internal */
60
- async initialize() {
61
- if (this._initialized) {
62
- return this._initialized;
63
- }
64
- return this._initialized = new Promise(async (resolve) => {
65
- try {
66
- const request = InitializeInterface.createRequest(this);
67
- const response = await request.preflight();
68
- if (response && response.ok) {
69
- (response.headers.get("Access-Control-Allow-Headers") || "").split(",").forEach((v) => this.allowedHeaders.add(v.trim()));
70
- }
71
- }
72
- catch (err) {
73
- core_bentley_1.Logger.logWarning(CommonLoggerCategory_1.CommonLoggerCategory.RpcInterfaceFrontend, "Unable to discover backend capabilities.", core_bentley_1.BentleyError.getErrorProps(err));
74
- }
75
- resolve();
76
- });
77
- }
78
31
  /** Convenience handler for an RPC operation get request for an HTTP server. */
79
32
  async handleOperationGetRequest(req, res) {
80
33
  return this.handleOperationPostRequest(req, res);
@@ -1 +1 @@
1
- {"version":3,"file":"WebAppRpcProtocol.js","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcPro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CAAC;IAID,+DAA+D;IACxD,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,KAAK,GAAG,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,kBAAkB,KAAK,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAY5E;AA5HD,8CA4HC","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 { BentleyError, Logger } from \"@itwin/core-bentley\";\r\nimport { Readable, Writable } from \"stream\";\r\nimport { RpcConfiguration } from \"../core/RpcConfiguration\";\r\nimport { RpcContentType, RpcRequestStatus, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\r\nimport { RpcOperation } from \"../core/RpcOperation\";\r\nimport { RpcProtocol } from \"../core/RpcProtocol\";\r\nimport { OpenAPIInfo, OpenAPIParameter, RpcOpenAPIDescription } from \"./OpenAPI\";\r\nimport { WebAppRpcLogging } from \"./WebAppRpcLogging\";\r\nimport { WebAppRpcRequest } from \"./WebAppRpcRequest\";\r\nimport { CommonLoggerCategory } from \"../../CommonLoggerCategory\";\r\nimport { RpcInterface } from \"../../RpcInterface\";\r\nimport { RpcManager } from \"../../RpcManager\";\r\nimport { RpcRoutingToken } from \"../core/RpcRoutingToken\";\r\n\r\nclass InitializeInterface extends RpcInterface {\r\n public static readonly interfaceName = \"InitializeInterface\";\r\n public static readonly interfaceVersion = \"1.0.0\";\r\n public async initialize() { return this.forward(arguments); }\r\n\r\n public static createRequest(protocol: WebAppRpcProtocol) {\r\n const routing = RpcRoutingToken.generate();\r\n\r\n const config = class extends RpcConfiguration {\r\n public interfaces = () => [InitializeInterface];\r\n public protocol = protocol;\r\n };\r\n\r\n RpcConfiguration.assignWithRouting(InitializeInterface, routing, config);\r\n\r\n const instance = RpcConfiguration.obtain(config);\r\n RpcConfiguration.initializeInterfaces(instance);\r\n\r\n const client = RpcManager.getClientForInterface(InitializeInterface, routing);\r\n return new (protocol.requestType)(client, \"initialize\", []);\r\n }\r\n}\r\n\r\n/** An HTTP server request object.\r\n * @public\r\n */\r\nexport interface HttpServerRequest extends Readable {\r\n aborted: boolean;\r\n httpVersion: string;\r\n httpVersionMajor: number;\r\n httpVersionMinor: number;\r\n complete: boolean;\r\n connection: any;\r\n headers: { [header: string]: string | string[] | undefined };\r\n rawHeaders: string[];\r\n trailers: { [key: string]: string | undefined };\r\n rawTrailers: string[];\r\n setTimeout(msecs: number, callback: () => void): this;\r\n url?: string;\r\n statusCode?: number;\r\n statusMessage?: string;\r\n socket: any;\r\n destroy(error?: Error): void;\r\n body: string | Buffer;\r\n path: string;\r\n method: string;\r\n ip?: string;\r\n header: (field: string) => string | undefined;\r\n}\r\n\r\n/** An HTTP server response object.\r\n * @public\r\n */\r\nexport interface HttpServerResponse extends Writable {\r\n send(body?: any): HttpServerResponse;\r\n status(code: number): HttpServerResponse;\r\n set(field: string, value: string): void;\r\n}\r\n\r\n/** The HTTP application protocol.\r\n * @internal\r\n */\r\nexport abstract class WebAppRpcProtocol extends RpcProtocol {\r\n public override preserveStreams = true;\r\n\r\n private _initialized: Promise<void> | undefined;\r\n\r\n /** @internal */\r\n public allowedHeaders: Set<string> = new Set();\r\n\r\n /** @internal */\r\n public async initialize() {\r\n if (this._initialized) {\r\n return this._initialized;\r\n }\r\n\r\n return this._initialized = new Promise(async (resolve) => {\r\n try {\r\n const request = InitializeInterface.createRequest(this);\r\n const response = await request.preflight();\r\n if (response && response.ok) {\r\n (response.headers.get(\"Access-Control-Allow-Headers\") || \"\").split(\",\").forEach((v) => this.allowedHeaders.add(v.trim()));\r\n }\r\n } catch (err) {\r\n Logger.logWarning(CommonLoggerCategory.RpcInterfaceFrontend, \"Unable to discover backend capabilities.\", BentleyError.getErrorProps(err));\r\n }\r\n\r\n resolve();\r\n });\r\n }\r\n\r\n /** Convenience handler for an RPC operation get request for an HTTP server. */\r\n public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n return this.handleOperationPostRequest(req, res);\r\n }\r\n\r\n /** Convenience handler for an RPC operation post request for an HTTP server. */\r\n public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n const request = await WebAppRpcRequest.parseRequest(this, req);\r\n const fulfillment = await this.fulfill(request);\r\n await WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);\r\n }\r\n\r\n /** Convenience handler for an OpenAPI description request for an HTTP server. */\r\n public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {\r\n const description = JSON.stringify(this.openAPIDescription);\r\n res.send(description);\r\n }\r\n\r\n /** Converts an HTTP content type value to an RPC content type value. */\r\n public static computeContentType(httpType: string | null | undefined): RpcContentType {\r\n if (!httpType)\r\n return RpcContentType.Unknown;\r\n\r\n if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {\r\n return RpcContentType.Text;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.BINARY) === 0) {\r\n return RpcContentType.Binary;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.MULTIPART) === 0) {\r\n return RpcContentType.Multipart;\r\n } else {\r\n return RpcContentType.Unknown;\r\n }\r\n }\r\n\r\n /** The OpenAPI-compatible info object for this protocol. */\r\n public abstract info: OpenAPIInfo;\r\n\r\n /** An optional prefix for RPC operation URI paths. */\r\n public pathPrefix: string = \"\";\r\n\r\n /** The RPC request class for this protocol. */\r\n public readonly requestType = WebAppRpcRequest;\r\n\r\n /** Supplies the status corresponding to a protocol-specific code value. */\r\n public override getStatus(code: number): RpcRequestStatus {\r\n switch (code) {\r\n case 404: return RpcRequestStatus.NotFound;\r\n case 202: return RpcRequestStatus.Pending;\r\n case 200: return RpcRequestStatus.Resolved;\r\n case 500: return RpcRequestStatus.Rejected;\r\n case 204: return RpcRequestStatus.NoContent;\r\n case 502: return RpcRequestStatus.BadGateway;\r\n case 503: return RpcRequestStatus.ServiceUnavailable;\r\n case 504: return RpcRequestStatus.GatewayTimeout;\r\n default: return RpcRequestStatus.Unknown;\r\n }\r\n }\r\n\r\n /** Supplies the protocol-specific code corresponding to a status value. */\r\n public override getCode(status: RpcRequestStatus): number {\r\n switch (status) {\r\n case RpcRequestStatus.NotFound: return 404;\r\n case RpcRequestStatus.Pending: return 202;\r\n case RpcRequestStatus.Resolved: return 200;\r\n case RpcRequestStatus.Rejected: return 500;\r\n case RpcRequestStatus.NoContent: return 204;\r\n case RpcRequestStatus.BadGateway: return 502;\r\n case RpcRequestStatus.ServiceUnavailable: return 503;\r\n case RpcRequestStatus.GatewayTimeout: return 504;\r\n default: return 501;\r\n }\r\n }\r\n\r\n public override supportsStatusCategory = true;\r\n\r\n /** Whether an HTTP status code indicates a request timeout. */\r\n public isTimeout(code: number): boolean {\r\n return code === 504;\r\n }\r\n\r\n /** An OpenAPI-compatible description of this protocol.\r\n * @internal\r\n */\r\n public get openAPIDescription() { return new RpcOpenAPIDescription(this); }\r\n\r\n /** Returns the OpenAPI-compatible URI path parameters for an RPC operation.\r\n * @internal\r\n */\r\n public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[];\r\n\r\n /** Constructs an HTTP protocol. */\r\n public constructor(configuration: RpcConfiguration) {\r\n super(configuration);\r\n this.events.addListener(WebAppRpcLogging.logProtocolEvent);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"WebAppRpcProtocol.js","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcProtocol.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,uDAA2F;AAE3F,qDAAkD;AAClD,uCAAiF;AACjF,yDAAsD;AACtD,yDAAsD;AAsCtD;;GAEG;AACH,MAAsB,iBAAkB,SAAQ,yBAAW;IA6FzD,mCAAmC;IACnC,YAAmB,aAA+B;QAChD,KAAK,CAAC,a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AQ,CAAC,CAAC,OAAO,GAAG,CAAC;YAC3C,KAAK,+BAAgB,CAAC,SAAS,CAAC,CAAC,OAAO,GAAG,CAAC;YAC5C,KAAK,+BAAgB,CAAC,UAAU,CAAC,CAAC,OAAO,GAAG,CAAC;YAC7C,KAAK,+BAAgB,CAAC,kBAAkB,CAAC,CAAC,OAAO,GAAG,CAAC;YACrD,KAAK,+BAAgB,CAAC,cAAc,CAAC,CAAC,OAAO,GAAG,CAAC;YACjD,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC;SACrB;IACH,CAAC;IAID,+DAA+D;IACxD,SAAS,CAAC,IAAY;QAC3B,OAAO,IAAI,KAAK,GAAG,CAAC;IACtB,CAAC;IAED;;OAEG;IACH,IAAW,kBAAkB,KAAK,OAAO,IAAI,+BAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAY5E;AAlGD,8CAkGC","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 { Readable, Writable } from \"stream\";\r\nimport { RpcConfiguration } from \"../core/RpcConfiguration\";\r\nimport { RpcContentType, RpcRequestStatus, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\r\nimport { RpcOperation } from \"../core/RpcOperation\";\r\nimport { RpcProtocol } from \"../core/RpcProtocol\";\r\nimport { OpenAPIInfo, OpenAPIParameter, RpcOpenAPIDescription } from \"./OpenAPI\";\r\nimport { WebAppRpcLogging } from \"./WebAppRpcLogging\";\r\nimport { WebAppRpcRequest } from \"./WebAppRpcRequest\";\r\n\r\n/** An HTTP server request object.\r\n * @public\r\n */\r\nexport interface HttpServerRequest extends Readable {\r\n aborted: boolean;\r\n httpVersion: string;\r\n httpVersionMajor: number;\r\n httpVersionMinor: number;\r\n complete: boolean;\r\n connection: any;\r\n headers: { [header: string]: string | string[] | undefined };\r\n rawHeaders: string[];\r\n trailers: { [key: string]: string | undefined };\r\n rawTrailers: string[];\r\n setTimeout(msecs: number, callback: () => void): this;\r\n url?: string;\r\n statusCode?: number;\r\n statusMessage?: string;\r\n socket: any;\r\n destroy(error?: Error): void;\r\n body: string | Buffer;\r\n path: string;\r\n method: string;\r\n ip?: string;\r\n header: (field: string) => string | undefined;\r\n}\r\n\r\n/** An HTTP server response object.\r\n * @public\r\n */\r\nexport interface HttpServerResponse extends Writable {\r\n send(body?: any): HttpServerResponse;\r\n status(code: number): HttpServerResponse;\r\n set(field: string, value: string): void;\r\n}\r\n\r\n/** The HTTP application protocol.\r\n * @internal\r\n */\r\nexport abstract class WebAppRpcProtocol extends RpcProtocol {\r\n public override preserveStreams = true;\r\n\r\n /** Convenience handler for an RPC operation get request for an HTTP server. */\r\n public async handleOperationGetRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n return this.handleOperationPostRequest(req, res);\r\n }\r\n\r\n /** Convenience handler for an RPC operation post request for an HTTP server. */\r\n public async handleOperationPostRequest(req: HttpServerRequest, res: HttpServerResponse) {\r\n const request = await WebAppRpcRequest.parseRequest(this, req);\r\n const fulfillment = await this.fulfill(request);\r\n await WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);\r\n }\r\n\r\n /** Convenience handler for an OpenAPI description request for an HTTP server. */\r\n public handleOpenApiDescriptionRequest(_req: HttpServerRequest, res: HttpServerResponse) {\r\n const description = JSON.stringify(this.openAPIDescription);\r\n res.send(description);\r\n }\r\n\r\n /** Converts an HTTP content type value to an RPC content type value. */\r\n public static computeContentType(httpType: string | null | undefined): RpcContentType {\r\n if (!httpType)\r\n return RpcContentType.Unknown;\r\n\r\n if (httpType.indexOf(WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {\r\n return RpcContentType.Text;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.BINARY) === 0) {\r\n return RpcContentType.Binary;\r\n } else if (httpType.indexOf(WEB_RPC_CONSTANTS.MULTIPART) === 0) {\r\n return RpcContentType.Multipart;\r\n } else {\r\n return RpcContentType.Unknown;\r\n }\r\n }\r\n\r\n /** The OpenAPI-compatible info object for this protocol. */\r\n public abstract info: OpenAPIInfo;\r\n\r\n /** An optional prefix for RPC operation URI paths. */\r\n public pathPrefix: string = \"\";\r\n\r\n /** The RPC request class for this protocol. */\r\n public readonly requestType = WebAppRpcRequest;\r\n\r\n /** Supplies the status corresponding to a protocol-specific code value. */\r\n public override getStatus(code: number): RpcRequestStatus {\r\n switch (code) {\r\n case 404: return RpcRequestStatus.NotFound;\r\n case 202: return RpcRequestStatus.Pending;\r\n case 200: return RpcRequestStatus.Resolved;\r\n case 500: return RpcRequestStatus.Rejected;\r\n case 204: return RpcRequestStatus.NoContent;\r\n case 502: return RpcRequestStatus.BadGateway;\r\n case 503: return RpcRequestStatus.ServiceUnavailable;\r\n case 504: return RpcRequestStatus.GatewayTimeout;\r\n default: return RpcRequestStatus.Unknown;\r\n }\r\n }\r\n\r\n /** Supplies the protocol-specific code corresponding to a status value. */\r\n public override getCode(status: RpcRequestStatus): number {\r\n switch (status) {\r\n case RpcRequestStatus.NotFound: return 404;\r\n case RpcRequestStatus.Pending: return 202;\r\n case RpcRequestStatus.Resolved: return 200;\r\n case RpcRequestStatus.Rejected: return 500;\r\n case RpcRequestStatus.NoContent: return 204;\r\n case RpcRequestStatus.BadGateway: return 502;\r\n case RpcRequestStatus.ServiceUnavailable: return 503;\r\n case RpcRequestStatus.GatewayTimeout: return 504;\r\n default: return 501;\r\n }\r\n }\r\n\r\n public override supportsStatusCategory = true;\r\n\r\n /** Whether an HTTP status code indicates a request timeout. */\r\n public isTimeout(code: number): boolean {\r\n return code === 504;\r\n }\r\n\r\n /** An OpenAPI-compatible description of this protocol.\r\n * @internal\r\n */\r\n public get openAPIDescription() { return new RpcOpenAPIDescription(this); }\r\n\r\n /** Returns the OpenAPI-compatible URI path parameters for an RPC operation.\r\n * @internal\r\n */\r\n public abstract supplyPathParametersForOperation(_operation: RpcOperation): OpenAPIParameter[];\r\n\r\n /** Constructs an HTTP protocol. */\r\n public constructor(configuration: RpcConfiguration) {\r\n super(configuration);\r\n this.events.addListener(WebAppRpcLogging.logProtocolEvent);\r\n }\r\n}\r\n"]}
@@ -18,6 +18,8 @@ export declare class WebAppRpcRequest extends RpcRequest {
18
18
  private _pathSuffix;
19
19
  private get _headers();
20
20
  /** The maximum size permitted for an encoded component in a URL.
21
+ * Note that some backends limit the total cumulative request size. Our current node backends accept requests with a max size of 16 kb.
22
+ * In addition to the url size, an authorization header may also add considerably to the request size.
21
23
  * @note This is used for features like encoding the payload of a cacheable request in the URL.
22
24
  */
23
25
  static maxUrlComponentSize: number;
@@ -40,9 +42,6 @@ export declare class WebAppRpcRequest extends RpcRequest {
40
42
  protected static computeTransportType(value: RpcSerializedValue, source: any): RpcContentType;
41
43
  /** Constructs a web application request. */
42
44
  constructor(client: RpcInterface, operation: string, parameters: any[]);
43
- /** @internal */
44
- preflight(): Promise<Response | undefined>;
45
- protected isHeaderAvailable(name: string): boolean;
46
45
  /** Sets request header values. */
47
46
  protected setHeader(name: string, value: string): void;
48
47
  /** Sends the request. */
@@ -1 +1 @@
1
- {"version":3,"file":"WebAppRpcRequest.d.ts","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcRequest.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAkF,MAAM,sBAAsB,CAAC;AAEtI,OAAO,EAA0B,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAe,qBAAqB,EAA0B,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACvH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE/F,gBAAgB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BAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;cAqB3C,qBAAqB,CAAC,IAAI,EAAE,MAAM;cAQrC,IAAI,IAAI,OAAO,CAAC,kBAAkB,CAAC;IA2CnD,sDAAsD;IACtD,SAAS,CAAC,WAAW,IAAI,OAAO,KAAK;IAIrC,wDAAwD;IACxD,SAAS,CAAC,aAAa,IAAI,OAAO,OAAO;IAIzC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA6BhC,OAAO,CAAC,MAAM,CAAC,aAAa;IAK5B,OAAO,CAAC,MAAM,CAAC,eAAe;IAM9B,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAYjC,OAAO,CAAC,MAAM,CAAC,eAAe;IAI9B,OAAO,CAAC,MAAM,CAAC,aAAa;mBAKP,aAAa;YAapB,YAAY;YAkBZ,QAAQ;YAMR,UAAU;YAMV,aAAa;YAMb,cAAc;IAa5B,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,kBAAkB;CAiB3B"}
@@ -134,27 +134,12 @@ class WebAppRpcRequest extends RpcRequest_1.RpcRequest {
134
134
  return RpcConstants_1.RpcContentType.Text;
135
135
  }
136
136
  }
137
- /** @internal */
138
- async preflight() {
139
- this.method = "options";
140
- this._request.method = "options";
141
- await this.setHeaders();
142
- await this.send();
143
- return this._response;
144
- }
145
- isHeaderAvailable(name) {
146
- const allowed = this.protocol.allowedHeaders;
147
- return allowed.has("*") || allowed.has(name);
148
- }
149
137
  /** Sets request header values. */
150
138
  setHeader(name, value) {
151
139
  this._headers[name] = value;
152
140
  }
153
141
  /** Sends the request. */
154
142
  async send() {
155
- if (this.method !== "options") {
156
- await this.protocol.initialize();
157
- }
158
143
  this._loading = true;
159
144
  await this.setupTransport();
160
145
  return new Promise(async (resolve, reject) => {
@@ -241,8 +226,29 @@ class WebAppRpcRequest extends RpcRequest_1.RpcRequest {
241
226
  }
242
227
  static configureResponse(protocol, request, fulfillment, res) {
243
228
  const success = protocol.getStatus(fulfillment.status) === RpcConstants_1.RpcRequestStatus.Resolved;
229
+ // TODO: Use stale-while-revalidate in cache headers. This needs to be tested, and does not currently have support in the router/caching-service.
230
+ // This will allow browsers to use stale cached responses while also revalidating with the router, allowing us to start up a backend if necessary.
231
+ // RPC Caching Service uses the s-maxage header to determine the TTL for the redis cache.
232
+ const oneHourInSeconds = 3600;
244
233
  if (success && request.caching === RpcConstants_1.RpcResponseCacheControl.Immutable) {
245
- res.set("Cache-Control", "private, max-age=31536000, immutable");
234
+ // If response size is > 50 MB, do not cache it.
235
+ if (fulfillment.result.objects.length > (50 * 10 ** 7)) {
236
+ res.set("Cache-Control", "no-store");
237
+ }
238
+ else if (request.operation.operationName === "generateTileContent") {
239
+ res.set("Cache-Control", "no-store");
240
+ }
241
+ else if (request.operation.operationName === "getConnectionProps") {
242
+ // GetConnectionprops can't be cached on the browser longer than the lifespan of the backend. The lifespan of backend may shrink too. Keep it at 1 second to be safe.
243
+ res.set("Cache-Control", `s-maxage=${oneHourInSeconds * 24}, max-age=1, immutable`);
244
+ }
245
+ else if (request.operation.operationName === "getTileCacheContainerUrl") {
246
+ // getTileCacheContainerUrl returns a SAS with an expiry of 23:59:59. We can't exceed that time when setting the max-age.
247
+ res.set("Cache-Control", `s-maxage=${oneHourInSeconds * 23}, max-age=${oneHourInSeconds * 23}, immutable`);
248
+ }
249
+ else {
250
+ res.set("Cache-Control", `s-maxage=${oneHourInSeconds * 24}, max-age=${oneHourInSeconds * 48}, immutable`);
251
+ }
246
252
  }
247
253
  if (fulfillment.retry) {
248
254
  res.set("Retry-After", fulfillment.retry);
@@ -319,9 +325,6 @@ class WebAppRpcRequest extends RpcRequest_1.RpcRequest {
319
325
  return value;
320
326
  }
321
327
  async setupTransport() {
322
- if (this.method === "options") {
323
- return;
324
- }
325
328
  const parameters = (await this.protocol.serialize(this)).parameters;
326
329
  const transportType = WebAppRpcRequest.computeTransportType(parameters, this.parameters);
327
330
  if (transportType === RpcConstants_1.RpcContentType.Binary) {
@@ -364,7 +367,9 @@ class WebAppRpcRequest extends RpcRequest_1.RpcRequest {
364
367
  }
365
368
  exports.WebAppRpcRequest = WebAppRpcRequest;
366
369
  /** The maximum size permitted for an encoded component in a URL.
370
+ * Note that some backends limit the total cumulative request size. Our current node backends accept requests with a max size of 16 kb.
371
+ * In addition to the url size, an authorization header may also add considerably to the request size.
367
372
  * @note This is used for features like encoding the payload of a cacheable request in the URL.
368
373
  */
369
- WebAppRpcRequest.maxUrlComponentSize = 4096;
374
+ WebAppRpcRequest.maxUrlComponentSize = 1024 * 8;
370
375
  //# sourceMappingURL=WebAppRpcRequest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebAppRpcRequest.js","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcRequest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoD;AACpD,mCAAgC;AAChC,mDAAiF;AAEjF,uDAAsI;AAEtI,yDAAmF;AACnF,qDAAuH;AACvH,mDAAgD;AAChD,uEAAoE;AACpE,iDAAgE;AAChE,2DAA+F;AAK/F;;GAEG;AACH,MAAa,gBAAiB,SAAQ,uBAAU;IAiI9C,4CAA4C;IAC5C,YAAmB,MAAoB,EAAE,SAAiB,EAAE,UAAiB;QAC3E,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QAlI/B,aAAQ,GAAY,KAAK,CAAC;QAC1B,aAAQ,GAAgB,EAAE,CAAC;QAC3B,gBAAW,GAAW,EAAE,CAAC;QAWjC,0DAA0D;QACjC,aAAQ,GAAsB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAe,CAAC;QAEjG,+FAA+F;QACxF,aAAQ,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QAkH3C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,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,CAAC;IAC1C,CAAC;IAEO,uBAAuB,CAAC,UAA8B;QAC5D,oGAAoG;QACpG,OAAO,IAAI,CAAC,QAAQ,CAAC,gCAAiB,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,2BAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC3D,CAAC;IAEO,kBAAkB,CAAC,UAA8B;QACvD,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE;YACpD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,8CAA8C;YAC5F,IAAI,WAAW,CAAC,MAAM,IAAI,gBAAgB,CAAC,mBAAmB,EAAE;gBAC9D,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC;gBAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC;gBAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,gCAAiB,CAAC,OAAO,CAAC,CAAC;gBAChD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;gBAC/B,OAAO;aACR;SACF;QAED,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,gCAAiB,CAAC,OAAO,CAAC,GAAG,gCAAiB,CAAC,IAAI,CAAC;QAClE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;QAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC;IAC1C,CAAC;;AA3YH,4CA4YC;AAtYC;;GAEG;AACW,oCAAmB,GAAG,IAAI,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 { BentleyStatus } from \"@itwin/core-bentley\";\r\nimport { Buffer } from \"buffer\";\r\nimport { IModelError, ServerError, ServerTimeoutError } from \"../../IModelError\";\r\nimport { RpcInterface } from \"../../RpcInterface\";\r\nimport { RpcContentType, RpcProtocolEvent, RpcRequestStatus, RpcResponseCacheControl, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\r\nimport { SerializedRpcActivity } from \"../core/RpcInvocation\";\r\nimport { MarshalingBinaryMarker, RpcSerializedValue } from \"../core/RpcMarshaling\";\r\nimport { RpcProtocol, RpcRequestFulfillment, SerializedRpcOperation, SerializedRpcRequest } from \"../core/RpcProtocol\";\r\nimport { RpcRequest } from \"../core/RpcRequest\";\r\nimport { RpcMultipartParser } from \"./multipart/RpcMultipartParser\";\r\nimport { ReadableFormData, RpcMultipart } from \"./RpcMultipart\";\r\nimport { HttpServerRequest, HttpServerResponse, WebAppRpcProtocol } from \"./WebAppRpcProtocol\";\r\n\r\n/** @internal */\r\nexport type HttpMethod_T = \"get\" | \"put\" | \"post\" | \"delete\" | \"options\" | \"head\" | \"patch\" | \"trace\"; // eslint-disable-line @typescript-eslint/naming-convention\r\n\r\n/** A web application RPC request.\r\n * @internal\r\n */\r\nexport class WebAppRpcRequest extends RpcRequest {\r\n private _loading: boolean = false;\r\n private _request: RequestInit = {};\r\n private _pathSuffix: string = \"\";\r\n private get _headers() { return this._request.headers as { [key: string]: string }; }\r\n\r\n /** The maximum size permitted for an encoded component in a URL.\r\n * @note This is used for features like encoding the payload of a cacheable request in the URL.\r\n */\r\n public static maxUrlComponentSize = 4096;\r\n\r\n /** The HTTP method for this request. */\r\n public override method: HttpMethod_T;\r\n\r\n /** Convenience access to the protocol of this request. */\r\n public override readonly protocol: WebAppRpcProtocol = this.client.configuration.protocol as any;\r\n\r\n /** Standardized access to metadata about the request (useful for purposes such as logging). */\r\n public metadata = { status: 0, message: \"\" };\r\n\r\n /** Parse headers */\r\n private static parseHeaders(protocol: WebAppRpcProtocol, req: HttpServerRequest): SerializedRpcActivity {\r\n const headerNames: SerializedRpcActivity = protocol.serializedClientRequestContextHeaderNames;\r\n const parsedHeaders: SerializedRpcActivity = {\r\n id: req.header(headerNames.id) || \"\",\r\n applicationId: req.header(headerNames.applicationId) || \"\",\r\n applicationVersion: req.header(headerNames.applicationVersion) || \"\",\r\n sessionId: req.header(headerNames.sessionId) || \"\",\r\n authorization: (headerNames.authorization ? req.header(headerNames.authorization) : \"\") ?? \"\",\r\n };\r\n return parsedHeaders;\r\n }\r\n\r\n /** Parses a request. */\r\n public static async parseRequest(protocol: WebAppRpcProtocol, req: HttpServerRequest): Promise<SerializedRpcRequest> {\r\n const operation = protocol.getOperationFromPath(req.url!);\r\n\r\n const parsedHeaders = this.parseHeaders(protocol, req);\r\n\r\n const request: SerializedRpcRequest = {\r\n ...parsedHeaders,\r\n operation: {\r\n interfaceDefinition: operation.interfaceDefinition,\r\n operationName: operation.operationName,\r\n interfaceVersion: operation.interfaceVersion,\r\n },\r\n method: req.method,\r\n path: req.url!,\r\n parameters: operation.encodedRequest ? WebAppRpcRequest.parseFromPath(operation) : await WebAppRpcRequest.parseFromBody(req),\r\n caching: operation.encodedRequest ? RpcResponseCacheControl.Immutable : RpcResponseCacheControl.None,\r\n };\r\n\r\n request.ip = req.ip;\r\n\r\n request.protocolVersion = 0;\r\n\r\n if (protocol.protocolVersionHeaderName) {\r\n const version = req.header(protocol.protocolVersionHeaderName);\r\n if (version) {\r\n request.protocolVersion = parseInt(version, 10);\r\n }\r\n }\r\n\r\n if (!request.id) {\r\n throw new IModelError(BentleyStatus.ERROR, `Invalid request.`);\r\n }\r\n\r\n return request;\r\n }\r\n\r\n /** Sends the response for a web request. */\r\n public static async sendResponse(\r\n protocol: WebAppRpcProtocol,\r\n request: SerializedRpcRequest,\r\n fulfillment: RpcRequestFulfillment,\r\n req: HttpServerRequest,\r\n res: HttpServerResponse,\r\n ): Promise<void> {\r\n const versionHeader = protocol.protocolVersionHeaderName;\r\n if (versionHeader && RpcProtocol.protocolVersion) {\r\n res.set(versionHeader, RpcProtocol.protocolVersion.toString());\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const { Readable, Stream } = await import(/* webpackIgnore: true */ \"stream\");\r\n const { createGzip } = await import(/* webpackIgnore: true */ \"zlib\");\r\n\r\n const transportType = WebAppRpcRequest.computeTransportType(fulfillment.result, fulfillment.rawResult);\r\n let responseBody;\r\n if (transportType === RpcContentType.Binary) {\r\n responseBody = WebAppRpcRequest.configureBinary(fulfillment, res);\r\n } else if (transportType === RpcContentType.Multipart) {\r\n responseBody = WebAppRpcRequest.configureMultipart(fulfillment, res);\r\n } else if (transportType === RpcContentType.Stream) {\r\n responseBody = WebAppRpcRequest.configureStream(fulfillment);\r\n } else {\r\n responseBody = WebAppRpcRequest.configureText(fulfillment, res);\r\n }\r\n\r\n WebAppRpcRequest.configureResponse(protocol, request, fulfillment, res);\r\n res.status(fulfillment.status);\r\n\r\n if (fulfillment.allowCompression && req.header(\"Accept-Encoding\")?.includes(\"gzip\")) {\r\n res.set(\"Content-Encoding\", \"gzip\");\r\n const readableResponseBody = (responseBody instanceof Stream) ? responseBody : Readable.from(responseBody);\r\n responseBody = readableResponseBody.pipe(createGzip());\r\n }\r\n\r\n // This check should in theory look for instances of Readable, but that would break backend implementation at\r\n // core/backend/src/RpcBackend.ts\r\n if (responseBody instanceof Stream) {\r\n responseBody.pipe(res);\r\n } else {\r\n res.send(responseBody);\r\n }\r\n }\r\n\r\n /** Determines the most efficient transport type for an RPC value. */\r\n protected static computeTransportType(value: RpcSerializedValue, source: any): RpcContentType {\r\n if (source instanceof Uint8Array || (Array.isArray(source) && source[0] instanceof Uint8Array)) {\r\n return RpcContentType.Binary;\r\n } else if (value.data.length > 0) {\r\n return RpcContentType.Multipart;\r\n } else if (value.stream) {\r\n return RpcContentType.Stream;\r\n } else {\r\n return RpcContentType.Text;\r\n }\r\n }\r\n\r\n /** Constructs a web application request. */\r\n public constructor(client: RpcInterface, operation: string, parameters: any[]) {\r\n super(client, operation, parameters);\r\n this.path = this.protocol.supplyPathForOperation(this.operation, this);\r\n this.method = \"head\";\r\n this._request.headers = {};\r\n }\r\n\r\n /** @internal */\r\n public async preflight(): Promise<Response | undefined> {\r\n this.method = \"options\";\r\n this._request.method = \"options\";\r\n await this.setHeaders();\r\n await this.send();\r\n return this._response;\r\n }\r\n\r\n protected override isHeaderAvailable(name: string): boolean {\r\n const allowed = this.protocol.allowedHeaders;\r\n return allowed.has(\"*\") || allowed.has(name);\r\n }\r\n\r\n /** Sets request header values. */\r\n protected setHeader(name: string, value: string): void {\r\n this._headers[name] = value;\r\n }\r\n\r\n /** Sends the request. */\r\n protected async send(): Promise<number> {\r\n if (this.method !== \"options\") {\r\n await this.protocol.initialize();\r\n }\r\n\r\n this._loading = true;\r\n await this.setupTransport();\r\n\r\n return new Promise<number>(async (resolve, reject) => {\r\n try {\r\n resolve(await this.performFetch());\r\n } catch (reason) {\r\n reject(new ServerError(-1, typeof (reason) === \"string\" ? reason : \"Server connection error.\"));\r\n }\r\n });\r\n }\r\n\r\n protected override computeRetryAfter(attempts: number): number {\r\n const retryAfter = this._response && this._response.headers.get(\"Retry-After\");\r\n if (retryAfter) {\r\n this.resetTransientFaultCount();\r\n\r\n const r = Number(retryAfter);\r\n if (Number.isFinite(r)) {\r\n return r * 1000;\r\n }\r\n\r\n const d = Date.parse(retryAfter);\r\n if (!Number.isNaN(d)) {\r\n return d - Date.now();\r\n }\r\n } else {\r\n this.recordTransientFault();\r\n }\r\n\r\n return super.computeRetryAfter(attempts);\r\n }\r\n\r\n protected override handleUnknownResponse(code: number) {\r\n if (this.protocol.isTimeout(code)) {\r\n this.reject(new ServerTimeoutError(\"Request timeout.\"));\r\n } else {\r\n this.reject(new ServerError(code, \"Unknown server response code.\"));\r\n }\r\n }\r\n\r\n protected async load(): Promise<RpcSerializedValue> {\r\n return new Promise<RpcSerializedValue>(async (resolve, reject) => {\r\n try {\r\n if (!this._loading)\r\n return;\r\n\r\n const response = this._response;\r\n if (!response) {\r\n reject(new IModelError(BentleyStatus.ERROR, \"Invalid state.\"));\r\n return;\r\n }\r\n\r\n if (this.protocol.protocolVersionHeaderName) {\r\n const version = response.headers.get(this.protocol.protocolVersionHeaderName);\r\n if (version) {\r\n this.responseProtocolVersion = parseInt(version, 10);\r\n }\r\n }\r\n\r\n const contentType = response.headers.get(WEB_RPC_CONSTANTS.CONTENT);\r\n const responseType = WebAppRpcProtocol.computeContentType(contentType);\r\n\r\n if (responseType === RpcContentType.Binary) {\r\n resolve(await this.loadBinary(response));\r\n } else if (responseType === RpcContentType.Multipart) {\r\n resolve(await this.loadMultipart(response, contentType!));\r\n } else {\r\n resolve(await this.loadText(response));\r\n }\r\n\r\n this._loading = false;\r\n this.setLastUpdatedTime();\r\n this.protocol.events.raiseEvent(RpcProtocolEvent.ResponseLoaded, this);\r\n } catch (reason) {\r\n if (!this._loading)\r\n return;\r\n\r\n this._loading = false;\r\n reject(new ServerError(this.metadata.status, typeof (reason) === \"string\" ? reason : \"Unknown server response error.\"));\r\n }\r\n });\r\n }\r\n\r\n /** Override to supply an alternate fetch function. */\r\n protected supplyFetch(): typeof fetch {\r\n return fetch;\r\n }\r\n\r\n /** Override to supply an alternate Request function. */\r\n protected supplyRequest(): typeof Request {\r\n return Request;\r\n }\r\n\r\n private static configureResponse(protocol: WebAppRpcProtocol, request: SerializedRpcRequest, fulfillment: RpcRequestFulfillment, res: HttpServerResponse) {\r\n const success = protocol.getStatus(fulfillment.status) === RpcRequestStatus.Resolved;\r\n\r\n if (success && request.caching === RpcResponseCacheControl.Immutable) {\r\n res.set(\"Cache-Control\", \"private, max-age=31536000, immutable\");\r\n }\r\n\r\n if (fulfillment.retry) {\r\n res.set(\"Retry-After\", fulfillment.retry);\r\n }\r\n }\r\n\r\n private static configureText(fulfillment: RpcRequestFulfillment, res: HttpServerResponse): string {\r\n res.set(WEB_RPC_CONSTANTS.CONTENT, WEB_RPC_CONSTANTS.TEXT);\r\n return (fulfillment.status === 204) ? \"\" : fulfillment.result.objects;\r\n }\r\n\r\n private static configureBinary(fulfillment: RpcRequestFulfillment, res: HttpServerResponse): Buffer {\r\n res.set(WEB_RPC_CONSTANTS.CONTENT, WEB_RPC_CONSTANTS.BINARY);\r\n const data = fulfillment.result.data[0];\r\n return Buffer.isBuffer(data) ? data : Buffer.from(data);\r\n }\r\n\r\n private static configureMultipart(fulfillment: RpcRequestFulfillment, res: HttpServerResponse): ReadableFormData {\r\n const response = RpcMultipart.createStream(fulfillment.result);\r\n const headers = response.getHeaders();\r\n for (const header in headers) {\r\n if (headers.hasOwnProperty(header)) {\r\n res.set(header, headers[header]);\r\n }\r\n }\r\n\r\n return response;\r\n }\r\n\r\n private static configureStream(fulfillment: RpcRequestFulfillment) {\r\n return fulfillment.result.stream!;\r\n }\r\n\r\n private static parseFromPath(operation: SerializedRpcOperation): RpcSerializedValue {\r\n const decoded = operation.encodedRequest ? Buffer.from(operation.encodedRequest, \"base64\").toString(\"binary\") : \"\";\r\n return RpcSerializedValue.create(decoded);\r\n }\r\n\r\n private static async parseFromBody(req: HttpServerRequest): Promise<RpcSerializedValue> {\r\n const contentType = WebAppRpcProtocol.computeContentType(req.header(WEB_RPC_CONSTANTS.CONTENT));\r\n if (contentType === RpcContentType.Binary) {\r\n const objects = JSON.stringify([MarshalingBinaryMarker.createDefault()]);\r\n const data = [req.body as Buffer];\r\n return RpcSerializedValue.create(objects, data);\r\n } else if (contentType === RpcContentType.Multipart) {\r\n return RpcMultipart.parseRequest(req);\r\n } else {\r\n return RpcSerializedValue.create(req.body as string);\r\n }\r\n }\r\n\r\n private async performFetch(): Promise<number> {\r\n const requestClass = this.supplyRequest();\r\n const fetchFunction = this.supplyFetch();\r\n\r\n const path = new URL(this.path, typeof (location) !== \"undefined\" ? location.origin : undefined);\r\n if (this._pathSuffix) {\r\n const params = new URLSearchParams();\r\n params.set(\"parameters\", this._pathSuffix);\r\n path.search = `?${params.toString()}`;\r\n }\r\n\r\n const request = new requestClass(path.toString(), this._request);\r\n const response = await fetchFunction(request);\r\n this._response = response;\r\n this.metadata.status = response.status;\r\n return response.status;\r\n }\r\n\r\n private async loadText(response: Response) {\r\n const value = await response.text();\r\n this.metadata.message = value;\r\n return RpcSerializedValue.create(value);\r\n }\r\n\r\n private async loadBinary(response: Response) {\r\n const value = new Uint8Array(await response.arrayBuffer());\r\n const objects = JSON.stringify(MarshalingBinaryMarker.createDefault());\r\n return RpcSerializedValue.create(objects, [value]);\r\n }\r\n\r\n private async loadMultipart(response: Response, contentType: string) {\r\n const data = await response.arrayBuffer();\r\n const value = new RpcMultipartParser(contentType, Buffer.from(data)).parse();\r\n return value;\r\n }\r\n\r\n private async setupTransport(): Promise<void> {\r\n if (this.method === \"options\") {\r\n return;\r\n }\r\n\r\n const parameters = (await this.protocol.serialize(this)).parameters;\r\n const transportType = WebAppRpcRequest.computeTransportType(parameters, this.parameters);\r\n\r\n if (transportType === RpcContentType.Binary) {\r\n this.setupBinaryTransport(parameters);\r\n } else if (transportType === RpcContentType.Multipart) {\r\n this.setupMultipartTransport(parameters);\r\n } else {\r\n this.setupTextTransport(parameters);\r\n }\r\n }\r\n\r\n private setupBinaryTransport(parameters: RpcSerializedValue) {\r\n this._headers[WEB_RPC_CONSTANTS.CONTENT] = WEB_RPC_CONSTANTS.BINARY;\r\n this._request.method = \"post\";\r\n this._request.body = parameters.data[0];\r\n }\r\n\r\n private setupMultipartTransport(parameters: RpcSerializedValue) {\r\n // IMPORTANT: do not set a multipart Content-Type header value. The browser does this automatically!\r\n delete this._headers[WEB_RPC_CONSTANTS.CONTENT];\r\n this._request.method = \"post\";\r\n this._request.body = RpcMultipart.createForm(parameters);\r\n }\r\n\r\n private setupTextTransport(parameters: RpcSerializedValue) {\r\n if (this.operation.policy.allowResponseCaching(this)) {\r\n const encodedBody = btoa(parameters.objects); // eslint-disable-line deprecation/deprecation\r\n if (encodedBody.length <= WebAppRpcRequest.maxUrlComponentSize) {\r\n this._request.method = \"get\";\r\n this._request.body = undefined;\r\n delete this._headers[WEB_RPC_CONSTANTS.CONTENT];\r\n this._pathSuffix = encodedBody;\r\n return;\r\n }\r\n }\r\n\r\n this._pathSuffix = \"\";\r\n this._headers[WEB_RPC_CONSTANTS.CONTENT] = WEB_RPC_CONSTANTS.TEXT;\r\n this._request.method = \"post\";\r\n this._request.body = parameters.objects;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"WebAppRpcRequest.js","sourceRoot":"","sources":["../../../../src/rpc/web/WebAppRpcRequest.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoD;AACpD,mCAAgC;AAChC,mDAAiF;AAEjF,uDAAsI;AAEtI,yDAAmF;AACnF,qDAAuH;AACvH,mDAAgD;AAChD,uEAAoE;AACpE,iDAAgE;AAChE,2DAA+F;AAK/F;;GAEG;AACH,MAAa,gBAAiB,SAAQ,uBAAU;IAmI9C,4CAA4C;IAC5C,YAAmB,MAAoB,EAAE,SAAiB,EAAE,UAAiB;QAC3E,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;QApI/B,aAAQ,GAAY,KAAK,CAAC;QAC1B,aAAQ,GAAgB,EAAE,CAAC;QAC3B,gBAAW,GAAW,EAAE,CAAC;QAajC,0DAA0D;QACjC,aAAQ,GAAsB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,QAAe,CAAC;QAEjG,+FAA+F;QACxF,aAAQ,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QAkH3C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,OAAO,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AAG,CAAC,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 { BentleyStatus } from \"@itwin/core-bentley\";\r\nimport { Buffer } from \"buffer\";\r\nimport { IModelError, ServerError, ServerTimeoutError } from \"../../IModelError\";\r\nimport { RpcInterface } from \"../../RpcInterface\";\r\nimport { RpcContentType, RpcProtocolEvent, RpcRequestStatus, RpcResponseCacheControl, WEB_RPC_CONSTANTS } from \"../core/RpcConstants\";\r\nimport { SerializedRpcActivity } from \"../core/RpcInvocation\";\r\nimport { MarshalingBinaryMarker, RpcSerializedValue } from \"../core/RpcMarshaling\";\r\nimport { RpcProtocol, RpcRequestFulfillment, SerializedRpcOperation, SerializedRpcRequest } from \"../core/RpcProtocol\";\r\nimport { RpcRequest } from \"../core/RpcRequest\";\r\nimport { RpcMultipartParser } from \"./multipart/RpcMultipartParser\";\r\nimport { ReadableFormData, RpcMultipart } from \"./RpcMultipart\";\r\nimport { HttpServerRequest, HttpServerResponse, WebAppRpcProtocol } from \"./WebAppRpcProtocol\";\r\n\r\n/** @internal */\r\nexport type HttpMethod_T = \"get\" | \"put\" | \"post\" | \"delete\" | \"options\" | \"head\" | \"patch\" | \"trace\"; // eslint-disable-line @typescript-eslint/naming-convention\r\n\r\n/** A web application RPC request.\r\n * @internal\r\n */\r\nexport class WebAppRpcRequest extends RpcRequest {\r\n private _loading: boolean = false;\r\n private _request: RequestInit = {};\r\n private _pathSuffix: string = \"\";\r\n private get _headers() { return this._request.headers as { [key: string]: string }; }\r\n\r\n /** The maximum size permitted for an encoded component in a URL.\r\n * Note that some backends limit the total cumulative request size. Our current node backends accept requests with a max size of 16 kb.\r\n * In addition to the url size, an authorization header may also add considerably to the request size.\r\n * @note This is used for features like encoding the payload of a cacheable request in the URL.\r\n */\r\n public static maxUrlComponentSize = 1024 * 8;\r\n\r\n /** The HTTP method for this request. */\r\n public override method: HttpMethod_T;\r\n\r\n /** Convenience access to the protocol of this request. */\r\n public override readonly protocol: WebAppRpcProtocol = this.client.configuration.protocol as any;\r\n\r\n /** Standardized access to metadata about the request (useful for purposes such as logging). */\r\n public metadata = { status: 0, message: \"\" };\r\n\r\n /** Parse headers */\r\n private static parseHeaders(protocol: WebAppRpcProtocol, req: HttpServerRequest): SerializedRpcActivity {\r\n const headerNames: SerializedRpcActivity = protocol.serializedClientRequestContextHeaderNames;\r\n const parsedHeaders: SerializedRpcActivity = {\r\n id: req.header(headerNames.id) || \"\",\r\n applicationId: req.header(headerNames.applicationId) || \"\",\r\n applicationVersion: req.header(headerNames.applicationVersion) || \"\",\r\n sessionId: req.header(headerNames.sessionId) || \"\",\r\n authorization: (headerNames.authorization ? req.header(headerNames.authorization) : \"\") ?? \"\",\r\n };\r\n return parsedHeaders;\r\n }\r\n\r\n /** Parses a request. */\r\n public static async parseRequest(protocol: WebAppRpcProtocol, req: HttpServerRequest): Promise<SerializedRpcRequest> {\r\n const operation = protocol.getOperationFromPath(req.url!);\r\n\r\n const parsedHeaders = this.parseHeaders(protocol, req);\r\n\r\n const request: SerializedRpcRequest = {\r\n ...parsedHeaders,\r\n operation: {\r\n interfaceDefinition: operation.interfaceDefinition,\r\n operationName: operation.operationName,\r\n interfaceVersion: operation.interfaceVersion,\r\n },\r\n method: req.method,\r\n path: req.url!,\r\n parameters: operation.encodedRequest ? WebAppRpcRequest.parseFromPath(operation) : await WebAppRpcRequest.parseFromBody(req),\r\n caching: operation.encodedRequest ? RpcResponseCacheControl.Immutable : RpcResponseCacheControl.None,\r\n };\r\n\r\n request.ip = req.ip;\r\n\r\n request.protocolVersion = 0;\r\n\r\n if (protocol.protocolVersionHeaderName) {\r\n const version = req.header(protocol.protocolVersionHeaderName);\r\n if (version) {\r\n request.protocolVersion = parseInt(version, 10);\r\n }\r\n }\r\n\r\n if (!request.id) {\r\n throw new IModelError(BentleyStatus.ERROR, `Invalid request.`);\r\n }\r\n\r\n return request;\r\n }\r\n\r\n /** Sends the response for a web request. */\r\n public static async sendResponse(\r\n protocol: WebAppRpcProtocol,\r\n request: SerializedRpcRequest,\r\n fulfillment: RpcRequestFulfillment,\r\n req: HttpServerRequest,\r\n res: HttpServerResponse,\r\n ): Promise<void> {\r\n const versionHeader = protocol.protocolVersionHeaderName;\r\n if (versionHeader && RpcProtocol.protocolVersion) {\r\n res.set(versionHeader, RpcProtocol.protocolVersion.toString());\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const { Readable, Stream } = await import(/* webpackIgnore: true */ \"stream\");\r\n const { createGzip } = await import(/* webpackIgnore: true */ \"zlib\");\r\n\r\n const transportType = WebAppRpcRequest.computeTransportType(fulfillment.result, fulfillment.rawResult);\r\n let responseBody;\r\n if (transportType === RpcContentType.Binary) {\r\n responseBody = WebAppRpcRequest.configureBinary(fulfillment, res);\r\n } else if (transportType === RpcContentType.Multipart) {\r\n responseBody = WebAppRpcRequest.configureMultipart(fulfillment, res);\r\n } else if (transportType === RpcContentType.Stream) {\r\n responseBody = WebAppRpcRequest.configureStream(fulfillment);\r\n } else {\r\n responseBody = WebAppRpcRequest.configureText(fulfillment, res);\r\n }\r\n\r\n WebAppRpcRequest.configureResponse(protocol, request, fulfillment, res);\r\n res.status(fulfillment.status);\r\n\r\n if (fulfillment.allowCompression && req.header(\"Accept-Encoding\")?.includes(\"gzip\")) {\r\n res.set(\"Content-Encoding\", \"gzip\");\r\n const readableResponseBody = (responseBody instanceof Stream) ? responseBody : Readable.from(responseBody);\r\n responseBody = readableResponseBody.pipe(createGzip());\r\n }\r\n\r\n // This check should in theory look for instances of Readable, but that would break backend implementation at\r\n // core/backend/src/RpcBackend.ts\r\n if (responseBody instanceof Stream) {\r\n responseBody.pipe(res);\r\n } else {\r\n res.send(responseBody);\r\n }\r\n }\r\n\r\n /** Determines the most efficient transport type for an RPC value. */\r\n protected static computeTransportType(value: RpcSerializedValue, source: any): RpcContentType {\r\n if (source instanceof Uint8Array || (Array.isArray(source) && source[0] instanceof Uint8Array)) {\r\n return RpcContentType.Binary;\r\n } else if (value.data.length > 0) {\r\n return RpcContentType.Multipart;\r\n } else if (value.stream) {\r\n return RpcContentType.Stream;\r\n } else {\r\n return RpcContentType.Text;\r\n }\r\n }\r\n\r\n /** Constructs a web application request. */\r\n public constructor(client: RpcInterface, operation: string, parameters: any[]) {\r\n super(client, operation, parameters);\r\n this.path = this.protocol.supplyPathForOperation(this.operation, this);\r\n this.method = \"head\";\r\n this._request.headers = {};\r\n }\r\n\r\n /** Sets request header values. */\r\n protected setHeader(name: string, value: string): void {\r\n this._headers[name] = value;\r\n }\r\n\r\n /** Sends the request. */\r\n protected async send(): Promise<number> {\r\n this._loading = true;\r\n await this.setupTransport();\r\n\r\n return new Promise<number>(async (resolve, reject) => {\r\n try {\r\n resolve(await this.performFetch());\r\n } catch (reason) {\r\n reject(new ServerError(-1, typeof (reason) === \"string\" ? reason : \"Server connection error.\"));\r\n }\r\n });\r\n }\r\n\r\n protected override computeRetryAfter(attempts: number): number {\r\n const retryAfter = this._response && this._response.headers.get(\"Retry-After\");\r\n if (retryAfter) {\r\n this.resetTransientFaultCount();\r\n\r\n const r = Number(retryAfter);\r\n if (Number.isFinite(r)) {\r\n return r * 1000;\r\n }\r\n\r\n const d = Date.parse(retryAfter);\r\n if (!Number.isNaN(d)) {\r\n return d - Date.now();\r\n }\r\n } else {\r\n this.recordTransientFault();\r\n }\r\n\r\n return super.computeRetryAfter(attempts);\r\n }\r\n\r\n protected override handleUnknownResponse(code: number) {\r\n if (this.protocol.isTimeout(code)) {\r\n this.reject(new ServerTimeoutError(\"Request timeout.\"));\r\n } else {\r\n this.reject(new ServerError(code, \"Unknown server response code.\"));\r\n }\r\n }\r\n\r\n protected async load(): Promise<RpcSerializedValue> {\r\n return new Promise<RpcSerializedValue>(async (resolve, reject) => {\r\n try {\r\n if (!this._loading)\r\n return;\r\n\r\n const response = this._response;\r\n if (!response) {\r\n reject(new IModelError(BentleyStatus.ERROR, \"Invalid state.\"));\r\n return;\r\n }\r\n\r\n if (this.protocol.protocolVersionHeaderName) {\r\n const version = response.headers.get(this.protocol.protocolVersionHeaderName);\r\n if (version) {\r\n this.responseProtocolVersion = parseInt(version, 10);\r\n }\r\n }\r\n\r\n const contentType = response.headers.get(WEB_RPC_CONSTANTS.CONTENT);\r\n const responseType = WebAppRpcProtocol.computeContentType(contentType);\r\n\r\n if (responseType === RpcContentType.Binary) {\r\n resolve(await this.loadBinary(response));\r\n } else if (responseType === RpcContentType.Multipart) {\r\n resolve(await this.loadMultipart(response, contentType!));\r\n } else {\r\n resolve(await this.loadText(response));\r\n }\r\n\r\n this._loading = false;\r\n this.setLastUpdatedTime();\r\n this.protocol.events.raiseEvent(RpcProtocolEvent.ResponseLoaded, this);\r\n } catch (reason) {\r\n if (!this._loading)\r\n return;\r\n\r\n this._loading = false;\r\n reject(new ServerError(this.metadata.status, typeof (reason) === \"string\" ? reason : \"Unknown server response error.\"));\r\n }\r\n });\r\n }\r\n\r\n /** Override to supply an alternate fetch function. */\r\n protected supplyFetch(): typeof fetch {\r\n return fetch;\r\n }\r\n\r\n /** Override to supply an alternate Request function. */\r\n protected supplyRequest(): typeof Request {\r\n return Request;\r\n }\r\n\r\n private static configureResponse(protocol: WebAppRpcProtocol, request: SerializedRpcRequest, fulfillment: RpcRequestFulfillment, res: HttpServerResponse) {\r\n const success = protocol.getStatus(fulfillment.status) === RpcRequestStatus.Resolved;\r\n // TODO: Use stale-while-revalidate in cache headers. This needs to be tested, and does not currently have support in the router/caching-service.\r\n // This will allow browsers to use stale cached responses while also revalidating with the router, allowing us to start up a backend if necessary.\r\n\r\n // RPC Caching Service uses the s-maxage header to determine the TTL for the redis cache.\r\n const oneHourInSeconds = 3600;\r\n if (success && request.caching === RpcResponseCacheControl.Immutable) {\r\n // If response size is > 50 MB, do not cache it.\r\n if (fulfillment.result.objects.length > (50 * 10**7)) {\r\n res.set(\"Cache-Control\", \"no-store\");\r\n } else if (request.operation.operationName === \"generateTileContent\") {\r\n res.set(\"Cache-Control\", \"no-store\");\r\n } else if (request.operation.operationName === \"getConnectionProps\") {\r\n // GetConnectionprops can't be cached on the browser longer than the lifespan of the backend. The lifespan of backend may shrink too. Keep it at 1 second to be safe.\r\n res.set(\"Cache-Control\", `s-maxage=${oneHourInSeconds * 24}, max-age=1, immutable`);\r\n } else if (request.operation.operationName === \"getTileCacheContainerUrl\") {\r\n // getTileCacheContainerUrl returns a SAS with an expiry of 23:59:59. We can't exceed that time when setting the max-age.\r\n res.set(\"Cache-Control\", `s-maxage=${oneHourInSeconds * 23}, max-age=${oneHourInSeconds * 23}, immutable`);\r\n } else {\r\n res.set(\"Cache-Control\", `s-maxage=${oneHourInSeconds * 24}, max-age=${oneHourInSeconds * 48}, immutable`);\r\n }\r\n }\r\n\r\n if (fulfillment.retry) {\r\n res.set(\"Retry-After\", fulfillment.retry);\r\n }\r\n }\r\n\r\n private static configureText(fulfillment: RpcRequestFulfillment, res: HttpServerResponse): string {\r\n res.set(WEB_RPC_CONSTANTS.CONTENT, WEB_RPC_CONSTANTS.TEXT);\r\n return (fulfillment.status === 204) ? \"\" : fulfillment.result.objects;\r\n }\r\n\r\n private static configureBinary(fulfillment: RpcRequestFulfillment, res: HttpServerResponse): Buffer {\r\n res.set(WEB_RPC_CONSTANTS.CONTENT, WEB_RPC_CONSTANTS.BINARY);\r\n const data = fulfillment.result.data[0];\r\n return Buffer.isBuffer(data) ? data : Buffer.from(data);\r\n }\r\n\r\n private static configureMultipart(fulfillment: RpcRequestFulfillment, res: HttpServerResponse): ReadableFormData {\r\n const response = RpcMultipart.createStream(fulfillment.result);\r\n const headers = response.getHeaders();\r\n for (const header in headers) {\r\n if (headers.hasOwnProperty(header)) {\r\n res.set(header, headers[header]);\r\n }\r\n }\r\n\r\n return response;\r\n }\r\n\r\n private static configureStream(fulfillment: RpcRequestFulfillment) {\r\n return fulfillment.result.stream!;\r\n }\r\n\r\n private static parseFromPath(operation: SerializedRpcOperation): RpcSerializedValue {\r\n const decoded = operation.encodedRequest ? Buffer.from(operation.encodedRequest, \"base64\").toString(\"binary\") : \"\";\r\n return RpcSerializedValue.create(decoded);\r\n }\r\n\r\n private static async parseFromBody(req: HttpServerRequest): Promise<RpcSerializedValue> {\r\n const contentType = WebAppRpcProtocol.computeContentType(req.header(WEB_RPC_CONSTANTS.CONTENT));\r\n if (contentType === RpcContentType.Binary) {\r\n const objects = JSON.stringify([MarshalingBinaryMarker.createDefault()]);\r\n const data = [req.body as Buffer];\r\n return RpcSerializedValue.create(objects, data);\r\n } else if (contentType === RpcContentType.Multipart) {\r\n return RpcMultipart.parseRequest(req);\r\n } else {\r\n return RpcSerializedValue.create(req.body as string);\r\n }\r\n }\r\n\r\n private async performFetch(): Promise<number> {\r\n const requestClass = this.supplyRequest();\r\n const fetchFunction = this.supplyFetch();\r\n\r\n const path = new URL(this.path, typeof (location) !== \"undefined\" ? location.origin : undefined);\r\n if (this._pathSuffix) {\r\n const params = new URLSearchParams();\r\n params.set(\"parameters\", this._pathSuffix);\r\n path.search = `?${params.toString()}`;\r\n }\r\n\r\n const request = new requestClass(path.toString(), this._request);\r\n const response = await fetchFunction(request);\r\n this._response = response;\r\n this.metadata.status = response.status;\r\n return response.status;\r\n }\r\n\r\n private async loadText(response: Response) {\r\n const value = await response.text();\r\n this.metadata.message = value;\r\n return RpcSerializedValue.create(value);\r\n }\r\n\r\n private async loadBinary(response: Response) {\r\n const value = new Uint8Array(await response.arrayBuffer());\r\n const objects = JSON.stringify(MarshalingBinaryMarker.createDefault());\r\n return RpcSerializedValue.create(objects, [value]);\r\n }\r\n\r\n private async loadMultipart(response: Response, contentType: string) {\r\n const data = await response.arrayBuffer();\r\n const value = new RpcMultipartParser(contentType, Buffer.from(data)).parse();\r\n return value;\r\n }\r\n\r\n private async setupTransport(): Promise<void> {\r\n const parameters = (await this.protocol.serialize(this)).parameters;\r\n const transportType = WebAppRpcRequest.computeTransportType(parameters, this.parameters);\r\n\r\n if (transportType === RpcContentType.Binary) {\r\n this.setupBinaryTransport(parameters);\r\n } else if (transportType === RpcContentType.Multipart) {\r\n this.setupMultipartTransport(parameters);\r\n } else {\r\n this.setupTextTransport(parameters);\r\n }\r\n }\r\n\r\n private setupBinaryTransport(parameters: RpcSerializedValue) {\r\n this._headers[WEB_RPC_CONSTANTS.CONTENT] = WEB_RPC_CONSTANTS.BINARY;\r\n this._request.method = \"post\";\r\n this._request.body = parameters.data[0];\r\n }\r\n\r\n private setupMultipartTransport(parameters: RpcSerializedValue) {\r\n // IMPORTANT: do not set a multipart Content-Type header value. The browser does this automatically!\r\n delete this._headers[WEB_RPC_CONSTANTS.CONTENT];\r\n this._request.method = \"post\";\r\n this._request.body = RpcMultipart.createForm(parameters);\r\n }\r\n\r\n private setupTextTransport(parameters: RpcSerializedValue) {\r\n if (this.operation.policy.allowResponseCaching(this)) {\r\n const encodedBody = btoa(parameters.objects); // eslint-disable-line deprecation/deprecation\r\n if (encodedBody.length <= WebAppRpcRequest.maxUrlComponentSize) {\r\n this._request.method = \"get\";\r\n this._request.body = undefined;\r\n delete this._headers[WEB_RPC_CONSTANTS.CONTENT];\r\n this._pathSuffix = encodedBody;\r\n return;\r\n }\r\n }\r\n\r\n this._pathSuffix = \"\";\r\n this._headers[WEB_RPC_CONSTANTS.CONTENT] = WEB_RPC_CONSTANTS.TEXT;\r\n this._request.method = \"post\";\r\n this._request.body = parameters.objects;\r\n }\r\n}\r\n"]}
@@ -47,6 +47,10 @@ export interface GraphicsRequestProps {
47
47
  * @see [ClipVector.toCompactString]($core-geometry) to produce the string representation.
48
48
  */
49
49
  readonly sectionCut?: string;
50
+ /** If true, vertex positions will be quantized to [[QPoint3d]]s to conserve space at the expense of accuracy. Quantization may produce
51
+ * perceptible inaccuracies when producing graphics for large and/or highly-detailed elements.
52
+ */
53
+ quantizePositions?: boolean;
50
54
  }
51
55
  /** Wire format describing a request to produce graphics in "iMdl" format for a single element.
52
56
  * @see [[ElementGraphicsRequestProps]] for more details.
@@ -1 +1 @@
1
- {"version":3,"file":"ElementGraphics.d.ts","sourceRoot":"","sources":["../../../src/tile/ElementGraphics.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,yGAAyG;IACzG,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,+IAA+I;IAC/I,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,yIAAyI;IACzI,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;IACnC,gEAAgE;IAChE,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,4FAA4F;IAC5F,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IACxC;;;OAGG;IACH,QAAQ,CAAC,UAA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,8BAA8B,GAAG,6BAA6B,GAAG,6BAA6B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ElementGraphics.js","sourceRoot":"","sources":["../../../src/tile/ElementGraphics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Tile\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { TransformProps } from \"@itwin/core-geometry\";\r\nimport { Placement2dProps, Placement3dProps } from \"../ElementProps\";\r\nimport { ElementGeometryDataEntry } from \"../geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"../geometry/GeometryStream\";\r\nimport { ContentFlags, TreeFlags } from \"../tile/TileMetadata\";\r\n\r\n/** Wire format describing properties common to [[PersistentGraphicsRequestProps]] and [[DynamicGraphicsRequestProps]].\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicsRequestProps {\r\n /** Uniquely identifies this request among all [[ElementGraphicsRequestProps]] for a given [[IModel]]. */\r\n readonly id: string;\r\n /** Log10 of the chord tolerance with which to stroke the element's geometry. e.g., for a chord tolerance of 0.01 (10^-2) meters, supply -2. */\r\n readonly toleranceLog10: number;\r\n /** The major version of the \"iMdl\" format to use when producing the iMdl representation of the element's geometry.\r\n * If omitted, the most recent version known to the backend will be used.\r\n * @alpha\r\n */\r\n readonly formatVersion?: number;\r\n /** Optional flags. [[TreeFlags.UseProjectExtents]] has no effect. [[TreeFlags.EnforceDisplayPriority]] is not yet implemented. @alpha */\r\n readonly treeFlags?: TreeFlags;\r\n /** Optional flags. [[ContentFlags.ImprovedElision]] has no effect. @alpha */\r\n readonly contentFlags?: ContentFlags;\r\n /** Transform from element graphics to world coordinates. Defaults to identity. */\r\n readonly location?: TransformProps;\r\n /** If true, surface edges will be omitted from the graphics. */\r\n readonly omitEdges?: boolean;\r\n /** If omitEdges is false, specifies the type of edges to produce. Generally determined by TileAdmin.requestElementGraphics.\r\n * @note This uses the deleted EdgeType enum where 1 indicates non-indexed edges and 2 indicates indexed edges, to avoid breaking the RPC API.\r\n * @internal\r\n */\r\n readonly edgeType?: 1 | 2;\r\n /** If true, and omitEdges is false, a polyface with no edge visibility info will display edges for all faces;\r\n * if false, edges will be inferred from the polyface's topology.\r\n * @internal\r\n */\r\n readonly smoothPolyfaceEdges?: boolean;\r\n /** If true, the element's graphics will be clipped against the iModel's project extents. */\r\n readonly clipToProjectExtents?: boolean;\r\n /** If defined, the compact string representation of a [ClipVector]($core-geometry) to be applied to the geometry to produce section-cut\r\n * geometry at the intersections with the clip planes. Any geometry *not* intersecting the clip planes is omitted from the tiles.\r\n * @see [ClipVector.toCompactString]($core-geometry) to produce the string representation.\r\n */\r\n readonly sectionCut?: string;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a single element.\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PersistentGraphicsRequestProps extends GraphicsRequestProps {\r\n /** The element whose geometry is to be used to generate the graphics. */\r\n readonly elementId: Id64String;\r\n}\r\n\r\n/** As part of a [[DynamicGraphicsRequestProps]], specifies the geometry from which to generate the graphics in JSON format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface JsonGeometryStream {\r\n /** Discriminator for [[DynamicGraphicsRequestProps.geometry]]. */\r\n format: \"json\";\r\n /** The geometry stream in JSON format. */\r\n data: GeometryStreamProps;\r\n}\r\n\r\n/** As part of a [[DynamicGraphicsRequestProps]], specifies the geometry from which to generate the graphics in binary flatbuffer-encoded format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FlatBufferGeometryStream {\r\n /** Discriminator for [[DynamicGraphicsRequestProps.geometry]]. */\r\n format: \"flatbuffer\";\r\n /** The geometry stream in flatbuffer format. */\r\n data: ElementGeometryDataEntry[];\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a single geometry stream.\r\n * @see [[DynamicGraphicsRequest2dProps]] and [[DynamicGraphicsRequest3dProps]].\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DynamicGraphicsRequestProps extends GraphicsRequestProps {\r\n /** The geometry from which to generate the graphics. */\r\n readonly geometry: JsonGeometryStream | FlatBufferGeometryStream;\r\n /** The category to which the geometry belongs. This is required to identify a persistent [SpatialCategory]($backend) for 3d geometry or\r\n * [DrawingCategory]($backend) for 2d geometry.\r\n */\r\n readonly categoryId: Id64String;\r\n /** If specified, tools will recognize the generated graphics as being associated with this element. */\r\n readonly elementId?: Id64String;\r\n /** If specified, tools will recognize the generated graphics as being associated with this model.\r\n * It should identify a 3d model for 3d geometry or a 2d model for 2d geometry.\r\n * It needn't identify a persistent model - it can be a transient Id.\r\n */\r\n readonly modelId?: Id64String;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a 2d geometry stream.\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DynamicGraphicsRequest2dProps extends DynamicGraphicsRequestProps {\r\n /** Specifies the geometry is 2d. */\r\n readonly type: \"2d\";\r\n /** The origin and rotation of the geometry. */\r\n readonly placement: Omit<Placement2dProps, \"bbox\">;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a 3d geometry stream.\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DynamicGraphicsRequest3dProps extends DynamicGraphicsRequestProps {\r\n /** Specifies the geometry is 3d. */\r\n readonly type: \"3d\";\r\n /** The origin and rotation of the geometry. */\r\n readonly placement: Omit<Placement3dProps, \"bbox\">;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a single element or geometry stream.\r\n * @note Every request must have an `id` that is unique amongst all extant requests for a given [[IModel]].\r\n * @see [TileAdmin.requestElementGraphics]($frontend) and [IModelDb.generateElementGraphics]($backend) to fulfill such a request.\r\n * @see [readElementGraphics]($frontend) to convert the result of a request to a [RenderGraphic]($frontend) for display.\r\n * @public\r\n * @extensions\r\n */\r\nexport type ElementGraphicsRequestProps = PersistentGraphicsRequestProps | DynamicGraphicsRequest2dProps | DynamicGraphicsRequest3dProps;\r\n"]}
1
+ {"version":3,"file":"ElementGraphics.js","sourceRoot":"","sources":["../../../src/tile/ElementGraphics.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Tile\r\n */\r\n\r\nimport { Id64String } from \"@itwin/core-bentley\";\r\nimport { TransformProps } from \"@itwin/core-geometry\";\r\nimport { Placement2dProps, Placement3dProps } from \"../ElementProps\";\r\nimport { ElementGeometryDataEntry } from \"../geometry/ElementGeometry\";\r\nimport { GeometryStreamProps } from \"../geometry/GeometryStream\";\r\nimport { ContentFlags, TreeFlags } from \"../tile/TileMetadata\";\r\n\r\n/** Wire format describing properties common to [[PersistentGraphicsRequestProps]] and [[DynamicGraphicsRequestProps]].\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface GraphicsRequestProps {\r\n /** Uniquely identifies this request among all [[ElementGraphicsRequestProps]] for a given [[IModel]]. */\r\n readonly id: string;\r\n /** Log10 of the chord tolerance with which to stroke the element's geometry. e.g., for a chord tolerance of 0.01 (10^-2) meters, supply -2. */\r\n readonly toleranceLog10: number;\r\n /** The major version of the \"iMdl\" format to use when producing the iMdl representation of the element's geometry.\r\n * If omitted, the most recent version known to the backend will be used.\r\n * @alpha\r\n */\r\n readonly formatVersion?: number;\r\n /** Optional flags. [[TreeFlags.UseProjectExtents]] has no effect. [[TreeFlags.EnforceDisplayPriority]] is not yet implemented. @alpha */\r\n readonly treeFlags?: TreeFlags;\r\n /** Optional flags. [[ContentFlags.ImprovedElision]] has no effect. @alpha */\r\n readonly contentFlags?: ContentFlags;\r\n /** Transform from element graphics to world coordinates. Defaults to identity. */\r\n readonly location?: TransformProps;\r\n /** If true, surface edges will be omitted from the graphics. */\r\n readonly omitEdges?: boolean;\r\n /** If omitEdges is false, specifies the type of edges to produce. Generally determined by TileAdmin.requestElementGraphics.\r\n * @note This uses the deleted EdgeType enum where 1 indicates non-indexed edges and 2 indicates indexed edges, to avoid breaking the RPC API.\r\n * @internal\r\n */\r\n readonly edgeType?: 1 | 2;\r\n /** If true, and omitEdges is false, a polyface with no edge visibility info will display edges for all faces;\r\n * if false, edges will be inferred from the polyface's topology.\r\n * @internal\r\n */\r\n readonly smoothPolyfaceEdges?: boolean;\r\n /** If true, the element's graphics will be clipped against the iModel's project extents. */\r\n readonly clipToProjectExtents?: boolean;\r\n /** If defined, the compact string representation of a [ClipVector]($core-geometry) to be applied to the geometry to produce section-cut\r\n * geometry at the intersections with the clip planes. Any geometry *not* intersecting the clip planes is omitted from the tiles.\r\n * @see [ClipVector.toCompactString]($core-geometry) to produce the string representation.\r\n */\r\n readonly sectionCut?: string;\r\n /** If true, vertex positions will be quantized to [[QPoint3d]]s to conserve space at the expense of accuracy. Quantization may produce\r\n * perceptible inaccuracies when producing graphics for large and/or highly-detailed elements.\r\n */\r\n quantizePositions?: boolean;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a single element.\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface PersistentGraphicsRequestProps extends GraphicsRequestProps {\r\n /** The element whose geometry is to be used to generate the graphics. */\r\n readonly elementId: Id64String;\r\n}\r\n\r\n/** As part of a [[DynamicGraphicsRequestProps]], specifies the geometry from which to generate the graphics in JSON format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface JsonGeometryStream {\r\n /** Discriminator for [[DynamicGraphicsRequestProps.geometry]]. */\r\n format: \"json\";\r\n /** The geometry stream in JSON format. */\r\n data: GeometryStreamProps;\r\n}\r\n\r\n/** As part of a [[DynamicGraphicsRequestProps]], specifies the geometry from which to generate the graphics in binary flatbuffer-encoded format.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FlatBufferGeometryStream {\r\n /** Discriminator for [[DynamicGraphicsRequestProps.geometry]]. */\r\n format: \"flatbuffer\";\r\n /** The geometry stream in flatbuffer format. */\r\n data: ElementGeometryDataEntry[];\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a single geometry stream.\r\n * @see [[DynamicGraphicsRequest2dProps]] and [[DynamicGraphicsRequest3dProps]].\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DynamicGraphicsRequestProps extends GraphicsRequestProps {\r\n /** The geometry from which to generate the graphics. */\r\n readonly geometry: JsonGeometryStream | FlatBufferGeometryStream;\r\n /** The category to which the geometry belongs. This is required to identify a persistent [SpatialCategory]($backend) for 3d geometry or\r\n * [DrawingCategory]($backend) for 2d geometry.\r\n */\r\n readonly categoryId: Id64String;\r\n /** If specified, tools will recognize the generated graphics as being associated with this element. */\r\n readonly elementId?: Id64String;\r\n /** If specified, tools will recognize the generated graphics as being associated with this model.\r\n * It should identify a 3d model for 3d geometry or a 2d model for 2d geometry.\r\n * It needn't identify a persistent model - it can be a transient Id.\r\n */\r\n readonly modelId?: Id64String;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a 2d geometry stream.\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DynamicGraphicsRequest2dProps extends DynamicGraphicsRequestProps {\r\n /** Specifies the geometry is 2d. */\r\n readonly type: \"2d\";\r\n /** The origin and rotation of the geometry. */\r\n readonly placement: Omit<Placement2dProps, \"bbox\">;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a 3d geometry stream.\r\n * @see [[ElementGraphicsRequestProps]] for more details.\r\n * @public\r\n * @extensions\r\n */\r\nexport interface DynamicGraphicsRequest3dProps extends DynamicGraphicsRequestProps {\r\n /** Specifies the geometry is 3d. */\r\n readonly type: \"3d\";\r\n /** The origin and rotation of the geometry. */\r\n readonly placement: Omit<Placement3dProps, \"bbox\">;\r\n}\r\n\r\n/** Wire format describing a request to produce graphics in \"iMdl\" format for a single element or geometry stream.\r\n * @note Every request must have an `id` that is unique amongst all extant requests for a given [[IModel]].\r\n * @see [TileAdmin.requestElementGraphics]($frontend) and [IModelDb.generateElementGraphics]($backend) to fulfill such a request.\r\n * @see [readElementGraphics]($frontend) to convert the result of a request to a [RenderGraphic]($frontend) for display.\r\n * @public\r\n * @extensions\r\n */\r\nexport type ElementGraphicsRequestProps = PersistentGraphicsRequestProps | DynamicGraphicsRequest2dProps | DynamicGraphicsRequest3dProps;\r\n"]}
@@ -25,13 +25,13 @@ export declare enum CurrentImdlVersion {
25
25
  * front-end is not capable of reading the tile content. Otherwise, this front-end can read the tile content even if the header specifies a
26
26
  * greater minor version than CurrentVersion.Minor, although some data may be skipped.
27
27
  */
28
- Major = 28,
28
+ Major = 29,
29
29
  /** The unsigned 16-bit minor version number. If the major version in the tile header is equal to CurrentVersion.Major, then this package can
30
30
  * read the tile content even if the minor version in the tile header is greater than this value, although some data may be skipped.
31
31
  */
32
32
  Minor = 0,
33
33
  /** The unsigned 32-bit version number derived from the 16-bit major and minor version numbers. */
34
- Combined = 1835008
34
+ Combined = 1900544
35
35
  }
36
36
  /** Header embedded at the beginning of binary tile data in iMdl format describing its contents.
37
37
  * @internal
@@ -34,13 +34,13 @@ var CurrentImdlVersion;
34
34
  * front-end is not capable of reading the tile content. Otherwise, this front-end can read the tile content even if the header specifies a
35
35
  * greater minor version than CurrentVersion.Minor, although some data may be skipped.
36
36
  */
37
- CurrentImdlVersion[CurrentImdlVersion["Major"] = 28] = "Major";
37
+ CurrentImdlVersion[CurrentImdlVersion["Major"] = 29] = "Major";
38
38
  /** The unsigned 16-bit minor version number. If the major version in the tile header is equal to CurrentVersion.Major, then this package can
39
39
  * read the tile content even if the minor version in the tile header is greater than this value, although some data may be skipped.
40
40
  */
41
41
  CurrentImdlVersion[CurrentImdlVersion["Minor"] = 0] = "Minor";
42
42
  /** The unsigned 32-bit version number derived from the 16-bit major and minor version numbers. */
43
- CurrentImdlVersion[CurrentImdlVersion["Combined"] = 1835008] = "Combined";
43
+ CurrentImdlVersion[CurrentImdlVersion["Combined"] = 1900544] = "Combined";
44
44
  })(CurrentImdlVersion = exports.CurrentImdlVersion || (exports.CurrentImdlVersion = {}));
45
45
  /** Header embedded at the beginning of binary tile data in iMdl format describing its contents.
46
46
  * @internal