@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.
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/dist/EveryskApp.d.ts +73 -0
- package/dist/EveryskApp.d.ts.map +1 -0
- package/dist/EveryskApp.js +66 -0
- package/dist/EveryskApp.js.map +1 -0
- package/dist/agGrid/agGridTheme.d.ts +77 -0
- package/dist/agGrid/agGridTheme.d.ts.map +1 -0
- package/dist/agGrid/agGridTheme.js +88 -0
- package/dist/agGrid/agGridTheme.js.map +1 -0
- package/dist/agGrid/index.d.ts +4 -0
- package/dist/agGrid/index.d.ts.map +1 -0
- package/dist/agGrid/index.js +3 -0
- package/dist/api/datastore.d.ts +68 -0
- package/dist/api/datastore.d.ts.map +1 -0
- package/dist/api/datastore.js +125 -0
- package/dist/api/datastore.js.map +1 -0
- package/dist/api/entityQuery.d.ts +78 -0
- package/dist/api/entityQuery.d.ts.map +1 -0
- package/dist/api/entityQuery.js +100 -0
- package/dist/api/entityQuery.js.map +1 -0
- package/dist/api/file.d.ts +70 -0
- package/dist/api/file.d.ts.map +1 -0
- package/dist/api/file.js +126 -0
- package/dist/api/file.js.map +1 -0
- package/dist/api/portfolio.d.ts +67 -0
- package/dist/api/portfolio.d.ts.map +1 -0
- package/dist/api/portfolio.js +125 -0
- package/dist/api/portfolio.js.map +1 -0
- package/dist/api/profile.d.ts +40 -0
- package/dist/api/profile.d.ts.map +1 -0
- package/dist/api/profile.js +71 -0
- package/dist/api/profile.js.map +1 -0
- package/dist/api/websocketsConfig.d.ts +13 -0
- package/dist/api/websocketsConfig.d.ts.map +1 -0
- package/dist/api/websocketsConfig.js +25 -0
- package/dist/api/websocketsConfig.js.map +1 -0
- package/dist/api/workflow.d.ts +154 -0
- package/dist/api/workflow.d.ts.map +1 -0
- package/dist/api/workflow.js +289 -0
- package/dist/api/workflow.js.map +1 -0
- package/dist/api/workspace.d.ts +29 -0
- package/dist/api/workspace.d.ts.map +1 -0
- package/dist/api/workspace.js +54 -0
- package/dist/api/workspace.js.map +1 -0
- package/dist/components/ui/EveryskIcon/index.d.ts +5 -0
- package/dist/components/ui/EveryskIcon/index.d.ts.map +1 -0
- package/dist/components/ui/EveryskIcon/index.js +25 -0
- package/dist/components/ui/EveryskIcon/index.js.map +1 -0
- package/dist/components/ui/Footer/index.d.ts +5 -0
- package/dist/components/ui/Footer/index.d.ts.map +1 -0
- package/dist/components/ui/Footer/index.js +23 -0
- package/dist/components/ui/Footer/index.js.map +1 -0
- package/dist/components/ui/GlobalLoading/index.d.ts +8 -0
- package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -0
- package/dist/components/ui/GlobalLoading/index.js +42 -0
- package/dist/components/ui/GlobalLoading/index.js.map +1 -0
- package/dist/components/ui/PageContainer/index.d.ts +7 -0
- package/dist/components/ui/PageContainer/index.d.ts.map +1 -0
- package/dist/components/ui/PageContainer/index.js +20 -0
- package/dist/components/ui/PageContainer/index.js.map +1 -0
- package/dist/components/ui/Toolbar/index.d.ts +5 -0
- package/dist/components/ui/Toolbar/index.d.ts.map +1 -0
- package/dist/components/ui/Toolbar/index.js +32 -0
- package/dist/components/ui/Toolbar/index.js.map +1 -0
- package/dist/contexts/agGridLicenseContext/provider.d.ts +51 -0
- package/dist/contexts/agGridLicenseContext/provider.d.ts.map +1 -0
- package/dist/contexts/agGridLicenseContext/provider.js +58 -0
- package/dist/contexts/agGridLicenseContext/provider.js.map +1 -0
- package/dist/contexts/appAlertContext/index.d.ts +3 -0
- package/dist/contexts/appAlertContext/index.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/index.js +7 -0
- package/dist/contexts/appAlertContext/index.js.map +1 -0
- package/dist/contexts/appAlertContext/provider.d.ts +40 -0
- package/dist/contexts/appAlertContext/provider.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/provider.js +96 -0
- package/dist/contexts/appAlertContext/provider.js.map +1 -0
- package/dist/contexts/appAlertContext/types.d.ts +15 -0
- package/dist/contexts/appAlertContext/types.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/useAppAlert.d.ts +30 -0
- package/dist/contexts/appAlertContext/useAppAlert.d.ts.map +1 -0
- package/dist/contexts/appAlertContext/useAppAlert.js +40 -0
- package/dist/contexts/appAlertContext/useAppAlert.js.map +1 -0
- package/dist/contexts/appConfigContext/index.d.ts +3 -0
- package/dist/contexts/appConfigContext/index.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/index.js +7 -0
- package/dist/contexts/appConfigContext/index.js.map +1 -0
- package/dist/contexts/appConfigContext/provider.d.ts +45 -0
- package/dist/contexts/appConfigContext/provider.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/provider.js +63 -0
- package/dist/contexts/appConfigContext/provider.js.map +1 -0
- package/dist/contexts/appConfigContext/types.d.ts +28 -0
- package/dist/contexts/appConfigContext/types.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/useAppConfig.d.ts +20 -0
- package/dist/contexts/appConfigContext/useAppConfig.d.ts.map +1 -0
- package/dist/contexts/appConfigContext/useAppConfig.js +30 -0
- package/dist/contexts/appConfigContext/useAppConfig.js.map +1 -0
- package/dist/contexts/webSocketContext/constants.d.ts +4 -0
- package/dist/contexts/webSocketContext/constants.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/constants.js +8 -0
- package/dist/contexts/webSocketContext/constants.js.map +1 -0
- package/dist/contexts/webSocketContext/handler.d.ts +43 -0
- package/dist/contexts/webSocketContext/handler.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/handler.js +87 -0
- package/dist/contexts/webSocketContext/handler.js.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts +19 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js +31 -0
- package/dist/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.js.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +11 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +21 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts +30 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js +44 -0
- package/dist/contexts/webSocketContext/hooks/useWebSocketSubscription/index.js.map +1 -0
- package/dist/contexts/webSocketContext/index.d.ts +3 -0
- package/dist/contexts/webSocketContext/index.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/index.js +7 -0
- package/dist/contexts/webSocketContext/index.js.map +1 -0
- package/dist/contexts/webSocketContext/provider.d.ts +39 -0
- package/dist/contexts/webSocketContext/provider.d.ts.map +1 -0
- package/dist/contexts/webSocketContext/provider.js +121 -0
- package/dist/contexts/webSocketContext/provider.js.map +1 -0
- package/dist/contexts/webSocketContext/types.d.ts +41 -0
- package/dist/contexts/webSocketContext/types.d.ts.map +1 -0
- package/dist/datastore/index.d.ts +7 -0
- package/dist/datastore/index.d.ts.map +1 -0
- package/dist/file/index.d.ts +6 -0
- package/dist/file/index.d.ts.map +1 -0
- package/dist/hooks/datastore/useDatastoreMutations.d.ts +151 -0
- package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -0
- package/dist/hooks/datastore/useDatastoreMutations.js +198 -0
- package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -0
- package/dist/hooks/datastore/useFetchDatastore.d.ts +205 -0
- package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -0
- package/dist/hooks/datastore/useFetchDatastore.js +85 -0
- package/dist/hooks/datastore/useFetchDatastore.js.map +1 -0
- package/dist/hooks/datastore/useFetchDatastores.d.ts +70 -0
- package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -0
- package/dist/hooks/datastore/useFetchDatastores.js +105 -0
- package/dist/hooks/datastore/useFetchDatastores.js.map +1 -0
- package/dist/hooks/file/useFetchFile.d.ts +212 -0
- package/dist/hooks/file/useFetchFile.d.ts.map +1 -0
- package/dist/hooks/file/useFetchFile.js +87 -0
- package/dist/hooks/file/useFetchFile.js.map +1 -0
- package/dist/hooks/file/useFetchFiles.d.ts +60 -0
- package/dist/hooks/file/useFetchFiles.d.ts.map +1 -0
- package/dist/hooks/file/useFetchFiles.js +89 -0
- package/dist/hooks/file/useFetchFiles.js.map +1 -0
- package/dist/hooks/file/useFileMutations.d.ts +161 -0
- package/dist/hooks/file/useFileMutations.d.ts.map +1 -0
- package/dist/hooks/file/useFileMutations.js +208 -0
- package/dist/hooks/file/useFileMutations.js.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolio.d.ts +210 -0
- package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolio.js +85 -0
- package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolios.d.ts +60 -0
- package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -0
- package/dist/hooks/portfolio/useFetchPortfolios.js +89 -0
- package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -0
- package/dist/hooks/portfolio/usePortfolioMutations.d.ts +171 -0
- package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -0
- package/dist/hooks/portfolio/usePortfolioMutations.js +218 -0
- package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -0
- package/dist/hooks/profile/useFetchProfile.d.ts +206 -0
- package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -0
- package/dist/hooks/profile/useFetchProfile.js +70 -0
- package/dist/hooks/profile/useFetchProfile.js.map +1 -0
- package/dist/hooks/useAxios.d.ts +40 -0
- package/dist/hooks/useAxios.d.ts.map +1 -0
- package/dist/hooks/useAxios.js +76 -0
- package/dist/hooks/useAxios.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +198 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.js +69 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +52 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.js +83 -0
- package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflow.d.ts +195 -0
- package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflow.js +70 -0
- package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +198 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.js +69 -0
- package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +49 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.js +77 -0
- package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflows.d.ts +47 -0
- package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -0
- package/dist/hooks/workflow/useFetchWorkflows.js +67 -0
- package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -0
- package/dist/hooks/workflow/useRunWorkflow.d.ts +30 -0
- package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -0
- package/dist/hooks/workflow/useRunWorkflow.js +50 -0
- package/dist/hooks/workflow/useRunWorkflow.js.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspace.d.ts +197 -0
- package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspace.js +65 -0
- package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspaces.d.ts +46 -0
- package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspaces.js +66 -0
- package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/lib/datastoreTable.d.ts +126 -0
- package/dist/lib/datastoreTable.d.ts.map +1 -0
- package/dist/lib/datastoreTable.js +146 -0
- package/dist/lib/datastoreTable.js.map +1 -0
- package/dist/lib/queryClient.d.ts +24 -0
- package/dist/lib/queryClient.d.ts.map +1 -0
- package/dist/lib/queryClient.js +48 -0
- package/dist/lib/queryClient.js.map +1 -0
- package/dist/portfolio/index.d.ts +6 -0
- package/dist/portfolio/index.d.ts.map +1 -0
- package/dist/profile/index.d.ts +4 -0
- package/dist/profile/index.d.ts.map +1 -0
- package/dist/socket/index.d.ts +10 -0
- package/dist/socket/index.d.ts.map +1 -0
- package/dist/socket/index.js +9 -0
- package/dist/test/index.d.ts +2 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +2 -0
- package/dist/test/mocks/agGridEnterprise.d.ts +38 -0
- package/dist/test/mocks/agGridEnterprise.d.ts.map +1 -0
- package/dist/test/mocks/agGridEnterprise.js +43 -0
- package/dist/test/mocks/agGridEnterprise.js.map +1 -0
- package/dist/test/mocks/agGridReact.d.ts +42 -0
- package/dist/test/mocks/agGridReact.d.ts.map +1 -0
- package/dist/test/mocks/agGridReact.js +47 -0
- package/dist/test/mocks/agGridReact.js.map +1 -0
- package/dist/test/mocks/index.d.ts +5 -0
- package/dist/test/mocks/index.d.ts.map +1 -0
- package/dist/test/mocks/index.js +4 -0
- package/dist/test/mocks/socketIoClient.d.ts +45 -0
- package/dist/test/mocks/socketIoClient.d.ts.map +1 -0
- package/dist/test/mocks/socketIoClient.js +54 -0
- package/dist/test/mocks/socketIoClient.js.map +1 -0
- package/dist/test/renderWithProviders.d.ts +107 -0
- package/dist/test/renderWithProviders.d.ts.map +1 -0
- package/dist/test/renderWithProviders.js +85 -0
- package/dist/test/renderWithProviders.js.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +25 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +12 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +22 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/index.d.ts +9 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/overrides/index.d.ts +7 -0
- package/dist/theme/overrides/index.d.ts.map +1 -0
- package/dist/theme/overrides/index.js +31 -0
- package/dist/theme/overrides/index.js.map +1 -0
- package/dist/theme/overrides/muiButton.d.ts +3 -0
- package/dist/theme/overrides/muiButton.d.ts.map +1 -0
- package/dist/theme/overrides/muiButton.js +6 -0
- package/dist/theme/overrides/muiButton.js.map +1 -0
- package/dist/theme/overrides/muiCssBaseline.d.ts +31 -0
- package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -0
- package/dist/theme/overrides/muiCssBaseline.js +27 -0
- package/dist/theme/overrides/muiCssBaseline.js.map +1 -0
- package/dist/theme/overrides/muiDatePicker.d.ts +10 -0
- package/dist/theme/overrides/muiDatePicker.d.ts.map +1 -0
- package/dist/theme/overrides/muiDatePicker.js +6 -0
- package/dist/theme/overrides/muiDatePicker.js.map +1 -0
- package/dist/theme/overrides/muiFormControl.d.ts +3 -0
- package/dist/theme/overrides/muiFormControl.d.ts.map +1 -0
- package/dist/theme/overrides/muiFormControl.js +6 -0
- package/dist/theme/overrides/muiFormControl.js.map +1 -0
- package/dist/theme/overrides/muiIconButton.d.ts +3 -0
- package/dist/theme/overrides/muiIconButton.d.ts.map +1 -0
- package/dist/theme/overrides/muiIconButton.js +6 -0
- package/dist/theme/overrides/muiIconButton.js.map +1 -0
- package/dist/theme/overrides/muiSelect.d.ts +3 -0
- package/dist/theme/overrides/muiSelect.d.ts.map +1 -0
- package/dist/theme/overrides/muiSelect.js +6 -0
- package/dist/theme/overrides/muiSelect.js.map +1 -0
- package/dist/theme/overrides/muiSvgIcon.d.ts +3 -0
- package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -0
- package/dist/theme/overrides/muiSvgIcon.js +6 -0
- package/dist/theme/overrides/muiSvgIcon.js.map +1 -0
- package/dist/theme/overrides/muiTextField.d.ts +3 -0
- package/dist/theme/overrides/muiTextField.d.ts.map +1 -0
- package/dist/theme/overrides/muiTextField.js +6 -0
- package/dist/theme/overrides/muiTextField.js.map +1 -0
- package/dist/theme/overrides/muiToggleButton.d.ts +3 -0
- package/dist/theme/overrides/muiToggleButton.d.ts.map +1 -0
- package/dist/theme/overrides/muiToggleButton.js +6 -0
- package/dist/theme/overrides/muiToggleButton.js.map +1 -0
- package/dist/theme/overrides/muiToggleButtonGroup.d.ts +3 -0
- package/dist/theme/overrides/muiToggleButtonGroup.d.ts.map +1 -0
- package/dist/theme/overrides/muiToggleButtonGroup.js +6 -0
- package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -0
- package/dist/theme/themes/DefaultDark.d.ts +7 -0
- package/dist/theme/themes/DefaultDark.d.ts.map +1 -0
- package/dist/theme/themes/DefaultDark.js +15 -0
- package/dist/theme/themes/DefaultDark.js.map +1 -0
- package/dist/theme/themes/DefaultLight.d.ts +7 -0
- package/dist/theme/themes/DefaultLight.d.ts.map +1 -0
- package/dist/theme/themes/DefaultLight.js +15 -0
- package/dist/theme/themes/DefaultLight.js.map +1 -0
- package/dist/theme/themes/EveryskDark.d.ts +15 -0
- package/dist/theme/themes/EveryskDark.d.ts.map +1 -0
- package/dist/theme/themes/EveryskDark.js +63 -0
- package/dist/theme/themes/EveryskDark.js.map +1 -0
- package/dist/theme/themes/EveryskLight.d.ts +21 -0
- package/dist/theme/themes/EveryskLight.d.ts.map +1 -0
- package/dist/theme/themes/EveryskLight.js +69 -0
- package/dist/theme/themes/EveryskLight.js.map +1 -0
- package/dist/theme/themes/MidnightEmber.d.ts +3 -0
- package/dist/theme/themes/MidnightEmber.d.ts.map +1 -0
- package/dist/theme/themes/MidnightEmber.js +31 -0
- package/dist/theme/themes/MidnightEmber.js.map +1 -0
- package/dist/theme/themes/index.d.ts +17 -0
- package/dist/theme/themes/index.d.ts.map +1 -0
- package/dist/theme/themes/index.js +32 -0
- package/dist/theme/themes/index.js.map +1 -0
- package/dist/types/anyRecord.d.ts +4 -0
- package/dist/types/anyRecord.d.ts.map +1 -0
- package/dist/types/datastore.d.ts +26 -0
- package/dist/types/datastore.d.ts.map +1 -0
- package/dist/types/entityQuery.d.ts +47 -0
- package/dist/types/entityQuery.d.ts.map +1 -0
- package/dist/types/file.d.ts +29 -0
- package/dist/types/file.d.ts.map +1 -0
- package/dist/types/portfolio.d.ts +77 -0
- package/dist/types/portfolio.d.ts.map +1 -0
- package/dist/types/profile.d.ts +37 -0
- package/dist/types/profile.d.ts.map +1 -0
- package/dist/types/workflow.d.ts +68 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/types/workspace.d.ts +13 -0
- package/dist/types/workspace.d.ts.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/workflow/index.d.ts +10 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workspace/index.d.ts +5 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/package.json +148 -0
- package/src/EveryskApp.tsx +108 -0
- package/src/agGrid/agGridTheme.ts +113 -0
- package/src/agGrid/index.ts +15 -0
- package/src/api/datastore.ts +175 -0
- package/src/api/entityQuery.ts +101 -0
- package/src/api/file.ts +174 -0
- package/src/api/portfolio.ts +190 -0
- package/src/api/profile.ts +80 -0
- package/src/api/websocketsConfig.ts +32 -0
- package/src/api/workflow.ts +427 -0
- package/src/api/workspace.ts +72 -0
- package/src/components/ui/EveryskIcon/index.tsx +24 -0
- package/src/components/ui/Footer/index.tsx +30 -0
- package/src/components/ui/GlobalLoading/index.tsx +38 -0
- package/src/components/ui/PageContainer/index.tsx +14 -0
- package/src/components/ui/Toolbar/index.tsx +44 -0
- package/src/contexts/agGridLicenseContext/provider.tsx +63 -0
- package/src/contexts/appAlertContext/index.tsx +4 -0
- package/src/contexts/appAlertContext/provider.tsx +92 -0
- package/src/contexts/appAlertContext/types.ts +17 -0
- package/src/contexts/appAlertContext/useAppAlert.ts +39 -0
- package/src/contexts/appConfigContext/index.tsx +4 -0
- package/src/contexts/appConfigContext/provider.tsx +67 -0
- package/src/contexts/appConfigContext/types.ts +28 -0
- package/src/contexts/appConfigContext/useAppConfig.ts +30 -0
- package/src/contexts/webSocketContext/constants.ts +3 -0
- package/src/contexts/webSocketContext/handler.ts +108 -0
- package/src/contexts/webSocketContext/hooks/useAppNotificationSubscription/index.ts +36 -0
- package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +18 -0
- package/src/contexts/webSocketContext/hooks/useWebSocketSubscription/index.ts +45 -0
- package/src/contexts/webSocketContext/index.tsx +5 -0
- package/src/contexts/webSocketContext/provider.tsx +125 -0
- package/src/contexts/webSocketContext/types.ts +50 -0
- package/src/datastore/index.ts +14 -0
- package/src/file/index.ts +13 -0
- package/src/hooks/datastore/useDatastoreMutations.ts +221 -0
- package/src/hooks/datastore/useFetchDatastore.ts +95 -0
- package/src/hooks/datastore/useFetchDatastores.ts +162 -0
- package/src/hooks/file/useFetchFile.ts +93 -0
- package/src/hooks/file/useFetchFiles.ts +109 -0
- package/src/hooks/file/useFileMutations.ts +240 -0
- package/src/hooks/portfolio/useFetchPortfolio.ts +94 -0
- package/src/hooks/portfolio/useFetchPortfolios.ts +109 -0
- package/src/hooks/portfolio/usePortfolioMutations.ts +250 -0
- package/src/hooks/profile/useFetchProfile.ts +93 -0
- package/src/hooks/useAxios.ts +98 -0
- package/src/hooks/workflow/useFetchWorkerExecution.ts +78 -0
- package/src/hooks/workflow/useFetchWorkerExecutions.ts +98 -0
- package/src/hooks/workflow/useFetchWorkflow.ts +76 -0
- package/src/hooks/workflow/useFetchWorkflowExecution.ts +79 -0
- package/src/hooks/workflow/useFetchWorkflowExecutions.ts +95 -0
- package/src/hooks/workflow/useFetchWorkflows.ts +84 -0
- package/src/hooks/workflow/useRunWorkflow.ts +62 -0
- package/src/hooks/workspace/useFetchWorkspace.ts +78 -0
- package/src/hooks/workspace/useFetchWorkspaces.ts +86 -0
- package/src/index.ts +72 -0
- package/src/lib/datastoreTable.ts +159 -0
- package/src/lib/queryClient.ts +60 -0
- package/src/portfolio/index.ts +13 -0
- package/src/profile/index.ts +11 -0
- package/src/socket/index.ts +19 -0
- package/src/test/index.ts +10 -0
- package/src/test/mocks/agGridEnterprise.ts +45 -0
- package/src/test/mocks/agGridReact.tsx +61 -0
- package/src/test/mocks/index.ts +22 -0
- package/src/test/mocks/socketIoClient.ts +78 -0
- package/src/test/renderWithProviders.tsx +114 -0
- package/src/test/setup.ts +46 -0
- package/src/theme/ThemeProvider.tsx +33 -0
- package/src/theme/index.ts +15 -0
- package/src/theme/overrides/index.ts +31 -0
- package/src/theme/overrides/muiButton.ts +7 -0
- package/src/theme/overrides/muiCssBaseline.ts +35 -0
- package/src/theme/overrides/muiDatePicker.ts +5 -0
- package/src/theme/overrides/muiFormControl.ts +7 -0
- package/src/theme/overrides/muiIconButton.ts +7 -0
- package/src/theme/overrides/muiSelect.ts +7 -0
- package/src/theme/overrides/muiSvgIcon.ts +7 -0
- package/src/theme/overrides/muiTextField.ts +7 -0
- package/src/theme/overrides/muiToggleButton.ts +7 -0
- package/src/theme/overrides/muiToggleButtonGroup.ts +7 -0
- package/src/theme/themes/DefaultDark.ts +14 -0
- package/src/theme/themes/DefaultLight.ts +14 -0
- package/src/theme/themes/EveryskDark.ts +62 -0
- package/src/theme/themes/EveryskLight.ts +68 -0
- package/src/theme/themes/MidnightEmber.ts +30 -0
- package/src/theme/themes/index.ts +35 -0
- package/src/types/anyRecord.ts +4 -0
- package/src/types/datastore.ts +33 -0
- package/src/types/entityQuery.ts +64 -0
- package/src/types/file.ts +32 -0
- package/src/types/portfolio.ts +81 -0
- package/src/types/profile.ts +39 -0
- package/src/types/workflow.ts +76 -0
- package/src/types/workspace.ts +15 -0
- package/src/ui/index.ts +14 -0
- package/src/workflow/index.ts +17 -0
- package/src/workspace/index.ts +12 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { isAxiosError } from "axios";
|
|
2
|
+
//#region src/api/portfolio.ts
|
|
3
|
+
var baseUrl = "portfolios";
|
|
4
|
+
/**
|
|
5
|
+
* getPortfolio
|
|
6
|
+
*
|
|
7
|
+
* Fetches a single portfolio by ID.
|
|
8
|
+
*
|
|
9
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
10
|
+
* @param {string} id - Portfolio identifier.
|
|
11
|
+
* @param {string} workspace - Workspace the portfolio belongs to.
|
|
12
|
+
* @returns {Promise<PortfolioSingleResponse>} The fetched portfolio response.
|
|
13
|
+
*
|
|
14
|
+
* @throws {Error} If the request fails.
|
|
15
|
+
*/
|
|
16
|
+
var getPortfolio = async (api, id, workspace) => {
|
|
17
|
+
const params = { workspace };
|
|
18
|
+
if (!workspace) throw new Error("Workspace is required to fetch a portfolio");
|
|
19
|
+
try {
|
|
20
|
+
return (await api.get(`${baseUrl}/${id}`, { params })).data;
|
|
21
|
+
} catch (error) {
|
|
22
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error while fetching portfolio");
|
|
23
|
+
if (error instanceof Error) throw error;
|
|
24
|
+
throw new Error("Error while fetching portfolio");
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* listPortfolios
|
|
29
|
+
*
|
|
30
|
+
* Fetches a list of portfolios using a query object (filters, order, pagination, etc.).
|
|
31
|
+
*
|
|
32
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
33
|
+
* @param {QueryObject} query - Query object built via `buildQueryObject`.
|
|
34
|
+
* @returns {Promise<PortfolioListResponse>} List of portfolios.
|
|
35
|
+
*
|
|
36
|
+
* @throws {Error} If the request fails.
|
|
37
|
+
*/
|
|
38
|
+
var listPortfolios = async (api, query) => {
|
|
39
|
+
const workspaceFilter = query.filters.find((filter) => filter[0] === "workspace");
|
|
40
|
+
const workspace = workspaceFilter?.[workspaceFilter.length - 1];
|
|
41
|
+
if (!workspace) throw new Error("Workspace is required to fetch portfolios");
|
|
42
|
+
const params = {
|
|
43
|
+
workspace,
|
|
44
|
+
...query ? { query: JSON.stringify(query) } : {}
|
|
45
|
+
};
|
|
46
|
+
try {
|
|
47
|
+
return (await api.get(baseUrl, { params })).data;
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error while fetching portfolios");
|
|
50
|
+
if (error instanceof Error) throw error;
|
|
51
|
+
throw new Error("Error while fetching portfolios");
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* createPortfolio
|
|
56
|
+
*
|
|
57
|
+
* Creates a new portfolio.
|
|
58
|
+
*
|
|
59
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
60
|
+
* @param {Partial<Portfolio>} data - Portfolio payload.
|
|
61
|
+
* @returns {Promise<Portfolio>} The created portfolio.
|
|
62
|
+
*
|
|
63
|
+
* @throws {Error} If the request fails.
|
|
64
|
+
*/
|
|
65
|
+
var createPortfolio = async (api, data) => {
|
|
66
|
+
const { workspace } = data;
|
|
67
|
+
if (!workspace) throw new Error("Workspace is required to post a portfolio");
|
|
68
|
+
try {
|
|
69
|
+
return (await api.post(baseUrl, data)).data;
|
|
70
|
+
} catch (error) {
|
|
71
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error while creating portfolio");
|
|
72
|
+
if (error instanceof Error) throw error;
|
|
73
|
+
throw new Error("Error while creating portfolio");
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* updatePortfolio
|
|
78
|
+
*
|
|
79
|
+
* Updates an existing portfolio by ID.
|
|
80
|
+
*
|
|
81
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
82
|
+
* @param {string} id - Portfolio identifier.
|
|
83
|
+
* @param {Partial<Portfolio>} data - Fields to update.
|
|
84
|
+
* @returns {Promise<Portfolio>} The updated portfolio.
|
|
85
|
+
*
|
|
86
|
+
* @throws {Error} If the request fails.
|
|
87
|
+
*/
|
|
88
|
+
var updatePortfolio = async (api, id, data) => {
|
|
89
|
+
const { workspace } = data;
|
|
90
|
+
if (!workspace) throw new Error("Workspace is required to delete a portfolio");
|
|
91
|
+
try {
|
|
92
|
+
return (await api.put(`${baseUrl}/${id}`, data)).data;
|
|
93
|
+
} catch (error) {
|
|
94
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error while updating portfolio");
|
|
95
|
+
if (error instanceof Error) throw error;
|
|
96
|
+
throw new Error("Error while updating portfolio");
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* deletePortfolio
|
|
101
|
+
*
|
|
102
|
+
* Deletes a portfolio by ID.
|
|
103
|
+
*
|
|
104
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
105
|
+
* @param {string} id - Portfolio identifier.
|
|
106
|
+
* @param {string} workspace - Workspace the portfolio belongs to.
|
|
107
|
+
* @returns {Promise<Portfolio>} The deleted portfolio.
|
|
108
|
+
*
|
|
109
|
+
* @throws {Error} If the request fails.
|
|
110
|
+
*/
|
|
111
|
+
var deletePortfolio = async (api, id, workspace) => {
|
|
112
|
+
if (!workspace) throw new Error("Workspace is required to delete a portfolio");
|
|
113
|
+
const params = { workspace };
|
|
114
|
+
try {
|
|
115
|
+
return (await api.delete(`${baseUrl}/${id}`, { params })).data;
|
|
116
|
+
} catch (error) {
|
|
117
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error while deleting portfolio");
|
|
118
|
+
if (error instanceof Error) throw error;
|
|
119
|
+
throw new Error("Error while deleting portfolio");
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
export { createPortfolio, deletePortfolio, getPortfolio, listPortfolios, updatePortfolio };
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=portfolio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolio.js","names":[],"sources":["../../src/api/portfolio.ts"],"sourcesContent":["import { isAxiosError, type AxiosInstance, type AxiosResponse } from \"axios\";\n\nimport type { QueryObject } from \"@/types/entityQuery\";\nimport type { AnyRecord } from \"@/types/anyRecord\";\nimport type { FilterExpression } from \"@/types/entityQuery\";\nimport type { Portfolio, PortfolioListResponse, PortfolioSingleResponse } from \"@/types/portfolio\";\n\nconst baseUrl = \"portfolios\";\n\n/**\n * getPortfolio\n *\n * Fetches a single portfolio by ID.\n *\n * @param {AxiosInstance} api - Axios instance.\n * @param {string} id - Portfolio identifier.\n * @param {string} workspace - Workspace the portfolio belongs to.\n * @returns {Promise<PortfolioSingleResponse>} The fetched portfolio response.\n *\n * @throws {Error} If the request fails.\n */\nexport const getPortfolio = async (api: AxiosInstance, id: string, workspace: string): Promise<PortfolioSingleResponse> => {\n const params: AnyRecord = { workspace };\n\n if(!workspace){\n throw new Error(\"Workspace is required to fetch a portfolio\");\n }\n\n try {\n const response: AxiosResponse<PortfolioSingleResponse> = await api.get(`${baseUrl}/${id}`, { params });\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error while fetching portfolio\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error while fetching portfolio\");\n }\n};\n\n/**\n * listPortfolios\n *\n * Fetches a list of portfolios using a query object (filters, order, pagination, etc.).\n *\n * @param {AxiosInstance} api - Axios instance.\n * @param {QueryObject} query - Query object built via `buildQueryObject`.\n * @returns {Promise<PortfolioListResponse>} List of portfolios.\n *\n * @throws {Error} If the request fails.\n */\nexport const listPortfolios = async (api: AxiosInstance, query: QueryObject): Promise<PortfolioListResponse> => {\n const workspaceFilter = query.filters.find((filter: FilterExpression) => filter[0] === \"workspace\");\n const workspace = workspaceFilter?.[workspaceFilter.length - 1];\n\n if (!workspace) {\n throw new Error(\"Workspace is required to fetch portfolios\");\n }\n\n const params: AnyRecord = {\n workspace,\n ...(query ? { query: JSON.stringify(query) } : {}),\n };\n\n try {\n const response: AxiosResponse<PortfolioListResponse> = await api.get(baseUrl, { params });\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error while fetching portfolios\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error while fetching portfolios\");\n }\n}\n\n/**\n * createPortfolio\n *\n * Creates a new portfolio.\n *\n * @param {AxiosInstance} api - Axios instance.\n * @param {Partial<Portfolio>} data - Portfolio payload.\n * @returns {Promise<Portfolio>} The created portfolio.\n *\n * @throws {Error} If the request fails.\n */\nexport const createPortfolio = async (api: AxiosInstance, data: Partial<Portfolio>): Promise<Portfolio> => {\n\n const { workspace } = data;\n\n if (!workspace) {\n throw new Error(\"Workspace is required to post a portfolio\");\n }\n\n try {\n const response: AxiosResponse<Portfolio> = await api.post(baseUrl, data);\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error while creating portfolio\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error while creating portfolio\");\n }\n}\n\n/**\n * updatePortfolio\n *\n * Updates an existing portfolio by ID.\n *\n * @param {AxiosInstance} api - Axios instance.\n * @param {string} id - Portfolio identifier.\n * @param {Partial<Portfolio>} data - Fields to update.\n * @returns {Promise<Portfolio>} The updated portfolio.\n *\n * @throws {Error} If the request fails.\n */\nexport const updatePortfolio = async (api: AxiosInstance, id: string, data: Partial<Portfolio>): Promise<Portfolio> => {\n\n const { workspace } = data;\n \n if(!workspace) {\n throw new Error(\"Workspace is required to delete a portfolio\");\n }\n\n try {\n const response: AxiosResponse<Portfolio> = await api.put(`${baseUrl}/${id}`, data);\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error while updating portfolio\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error while updating portfolio\");\n }\n}\n\n/**\n * deletePortfolio\n *\n * Deletes a portfolio by ID.\n *\n * @param {AxiosInstance} api - Axios instance.\n * @param {string} id - Portfolio identifier.\n * @param {string} workspace - Workspace the portfolio belongs to.\n * @returns {Promise<Portfolio>} The deleted portfolio.\n *\n * @throws {Error} If the request fails.\n */\nexport const deletePortfolio = async (api: AxiosInstance, id: string, workspace: string): Promise<Portfolio> => {\n \n if(!workspace) {\n throw new Error(\"Workspace is required to delete a portfolio\");\n }\n \n const params: AnyRecord = { workspace };\n\n try {\n const response: AxiosResponse<Portfolio> = await api.delete(`${baseUrl}/${id}`, { params });\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error while deleting portfolio\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error while deleting portfolio\");\n }\n}"],"mappings":";;AAOA,IAAM,UAAU;;;;;;;;;;;;;AAchB,IAAa,eAAe,OAAO,KAAoB,IAAY,cAAwD;CACzH,MAAM,SAAoB,EAAE,UAAU;CAEtC,IAAG,CAAC,WACF,MAAM,IAAI,MAAM,4CAA4C;CAG9D,IAAI;EAEF,QAAO,MADwD,IAAI,IAAI,GAAG,QAAQ,GAAG,MAAM,EAAE,OAAO,CAAC,EAAA,CACrF;CAClB,SAAS,OAAgB;EACvB,IAAI,aAAwB,KAAK,GAChC,MAAM,IAAI,MAAM,MAAM,WAAW,gCAAgC;EAGlE,IAAI,iBAAiB,OACnB,MAAM;EAGR,MAAM,IAAI,MAAM,gCAAgC;CAClD;AACF;;;;;;;;;;;;AAaA,IAAa,iBAAiB,OAAO,KAAoB,UAAuD;CAC5G,MAAM,kBAAkB,MAAM,QAAQ,MAAM,WAA6B,OAAO,OAAO,WAAW;CAClG,MAAM,YAAY,kBAAkB,gBAAgB,SAAS;CAE7D,IAAI,CAAC,WACH,MAAM,IAAI,MAAM,2CAA2C;CAG7D,MAAM,SAAoB;EACxB;EACA,GAAI,QAAQ,EAAE,OAAO,KAAK,UAAU,KAAK,EAAE,IAAI,CAAC;CAClD;CAEA,IAAI;EAEF,QAAO,MADsD,IAAI,IAAI,SAAS,EAAE,OAAO,CAAC,EAAA,CACxE;CAClB,SAAS,OAAgB;EACvB,IAAI,aAAwB,KAAK,GAC/B,MAAM,IAAI,MAAM,MAAM,WAAW,iCAAiC;EAGpE,IAAI,iBAAiB,OACnB,MAAM;EAGR,MAAM,IAAI,MAAM,iCAAiC;CACnD;AACJ;;;;;;;;;;;;AAaA,IAAa,kBAAkB,OAAO,KAAoB,SAAiD;CAEzG,MAAM,EAAE,cAAc;CAErB,IAAI,CAAC,WACJ,MAAM,IAAI,MAAM,2CAA2C;CAG7D,IAAI;EAEF,QAAO,MAD0C,IAAI,KAAK,SAAS,IAAI,EAAA,CACvD;CAClB,SAAS,OAAgB;EACvB,IAAI,aAAwB,KAAK,GAC/B,MAAM,IAAI,MAAM,MAAM,WAAW,gCAAgC;EAGnE,IAAI,iBAAiB,OACnB,MAAM;EAGR,MAAM,IAAI,MAAM,gCAAgC;CAClD;AACF;;;;;;;;;;;;;AAcA,IAAa,kBAAkB,OAAO,KAAoB,IAAY,SAAiD;CAErH,MAAM,EAAE,cAAc;CAEtB,IAAG,CAAC,WACF,MAAM,IAAI,MAAM,6CAA6C;CAG/D,IAAI;EAEF,QAAO,MAD0C,IAAI,IAAI,GAAG,QAAQ,GAAG,MAAM,IAAI,EAAA,CACjE;CAClB,SAAS,OAAgB;EACvB,IAAI,aAAwB,KAAK,GAC/B,MAAM,IAAI,MAAM,MAAM,WAAW,gCAAgC;EAGnE,IAAI,iBAAiB,OACnB,MAAM;EAGR,MAAM,IAAI,MAAM,gCAAgC;CAClD;AACF;;;;;;;;;;;;;AAcA,IAAa,kBAAkB,OAAO,KAAoB,IAAY,cAA0C;CAE9G,IAAG,CAAC,WACF,MAAM,IAAI,MAAM,6CAA6C;CAG/D,MAAM,SAAoB,EAAE,UAAU;CAEtC,IAAI;EAEF,QAAO,MAD0C,IAAI,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE,OAAO,CAAC,EAAA,CAC1E;CAClB,SAAS,OAAgB;EACvB,IAAI,aAAwB,KAAK,GAC/B,MAAM,IAAI,MAAM,MAAM,WAAW,gCAAgC;EAGnE,IAAI,iBAAiB,OACnB,MAAM;EAGR,MAAM,IAAI,MAAM,gCAAgC;CAClD;AACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type AxiosInstance } from "axios";
|
|
2
|
+
import type { Profile } from "../types/profile.d.ts";
|
|
3
|
+
/**
|
|
4
|
+
* DEV_PROFILE — the profile served while running the dev server.
|
|
5
|
+
*
|
|
6
|
+
* `GET /api/profile` only works in production: it resolves the user from the session, and in dev
|
|
7
|
+
* the Vite proxy authenticates with OAuth2 client credentials (a machine token, no logged user),
|
|
8
|
+
* so the endpoint has no session to read and the request fails. This stands in for it and covers
|
|
9
|
+
* every field the API returns, so a screen renders with realistic values in dev.
|
|
10
|
+
*
|
|
11
|
+
* The values are deliberately obvious placeholders — see `docs/development.md`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEV_PROFILE: Profile;
|
|
14
|
+
/**
|
|
15
|
+
* getProfile
|
|
16
|
+
*
|
|
17
|
+
* Fetches the profile of the logged user. The endpoint takes no parameters — the API resolves the
|
|
18
|
+
* user from the session — so an app always gets whoever is using it.
|
|
19
|
+
*
|
|
20
|
+
* When `fallback` is given it is returned as-is and the network is never touched. That is how an
|
|
21
|
+
* app serves `DEV_PROFILE` while running the dev server, where the endpoint cannot resolve.
|
|
22
|
+
*
|
|
23
|
+
* The template decided this itself with `if (import.meta.env.DEV) return DEV_PROFILE`. That
|
|
24
|
+
* cannot live in a published package: Vite replaces `import.meta.env.DEV` with a literal at the
|
|
25
|
+
* build of whoever compiles the file, so the branch would freeze to whatever the SDK's own build
|
|
26
|
+
* was and stop tracking the consuming app entirely. Which environment counts as "dev" is the
|
|
27
|
+
* app's question, so the app answers it:
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* useFetchProfile({ fallback: import.meta.env.DEV ? DEV_PROFILE : undefined });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
34
|
+
* @param {Profile} [fallback] - Returned instead of calling the API, when present.
|
|
35
|
+
* @returns {Promise<Profile>} The logged user's profile.
|
|
36
|
+
*
|
|
37
|
+
* @throws {Error} If the request fails.
|
|
38
|
+
*/
|
|
39
|
+
export declare const getProfile: (api: AxiosInstance, fallback?: Profile) => Promise<Profile>;
|
|
40
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/api/profile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAG7E,OAAO,KAAK,EAAE,OAAO,EAAmB,MAAM,iBAAiB,CAAC;AAIhE;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,EAAE,OAkBzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,UAAU,GAAU,KAAK,aAAa,EAAE,WAAW,OAAO,KAAG,OAAO,CAAC,OAAO,CAiBxF,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { isAxiosError } from "axios";
|
|
2
|
+
//#region src/api/profile.ts
|
|
3
|
+
var baseUrl = "profile";
|
|
4
|
+
/**
|
|
5
|
+
* DEV_PROFILE — the profile served while running the dev server.
|
|
6
|
+
*
|
|
7
|
+
* `GET /api/profile` only works in production: it resolves the user from the session, and in dev
|
|
8
|
+
* the Vite proxy authenticates with OAuth2 client credentials (a machine token, no logged user),
|
|
9
|
+
* so the endpoint has no session to read and the request fails. This stands in for it and covers
|
|
10
|
+
* every field the API returns, so a screen renders with realistic values in dev.
|
|
11
|
+
*
|
|
12
|
+
* The values are deliberately obvious placeholders — see `docs/development.md`.
|
|
13
|
+
*/
|
|
14
|
+
var DEV_PROFILE = {
|
|
15
|
+
email: "dev@everysk.com",
|
|
16
|
+
user_type: "USER",
|
|
17
|
+
region: "BR",
|
|
18
|
+
company_name: "Everysk (dev)",
|
|
19
|
+
first_name: "Dev",
|
|
20
|
+
last_name: "User",
|
|
21
|
+
phone: "+55 11 0000-0000",
|
|
22
|
+
address: "Dev address, 0",
|
|
23
|
+
billing_email: "dev@everysk.com",
|
|
24
|
+
time_zone: "America/Sao_Paulo",
|
|
25
|
+
company_logo: "",
|
|
26
|
+
user_role: "ADMIN",
|
|
27
|
+
skin_theme: "light",
|
|
28
|
+
account_deletion_requested: false,
|
|
29
|
+
asset: "",
|
|
30
|
+
owner: true,
|
|
31
|
+
auto_refresh: false
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* getProfile
|
|
35
|
+
*
|
|
36
|
+
* Fetches the profile of the logged user. The endpoint takes no parameters — the API resolves the
|
|
37
|
+
* user from the session — so an app always gets whoever is using it.
|
|
38
|
+
*
|
|
39
|
+
* When `fallback` is given it is returned as-is and the network is never touched. That is how an
|
|
40
|
+
* app serves `DEV_PROFILE` while running the dev server, where the endpoint cannot resolve.
|
|
41
|
+
*
|
|
42
|
+
* The template decided this itself with `if (import.meta.env.DEV) return DEV_PROFILE`. That
|
|
43
|
+
* cannot live in a published package: Vite replaces `import.meta.env.DEV` with a literal at the
|
|
44
|
+
* build of whoever compiles the file, so the branch would freeze to whatever the SDK's own build
|
|
45
|
+
* was and stop tracking the consuming app entirely. Which environment counts as "dev" is the
|
|
46
|
+
* app's question, so the app answers it:
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* useFetchProfile({ fallback: import.meta.env.DEV ? DEV_PROFILE : undefined });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param {AxiosInstance} api - Axios instance.
|
|
53
|
+
* @param {Profile} [fallback] - Returned instead of calling the API, when present.
|
|
54
|
+
* @returns {Promise<Profile>} The logged user's profile.
|
|
55
|
+
*
|
|
56
|
+
* @throws {Error} If the request fails.
|
|
57
|
+
*/
|
|
58
|
+
var getProfile = async (api, fallback) => {
|
|
59
|
+
if (fallback) return fallback;
|
|
60
|
+
try {
|
|
61
|
+
return (await api.get(baseUrl)).data.profile;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error while fetching profile");
|
|
64
|
+
if (error instanceof Error) throw error;
|
|
65
|
+
throw new Error("Error while fetching profile");
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { DEV_PROFILE, getProfile };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.js","names":[],"sources":["../../src/api/profile.ts"],"sourcesContent":["import { isAxiosError, type AxiosInstance, type AxiosResponse } from \"axios\";\n\nimport type { AnyRecord } from \"@/types/anyRecord\";\nimport type { Profile, ProfileResponse } from \"@/types/profile\";\n\nconst baseUrl = \"profile\";\n\n/**\n * DEV_PROFILE — the profile served while running the dev server.\n *\n * `GET /api/profile` only works in production: it resolves the user from the session, and in dev\n * the Vite proxy authenticates with OAuth2 client credentials (a machine token, no logged user),\n * so the endpoint has no session to read and the request fails. This stands in for it and covers\n * every field the API returns, so a screen renders with realistic values in dev.\n *\n * The values are deliberately obvious placeholders — see `docs/development.md`.\n */\nexport const DEV_PROFILE: Profile = {\n email: \"dev@everysk.com\",\n user_type: \"USER\",\n region: \"BR\",\n company_name: \"Everysk (dev)\",\n first_name: \"Dev\",\n last_name: \"User\",\n phone: \"+55 11 0000-0000\",\n address: \"Dev address, 0\",\n billing_email: \"dev@everysk.com\",\n time_zone: \"America/Sao_Paulo\",\n company_logo: \"\",\n user_role: \"ADMIN\",\n skin_theme: \"light\",\n account_deletion_requested: false,\n asset: \"\",\n owner: true,\n auto_refresh: false,\n};\n\n/**\n * getProfile\n *\n * Fetches the profile of the logged user. The endpoint takes no parameters — the API resolves the\n * user from the session — so an app always gets whoever is using it.\n *\n * When `fallback` is given it is returned as-is and the network is never touched. That is how an\n * app serves `DEV_PROFILE` while running the dev server, where the endpoint cannot resolve.\n *\n * The template decided this itself with `if (import.meta.env.DEV) return DEV_PROFILE`. That\n * cannot live in a published package: Vite replaces `import.meta.env.DEV` with a literal at the\n * build of whoever compiles the file, so the branch would freeze to whatever the SDK's own build\n * was and stop tracking the consuming app entirely. Which environment counts as \"dev\" is the\n * app's question, so the app answers it:\n *\n * ```ts\n * useFetchProfile({ fallback: import.meta.env.DEV ? DEV_PROFILE : undefined });\n * ```\n *\n * @param {AxiosInstance} api - Axios instance.\n * @param {Profile} [fallback] - Returned instead of calling the API, when present.\n * @returns {Promise<Profile>} The logged user's profile.\n *\n * @throws {Error} If the request fails.\n */\nexport const getProfile = async (api: AxiosInstance, fallback?: Profile): Promise<Profile> => {\n if (fallback) return fallback;\n\n try {\n const response: AxiosResponse<ProfileResponse> = await api.get(baseUrl);\n return response.data.profile;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error while fetching profile\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error while fetching profile\");\n }\n};\n"],"mappings":";;AAKA,IAAM,UAAU;;;;;;;;;;;AAYhB,IAAa,cAAuB;CAChC,OAAO;CACP,WAAW;CACX,QAAQ;CACR,cAAc;CACd,YAAY;CACZ,WAAW;CACX,OAAO;CACP,SAAS;CACT,eAAe;CACf,WAAW;CACX,cAAc;CACd,WAAW;CACX,YAAY;CACZ,4BAA4B;CAC5B,OAAO;CACP,OAAO;CACP,cAAc;AAClB;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,IAAa,aAAa,OAAO,KAAoB,aAAyC;CAC1F,IAAI,UAAU,OAAO;CAErB,IAAI;EAEA,QAAO,MADgD,IAAI,IAAI,OAAO,EAAA,CACtD,KAAK;CACzB,SAAS,OAAgB;EACrB,IAAI,aAAwB,KAAK,GAC7B,MAAM,IAAI,MAAM,MAAM,WAAW,8BAA8B;EAGnE,IAAI,iBAAiB,OACjB,MAAM;EAGV,MAAM,IAAI,MAAM,8BAA8B;CAClD;AACJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AxiosInstance } from "axios";
|
|
2
|
+
import type { WebsocketsConfig } from "../contexts/webSocketContext/types.d.ts";
|
|
3
|
+
/**
|
|
4
|
+
* getWebsocketsConfig
|
|
5
|
+
*
|
|
6
|
+
* Fetches the Socket.IO connection config for the current user/app.
|
|
7
|
+
*
|
|
8
|
+
* @param {AxiosInstance} api - Axios instance (from `useAxios`).
|
|
9
|
+
* @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.
|
|
10
|
+
* @throws {Error} If the request fails.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getWebsocketsConfig: (api: AxiosInstance) => Promise<WebsocketsConfig>;
|
|
13
|
+
//# sourceMappingURL=websocketsConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocketsConfig.d.ts","sourceRoot":"","sources":["../../src/api/websocketsConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAG7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAI1E;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,GAAU,KAAK,aAAa,KAAG,OAAO,CAAC,gBAAgB,CAetF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isAxiosError } from "axios";
|
|
2
|
+
//#region src/api/websocketsConfig.ts
|
|
3
|
+
var baseUrl = "websockets_config";
|
|
4
|
+
/**
|
|
5
|
+
* getWebsocketsConfig
|
|
6
|
+
*
|
|
7
|
+
* Fetches the Socket.IO connection config for the current user/app.
|
|
8
|
+
*
|
|
9
|
+
* @param {AxiosInstance} api - Axios instance (from `useAxios`).
|
|
10
|
+
* @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.
|
|
11
|
+
* @throws {Error} If the request fails.
|
|
12
|
+
*/
|
|
13
|
+
var getWebsocketsConfig = async (api) => {
|
|
14
|
+
try {
|
|
15
|
+
return (await api.get(baseUrl)).data;
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (isAxiosError(error)) throw new Error(error.message || "Error fetching websockets config");
|
|
18
|
+
if (error instanceof Error) throw error;
|
|
19
|
+
throw new Error("Error fetching websockets config");
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { getWebsocketsConfig };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=websocketsConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocketsConfig.js","names":[],"sources":["../../src/api/websocketsConfig.ts"],"sourcesContent":["import { isAxiosError, type AxiosInstance, type AxiosResponse } from \"axios\";\n\nimport type { AnyRecord } from \"@/types/anyRecord\";\nimport type { WebsocketsConfig } from \"@/contexts/webSocketContext/types\";\n\nconst baseUrl = \"websockets_config\";\n\n/**\n * getWebsocketsConfig\n *\n * Fetches the Socket.IO connection config for the current user/app.\n *\n * @param {AxiosInstance} api - Axios instance (from `useAxios`).\n * @returns {Promise<WebsocketsConfig>} Connection URL, channel id, and session uid.\n * @throws {Error} If the request fails.\n */\nexport const getWebsocketsConfig = async (api: AxiosInstance): Promise<WebsocketsConfig> => {\n try {\n const response: AxiosResponse<WebsocketsConfig> = await api.get(baseUrl);\n return response.data;\n } catch (error: unknown) {\n if (isAxiosError<AnyRecord>(error)) {\n throw new Error(error.message || \"Error fetching websockets config\");\n }\n\n if (error instanceof Error) {\n throw error;\n }\n\n throw new Error(\"Error fetching websockets config\");\n }\n};\n"],"mappings":";;AAKA,IAAM,UAAU;;;;;;;;;;AAWhB,IAAa,sBAAsB,OAAO,QAAkD;CACxF,IAAI;EAEA,QAAO,MADiD,IAAI,IAAI,OAAO,EAAA,CACvD;CACpB,SAAS,OAAgB;EACrB,IAAI,aAAwB,KAAK,GAC7B,MAAM,IAAI,MAAM,MAAM,WAAW,kCAAkC;EAGvE,IAAI,iBAAiB,OACjB,MAAM;EAGV,MAAM,IAAI,MAAM,kCAAkC;CACtD;AACJ"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { type AxiosInstance } from "axios";
|
|
2
|
+
import type { AnyRecord } from "../types/anyRecord.d.ts";
|
|
3
|
+
import type { QueryObject } from "../types/entityQuery.d.ts";
|
|
4
|
+
import type { WorkerExecution, WorkerExecutionListResponse, Workflow, WorkflowExecution, WorkflowExecutionListResponse, WorkflowListResponse } from "../types/workflow.d.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Runs a workflow asynchronously.
|
|
7
|
+
*
|
|
8
|
+
* Starts the workflow in a non-blocking way: the response carries a workflow execution
|
|
9
|
+
* with a non-terminal status (e.g. "RUNNING"). Use polling to wait for the terminal state.
|
|
10
|
+
*
|
|
11
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
12
|
+
* @param id - The unique identifier of the workflow to run.
|
|
13
|
+
* @param workspace - The workspace in which the workflow will be executed.
|
|
14
|
+
* @param parameters - Key-value parameters to pass to the workflow.
|
|
15
|
+
* @returns A promise that resolves with the workflow execution response data.
|
|
16
|
+
* @throws {Error} If `workspace` is not provided.
|
|
17
|
+
* @throws {Error} If the request fails.
|
|
18
|
+
*/
|
|
19
|
+
export declare const runWorkflow: (api: AxiosInstance, id: string, workspace: string, parameters: AnyRecord) => Promise<AnyRecord>;
|
|
20
|
+
/**
|
|
21
|
+
* Run statuses that indicate a workflow execution has reached a terminal state
|
|
22
|
+
* (i.e. it is no longer running and will not change again).
|
|
23
|
+
*
|
|
24
|
+
* Union of the backend's `WORKFLOW_EXECUTION_STATUS_FINISHED` set and the API's documented
|
|
25
|
+
* terminal `run_status` values (`SUCCEEDED`/`FAILED`/`KILLED`). `KILLED` is included so a
|
|
26
|
+
* killed execution is detected as terminal instead of polling until timeout.
|
|
27
|
+
*/
|
|
28
|
+
export declare const TERMINAL_RUN_STATUSES: readonly ["CANCELED", "COMPLETED", "SUCCEEDED", "FAILED", "KILLED"];
|
|
29
|
+
export type PollWorkflowExecutionOptions = {
|
|
30
|
+
/** Delay between status checks, in milliseconds. Defaults to 2000ms. */
|
|
31
|
+
intervalMs?: number;
|
|
32
|
+
/** Maximum time to wait for a terminal status before giving up, in milliseconds. Defaults to 5 minutes. */
|
|
33
|
+
timeoutMs?: number;
|
|
34
|
+
/** Optional abort signal to cancel polling (e.g. on unmount). */
|
|
35
|
+
signal?: AbortSignal;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Polls a workflow execution until it reaches a terminal run status (see {@link TERMINAL_RUN_STATUSES}).
|
|
39
|
+
*
|
|
40
|
+
* This is the interim, non-blocking replacement for synchronous (`synchronous: true`) execution:
|
|
41
|
+
* the workflow is started asynchronously and its status is checked periodically until it completes.
|
|
42
|
+
*
|
|
43
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
44
|
+
* @param workflowId - The unique identifier of the workflow.
|
|
45
|
+
* @param executionId - The unique identifier of the workflow execution to poll.
|
|
46
|
+
* @param workspace - The workspace in which the workflow execution resides.
|
|
47
|
+
* @param options - Polling configuration (interval, timeout, abort signal).
|
|
48
|
+
* @returns A promise that resolves with the terminal {@link WorkflowExecution}.
|
|
49
|
+
* @throws {Error} If `workspace` is not provided.
|
|
50
|
+
* @throws {Error} If polling is aborted via `options.signal`.
|
|
51
|
+
* @throws {Error} If a terminal status is not reached before `options.timeoutMs` elapses.
|
|
52
|
+
*/
|
|
53
|
+
export declare const pollWorkflowExecution: (api: AxiosInstance, workflowId: string, executionId: string, workspace: string, options?: PollWorkflowExecutionOptions) => Promise<WorkflowExecution>;
|
|
54
|
+
/**
|
|
55
|
+
* The terminal workflow execution together with the output produced by its final (ender) worker.
|
|
56
|
+
*/
|
|
57
|
+
export type WorkflowResult = {
|
|
58
|
+
/** The terminal workflow execution. */
|
|
59
|
+
execution: WorkflowExecution;
|
|
60
|
+
/** The ender worker execution, or `null` if the execution did not reference one. */
|
|
61
|
+
workerExecution: WorkerExecution | null;
|
|
62
|
+
/** The output data produced by the ender worker (`workerExecution.result`), or `null`. */
|
|
63
|
+
result: Record<string, unknown> | null;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Starts a workflow, polls it to completion, then fetches the output produced by its final worker.
|
|
67
|
+
*
|
|
68
|
+
* A workflow execution does not carry the output payload itself — it references the final worker via
|
|
69
|
+
* `ender_worker_execution_id`, and that worker execution's `result` field holds the actual data.
|
|
70
|
+
* This helper performs the full flow: start (async) → poll → fetch ender worker → return its `result`.
|
|
71
|
+
*
|
|
72
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
73
|
+
* @param id - The unique identifier of the workflow to run.
|
|
74
|
+
* @param workspace - The workspace in which the workflow will be executed.
|
|
75
|
+
* @param parameters - Key-value parameters to pass to the workflow.
|
|
76
|
+
* @param options - Polling configuration (interval, timeout, abort signal).
|
|
77
|
+
* @returns A promise that resolves with the {@link WorkflowResult} (execution, ender worker execution, and its result).
|
|
78
|
+
* @throws {Error} If `workspace` is not provided.
|
|
79
|
+
* @throws {Error} If the workflow execution ends in a "FAILED" run status.
|
|
80
|
+
* @throws {Error} If polling times out or is aborted.
|
|
81
|
+
*/
|
|
82
|
+
export declare const runWorkflowAndGetResult: (api: AxiosInstance, id: string, workspace: string, parameters: AnyRecord, options?: PollWorkflowExecutionOptions) => Promise<WorkflowResult>;
|
|
83
|
+
/**
|
|
84
|
+
* Fetches a single workflow by ID.
|
|
85
|
+
*
|
|
86
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
87
|
+
* @param id - The unique identifier of the workflow to fetch.
|
|
88
|
+
* @param workspace - The workspace in which the workflow resides.
|
|
89
|
+
* @returns A promise that resolves with the {@link Workflow} object.
|
|
90
|
+
* @throws {Error} If `workspace` is not provided.
|
|
91
|
+
* @throws {Error} If the request fails.
|
|
92
|
+
*/
|
|
93
|
+
export declare const getWorkflow: (api: AxiosInstance, id: string, workspace: string) => Promise<Workflow>;
|
|
94
|
+
/**
|
|
95
|
+
* Fetches a paginated list of workflows using the legacy method (workspace as query param).
|
|
96
|
+
*
|
|
97
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
98
|
+
* @param workspace - Current workspace name. Sent as a query param via the legacy method, required by some API configurations.
|
|
99
|
+
* @param pageSize - Number of items per page.
|
|
100
|
+
* @param pageToken - Cursor token for the next page.
|
|
101
|
+
* @returns A promise that resolves with a {@link WorkflowListResponse} containing the matched workflows.
|
|
102
|
+
* @throws {Error} If the request fails.
|
|
103
|
+
*/
|
|
104
|
+
export declare const listWorkflows: (api: AxiosInstance, workspace?: string, pageSize?: number, pageToken?: string) => Promise<WorkflowListResponse>;
|
|
105
|
+
/**
|
|
106
|
+
* Fetches a single workflow execution by ID.
|
|
107
|
+
*
|
|
108
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
109
|
+
* @param workflowId - The unique identifier of the workflow.
|
|
110
|
+
* @param executionId - The unique identifier of the workflow execution to fetch.
|
|
111
|
+
* @param workspace - The workspace in which the workflow execution resides.
|
|
112
|
+
* @returns A promise that resolves with the {@link WorkflowExecution} object.
|
|
113
|
+
* @throws {Error} If `workspace` is not provided.
|
|
114
|
+
* @throws {Error} If the request fails.
|
|
115
|
+
*/
|
|
116
|
+
export declare const getWorkflowExecution: (api: AxiosInstance, workflowId: string, executionId: string, workspace: string) => Promise<WorkflowExecution>;
|
|
117
|
+
/**
|
|
118
|
+
* Fetches a paginated list of workflow executions matching the given query.
|
|
119
|
+
*
|
|
120
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
121
|
+
* @param workflowId - The unique identifier of the workflow whose executions to list.
|
|
122
|
+
* @param query - Query object containing filters, pagination, and sorting options.
|
|
123
|
+
* Must include a `workspace` filter expression.
|
|
124
|
+
* @returns A promise that resolves with a {@link WorkflowExecutionListResponse} containing the matched executions.
|
|
125
|
+
* @throws {Error} If the `workspace` filter is not present in `query.filters`.
|
|
126
|
+
* @throws {Error} If the request fails.
|
|
127
|
+
*/
|
|
128
|
+
export declare const listWorkflowExecutions: (api: AxiosInstance, workflowId: string, query: QueryObject) => Promise<WorkflowExecutionListResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* Fetches a single worker execution by ID.
|
|
131
|
+
*
|
|
132
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
133
|
+
* @param workflowId - The unique identifier of the parent workflow.
|
|
134
|
+
* @param workerExecutionId - The unique identifier of the worker execution to fetch.
|
|
135
|
+
* @param workspace - The workspace in which the worker execution resides.
|
|
136
|
+
* @returns A promise that resolves with the {@link WorkerExecution} object.
|
|
137
|
+
* @throws {Error} If `workspace` is not provided.
|
|
138
|
+
* @throws {Error} If the request fails.
|
|
139
|
+
*/
|
|
140
|
+
export declare const getWorkerExecution: (api: AxiosInstance, workflowId: string, workerExecutionId: string, workspace: string) => Promise<WorkerExecution>;
|
|
141
|
+
/**
|
|
142
|
+
* Fetches a paginated list of worker executions for a given workflow.
|
|
143
|
+
*
|
|
144
|
+
* @param api - Axios instance used to make the HTTP request.
|
|
145
|
+
* @param workflowId - The unique identifier of the parent workflow.
|
|
146
|
+
* @param workflowExecutionId - The unique identifier of the workflow execution to filter by.
|
|
147
|
+
* @param query - Query object containing filters, pagination, and sorting options.
|
|
148
|
+
* Must include a `workspace` filter expression.
|
|
149
|
+
* @returns A promise that resolves with a {@link WorkerExecutionListResponse} containing the matched worker executions.
|
|
150
|
+
* @throws {Error} If the `workspace` filter is not present in `query.filters`.
|
|
151
|
+
* @throws {Error} If the request fails.
|
|
152
|
+
*/
|
|
153
|
+
export declare const listWorkerExecutions: (api: AxiosInstance, workflowId: string, workflowExecutionId: string, query: QueryObject) => Promise<WorkerExecutionListResponse>;
|
|
154
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/api/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,aAAa,EAAsB,MAAM,OAAO,CAAC;AAE7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,2BAA2B,EAAiC,QAAQ,EAAE,iBAAiB,EAAE,6BAA6B,EAAmC,oBAAoB,EAA0B,MAAM,kBAAkB,CAAC;AAI/P;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,GAAU,KAAK,aAAa,EAAE,IAAI,MAAM,EAAE,WAAW,MAAM,EAAE,YAAY,SAAS,KAAG,OAAO,CAAC,SAAS,CA2B7H,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,qEAAsE,CAAC;AAOzG,MAAM,MAAM,4BAA4B,GAAG;IACzC,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2GAA2G;IAC3G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,GAChC,KAAK,aAAa,EAClB,YAAY,MAAM,EAClB,aAAa,MAAM,EACnB,WAAW,MAAM,EACjB,UAAS,4BAAiC,KACzC,OAAO,CAAC,iBAAiB,CAyB3B,CAAC;AAiDF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,uCAAuC;IACvC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,oFAAoF;IACpF,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;IACxC,0FAA0F;IAC1F,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,uBAAuB,GAClC,KAAK,aAAa,EAClB,IAAI,MAAM,EACV,WAAW,MAAM,EACjB,YAAY,SAAS,EACrB,UAAS,4BAAiC,KACzC,OAAO,CAAC,cAAc,CAWxB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,GAAU,KAAK,aAAa,EAAE,IAAI,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,QAAQ,CAoBrG,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,GAAU,KAAK,aAAa,EAAE,YAAY,MAAM,EAAE,WAAW,MAAM,EAAE,YAAY,MAAM,KAAG,OAAO,CAAC,oBAAoB,CAqB/I,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAU,KAAK,aAAa,EAAE,YAAY,MAAM,EAAE,aAAa,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,iBAAiB,CAoBpJ,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GAAU,KAAK,aAAa,EAAE,YAAY,MAAM,EAAE,OAAO,WAAW,KAAG,OAAO,CAAC,6BAA6B,CAyB9I,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAU,KAAK,aAAa,EAAE,YAAY,MAAM,EAAE,mBAAmB,MAAM,EAAE,WAAW,MAAM,KAAG,OAAO,CAAC,eAAe,CAoBtJ,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAU,KAAK,aAAa,EAAE,YAAY,MAAM,EAAE,qBAAqB,MAAM,EAAE,OAAO,WAAW,KAAG,OAAO,CAAC,2BAA2B,CA0BvK,CAAC"}
|