@elevasis/ui 1.3.1 → 1.3.3
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/api/index.js +1 -1
- package/dist/auth/guards/AdminGuard.d.ts +32 -0
- package/dist/auth/guards/AdminGuard.d.ts.map +1 -0
- package/dist/auth/guards/ProtectedRoute.d.ts +60 -0
- package/dist/auth/guards/ProtectedRoute.d.ts.map +1 -0
- package/dist/auth/guards/__tests__/AdminGuard.test.d.ts +12 -0
- package/dist/auth/guards/__tests__/AdminGuard.test.d.ts.map +1 -0
- package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts +14 -0
- package/dist/auth/guards/__tests__/ProtectedRoute.test.d.ts.map +1 -0
- package/dist/auth/index.d.ts +14 -174
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-A3MCANC6.js → chunk-6IX5JZEH.js} +110 -50
- package/dist/chunk-GIFAF5ZS.js +313 -0
- package/dist/chunk-JQLT6HBI.js +850 -0
- package/dist/chunk-LFYO3MDC.js +58 -0
- package/dist/{chunk-72HOBFMP.js → chunk-LTQAAIGE.js} +3 -3
- package/dist/{chunk-JBFFCZI4.js → chunk-U34YGJQB.js} +1 -93
- package/dist/components/index.d.ts +1 -1353
- package/dist/components/index.js +1 -20
- package/dist/components/navigation/index.d.ts +2 -32
- package/dist/components/navigation/index.js +1 -29
- package/dist/execution/index.d.ts +63 -231
- package/dist/execution/index.js +1 -4
- package/dist/graph/index.css +0 -1
- package/dist/graph/index.d.ts +4 -203
- package/dist/graph/index.js +1 -1
- package/dist/hooks/command-queue/index.d.ts +7 -0
- package/dist/hooks/command-queue/index.d.ts.map +1 -0
- package/dist/hooks/command-queue/useCommandQueue.d.ts +33 -0
- package/dist/hooks/command-queue/useCommandQueue.d.ts.map +1 -0
- package/dist/hooks/command-queue/useCommandQueueTotals.d.ts +17 -0
- package/dist/hooks/command-queue/useCommandQueueTotals.d.ts.map +1 -0
- package/dist/hooks/command-queue/useDeleteTask.d.ts +5 -0
- package/dist/hooks/command-queue/useDeleteTask.d.ts.map +1 -0
- package/dist/hooks/command-queue/usePatchTask.d.ts +6 -0
- package/dist/hooks/command-queue/usePatchTask.d.ts.map +1 -0
- package/dist/hooks/command-queue/useSubmitAction.d.ts +29 -0
- package/dist/hooks/command-queue/useSubmitAction.d.ts.map +1 -0
- package/dist/hooks/executions/index.d.ts +16 -0
- package/dist/hooks/executions/index.d.ts.map +1 -0
- package/dist/hooks/executions/useBulkDeleteExecutions.d.ts +15 -0
- package/dist/hooks/executions/useBulkDeleteExecutions.d.ts.map +1 -0
- package/dist/hooks/executions/useCancelExecution.d.ts +20 -0
- package/dist/hooks/executions/useCancelExecution.d.ts.map +1 -0
- package/dist/hooks/executions/useDeleteExecution.d.ts +13 -0
- package/dist/hooks/executions/useDeleteExecution.d.ts.map +1 -0
- package/dist/hooks/executions/useExecuteAsync.d.ts +21 -0
- package/dist/hooks/executions/useExecuteAsync.d.ts.map +1 -0
- package/dist/hooks/executions/useExecution.d.ts +10 -0
- package/dist/hooks/executions/useExecution.d.ts.map +1 -0
- package/dist/hooks/executions/useExecutions.d.ts +16 -0
- package/dist/hooks/executions/useExecutions.d.ts.map +1 -0
- package/dist/hooks/executions/useResourceDefinition.d.ts +9 -0
- package/dist/hooks/executions/useResourceDefinition.d.ts.map +1 -0
- package/dist/hooks/executions/useResources.d.ts +15 -0
- package/dist/hooks/executions/useResources.d.ts.map +1 -0
- package/dist/hooks/executions/useRetryExecution.d.ts +16 -0
- package/dist/hooks/executions/useRetryExecution.d.ts.map +1 -0
- package/dist/hooks/feature-access/createUseFeatureAccess.d.ts +44 -0
- package/dist/hooks/feature-access/createUseFeatureAccess.d.ts.map +1 -0
- package/dist/hooks/feature-access/index.d.ts +2 -0
- package/dist/hooks/feature-access/index.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +11 -4554
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +2 -4
- package/dist/hooks/monitoring/index.d.ts +9 -0
- package/dist/hooks/monitoring/index.d.ts.map +1 -0
- package/dist/hooks/monitoring/useActivities.d.ts +52 -0
- package/dist/hooks/monitoring/useActivities.d.ts.map +1 -0
- package/dist/hooks/monitoring/useCostSummary.d.ts +7 -0
- package/dist/hooks/monitoring/useCostSummary.d.ts.map +1 -0
- package/dist/hooks/monitoring/useExecutionHealth.d.ts +10 -0
- package/dist/hooks/monitoring/useExecutionHealth.d.ts.map +1 -0
- package/dist/hooks/monitoring/useExecutionLogs.d.ts +56 -0
- package/dist/hooks/monitoring/useExecutionLogs.d.ts.map +1 -0
- package/dist/hooks/monitoring/useNotifications.d.ts +11 -0
- package/dist/hooks/monitoring/useNotifications.d.ts.map +1 -0
- package/dist/hooks/notifications/index.d.ts +8 -0
- package/dist/hooks/notifications/index.d.ts.map +1 -0
- package/dist/hooks/notifications/useMarkAllAsRead.d.ts +2 -0
- package/dist/hooks/notifications/useMarkAllAsRead.d.ts.map +1 -0
- package/dist/hooks/notifications/useMarkAsRead.d.ts +2 -0
- package/dist/hooks/notifications/useMarkAsRead.d.ts.map +1 -0
- package/dist/hooks/notifications/useNotificationCount.d.ts +8 -0
- package/dist/hooks/notifications/useNotificationCount.d.ts.map +1 -0
- package/dist/hooks/observability/index.d.ts +19 -0
- package/dist/hooks/observability/index.d.ts.map +1 -0
- package/dist/hooks/observability/useBusinessImpact.d.ts +9 -0
- package/dist/hooks/observability/useBusinessImpact.d.ts.map +1 -0
- package/dist/hooks/observability/useCostBreakdown.d.ts +10 -0
- package/dist/hooks/observability/useCostBreakdown.d.ts.map +1 -0
- package/dist/hooks/observability/useCostByModel.d.ts +3 -0
- package/dist/hooks/observability/useCostByModel.d.ts.map +1 -0
- package/dist/hooks/observability/useCostTrends.d.ts +3 -0
- package/dist/hooks/observability/useCostTrends.d.ts.map +1 -0
- package/dist/hooks/observability/useDashboardMetrics.d.ts +3 -0
- package/dist/hooks/observability/useDashboardMetrics.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorAnalysis.d.ts +7 -0
- package/dist/hooks/observability/useErrorAnalysis.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorDetails.d.ts +20 -0
- package/dist/hooks/observability/useErrorDetails.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorDistribution.d.ts +12 -0
- package/dist/hooks/observability/useErrorDistribution.d.ts.map +1 -0
- package/dist/hooks/observability/useErrorTrends.d.ts +12 -0
- package/dist/hooks/observability/useErrorTrends.d.ts.map +1 -0
- package/dist/hooks/observability/useResolveError.d.ts +17 -0
- package/dist/hooks/observability/useResolveError.d.ts.map +1 -0
- package/dist/hooks/observability/useTopFailingResources.d.ts +13 -0
- package/dist/hooks/observability/useTopFailingResources.d.ts.map +1 -0
- package/dist/hooks/published.d.ts +19 -4279
- package/dist/hooks/published.d.ts.map +1 -0
- package/dist/hooks/published.js +367 -4
- package/dist/hooks/scheduling/index.d.ts +5 -0
- package/dist/hooks/scheduling/index.d.ts.map +1 -0
- package/dist/hooks/scheduling/useSchedules.d.ts +185 -0
- package/dist/hooks/scheduling/useSchedules.d.ts.map +1 -0
- package/dist/hooks/sessions/index.d.ts +8 -0
- package/dist/hooks/sessions/index.d.ts.map +1 -0
- package/dist/hooks/sessions/useSessionExecutions.d.ts +13 -0
- package/dist/hooks/sessions/useSessionExecutions.d.ts.map +1 -0
- package/dist/hooks/sessions/useSessionMessages.d.ts +7 -0
- package/dist/hooks/sessions/useSessionMessages.d.ts.map +1 -0
- package/dist/hooks/sessions/useSessions.d.ts +26 -0
- package/dist/hooks/sessions/useSessions.d.ts.map +1 -0
- package/dist/index.css +0 -118
- package/dist/index.d.ts +15 -7889
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1119 -24
- package/dist/initialization/InitializationProvider.d.ts +48 -0
- package/dist/initialization/InitializationProvider.d.ts.map +1 -0
- package/dist/initialization/hooks/useAppInitialization.d.ts +32 -0
- package/dist/initialization/hooks/useAppInitialization.d.ts.map +1 -0
- package/dist/initialization/index.d.ts +22 -2361
- package/dist/initialization/index.d.ts.map +1 -0
- package/dist/initialization/index.js +1 -1
- package/dist/organization/context/OrganizationProvider.d.ts +20 -0
- package/dist/organization/context/OrganizationProvider.d.ts.map +1 -0
- package/dist/organization/hooks/useOrgInitialization.d.ts +56 -0
- package/dist/organization/hooks/useOrgInitialization.d.ts.map +1 -0
- package/dist/organization/index.d.ts +21 -283
- package/dist/organization/index.d.ts.map +1 -0
- package/dist/organization/index.js +3 -3
- package/dist/profile/context/ProfileProvider.d.ts +27 -0
- package/dist/profile/context/ProfileProvider.d.ts.map +1 -0
- package/dist/profile/hooks/useUserProfile.d.ts +31 -0
- package/dist/profile/hooks/useUserProfile.d.ts.map +1 -0
- package/dist/profile/index.d.ts +14 -2290
- package/dist/profile/index.d.ts.map +1 -0
- package/dist/provider/CoreAuthKitInner.d.ts +12 -0
- package/dist/provider/CoreAuthKitInner.d.ts.map +1 -0
- package/dist/provider/ElevasisCoreProvider.d.ts +39 -0
- package/dist/provider/ElevasisCoreProvider.d.ts.map +1 -0
- package/dist/provider/ElevasisServiceContext.d.ts +31 -0
- package/dist/provider/ElevasisServiceContext.d.ts.map +1 -0
- package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts +2 -0
- package/dist/provider/__tests__/CoreAuthKitInner.test.d.ts.map +1 -0
- package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts +2 -0
- package/dist/provider/__tests__/ElevasisCoreProvider.test.d.ts.map +1 -0
- package/dist/provider/index.d.ts +7 -372
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +3 -12
- package/dist/provider/published.d.ts +9 -263
- package/dist/provider/published.d.ts.map +1 -0
- package/dist/provider/published.js +5 -5
- package/dist/provider/types.d.ts +143 -0
- package/dist/provider/types.d.ts.map +1 -0
- package/dist/provider/types.js +1 -0
- package/dist/sdk-barrel.d.ts +20 -0
- package/dist/sdk-barrel.d.ts.map +1 -0
- package/dist/supabase/index.d.ts +0 -255
- package/dist/theme/cssVariables.d.ts +12 -0
- package/dist/theme/cssVariables.d.ts.map +1 -0
- package/dist/theme/cssVariables.js +93 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/presets/__tests__/getPreset.test.d.ts +2 -0
- package/dist/theme/presets/__tests__/getPreset.test.d.ts.map +1 -0
- package/dist/theme/presets/abyss.d.ts +3 -0
- package/dist/theme/presets/abyss.d.ts.map +1 -0
- package/dist/theme/presets/abyss.js +54 -0
- package/dist/theme/presets/aurora.d.ts +8 -0
- package/dist/theme/presets/aurora.d.ts.map +1 -0
- package/dist/theme/presets/aurora.js +59 -0
- package/dist/theme/presets/canopy.d.ts +3 -0
- package/dist/theme/presets/canopy.d.ts.map +1 -0
- package/dist/theme/presets/canopy.js +58 -0
- package/dist/theme/presets/cyber-flux.d.ts +8 -0
- package/dist/theme/presets/cyber-flux.d.ts.map +1 -0
- package/dist/theme/presets/cyber-flux.js +66 -0
- package/dist/theme/presets/cyber-strike.d.ts +9 -0
- package/dist/theme/presets/cyber-strike.d.ts.map +1 -0
- package/dist/theme/presets/cyber-strike.js +62 -0
- package/dist/theme/presets/cyber-void.d.ts +8 -0
- package/dist/theme/presets/cyber-void.d.ts.map +1 -0
- package/dist/theme/presets/cyber-void.js +62 -0
- package/dist/theme/presets/cyber-volt.d.ts +8 -0
- package/dist/theme/presets/cyber-volt.d.ts.map +1 -0
- package/dist/theme/presets/cyber-volt.js +66 -0
- package/dist/theme/presets/default.d.ts +4 -0
- package/dist/theme/presets/default.d.ts.map +1 -0
- package/dist/theme/presets/ember.d.ts +8 -0
- package/dist/theme/presets/ember.d.ts.map +1 -0
- package/dist/theme/presets/ember.js +63 -0
- package/dist/theme/presets/honey.d.ts +3 -0
- package/dist/theme/presets/honey.d.ts.map +1 -0
- package/dist/theme/presets/honey.js +62 -0
- package/dist/theme/presets/index.d.ts +6 -0
- package/dist/theme/presets/index.d.ts.map +1 -0
- package/dist/theme/presets/index.js +39 -0
- package/dist/theme/presets/midnight.d.ts +8 -0
- package/dist/theme/presets/midnight.d.ts.map +1 -0
- package/dist/theme/presets/midnight.js +68 -0
- package/dist/theme/presets/obsidian.d.ts +3 -0
- package/dist/theme/presets/obsidian.d.ts.map +1 -0
- package/dist/theme/presets/obsidian.js +56 -0
- package/dist/theme/presets/regal.d.ts +8 -0
- package/dist/theme/presets/regal.d.ts.map +1 -0
- package/dist/theme/presets/regal.js +63 -0
- package/dist/theme/presets/rose-gold.d.ts +8 -0
- package/dist/theme/presets/rose-gold.d.ts.map +1 -0
- package/dist/theme/presets/rose-gold.js +63 -0
- package/dist/theme/presets/slate.d.ts +3 -0
- package/dist/theme/presets/slate.d.ts.map +1 -0
- package/dist/theme/presets/slate.js +56 -0
- package/dist/theme/presets/tactical.d.ts +8 -0
- package/dist/theme/presets/tactical.d.ts.map +1 -0
- package/dist/theme/presets/tactical.js +57 -0
- package/dist/theme/presets/types.d.ts +26 -0
- package/dist/theme/presets/types.d.ts.map +1 -0
- package/dist/theme/presets/types.js +1 -0
- package/dist/utils/index.d.ts +1 -22
- package/dist/utils/index.js +1 -1
- package/package.json +4 -52
- package/dist/chunk-3KMDHCAR.js +0 -52
- package/dist/chunk-6BJOYF6E.js +0 -8
- package/dist/chunk-BLO4SISK.js +0 -113
- package/dist/chunk-HUWJXLLF.js +0 -681
- package/dist/chunk-JVAZHVNV.js +0 -110
- package/dist/chunk-JYSYHVLU.js +0 -379
- package/dist/chunk-NE36BUGQ.js +0 -146
- package/dist/chunk-O3PY6B6E.js +0 -749
- package/dist/chunk-OXVOHOP3.js +0 -661
- package/dist/chunk-PSLKGOBZ.js +0 -58
- package/dist/chunk-RJCA5672.js +0 -1664
- package/dist/chunk-TMFCNFLW.js +0 -107
- package/dist/chunk-TN3PU2WK.js +0 -748
- package/dist/chunk-TZPAA4RC.js +0 -1461
- package/dist/chunk-W7ZBF5AA.js +0 -1
- package/dist/chunk-YZ6GTZXL.js +0 -48
- package/dist/components/command-queue/index.css +0 -53
- package/dist/components/command-queue/index.d.ts +0 -204
- package/dist/components/command-queue/index.js +0 -12
- package/dist/components/forms/index.d.ts +0 -56
- package/dist/components/forms/index.js +0 -2
- package/dist/components/index.css +0 -443
- package/dist/components/monitoring/index.d.ts +0 -66
- package/dist/components/monitoring/index.js +0 -2
- package/dist/components/notifications/index.d.ts +0 -52
- package/dist/components/notifications/index.js +0 -5
- package/dist/components/resource-definition/index.css +0 -388
- package/dist/components/resource-definition/index.d.ts +0 -301
- package/dist/components/resource-definition/index.js +0 -3
- package/dist/display/index.css +0 -53
- package/dist/display/index.d.ts +0 -606
- package/dist/display/index.js +0 -7
- package/dist/execution/index.css +0 -388
- package/dist/provider/index.css +0 -61
- package/dist/{chunk-TYV5NJV2.js → chunk-BUZONXAW.js} +0 -0
- package/dist/{chunk-UMXDDEAG.js → chunk-SFF5MJEI.js} +1 -1
- /package/dist/{chunk-NXHL23JW.js → chunk-XXDDMASA.js} +0 -0
package/dist/graph/index.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import * as react from 'react';
|
|
4
|
-
import { MouseEvent, CSSProperties, ReactNode } from 'react';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
|
+
import { Node, Edge, NodeMouseHandler } from '@xyflow/react';
|
|
2
|
+
import { MouseEvent } from 'react';
|
|
6
3
|
|
|
7
4
|
/**
|
|
8
5
|
* Graph Component Constants
|
|
@@ -60,15 +57,6 @@ interface GraphThemeColors {
|
|
|
60
57
|
edgeApprovalGlow: string;
|
|
61
58
|
}
|
|
62
59
|
|
|
63
|
-
/**
|
|
64
|
-
* useGraphTheme - Hook for theme-aware graph colors
|
|
65
|
-
*
|
|
66
|
-
* Returns color values that adapt to light/dark mode for graph elements.
|
|
67
|
-
* Self-contained: derives colors from hardcoded domain palette using color-mix().
|
|
68
|
-
*/
|
|
69
|
-
|
|
70
|
-
declare function useGraphTheme(): GraphThemeColors;
|
|
71
|
-
|
|
72
60
|
/**
|
|
73
61
|
* useConnectionHighlight - Hook to track and highlight connected nodes/edges
|
|
74
62
|
*
|
|
@@ -187,193 +175,6 @@ declare function useNodeSelection<T extends string | number>(selectedId: T | nul
|
|
|
187
175
|
*/
|
|
188
176
|
declare function useFitViewTrigger(data: unknown, nodes: Node[]): number;
|
|
189
177
|
|
|
190
|
-
interface GraphContainerProps {
|
|
191
|
-
children: React.ReactNode;
|
|
192
|
-
height?: number | string;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Returns the animated grid background styles for the current theme.
|
|
196
|
-
* Uses color-mix() with --color-primary so the grid adapts to any preset.
|
|
197
|
-
*
|
|
198
|
-
* @param isDark - Whether dark mode is active
|
|
199
|
-
* @returns CSSProperties object with background styles
|
|
200
|
-
*/
|
|
201
|
-
declare function getGraphBackgroundStyles(isDark: boolean): CSSProperties;
|
|
202
|
-
/**
|
|
203
|
-
* Hook that returns the animated grid background styles for the current theme
|
|
204
|
-
*
|
|
205
|
-
* @returns CSSProperties object with background styles
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* ```tsx
|
|
209
|
-
* function MyComponent() {
|
|
210
|
-
* const backgroundStyles = useGraphBackgroundStyles()
|
|
211
|
-
*
|
|
212
|
-
* return (
|
|
213
|
-
* <div style={{ ...myStyles, ...backgroundStyles }}>
|
|
214
|
-
* Content
|
|
215
|
-
* </div>
|
|
216
|
-
* )
|
|
217
|
-
* }
|
|
218
|
-
* ```
|
|
219
|
-
*/
|
|
220
|
-
declare function useGraphBackgroundStyles(): CSSProperties;
|
|
221
|
-
declare function GraphContainer({ children, height }: GraphContainerProps): react_jsx_runtime.JSX.Element;
|
|
222
|
-
/**
|
|
223
|
-
* GraphBackground - Empty background component (no dots)
|
|
224
|
-
*
|
|
225
|
-
* Usage: Place inside <ReactFlow> component
|
|
226
|
-
*/
|
|
227
|
-
declare function GraphBackground(): null;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* GraphLegend - Legend panel for graph visualization
|
|
231
|
-
*
|
|
232
|
-
* Provides:
|
|
233
|
-
* - Theme-aware styling using CSS variables
|
|
234
|
-
* - Colored legend dots (for nodes) or lines (for edges)
|
|
235
|
-
* - Flexible positioning
|
|
236
|
-
*/
|
|
237
|
-
interface LegendItem {
|
|
238
|
-
color: string;
|
|
239
|
-
label: string;
|
|
240
|
-
/** Use 'line' for edge legends, 'dot' (default) for node legends */
|
|
241
|
-
type?: 'dot' | 'line';
|
|
242
|
-
}
|
|
243
|
-
interface GraphLegendProps {
|
|
244
|
-
title?: string;
|
|
245
|
-
items: LegendItem[];
|
|
246
|
-
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* GraphLegend - Main legend component
|
|
250
|
-
*
|
|
251
|
-
* Renders a glassmorphism panel with colored legend items.
|
|
252
|
-
* Can be positioned in any corner of the graph.
|
|
253
|
-
*/
|
|
254
|
-
declare function GraphLegend({ title, items, position }: GraphLegendProps): react_jsx_runtime.JSX.Element;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* GraphFitViewButton - Custom fit view button for ReactFlow graphs
|
|
258
|
-
*
|
|
259
|
-
* Supports two variants:
|
|
260
|
-
* - 'reactflow': Native ReactFlow button style
|
|
261
|
-
* - 'mantine': Mantine ActionIcon with theme support
|
|
262
|
-
*/
|
|
263
|
-
type FitViewButtonVariant = 'reactflow' | 'mantine';
|
|
264
|
-
interface GraphFitViewButtonProps {
|
|
265
|
-
padding?: number;
|
|
266
|
-
variant?: FitViewButtonVariant;
|
|
267
|
-
duration?: number;
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* GraphFitViewButton - Custom fit view button for ReactFlow visualizers
|
|
271
|
-
*
|
|
272
|
-
* Usage:
|
|
273
|
-
* ```tsx
|
|
274
|
-
* <ReactFlow>
|
|
275
|
-
* <GraphFitViewButton padding={0.15} variant="mantine" duration={300} />
|
|
276
|
-
* </ReactFlow>
|
|
277
|
-
* ```
|
|
278
|
-
*/
|
|
279
|
-
declare function GraphFitViewButton({ padding, variant, duration }: GraphFitViewButtonProps): react_jsx_runtime.JSX.Element;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* GraphFitViewHandler - Programmatic fit view trigger component
|
|
283
|
-
*
|
|
284
|
-
* Used to trigger fitView after animations complete (e.g., Mantine Collapse).
|
|
285
|
-
* Must be placed inside ReactFlow component.
|
|
286
|
-
*
|
|
287
|
-
* @example
|
|
288
|
-
* ```tsx
|
|
289
|
-
* const [fitViewTrigger, setFitViewTrigger] = useState(0)
|
|
290
|
-
*
|
|
291
|
-
* // When collapse expands, trigger fit view
|
|
292
|
-
* const handleExpand = () => {
|
|
293
|
-
* setExpanded(true)
|
|
294
|
-
* setFitViewTrigger(prev => prev + 1)
|
|
295
|
-
* }
|
|
296
|
-
*
|
|
297
|
-
* <ReactFlow>
|
|
298
|
-
* <GraphFitViewHandler trigger={fitViewTrigger} />
|
|
299
|
-
* </ReactFlow>
|
|
300
|
-
* ```
|
|
301
|
-
*/
|
|
302
|
-
interface GraphFitViewHandlerProps {
|
|
303
|
-
/**
|
|
304
|
-
* Trigger value - increment to trigger fitView
|
|
305
|
-
* Must be > 0 to trigger
|
|
306
|
-
*/
|
|
307
|
-
trigger?: number;
|
|
308
|
-
/**
|
|
309
|
-
* Padding around nodes when fitting view
|
|
310
|
-
* @default 0.15
|
|
311
|
-
*/
|
|
312
|
-
padding?: number;
|
|
313
|
-
/**
|
|
314
|
-
* Animation duration in milliseconds
|
|
315
|
-
* @default 300
|
|
316
|
-
*/
|
|
317
|
-
duration?: number;
|
|
318
|
-
/**
|
|
319
|
-
* Delay before triggering fitView (to wait for animations)
|
|
320
|
-
* @default 250
|
|
321
|
-
*/
|
|
322
|
-
delay?: number;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Invisible component that triggers fitView when trigger value changes
|
|
326
|
-
*
|
|
327
|
-
* @param trigger - Increment this value to trigger fitView
|
|
328
|
-
* @param padding - Padding around nodes (default: 0.15)
|
|
329
|
-
* @param duration - Animation duration in ms (default: 300)
|
|
330
|
-
* @param delay - Delay before triggering in ms (default: 250)
|
|
331
|
-
*/
|
|
332
|
-
declare function GraphFitViewHandler({ trigger, padding, duration, delay }: GraphFitViewHandlerProps): null;
|
|
333
|
-
|
|
334
|
-
interface BaseNodeProps {
|
|
335
|
-
children: ReactNode;
|
|
336
|
-
color: NodeColorType;
|
|
337
|
-
selected?: boolean;
|
|
338
|
-
highlighted?: boolean;
|
|
339
|
-
width?: number;
|
|
340
|
-
className?: string;
|
|
341
|
-
/** Handle layout direction: 'horizontal' (left/right) or 'vertical' (top/bottom) */
|
|
342
|
-
handleDirection?: 'horizontal' | 'vertical';
|
|
343
|
-
/** Whether to render the source (outgoing) handle. Default: true */
|
|
344
|
-
showSourceHandle?: boolean;
|
|
345
|
-
/** Whether to render the target (incoming) handle. Default: true */
|
|
346
|
-
showTargetHandle?: boolean;
|
|
347
|
-
}
|
|
348
|
-
declare const BaseNode: react.NamedExoticComponent<BaseNodeProps>;
|
|
349
|
-
|
|
350
|
-
interface BaseEdgeProps {
|
|
351
|
-
id: string;
|
|
352
|
-
sourceX: number;
|
|
353
|
-
sourceY: number;
|
|
354
|
-
targetX: number;
|
|
355
|
-
targetY: number;
|
|
356
|
-
sourcePosition: EdgeProps['sourcePosition'];
|
|
357
|
-
targetPosition: EdgeProps['targetPosition'];
|
|
358
|
-
color: string;
|
|
359
|
-
glowColor: string;
|
|
360
|
-
label?: string;
|
|
361
|
-
animated?: boolean;
|
|
362
|
-
selected?: boolean;
|
|
363
|
-
dimmed?: boolean;
|
|
364
|
-
edgeIndex?: number;
|
|
365
|
-
totalEdges?: number;
|
|
366
|
-
}
|
|
367
|
-
declare const BaseEdge: react.NamedExoticComponent<BaseEdgeProps>;
|
|
368
|
-
|
|
369
|
-
interface GlowingHandleProps {
|
|
370
|
-
type: 'source' | 'target';
|
|
371
|
-
position: Position;
|
|
372
|
-
color: NodeColorType;
|
|
373
|
-
id?: string;
|
|
374
|
-
}
|
|
375
|
-
declare function GlowingHandle({ type, position, color: _color, id }: GlowingHandleProps): react_jsx_runtime.JSX.Element;
|
|
376
|
-
|
|
377
178
|
/**
|
|
378
179
|
* calculateGraphHeight - Dynamic height calculation for graph containers
|
|
379
180
|
*
|
|
@@ -425,5 +226,5 @@ interface GraphHeightOptions {
|
|
|
425
226
|
*/
|
|
426
227
|
declare function calculateGraphHeight({ itemCount, minHeight, maxHeight, heightPerItem }: GraphHeightOptions): number;
|
|
427
228
|
|
|
428
|
-
export {
|
|
429
|
-
export type { DirectedChainHighlightingOptions, DirectedChainHighlightingResult,
|
|
229
|
+
export { GRAPH_CONSTANTS, calculateGraphHeight, useConnectionHighlight, useDirectedChainHighlighting, useFitViewTrigger, useGraphHighlighting, useNodeSelection };
|
|
230
|
+
export type { DirectedChainHighlightingOptions, DirectedChainHighlightingResult, GlowIntensity, GraphHeightOptions, GraphHighlightingResult, GraphThemeColors, NodeColorType };
|
package/dist/graph/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GRAPH_CONSTANTS, calculateGraphHeight, useConnectionHighlight, useDirectedChainHighlighting, useFitViewTrigger, useGraphHighlighting, useNodeSelection } from '../chunk-GIFAF5ZS.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { useCommandQueue } from './useCommandQueue';
|
|
2
|
+
export { useSubmitAction } from './useSubmitAction';
|
|
3
|
+
export type { SubmitActionRequest, ExecutionErrorDetails, SubmitActionResponse } from './useSubmitAction';
|
|
4
|
+
export { useDeleteTask } from './useDeleteTask';
|
|
5
|
+
export { useCommandQueueTotals } from './useCommandQueueTotals';
|
|
6
|
+
export { usePatchTask } from './usePatchTask';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/command-queue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,YAAY,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACzG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TaskStatus, TimeRange } from '@repo/core';
|
|
2
|
+
export declare function useCommandQueue({ status, limit, offset, humanCheckpoint, timeRange, priorityMin, priorityMax, }?: {
|
|
3
|
+
status?: TaskStatus;
|
|
4
|
+
limit?: number;
|
|
5
|
+
offset?: number;
|
|
6
|
+
humanCheckpoint?: string;
|
|
7
|
+
timeRange?: TimeRange;
|
|
8
|
+
priorityMin?: number;
|
|
9
|
+
priorityMax?: number;
|
|
10
|
+
}): import("@tanstack/react-query").UseQueryResult<{
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
completedAt: Date | undefined;
|
|
13
|
+
expiresAt: Date | undefined;
|
|
14
|
+
id: string;
|
|
15
|
+
organizationId: string;
|
|
16
|
+
actions: import("@repo/core").ActionConfig[];
|
|
17
|
+
context: unknown;
|
|
18
|
+
selectedAction?: string;
|
|
19
|
+
actionPayload?: unknown;
|
|
20
|
+
description?: string;
|
|
21
|
+
priority: number;
|
|
22
|
+
humanCheckpoint?: string;
|
|
23
|
+
status: TaskStatus;
|
|
24
|
+
targetResourceId?: string;
|
|
25
|
+
targetResourceType?: "agent" | "workflow";
|
|
26
|
+
targetExecutionId?: string;
|
|
27
|
+
completedBy?: string;
|
|
28
|
+
idempotencyKey?: string | null;
|
|
29
|
+
originExecutionId: string;
|
|
30
|
+
originResourceType: import("@repo/core").OriginResourceType;
|
|
31
|
+
originResourceId: string;
|
|
32
|
+
}[], Error>;
|
|
33
|
+
//# sourceMappingURL=useCommandQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommandQueue.d.ts","sourceRoot":"","sources":["../../../src/hooks/command-queue/useCommandQueue.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAQ,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE7D,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,WAAW,GACZ,GAAE;IACD,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;CAChB;;;;;;;;;;;;;;;;;;;;;;YA6BL"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CheckpointListResponse, TimeRange } from '@repo/core';
|
|
2
|
+
interface UseCommandQueueTotalsOptions {
|
|
3
|
+
timeRange?: TimeRange;
|
|
4
|
+
priorityMin?: number;
|
|
5
|
+
priorityMax?: number;
|
|
6
|
+
/** When set, priorityCounts are scoped to this status only */
|
|
7
|
+
status?: 'pending' | 'completed' | 'expired';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fetches command queue totals and checkpoint groupings
|
|
11
|
+
*
|
|
12
|
+
* Returns distinct human checkpoints with task counts and status breakdown.
|
|
13
|
+
* Used for sidebar grouping and donut charts (true totals, not paginated).
|
|
14
|
+
*/
|
|
15
|
+
export declare function useCommandQueueTotals({ timeRange, priorityMin, priorityMax, status }?: UseCommandQueueTotalsOptions): import("@tanstack/react-query").UseQueryResult<CheckpointListResponse, Error>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=useCommandQueueTotals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommandQueueTotals.d.ts","sourceRoot":"","sources":["../../../src/hooks/command-queue/useCommandQueueTotals.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEnE,UAAU,4BAA4B;IACpC,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;CAC7C;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,SAAiB,EACjB,WAAW,EACX,WAAW,EACX,MAAM,EACP,GAAE,4BAAiC,iFAgBnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteTask.d.ts","sourceRoot":"","sources":["../../../src/hooks/command-queue/useDeleteTask.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,wBAAgB,aAAa;;GAwC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePatchTask.d.ts","sourceRoot":"","sources":["../../../src/hooks/command-queue/usePatchTask.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEvD,wBAAgB,YAAY;YAMyB,MAAM;YAAU,eAAe;YAuBnF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Task } from '@repo/core';
|
|
2
|
+
export interface SubmitActionRequest {
|
|
3
|
+
taskId: string;
|
|
4
|
+
actionId: string;
|
|
5
|
+
payload?: unknown;
|
|
6
|
+
notes?: string;
|
|
7
|
+
}
|
|
8
|
+
interface OptimisticContext {
|
|
9
|
+
previousData: Map<readonly unknown[], Task[] | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export interface ExecutionErrorDetails {
|
|
12
|
+
message: string;
|
|
13
|
+
type: string;
|
|
14
|
+
severity: 'critical' | 'warning' | 'info';
|
|
15
|
+
category: 'llm' | 'tool' | 'workflow' | 'agent' | 'validation' | 'system';
|
|
16
|
+
details?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SubmitActionResponse {
|
|
19
|
+
task: unknown;
|
|
20
|
+
execution?: {
|
|
21
|
+
executionId: string;
|
|
22
|
+
success: boolean;
|
|
23
|
+
data?: unknown;
|
|
24
|
+
error?: ExecutionErrorDetails;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export declare function useSubmitAction(): import("@tanstack/react-query").UseMutationResult<SubmitActionResponse, Error, SubmitActionRequest, OptimisticContext>;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=useSubmitAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSubmitAction.d.ts","sourceRoot":"","sources":["../../../src/hooks/command-queue/useSubmitAction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,UAAU,iBAAiB;IACzB,YAAY,EAAE,GAAG,CAAC,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,CAAA;CAC1D;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAAA;IACzC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAA;IACzE,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,SAAS,CAAC,EAAE;QACV,WAAW,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,OAAO,CAAA;QAChB,IAAI,CAAC,EAAE,OAAO,CAAA;QACd,KAAK,CAAC,EAAE,qBAAqB,CAAA;KAC9B,CAAA;CACF;AAED,wBAAgB,eAAe,2HAkD9B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { executionsKeys } from './queryKeys';
|
|
2
|
+
export { useExecutions } from './useExecutions';
|
|
3
|
+
export { useExecution } from './useExecution';
|
|
4
|
+
export { useExecuteAsync } from './useExecuteAsync';
|
|
5
|
+
export type { ExecuteAsyncParams, ExecuteAsyncResult } from './useExecuteAsync';
|
|
6
|
+
export { useRetryExecution } from './useRetryExecution';
|
|
7
|
+
export type { RetryExecutionParams } from './useRetryExecution';
|
|
8
|
+
export { useCancelExecution } from './useCancelExecution';
|
|
9
|
+
export type { CancelExecutionParams, CancelExecutionResult } from './useCancelExecution';
|
|
10
|
+
export { useDeleteExecution } from './useDeleteExecution';
|
|
11
|
+
export type { DeleteExecutionParams } from './useDeleteExecution';
|
|
12
|
+
export { useBulkDeleteExecutions } from './useBulkDeleteExecutions';
|
|
13
|
+
export type { BulkDeleteExecutionsParams, BulkDeleteExecutionsResult } from './useBulkDeleteExecutions';
|
|
14
|
+
export { useResources } from './useResources';
|
|
15
|
+
export { useResourceDefinition } from './useResourceDefinition';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,YAAY,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAA;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ResourceStatus } from '@repo/core/execution';
|
|
2
|
+
export interface BulkDeleteExecutionsParams {
|
|
3
|
+
resourceId: string;
|
|
4
|
+
resourceStatus?: ResourceStatus | 'all';
|
|
5
|
+
}
|
|
6
|
+
export interface BulkDeleteExecutionsResult {
|
|
7
|
+
resourceId: string;
|
|
8
|
+
deletedCount: number;
|
|
9
|
+
resourceStatus?: ResourceStatus | 'all';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Bulk delete executions for a resource, optionally filtered by status.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useBulkDeleteExecutions(): import("@tanstack/react-query").UseMutationResult<BulkDeleteExecutionsResult, Error, BulkDeleteExecutionsParams, unknown>;
|
|
15
|
+
//# sourceMappingURL=useBulkDeleteExecutions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBulkDeleteExecutions.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useBulkDeleteExecutions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAI1D,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,cAAc,GAAG,KAAK,CAAA;CACxC;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,cAAc,GAAG,KAAK,CAAA;CACxC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,8HA2BtC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CancelExecutionParams {
|
|
2
|
+
resourceId: string;
|
|
3
|
+
executionId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CancelExecutionResult {
|
|
6
|
+
cancelled: boolean;
|
|
7
|
+
method: string;
|
|
8
|
+
resourceId: string;
|
|
9
|
+
executionId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Cancel a running execution.
|
|
13
|
+
* Invalidates both the execution detail and the executions list on success.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const { mutate: cancel, isPending } = useCancelExecution()
|
|
17
|
+
* cancel({ resourceId, executionId })
|
|
18
|
+
*/
|
|
19
|
+
export declare function useCancelExecution(): import("@tanstack/react-query").UseMutationResult<CancelExecutionResult, Error, CancelExecutionParams, unknown>;
|
|
20
|
+
//# sourceMappingURL=useCancelExecution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCancelExecution.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useCancelExecution.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,oHAqBjC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DeleteExecutionParams {
|
|
2
|
+
resourceId: string;
|
|
3
|
+
executionId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Delete a single execution record.
|
|
7
|
+
* Removes the execution from cache immediately and invalidates the list.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDeleteExecution(): import("@tanstack/react-query").UseMutationResult<{
|
|
10
|
+
resourceId: string;
|
|
11
|
+
executionId: string;
|
|
12
|
+
}, Error, DeleteExecutionParams, unknown>;
|
|
13
|
+
//# sourceMappingURL=useDeleteExecution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteExecution.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useDeleteExecution.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB;;;0CAoBjC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ResourceType } from '@repo/core/execution';
|
|
2
|
+
export interface ExecuteAsyncParams {
|
|
3
|
+
resourceId: string;
|
|
4
|
+
resourceType: ResourceType;
|
|
5
|
+
input: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface ExecuteAsyncResult {
|
|
8
|
+
executionId: string;
|
|
9
|
+
status: string;
|
|
10
|
+
resourceId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Trigger an async execution for a workflow or agent.
|
|
14
|
+
* Invalidates the executions list on success so the new execution appears immediately.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const { mutate: execute, isPending } = useExecuteAsync()
|
|
18
|
+
* execute({ resourceId, resourceType: 'workflow', input: { ... } })
|
|
19
|
+
*/
|
|
20
|
+
export declare function useExecuteAsync(): import("@tanstack/react-query").UseMutationResult<ExecuteAsyncResult, Error, ExecuteAsyncParams, unknown>;
|
|
21
|
+
//# sourceMappingURL=useExecuteAsync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecuteAsync.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useExecuteAsync.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAIxD,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,8GAkB9B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { APIExecutionDetail } from '@repo/core/execution';
|
|
2
|
+
/**
|
|
3
|
+
* Fetch a single execution detail.
|
|
4
|
+
* Automatically polls every 2 seconds while the execution status is 'running'.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const { data: execution, isLoading } = useExecution(resourceId, executionId)
|
|
8
|
+
*/
|
|
9
|
+
export declare function useExecution(resourceId: string, executionId: string): import("@tanstack/react-query").UseQueryResult<APIExecutionDetail, Error>;
|
|
10
|
+
//# sourceMappingURL=useExecution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecution.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useExecution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAO9D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,6EAanE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { APIExecutionListResponse, ResourceStatus } from '@repo/core/execution';
|
|
2
|
+
/**
|
|
3
|
+
* Fetch the execution list for a given resource.
|
|
4
|
+
*
|
|
5
|
+
* resourceStatus and limit are intentionally excluded from the query key so that
|
|
6
|
+
* SSE invalidations (which target the unfiltered key) bust all filter variants.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const { data, isLoading } = useExecutions(resourceId)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // With status filter and limit
|
|
13
|
+
* const { data } = useExecutions(resourceId, 'running', 20)
|
|
14
|
+
*/
|
|
15
|
+
export declare function useExecutions(resourceId: string, resourceStatus?: ResourceStatus | 'all', limit?: number): import("@tanstack/react-query").UseQueryResult<APIExecutionListResponse, Error>;
|
|
16
|
+
//# sourceMappingURL=useExecutions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExecutions.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useExecutions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAIpF;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,mFAqBxG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AIResourceDefinition } from '@repo/core';
|
|
2
|
+
/**
|
|
3
|
+
* Fetch a resource definition (workflow steps, agent actions, etc.).
|
|
4
|
+
*
|
|
5
|
+
* @param resourceId - The resource ID to fetch
|
|
6
|
+
* @param enabled - Whether the query should execute (default: true)
|
|
7
|
+
*/
|
|
8
|
+
export declare function useResourceDefinition(resourceId: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<AIResourceDefinition, Error>;
|
|
9
|
+
//# sourceMappingURL=useResourceDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResourceDefinition.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useResourceDefinition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAKtD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,UAAO,+EAavE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch all available Execution Engine resources (workflows, agents, pipelines).
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* const { data, isLoading } = useResources()
|
|
6
|
+
* const workflows = data?.workflows ?? []
|
|
7
|
+
* const agents = data?.agents ?? []
|
|
8
|
+
*/
|
|
9
|
+
export declare function useResources(): import("@tanstack/react-query").UseQueryResult<{
|
|
10
|
+
workflows: import("@repo/core").ResourceDefinition[];
|
|
11
|
+
agents: import("@repo/core").ResourceDefinition[];
|
|
12
|
+
pipelines: import("@repo/core").ResourceDefinition[];
|
|
13
|
+
total: number;
|
|
14
|
+
}, Error>;
|
|
15
|
+
//# sourceMappingURL=useResources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResources.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useResources.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,wBAAgB,YAAY;;;;;UAiB3B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ResourceType } from '@repo/core/execution';
|
|
2
|
+
export interface RetryExecutionParams {
|
|
3
|
+
resourceId: string;
|
|
4
|
+
resourceType: ResourceType;
|
|
5
|
+
input: unknown;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Retry a failed execution by re-triggering it async.
|
|
9
|
+
* Functionally identical to useExecuteAsync but named for intent clarity at call sites.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useRetryExecution(): import("@tanstack/react-query").UseMutationResult<{
|
|
12
|
+
resourceId: string;
|
|
13
|
+
executionId: string;
|
|
14
|
+
status: string;
|
|
15
|
+
}, Error, RetryExecutionParams, unknown>;
|
|
16
|
+
//# sourceMappingURL=useRetryExecution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRetryExecution.d.ts","sourceRoot":"","sources":["../../../src/hooks/executions/useRetryExecution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAIxD,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,YAAY,CAAA;IAC1B,KAAK,EAAE,OAAO,CAAA;CACf;AAED;;;GAGG;AACH,wBAAgB,iBAAiB;;iBAMsB,MAAM;YAAU,MAAM;yCAY5E"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { OrgFeatureConfig, UserConfig } from '@repo/core';
|
|
2
|
+
import type { AppInitializationState } from '../../initialization/hooks/useAppInitialization';
|
|
3
|
+
import type { OrganizationContextValue } from '../../organization/context/OrganizationContext';
|
|
4
|
+
type RestrictionSource = 'org' | 'membership' | null;
|
|
5
|
+
export interface FeatureAccessResult {
|
|
6
|
+
allowed: boolean;
|
|
7
|
+
restrictedBy: RestrictionSource;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Factory that creates a `useFeatureAccess` hook scoped to the consumer's
|
|
11
|
+
* feature configuration.
|
|
12
|
+
*
|
|
13
|
+
* @param useInitialization - Initialization hook providing `profile` and `organizationReady`
|
|
14
|
+
* @param useOrganization - Organization hook providing `currentMembership`
|
|
15
|
+
* @param optInFeatures - Feature keys that are disabled by default (must be explicitly enabled)
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // In your app's feature-access module
|
|
20
|
+
* import { createUseFeatureAccess } from '@repo/ui/hooks'
|
|
21
|
+
* import { useInitialization } from '@repo/ui/initialization'
|
|
22
|
+
* import { useOrganization } from '@repo/ui/organization'
|
|
23
|
+
*
|
|
24
|
+
* export const useFeatureAccess = createUseFeatureAccess({
|
|
25
|
+
* useInitialization,
|
|
26
|
+
* useOrganization,
|
|
27
|
+
* optInFeatures: ['acquisition', 'calibration'],
|
|
28
|
+
* })
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function createUseFeatureAccess({ useInitialization, useOrganization, optInFeatures }: {
|
|
32
|
+
useInitialization: () => Pick<AppInitializationState, 'profile' | 'organizationReady'>;
|
|
33
|
+
useOrganization: () => Pick<OrganizationContextValue, 'currentMembership'>;
|
|
34
|
+
optInFeatures?: string[];
|
|
35
|
+
}): () => {
|
|
36
|
+
orgConfig: OrgFeatureConfig | undefined;
|
|
37
|
+
membershipConfig: OrgFeatureConfig | undefined;
|
|
38
|
+
userConfig: UserConfig | undefined;
|
|
39
|
+
hasFeature: (featureKey: string) => boolean;
|
|
40
|
+
checkFeature: (featureKey: string) => FeatureAccessResult;
|
|
41
|
+
isReady: boolean;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=createUseFeatureAccess.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUseFeatureAccess.d.ts","sourceRoot":"","sources":["../../../src/hooks/feature-access/createUseFeatureAccess.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAA2B,UAAU,EAAE,MAAM,YAAY,CAAA;AACvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAA;AAC7F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAA;AAE9F,KAAK,iBAAiB,GAAG,KAAK,GAAG,YAAY,GAAG,IAAI,CAAA;AAEpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,iBAAiB,CAAA;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,iBAAiB,EACjB,eAAe,EACf,aAAkB,EACnB,EAAE;IACD,iBAAiB,EAAE,MAAM,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,mBAAmB,CAAC,CAAA;IACtF,eAAe,EAAE,MAAM,IAAI,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,CAAA;IAC1E,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB;;;;6BAiC+C,MAAM,KAAG,OAAO;+BAnB7C,MAAM,KAAG,mBAAmB;;EA8B9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/feature-access/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA"}
|