@everysk/apps-sdk 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -0
  3. package/dist/EveryskApp.d.ts +73 -0
  4. package/dist/EveryskApp.d.ts.map +1 -0
  5. package/dist/EveryskApp.js +66 -0
  6. package/dist/EveryskApp.js.map +1 -0
  7. package/dist/agGrid/agGridTheme.d.ts +77 -0
  8. package/dist/agGrid/agGridTheme.d.ts.map +1 -0
  9. package/dist/agGrid/agGridTheme.js +88 -0
  10. package/dist/agGrid/agGridTheme.js.map +1 -0
  11. package/dist/agGrid/index.d.ts +4 -0
  12. package/dist/agGrid/index.d.ts.map +1 -0
  13. package/dist/agGrid/index.js +3 -0
  14. package/dist/api/datastore.d.ts +68 -0
  15. package/dist/api/datastore.d.ts.map +1 -0
  16. package/dist/api/datastore.js +125 -0
  17. package/dist/api/datastore.js.map +1 -0
  18. package/dist/api/entityQuery.d.ts +78 -0
  19. package/dist/api/entityQuery.d.ts.map +1 -0
  20. package/dist/api/entityQuery.js +100 -0
  21. package/dist/api/entityQuery.js.map +1 -0
  22. package/dist/api/file.d.ts +70 -0
  23. package/dist/api/file.d.ts.map +1 -0
  24. package/dist/api/file.js +126 -0
  25. package/dist/api/file.js.map +1 -0
  26. package/dist/api/portfolio.d.ts +67 -0
  27. package/dist/api/portfolio.d.ts.map +1 -0
  28. package/dist/api/portfolio.js +125 -0
  29. package/dist/api/portfolio.js.map +1 -0
  30. package/dist/api/profile.d.ts +40 -0
  31. package/dist/api/profile.d.ts.map +1 -0
  32. package/dist/api/profile.js +71 -0
  33. package/dist/api/profile.js.map +1 -0
  34. package/dist/api/websocketsConfig.d.ts +13 -0
  35. package/dist/api/websocketsConfig.d.ts.map +1 -0
  36. package/dist/api/websocketsConfig.js +25 -0
  37. package/dist/api/websocketsConfig.js.map +1 -0
  38. package/dist/api/workflow.d.ts +154 -0
  39. package/dist/api/workflow.d.ts.map +1 -0
  40. package/dist/api/workflow.js +289 -0
  41. package/dist/api/workflow.js.map +1 -0
  42. package/dist/api/workspace.d.ts +29 -0
  43. package/dist/api/workspace.d.ts.map +1 -0
  44. package/dist/api/workspace.js +54 -0
  45. package/dist/api/workspace.js.map +1 -0
  46. package/dist/components/ui/EveryskIcon/index.d.ts +5 -0
  47. package/dist/components/ui/EveryskIcon/index.d.ts.map +1 -0
  48. package/dist/components/ui/EveryskIcon/index.js +25 -0
  49. package/dist/components/ui/EveryskIcon/index.js.map +1 -0
  50. package/dist/components/ui/Footer/index.d.ts +5 -0
  51. package/dist/components/ui/Footer/index.d.ts.map +1 -0
  52. package/dist/components/ui/Footer/index.js +23 -0
  53. package/dist/components/ui/Footer/index.js.map +1 -0
  54. package/dist/components/ui/GlobalLoading/index.d.ts +8 -0
  55. package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -0
  56. package/dist/components/ui/GlobalLoading/index.js +42 -0
  57. package/dist/components/ui/GlobalLoading/index.js.map +1 -0
  58. package/dist/components/ui/PageContainer/index.d.ts +7 -0
  59. package/dist/components/ui/PageContainer/index.d.ts.map +1 -0
  60. package/dist/components/ui/PageContainer/index.js +20 -0
  61. package/dist/components/ui/PageContainer/index.js.map +1 -0
  62. package/dist/components/ui/Toolbar/index.d.ts +5 -0
  63. package/dist/components/ui/Toolbar/index.d.ts.map +1 -0
  64. package/dist/components/ui/Toolbar/index.js +32 -0
  65. package/dist/components/ui/Toolbar/index.js.map +1 -0
  66. package/dist/contexts/agGridLicenseContext/provider.d.ts +51 -0
  67. package/dist/contexts/agGridLicenseContext/provider.d.ts.map +1 -0
  68. package/dist/contexts/agGridLicenseContext/provider.js +58 -0
  69. package/dist/contexts/agGridLicenseContext/provider.js.map +1 -0
  70. package/dist/contexts/appAlertContext/index.d.ts +3 -0
  71. package/dist/contexts/appAlertContext/index.d.ts.map +1 -0
  72. package/dist/contexts/appAlertContext/index.js +7 -0
  73. package/dist/contexts/appAlertContext/index.js.map +1 -0
  74. package/dist/contexts/appAlertContext/provider.d.ts +40 -0
  75. package/dist/contexts/appAlertContext/provider.d.ts.map +1 -0
  76. package/dist/contexts/appAlertContext/provider.js +96 -0
  77. package/dist/contexts/appAlertContext/provider.js.map +1 -0
  78. package/dist/contexts/appAlertContext/types.d.ts +15 -0
  79. package/dist/contexts/appAlertContext/types.d.ts.map +1 -0
  80. package/dist/contexts/appAlertContext/useAppAlert.d.ts +30 -0
  81. package/dist/contexts/appAlertContext/useAppAlert.d.ts.map +1 -0
  82. package/dist/contexts/appAlertContext/useAppAlert.js +40 -0
  83. package/dist/contexts/appAlertContext/useAppAlert.js.map +1 -0
  84. package/dist/contexts/appConfigContext/index.d.ts +3 -0
  85. package/dist/contexts/appConfigContext/index.d.ts.map +1 -0
  86. package/dist/contexts/appConfigContext/index.js +7 -0
  87. package/dist/contexts/appConfigContext/index.js.map +1 -0
  88. package/dist/contexts/appConfigContext/provider.d.ts +45 -0
  89. package/dist/contexts/appConfigContext/provider.d.ts.map +1 -0
  90. package/dist/contexts/appConfigContext/provider.js +63 -0
  91. package/dist/contexts/appConfigContext/provider.js.map +1 -0
  92. package/dist/contexts/appConfigContext/types.d.ts +28 -0
  93. package/dist/contexts/appConfigContext/types.d.ts.map +1 -0
  94. package/dist/contexts/appConfigContext/useAppConfig.d.ts +20 -0
  95. package/dist/contexts/appConfigContext/useAppConfig.d.ts.map +1 -0
  96. package/dist/contexts/appConfigContext/useAppConfig.js +30 -0
  97. package/dist/contexts/appConfigContext/useAppConfig.js.map +1 -0
  98. package/dist/contexts/webSocketContext/constants.d.ts +4 -0
  99. package/dist/contexts/webSocketContext/constants.d.ts.map +1 -0
  100. package/dist/contexts/webSocketContext/constants.js +8 -0
  101. package/dist/contexts/webSocketContext/constants.js.map +1 -0
  102. package/dist/contexts/webSocketContext/handler.d.ts +43 -0
  103. package/dist/contexts/webSocketContext/handler.d.ts.map +1 -0
  104. package/dist/contexts/webSocketContext/handler.js +87 -0
  105. package/dist/contexts/webSocketContext/handler.js.map +1 -0
  106. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts +19 -0
  107. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts.map +1 -0
  108. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js +31 -0
  109. package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js.map +1 -0
  110. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +11 -0
  111. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts.map +1 -0
  112. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +21 -0
  113. package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -0
  114. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts +30 -0
  115. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts.map +1 -0
  116. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js +44 -0
  117. package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js.map +1 -0
  118. package/dist/contexts/webSocketContext/index.d.ts +3 -0
  119. package/dist/contexts/webSocketContext/index.d.ts.map +1 -0
  120. package/dist/contexts/webSocketContext/index.js +7 -0
  121. package/dist/contexts/webSocketContext/index.js.map +1 -0
  122. package/dist/contexts/webSocketContext/provider.d.ts +39 -0
  123. package/dist/contexts/webSocketContext/provider.d.ts.map +1 -0
  124. package/dist/contexts/webSocketContext/provider.js +121 -0
  125. package/dist/contexts/webSocketContext/provider.js.map +1 -0
  126. package/dist/contexts/webSocketContext/types.d.ts +41 -0
  127. package/dist/contexts/webSocketContext/types.d.ts.map +1 -0
  128. package/dist/datastore/index.d.ts +7 -0
  129. package/dist/datastore/index.d.ts.map +1 -0
  130. package/dist/file/index.d.ts +6 -0
  131. package/dist/file/index.d.ts.map +1 -0
  132. package/dist/hooks/datastore/useDatastoreMutations.d.ts +151 -0
  133. package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -0
  134. package/dist/hooks/datastore/useDatastoreMutations.js +198 -0
  135. package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -0
  136. package/dist/hooks/datastore/useFetchDatastore.d.ts +205 -0
  137. package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -0
  138. package/dist/hooks/datastore/useFetchDatastore.js +85 -0
  139. package/dist/hooks/datastore/useFetchDatastore.js.map +1 -0
  140. package/dist/hooks/datastore/useFetchDatastores.d.ts +70 -0
  141. package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -0
  142. package/dist/hooks/datastore/useFetchDatastores.js +105 -0
  143. package/dist/hooks/datastore/useFetchDatastores.js.map +1 -0
  144. package/dist/hooks/file/useFetchFile.d.ts +212 -0
  145. package/dist/hooks/file/useFetchFile.d.ts.map +1 -0
  146. package/dist/hooks/file/useFetchFile.js +87 -0
  147. package/dist/hooks/file/useFetchFile.js.map +1 -0
  148. package/dist/hooks/file/useFetchFiles.d.ts +60 -0
  149. package/dist/hooks/file/useFetchFiles.d.ts.map +1 -0
  150. package/dist/hooks/file/useFetchFiles.js +89 -0
  151. package/dist/hooks/file/useFetchFiles.js.map +1 -0
  152. package/dist/hooks/file/useFileMutations.d.ts +161 -0
  153. package/dist/hooks/file/useFileMutations.d.ts.map +1 -0
  154. package/dist/hooks/file/useFileMutations.js +208 -0
  155. package/dist/hooks/file/useFileMutations.js.map +1 -0
  156. package/dist/hooks/portfolio/useFetchPortfolio.d.ts +210 -0
  157. package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -0
  158. package/dist/hooks/portfolio/useFetchPortfolio.js +85 -0
  159. package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -0
  160. package/dist/hooks/portfolio/useFetchPortfolios.d.ts +60 -0
  161. package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -0
  162. package/dist/hooks/portfolio/useFetchPortfolios.js +89 -0
  163. package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -0
  164. package/dist/hooks/portfolio/usePortfolioMutations.d.ts +171 -0
  165. package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -0
  166. package/dist/hooks/portfolio/usePortfolioMutations.js +218 -0
  167. package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -0
  168. package/dist/hooks/profile/useFetchProfile.d.ts +206 -0
  169. package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -0
  170. package/dist/hooks/profile/useFetchProfile.js +70 -0
  171. package/dist/hooks/profile/useFetchProfile.js.map +1 -0
  172. package/dist/hooks/useAxios.d.ts +40 -0
  173. package/dist/hooks/useAxios.d.ts.map +1 -0
  174. package/dist/hooks/useAxios.js +76 -0
  175. package/dist/hooks/useAxios.js.map +1 -0
  176. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +198 -0
  177. package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -0
  178. package/dist/hooks/workflow/useFetchWorkerExecution.js +69 -0
  179. package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -0
  180. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +52 -0
  181. package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -0
  182. package/dist/hooks/workflow/useFetchWorkerExecutions.js +83 -0
  183. package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -0
  184. package/dist/hooks/workflow/useFetchWorkflow.d.ts +195 -0
  185. package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -0
  186. package/dist/hooks/workflow/useFetchWorkflow.js +70 -0
  187. package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -0
  188. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +198 -0
  189. package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -0
  190. package/dist/hooks/workflow/useFetchWorkflowExecution.js +69 -0
  191. package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -0
  192. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +49 -0
  193. package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -0
  194. package/dist/hooks/workflow/useFetchWorkflowExecutions.js +77 -0
  195. package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -0
  196. package/dist/hooks/workflow/useFetchWorkflows.d.ts +47 -0
  197. package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -0
  198. package/dist/hooks/workflow/useFetchWorkflows.js +67 -0
  199. package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -0
  200. package/dist/hooks/workflow/useRunWorkflow.d.ts +30 -0
  201. package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -0
  202. package/dist/hooks/workflow/useRunWorkflow.js +50 -0
  203. package/dist/hooks/workflow/useRunWorkflow.js.map +1 -0
  204. package/dist/hooks/workspace/useFetchWorkspace.d.ts +197 -0
  205. package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -0
  206. package/dist/hooks/workspace/useFetchWorkspace.js +65 -0
  207. package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -0
  208. package/dist/hooks/workspace/useFetchWorkspaces.d.ts +46 -0
  209. package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -0
  210. package/dist/hooks/workspace/useFetchWorkspaces.js +66 -0
  211. package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -0
  212. package/dist/index.d.ts +24 -0
  213. package/dist/index.d.ts.map +1 -0
  214. package/dist/index.js +50 -0
  215. package/dist/lib/datastoreTable.d.ts +126 -0
  216. package/dist/lib/datastoreTable.d.ts.map +1 -0
  217. package/dist/lib/datastoreTable.js +146 -0
  218. package/dist/lib/datastoreTable.js.map +1 -0
  219. package/dist/lib/queryClient.d.ts +24 -0
  220. package/dist/lib/queryClient.d.ts.map +1 -0
  221. package/dist/lib/queryClient.js +48 -0
  222. package/dist/lib/queryClient.js.map +1 -0
  223. package/dist/portfolio/index.d.ts +6 -0
  224. package/dist/portfolio/index.d.ts.map +1 -0
  225. package/dist/profile/index.d.ts +4 -0
  226. package/dist/profile/index.d.ts.map +1 -0
  227. package/dist/socket/index.d.ts +10 -0
  228. package/dist/socket/index.d.ts.map +1 -0
  229. package/dist/socket/index.js +9 -0
  230. package/dist/test/index.d.ts +2 -0
  231. package/dist/test/index.d.ts.map +1 -0
  232. package/dist/test/index.js +2 -0
  233. package/dist/test/mocks/agGridEnterprise.d.ts +38 -0
  234. package/dist/test/mocks/agGridEnterprise.d.ts.map +1 -0
  235. package/dist/test/mocks/agGridEnterprise.js +43 -0
  236. package/dist/test/mocks/agGridEnterprise.js.map +1 -0
  237. package/dist/test/mocks/agGridReact.d.ts +42 -0
  238. package/dist/test/mocks/agGridReact.d.ts.map +1 -0
  239. package/dist/test/mocks/agGridReact.js +47 -0
  240. package/dist/test/mocks/agGridReact.js.map +1 -0
  241. package/dist/test/mocks/index.d.ts +5 -0
  242. package/dist/test/mocks/index.d.ts.map +1 -0
  243. package/dist/test/mocks/index.js +4 -0
  244. package/dist/test/mocks/socketIoClient.d.ts +45 -0
  245. package/dist/test/mocks/socketIoClient.d.ts.map +1 -0
  246. package/dist/test/mocks/socketIoClient.js +54 -0
  247. package/dist/test/mocks/socketIoClient.js.map +1 -0
  248. package/dist/test/renderWithProviders.d.ts +107 -0
  249. package/dist/test/renderWithProviders.d.ts.map +1 -0
  250. package/dist/test/renderWithProviders.js +85 -0
  251. package/dist/test/renderWithProviders.js.map +1 -0
  252. package/dist/test/setup.d.ts +2 -0
  253. package/dist/test/setup.d.ts.map +1 -0
  254. package/dist/test/setup.js +25 -0
  255. package/dist/test/setup.js.map +1 -0
  256. package/dist/theme/ThemeProvider.d.ts +12 -0
  257. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  258. package/dist/theme/ThemeProvider.js +22 -0
  259. package/dist/theme/ThemeProvider.js.map +1 -0
  260. package/dist/theme/index.d.ts +9 -0
  261. package/dist/theme/index.d.ts.map +1 -0
  262. package/dist/theme/overrides/index.d.ts +7 -0
  263. package/dist/theme/overrides/index.d.ts.map +1 -0
  264. package/dist/theme/overrides/index.js +31 -0
  265. package/dist/theme/overrides/index.js.map +1 -0
  266. package/dist/theme/overrides/muiButton.d.ts +3 -0
  267. package/dist/theme/overrides/muiButton.d.ts.map +1 -0
  268. package/dist/theme/overrides/muiButton.js +6 -0
  269. package/dist/theme/overrides/muiButton.js.map +1 -0
  270. package/dist/theme/overrides/muiCssBaseline.d.ts +31 -0
  271. package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -0
  272. package/dist/theme/overrides/muiCssBaseline.js +27 -0
  273. package/dist/theme/overrides/muiCssBaseline.js.map +1 -0
  274. package/dist/theme/overrides/muiDatePicker.d.ts +10 -0
  275. package/dist/theme/overrides/muiDatePicker.d.ts.map +1 -0
  276. package/dist/theme/overrides/muiDatePicker.js +6 -0
  277. package/dist/theme/overrides/muiDatePicker.js.map +1 -0
  278. package/dist/theme/overrides/muiFormControl.d.ts +3 -0
  279. package/dist/theme/overrides/muiFormControl.d.ts.map +1 -0
  280. package/dist/theme/overrides/muiFormControl.js +6 -0
  281. package/dist/theme/overrides/muiFormControl.js.map +1 -0
  282. package/dist/theme/overrides/muiIconButton.d.ts +3 -0
  283. package/dist/theme/overrides/muiIconButton.d.ts.map +1 -0
  284. package/dist/theme/overrides/muiIconButton.js +6 -0
  285. package/dist/theme/overrides/muiIconButton.js.map +1 -0
  286. package/dist/theme/overrides/muiSelect.d.ts +3 -0
  287. package/dist/theme/overrides/muiSelect.d.ts.map +1 -0
  288. package/dist/theme/overrides/muiSelect.js +6 -0
  289. package/dist/theme/overrides/muiSelect.js.map +1 -0
  290. package/dist/theme/overrides/muiSvgIcon.d.ts +3 -0
  291. package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -0
  292. package/dist/theme/overrides/muiSvgIcon.js +6 -0
  293. package/dist/theme/overrides/muiSvgIcon.js.map +1 -0
  294. package/dist/theme/overrides/muiTextField.d.ts +3 -0
  295. package/dist/theme/overrides/muiTextField.d.ts.map +1 -0
  296. package/dist/theme/overrides/muiTextField.js +6 -0
  297. package/dist/theme/overrides/muiTextField.js.map +1 -0
  298. package/dist/theme/overrides/muiToggleButton.d.ts +3 -0
  299. package/dist/theme/overrides/muiToggleButton.d.ts.map +1 -0
  300. package/dist/theme/overrides/muiToggleButton.js +6 -0
  301. package/dist/theme/overrides/muiToggleButton.js.map +1 -0
  302. package/dist/theme/overrides/muiToggleButtonGroup.d.ts +3 -0
  303. package/dist/theme/overrides/muiToggleButtonGroup.d.ts.map +1 -0
  304. package/dist/theme/overrides/muiToggleButtonGroup.js +6 -0
  305. package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -0
  306. package/dist/theme/themes/DefaultDark.d.ts +7 -0
  307. package/dist/theme/themes/DefaultDark.d.ts.map +1 -0
  308. package/dist/theme/themes/DefaultDark.js +15 -0
  309. package/dist/theme/themes/DefaultDark.js.map +1 -0
  310. package/dist/theme/themes/DefaultLight.d.ts +7 -0
  311. package/dist/theme/themes/DefaultLight.d.ts.map +1 -0
  312. package/dist/theme/themes/DefaultLight.js +15 -0
  313. package/dist/theme/themes/DefaultLight.js.map +1 -0
  314. package/dist/theme/themes/EveryskDark.d.ts +15 -0
  315. package/dist/theme/themes/EveryskDark.d.ts.map +1 -0
  316. package/dist/theme/themes/EveryskDark.js +63 -0
  317. package/dist/theme/themes/EveryskDark.js.map +1 -0
  318. package/dist/theme/themes/EveryskLight.d.ts +21 -0
  319. package/dist/theme/themes/EveryskLight.d.ts.map +1 -0
  320. package/dist/theme/themes/EveryskLight.js +69 -0
  321. package/dist/theme/themes/EveryskLight.js.map +1 -0
  322. package/dist/theme/themes/MidnightEmber.d.ts +3 -0
  323. package/dist/theme/themes/MidnightEmber.d.ts.map +1 -0
  324. package/dist/theme/themes/MidnightEmber.js +31 -0
  325. package/dist/theme/themes/MidnightEmber.js.map +1 -0
  326. package/dist/theme/themes/index.d.ts +17 -0
  327. package/dist/theme/themes/index.d.ts.map +1 -0
  328. package/dist/theme/themes/index.js +32 -0
  329. package/dist/theme/themes/index.js.map +1 -0
  330. package/dist/types/anyRecord.d.ts +4 -0
  331. package/dist/types/anyRecord.d.ts.map +1 -0
  332. package/dist/types/datastore.d.ts +26 -0
  333. package/dist/types/datastore.d.ts.map +1 -0
  334. package/dist/types/entityQuery.d.ts +47 -0
  335. package/dist/types/entityQuery.d.ts.map +1 -0
  336. package/dist/types/file.d.ts +29 -0
  337. package/dist/types/file.d.ts.map +1 -0
  338. package/dist/types/portfolio.d.ts +77 -0
  339. package/dist/types/portfolio.d.ts.map +1 -0
  340. package/dist/types/profile.d.ts +37 -0
  341. package/dist/types/profile.d.ts.map +1 -0
  342. package/dist/types/workflow.d.ts +68 -0
  343. package/dist/types/workflow.d.ts.map +1 -0
  344. package/dist/types/workspace.d.ts +13 -0
  345. package/dist/types/workspace.d.ts.map +1 -0
  346. package/dist/ui/index.d.ts +6 -0
  347. package/dist/ui/index.d.ts.map +1 -0
  348. package/dist/workflow/index.d.ts +10 -0
  349. package/dist/workflow/index.d.ts.map +1 -0
  350. package/dist/workspace/index.d.ts +5 -0
  351. package/dist/workspace/index.d.ts.map +1 -0
  352. package/package.json +148 -0
  353. package/src/EveryskApp.tsx +108 -0
  354. package/src/agGrid/agGridTheme.ts +113 -0
  355. package/src/agGrid/index.ts +15 -0
  356. package/src/api/datastore.ts +175 -0
  357. package/src/api/entityQuery.ts +101 -0
  358. package/src/api/file.ts +174 -0
  359. package/src/api/portfolio.ts +190 -0
  360. package/src/api/profile.ts +80 -0
  361. package/src/api/websocketsConfig.ts +32 -0
  362. package/src/api/workflow.ts +427 -0
  363. package/src/api/workspace.ts +72 -0
  364. package/src/components/ui/EveryskIcon/index.tsx +24 -0
  365. package/src/components/ui/Footer/index.tsx +30 -0
  366. package/src/components/ui/GlobalLoading/index.tsx +38 -0
  367. package/src/components/ui/PageContainer/index.tsx +14 -0
  368. package/src/components/ui/Toolbar/index.tsx +44 -0
  369. package/src/contexts/agGridLicenseContext/provider.tsx +63 -0
  370. package/src/contexts/appAlertContext/index.tsx +4 -0
  371. package/src/contexts/appAlertContext/provider.tsx +92 -0
  372. package/src/contexts/appAlertContext/types.ts +17 -0
  373. package/src/contexts/appAlertContext/useAppAlert.ts +39 -0
  374. package/src/contexts/appConfigContext/index.tsx +4 -0
  375. package/src/contexts/appConfigContext/provider.tsx +67 -0
  376. package/src/contexts/appConfigContext/types.ts +28 -0
  377. package/src/contexts/appConfigContext/useAppConfig.ts +30 -0
  378. package/src/contexts/webSocketContext/constants.ts +3 -0
  379. package/src/contexts/webSocketContext/handler.ts +108 -0
  380. package/src/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.ts +36 -0
  381. package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +18 -0
  382. package/src/contexts/webSocketContext/hooks/useWebSocketSubscription/index.ts +45 -0
  383. package/src/contexts/webSocketContext/index.tsx +5 -0
  384. package/src/contexts/webSocketContext/provider.tsx +125 -0
  385. package/src/contexts/webSocketContext/types.ts +50 -0
  386. package/src/datastore/index.ts +14 -0
  387. package/src/file/index.ts +13 -0
  388. package/src/hooks/datastore/useDatastoreMutations.ts +221 -0
  389. package/src/hooks/datastore/useFetchDatastore.ts +95 -0
  390. package/src/hooks/datastore/useFetchDatastores.ts +162 -0
  391. package/src/hooks/file/useFetchFile.ts +93 -0
  392. package/src/hooks/file/useFetchFiles.ts +109 -0
  393. package/src/hooks/file/useFileMutations.ts +240 -0
  394. package/src/hooks/portfolio/useFetchPortfolio.ts +94 -0
  395. package/src/hooks/portfolio/useFetchPortfolios.ts +109 -0
  396. package/src/hooks/portfolio/usePortfolioMutations.ts +250 -0
  397. package/src/hooks/profile/useFetchProfile.ts +93 -0
  398. package/src/hooks/useAxios.ts +98 -0
  399. package/src/hooks/workflow/useFetchWorkerExecution.ts +78 -0
  400. package/src/hooks/workflow/useFetchWorkerExecutions.ts +98 -0
  401. package/src/hooks/workflow/useFetchWorkflow.ts +76 -0
  402. package/src/hooks/workflow/useFetchWorkflowExecution.ts +79 -0
  403. package/src/hooks/workflow/useFetchWorkflowExecutions.ts +95 -0
  404. package/src/hooks/workflow/useFetchWorkflows.ts +84 -0
  405. package/src/hooks/workflow/useRunWorkflow.ts +62 -0
  406. package/src/hooks/workspace/useFetchWorkspace.ts +78 -0
  407. package/src/hooks/workspace/useFetchWorkspaces.ts +86 -0
  408. package/src/index.ts +72 -0
  409. package/src/lib/datastoreTable.ts +159 -0
  410. package/src/lib/queryClient.ts +60 -0
  411. package/src/portfolio/index.ts +13 -0
  412. package/src/profile/index.ts +11 -0
  413. package/src/socket/index.ts +19 -0
  414. package/src/test/index.ts +10 -0
  415. package/src/test/mocks/agGridEnterprise.ts +45 -0
  416. package/src/test/mocks/agGridReact.tsx +61 -0
  417. package/src/test/mocks/index.ts +22 -0
  418. package/src/test/mocks/socketIoClient.ts +78 -0
  419. package/src/test/renderWithProviders.tsx +114 -0
  420. package/src/test/setup.ts +46 -0
  421. package/src/theme/ThemeProvider.tsx +33 -0
  422. package/src/theme/index.ts +15 -0
  423. package/src/theme/overrides/index.ts +31 -0
  424. package/src/theme/overrides/muiButton.ts +7 -0
  425. package/src/theme/overrides/muiCssBaseline.ts +35 -0
  426. package/src/theme/overrides/muiDatePicker.ts +5 -0
  427. package/src/theme/overrides/muiFormControl.ts +7 -0
  428. package/src/theme/overrides/muiIconButton.ts +7 -0
  429. package/src/theme/overrides/muiSelect.ts +7 -0
  430. package/src/theme/overrides/muiSvgIcon.ts +7 -0
  431. package/src/theme/overrides/muiTextField.ts +7 -0
  432. package/src/theme/overrides/muiToggleButton.ts +7 -0
  433. package/src/theme/overrides/muiToggleButtonGroup.ts +7 -0
  434. package/src/theme/themes/DefaultDark.ts +14 -0
  435. package/src/theme/themes/DefaultLight.ts +14 -0
  436. package/src/theme/themes/EveryskDark.ts +62 -0
  437. package/src/theme/themes/EveryskLight.ts +68 -0
  438. package/src/theme/themes/MidnightEmber.ts +30 -0
  439. package/src/theme/themes/index.ts +35 -0
  440. package/src/types/anyRecord.ts +4 -0
  441. package/src/types/datastore.ts +33 -0
  442. package/src/types/entityQuery.ts +64 -0
  443. package/src/types/file.ts +32 -0
  444. package/src/types/portfolio.ts +81 -0
  445. package/src/types/profile.ts +39 -0
  446. package/src/types/workflow.ts +76 -0
  447. package/src/types/workspace.ts +15 -0
  448. package/src/ui/index.ts +14 -0
  449. package/src/workflow/index.ts +17 -0
  450. package/src/workspace/index.ts +12 -0
@@ -0,0 +1,80 @@
1
+ import { isAxiosError, type AxiosInstance, type AxiosResponse } from "axios";
2
+
3
+ import type { AnyRecord } from "@/types/anyRecord";
4
+ import type { Profile, ProfileResponse } from "@/types/profile";
5
+
6
+ const baseUrl = "profile";
7
+
8
+ /**
9
+ * DEV_PROFILE — the profile served while running the dev server.
10
+ *
11
+ * `GET /api/profile` only works in production: it resolves the user from the session, and in dev
12
+ * the Vite proxy authenticates with OAuth2 client credentials (a machine token, no logged user),
13
+ * so the endpoint has no session to read and the request fails. This stands in for it and covers
14
+ * every field the API returns, so a screen renders with realistic values in dev.
15
+ *
16
+ * The values are deliberately obvious placeholders — see `docs/development.md`.
17
+ */
18
+ export const DEV_PROFILE: Profile = {
19
+ email: "dev@everysk.com",
20
+ user_type: "USER",
21
+ region: "BR",
22
+ company_name: "Everysk (dev)",
23
+ first_name: "Dev",
24
+ last_name: "User",
25
+ phone: "+55 11 0000-0000",
26
+ address: "Dev address, 0",
27
+ billing_email: "dev@everysk.com",
28
+ time_zone: "America/Sao_Paulo",
29
+ company_logo: "",
30
+ user_role: "ADMIN",
31
+ skin_theme: "light",
32
+ account_deletion_requested: false,
33
+ asset: "",
34
+ owner: true,
35
+ auto_refresh: false,
36
+ };
37
+
38
+ /**
39
+ * getProfile
40
+ *
41
+ * Fetches the profile of the logged user. The endpoint takes no parameters — the API resolves the
42
+ * user from the session — so an app always gets whoever is using it.
43
+ *
44
+ * When `fallback` is given it is returned as-is and the network is never touched. That is how an
45
+ * app serves `DEV_PROFILE` while running the dev server, where the endpoint cannot resolve.
46
+ *
47
+ * The template decided this itself with `if (import.meta.env.DEV) return DEV_PROFILE`. That
48
+ * cannot live in a published package: Vite replaces `import.meta.env.DEV` with a literal at the
49
+ * build of whoever compiles the file, so the branch would freeze to whatever the SDK's own build
50
+ * was and stop tracking the consuming app entirely. Which environment counts as "dev" is the
51
+ * app's question, so the app answers it:
52
+ *
53
+ * ```ts
54
+ * useFetchProfile({ fallback: import.meta.env.DEV ? DEV_PROFILE : undefined });
55
+ * ```
56
+ *
57
+ * @param {AxiosInstance} api - Axios instance.
58
+ * @param {Profile} [fallback] - Returned instead of calling the API, when present.
59
+ * @returns {Promise<Profile>} The logged user's profile.
60
+ *
61
+ * @throws {Error} If the request fails.
62
+ */
63
+ export const getProfile = async (api: AxiosInstance, fallback?: Profile): Promise<Profile> => {
64
+ if (fallback) return fallback;
65
+
66
+ try {
67
+ const response: AxiosResponse<ProfileResponse> = await api.get(baseUrl);
68
+ return response.data.profile;
69
+ } catch (error: unknown) {
70
+ if (isAxiosError<AnyRecord>(error)) {
71
+ throw new Error(error.message || "Error while fetching profile");
72
+ }
73
+
74
+ if (error instanceof Error) {
75
+ throw error;
76
+ }
77
+
78
+ throw new Error("Error while fetching profile");
79
+ }
80
+ };
@@ -0,0 +1,32 @@
1
+ import { isAxiosError, type AxiosInstance, type AxiosResponse } from "axios";
2
+
3
+ import type { AnyRecord } from "@/types/anyRecord";
4
+ import type { WebsocketsConfig } from "@/contexts/webSocketContext/types";
5
+
6
+ const baseUrl = "websockets_config";
7
+
8
+ /**
9
+ * getWebsocketsConfig
10
+ *
11
+ * Fetches the Socket.IO connection config for the current user/app.
12
+ *
13
+ * @param {AxiosInstance} api - Axios instance (from `useAxios`).
14
+ * @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.
15
+ * @throws {Error} If the request fails.
16
+ */
17
+ export const getWebsocketsConfig = async (api: AxiosInstance): Promise<WebsocketsConfig> => {
18
+ try {
19
+ const response: AxiosResponse<WebsocketsConfig> = await api.get(baseUrl);
20
+ return response.data;
21
+ } catch (error: unknown) {
22
+ if (isAxiosError<AnyRecord>(error)) {
23
+ throw new Error(error.message || "Error fetching websockets config");
24
+ }
25
+
26
+ if (error instanceof Error) {
27
+ throw error;
28
+ }
29
+
30
+ throw new Error("Error fetching websockets config");
31
+ }
32
+ };
@@ -0,0 +1,427 @@
1
+ import { isAxiosError, type AxiosInstance, type AxiosResponse } from "axios";
2
+
3
+ import type { AnyRecord } from "@/types/anyRecord";
4
+ import type { FilterExpression, QueryObject } from "@/types/entityQuery";
5
+ import type { WorkerExecution, WorkerExecutionListResponse, WorkerExecutionSingleResponse, Workflow, WorkflowExecution, WorkflowExecutionListResponse, WorkflowExecutionSingleResponse, WorkflowListResponse, WorkflowSingleResponse } from "@/types/workflow";
6
+
7
+ const baseUrl = "workflows";
8
+
9
+ /**
10
+ * Runs a workflow asynchronously.
11
+ *
12
+ * Starts the workflow in a non-blocking way: the response carries a workflow execution
13
+ * with a non-terminal status (e.g. "RUNNING"). Use polling to wait for the terminal state.
14
+ *
15
+ * @param api - Axios instance used to make the HTTP request.
16
+ * @param id - The unique identifier of the workflow to run.
17
+ * @param workspace - The workspace in which the workflow will be executed.
18
+ * @param parameters - Key-value parameters to pass to the workflow.
19
+ * @returns A promise that resolves with the workflow execution response data.
20
+ * @throws {Error} If `workspace` is not provided.
21
+ * @throws {Error} If the request fails.
22
+ */
23
+ export const runWorkflow = async (api: AxiosInstance, id: string, workspace: string, parameters: AnyRecord): Promise<AnyRecord> => {
24
+
25
+ if (!workspace) {
26
+ throw new Error("Workspace is required to run workflow");
27
+ }
28
+
29
+ try {
30
+ const body: AnyRecord = {
31
+ workspace,
32
+ parameters,
33
+ };
34
+
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
+ const response: AxiosResponse<any> = await api.post(`${baseUrl}/${id}/run`, body);
37
+
38
+ return response.data;
39
+ } catch (error: unknown) {
40
+ if (isAxiosError<AnyRecord>(error)) {
41
+ throw new Error(error.message || "");
42
+ }
43
+
44
+ if (error instanceof Error) {
45
+ throw error;
46
+ }
47
+
48
+ throw new Error("Error while running workflow");
49
+ }
50
+ };
51
+
52
+ /**
53
+ * Run statuses that indicate a workflow execution has reached a terminal state
54
+ * (i.e. it is no longer running and will not change again).
55
+ *
56
+ * Union of the backend's `WORKFLOW_EXECUTION_STATUS_FINISHED` set and the API's documented
57
+ * terminal `run_status` values (`SUCCEEDED`/`FAILED`/`KILLED`). `KILLED` is included so a
58
+ * killed execution is detected as terminal instead of polling until timeout.
59
+ */
60
+ export const TERMINAL_RUN_STATUSES = ["CANCELED", "COMPLETED", "SUCCEEDED", "FAILED", "KILLED"] as const;
61
+
62
+ const isTerminalRunStatus = (runStatus: unknown): boolean =>
63
+ TERMINAL_RUN_STATUSES.includes(String(runStatus ?? "").toUpperCase() as (typeof TERMINAL_RUN_STATUSES)[number]);
64
+
65
+ const sleep = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));
66
+
67
+ export type PollWorkflowExecutionOptions = {
68
+ /** Delay between status checks, in milliseconds. Defaults to 2000ms. */
69
+ intervalMs?: number;
70
+ /** Maximum time to wait for a terminal status before giving up, in milliseconds. Defaults to 5 minutes. */
71
+ timeoutMs?: number;
72
+ /** Optional abort signal to cancel polling (e.g. on unmount). */
73
+ signal?: AbortSignal;
74
+ };
75
+
76
+ /**
77
+ * Polls a workflow execution until it reaches a terminal run status (see {@link TERMINAL_RUN_STATUSES}).
78
+ *
79
+ * This is the interim, non-blocking replacement for synchronous (`synchronous: true`) execution:
80
+ * the workflow is started asynchronously and its status is checked periodically until it completes.
81
+ *
82
+ * @param api - Axios instance used to make the HTTP request.
83
+ * @param workflowId - The unique identifier of the workflow.
84
+ * @param executionId - The unique identifier of the workflow execution to poll.
85
+ * @param workspace - The workspace in which the workflow execution resides.
86
+ * @param options - Polling configuration (interval, timeout, abort signal).
87
+ * @returns A promise that resolves with the terminal {@link WorkflowExecution}.
88
+ * @throws {Error} If `workspace` is not provided.
89
+ * @throws {Error} If polling is aborted via `options.signal`.
90
+ * @throws {Error} If a terminal status is not reached before `options.timeoutMs` elapses.
91
+ */
92
+ export const pollWorkflowExecution = async (
93
+ api: AxiosInstance,
94
+ workflowId: string,
95
+ executionId: string,
96
+ workspace: string,
97
+ options: PollWorkflowExecutionOptions = {}
98
+ ): Promise<WorkflowExecution> => {
99
+ if (!workspace) {
100
+ throw new Error("Workspace is required to poll a workflow execution");
101
+ }
102
+
103
+ const { intervalMs = 2000, timeoutMs = 5 * 60 * 1000, signal } = options;
104
+ const startedAt = Date.now();
105
+
106
+ while (true) {
107
+ if (signal?.aborted) {
108
+ throw new Error("Workflow execution polling was aborted");
109
+ }
110
+
111
+ const execution = await getWorkflowExecution(api, workflowId, executionId, workspace);
112
+
113
+ if (isTerminalRunStatus(execution.run_status)) {
114
+ return execution;
115
+ }
116
+
117
+ if (Date.now() - startedAt >= timeoutMs) {
118
+ throw new Error("Timed out while waiting for the workflow execution to complete");
119
+ }
120
+
121
+ await sleep(intervalMs);
122
+ }
123
+ };
124
+
125
+ /**
126
+ * Starts a workflow asynchronously and polls its execution until completion.
127
+ *
128
+ * Interim replacement for synchronous execution: instead of holding the request open with
129
+ * `synchronous: true`, the workflow is started in a non-blocking way and its status is polled
130
+ * until it reaches a terminal state, at which point the final execution (with its result) is returned.
131
+ *
132
+ * @param api - Axios instance used to make the HTTP request.
133
+ * @param id - The unique identifier of the workflow to run.
134
+ * @param workspace - The workspace in which the workflow will be executed.
135
+ * @param parameters - Key-value parameters to pass to the workflow.
136
+ * @param options - Polling configuration (interval, timeout, abort signal).
137
+ * @returns A promise that resolves with the terminal {@link WorkflowExecution}.
138
+ * @throws {Error} If `workspace` is not provided.
139
+ * @throws {Error} If the run response does not contain a workflow execution id.
140
+ * @throws {Error} If the workflow execution ends in a "FAILED" run status.
141
+ * @throws {Error} If polling times out or is aborted.
142
+ */
143
+ const runWorkflowAndPoll = async (
144
+ api: AxiosInstance,
145
+ id: string,
146
+ workspace: string,
147
+ parameters: AnyRecord,
148
+ options: PollWorkflowExecutionOptions = {}
149
+ ): Promise<WorkflowExecution> => {
150
+ if (!workspace) {
151
+ throw new Error("Workspace is required to run workflow");
152
+ }
153
+
154
+ // Start the workflow asynchronously (non-blocking).
155
+ const startResponse = await runWorkflow(api, id, workspace, parameters);
156
+ const executionId = (startResponse.workflow_execution as WorkflowExecution | undefined)?.id;
157
+
158
+ if (!executionId) {
159
+ throw new Error("Workflow run did not return an execution id to poll");
160
+ }
161
+
162
+ // Poll the execution status until it completes, then consume the result.
163
+ const execution = await pollWorkflowExecution(api, id, executionId, workspace, options);
164
+
165
+ if (String(execution.run_status ?? "").toUpperCase() === "FAILED") {
166
+ throw new Error("Workflow execution failed");
167
+ }
168
+
169
+ return execution;
170
+ };
171
+
172
+ /**
173
+ * The terminal workflow execution together with the output produced by its final (ender) worker.
174
+ */
175
+ export type WorkflowResult = {
176
+ /** The terminal workflow execution. */
177
+ execution: WorkflowExecution;
178
+ /** The ender worker execution, or `null` if the execution did not reference one. */
179
+ workerExecution: WorkerExecution | null;
180
+ /** The output data produced by the ender worker (`workerExecution.result`), or `null`. */
181
+ result: Record<string, unknown> | null;
182
+ };
183
+
184
+ /**
185
+ * Starts a workflow, polls it to completion, then fetches the output produced by its final worker.
186
+ *
187
+ * A workflow execution does not carry the output payload itself — it references the final worker via
188
+ * `ender_worker_execution_id`, and that worker execution's `result` field holds the actual data.
189
+ * This helper performs the full flow: start (async) → poll → fetch ender worker → return its `result`.
190
+ *
191
+ * @param api - Axios instance used to make the HTTP request.
192
+ * @param id - The unique identifier of the workflow to run.
193
+ * @param workspace - The workspace in which the workflow will be executed.
194
+ * @param parameters - Key-value parameters to pass to the workflow.
195
+ * @param options - Polling configuration (interval, timeout, abort signal).
196
+ * @returns A promise that resolves with the {@link WorkflowResult} (execution, ender worker execution, and its result).
197
+ * @throws {Error} If `workspace` is not provided.
198
+ * @throws {Error} If the workflow execution ends in a "FAILED" run status.
199
+ * @throws {Error} If polling times out or is aborted.
200
+ */
201
+ export const runWorkflowAndGetResult = async (
202
+ api: AxiosInstance,
203
+ id: string,
204
+ workspace: string,
205
+ parameters: AnyRecord,
206
+ options: PollWorkflowExecutionOptions = {}
207
+ ): Promise<WorkflowResult> => {
208
+ const execution = await runWorkflowAndPoll(api, id, workspace, parameters, options);
209
+
210
+ const enderWorkerExecutionId = execution.ender_worker_execution_id;
211
+ if (!enderWorkerExecutionId) {
212
+ return { execution, workerExecution: null, result: null };
213
+ }
214
+
215
+ const workerExecution = await getWorkerExecution(api, id, enderWorkerExecutionId, workspace);
216
+
217
+ return { execution, workerExecution, result: workerExecution.result ?? null };
218
+ };
219
+
220
+ /**
221
+ * Fetches a single workflow by ID.
222
+ *
223
+ * @param api - Axios instance used to make the HTTP request.
224
+ * @param id - The unique identifier of the workflow to fetch.
225
+ * @param workspace - The workspace in which the workflow resides.
226
+ * @returns A promise that resolves with the {@link Workflow} object.
227
+ * @throws {Error} If `workspace` is not provided.
228
+ * @throws {Error} If the request fails.
229
+ */
230
+ export const getWorkflow = async (api: AxiosInstance, id: string, workspace: string): Promise<Workflow> => {
231
+ if (!workspace) {
232
+ throw new Error("Workspace is required to fetch a workflow");
233
+ }
234
+
235
+ try {
236
+ const params: AnyRecord = { workspace };
237
+ const response: AxiosResponse<WorkflowSingleResponse> = await api.get(`${baseUrl}/${id}`, { params });
238
+
239
+ return response.data.workflow;
240
+ } catch (error: unknown) {
241
+ if (isAxiosError<AnyRecord>(error)) {
242
+ throw new Error(error.message || "Error while fetching workflow");
243
+ }
244
+ if (error instanceof Error) {
245
+ throw error;
246
+ }
247
+
248
+ throw new Error("Error while fetching workflow");
249
+ }
250
+ };
251
+
252
+ /**
253
+ * Fetches a paginated list of workflows using the legacy method (workspace as query param).
254
+ *
255
+ * @param api - Axios instance used to make the HTTP request.
256
+ * @param workspace - Current workspace name. Sent as a query param via the legacy method, required by some API configurations.
257
+ * @param pageSize - Number of items per page.
258
+ * @param pageToken - Cursor token for the next page.
259
+ * @returns A promise that resolves with a {@link WorkflowListResponse} containing the matched workflows.
260
+ * @throws {Error} If the request fails.
261
+ */
262
+ export const listWorkflows = async (api: AxiosInstance, workspace?: string, pageSize?: number, pageToken?: string): Promise<WorkflowListResponse> => {
263
+ const params: AnyRecord = {};
264
+
265
+ if (workspace) params.workspace = workspace;
266
+ if (pageSize) params.page_size = pageSize;
267
+ if (pageToken) params.page_token = pageToken;
268
+
269
+ try {
270
+ const response: AxiosResponse<WorkflowListResponse> = await api.get(baseUrl, { params });
271
+ return response.data;
272
+ } catch (error: unknown) {
273
+ if (isAxiosError<AnyRecord>(error)) {
274
+ throw new Error(error.message || "Error listing workflows");
275
+ }
276
+
277
+ if (error instanceof Error) {
278
+ throw error;
279
+ }
280
+
281
+ throw new Error("Error listing workflows");
282
+ }
283
+ };
284
+
285
+ /**
286
+ * Fetches a single workflow execution by ID.
287
+ *
288
+ * @param api - Axios instance used to make the HTTP request.
289
+ * @param workflowId - The unique identifier of the workflow.
290
+ * @param executionId - The unique identifier of the workflow execution to fetch.
291
+ * @param workspace - The workspace in which the workflow execution resides.
292
+ * @returns A promise that resolves with the {@link WorkflowExecution} object.
293
+ * @throws {Error} If `workspace` is not provided.
294
+ * @throws {Error} If the request fails.
295
+ */
296
+ export const getWorkflowExecution = async (api: AxiosInstance, workflowId: string, executionId: string, workspace: string): Promise<WorkflowExecution> => {
297
+ if (!workspace) {
298
+ throw new Error("Workspace is required to fetch a workflow execution");
299
+ }
300
+
301
+ try {
302
+ const params: AnyRecord = { workspace, workflow_execution_id: executionId };
303
+ const response: AxiosResponse<WorkflowExecutionSingleResponse> = await api.get(`${baseUrl}/${workflowId}/workflow_executions`, { params });
304
+ return response.data.workflow_execution;
305
+ } catch (error: unknown) {
306
+ if (isAxiosError<AnyRecord>(error)) {
307
+ throw new Error(error.message || "Error fetching workflow execution");
308
+ }
309
+
310
+ if (error instanceof Error) {
311
+ throw error;
312
+ }
313
+
314
+ throw new Error("Error fetching workflow execution");
315
+ }
316
+ };
317
+
318
+ /**
319
+ * Fetches a paginated list of workflow executions matching the given query.
320
+ *
321
+ * @param api - Axios instance used to make the HTTP request.
322
+ * @param workflowId - The unique identifier of the workflow whose executions to list.
323
+ * @param query - Query object containing filters, pagination, and sorting options.
324
+ * Must include a `workspace` filter expression.
325
+ * @returns A promise that resolves with a {@link WorkflowExecutionListResponse} containing the matched executions.
326
+ * @throws {Error} If the `workspace` filter is not present in `query.filters`.
327
+ * @throws {Error} If the request fails.
328
+ */
329
+ export const listWorkflowExecutions = async (api: AxiosInstance, workflowId: string, query: QueryObject): Promise<WorkflowExecutionListResponse> => {
330
+ const workspaceFilter = query.filters.find((filter: FilterExpression) => filter[0] === "workspace");
331
+ const workspace = workspaceFilter?.[workspaceFilter.length - 1];
332
+
333
+ if (!workspace) throw new Error("Workspace filter is required to list workflows");
334
+
335
+ try {
336
+ const params: AnyRecord = {
337
+ workspace,
338
+ ...(query ? { query: JSON.stringify(query) } : {}),
339
+ };
340
+
341
+ const response: AxiosResponse<WorkflowExecutionListResponse> = await api.get(`${baseUrl}/${workflowId}/workflow_executions`, { params });
342
+ return response.data;
343
+ } catch (error: unknown) {
344
+ if (isAxiosError<AnyRecord>(error)) {
345
+ throw new Error(error.message || "Error listing workflow executions");
346
+ }
347
+
348
+ if (error instanceof Error) {
349
+ throw error;
350
+ }
351
+
352
+ throw new Error("Error listing workflow executions");
353
+ }
354
+ };
355
+
356
+ /**
357
+ * Fetches a single worker execution by ID.
358
+ *
359
+ * @param api - Axios instance used to make the HTTP request.
360
+ * @param workflowId - The unique identifier of the parent workflow.
361
+ * @param workerExecutionId - The unique identifier of the worker execution to fetch.
362
+ * @param workspace - The workspace in which the worker execution resides.
363
+ * @returns A promise that resolves with the {@link WorkerExecution} object.
364
+ * @throws {Error} If `workspace` is not provided.
365
+ * @throws {Error} If the request fails.
366
+ */
367
+ export const getWorkerExecution = async (api: AxiosInstance, workflowId: string, workerExecutionId: string, workspace: string): Promise<WorkerExecution> => {
368
+ if (!workspace) {
369
+ throw new Error("Workspace is required to fetch a worker execution");
370
+ }
371
+
372
+ try {
373
+ const params: AnyRecord = { workspace, worker_execution_id: workerExecutionId, with_result: true };
374
+ const response: AxiosResponse<WorkerExecutionSingleResponse> = await api.get(`${baseUrl}/${workflowId}/worker_executions`, { params });
375
+ return response.data.worker_execution;
376
+ } catch (error: unknown) {
377
+ if (isAxiosError<AnyRecord>(error)) {
378
+ throw new Error(error.message || "Error fetching worker execution");
379
+ }
380
+
381
+ if (error instanceof Error) {
382
+ throw error;
383
+ }
384
+
385
+ throw new Error("Error fetching worker execution");
386
+ }
387
+ }
388
+
389
+ /**
390
+ * Fetches a paginated list of worker executions for a given workflow.
391
+ *
392
+ * @param api - Axios instance used to make the HTTP request.
393
+ * @param workflowId - The unique identifier of the parent workflow.
394
+ * @param workflowExecutionId - The unique identifier of the workflow execution to filter by.
395
+ * @param query - Query object containing filters, pagination, and sorting options.
396
+ * Must include a `workspace` filter expression.
397
+ * @returns A promise that resolves with a {@link WorkerExecutionListResponse} containing the matched worker executions.
398
+ * @throws {Error} If the `workspace` filter is not present in `query.filters`.
399
+ * @throws {Error} If the request fails.
400
+ */
401
+ export const listWorkerExecutions = async (api: AxiosInstance, workflowId: string, workflowExecutionId: string, query: QueryObject): Promise<WorkerExecutionListResponse> => {
402
+ const workspaceFilter = query.filters.find((filter: FilterExpression) => filter[0] === "workspace");
403
+ const workspace = workspaceFilter?.[workspaceFilter.length - 1];
404
+
405
+ if (!workspace) throw new Error("Workspace filter is required to list worker executions");
406
+
407
+ try {
408
+ const params: AnyRecord = {
409
+ workspace,
410
+ workflow_execution_id: workflowExecutionId,
411
+ ...(query ? { query: JSON.stringify(query) } : {}),
412
+ };
413
+
414
+ const response: AxiosResponse<WorkerExecutionListResponse> = await api.get(`${baseUrl}/${workflowId}/worker_executions`, { params });
415
+ return response.data;
416
+ } catch (error: unknown) {
417
+ if (isAxiosError<AnyRecord>(error)) {
418
+ throw new Error(error.message || "Error listing worker executions");
419
+ }
420
+
421
+ if (error instanceof Error) {
422
+ throw error;
423
+ }
424
+
425
+ throw new Error("Error listing worker executions");
426
+ }
427
+ };
@@ -0,0 +1,72 @@
1
+ import { isAxiosError, type AxiosInstance, type AxiosResponse } from "axios";
2
+
3
+ import type { AnyRecord } from "@/types/anyRecord";
4
+ import type { Workspace, WorkspaceListResponse, WorkspaceSingleResponse } from "@/types/workspace";
5
+
6
+ const baseUrl = "workspaces";
7
+
8
+ /**
9
+ * getWorkspace
10
+ *
11
+ * Fetches a single workspace by name.
12
+ *
13
+ * @param {AxiosInstance} api - Axios instance.
14
+ * @param {string} name - Workspace name.
15
+ * @returns {Promise<Workspace>} The fetched workspace.
16
+ *
17
+ * @throws {Error} If the request fails.
18
+ */
19
+ export const getWorkspace = async (api: AxiosInstance, name: string): Promise<Workspace> => {
20
+ if (!name) throw new Error("Workspace name is required to fetch a workspace");
21
+
22
+ try {
23
+ const response: AxiosResponse<WorkspaceSingleResponse> = await api.get(`${baseUrl}/${name}`);
24
+ return response.data.workspace;
25
+ } catch (error: unknown) {
26
+ if (isAxiosError<AnyRecord>(error)) {
27
+ throw new Error(error.message || "Error while fetching workspace");
28
+ }
29
+
30
+ if (error instanceof Error) {
31
+ throw error;
32
+ }
33
+
34
+ throw new Error("Error while fetching workspace");
35
+ }
36
+ };
37
+
38
+ /**
39
+ * listWorkspaces
40
+ *
41
+ * Fetches a list of workspaces with optional cursor-based pagination.
42
+ *
43
+ * @param {AxiosInstance} api - Axios instance.
44
+ * @param {string} [workspace] - Current workspace name. Sent as a query param via the legacy method, required by some API configurations.
45
+ * @param {number} [pageSize] - Number of items per page.
46
+ * @param {string} [pageToken] - Cursor token for the next page.
47
+ * @returns {Promise<WorkspaceListResponse>} List of workspaces.
48
+ *
49
+ * @throws {Error} If the request fails.
50
+ */
51
+ export const listWorkspaces = async (api: AxiosInstance, workspace?: string, pageSize?: number, pageToken?: string): Promise<WorkspaceListResponse> => {
52
+ const params: AnyRecord = {};
53
+
54
+ if (workspace) params.workspace = workspace;
55
+ if (pageSize) params.page_size = pageSize;
56
+ if (pageToken) params.page_token = pageToken;
57
+
58
+ try {
59
+ const response: AxiosResponse<WorkspaceListResponse> = await api.get(baseUrl, { params });
60
+ return response.data;
61
+ } catch (error: unknown) {
62
+ if (isAxiosError<AnyRecord>(error)) {
63
+ throw new Error(error.message || "Error while fetching workspaces");
64
+ }
65
+
66
+ if (error instanceof Error) {
67
+ throw error;
68
+ }
69
+
70
+ throw new Error("Error while fetching workspaces");
71
+ }
72
+ };
@@ -0,0 +1,24 @@
1
+ import SvgIcon, { type SvgIconProps } from "@mui/material/SvgIcon";
2
+
3
+ // The Everysk brand mark always renders in the brand color (hardcoded `fill` below),
4
+ // so `color` is intentionally omitted from the public props — it cannot be overridden.
5
+ type EveryskIconProps = Omit<SvgIconProps, "color">;
6
+
7
+ export const EveryskIcon = (props: EveryskIconProps) => {
8
+ return (
9
+ <SvgIcon viewBox="0 0 232.468 232.47" {...props}>
10
+ <g transform="matrix(1.90217,0,0,1.90217,-829.46974,-201.49716)">
11
+ <path
12
+ d="m 504.00435,178.6316 c -3.10349,-6.57161 -6.79598,-14.3885 -14.28016,-17.57649 l 17.02712,-19.54438 h 16.70879 v -9.57528 h -21.06556 l -24.04193,27.59281 -10.24551,0.0558 v 0.009 h -0.90364 v 9.57529 h 14.95337 c 6.46328,0 9.20027,5.15474 13.18994,13.56505 l 0.007,0.0144 c 4.0444,8.5514 9.07315,19.18404 22.11214,19.18404 h 6.00047 l -0.008,-9.58329 h -6.00047 c -6.64688,0 -9.44775,-5.23453 -13.45333,-13.71662 z"
13
+ fill="#FF9933"
14
+ />
15
+ <path
16
+ d="m 464.42384,228.13498 h 93.85315 v -122.1966 h -122.212 v 93.83775 c 0.008,7.51868 2.99897,14.72726 8.31545,20.04332 5.31645,5.31607 12.52472,8.30732 20.0434,8.31553 z m -18.78357,-28.35885 v -84.26247 l 103.06226,0.0319 v 103.01388 h -84.27869 c -4.97976,-0.006 -9.75396,-1.98698 -13.27517,-5.50809 -3.52121,-3.52111 -5.50206,-8.2955 -5.5084,-13.27527 z"
17
+ fillRule="evenodd"
18
+ clipRule="evenodd"
19
+ fill="#FF9933"
20
+ />
21
+ </g>
22
+ </SvgIcon>
23
+ );
24
+ };
@@ -0,0 +1,30 @@
1
+ import type { PropsWithChildren } from "react"
2
+
3
+ import { clsx } from 'clsx';
4
+ import Paper from "@mui/material/Paper";
5
+ import { useTheme, type Theme } from "@mui/material/styles";
6
+
7
+ import type { AnyRecord } from "@/types/anyRecord";
8
+
9
+ export const Footer = ({ className, children }: PropsWithChildren<{ className?: string }>) => {
10
+ const theme: Theme = useTheme();
11
+ const paperProps: AnyRecord = {
12
+ light: {
13
+ variant: 'outlined',
14
+ },
15
+ dark: {
16
+ variant: 'elevation'
17
+ }
18
+ };
19
+
20
+ return (
21
+ <Paper
22
+ square
23
+ elevation={1}
24
+ component="footer"
25
+ className={clsx("flex shrink-0 grow-0 basis-auto h-16 pl-6 pr-6", className)}
26
+ {...paperProps?.[theme.palette.mode]} >
27
+ {children}
28
+ </Paper>
29
+ );
30
+ }