@burdenoff/fluidgrids-fe-sdk 2026.716.8 → 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.
Files changed (39) hide show
  1. package/dist/ExecutionDetailPage-4RT4QFRT.js +6 -0
  2. package/dist/{ExecutionDetailPage-2HRRVYS3.js.map → ExecutionDetailPage-4RT4QFRT.js.map} +1 -1
  3. package/dist/ExecutionsListPage-I63SHREF.js +8 -0
  4. package/dist/{ExecutionsListPage-MEWGRSFS.js.map → ExecutionsListPage-I63SHREF.js.map} +1 -1
  5. package/dist/WorkflowBuilder-OX66PGQF.js +14 -0
  6. package/dist/{WorkflowBuilder-434XQXAL.js.map → WorkflowBuilder-OX66PGQF.js.map} +1 -1
  7. package/dist/WorkflowsList-4RBTKPUJ.js +8 -0
  8. package/dist/{WorkflowsList-W5JQQNLC.js.map → WorkflowsList-4RBTKPUJ.js.map} +1 -1
  9. package/dist/{blocks-3SRVXNOP.js → blocks-SUGKRWWO.js} +4 -4
  10. package/dist/{blocks-3SRVXNOP.js.map → blocks-SUGKRWWO.js.map} +1 -1
  11. package/dist/{chunk-HU3YI534.js → chunk-2WM6MEUY.js} +127 -117
  12. package/dist/chunk-2WM6MEUY.js.map +1 -0
  13. package/dist/{chunk-423UETZP.js → chunk-4J3LA5VT.js} +141 -115
  14. package/dist/chunk-4J3LA5VT.js.map +1 -0
  15. package/dist/{chunk-NAC4WYE5.js → chunk-4NTHFDKQ.js} +41 -3
  16. package/dist/chunk-4NTHFDKQ.js.map +1 -0
  17. package/dist/{chunk-7L75LV5R.js → chunk-5W4EAURJ.js} +3 -3
  18. package/dist/{chunk-7L75LV5R.js.map → chunk-5W4EAURJ.js.map} +1 -1
  19. package/dist/{chunk-T7PRWFLD.js → chunk-6MZFOWEO.js} +33 -23
  20. package/dist/chunk-6MZFOWEO.js.map +1 -0
  21. package/dist/{chunk-UJWICZR2.js → chunk-JXH7PRTS.js} +4 -4
  22. package/dist/{chunk-UJWICZR2.js.map → chunk-JXH7PRTS.js.map} +1 -1
  23. package/dist/{chunk-ZZFYYL2I.js → chunk-OHIRHNRJ.js} +61 -43
  24. package/dist/chunk-OHIRHNRJ.js.map +1 -0
  25. package/dist/{chunk-EIYBPBSN.js → chunk-WTKD76BY.js} +3 -3
  26. package/dist/{chunk-EIYBPBSN.js.map → chunk-WTKD76BY.js.map} +1 -1
  27. package/dist/index.d.ts +37 -18
  28. package/dist/index.js +15 -15
  29. package/dist/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/ExecutionDetailPage-2HRRVYS3.js +0 -6
  32. package/dist/ExecutionsListPage-MEWGRSFS.js +0 -8
  33. package/dist/WorkflowBuilder-434XQXAL.js +0 -14
  34. package/dist/WorkflowsList-W5JQQNLC.js +0 -8
  35. package/dist/chunk-423UETZP.js.map +0 -1
  36. package/dist/chunk-HU3YI534.js.map +0 -1
  37. package/dist/chunk-NAC4WYE5.js.map +0 -1
  38. package/dist/chunk-T7PRWFLD.js.map +0 -1
  39. 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-NAC4WYE5.js';
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 = await client.mutate({
1959
- mutation: CREATE_CONNECTION,
1960
- variables: { input }
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 = await client.mutate({
1988
- mutation: INITIATE_OAUTH,
1989
- variables: { input }
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 = await client.mutate({
6699
- mutation: CREATE_CONNECTION_FOR_DIALOG,
6700
- variables: {
6701
- input: {
6702
- name: data.name.trim(),
6703
- description: data.description?.trim(),
6704
- providerId: data.provider.id,
6705
- config: data.config
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 = await client.mutate({
6716
- mutation: INITIATE_OAUTH_FOR_DIALOG,
6717
- variables: {
6718
- input: {
6719
- connectionId: connection.id,
6720
- redirectUri: getOAuthCallbackUrl(),
6721
- scopes: data.scopes
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 = await client.mutate({
6796
- mutation: AUTHENTICATE_WITH_API_KEY,
6797
- variables: {
6798
- input: {
6799
- connectionId: connection.id,
6800
- apiKey: data.apiKey.trim()
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 = await client.mutate({
6820
- mutation: AUTHENTICATE_WITH_BASIC_AUTH,
6821
- variables: {
6822
- input: {
6823
- connectionId: connection.id,
6824
- username: data.username.trim(),
6825
- password: data.password.trim()
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 = await client.mutate({
6844
- mutation: AUTHENTICATE_WITH_BEARER_TOKEN,
6845
- variables: {
6846
- input: {
6847
- connectionId: connection.id,
6848
- token: data.bearerToken.trim()
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 = await client.mutate({
6889
- mutation: TEST_CONNECTION,
6890
- variables: { connectionId }
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 } = await client.mutate({
7880
- mutation: UpdateWorkflowDefinitionDocument,
7881
- variables: {
7882
- id: workflow.dbId,
7883
- input: {
7884
- definitionJson,
7885
- name: workflow?.name,
7886
- description: workflow?.name || "Workflow update",
7887
- alias: workflow?.alias || void 0
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 } = await client.mutate({
7904
- mutation: CreateWorkflowDefinitionDocument,
7905
- variables: {
7906
- input: {
7907
- workflowKey,
7908
- version: workflow.version || params?.version || "v1",
7909
- name: workflow?.name || "Untitled Workflow",
7910
- description: workflow?.name || "Untitled Workflow",
7911
- definitionJson
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 } = await client.mutate({
7933
- mutation: CreateWorkflowVersionDocument,
7934
- variables: {
7935
- workflowKey,
7936
- input: {
7937
- definitionJson,
7938
- description: workflow?.name || "Workflow update"
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 = await client.mutate({
8855
- mutation: TRIGGER_WORKFLOW,
8856
- variables: {
8857
- input: {
8858
- workflowKey,
8859
- version,
8860
- triggerNodeId: triggerNode.id,
8861
- triggerData: {},
8862
- context: {},
8863
- stopAtNodeId
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 instanceof Error ? error.message : "Unknown 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 = await client.mutate({
8953
- mutation: TRIGGER_WORKFLOW,
8954
- variables: {
8955
- input: {
8956
- workflowKey,
8957
- version,
8958
- triggerNodeId: triggerNode.id,
8959
- triggerData: customTriggerData || {},
8960
- context: {}
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 instanceof Error ? error.message : "Unknown 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-423UETZP.js.map
9717
- //# sourceMappingURL=chunk-423UETZP.js.map
9742
+ //# sourceMappingURL=chunk-4J3LA5VT.js.map
9743
+ //# sourceMappingURL=chunk-4J3LA5VT.js.map