@omniviewdev/runtime 0.3.0 → 0.4.1
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 +1 -1
- package/dist/api.d.ts +16 -14
- package/dist/api.js +111 -125
- package/dist/bindings/encoding/json/index.d.ts +1 -0
- package/dist/bindings/encoding/json/models.d.ts +6 -0
- package/dist/bindings/github.com/omniviewdev/omniview/appservice.d.ts +18 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/diagnostics/diagnosticsclient.d.ts +51 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/diagnostics/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/servicewrapper.d.ts +5 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models.d.ts +132 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/servicewrapper.d.ts +12 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper.d.ts +22 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/models.d.ts +29 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper.d.ts +11 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models.d.ts +39 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/servicewrapper.d.ts +16 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/models.d.ts +99 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper.d.ts +11 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/models.d.ts +24 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/servicewrapper.d.ts +7 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/models.d.ts +94 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.d.ts +53 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.d.ts +14 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +4 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +61 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +92 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.d.ts +24 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper.d.ts +18 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/models.d.ts +22 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models.d.ts +55 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/servicewrapper.d.ts +7 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/client.d.ts +6 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/models.d.ts +10 -0
- package/dist/bindings/github.com/omniviewdev/omniview/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper.d.ts +48 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/telemetry/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/telemetry/telemetrybinding.d.ts +7 -0
- package/dist/bindings/github.com/omniviewdev/omniview/models.d.ts +38 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +101 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.d.ts +199 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.d.ts +79 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.d.ts +133 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.d.ts +207 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.d.ts +96 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models.d.ts +1199 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +169 -0
- package/dist/bindings/github.com/wailsapp/wails/v3/internal/eventcreate.d.ts +1 -0
- package/dist/bindings/time/index.d.ts +1 -0
- package/dist/bindings/time/models.d.ts +33 -0
- package/dist/calls-BmUnjINC.js +677 -0
- package/dist/calls-DZctVyoQ.cjs +1 -0
- package/dist/compat/legacyEnum.d.ts +10 -0
- package/dist/compat/resource.d.ts +4 -0
- package/dist/compat/types.d.ts +4 -0
- package/dist/context/plugins/PluginContext.d.ts +2 -2
- package/dist/events-BTiuwc-0.cjs +1 -0
- package/dist/events-DDTGFACO.js +371 -0
- package/dist/graphservice-CRRwkBcy.cjs +1 -0
- package/dist/graphservice-CXr8ZCEY.js +726 -0
- package/dist/hooks/connection/useConnection.d.ts +5 -5
- package/dist/hooks/connection/useConnectionStatus.d.ts +7 -0
- package/dist/hooks/connection/useConnections.d.ts +4 -4
- package/dist/hooks/exec/useExecSession.d.ts +2 -2
- package/dist/hooks/logs/useLogSession.d.ts +1 -2
- package/dist/hooks/metric/useMetricProviders.d.ts +3 -3
- package/dist/hooks/metric/useMetricStream.d.ts +2 -2
- package/dist/hooks/metric/useResourceMetrics.d.ts +4 -3
- package/dist/hooks/networker/types.d.ts +3 -3
- package/dist/hooks/networker/usePortForwardSessions.d.ts +4 -4
- package/dist/hooks/networker/useResourcePortForwarder.d.ts +3 -4
- package/dist/hooks/resource/index.d.ts +2 -0
- package/dist/hooks/resource/useDependencyTree.d.ts +41 -0
- package/dist/hooks/resource/useEditorSchemas.d.ts +2 -2
- package/dist/hooks/resource/useEventBatcher.d.ts +3 -0
- package/dist/hooks/resource/useRelatedResources.d.ts +82 -0
- package/dist/hooks/resource/useResource.d.ts +3 -4
- package/dist/hooks/resource/useResourceActions.d.ts +2 -3
- package/dist/hooks/resource/useResourceAreaComponent.d.ts +3 -3
- package/dist/hooks/resource/useResourceGroups.d.ts +6 -6
- package/dist/hooks/resource/useResourceMutations.d.ts +3 -4
- package/dist/hooks/resource/useResourceType.d.ts +1 -1
- package/dist/hooks/resource/useResourceTypes.d.ts +6 -6
- package/dist/hooks/resource/useResources.d.ts +3 -4
- package/dist/index-D2mKAO8s.js +1069 -0
- package/dist/index-D_aIcqH0.cjs +6 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1281 -1599
- package/dist/legacyEnum-DORXlU_y.js +13 -0
- package/dist/legacyEnum-DkV5yRdA.cjs +1 -0
- package/dist/models-BoBl5Kgj.js +159 -0
- package/dist/models-BvR5jdms.js +2358 -0
- package/dist/models-CHycLCM0.cjs +1 -0
- package/dist/models-DOdc96z9.cjs +1 -0
- package/dist/models.cjs +1 -1
- package/dist/models.d.ts +28 -1
- package/dist/models.js +263 -2244
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +198 -205
- package/dist/types/watch.d.ts +4 -5
- package/package.json +17 -13
- package/LICENSE +0 -661
- package/dist/Client-07zrOerN.js +0 -636
- package/dist/Client-CLvQWnuz.cjs +0 -1
- package/dist/wailsjs/go/data/Client.d.ts +0 -10
- package/dist/wailsjs/go/devserver/DevServerManager.d.ts +0 -24
- package/dist/wailsjs/go/diagnostics/DiagnosticsClient.d.ts +0 -18
- package/dist/wailsjs/go/exec/Client.d.ts +0 -26
- package/dist/wailsjs/go/logs/Client.d.ts +0 -16
- package/dist/wailsjs/go/main/App.d.ts +0 -8
- package/dist/wailsjs/go/metric/Client.d.ts +0 -12
- package/dist/wailsjs/go/models.d.ts +0 -1060
- package/dist/wailsjs/go/networker/Client.d.ts +0 -14
- package/dist/wailsjs/go/plugin/pluginManager.d.ts +0 -52
- package/dist/wailsjs/go/pluginlog/Manager.d.ts +0 -18
- package/dist/wailsjs/go/resource/Client.d.ts +0 -90
- package/dist/wailsjs/go/settings/Client.d.ts +0 -14
- package/dist/wailsjs/go/settings/provider.d.ts +0 -48
- package/dist/wailsjs/go/ui/Client.d.ts +0 -6
- package/dist/wailsjs/go/utils/Client.d.ts +0 -2
- package/dist/wailsjs/runtime/runtime.d.ts +0 -249
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
|
|
2
2
|
type UseConnectionOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* The name of the plugin we're interacting with
|
|
@@ -16,19 +16,19 @@ export declare const useConnection: ({ pluginID: explicitPluginID, connectionID
|
|
|
16
16
|
/**
|
|
17
17
|
* Get the connection
|
|
18
18
|
*/
|
|
19
|
-
connection: import('@tanstack/react-query').UseQueryResult<
|
|
19
|
+
connection: import('@tanstack/react-query').UseQueryResult<Connection, Error>;
|
|
20
20
|
/**
|
|
21
21
|
* Start the connection
|
|
22
22
|
*/
|
|
23
|
-
startConnection: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
23
|
+
startConnection: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').ConnectionStatus, unknown, void, unknown>;
|
|
24
24
|
/**
|
|
25
25
|
* Stop the connection
|
|
26
26
|
*/
|
|
27
|
-
stopConnection: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
27
|
+
stopConnection: import('@tanstack/react-query').UseMutateAsyncFunction<Connection, unknown, void, unknown>;
|
|
28
28
|
/**
|
|
29
29
|
* Update the connection.
|
|
30
30
|
*/
|
|
31
|
-
updateConnection: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
31
|
+
updateConnection: import('@tanstack/react-query').UseMutateAsyncFunction<Connection, unknown, Connection, unknown>;
|
|
32
32
|
/**
|
|
33
33
|
* Delete the connection
|
|
34
34
|
*/
|
|
@@ -8,6 +8,10 @@ export interface ConnectionStatusEntry {
|
|
|
8
8
|
sync?: ActiveSync;
|
|
9
9
|
isSyncing: boolean;
|
|
10
10
|
hasErrors: boolean;
|
|
11
|
+
/** True when the plugin's crash recovery has been exhausted */
|
|
12
|
+
pluginFailed: boolean;
|
|
13
|
+
/** Error message from the crash recovery failure */
|
|
14
|
+
pluginError?: string;
|
|
11
15
|
}
|
|
12
16
|
export interface ConnectionStatusSummary {
|
|
13
17
|
entries: ConnectionStatusEntry[];
|
|
@@ -15,12 +19,15 @@ export interface ConnectionStatusSummary {
|
|
|
15
19
|
connectedCount: number;
|
|
16
20
|
syncingCount: number;
|
|
17
21
|
errorCount: number;
|
|
22
|
+
failedCount: number;
|
|
18
23
|
hasSyncing: boolean;
|
|
19
24
|
aggregateProgress: number;
|
|
20
25
|
/** Disconnect a connection by plugin/connection ID */
|
|
21
26
|
disconnect: (pluginID: string, connectionID: string) => Promise<void>;
|
|
22
27
|
/** Retry watch sync for a connection */
|
|
23
28
|
retryWatch: (pluginID: string, connectionID: string) => Promise<void>;
|
|
29
|
+
/** Retry a failed plugin (reload it after crash recovery exhaustion) */
|
|
30
|
+
retryPlugin: (pluginID: string) => Promise<void>;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Unified hook that tracks connection status across all plugins.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
|
|
2
2
|
type UseConnectionsOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* The name of the plugin we're interacting with
|
|
@@ -11,8 +11,8 @@ export declare const connectionListQueryKey: (plugin: string) => string[];
|
|
|
11
11
|
* Get and retreive connections from a plugin's connection manager..
|
|
12
12
|
*/
|
|
13
13
|
export declare const useConnections: ({ plugin: explicitPlugin }: UseConnectionsOptions) => {
|
|
14
|
-
connections: import('@tanstack/react-query').UseQueryResult<
|
|
15
|
-
startWatch: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown,
|
|
16
|
-
stopWatch: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown,
|
|
14
|
+
connections: import('@tanstack/react-query').UseQueryResult<Connection[], Error>;
|
|
15
|
+
startWatch: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, Connection, unknown>;
|
|
16
|
+
stopWatch: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, Connection, unknown>;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionOptions } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models';
|
|
2
2
|
type UseResourceMutationsOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* The ID of the plugin responsible for this resource
|
|
@@ -10,7 +10,7 @@ type CreateSessionOptions = {
|
|
|
10
10
|
connectionID: string;
|
|
11
11
|
icon?: string | React.ReactNode;
|
|
12
12
|
label?: string;
|
|
13
|
-
opts: Partial<
|
|
13
|
+
opts: Partial<SessionOptions>;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
16
|
* Create or manage sessions from throughout the app
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { logs } from '../../wailsjs/go/models';
|
|
2
1
|
type UseLogSessionOptions = {
|
|
3
2
|
pluginID?: string;
|
|
4
3
|
};
|
|
@@ -15,7 +14,7 @@ type CreateLogSessionArgs = {
|
|
|
15
14
|
params?: Record<string, string>;
|
|
16
15
|
};
|
|
17
16
|
export declare const useLogs: ({ pluginID: explicitPluginID }: UseLogSessionOptions) => {
|
|
18
|
-
createLogSession: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
17
|
+
createLogSession: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').LogSession, unknown, CreateLogSessionArgs, unknown>;
|
|
19
18
|
closeLogSession: import('@tanstack/react-query').UseMutateAsyncFunction<void, unknown, string, unknown>;
|
|
20
19
|
};
|
|
21
20
|
export default useLogs;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MetricProviderSummary } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models';
|
|
2
2
|
/**
|
|
3
3
|
* Hook to get all available metric providers.
|
|
4
4
|
*/
|
|
5
|
-
export declare const useMetricProviders: () => import('@tanstack/react-query').UseQueryResult<
|
|
5
|
+
export declare const useMetricProviders: () => import('@tanstack/react-query').UseQueryResult<MetricProviderSummary[], Error>;
|
|
6
6
|
/**
|
|
7
7
|
* Hook to get metric providers that support a specific resource type.
|
|
8
8
|
*/
|
|
9
|
-
export declare const useMetricProvidersForResource: (resourceKey: string) => import('@tanstack/react-query').UseQueryResult<
|
|
9
|
+
export declare const useMetricProvidersForResource: (resourceKey: string) => import('@tanstack/react-query').UseQueryResult<MetricProviderSummary[], Error>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MetricResult } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';
|
|
2
2
|
export type UseMetricStreamOptions = {
|
|
3
3
|
/** The plugin providing metrics */
|
|
4
4
|
pluginID?: string;
|
|
@@ -21,7 +21,7 @@ export type UseMetricStreamOptions = {
|
|
|
21
21
|
};
|
|
22
22
|
export type UseMetricStreamResult = {
|
|
23
23
|
/** The latest stream output */
|
|
24
|
-
data:
|
|
24
|
+
data: MetricResult[] | null;
|
|
25
25
|
/** The subscription ID */
|
|
26
26
|
subscriptionID: string | null;
|
|
27
27
|
/** Whether the stream is active */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QueryResponse } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';
|
|
2
|
+
import { MetricProviderSummary } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models';
|
|
2
3
|
export type UseResourceMetricsOptions = {
|
|
3
4
|
/** The plugin that owns the resource (e.g., "kubernetes") */
|
|
4
5
|
pluginID?: string;
|
|
@@ -29,9 +30,9 @@ export type UseResourceMetricsOptions = {
|
|
|
29
30
|
};
|
|
30
31
|
export type UseResourceMetricsResult = {
|
|
31
32
|
/** Metric results keyed by provider plugin ID */
|
|
32
|
-
data: Record<string,
|
|
33
|
+
data: Record<string, QueryResponse> | undefined;
|
|
33
34
|
/** Available metric providers for this resource type */
|
|
34
|
-
providers:
|
|
35
|
+
providers: MetricProviderSummary[];
|
|
35
36
|
/** Whether any query is currently loading */
|
|
36
37
|
isLoading: boolean;
|
|
37
38
|
/** Error from the query, if any */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PortForwardSession } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models';
|
|
2
2
|
export type PortForwardResourceOpts = {
|
|
3
3
|
/**
|
|
4
4
|
* The resource key identifier.
|
|
@@ -42,9 +42,9 @@ export type PortForwardResourceOpts = {
|
|
|
42
42
|
*/
|
|
43
43
|
labels?: Record<string, string>;
|
|
44
44
|
};
|
|
45
|
-
export type PortForwardResourceFunction = (opts: PortForwardResourceOpts) => Promise<
|
|
45
|
+
export type PortForwardResourceFunction = (opts: PortForwardResourceOpts) => Promise<PortForwardSession>;
|
|
46
46
|
export type ResourcePortForwarder = {
|
|
47
|
-
sessions:
|
|
47
|
+
sessions: PortForwardSession[];
|
|
48
48
|
forward: PortForwardResourceFunction;
|
|
49
49
|
close: (sessionId: string) => Promise<void>;
|
|
50
50
|
};
|
|
@@ -4,10 +4,10 @@ declare const ALL_SESSIONS_KEY: readonly ["networker", "portforward", "all-sessi
|
|
|
4
4
|
* Listens to Wails events for real-time updates instead of polling.
|
|
5
5
|
*/
|
|
6
6
|
export declare function usePortForwardSessions(): {
|
|
7
|
-
sessions: import('@tanstack/react-query').UseQueryResult<never[] | import(
|
|
8
|
-
activeSessions: import(
|
|
9
|
-
closeSession: import('@tanstack/react-query').UseMutateAsyncFunction<import(
|
|
10
|
-
openInBrowser: (localPort: number) => void
|
|
7
|
+
sessions: import('@tanstack/react-query').UseQueryResult<never[] | (import('../../models').PortForwardSession | null)[], Error>;
|
|
8
|
+
activeSessions: (import('../../models').PortForwardSession | null)[];
|
|
9
|
+
closeSession: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').PortForwardSession | null, unknown, string, unknown>;
|
|
10
|
+
openInBrowser: (localPort: number) => Promise<void>;
|
|
11
11
|
};
|
|
12
12
|
export { ALL_SESSIONS_KEY };
|
|
13
13
|
export default usePortForwardSessions;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PortForwardResourceOpts } from './types';
|
|
2
|
-
import { networker } from '../../wailsjs/go/models';
|
|
3
2
|
/**
|
|
4
3
|
* Programatically forward a port from a resource object to the host.
|
|
5
4
|
*/
|
|
@@ -8,11 +7,11 @@ export declare function useResourcePortForwarder({ pluginID: explicitPluginID, c
|
|
|
8
7
|
connectionID: string;
|
|
9
8
|
resourceID: string;
|
|
10
9
|
}): {
|
|
11
|
-
sessions: import('@tanstack/react-query').UseQueryResult<never[] |
|
|
12
|
-
forward: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
10
|
+
sessions: import('@tanstack/react-query').UseQueryResult<never[] | (import('../../models').PortForwardSession | null)[], Error>;
|
|
11
|
+
forward: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').PortForwardSession, unknown, {
|
|
13
12
|
opts: Partial<PortForwardResourceOpts>;
|
|
14
13
|
}, unknown>;
|
|
15
|
-
close: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
14
|
+
close: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').PortForwardSession | null, unknown, {
|
|
16
15
|
opts: {
|
|
17
16
|
sessionID: string;
|
|
18
17
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type UseDependencyTreeOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* The ID of the plugin responsible for this resource
|
|
4
|
+
* @example "kubernetes"
|
|
5
|
+
*/
|
|
6
|
+
pluginID?: string;
|
|
7
|
+
/** The connection ID the resource belongs to */
|
|
8
|
+
connectionID: string;
|
|
9
|
+
/**
|
|
10
|
+
* The resource key of the root resource
|
|
11
|
+
* @example "apps::v1::Deployment"
|
|
12
|
+
*/
|
|
13
|
+
resourceKey: string;
|
|
14
|
+
/** The ID of the root resource */
|
|
15
|
+
resourceID: string;
|
|
16
|
+
/** Namespace of the root resource, if the backend has namespaces */
|
|
17
|
+
namespace?: string;
|
|
18
|
+
/** How many edges deep to follow. The host caps this at 5. */
|
|
19
|
+
maxDepth?: number;
|
|
20
|
+
/** Whether to enable the query */
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* How often to refetch, in milliseconds. The graph does not notify the
|
|
24
|
+
* frontend of changes, so it is polled. Pass false to disable.
|
|
25
|
+
*/
|
|
26
|
+
refetchInterval?: number | false;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* useDependencyTree returns the tree of resources reachable from one resource
|
|
30
|
+
* by following outgoing relationship edges (for example Deployment →
|
|
31
|
+
* ReplicaSet → Pods → Node, ConfigMaps, PVCs). A resource reachable by more
|
|
32
|
+
* than one path appears once.
|
|
33
|
+
*/
|
|
34
|
+
export declare const useDependencyTree: ({ pluginID: explicitPluginID, connectionID, resourceKey, resourceID, namespace, maxDepth, enabled, refetchInterval, }: UseDependencyTreeOptions) => {
|
|
35
|
+
tree: import('../../models').DependencyTree | null;
|
|
36
|
+
isLoading: boolean;
|
|
37
|
+
isFetching: boolean;
|
|
38
|
+
error: Error | null;
|
|
39
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../../models').DependencyTree | null, Error>>;
|
|
40
|
+
};
|
|
41
|
+
export default useDependencyTree;
|
|
@@ -14,9 +14,9 @@ type UseEditorSchemasOptions = {
|
|
|
14
14
|
* the SchemaRegistry (which lives in the host app's monaco provider).
|
|
15
15
|
*/
|
|
16
16
|
export declare const useEditorSchemas: ({ pluginID: explicitPluginID, connectionID, enabled, }: UseEditorSchemasOptions) => {
|
|
17
|
-
schemas: import(
|
|
17
|
+
schemas: import('../../models').EditorSchema[];
|
|
18
18
|
isLoading: boolean;
|
|
19
19
|
error: Error | null;
|
|
20
|
-
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import(
|
|
20
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../../models').EditorSchema[], Error>>;
|
|
21
21
|
};
|
|
22
22
|
export default useEditorSchemas;
|
|
@@ -34,6 +34,9 @@ export type ResourceEvent = {
|
|
|
34
34
|
/**
|
|
35
35
|
* Apply a batch of resource events to a list query cache entry.
|
|
36
36
|
* Extracted for testability — this is the core batching logic.
|
|
37
|
+
*
|
|
38
|
+
* Returns a new plain object (immutable-style) without relying on Immer,
|
|
39
|
+
* avoiding issues with Wails binding class instances that Immer cannot draft.
|
|
37
40
|
*/
|
|
38
41
|
export declare function applyBatch(oldData: any, events: ResourceEvent[], idAccessor: string): any;
|
|
39
42
|
/**
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { GraphEdge, GraphNode } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models';
|
|
2
|
+
/** Which side of the relationship the viewed resource is on. */
|
|
3
|
+
export type RelationshipDirection = 'outgoing' | 'incoming';
|
|
4
|
+
/** A resource linked to the viewed resource by one relationship edge. */
|
|
5
|
+
export type RelatedResource = {
|
|
6
|
+
/** The resource at the other end of the edge. */
|
|
7
|
+
resource: GraphNode;
|
|
8
|
+
/** Relationship type, e.g. "owns", "runs_on", "uses", "selects". */
|
|
9
|
+
type: string;
|
|
10
|
+
/**
|
|
11
|
+
* "outgoing" when the viewed resource is the edge source (a Pod that runs
|
|
12
|
+
* on a Node), "incoming" when it is the target (the Node).
|
|
13
|
+
*/
|
|
14
|
+
direction: RelationshipDirection;
|
|
15
|
+
/**
|
|
16
|
+
* The label the plugin declared. It is written from the declaring
|
|
17
|
+
* resource's point of view, so it can read backwards here (an owner edge
|
|
18
|
+
* declared by a Pod is labelled "owned by"). Use relationshipLabel() for
|
|
19
|
+
* display.
|
|
20
|
+
*/
|
|
21
|
+
label: string;
|
|
22
|
+
};
|
|
23
|
+
type UseRelatedResourcesOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the plugin responsible for this resource
|
|
26
|
+
* @example "kubernetes"
|
|
27
|
+
*/
|
|
28
|
+
pluginID?: string;
|
|
29
|
+
/** The connection ID the resource belongs to */
|
|
30
|
+
connectionID: string;
|
|
31
|
+
/**
|
|
32
|
+
* The resource key of the viewed resource
|
|
33
|
+
* @example "core::v1::Pod"
|
|
34
|
+
*/
|
|
35
|
+
resourceKey: string;
|
|
36
|
+
/** The ID of the viewed resource */
|
|
37
|
+
resourceID: string;
|
|
38
|
+
/** Namespace of the viewed resource, if the backend has namespaces */
|
|
39
|
+
namespace?: string;
|
|
40
|
+
/** Which edges to return. Defaults to both directions. */
|
|
41
|
+
direction?: RelationshipDirection | 'both';
|
|
42
|
+
/** Only return edges of this relationship type */
|
|
43
|
+
relationshipType?: string;
|
|
44
|
+
/** Whether to enable the query */
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* How often to refetch, in milliseconds. The graph is rebuilt in the
|
|
48
|
+
* background from watch events and does not notify the frontend, so it is
|
|
49
|
+
* polled. Pass false to disable.
|
|
50
|
+
*/
|
|
51
|
+
refetchInterval?: number | false;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* relationshipLabel returns a display label for a relationship type, read
|
|
55
|
+
* from the viewed resource's side: ("owns", "incoming") is "Owned by".
|
|
56
|
+
* Unknown types fall back to the type name.
|
|
57
|
+
*/
|
|
58
|
+
export declare function relationshipLabel(type: string, direction: RelationshipDirection): string;
|
|
59
|
+
/**
|
|
60
|
+
* toRelatedResources converts graph edges around `self` into one entry per
|
|
61
|
+
* edge, keyed by the resource at the other end.
|
|
62
|
+
*/
|
|
63
|
+
export declare function toRelatedResources(self: GraphNode, edges: GraphEdge[]): RelatedResource[];
|
|
64
|
+
/**
|
|
65
|
+
* useRelatedResources returns the resources linked to one resource in the
|
|
66
|
+
* relationship graph the host builds from the plugin's relationship
|
|
67
|
+
* declarations (owner references, node assignment, volumes, selectors, ...).
|
|
68
|
+
*
|
|
69
|
+
* Only resources the host is watching are indexed. Targets referenced by
|
|
70
|
+
* name (a Secret a Pod mounts) are returned even if they do not exist.
|
|
71
|
+
*/
|
|
72
|
+
export declare const useRelatedResources: ({ pluginID: explicitPluginID, connectionID, resourceKey, resourceID, namespace, direction, relationshipType, enabled, refetchInterval, }: UseRelatedResourcesOptions) => {
|
|
73
|
+
/** One entry per edge, from the viewed resource's side. */
|
|
74
|
+
related: RelatedResource[];
|
|
75
|
+
/** The raw graph edges. */
|
|
76
|
+
edges: GraphEdge[];
|
|
77
|
+
isLoading: boolean;
|
|
78
|
+
isFetching: boolean;
|
|
79
|
+
error: Error | null;
|
|
80
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<GraphEdge[], Error>>;
|
|
81
|
+
};
|
|
82
|
+
export default useRelatedResources;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { resource } from '../../wailsjs/go/models';
|
|
2
1
|
type UseResourceOptions = {
|
|
3
2
|
/**
|
|
4
3
|
* The ID of the plugin responsible for this resource
|
|
@@ -39,14 +38,14 @@ export declare const useResource: ({ pluginID: explicitPluginID, connectionID, r
|
|
|
39
38
|
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
40
39
|
* when the resource is updated or deleted via the returned update and remove mutation functions.
|
|
41
40
|
*/
|
|
42
|
-
resource: import('@tanstack/react-query').UseQueryResult<
|
|
41
|
+
resource: import('@tanstack/react-query').UseQueryResult<import('../../models').GetResult | null, Error>;
|
|
43
42
|
/**
|
|
44
43
|
* Update an existing resource. A set of optional parameters can be passed to customize the update behavior,
|
|
45
44
|
* which if specified, will add additional default behavior set via the hook options.
|
|
46
45
|
*
|
|
47
46
|
* @params opts Optional parameters to pass to the resource update
|
|
48
47
|
*/
|
|
49
|
-
update: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
48
|
+
update: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').UpdateResult | null, unknown, {
|
|
50
49
|
input?: any;
|
|
51
50
|
}, unknown>;
|
|
52
51
|
/**
|
|
@@ -55,7 +54,7 @@ export declare const useResource: ({ pluginID: explicitPluginID, connectionID, r
|
|
|
55
54
|
*
|
|
56
55
|
* @params {object} opts Optional parameters to pass to the resource delete
|
|
57
56
|
*/
|
|
58
|
-
remove: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
57
|
+
remove: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').DeleteResult | null, unknown, {
|
|
59
58
|
gracePeriodSeconds?: number;
|
|
60
59
|
} | undefined, unknown>;
|
|
61
60
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { resource } from '../../wailsjs/go/models';
|
|
2
1
|
type UseResourceActionsOptions = {
|
|
3
2
|
/**
|
|
4
3
|
* The ID of the plugin responsible for this resource
|
|
@@ -26,7 +25,7 @@ type UseResourceActionsOptions = {
|
|
|
26
25
|
* Returns the list of ActionDescriptors that the backend reports for the given resource key.
|
|
27
26
|
*/
|
|
28
27
|
export declare const useResourceActions: ({ pluginID: explicitPluginID, connectionID, resourceKey, enabled, }: UseResourceActionsOptions) => {
|
|
29
|
-
actions:
|
|
28
|
+
actions: import('../../models').ActionDescriptor[];
|
|
30
29
|
isLoading: boolean;
|
|
31
30
|
error: Error | null;
|
|
32
31
|
};
|
|
@@ -62,7 +61,7 @@ type ExecuteActionParams = {
|
|
|
62
61
|
* Returns a mutate function that can be called with action details.
|
|
63
62
|
*/
|
|
64
63
|
export declare const useExecuteAction: ({ pluginID: explicitPluginID, connectionID, resourceKey, }: UseExecuteActionOptions) => {
|
|
65
|
-
executeAction: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
64
|
+
executeAction: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').ActionResult | null, unknown, ExecuteActionParams, unknown>;
|
|
66
65
|
isExecuting: boolean;
|
|
67
66
|
error: unknown;
|
|
68
67
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const useResourceAreaComponent: (params:
|
|
1
|
+
import { GetResourceAreaComponentInput } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models';
|
|
2
|
+
export declare const useResourceAreaComponent: (params: GetResourceAreaComponentInput) => {
|
|
3
3
|
/**
|
|
4
4
|
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
5
5
|
* when the resource is updated or deleted via the returned update and remove mutation functions.
|
|
6
6
|
*/
|
|
7
|
-
component: import('@tanstack/react-query').UseQueryResult<
|
|
7
|
+
component: import('@tanstack/react-query').UseQueryResult<import('../../models').ResourceComponent | null, Error>;
|
|
8
8
|
};
|
|
9
9
|
export default useResourceAreaComponent;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type UseResourceGroupsOptions = {
|
|
2
2
|
/**
|
|
3
|
-
* The ID of the
|
|
4
|
-
* @example "appearance"
|
|
3
|
+
* The ID of the plugin
|
|
5
4
|
*/
|
|
6
5
|
pluginID?: string;
|
|
7
6
|
/**
|
|
@@ -10,13 +9,14 @@ type UseResourceGroupsOptions = {
|
|
|
10
9
|
connectionID: string;
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
* you need to read or write settings from a specific plugin, use the `@hooks/settings/useSettings` hook instead.
|
|
12
|
+
* Fetch the resource groups for a given plugin and connection.
|
|
15
13
|
*/
|
|
16
14
|
export declare const useResourceGroups: ({ pluginID: explicitPluginID, connectionID }: UseResourceGroupsOptions) => {
|
|
17
15
|
/**
|
|
18
|
-
* The
|
|
16
|
+
* The resource groups for the given plugin and connection.
|
|
19
17
|
*/
|
|
20
|
-
groups: import('@tanstack/react-query').UseQueryResult<
|
|
18
|
+
groups: import('@tanstack/react-query').UseQueryResult<{
|
|
19
|
+
[x: string]: import('../../models').ResourceGroup | undefined;
|
|
20
|
+
}, Error>;
|
|
21
21
|
};
|
|
22
22
|
export default useResourceGroups;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { resource } from '../../wailsjs/go/models';
|
|
2
1
|
type ResourceMutationOptions = {
|
|
3
2
|
/**
|
|
4
3
|
* The connection ID to scope the resource to
|
|
@@ -42,20 +41,20 @@ type UseResourceMutationsOptions = {
|
|
|
42
41
|
* @throws If the resourceID is invalid
|
|
43
42
|
*/
|
|
44
43
|
export declare const useResourceMutations: ({ pluginID: explicitPluginID }: UseResourceMutationsOptions) => {
|
|
45
|
-
create: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
44
|
+
create: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').CreateResult | null, unknown, {
|
|
46
45
|
opts: ResourceMutationOptions;
|
|
47
46
|
input: {
|
|
48
47
|
input?: any;
|
|
49
48
|
namespace?: string;
|
|
50
49
|
};
|
|
51
50
|
}, unknown>;
|
|
52
|
-
update: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
51
|
+
update: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').UpdateResult | null, unknown, {
|
|
53
52
|
opts: ResourceMutationOptions;
|
|
54
53
|
input: {
|
|
55
54
|
input?: any;
|
|
56
55
|
};
|
|
57
56
|
}, unknown>;
|
|
58
|
-
remove: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
57
|
+
remove: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').DeleteResult | null, unknown, {
|
|
59
58
|
opts: ResourceMutationOptions;
|
|
60
59
|
input: {
|
|
61
60
|
gracePeriodSeconds?: number;
|
|
@@ -17,6 +17,6 @@ export declare const useResourceType: ({ pluginID: explicitPluginID, resourceKey
|
|
|
17
17
|
/**
|
|
18
18
|
* The current settings from the provider.
|
|
19
19
|
*/
|
|
20
|
-
resourceType: import('@tanstack/react-query').UseQueryResult<import(
|
|
20
|
+
resourceType: import('@tanstack/react-query').UseQueryResult<import('../../models').ResourceMeta | null, Error>;
|
|
21
21
|
};
|
|
22
22
|
export default useResourceType;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
type UseResourceTypesOptions = {
|
|
2
2
|
/**
|
|
3
|
-
* The ID of the
|
|
4
|
-
* @example "appearance"
|
|
3
|
+
* The ID of the plugin
|
|
5
4
|
*/
|
|
6
5
|
pluginID?: string;
|
|
7
6
|
/**
|
|
@@ -10,13 +9,14 @@ type UseResourceTypesOptions = {
|
|
|
10
9
|
connectionID: string;
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
* you need to read or write settings from a specific plugin, use the `@hooks/settings/useSettings` hook instead.
|
|
12
|
+
* Fetch the resource types for a given plugin and connection.
|
|
15
13
|
*/
|
|
16
14
|
export declare const useResourceTypes: ({ pluginID: explicitPluginID, connectionID }: UseResourceTypesOptions) => {
|
|
17
15
|
/**
|
|
18
|
-
* The
|
|
16
|
+
* The resource types for the given plugin and connection.
|
|
19
17
|
*/
|
|
20
|
-
types: import('@tanstack/react-query').UseQueryResult<
|
|
18
|
+
types: import('@tanstack/react-query').UseQueryResult<{
|
|
19
|
+
[x: string]: import('../../models').ResourceMeta | undefined;
|
|
20
|
+
}, Error>;
|
|
21
21
|
};
|
|
22
22
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { resource as resourceModels } from '../../wailsjs/go/models';
|
|
2
1
|
type UseResourcesOptions = {
|
|
3
2
|
/**
|
|
4
3
|
* The ID of the plugin responsible for this resource
|
|
@@ -42,19 +41,19 @@ export declare const useResources: ({ pluginID: explicitPluginID, connectionID,
|
|
|
42
41
|
* when the resources are updated or deleted via the returned create and remove mutation functions, or
|
|
43
42
|
* the per-resource hook mutation functions.
|
|
44
43
|
*/
|
|
45
|
-
resources: import('@tanstack/react-query').UseQueryResult<
|
|
44
|
+
resources: import('@tanstack/react-query').UseQueryResult<import('../../models').ListResult | null, Error>;
|
|
46
45
|
/**
|
|
47
46
|
* Create a new resource. A set of optional parameters can be passed to customize the create behavior,
|
|
48
47
|
* which if specified, will add additional default behavior set via the hook options.
|
|
49
48
|
*
|
|
50
49
|
* @params opts Optional parameters to pass to the resource create operation
|
|
51
50
|
*/
|
|
52
|
-
create: import('@tanstack/react-query').UseMutateAsyncFunction<
|
|
51
|
+
create: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').CreateResult | null, unknown, {
|
|
53
52
|
input?: any;
|
|
54
53
|
namespace?: string;
|
|
55
54
|
}, unknown>;
|
|
56
55
|
/** Current watch state for this resource type */
|
|
57
|
-
watchState:
|
|
56
|
+
watchState: import('../../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource').WatchState;
|
|
58
57
|
/** Whether the watch is currently syncing */
|
|
59
58
|
isSyncing: boolean;
|
|
60
59
|
/** Whether the watch has fully synced */
|