@omniviewdev/runtime 0.9.1 → 0.9.2

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.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./servicewrapper-CCW7kIVs.cjs"),s=require("./index-BVi9X4oU.cjs"),r=require("./calls-Bg_uMVc9.cjs"),f=require("./models-KV9f8Ceh.cjs");function I(t){return r.ByID(3503478684,t)}const b=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:I},Symbol.toStringTag,{value:"Module"}));function w(t,e){return r.ByID(2691208406,t,e)}function B(t,e){return r.ByID(3932965591,t,e)}function F(t,e){return r.ByID(1686862755,t,e)}function T(t,e,n){return r.ByID(3705442919,t,e,n)}function O(t){return r.ByID(3024854267,t)}function _(t){return r.ByID(3423289677,t)}function j(t){return r.ByID(158417611,t)}function A(t){return r.ByID(3413815733,t)}function C(t,e){return r.ByID(2047870999,t,e)}const E=Object.freeze(Object.defineProperty({__proto__:null,Debug:w,Error:B,Info:F,Log:T,ReadLog:O,ReportStartupReady:_,StartTail:j,StopTail:A,Warn:C},Symbol.toStringTag,{value:"Module"}));function L(t,e){return r.ByID(712656304,t,e).then(n=>z(n))}function M(t){return r.ByID(4153226260,t).then(e=>c(e))}function N(t){return r.ByID(1859413816,t)}function k(){return r.ByID(2707386443).then(t=>U(t))}function P(t){return r.ByID(2381063937,t)}function R(t){return r.ByID(123659362,t).then(e=>c(e))}function G(t){return r.ByID(709599671,t).then(e=>c(e))}function J(t,e){return r.ByID(2105869281,t,e).then(n=>c(n))}function x(t){return r.ByID(1371062537,t)}const q=f.LogEntry.createFrom,z=s.Array(q),c=f.DevServerState.createFrom,U=s.Array(c),V=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:L,GetDevServerState:M,IsManaged:N,ListDevServerStates:k,RebuildPlugin:P,RestartDevServer:R,StartDevServer:G,StartDevServerForPath:J,StopDevServer:x},Symbol.toStringTag,{value:"Module"}));function W(t,e){return r.ByID(1867216983,t,e).then(n=>g(n))}function Z(){return r.ByID(3418650705).then(t=>Y(t))}function H(t,e){return r.ByID(4138610615,t,e).then(n=>g(n))}function K(t){return r.ByID(3055914536,t)}function Q(t){return r.ByID(1502487629,t)}const X=f.LogEntry$1.createFrom,g=s.Array(X),Y=s.Array(s.Any),$=Object.freeze(Object.defineProperty({__proto__:null,GetLogs:W,ListStreams:Z,SearchLogs:H,Subscribe:K,Unsubscribe:Q},Symbol.toStringTag,{value:"Module"}));class l{browser;vite;hmr;mcp;control;health;constructor(e={}){"browser"in e||(this.browser=null),"vite"in e||(this.vite=null),"hmr"in e||(this.hmr=null),"mcp"in e||(this.mcp=null),"control"in e||(this.control=null),"health"in e||(this.health=null),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new l(n)}}class u{code;message;details;constructor(e={}){"code"in e||(this.code=""),"message"in e||(this.message=""),Object.assign(this,e)}static createFrom(e={}){const n=ee;let a=typeof e=="string"?JSON.parse(e):e;return"details"in a&&(a.details=n(a.details)),new u(a)}}class y{schemaVersion;workspaceID;instanceID;generation;kind;channel;displayName;stateRoot;process;version;commit;repositories;endpoints;plugins;readiness;lastError;startedAt;constructor(e={}){"schemaVersion"in e||(this.schemaVersion=0),"workspaceID"in e||(this.workspaceID=""),"instanceID"in e||(this.instanceID=""),"generation"in e||(this.generation=""),"kind"in e||(this.kind=""),"channel"in e||(this.channel=""),"displayName"in e||(this.displayName=""),"stateRoot"in e||(this.stateRoot=""),"process"in e||(this.process=new p),"version"in e||(this.version=""),"commit"in e||(this.commit=""),"repositories"in e||(this.repositories=[]),"endpoints"in e||(this.endpoints=new l),"plugins"in e||(this.plugins=[]),"readiness"in e||(this.readiness=""),"startedAt"in e||(this.startedAt="0001-01-01T00:00:00.000Z"),Object.assign(this,e)}static createFrom(e={}){const n=te,a=ne,D=ie,m=ae,v=S;let i=typeof e=="string"?JSON.parse(e):e;return"process"in i&&(i.process=n(i.process)),"repositories"in i&&(i.repositories=a(i.repositories)),"endpoints"in i&&(i.endpoints=D(i.endpoints)),"plugins"in i&&(i.plugins=m(i.plugins)),"lastError"in i&&(i.lastError=v(i.lastError)),new y(i)}}class h{id;version;source;generation;mode;buildStatus;viteStatus;rpcStatus;controllerStatus;operationID;lastError;constructor(e={}){"id"in e||(this.id=""),"version"in e||(this.version=""),"source"in e||(this.source=""),"generation"in e||(this.generation=""),"mode"in e||(this.mode=""),"buildStatus"in e||(this.buildStatus=""),"viteStatus"in e||(this.viteStatus=""),"rpcStatus"in e||(this.rpcStatus=""),"controllerStatus"in e||(this.controllerStatus=""),Object.assign(this,e)}static createFrom(e={}){const n=S;let a=typeof e=="string"?JSON.parse(e):e;return"lastError"in a&&(a.lastError=n(a.lastError)),new h(a)}}class p{pid;startIdentity;executable;workspaceID;generation;role;source;constructor(e={}){"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),"workspaceID"in e||(this.workspaceID=""),"generation"in e||(this.generation=""),"role"in e||(this.role=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new p(n)}}class d{id;path;ref;commit;constructor(e={}){"id"in e||(this.id=""),"path"in e||(this.path=""),"ref"in e||(this.ref=""),"commit"in e||(this.commit=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new d(n)}}const ee=s.Map(s.Any,s.Any),te=p.createFrom,re=d.createFrom,ne=s.Array(re),ie=l.createFrom,se=h.createFrom,ae=s.Array(se),oe=u.createFrom,S=s.Nullable(oe);function ce(){return r.ByID(678226073).then(t=>ye(t))}function le(){return r.ByID(1706570792)}function pe(t){return r.ByID(2957909098,t).then(e=>he(e))}function fe(t){return r.ByID(473489213,t)}function ue(t,e){return r.ByID(3778694836,t,e)}const ye=y.createFrom,he=s.Array(s.Any);exports.DataClient=o.servicewrapper;exports.ExecClient=o.servicewrapper$1;exports.GraphClient=o.graphservice;exports.LogsClient=o.servicewrapper$2;exports.MetricClient=o.servicewrapper$3;exports.NetworkerClient=o.servicewrapper$4;exports.PluginManager=o.servicewrapper$5;exports.ResourceClient=o.servicewrapper$6;exports.SettingsClient=o.servicewrapper$7;exports.SettingsProvider=o.servicewrapper$8;exports.UIClient=o.servicewrapper$9;exports.DevServerManager=V;exports.DiagnosticsClient=E;exports.GetInstanceInfo=ce;exports.GetOperatingSystem=le;exports.OpenFileSelectionDialog=pe;exports.PluginLogManager=$;exports.SaveFileDialog=fe;exports.UtilsClient=b;exports.WriteFileContent=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./servicewrapper-COMjQHnY.cjs"),s=require("./index-BVi9X4oU.cjs"),r=require("./calls-Bg_uMVc9.cjs"),f=require("./models-KV9f8Ceh.cjs");function I(t){return r.ByID(3503478684,t)}const b=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:I},Symbol.toStringTag,{value:"Module"}));function w(t,e){return r.ByID(2691208406,t,e)}function B(t,e){return r.ByID(3932965591,t,e)}function F(t,e){return r.ByID(1686862755,t,e)}function T(t,e,n){return r.ByID(3705442919,t,e,n)}function O(t){return r.ByID(3024854267,t)}function _(t){return r.ByID(3423289677,t)}function j(t){return r.ByID(158417611,t)}function A(t){return r.ByID(3413815733,t)}function C(t,e){return r.ByID(2047870999,t,e)}const E=Object.freeze(Object.defineProperty({__proto__:null,Debug:w,Error:B,Info:F,Log:T,ReadLog:O,ReportStartupReady:_,StartTail:j,StopTail:A,Warn:C},Symbol.toStringTag,{value:"Module"}));function L(t,e){return r.ByID(712656304,t,e).then(n=>z(n))}function M(t){return r.ByID(4153226260,t).then(e=>c(e))}function N(t){return r.ByID(1859413816,t)}function k(){return r.ByID(2707386443).then(t=>U(t))}function P(t){return r.ByID(2381063937,t)}function R(t){return r.ByID(123659362,t).then(e=>c(e))}function G(t){return r.ByID(709599671,t).then(e=>c(e))}function J(t,e){return r.ByID(2105869281,t,e).then(n=>c(n))}function x(t){return r.ByID(1371062537,t)}const q=f.LogEntry.createFrom,z=s.Array(q),c=f.DevServerState.createFrom,U=s.Array(c),V=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:L,GetDevServerState:M,IsManaged:N,ListDevServerStates:k,RebuildPlugin:P,RestartDevServer:R,StartDevServer:G,StartDevServerForPath:J,StopDevServer:x},Symbol.toStringTag,{value:"Module"}));function W(t,e){return r.ByID(1867216983,t,e).then(n=>g(n))}function Z(){return r.ByID(3418650705).then(t=>Y(t))}function H(t,e){return r.ByID(4138610615,t,e).then(n=>g(n))}function K(t){return r.ByID(3055914536,t)}function Q(t){return r.ByID(1502487629,t)}const X=f.LogEntry$1.createFrom,g=s.Array(X),Y=s.Array(s.Any),$=Object.freeze(Object.defineProperty({__proto__:null,GetLogs:W,ListStreams:Z,SearchLogs:H,Subscribe:K,Unsubscribe:Q},Symbol.toStringTag,{value:"Module"}));class l{browser;vite;hmr;mcp;control;health;constructor(e={}){"browser"in e||(this.browser=null),"vite"in e||(this.vite=null),"hmr"in e||(this.hmr=null),"mcp"in e||(this.mcp=null),"control"in e||(this.control=null),"health"in e||(this.health=null),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new l(n)}}class u{code;message;details;constructor(e={}){"code"in e||(this.code=""),"message"in e||(this.message=""),Object.assign(this,e)}static createFrom(e={}){const n=ee;let a=typeof e=="string"?JSON.parse(e):e;return"details"in a&&(a.details=n(a.details)),new u(a)}}class y{schemaVersion;workspaceID;instanceID;generation;kind;channel;displayName;stateRoot;process;version;commit;repositories;endpoints;plugins;readiness;lastError;startedAt;constructor(e={}){"schemaVersion"in e||(this.schemaVersion=0),"workspaceID"in e||(this.workspaceID=""),"instanceID"in e||(this.instanceID=""),"generation"in e||(this.generation=""),"kind"in e||(this.kind=""),"channel"in e||(this.channel=""),"displayName"in e||(this.displayName=""),"stateRoot"in e||(this.stateRoot=""),"process"in e||(this.process=new p),"version"in e||(this.version=""),"commit"in e||(this.commit=""),"repositories"in e||(this.repositories=[]),"endpoints"in e||(this.endpoints=new l),"plugins"in e||(this.plugins=[]),"readiness"in e||(this.readiness=""),"startedAt"in e||(this.startedAt="0001-01-01T00:00:00.000Z"),Object.assign(this,e)}static createFrom(e={}){const n=te,a=ne,D=ie,m=ae,v=S;let i=typeof e=="string"?JSON.parse(e):e;return"process"in i&&(i.process=n(i.process)),"repositories"in i&&(i.repositories=a(i.repositories)),"endpoints"in i&&(i.endpoints=D(i.endpoints)),"plugins"in i&&(i.plugins=m(i.plugins)),"lastError"in i&&(i.lastError=v(i.lastError)),new y(i)}}class h{id;version;source;generation;mode;buildStatus;viteStatus;rpcStatus;controllerStatus;operationID;lastError;constructor(e={}){"id"in e||(this.id=""),"version"in e||(this.version=""),"source"in e||(this.source=""),"generation"in e||(this.generation=""),"mode"in e||(this.mode=""),"buildStatus"in e||(this.buildStatus=""),"viteStatus"in e||(this.viteStatus=""),"rpcStatus"in e||(this.rpcStatus=""),"controllerStatus"in e||(this.controllerStatus=""),Object.assign(this,e)}static createFrom(e={}){const n=S;let a=typeof e=="string"?JSON.parse(e):e;return"lastError"in a&&(a.lastError=n(a.lastError)),new h(a)}}class p{pid;startIdentity;executable;workspaceID;generation;role;source;constructor(e={}){"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),"workspaceID"in e||(this.workspaceID=""),"generation"in e||(this.generation=""),"role"in e||(this.role=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new p(n)}}class d{id;path;ref;commit;constructor(e={}){"id"in e||(this.id=""),"path"in e||(this.path=""),"ref"in e||(this.ref=""),"commit"in e||(this.commit=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new d(n)}}const ee=s.Map(s.Any,s.Any),te=p.createFrom,re=d.createFrom,ne=s.Array(re),ie=l.createFrom,se=h.createFrom,ae=s.Array(se),oe=u.createFrom,S=s.Nullable(oe);function ce(){return r.ByID(678226073).then(t=>ye(t))}function le(){return r.ByID(1706570792)}function pe(t){return r.ByID(2957909098,t).then(e=>he(e))}function fe(t){return r.ByID(473489213,t)}function ue(t,e){return r.ByID(3778694836,t,e)}const ye=y.createFrom,he=s.Array(s.Any);exports.DataClient=o.servicewrapper;exports.ExecClient=o.servicewrapper$1;exports.GraphClient=o.graphservice;exports.LogsClient=o.servicewrapper$2;exports.MetricClient=o.servicewrapper$3;exports.NetworkerClient=o.servicewrapper$4;exports.PluginManager=o.servicewrapper$5;exports.ResourceClient=o.servicewrapper$6;exports.SettingsClient=o.servicewrapper$7;exports.SettingsProvider=o.servicewrapper$8;exports.UIClient=o.servicewrapper$9;exports.DevServerManager=V;exports.DiagnosticsClient=E;exports.GetInstanceInfo=ce;exports.GetOperatingSystem=le;exports.OpenFileSelectionDialog=pe;exports.PluginLogManager=$;exports.SaveFileDialog=fe;exports.UtilsClient=b;exports.WriteFileContent=ue;
package/dist/api.js CHANGED
@@ -1,4 +1,4 @@
1
- import { s as Ot, a as wt, g as It, b as _t, c as jt, d as Et, e as Lt, f as Ct, h as Nt, i as Mt, j as kt } from "./servicewrapper-Q1ww3DUo.js";
1
+ import { s as Ot, a as wt, g as It, b as _t, c as jt, d as Et, e as Lt, f as Ct, h as Nt, i as Mt, j as kt } from "./servicewrapper-C6SURWw1.js";
2
2
  import { A as a, a as c, N as b, M as D } from "./index-zyAgCXOO.js";
3
3
  import { B as n } from "./calls-BvZkVSse.js";
4
4
  import { D as F, L as T, a as O } from "./models-DU8pTcoZ.js";
@@ -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 {};
@@ -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 */