@burdenoff/fluidgrids-fe-sdk 2026.1111.17 → 2026.1111.19
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/{AiStudioPage-kJHSsIcj.js → AiStudioPage-htYcXz43.js} +2 -2
- package/dist/{MissingNodesInstallModal-CMybsI8h.js → MissingNodesInstallModal-Dly7T2_7.js} +1 -1
- package/dist/{SettingsPage-CgkRlCM5.js → SettingsPage-CJLZvv4J.js} +1485 -1484
- package/dist/{TemplateCard-DsC0KNH1.js → TemplateCard-BdB087SP.js} +47 -11
- package/dist/{TemplateConfigurationModal-BhGWIzpm.js → TemplateConfigurationModal-CPVcTDSi.js} +1 -1
- package/dist/{TemplateDetailPanel-D4cUVr-m.js → TemplateDetailPanel-DruadMkg.js} +1 -1
- package/dist/{TemplatePreview-GthzCOSo.js → TemplatePreview-CNrYJXw2.js} +2 -2
- package/dist/{TemplatesPage-CsDNT54N.js → TemplatesPage-BU4tSqOo.js} +1 -1
- package/dist/{WorkflowBuilder-DEi_9YOb.js → WorkflowBuilder-BSPGcOfA.js} +2 -2
- package/dist/{WorkflowBuilder-iPqXgbYr.js → WorkflowBuilder-DMonxuoY.js} +4 -4
- package/dist/WorkflowShareDialog-mbIwRQUY.js +168 -0
- package/dist/{WorkflowsList-CA20dVIl.js → WorkflowsList-DiiGyZkT.js} +2 -1
- package/dist/{agentTools-CkRJB7r5.js → agentTools-C7pdNJqE.js} +2 -2
- package/dist/{canvasNoteTools-CQIc7Oxg.js → canvasNoteTools-CqiPTBa1.js} +1 -1
- package/dist/code-editor-field-9-GdVE_8.js +111 -0
- package/dist/{flow-builder-y2Y1iG4Y.js → flow-builder-CV5Zu_Hq.js} +246 -8639
- package/dist/{index-W2o__Nm6.d.ts → index-6JR2vD9J.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -13
- package/dist/{node-detail-view-B91kXzIy.js → node-detail-view-ttMp6H6K.js} +4 -2
- package/dist/node-editor-tab-body-Bqb--pZy.js +174 -0
- package/dist/observability.d.ts +1 -1
- package/dist/popover-BbVOHsfO.js +472 -0
- package/dist/{quick-config-panel-DggPl1vY.js → quick-config-panel-Da4uOVSs.js} +2 -1
- package/dist/schedule-panel-DnFN933b.js +7542 -0
- package/dist/settings.js +1 -1
- package/dist/sidebar-node-editor-lcnIZxdR.js +177 -0
- package/dist/templates.js +2 -2
- package/dist/{useAgentDefinitions-Dpz0HDTq.js → useAgentDefinitions-B0dam3_o.js} +1 -396
- package/dist/useConnections-Cs7LCWEM.js +401 -0
- package/dist/{WorkflowShareDialog-B_gn968c.js → useWorkflowCodeExport-Bu2QYJzA.js} +4 -161
- package/dist/workflow-builder.js +2 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +6 -6
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
package/dist/settings.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as SettingsPage } from "./SettingsPage-
|
|
2
|
+
import { t as SettingsPage } from "./SettingsPage-CJLZvv4J.js";
|
|
3
3
|
import { t as ManagedAiPolicyAuthorityProvider } from "./ManagedAiPolicyAuthority-BxwJ3ptd.js";
|
|
4
4
|
|
|
5
5
|
export { ManagedAiPolicyAuthorityProvider, SettingsPage };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { A as nodeAccent, H as useFlowStore, j as NodeTypeIcon } from "./node-operation-selection--oy-yEq_.js";
|
|
3
|
+
import { G as nodeSubtitle, K as nodeTitle, Mn as getNodeDetail, X as useNodeConfig, rn as useNodeExecution } from "./FluidGridsProvider-dvZSNtSW.js";
|
|
4
|
+
import { i as NodeInputFields, n as useNodeEditorTab, r as NodeEditorTabs, t as NodeEditorTabBody } from "./node-editor-tab-body-Bqb--pZy.js";
|
|
5
|
+
import { r as NodeExecutionActions } from "./schedule-panel-DnFN933b.js";
|
|
6
|
+
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
7
|
+
import { useEffect, useState } from "react";
|
|
8
|
+
import { Icon } from "@iconify/react";
|
|
9
|
+
import { cn } from "@burdenoff/fe-libs/utils";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
|
|
12
|
+
// src/builder/components/sidebar-node-editor/sidebar-node-editor.tsx
|
|
13
|
+
/**
|
|
14
|
+
* The node editor in the builder's right sidebar (BOFF-11325).
|
|
15
|
+
*
|
|
16
|
+
* It is the NDV's middle column in sidebar form: the same `useNodeConfig`
|
|
17
|
+
* model and the same `NodeParamsForm` / `NodeSettingsPanel` (and the Schedule
|
|
18
|
+
* tab for a Schedule Trigger), so a node is configured identically from the
|
|
19
|
+
* NDV, the single-click quick panel and here. Writes go straight to the flow
|
|
20
|
+
* store, as in the other two editors. It replaces the legacy property panels,
|
|
21
|
+
* which rendered the manifest's adaptive card instead.
|
|
22
|
+
*/
|
|
23
|
+
function SidebarNodeEditor({ nodeId, type }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(SidebarNodeEditorInner, {
|
|
25
|
+
nodeId,
|
|
26
|
+
type
|
|
27
|
+
}, nodeId);
|
|
28
|
+
}
|
|
29
|
+
function SidebarNodeEditorInner({ nodeId, type }) {
|
|
30
|
+
const config = useNodeConfig({
|
|
31
|
+
nodeId,
|
|
32
|
+
type
|
|
33
|
+
}, { webhookEnabled: true });
|
|
34
|
+
const { node, nodes } = config;
|
|
35
|
+
const setSelectedNode = useFlowStore((s) => s.actions.sidebar.panels.nodeProperties.setSelectedNode);
|
|
36
|
+
const { tab, setTab, hasSchedule } = useNodeEditorTab(node?.type);
|
|
37
|
+
const [showInput, setShowInput] = useState(false);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (!nodes.some((n) => n.id === nodeId)) setSelectedNode(null);
|
|
40
|
+
}, [
|
|
41
|
+
nodes,
|
|
42
|
+
nodeId,
|
|
43
|
+
setSelectedNode
|
|
44
|
+
]);
|
|
45
|
+
if (!node) return null;
|
|
46
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
48
|
+
"data-testid": "sidebar-node-editor",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx(EditorHeader, {
|
|
51
|
+
config,
|
|
52
|
+
nodeId,
|
|
53
|
+
type,
|
|
54
|
+
showInput,
|
|
55
|
+
onToggleInput: () => setShowInput((v) => !v)
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx(NodeEditorTabs, {
|
|
58
|
+
active: tab,
|
|
59
|
+
onChange: setTab,
|
|
60
|
+
hasSchedule,
|
|
61
|
+
testIdPrefix: "sp"
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: "min-h-0 flex-1 overflow-auto",
|
|
65
|
+
children: [showInput && /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: "m-3 flex max-h-64 flex-col overflow-hidden rounded-lg border border-border bg-card",
|
|
67
|
+
"data-testid": "sp-input-fields",
|
|
68
|
+
children: /* @__PURE__ */ jsx(NodeInputFields, {
|
|
69
|
+
config,
|
|
70
|
+
testIdPrefix: "sp"
|
|
71
|
+
})
|
|
72
|
+
}), /* @__PURE__ */ jsx(NodeEditorTabBody, {
|
|
73
|
+
tab,
|
|
74
|
+
config,
|
|
75
|
+
nodeId,
|
|
76
|
+
testIdPrefix: "sp"
|
|
77
|
+
})]
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx(EditorRunActions, { nodeId })
|
|
80
|
+
]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** The node, plus the input-mapper toggle and the switch to the full NDV. */
|
|
84
|
+
function EditorHeader({ config, nodeId, type, showInput, onToggleInput }) {
|
|
85
|
+
const tr = useTr();
|
|
86
|
+
const openNdv = useFlowStore((s) => s.actions.ndv.open);
|
|
87
|
+
const meta = getNodeDetail(config.node?.type);
|
|
88
|
+
const accent = nodeAccent(config.node?.type || meta.title);
|
|
89
|
+
const subtitle = nodeSubtitle(config.node);
|
|
90
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
91
|
+
className: "flex shrink-0 items-center gap-2.5 border-b border-border px-3 py-2.5",
|
|
92
|
+
style: { borderTop: `3px solid ${accent}` },
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("div", {
|
|
95
|
+
className: "flex size-7 shrink-0 items-center justify-center rounded-lg",
|
|
96
|
+
style: {
|
|
97
|
+
backgroundColor: `color-mix(in srgb, ${accent} 13%, transparent)`,
|
|
98
|
+
color: accent,
|
|
99
|
+
border: `1px solid color-mix(in srgb, ${accent} 26%, transparent)`
|
|
100
|
+
},
|
|
101
|
+
children: /* @__PURE__ */ jsx(NodeTypeIcon, {
|
|
102
|
+
icon: meta.icon,
|
|
103
|
+
className: "size-4"
|
|
104
|
+
})
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsxs("div", {
|
|
107
|
+
className: "min-w-0 flex-1",
|
|
108
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
109
|
+
className: "truncate text-sm font-semibold leading-tight text-foreground",
|
|
110
|
+
children: nodeTitle(config.node)
|
|
111
|
+
}), subtitle && /* @__PURE__ */ jsx("p", {
|
|
112
|
+
className: "truncate font-mono text-[11px] leading-tight text-muted-foreground",
|
|
113
|
+
children: subtitle
|
|
114
|
+
})]
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ jsx("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
title: showInput ? tr("fluidgrids.builder.quickConfigPanel.hideInputDataTooltip", "Hide input data") : tr("fluidgrids.builder.quickConfigPanel.mapInputDataTooltip", "Map data from input"),
|
|
119
|
+
"aria-label": tr("fluidgrids.builder.quickConfigPanel.toggleMapperAriaLabel", "Toggle input mapper"),
|
|
120
|
+
"aria-pressed": showInput,
|
|
121
|
+
onClick: onToggleInput,
|
|
122
|
+
className: cn("rounded-md p-1.5 transition-colors hover:bg-muted hover:text-foreground", showInput ? "text-primary" : "text-muted-foreground"),
|
|
123
|
+
"data-testid": "sp-toggle-mapper",
|
|
124
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
125
|
+
icon: "mdi:tray-arrow-down",
|
|
126
|
+
className: "size-4"
|
|
127
|
+
})
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ jsx("button", {
|
|
130
|
+
type: "button",
|
|
131
|
+
title: tr("fluidgrids.builder.quickConfigPanel.openFullEditorTooltip", "Open full editor"),
|
|
132
|
+
"aria-label": tr("fluidgrids.builder.quickConfigPanel.openFullEditorAriaLabel", "Open full editor"),
|
|
133
|
+
onClick: () => openNdv({
|
|
134
|
+
nodeId,
|
|
135
|
+
type
|
|
136
|
+
}),
|
|
137
|
+
className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
|
|
138
|
+
"data-testid": "sp-expand",
|
|
139
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
140
|
+
icon: "mdi:arrow-expand",
|
|
141
|
+
className: "size-4"
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/** Run this step / continue from this node, as in the NDV and the quick panel. */
|
|
148
|
+
function EditorRunActions({ nodeId }) {
|
|
149
|
+
const nodes = useFlowStore((s) => s.workflow.nodes);
|
|
150
|
+
const edges = useFlowStore((s) => s.workflow.edges);
|
|
151
|
+
const workflowKey = useFlowStore((s) => s.workflow.workflowKey);
|
|
152
|
+
const workflowId = useFlowStore((s) => s.workflow.id);
|
|
153
|
+
const workflowVersion = useFlowStore((s) => s.workflow.version);
|
|
154
|
+
const logs = useFlowStore((s) => s.execution.logs);
|
|
155
|
+
const sourceRun = useFlowStore((s) => s.execution.sourceRun);
|
|
156
|
+
const isExecuting = useFlowStore((s) => s.execution.isExecuting);
|
|
157
|
+
const { executeStep, executeFromNode } = useNodeExecution();
|
|
158
|
+
return /* @__PURE__ */ jsx(NodeExecutionActions, {
|
|
159
|
+
targetNodeId: nodeId,
|
|
160
|
+
nodes,
|
|
161
|
+
edges,
|
|
162
|
+
logs,
|
|
163
|
+
workflowKey: workflowKey || workflowId,
|
|
164
|
+
workflowVersion: workflowVersion || "1.0.0",
|
|
165
|
+
sourceRun,
|
|
166
|
+
isExecuting,
|
|
167
|
+
onExecuteStep: async (targetId) => {
|
|
168
|
+
await executeStep(targetId);
|
|
169
|
+
},
|
|
170
|
+
onContinueFromNode: async (sourceRunId, targetId) => {
|
|
171
|
+
await executeFromNode(sourceRunId, targetId);
|
|
172
|
+
},
|
|
173
|
+
testIdPrefix: "sp"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { SidebarNodeEditor };
|
package/dist/templates.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as TemplatesPage } from "./TemplatesPage-
|
|
3
|
-
import { t as TemplatePreview } from "./TemplatePreview-
|
|
2
|
+
import { t as TemplatesPage } from "./TemplatesPage-BU4tSqOo.js";
|
|
3
|
+
import { t as TemplatePreview } from "./TemplatePreview-CNrYJXw2.js";
|
|
4
4
|
|
|
5
5
|
export { TemplatePreview, TemplatesPage };
|
|
@@ -331,401 +331,6 @@ function usePreviewScheduleSuspenseQuery(baseOptions) {
|
|
|
331
331
|
return useSuspenseQuery(PreviewScheduleDocument, baseOptions);
|
|
332
332
|
}
|
|
333
333
|
|
|
334
|
-
// src/modules/connections/hooks/useConnections.ts
|
|
335
|
-
/**
|
|
336
|
-
* Custom hooks for fetching connections from the integrations service.
|
|
337
|
-
*
|
|
338
|
-
* These hooks query the wspace-integrations-svc via the federated GraphQL gateway.
|
|
339
|
-
* Connections replace the legacy credentials system for third-party authentication.
|
|
340
|
-
*/
|
|
341
|
-
const PROVIDER_FIELDS = gql`
|
|
342
|
-
fragment ProviderFields on IntegrationProvider {
|
|
343
|
-
id
|
|
344
|
-
key
|
|
345
|
-
name
|
|
346
|
-
description
|
|
347
|
-
category
|
|
348
|
-
authType
|
|
349
|
-
icon
|
|
350
|
-
color
|
|
351
|
-
website
|
|
352
|
-
docsUrl
|
|
353
|
-
isBuiltIn
|
|
354
|
-
isEnabled
|
|
355
|
-
availableScopes
|
|
356
|
-
# How this provider can be authenticated, as data. The builder renders the
|
|
357
|
-
# form from this rather than from a per-provider React component, so a
|
|
358
|
-
# provider or a new method added by an administrator shows up here with no
|
|
359
|
-
# frontend change.
|
|
360
|
-
authMethods {
|
|
361
|
-
key
|
|
362
|
-
displayName
|
|
363
|
-
description
|
|
364
|
-
flow
|
|
365
|
-
authType
|
|
366
|
-
configSchema
|
|
367
|
-
availableScopes
|
|
368
|
-
defaultScopes
|
|
369
|
-
isConfigured
|
|
370
|
-
isEnabled
|
|
371
|
-
displayOrder
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
`;
|
|
375
|
-
const CONNECTION_FIELDS = gql`
|
|
376
|
-
${PROVIDER_FIELDS}
|
|
377
|
-
fragment ConnectionFields on IntegrationConnection {
|
|
378
|
-
id
|
|
379
|
-
name
|
|
380
|
-
description
|
|
381
|
-
providerId
|
|
382
|
-
provider {
|
|
383
|
-
...ProviderFields
|
|
384
|
-
}
|
|
385
|
-
status
|
|
386
|
-
lastHealthCheck
|
|
387
|
-
lastUsedAt
|
|
388
|
-
errorMessage
|
|
389
|
-
externalAccountId
|
|
390
|
-
externalAccountEmail
|
|
391
|
-
externalAccountName
|
|
392
|
-
grantedScopes
|
|
393
|
-
createdBy
|
|
394
|
-
createdAt
|
|
395
|
-
updatedAt
|
|
396
|
-
visibility
|
|
397
|
-
myAccess
|
|
398
|
-
canUse
|
|
399
|
-
}
|
|
400
|
-
`;
|
|
401
|
-
const GET_CONNECTIONS = gql`
|
|
402
|
-
${CONNECTION_FIELDS}
|
|
403
|
-
query GetConnections(
|
|
404
|
-
$filter: ConnectionFilterInput
|
|
405
|
-
$pagination: IntegrationsPaginationInput
|
|
406
|
-
) {
|
|
407
|
-
getConnections(filter: $filter, pagination: $pagination) {
|
|
408
|
-
items {
|
|
409
|
-
...ConnectionFields
|
|
410
|
-
}
|
|
411
|
-
total
|
|
412
|
-
hasMore
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
`;
|
|
416
|
-
const GET_CONNECTION = gql`
|
|
417
|
-
${CONNECTION_FIELDS}
|
|
418
|
-
query GetConnection($id: ID!) {
|
|
419
|
-
getConnection(id: $id) {
|
|
420
|
-
...ConnectionFields
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
`;
|
|
424
|
-
const GET_CONNECTIONS_BY_PROVIDER = gql`
|
|
425
|
-
${CONNECTION_FIELDS}
|
|
426
|
-
query GetConnectionsByProvider(
|
|
427
|
-
$providerId: ID!
|
|
428
|
-
$pagination: IntegrationsPaginationInput
|
|
429
|
-
) {
|
|
430
|
-
getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {
|
|
431
|
-
items {
|
|
432
|
-
...ConnectionFields
|
|
433
|
-
}
|
|
434
|
-
total
|
|
435
|
-
hasMore
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
`;
|
|
439
|
-
const GET_PROVIDERS = gql`
|
|
440
|
-
${PROVIDER_FIELDS}
|
|
441
|
-
query GetProviders(
|
|
442
|
-
$filter: ProviderFilterInput
|
|
443
|
-
$pagination: IntegrationsPaginationInput
|
|
444
|
-
) {
|
|
445
|
-
getProviders(filter: $filter, pagination: $pagination) {
|
|
446
|
-
items {
|
|
447
|
-
...ProviderFields
|
|
448
|
-
}
|
|
449
|
-
total
|
|
450
|
-
hasMore
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
`;
|
|
454
|
-
const INITIATE_OAUTH = gql`
|
|
455
|
-
mutation InitiateOAuth($input: InitiateOAuthInput!) {
|
|
456
|
-
initiateOAuth(input: $input) {
|
|
457
|
-
redirectUrl
|
|
458
|
-
state
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
`;
|
|
462
|
-
const CREATE_CONNECTION = gql`
|
|
463
|
-
${CONNECTION_FIELDS}
|
|
464
|
-
mutation CreateConnection($input: CreateConnectionInput!) {
|
|
465
|
-
createConnection(input: $input) {
|
|
466
|
-
...ConnectionFields
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
`;
|
|
470
|
-
/** Page size the integrations service allows; it clamps larger limits to 100. */
|
|
471
|
-
const CONNECTIONS_PAGE_SIZE = 100;
|
|
472
|
-
/**
|
|
473
|
-
* Every page of a connection list. A picker that accepts any provider (the
|
|
474
|
-
* HTTP Request node) must offer every saved connection, not the first 100.
|
|
475
|
-
*
|
|
476
|
-
* Reads until the server says there is no more, the reported total is reached,
|
|
477
|
-
* or a page adds no connection it has not already returned, so a server that
|
|
478
|
-
* keeps answering `hasMore` without progressing cannot loop forever.
|
|
479
|
-
*/
|
|
480
|
-
async function fetchAllConnectionPages(fetchPage) {
|
|
481
|
-
const items = [];
|
|
482
|
-
const seen = /* @__PURE__ */ new Set();
|
|
483
|
-
let total = 0;
|
|
484
|
-
let hasMore = false;
|
|
485
|
-
for (let offset = 0;; offset += 100) {
|
|
486
|
-
const result = await fetchPage(offset);
|
|
487
|
-
const fresh = (result?.items ?? []).filter((item) => !seen.has(item.id));
|
|
488
|
-
for (const item of fresh) {
|
|
489
|
-
seen.add(item.id);
|
|
490
|
-
items.push(item);
|
|
491
|
-
}
|
|
492
|
-
total = result?.total ?? items.length;
|
|
493
|
-
hasMore = result?.hasMore ?? false;
|
|
494
|
-
if (!hasMore || fresh.length === 0 || items.length >= total) break;
|
|
495
|
-
}
|
|
496
|
-
return {
|
|
497
|
-
items,
|
|
498
|
-
total,
|
|
499
|
-
hasMore: hasMore && items.length < total
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Hook to fetch list of connections from the integrations service.
|
|
504
|
-
*/
|
|
505
|
-
function useConnections(filter) {
|
|
506
|
-
const [connections, setConnections] = useState([]);
|
|
507
|
-
const [total, setTotal] = useState(0);
|
|
508
|
-
const [hasMore, setHasMore] = useState(false);
|
|
509
|
-
const [loading, setLoading] = useState(true);
|
|
510
|
-
const [error, setError] = useState(null);
|
|
511
|
-
const filterKey = JSON.stringify(filter);
|
|
512
|
-
const fetchData = useCallback(async () => {
|
|
513
|
-
setLoading(true);
|
|
514
|
-
setError(null);
|
|
515
|
-
try {
|
|
516
|
-
const client = getFluidGridsClient();
|
|
517
|
-
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
518
|
-
const list = await fetchAllConnectionPages(async (offset) => {
|
|
519
|
-
return (await client.query({
|
|
520
|
-
query: GET_CONNECTIONS,
|
|
521
|
-
variables: {
|
|
522
|
-
filter: parsedFilter,
|
|
523
|
-
pagination: {
|
|
524
|
-
limit: 100,
|
|
525
|
-
offset
|
|
526
|
-
}
|
|
527
|
-
},
|
|
528
|
-
fetchPolicy: "network-only"
|
|
529
|
-
})).data?.getConnections;
|
|
530
|
-
});
|
|
531
|
-
setConnections(list.items);
|
|
532
|
-
setTotal(list.total);
|
|
533
|
-
setHasMore(list.hasMore);
|
|
534
|
-
} catch (err) {
|
|
535
|
-
setError(err);
|
|
536
|
-
} finally {
|
|
537
|
-
setLoading(false);
|
|
538
|
-
}
|
|
539
|
-
}, [filterKey]);
|
|
540
|
-
useEffect(() => {
|
|
541
|
-
fetchData();
|
|
542
|
-
}, [fetchData]);
|
|
543
|
-
return {
|
|
544
|
-
connections,
|
|
545
|
-
total,
|
|
546
|
-
hasMore,
|
|
547
|
-
loading,
|
|
548
|
-
error,
|
|
549
|
-
refetch: fetchData
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Hook to fetch a single connection by ID.
|
|
554
|
-
*/
|
|
555
|
-
function useConnection(connectionId) {
|
|
556
|
-
const [connection, setConnection] = useState(null);
|
|
557
|
-
const [loading, setLoading] = useState(true);
|
|
558
|
-
const [error, setError] = useState(null);
|
|
559
|
-
const fetchData = useCallback(async () => {
|
|
560
|
-
if (!connectionId) {
|
|
561
|
-
setLoading(false);
|
|
562
|
-
return;
|
|
563
|
-
}
|
|
564
|
-
setLoading(true);
|
|
565
|
-
setError(null);
|
|
566
|
-
try {
|
|
567
|
-
const result = await getFluidGridsClient().query({
|
|
568
|
-
query: GET_CONNECTION,
|
|
569
|
-
variables: { id: connectionId },
|
|
570
|
-
fetchPolicy: "cache-first"
|
|
571
|
-
});
|
|
572
|
-
setConnection(result.data?.getConnection ?? null);
|
|
573
|
-
} catch (err) {
|
|
574
|
-
setError(err);
|
|
575
|
-
} finally {
|
|
576
|
-
setLoading(false);
|
|
577
|
-
}
|
|
578
|
-
}, [connectionId]);
|
|
579
|
-
useEffect(() => {
|
|
580
|
-
fetchData();
|
|
581
|
-
}, [fetchData]);
|
|
582
|
-
return {
|
|
583
|
-
connection,
|
|
584
|
-
loading,
|
|
585
|
-
error,
|
|
586
|
-
refetch: fetchData
|
|
587
|
-
};
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* Hook to fetch connections for a specific provider.
|
|
591
|
-
*/
|
|
592
|
-
function useConnectionsByProvider(providerId) {
|
|
593
|
-
const [connections, setConnections] = useState([]);
|
|
594
|
-
const [total, setTotal] = useState(0);
|
|
595
|
-
const [loading, setLoading] = useState(true);
|
|
596
|
-
const [error, setError] = useState(null);
|
|
597
|
-
const fetchData = useCallback(async () => {
|
|
598
|
-
if (!providerId) {
|
|
599
|
-
setLoading(false);
|
|
600
|
-
return;
|
|
601
|
-
}
|
|
602
|
-
setLoading(true);
|
|
603
|
-
setError(null);
|
|
604
|
-
try {
|
|
605
|
-
const result = await getFluidGridsClient().query({
|
|
606
|
-
query: GET_CONNECTIONS_BY_PROVIDER,
|
|
607
|
-
variables: {
|
|
608
|
-
providerId,
|
|
609
|
-
pagination: { limit: 100 }
|
|
610
|
-
},
|
|
611
|
-
fetchPolicy: "network-only"
|
|
612
|
-
});
|
|
613
|
-
setConnections(result.data?.getConnectionsByProvider?.items ?? []);
|
|
614
|
-
setTotal(result.data?.getConnectionsByProvider?.total ?? 0);
|
|
615
|
-
} catch (err) {
|
|
616
|
-
setError(err);
|
|
617
|
-
} finally {
|
|
618
|
-
setLoading(false);
|
|
619
|
-
}
|
|
620
|
-
}, [providerId]);
|
|
621
|
-
useEffect(() => {
|
|
622
|
-
fetchData();
|
|
623
|
-
}, [fetchData]);
|
|
624
|
-
return {
|
|
625
|
-
connections,
|
|
626
|
-
total,
|
|
627
|
-
loading,
|
|
628
|
-
error,
|
|
629
|
-
refetch: fetchData
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* Hook to fetch available integration providers.
|
|
634
|
-
*/
|
|
635
|
-
function useProviders(filter) {
|
|
636
|
-
const [providers, setProviders] = useState([]);
|
|
637
|
-
const [total, setTotal] = useState(0);
|
|
638
|
-
const [loading, setLoading] = useState(true);
|
|
639
|
-
const [error, setError] = useState(null);
|
|
640
|
-
const filterKey = JSON.stringify(filter);
|
|
641
|
-
const fetchData = useCallback(async () => {
|
|
642
|
-
setLoading(true);
|
|
643
|
-
setError(null);
|
|
644
|
-
try {
|
|
645
|
-
const client = getFluidGridsClient();
|
|
646
|
-
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
647
|
-
const result = await client.query({
|
|
648
|
-
query: GET_PROVIDERS,
|
|
649
|
-
variables: {
|
|
650
|
-
filter: parsedFilter,
|
|
651
|
-
pagination: { limit: 100 }
|
|
652
|
-
},
|
|
653
|
-
fetchPolicy: "cache-first"
|
|
654
|
-
});
|
|
655
|
-
setProviders(result.data?.getProviders?.items ?? []);
|
|
656
|
-
setTotal(result.data?.getProviders?.total ?? 0);
|
|
657
|
-
} catch (err) {
|
|
658
|
-
setError(err);
|
|
659
|
-
} finally {
|
|
660
|
-
setLoading(false);
|
|
661
|
-
}
|
|
662
|
-
}, [filterKey]);
|
|
663
|
-
useEffect(() => {
|
|
664
|
-
fetchData();
|
|
665
|
-
}, [fetchData]);
|
|
666
|
-
return {
|
|
667
|
-
providers,
|
|
668
|
-
total,
|
|
669
|
-
loading,
|
|
670
|
-
error,
|
|
671
|
-
refetch: fetchData
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Hook to create a new connection.
|
|
676
|
-
*/
|
|
677
|
-
function useCreateConnection() {
|
|
678
|
-
const [loading, setLoading] = useState(false);
|
|
679
|
-
const [error, setError] = useState(null);
|
|
680
|
-
return {
|
|
681
|
-
createConnection: useCallback(async (input) => {
|
|
682
|
-
setLoading(true);
|
|
683
|
-
setError(null);
|
|
684
|
-
try {
|
|
685
|
-
const client = getFluidGridsClient();
|
|
686
|
-
return throwIfResultError(await client.mutate({
|
|
687
|
-
mutation: CREATE_CONNECTION,
|
|
688
|
-
variables: { input }
|
|
689
|
-
})).data?.createConnection ?? null;
|
|
690
|
-
} catch (err) {
|
|
691
|
-
setError(err);
|
|
692
|
-
return null;
|
|
693
|
-
} finally {
|
|
694
|
-
setLoading(false);
|
|
695
|
-
}
|
|
696
|
-
}, []),
|
|
697
|
-
loading,
|
|
698
|
-
error
|
|
699
|
-
};
|
|
700
|
-
}
|
|
701
|
-
/**
|
|
702
|
-
* Hook to initiate OAuth flow for a connection.
|
|
703
|
-
*/
|
|
704
|
-
function useInitiateOAuth() {
|
|
705
|
-
const [loading, setLoading] = useState(false);
|
|
706
|
-
const [error, setError] = useState(null);
|
|
707
|
-
return {
|
|
708
|
-
initiateOAuth: useCallback(async (input) => {
|
|
709
|
-
setLoading(true);
|
|
710
|
-
setError(null);
|
|
711
|
-
try {
|
|
712
|
-
const client = getFluidGridsClient();
|
|
713
|
-
return throwIfResultError(await client.mutate({
|
|
714
|
-
mutation: INITIATE_OAUTH,
|
|
715
|
-
variables: { input }
|
|
716
|
-
})).data?.initiateOAuth ?? null;
|
|
717
|
-
} catch (err) {
|
|
718
|
-
setError(err);
|
|
719
|
-
return null;
|
|
720
|
-
} finally {
|
|
721
|
-
setLoading(false);
|
|
722
|
-
}
|
|
723
|
-
}, []),
|
|
724
|
-
loading,
|
|
725
|
-
error
|
|
726
|
-
};
|
|
727
|
-
}
|
|
728
|
-
|
|
729
334
|
// src/modules/agent-definitions/hooks/useAgentDefinitions.ts
|
|
730
335
|
/**
|
|
731
336
|
* Agent definitions (BOFF-9962): list, create, update and delete agents, and grant or revoke
|
|
@@ -942,4 +547,4 @@ function useAgentsUsingConnection(connectionId) {
|
|
|
942
547
|
return agents;
|
|
943
548
|
}
|
|
944
549
|
|
|
945
|
-
export {
|
|
550
|
+
export { useNodeSchemaIntrospectionSuspenseQuery as $, useWorkflowRunsQuery as $t, useExecutionLogsSuspenseQuery as A, useTriggerWorkflowMutation as At, useImportWorkflowMutation as B, useWorkflowDefinitionsLazyQuery as Bt, useEventRegistrationsSuspenseQuery as C, useRunLogsQuery as Ct, useExecutionDetailSuspenseQuery as D, useSearchFluidgridsTagsSuspenseQuery as Dt, useExecutionDetailQuery as E, useSearchFluidgridsTagsQuery as Et, useExecutionsListQuery as F, useUsageTimeSeriesQuery as Ft, useNodeEndpointConfigsLazyQuery as G, useWorkflowDefinitionsTagsSuspenseQuery as Gt, useNodeEndpointConfigLazyQuery as H, useWorkflowDefinitionsSuspenseQuery as Ht, useExecutionsListSuspenseQuery as I, useUsageTimeSeriesSuspenseQuery as It, useNodeManifestLazyQuery as J, useWorkflowPinnedDataSuspenseQuery as Jt, useNodeEndpointConfigsQuery as K, useWorkflowPinnedDataLazyQuery as Kt, useFluidgridsEntityTagsLazyQuery as L, useWorkflowDefinitionLazyQuery as Lt, useExecutionStatsQuery as M, useUntagFluidgridsEntityMutation as Mt, useExecutionStatsSuspenseQuery as N, useUpdateWorkflowDefinitionMutation as Nt, useExecutionLogsLazyQuery as O, useTagFluidgridsEntityMutation as Ot, useExecutionsListLazyQuery as P, useUsageTimeSeriesLazyQuery as Pt, useNodeSchemaIntrospectionQuery as Q, useWorkflowRunsLazyQuery as Qt, useFluidgridsEntityTagsQuery as R, useWorkflowDefinitionQuery as Rt, useEventRegistrationsQuery as S, useRunLogsLazyQuery as St, useExecutionDetailLazyQuery as T, useSearchFluidgridsTagsLazyQuery as Tt, useNodeEndpointConfigQuery as U, useWorkflowDefinitionsTagsLazyQuery as Ut, useImportWorkflowTemplateMutation as V, useWorkflowDefinitionsQuery as Vt, useNodeEndpointConfigSuspenseQuery as W, useWorkflowDefinitionsTagsQuery as Wt, useNodeManifestSuspenseQuery as X, useWorkflowRunQuery as Xt, useNodeManifestQuery as Y, useWorkflowRunLazyQuery as Yt, useNodeSchemaIntrospectionLazyQuery as Z, useWorkflowRunSuspenseQuery as Zt, useDashboardSummarySuspenseQuery as _, useRunFromNodeEligibilityLazyQuery as _t, useActiveExecutionsLazyQuery as a, useNodeUsageStatusSuspenseQuery as at, useDuplicateWorkflowMutation as b, useRunFromNodeMutation as bt, useAvailableFluidgridsTagsLazyQuery as c, usePreviewScheduleLazyQuery as ct, useCancelExecutionMutation as d, useRegisterNodeMutation as dt, useWorkflowRunsSuspenseQuery as en, useNodeStatesLazyQuery as et, useCreateFluidgridsTagMutation as f, useRemoveNodeFromWorkflowsMutation as ft, useDashboardSummaryQuery as g, useRetryNodeMutation as gt, useDashboardSummaryLazyQuery as h, useResumeExecutionMutation as ht, useActivateWorkflowDefinitionMutation as i, useNodeUsageStatusQuery as it, useExecutionStatsLazyQuery as j, useUnpinNodeDataMutation as jt, useExecutionLogsQuery as k, useTerminateExecutionMutation as kt, useAvailableFluidgridsTagsQuery as l, usePreviewScheduleQuery as lt, useCreateWorkflowVersionMutation as m, useRestoreWorkflowVersionMutation as mt, useAgentDefinitions as n, useWorkflowVersionsQuery as nn, useNodeStatesSuspenseQuery as nt, useActiveExecutionsQuery as o, usePauseExecutionMutation as ot, useCreateWorkflowDefinitionMutation as p, useReplaceFluidgridsEntityTagsMutation as pt, useNodeEndpointConfigsSuspenseQuery as q, useWorkflowPinnedDataQuery as qt, useAgentsUsingConnection as r, useWorkflowVersionsSuspenseQuery as rn, useNodeUsageStatusLazyQuery as rt, useActiveExecutionsSuspenseQuery as s, usePinNodeDataMutation as st, useAgentDefinitionList as t, useWorkflowVersionsLazyQuery as tn, useNodeStatesQuery as tt, useAvailableFluidgridsTagsSuspenseQuery as u, usePreviewScheduleSuspenseQuery as ut, useDeactivateWorkflowDefinitionMutation as v, useRunFromNodeEligibilityQuery as vt, useExecuteStepMutation as w, useRunLogsSuspenseQuery as wt, useEventRegistrationsLazyQuery as x, useRunLogAppendedSubscription as xt, useDeleteWorkflowDefinitionMutation as y, useRunFromNodeEligibilitySuspenseQuery as yt, useFluidgridsEntityTagsSuspenseQuery as z, useWorkflowDefinitionSuspenseQuery as zt };
|