@loopstack/loopstack-studio 0.34.0 → 0.35.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/dist/app/EnvironmentEmbedRoot.js +18 -24
- package/dist/components/layout/StudioSidebar.js +34 -34
- package/dist/events/api-client-events.js +13 -1
- package/dist/events/index.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBarBase.js +1 -1
- package/dist/features/code-explorer/index.js +0 -3
- package/dist/features/dashboard/AppLauncher.js +1 -1
- package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
- package/dist/features/documents/components/DocumentList.js +1 -1
- package/dist/features/documents/document-details/DocumentDetails.js +0 -5
- package/dist/features/documents/renderers/DocumentFormRenderer.js +13 -12
- package/dist/features/documents/renderers/LinkMessageRenderer.js +2 -1
- package/dist/features/documents/renderers/useDocumentTransition.js +3 -2
- package/dist/features/feature-registry/FeatureRegistryProvider.js +2 -1
- package/dist/features/file-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/file-explorer/components/FileTree.js +1 -1
- package/dist/features/file-explorer/hooks/useFileExplorer.js +36 -31
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +94 -92
- package/dist/features/git/components/WorkbenchGitPanel.js +6 -9
- package/dist/features/git/hooks/useGit.js +55 -57
- package/dist/features/health/LocalHealthCheck.js +46 -47
- package/dist/features/oauth/OAuthPromptRenderer.js +6 -5
- package/dist/features/runs/Runs.js +3 -2
- package/dist/features/secrets/renderers/SecretInputRenderer.js +3 -2
- package/dist/features/workbench/WorkflowItem.js +5 -8
- package/dist/features/workbench/components/NewRunDialog.js +172 -170
- package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
- package/dist/features/workbench/components/WorkflowForms.js +1 -1
- package/dist/features/workbench/components/WorkflowHistoryItem.js +2 -1
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +8 -14
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +65 -132
- package/dist/features/workbench/hooks/useWorkflowData.js +8 -6
- package/dist/features/workspaces/Workspaces.js +4 -2
- package/dist/features/workspaces/components/CreateWorkspace.js +7 -5
- package/dist/features/workspaces/components/ExecutionTimeline.js +69 -65
- package/dist/features/workspaces/components/WorkflowRunForm.js +6 -4
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/useAuth.js +14 -53
- package/dist/hooks/useConfig.js +13 -37
- package/dist/hooks/useDocuments.js +5 -30
- package/dist/hooks/useEnvironments.js +34 -24
- package/dist/hooks/useProcessor.js +2 -31
- package/dist/hooks/useSecrets.js +78 -24
- package/dist/hooks/useWorkflows.js +43 -172
- package/dist/hooks/useWorkspaces.js +24 -130
- package/dist/index.d.ts +130 -488
- package/dist/index.js +10 -12
- package/dist/packages/client/dist/client.js +35 -0
- package/dist/packages/client/dist/http.js +47 -0
- package/dist/packages/client/dist/index.js +15 -0
- package/dist/packages/client/dist/queries/query-keys.js +94 -0
- package/dist/packages/client/dist/queries/query-options.js +97 -0
- package/dist/packages/client/dist/resources/auth.js +10 -0
- package/dist/packages/client/dist/resources/config.js +11 -0
- package/dist/packages/client/dist/resources/dashboard.js +4 -0
- package/dist/packages/client/dist/resources/documents.js +7 -0
- package/dist/packages/client/dist/resources/processor.js +7 -0
- package/dist/packages/client/dist/resources/workflows.js +13 -0
- package/dist/packages/client/dist/resources/workspaces.js +12 -0
- package/dist/packages/client/dist/stream/invalidations.js +20 -0
- package/dist/packages/client/dist/stream/llm-reducer.js +65 -0
- package/dist/packages/client/dist/stream/sse-parser.js +40 -0
- package/dist/packages/client/dist/stream/stream.js +147 -0
- package/dist/packages/contracts/dist/events/client-message-base.schema.js +6 -0
- package/dist/packages/contracts/dist/events/client-message.schema.js +24 -0
- package/dist/packages/contracts/dist/events/index.js +6 -0
- package/dist/packages/contracts/dist/events/llm-events.schema.js +44 -0
- package/dist/packages/contracts/dist/events/stream-events.schema.js +4 -0
- package/dist/packages/contracts/dist/events/workflow-events.schema.js +20 -0
- package/dist/packages/contracts/dist/events/workspace-events.schema.js +5 -0
- package/dist/packages/contracts/dist/types/types/ui-message.type.js +39 -0
- package/dist/packages/react/dist/hooks/mutations.js +175 -0
- package/dist/packages/react/dist/hooks/queries.js +139 -0
- package/dist/packages/react/dist/hooks/use-live-invalidation.js +39 -0
- package/dist/packages/react/dist/hooks/use-llm-stream.js +18 -0
- package/dist/packages/react/dist/index.js +5 -0
- package/dist/packages/react/dist/provider.js +15 -0
- package/dist/pages/DashboardPage.js +2 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -1
- package/dist/pages/DebugWorkflowsPage.js +2 -1
- package/dist/pages/EmbedWorkbenchPage.js +5 -4
- package/dist/pages/PreviewWorkbenchPage.js +60 -59
- package/dist/pages/StudioLandingPage.js +1 -1
- package/dist/pages/WorkbenchPage.js +3 -2
- package/dist/pages/WorkflowDebugPage.js +3 -2
- package/dist/pages/WorkspacePage.js +3 -2
- package/dist/pages/WorkspaceRunsPage.js +2 -1
- package/dist/providers/LoopstackClientProvider.js +31 -0
- package/dist/services/createApiClient.js +9 -3
- package/dist/services/index.js +0 -1
- package/dist/services/reporting-fetch.js +13 -0
- package/package.json +4 -3
- package/dist/api/auth.js +0 -10
- package/dist/api/client.js +0 -13
- package/dist/api/config.js +0 -11
- package/dist/api/dashboard.js +0 -4
- package/dist/api/documents.js +0 -7
- package/dist/api/environments.js +0 -8
- package/dist/api/index.js +0 -31
- package/dist/api/processor.js +0 -7
- package/dist/api/secrets.js +0 -16
- package/dist/api/workflows.js +0 -15
- package/dist/api/workspaces.js +0 -12
- package/dist/events/sse-client-events.js +0 -15
- package/dist/features/code-explorer/CodeExplorer.js +0 -6
- package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -6
- package/dist/features/code-explorer/components/FileTabsBar.js +0 -4
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +0 -5
- package/dist/features/file-explorer/api/files.js +0 -12
- package/dist/features/git/api/git.js +0 -9
- package/dist/hooks/query-keys.js +0 -145
- package/dist/hooks/useApi.js +0 -15
- package/dist/hooks/useFiles.js +0 -3
- package/dist/node_modules/lodash/_Symbol.js +0 -7
- package/dist/node_modules/lodash/_baseGetTag.js +0 -13
- package/dist/node_modules/lodash/_baseTrim.js +0 -11
- package/dist/node_modules/lodash/_freeGlobal.js +0 -6
- package/dist/node_modules/lodash/_getRawTag.js +0 -17
- package/dist/node_modules/lodash/_objectToString.js +0 -10
- package/dist/node_modules/lodash/_root.js +0 -8
- package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
- package/dist/node_modules/lodash/debounce.js +0 -53
- package/dist/node_modules/lodash/isObject.js +0 -10
- package/dist/node_modules/lodash/isObjectLike.js +0 -9
- package/dist/node_modules/lodash/isSymbol.js +0 -12
- package/dist/node_modules/lodash/now.js +0 -10
- package/dist/node_modules/lodash/toNumber.js +0 -22
- package/dist/providers/InvalidationEventsProvider.js +0 -43
- package/dist/providers/SseProvider.js +0 -37
- package/dist/services/eventEmitter.js +0 -12
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LoopstackProvider, useLoopstackClient } from "./provider.js";
|
|
2
|
+
import { useAppsConfig, useAvailableEnvironments, useChildWorkflows, useMe, useWorkerHealth, useWorkflow, useWorkflowCheckpoints, useWorkflowConfig, useWorkflowDocuments, useWorkflowList, useWorkflowSource, useWorkflowStatus, useWorkspace, useWorkspaceList } from "./hooks/queries.js";
|
|
3
|
+
import { useBatchDeleteWorkspaces, useCreateWorkflow, useCreateWorkspace, useDeleteWorkflow, useDeleteWorkspace, useHubLogin, useRefreshSession, useRunWorkflow, useSetFavouriteWorkspace, useStartWorkflow, useUpdateWorkflow, useUpdateWorkspace } from "./hooks/mutations.js";
|
|
4
|
+
import { useLiveInvalidation } from "./hooks/use-live-invalidation.js";
|
|
5
|
+
import { useLlmStream } from "./hooks/use-llm-stream.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
var LoopstackContext = createContext(void 0);
|
|
4
|
+
function LoopstackProvider({ client: e, children: a }) {
|
|
5
|
+
return jsx(LoopstackContext.Provider, {
|
|
6
|
+
value: e,
|
|
7
|
+
children: a
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function useLoopstackClient() {
|
|
11
|
+
let e = useContext(LoopstackContext);
|
|
12
|
+
if (!e) throw Error("useLoopstackClient must be used within a <LoopstackProvider>");
|
|
13
|
+
return e;
|
|
14
|
+
}
|
|
15
|
+
export { LoopstackProvider, useLoopstackClient };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useAppsConfig } from "../hooks/
|
|
1
|
+
import { useAppsConfig } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../hooks/useConfig.js";
|
|
2
3
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
3
4
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
4
5
|
import AppLauncher from "../features/dashboard/AppLauncher.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useWorkflowSource } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
1
3
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useWorkflowConfigByName, useWorkflowSource } from "../hooks/useWorkflows.js";
|
|
3
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
4
5
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
5
6
|
import ConfigFlowViewer_default from "../features/debug/components/ConfigFlowViewer.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useAppsConfig } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../hooks/useConfig.js";
|
|
1
3
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useAppsConfig } from "../hooks/useConfig.js";
|
|
3
4
|
import { Badge } from "../components/ui/badge.js";
|
|
4
5
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
5
6
|
import { DataTable } from "../components/data-table/DataTable.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { useWorkflow } from "../hooks/
|
|
2
|
-
import {
|
|
1
|
+
import { useWorkflow, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
3
|
+
import "../packages/contracts/dist/enums/index.js";
|
|
4
|
+
import "../hooks/useWorkflows.js";
|
|
5
|
+
import "../hooks/useWorkspaces.js";
|
|
3
6
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
4
7
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
5
8
|
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
6
9
|
import "../features/feature-registry/index.js";
|
|
7
|
-
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
8
|
-
import "../packages/contracts/dist/enums/index.js";
|
|
9
10
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
10
11
|
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
11
12
|
import "../features/workbench/index.js";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { useWorkflow } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
3
|
+
import "../packages/contracts/dist/enums/index.js";
|
|
4
|
+
import { useFilterWorkflows, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
1
5
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useFilterWorkflows, useWorkflow, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
3
6
|
import { Button } from "../components/ui/button.js";
|
|
4
7
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
8
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
9
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
7
10
|
import WorkflowFlowViewer_default from "../features/debug/components/WorkflowFlowViewer.js";
|
|
8
11
|
import "../features/debug/index.js";
|
|
9
|
-
import { WorkflowState } from "../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
10
|
-
import "../packages/contracts/dist/enums/index.js";
|
|
11
12
|
import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
|
|
12
13
|
import WorkflowHistoryList_default from "../features/workbench/components/WorkflowHistoryList.js";
|
|
13
14
|
import { NewRunDialog } from "../features/workbench/components/NewRunDialog.js";
|
|
@@ -44,16 +45,16 @@ function PreviewWorkbenchPage() {
|
|
|
44
45
|
onNewRunSuccess: a
|
|
45
46
|
}), e[3] = t, e[4] = o), o;
|
|
46
47
|
}
|
|
47
|
-
function PreviewWorkbenchContent(
|
|
48
|
-
let
|
|
49
|
-
|
|
48
|
+
function PreviewWorkbenchContent(n) {
|
|
49
|
+
let i = c(49), { workflowId: m, onNewRunSuccess: h } = n, _ = useRef(null), [y, b] = useState("output"), [x, S] = useState(!1), w = useWorkflow(m), T = useRef(!1), O = useWorkflowConfigByName(w.data?.workflowName), A, j;
|
|
50
|
+
i[0] !== w.data || i[1] !== m ? (A = () => {
|
|
50
51
|
!w.data || T.current || w.data.status === WorkflowState.Completed && window.parent !== window && (T.current = !0, window.parent.postMessage({
|
|
51
52
|
type: EMBED_MESSAGE_TYPE,
|
|
52
53
|
workflowId: m
|
|
53
54
|
}, window.location.origin));
|
|
54
|
-
}, j = [w.data, m],
|
|
55
|
+
}, j = [w.data, m], i[0] = w.data, i[1] = m, i[2] = A, i[3] = j) : (A = i[2], j = i[3]), useEffect(A, j);
|
|
55
56
|
let M, N;
|
|
56
|
-
|
|
57
|
+
i[4] === m ? (M = i[5], N = i[6]) : (M = () => {
|
|
57
58
|
if (window.parent === window || !_.current) return;
|
|
58
59
|
let e = new ResizeObserver(() => {
|
|
59
60
|
if (!_.current) return;
|
|
@@ -65,36 +66,36 @@ function PreviewWorkbenchContent(e) {
|
|
|
65
66
|
}, window.location.origin);
|
|
66
67
|
});
|
|
67
68
|
return e.observe(_.current), () => e.disconnect();
|
|
68
|
-
}, N = [m],
|
|
69
|
+
}, N = [m], i[4] = m, i[5] = M, i[6] = N), useEffect(M, N);
|
|
69
70
|
let P;
|
|
70
|
-
|
|
71
|
+
i[7] === h ? P = i[8] : (P = (e) => {
|
|
71
72
|
S(!1), h(e);
|
|
72
|
-
},
|
|
73
|
+
}, i[7] = h, i[8] = P);
|
|
73
74
|
let F = P, I = _temp, L;
|
|
74
|
-
|
|
75
|
+
i[9] === Symbol.for("react.memo_cache_sentinel") ? (L = {
|
|
75
76
|
enableDebugMode: !1,
|
|
76
77
|
showFullMessageHistory: !1
|
|
77
|
-
},
|
|
78
|
+
}, i[9] = L) : L = i[9];
|
|
78
79
|
let R = L, z;
|
|
79
|
-
|
|
80
|
+
i[10] === Symbol.for("react.memo_cache_sentinel") ? (z = {
|
|
80
81
|
value: "output",
|
|
81
82
|
label: "Output",
|
|
82
83
|
icon: /* @__PURE__ */ jsx(ScrollText, { className: "h-3.5 w-3.5" })
|
|
83
|
-
},
|
|
84
|
+
}, i[10] = z) : z = i[10];
|
|
84
85
|
let B;
|
|
85
|
-
|
|
86
|
+
i[11] === Symbol.for("react.memo_cache_sentinel") ? (B = {
|
|
86
87
|
value: "graph",
|
|
87
88
|
label: "Graph",
|
|
88
89
|
icon: /* @__PURE__ */ jsx(Workflow, { className: "h-3.5 w-3.5" })
|
|
89
|
-
},
|
|
90
|
+
}, i[11] = B) : B = i[11];
|
|
90
91
|
let V;
|
|
91
|
-
|
|
92
|
+
i[12] === Symbol.for("react.memo_cache_sentinel") ? (V = {
|
|
92
93
|
value: "run-log",
|
|
93
94
|
label: "Run Log",
|
|
94
95
|
icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-3.5 w-3.5" })
|
|
95
|
-
},
|
|
96
|
+
}, i[12] = V) : V = i[12];
|
|
96
97
|
let H;
|
|
97
|
-
|
|
98
|
+
i[13] === Symbol.for("react.memo_cache_sentinel") ? (H = [
|
|
98
99
|
z,
|
|
99
100
|
B,
|
|
100
101
|
V,
|
|
@@ -103,33 +104,33 @@ function PreviewWorkbenchContent(e) {
|
|
|
103
104
|
label: "Logs",
|
|
104
105
|
icon: /* @__PURE__ */ jsx(ScrollText, { className: "h-3.5 w-3.5" })
|
|
105
106
|
}
|
|
106
|
-
],
|
|
107
|
+
], i[13] = H) : H = i[13];
|
|
107
108
|
let ce = H, U;
|
|
108
|
-
|
|
109
|
+
i[14] === y ? U = i[15] : (U = /* @__PURE__ */ jsx("div", {
|
|
109
110
|
className: "bg-background flex items-center rounded-md border p-0.5",
|
|
110
111
|
children: ce.map((e) => /* @__PURE__ */ jsxs("button", {
|
|
111
112
|
onClick: () => b(e.value),
|
|
112
113
|
className: `flex items-center gap-1.5 rounded-sm px-2.5 py-1 text-xs font-medium transition-colors ${y === e.value ? "bg-foreground text-background shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
|
|
113
114
|
children: [e.icon, e.label]
|
|
114
115
|
}, e.value))
|
|
115
|
-
}),
|
|
116
|
+
}), i[14] = y, i[15] = U);
|
|
116
117
|
let W;
|
|
117
|
-
|
|
118
|
+
i[16] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ jsxs(Button, {
|
|
118
119
|
variant: "outline",
|
|
119
120
|
size: "sm",
|
|
120
121
|
className: "h-7 gap-1.5",
|
|
121
122
|
onClick: () => S(!0),
|
|
122
123
|
children: [/* @__PURE__ */ jsx(Play, { className: "h-3 w-3" }), "New Run"]
|
|
123
|
-
}),
|
|
124
|
+
}), i[16] = W) : W = i[16];
|
|
124
125
|
let G;
|
|
125
|
-
|
|
126
|
+
i[17] === U ? G = i[18] : (G = /* @__PURE__ */ jsxs("div", {
|
|
126
127
|
className: "bg-muted/50 flex h-11 shrink-0 items-center justify-between border-b px-3",
|
|
127
128
|
children: [U, W]
|
|
128
|
-
}),
|
|
129
|
+
}), i[17] = U, i[18] = G);
|
|
129
130
|
let K;
|
|
130
|
-
|
|
131
|
+
i[19] === w.error ? K = i[20] : (K = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: w.error }), i[19] = w.error, i[20] = K);
|
|
131
132
|
let q;
|
|
132
|
-
|
|
133
|
+
i[21] !== y || i[22] !== w.data || i[23] !== w.isLoading ? (q = y === "output" && /* @__PURE__ */ jsx("div", {
|
|
133
134
|
className: "px-4 py-3",
|
|
134
135
|
children: /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
135
136
|
loading: w.isLoading,
|
|
@@ -140,9 +141,9 @@ function PreviewWorkbenchContent(e) {
|
|
|
140
141
|
settings: R
|
|
141
142
|
}) : null
|
|
142
143
|
})
|
|
143
|
-
}),
|
|
144
|
+
}), i[21] = y, i[22] = w.data, i[23] = w.isLoading, i[24] = q) : q = i[24];
|
|
144
145
|
let J;
|
|
145
|
-
|
|
146
|
+
i[25] !== y || i[26] !== w.data || i[27] !== w.isLoading || i[28] !== O || i[29] !== m ? (J = y === "graph" && /* @__PURE__ */ jsx("div", {
|
|
146
147
|
className: "h-full",
|
|
147
148
|
children: /* @__PURE__ */ jsx(LoadingCentered_default, {
|
|
148
149
|
loading: w.isLoading,
|
|
@@ -159,16 +160,16 @@ function PreviewWorkbenchContent(e) {
|
|
|
159
160
|
})
|
|
160
161
|
})
|
|
161
162
|
})
|
|
162
|
-
}),
|
|
163
|
+
}), i[25] = y, i[26] = w.data, i[27] = w.isLoading, i[28] = O, i[29] = m, i[30] = J) : J = i[30];
|
|
163
164
|
let Y;
|
|
164
|
-
|
|
165
|
+
i[31] !== y || i[32] !== w.data ? (Y = y === "run-log" && /* @__PURE__ */ jsx("div", {
|
|
165
166
|
className: "px-4",
|
|
166
167
|
children: /* @__PURE__ */ jsx(WorkflowHistoryList_default, { workflow: w.data })
|
|
167
|
-
}),
|
|
168
|
+
}), i[31] = y, i[32] = w.data, i[33] = Y) : Y = i[33];
|
|
168
169
|
let X;
|
|
169
|
-
|
|
170
|
+
i[34] === y ? X = i[35] : (X = y === "logs" && /* @__PURE__ */ jsx(EmbedLogsContent, {}), i[34] = y, i[35] = X);
|
|
170
171
|
let Z;
|
|
171
|
-
|
|
172
|
+
i[36] !== K || i[37] !== q || i[38] !== J || i[39] !== Y || i[40] !== X ? (Z = /* @__PURE__ */ jsxs("div", {
|
|
172
173
|
className: "flex-1 overflow-auto",
|
|
173
174
|
children: [
|
|
174
175
|
K,
|
|
@@ -177,15 +178,15 @@ function PreviewWorkbenchContent(e) {
|
|
|
177
178
|
Y,
|
|
178
179
|
X
|
|
179
180
|
]
|
|
180
|
-
}),
|
|
181
|
+
}), i[36] = K, i[37] = q, i[38] = J, i[39] = Y, i[40] = X, i[41] = Z) : Z = i[41];
|
|
181
182
|
let Q;
|
|
182
|
-
|
|
183
|
+
i[42] !== F || i[43] !== x ? (Q = /* @__PURE__ */ jsx(NewRunDialog, {
|
|
183
184
|
open: x,
|
|
184
185
|
onOpenChange: S,
|
|
185
186
|
onSuccess: F
|
|
186
|
-
}),
|
|
187
|
+
}), i[42] = F, i[43] = x, i[44] = Q) : Q = i[44];
|
|
187
188
|
let $;
|
|
188
|
-
return
|
|
189
|
+
return i[45] !== G || i[46] !== Z || i[47] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
189
190
|
ref: _,
|
|
190
191
|
className: "flex h-screen flex-col overflow-hidden",
|
|
191
192
|
children: [
|
|
@@ -193,7 +194,7 @@ function PreviewWorkbenchContent(e) {
|
|
|
193
194
|
Z,
|
|
194
195
|
Q
|
|
195
196
|
]
|
|
196
|
-
}),
|
|
197
|
+
}), i[45] = G, i[46] = Z, i[47] = Q, i[48] = $) : $ = i[48], $;
|
|
197
198
|
}
|
|
198
199
|
function _temp() {}
|
|
199
200
|
var STATUS_DOT_COLORS = {
|
|
@@ -204,17 +205,17 @@ var STATUS_DOT_COLORS = {
|
|
|
204
205
|
canceled: "bg-orange-500",
|
|
205
206
|
pending: "bg-muted-foreground"
|
|
206
207
|
};
|
|
207
|
-
function PreviewEmptyState(
|
|
208
|
-
let
|
|
209
|
-
|
|
208
|
+
function PreviewEmptyState(e) {
|
|
209
|
+
let t = c(24), { newRunDialogOpen: r, onNewRunDialogOpenChange: o, onNewRunSuccess: s } = e, l = useNavigate(), { router: u } = useStudio(), [d, f] = useState(3), m;
|
|
210
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { parentId: null }, t[0] = m) : m = t[0];
|
|
210
211
|
let h = useFilterWorkflows(void 0, m, "createdAt", "DESC", 0, d), g;
|
|
211
|
-
|
|
212
|
+
t[1] === h.data?.data ? g = t[2] : (g = h.data?.data ?? [], t[1] = h.data?.data, t[2] = g);
|
|
212
213
|
let _ = g, se = h.data?.total ?? 0, y = _.length < se, x;
|
|
213
|
-
|
|
214
|
+
t[3] === o ? x = t[4] : (x = () => o(!0), t[3] = o, t[4] = x);
|
|
214
215
|
let C;
|
|
215
|
-
|
|
216
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Play, { className: "h-3.5 w-3.5" }), t[5] = C) : C = t[5];
|
|
216
217
|
let T;
|
|
217
|
-
|
|
218
|
+
t[6] === x ? T = t[7] : (T = /* @__PURE__ */ jsx("div", {
|
|
218
219
|
className: "flex justify-center",
|
|
219
220
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
220
221
|
variant: "secondary",
|
|
@@ -223,9 +224,9 @@ function PreviewEmptyState(n) {
|
|
|
223
224
|
onClick: x,
|
|
224
225
|
children: [C, "New Run"]
|
|
225
226
|
})
|
|
226
|
-
}),
|
|
227
|
+
}), t[6] = x, t[7] = T);
|
|
227
228
|
let E;
|
|
228
|
-
|
|
229
|
+
t[8] !== h.isLoading || t[9] !== y || t[10] !== l || t[11] !== u || t[12] !== _ ? (E = h.isLoading && _.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
229
230
|
className: "flex justify-center py-4",
|
|
230
231
|
children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" })
|
|
231
232
|
}) : _.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -248,23 +249,23 @@ function PreviewEmptyState(n) {
|
|
|
248
249
|
onClick: () => f(_temp2),
|
|
249
250
|
children: [/* @__PURE__ */ jsx(ChevronDown, { className: "h-3 w-3" }), "Load more"]
|
|
250
251
|
})
|
|
251
|
-
] }) : null,
|
|
252
|
+
] }) : null, t[8] = h.isLoading, t[9] = y, t[10] = l, t[11] = u, t[12] = _, t[13] = E) : E = t[13];
|
|
252
253
|
let D;
|
|
253
|
-
|
|
254
|
+
t[14] !== T || t[15] !== E ? (D = /* @__PURE__ */ jsxs("div", {
|
|
254
255
|
className: "w-full max-w-sm space-y-6 px-4",
|
|
255
256
|
children: [T, E]
|
|
256
|
-
}),
|
|
257
|
+
}), t[14] = T, t[15] = E, t[16] = D) : D = t[16];
|
|
257
258
|
let O;
|
|
258
|
-
|
|
259
|
-
open:
|
|
259
|
+
t[17] !== r || t[18] !== o || t[19] !== s ? (O = /* @__PURE__ */ jsx(NewRunDialog, {
|
|
260
|
+
open: r,
|
|
260
261
|
onOpenChange: o,
|
|
261
262
|
onSuccess: s
|
|
262
|
-
}),
|
|
263
|
+
}), t[17] = r, t[18] = o, t[19] = s, t[20] = O) : O = t[20];
|
|
263
264
|
let k;
|
|
264
|
-
return
|
|
265
|
+
return t[21] !== D || t[22] !== O ? (k = /* @__PURE__ */ jsxs("div", {
|
|
265
266
|
className: "flex h-screen flex-col items-center justify-center",
|
|
266
267
|
children: [D, O]
|
|
267
|
-
}),
|
|
268
|
+
}), t[21] = D, t[22] = O, t[23] = k) : k = t[23], k;
|
|
268
269
|
}
|
|
269
270
|
function _temp2(e) {
|
|
270
271
|
return e + 5;
|
|
@@ -330,7 +331,7 @@ function LogLine(e) {
|
|
|
330
331
|
function EmbedLogsContent() {
|
|
331
332
|
let e = c(21), t = config_default.environment.url, n = useRef(null), r;
|
|
332
333
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
333
|
-
queryKey: ["remote-agent-app-logs"],
|
|
334
|
+
queryKey: ["remote-agent-app-logs", t],
|
|
334
335
|
queryFn: async () => {
|
|
335
336
|
let e = await fetch(`${t}/api/v1/app/logs?lines=200`, { credentials: "include" });
|
|
336
337
|
if (!e.ok) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
1
|
import { useFilterWorkflows } from "../hooks/useWorkflows.js";
|
|
2
|
+
import { useStudio } from "../providers/StudioProvider.js";
|
|
3
3
|
import { Button } from "../components/ui/button.js";
|
|
4
4
|
import { NewRunDialog } from "../features/workbench/components/NewRunDialog.js";
|
|
5
5
|
import { RecentRunItem } from "../features/workbench/components/RecentRunItem.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { useWorkflow, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../hooks/useWorkflows.js";
|
|
3
|
+
import "../hooks/useWorkspaces.js";
|
|
1
4
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useWorkflow } from "../hooks/useWorkflows.js";
|
|
3
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
5
|
import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
|
|
5
6
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
7
|
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { useWorkflow, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import { useChildWorkflows, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
3
|
+
import "../hooks/useWorkspaces.js";
|
|
1
4
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useChildWorkflows, useWorkflow, useWorkflowConfigByName } from "../hooks/useWorkflows.js";
|
|
3
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
5
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
5
6
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
7
|
import { ReactFlowProvider } from "../node_modules/@xyflow/react/dist/esm/index.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { useAppsConfig, useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../hooks/useConfig.js";
|
|
3
|
+
import "../hooks/useWorkspaces.js";
|
|
1
4
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useAppsConfig } from "../hooks/useConfig.js";
|
|
3
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
5
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
5
6
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
7
|
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { useWorkspace } from "../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../hooks/useWorkspaces.js";
|
|
1
3
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
|
-
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
3
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
4
5
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
5
6
|
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LoopstackProvider } from "../packages/react/dist/provider.js";
|
|
2
|
+
import { createClient } from "../packages/client/dist/client.js";
|
|
3
|
+
import "../packages/client/dist/index.js";
|
|
4
|
+
import { useLiveInvalidation } from "../packages/react/dist/hooks/use-live-invalidation.js";
|
|
5
|
+
import "../packages/react/dist/index.js";
|
|
6
|
+
import { createReportingFetch } from "../services/reporting-fetch.js";
|
|
7
|
+
import { useStudio } from "./StudioProvider.js";
|
|
8
|
+
import { useMe } from "../hooks/useAuth.js";
|
|
9
|
+
import { c } from "react/compiler-runtime";
|
|
10
|
+
import { useMemo } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
function LiveInvalidation() {
|
|
13
|
+
return useLiveInvalidation(), null;
|
|
14
|
+
}
|
|
15
|
+
function LoopstackClientProvider(u) {
|
|
16
|
+
let d = c(9), { children: f } = u, { environment: p } = useStudio(), { isSuccess: m } = useMe(), h;
|
|
17
|
+
d[0] !== p.id || d[1] !== p.url ? (h = createClient({
|
|
18
|
+
url: p.url,
|
|
19
|
+
envKey: p.id,
|
|
20
|
+
credentials: "include",
|
|
21
|
+
fetch: createReportingFetch(p.id)
|
|
22
|
+
}), d[0] = p.id, d[1] = p.url, d[2] = h) : h = d[2];
|
|
23
|
+
let g = h, _;
|
|
24
|
+
d[3] === m ? _ = d[4] : (_ = m ? /* @__PURE__ */ jsx(LiveInvalidation, {}) : null, d[3] = m, d[4] = _);
|
|
25
|
+
let v;
|
|
26
|
+
return d[5] !== f || d[6] !== g || d[7] !== _ ? (v = /* @__PURE__ */ jsxs(LoopstackProvider, {
|
|
27
|
+
client: g,
|
|
28
|
+
children: [_, f]
|
|
29
|
+
}), d[5] = f, d[6] = g, d[7] = _, d[8] = v) : v = d[8], v;
|
|
30
|
+
}
|
|
31
|
+
export { LoopstackClientProvider };
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { createClient } from "../packages/client/dist/client.js";
|
|
2
|
+
import "../packages/client/dist/index.js";
|
|
3
|
+
import { createReportingFetch } from "./reporting-fetch.js";
|
|
3
4
|
function createApiClient(n) {
|
|
4
|
-
return { auth:
|
|
5
|
+
return { auth: createClient({
|
|
6
|
+
url: n.url,
|
|
7
|
+
envKey: n.id,
|
|
8
|
+
credentials: "include",
|
|
9
|
+
fetch: createReportingFetch(n.id)
|
|
10
|
+
}).auth };
|
|
5
11
|
}
|
|
6
12
|
export { createApiClient };
|
package/dist/services/index.js
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApiClientEvents, apiClientEvents } from "../events/api-client-events.js";
|
|
2
|
+
import "../events/index.js";
|
|
3
|
+
function createReportingFetch(n) {
|
|
4
|
+
return async (r, i) => {
|
|
5
|
+
try {
|
|
6
|
+
let a = await fetch(r, i);
|
|
7
|
+
return (a.status === 401 || a.status === 403) && apiClientEvents.emit(ApiClientEvents.UNAUTHORIZED, n), a;
|
|
8
|
+
} catch (r) {
|
|
9
|
+
throw r instanceof DOMException && r.name === "AbortError" || apiClientEvents.emit(ApiClientEvents.ERR_NETWORK, n), r;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export { createReportingFetch };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopstack/loopstack-studio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"repository": "loopstack-ai/loopstack-studio",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@fontsource/roboto": "^5.2.10",
|
|
28
28
|
"@hookform/resolvers": "^5.2.2",
|
|
29
|
-
"@loopstack/
|
|
29
|
+
"@loopstack/client": "^0.37.0",
|
|
30
|
+
"@loopstack/contracts": "^0.37.0",
|
|
31
|
+
"@loopstack/react": "^1.0.0",
|
|
30
32
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
31
33
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
32
34
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
@@ -53,7 +55,6 @@
|
|
|
53
55
|
"@tailwindcss/vite": "^4.2.2",
|
|
54
56
|
"@tanstack/react-query": "^5.99.0",
|
|
55
57
|
"@xyflow/react": "^12.10.2",
|
|
56
|
-
"axios": "^1.15.0",
|
|
57
58
|
"class-variance-authority": "^0.7.1",
|
|
58
59
|
"clsx": "^2.1.1",
|
|
59
60
|
"cmdk": "^1.1.1",
|
package/dist/api/auth.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
function createAuthApi(e) {
|
|
2
|
-
return {
|
|
3
|
-
me: () => e.get("/api/v1/auth/me").then((e) => e.data),
|
|
4
|
-
getInfo: () => e.get("/api/v1/auth/worker/health").then((e) => e.data),
|
|
5
|
-
hubLogin: (t) => e.post("/api/v1/auth/oauth/hub", t.hubLoginRequestDto).then((e) => e.data),
|
|
6
|
-
refresh: () => e.post("/api/v1/auth/refresh").then((e) => e.data),
|
|
7
|
-
logout: () => e.post("/api/v1/auth/logout").then((e) => e.data)
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export { createAuthApi };
|
package/dist/api/client.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ApiClientEvents } from "../events/api-client-events.js";
|
|
2
|
-
import { eventBus } from "../services/eventEmitter.js";
|
|
3
|
-
import "../services/index.js";
|
|
4
|
-
import axios from "axios";
|
|
5
|
-
function createAxiosClient(r, i) {
|
|
6
|
-
let a = axios.create({
|
|
7
|
-
baseURL: r,
|
|
8
|
-
withCredentials: !0,
|
|
9
|
-
headers: { "Content-Type": "application/json" }
|
|
10
|
-
});
|
|
11
|
-
return a.interceptors.response.use((e) => e, (n) => (n.response?.status && [401, 403].includes(n.response.status) && eventBus.emit(ApiClientEvents.UNAUTHORIZED, i), n.code === "ERR_NETWORK" && (console.error("Connection refused - server may be down"), eventBus.emit(ApiClientEvents.ERR_NETWORK, i)), Promise.reject(n))), a;
|
|
12
|
-
}
|
|
13
|
-
export { createAxiosClient };
|
package/dist/api/config.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
function createConfigApi(e) {
|
|
2
|
-
return {
|
|
3
|
-
getApps: () => e.get("/api/v1/config/apps").then((e) => e.data),
|
|
4
|
-
getWorkflowConfig: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}`).then((e) => e.data),
|
|
5
|
-
getWorkflowSource: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}/source`).then((e) => e.data),
|
|
6
|
-
getToolConfigs: () => e.get("/api/v1/config/tools").then((e) => e.data),
|
|
7
|
-
getToolConfig: (t) => e.get(`/api/v1/config/tools/${encodeURIComponent(t.toolName)}`).then((e) => e.data),
|
|
8
|
-
getAvailableEnvironments: () => e.get("/api/v1/config/environments").then((e) => e.data)
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export { createConfigApi };
|
package/dist/api/dashboard.js
DELETED
package/dist/api/documents.js
DELETED
package/dist/api/environments.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
function createEnvironmentsApi(e) {
|
|
2
|
-
return {
|
|
3
|
-
getByWorkspace: (t) => e.get(`/api/v1/workspaces/${t}/environments`).then((e) => e.data),
|
|
4
|
-
replaceEnvironments: (t, n) => e.put(`/api/v1/workspaces/${t}/environments`, n).then((e) => e.data),
|
|
5
|
-
resetEnvironment: (t) => e.post(`/api/v1/workspaces/${t.workspaceId}/environments/${t.slotId}/reset`).then((e) => e.data)
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
export { createEnvironmentsApi };
|
package/dist/api/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createFilesApi } from "../features/file-explorer/api/files.js";
|
|
2
|
-
import { createGitApi } from "../features/git/api/git.js";
|
|
3
|
-
import { createAuthApi } from "./auth.js";
|
|
4
|
-
import { createConfigApi } from "./config.js";
|
|
5
|
-
import { createDashboardApi } from "./dashboard.js";
|
|
6
|
-
import { createDocumentsApi } from "./documents.js";
|
|
7
|
-
import { createEnvironmentsApi } from "./environments.js";
|
|
8
|
-
import { createProcessorApi } from "./processor.js";
|
|
9
|
-
import { createSecretsApi } from "./secrets.js";
|
|
10
|
-
import { createWorkflowsApi } from "./workflows.js";
|
|
11
|
-
import { createWorkspacesApi } from "./workspaces.js";
|
|
12
|
-
import { createAxiosClient } from "./client.js";
|
|
13
|
-
function createApi(f) {
|
|
14
|
-
return {
|
|
15
|
-
auth: createAuthApi(f),
|
|
16
|
-
config: createConfigApi(f),
|
|
17
|
-
dashboard: createDashboardApi(f),
|
|
18
|
-
documents: createDocumentsApi(f),
|
|
19
|
-
environments: createEnvironmentsApi(f),
|
|
20
|
-
files: {
|
|
21
|
-
local: createFilesApi(f, "local"),
|
|
22
|
-
remote: createFilesApi(f, "remote")
|
|
23
|
-
},
|
|
24
|
-
git: createGitApi(f),
|
|
25
|
-
processor: createProcessorApi(f),
|
|
26
|
-
secrets: createSecretsApi(f),
|
|
27
|
-
workflows: createWorkflowsApi(f),
|
|
28
|
-
workspaces: createWorkspacesApi(f)
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export { createApi };
|
package/dist/api/processor.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
function createProcessorApi(e) {
|
|
2
|
-
return {
|
|
3
|
-
startWorkflow: (t) => e.post("/api/v1/processor/start", t.payload).then((e) => e.data),
|
|
4
|
-
runWorkflow: (t) => e.post(`/api/v1/processor/run/${t.workflowId}`, t.runWorkflowPayloadDto, t.force === void 0 ? void 0 : { params: { force: t.force } }).then((e) => e.data)
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
export { createProcessorApi };
|
package/dist/api/secrets.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
function createSecretsApi(e) {
|
|
2
|
-
return {
|
|
3
|
-
getByWorkspaceId: (t) => e.get(`/api/v1/workspaces/${t.workspaceId}/secrets`).then((e) => e.data),
|
|
4
|
-
create: (t) => e.post(`/api/v1/workspaces/${t.workspaceId}/secrets`, {
|
|
5
|
-
key: t.key,
|
|
6
|
-
value: t.value
|
|
7
|
-
}).then((e) => e.data),
|
|
8
|
-
upsert: (t) => e.put(`/api/v1/workspaces/${t.workspaceId}/secrets/upsert`, {
|
|
9
|
-
key: t.key,
|
|
10
|
-
value: t.value
|
|
11
|
-
}).then((e) => e.data),
|
|
12
|
-
update: (t) => e.put(`/api/v1/workspaces/${t.workspaceId}/secrets/${t.id}`, { value: t.value }).then((e) => e.data),
|
|
13
|
-
delete: (t) => e.delete(`/api/v1/workspaces/${t.workspaceId}/secrets/${t.id}`).then((e) => e.data)
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
export { createSecretsApi };
|
package/dist/api/workflows.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
function createWorkflowsApi(e) {
|
|
2
|
-
return {
|
|
3
|
-
getById: (t) => e.get(`/api/v1/workflows/${t.id}`).then((e) => e.data),
|
|
4
|
-
getStatusById: (t) => e.get(`/api/v1/workflows/${t.id}/status`).then((e) => e.data),
|
|
5
|
-
getAll: (t) => e.get("/api/v1/workflows", { params: t }).then((e) => e.data),
|
|
6
|
-
create: (t) => e.post("/api/v1/workflows", t.workflowCreateDto).then((e) => e.data),
|
|
7
|
-
update: (t) => e.put(`/api/v1/workflows/${t.id}`, t.workflowUpdateDto).then((e) => e.data),
|
|
8
|
-
delete: (t) => e.delete(`/api/v1/workflows/id/${t.id}`).then((e) => e.data),
|
|
9
|
-
batchDelete: (t) => e.delete("/api/v1/workflows/batch", { data: { ids: t.ids } }).then((e) => e.data),
|
|
10
|
-
getFileTree: (t) => e.get(`/api/v1/files/workflows/${t.workflowId}`).then((e) => e.data),
|
|
11
|
-
getFileContent: (t) => e.get(`/api/v1/files/workflows/${t.workflowId}/${t.filePath}`).then((e) => e.data),
|
|
12
|
-
getCheckpoints: (t) => e.get(`/api/v1/workflows/${t.id}/checkpoints`).then((e) => e.data)
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export { createWorkflowsApi };
|