@everysk/apps-sdk 0.2.0 → 0.3.0-beta-20261016180126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +298 -12
- package/dist/EveryskApp.d.ts +34 -2
- package/dist/EveryskApp.d.ts.map +1 -1
- package/dist/EveryskApp.js +35 -2
- package/dist/EveryskApp.js.map +1 -1
- package/dist/agGrid/handleRowsScrollEnd.d.ts +53 -0
- package/dist/agGrid/handleRowsScrollEnd.d.ts.map +1 -0
- package/dist/agGrid/handleRowsScrollEnd.js +47 -0
- package/dist/agGrid/handleRowsScrollEnd.js.map +1 -0
- package/dist/agGrid/index.d.ts +2 -0
- package/dist/agGrid/index.d.ts.map +1 -1
- package/dist/agGrid/index.js +2 -1
- package/dist/api/datastore.d.ts +10 -8
- package/dist/api/datastore.d.ts.map +1 -1
- package/dist/api/datastore.js +24 -55
- package/dist/api/datastore.js.map +1 -1
- package/dist/api/entityQuery.d.ts +46 -41
- package/dist/api/entityQuery.d.ts.map +1 -1
- package/dist/api/entityQuery.js +55 -14
- package/dist/api/entityQuery.js.map +1 -1
- package/dist/api/file.d.ts +26 -9
- package/dist/api/file.d.ts.map +1 -1
- package/dist/api/file.js +45 -55
- package/dist/api/file.js.map +1 -1
- package/dist/api/portfolio.d.ts +11 -8
- package/dist/api/portfolio.d.ts.map +1 -1
- package/dist/api/portfolio.js +24 -55
- package/dist/api/portfolio.js.map +1 -1
- package/dist/api/profile.d.ts +3 -2
- package/dist/api/profile.d.ts.map +1 -1
- package/dist/api/profile.js +4 -9
- package/dist/api/profile.js.map +1 -1
- package/dist/api/request.d.ts +106 -0
- package/dist/api/request.d.ts.map +1 -0
- package/dist/api/request.js +132 -0
- package/dist/api/request.js.map +1 -0
- package/dist/api/websocketsConfig.d.ts +7 -2
- package/dist/api/websocketsConfig.d.ts.map +1 -1
- package/dist/api/websocketsConfig.js +2 -10
- package/dist/api/websocketsConfig.js.map +1 -1
- package/dist/api/workflow.d.ts +84 -89
- package/dist/api/workflow.d.ts.map +1 -1
- package/dist/api/workflow.js +121 -208
- package/dist/api/workflow.js.map +1 -1
- package/dist/api/workspace.d.ts +18 -8
- package/dist/api/workspace.d.ts.map +1 -1
- package/dist/api/workspace.js +21 -26
- package/dist/api/workspace.js.map +1 -1
- package/dist/components/ui/Footer/index.d.ts.map +1 -1
- package/dist/components/ui/Footer/index.js.map +1 -1
- package/dist/components/ui/GlobalLoading/index.d.ts.map +1 -1
- package/dist/components/ui/GlobalLoading/index.js.map +1 -1
- package/dist/components/ui/PageContainer/index.d.ts +1 -1
- package/dist/components/ui/PageContainer/index.d.ts.map +1 -1
- package/dist/components/ui/PageContainer/index.js.map +1 -1
- package/dist/components/ui/Toolbar/index.d.ts +40 -3
- package/dist/components/ui/Toolbar/index.d.ts.map +1 -1
- package/dist/components/ui/Toolbar/index.js +42 -15
- package/dist/components/ui/Toolbar/index.js.map +1 -1
- package/dist/contexts/appAlertContext/provider.js.map +1 -1
- package/dist/contexts/appAlertContext/types.d.ts.map +1 -1
- package/dist/contexts/appConfigContext/index.d.ts.map +1 -1
- package/dist/contexts/appConfigContext/index.js.map +1 -1
- package/dist/contexts/appConfigContext/provider.d.ts.map +1 -1
- package/dist/contexts/appConfigContext/provider.js.map +1 -1
- package/dist/contexts/webSocketContext/handler.d.ts +3 -2
- package/dist/contexts/webSocketContext/handler.d.ts.map +1 -1
- package/dist/contexts/webSocketContext/handler.js.map +1 -1
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.d.ts +1 -1
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js +1 -1
- package/dist/contexts/webSocketContext/hooks/useWebSocket/index.js.map +1 -1
- package/dist/contexts/webSocketContext/provider.d.ts +6 -3
- package/dist/contexts/webSocketContext/provider.d.ts.map +1 -1
- package/dist/contexts/webSocketContext/provider.js +42 -7
- package/dist/contexts/webSocketContext/provider.js.map +1 -1
- package/dist/contexts/webSocketContext/types.d.ts +7 -5
- package/dist/contexts/webSocketContext/types.d.ts.map +1 -1
- package/dist/file/index.d.ts +2 -0
- package/dist/file/index.d.ts.map +1 -1
- package/dist/hooks/datastore/useDatastoreMutations.d.ts +4 -4
- package/dist/hooks/datastore/useDatastoreMutations.d.ts.map +1 -1
- package/dist/hooks/datastore/useDatastoreMutations.js +17 -55
- package/dist/hooks/datastore/useDatastoreMutations.js.map +1 -1
- package/dist/hooks/datastore/useFetchDatastore.d.ts +30 -41
- package/dist/hooks/datastore/useFetchDatastore.d.ts.map +1 -1
- package/dist/hooks/datastore/useFetchDatastore.js +25 -59
- package/dist/hooks/datastore/useFetchDatastore.js.map +1 -1
- package/dist/hooks/datastore/useFetchDatastores.d.ts +47 -52
- package/dist/hooks/datastore/useFetchDatastores.d.ts.map +1 -1
- package/dist/hooks/datastore/useFetchDatastores.js +55 -70
- package/dist/hooks/datastore/useFetchDatastores.js.map +1 -1
- package/dist/hooks/file/fileData.d.ts +17 -0
- package/dist/hooks/file/fileData.d.ts.map +1 -0
- package/dist/hooks/file/fileData.js +10 -0
- package/dist/hooks/file/fileData.js.map +1 -0
- package/dist/hooks/file/useFetchFile.d.ts +38 -58
- package/dist/hooks/file/useFetchFile.d.ts.map +1 -1
- package/dist/hooks/file/useFetchFile.js +26 -66
- package/dist/hooks/file/useFetchFile.js.map +1 -1
- package/dist/hooks/file/useFetchFiles.d.ts +18 -52
- package/dist/hooks/file/useFetchFiles.d.ts.map +1 -1
- package/dist/hooks/file/useFetchFiles.js +53 -69
- package/dist/hooks/file/useFetchFiles.js.map +1 -1
- package/dist/hooks/file/useFileMutations.d.ts +9 -8
- package/dist/hooks/file/useFileMutations.d.ts.map +1 -1
- package/dist/hooks/file/useFileMutations.js +23 -60
- package/dist/hooks/file/useFileMutations.js.map +1 -1
- package/dist/hooks/portfolio/useFetchPortfolio.d.ts +16 -50
- package/dist/hooks/portfolio/useFetchPortfolio.d.ts.map +1 -1
- package/dist/hooks/portfolio/useFetchPortfolio.js +15 -63
- package/dist/hooks/portfolio/useFetchPortfolio.js.map +1 -1
- package/dist/hooks/portfolio/useFetchPortfolios.d.ts +13 -52
- package/dist/hooks/portfolio/useFetchPortfolios.d.ts.map +1 -1
- package/dist/hooks/portfolio/useFetchPortfolios.js +29 -71
- package/dist/hooks/portfolio/useFetchPortfolios.js.map +1 -1
- package/dist/hooks/portfolio/usePortfolioMutations.d.ts +8 -8
- package/dist/hooks/portfolio/usePortfolioMutations.d.ts.map +1 -1
- package/dist/hooks/portfolio/usePortfolioMutations.js +20 -58
- package/dist/hooks/portfolio/usePortfolioMutations.js.map +1 -1
- package/dist/hooks/profile/useFetchProfile.d.ts +18 -44
- package/dist/hooks/profile/useFetchProfile.d.ts.map +1 -1
- package/dist/hooks/profile/useFetchProfile.js +16 -48
- package/dist/hooks/profile/useFetchProfile.js.map +1 -1
- package/dist/hooks/useAxios.js.map +1 -1
- package/dist/hooks/useEntityInfiniteQuery.d.ts +88 -0
- package/dist/hooks/useEntityInfiniteQuery.d.ts.map +1 -0
- package/dist/hooks/useEntityInfiniteQuery.js +111 -0
- package/dist/hooks/useEntityInfiniteQuery.js.map +1 -0
- package/dist/hooks/useEntityMutation.d.ts +47 -0
- package/dist/hooks/useEntityMutation.d.ts.map +1 -0
- package/dist/hooks/useEntityMutation.js +58 -0
- package/dist/hooks/useEntityMutation.js.map +1 -0
- package/dist/hooks/useEntityQuery.d.ts +68 -0
- package/dist/hooks/useEntityQuery.d.ts.map +1 -0
- package/dist/hooks/useEntityQuery.js +75 -0
- package/dist/hooks/useEntityQuery.js.map +1 -0
- package/dist/hooks/workflow/useFetchWorkerExecution.d.ts +17 -34
- package/dist/hooks/workflow/useFetchWorkerExecution.d.ts.map +1 -1
- package/dist/hooks/workflow/useFetchWorkerExecution.js +16 -46
- package/dist/hooks/workflow/useFetchWorkerExecution.js.map +1 -1
- package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts +179 -41
- package/dist/hooks/workflow/useFetchWorkerExecutions.d.ts.map +1 -1
- package/dist/hooks/workflow/useFetchWorkerExecutions.js +29 -62
- package/dist/hooks/workflow/useFetchWorkerExecutions.js.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflow.d.ts +16 -35
- package/dist/hooks/workflow/useFetchWorkflow.d.ts.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflow.js +15 -48
- package/dist/hooks/workflow/useFetchWorkflow.js.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts +17 -34
- package/dist/hooks/workflow/useFetchWorkflowExecution.d.ts.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflowExecution.js +16 -46
- package/dist/hooks/workflow/useFetchWorkflowExecution.js.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts +22 -36
- package/dist/hooks/workflow/useFetchWorkflowExecutions.d.ts.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflowExecutions.js +43 -56
- package/dist/hooks/workflow/useFetchWorkflowExecutions.js.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflows.d.ts +20 -37
- package/dist/hooks/workflow/useFetchWorkflows.d.ts.map +1 -1
- package/dist/hooks/workflow/useFetchWorkflows.js +32 -47
- package/dist/hooks/workflow/useFetchWorkflows.js.map +1 -1
- package/dist/hooks/workflow/useRunWorkflow.d.ts +21 -16
- package/dist/hooks/workflow/useRunWorkflow.d.ts.map +1 -1
- package/dist/hooks/workflow/useRunWorkflow.js +66 -29
- package/dist/hooks/workflow/useRunWorkflow.js.map +1 -1
- package/dist/hooks/workflow/useTriggerWorkflow.d.ts +20 -0
- package/dist/hooks/workflow/useTriggerWorkflow.d.ts.map +1 -0
- package/dist/hooks/workflow/useTriggerWorkflow.js +32 -0
- package/dist/hooks/workflow/useTriggerWorkflow.js.map +1 -0
- package/dist/hooks/workspace/useFetchWorkspace.d.ts +19 -34
- package/dist/hooks/workspace/useFetchWorkspace.d.ts.map +1 -1
- package/dist/hooks/workspace/useFetchWorkspace.js +16 -46
- package/dist/hooks/workspace/useFetchWorkspace.js.map +1 -1
- package/dist/hooks/workspace/useFetchWorkspaces.d.ts +17 -37
- package/dist/hooks/workspace/useFetchWorkspaces.d.ts.map +1 -1
- package/dist/hooks/workspace/useFetchWorkspaces.js +25 -47
- package/dist/hooks/workspace/useFetchWorkspaces.js.map +1 -1
- package/dist/index.d.ts +13 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -11
- package/dist/lib/abort.d.ts +58 -0
- package/dist/lib/abort.d.ts.map +1 -0
- package/dist/lib/abort.js +112 -0
- package/dist/lib/abort.js.map +1 -0
- package/dist/lib/datastoreTable.d.ts +59 -54
- package/dist/lib/datastoreTable.d.ts.map +1 -1
- package/dist/lib/datastoreTable.js +58 -62
- package/dist/lib/datastoreTable.js.map +1 -1
- package/dist/lib/file.d.ts +34 -0
- package/dist/lib/file.d.ts.map +1 -0
- package/dist/lib/file.js +63 -0
- package/dist/lib/file.js.map +1 -0
- package/dist/lib/queryClient.d.ts.map +1 -1
- package/dist/lib/queryClient.js.map +1 -1
- package/dist/lib/workflowRun.d.ts +91 -0
- package/dist/lib/workflowRun.d.ts.map +1 -0
- package/dist/lib/workflowRun.js +224 -0
- package/dist/lib/workflowRun.js.map +1 -0
- package/dist/socket/index.d.ts +1 -3
- package/dist/socket/index.d.ts.map +1 -1
- package/dist/socket/index.js +3 -5
- package/dist/test/mocks/index.d.ts +1 -1
- package/dist/test/mocks/index.d.ts.map +1 -1
- package/dist/test/renderWithProviders.d.ts +2 -2
- package/dist/test/renderWithProviders.d.ts.map +1 -1
- package/dist/test/renderWithProviders.js.map +1 -1
- package/dist/test/setup.js.map +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/overrides/index.d.ts +4 -2
- package/dist/theme/overrides/index.d.ts.map +1 -1
- package/dist/theme/overrides/index.js +5 -3
- package/dist/theme/overrides/index.js.map +1 -1
- package/dist/theme/overrides/muiButton.d.ts +2 -2
- package/dist/theme/overrides/muiButton.js.map +1 -1
- package/dist/theme/overrides/muiCssBaseline.d.ts.map +1 -1
- package/dist/theme/overrides/muiCssBaseline.js.map +1 -1
- package/dist/theme/overrides/muiDatePicker.js.map +1 -1
- package/dist/theme/overrides/muiFormControl.js.map +1 -1
- package/dist/theme/overrides/muiIconButton.d.ts +2 -2
- package/dist/theme/overrides/muiIconButton.js.map +1 -1
- package/dist/theme/overrides/muiSelect.d.ts.map +1 -1
- package/dist/theme/overrides/muiSelect.js.map +1 -1
- package/dist/theme/overrides/muiSvgIcon.d.ts.map +1 -1
- package/dist/theme/overrides/muiSvgIcon.js.map +1 -1
- package/dist/theme/overrides/muiTextField.js.map +1 -1
- package/dist/theme/overrides/muiToggleButton.d.ts +2 -2
- package/dist/theme/overrides/muiToggleButton.js.map +1 -1
- package/dist/theme/overrides/muiToggleButtonGroup.d.ts +2 -2
- package/dist/theme/overrides/muiToggleButtonGroup.js.map +1 -1
- package/dist/theme/themes/DefaultDark.js +2 -2
- package/dist/theme/themes/DefaultDark.js.map +1 -1
- package/dist/theme/themes/DefaultLight.js +2 -2
- package/dist/theme/themes/DefaultLight.js.map +1 -1
- package/dist/theme/themes/EveryskDark.js +2 -2
- package/dist/theme/themes/EveryskDark.js.map +1 -1
- package/dist/theme/themes/EveryskLight.js +2 -2
- package/dist/theme/themes/EveryskLight.js.map +1 -1
- package/dist/theme/themes/MidnightEmber.js +2 -2
- package/dist/theme/themes/MidnightEmber.js.map +1 -1
- package/dist/types/anyRecord.d.ts.map +1 -1
- package/dist/types/datastore.d.ts +35 -5
- package/dist/types/datastore.d.ts.map +1 -1
- package/dist/types/datastoreDataFormat.d.ts +13 -0
- package/dist/types/datastoreDataFormat.d.ts.map +1 -0
- package/dist/types/entityQuery.d.ts +86 -16
- package/dist/types/entityQuery.d.ts.map +1 -1
- package/dist/types/file.d.ts +7 -3
- package/dist/types/file.d.ts.map +1 -1
- package/dist/types/portfolio.d.ts +1 -3
- package/dist/types/portfolio.d.ts.map +1 -1
- package/dist/types/profile.d.ts +0 -10
- package/dist/types/profile.d.ts.map +1 -1
- package/dist/types/workflow.d.ts +35 -6
- package/dist/types/workflow.d.ts.map +1 -1
- package/dist/types/workspace.d.ts +1 -2
- package/dist/types/workspace.d.ts.map +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/workflow/index.d.ts +2 -0
- package/dist/workflow/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/EveryskApp.tsx +53 -2
- package/src/agGrid/handleRowsScrollEnd.ts +71 -0
- package/src/agGrid/index.ts +5 -1
- package/src/api/datastore.ts +79 -107
- package/src/api/entityQuery.ts +86 -17
- package/src/api/file.ts +110 -103
- package/src/api/portfolio.ts +82 -125
- package/src/api/profile.ts +25 -18
- package/src/api/request.ts +168 -0
- package/src/api/websocketsConfig.ts +11 -19
- package/src/api/workflow.ts +232 -334
- package/src/api/workspace.ts +43 -43
- package/src/components/ui/Footer/index.tsx +8 -7
- package/src/components/ui/GlobalLoading/index.tsx +13 -3
- package/src/components/ui/PageContainer/index.tsx +9 -2
- package/src/components/ui/Toolbar/index.tsx +105 -30
- package/src/contexts/appAlertContext/provider.tsx +1 -1
- package/src/contexts/appAlertContext/types.ts +3 -3
- package/src/contexts/appConfigContext/index.tsx +1 -1
- package/src/contexts/appConfigContext/provider.tsx +1 -5
- package/src/contexts/webSocketContext/handler.ts +8 -2
- package/src/contexts/webSocketContext/hooks/useWebSocket/index.ts +1 -1
- package/src/contexts/webSocketContext/provider.tsx +64 -14
- package/src/contexts/webSocketContext/types.ts +7 -6
- package/src/file/index.ts +2 -0
- package/src/hooks/datastore/useDatastoreMutations.ts +19 -60
- package/src/hooks/datastore/useFetchDatastore.ts +45 -73
- package/src/hooks/datastore/useFetchDatastores.ts +106 -131
- package/src/hooks/file/fileData.ts +19 -0
- package/src/hooks/file/useFetchFile.ts +41 -76
- package/src/hooks/file/useFetchFiles.ts +92 -87
- package/src/hooks/file/useFileMutations.ts +23 -73
- package/src/hooks/portfolio/useFetchPortfolio.ts +26 -78
- package/src/hooks/portfolio/useFetchPortfolios.ts +50 -93
- package/src/hooks/portfolio/usePortfolioMutations.ts +22 -72
- package/src/hooks/profile/useFetchProfile.ts +24 -65
- package/src/hooks/useAxios.ts +5 -5
- package/src/hooks/useEntityInfiniteQuery.ts +193 -0
- package/src/hooks/useEntityMutation.ts +70 -0
- package/src/hooks/useEntityQuery.ts +117 -0
- package/src/hooks/workflow/useFetchWorkerExecution.ts +27 -56
- package/src/hooks/workflow/useFetchWorkerExecutions.ts +54 -79
- package/src/hooks/workflow/useFetchWorkflow.ts +24 -58
- package/src/hooks/workflow/useFetchWorkflowExecution.ts +27 -57
- package/src/hooks/workflow/useFetchWorkflowExecutions.ts +64 -73
- package/src/hooks/workflow/useFetchWorkflows.ts +48 -64
- package/src/hooks/workflow/useRunWorkflow.ts +82 -36
- package/src/hooks/workflow/useTriggerWorkflow.ts +36 -0
- package/src/hooks/workspace/useFetchWorkspace.ts +25 -58
- package/src/hooks/workspace/useFetchWorkspaces.ts +38 -69
- package/src/index.ts +34 -19
- package/src/lib/abort.ts +131 -0
- package/src/lib/datastoreTable.ts +127 -74
- package/src/lib/file.ts +67 -0
- package/src/lib/queryClient.ts +11 -13
- package/src/lib/workflowRun.ts +329 -0
- package/src/socket/index.ts +1 -3
- package/src/test/mocks/index.ts +1 -5
- package/src/test/renderWithProviders.tsx +8 -3
- package/src/test/setup.ts +16 -16
- package/src/theme/index.ts +1 -1
- package/src/theme/overrides/index.ts +5 -3
- package/src/theme/overrides/muiButton.ts +3 -3
- package/src/theme/overrides/muiCssBaseline.ts +11 -12
- package/src/theme/overrides/muiDatePicker.ts +2 -2
- package/src/theme/overrides/muiFormControl.ts +2 -2
- package/src/theme/overrides/muiIconButton.ts +3 -3
- package/src/theme/overrides/muiSelect.ts +2 -2
- package/src/theme/overrides/muiSvgIcon.ts +2 -2
- package/src/theme/overrides/muiTextField.ts +1 -1
- package/src/theme/overrides/muiToggleButton.ts +4 -4
- package/src/theme/overrides/muiToggleButtonGroup.ts +4 -4
- package/src/theme/themes/DefaultDark.ts +2 -2
- package/src/theme/themes/DefaultLight.ts +2 -2
- package/src/theme/themes/EveryskDark.ts +2 -2
- package/src/theme/themes/EveryskLight.ts +2 -2
- package/src/theme/themes/MidnightEmber.ts +15 -15
- package/src/types/anyRecord.ts +2 -2
- package/src/types/datastore.ts +56 -22
- package/src/types/datastoreDataFormat.ts +12 -0
- package/src/types/entityQuery.ts +122 -38
- package/src/types/file.ts +8 -6
- package/src/types/portfolio.ts +70 -74
- package/src/types/profile.ts +0 -11
- package/src/types/workflow.ts +38 -9
- package/src/types/workspace.ts +2 -4
- package/src/ui/index.ts +1 -1
- package/src/workflow/index.ts +5 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createTheme, type Theme } from "@mui/material/styles";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { componentOverrides } from "@/theme/overrides";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Everysk Dark — the theme every Everysk app runs with.
|
|
@@ -58,5 +58,5 @@ export const EveryskDarkTheme: Theme = createTheme({
|
|
|
58
58
|
shape: {
|
|
59
59
|
borderRadius: 8,
|
|
60
60
|
},
|
|
61
|
-
components,
|
|
61
|
+
components: componentOverrides,
|
|
62
62
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createTheme, type Theme } from "@mui/material/styles";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { componentOverrides } from "@/theme/overrides";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Everysk Light — the light twin of {@link EveryskDarkTheme}.
|
|
@@ -64,5 +64,5 @@ export const EveryskLightTheme: Theme = createTheme({
|
|
|
64
64
|
shape: {
|
|
65
65
|
borderRadius: 8,
|
|
66
66
|
},
|
|
67
|
-
components,
|
|
67
|
+
components: componentOverrides,
|
|
68
68
|
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { createTheme, type Theme } from "@mui/material/styles";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { componentOverrides } from "@/theme/overrides";
|
|
4
4
|
|
|
5
5
|
export const MidnightEmberTheme: Theme = createTheme({
|
|
6
6
|
palette: {
|
|
7
|
-
mode:
|
|
7
|
+
mode: "dark",
|
|
8
8
|
primary: {
|
|
9
|
-
main:
|
|
10
|
-
dark:
|
|
11
|
-
light:
|
|
12
|
-
contrastText:
|
|
9
|
+
main: "#F97316",
|
|
10
|
+
dark: "#EA580C",
|
|
11
|
+
light: "#FDBA74",
|
|
12
|
+
contrastText: "#020617",
|
|
13
13
|
},
|
|
14
14
|
secondary: {
|
|
15
|
-
main:
|
|
16
|
-
dark:
|
|
17
|
-
light:
|
|
18
|
-
contrastText:
|
|
15
|
+
main: "#94A3B8",
|
|
16
|
+
dark: "#64748B",
|
|
17
|
+
light: "#CBD5F5",
|
|
18
|
+
contrastText: "#020617",
|
|
19
19
|
},
|
|
20
20
|
background: {
|
|
21
|
-
default:
|
|
22
|
-
paper:
|
|
21
|
+
default: "#020617",
|
|
22
|
+
paper: "#0B1120",
|
|
23
23
|
},
|
|
24
24
|
text: {
|
|
25
|
-
primary:
|
|
25
|
+
primary: "#F9FAFB",
|
|
26
26
|
},
|
|
27
|
-
divider:
|
|
27
|
+
divider: "rgba(148, 163, 184, 0.25)",
|
|
28
28
|
},
|
|
29
|
-
components,
|
|
29
|
+
components: componentOverrides,
|
|
30
30
|
});
|
package/src/types/anyRecord.ts
CHANGED
package/src/types/datastore.ts
CHANGED
|
@@ -1,33 +1,67 @@
|
|
|
1
1
|
import type { AnyRecord } from "./anyRecord";
|
|
2
|
-
import type {
|
|
2
|
+
import type { EntityListResponse } from "./entityQuery";
|
|
3
|
+
import type { DatastoreDataFormat } from "./datastoreDataFormat";
|
|
3
4
|
|
|
4
5
|
export type DatastoreRow = string | number | null;
|
|
6
|
+
|
|
7
|
+
/** A tabular datastore's content: a matrix whose first row names the columns. */
|
|
5
8
|
export type DatastoreData = DatastoreRow[][];
|
|
6
9
|
|
|
7
10
|
export type Datastore = {
|
|
8
|
-
updated?: number
|
|
9
|
-
created?: number
|
|
10
|
-
|
|
11
|
-
id: string
|
|
12
|
-
name: string
|
|
13
|
-
date?: string
|
|
14
|
-
version?: string
|
|
15
|
-
description?: string
|
|
16
|
-
|
|
17
|
-
tags?: string[]
|
|
18
|
-
link_uid?: string
|
|
19
|
-
workspace: string
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
updated?: number;
|
|
12
|
+
created?: number;
|
|
13
|
+
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
date?: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
|
|
20
|
+
tags?: string[];
|
|
21
|
+
link_uid?: string;
|
|
22
|
+
workspace: string;
|
|
23
|
+
/**
|
|
24
|
+
* A matrix for a tabular datastore; an object or an array of objects for a JSON one. The API
|
|
25
|
+
* does not say which, so the shape is the only signal: an array whose every element is an
|
|
26
|
+
* array is a table. The API has returned `[{ … }]` for a JSON one, an array without being a
|
|
27
|
+
* table.
|
|
28
|
+
*/
|
|
29
|
+
data: DatastoreData | AnyRecord | AnyRecord[];
|
|
30
|
+
date_time: string;
|
|
31
|
+
level?: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** A tabular datastore as the hooks return it: the matrix converted to row objects. */
|
|
35
|
+
export type TableDatastore = Omit<Datastore, "data"> & {
|
|
36
|
+
format: "table";
|
|
26
37
|
data: AnyRecord[];
|
|
38
|
+
/**
|
|
39
|
+
* The column names in the datastore's own order, from the header row the conversion to
|
|
40
|
+
* objects drops. Saving back needs it — `toDatastoreMatrix(datastore)` uses it — rather
|
|
41
|
+
* than rebuilding the order from object keys and leaving out the `datastoreId` the SDK adds.
|
|
42
|
+
* Empty when the read projects `data` away.
|
|
43
|
+
*/
|
|
44
|
+
fields: string[];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** A JSON datastore as the hooks return it: its object or array of objects, untouched. */
|
|
48
|
+
export type JsonDatastore = Omit<Datastore, "data"> & {
|
|
49
|
+
format: "json";
|
|
50
|
+
data: AnyRecord | AnyRecord[];
|
|
27
51
|
};
|
|
28
52
|
|
|
29
|
-
|
|
53
|
+
/**
|
|
54
|
+
* A datastore as the hooks return it: its `data` read and classified by `parseDatastore`. Narrow
|
|
55
|
+
* on `format` (or with `isTableDatastore`) before reading `data` as rows: a list can mix both
|
|
56
|
+
* kinds. `F` is the `dataFormat` the hook read with. It was `DatastoreWithRows`, a name from
|
|
57
|
+
* before JSON datastores, which carry no rows.
|
|
58
|
+
*/
|
|
59
|
+
export type ParsedDatastore<F extends DatastoreDataFormat = "object"> =
|
|
60
|
+
| (F extends "matrix"
|
|
61
|
+
? // A tabular datastore read with `dataFormat: "matrix"`: its matrix unconverted, header row included,
|
|
62
|
+
// so it can be written back unchanged. Written in place: nothing refers to it by name.
|
|
63
|
+
Omit<TableDatastore, "data"> & { data: DatastoreData }
|
|
64
|
+
: TableDatastore)
|
|
65
|
+
| JsonDatastore;
|
|
30
66
|
|
|
31
67
|
export type DatastoreListResponse = EntityListResponse<"datastores", Datastore>;
|
|
32
|
-
|
|
33
|
-
export type DeleteDatastoreResponse = DeleteEntityResponse<"datastores">;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the datastore hooks hand over a **tabular** datastore's `data`; a JSON datastore's is never
|
|
3
|
+
* converted. `"object"` (the default) is each row as an object — a list of them, not one
|
|
4
|
+
* object — which lets an app patch a row as `{ ...row, ...patch }`. `"matrix"` leaves the table's
|
|
5
|
+
* matrix unconverted, header row included. A value rather than a conversion function, so it can
|
|
6
|
+
* be part of the cache key.
|
|
7
|
+
*
|
|
8
|
+
* Internal: no barrel re-exports this file. An app never writes the name — `dataFormat` is
|
|
9
|
+
* inferred from the value it passes — so it stays out of the public types, and exists only so
|
|
10
|
+
* the SDK does not repeat the union in every generic.
|
|
11
|
+
*/
|
|
12
|
+
export type DatastoreDataFormat = "object" | "matrix";
|
package/src/types/entityQuery.ts
CHANGED
|
@@ -1,64 +1,148 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
InfiniteData,
|
|
3
|
+
QueryKey,
|
|
4
|
+
UseInfiniteQueryOptions,
|
|
5
|
+
UseQueryOptions,
|
|
6
|
+
} from "@tanstack/react-query";
|
|
2
7
|
import type { AnyRecord } from "./anyRecord";
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
/** `IN` and `NOT_IN` take a list as the value: `{ field: "tags", op: "IN", value: ["a", "b"] }`. */
|
|
10
|
+
export type FilterOperator = "=" | ">" | ">=" | "<" | "<=" | "!=" | "IN" | "NOT_IN";
|
|
5
11
|
|
|
6
12
|
export type FilterExpression =
|
|
7
|
-
|
|
8
|
-
| [field: string, op: FilterOperator, value: unknown];
|
|
13
|
+
[field: string, value: unknown] | [field: string, op: FilterOperator, value: unknown];
|
|
9
14
|
|
|
10
15
|
export type FilterClause = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
16
|
+
field: string;
|
|
17
|
+
value: unknown;
|
|
18
|
+
op?: FilterOperator;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The fields a read returns. `"field"` or `["a", "b"]` returns only those (every other field
|
|
23
|
+
* comes back null); `"-field"` or `["-a", "-b"]` returns everything but those.
|
|
24
|
+
*
|
|
25
|
+
* The backend rejects, as a 500, a projection that mixes the two, or that names a field the
|
|
26
|
+
* entity does not have. That is also why `"a,b"` fails: it is read as one field named `a,b`.
|
|
27
|
+
* Source: everysk-lib 1.13.4, `_normalize_projection`, which the API's JSON query goes through.
|
|
28
|
+
*/
|
|
29
|
+
export type Projection = string | string[];
|
|
15
30
|
|
|
16
31
|
export type BaseQueryParams = {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
32
|
+
order: string[];
|
|
33
|
+
projection?: Projection;
|
|
34
|
+
};
|
|
20
35
|
|
|
21
36
|
export type EntityQueryParams = BaseQueryParams & {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
37
|
+
filters: FilterClause[];
|
|
38
|
+
pageSize?: number;
|
|
39
|
+
pageToken?: string;
|
|
40
|
+
};
|
|
26
41
|
|
|
27
42
|
export type QueryObject = BaseQueryParams & {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
43
|
+
filters: FilterExpression[];
|
|
44
|
+
page_size?: number;
|
|
45
|
+
page_token?: string;
|
|
31
46
|
};
|
|
32
47
|
|
|
33
|
-
|
|
48
|
+
/**
|
|
49
|
+
* TanStack options a single-entity hook passes through, merged over its defaults. `select` is
|
|
50
|
+
* not one of them: it is a prop of the hook, which is what types `data` as its result.
|
|
51
|
+
*/
|
|
52
|
+
export type EntityQueryOptions<TQueryFnData, TData = TQueryFnData> = Omit<
|
|
53
|
+
UseQueryOptions<TQueryFnData, Error, TData>,
|
|
54
|
+
"queryKey" | "queryFn" | "select"
|
|
55
|
+
>;
|
|
56
|
+
|
|
57
|
+
/** The props every single-entity hook shares. */
|
|
58
|
+
export type FetchEntityProps<TEntity, TSelected> = {
|
|
59
|
+
/** Shapes the entity for this caller: `data` is what it returns. Keep its reference stable. */
|
|
60
|
+
select?: (entity: TEntity) => TSelected;
|
|
61
|
+
queryOptions?: EntityQueryOptions<TEntity, TSelected>;
|
|
62
|
+
};
|
|
34
63
|
|
|
35
|
-
export type
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
64
|
+
export type FetchEntityByIdProps<TData = AnyRecord, TSelected = TData> = FetchEntityProps<
|
|
65
|
+
TData,
|
|
66
|
+
TSelected
|
|
67
|
+
> & {
|
|
68
|
+
id: string;
|
|
69
|
+
workspace: string;
|
|
39
70
|
};
|
|
40
71
|
|
|
41
|
-
|
|
72
|
+
/**
|
|
73
|
+
* The JSON query a list hook sends, for the lists that take one (datastores, files, portfolios).
|
|
74
|
+
* The workspace filter is added from the app config. The workflow and workspace lists take only
|
|
75
|
+
* a text search, so they take `search` instead.
|
|
76
|
+
*/
|
|
77
|
+
export type ListQueryProps = {
|
|
42
78
|
filters?: FilterClause[];
|
|
43
79
|
order?: string[];
|
|
44
|
-
projection?:
|
|
45
|
-
queryOptions?: QO;
|
|
80
|
+
projection?: Projection;
|
|
46
81
|
};
|
|
47
82
|
|
|
83
|
+
/** The cursor a list endpoint pages with. `null` asks for the first page. */
|
|
84
|
+
export type PageToken = string | null;
|
|
48
85
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
86
|
+
/** What every page of a list carries beside its items: the cursor to the next page, `null` on the last. */
|
|
87
|
+
export type PagedResponse = {
|
|
88
|
+
next_page_token: PageToken;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* What a list hook keeps in the query cache: the pages as the API returned them (after any
|
|
93
|
+
* per-page conversion), not the flat list `query.data` shows. Type `setQueryData` with it.
|
|
94
|
+
*
|
|
95
|
+
* ```ts
|
|
96
|
+
* queryClient.setQueryData<DatastoresCache>(queryKey, (cache) => …);
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export type ListCache<TPage> = InfiniteData<TPage, PageToken>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* TanStack options a list hook passes through. `select` is not one of them: it is a prop of
|
|
103
|
+
* the hook, applied after the pages are merged. Spread in from here it used to replace the
|
|
104
|
+
* merging itself, handing the caller `{ pages, pageParams }` under a type that said otherwise.
|
|
105
|
+
*/
|
|
106
|
+
export type EntityInfiniteQueryOptions<TPage, TData> = Omit<
|
|
107
|
+
UseInfiniteQueryOptions<TPage, Error, TData, QueryKey, PageToken>,
|
|
108
|
+
"queryKey" | "queryFn" | "initialPageParam" | "getNextPageParam" | "select"
|
|
109
|
+
>;
|
|
52
110
|
|
|
53
|
-
|
|
111
|
+
/** The props every list hook shares. */
|
|
112
|
+
export type FetchEntitiesProps<TItem, TData, TPage> = {
|
|
113
|
+
/** Items per request. */
|
|
114
|
+
pageSize?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Shapes the merged list for this caller: `query.data` is what it returns. It runs on the
|
|
117
|
+
* observer, not in the cache, so writing to the cache (`setQueryData`) still works on the
|
|
118
|
+
* pages. Keep it stable (module scope or `useCallback`): TanStack reruns it whenever its
|
|
119
|
+
* reference changes.
|
|
120
|
+
*/
|
|
121
|
+
select?: (items: TItem[]) => TData;
|
|
122
|
+
/**
|
|
123
|
+
* Follows the cursor to the end before reporting success, for a view that consolidates
|
|
124
|
+
* the whole set — where a partial read is a wrong answer rather than a shorter one. Raise
|
|
125
|
+
* `pageSize` with it: the read fails rather than stop short after a fixed number of pages.
|
|
126
|
+
*/
|
|
127
|
+
fetchAllPages?: boolean;
|
|
128
|
+
queryOptions?: EntityInfiniteQueryOptions<TPage, TData>;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** A get by id: the entity under its singular key, with no cursor. */
|
|
132
|
+
export type EntitySingleResponse<K extends string, T> = Record<K, T>;
|
|
54
133
|
|
|
55
|
-
export type EntityListResponse<K extends string, T> =
|
|
134
|
+
export type EntityListResponse<K extends string, T> = PagedResponse & Record<K, T[]>;
|
|
56
135
|
|
|
57
|
-
export type
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
136
|
+
export type DeletedEntity = {
|
|
137
|
+
id: string;
|
|
138
|
+
name: string;
|
|
139
|
+
deleted: boolean;
|
|
140
|
+
};
|
|
62
141
|
|
|
63
|
-
|
|
64
|
-
|
|
142
|
+
/**
|
|
143
|
+
* What a delete by id answers: one record under the entity's singular key, such as
|
|
144
|
+
* `{ datastore: { id, name, deleted } }`. Only the batch form (`?ids=a,b`), which the SDK does
|
|
145
|
+
* not use, answers a list under the plural key. This type used to describe that list, and the
|
|
146
|
+
* datastore and file deletes read `body.datastores` and `body.files`, which were undefined.
|
|
147
|
+
*/
|
|
148
|
+
export type DeleteEntityResponse<K extends string, T = DeletedEntity> = Record<K, T>;
|
package/src/types/file.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityListResponse } from "./entityQuery";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A file stored in a workspace.
|
|
@@ -21,12 +21,14 @@ export type EveryskFile = {
|
|
|
21
21
|
updated?: number;
|
|
22
22
|
version: string;
|
|
23
23
|
link_uid: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* The content as raw base64, without a `data:<type>;base64,` prefix: `fileToBase64` turns a
|
|
26
|
+
* `File` into it, and `createFile` / `updateFile` refuse a data URL. `null` when the read
|
|
27
|
+
* left it out, as `useFetchFile` and `useFetchFiles` do unless `withData` asks for it; show
|
|
28
|
+
* or download a file through its `url` instead.
|
|
29
|
+
*/
|
|
24
30
|
data: string | null;
|
|
25
31
|
tags?: string[];
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type FileSingleResponse = EntitySingleResponse<"file", EveryskFile>;
|
|
32
|
+
};
|
|
29
33
|
|
|
30
34
|
export type FileListResponse = EntityListResponse<"files", EveryskFile>;
|
|
31
|
-
|
|
32
|
-
export type DeleteFileResponse = DeleteEntityResponse<"files">;
|
package/src/types/portfolio.ts
CHANGED
|
@@ -1,81 +1,77 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityListResponse } from "./entityQuery";
|
|
2
2
|
|
|
3
3
|
export type Security = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
4
|
+
instrument_type: string | null;
|
|
5
|
+
coupon: unknown | null;
|
|
6
|
+
issue_price: unknown | null;
|
|
7
|
+
display: string | null;
|
|
8
|
+
asset_subclass: string | null;
|
|
9
|
+
market_value: number | null;
|
|
10
|
+
rate: unknown | null;
|
|
11
|
+
book: unknown | null;
|
|
12
|
+
symbol: string | null;
|
|
13
|
+
percent_index: unknown | null;
|
|
14
|
+
settlement: unknown | null;
|
|
15
|
+
issuer_type: unknown | null;
|
|
16
|
+
label: string | null;
|
|
17
|
+
accounting: unknown | null;
|
|
18
|
+
market_price: number | null;
|
|
19
|
+
hash: string | null;
|
|
20
|
+
extra_data: unknown | null;
|
|
21
|
+
multiplier: number | null;
|
|
22
|
+
option_type: unknown | null;
|
|
23
|
+
error_type: string | null;
|
|
24
|
+
exchange: string | null;
|
|
25
|
+
premium: unknown | null;
|
|
26
|
+
fx_rate: number | null;
|
|
27
|
+
ticker: string | null;
|
|
28
|
+
status: string | null;
|
|
29
|
+
currency: string | null;
|
|
30
|
+
operation: unknown | null;
|
|
31
|
+
comparable: string | null;
|
|
32
|
+
market_value_in_base: number | null;
|
|
33
|
+
issuer: unknown | null;
|
|
34
|
+
unrealized_pl_in_base: number | null;
|
|
35
|
+
unrealized_pl: number | null;
|
|
36
|
+
instrument_class: string | null;
|
|
37
|
+
issue_date: unknown | null;
|
|
38
|
+
series: unknown | null;
|
|
39
|
+
quantity: number | null;
|
|
40
|
+
id: string | null;
|
|
41
|
+
cost_price: number | null;
|
|
42
|
+
isin: string | null;
|
|
43
|
+
strike: unknown | null;
|
|
44
|
+
asset_class: string | null;
|
|
45
|
+
look_through_reference: unknown | null;
|
|
46
|
+
return_date: unknown | null;
|
|
47
|
+
underlying: unknown | null;
|
|
48
|
+
maturity_date: unknown | null;
|
|
49
|
+
previous_quantity: number | null;
|
|
50
|
+
warranty: unknown | null;
|
|
51
|
+
name: string | null;
|
|
52
|
+
error_message: string | null;
|
|
53
|
+
indexer: unknown | null;
|
|
54
|
+
trader: unknown | null;
|
|
55
|
+
trade_id: unknown | null;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
export type Portfolio = {
|
|
59
|
-
id:string;
|
|
60
|
-
name?:string;
|
|
61
|
-
description?:string;
|
|
62
|
-
base_currency:string;
|
|
63
|
-
securities:Security[];
|
|
64
|
-
nlv?:number;
|
|
65
|
-
date:string;
|
|
66
|
-
date_time?:string;
|
|
67
|
-
tags?:string[];
|
|
68
|
-
workspace:string;
|
|
69
|
-
created?:number;
|
|
70
|
-
updated?:number;
|
|
71
|
-
version?:string;
|
|
72
|
-
link_uid?:string|null;
|
|
73
|
-
level?:string|null;
|
|
74
|
-
check_securities?:boolean;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export type PortfolioSingleResponse = EntitySingleResponse<"portfolio", Portfolio>;
|
|
59
|
+
id: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
base_currency: string;
|
|
63
|
+
securities: Security[];
|
|
64
|
+
nlv?: number;
|
|
65
|
+
date: string;
|
|
66
|
+
date_time?: string;
|
|
67
|
+
tags?: string[];
|
|
68
|
+
workspace: string;
|
|
69
|
+
created?: number;
|
|
70
|
+
updated?: number;
|
|
71
|
+
version?: string;
|
|
72
|
+
link_uid?: string | null;
|
|
73
|
+
level?: string | null;
|
|
74
|
+
check_securities?: boolean;
|
|
75
|
+
};
|
|
78
76
|
|
|
79
77
|
export type PortfolioListResponse = EntityListResponse<"portfolios", Portfolio>;
|
|
80
|
-
|
|
81
|
-
export type DeletePortfolioResponse = DeleteEntityResponse<"portfolios">;
|
package/src/types/profile.ts
CHANGED
|
@@ -26,14 +26,3 @@ export interface Profile {
|
|
|
26
26
|
auto_refresh: unknown;
|
|
27
27
|
[key: string]: unknown;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* ProfileResponse — the endpoint's envelope.
|
|
32
|
-
*
|
|
33
|
-
* It does not follow `EntitySingleResponse`: `/api/profile` is not a queryable entity, so the
|
|
34
|
-
* payload carries a `status` and no `next_page_token`.
|
|
35
|
-
*/
|
|
36
|
-
export type ProfileResponse = {
|
|
37
|
-
status: string;
|
|
38
|
-
profile: Profile;
|
|
39
|
-
};
|
package/src/types/workflow.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityListResponse } from "./entityQuery";
|
|
2
2
|
|
|
3
3
|
export interface Workflow {
|
|
4
4
|
id: string;
|
|
@@ -60,17 +60,46 @@ export type WorkerExecution = {
|
|
|
60
60
|
version: string;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
export type WorkflowSingleResponse = EntitySingleResponse<"workflow", Workflow>;
|
|
65
|
-
|
|
66
63
|
export type WorkflowListResponse = EntityListResponse<"workflows", Workflow>;
|
|
67
64
|
|
|
68
|
-
export type
|
|
65
|
+
export type WorkflowExecutionListResponse = EntityListResponse<
|
|
66
|
+
"workflow_executions",
|
|
67
|
+
WorkflowExecution
|
|
68
|
+
>;
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
/** What `useRunWorkflow` resolves with: the ended run and its output. */
|
|
71
|
+
export type WorkflowResult = {
|
|
72
|
+
/** The execution, ended `SUCCEEDED`. */
|
|
73
|
+
execution: WorkflowExecution;
|
|
74
|
+
/** The Ender's worker execution, or `null` when the run did not reference one. */
|
|
75
|
+
workerExecution: WorkerExecution | null;
|
|
76
|
+
/** What the Ender produced (`workerExecution.result`), or `null`. */
|
|
77
|
+
result: Record<string, unknown> | null;
|
|
78
|
+
};
|
|
71
79
|
|
|
72
|
-
|
|
80
|
+
/** The fields every group of `WorkerExecutionListResponse` carries. */
|
|
81
|
+
type WorkerExecutionGroupBase = {
|
|
82
|
+
worker_id: string;
|
|
83
|
+
worker_name: string;
|
|
84
|
+
};
|
|
73
85
|
|
|
74
|
-
|
|
86
|
+
/**
|
|
87
|
+
* One worker's runs within a workflow execution, as the list endpoint groups them: a single
|
|
88
|
+
* `execution`, or, for a worker that ran in parallel, every run under `executions`, ordered by
|
|
89
|
+
* parallel index. Narrow on `is_parallel_execution`.
|
|
90
|
+
*/
|
|
91
|
+
export type WorkerExecutionGroup = WorkerExecutionGroupBase &
|
|
92
|
+
(
|
|
93
|
+
| { is_parallel_execution: false; execution: WorkerExecution }
|
|
94
|
+
| { is_parallel_execution: true; executions: WorkerExecution[] }
|
|
95
|
+
);
|
|
75
96
|
|
|
76
|
-
|
|
97
|
+
/**
|
|
98
|
+
* What `GET /workflows/:id/worker_executions` returns for one workflow execution: every worker
|
|
99
|
+
* at once, grouped. Not paginated — there is no `next_page_token` — and `parallel_index_max` is
|
|
100
|
+
* the highest parallel index among them, `-1` when no worker ran in parallel.
|
|
101
|
+
*/
|
|
102
|
+
export type WorkerExecutionListResponse = {
|
|
103
|
+
worker_executions: WorkerExecutionGroup[];
|
|
104
|
+
parallel_index_max: number;
|
|
105
|
+
};
|
package/src/types/workspace.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EntityListResponse
|
|
1
|
+
import type { EntityListResponse } from "./entityQuery";
|
|
2
2
|
|
|
3
3
|
export interface Workspace {
|
|
4
4
|
name: string;
|
|
@@ -10,6 +10,4 @@ export interface Workspace {
|
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
export type WorkspaceListResponse = EntityListResponse<"workspaces", Workspace>;
|
|
13
|
+
export type WorkspaceListResponse = EntityListResponse<"workspaces", Workspace>;
|
package/src/ui/index.ts
CHANGED
|
@@ -11,4 +11,4 @@ export { EveryskIcon } from "@/components/ui/EveryskIcon";
|
|
|
11
11
|
export { Footer } from "@/components/ui/Footer";
|
|
12
12
|
export { GlobalLoading } from "@/components/ui/GlobalLoading";
|
|
13
13
|
export { PageContainer } from "@/components/ui/PageContainer";
|
|
14
|
-
export { Toolbar } from "@/components/ui/Toolbar";
|
|
14
|
+
export { Toolbar, type ToolbarContent, type ToolbarProps } from "@/components/ui/Toolbar";
|