@burdenoff/fluidgrids-fe-sdk 2026.1030.2 → 2026.1031.1
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-3OBQI7US.js +22 -0
- package/dist/{ExecutionsListPage-3D3KRCW5.js → ExecutionsListPage-IWCFZN3M.js} +9 -9
- package/dist/{WorkflowBuilder-OLXEXR43.js → WorkflowBuilder-QUFOAGGI.js} +11 -11
- package/dist/{WorkflowsList-7F4QXM53.js → WorkflowsList-FUPJBOZF.js} +9 -9
- package/dist/{chunk-FRIV5FEI.js → chunk-35XBZMUY.js} +776 -53
- package/dist/{chunk-F6Q3PMHH.js → chunk-37GZQV4P.js} +2 -2
- package/dist/{chunk-RXVZCP3C.js → chunk-56VJFVOR.js} +2 -2
- package/dist/{chunk-BBOCA2T4.js → chunk-6PLOOE6D.js} +4 -4
- package/dist/{chunk-AFUEJNWC.js → chunk-ASNNQIBJ.js} +5 -5
- package/dist/{chunk-GQTEHWWY.js → chunk-AW3UXMNI.js} +3 -2
- package/dist/{chunk-UFFNYST3.js → chunk-BYTREFEU.js} +3 -3
- package/dist/{chunk-FPG2RZMC.js → chunk-DNXI4MRX.js} +6 -6
- package/dist/{chunk-2VYFYHPE.js → chunk-EPPDUVRT.js} +2 -2
- package/dist/{chunk-D3UWK7GY.js → chunk-FNZZ5JJL.js} +22 -16
- package/dist/{chunk-HDAST445.js → chunk-G5UND5NE.js} +3 -3
- package/dist/{chunk-JUUYPCFY.js → chunk-G77IGC3Y.js} +4 -1
- package/dist/{chunk-AZ3HUGV5.js → chunk-GORW52XL.js} +8 -8
- package/dist/{chunk-2YPXXNMV.js → chunk-HQZR7PRN.js} +1 -1
- package/dist/{chunk-Z6I6A47T.js → chunk-INMYNHJL.js} +1 -1
- package/dist/{chunk-ZWTINPHQ.js → chunk-KWI3VUDC.js} +3 -3
- package/dist/{chunk-YJ64DOKQ.js → chunk-MKHVPALQ.js} +1 -1
- package/dist/{chunk-H4AZBUWM.js → chunk-OGYAC7QW.js} +1 -1
- package/dist/{chunk-ECIDNCDI.js → chunk-RCC6MWJ7.js} +2 -2
- package/dist/{chunk-WCSPODUI.js → chunk-TKMGUAQZ.js} +5 -5
- package/dist/{chunk-OTAFPF7U.js → chunk-V5YQDSOR.js} +272 -157
- package/dist/{chunk-YFK2FZ4C.js → chunk-WXZYFZAQ.js} +1 -1
- package/dist/{chunk-DDEJOL6N.js → chunk-WYRMFOAE.js} +6 -6
- package/dist/{chunk-IIFSIBZ3.js → chunk-XZPZE4S7.js} +1 -1
- package/dist/{chunk-EQEV4WZL.js → chunk-YHYBZCC5.js} +3 -3
- package/dist/{chunk-O3VLDA34.js → chunk-ZWXX6NA3.js} +2 -2
- package/dist/executions.js +13 -13
- package/dist/global-operations-RAFTISSY.js +2 -0
- package/dist/history.js +6 -6
- package/dist/index.d.ts +17 -1
- package/dist/index.js +908 -96
- package/dist/nodes.js +2 -2
- package/dist/observability.js +6 -6
- package/dist/settings.js +7 -7
- package/dist/templates.js +11 -11
- package/dist/workflow-builder.js +12 -12
- package/dist/workflows-list.js +9 -9
- package/package.json +1 -1
- package/dist/ExecutionDetailPage-OT2UGYHN.js +0 -22
- package/dist/global-operations-D2USVOPM.js +0 -2
|
@@ -2,18 +2,18 @@ import { deepClone, applyTemplateInputs } from './chunk-GEMNVFPK.js';
|
|
|
2
2
|
import { Input } from './chunk-IEVSFCFS.js';
|
|
3
3
|
import { Dialog as Dialog$1, DialogContent as DialogContent$1, DialogHeader as DialogHeader$1, DialogTitle as DialogTitle$1, DialogDescription as DialogDescription$1, DialogFooter } from './chunk-YXMFRQYV.js';
|
|
4
4
|
import { Badge as Badge$1, Button } from './chunk-BQXVT32O.js';
|
|
5
|
-
import { QuotaExhaustedDialog, useWorkflowCodeExport, orderedExportFiles, fileBaseName, downloadWorkflowCodeExport, isLosslessReport, sortFidelityItems, isLossyFidelityItem, lineOfNode } from './chunk-
|
|
6
|
-
import { EntityTagPicker, useWorkflowProposal, WorkflowProposalCard, useRunHistory, RunHistoryView, SignalRunDialog } from './chunk-
|
|
5
|
+
import { QuotaExhaustedDialog, useWorkflowCodeExport, orderedExportFiles, fileBaseName, downloadWorkflowCodeExport, isLosslessReport, sortFidelityItems, isLossyFidelityItem, lineOfNode } from './chunk-EPPDUVRT.js';
|
|
6
|
+
import { EntityTagPicker, useWorkflowProposal, WorkflowProposalCard, useRunHistory, RunHistoryView, SignalRunDialog } from './chunk-KWI3VUDC.js';
|
|
7
7
|
import { AiCreditBalanceSlot } from './chunk-Y53CVZVV.js';
|
|
8
|
-
import { useRestoreWorkflowVersion, useWorkflowVersions, useActivateWorkflow, useDeleteWorkflow, useLazyWorkflowDefinition, useDeactivateWorkflow } from './chunk-
|
|
9
|
-
import { isAgentNodeType, AgentDefinitionSelectField } from './chunk-
|
|
8
|
+
import { useRestoreWorkflowVersion, useWorkflowVersions, useActivateWorkflow, useDeleteWorkflow, useLazyWorkflowDefinition, useDeactivateWorkflow } from './chunk-37GZQV4P.js';
|
|
9
|
+
import { isAgentNodeType, AgentDefinitionSelectField } from './chunk-HQZR7PRN.js';
|
|
10
10
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
11
|
-
import { leaseCallQueue, NODE_CONFIGS, createConfiguredNode, resolveOutputHandles, resolveInputHandles, isNodeConfigsInitialized, useFlowStore, getNodeDetail, useSaveStatusStore, isNodeTypeHiddenFromPalette, liveInternalOperations, resolveNodeOperation, readDisplayOptions, parseParameterValue, canAutosave, STICKY_NOTE_TYPE, isNodeTrigger, resolveUiSpec, RUNS_QUOTA_NAME, throwIfResultError, BILLING_PLANS_PATH, emitUpgradeClicked, FluidGridsContext, emitWorkflowCreated, emitTemplateUsed, ensureNodeConfigsLoaded, useEditLeaseStore, useEditLeaseLocked, registerWorkflowNodeTypes, emitNodeInstalled, useNodeExecution, useDurableFunctionNodesEnabled, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, useIsValidConnection, BuilderReadOnlyProvider, refetchStoreNodes, AVAILABLE_NODES, EDIT_SESSION_ID, useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, useInsertNode, NODE_TYPE_DRAG_DATA_FORMAT, NODE_OPERATION_DRAG_DATA_FORMAT, CODE_WORKFLOW_NODE_TYPE, SdkPermissionButton, bannerOf, useSaveWorkflow, useBuilderReadOnly, fieldsFromValue, filterPaletteNodes, useFluidGridsAnalytics, sessionBeforeReload, forgetSessionForReload, releasesOnClose, editStateOf, workflowFingerprint, isLocked, buildStickyNode, useNodeRegistryRevision, fieldsFromIO, readCodeWorkflowState, useCodeWorkflowInterface, clearCodeWorkflowDefinitionCache, isParamVisible, ConnectionSelector, structuredParameterType, nodeAccent, NodeTypeIcon, NODES_METADATA, shouldReleaseForIdle, tickAction, rememberSessionForReload, useDurableParityEnabled, useConnections, ConnectionFormDialog, useFluidGridsFlag, FLUIDGRIDS_FLAGS, saveIndicatorOf, inAppLeaveTarget, declaredOutputFields, subscribeWorkflowSaved, pathToExpression, diagnosticsByPath, interfaceHandlers, declaredSignals, ExpressionEditor, toCodeMirrorDiagnostics, formatParameterValue, leaveNeedsConfirmation, phaseAfterAcquire,
|
|
11
|
+
import { leaseCallQueue, NODE_CONFIGS, createConfiguredNode, resolveOutputHandles, resolveInputHandles, isNodeConfigsInitialized, useFlowStore, getNodeDetail, useSaveStatusStore, isNodeTypeHiddenFromPalette, liveInternalOperations, resolveNodeOperation, readDisplayOptions, parseParameterValue, canAutosave, STICKY_NOTE_TYPE, isNodeTrigger, resolveUiSpec, RUNS_QUOTA_NAME, throwIfResultError, BILLING_PLANS_PATH, emitUpgradeClicked, FluidGridsContext, emitWorkflowCreated, emitTemplateUsed, describeOperationError, ensureNodeConfigsLoaded, useEditLeaseStore, useEditLeaseLocked, registerWorkflowNodeTypes, emitNodeInstalled, useNodeExecution, useDurableFunctionNodesEnabled, onNodeTypesUpdate, NODE_TYPES, getNodeMetadata, useIsValidConnection, BuilderReadOnlyProvider, refetchStoreNodes, AVAILABLE_NODES, EDIT_SESSION_ID, useFluidGridsPermission, FLUIDGRIDS_PERMISSIONS, useInsertNode, NODE_TYPE_DRAG_DATA_FORMAT, NODE_OPERATION_DRAG_DATA_FORMAT, CODE_WORKFLOW_NODE_TYPE, SdkPermissionButton, bannerOf, useSaveWorkflow, useBuilderReadOnly, fieldsFromValue, filterPaletteNodes, useFluidGridsAnalytics, sessionBeforeReload, forgetSessionForReload, releasesOnClose, editStateOf, workflowFingerprint, isLocked, buildStickyNode, useNodeRegistryRevision, fieldsFromIO, readCodeWorkflowState, useCodeWorkflowInterface, clearCodeWorkflowDefinitionCache, isParamVisible, ConnectionSelector, structuredParameterType, nodeAccent, NodeTypeIcon, NODES_METADATA, shouldReleaseForIdle, tickAction, rememberSessionForReload, buildOperationSeed, useDurableParityEnabled, useConnections, ConnectionFormDialog, useFluidGridsFlag, FLUIDGRIDS_FLAGS, saveIndicatorOf, inAppLeaveTarget, declaredOutputFields, subscribeWorkflowSaved, pathToExpression, diagnosticsByPath, interfaceHandlers, declaredSignals, ExpressionEditor, toCodeMirrorDiagnostics, formatParameterValue, leaveNeedsConfirmation, phaseAfterAcquire, rememberOwnStatusChange, snapshotForSave, childRunIdOf, defaultSourcePath, projectLanguage, changedSourceFiles, isEditableSourcePath, sourceLanguageOf, interfaceFields, isImageIcon, NODES, synchronizeOperationUpdate, NodePropertyPanel, loadDefinitionJson, openRunQuotaUpgradePrompt, isTriggerOperation, canRenderOperationPanel, runPreparationOf, resolveOperationName, savesInPlace, AUTOSAVE_RETRY_DELAYS_MS, AUTOSAVE_DEBOUNCE_MS, rememberRevision, phaseAfterTakeOver } from './chunk-G5UND5NE.js';
|
|
12
12
|
import { cn } from './chunk-JL7CASN5.js';
|
|
13
13
|
import { getGlobalStoreClient } from './chunk-PXIFUMLA.js';
|
|
14
14
|
import { getFluidGridsConfig } from './chunk-6AMNEX2Y.js';
|
|
15
|
-
import { GetMyNodeInstallationsDocument, BrowseWorkflowTemplatesDocument, InstallWorkflowNodeDocument, InstallPurchasedNodeDocument, BrowseWorkflowNodesDocument, UninstallWorkflowNodeDocument, CreateStoreOrderDocument, GetNodeInstallableVersionsDocument, OrganizationPrivateNodesDocument, InstallOrganizationPrivateNodeDocument, UninstallOrganizationPrivateNodeDocument } from './chunk-
|
|
16
|
-
import { WorkspaceRunsQuotaDocument, ReleaseWorkflowEditLeaseDocument, NodeSchemaIntrospectionDocument, useWorkflowPinnedDataQuery, usePinNodeDataMutation, useUnpinNodeDataMutation, useRunFromNodeEligibilityQuery, EventRegistrationsDocument, AcquireWorkflowEditLeaseDocument,
|
|
15
|
+
import { GetMyNodeInstallationsDocument, BrowseWorkflowTemplatesDocument, InstallWorkflowNodeDocument, SubmitWorkflowTemplateDocument, MyWorkflowTemplateSubmissionsDocument, WithdrawWorkflowTemplateSubmissionDocument, InstallPurchasedNodeDocument, BrowseWorkflowNodesDocument, UninstallWorkflowNodeDocument, CreateStoreOrderDocument, GetNodeInstallableVersionsDocument, OrganizationPrivateNodesDocument, InstallOrganizationPrivateNodeDocument, UninstallOrganizationPrivateNodeDocument } from './chunk-G77IGC3Y.js';
|
|
16
|
+
import { WorkspaceRunsQuotaDocument, WorkflowGenerationTemplatesDocument, ReleaseWorkflowEditLeaseDocument, NodeSchemaIntrospectionDocument, useWorkflowPinnedDataQuery, usePinNodeDataMutation, useUnpinNodeDataMutation, useRunFromNodeEligibilityQuery, EventRegistrationsDocument, AcquireWorkflowEditLeaseDocument, WorkflowEnvironmentsDocument, WorkflowPromotionRequestsDocument, DeployWorkflowVersionToDevDocument, RequestWorkflowPromotionDocument, ApproveWorkflowPromotionDocument, RejectWorkflowPromotionDocument, CancelWorkflowPromotionDocument, UpdateWorkflowEnvironmentPolicyDocument, WorkflowGitRepositoryDocument, WorkflowGitPushesDocument, WorkflowGitCommitsDocument, LinkWorkflowGitRepositoryDocument, UnlinkWorkflowGitRepositoryDocument, PushWorkflowToGitDocument, WorkflowGitDiffDocument, RestoreWorkflowFromGitDocument, WorkflowAuthoringDocument, NodeStatesDocument, PreviewScheduleDocument, WorkflowEditLeaseDocument, WorkflowVersioningDocument, WorkflowVersionDrainageDocument, ActivateWorkflowVersionCheckedDocument, WorkflowDefinitionDocument, WorkflowCodeSourceDocument, WorkflowEditLeaseStatusDocument, BuildWorkflowCodeDocument, WebhookTestListenerDocument, StopWebhookTestListenerDocument, ListenForWebhookTestEventDocument, NodeUsageStatusDocument, RemoveNodeFromWorkflowsDocument, SetWorkflowRolloutDocument, DeleteWorkflowRolloutDocument, TakeOverWorkflowEditLeaseDocument } from './chunk-AW3UXMNI.js';
|
|
17
17
|
import { useTr } from './chunk-UULVIT25.js';
|
|
18
18
|
import { getFluidGridsClient, waitForFluidGridsClient, getFluidGridsClientSafe } from './chunk-NTWG3CJX.js';
|
|
19
19
|
import { __export } from './chunk-62GWEYJ5.js';
|
|
@@ -621,7 +621,7 @@ function useInstalledNodes() {
|
|
|
621
621
|
refetch
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
function useWorkflowTemplates(searchTerm, limit = 20, enabled = true) {
|
|
624
|
+
function useWorkflowTemplates(searchTerm, limit = 20, enabled = true, category) {
|
|
625
625
|
const client = useGlobalStoreClient();
|
|
626
626
|
const context = useContext(FluidGridsContext);
|
|
627
627
|
const workspaceId = context?.workspaceId ?? getFluidGridsConfig().workspaceId;
|
|
@@ -641,7 +641,8 @@ function useWorkflowTemplates(searchTerm, limit = 20, enabled = true) {
|
|
|
641
641
|
filter: {
|
|
642
642
|
type: "WORKFLOW" /* Workflow */,
|
|
643
643
|
status: "PUBLISHED" /* Published */,
|
|
644
|
-
search: searchTerm
|
|
644
|
+
search: searchTerm,
|
|
645
|
+
...category ? { category } : {}
|
|
645
646
|
},
|
|
646
647
|
pagination: {
|
|
647
648
|
limit,
|
|
@@ -1246,6 +1247,84 @@ function useImportWorkflowTemplate() {
|
|
|
1246
1247
|
error: error62
|
|
1247
1248
|
};
|
|
1248
1249
|
}
|
|
1250
|
+
var TEMPLATE_STORE_CATEGORIES = [
|
|
1251
|
+
"automation",
|
|
1252
|
+
"integration",
|
|
1253
|
+
"data-processing",
|
|
1254
|
+
"ai-ml",
|
|
1255
|
+
"communication",
|
|
1256
|
+
"devops",
|
|
1257
|
+
"marketing",
|
|
1258
|
+
"sales",
|
|
1259
|
+
"support",
|
|
1260
|
+
"productivity",
|
|
1261
|
+
"finance"
|
|
1262
|
+
];
|
|
1263
|
+
function usePublishToStore() {
|
|
1264
|
+
const [publishing, setPublishing] = useState(false);
|
|
1265
|
+
const [error62, setError] = useState(null);
|
|
1266
|
+
const globalClient = useGlobalStoreClient();
|
|
1267
|
+
const publishToStore = useCallback(
|
|
1268
|
+
async (input2) => {
|
|
1269
|
+
setPublishing(true);
|
|
1270
|
+
setError(null);
|
|
1271
|
+
try {
|
|
1272
|
+
const { workflow } = input2;
|
|
1273
|
+
const result = throwIfResultError(
|
|
1274
|
+
await globalClient.mutate({
|
|
1275
|
+
mutation: SubmitWorkflowTemplateDocument,
|
|
1276
|
+
variables: {
|
|
1277
|
+
input: {
|
|
1278
|
+
productId: input2.productId,
|
|
1279
|
+
name: (input2.name || workflow.name).trim(),
|
|
1280
|
+
description: (input2.description || workflow.description || "").trim(),
|
|
1281
|
+
longDescription: input2.longDescription?.trim() || void 0,
|
|
1282
|
+
category: input2.category,
|
|
1283
|
+
tags: input2.tags ?? workflow.tags ?? [],
|
|
1284
|
+
icon: workflow.icon || void 0,
|
|
1285
|
+
definitionJson: workflow.definitionJson,
|
|
1286
|
+
sourceWorkflowKey: workflow.workflowKey,
|
|
1287
|
+
sourceWorkflowVersion: workflow.version,
|
|
1288
|
+
authorName: input2.authorName?.trim() || void 0,
|
|
1289
|
+
difficultyLevel: input2.difficultyLevel,
|
|
1290
|
+
estimatedTimeMinutes: input2.estimatedTimeMinutes,
|
|
1291
|
+
notes: input2.notes?.trim() || void 0
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
})
|
|
1295
|
+
);
|
|
1296
|
+
const submission = result.data?.submitWorkflowTemplate;
|
|
1297
|
+
if (!submission) {
|
|
1298
|
+
throw new Error("The store did not return the submitted template");
|
|
1299
|
+
}
|
|
1300
|
+
return {
|
|
1301
|
+
success: true,
|
|
1302
|
+
submission,
|
|
1303
|
+
message: submission.status === "PUBLISHED" /* Published */ ? `Template "${submission.name}" is published` : `Template "${submission.name}" submitted for review`
|
|
1304
|
+
};
|
|
1305
|
+
} catch (err) {
|
|
1306
|
+
const publishError = new Error(
|
|
1307
|
+
describeOperationError(err, "Failed to publish to store"),
|
|
1308
|
+
{ cause: err }
|
|
1309
|
+
);
|
|
1310
|
+
setError(publishError);
|
|
1311
|
+
return {
|
|
1312
|
+
success: false,
|
|
1313
|
+
submission: null,
|
|
1314
|
+
message: publishError.message
|
|
1315
|
+
};
|
|
1316
|
+
} finally {
|
|
1317
|
+
setPublishing(false);
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
[globalClient]
|
|
1321
|
+
);
|
|
1322
|
+
return {
|
|
1323
|
+
publishToStore,
|
|
1324
|
+
publishing,
|
|
1325
|
+
error: error62
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1249
1328
|
|
|
1250
1329
|
// src/hooks/store/store-context-headers.ts
|
|
1251
1330
|
function storeContextHeaders(input2) {
|
|
@@ -1584,18 +1663,54 @@ function useCreateOrder() {
|
|
|
1584
1663
|
creating
|
|
1585
1664
|
};
|
|
1586
1665
|
}
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1666
|
+
function useTemplateSubmissions(enabled = true, limit = 50) {
|
|
1667
|
+
const client = useGlobalStoreClient();
|
|
1668
|
+
const [withdrawingId, setWithdrawingId] = useState(null);
|
|
1669
|
+
const { data, loading, error: error62, refetch } = useQuery(MyWorkflowTemplateSubmissionsDocument, {
|
|
1670
|
+
client,
|
|
1671
|
+
variables: { limit, offset: 0 },
|
|
1672
|
+
fetchPolicy: "cache-and-network",
|
|
1673
|
+
skip: !enabled
|
|
1674
|
+
});
|
|
1675
|
+
const withdraw = useCallback(
|
|
1676
|
+
async (id) => {
|
|
1677
|
+
setWithdrawingId(id);
|
|
1678
|
+
try {
|
|
1679
|
+
const result = throwIfResultError(
|
|
1680
|
+
await client.mutate({
|
|
1681
|
+
mutation: WithdrawWorkflowTemplateSubmissionDocument,
|
|
1682
|
+
variables: { id }
|
|
1683
|
+
})
|
|
1684
|
+
);
|
|
1685
|
+
const removed = result.data?.withdrawWorkflowTemplateSubmission.removed ?? false;
|
|
1686
|
+
await refetch();
|
|
1687
|
+
return {
|
|
1688
|
+
success: true,
|
|
1689
|
+
removed,
|
|
1690
|
+
message: removed ? "Template withdrawn and deleted" : "Template taken off the store"
|
|
1691
|
+
};
|
|
1692
|
+
} catch (err) {
|
|
1693
|
+
return {
|
|
1694
|
+
success: false,
|
|
1695
|
+
removed: false,
|
|
1696
|
+
message: describeOperationError(err, "Failed to withdraw template")
|
|
1697
|
+
};
|
|
1698
|
+
} finally {
|
|
1699
|
+
setWithdrawingId(null);
|
|
1700
|
+
}
|
|
1701
|
+
},
|
|
1702
|
+
[client, refetch]
|
|
1703
|
+
);
|
|
1704
|
+
return {
|
|
1705
|
+
submissions: data?.myWorkflowTemplateSubmissions.items ?? [],
|
|
1706
|
+
totalCount: data?.myWorkflowTemplateSubmissions.totalCount ?? 0,
|
|
1707
|
+
loading,
|
|
1708
|
+
error: error62,
|
|
1709
|
+
refetch,
|
|
1710
|
+
withdraw,
|
|
1711
|
+
withdrawingId
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1599
1714
|
function errorMessage(error62, fallback) {
|
|
1600
1715
|
return error62 instanceof Error && error62.message ? error62.message : fallback;
|
|
1601
1716
|
}
|
|
@@ -21936,6 +22051,105 @@ function useEditLease(enabled) {
|
|
|
21936
22051
|
};
|
|
21937
22052
|
}, [enabled, workflowKey]);
|
|
21938
22053
|
}
|
|
22054
|
+
function useAiWorkflowTemplates(enabled) {
|
|
22055
|
+
const [templates, setTemplates] = useState(
|
|
22056
|
+
[]
|
|
22057
|
+
);
|
|
22058
|
+
useEffect(() => {
|
|
22059
|
+
if (!enabled) return;
|
|
22060
|
+
let active = true;
|
|
22061
|
+
getFluidGridsClient().query({
|
|
22062
|
+
query: WorkflowGenerationTemplatesDocument,
|
|
22063
|
+
fetchPolicy: "cache-first"
|
|
22064
|
+
}).then((result) => {
|
|
22065
|
+
if (active)
|
|
22066
|
+
setTemplates(result.data?.workflowGenerationTemplates ?? []);
|
|
22067
|
+
}).catch(() => {
|
|
22068
|
+
if (active) setTemplates([]);
|
|
22069
|
+
});
|
|
22070
|
+
return () => {
|
|
22071
|
+
active = false;
|
|
22072
|
+
};
|
|
22073
|
+
}, [enabled]);
|
|
22074
|
+
return templates;
|
|
22075
|
+
}
|
|
22076
|
+
|
|
22077
|
+
// src/builder/lib/ai-draft.ts
|
|
22078
|
+
var AI_DRAFT_MAX_PROMPT_LENGTH = 4e3;
|
|
22079
|
+
function isRecord(value) {
|
|
22080
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22081
|
+
}
|
|
22082
|
+
function stringOr(value, fallback) {
|
|
22083
|
+
return typeof value === "string" && value.trim() !== "" ? value : fallback;
|
|
22084
|
+
}
|
|
22085
|
+
function draftToCanvas(definitionJson) {
|
|
22086
|
+
const data = isRecord(definitionJson) && isRecord(definitionJson.data) ? definitionJson.data : {};
|
|
22087
|
+
const rawNodes = Array.isArray(data.nodes) ? data.nodes : [];
|
|
22088
|
+
const rawEdges = Array.isArray(data.edges) ? data.edges : [];
|
|
22089
|
+
const nodes = rawNodes.filter(isRecord).flatMap((raw) => {
|
|
22090
|
+
if (typeof raw.id !== "string" || typeof raw.type !== "string") return [];
|
|
22091
|
+
const position = isRecord(raw.position) ? {
|
|
22092
|
+
x: typeof raw.position.x === "number" ? raw.position.x : 0,
|
|
22093
|
+
y: typeof raw.position.y === "number" ? raw.position.y : 0
|
|
22094
|
+
} : { x: 0, y: 0 };
|
|
22095
|
+
const nodeData = isRecord(raw.data) ? raw.data : {};
|
|
22096
|
+
const node2 = {
|
|
22097
|
+
...raw,
|
|
22098
|
+
id: raw.id,
|
|
22099
|
+
type: raw.type,
|
|
22100
|
+
position,
|
|
22101
|
+
data: nodeData,
|
|
22102
|
+
selected: false
|
|
22103
|
+
};
|
|
22104
|
+
return [node2];
|
|
22105
|
+
});
|
|
22106
|
+
const ids = new Set(nodes.map((node2) => node2.id));
|
|
22107
|
+
const edges = rawEdges.filter(isRecord).flatMap((raw) => {
|
|
22108
|
+
if (typeof raw.source !== "string" || typeof raw.target !== "string") {
|
|
22109
|
+
return [];
|
|
22110
|
+
}
|
|
22111
|
+
if (!ids.has(raw.source) || !ids.has(raw.target)) return [];
|
|
22112
|
+
const edge = {
|
|
22113
|
+
id: stringOr(raw.id, `e-${raw.source}-${raw.target}`),
|
|
22114
|
+
source: raw.source,
|
|
22115
|
+
target: raw.target,
|
|
22116
|
+
type: stringOr(raw.type, "deletable"),
|
|
22117
|
+
...typeof raw.sourceHandle === "string" ? { sourceHandle: raw.sourceHandle } : {},
|
|
22118
|
+
...typeof raw.targetHandle === "string" ? { targetHandle: raw.targetHandle } : {}
|
|
22119
|
+
};
|
|
22120
|
+
return [edge];
|
|
22121
|
+
});
|
|
22122
|
+
return { nodes, edges };
|
|
22123
|
+
}
|
|
22124
|
+
function enrichDraftNodes(nodes, seed) {
|
|
22125
|
+
return nodes.map((node2) => {
|
|
22126
|
+
const data = isRecord(node2.data) ? node2.data : {};
|
|
22127
|
+
const rootOperation = node2.operation_name;
|
|
22128
|
+
let operationName;
|
|
22129
|
+
if (typeof data.operation_name === "string") {
|
|
22130
|
+
operationName = data.operation_name;
|
|
22131
|
+
} else if (typeof rootOperation === "string") {
|
|
22132
|
+
operationName = rootOperation;
|
|
22133
|
+
}
|
|
22134
|
+
if (!node2.type || !operationName) return node2;
|
|
22135
|
+
const seeded = seed(node2.type, operationName, data);
|
|
22136
|
+
if (!seeded) return node2;
|
|
22137
|
+
const seededArgs = isRecord(seeded.args) ? seeded.args : {};
|
|
22138
|
+
const defaults = isRecord(seededArgs.state) ? seededArgs.state : {};
|
|
22139
|
+
const draftArgs = isRecord(data.args) ? data.args : {};
|
|
22140
|
+
const draftState = isRecord(draftArgs.state) ? draftArgs.state : {};
|
|
22141
|
+
return {
|
|
22142
|
+
...node2,
|
|
22143
|
+
data: {
|
|
22144
|
+
...seeded,
|
|
22145
|
+
args: { ...seededArgs, state: { ...defaults, ...draftState } }
|
|
22146
|
+
}
|
|
22147
|
+
};
|
|
22148
|
+
});
|
|
22149
|
+
}
|
|
22150
|
+
function canvasHasWork(nodes) {
|
|
22151
|
+
return nodes.length > 1;
|
|
22152
|
+
}
|
|
21939
22153
|
function findEdges(node2, connectedEdges) {
|
|
21940
22154
|
const outgoingEdges = connectedEdges.filter(
|
|
21941
22155
|
(edge) => edge.source === node2.id
|
|
@@ -25472,7 +25686,7 @@ function DesktopSidebarFragment({
|
|
|
25472
25686
|
);
|
|
25473
25687
|
if (nodesToInstall.length > 0) {
|
|
25474
25688
|
const { getGlobalStoreClient: getStore } = await import('./global-client-KLOVTVPP.js');
|
|
25475
|
-
const { InstallWorkflowNodeDocument: InstallWorkflowNodeDocument2 } = await import('./global-operations-
|
|
25689
|
+
const { InstallWorkflowNodeDocument: InstallWorkflowNodeDocument2 } = await import('./global-operations-RAFTISSY.js');
|
|
25476
25690
|
const { getFluidGridsConfig: getFluidGridsConfig3 } = await import('./config-VM7FTHMZ.js');
|
|
25477
25691
|
const storeClient = getStore();
|
|
25478
25692
|
const cfg = getFluidGridsConfig3();
|
|
@@ -25535,8 +25749,8 @@ function DesktopSidebarFragment({
|
|
|
25535
25749
|
}
|
|
25536
25750
|
const { getFluidGridsClient: getFluidGridsClient2 } = await import('./client-T7BHWM2H.js');
|
|
25537
25751
|
const { getFluidGridsConfig: getFluidGridsConfig2 } = await import('./config-VM7FTHMZ.js');
|
|
25538
|
-
const { gql:
|
|
25539
|
-
const IMPORT_MUTATION =
|
|
25752
|
+
const { gql: gql9 } = await import('@apollo/client/core');
|
|
25753
|
+
const IMPORT_MUTATION = gql9`
|
|
25540
25754
|
mutation ImportWorkflowTemplate(
|
|
25541
25755
|
$input: ImportWorkflowTemplateInput!
|
|
25542
25756
|
) {
|
|
@@ -25592,7 +25806,7 @@ function DesktopSidebarFragment({
|
|
|
25592
25806
|
});
|
|
25593
25807
|
try {
|
|
25594
25808
|
const { getGlobalStoreClient: getStoreClient } = await import('./global-client-KLOVTVPP.js');
|
|
25595
|
-
const { InstallWorkflowNodeDocument: InstallWorkflowNodeDocument2 } = await import('./global-operations-
|
|
25809
|
+
const { InstallWorkflowNodeDocument: InstallWorkflowNodeDocument2 } = await import('./global-operations-RAFTISSY.js');
|
|
25596
25810
|
const storeClient = getStoreClient();
|
|
25597
25811
|
if (storeClient) {
|
|
25598
25812
|
throwIfResultError(
|
|
@@ -25692,8 +25906,8 @@ function DesktopSidebarFragment({
|
|
|
25692
25906
|
{ id: "template-load" }
|
|
25693
25907
|
);
|
|
25694
25908
|
const { getGlobalStoreClient: getGlobalStoreClient2 } = await import('./global-client-KLOVTVPP.js');
|
|
25695
|
-
const { gql:
|
|
25696
|
-
const GET_TEMPLATE_DETAIL =
|
|
25909
|
+
const { gql: gql9 } = await import('@apollo/client/core');
|
|
25910
|
+
const GET_TEMPLATE_DETAIL = gql9`
|
|
25697
25911
|
query GetWorkflowTemplateDetail($id: ID!) {
|
|
25698
25912
|
product(id: $id) {
|
|
25699
25913
|
id
|
|
@@ -34595,7 +34809,7 @@ function useWebhookRegistration(workflowKey, triggerNodeId, enabled = true) {
|
|
|
34595
34809
|
}
|
|
34596
34810
|
|
|
34597
34811
|
// src/builder/components/ndv/node-option-values.ts
|
|
34598
|
-
function
|
|
34812
|
+
function isRecord2(value) {
|
|
34599
34813
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34600
34814
|
}
|
|
34601
34815
|
function isParameterName(value) {
|
|
@@ -34603,19 +34817,19 @@ function isParameterName(value) {
|
|
|
34603
34817
|
}
|
|
34604
34818
|
function isStringOptionList(schema) {
|
|
34605
34819
|
if (structuredParameterType(schema) !== "array") return false;
|
|
34606
|
-
const type = typeof schema === "string" ? schema :
|
|
34820
|
+
const type = typeof schema === "string" ? schema : isRecord2(schema) ? schema.type : void 0;
|
|
34607
34821
|
const inlineItem = typeof type === "string" ? type.trim().toLowerCase().match(/^array<(.+)>$/)?.[1] : void 0;
|
|
34608
|
-
const item = (
|
|
34822
|
+
const item = (isRecord2(schema) ? schema.items : void 0) ?? inlineItem;
|
|
34609
34823
|
if (item === void 0) return true;
|
|
34610
|
-
const itemType = typeof item === "string" ? item :
|
|
34824
|
+
const itemType = typeof item === "string" ? item : isRecord2(item) ? item.type : void 0;
|
|
34611
34825
|
return typeof itemType === "string" && itemType.trim().toLowerCase() === "string";
|
|
34612
34826
|
}
|
|
34613
34827
|
function readLoadOptionsSpec(value) {
|
|
34614
|
-
if (!
|
|
34828
|
+
if (!isRecord2(value) || typeof value.operation !== "string" || typeof value.labelField !== "string" || typeof value.valueField !== "string")
|
|
34615
34829
|
return void 0;
|
|
34616
34830
|
let parameterArgs;
|
|
34617
34831
|
if (value.parameterArgs !== void 0) {
|
|
34618
|
-
if (!
|
|
34832
|
+
if (!isRecord2(value.parameterArgs)) return void 0;
|
|
34619
34833
|
parameterArgs = {};
|
|
34620
34834
|
for (const [argument, parameter] of Object.entries(value.parameterArgs)) {
|
|
34621
34835
|
if (!isParameterName(argument) || typeof parameter !== "string" || !isParameterName(parameter))
|
|
@@ -34628,7 +34842,7 @@ function readLoadOptionsSpec(value) {
|
|
|
34628
34842
|
labelField: value.labelField,
|
|
34629
34843
|
valueField: value.valueField,
|
|
34630
34844
|
resultPath: typeof value.resultPath === "string" ? value.resultPath : void 0,
|
|
34631
|
-
staticArgs:
|
|
34845
|
+
staticArgs: isRecord2(value.staticArgs) ? value.staticArgs : void 0,
|
|
34632
34846
|
parameterArgs
|
|
34633
34847
|
};
|
|
34634
34848
|
}
|
|
@@ -34655,7 +34869,7 @@ function resolveLoadOptionsSpec(spec, values, defaults = {}, unavailableParamete
|
|
|
34655
34869
|
function containsExpression(value) {
|
|
34656
34870
|
if (typeof value === "string") return /\{\{|\$\{|^\$\./.test(value);
|
|
34657
34871
|
if (Array.isArray(value)) return value.some(containsExpression);
|
|
34658
|
-
return
|
|
34872
|
+
return isRecord2(value) && Object.values(value).some(containsExpression);
|
|
34659
34873
|
}
|
|
34660
34874
|
function optionListValues(value) {
|
|
34661
34875
|
if (value === void 0 || value === null || value === "") return [];
|
|
@@ -34686,17 +34900,17 @@ function optionListText(value) {
|
|
|
34686
34900
|
}
|
|
34687
34901
|
|
|
34688
34902
|
// src/builder/lib/multiline-parameters.ts
|
|
34689
|
-
function
|
|
34903
|
+
function isRecord3(value) {
|
|
34690
34904
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34691
34905
|
}
|
|
34692
34906
|
function multilineParameters(operation) {
|
|
34693
34907
|
const names = /* @__PURE__ */ new Set();
|
|
34694
|
-
if (!
|
|
34908
|
+
if (!isRecord3(operation)) return names;
|
|
34695
34909
|
const legacyCard = operation.adaptive_card ?? operation.adaptiveCard;
|
|
34696
34910
|
const resolved = resolveUiSpec({
|
|
34697
34911
|
name: typeof operation.name === "string" ? operation.name : void 0,
|
|
34698
34912
|
ui: operation.ui,
|
|
34699
|
-
adaptive_card:
|
|
34913
|
+
adaptive_card: isRecord3(legacyCard) ? legacyCard : void 0
|
|
34700
34914
|
});
|
|
34701
34915
|
const pending = resolved?.spec.blocks.flatMap(
|
|
34702
34916
|
(block) => block.type === "adaptive_card" ? [block.card] : []
|
|
@@ -34711,7 +34925,7 @@ function multilineParameters(operation) {
|
|
|
34711
34925
|
pending.push(...element);
|
|
34712
34926
|
continue;
|
|
34713
34927
|
}
|
|
34714
|
-
if (!
|
|
34928
|
+
if (!isRecord3(element)) continue;
|
|
34715
34929
|
if (element.type === "Input.Text" && element.isMultiline === true && typeof element.id === "string") {
|
|
34716
34930
|
const name = element.id.replace(/^(?:args\.)?state\./, "");
|
|
34717
34931
|
if (name) names.add(name);
|
|
@@ -34724,9 +34938,9 @@ function multilineParameters(operation) {
|
|
|
34724
34938
|
element.card
|
|
34725
34939
|
);
|
|
34726
34940
|
}
|
|
34727
|
-
if (
|
|
34941
|
+
if (isRecord3(operation.input_fields)) {
|
|
34728
34942
|
for (const [name, field] of Object.entries(operation.input_fields)) {
|
|
34729
|
-
if (!
|
|
34943
|
+
if (!isRecord3(field)) continue;
|
|
34730
34944
|
if (field.isMultiline === true) names.add(name);
|
|
34731
34945
|
else if (field.isMultiline === false) names.delete(name);
|
|
34732
34946
|
}
|
|
@@ -37616,7 +37830,7 @@ function defaultScheduleRule() {
|
|
|
37616
37830
|
function isScheduleRuleField(value) {
|
|
37617
37831
|
return typeof value === "string" && SCHEDULE_RULE_FIELDS.some((field) => field === value);
|
|
37618
37832
|
}
|
|
37619
|
-
function
|
|
37833
|
+
function isRecord4(value) {
|
|
37620
37834
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
37621
37835
|
}
|
|
37622
37836
|
function toNumber(value) {
|
|
@@ -37712,10 +37926,10 @@ function rulesFromLegacyState(state) {
|
|
|
37712
37926
|
return [defaultScheduleRule()];
|
|
37713
37927
|
}
|
|
37714
37928
|
function normalizeScheduleState(state) {
|
|
37715
|
-
const source =
|
|
37929
|
+
const source = isRecord4(state) ? state : {};
|
|
37716
37930
|
let rules;
|
|
37717
37931
|
if (Array.isArray(source.rules)) {
|
|
37718
|
-
rules = source.rules.filter(
|
|
37932
|
+
rules = source.rules.filter(isRecord4).map(normalizeScheduleRule);
|
|
37719
37933
|
if (rules.length === 0) rules = [defaultScheduleRule()];
|
|
37720
37934
|
} else {
|
|
37721
37935
|
rules = rulesFromLegacyState(source);
|
|
@@ -37727,7 +37941,7 @@ function normalizeScheduleState(state) {
|
|
|
37727
37941
|
return { rules, timezone, misfirePolicy, misfireGraceSeconds };
|
|
37728
37942
|
}
|
|
37729
37943
|
function isLegacyScheduleState(state) {
|
|
37730
|
-
if (!
|
|
37944
|
+
if (!isRecord4(state) || Array.isArray(state.rules)) return false;
|
|
37731
37945
|
return state.mode !== void 0 || toTrimmedString(state.cronExpression) !== "" || toNumber(state.interval) !== void 0;
|
|
37732
37946
|
}
|
|
37733
37947
|
function inRange(value, min, max) {
|
|
@@ -38713,17 +38927,17 @@ var PLATFORM_EVENT_SOURCES_QUERY = gql`
|
|
|
38713
38927
|
`;
|
|
38714
38928
|
var CACHE_TTL_MS2 = 3 * 60 * 1e3;
|
|
38715
38929
|
var caches = /* @__PURE__ */ new WeakMap();
|
|
38716
|
-
function
|
|
38930
|
+
function isRecord5(value) {
|
|
38717
38931
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38718
38932
|
}
|
|
38719
38933
|
function readPlatformEventSources(data) {
|
|
38720
|
-
const list =
|
|
38934
|
+
const list = isRecord5(data) ? data.platformEventSources : void 0;
|
|
38721
38935
|
if (!Array.isArray(list)) return [];
|
|
38722
38936
|
const sources = [];
|
|
38723
38937
|
for (const item of list) {
|
|
38724
|
-
if (!
|
|
38938
|
+
if (!isRecord5(item) || typeof item.module !== "string") continue;
|
|
38725
38939
|
const recordTypes = Array.isArray(item.recordTypes) ? item.recordTypes.flatMap(
|
|
38726
|
-
(type) =>
|
|
38940
|
+
(type) => isRecord5(type) && typeof type.name === "string" ? [
|
|
38727
38941
|
{
|
|
38728
38942
|
name: type.name,
|
|
38729
38943
|
actions: Array.isArray(type.actions) ? type.actions.filter(
|
|
@@ -43608,7 +43822,7 @@ async function refreshOpenRevision() {
|
|
|
43608
43822
|
}
|
|
43609
43823
|
|
|
43610
43824
|
// src/utils/workflow-definition-diff.ts
|
|
43611
|
-
function
|
|
43825
|
+
function isRecord6(value) {
|
|
43612
43826
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43613
43827
|
}
|
|
43614
43828
|
function equalJson(left, right) {
|
|
@@ -43616,7 +43830,7 @@ function equalJson(left, right) {
|
|
|
43616
43830
|
if (Array.isArray(left) && Array.isArray(right)) {
|
|
43617
43831
|
return left.length === right.length && left.every((value, index) => equalJson(value, right[index]));
|
|
43618
43832
|
}
|
|
43619
|
-
if (
|
|
43833
|
+
if (isRecord6(left) && isRecord6(right)) {
|
|
43620
43834
|
const leftKeys = Object.keys(left).sort((a, b) => a.localeCompare(b));
|
|
43621
43835
|
const rightKeys = Object.keys(right).sort((a, b) => a.localeCompare(b));
|
|
43622
43836
|
return leftKeys.length === rightKeys.length && leftKeys.every(
|
|
@@ -43629,7 +43843,7 @@ function diffWorkflowDefinitionJson(before, after, maxEntries = 2e3) {
|
|
|
43629
43843
|
const entries = [];
|
|
43630
43844
|
const visit2 = (left, right, path) => {
|
|
43631
43845
|
if (entries.length >= maxEntries || equalJson(left, right)) return;
|
|
43632
|
-
if (
|
|
43846
|
+
if (isRecord6(left) && isRecord6(right)) {
|
|
43633
43847
|
const keys = [
|
|
43634
43848
|
.../* @__PURE__ */ new Set([...Object.keys(left), ...Object.keys(right)])
|
|
43635
43849
|
].sort((a, b) => a.localeCompare(b));
|
|
@@ -43819,13 +44033,13 @@ function prodRollout(rollouts) {
|
|
|
43819
44033
|
) ?? null;
|
|
43820
44034
|
}
|
|
43821
44035
|
function isDurableDefinition(definitionJson) {
|
|
43822
|
-
if (!
|
|
44036
|
+
if (!isRecord7(definitionJson)) return false;
|
|
43823
44037
|
const code = definitionJson.code;
|
|
43824
|
-
if (!
|
|
43825
|
-
const workflows =
|
|
43826
|
-
return
|
|
44038
|
+
if (!isRecord7(code) || typeof code.buildId !== "string") return false;
|
|
44039
|
+
const workflows = isRecord7(code.exports) ? code.exports.workflows : null;
|
|
44040
|
+
return isRecord7(workflows) && Object.keys(workflows).length > 0;
|
|
43827
44041
|
}
|
|
43828
|
-
function
|
|
44042
|
+
function isRecord7(value) {
|
|
43829
44043
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43830
44044
|
}
|
|
43831
44045
|
var EMPTY_STATE = {
|
|
@@ -47061,105 +47275,6 @@ function GitSyncPanel({
|
|
|
47061
47275
|
}
|
|
47062
47276
|
);
|
|
47063
47277
|
}
|
|
47064
|
-
function useAiWorkflowTemplates(enabled) {
|
|
47065
|
-
const [templates, setTemplates] = useState(
|
|
47066
|
-
[]
|
|
47067
|
-
);
|
|
47068
|
-
useEffect(() => {
|
|
47069
|
-
if (!enabled) return;
|
|
47070
|
-
let active = true;
|
|
47071
|
-
getFluidGridsClient().query({
|
|
47072
|
-
query: WorkflowGenerationTemplatesDocument,
|
|
47073
|
-
fetchPolicy: "cache-first"
|
|
47074
|
-
}).then((result) => {
|
|
47075
|
-
if (active)
|
|
47076
|
-
setTemplates(result.data?.workflowGenerationTemplates ?? []);
|
|
47077
|
-
}).catch(() => {
|
|
47078
|
-
if (active) setTemplates([]);
|
|
47079
|
-
});
|
|
47080
|
-
return () => {
|
|
47081
|
-
active = false;
|
|
47082
|
-
};
|
|
47083
|
-
}, [enabled]);
|
|
47084
|
-
return templates;
|
|
47085
|
-
}
|
|
47086
|
-
|
|
47087
|
-
// src/builder/lib/ai-draft.ts
|
|
47088
|
-
var AI_DRAFT_MAX_PROMPT_LENGTH = 4e3;
|
|
47089
|
-
function isRecord7(value) {
|
|
47090
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47091
|
-
}
|
|
47092
|
-
function stringOr(value, fallback) {
|
|
47093
|
-
return typeof value === "string" && value.trim() !== "" ? value : fallback;
|
|
47094
|
-
}
|
|
47095
|
-
function draftToCanvas(definitionJson) {
|
|
47096
|
-
const data = isRecord7(definitionJson) && isRecord7(definitionJson.data) ? definitionJson.data : {};
|
|
47097
|
-
const rawNodes = Array.isArray(data.nodes) ? data.nodes : [];
|
|
47098
|
-
const rawEdges = Array.isArray(data.edges) ? data.edges : [];
|
|
47099
|
-
const nodes = rawNodes.filter(isRecord7).flatMap((raw) => {
|
|
47100
|
-
if (typeof raw.id !== "string" || typeof raw.type !== "string") return [];
|
|
47101
|
-
const position = isRecord7(raw.position) ? {
|
|
47102
|
-
x: typeof raw.position.x === "number" ? raw.position.x : 0,
|
|
47103
|
-
y: typeof raw.position.y === "number" ? raw.position.y : 0
|
|
47104
|
-
} : { x: 0, y: 0 };
|
|
47105
|
-
const nodeData = isRecord7(raw.data) ? raw.data : {};
|
|
47106
|
-
const node2 = {
|
|
47107
|
-
...raw,
|
|
47108
|
-
id: raw.id,
|
|
47109
|
-
type: raw.type,
|
|
47110
|
-
position,
|
|
47111
|
-
data: nodeData,
|
|
47112
|
-
selected: false
|
|
47113
|
-
};
|
|
47114
|
-
return [node2];
|
|
47115
|
-
});
|
|
47116
|
-
const ids = new Set(nodes.map((node2) => node2.id));
|
|
47117
|
-
const edges = rawEdges.filter(isRecord7).flatMap((raw) => {
|
|
47118
|
-
if (typeof raw.source !== "string" || typeof raw.target !== "string") {
|
|
47119
|
-
return [];
|
|
47120
|
-
}
|
|
47121
|
-
if (!ids.has(raw.source) || !ids.has(raw.target)) return [];
|
|
47122
|
-
const edge = {
|
|
47123
|
-
id: stringOr(raw.id, `e-${raw.source}-${raw.target}`),
|
|
47124
|
-
source: raw.source,
|
|
47125
|
-
target: raw.target,
|
|
47126
|
-
type: stringOr(raw.type, "deletable"),
|
|
47127
|
-
...typeof raw.sourceHandle === "string" ? { sourceHandle: raw.sourceHandle } : {},
|
|
47128
|
-
...typeof raw.targetHandle === "string" ? { targetHandle: raw.targetHandle } : {}
|
|
47129
|
-
};
|
|
47130
|
-
return [edge];
|
|
47131
|
-
});
|
|
47132
|
-
return { nodes, edges };
|
|
47133
|
-
}
|
|
47134
|
-
function enrichDraftNodes(nodes, seed) {
|
|
47135
|
-
return nodes.map((node2) => {
|
|
47136
|
-
const data = isRecord7(node2.data) ? node2.data : {};
|
|
47137
|
-
const rootOperation = node2.operation_name;
|
|
47138
|
-
let operationName;
|
|
47139
|
-
if (typeof data.operation_name === "string") {
|
|
47140
|
-
operationName = data.operation_name;
|
|
47141
|
-
} else if (typeof rootOperation === "string") {
|
|
47142
|
-
operationName = rootOperation;
|
|
47143
|
-
}
|
|
47144
|
-
if (!node2.type || !operationName) return node2;
|
|
47145
|
-
const seeded = seed(node2.type, operationName, data);
|
|
47146
|
-
if (!seeded) return node2;
|
|
47147
|
-
const seededArgs = isRecord7(seeded.args) ? seeded.args : {};
|
|
47148
|
-
const defaults = isRecord7(seededArgs.state) ? seededArgs.state : {};
|
|
47149
|
-
const draftArgs = isRecord7(data.args) ? data.args : {};
|
|
47150
|
-
const draftState = isRecord7(draftArgs.state) ? draftArgs.state : {};
|
|
47151
|
-
return {
|
|
47152
|
-
...node2,
|
|
47153
|
-
data: {
|
|
47154
|
-
...seeded,
|
|
47155
|
-
args: { ...seededArgs, state: { ...defaults, ...draftState } }
|
|
47156
|
-
}
|
|
47157
|
-
};
|
|
47158
|
-
});
|
|
47159
|
-
}
|
|
47160
|
-
function canvasHasWork(nodes) {
|
|
47161
|
-
return nodes.length > 1;
|
|
47162
|
-
}
|
|
47163
47278
|
var NO_TEMPLATE = "__none__";
|
|
47164
47279
|
function AiDraftPanel({
|
|
47165
47280
|
className,
|
|
@@ -48990,4 +49105,4 @@ var FlowBuilderPage = ({
|
|
|
48990
49105
|
] });
|
|
48991
49106
|
};
|
|
48992
49107
|
|
|
48993
|
-
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, FlowBuilderPage, FluidGridsMark, Popover, PopoverContent, PopoverTrigger, RUNNER_INSTALL_SCRIPT_URL, RunOnSection, RunnerStatusPill, RunsUsageMeter, RunsUsageMeterView, TemplateCard, buildNodeCheck, buildRequiredNodeTypes, external_exports, readRunsQuota, releaseLeaseKeptForReload, runnerInstallCommand, runsQuotaLevel, summarizeRunsQuota, useImportWorkflowTemplate, useInstalledNodes, useRunnerActions, useRunners, useRunsQuota, useWorkflowReloadStore, useWorkflowTemplates };
|
|
49108
|
+
export { AI_DRAFT_MAX_PROMPT_LENGTH, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, FlowBuilderPage, FluidGridsMark, Popover, PopoverContent, PopoverTrigger, RUNNER_INSTALL_SCRIPT_URL, RunOnSection, RunnerStatusPill, RunsUsageMeter, RunsUsageMeterView, TEMPLATE_STORE_CATEGORIES, TemplateCard, buildNodeCheck, buildRequiredNodeTypes, draftToCanvas, enrichDraftNodes, external_exports, readRunsQuota, releaseLeaseKeptForReload, runnerInstallCommand, runsQuotaLevel, summarizeRunsQuota, useAiWorkflowTemplates, useImportWorkflowTemplate, useInstalledNodes, usePublishToStore, useRunnerActions, useRunners, useRunsQuota, useTemplateSubmissions, useWorkflowReloadStore, useWorkflowTemplates };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LOG_STREAM_DESTINATIONS, CREATE_LOG_STREAM_DESTINATION, UPDATE_LOG_STREAM_DESTINATION, DELETE_LOG_STREAM_DESTINATION, TEST_LOG_STREAM_DESTINATION, REPLAY_WORKFLOW_RUN, RETRY_WORKFLOW_RUNS, OBSERVABILITY_DASHBOARD_SUMMARY, OBSERVABILITY_FAILED_RUNS, OBSERVABILITY_DATA_SINKS, OBSERVABILITY_DATA_SINK_DATA } from './chunk-5ERAJC2I.js';
|
|
2
|
-
import { throwIfResultError, describeOperationError, useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt, useFluidGridsFlag, FLUIDGRIDS_FLAGS } from './chunk-
|
|
2
|
+
import { throwIfResultError, describeOperationError, useFluidGridsAnalytics, emitRunStarted, openRunQuotaUpgradePrompt, useFluidGridsFlag, FLUIDGRIDS_FLAGS } from './chunk-G5UND5NE.js';
|
|
3
3
|
import { useTr } from './chunk-UULVIT25.js';
|
|
4
4
|
import { getFluidGridsClient } from './chunk-NTWG3CJX.js';
|
|
5
5
|
import { useCallback, useState, useMemo, useEffect } from 'react';
|