@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 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/contexts/webSocketContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,gBAAgB,GAAG;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5E,MAAM,MAAM,sBAAsB,GAAG;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG;IAClD,UAAU,EAAE,uBAAuB,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,sBAAsB,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,qBAAqB,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC1E,WAAW,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC1C,MAAM,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IAIjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from "../api/datastore.js";
2
+ export * from "../types/datastore.d.ts";
3
+ export * from "../hooks/datastore/useDatastoreMutations.js";
4
+ export * from "../hooks/datastore/useFetchDatastore.js";
5
+ export * from "../hooks/datastore/useFetchDatastores.js";
6
+ export * from "../lib/datastoreTable.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/datastore/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "../api/file.js";
2
+ export * from "../types/file.d.ts";
3
+ export * from "../hooks/file/useFetchFile.js";
4
+ export * from "../hooks/file/useFetchFiles.js";
5
+ export * from "../hooks/file/useFileMutations.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/file/index.ts"],"names":[],"mappings":"AAQA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,151 @@
1
+ import type { Datastore } from "../../types/datastore.d.ts";
2
+ type CreateDatastoreProps = {
3
+ data: Partial<Datastore>;
4
+ };
5
+ type UpdateDatastoreProps = {
6
+ id: string;
7
+ data: Partial<Datastore>;
8
+ };
9
+ type DeleteDatastoreProps = {
10
+ id: string;
11
+ workspace: string;
12
+ };
13
+ type UseDatastoreMutationsProps = {
14
+ queryKey?: unknown[];
15
+ };
16
+ /**
17
+ * useDatastoreMutations
18
+ *
19
+ * Mutation hook built on TanStack Query to perform Datastore write operations:
20
+ * - create a datastore (POST)
21
+ * - update a datastore (PUT)
22
+ * - delete a datastore (DELETE)
23
+ *
24
+ * It also:
25
+ * - optionally invalidates a target query cache key after successful mutations
26
+ * - displays success/error alerts via `useAppAlert`
27
+ *
28
+ * Important notes:
29
+ * - This hook is intended for side-effect operations only. Reading/retrieving data should be done via `useQuery` or `useFetchDatastore`.
30
+ * - Cache invalidation is controlled by `queryKey`. If `queryKey` is not provided, the hook will still run
31
+ * mutations and show alerts, but it will NOT invalidate any cached queries.
32
+ * - `remove` requires a `workspace` parameter because the underlying API helper `deleteDatastore(api, id, workspace)`
33
+ * expects it as a query param.
34
+ *
35
+ * Parameters (UseDatastoreMutationsProps):
36
+ * @param {unknown[]} [queryKey]
37
+ * Query key to invalidate after successful mutations. Use the same `queryKey` you pass to the relevant `useQuery`
38
+ * (e.g., datastore list/detail) so UI data is refreshed automatically after a write.
39
+ *
40
+ * Tip:
41
+ * - If you're using `useFetchDatastore`, you can pass its returned `queryKey` directly:
42
+ * `const fetch = useFetchDatastore(...);`
43
+ * `useDatastoreMutations({ queryKey: fetch.queryKey });`
44
+ *
45
+ * Mutations:
46
+ * - `create`:
47
+ * - mutationFn: `createDatastore(api, data)`
48
+ * - variables: `{ data: Partial<Datastore> }`
49
+ * - success message: "Datastore created successfully."
50
+ * - error message: "Unable to create the datastore. Please try again." (fallback)
51
+ *
52
+ * - `update`:
53
+ * - mutationFn: `updateDatastore(api, id, data)`
54
+ * - variables: `{ id: string; data: Partial<Datastore> }`
55
+ * - success message: "Datastore updated successfully."
56
+ * - error message: "Unable to update the datastore. Please try again." (fallback)
57
+ *
58
+ * - `remove`:
59
+ * - mutationFn: `deleteDatastore(api, id, workspace)`
60
+ * - variables: `{ id: string; workspace: string }`
61
+ * - success message: "Datastore deleted successfully."
62
+ * - error message: "Unable to delete the datastore. Please try again." (fallback)
63
+ *
64
+ * Return value:
65
+ * @returns {object}
66
+ * Returns an object with the three TanStack Query mutation results:
67
+ * - `create`: UseMutationResult<Datastore, Error, CreateDatastoreProps, unknown>
68
+ * - `update`: UseMutationResult<Datastore, Error, UpdateDatastoreProps, unknown>
69
+ * - `remove`: UseMutationResult<Datastore, Error, DeleteDatastoreProps, unknown>
70
+ *
71
+ * Each mutation includes standard TanStack Query helpers:
72
+ * - `mutate(variables, options?)`
73
+ * - `mutateAsync(variables, options?)`
74
+ * - `isPending`, `isSuccess`, `isError`, `error`, `data`, etc.
75
+ *
76
+ * Examples:
77
+ *
78
+ * 1) Invalidate a datastore list query after mutations:
79
+ * ```ts
80
+ * const { create, update, remove } = useDatastoreMutations({ queryKey: ["datastore"] });
81
+ *
82
+ * // Create
83
+ * create.mutate({
84
+ * data: {
85
+ * name: "My datastore",
86
+ * workspace: "ws-1",
87
+ * data: [["id", "name"], ["ABEOX135", "Jorge"]],
88
+ * }
89
+ * });
90
+ *
91
+ * // Update
92
+ * update.mutate({
93
+ * id: "ds-123",
94
+ * data: {
95
+ * name: "Renamed datastore",
96
+ * data: [["id", "name"], ["ABEOX135", "Jorge"]],
97
+ * }
98
+ * });
99
+ *
100
+ * // Delete
101
+ * remove.mutate({
102
+ * id: "ds-123",
103
+ * workspace: "ws-1"
104
+ * });
105
+ * ```
106
+ *
107
+ * 2) Using async/await with `mutateAsync`:
108
+ * ```ts
109
+ * const { create } = useDatastoreMutations({ queryKey: ["datastore"] });
110
+ *
111
+ * await create.mutateAsync({
112
+ * data: {
113
+ * name: "My datastore",
114
+ * workspace: "ws-1",
115
+ * data: [["id", "name"], ["ABEOX135", "Jorge"]],
116
+ * }
117
+ * });
118
+ * ```
119
+ *
120
+ * 3) Without cache invalidation (no queryKey):
121
+ * ```ts
122
+ * const { update } = useDatastoreMutations({});
123
+ *
124
+ * update.mutate({
125
+ * id: "ds-123",
126
+ * data: { name: "Renamed datastore" }
127
+ * });
128
+ * // Mutation still runs and alerts are shown, but cached queries are not invalidated.
129
+ * ```
130
+ *
131
+ * 4) Using `useFetchDatastore` queryKey for automatic invalidation:
132
+ * ```ts
133
+ * const fetch = useFetchDatastore({
134
+ * id: null,
135
+ * filters: [{ field: "workspace", value: "ws-1" }],
136
+ * });
137
+ *
138
+ * const { create } = useDatastoreMutations({ queryKey: fetch.queryKey });
139
+ *
140
+ * await create.mutateAsync({
141
+ * data: { name: "My datastore", workspace: "ws-1" }
142
+ * });
143
+ * ```
144
+ */
145
+ export declare const useDatastoreMutations: ({ queryKey }: UseDatastoreMutationsProps) => {
146
+ create: import("@tanstack/react-query").UseMutationResult<Datastore, unknown, CreateDatastoreProps, unknown>;
147
+ update: import("@tanstack/react-query").UseMutationResult<Datastore, unknown, UpdateDatastoreProps, unknown>;
148
+ remove: import("@tanstack/react-query").UseMutationResult<import("../..").DeleteEntityDefaultResponse[], unknown, DeleteDatastoreProps, unknown>;
149
+ };
150
+ export {};
151
+ //# sourceMappingURL=useDatastoreMutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDatastoreMutations.d.ts","sourceRoot":"","sources":["../../../src/hooks/datastore/useDatastoreMutations.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,KAAK,oBAAoB,GAAG;IACxB,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC5B,CAAC;AAEF,KAAK,oBAAoB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC5B,CAAC;AAEF,KAAK,oBAAoB,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAC9B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACxB,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgIG;AAEH,eAAO,MAAM,qBAAqB,GAAI,cAAc,0BAA0B;;;;CA8D7E,CAAC"}
@@ -0,0 +1,198 @@
1
+ import { useAppAlert } from "../../contexts/appAlertContext/useAppAlert.js";
2
+ import { useAxios } from "../useAxios.js";
3
+ import { createDatastore, deleteDatastore, updateDatastore } from "../../api/datastore.js";
4
+ import { useMutation, useQueryClient } from "@tanstack/react-query";
5
+ //#region src/hooks/datastore/useDatastoreMutations.ts
6
+ var getErrorMessage = (err, fallback) => err instanceof Error && err.message ? err.message : fallback;
7
+ /**
8
+ * useDatastoreMutations
9
+ *
10
+ * Mutation hook built on TanStack Query to perform Datastore write operations:
11
+ * - create a datastore (POST)
12
+ * - update a datastore (PUT)
13
+ * - delete a datastore (DELETE)
14
+ *
15
+ * It also:
16
+ * - optionally invalidates a target query cache key after successful mutations
17
+ * - displays success/error alerts via `useAppAlert`
18
+ *
19
+ * Important notes:
20
+ * - This hook is intended for side-effect operations only. Reading/retrieving data should be done via `useQuery` or `useFetchDatastore`.
21
+ * - Cache invalidation is controlled by `queryKey`. If `queryKey` is not provided, the hook will still run
22
+ * mutations and show alerts, but it will NOT invalidate any cached queries.
23
+ * - `remove` requires a `workspace` parameter because the underlying API helper `deleteDatastore(api, id, workspace)`
24
+ * expects it as a query param.
25
+ *
26
+ * Parameters (UseDatastoreMutationsProps):
27
+ * @param {unknown[]} [queryKey]
28
+ * Query key to invalidate after successful mutations. Use the same `queryKey` you pass to the relevant `useQuery`
29
+ * (e.g., datastore list/detail) so UI data is refreshed automatically after a write.
30
+ *
31
+ * Tip:
32
+ * - If you're using `useFetchDatastore`, you can pass its returned `queryKey` directly:
33
+ * `const fetch = useFetchDatastore(...);`
34
+ * `useDatastoreMutations({ queryKey: fetch.queryKey });`
35
+ *
36
+ * Mutations:
37
+ * - `create`:
38
+ * - mutationFn: `createDatastore(api, data)`
39
+ * - variables: `{ data: Partial<Datastore> }`
40
+ * - success message: "Datastore created successfully."
41
+ * - error message: "Unable to create the datastore. Please try again." (fallback)
42
+ *
43
+ * - `update`:
44
+ * - mutationFn: `updateDatastore(api, id, data)`
45
+ * - variables: `{ id: string; data: Partial<Datastore> }`
46
+ * - success message: "Datastore updated successfully."
47
+ * - error message: "Unable to update the datastore. Please try again." (fallback)
48
+ *
49
+ * - `remove`:
50
+ * - mutationFn: `deleteDatastore(api, id, workspace)`
51
+ * - variables: `{ id: string; workspace: string }`
52
+ * - success message: "Datastore deleted successfully."
53
+ * - error message: "Unable to delete the datastore. Please try again." (fallback)
54
+ *
55
+ * Return value:
56
+ * @returns {object}
57
+ * Returns an object with the three TanStack Query mutation results:
58
+ * - `create`: UseMutationResult<Datastore, Error, CreateDatastoreProps, unknown>
59
+ * - `update`: UseMutationResult<Datastore, Error, UpdateDatastoreProps, unknown>
60
+ * - `remove`: UseMutationResult<Datastore, Error, DeleteDatastoreProps, unknown>
61
+ *
62
+ * Each mutation includes standard TanStack Query helpers:
63
+ * - `mutate(variables, options?)`
64
+ * - `mutateAsync(variables, options?)`
65
+ * - `isPending`, `isSuccess`, `isError`, `error`, `data`, etc.
66
+ *
67
+ * Examples:
68
+ *
69
+ * 1) Invalidate a datastore list query after mutations:
70
+ * ```ts
71
+ * const { create, update, remove } = useDatastoreMutations({ queryKey: ["datastore"] });
72
+ *
73
+ * // Create
74
+ * create.mutate({
75
+ * data: {
76
+ * name: "My datastore",
77
+ * workspace: "ws-1",
78
+ * data: [["id", "name"], ["ABEOX135", "Jorge"]],
79
+ * }
80
+ * });
81
+ *
82
+ * // Update
83
+ * update.mutate({
84
+ * id: "ds-123",
85
+ * data: {
86
+ * name: "Renamed datastore",
87
+ * data: [["id", "name"], ["ABEOX135", "Jorge"]],
88
+ * }
89
+ * });
90
+ *
91
+ * // Delete
92
+ * remove.mutate({
93
+ * id: "ds-123",
94
+ * workspace: "ws-1"
95
+ * });
96
+ * ```
97
+ *
98
+ * 2) Using async/await with `mutateAsync`:
99
+ * ```ts
100
+ * const { create } = useDatastoreMutations({ queryKey: ["datastore"] });
101
+ *
102
+ * await create.mutateAsync({
103
+ * data: {
104
+ * name: "My datastore",
105
+ * workspace: "ws-1",
106
+ * data: [["id", "name"], ["ABEOX135", "Jorge"]],
107
+ * }
108
+ * });
109
+ * ```
110
+ *
111
+ * 3) Without cache invalidation (no queryKey):
112
+ * ```ts
113
+ * const { update } = useDatastoreMutations({});
114
+ *
115
+ * update.mutate({
116
+ * id: "ds-123",
117
+ * data: { name: "Renamed datastore" }
118
+ * });
119
+ * // Mutation still runs and alerts are shown, but cached queries are not invalidated.
120
+ * ```
121
+ *
122
+ * 4) Using `useFetchDatastore` queryKey for automatic invalidation:
123
+ * ```ts
124
+ * const fetch = useFetchDatastore({
125
+ * id: null,
126
+ * filters: [{ field: "workspace", value: "ws-1" }],
127
+ * });
128
+ *
129
+ * const { create } = useDatastoreMutations({ queryKey: fetch.queryKey });
130
+ *
131
+ * await create.mutateAsync({
132
+ * data: { name: "My datastore", workspace: "ws-1" }
133
+ * });
134
+ * ```
135
+ */
136
+ var useDatastoreMutations = ({ queryKey }) => {
137
+ const { api } = useAxios();
138
+ const { showAlert } = useAppAlert();
139
+ const queryClient = useQueryClient();
140
+ const invalidate = async () => {
141
+ if (!queryKey?.length) return;
142
+ await queryClient.invalidateQueries({ queryKey });
143
+ };
144
+ return {
145
+ create: useMutation({
146
+ mutationFn: async ({ data }) => createDatastore(api, data),
147
+ onSuccess: async () => {
148
+ await invalidate();
149
+ showAlert({
150
+ severity: "success",
151
+ message: "Datastore created successfully."
152
+ });
153
+ },
154
+ onError: (err) => {
155
+ showAlert({
156
+ severity: "error",
157
+ message: getErrorMessage(err, "Unable to create the datastore. Please try again.")
158
+ });
159
+ }
160
+ }),
161
+ update: useMutation({
162
+ mutationFn: async ({ id, data }) => updateDatastore(api, id, data),
163
+ onSuccess: async () => {
164
+ await invalidate();
165
+ showAlert({
166
+ severity: "success",
167
+ message: "Datastore updated successfully."
168
+ });
169
+ },
170
+ onError: (err) => {
171
+ showAlert({
172
+ severity: "error",
173
+ message: getErrorMessage(err, "Unable to update the datastore. Please try again.")
174
+ });
175
+ }
176
+ }),
177
+ remove: useMutation({
178
+ mutationFn: async ({ id, workspace }) => deleteDatastore(api, id, workspace),
179
+ onSuccess: async () => {
180
+ await invalidate();
181
+ showAlert({
182
+ severity: "success",
183
+ message: "Datastore deleted successfully."
184
+ });
185
+ },
186
+ onError: (err) => {
187
+ showAlert({
188
+ severity: "error",
189
+ message: getErrorMessage(err, "Unable to delete the datastore. Please try again.")
190
+ });
191
+ }
192
+ })
193
+ };
194
+ };
195
+ //#endregion
196
+ export { useDatastoreMutations };
197
+
198
+ //# sourceMappingURL=useDatastoreMutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDatastoreMutations.js","names":[],"sources":["../../../src/hooks/datastore/useDatastoreMutations.ts"],"sourcesContent":["import { useMutation, useQueryClient } from \"@tanstack/react-query\";\n\nimport { useAxios } from \"./../useAxios\";\nimport { useAppAlert } from \"@/contexts/appAlertContext/useAppAlert\";\nimport type { Datastore } from \"@/types/datastore\";\nimport { deleteDatastore, createDatastore, updateDatastore } from \"@/api/datastore\";\n\ntype CreateDatastoreProps = {\n data: Partial<Datastore>;\n};\n\ntype UpdateDatastoreProps = {\n id: string;\n data: Partial<Datastore>;\n};\n\ntype DeleteDatastoreProps = {\n id: string;\n workspace: string;\n};\n\ntype UseDatastoreMutationsProps = {\n queryKey?: unknown[];\n};\n\nconst getErrorMessage = (err: unknown, fallback: string) =>\n err instanceof Error && err.message ? err.message : fallback;\n\n/**\n * useDatastoreMutations\n *\n * Mutation hook built on TanStack Query to perform Datastore write operations:\n * - create a datastore (POST)\n * - update a datastore (PUT)\n * - delete a datastore (DELETE)\n *\n * It also:\n * - optionally invalidates a target query cache key after successful mutations\n * - displays success/error alerts via `useAppAlert`\n *\n * Important notes:\n * - This hook is intended for side-effect operations only. Reading/retrieving data should be done via `useQuery` or `useFetchDatastore`.\n * - Cache invalidation is controlled by `queryKey`. If `queryKey` is not provided, the hook will still run\n * mutations and show alerts, but it will NOT invalidate any cached queries.\n * - `remove` requires a `workspace` parameter because the underlying API helper `deleteDatastore(api, id, workspace)`\n * expects it as a query param.\n *\n * Parameters (UseDatastoreMutationsProps):\n * @param {unknown[]} [queryKey]\n * Query key to invalidate after successful mutations. Use the same `queryKey` you pass to the relevant `useQuery`\n * (e.g., datastore list/detail) so UI data is refreshed automatically after a write.\n *\n * Tip:\n * - If you're using `useFetchDatastore`, you can pass its returned `queryKey` directly:\n * `const fetch = useFetchDatastore(...);`\n * `useDatastoreMutations({ queryKey: fetch.queryKey });`\n *\n * Mutations:\n * - `create`:\n * - mutationFn: `createDatastore(api, data)`\n * - variables: `{ data: Partial<Datastore> }`\n * - success message: \"Datastore created successfully.\"\n * - error message: \"Unable to create the datastore. Please try again.\" (fallback)\n *\n * - `update`:\n * - mutationFn: `updateDatastore(api, id, data)`\n * - variables: `{ id: string; data: Partial<Datastore> }`\n * - success message: \"Datastore updated successfully.\"\n * - error message: \"Unable to update the datastore. Please try again.\" (fallback)\n *\n * - `remove`:\n * - mutationFn: `deleteDatastore(api, id, workspace)`\n * - variables: `{ id: string; workspace: string }`\n * - success message: \"Datastore deleted successfully.\"\n * - error message: \"Unable to delete the datastore. Please try again.\" (fallback)\n *\n * Return value:\n * @returns {object}\n * Returns an object with the three TanStack Query mutation results:\n * - `create`: UseMutationResult<Datastore, Error, CreateDatastoreProps, unknown>\n * - `update`: UseMutationResult<Datastore, Error, UpdateDatastoreProps, unknown>\n * - `remove`: UseMutationResult<Datastore, Error, DeleteDatastoreProps, unknown>\n *\n * Each mutation includes standard TanStack Query helpers:\n * - `mutate(variables, options?)`\n * - `mutateAsync(variables, options?)`\n * - `isPending`, `isSuccess`, `isError`, `error`, `data`, etc.\n *\n * Examples:\n *\n * 1) Invalidate a datastore list query after mutations:\n * ```ts\n * const { create, update, remove } = useDatastoreMutations({ queryKey: [\"datastore\"] });\n *\n * // Create\n * create.mutate({\n * data: {\n * name: \"My datastore\",\n * workspace: \"ws-1\",\n * data: [[\"id\", \"name\"], [\"ABEOX135\", \"Jorge\"]],\n * }\n * });\n *\n * // Update\n * update.mutate({\n * id: \"ds-123\",\n * data: {\n * name: \"Renamed datastore\",\n * data: [[\"id\", \"name\"], [\"ABEOX135\", \"Jorge\"]],\n * }\n * });\n *\n * // Delete\n * remove.mutate({\n * id: \"ds-123\",\n * workspace: \"ws-1\"\n * });\n * ```\n *\n * 2) Using async/await with `mutateAsync`:\n * ```ts\n * const { create } = useDatastoreMutations({ queryKey: [\"datastore\"] });\n *\n * await create.mutateAsync({\n * data: {\n * name: \"My datastore\",\n * workspace: \"ws-1\",\n * data: [[\"id\", \"name\"], [\"ABEOX135\", \"Jorge\"]],\n * }\n * });\n * ```\n *\n * 3) Without cache invalidation (no queryKey):\n * ```ts\n * const { update } = useDatastoreMutations({});\n *\n * update.mutate({\n * id: \"ds-123\",\n * data: { name: \"Renamed datastore\" }\n * });\n * // Mutation still runs and alerts are shown, but cached queries are not invalidated.\n * ```\n *\n * 4) Using `useFetchDatastore` queryKey for automatic invalidation:\n * ```ts\n * const fetch = useFetchDatastore({\n * id: null,\n * filters: [{ field: \"workspace\", value: \"ws-1\" }],\n * });\n *\n * const { create } = useDatastoreMutations({ queryKey: fetch.queryKey });\n *\n * await create.mutateAsync({\n * data: { name: \"My datastore\", workspace: \"ws-1\" }\n * });\n * ```\n */\n\nexport const useDatastoreMutations = ({ queryKey }: UseDatastoreMutationsProps) => {\n const { api } = useAxios();\n const { showAlert } = useAppAlert();\n const queryClient = useQueryClient();\n\n const invalidate = async () => {\n if (!queryKey?.length) return;\n await queryClient.invalidateQueries({ queryKey });\n };\n\n const create = useMutation({\n mutationFn: async ({ data }: CreateDatastoreProps) => createDatastore(api, data),\n onSuccess: async () => {\n await invalidate();\n showAlert({\n severity: \"success\",\n message: \"Datastore created successfully.\",\n });\n },\n onError: (err: unknown) => {\n showAlert({\n severity: \"error\",\n message: getErrorMessage(err, \"Unable to create the datastore. Please try again.\"),\n });\n },\n });\n\n const update = useMutation({\n mutationFn: async ({ id, data }: UpdateDatastoreProps) => updateDatastore(api, id, data),\n onSuccess: async () => {\n await invalidate();\n showAlert({\n severity: \"success\",\n message: \"Datastore updated successfully.\",\n });\n },\n onError: (err: unknown) => {\n showAlert({\n severity: \"error\",\n message: getErrorMessage(err, \"Unable to update the datastore. Please try again.\"),\n });\n },\n });\n\n const remove = useMutation({\n mutationFn: async ({ id, workspace }: DeleteDatastoreProps) => deleteDatastore(api, id, workspace),\n onSuccess: async () => {\n await invalidate();\n showAlert({\n severity: \"success\",\n message: \"Datastore deleted successfully.\",\n });\n },\n onError: (err: unknown) => {\n showAlert({\n severity: \"error\",\n message: getErrorMessage(err, \"Unable to delete the datastore. Please try again.\"),\n });\n },\n });\n\n return { create, update, remove };\n};\n"],"mappings":";;;;;AAyBA,IAAM,mBAAmB,KAAc,aACnC,eAAe,SAAS,IAAI,UAAU,IAAI,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIxD,IAAa,yBAAyB,EAAE,eAA2C;CAC/E,MAAM,EAAE,QAAQ,SAAS;CACzB,MAAM,EAAE,cAAc,YAAY;CAClC,MAAM,cAAc,eAAe;CAEnC,MAAM,aAAa,YAAY;EAC3B,IAAI,CAAC,UAAU,QAAQ;EACvB,MAAM,YAAY,kBAAkB,EAAE,SAAS,CAAC;CACpD;CAqDA,OAAO;EAAE,QAnDM,YAAY;GACvB,YAAY,OAAO,EAAE,WAAiC,gBAAgB,KAAK,IAAI;GAC/E,WAAW,YAAY;IACnB,MAAM,WAAW;IACjB,UAAU;KACN,UAAU;KACV,SAAS;IACb,CAAC;GACL;GACA,UAAU,QAAiB;IACvB,UAAU;KACN,UAAU;KACV,SAAS,gBAAgB,KAAK,mDAAmD;IACrF,CAAC;GACL;EACJ,CAoCS;EAAQ,QAlCF,YAAY;GACvB,YAAY,OAAO,EAAE,IAAI,WAAiC,gBAAgB,KAAK,IAAI,IAAI;GACvF,WAAW,YAAY;IACnB,MAAM,WAAW;IACjB,UAAU;KACN,UAAU;KACV,SAAS;IACb,CAAC;GACL;GACA,UAAU,QAAiB;IACvB,UAAU;KACN,UAAU;KACV,SAAS,gBAAgB,KAAK,mDAAmD;IACrF,CAAC;GACL;EACJ,CAmBiB;EAAQ,QAjBV,YAAY;GACvB,YAAY,OAAO,EAAE,IAAI,gBAAsC,gBAAgB,KAAK,IAAI,SAAS;GACjG,WAAW,YAAY;IACnB,MAAM,WAAW;IACjB,UAAU;KACN,UAAU;KACV,SAAS;IACb,CAAC;GACL;GACA,UAAU,QAAiB;IACvB,UAAU;KACN,UAAU;KACV,SAAS,gBAAgB,KAAK,mDAAmD;IACrF,CAAC;GACL;EACJ,CAEyB;CAAO;AACpC"}
@@ -0,0 +1,205 @@
1
+ import type { DatastoreWithRows } from "../../types/datastore.d.ts";
2
+ import type { FetchEntityParams } from "../../types/entityQuery.d.ts";
3
+ export type FetchDatastoreProps = FetchEntityParams<DatastoreWithRows>;
4
+ /**
5
+ * useFetchDatastore
6
+ *
7
+ * Data-fetching hook built on TanStack Query to retrieve a single datastore by ID.
8
+ *
9
+ * It also:
10
+ * - triggers an error alert via `useAppAlert` whenever `query.error` is present
11
+ *
12
+ * Important notes:
13
+ * - Returns a `DatastoreWithRows` object: the full `Datastore` shape with `data`
14
+ * replaced by `AnyRecord[]` (rows transformed via `tableToObjects`).
15
+ *
16
+ * Parameters (FetchDatastoreProps):
17
+ * @param {string} id
18
+ * Datastore identifier (required).
19
+ *
20
+ * @param {string} workspace
21
+ * Workspace the datastore belongs to (required by `getDatastore`).
22
+ *
23
+ * @param {EntityQueryOptions<DatastoreWithRows>} [queryOptions=defaultQueryOptions]
24
+ * TanStack Query options passed through to `useQuery` (e.g., enabled, staleTime, gcTime, etc.).
25
+ *
26
+ * Returns:
27
+ * @returns {object}
28
+ * TanStack Query's `query` object extended with:
29
+ * - `queryKey`: the cache key used by React Query
30
+ *
31
+ * Example:
32
+ * ```ts
33
+ * const { data, isLoading } = useFetchDatastore({
34
+ * id: "abc123",
35
+ * workspace: "my-workspace",
36
+ * });
37
+ * // data -> DatastoreWithRows (datastore metadata + rows as AnyRecord[])
38
+ * // data.name -> "my-datastore"
39
+ * // data.data -> [{ datastoreId: "abc123", col1: "value", ... }]
40
+ * ```
41
+ */
42
+ export declare const useFetchDatastore: ({ id, workspace, queryOptions }: FetchDatastoreProps) => {
43
+ queryKey: string[];
44
+ data: DatastoreWithRows;
45
+ error: Error;
46
+ isError: true;
47
+ isPending: false;
48
+ isLoading: false;
49
+ isLoadingError: false;
50
+ isRefetchError: true;
51
+ isSuccess: false;
52
+ isPlaceholderData: false;
53
+ status: "error";
54
+ dataUpdatedAt: number;
55
+ errorUpdatedAt: number;
56
+ failureCount: number;
57
+ failureReason: Error | null;
58
+ errorUpdateCount: number;
59
+ isFetched: boolean;
60
+ isFetchedAfterMount: boolean;
61
+ isFetching: boolean;
62
+ isInitialLoading: boolean;
63
+ isPaused: boolean;
64
+ isRefetching: boolean;
65
+ isStale: boolean;
66
+ isEnabled: boolean;
67
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<DatastoreWithRows, Error>>;
68
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
69
+ } | {
70
+ queryKey: string[];
71
+ data: DatastoreWithRows;
72
+ error: null;
73
+ isError: false;
74
+ isPending: false;
75
+ isLoading: false;
76
+ isLoadingError: false;
77
+ isRefetchError: false;
78
+ isSuccess: true;
79
+ isPlaceholderData: false;
80
+ status: "success";
81
+ dataUpdatedAt: number;
82
+ errorUpdatedAt: number;
83
+ failureCount: number;
84
+ failureReason: Error | null;
85
+ errorUpdateCount: number;
86
+ isFetched: boolean;
87
+ isFetchedAfterMount: boolean;
88
+ isFetching: boolean;
89
+ isInitialLoading: boolean;
90
+ isPaused: boolean;
91
+ isRefetching: boolean;
92
+ isStale: boolean;
93
+ isEnabled: boolean;
94
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<DatastoreWithRows, Error>>;
95
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
96
+ } | {
97
+ queryKey: string[];
98
+ data: undefined;
99
+ error: Error;
100
+ isError: true;
101
+ isPending: false;
102
+ isLoading: false;
103
+ isLoadingError: true;
104
+ isRefetchError: false;
105
+ isSuccess: false;
106
+ isPlaceholderData: false;
107
+ status: "error";
108
+ dataUpdatedAt: number;
109
+ errorUpdatedAt: number;
110
+ failureCount: number;
111
+ failureReason: Error | null;
112
+ errorUpdateCount: number;
113
+ isFetched: boolean;
114
+ isFetchedAfterMount: boolean;
115
+ isFetching: boolean;
116
+ isInitialLoading: boolean;
117
+ isPaused: boolean;
118
+ isRefetching: boolean;
119
+ isStale: boolean;
120
+ isEnabled: boolean;
121
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<DatastoreWithRows, Error>>;
122
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
123
+ } | {
124
+ queryKey: string[];
125
+ data: undefined;
126
+ error: null;
127
+ isError: false;
128
+ isPending: true;
129
+ isLoading: true;
130
+ isLoadingError: false;
131
+ isRefetchError: false;
132
+ isSuccess: false;
133
+ isPlaceholderData: false;
134
+ status: "pending";
135
+ dataUpdatedAt: number;
136
+ errorUpdatedAt: number;
137
+ failureCount: number;
138
+ failureReason: Error | null;
139
+ errorUpdateCount: number;
140
+ isFetched: boolean;
141
+ isFetchedAfterMount: boolean;
142
+ isFetching: boolean;
143
+ isInitialLoading: boolean;
144
+ isPaused: boolean;
145
+ isRefetching: boolean;
146
+ isStale: boolean;
147
+ isEnabled: boolean;
148
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<DatastoreWithRows, Error>>;
149
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
150
+ } | {
151
+ queryKey: string[];
152
+ data: undefined;
153
+ error: null;
154
+ isError: false;
155
+ isPending: true;
156
+ isLoadingError: false;
157
+ isRefetchError: false;
158
+ isSuccess: false;
159
+ isPlaceholderData: false;
160
+ status: "pending";
161
+ dataUpdatedAt: number;
162
+ errorUpdatedAt: number;
163
+ failureCount: number;
164
+ failureReason: Error | null;
165
+ errorUpdateCount: number;
166
+ isFetched: boolean;
167
+ isFetchedAfterMount: boolean;
168
+ isFetching: boolean;
169
+ isLoading: boolean;
170
+ isInitialLoading: boolean;
171
+ isPaused: boolean;
172
+ isRefetching: boolean;
173
+ isStale: boolean;
174
+ isEnabled: boolean;
175
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<DatastoreWithRows, Error>>;
176
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
177
+ } | {
178
+ queryKey: string[];
179
+ data: DatastoreWithRows;
180
+ isError: false;
181
+ error: null;
182
+ isPending: false;
183
+ isLoading: false;
184
+ isLoadingError: false;
185
+ isRefetchError: false;
186
+ isSuccess: true;
187
+ isPlaceholderData: true;
188
+ status: "success";
189
+ dataUpdatedAt: number;
190
+ errorUpdatedAt: number;
191
+ failureCount: number;
192
+ failureReason: Error | null;
193
+ errorUpdateCount: number;
194
+ isFetched: boolean;
195
+ isFetchedAfterMount: boolean;
196
+ isFetching: boolean;
197
+ isInitialLoading: boolean;
198
+ isPaused: boolean;
199
+ isRefetching: boolean;
200
+ isStale: boolean;
201
+ isEnabled: boolean;
202
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<DatastoreWithRows, Error>>;
203
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
204
+ };
205
+ //# sourceMappingURL=useFetchDatastore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchDatastore.d.ts","sourceRoot":"","sources":["../../../src/hooks/datastore/useFetchDatastore.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAsB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;AAQvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,iBAAiB,GAAI,iCAAuD,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqC3G,CAAC"}