@burdenoff/fluidgrids-fe-sdk 2026.1111.16 → 2026.1111.18
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/README.md +41 -0
- package/dist/AiStudioPage-BHVEU4Wp.js +774 -0
- package/dist/ApprovalInboxPage-dbBDSJ-f.js +558 -0
- package/dist/DataSinkDashboardPage-1h2QsMzH.js +270 -0
- package/dist/DataTablesPage-BZy2z0LB.js +1690 -0
- package/dist/EntityTagPicker-BqRNsLCQ.js +135 -0
- package/dist/{ExecutionDetailPage-D-0_POAf.js → ExecutionDetailPage-BdcZmLT4.js} +799 -4420
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionsListPage-BCUJoAIE.js +2742 -0
- package/dist/{FailureTriagePanel-BHiduL7A.js → FailureTriagePanel-B9hDQymi.js} +4 -97
- package/dist/{FluidGridsProvider-DmvFADFa.js → FluidGridsProvider-dvZSNtSW.js} +10 -350
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/{HistoryPage-BbUgxx1I.js → HistoryPage-U0tqupBN.js} +6 -4
- package/dist/HumanRequestCard-D-ooVPDn.js +439 -0
- package/dist/{InsightsPage-s6f5bU-8.js → InsightsPage-CALo16eB.js} +17 -328
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/{ManagedAiPolicyAuthority-CGux_DaV.d.ts → ManagedAiPolicyAuthority-DM3t3wNr.d.ts} +1 -5
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/{MissingNodesInstallModal-B-9gHy2K.js → MissingNodesInstallModal-CMybsI8h.js} +3 -2
- package/dist/{NodesPage-ClvhUfbh.js → NodesPage-Bf5PhfBK.js} +7 -3
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/{PublishCustomNodeAction-D2F7oN0S.js → PublishCustomNodeAction-5XXnSA3H.js} +3 -45
- package/dist/QuotaExhaustedDialog-7IFSaLyi.js +54 -0
- package/dist/RunnerStatusPill-Ctg4TJcP.js +187 -0
- package/dist/RunnersPage-CLCOCclc.js +467 -0
- package/dist/{ManagedAiPolicyAuthority-DsSaz-vg.js → SettingsPage-CJLZvv4J.js} +743 -773
- package/dist/SettingsPage-DMHQFj5-.d.ts +9 -0
- package/dist/TagFilterSelect-DCBOH6Ou.js +41 -0
- package/dist/TaskQueuesPage-9VgSnLdL.js +951 -0
- package/dist/TemplateCard-DsC0KNH1.js +1416 -0
- package/dist/{TemplateConfigurationModal-D_Mvgxqa.js → TemplateConfigurationModal-BhGWIzpm.js} +3 -2
- package/dist/{TemplateDetailPanel-DfFfUcOe.js → TemplateDetailPanel-D4cUVr-m.js} +3 -3
- package/dist/TemplatePreview-FayF6jxh.js +231 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/{TemplatesPage-Cku13bav.js → TemplatesPage-CsDNT54N.js} +11 -228
- package/dist/VariablesPage-67WR_lVE.js +949 -0
- package/dist/{VersionDiffDialog-Dq2xlPFI.js → VersionDiffDialog-DSN0mU0f.js} +2 -1
- package/dist/WorkflowBuilder-CPnXEL5J.js +555 -0
- package/dist/{WorkflowSearchRedirect-CaoOOpEl.js → WorkflowBuilder-YXRysvZc.js} +19 -585
- package/dist/{WorkflowProposalCard-8Vr56kQa.js → WorkflowProposalCard-qrEeNyYG.js} +4 -405
- package/dist/WorkflowSearchRedirect-DwDNZ_q5.js +36 -0
- package/dist/WorkflowShareDialog-mbIwRQUY.js +168 -0
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/{WorkflowsList-B2j1Pehb.js → WorkflowsList-DiiGyZkT.js} +12 -6
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/{agentTools-DJ5o2ekg.js → agentTools-8s_25Q_F.js} +3 -2
- package/dist/{ai-usage-D5p7ZeRR.js → ai-usage-glCwHyQz.js} +1 -1
- package/dist/api-BrCHB5oA.js +224 -0
- package/dist/api-C8e0iV-Q.js +55 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/{canvasNoteTools-D3zUdEeg.js → canvasNoteTools-B6pYARgU.js} +2 -2
- package/dist/client-C9XSzSXr.js +1147 -0
- package/dist/code-editor-field-9-GdVE_8.js +111 -0
- package/dist/{codec-client-DstqyzTN.js → codec-client-CJ95Rmqo.js} +1 -1
- package/dist/constants-B2lhWNoN.js +202 -0
- package/dist/constants-XdvUxeWK.d.ts +162 -0
- package/dist/dialog-Cjb4lB4D.js +105 -0
- package/dist/executions.d.ts +1 -1
- package/dist/executions.js +2 -1
- package/dist/feature-flags-DM5myWaD.js +296 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/{flow-builder-DEzT8TQu.js → flow-builder-CZDKRc6f.js} +662 -10716
- package/dist/{node-endpoint-configs-DHFGA5MQ.js → graphql-operation-types-kX-MMjgW.js} +1 -1194
- package/dist/{graphql-types-XcDLtFwU.js → graphql-types-CDKVWH2R.js} +2 -202
- package/dist/history.d.ts +1 -1
- package/dist/history.js +1 -1
- package/dist/{index-DRf25-D3.d.ts → index-6JR2vD9J.d.ts} +33 -215
- package/dist/index-72XFgvbn.d.ts +132 -0
- package/dist/index-BcdtKBM-.d.ts +56 -0
- package/dist/{index-B3BWqafN.d.ts → index-DjiFgEQl.d.ts} +5 -131
- package/dist/index.d.ts +13 -9
- package/dist/index.js +52 -5300
- package/dist/{node-detail-view-LNqeIqN-.js → node-detail-view-CV4ZRwqh.js} +13 -8
- package/dist/node-editor-tab-body-DU-dh35X.js +174 -0
- package/dist/node-endpoint-configs-B5bjNMDW.js +37 -0
- package/dist/node-registry-refresh-Dy0uRg9f.js +84 -0
- package/dist/nodes.d.ts +1 -1
- package/dist/nodes.js +1 -1
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -1
- package/dist/popover-BJHvrFGR.js +472 -0
- package/dist/{quick-config-panel-D3ogsaFL.js → quick-config-panel-ws3pLvbt.js} +3 -2
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/run-display-BycKYSU0.js +46 -0
- package/dist/run-list-links-ByYC0OlV.js +98 -0
- package/dist/schedule-panel-C0mfGQSD.js +7542 -0
- package/dist/settings.d.ts +2 -1
- package/dist/settings.js +2 -1
- package/dist/shared-CMfn30xT.js +196 -0
- package/dist/sidebar-node-editor-CR1PiZO-.js +177 -0
- package/dist/templates.d.ts +1 -1
- package/dist/templates.js +2 -1
- package/dist/theme-provider-B3mIuz2d.js +11 -0
- package/dist/{useAgentDefinitions-NFtLytDR.js → useAgentDefinitions-B0dam3_o.js} +3 -397
- package/dist/useConnections-Cs7LCWEM.js +401 -0
- package/dist/useDurableParity-CzUQMFJ3.js +415 -0
- package/dist/useEntityTags-DhnsZcTl.js +236 -0
- package/dist/{useExecutions-DAzeWHS6.js → useExecutions-9aLuOt1c.js} +4 -3
- package/dist/{useObservability-COCZ0hUS.js → useObservability-CfEw3ZFD.js} +2 -2
- package/dist/{useRunHistory-CsYUbouO.js → useRunHistory-B1xJDwl1.js} +4 -3
- package/dist/{WorkflowShareDialog-6RRDe-_v.js → useWorkflowCodeExport-Bu2QYJzA.js} +7 -210
- package/dist/{useWorkflows-w4Dx2fF2.js → useWorkflows-BlVVu8NM.js} +3 -2
- package/dist/utils-uaL5UVxb.js +65 -0
- package/dist/workflow-builder.d.ts +1 -1
- package/dist/workflow-builder.js +4 -2
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +9 -0
- package/dist/workflow-pages.d.ts +55 -0
- package/dist/workflow-pages.js +113 -0
- package/dist/workflows-list.d.ts +1 -1
- package/dist/workflows-list.js +1 -1
- package/package.json +13 -1
- package/dist/ExecutionDetailPage-MvsnOnE1.d.ts +0 -4
- package/dist/HistoryPage-BqUizaFv.d.ts +0 -3
- package/dist/NodesPage-C97-9K2Y.d.ts +0 -3
- package/dist/TemplatesPage-D0qnXzHh.d.ts +0 -4
- package/dist/WorkflowsList-0d5GSKdh.d.ts +0 -3
- package/dist/agent-form-BvMWhQ42.js +0 -496
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as throwIfResultError, n as getFluidGridsClient } from "./client-C9XSzSXr.js";
|
|
3
|
+
import { $ as DuplicateWorkflowDocument, $n as UntagFluidgridsEntityDocument, A as CreateWorkflowDefinitionDocument, B as DeactivateWorkflowDefinitionDocument, D as CreateFluidgridsTagDocument, Dt as NodeEndpointConfigsDocument, En as SearchFluidgridsTagsDocument, Er as WorkflowDefinitionDocument, Et as NodeEndpointConfigDocument, Gn as TerminateExecutionDocument, L as CreateWorkflowVersionDocument, Lt as PauseExecutionDocument, Mt as NodeStatesDocument, Nt as NodeUsageStatusDocument, Or as WorkflowDefinitionsDocument, Ot as NodeManifestDocument, Qn as UnpinNodeDataDocument, R as DashboardSummaryDocument, Si as WorkflowVersionsDocument, Vr as WorkflowPinnedDataDocument, Vt as PreviewScheduleDocument, W as DeleteWorkflowDefinitionDocument, Zt as RemoveNodeFromWorkflowsDocument, _n as RunFromNodeDocument, _t as FluidgridsEntityTagsDocument, at as ExecuteStepDocument, bt as ImportWorkflowDocument, cn as RetryNodeDocument, ct as ExecutionStatsDocument, d as AvailableFluidgridsTagsDocument, en as ReplaceFluidgridsEntityTagsDocument, fr as UsageTimeSeriesDocument, i as ActiveExecutionsDocument, it as EventRegistrationsDocument, jt as NodeSchemaIntrospectionDocument, kr as WorkflowDefinitionsTagsDocument, lt as ExecutionsListDocument, n as ActivateWorkflowDefinitionDocument, on as RestoreWorkflowVersionDocument, or as UpdateWorkflowDefinitionDocument, ot as ExecutionDetailDocument, qn as TriggerWorkflowDocument, qr as WorkflowRunDocument, qt as RegisterNodeDocument, ri as WorkflowRunsDocument, sn as ResumeExecutionDocument, st as ExecutionLogsDocument, v as CancelExecutionDocument, vn as RunFromNodeEligibilityDocument, xn as RunLogsDocument, xt as ImportWorkflowTemplateDocument, yn as RunLogAppendedDocument, zn as TagFluidgridsEntityDocument, zt as PinNodeDataDocument } from "./graphql-operation-types-kX-MMjgW.js";
|
|
3
4
|
import { useCallback, useEffect, useState } from "react";
|
|
4
5
|
import { useLazyQuery, useMutation, useQuery, useSubscription, useSuspenseQuery } from "@apollo/client/react";
|
|
5
6
|
import { gql } from "@apollo/client";
|
|
@@ -330,401 +331,6 @@ function usePreviewScheduleSuspenseQuery(baseOptions) {
|
|
|
330
331
|
return useSuspenseQuery(PreviewScheduleDocument, baseOptions);
|
|
331
332
|
}
|
|
332
333
|
|
|
333
|
-
// src/modules/connections/hooks/useConnections.ts
|
|
334
|
-
/**
|
|
335
|
-
* Custom hooks for fetching connections from the integrations service.
|
|
336
|
-
*
|
|
337
|
-
* These hooks query the wspace-integrations-svc via the federated GraphQL gateway.
|
|
338
|
-
* Connections replace the legacy credentials system for third-party authentication.
|
|
339
|
-
*/
|
|
340
|
-
const PROVIDER_FIELDS = gql`
|
|
341
|
-
fragment ProviderFields on IntegrationProvider {
|
|
342
|
-
id
|
|
343
|
-
key
|
|
344
|
-
name
|
|
345
|
-
description
|
|
346
|
-
category
|
|
347
|
-
authType
|
|
348
|
-
icon
|
|
349
|
-
color
|
|
350
|
-
website
|
|
351
|
-
docsUrl
|
|
352
|
-
isBuiltIn
|
|
353
|
-
isEnabled
|
|
354
|
-
availableScopes
|
|
355
|
-
# How this provider can be authenticated, as data. The builder renders the
|
|
356
|
-
# form from this rather than from a per-provider React component, so a
|
|
357
|
-
# provider or a new method added by an administrator shows up here with no
|
|
358
|
-
# frontend change.
|
|
359
|
-
authMethods {
|
|
360
|
-
key
|
|
361
|
-
displayName
|
|
362
|
-
description
|
|
363
|
-
flow
|
|
364
|
-
authType
|
|
365
|
-
configSchema
|
|
366
|
-
availableScopes
|
|
367
|
-
defaultScopes
|
|
368
|
-
isConfigured
|
|
369
|
-
isEnabled
|
|
370
|
-
displayOrder
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
`;
|
|
374
|
-
const CONNECTION_FIELDS = gql`
|
|
375
|
-
${PROVIDER_FIELDS}
|
|
376
|
-
fragment ConnectionFields on IntegrationConnection {
|
|
377
|
-
id
|
|
378
|
-
name
|
|
379
|
-
description
|
|
380
|
-
providerId
|
|
381
|
-
provider {
|
|
382
|
-
...ProviderFields
|
|
383
|
-
}
|
|
384
|
-
status
|
|
385
|
-
lastHealthCheck
|
|
386
|
-
lastUsedAt
|
|
387
|
-
errorMessage
|
|
388
|
-
externalAccountId
|
|
389
|
-
externalAccountEmail
|
|
390
|
-
externalAccountName
|
|
391
|
-
grantedScopes
|
|
392
|
-
createdBy
|
|
393
|
-
createdAt
|
|
394
|
-
updatedAt
|
|
395
|
-
visibility
|
|
396
|
-
myAccess
|
|
397
|
-
canUse
|
|
398
|
-
}
|
|
399
|
-
`;
|
|
400
|
-
const GET_CONNECTIONS = gql`
|
|
401
|
-
${CONNECTION_FIELDS}
|
|
402
|
-
query GetConnections(
|
|
403
|
-
$filter: ConnectionFilterInput
|
|
404
|
-
$pagination: IntegrationsPaginationInput
|
|
405
|
-
) {
|
|
406
|
-
getConnections(filter: $filter, pagination: $pagination) {
|
|
407
|
-
items {
|
|
408
|
-
...ConnectionFields
|
|
409
|
-
}
|
|
410
|
-
total
|
|
411
|
-
hasMore
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
`;
|
|
415
|
-
const GET_CONNECTION = gql`
|
|
416
|
-
${CONNECTION_FIELDS}
|
|
417
|
-
query GetConnection($id: ID!) {
|
|
418
|
-
getConnection(id: $id) {
|
|
419
|
-
...ConnectionFields
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
`;
|
|
423
|
-
const GET_CONNECTIONS_BY_PROVIDER = gql`
|
|
424
|
-
${CONNECTION_FIELDS}
|
|
425
|
-
query GetConnectionsByProvider(
|
|
426
|
-
$providerId: ID!
|
|
427
|
-
$pagination: IntegrationsPaginationInput
|
|
428
|
-
) {
|
|
429
|
-
getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {
|
|
430
|
-
items {
|
|
431
|
-
...ConnectionFields
|
|
432
|
-
}
|
|
433
|
-
total
|
|
434
|
-
hasMore
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
`;
|
|
438
|
-
const GET_PROVIDERS = gql`
|
|
439
|
-
${PROVIDER_FIELDS}
|
|
440
|
-
query GetProviders(
|
|
441
|
-
$filter: ProviderFilterInput
|
|
442
|
-
$pagination: IntegrationsPaginationInput
|
|
443
|
-
) {
|
|
444
|
-
getProviders(filter: $filter, pagination: $pagination) {
|
|
445
|
-
items {
|
|
446
|
-
...ProviderFields
|
|
447
|
-
}
|
|
448
|
-
total
|
|
449
|
-
hasMore
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
`;
|
|
453
|
-
const INITIATE_OAUTH = gql`
|
|
454
|
-
mutation InitiateOAuth($input: InitiateOAuthInput!) {
|
|
455
|
-
initiateOAuth(input: $input) {
|
|
456
|
-
redirectUrl
|
|
457
|
-
state
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
`;
|
|
461
|
-
const CREATE_CONNECTION = gql`
|
|
462
|
-
${CONNECTION_FIELDS}
|
|
463
|
-
mutation CreateConnection($input: CreateConnectionInput!) {
|
|
464
|
-
createConnection(input: $input) {
|
|
465
|
-
...ConnectionFields
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
`;
|
|
469
|
-
/** Page size the integrations service allows; it clamps larger limits to 100. */
|
|
470
|
-
const CONNECTIONS_PAGE_SIZE = 100;
|
|
471
|
-
/**
|
|
472
|
-
* Every page of a connection list. A picker that accepts any provider (the
|
|
473
|
-
* HTTP Request node) must offer every saved connection, not the first 100.
|
|
474
|
-
*
|
|
475
|
-
* Reads until the server says there is no more, the reported total is reached,
|
|
476
|
-
* or a page adds no connection it has not already returned, so a server that
|
|
477
|
-
* keeps answering `hasMore` without progressing cannot loop forever.
|
|
478
|
-
*/
|
|
479
|
-
async function fetchAllConnectionPages(fetchPage) {
|
|
480
|
-
const items = [];
|
|
481
|
-
const seen = /* @__PURE__ */ new Set();
|
|
482
|
-
let total = 0;
|
|
483
|
-
let hasMore = false;
|
|
484
|
-
for (let offset = 0;; offset += 100) {
|
|
485
|
-
const result = await fetchPage(offset);
|
|
486
|
-
const fresh = (result?.items ?? []).filter((item) => !seen.has(item.id));
|
|
487
|
-
for (const item of fresh) {
|
|
488
|
-
seen.add(item.id);
|
|
489
|
-
items.push(item);
|
|
490
|
-
}
|
|
491
|
-
total = result?.total ?? items.length;
|
|
492
|
-
hasMore = result?.hasMore ?? false;
|
|
493
|
-
if (!hasMore || fresh.length === 0 || items.length >= total) break;
|
|
494
|
-
}
|
|
495
|
-
return {
|
|
496
|
-
items,
|
|
497
|
-
total,
|
|
498
|
-
hasMore: hasMore && items.length < total
|
|
499
|
-
};
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* Hook to fetch list of connections from the integrations service.
|
|
503
|
-
*/
|
|
504
|
-
function useConnections(filter) {
|
|
505
|
-
const [connections, setConnections] = useState([]);
|
|
506
|
-
const [total, setTotal] = useState(0);
|
|
507
|
-
const [hasMore, setHasMore] = useState(false);
|
|
508
|
-
const [loading, setLoading] = useState(true);
|
|
509
|
-
const [error, setError] = useState(null);
|
|
510
|
-
const filterKey = JSON.stringify(filter);
|
|
511
|
-
const fetchData = useCallback(async () => {
|
|
512
|
-
setLoading(true);
|
|
513
|
-
setError(null);
|
|
514
|
-
try {
|
|
515
|
-
const client = getFluidGridsClient();
|
|
516
|
-
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
517
|
-
const list = await fetchAllConnectionPages(async (offset) => {
|
|
518
|
-
return (await client.query({
|
|
519
|
-
query: GET_CONNECTIONS,
|
|
520
|
-
variables: {
|
|
521
|
-
filter: parsedFilter,
|
|
522
|
-
pagination: {
|
|
523
|
-
limit: 100,
|
|
524
|
-
offset
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
fetchPolicy: "network-only"
|
|
528
|
-
})).data?.getConnections;
|
|
529
|
-
});
|
|
530
|
-
setConnections(list.items);
|
|
531
|
-
setTotal(list.total);
|
|
532
|
-
setHasMore(list.hasMore);
|
|
533
|
-
} catch (err) {
|
|
534
|
-
setError(err);
|
|
535
|
-
} finally {
|
|
536
|
-
setLoading(false);
|
|
537
|
-
}
|
|
538
|
-
}, [filterKey]);
|
|
539
|
-
useEffect(() => {
|
|
540
|
-
fetchData();
|
|
541
|
-
}, [fetchData]);
|
|
542
|
-
return {
|
|
543
|
-
connections,
|
|
544
|
-
total,
|
|
545
|
-
hasMore,
|
|
546
|
-
loading,
|
|
547
|
-
error,
|
|
548
|
-
refetch: fetchData
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
552
|
-
* Hook to fetch a single connection by ID.
|
|
553
|
-
*/
|
|
554
|
-
function useConnection(connectionId) {
|
|
555
|
-
const [connection, setConnection] = useState(null);
|
|
556
|
-
const [loading, setLoading] = useState(true);
|
|
557
|
-
const [error, setError] = useState(null);
|
|
558
|
-
const fetchData = useCallback(async () => {
|
|
559
|
-
if (!connectionId) {
|
|
560
|
-
setLoading(false);
|
|
561
|
-
return;
|
|
562
|
-
}
|
|
563
|
-
setLoading(true);
|
|
564
|
-
setError(null);
|
|
565
|
-
try {
|
|
566
|
-
const result = await getFluidGridsClient().query({
|
|
567
|
-
query: GET_CONNECTION,
|
|
568
|
-
variables: { id: connectionId },
|
|
569
|
-
fetchPolicy: "cache-first"
|
|
570
|
-
});
|
|
571
|
-
setConnection(result.data?.getConnection ?? null);
|
|
572
|
-
} catch (err) {
|
|
573
|
-
setError(err);
|
|
574
|
-
} finally {
|
|
575
|
-
setLoading(false);
|
|
576
|
-
}
|
|
577
|
-
}, [connectionId]);
|
|
578
|
-
useEffect(() => {
|
|
579
|
-
fetchData();
|
|
580
|
-
}, [fetchData]);
|
|
581
|
-
return {
|
|
582
|
-
connection,
|
|
583
|
-
loading,
|
|
584
|
-
error,
|
|
585
|
-
refetch: fetchData
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
* Hook to fetch connections for a specific provider.
|
|
590
|
-
*/
|
|
591
|
-
function useConnectionsByProvider(providerId) {
|
|
592
|
-
const [connections, setConnections] = useState([]);
|
|
593
|
-
const [total, setTotal] = useState(0);
|
|
594
|
-
const [loading, setLoading] = useState(true);
|
|
595
|
-
const [error, setError] = useState(null);
|
|
596
|
-
const fetchData = useCallback(async () => {
|
|
597
|
-
if (!providerId) {
|
|
598
|
-
setLoading(false);
|
|
599
|
-
return;
|
|
600
|
-
}
|
|
601
|
-
setLoading(true);
|
|
602
|
-
setError(null);
|
|
603
|
-
try {
|
|
604
|
-
const result = await getFluidGridsClient().query({
|
|
605
|
-
query: GET_CONNECTIONS_BY_PROVIDER,
|
|
606
|
-
variables: {
|
|
607
|
-
providerId,
|
|
608
|
-
pagination: { limit: 100 }
|
|
609
|
-
},
|
|
610
|
-
fetchPolicy: "network-only"
|
|
611
|
-
});
|
|
612
|
-
setConnections(result.data?.getConnectionsByProvider?.items ?? []);
|
|
613
|
-
setTotal(result.data?.getConnectionsByProvider?.total ?? 0);
|
|
614
|
-
} catch (err) {
|
|
615
|
-
setError(err);
|
|
616
|
-
} finally {
|
|
617
|
-
setLoading(false);
|
|
618
|
-
}
|
|
619
|
-
}, [providerId]);
|
|
620
|
-
useEffect(() => {
|
|
621
|
-
fetchData();
|
|
622
|
-
}, [fetchData]);
|
|
623
|
-
return {
|
|
624
|
-
connections,
|
|
625
|
-
total,
|
|
626
|
-
loading,
|
|
627
|
-
error,
|
|
628
|
-
refetch: fetchData
|
|
629
|
-
};
|
|
630
|
-
}
|
|
631
|
-
/**
|
|
632
|
-
* Hook to fetch available integration providers.
|
|
633
|
-
*/
|
|
634
|
-
function useProviders(filter) {
|
|
635
|
-
const [providers, setProviders] = useState([]);
|
|
636
|
-
const [total, setTotal] = useState(0);
|
|
637
|
-
const [loading, setLoading] = useState(true);
|
|
638
|
-
const [error, setError] = useState(null);
|
|
639
|
-
const filterKey = JSON.stringify(filter);
|
|
640
|
-
const fetchData = useCallback(async () => {
|
|
641
|
-
setLoading(true);
|
|
642
|
-
setError(null);
|
|
643
|
-
try {
|
|
644
|
-
const client = getFluidGridsClient();
|
|
645
|
-
const parsedFilter = filterKey ? JSON.parse(filterKey) : void 0;
|
|
646
|
-
const result = await client.query({
|
|
647
|
-
query: GET_PROVIDERS,
|
|
648
|
-
variables: {
|
|
649
|
-
filter: parsedFilter,
|
|
650
|
-
pagination: { limit: 100 }
|
|
651
|
-
},
|
|
652
|
-
fetchPolicy: "cache-first"
|
|
653
|
-
});
|
|
654
|
-
setProviders(result.data?.getProviders?.items ?? []);
|
|
655
|
-
setTotal(result.data?.getProviders?.total ?? 0);
|
|
656
|
-
} catch (err) {
|
|
657
|
-
setError(err);
|
|
658
|
-
} finally {
|
|
659
|
-
setLoading(false);
|
|
660
|
-
}
|
|
661
|
-
}, [filterKey]);
|
|
662
|
-
useEffect(() => {
|
|
663
|
-
fetchData();
|
|
664
|
-
}, [fetchData]);
|
|
665
|
-
return {
|
|
666
|
-
providers,
|
|
667
|
-
total,
|
|
668
|
-
loading,
|
|
669
|
-
error,
|
|
670
|
-
refetch: fetchData
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* Hook to create a new connection.
|
|
675
|
-
*/
|
|
676
|
-
function useCreateConnection() {
|
|
677
|
-
const [loading, setLoading] = useState(false);
|
|
678
|
-
const [error, setError] = useState(null);
|
|
679
|
-
return {
|
|
680
|
-
createConnection: useCallback(async (input) => {
|
|
681
|
-
setLoading(true);
|
|
682
|
-
setError(null);
|
|
683
|
-
try {
|
|
684
|
-
const client = getFluidGridsClient();
|
|
685
|
-
return throwIfResultError(await client.mutate({
|
|
686
|
-
mutation: CREATE_CONNECTION,
|
|
687
|
-
variables: { input }
|
|
688
|
-
})).data?.createConnection ?? null;
|
|
689
|
-
} catch (err) {
|
|
690
|
-
setError(err);
|
|
691
|
-
return null;
|
|
692
|
-
} finally {
|
|
693
|
-
setLoading(false);
|
|
694
|
-
}
|
|
695
|
-
}, []),
|
|
696
|
-
loading,
|
|
697
|
-
error
|
|
698
|
-
};
|
|
699
|
-
}
|
|
700
|
-
/**
|
|
701
|
-
* Hook to initiate OAuth flow for a connection.
|
|
702
|
-
*/
|
|
703
|
-
function useInitiateOAuth() {
|
|
704
|
-
const [loading, setLoading] = useState(false);
|
|
705
|
-
const [error, setError] = useState(null);
|
|
706
|
-
return {
|
|
707
|
-
initiateOAuth: useCallback(async (input) => {
|
|
708
|
-
setLoading(true);
|
|
709
|
-
setError(null);
|
|
710
|
-
try {
|
|
711
|
-
const client = getFluidGridsClient();
|
|
712
|
-
return throwIfResultError(await client.mutate({
|
|
713
|
-
mutation: INITIATE_OAUTH,
|
|
714
|
-
variables: { input }
|
|
715
|
-
})).data?.initiateOAuth ?? null;
|
|
716
|
-
} catch (err) {
|
|
717
|
-
setError(err);
|
|
718
|
-
return null;
|
|
719
|
-
} finally {
|
|
720
|
-
setLoading(false);
|
|
721
|
-
}
|
|
722
|
-
}, []),
|
|
723
|
-
loading,
|
|
724
|
-
error
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
|
|
728
334
|
// src/modules/agent-definitions/hooks/useAgentDefinitions.ts
|
|
729
335
|
/**
|
|
730
336
|
* Agent definitions (BOFF-9962): list, create, update and delete agents, and grant or revoke
|
|
@@ -941,4 +547,4 @@ function useAgentsUsingConnection(connectionId) {
|
|
|
941
547
|
return agents;
|
|
942
548
|
}
|
|
943
549
|
|
|
944
|
-
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 };
|