@omniviewdev/runtime 0.2.3 → 0.4.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.
- package/dist/api.cjs +1 -1
- package/dist/api.d.ts +15 -14
- package/dist/api.js +110 -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 +72 -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/extensions/provider.d.ts +12 -6
- package/dist/extensions/registry.d.ts +37 -18
- 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/useEditorSchemas.d.ts +2 -2
- package/dist/hooks/resource/useEventBatcher.d.ts +3 -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 +1371 -1778
- package/dist/legacyEnum-DORXlU_y.js +13 -0
- package/dist/legacyEnum-DkV5yRdA.cjs +1 -0
- package/dist/models-B8OVRhdT.js +159 -0
- package/dist/models-BVKsY9u1.js +2285 -0
- package/dist/models-CExSuVU2.cjs +1 -0
- package/dist/models-DdAWPDgz.cjs +1 -0
- package/dist/models.cjs +1 -1
- package/dist/models.d.ts +27 -1
- package/dist/models.js +259 -2244
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +198 -205
- package/dist/servicewrapper-BH5omp-N.js +708 -0
- package/dist/servicewrapper-dDhyC68C.cjs +1 -0
- package/dist/types/app.d.ts +1 -1
- package/dist/types/extensions.d.ts +107 -161
- package/dist/types/watch.d.ts +4 -5
- package/package.json +17 -9
- package/LICENSE +0 -661
- package/dist/Client-D4njqvNH.js +0 -632
- package/dist/Client-DHqavZ6d.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 -46
- 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,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
|
};
|
|
@@ -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
|
/**
|
|
@@ -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 */
|