@omniviewdev/runtime 0.0.0-nightly.20260225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE +661 -0
  2. package/dist/Client-DGdSmmVk.js +585 -0
  3. package/dist/Client-ES-O5dCV.cjs +1 -0
  4. package/dist/api.cjs +1 -0
  5. package/dist/api.d.ts +13 -0
  6. package/dist/api.js +120 -0
  7. package/dist/context/drawer/BottomDrawerContext.d.ts +20 -0
  8. package/dist/context/drawer/RightDrawerContext.d.ts +15 -0
  9. package/dist/context/drawer/index.d.ts +3 -0
  10. package/dist/context/drawer/types.d.ts +222 -0
  11. package/dist/context/index.d.ts +5 -0
  12. package/dist/context/modal/ConfirmationModalContext.d.ts +12 -0
  13. package/dist/context/modal/index.d.ts +1 -0
  14. package/dist/context/operations/OperationsContext.d.ts +27 -0
  15. package/dist/context/plugins/PluginContext.d.ts +9 -0
  16. package/dist/context/plugins/PluginContextProvider.d.ts +5 -0
  17. package/dist/context/plugins/index.d.ts +3 -0
  18. package/dist/context/plugins/usePluginContext.d.ts +3 -0
  19. package/dist/context/settings/SettingsContext.d.ts +9 -0
  20. package/dist/context/settings/index.d.ts +1 -0
  21. package/dist/errors/index.d.ts +3 -0
  22. package/dist/errors/parseAppError.d.ts +51 -0
  23. package/dist/errors/parseAppError.test.d.ts +1 -0
  24. package/dist/errors/types.d.ts +40 -0
  25. package/dist/extensions/index.d.ts +2 -0
  26. package/dist/extensions/points/resource/helpers.d.ts +19 -0
  27. package/dist/extensions/points/resource/types.d.ts +6 -0
  28. package/dist/extensions/provider.d.ts +18 -0
  29. package/dist/extensions/registry.d.ts +30 -0
  30. package/dist/extensions/utils.d.ts +4 -0
  31. package/dist/hooks/connection/index.d.ts +4 -0
  32. package/dist/hooks/connection/useConnection.d.ts +37 -0
  33. package/dist/hooks/connection/useConnectionNamespaces.d.ts +20 -0
  34. package/dist/hooks/connection/useConnectionStatus.d.ts +29 -0
  35. package/dist/hooks/connection/useConnections.d.ts +18 -0
  36. package/dist/hooks/data/index.d.ts +1 -0
  37. package/dist/hooks/data/usePluginData.d.ts +11 -0
  38. package/dist/hooks/drawer/index.d.ts +2 -0
  39. package/dist/hooks/drawer/useBottomDrawer.d.ts +1 -0
  40. package/dist/hooks/drawer/useRightDrawer.d.ts +5 -0
  41. package/dist/hooks/exec/index.d.ts +1 -0
  42. package/dist/hooks/exec/useExecSession.d.ts +21 -0
  43. package/dist/hooks/index.d.ts +13 -0
  44. package/dist/hooks/logs/index.d.ts +1 -0
  45. package/dist/hooks/logs/useLogSession.d.ts +21 -0
  46. package/dist/hooks/metric/index.d.ts +3 -0
  47. package/dist/hooks/metric/useMetricProviders.d.ts +9 -0
  48. package/dist/hooks/metric/useMetricStream.d.ts +40 -0
  49. package/dist/hooks/metric/useResourceMetrics.d.ts +46 -0
  50. package/dist/hooks/modal/index.d.ts +1 -0
  51. package/dist/hooks/modal/useConfirmationModal.d.ts +5 -0
  52. package/dist/hooks/networker/index.d.ts +3 -0
  53. package/dist/hooks/networker/types.d.ts +50 -0
  54. package/dist/hooks/networker/usePortForwardSessions.d.ts +13 -0
  55. package/dist/hooks/networker/useResourcePortForwarder.d.ts +21 -0
  56. package/dist/hooks/operations/useOperations.d.ts +1 -0
  57. package/dist/hooks/resource/index.d.ts +13 -0
  58. package/dist/hooks/resource/useActiveSyncs.d.ts +16 -0
  59. package/dist/hooks/resource/useEditorSchemas.d.ts +22 -0
  60. package/dist/hooks/resource/useInformerState.d.ts +24 -0
  61. package/dist/hooks/resource/useResource.d.ts +74 -0
  62. package/dist/hooks/resource/useResourceActions.d.ts +69 -0
  63. package/dist/hooks/resource/useResourceAreaComponent.d.ts +9 -0
  64. package/dist/hooks/resource/useResourceGroups.d.ts +22 -0
  65. package/dist/hooks/resource/useResourceMutations.d.ts +58 -0
  66. package/dist/hooks/resource/useResourceSearch.d.ts +36 -0
  67. package/dist/hooks/resource/useResourceType.d.ts +22 -0
  68. package/dist/hooks/resource/useResourceTypes.d.ts +22 -0
  69. package/dist/hooks/resource/useResources.d.ts +73 -0
  70. package/dist/hooks/resource/useStreamAction.d.ts +21 -0
  71. package/dist/hooks/settings/index.d.ts +1 -0
  72. package/dist/hooks/settings/useSettings.d.ts +2 -0
  73. package/dist/hooks/snackbar/index.d.ts +1 -0
  74. package/dist/hooks/snackbar/useSnackbar.d.ts +24 -0
  75. package/dist/hooks/useResolvedPluginId.d.ts +8 -0
  76. package/dist/index.cjs +2 -0
  77. package/dist/index.d.ts +6 -0
  78. package/dist/index.js +2593 -0
  79. package/dist/models.cjs +1 -0
  80. package/dist/models.d.ts +1 -0
  81. package/dist/models.js +1915 -0
  82. package/dist/router/Link.d.ts +24 -0
  83. package/dist/router/index.d.ts +11 -0
  84. package/dist/router/usePluginRouter.d.ts +40 -0
  85. package/dist/runtime.cjs +1 -0
  86. package/dist/runtime.d.ts +1 -0
  87. package/dist/runtime.js +215 -0
  88. package/dist/types/app.d.ts +73 -0
  89. package/dist/types/extensions.d.ts +186 -0
  90. package/dist/types/index.d.ts +4 -0
  91. package/dist/types/informer.d.ts +49 -0
  92. package/dist/types/plugin.d.ts +5 -0
  93. package/dist/utils/activeSyncAggregator.d.ts +29 -0
  94. package/dist/utils/activeSyncAggregator.test.d.ts +1 -0
  95. package/dist/wailsjs/go/data/Client.d.ts +10 -0
  96. package/dist/wailsjs/go/devserver/DevServerManager.d.ts +22 -0
  97. package/dist/wailsjs/go/diagnostics/DiagnosticsClient.d.ts +18 -0
  98. package/dist/wailsjs/go/exec/Client.d.ts +26 -0
  99. package/dist/wailsjs/go/logs/Client.d.ts +16 -0
  100. package/dist/wailsjs/go/main/App.d.ts +8 -0
  101. package/dist/wailsjs/go/metric/Client.d.ts +12 -0
  102. package/dist/wailsjs/go/models.d.ts +894 -0
  103. package/dist/wailsjs/go/networker/Client.d.ts +14 -0
  104. package/dist/wailsjs/go/plugin/pluginManager.d.ts +52 -0
  105. package/dist/wailsjs/go/resource/Client.d.ts +68 -0
  106. package/dist/wailsjs/go/settings/Client.d.ts +14 -0
  107. package/dist/wailsjs/go/settings/provider.d.ts +46 -0
  108. package/dist/wailsjs/go/ui/Client.d.ts +6 -0
  109. package/dist/wailsjs/go/utils/Client.d.ts +2 -0
  110. package/dist/wailsjs/runtime/runtime.d.ts +249 -0
  111. package/package.json +68 -0
@@ -0,0 +1,37 @@
1
+ import { types } from '../../wailsjs/go/models';
2
+ type UseConnectionOptions = {
3
+ /**
4
+ * The name of the plugin we're interacting with
5
+ */
6
+ pluginID?: string;
7
+ /**
8
+ * The ID of the connection
9
+ */
10
+ connectionID: string;
11
+ };
12
+ /**
13
+ * Get and retreive connections from a plugin's connection manager..
14
+ */
15
+ export declare const useConnection: ({ pluginID: explicitPluginID, connectionID }: UseConnectionOptions) => {
16
+ /**
17
+ * Get the connection
18
+ */
19
+ connection: import('@tanstack/react-query').UseQueryResult<types.Connection, Error>;
20
+ /**
21
+ * Start the connection
22
+ */
23
+ startConnection: import('@tanstack/react-query').UseMutateAsyncFunction<types.ConnectionStatus, unknown, void, unknown>;
24
+ /**
25
+ * Stop the connection
26
+ */
27
+ stopConnection: import('@tanstack/react-query').UseMutateAsyncFunction<types.Connection, unknown, void, unknown>;
28
+ /**
29
+ * Update the connection.
30
+ */
31
+ updateConnection: import('@tanstack/react-query').UseMutateAsyncFunction<types.Connection, unknown, types.Connection, unknown>;
32
+ /**
33
+ * Delete the connection
34
+ */
35
+ deleteConnection: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, void, unknown>;
36
+ };
37
+ export {};
@@ -0,0 +1,20 @@
1
+ type UseConnectionOptions = {
2
+ /**
3
+ * The name of the plugin we're interacting with
4
+ */
5
+ pluginID?: string;
6
+ /**
7
+ * The ID of the connection
8
+ */
9
+ connectionID: string;
10
+ };
11
+ /**
12
+ * Get and retreive connections from a plugin's connection manager..
13
+ */
14
+ export declare const useConnectionNamespaces: ({ pluginID: explicitPluginID, connectionID }: UseConnectionOptions) => {
15
+ /**
16
+ * Get the connection
17
+ */
18
+ namespaces: import('@tanstack/react-query').UseQueryResult<string[], Error>;
19
+ };
20
+ export {};
@@ -0,0 +1,29 @@
1
+ import { ActiveSync } from '../../utils/activeSyncAggregator';
2
+ export interface ConnectionStatusEntry {
3
+ pluginID: string;
4
+ connectionID: string;
5
+ name: string;
6
+ avatar: string;
7
+ isStarted: boolean;
8
+ sync?: ActiveSync;
9
+ isSyncing: boolean;
10
+ hasErrors: boolean;
11
+ }
12
+ export interface ConnectionStatusSummary {
13
+ entries: ConnectionStatusEntry[];
14
+ grouped: Map<string, ConnectionStatusEntry[]>;
15
+ connectedCount: number;
16
+ syncingCount: number;
17
+ errorCount: number;
18
+ hasSyncing: boolean;
19
+ aggregateProgress: number;
20
+ /** Disconnect a connection by plugin/connection ID */
21
+ disconnect: (pluginID: string, connectionID: string) => Promise<void>;
22
+ /** Retry informer sync for a connection */
23
+ retryInformer: (pluginID: string, connectionID: string) => Promise<void>;
24
+ }
25
+ /**
26
+ * Unified hook that tracks connection status across all plugins.
27
+ * Combines ListAllConnections query + connection/status events + informer/STATE events.
28
+ */
29
+ export declare function useConnectionStatus(): ConnectionStatusSummary;
@@ -0,0 +1,18 @@
1
+ import { types } from '../../wailsjs/go/models';
2
+ type UseConnectionsOptions = {
3
+ /**
4
+ * The name of the plugin we're interacting with
5
+ */
6
+ plugin?: string;
7
+ };
8
+ /** Stable query key factory for connection list queries. */
9
+ export declare const connectionListQueryKey: (plugin: string) => string[];
10
+ /**
11
+ * Get and retreive connections from a plugin's connection manager..
12
+ */
13
+ export declare const useConnections: ({ plugin: explicitPlugin }: UseConnectionsOptions) => {
14
+ connections: import('@tanstack/react-query').UseQueryResult<types.Connection[], Error>;
15
+ startInformer: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, types.Connection, unknown>;
16
+ stopInformer: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, types.Connection, unknown>;
17
+ };
18
+ export {};
@@ -0,0 +1 @@
1
+ export * from './usePluginData';
@@ -0,0 +1,11 @@
1
+ type UsePluginDataResult<T> = {
2
+ data: T;
3
+ update: (value: T) => Promise<void>;
4
+ isLoading: boolean;
5
+ };
6
+ /**
7
+ * Generic hook for reading/writing plugin data from the Plugin Data Store.
8
+ * Uses React Query for caching and optimistic updates.
9
+ */
10
+ export declare function usePluginData<T>(explicitPluginID: string | undefined, key: string, defaultValue: T): UsePluginDataResult<T>;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './useRightDrawer';
2
+ export * from './useBottomDrawer';
@@ -0,0 +1 @@
1
+ export declare const useBottomDrawer: () => import('../..').BottomDrawerContextType;
@@ -0,0 +1,5 @@
1
+ import { RightDrawerContextType } from '../../context/drawer/RightDrawerContext';
2
+ /**
3
+ * Display a component within the right-side application drawer
4
+ */
5
+ export declare const useRightDrawer: () => RightDrawerContextType;
@@ -0,0 +1 @@
1
+ export * from './useExecSession';
@@ -0,0 +1,21 @@
1
+ import { exec } from '../../wailsjs/go/models';
2
+ type UseResourceMutationsOptions = {
3
+ /**
4
+ * The ID of the plugin responsible for this resource
5
+ * @example "kubernetes"
6
+ */
7
+ pluginID?: string;
8
+ };
9
+ type CreateSessionOptions = {
10
+ connectionID: string;
11
+ icon?: string | React.ReactNode;
12
+ label?: string;
13
+ opts: Partial<exec.SessionOptions>;
14
+ };
15
+ /**
16
+ * Create or manage sessions from throughout the app
17
+ */
18
+ export declare const useExec: ({ pluginID: explicitPluginID }: UseResourceMutationsOptions) => {
19
+ createSession: import('@tanstack/react-query').UseMutateAsyncFunction<void, Error, CreateSessionOptions, unknown>;
20
+ };
21
+ export default useExec;
@@ -0,0 +1,13 @@
1
+ export * from './connection';
2
+ export * from './data';
3
+ export * from './drawer';
4
+ export * from './exec';
5
+ export * from './logs';
6
+ export * from './metric';
7
+ export * from './networker';
8
+ export * from './modal';
9
+ export * from './resource';
10
+ export * from './settings';
11
+ export * from './snackbar';
12
+ export * from './operations/useOperations';
13
+ export * from './useResolvedPluginId';
@@ -0,0 +1 @@
1
+ export * from './useLogSession';
@@ -0,0 +1,21 @@
1
+ import { logs } from '../../wailsjs/go/models';
2
+ type UseLogSessionOptions = {
3
+ pluginID?: string;
4
+ };
5
+ type CreateLogSessionArgs = {
6
+ connectionID: string;
7
+ resourceKey: string;
8
+ resourceID: string;
9
+ resourceData: Record<string, any>;
10
+ icon?: string | React.ReactNode;
11
+ label?: string;
12
+ target?: string;
13
+ follow?: boolean;
14
+ tailLines?: number;
15
+ params?: Record<string, string>;
16
+ };
17
+ export declare const useLogs: ({ pluginID: explicitPluginID }: UseLogSessionOptions) => {
18
+ createLogSession: import('@tanstack/react-query').UseMutateAsyncFunction<logs.LogSession, unknown, CreateLogSessionArgs, unknown>;
19
+ closeLogSession: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, string, unknown>;
20
+ };
21
+ export default useLogs;
@@ -0,0 +1,3 @@
1
+ export * from './useMetricProviders';
2
+ export * from './useResourceMetrics';
3
+ export * from './useMetricStream';
@@ -0,0 +1,9 @@
1
+ import { metric } from '../../wailsjs/go/models';
2
+ /**
3
+ * Hook to get all available metric providers.
4
+ */
5
+ export declare const useMetricProviders: () => import('@tanstack/react-query').UseQueryResult<metric.MetricProviderSummary[], Error>;
6
+ /**
7
+ * Hook to get metric providers that support a specific resource type.
8
+ */
9
+ export declare const useMetricProvidersForResource: (resourceKey: string) => import('@tanstack/react-query').UseQueryResult<metric.MetricProviderSummary[], Error>;
@@ -0,0 +1,40 @@
1
+ import { metric } from '../../wailsjs/go/models';
2
+ export type UseMetricStreamOptions = {
3
+ /** The plugin providing metrics */
4
+ pluginID?: string;
5
+ /** The connection to stream metrics for */
6
+ connectionID: string;
7
+ /** The resource type key */
8
+ resourceKey: string;
9
+ /** The resource instance ID */
10
+ resourceID: string;
11
+ /** The resource namespace */
12
+ resourceNamespace?: string;
13
+ /** The full resource data object */
14
+ resourceData?: Record<string, unknown>;
15
+ /** Specific metric IDs to stream */
16
+ metricIDs?: string[];
17
+ /** Polling interval in milliseconds (default 10000) */
18
+ interval?: number;
19
+ /** Whether the stream is enabled */
20
+ enabled?: boolean;
21
+ };
22
+ export type UseMetricStreamResult = {
23
+ /** The latest stream output */
24
+ data: metric.MetricResult[] | null;
25
+ /** The subscription ID */
26
+ subscriptionID: string | null;
27
+ /** Whether the stream is active */
28
+ isStreaming: boolean;
29
+ /** Error from the stream */
30
+ error: string | null;
31
+ /** Start the stream */
32
+ start: () => Promise<void>;
33
+ /** Stop the stream */
34
+ stop: () => Promise<void>;
35
+ };
36
+ /**
37
+ * Hook to subscribe to a real-time metric stream from a specific provider.
38
+ * Uses Wails events for push-based data.
39
+ */
40
+ export declare const useMetricStream: (opts: UseMetricStreamOptions) => UseMetricStreamResult;
@@ -0,0 +1,46 @@
1
+ import { metric } from '../../wailsjs/go/models';
2
+ export type UseResourceMetricsOptions = {
3
+ /** The plugin that owns the resource (e.g., "kubernetes") */
4
+ pluginID?: string;
5
+ /** The connection to query metrics for */
6
+ connectionID: string;
7
+ /** The resource type key (e.g., "core::v1::Pod") */
8
+ resourceKey: string;
9
+ /** The resource instance ID (e.g., pod name) */
10
+ resourceID: string;
11
+ /** The resource namespace (optional) */
12
+ resourceNamespace?: string;
13
+ /** The full resource data object */
14
+ resourceData?: Record<string, unknown>;
15
+ /** Specific metric IDs to fetch (empty = all) */
16
+ metricIDs?: string[];
17
+ /** The shape of metric data to request */
18
+ shape?: number;
19
+ /** Time range for timeseries data */
20
+ timeRange?: {
21
+ start: Date;
22
+ end: Date;
23
+ step: string;
24
+ };
25
+ /** Auto-refresh interval in milliseconds (0 = disabled) */
26
+ refreshInterval?: number;
27
+ /** Whether the query is enabled */
28
+ enabled?: boolean;
29
+ };
30
+ export type UseResourceMetricsResult = {
31
+ /** Metric results keyed by provider plugin ID */
32
+ data: Record<string, metric.QueryResponse> | undefined;
33
+ /** Available metric providers for this resource type */
34
+ providers: metric.MetricProviderSummary[];
35
+ /** Whether any query is currently loading */
36
+ isLoading: boolean;
37
+ /** Error from the query, if any */
38
+ error: Error | null;
39
+ /** Manually refetch metrics */
40
+ refetch: () => void;
41
+ };
42
+ /**
43
+ * Hook to query metrics from all available providers for a resource.
44
+ * Automatically discovers providers and aggregates results.
45
+ */
46
+ export declare const useResourceMetrics: (opts: UseResourceMetricsOptions) => UseResourceMetricsResult;
@@ -0,0 +1 @@
1
+ export * from './useConfirmationModal';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Display a modal to confirm an action from the user before running the callback
3
+ * function.
4
+ */
5
+ export declare const useConfirmationModal: () => import('../..').ConfirmationModalContextType;
@@ -0,0 +1,3 @@
1
+ export * from './usePortForwardSessions';
2
+ export * from './useResourcePortForwarder';
3
+ export * from './types';
@@ -0,0 +1,50 @@
1
+ import { networker } from '../../models';
2
+ export type PortForwardResourceOpts = {
3
+ /**
4
+ * The resource key identifier.
5
+ * For example, the Kubernetes plugin supports the following resource keys:
6
+ * - 'core::v1::Pod'
7
+ */
8
+ resourceKey: string;
9
+ /**
10
+ * The resource ID
11
+ */
12
+ resourceId: string;
13
+ /**
14
+ * The resource data object
15
+ */
16
+ resource: any;
17
+ /**
18
+ * The port to forward on the resource
19
+ * @example 8080
20
+ */
21
+ remotePort: number;
22
+ /**
23
+ * The port on the host to forward to. If none is provided, a random port will be assigned.
24
+ * Note: If specifying, it is highly advised to use a port in the range 30000-32767
25
+ * @example 31234
26
+ */
27
+ localPort?: number;
28
+ /**
29
+ * The protocol to forward. Default is TCP.
30
+ */
31
+ protocol?: 'TCP' | 'UDP';
32
+ /**
33
+ * Parameters to pass to the resource to configure the port forward.
34
+ */
35
+ parameters?: Record<string, string>;
36
+ /**
37
+ * Whether to open the forwarded port in the default browser. Default is false.
38
+ */
39
+ openInBrowser?: boolean;
40
+ /**
41
+ * Optional labels to apply to the port forward session.
42
+ */
43
+ labels?: Record<string, string>;
44
+ };
45
+ export type PortForwardResourceFunction = (opts: PortForwardResourceOpts) => Promise<networker.PortForwardSession>;
46
+ export type ResourcePortForwarder = {
47
+ sessions: networker.PortForwardSession[];
48
+ forward: PortForwardResourceFunction;
49
+ close: (sessionId: string) => Promise<void>;
50
+ };
@@ -0,0 +1,13 @@
1
+ declare const ALL_SESSIONS_KEY: readonly ["networker", "portforward", "all-sessions"];
2
+ /**
3
+ * Global hook providing a view of all active port-forward sessions across all plugins.
4
+ * Listens to Wails events for real-time updates instead of polling.
5
+ */
6
+ export declare function usePortForwardSessions(): {
7
+ sessions: import('@tanstack/react-query').UseQueryResult<never[] | import("../../models").networker.PortForwardSession[], Error>;
8
+ activeSessions: import("../../models").networker.PortForwardSession[];
9
+ closeSession: import('@tanstack/react-query').UseMutateAsyncFunction<import("../../models").networker.PortForwardSession, unknown, string, unknown>;
10
+ openInBrowser: (localPort: number) => void;
11
+ };
12
+ export { ALL_SESSIONS_KEY };
13
+ export default usePortForwardSessions;
@@ -0,0 +1,21 @@
1
+ import { PortForwardResourceOpts } from './types';
2
+ import { networker } from '../../wailsjs/go/models';
3
+ /**
4
+ * Programatically forward a port from a resource object to the host.
5
+ */
6
+ export declare function useResourcePortForwarder({ pluginID: explicitPluginID, connectionID, resourceID }: {
7
+ pluginID?: string;
8
+ connectionID: string;
9
+ resourceID: string;
10
+ }): {
11
+ sessions: import('@tanstack/react-query').UseQueryResult<never[] | networker.PortForwardSession[], Error>;
12
+ forward: import('@tanstack/react-query').UseMutateAsyncFunction<networker.PortForwardSession, unknown, {
13
+ opts: Partial<PortForwardResourceOpts>;
14
+ }, unknown>;
15
+ close: import('@tanstack/react-query').UseMutateAsyncFunction<networker.PortForwardSession, unknown, {
16
+ opts: {
17
+ sessionID: string;
18
+ };
19
+ }, unknown>;
20
+ };
21
+ export default useResourcePortForwarder;
@@ -0,0 +1 @@
1
+ export declare const useOperations: () => import('../..').OperationsContextType;
@@ -0,0 +1,13 @@
1
+ export * from './useResource';
2
+ export * from './useResourceAreaComponent';
3
+ export * from './useResourceGroups';
4
+ export * from './useResourceSearch';
5
+ export * from './useResourceType';
6
+ export * from './useResourceTypes';
7
+ export * from './useResources';
8
+ export * from './useResourceMutations';
9
+ export * from './useResourceActions';
10
+ export * from './useEditorSchemas';
11
+ export * from './useInformerState';
12
+ export * from './useActiveSyncs';
13
+ export * from './useStreamAction';
@@ -0,0 +1,16 @@
1
+ import { ActiveSync } from '../../utils/activeSyncAggregator';
2
+ export type { ActiveSync };
3
+ /**
4
+ * useActiveSyncs aggregates informer sync state across all connections.
5
+ * Subscribes to the global `informer/STATE` event topic.
6
+ */
7
+ export declare const useActiveSyncs: () => {
8
+ /** All tracked syncs */
9
+ syncs: ActiveSync[];
10
+ /** Whether any connection is actively syncing */
11
+ hasSyncing: boolean;
12
+ /** The primary (first incomplete) sync or most recent */
13
+ primarySync: ActiveSync;
14
+ /** Aggregate progress across all connections (0-1) */
15
+ aggregateProgress: number;
16
+ };
@@ -0,0 +1,22 @@
1
+ type UseEditorSchemasOptions = {
2
+ /** The plugin ID to fetch schemas for */
3
+ pluginID?: string;
4
+ /** The connection ID to fetch schemas for */
5
+ connectionID: string;
6
+ /** Whether to enable the query */
7
+ enabled?: boolean;
8
+ };
9
+ /**
10
+ * useEditorSchemas fetches editor schemas for a plugin + connection pair
11
+ * from the backend via Wails bindings.
12
+ *
13
+ * The caller is responsible for registering the returned schemas with
14
+ * the SchemaRegistry (which lives in the host app's monaco provider).
15
+ */
16
+ export declare const useEditorSchemas: ({ pluginID: explicitPluginID, connectionID, enabled, }: UseEditorSchemasOptions) => {
17
+ schemas: import("../../models").types.EditorSchema[];
18
+ isLoading: boolean;
19
+ error: Error | null;
20
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import("../../models").types.EditorSchema[], Error>>;
21
+ };
22
+ export default useEditorSchemas;
@@ -0,0 +1,24 @@
1
+ import { InformerConnectionSummary, InformerResourceState } from '../../types/informer';
2
+ type UseInformerStateOptions = {
3
+ pluginID?: string;
4
+ connectionID: string;
5
+ enabled?: boolean;
6
+ };
7
+ /**
8
+ * useInformerState provides real-time informer state for a connection.
9
+ * It fetches the initial summary via Wails binding and subscribes to
10
+ * state change events for live updates.
11
+ */
12
+ export declare const useInformerState: ({ pluginID: explicitPluginID, connectionID, enabled, }: UseInformerStateOptions) => {
13
+ /** Full summary query result */
14
+ summary: import('@tanstack/react-query').UseQueryResult<InformerConnectionSummary, Error>;
15
+ /** Get the state of a specific resource type's informer */
16
+ getResourceState: (key: string) => InformerResourceState | undefined;
17
+ /** Whether all registered informers have reached a terminal state */
18
+ isFullySynced: boolean;
19
+ /** Sync progress as a 0-1 fraction (terminal states / total) */
20
+ syncProgress: number;
21
+ /** Number of informers that encountered errors */
22
+ errorCount: number;
23
+ };
24
+ export {};
@@ -0,0 +1,74 @@
1
+ import { types } from '../../wailsjs/go/models';
2
+ type UseResourceOptions = {
3
+ /**
4
+ * The ID of the plugin responsible for this resource
5
+ * @example "kubernetes"
6
+ */
7
+ pluginID?: string;
8
+ /**
9
+ * The connection ID to scope the resource to
10
+ * @example "integration"
11
+ */
12
+ connectionID: string;
13
+ /**
14
+ * The GVR (Group, Version, Resource) identifier to fetch
15
+ * @example "core::v1::pods"
16
+ */
17
+ resourceKey: string;
18
+ /**
19
+ * The ID of the resource to fetch
20
+ * @example "nginx-1452"
21
+ */
22
+ resourceID: string;
23
+ /**
24
+ * Optional namespace to scope the resource to, if the backend
25
+ * supports the concept of namespaces of resources.
26
+ * @example "default"
27
+ */
28
+ namespace?: string;
29
+ /**
30
+ * Optional parameters to pass to the resource fetch
31
+ * @example { labelSelector: "app=nginx" }
32
+ */
33
+ getParams?: Record<string, unknown>;
34
+ /**
35
+ * Optional parameters to pass to the resource update
36
+ * @example { dryRun: true }
37
+ */
38
+ updateParams?: Record<string, unknown>;
39
+ /**
40
+ * Optional parameters to pass to the resource delete
41
+ * @example { cascade: true }
42
+ * @example { force: true }
43
+ */
44
+ deleteParams?: Record<string, unknown>;
45
+ };
46
+ /**
47
+ * The useResource hook returns a hook, scoped to the desired resource and connection, that allows for interacting
48
+ * with, and fetching, the resource data.
49
+ *
50
+ * It should be noted that this hook does not perform any logic to ensure that either the resource exists,
51
+ * @throws If the resourceID is invalid
52
+ */
53
+ export declare const useResource: ({ pluginID: explicitPluginID, connectionID, resourceKey, resourceID, namespace, getParams, updateParams, deleteParams, }: UseResourceOptions) => {
54
+ /**
55
+ * Fetch result for the resource. The client will automatically cache the result, and update the cache
56
+ * when the resource is updated or deleted via the returned update and remove mutation functions.
57
+ */
58
+ resource: import('@tanstack/react-query').UseQueryResult<types.GetResult, Error>;
59
+ /**
60
+ * Update an existing resource. A set of optional parameters can be passed to customize the update behavior,
61
+ * which if specified, will add additional default behavior set via the hook options.
62
+ *
63
+ * @params opts Optional parameters to pass to the resource update
64
+ */
65
+ update: import('@tanstack/react-query').UseMutateAsyncFunction<types.UpdateResult, unknown, Partial<types.UpdateInput>, unknown>;
66
+ /**
67
+ * Delete an existing resource. A set of optional parameters can be passed to customize the delete behavior,
68
+ * which if specified, will add additional default behavior set via the hook options.
69
+ *
70
+ * @params {object} opts Optional parameters to pass to the resource delete
71
+ */
72
+ remove: import('@tanstack/react-query').UseMutateAsyncFunction<types.DeleteResult, unknown, Partial<types.DeleteInput>, unknown>;
73
+ };
74
+ export default useResource;
@@ -0,0 +1,69 @@
1
+ import { types } from '../../wailsjs/go/models';
2
+ type UseResourceActionsOptions = {
3
+ /**
4
+ * The ID of the plugin responsible for this resource
5
+ * @example "kubernetes"
6
+ */
7
+ pluginID?: string;
8
+ /**
9
+ * The connection ID to scope the resource to
10
+ * @example "integration"
11
+ */
12
+ connectionID: string;
13
+ /**
14
+ * The resource type key
15
+ * @example "helm::v1::Release"
16
+ */
17
+ resourceKey: string;
18
+ /**
19
+ * Whether to enable the actions query
20
+ * @default true
21
+ */
22
+ enabled?: boolean;
23
+ };
24
+ /**
25
+ * useResourceActions discovers available actions for a resource type.
26
+ * Returns the list of ActionDescriptors that the backend reports for the given resource key.
27
+ */
28
+ export declare const useResourceActions: ({ pluginID: explicitPluginID, connectionID, resourceKey, enabled, }: UseResourceActionsOptions) => {
29
+ actions: types.ActionDescriptor[];
30
+ isLoading: boolean;
31
+ error: Error | null;
32
+ };
33
+ type UseExecuteActionOptions = {
34
+ /**
35
+ * The ID of the plugin responsible for this resource
36
+ * @example "kubernetes"
37
+ */
38
+ pluginID?: string;
39
+ /**
40
+ * The connection ID to scope the resource to
41
+ * @example "integration"
42
+ */
43
+ connectionID: string;
44
+ /**
45
+ * The resource type key
46
+ * @example "helm::v1::Release"
47
+ */
48
+ resourceKey: string;
49
+ };
50
+ type ExecuteActionParams = {
51
+ /** The action ID to execute */
52
+ actionID: string;
53
+ /** The resource ID (for instance-scoped actions) */
54
+ id?: string;
55
+ /** The resource namespace */
56
+ namespace?: string;
57
+ /** Action-specific parameters */
58
+ params?: Record<string, unknown>;
59
+ };
60
+ /**
61
+ * useExecuteAction provides a mutation for executing a resource action.
62
+ * Returns a mutate function that can be called with action details.
63
+ */
64
+ export declare const useExecuteAction: ({ pluginID: explicitPluginID, connectionID, resourceKey, }: UseExecuteActionOptions) => {
65
+ executeAction: import('@tanstack/react-query').UseMutateAsyncFunction<types.ActionResult, unknown, ExecuteActionParams, unknown>;
66
+ isExecuting: boolean;
67
+ error: unknown;
68
+ };
69
+ export default useResourceActions;
@@ -0,0 +1,9 @@
1
+ import { ui } from '../../wailsjs/go/models';
2
+ export declare const useResourceAreaComponent: (params: ui.GetResourceAreaComponentInput) => {
3
+ /**
4
+ * Fetch result for the resource. The client will automatically cache the result, and update the cache
5
+ * when the resource is updated or deleted via the returned update and remove mutation functions.
6
+ */
7
+ component: import('@tanstack/react-query').UseQueryResult<ui.ResourceComponent, Error>;
8
+ };
9
+ export default useResourceAreaComponent;