@everysk/apps-sdk 0.1.0 → 0.3.0-beta-20261016180126

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 (349) hide show
  1. package/README.md +395 -8
  2. package/dist/EveryskApp.d.ts +34 -2
  3. package/dist/EveryskApp.d.ts.map +1 -1
  4. package/dist/EveryskApp.js +35 -2
  5. package/dist/EveryskApp.js.map +1 -1
  6. package/dist/agGrid/handleRowsScrollEnd.d.ts +53 -0
  7. package/dist/agGrid/handleRowsScrollEnd.d.ts.map +1 -0
  8. package/dist/agGrid/handleRowsScrollEnd.js +47 -0
  9. package/dist/agGrid/handleRowsScrollEnd.js.map +1 -0
  10. package/dist/agGrid/index.d.ts +2 -0
  11. package/dist/agGrid/index.d.ts.map +1 -1
  12. package/dist/agGrid/index.js +2 -1
  13. package/dist/api/datastore.d.ts +10 -8
  14. package/dist/api/datastore.d.ts.map +1 -1
  15. package/dist/api/datastore.js +24 -55
  16. package/dist/api/datastore.js.map +1 -1
  17. package/dist/api/entityQuery.d.ts +46 -41
  18. package/dist/api/entityQuery.d.ts.map +1 -1
  19. package/dist/api/entityQuery.js +55 -14
  20. package/dist/api/entityQuery.js.map +1 -1
  21. package/dist/api/file.d.ts +26 -9
  22. package/dist/api/file.d.ts.map +1 -1
  23. package/dist/api/file.js +45 -55
  24. package/dist/api/file.js.map +1 -1
  25. package/dist/api/portfolio.d.ts +11 -8
  26. package/dist/api/portfolio.d.ts.map +1 -1
  27. package/dist/api/portfolio.js +24 -55
  28. package/dist/api/portfolio.js.map +1 -1
  29. package/dist/api/profile.d.ts +3 -2
  30. package/dist/api/profile.d.ts.map +1 -1
  31. package/dist/api/profile.js +4 -9
  32. package/dist/api/profile.js.map +1 -1
  33. package/dist/api/request.d.ts +106 -0
  34. package/dist/api/request.d.ts.map +1 -0
  35. package/dist/api/request.js +132 -0
  36. package/dist/api/request.js.map +1 -0
  37. package/dist/api/websocketsConfig.d.ts +7 -2
  38. package/dist/api/websocketsConfig.d.ts.map +1 -1
  39. package/dist/api/websocketsConfig.js +2 -10
  40. package/dist/api/websocketsConfig.js.map +1 -1
  41. package/dist/api/workflow.d.ts +84 -89
  42. package/dist/api/workflow.d.ts.map +1 -1
  43. package/dist/api/workflow.js +121 -208
  44. package/dist/api/workflow.js.map +1 -1
  45. package/dist/api/workspace.d.ts +18 -8
  46. package/dist/api/workspace.d.ts.map +1 -1
  47. package/dist/api/workspace.js +21 -26
  48. package/dist/api/workspace.js.map +1 -1
  49. package/dist/components/ui/Footer/index.d.ts.map +1 -1
  50. package/dist/components/ui/Footer/index.js.map +1 -1
  51. package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -1
  52. package/dist/components/ui/GlobalLoading/index.js.map +1 -1
  53. package/dist/components/ui/PageContainer/index.d.ts +1 -1
  54. package/dist/components/ui/PageContainer/index.d.ts.map +1 -1
  55. package/dist/components/ui/PageContainer/index.js.map +1 -1
  56. package/dist/components/ui/Toolbar/index.d.ts +40 -3
  57. package/dist/components/ui/Toolbar/index.d.ts.map +1 -1
  58. package/dist/components/ui/Toolbar/index.js +42 -15
  59. package/dist/components/ui/Toolbar/index.js.map +1 -1
  60. package/dist/contexts/appAlertContext/provider.js.map +1 -1
  61. package/dist/contexts/appAlertContext/types.d.ts.map +1 -1
  62. package/dist/contexts/appConfigContext/index.d.ts.map +1 -1
  63. package/dist/contexts/appConfigContext/index.js.map +1 -1
  64. package/dist/contexts/appConfigContext/provider.d.ts.map +1 -1
  65. package/dist/contexts/appConfigContext/provider.js.map +1 -1
  66. package/dist/contexts/webSocketContext/handler.d.ts +3 -2
  67. package/dist/contexts/webSocketContext/handler.d.ts.map +1 -1
  68. package/dist/contexts/webSocketContext/handler.js.map +1 -1
  69. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +1 -1
  70. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +1 -1
  71. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -1
  72. package/dist/contexts/webSocketContext/provider.d.ts +6 -3
  73. package/dist/contexts/webSocketContext/provider.d.ts.map +1 -1
  74. package/dist/contexts/webSocketContext/provider.js +42 -7
  75. package/dist/contexts/webSocketContext/provider.js.map +1 -1
  76. package/dist/contexts/webSocketContext/types.d.ts +7 -5
  77. package/dist/contexts/webSocketContext/types.d.ts.map +1 -1
  78. package/dist/file/index.d.ts +2 -0
  79. package/dist/file/index.d.ts.map +1 -1
  80. package/dist/hooks/datastore/useDatastoreMutations.d.ts +4 -4
  81. package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -1
  82. package/dist/hooks/datastore/useDatastoreMutations.js +17 -55
  83. package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -1
  84. package/dist/hooks/datastore/useFetchDatastore.d.ts +30 -41
  85. package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -1
  86. package/dist/hooks/datastore/useFetchDatastore.js +25 -59
  87. package/dist/hooks/datastore/useFetchDatastore.js.map +1 -1
  88. package/dist/hooks/datastore/useFetchDatastores.d.ts +47 -52
  89. package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -1
  90. package/dist/hooks/datastore/useFetchDatastores.js +55 -70
  91. package/dist/hooks/datastore/useFetchDatastores.js.map +1 -1
  92. package/dist/hooks/file/fileData.d.ts +17 -0
  93. package/dist/hooks/file/fileData.d.ts.map +1 -0
  94. package/dist/hooks/file/fileData.js +10 -0
  95. package/dist/hooks/file/fileData.js.map +1 -0
  96. package/dist/hooks/file/useFetchFile.d.ts +38 -58
  97. package/dist/hooks/file/useFetchFile.d.ts.map +1 -1
  98. package/dist/hooks/file/useFetchFile.js +26 -66
  99. package/dist/hooks/file/useFetchFile.js.map +1 -1
  100. package/dist/hooks/file/useFetchFiles.d.ts +18 -52
  101. package/dist/hooks/file/useFetchFiles.d.ts.map +1 -1
  102. package/dist/hooks/file/useFetchFiles.js +53 -69
  103. package/dist/hooks/file/useFetchFiles.js.map +1 -1
  104. package/dist/hooks/file/useFileMutations.d.ts +9 -8
  105. package/dist/hooks/file/useFileMutations.d.ts.map +1 -1
  106. package/dist/hooks/file/useFileMutations.js +23 -60
  107. package/dist/hooks/file/useFileMutations.js.map +1 -1
  108. package/dist/hooks/portfolio/useFetchPortfolio.d.ts +16 -50
  109. package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -1
  110. package/dist/hooks/portfolio/useFetchPortfolio.js +15 -63
  111. package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -1
  112. package/dist/hooks/portfolio/useFetchPortfolios.d.ts +13 -52
  113. package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -1
  114. package/dist/hooks/portfolio/useFetchPortfolios.js +29 -71
  115. package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -1
  116. package/dist/hooks/portfolio/usePortfolioMutations.d.ts +8 -8
  117. package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -1
  118. package/dist/hooks/portfolio/usePortfolioMutations.js +20 -58
  119. package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -1
  120. package/dist/hooks/profile/useFetchProfile.d.ts +18 -44
  121. package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -1
  122. package/dist/hooks/profile/useFetchProfile.js +16 -48
  123. package/dist/hooks/profile/useFetchProfile.js.map +1 -1
  124. package/dist/hooks/useAxios.js.map +1 -1
  125. package/dist/hooks/useEntityInfiniteQuery.d.ts +88 -0
  126. package/dist/hooks/useEntityInfiniteQuery.d.ts.map +1 -0
  127. package/dist/hooks/useEntityInfiniteQuery.js +111 -0
  128. package/dist/hooks/useEntityInfiniteQuery.js.map +1 -0
  129. package/dist/hooks/useEntityMutation.d.ts +47 -0
  130. package/dist/hooks/useEntityMutation.d.ts.map +1 -0
  131. package/dist/hooks/useEntityMutation.js +58 -0
  132. package/dist/hooks/useEntityMutation.js.map +1 -0
  133. package/dist/hooks/useEntityQuery.d.ts +68 -0
  134. package/dist/hooks/useEntityQuery.d.ts.map +1 -0
  135. package/dist/hooks/useEntityQuery.js +75 -0
  136. package/dist/hooks/useEntityQuery.js.map +1 -0
  137. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +17 -34
  138. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -1
  139. package/dist/hooks/workflow/useFetchWorkerExecution.js +16 -46
  140. package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -1
  141. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +179 -41
  142. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -1
  143. package/dist/hooks/workflow/useFetchWorkerExecutions.js +29 -62
  144. package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -1
  145. package/dist/hooks/workflow/useFetchWorkflow.d.ts +16 -35
  146. package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -1
  147. package/dist/hooks/workflow/useFetchWorkflow.js +15 -48
  148. package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -1
  149. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +17 -34
  150. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -1
  151. package/dist/hooks/workflow/useFetchWorkflowExecution.js +16 -46
  152. package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -1
  153. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +22 -36
  154. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -1
  155. package/dist/hooks/workflow/useFetchWorkflowExecutions.js +43 -56
  156. package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -1
  157. package/dist/hooks/workflow/useFetchWorkflows.d.ts +20 -37
  158. package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -1
  159. package/dist/hooks/workflow/useFetchWorkflows.js +32 -47
  160. package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -1
  161. package/dist/hooks/workflow/useRunWorkflow.d.ts +21 -16
  162. package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -1
  163. package/dist/hooks/workflow/useRunWorkflow.js +66 -29
  164. package/dist/hooks/workflow/useRunWorkflow.js.map +1 -1
  165. package/dist/hooks/workflow/useTriggerWorkflow.d.ts +20 -0
  166. package/dist/hooks/workflow/useTriggerWorkflow.d.ts.map +1 -0
  167. package/dist/hooks/workflow/useTriggerWorkflow.js +32 -0
  168. package/dist/hooks/workflow/useTriggerWorkflow.js.map +1 -0
  169. package/dist/hooks/workspace/useFetchWorkspace.d.ts +19 -34
  170. package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -1
  171. package/dist/hooks/workspace/useFetchWorkspace.js +16 -46
  172. package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -1
  173. package/dist/hooks/workspace/useFetchWorkspaces.d.ts +17 -37
  174. package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -1
  175. package/dist/hooks/workspace/useFetchWorkspaces.js +25 -47
  176. package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -1
  177. package/dist/index.d.ts +13 -10
  178. package/dist/index.d.ts.map +1 -1
  179. package/dist/index.js +13 -11
  180. package/dist/lib/abort.d.ts +58 -0
  181. package/dist/lib/abort.d.ts.map +1 -0
  182. package/dist/lib/abort.js +112 -0
  183. package/dist/lib/abort.js.map +1 -0
  184. package/dist/lib/datastoreTable.d.ts +59 -54
  185. package/dist/lib/datastoreTable.d.ts.map +1 -1
  186. package/dist/lib/datastoreTable.js +58 -62
  187. package/dist/lib/datastoreTable.js.map +1 -1
  188. package/dist/lib/file.d.ts +34 -0
  189. package/dist/lib/file.d.ts.map +1 -0
  190. package/dist/lib/file.js +63 -0
  191. package/dist/lib/file.js.map +1 -0
  192. package/dist/lib/queryClient.d.ts.map +1 -1
  193. package/dist/lib/queryClient.js.map +1 -1
  194. package/dist/lib/workflowRun.d.ts +91 -0
  195. package/dist/lib/workflowRun.d.ts.map +1 -0
  196. package/dist/lib/workflowRun.js +224 -0
  197. package/dist/lib/workflowRun.js.map +1 -0
  198. package/dist/socket/index.d.ts +1 -3
  199. package/dist/socket/index.d.ts.map +1 -1
  200. package/dist/socket/index.js +3 -5
  201. package/dist/test/mocks/index.d.ts +1 -1
  202. package/dist/test/mocks/index.d.ts.map +1 -1
  203. package/dist/test/renderWithProviders.d.ts +2 -2
  204. package/dist/test/renderWithProviders.d.ts.map +1 -1
  205. package/dist/test/renderWithProviders.js.map +1 -1
  206. package/dist/test/setup.js.map +1 -1
  207. package/dist/theme/index.d.ts +1 -1
  208. package/dist/theme/index.d.ts.map +1 -1
  209. package/dist/theme/overrides/index.d.ts +4 -2
  210. package/dist/theme/overrides/index.d.ts.map +1 -1
  211. package/dist/theme/overrides/index.js +5 -3
  212. package/dist/theme/overrides/index.js.map +1 -1
  213. package/dist/theme/overrides/muiButton.d.ts +2 -2
  214. package/dist/theme/overrides/muiButton.js.map +1 -1
  215. package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -1
  216. package/dist/theme/overrides/muiCssBaseline.js.map +1 -1
  217. package/dist/theme/overrides/muiDatePicker.js.map +1 -1
  218. package/dist/theme/overrides/muiFormControl.js.map +1 -1
  219. package/dist/theme/overrides/muiIconButton.d.ts +2 -2
  220. package/dist/theme/overrides/muiIconButton.js.map +1 -1
  221. package/dist/theme/overrides/muiSelect.d.ts.map +1 -1
  222. package/dist/theme/overrides/muiSelect.js.map +1 -1
  223. package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -1
  224. package/dist/theme/overrides/muiSvgIcon.js.map +1 -1
  225. package/dist/theme/overrides/muiTextField.js.map +1 -1
  226. package/dist/theme/overrides/muiToggleButton.d.ts +2 -2
  227. package/dist/theme/overrides/muiToggleButton.js.map +1 -1
  228. package/dist/theme/overrides/muiToggleButtonGroup.d.ts +2 -2
  229. package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -1
  230. package/dist/theme/themes/DefaultDark.js +2 -2
  231. package/dist/theme/themes/DefaultDark.js.map +1 -1
  232. package/dist/theme/themes/DefaultLight.js +2 -2
  233. package/dist/theme/themes/DefaultLight.js.map +1 -1
  234. package/dist/theme/themes/EveryskDark.js +2 -2
  235. package/dist/theme/themes/EveryskDark.js.map +1 -1
  236. package/dist/theme/themes/EveryskLight.js +2 -2
  237. package/dist/theme/themes/EveryskLight.js.map +1 -1
  238. package/dist/theme/themes/MidnightEmber.js +2 -2
  239. package/dist/theme/themes/MidnightEmber.js.map +1 -1
  240. package/dist/types/anyRecord.d.ts.map +1 -1
  241. package/dist/types/datastore.d.ts +35 -5
  242. package/dist/types/datastore.d.ts.map +1 -1
  243. package/dist/types/datastoreDataFormat.d.ts +13 -0
  244. package/dist/types/datastoreDataFormat.d.ts.map +1 -0
  245. package/dist/types/entityQuery.d.ts +86 -16
  246. package/dist/types/entityQuery.d.ts.map +1 -1
  247. package/dist/types/file.d.ts +7 -3
  248. package/dist/types/file.d.ts.map +1 -1
  249. package/dist/types/portfolio.d.ts +1 -3
  250. package/dist/types/portfolio.d.ts.map +1 -1
  251. package/dist/types/profile.d.ts +0 -10
  252. package/dist/types/profile.d.ts.map +1 -1
  253. package/dist/types/workflow.d.ts +35 -6
  254. package/dist/types/workflow.d.ts.map +1 -1
  255. package/dist/types/workspace.d.ts +1 -2
  256. package/dist/types/workspace.d.ts.map +1 -1
  257. package/dist/ui/index.d.ts +1 -1
  258. package/dist/ui/index.d.ts.map +1 -1
  259. package/dist/workflow/index.d.ts +2 -0
  260. package/dist/workflow/index.d.ts.map +1 -1
  261. package/package.json +6 -6
  262. package/src/EveryskApp.tsx +53 -2
  263. package/src/agGrid/handleRowsScrollEnd.ts +71 -0
  264. package/src/agGrid/index.ts +5 -1
  265. package/src/api/datastore.ts +79 -107
  266. package/src/api/entityQuery.ts +86 -17
  267. package/src/api/file.ts +110 -103
  268. package/src/api/portfolio.ts +82 -125
  269. package/src/api/profile.ts +25 -18
  270. package/src/api/request.ts +168 -0
  271. package/src/api/websocketsConfig.ts +11 -19
  272. package/src/api/workflow.ts +232 -334
  273. package/src/api/workspace.ts +43 -43
  274. package/src/components/ui/Footer/index.tsx +8 -7
  275. package/src/components/ui/GlobalLoading/index.tsx +13 -3
  276. package/src/components/ui/PageContainer/index.tsx +9 -2
  277. package/src/components/ui/Toolbar/index.tsx +105 -30
  278. package/src/contexts/appAlertContext/provider.tsx +1 -1
  279. package/src/contexts/appAlertContext/types.ts +3 -3
  280. package/src/contexts/appConfigContext/index.tsx +1 -1
  281. package/src/contexts/appConfigContext/provider.tsx +1 -5
  282. package/src/contexts/webSocketContext/handler.ts +8 -2
  283. package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +1 -1
  284. package/src/contexts/webSocketContext/provider.tsx +64 -14
  285. package/src/contexts/webSocketContext/types.ts +7 -6
  286. package/src/file/index.ts +2 -0
  287. package/src/hooks/datastore/useDatastoreMutations.ts +19 -60
  288. package/src/hooks/datastore/useFetchDatastore.ts +45 -73
  289. package/src/hooks/datastore/useFetchDatastores.ts +106 -131
  290. package/src/hooks/file/fileData.ts +19 -0
  291. package/src/hooks/file/useFetchFile.ts +41 -76
  292. package/src/hooks/file/useFetchFiles.ts +92 -87
  293. package/src/hooks/file/useFileMutations.ts +23 -73
  294. package/src/hooks/portfolio/useFetchPortfolio.ts +26 -78
  295. package/src/hooks/portfolio/useFetchPortfolios.ts +50 -93
  296. package/src/hooks/portfolio/usePortfolioMutations.ts +22 -72
  297. package/src/hooks/profile/useFetchProfile.ts +24 -65
  298. package/src/hooks/useAxios.ts +5 -5
  299. package/src/hooks/useEntityInfiniteQuery.ts +193 -0
  300. package/src/hooks/useEntityMutation.ts +70 -0
  301. package/src/hooks/useEntityQuery.ts +117 -0
  302. package/src/hooks/workflow/useFetchWorkerExecution.ts +27 -56
  303. package/src/hooks/workflow/useFetchWorkerExecutions.ts +54 -79
  304. package/src/hooks/workflow/useFetchWorkflow.ts +24 -58
  305. package/src/hooks/workflow/useFetchWorkflowExecution.ts +27 -57
  306. package/src/hooks/workflow/useFetchWorkflowExecutions.ts +64 -73
  307. package/src/hooks/workflow/useFetchWorkflows.ts +48 -64
  308. package/src/hooks/workflow/useRunWorkflow.ts +82 -36
  309. package/src/hooks/workflow/useTriggerWorkflow.ts +36 -0
  310. package/src/hooks/workspace/useFetchWorkspace.ts +25 -58
  311. package/src/hooks/workspace/useFetchWorkspaces.ts +38 -69
  312. package/src/index.ts +34 -19
  313. package/src/lib/abort.ts +131 -0
  314. package/src/lib/datastoreTable.ts +127 -74
  315. package/src/lib/file.ts +67 -0
  316. package/src/lib/queryClient.ts +11 -13
  317. package/src/lib/workflowRun.ts +329 -0
  318. package/src/socket/index.ts +1 -3
  319. package/src/test/mocks/index.ts +1 -5
  320. package/src/test/renderWithProviders.tsx +8 -3
  321. package/src/test/setup.ts +16 -16
  322. package/src/theme/index.ts +1 -1
  323. package/src/theme/overrides/index.ts +5 -3
  324. package/src/theme/overrides/muiButton.ts +3 -3
  325. package/src/theme/overrides/muiCssBaseline.ts +11 -12
  326. package/src/theme/overrides/muiDatePicker.ts +2 -2
  327. package/src/theme/overrides/muiFormControl.ts +2 -2
  328. package/src/theme/overrides/muiIconButton.ts +3 -3
  329. package/src/theme/overrides/muiSelect.ts +2 -2
  330. package/src/theme/overrides/muiSvgIcon.ts +2 -2
  331. package/src/theme/overrides/muiTextField.ts +1 -1
  332. package/src/theme/overrides/muiToggleButton.ts +4 -4
  333. package/src/theme/overrides/muiToggleButtonGroup.ts +4 -4
  334. package/src/theme/themes/DefaultDark.ts +2 -2
  335. package/src/theme/themes/DefaultLight.ts +2 -2
  336. package/src/theme/themes/EveryskDark.ts +2 -2
  337. package/src/theme/themes/EveryskLight.ts +2 -2
  338. package/src/theme/themes/MidnightEmber.ts +15 -15
  339. package/src/types/anyRecord.ts +2 -2
  340. package/src/types/datastore.ts +56 -22
  341. package/src/types/datastoreDataFormat.ts +12 -0
  342. package/src/types/entityQuery.ts +122 -38
  343. package/src/types/file.ts +8 -6
  344. package/src/types/portfolio.ts +70 -74
  345. package/src/types/profile.ts +0 -11
  346. package/src/types/workflow.ts +38 -9
  347. package/src/types/workspace.ts +2 -4
  348. package/src/ui/index.ts +1 -1
  349. package/src/workflow/index.ts +5 -0
@@ -0,0 +1,106 @@
1
+ import { type AxiosResponse } from "axios";
2
+ import type { AnyRecord } from "../types/anyRecord.d.ts";
3
+ import type { FilterExpression, QueryObject } from "../types/entityQuery.d.ts";
4
+ /**
5
+ * request
6
+ *
7
+ * Sends one request and returns its body, with the error handling every `api/` function shares.
8
+ * Each of them used to carry its own copy of this `catch`, and the copies drifted: some
9
+ * rethrew a cancellation and some did not, and `runWorkflow` had lost its fallback message.
10
+ *
11
+ * The request goes in as a function rather than a config so each call site keeps calling
12
+ * `api.get`, `api.post`… itself, which is what reads as the endpoint and what the tests stub.
13
+ *
14
+ * - A cancellation is rethrown as axios made it: an abort is not a failure to report, and
15
+ * wrapped in a new Error `isCancel` would no longer see it.
16
+ * - An axios error becomes an Error with its message, or `failure` when it has none, and the
17
+ * axios error as `cause` — the only place the API's own `{ code, message }` body survives.
18
+ * - Any other Error is rethrown untouched, and anything else is wrapped, so a caller never
19
+ * catches a bare string.
20
+ *
21
+ * @param send - Makes the request.
22
+ * @param failure - The message when the error carries none.
23
+ * @returns The response body.
24
+ */
25
+ export declare const request: <T>(send: () => Promise<AxiosResponse<T>>, failure: string) => Promise<T>;
26
+ /**
27
+ * isRetryableFailure
28
+ *
29
+ * Whether a failure `request()` reported may pass if the request is sent again: one that got no
30
+ * response (a network error), a 5XX, or a 429. It is read from the axios error `request()` keeps
31
+ * as `cause`. Anything else will fail the same way next time: any other 4XX, and anything that is
32
+ * not a request failure at all — a bug, or a body that is not the expected JSON, such as the HTML
33
+ * page an expired session gets.
34
+ *
35
+ * @param error - What a request function threw.
36
+ * @returns True when retrying may succeed.
37
+ */
38
+ export declare const isRetryableFailure: (error: unknown) => boolean;
39
+ /**
40
+ * workspaceOf
41
+ *
42
+ * The workspace a list request names: the **first** `workspace` filter, when it is an equality
43
+ * on a name. One reading, shared by the request and by `hasWorkspaceFilter`, so the hooks' check
44
+ * cannot pass on a filter the request then reads another way — which is what happened while
45
+ * each read it its own way.
46
+ *
47
+ * Only an equality counts. The query's filters are what scope the data, so `["workspace", "!=",
48
+ * "ws-1"]` reads every *other* workspace; it named a workspace, so the check used to pass. A
49
+ * value that is not a name (an `IN` list) went out as `workspace[]=…`.
50
+ *
51
+ * @param filters - The query's filters, as tuples.
52
+ * @returns The workspace name, or `undefined` when the first `workspace` filter is missing or is
53
+ * not an equality on a name.
54
+ */
55
+ export declare const workspaceOf: (filters: FilterExpression[]) => string | undefined;
56
+ /**
57
+ * requireWorkspace
58
+ *
59
+ * Refuses a call without a workspace before it reaches the API. The API would not say why: a
60
+ * get or delete by id with `workspace=""` answers a bare 403, one without the parameter skips the
61
+ * check altogether, and a create falls back to `main`. One wording for every function: each used
62
+ * to carry its own check, two phrasings of it ("Workspace filter is required…" for a plain
63
+ * string), and three had lost it altogether.
64
+ *
65
+ * @param workspace - The workspace the call was given.
66
+ * @param action - What the call does, completing "Workspace is required to …".
67
+ * @throws {Error} When `workspace` is empty.
68
+ */
69
+ export declare function requireWorkspace(workspace: string | null | undefined, action: string): asserts workspace is string;
70
+ /**
71
+ * pageParams
72
+ *
73
+ * The query string of a list endpoint that takes a workspace and a cursor rather than a query
74
+ * object — workflows and workspaces, whose `query` is a name or tag search, not filters. The
75
+ * search goes out as `query`. Only what was given is sent: an empty value means "none", and sent
76
+ * as `""` it would read as one.
77
+ *
78
+ * @param page - The workspace, search, page size and page token, each optional.
79
+ * @returns The `workspace`, `query`, `page_size` and `page_token` parameters that carry a value.
80
+ */
81
+ export declare const pageParams: ({ workspace, search, pageSize, pageToken, }: {
82
+ workspace?: string;
83
+ search?: string;
84
+ pageSize?: number;
85
+ pageToken?: string;
86
+ }) => AnyRecord;
87
+ /** The query string of a list endpoint, as `listParams` builds it. */
88
+ export type ListParams = {
89
+ workspace: string;
90
+ query: string;
91
+ };
92
+ /**
93
+ * listParams
94
+ *
95
+ * The query string of a list endpoint: the workspace on its own, beside the serialized query
96
+ * that also carries it. They do different jobs. The query's filters are what scope the data — on
97
+ * this path the API ignores the parameter for that — while the parameter is what the API checks
98
+ * a sub-user's role against.
99
+ *
100
+ * @param query - The query object built with `buildQueryObject`.
101
+ * @param action - What the call does, for the missing-workspace message.
102
+ * @returns `{ workspace, query }`.
103
+ * @throws {Error} When the first `workspace` filter is absent, empty, or not an equality on a name.
104
+ */
105
+ export declare const listParams: (query: QueryObject, action: string) => ListParams;
106
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/api/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,OAAO,GAAU,CAAC,EAC3B,MAAM,MAAM,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EACrC,SAAS,MAAM,KAChB,OAAO,CAAC,CAAC,CAiBX,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAMnD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,gBAAgB,EAAE,KAAG,MAAM,GAAG,SAQlE,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,SAAS,IAAI,MAAM,CAE7B;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,6CAKxB;IACC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,KAAG,SAKF,CAAC;AAEH,sEAAsE;AACtE,MAAM,MAAM,UAAU,GAAG;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,WAAW,EAAE,QAAQ,MAAM,KAAG,UAM/D,CAAC"}
@@ -0,0 +1,132 @@
1
+ import { isAxiosError, isCancel } from "axios";
2
+ //#region src/api/request.ts
3
+ /**
4
+ * request
5
+ *
6
+ * Sends one request and returns its body, with the error handling every `api/` function shares.
7
+ * Each of them used to carry its own copy of this `catch`, and the copies drifted: some
8
+ * rethrew a cancellation and some did not, and `runWorkflow` had lost its fallback message.
9
+ *
10
+ * The request goes in as a function rather than a config so each call site keeps calling
11
+ * `api.get`, `api.post`… itself, which is what reads as the endpoint and what the tests stub.
12
+ *
13
+ * - A cancellation is rethrown as axios made it: an abort is not a failure to report, and
14
+ * wrapped in a new Error `isCancel` would no longer see it.
15
+ * - An axios error becomes an Error with its message, or `failure` when it has none, and the
16
+ * axios error as `cause` — the only place the API's own `{ code, message }` body survives.
17
+ * - Any other Error is rethrown untouched, and anything else is wrapped, so a caller never
18
+ * catches a bare string.
19
+ *
20
+ * @param send - Makes the request.
21
+ * @param failure - The message when the error carries none.
22
+ * @returns The response body.
23
+ */
24
+ var request = async (send, failure) => {
25
+ try {
26
+ return (await send()).data;
27
+ } catch (error) {
28
+ if (isCancel(error)) throw error;
29
+ if (isAxiosError(error)) throw new Error(error.message || failure, { cause: error });
30
+ if (error instanceof Error) throw error;
31
+ throw new Error(failure, { cause: error });
32
+ }
33
+ };
34
+ /**
35
+ * isRetryableFailure
36
+ *
37
+ * Whether a failure `request()` reported may pass if the request is sent again: one that got no
38
+ * response (a network error), a 5XX, or a 429. It is read from the axios error `request()` keeps
39
+ * as `cause`. Anything else will fail the same way next time: any other 4XX, and anything that is
40
+ * not a request failure at all — a bug, or a body that is not the expected JSON, such as the HTML
41
+ * page an expired session gets.
42
+ *
43
+ * @param error - What a request function threw.
44
+ * @returns True when retrying may succeed.
45
+ */
46
+ var isRetryableFailure = (error) => {
47
+ const cause = error instanceof Error ? error.cause : void 0;
48
+ if (!isAxiosError(cause)) return false;
49
+ const status = cause.response?.status;
50
+ return status === void 0 || status >= 500 || status === 429;
51
+ };
52
+ /**
53
+ * workspaceOf
54
+ *
55
+ * The workspace a list request names: the **first** `workspace` filter, when it is an equality
56
+ * on a name. One reading, shared by the request and by `hasWorkspaceFilter`, so the hooks' check
57
+ * cannot pass on a filter the request then reads another way — which is what happened while
58
+ * each read it its own way.
59
+ *
60
+ * Only an equality counts. The query's filters are what scope the data, so `["workspace", "!=",
61
+ * "ws-1"]` reads every *other* workspace; it named a workspace, so the check used to pass. A
62
+ * value that is not a name (an `IN` list) went out as `workspace[]=…`.
63
+ *
64
+ * @param filters - The query's filters, as tuples.
65
+ * @returns The workspace name, or `undefined` when the first `workspace` filter is missing or is
66
+ * not an equality on a name.
67
+ */
68
+ var workspaceOf = (filters) => {
69
+ const filter = filters.find((expression) => expression[0] === "workspace");
70
+ if (!filter) return void 0;
71
+ const isEquality = filter.length === 2 || filter[1] === "=";
72
+ const value = filter[filter.length - 1];
73
+ return isEquality && typeof value === "string" ? value : void 0;
74
+ };
75
+ /**
76
+ * requireWorkspace
77
+ *
78
+ * Refuses a call without a workspace before it reaches the API. The API would not say why: a
79
+ * get or delete by id with `workspace=""` answers a bare 403, one without the parameter skips the
80
+ * check altogether, and a create falls back to `main`. One wording for every function: each used
81
+ * to carry its own check, two phrasings of it ("Workspace filter is required…" for a plain
82
+ * string), and three had lost it altogether.
83
+ *
84
+ * @param workspace - The workspace the call was given.
85
+ * @param action - What the call does, completing "Workspace is required to …".
86
+ * @throws {Error} When `workspace` is empty.
87
+ */
88
+ function requireWorkspace(workspace, action) {
89
+ if (!workspace) throw new Error(`Workspace is required to ${action}`);
90
+ }
91
+ /**
92
+ * pageParams
93
+ *
94
+ * The query string of a list endpoint that takes a workspace and a cursor rather than a query
95
+ * object — workflows and workspaces, whose `query` is a name or tag search, not filters. The
96
+ * search goes out as `query`. Only what was given is sent: an empty value means "none", and sent
97
+ * as `""` it would read as one.
98
+ *
99
+ * @param page - The workspace, search, page size and page token, each optional.
100
+ * @returns The `workspace`, `query`, `page_size` and `page_token` parameters that carry a value.
101
+ */
102
+ var pageParams = ({ workspace, search, pageSize, pageToken }) => ({
103
+ ...workspace ? { workspace } : {},
104
+ ...search ? { query: search } : {},
105
+ ...pageSize ? { page_size: pageSize } : {},
106
+ ...pageToken ? { page_token: pageToken } : {}
107
+ });
108
+ /**
109
+ * listParams
110
+ *
111
+ * The query string of a list endpoint: the workspace on its own, beside the serialized query
112
+ * that also carries it. They do different jobs. The query's filters are what scope the data — on
113
+ * this path the API ignores the parameter for that — while the parameter is what the API checks
114
+ * a sub-user's role against.
115
+ *
116
+ * @param query - The query object built with `buildQueryObject`.
117
+ * @param action - What the call does, for the missing-workspace message.
118
+ * @returns `{ workspace, query }`.
119
+ * @throws {Error} When the first `workspace` filter is absent, empty, or not an equality on a name.
120
+ */
121
+ var listParams = (query, action) => {
122
+ const workspace = workspaceOf(query.filters);
123
+ requireWorkspace(workspace, action);
124
+ return {
125
+ workspace,
126
+ query: JSON.stringify(query)
127
+ };
128
+ };
129
+ //#endregion
130
+ export { isRetryableFailure, listParams, pageParams, request, requireWorkspace, workspaceOf };
131
+
132
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","names":[],"sources":["../../src/api/request.ts"],"sourcesContent":["import { isAxiosError, isCancel, type AxiosResponse } from \"axios\";\n\nimport type { AnyRecord } from \"@/types/anyRecord\";\nimport type { FilterExpression, QueryObject } from \"@/types/entityQuery\";\n\n/**\n * request\n *\n * Sends one request and returns its body, with the error handling every `api/` function shares.\n * Each of them used to carry its own copy of this `catch`, and the copies drifted: some\n * rethrew a cancellation and some did not, and `runWorkflow` had lost its fallback message.\n *\n * The request goes in as a function rather than a config so each call site keeps calling\n * `api.get`, `api.post`… itself, which is what reads as the endpoint and what the tests stub.\n *\n * - A cancellation is rethrown as axios made it: an abort is not a failure to report, and\n * wrapped in a new Error `isCancel` would no longer see it.\n * - An axios error becomes an Error with its message, or `failure` when it has none, and the\n * axios error as `cause` — the only place the API's own `{ code, message }` body survives.\n * - Any other Error is rethrown untouched, and anything else is wrapped, so a caller never\n * catches a bare string.\n *\n * @param send - Makes the request.\n * @param failure - The message when the error carries none.\n * @returns The response body.\n */\nexport const request = async <T>(\n send: () => Promise<AxiosResponse<T>>,\n failure: string,\n): Promise<T> => {\n try {\n const response = await send();\n return response.data;\n } catch (error: unknown) {\n if (isCancel(error)) throw error;\n\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || failure, { cause: error });\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(failure, { cause: error });\n }\n};\n\n/**\n * isRetryableFailure\n *\n * Whether a failure `request()` reported may pass if the request is sent again: one that got no\n * response (a network error), a 5XX, or a 429. It is read from the axios error `request()` keeps\n * as `cause`. Anything else will fail the same way next time: any other 4XX, and anything that is\n * not a request failure at all — a bug, or a body that is not the expected JSON, such as the HTML\n * page an expired session gets.\n *\n * @param error - What a request function threw.\n * @returns True when retrying may succeed.\n */\nexport const isRetryableFailure = (error: unknown): boolean => {\n const cause = error instanceof Error ? error.cause : undefined;\n if (!isAxiosError(cause)) return false;\n\n const status = cause.response?.status;\n return status === undefined || status >= 500 || status === 429;\n};\n\n/**\n * workspaceOf\n *\n * The workspace a list request names: the **first** `workspace` filter, when it is an equality\n * on a name. One reading, shared by the request and by `hasWorkspaceFilter`, so the hooks' check\n * cannot pass on a filter the request then reads another way — which is what happened while\n * each read it its own way.\n *\n * Only an equality counts. The query's filters are what scope the data, so `[\"workspace\", \"!=\",\n * \"ws-1\"]` reads every *other* workspace; it named a workspace, so the check used to pass. A\n * value that is not a name (an `IN` list) went out as `workspace[]=…`.\n *\n * @param filters - The query's filters, as tuples.\n * @returns The workspace name, or `undefined` when the first `workspace` filter is missing or is\n * not an equality on a name.\n */\nexport const workspaceOf = (filters: FilterExpression[]): string | undefined => {\n const filter = filters.find((expression) => expression[0] === \"workspace\");\n if (!filter) return undefined;\n\n const isEquality = filter.length === 2 || filter[1] === \"=\";\n const value = filter[filter.length - 1];\n\n return isEquality && typeof value === \"string\" ? value : undefined;\n};\n\n/**\n * requireWorkspace\n *\n * Refuses a call without a workspace before it reaches the API. The API would not say why: a\n * get or delete by id with `workspace=\"\"` answers a bare 403, one without the parameter skips the\n * check altogether, and a create falls back to `main`. One wording for every function: each used\n * to carry its own check, two phrasings of it (\"Workspace filter is required…\" for a plain\n * string), and three had lost it altogether.\n *\n * @param workspace - The workspace the call was given.\n * @param action - What the call does, completing \"Workspace is required to …\".\n * @throws {Error} When `workspace` is empty.\n */\nexport function requireWorkspace(\n workspace: string | null | undefined,\n action: string,\n): asserts workspace is string {\n if (!workspace) throw new Error(`Workspace is required to ${action}`);\n}\n\n/**\n * pageParams\n *\n * The query string of a list endpoint that takes a workspace and a cursor rather than a query\n * object — workflows and workspaces, whose `query` is a name or tag search, not filters. The\n * search goes out as `query`. Only what was given is sent: an empty value means \"none\", and sent\n * as `\"\"` it would read as one.\n *\n * @param page - The workspace, search, page size and page token, each optional.\n * @returns The `workspace`, `query`, `page_size` and `page_token` parameters that carry a value.\n */\nexport const pageParams = ({\n workspace,\n search,\n pageSize,\n pageToken,\n}: {\n workspace?: string;\n search?: string;\n pageSize?: number;\n pageToken?: string;\n}): AnyRecord => ({\n ...(workspace ? { workspace } : {}),\n ...(search ? { query: search } : {}),\n ...(pageSize ? { page_size: pageSize } : {}),\n ...(pageToken ? { page_token: pageToken } : {}),\n});\n\n/** The query string of a list endpoint, as `listParams` builds it. */\nexport type ListParams = {\n workspace: string;\n query: string;\n};\n\n/**\n * listParams\n *\n * The query string of a list endpoint: the workspace on its own, beside the serialized query\n * that also carries it. They do different jobs. The query's filters are what scope the data — on\n * this path the API ignores the parameter for that — while the parameter is what the API checks\n * a sub-user's role against.\n *\n * @param query - The query object built with `buildQueryObject`.\n * @param action - What the call does, for the missing-workspace message.\n * @returns `{ workspace, query }`.\n * @throws {Error} When the first `workspace` filter is absent, empty, or not an equality on a name.\n */\nexport const listParams = (query: QueryObject, action: string): ListParams => {\n const workspace = workspaceOf(query.filters);\n\n requireWorkspace(workspace, action);\n\n return { workspace, query: JSON.stringify(query) };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAa,UAAU,OACnB,MACA,YACa;CACb,IAAI;EAEA,QAAO,MADgB,KAAK,EAAA,CACZ;CACpB,SAAS,OAAgB;EACrB,IAAI,SAAS,KAAK,GAAG,MAAM;EAE3B,IAAI,aAAwB,KAAK,GAC7B,MAAM,IAAI,MAAM,MAAM,WAAW,SAAS,EAAE,OAAO,MAAM,CAAC;EAG9D,IAAI,iBAAiB,OACjB,MAAM;EAGV,MAAM,IAAI,MAAM,SAAS,EAAE,OAAO,MAAM,CAAC;CAC7C;AACJ;;;;;;;;;;;;;AAcA,IAAa,sBAAsB,UAA4B;CAC3D,MAAM,QAAQ,iBAAiB,QAAQ,MAAM,QAAQ,KAAA;CACrD,IAAI,CAAC,aAAa,KAAK,GAAG,OAAO;CAEjC,MAAM,SAAS,MAAM,UAAU;CAC/B,OAAO,WAAW,KAAA,KAAa,UAAU,OAAO,WAAW;AAC/D;;;;;;;;;;;;;;;;;AAkBA,IAAa,eAAe,YAAoD;CAC5E,MAAM,SAAS,QAAQ,MAAM,eAAe,WAAW,OAAO,WAAW;CACzE,IAAI,CAAC,QAAQ,OAAO,KAAA;CAEpB,MAAM,aAAa,OAAO,WAAW,KAAK,OAAO,OAAO;CACxD,MAAM,QAAQ,OAAO,OAAO,SAAS;CAErC,OAAO,cAAc,OAAO,UAAU,WAAW,QAAQ,KAAA;AAC7D;;;;;;;;;;;;;;AAeA,SAAgB,iBACZ,WACA,QAC2B;CAC3B,IAAI,CAAC,WAAW,MAAM,IAAI,MAAM,4BAA4B,QAAQ;AACxE;;;;;;;;;;;;AAaA,IAAa,cAAc,EACvB,WACA,QACA,UACA,iBAMc;CACd,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC;CACjC,GAAI,SAAS,EAAE,OAAO,OAAO,IAAI,CAAC;CAClC,GAAI,WAAW,EAAE,WAAW,SAAS,IAAI,CAAC;CAC1C,GAAI,YAAY,EAAE,YAAY,UAAU,IAAI,CAAC;AACjD;;;;;;;;;;;;;;AAqBA,IAAa,cAAc,OAAoB,WAA+B;CAC1E,MAAM,YAAY,YAAY,MAAM,OAAO;CAE3C,iBAAiB,WAAW,MAAM;CAElC,OAAO;EAAE;EAAW,OAAO,KAAK,UAAU,KAAK;CAAE;AACrD"}
@@ -1,5 +1,10 @@
1
- import { type AxiosInstance } from "axios";
2
- import type { WebsocketsConfig } from "../contexts/webSocketContext/types.d.ts";
1
+ import type { AxiosInstance } from "axios";
2
+ /** What the provider connects with. Not public: only `WebSocketProvider` reads it. */
3
+ export type WebsocketsConfig = {
4
+ appConnectionURL: string;
5
+ appChannelID: string;
6
+ everyskUID: string;
7
+ };
3
8
  /**
4
9
  * getWebsocketsConfig
5
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"websocketsConfig.d.ts","sourceRoot":"","sources":["../../src/api/websocketsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAG7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAI1E;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAU,KAAK,aAAa,KAAG,OAAO,CAAC,gBAAgB,CAetF,CAAC"}
1
+ {"version":3,"file":"websocketsConfig.d.ts","sourceRoot":"","sources":["../../src/api/websocketsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,sFAAsF;AACtF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAU,KAAK,aAAa,KAAG,OAAO,CAAC,gBAAgB,CACE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { isAxiosError } from "axios";
1
+ import { request } from "./request.js";
2
2
  //#region src/api/websocketsConfig.ts
3
3
  var baseUrl = "websockets_config";
4
4
  /**
@@ -10,15 +10,7 @@ var baseUrl = "websockets_config";
10
10
  * @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.
11
11
  * @throws {Error} If the request fails.
12
12
  */
13
- var getWebsocketsConfig = async (api) => {
14
- try {
15
- return (await api.get(baseUrl)).data;
16
- } catch (error) {
17
- if (isAxiosError(error)) throw new Error(error.message || "Error fetching websockets config");
18
- if (error instanceof Error) throw error;
19
- throw new Error("Error fetching websockets config");
20
- }
21
- };
13
+ var getWebsocketsConfig = async (api) => request(() => api.get(baseUrl), "Error fetching websockets config");
22
14
  //#endregion
23
15
  export { getWebsocketsConfig };
24
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"websocketsConfig.js","names":[],"sources":["../../src/api/websocketsConfig.ts"],"sourcesContent":["import { isAxiosError, type AxiosInstance, type AxiosResponse } from \"axios\";\n\nimport type { AnyRecord } from \"@/types/anyRecord\";\nimport type { WebsocketsConfig } from \"@/contexts/webSocketContext/types\";\n\nconst baseUrl = \"websockets_config\";\n\n/**\n * getWebsocketsConfig\n *\n * Fetches the Socket.IO connection config for the current user/app.\n *\n * @param {AxiosInstance} api - Axios instance (from `useAxios`).\n * @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.\n * @throws {Error} If the request fails.\n */\nexport const getWebsocketsConfig = async (api: AxiosInstance): Promise<WebsocketsConfig> => {\n try {\n const response: AxiosResponse<WebsocketsConfig> = await api.get(baseUrl);\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error fetching websockets config\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error fetching websockets config\");\n }\n};\n"],"mappings":";;AAKA,IAAM,UAAU;;;;;;;;;;AAWhB,IAAa,sBAAsB,OAAO,QAAkD;CACxF,IAAI;EAEA,QAAO,MADiD,IAAI,IAAI,OAAO,EAAA,CACvD;CACpB,SAAS,OAAgB;EACrB,IAAI,aAAwB,KAAK,GAC7B,MAAM,IAAI,MAAM,MAAM,WAAW,kCAAkC;EAGvE,IAAI,iBAAiB,OACjB,MAAM;EAGV,MAAM,IAAI,MAAM,kCAAkC;CACtD;AACJ"}
1
+ {"version":3,"file":"websocketsConfig.js","names":[],"sources":["../../src/api/websocketsConfig.ts"],"sourcesContent":["import type { AxiosInstance } from \"axios\";\n\nimport { request } from \"./request\";\n\nconst baseUrl = \"websockets_config\";\n\n/** What the provider connects with. Not public: only `WebSocketProvider` reads it. */\nexport type WebsocketsConfig = {\n appConnectionURL: string;\n appChannelID: string;\n everyskUID: string;\n};\n\n/**\n * getWebsocketsConfig\n *\n * Fetches the Socket.IO connection config for the current user/app.\n *\n * @param {AxiosInstance} api - Axios instance (from `useAxios`).\n * @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.\n * @throws {Error} If the request fails.\n */\nexport const getWebsocketsConfig = async (api: AxiosInstance): Promise<WebsocketsConfig> =>\n request(() => api.get<WebsocketsConfig>(baseUrl), \"Error fetching websockets config\");\n"],"mappings":";;AAIA,IAAM,UAAU;;;;;;;;;;AAkBhB,IAAa,sBAAsB,OAAO,QACtC,cAAc,IAAI,IAAsB,OAAO,GAAG,kCAAkC"}
@@ -1,131 +1,115 @@
1
- import { type AxiosInstance } from "axios";
1
+ import type { AxiosInstance } from "axios";
2
2
  import type { AnyRecord } from "../types/anyRecord.d.ts";
3
- import type { QueryObject } from "../types/entityQuery.d.ts";
4
3
  import type { WorkerExecution, WorkerExecutionListResponse, Workflow, WorkflowExecution, WorkflowExecutionListResponse, WorkflowListResponse } from "../types/workflow.d.ts";
5
4
  /**
6
5
  * Runs a workflow asynchronously.
7
6
  *
8
7
  * Starts the workflow in a non-blocking way: the response carries a workflow execution
9
- * with a non-terminal status (e.g. "RUNNING"). Use polling to wait for the terminal state.
8
+ * with a non-terminal status (e.g. "RUNNING"). `useRunWorkflow` waits for the end over
9
+ * the websocket.
10
10
  *
11
11
  * @param api - Axios instance used to make the HTTP request.
12
12
  * @param id - The unique identifier of the workflow to run.
13
13
  * @param workspace - The workspace in which the workflow will be executed.
14
14
  * @param parameters - Key-value parameters to pass to the workflow.
15
- * @returns A promise that resolves with the workflow execution response data.
15
+ * @returns The execution the run started, still `RUNNING`. It used to be the raw body,
16
+ * `{ workflow_execution, result: null }`, where every other function returns the entity.
16
17
  * @throws {Error} If `workspace` is not provided.
17
18
  * @throws {Error} If the request fails.
18
19
  */
19
- export declare const runWorkflow: (api: AxiosInstance, id: string, workspace: string, parameters: AnyRecord) => Promise<AnyRecord>;
20
+ export declare const runWorkflow: (api: AxiosInstance, id: string, workspace: string, parameters: AnyRecord) => Promise<WorkflowExecution>;
20
21
  /**
21
- * Run statuses that indicate a workflow execution has reached a terminal state
22
- * (i.e. it is no longer running and will not change again).
23
- *
24
- * Union of the backend's `WORKFLOW_EXECUTION_STATUS_FINISHED` set and the API's documented
25
- * terminal `run_status` values (`SUCCEEDED`/`FAILED`/`KILLED`). `KILLED` is included so a
26
- * killed execution is detected as terminal instead of polling until timeout.
27
- */
28
- export declare const TERMINAL_RUN_STATUSES: readonly ["CANCELED", "COMPLETED", "SUCCEEDED", "FAILED", "KILLED"];
29
- export type PollWorkflowExecutionOptions = {
30
- /** Delay between status checks, in milliseconds. Defaults to 2000ms. */
31
- intervalMs?: number;
32
- /** Maximum time to wait for a terminal status before giving up, in milliseconds. Defaults to 5 minutes. */
33
- timeoutMs?: number;
34
- /** Optional abort signal to cancel polling (e.g. on unmount). */
35
- signal?: AbortSignal;
36
- };
37
- /**
38
- * Polls a workflow execution until it reaches a terminal run status (see {@link TERMINAL_RUN_STATUSES}).
39
- *
40
- * This is the interim, non-blocking replacement for synchronous (`synchronous: true`) execution:
41
- * the workflow is started asynchronously and its status is checked periodically until it completes.
42
- *
43
- * @param api - Axios instance used to make the HTTP request.
44
- * @param workflowId - The unique identifier of the workflow.
45
- * @param executionId - The unique identifier of the workflow execution to poll.
46
- * @param workspace - The workspace in which the workflow execution resides.
47
- * @param options - Polling configuration (interval, timeout, abort signal).
48
- * @returns A promise that resolves with the terminal {@link WorkflowExecution}.
49
- * @throws {Error} If `workspace` is not provided.
50
- * @throws {Error} If polling is aborted via `options.signal`.
51
- * @throws {Error} If a terminal status is not reached before `options.timeoutMs` elapses.
22
+ * The run statuses a workflow execution can end with. The backend writes `RUNNING` when the run
23
+ * starts, and `SUCCEEDED` or `FAILED` once its Ender finishes; `CANCELED` is reserved for a
24
+ * cancellation it does not write yet. This list used to carry `KILLED`, which the backend never
25
+ * writes, and `COMPLETED`, the value of the deprecated `status` field, seen in `run_status` only
26
+ * on executions from before 2024-10-03.
52
27
  */
53
- export declare const pollWorkflowExecution: (api: AxiosInstance, workflowId: string, executionId: string, workspace: string, options?: PollWorkflowExecutionOptions) => Promise<WorkflowExecution>;
28
+ export declare const TERMINAL_RUN_STATUSES: readonly ["SUCCEEDED", "FAILED", "CANCELED"];
29
+ export type TerminalRunStatus = (typeof TERMINAL_RUN_STATUSES)[number];
54
30
  /**
55
- * The terminal workflow execution together with the output produced by its final (ender) worker.
31
+ * The status a run ended with, read whatever its case; `null` while it has not ended. A missing
32
+ * status — a projection can drop the field, and JSON can carry it as `null` — is a run not known
33
+ * to have ended. The one place a run's status is read, so a comparison against it is typed.
56
34
  */
57
- export type WorkflowResult = {
58
- /** The terminal workflow execution. */
59
- execution: WorkflowExecution;
60
- /** The ender worker execution, or `null` if the execution did not reference one. */
61
- workerExecution: WorkerExecution | null;
62
- /** The output data produced by the ender worker (`workerExecution.result`), or `null`. */
63
- result: Record<string, unknown> | null;
64
- };
65
- /**
66
- * Starts a workflow, polls it to completion, then fetches the output produced by its final worker.
67
- *
68
- * A workflow execution does not carry the output payload itself — it references the final worker via
69
- * `ender_worker_execution_id`, and that worker execution's `result` field holds the actual data.
70
- * This helper performs the full flow: start (async) → poll → fetch ender worker → return its `result`.
71
- *
72
- * @param api - Axios instance used to make the HTTP request.
73
- * @param id - The unique identifier of the workflow to run.
74
- * @param workspace - The workspace in which the workflow will be executed.
75
- * @param parameters - Key-value parameters to pass to the workflow.
76
- * @param options - Polling configuration (interval, timeout, abort signal).
77
- * @returns A promise that resolves with the {@link WorkflowResult} (execution, ender worker execution, and its result).
78
- * @throws {Error} If `workspace` is not provided.
79
- * @throws {Error} If the workflow execution ends in a "FAILED" run status.
80
- * @throws {Error} If polling times out or is aborted.
81
- */
82
- export declare const runWorkflowAndGetResult: (api: AxiosInstance, id: string, workspace: string, parameters: AnyRecord, options?: PollWorkflowExecutionOptions) => Promise<WorkflowResult>;
35
+ export declare const terminalRunStatusOf: (runStatus: string | null | undefined) => TerminalRunStatus | null;
36
+ /** Whether a run with this `run_status` has ended; see `terminalRunStatusOf`. */
37
+ export declare const isTerminalRunStatus: (runStatus: string | null | undefined) => boolean;
83
38
  /**
84
39
  * Fetches a single workflow by ID.
85
40
  *
86
41
  * @param api - Axios instance used to make the HTTP request.
87
42
  * @param id - The unique identifier of the workflow to fetch.
88
43
  * @param workspace - The workspace in which the workflow resides.
44
+ * @param {AbortSignal} [signal] - Aborts the request itself; the entity hooks pass the query's own.
89
45
  * @returns A promise that resolves with the {@link Workflow} object.
90
46
  * @throws {Error} If `workspace` is not provided.
91
47
  * @throws {Error} If the request fails.
92
48
  */
93
- export declare const getWorkflow: (api: AxiosInstance, id: string, workspace: string) => Promise<Workflow>;
49
+ export declare const getWorkflow: (api: AxiosInstance, id: string, workspace: string, signal?: AbortSignal) => Promise<Workflow>;
50
+ /** What `listWorkflows` sends. */
51
+ export type WorkflowListParams = {
52
+ /** Required: without one the API lists `main` rather than failing, and refuses a sub-user. */
53
+ workspace: string;
54
+ /** A name prefix, an id, `#tag #tag` (every tag), or `&link_uid`. Sent as `query`. */
55
+ search?: string;
56
+ pageSize?: number;
57
+ pageToken?: string;
58
+ };
94
59
  /**
95
- * Fetches a paginated list of workflows using the legacy method (workspace as query param).
60
+ * Lists the workflows of a workspace, a page at a time.
61
+ *
62
+ * The endpoint takes a text search rather than the JSON query the other lists take, so this
63
+ * takes `search` rather than a `QueryObject`.
96
64
  *
97
65
  * @param api - Axios instance used to make the HTTP request.
98
- * @param workspace - Current workspace name. Sent as a query param via the legacy method, required by some API configurations.
99
- * @param pageSize - Number of items per page.
100
- * @param pageToken - Cursor token for the next page.
101
- * @returns A promise that resolves with a {@link WorkflowListResponse} containing the matched workflows.
66
+ * @param params - Workspace, search and paging.
67
+ * @param {AbortSignal} [signal] - Aborts the request itself; the list hooks pass the query's own.
68
+ * @returns A page of workflows, with the cursor to the next one.
69
+ * @throws {Error} If `workspace` is empty.
102
70
  * @throws {Error} If the request fails.
103
71
  */
104
- export declare const listWorkflows: (api: AxiosInstance, workspace?: string, pageSize?: number, pageToken?: string) => Promise<WorkflowListResponse>;
72
+ export declare const listWorkflows: (api: AxiosInstance, { workspace, search, pageSize, pageToken }: WorkflowListParams, signal?: AbortSignal) => Promise<WorkflowListResponse>;
105
73
  /**
106
74
  * Fetches a single workflow execution by ID.
107
75
  *
108
76
  * @param api - Axios instance used to make the HTTP request.
109
77
  * @param workflowId - The unique identifier of the workflow.
110
- * @param executionId - The unique identifier of the workflow execution to fetch.
78
+ * @param workflowExecutionId - The unique identifier of the workflow execution to fetch.
111
79
  * @param workspace - The workspace in which the workflow execution resides.
80
+ * @param {AbortSignal} [signal] - Aborts the request itself; the entity hooks pass the query's own.
112
81
  * @returns A promise that resolves with the {@link WorkflowExecution} object.
113
82
  * @throws {Error} If `workspace` is not provided.
114
83
  * @throws {Error} If the request fails.
115
84
  */
116
- export declare const getWorkflowExecution: (api: AxiosInstance, workflowId: string, executionId: string, workspace: string) => Promise<WorkflowExecution>;
85
+ export declare const getWorkflowExecution: (api: AxiosInstance, workflowId: string, workflowExecutionId: string, workspace: string, signal?: AbortSignal) => Promise<WorkflowExecution>;
86
+ /** What `listWorkflowExecutions` sends: the parameters the endpoint reads, each from the URL. */
87
+ export type WorkflowExecutionListParams = {
88
+ /** Not used to filter: the endpoint lists the workflow's executions. A sub-user's role check needs it. */
89
+ workspace: string;
90
+ pageSize?: number;
91
+ pageToken?: string;
92
+ /** Only the executions this worker took part in. */
93
+ workerId?: string;
94
+ /** Include each execution's `resume`, the per-worker summary. The API leaves it out by default. */
95
+ withResume?: boolean;
96
+ };
117
97
  /**
118
- * Fetches a paginated list of workflow executions matching the given query.
98
+ * Lists the executions of one workflow, newest first, a page at a time.
99
+ *
100
+ * Everything goes in the URL. The endpoint reads `page_size`, `page_token`, `worker_id` and
101
+ * `with_resume` from there and ignores a JSON `query`, which is what this function used to send:
102
+ * the page size had no effect and every "next page" came back as the first one.
119
103
  *
120
104
  * @param api - Axios instance used to make the HTTP request.
121
- * @param workflowId - The unique identifier of the workflow whose executions to list.
122
- * @param query - Query object containing filters, pagination, and sorting options.
123
- * Must include a `workspace` filter expression.
124
- * @returns A promise that resolves with a {@link WorkflowExecutionListResponse} containing the matched executions.
125
- * @throws {Error} If the `workspace` filter is not present in `query.filters`.
105
+ * @param workflowId - The workflow whose executions to list.
106
+ * @param params - Workspace, paging, and the endpoint's two filters.
107
+ * @param {AbortSignal} [signal] - Aborts the request itself; the list hooks pass the query's own.
108
+ * @returns A page of executions, with the cursor to the next one.
109
+ * @throws {Error} If `workspace` is empty.
126
110
  * @throws {Error} If the request fails.
127
111
  */
128
- export declare const listWorkflowExecutions: (api: AxiosInstance, workflowId: string, query: QueryObject) => Promise<WorkflowExecutionListResponse>;
112
+ export declare const listWorkflowExecutions: (api: AxiosInstance, workflowId: string, { workspace, pageSize, pageToken, workerId, withResume }: WorkflowExecutionListParams, signal?: AbortSignal) => Promise<WorkflowExecutionListResponse>;
129
113
  /**
130
114
  * Fetches a single worker execution by ID.
131
115
  *
@@ -133,22 +117,33 @@ export declare const listWorkflowExecutions: (api: AxiosInstance, workflowId: st
133
117
  * @param workflowId - The unique identifier of the parent workflow.
134
118
  * @param workerExecutionId - The unique identifier of the worker execution to fetch.
135
119
  * @param workspace - The workspace in which the worker execution resides.
120
+ * @param {AbortSignal} [signal] - Aborts the request itself; the entity hooks pass the query's own.
136
121
  * @returns A promise that resolves with the {@link WorkerExecution} object.
137
122
  * @throws {Error} If `workspace` is not provided.
138
123
  * @throws {Error} If the request fails.
139
124
  */
140
- export declare const getWorkerExecution: (api: AxiosInstance, workflowId: string, workerExecutionId: string, workspace: string) => Promise<WorkerExecution>;
125
+ export declare const getWorkerExecution: (api: AxiosInstance, workflowId: string, workerExecutionId: string, workspace: string, signal?: AbortSignal) => Promise<WorkerExecution>;
126
+ /** What `listWorkerExecutions` sends besides the execution id. */
127
+ export type WorkerExecutionListParams = {
128
+ /** Not used to filter. A sub-user's role check needs it. */
129
+ workspace: string;
130
+ /** Include each run's `result` and `input_params`. The API leaves them out by default. */
131
+ withResult?: boolean;
132
+ };
141
133
  /**
142
- * Fetches a paginated list of worker executions for a given workflow.
134
+ * Lists every worker execution of one workflow execution, grouped by worker.
135
+ *
136
+ * The endpoint returns them all at once: it is not paginated and takes no query. Each group is
137
+ * one worker, with its run as `execution`, or every parallel run as `executions`.
143
138
  *
144
139
  * @param api - Axios instance used to make the HTTP request.
145
- * @param workflowId - The unique identifier of the parent workflow.
146
- * @param workflowExecutionId - The unique identifier of the workflow execution to filter by.
147
- * @param query - Query object containing filters, pagination, and sorting options.
148
- * Must include a `workspace` filter expression.
149
- * @returns A promise that resolves with a {@link WorkerExecutionListResponse} containing the matched worker executions.
150
- * @throws {Error} If the `workspace` filter is not present in `query.filters`.
140
+ * @param workflowId - The parent workflow.
141
+ * @param workflowExecutionId - The workflow execution whose workers to list.
142
+ * @param params - Workspace, and whether to include results.
143
+ * @param {AbortSignal} [signal] - Aborts the request itself; the hooks pass the query's own.
144
+ * @returns The groups, and the highest parallel index among them.
145
+ * @throws {Error} If `workspace` is empty.
151
146
  * @throws {Error} If the request fails.
152
147
  */
153
- export declare const listWorkerExecutions: (api: AxiosInstance, workflowId: string, workflowExecutionId: string, query: QueryObject) => Promise<WorkerExecutionListResponse>;
148
+ export declare const listWorkerExecutions: (api: AxiosInstance, workflowId: string, workflowExecutionId: string, { workspace, withResult }: WorkerExecutionListParams, signal?: AbortSignal) => Promise<WorkerExecutionListResponse>;
154
149
  //# sourceMappingURL=workflow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/api/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,2BAA2B,EAAiC,QAAQ,EAAE,iBAAiB,EAAE,6BAA6B,EAAmC,oBAAoB,EAA0B,MAAM,kBAAkB,CAAC;AAI/P;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,GAAU,KAAK,aAAa,EAAE,IAAI,MAAM,EAAE,WAAW,MAAM,EAAE,YAAY,SAAS,KAAG,OAAO,CAAC,SAAS,CA2B7H,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,qEAAsE,CAAC;AAOzG,MAAM,MAAM,4BAA4B,GAAG;IACzC,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2GAA2G;IAC3G,SAAS,CAAC,EAAE,MAAM,CAAC;I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