@burdenoff/fluidgrids-fe-sdk 2026.716.9 → 2026.716.10
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/ExecutionDetailPage-4RT4QFRT.js +6 -0
- package/dist/{ExecutionDetailPage-TDFWESK7.js.map → ExecutionDetailPage-4RT4QFRT.js.map} +1 -1
- package/dist/ExecutionsListPage-I63SHREF.js +8 -0
- package/dist/{ExecutionsListPage-2TOKCFTV.js.map → ExecutionsListPage-I63SHREF.js.map} +1 -1
- package/dist/WorkflowBuilder-OX66PGQF.js +14 -0
- package/dist/{WorkflowBuilder-MOUBATQ6.js.map → WorkflowBuilder-OX66PGQF.js.map} +1 -1
- package/dist/WorkflowsList-4RBTKPUJ.js +8 -0
- package/dist/{WorkflowsList-W5JQQNLC.js.map → WorkflowsList-4RBTKPUJ.js.map} +1 -1
- package/dist/{blocks-S5FDFFAW.js → blocks-SUGKRWWO.js} +4 -4
- package/dist/{blocks-S5FDFFAW.js.map → blocks-SUGKRWWO.js.map} +1 -1
- package/dist/{chunk-4VFD3REQ.js → chunk-2WM6MEUY.js} +125 -107
- package/dist/chunk-2WM6MEUY.js.map +1 -0
- package/dist/{chunk-OKX63SYW.js → chunk-4J3LA5VT.js} +141 -115
- package/dist/chunk-4J3LA5VT.js.map +1 -0
- package/dist/{chunk-NAC4WYE5.js → chunk-4NTHFDKQ.js} +41 -3
- package/dist/chunk-4NTHFDKQ.js.map +1 -0
- package/dist/{chunk-7L75LV5R.js → chunk-5W4EAURJ.js} +3 -3
- package/dist/{chunk-7L75LV5R.js.map → chunk-5W4EAURJ.js.map} +1 -1
- package/dist/{chunk-4HIBBUT7.js → chunk-6MZFOWEO.js} +33 -23
- package/dist/chunk-6MZFOWEO.js.map +1 -0
- package/dist/{chunk-H32OANDS.js → chunk-JXH7PRTS.js} +4 -4
- package/dist/{chunk-H32OANDS.js.map → chunk-JXH7PRTS.js.map} +1 -1
- package/dist/{chunk-ZZFYYL2I.js → chunk-OHIRHNRJ.js} +61 -43
- package/dist/chunk-OHIRHNRJ.js.map +1 -0
- package/dist/{chunk-DORMKQJJ.js → chunk-WTKD76BY.js} +3 -3
- package/dist/{chunk-DORMKQJJ.js.map → chunk-WTKD76BY.js.map} +1 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +15 -15
- package/package.json +1 -1
- package/dist/ExecutionDetailPage-TDFWESK7.js +0 -6
- package/dist/ExecutionsListPage-2TOKCFTV.js +0 -8
- package/dist/WorkflowBuilder-MOUBATQ6.js +0 -14
- package/dist/WorkflowsList-W5JQQNLC.js +0 -8
- package/dist/chunk-4HIBBUT7.js.map +0 -1
- package/dist/chunk-4VFD3REQ.js.map +0 -1
- package/dist/chunk-NAC4WYE5.js.map +0 -1
- package/dist/chunk-OKX63SYW.js.map +0 -1
- package/dist/chunk-ZZFYYL2I.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getGlobalStoreClient } from './chunk-BQXHJIER.js';
|
|
2
2
|
import { GetMyNodeInstallationsDocument } from './chunk-UYPB5TWQ.js';
|
|
3
3
|
import { useFlowStore } from './chunk-KU64CCSV.js';
|
|
4
|
-
import { NodeEndpointConfigsDocument, NodeManifestDocument, UpdateWorkflowDefinitionDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, TriggerWorkflowDocument, WorkflowRunDocument } from './chunk-
|
|
4
|
+
import { NodeEndpointConfigsDocument, NodeManifestDocument, throwIfResultError, UpdateWorkflowDefinitionDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, TriggerWorkflowDocument, describeOperationError, WorkflowRunDocument } from './chunk-4NTHFDKQ.js';
|
|
5
5
|
import { waitForFluidGridsClient, getFluidGridsClient } from './chunk-5BDQNSP3.js';
|
|
6
6
|
import { config, getFluidGridsConfig } from './chunk-WWU2O2SR.js';
|
|
7
7
|
import { useStore, useReactFlow, getConnectedEdges, Handle, Position, useUpdateNodeInternals, useNodeId } from '@xyflow/react';
|
|
@@ -1955,10 +1955,12 @@ function useCreateConnection() {
|
|
|
1955
1955
|
setError(null);
|
|
1956
1956
|
try {
|
|
1957
1957
|
const client = getFluidGridsClient();
|
|
1958
|
-
const result =
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1958
|
+
const result = throwIfResultError(
|
|
1959
|
+
await client.mutate({
|
|
1960
|
+
mutation: CREATE_CONNECTION,
|
|
1961
|
+
variables: { input }
|
|
1962
|
+
})
|
|
1963
|
+
);
|
|
1962
1964
|
return result.data?.createConnection ?? null;
|
|
1963
1965
|
} catch (err) {
|
|
1964
1966
|
setError(err);
|
|
@@ -1984,10 +1986,12 @@ function useInitiateOAuth() {
|
|
|
1984
1986
|
setError(null);
|
|
1985
1987
|
try {
|
|
1986
1988
|
const client = getFluidGridsClient();
|
|
1987
|
-
const result =
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1989
|
+
const result = throwIfResultError(
|
|
1990
|
+
await client.mutate({
|
|
1991
|
+
mutation: INITIATE_OAUTH,
|
|
1992
|
+
variables: { input }
|
|
1993
|
+
})
|
|
1994
|
+
);
|
|
1991
1995
|
return result.data?.initiateOAuth ?? null;
|
|
1992
1996
|
} catch (err) {
|
|
1993
1997
|
setError(err);
|
|
@@ -6695,33 +6699,37 @@ function useConnectionDialog(options) {
|
|
|
6695
6699
|
setError(void 0);
|
|
6696
6700
|
try {
|
|
6697
6701
|
const client = getFluidGridsClient();
|
|
6698
|
-
const createResult =
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6702
|
+
const createResult = throwIfResultError(
|
|
6703
|
+
await client.mutate({
|
|
6704
|
+
mutation: CREATE_CONNECTION_FOR_DIALOG,
|
|
6705
|
+
variables: {
|
|
6706
|
+
input: {
|
|
6707
|
+
name: data.name.trim(),
|
|
6708
|
+
description: data.description?.trim(),
|
|
6709
|
+
providerId: data.provider.id,
|
|
6710
|
+
config: data.config
|
|
6711
|
+
}
|
|
6706
6712
|
}
|
|
6707
|
-
}
|
|
6708
|
-
|
|
6713
|
+
})
|
|
6714
|
+
);
|
|
6709
6715
|
const connection = createResult.data?.createConnection;
|
|
6710
6716
|
if (!connection) {
|
|
6711
6717
|
throw new Error("Failed to create connection");
|
|
6712
6718
|
}
|
|
6713
6719
|
switch (data.provider.authType) {
|
|
6714
6720
|
case "OAUTH2": {
|
|
6715
|
-
const oauthResult =
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6721
|
+
const oauthResult = throwIfResultError(
|
|
6722
|
+
await client.mutate({
|
|
6723
|
+
mutation: INITIATE_OAUTH_FOR_DIALOG,
|
|
6724
|
+
variables: {
|
|
6725
|
+
input: {
|
|
6726
|
+
connectionId: connection.id,
|
|
6727
|
+
redirectUri: getOAuthCallbackUrl(),
|
|
6728
|
+
scopes: data.scopes
|
|
6729
|
+
}
|
|
6722
6730
|
}
|
|
6723
|
-
}
|
|
6724
|
-
|
|
6731
|
+
})
|
|
6732
|
+
);
|
|
6725
6733
|
const oauthData = oauthResult.data?.initiateOAuth;
|
|
6726
6734
|
if (!oauthData?.redirectUrl) {
|
|
6727
6735
|
throw new Error("Failed to initiate OAuth flow");
|
|
@@ -6792,15 +6800,17 @@ function useConnectionDialog(options) {
|
|
|
6792
6800
|
}
|
|
6793
6801
|
case "API_KEY": {
|
|
6794
6802
|
if (!data.apiKey?.trim()) throw new Error("API key is required");
|
|
6795
|
-
const apiKeyResult =
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6803
|
+
const apiKeyResult = throwIfResultError(
|
|
6804
|
+
await client.mutate({
|
|
6805
|
+
mutation: AUTHENTICATE_WITH_API_KEY,
|
|
6806
|
+
variables: {
|
|
6807
|
+
input: {
|
|
6808
|
+
connectionId: connection.id,
|
|
6809
|
+
apiKey: data.apiKey.trim()
|
|
6810
|
+
}
|
|
6801
6811
|
}
|
|
6802
|
-
}
|
|
6803
|
-
|
|
6812
|
+
})
|
|
6813
|
+
);
|
|
6804
6814
|
const conn = apiKeyResult.data?.authenticateWithApiKey;
|
|
6805
6815
|
if (conn) {
|
|
6806
6816
|
options?.onConnectionCreated?.({
|
|
@@ -6816,16 +6826,18 @@ function useConnectionDialog(options) {
|
|
|
6816
6826
|
if (!data.username?.trim() || !data.password?.trim()) {
|
|
6817
6827
|
throw new Error("Username and password are required");
|
|
6818
6828
|
}
|
|
6819
|
-
const basicResult =
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6829
|
+
const basicResult = throwIfResultError(
|
|
6830
|
+
await client.mutate({
|
|
6831
|
+
mutation: AUTHENTICATE_WITH_BASIC_AUTH,
|
|
6832
|
+
variables: {
|
|
6833
|
+
input: {
|
|
6834
|
+
connectionId: connection.id,
|
|
6835
|
+
username: data.username.trim(),
|
|
6836
|
+
password: data.password.trim()
|
|
6837
|
+
}
|
|
6826
6838
|
}
|
|
6827
|
-
}
|
|
6828
|
-
|
|
6839
|
+
})
|
|
6840
|
+
);
|
|
6829
6841
|
const conn = basicResult.data?.authenticateWithBasicAuth;
|
|
6830
6842
|
if (conn) {
|
|
6831
6843
|
options?.onConnectionCreated?.({
|
|
@@ -6840,15 +6852,17 @@ function useConnectionDialog(options) {
|
|
|
6840
6852
|
case "BEARER_TOKEN": {
|
|
6841
6853
|
if (!data.bearerToken?.trim())
|
|
6842
6854
|
throw new Error("Bearer token is required");
|
|
6843
|
-
const bearerResult =
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6855
|
+
const bearerResult = throwIfResultError(
|
|
6856
|
+
await client.mutate({
|
|
6857
|
+
mutation: AUTHENTICATE_WITH_BEARER_TOKEN,
|
|
6858
|
+
variables: {
|
|
6859
|
+
input: {
|
|
6860
|
+
connectionId: connection.id,
|
|
6861
|
+
token: data.bearerToken.trim()
|
|
6862
|
+
}
|
|
6849
6863
|
}
|
|
6850
|
-
}
|
|
6851
|
-
|
|
6864
|
+
})
|
|
6865
|
+
);
|
|
6852
6866
|
const conn = bearerResult.data?.authenticateWithBearerToken;
|
|
6853
6867
|
if (conn) {
|
|
6854
6868
|
options?.onConnectionCreated?.({
|
|
@@ -6885,10 +6899,12 @@ function useConnectionDialog(options) {
|
|
|
6885
6899
|
const testConnection = useCallback(async (connectionId) => {
|
|
6886
6900
|
try {
|
|
6887
6901
|
const client = getFluidGridsClient();
|
|
6888
|
-
const result =
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6902
|
+
const result = throwIfResultError(
|
|
6903
|
+
await client.mutate({
|
|
6904
|
+
mutation: TEST_CONNECTION,
|
|
6905
|
+
variables: { connectionId }
|
|
6906
|
+
})
|
|
6907
|
+
);
|
|
6892
6908
|
return result.data?.testConnection ?? null;
|
|
6893
6909
|
} catch (err) {
|
|
6894
6910
|
return { success: false, message: err.message, latencyMs: 0 };
|
|
@@ -7876,18 +7892,20 @@ function useSaveWorkflow() {
|
|
|
7876
7892
|
let savedDbId = workflow.dbId;
|
|
7877
7893
|
let operation = "updated";
|
|
7878
7894
|
if (isDraft && workflow.dbId) {
|
|
7879
|
-
const { data } =
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7895
|
+
const { data } = throwIfResultError(
|
|
7896
|
+
await client.mutate({
|
|
7897
|
+
mutation: UpdateWorkflowDefinitionDocument,
|
|
7898
|
+
variables: {
|
|
7899
|
+
id: workflow.dbId,
|
|
7900
|
+
input: {
|
|
7901
|
+
definitionJson,
|
|
7902
|
+
name: workflow?.name,
|
|
7903
|
+
description: workflow?.name || "Workflow update",
|
|
7904
|
+
alias: workflow?.alias || void 0
|
|
7905
|
+
}
|
|
7888
7906
|
}
|
|
7889
|
-
}
|
|
7890
|
-
|
|
7907
|
+
})
|
|
7908
|
+
);
|
|
7891
7909
|
if (data?.updateWorkflowDefinition) {
|
|
7892
7910
|
savedVersion = data.updateWorkflowDefinition.version;
|
|
7893
7911
|
savedDbId = data.updateWorkflowDefinition.id;
|
|
@@ -7900,18 +7918,20 @@ function useSaveWorkflow() {
|
|
|
7900
7918
|
throw new Error("Failed to save workflow");
|
|
7901
7919
|
}
|
|
7902
7920
|
} else if (isDraft && !workflow.dbId) {
|
|
7903
|
-
const { data } =
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7921
|
+
const { data } = throwIfResultError(
|
|
7922
|
+
await client.mutate({
|
|
7923
|
+
mutation: CreateWorkflowDefinitionDocument,
|
|
7924
|
+
variables: {
|
|
7925
|
+
input: {
|
|
7926
|
+
workflowKey,
|
|
7927
|
+
version: workflow.version || params?.version || "v1",
|
|
7928
|
+
name: workflow?.name || "Untitled Workflow",
|
|
7929
|
+
description: workflow?.name || "Untitled Workflow",
|
|
7930
|
+
definitionJson
|
|
7931
|
+
}
|
|
7912
7932
|
}
|
|
7913
|
-
}
|
|
7914
|
-
|
|
7933
|
+
})
|
|
7934
|
+
);
|
|
7915
7935
|
if (data?.createWorkflowDefinition) {
|
|
7916
7936
|
savedVersion = data.createWorkflowDefinition.version;
|
|
7917
7937
|
savedDbId = data.createWorkflowDefinition.id;
|
|
@@ -7929,16 +7949,18 @@ function useSaveWorkflow() {
|
|
|
7929
7949
|
throw new Error("Failed to create workflow");
|
|
7930
7950
|
}
|
|
7931
7951
|
} else {
|
|
7932
|
-
const { data } =
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7952
|
+
const { data } = throwIfResultError(
|
|
7953
|
+
await client.mutate({
|
|
7954
|
+
mutation: CreateWorkflowVersionDocument,
|
|
7955
|
+
variables: {
|
|
7956
|
+
workflowKey,
|
|
7957
|
+
input: {
|
|
7958
|
+
definitionJson,
|
|
7959
|
+
description: workflow?.name || "Workflow update"
|
|
7960
|
+
}
|
|
7939
7961
|
}
|
|
7940
|
-
}
|
|
7941
|
-
|
|
7962
|
+
})
|
|
7963
|
+
);
|
|
7942
7964
|
if (data?.createWorkflowVersion?.success) {
|
|
7943
7965
|
const newWorkflow = data.createWorkflowVersion.workflow;
|
|
7944
7966
|
savedVersion = newWorkflow?.version ?? workflow.version;
|
|
@@ -8851,19 +8873,21 @@ function useNodeExecution() {
|
|
|
8851
8873
|
setNodeStatus(stopAtNodeId, "running");
|
|
8852
8874
|
try {
|
|
8853
8875
|
const client = getFluidGridsClient();
|
|
8854
|
-
const result =
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8876
|
+
const result = throwIfResultError(
|
|
8877
|
+
await client.mutate({
|
|
8878
|
+
mutation: TRIGGER_WORKFLOW,
|
|
8879
|
+
variables: {
|
|
8880
|
+
input: {
|
|
8881
|
+
workflowKey,
|
|
8882
|
+
version,
|
|
8883
|
+
triggerNodeId: triggerNode.id,
|
|
8884
|
+
triggerData: {},
|
|
8885
|
+
context: {},
|
|
8886
|
+
stopAtNodeId
|
|
8887
|
+
}
|
|
8864
8888
|
}
|
|
8865
|
-
}
|
|
8866
|
-
|
|
8889
|
+
})
|
|
8890
|
+
);
|
|
8867
8891
|
const triggerResult = result.data?.triggerWorkflow;
|
|
8868
8892
|
if (triggerResult) {
|
|
8869
8893
|
const backendRunId = triggerResult.runId;
|
|
@@ -8891,7 +8915,7 @@ function useNodeExecution() {
|
|
|
8891
8915
|
return { success: false, error: "No result from trigger" };
|
|
8892
8916
|
} catch (error) {
|
|
8893
8917
|
console.error("[useNodeExecution] Error triggering workflow:", error);
|
|
8894
|
-
const errorMessage = error
|
|
8918
|
+
const errorMessage = describeOperationError(error);
|
|
8895
8919
|
const errorRunId = nanoid();
|
|
8896
8920
|
const errorLog = {
|
|
8897
8921
|
id: `${errorRunId}-${stopAtNodeId}`,
|
|
@@ -8949,18 +8973,20 @@ function useNodeExecution() {
|
|
|
8949
8973
|
setNodeStatus(triggerNode.id, "running");
|
|
8950
8974
|
try {
|
|
8951
8975
|
const client = getFluidGridsClient();
|
|
8952
|
-
const result =
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
8976
|
+
const result = throwIfResultError(
|
|
8977
|
+
await client.mutate({
|
|
8978
|
+
mutation: TRIGGER_WORKFLOW,
|
|
8979
|
+
variables: {
|
|
8980
|
+
input: {
|
|
8981
|
+
workflowKey,
|
|
8982
|
+
version,
|
|
8983
|
+
triggerNodeId: triggerNode.id,
|
|
8984
|
+
triggerData: customTriggerData || {},
|
|
8985
|
+
context: {}
|
|
8986
|
+
}
|
|
8961
8987
|
}
|
|
8962
|
-
}
|
|
8963
|
-
|
|
8988
|
+
})
|
|
8989
|
+
);
|
|
8964
8990
|
const triggerResult = result.data?.triggerWorkflow;
|
|
8965
8991
|
if (triggerResult) {
|
|
8966
8992
|
const backendRunId = triggerResult.runId;
|
|
@@ -8973,7 +8999,7 @@ function useNodeExecution() {
|
|
|
8973
8999
|
return { success: false, error: "No result from trigger" };
|
|
8974
9000
|
} catch (error) {
|
|
8975
9001
|
console.error("[useNodeExecution] Error triggering workflow:", error);
|
|
8976
|
-
const errorMessage = error
|
|
9002
|
+
const errorMessage = describeOperationError(error);
|
|
8977
9003
|
const errorRunId = nanoid();
|
|
8978
9004
|
const errorLog = {
|
|
8979
9005
|
id: `${errorRunId}-${triggerNode.id}`,
|
|
@@ -9713,5 +9739,5 @@ function registerWorkflowNodeTypes(workflowNodes) {
|
|
|
9713
9739
|
}
|
|
9714
9740
|
|
|
9715
9741
|
export { AVAILABLE_NODES, ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, NODES, NODES_METADATA, NODE_CONFIGS, NODE_TYPES, NodePropertyPanel, ProviderPicker, createNodeWithDefaultData, ensureNodeConfigsLoaded, fetchNodeManifest, getNodeDetail, getNodeMetadata, getProviderForm, isNodeConfigsInitialized, listCustomBlocks, onNodeTypesUpdate, refetchStoreNodes, registerCustomBlock, registerWorkflowNodeTypes, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useInitiateOAuth, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useSaveWorkflow };
|
|
9716
|
-
//# sourceMappingURL=chunk-
|
|
9717
|
-
//# sourceMappingURL=chunk-
|
|
9742
|
+
//# sourceMappingURL=chunk-4J3LA5VT.js.map
|
|
9743
|
+
//# sourceMappingURL=chunk-4J3LA5VT.js.map
|