@omniviewdev/runtime 0.9.1 → 0.10.0

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 (39) hide show
  1. package/dist/api.cjs +1 -1
  2. package/dist/api.d.ts +1 -0
  3. package/dist/api.js +173 -113
  4. package/dist/bindings/events/index.d.ts +28 -0
  5. package/dist/bindings/github.com/omniviewdev/omniview/backend/window/index.d.ts +3 -0
  6. package/dist/bindings/github.com/omniviewdev/omniview/backend/window/models.d.ts +190 -0
  7. package/dist/bindings/github.com/omniviewdev/omniview/backend/window/service.d.ts +83 -0
  8. package/dist/connection/ConnectionBoundary.d.ts +21 -0
  9. package/dist/connection/connectionReadiness.d.ts +30 -0
  10. package/dist/context/index.d.ts +1 -0
  11. package/dist/context/windows/WindowActionsContext.d.ts +31 -0
  12. package/dist/context/windows/activePageNavigator.d.ts +13 -0
  13. package/dist/context/windows/index.d.ts +2 -0
  14. package/dist/extensions/provider.d.ts +9 -9
  15. package/dist/hooks/connection/index.d.ts +4 -0
  16. package/dist/hooks/connection/useConnectionNamespaces.d.ts +2 -1
  17. package/dist/hooks/connection/useConnectionReadiness.d.ts +9 -0
  18. package/dist/hooks/resource/useConnectionQueryGuard.d.ts +3 -0
  19. package/dist/hooks/resource/useEventBatcher.d.ts +1 -0
  20. package/dist/hooks/resource/useResource.d.ts +3 -2
  21. package/dist/hooks/resource/useResourceGroups.d.ts +2 -1
  22. package/dist/hooks/resource/useResourceMutations.d.ts +2 -2
  23. package/dist/hooks/resource/useResourceSearch.d.ts +2 -1
  24. package/dist/hooks/resource/useResourceTypes.d.ts +2 -1
  25. package/dist/hooks/resource/useResources.d.ts +3 -2
  26. package/dist/index.cjs +4 -4
  27. package/dist/index.js +3080 -2379
  28. package/dist/models-BxypsesT.cjs +1 -0
  29. package/dist/models-C6jzDokQ.js +347 -0
  30. package/dist/models.cjs +1 -1
  31. package/dist/models.d.ts +1 -0
  32. package/dist/models.js +29 -28
  33. package/dist/router/Link.d.ts +3 -0
  34. package/dist/{servicewrapper-Q1ww3DUo.js → servicewrapper-C6SURWw1.js} +32 -31
  35. package/dist/servicewrapper-COMjQHnY.cjs +1 -0
  36. package/package.json +3 -3
  37. package/dist/models-DU8pTcoZ.js +0 -142
  38. package/dist/models-KV9f8Ceh.cjs +0 -1
  39. package/dist/servicewrapper-CCW7kIVs.cjs +0 -1
@@ -0,0 +1,190 @@
1
+ /**
2
+ * DragBegin starts a cross-window tab drag session.
3
+ */
4
+ export declare class DragBegin {
5
+ "sessionId": string;
6
+ "sourceWindow": string;
7
+ "dragType": string;
8
+ /**
9
+ * Payload is the JSON of the base-ui TabDragPayload; it is forwarded to
10
+ * target windows verbatim.
11
+ */
12
+ "payload": string;
13
+ /** Creates a new DragBegin instance. */
14
+ constructor($$source?: Partial<DragBegin>);
15
+ /**
16
+ * Creates a new DragBegin instance from a string or object.
17
+ */
18
+ static createFrom($$source?: any): DragBegin;
19
+ }
20
+ /**
21
+ * DragBeginEvent is the payload of EventDragBegin; every window reports a
22
+ * fresh viewport in response.
23
+ */
24
+ export declare class DragBeginEvent {
25
+ "sessionId": string;
26
+ "sourceWindow": string;
27
+ "dragType": string;
28
+ /** Creates a new DragBeginEvent instance. */
29
+ constructor($$source?: Partial<DragBeginEvent>);
30
+ /**
31
+ * Creates a new DragBeginEvent instance from a string or object.
32
+ */
33
+ static createFrom($$source?: any): DragBeginEvent;
34
+ }
35
+ /**
36
+ * DragEndEvent is the payload of EventDragEnd; all windows clear remote
37
+ * drag state for the session.
38
+ */
39
+ export declare class DragEndEvent {
40
+ "sessionId": string;
41
+ /** Creates a new DragEndEvent instance. */
42
+ constructor($$source?: Partial<DragEndEvent>);
43
+ /**
44
+ * Creates a new DragEndEvent instance from a string or object.
45
+ */
46
+ static createFrom($$source?: any): DragEndEvent;
47
+ }
48
+ /**
49
+ * DragLeaveEvent is the payload of EventDragLeave.
50
+ */
51
+ export declare class DragLeaveEvent {
52
+ "sessionId": string;
53
+ "targetWindow": string;
54
+ /** Creates a new DragLeaveEvent instance. */
55
+ constructor($$source?: Partial<DragLeaveEvent>);
56
+ /**
57
+ * Creates a new DragLeaveEvent instance from a string or object.
58
+ */
59
+ static createFrom($$source?: any): DragLeaveEvent;
60
+ }
61
+ /**
62
+ * DragPointerEvent is the payload of EventDragHover and EventDragDrop. The
63
+ * pointer is in the target window's client space.
64
+ */
65
+ export declare class DragPointerEvent {
66
+ "sessionId": string;
67
+ "targetWindow": string;
68
+ /**
69
+ * Payload is DragBegin.Payload verbatim (JSON of TabDragPayload).
70
+ */
71
+ "payload": string;
72
+ "clientX": number;
73
+ "clientY": number;
74
+ /** Creates a new DragPointerEvent instance. */
75
+ constructor($$source?: Partial<DragPointerEvent>);
76
+ /**
77
+ * Creates a new DragPointerEvent instance from a string or object.
78
+ */
79
+ static createFrom($$source?: any): DragPointerEvent;
80
+ }
81
+ /**
82
+ * DropResult is the outcome of EndDrag.
83
+ */
84
+ export declare class DropResult {
85
+ "accepted": boolean;
86
+ "targetWindow": string;
87
+ "targetInstanceId": string;
88
+ /** Creates a new DropResult instance. */
89
+ constructor($$source?: Partial<DropResult>);
90
+ /**
91
+ * Creates a new DropResult instance from a string or object.
92
+ */
93
+ static createFrom($$source?: any): DropResult;
94
+ }
95
+ /**
96
+ * Info describes one live window.
97
+ */
98
+ export declare class Info {
99
+ "name": string;
100
+ "kind": Kind;
101
+ /**
102
+ * Focused is true for the most recently focused window.
103
+ */
104
+ "focused": boolean;
105
+ /** Creates a new Info instance. */
106
+ constructor($$source?: Partial<Info>);
107
+ /**
108
+ * Creates a new Info instance from a string or object.
109
+ */
110
+ static createFrom($$source?: any): Info;
111
+ }
112
+ /**
113
+ * Kind selects which shell a window renders.
114
+ */
115
+ export declare enum Kind {
116
+ /**
117
+ * The Go zero value for the underlying type of the enum.
118
+ */
119
+ $zero = "",
120
+ /**
121
+ * KindWorkspace renders the full shell (header, rail, page tabs, panes,
122
+ * bottom drawer, footer).
123
+ */
124
+ KindWorkspace = "workspace",
125
+ /**
126
+ * KindPanel renders only a drawer tab strip and the drawer tab content.
127
+ */
128
+ KindPanel = "panel"
129
+ }
130
+ /**
131
+ * OpenRequest describes a window to open.
132
+ */
133
+ export declare class OpenRequest {
134
+ "kind": Kind;
135
+ /**
136
+ * InitialState is the opaque per-slot state handed to the new window
137
+ * before it loads (same format as SaveState slots).
138
+ */
139
+ "initialState": {
140
+ [_ in string]?: string;
141
+ };
142
+ /**
143
+ * When HasPosition is set the new window's top-left is placed near the
144
+ * pointer at (ClientX, ClientY) in AnchorWindow's client space.
145
+ */
146
+ "anchorWindow": string;
147
+ "clientX": number;
148
+ "clientY": number;
149
+ "hasPosition": boolean;
150
+ /**
151
+ * Width and Height of the new window; 0 selects the kind's default.
152
+ */
153
+ "width": number;
154
+ "height": number;
155
+ /** Creates a new OpenRequest instance. */
156
+ constructor($$source?: Partial<OpenRequest>);
157
+ /**
158
+ * Creates a new OpenRequest instance from a string or object.
159
+ */
160
+ static createFrom($$source?: any): OpenRequest;
161
+ }
162
+ /**
163
+ * WindowClosedEvent is the payload of EventWindowClosed. States holds the
164
+ * closed window's last saved slots (slot -> JSON).
165
+ */
166
+ export declare class WindowClosedEvent {
167
+ "name": string;
168
+ "kind": Kind;
169
+ "states": {
170
+ [_ in string]?: string;
171
+ };
172
+ /** Creates a new WindowClosedEvent instance. */
173
+ constructor($$source?: Partial<WindowClosedEvent>);
174
+ /**
175
+ * Creates a new WindowClosedEvent instance from a string or object.
176
+ */
177
+ static createFrom($$source?: any): WindowClosedEvent;
178
+ }
179
+ /**
180
+ * WindowsChangedEvent is the payload of EventWindowsChanged.
181
+ */
182
+ export declare class WindowsChangedEvent {
183
+ "windows": Info[];
184
+ /** Creates a new WindowsChangedEvent instance. */
185
+ constructor($$source?: Partial<WindowsChangedEvent>);
186
+ /**
187
+ * Creates a new WindowsChangedEvent instance from a string or object.
188
+ */
189
+ static createFrom($$source?: any): WindowsChangedEvent;
190
+ }
@@ -0,0 +1,83 @@
1
+ import { CancellablePromise as $CancellablePromise } from '@wailsio/runtime';
2
+ import * as $models from "./models.js";
3
+ /**
4
+ * BeginDrag starts a cross-window drag owned by the source window, refreshes
5
+ * every window's native bounds and asks every window to report a fresh
6
+ * viewport.
7
+ */
8
+ export declare function BeginDrag(b: $models.DragBegin): $CancellablePromise<void>;
9
+ /**
10
+ * CancelDrag ends a session without a drop. Unknown sessions are ignored.
11
+ */
12
+ export declare function CancelDrag(sessionID: string): $CancellablePromise<void>;
13
+ /**
14
+ * Close closes a non-main window. Its state is removed and windows/closed is
15
+ * emitted once the OS window has closed.
16
+ */
17
+ export declare function Close(name: string): $CancellablePromise<void>;
18
+ /**
19
+ * EndDrag drops the tab on the window under the pointer (given in the source
20
+ * window's client space) and waits for that window's RespondDrop. It returns
21
+ * a not-accepted result when no other window is under the pointer, the
22
+ * target declines, closes, or does not answer in time. The session always
23
+ * ends with windows/drag/end.
24
+ */
25
+ export declare function EndDrag(sessionID: string, clientX: number, clientY: number): $CancellablePromise<$models.DropResult>;
26
+ /**
27
+ * Focus shows, restores and focuses the named window.
28
+ */
29
+ export declare function Focus(name: string): $CancellablePromise<void>;
30
+ /**
31
+ * GetState returns the named window's slots (slot -> JSON). A window calls it
32
+ * once its frontend has loaded, which also releases the next queued restore.
33
+ */
34
+ export declare function GetState(name: string): $CancellablePromise<{
35
+ [_ in string]?: string;
36
+ }>;
37
+ /**
38
+ * List returns the live windows in creation order.
39
+ */
40
+ export declare function List(): $CancellablePromise<$models.Info[]>;
41
+ /**
42
+ * ListStates returns every live window's slots (window -> slot -> JSON).
43
+ */
44
+ export declare function ListStates(): $CancellablePromise<{
45
+ [_ in string]?: {
46
+ [_ in string]?: string;
47
+ };
48
+ }>;
49
+ /**
50
+ * MoveDrag routes the pointer, given in the source window's client space, to
51
+ * the window under it: the previous target gets a leave event, the current
52
+ * target a hover event. Moves for unknown or ending sessions are ignored;
53
+ * they race with EndDrag/CancelDrag by design.
54
+ */
55
+ export declare function MoveDrag(sessionID: string, clientX: number, clientY: number): $CancellablePromise<void>;
56
+ /**
57
+ * MoveToPointer places the named window like a torn-off tab: its top-left
58
+ * goes up/left of the pointer, which is given in the window's own client
59
+ * space.
60
+ */
61
+ export declare function MoveToPointer(name: string, clientX: number, clientY: number): $CancellablePromise<void>;
62
+ /**
63
+ * Open creates a window of the requested kind and returns its name. The
64
+ * InitialState slots are served by GetState before the window loads.
65
+ */
66
+ export declare function Open(req: $models.OpenRequest): $CancellablePromise<string>;
67
+ /**
68
+ * ReportViewport records the named window's webview viewport size in CSS
69
+ * px. Together with the native bounds it locates the window's content on
70
+ * screen for drag hit-testing. Reports from unknown windows (for example a
71
+ * window that just closed) are ignored.
72
+ */
73
+ export declare function ReportViewport(name: string, width: number, height: number): $CancellablePromise<void>;
74
+ /**
75
+ * RespondDrop delivers the drop target's answer to the waiting EndDrag.
76
+ * Answers for unknown sessions, sessions not waiting on a drop, and duplicate
77
+ * answers are ignored.
78
+ */
79
+ export declare function RespondDrop(sessionID: string, accepted: boolean, targetInstanceID: string): $CancellablePromise<void>;
80
+ /**
81
+ * SaveState stores one slot of the named window and schedules persistence.
82
+ */
83
+ export declare function SaveState(name: string, slot: string, stateJSON: string): $CancellablePromise<void>;
@@ -0,0 +1,21 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { ConnectionReadiness } from '../hooks/connection/useConnectionReadiness';
3
+ export interface ConnectionBoundaryProps {
4
+ pluginID?: string;
5
+ connectionID: string;
6
+ children: ReactNode;
7
+ fallback?: (state: ConnectionReadiness) => ReactNode;
8
+ }
9
+ export interface ConnectionBoundaryFallbackProps {
10
+ state: ConnectionReadiness;
11
+ connectionName?: string;
12
+ /** Plugin-provided connection identity, shown above status instead of the generic connection name. */
13
+ connectionDetails?: ReactNode;
14
+ onEditConnection?: () => void;
15
+ onBack?: () => void;
16
+ backLabel?: string;
17
+ }
18
+ /** Presentation only: no connection requests or automatic recovery. */
19
+ export declare function ConnectionBoundaryFallback({ state, connectionName, connectionDetails, onEditConnection, onBack, backLabel }: ConnectionBoundaryFallbackProps): React.JSX.Element | null;
20
+ /** Mount children only after the backend confirms this connection is connected. */
21
+ export declare function ConnectionBoundary(props: ConnectionBoundaryProps): React.JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { Connection, ConnectionStatus } from '../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
2
+ export type ConnectionReadinessPhase = 'checking' | 'disconnected' | 'connecting' | 'connected' | 'unauthorized' | 'forbidden' | 'not-found' | 'error';
3
+ export interface ConnectionReadiness {
4
+ phase: ConnectionReadinessPhase;
5
+ message?: string;
6
+ connection?: Connection;
7
+ connect: () => Promise<void>;
8
+ retry: () => Promise<void>;
9
+ }
10
+ type Snapshot = Pick<ConnectionReadiness, 'phase' | 'message' | 'connection'>;
11
+ /** Internal hook adapter. Inactive snapshots never reuse an earlier mount's readiness. */
12
+ export declare function connectionReadinessStore(pluginID: string, connectionID: string): {
13
+ getSnapshot: () => Snapshot;
14
+ subscribe: (listener: () => void) => () => void;
15
+ connect: () => Promise<void>;
16
+ retry: () => Promise<void>;
17
+ };
18
+ /** Check connection readiness before non-React I/O. This never starts a connection. */
19
+ export declare function requireConnectionReady(pluginID: string, connectionID: string): Promise<void>;
20
+ /** Keep lifecycle events observed until I/O completes, then reject invalidated results. */
21
+ export declare function withConnectionReady<T>(pluginID: string, connectionID: string, operation: () => Promise<T>): Promise<T>;
22
+ /** Internal resource-I/O fence; reading does not create or retain a store entry. */
23
+ export declare function getConnectionReadinessGeneration(pluginID: string, connectionID: string): number | undefined;
24
+ export declare function isConnectionReadinessCurrent(pluginID: string, connectionID: string, expectedGeneration: number | undefined): boolean;
25
+ /** Preserve useConnection's status return value while sharing explicit starts. */
26
+ export declare function startConnectionWithReadiness(pluginID: string, connectionID: string): Promise<ConnectionStatus>;
27
+ /** Block consumers immediately, including while a previous check/start is pending. */
28
+ export declare function stopConnectionWithReadiness(pluginID: string, connectionID: string): Promise<Connection>;
29
+ export declare function invalidateConnectionReadiness(pluginID: string, connectionID: string, removed?: boolean): void;
30
+ export {};
@@ -3,3 +3,4 @@ export * from './settings';
3
3
  export * from './drawer';
4
4
  export * from './modal';
5
5
  export * from './operations/OperationsContext';
6
+ export * from './windows';
@@ -0,0 +1,31 @@
1
+ import { default as React } from 'react';
2
+ export type OpenInNewTabOptions = {
3
+ /** Keep the current tab active; the new tab opens behind it. */
4
+ background?: boolean;
5
+ };
6
+ /**
7
+ * Opens host routes (e.g. `/_plugin/kubernetes/cluster/abc/resources`) outside
8
+ * the current page tab. The host application provides the implementation.
9
+ */
10
+ export type WindowActions = {
11
+ /** Opens the path in a new page tab next to the current one. */
12
+ openInNewTab: (path: string, options?: OpenInNewTabOptions) => void;
13
+ /** Opens the path in a new workspace window. */
14
+ openInNewWindow: (path: string) => void;
15
+ /** Opens the path in a new tab in the side-by-side pane, splitting the view if needed. */
16
+ openInSplit: (path: string) => void;
17
+ };
18
+ export declare const WindowActionsContext: React.Context<WindowActions | null>;
19
+ export declare const WindowActionsProvider: React.FC<{
20
+ actions: WindowActions;
21
+ children: React.ReactNode;
22
+ }>;
23
+ /**
24
+ * Window-level navigation for plugins: open a route in a new tab, a new window
25
+ * or the split pane.
26
+ *
27
+ * @example
28
+ * const { openInNewTab } = useWindowActions();
29
+ * openInNewTab(`/_plugin/${pluginId}/cluster/${id}/resources`);
30
+ */
31
+ export declare function useWindowActions(): WindowActions;
@@ -0,0 +1,13 @@
1
+ type ActivePageNavigator = (path: string) => void;
2
+ /**
3
+ * The host registers how to navigate the page the user is looking at (the
4
+ * active page tab of this window). Returns the unregister function.
5
+ */
6
+ export declare function registerActivePageNavigator(navigator: ActivePageNavigator): () => void;
7
+ /**
8
+ * Navigates the active page of this window to a host route such as
9
+ * `/settings?category=developer`. Code outside React (error actions, event
10
+ * handlers) uses this instead of touching `window.location`.
11
+ */
12
+ export declare function navigateActivePage(path: string): void;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './WindowActionsContext';
2
+ export * from './activePageNavigator';
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ExtensionPointRegistryContract, ExtensionPointStoreContract, ExtensionRenderContext } from '../types/extensions';
2
+ import { ExtensionContributionRegistration, ExtensionPointRegistryContract, ExtensionPointStoreContract, ExtensionRenderContext } from '../types/extensions';
3
3
  type ExtensionProviderProps = {
4
4
  /** Allow passing in a custom registry, purely for testing purposes */
5
5
  registry: ExtensionPointRegistryContract;
@@ -7,14 +7,14 @@ type ExtensionProviderProps = {
7
7
  };
8
8
  export type ExtensionProviderType = React.FC<ExtensionProviderProps>;
9
9
  export declare const useExtensionRegistry: () => ExtensionPointRegistryContract | undefined;
10
- /**
11
- * Hook to get an extension point store that reactively updates when contributions change.
12
- * Mounted consumers rerender when matching registry data changes.
13
- *
14
- * Uses a sentinel-based snapshot so that useSyncExternalStore detects contribution
15
- * mutations even though the store object reference is stable. The store exposes a
16
- * monotonically increasing `version` counter that increments on every register/unregister.
17
- */
10
+ export interface ExtensionPointSnapshot<TValue = unknown, TContext = ExtensionRenderContext> {
11
+ readonly store: ExtensionPointStoreContract<TValue, TContext> | undefined;
12
+ readonly version: number;
13
+ readonly contributions: readonly ExtensionContributionRegistration<TValue>[];
14
+ }
15
+ /** Immutable render input; a stable mutable store is not a React Compiler dependency. */
16
+ export declare function useExtensionPointSnapshot<TValue = unknown, TContext = ExtensionRenderContext>(id: string): ExtensionPointSnapshot<TValue, TContext>;
17
+ /** Access the live store for imperative matching and registration. */
18
18
  export declare function useExtensionPoint<TValue = unknown, TContext = ExtensionRenderContext>(id: string): ExtensionPointStoreContract<TValue, TContext> | undefined;
19
19
  /**
20
20
  * ExtensionProvider houses the various locations where components from other plugins can inject
@@ -2,3 +2,7 @@ export * from './useConnection';
2
2
  export * from './useConnections';
3
3
  export * from './useConnectionNamespaces';
4
4
  export * from './useConnectionStatus';
5
+ export * from './useConnectionReadiness';
6
+ export { requireConnectionReady, withConnectionReady } from '../../connection/connectionReadiness';
7
+ export { ConnectionBoundary, ConnectionBoundaryFallback } from '../../connection/ConnectionBoundary';
8
+ export type { ConnectionBoundaryProps, ConnectionBoundaryFallbackProps } from '../../connection/ConnectionBoundary';
@@ -7,11 +7,12 @@ type UseConnectionOptions = {
7
7
  * The ID of the connection
8
8
  */
9
9
  connectionID: string;
10
+ enabled?: boolean;
10
11
  };
11
12
  /**
12
13
  * Get and retreive connections from a plugin's connection manager..
13
14
  */
14
- export declare const useConnectionNamespaces: ({ pluginID: explicitPluginID, connectionID }: UseConnectionOptions) => {
15
+ export declare const useConnectionNamespaces: ({ pluginID: explicitPluginID, connectionID, enabled }: UseConnectionOptions) => {
15
16
  /**
16
17
  * Get the connection
17
18
  */
@@ -0,0 +1,9 @@
1
+ import { ConnectionReadiness } from '../../connection/connectionReadiness';
2
+ export type { ConnectionReadiness, ConnectionReadinessPhase } from '../../connection/connectionReadiness';
3
+ export interface UseConnectionReadinessOptions {
4
+ pluginID?: string;
5
+ connectionID: string;
6
+ enabled?: boolean;
7
+ }
8
+ /** Readiness is independent of resource-watch synchronization and never auto-connects. */
9
+ export declare function useConnectionReadiness({ pluginID: explicitPluginID, connectionID, enabled, }: UseConnectionReadinessOptions): ConnectionReadiness;
@@ -0,0 +1,3 @@
1
+ import { QueryKey } from '@tanstack/react-query';
2
+ /** Cancel connection-scoped reads immediately and reject late results after invalidation. */
3
+ export declare function useConnectionQueryGuard(pluginID: string, connectionID: string): <T>(queryKey: QueryKey, signal: AbortSignal, operation: () => Promise<T>) => Promise<T>;
@@ -56,4 +56,5 @@ export declare function applyBatch(oldData: any, events: ResourceEvent[], idAcce
56
56
  */
57
57
  export declare function useEventBatcher(queryClient: QueryClient, queryKey: QueryKey, getResourceKey: (id: string, ns: string) => QueryKey, idAccessor: string | undefined, watchState: WatchState, options?: {
58
58
  syncWindowMs?: number;
59
+ enabled?: boolean;
59
60
  }): (event: ResourceEvent) => void;
@@ -25,6 +25,7 @@ type UseResourceOptions = {
25
25
  * @example "default"
26
26
  */
27
27
  namespace?: string;
28
+ enabled?: boolean;
28
29
  };
29
30
  /**
30
31
  * The useResource hook returns a hook, scoped to the desired resource and connection, that allows for interacting
@@ -33,7 +34,7 @@ type UseResourceOptions = {
33
34
  * It should be noted that this hook does not perform any logic to ensure that either the resource exists,
34
35
  * @throws If the resourceID is invalid
35
36
  */
36
- export declare const useResource: ({ pluginID: explicitPluginID, connectionID, resourceKey, resourceID, namespace, }: UseResourceOptions) => {
37
+ export declare const useResource: ({ pluginID: explicitPluginID, connectionID, resourceKey, resourceID, namespace, enabled, }: UseResourceOptions) => {
37
38
  /**
38
39
  * Fetch result for the resource. The client will automatically cache the result, and update the cache
39
40
  * when the resource is updated or deleted via the returned update and remove mutation functions.
@@ -46,7 +47,7 @@ export declare const useResource: ({ pluginID: explicitPluginID, connectionID, r
46
47
  * @params opts Optional parameters to pass to the resource update
47
48
  */
48
49
  update: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').UpdateResult | null, unknown, {
49
- input?: any;
50
+ input?: unknown;
50
51
  }, unknown>;
51
52
  /**
52
53
  * Delete an existing resource. A set of optional parameters can be passed to customize the delete behavior,
@@ -7,11 +7,12 @@ type UseResourceGroupsOptions = {
7
7
  * The ID of the connection
8
8
  */
9
9
  connectionID: string;
10
+ enabled?: boolean;
10
11
  };
11
12
  /**
12
13
  * Fetch the resource groups for a given plugin and connection.
13
14
  */
14
- export declare const useResourceGroups: ({ pluginID: explicitPluginID, connectionID }: UseResourceGroupsOptions) => {
15
+ export declare const useResourceGroups: ({ pluginID: explicitPluginID, connectionID, enabled }: UseResourceGroupsOptions) => {
15
16
  /**
16
17
  * The resource groups for the given plugin and connection.
17
18
  */
@@ -44,14 +44,14 @@ export declare const useResourceMutations: ({ pluginID: explicitPluginID }: UseR
44
44
  create: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').CreateResult | null, unknown, {
45
45
  opts: ResourceMutationOptions;
46
46
  input: {
47
- input?: any;
47
+ input?: unknown;
48
48
  namespace?: string;
49
49
  };
50
50
  }, unknown>;
51
51
  update: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').UpdateResult | null, unknown, {
52
52
  opts: ResourceMutationOptions;
53
53
  input: {
54
- input?: any;
54
+ input?: unknown;
55
55
  };
56
56
  }, unknown>;
57
57
  remove: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').DeleteResult | null, unknown, {
@@ -13,6 +13,7 @@ type UseResourceSearchOptions = {
13
13
  * Entry for the resource search
14
14
  */
15
15
  searches: ResourceSearchEntry[];
16
+ enabled?: boolean;
16
17
  };
17
18
  type ResourceSearchEntry = {
18
19
  /**
@@ -32,5 +33,5 @@ type ResourceSearchEntry = {
32
33
  * The useResourceSearch is a utility hook to search across multiple resources and/or namespaces. This hook is currently
33
34
  * limited searching within a single plugin, and a single connection.
34
35
  */
35
- export declare const useResourceSearch: ({ pluginID: explicitPluginID, connectionID, searches, }: UseResourceSearchOptions) => import('@tanstack/react-query').UseQueryResult<any[], Error>[];
36
+ export declare const useResourceSearch: ({ pluginID: explicitPluginID, connectionID, searches, enabled, }: UseResourceSearchOptions) => import('@tanstack/react-query').UseQueryResult<any[], Error>[];
36
37
  export default useResourceSearch;
@@ -7,11 +7,12 @@ type UseResourceTypesOptions = {
7
7
  * The ID of the connection
8
8
  */
9
9
  connectionID: string;
10
+ enabled?: boolean;
10
11
  };
11
12
  /**
12
13
  * Fetch the resource types for a given plugin and connection.
13
14
  */
14
- export declare const useResourceTypes: ({ pluginID: explicitPluginID, connectionID }: UseResourceTypesOptions) => {
15
+ export declare const useResourceTypes: ({ pluginID: explicitPluginID, connectionID, enabled }: UseResourceTypesOptions) => {
15
16
  /**
16
17
  * The resource types for the given plugin and connection.
17
18
  */
@@ -27,6 +27,7 @@ type UseResourcesOptions = {
27
27
  * live functionality to work, this must be set to the path on which the ID is located.
28
28
  */
29
29
  idAccessor?: string;
30
+ enabled?: boolean;
30
31
  };
31
32
  /**
32
33
  * The useResource hook returns a hook, scoped to the desired resource and connection, that allows for interacting
@@ -35,7 +36,7 @@ type UseResourcesOptions = {
35
36
  * It should be noted that this hook does not perform any logic to ensure that either the resource exists,
36
37
  * @throws If the resourceID is invalid
37
38
  */
38
- export declare const useResources: ({ pluginID: explicitPluginID, connectionID, resourceKey, idAccessor, namespaces, }: UseResourcesOptions) => {
39
+ export declare const useResources: ({ pluginID: explicitPluginID, connectionID, resourceKey, idAccessor, namespaces, enabled, }: UseResourcesOptions) => {
39
40
  /**
40
41
  * Fetch result for the resource. The client will automatically cache the result, and update the cache
41
42
  * when the resources are updated or deleted via the returned create and remove mutation functions, or
@@ -49,7 +50,7 @@ export declare const useResources: ({ pluginID: explicitPluginID, connectionID,
49
50
  * @params opts Optional parameters to pass to the resource create operation
50
51
  */
51
52
  create: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').CreateResult | null, unknown, {
52
- input?: any;
53
+ input?: unknown;
53
54
  namespace?: string;
54
55
  }, unknown>;
55
56
  /** Current watch state for this resource type */