@omniviewdev/runtime 0.10.0 → 0.11.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 +7 -6
- package/dist/api.js +205 -133
- package/dist/bindings/events/index.d.ts +20 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/invocation/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/invocation/models.d.ts +19 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models.d.ts +0 -20
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/servicewrapper.d.ts +3 -6
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.d.ts +2 -2
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.d.ts +3 -15
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.d.ts +5 -18
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +190 -9
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +34 -74
- package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/index.d.ts +3 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/models.d.ts +178 -0
- package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/servicewrapper.d.ts +30 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +27 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/models.d.ts +809 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.d.ts +94 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.d.ts +16 -6
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.d.ts +27 -17
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.d.ts +47 -24
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/index.d.ts +1 -1
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.d.ts +41 -20
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +16 -4
- package/dist/{calls-Bg_uMVc9.cjs → calls-B-HP1Icv.cjs} +1 -1
- package/dist/{calls-BvZkVSse.js → calls-DYGtxNJ6.js} +1 -0
- package/dist/compat/types.d.ts +1 -1
- package/dist/context/drawer/RightDrawerContext.d.ts +8 -4
- package/dist/context/drawer/types.d.ts +11 -21
- package/dist/context/operations/OperationsContext.d.ts +5 -5
- package/dist/exec.d.ts +5 -0
- package/dist/graph-JDqyJC_i.js +10 -0
- package/dist/graph-wHun0Bkz.cjs +1 -0
- package/dist/hooks/connection/index.d.ts +2 -1
- package/dist/hooks/connection/useConnection.d.ts +9 -30
- package/dist/hooks/connection/useConnectionProfiles.d.ts +7 -0
- package/dist/hooks/connection/useConnectionStatus.d.ts +8 -1
- package/dist/hooks/connection/useConnections.d.ts +3 -2
- package/dist/hooks/connection/useScopeValues.d.ts +9 -0
- package/dist/hooks/logs/useLogSession.d.ts +4 -1
- package/dist/hooks/metric/useMetricStream.d.ts +6 -2
- package/dist/hooks/metric/useResourceMetrics.d.ts +6 -2
- package/dist/hooks/networker/types.d.ts +5 -2
- package/dist/hooks/networker/useResourcePortForwarder.d.ts +1 -1
- package/dist/hooks/resource/useConnectionQueryGuard.d.ts +1 -1
- package/dist/hooks/resource/useDependencyTree.d.ts +4 -12
- package/dist/hooks/resource/useEditorSchemas.d.ts +12 -7
- package/dist/hooks/resource/useEventBatcher.d.ts +11 -47
- package/dist/hooks/resource/useRelatedResources.d.ts +6 -14
- package/dist/hooks/resource/useResolvedResourceTarget.d.ts +162 -0
- package/dist/hooks/resource/useResource.d.ts +7 -58
- package/dist/hooks/resource/useResourceActions.d.ts +9 -58
- package/dist/hooks/resource/useResourceGraph.d.ts +4 -12
- package/dist/hooks/resource/useResourceGroups.d.ts +5 -19
- package/dist/hooks/resource/useResourceMutations.d.ts +5 -61
- package/dist/hooks/resource/useResourceSearch.d.ts +5 -34
- package/dist/hooks/resource/useResourceType.d.ts +6 -19
- package/dist/hooks/resource/useResourceTypes.d.ts +5 -20
- package/dist/hooks/resource/useResources.d.ts +32 -60
- package/dist/hooks/resource/useStreamAction.d.ts +4 -8
- package/dist/hooks/resource/useWatchState.d.ts +15 -22
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +6 -1
- package/dist/index.js +2985 -2906
- package/dist/logs.d.ts +14 -0
- package/dist/metric.d.ts +35 -0
- package/dist/models-Cg1YRHQm.js +583 -0
- package/dist/models-DSGyy8lg.cjs +1 -0
- package/dist/models-UwESEW2B.js +1232 -0
- package/dist/models-dzj-SsFZ.cjs +1 -0
- package/dist/models.cjs +1 -1
- package/dist/models.d.ts +13 -8
- package/dist/models.js +118 -209
- package/dist/networker.d.ts +31 -0
- package/dist/resource/v2/ancillary.d.ts +161 -0
- package/dist/resource/v2/client.d.ts +57 -0
- package/dist/resource/v2/domain.d.ts +204 -0
- package/dist/resource/v2/graph-client.d.ts +7 -0
- package/dist/resource/v2/graph.d.ts +35 -0
- package/dist/resource/v2/host.d.ts +129 -0
- package/dist/resource/v2/requestJSON.d.ts +2 -0
- package/dist/resource/v2/value.d.ts +9 -0
- package/dist/resourceQueryKeys.d.ts +8 -4
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/search.d.ts +9 -11
- package/dist/servicewrapper-BOM6A8IG.cjs +1 -0
- package/dist/servicewrapper-Bda7yi8z.js +684 -0
- package/dist/types/watch.d.ts +48 -21
- package/dist/utils/activeSyncAggregator.d.ts +2 -2
- package/package.json +1 -1
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/index.d.ts +0 -2
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models.d.ts +0 -1199
- package/dist/compat/resource.d.ts +0 -4
- package/dist/hooks/connection/useConnectionNamespaces.d.ts +0 -21
- package/dist/legacyEnum-CKqyRmbX.js +0 -15
- package/dist/legacyEnum-DkV5yRdA.cjs +0 -1
- package/dist/models-BxypsesT.cjs +0 -1
- package/dist/models-C6jzDokQ.js +0 -347
- package/dist/models-CT4kHj47.js +0 -2444
- package/dist/models-DQl7tqts.cjs +0 -1
- package/dist/servicewrapper-C6SURWw1.js +0 -850
- package/dist/servicewrapper-COMjQHnY.cjs +0 -1
- package/dist/utils/resourceKey.d.ts +0 -12
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { ResolveTargetRequest } from '../../resource/v2/host';
|
|
2
|
+
/** Authority, generation and representation admission belong to the host. */
|
|
3
|
+
export declare function useResolvedResourceTarget({ pluginID: explicitPluginID, enabled, ...request }: ResolveTargetRequest & {
|
|
4
|
+
pluginID?: string;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
data: import('../..').ResolvedResourceTarget | undefined;
|
|
8
|
+
error: Error;
|
|
9
|
+
isError: true;
|
|
10
|
+
isPending: false;
|
|
11
|
+
isLoading: false;
|
|
12
|
+
isLoadingError: false;
|
|
13
|
+
isRefetchError: true;
|
|
14
|
+
isSuccess: false;
|
|
15
|
+
isPlaceholderData: false;
|
|
16
|
+
status: "error";
|
|
17
|
+
dataUpdatedAt: number;
|
|
18
|
+
errorUpdatedAt: number;
|
|
19
|
+
failureCount: number;
|
|
20
|
+
failureReason: Error | null;
|
|
21
|
+
errorUpdateCount: number;
|
|
22
|
+
isFetched: boolean;
|
|
23
|
+
isFetchedAfterMount: boolean;
|
|
24
|
+
isFetching: boolean;
|
|
25
|
+
isInitialLoading: boolean;
|
|
26
|
+
isPaused: boolean;
|
|
27
|
+
isRefetching: boolean;
|
|
28
|
+
isStale: boolean;
|
|
29
|
+
isEnabled: boolean;
|
|
30
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').ResolvedResourceTarget, Error>>;
|
|
31
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
32
|
+
} | {
|
|
33
|
+
data: import('../..').ResolvedResourceTarget | undefined;
|
|
34
|
+
error: null;
|
|
35
|
+
isError: false;
|
|
36
|
+
isPending: false;
|
|
37
|
+
isLoading: false;
|
|
38
|
+
isLoadingError: false;
|
|
39
|
+
isRefetchError: false;
|
|
40
|
+
isSuccess: true;
|
|
41
|
+
isPlaceholderData: false;
|
|
42
|
+
status: "success";
|
|
43
|
+
dataUpdatedAt: number;
|
|
44
|
+
errorUpdatedAt: number;
|
|
45
|
+
failureCount: number;
|
|
46
|
+
failureReason: Error | null;
|
|
47
|
+
errorUpdateCount: number;
|
|
48
|
+
isFetched: boolean;
|
|
49
|
+
isFetchedAfterMount: boolean;
|
|
50
|
+
isFetching: boolean;
|
|
51
|
+
isInitialLoading: boolean;
|
|
52
|
+
isPaused: boolean;
|
|
53
|
+
isRefetching: boolean;
|
|
54
|
+
isStale: boolean;
|
|
55
|
+
isEnabled: boolean;
|
|
56
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').ResolvedResourceTarget, Error>>;
|
|
57
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
58
|
+
} | {
|
|
59
|
+
data: import('../..').ResolvedResourceTarget | undefined;
|
|
60
|
+
error: Error;
|
|
61
|
+
isError: true;
|
|
62
|
+
isPending: false;
|
|
63
|
+
isLoading: false;
|
|
64
|
+
isLoadingError: true;
|
|
65
|
+
isRefetchError: false;
|
|
66
|
+
isSuccess: false;
|
|
67
|
+
isPlaceholderData: false;
|
|
68
|
+
status: "error";
|
|
69
|
+
dataUpdatedAt: number;
|
|
70
|
+
errorUpdatedAt: number;
|
|
71
|
+
failureCount: number;
|
|
72
|
+
failureReason: Error | null;
|
|
73
|
+
errorUpdateCount: number;
|
|
74
|
+
isFetched: boolean;
|
|
75
|
+
isFetchedAfterMount: boolean;
|
|
76
|
+
isFetching: boolean;
|
|
77
|
+
isInitialLoading: boolean;
|
|
78
|
+
isPaused: boolean;
|
|
79
|
+
isRefetching: boolean;
|
|
80
|
+
isStale: boolean;
|
|
81
|
+
isEnabled: boolean;
|
|
82
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').ResolvedResourceTarget, Error>>;
|
|
83
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
84
|
+
} | {
|
|
85
|
+
data: import('../..').ResolvedResourceTarget | undefined;
|
|
86
|
+
error: null;
|
|
87
|
+
isError: false;
|
|
88
|
+
isPending: true;
|
|
89
|
+
isLoading: true;
|
|
90
|
+
isLoadingError: false;
|
|
91
|
+
isRefetchError: false;
|
|
92
|
+
isSuccess: false;
|
|
93
|
+
isPlaceholderData: false;
|
|
94
|
+
status: "pending";
|
|
95
|
+
dataUpdatedAt: number;
|
|
96
|
+
errorUpdatedAt: number;
|
|
97
|
+
failureCount: number;
|
|
98
|
+
failureReason: Error | null;
|
|
99
|
+
errorUpdateCount: number;
|
|
100
|
+
isFetched: boolean;
|
|
101
|
+
isFetchedAfterMount: boolean;
|
|
102
|
+
isFetching: boolean;
|
|
103
|
+
isInitialLoading: boolean;
|
|
104
|
+
isPaused: boolean;
|
|
105
|
+
isRefetching: boolean;
|
|
106
|
+
isStale: boolean;
|
|
107
|
+
isEnabled: boolean;
|
|
108
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').ResolvedResourceTarget, Error>>;
|
|
109
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
110
|
+
} | {
|
|
111
|
+
data: import('../..').ResolvedResourceTarget | undefined;
|
|
112
|
+
error: null;
|
|
113
|
+
isError: false;
|
|
114
|
+
isPending: true;
|
|
115
|
+
isLoadingError: false;
|
|
116
|
+
isRefetchError: false;
|
|
117
|
+
isSuccess: false;
|
|
118
|
+
isPlaceholderData: false;
|
|
119
|
+
status: "pending";
|
|
120
|
+
dataUpdatedAt: number;
|
|
121
|
+
errorUpdatedAt: number;
|
|
122
|
+
failureCount: number;
|
|
123
|
+
failureReason: Error | null;
|
|
124
|
+
errorUpdateCount: number;
|
|
125
|
+
isFetched: boolean;
|
|
126
|
+
isFetchedAfterMount: boolean;
|
|
127
|
+
isFetching: boolean;
|
|
128
|
+
isLoading: boolean;
|
|
129
|
+
isInitialLoading: boolean;
|
|
130
|
+
isPaused: boolean;
|
|
131
|
+
isRefetching: boolean;
|
|
132
|
+
isStale: boolean;
|
|
133
|
+
isEnabled: boolean;
|
|
134
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').ResolvedResourceTarget, Error>>;
|
|
135
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
136
|
+
} | {
|
|
137
|
+
data: import('../..').ResolvedResourceTarget | undefined;
|
|
138
|
+
isError: false;
|
|
139
|
+
error: null;
|
|
140
|
+
isPending: false;
|
|
141
|
+
isLoading: false;
|
|
142
|
+
isLoadingError: false;
|
|
143
|
+
isRefetchError: false;
|
|
144
|
+
isSuccess: true;
|
|
145
|
+
isPlaceholderData: true;
|
|
146
|
+
status: "success";
|
|
147
|
+
dataUpdatedAt: number;
|
|
148
|
+
errorUpdatedAt: number;
|
|
149
|
+
failureCount: number;
|
|
150
|
+
failureReason: Error | null;
|
|
151
|
+
errorUpdateCount: number;
|
|
152
|
+
isFetched: boolean;
|
|
153
|
+
isFetchedAfterMount: boolean;
|
|
154
|
+
isFetching: boolean;
|
|
155
|
+
isInitialLoading: boolean;
|
|
156
|
+
isPaused: boolean;
|
|
157
|
+
isRefetching: boolean;
|
|
158
|
+
isStale: boolean;
|
|
159
|
+
isEnabled: boolean;
|
|
160
|
+
refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').ResolvedResourceTarget, Error>>;
|
|
161
|
+
fetchStatus: import('@tanstack/react-query').FetchStatus;
|
|
162
|
+
};
|
|
@@ -1,62 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @example "kubernetes"
|
|
5
|
-
*/
|
|
1
|
+
import { MutationRequest } from '../../resource/v2/domain';
|
|
2
|
+
import { HostGetRequest } from '../../resource/v2/host';
|
|
3
|
+
export declare const useResource: ({ pluginID: explicitPluginID, request, enabled, }: {
|
|
6
4
|
pluginID?: string;
|
|
7
|
-
|
|
8
|
-
* The connection ID to scope the resource to
|
|
9
|
-
* @example "integration"
|
|
10
|
-
*/
|
|
11
|
-
connectionID: string;
|
|
12
|
-
/**
|
|
13
|
-
* The GVR (Group, Version, Resource) identifier to fetch
|
|
14
|
-
* @example "core::v1::pods"
|
|
15
|
-
*/
|
|
16
|
-
resourceKey: string;
|
|
17
|
-
/**
|
|
18
|
-
* The ID of the resource to fetch
|
|
19
|
-
* @example "nginx-1452"
|
|
20
|
-
*/
|
|
21
|
-
resourceID: string;
|
|
22
|
-
/**
|
|
23
|
-
* Optional namespace to scope the resource to, if the backend
|
|
24
|
-
* supports the concept of namespaces of resources.
|
|
25
|
-
* @example "default"
|
|
26
|
-
*/
|
|
27
|
-
namespace?: string;
|
|
5
|
+
request?: HostGetRequest;
|
|
28
6
|
enabled?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
* with, and fetching, the resource data.
|
|
33
|
-
*
|
|
34
|
-
* It should be noted that this hook does not perform any logic to ensure that either the resource exists,
|
|
35
|
-
* @throws If the resourceID is invalid
|
|
36
|
-
*/
|
|
37
|
-
export declare const useResource: ({ pluginID: explicitPluginID, connectionID, resourceKey, resourceID, namespace, enabled, }: UseResourceOptions) => {
|
|
38
|
-
/**
|
|
39
|
-
* Fetch result for the resource. The client will automatically cache the result, and update the cache
|
|
40
|
-
* when the resource is updated or deleted via the returned update and remove mutation functions.
|
|
41
|
-
*/
|
|
42
|
-
resource: import('@tanstack/react-query').UseQueryResult<import('../../models').GetResult | null, Error>;
|
|
43
|
-
/**
|
|
44
|
-
* Update an existing resource. A set of optional parameters can be passed to customize the update behavior,
|
|
45
|
-
* which if specified, will add additional default behavior set via the hook options.
|
|
46
|
-
*
|
|
47
|
-
* @params opts Optional parameters to pass to the resource update
|
|
48
|
-
*/
|
|
49
|
-
update: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').UpdateResult | null, unknown, {
|
|
50
|
-
input?: unknown;
|
|
51
|
-
}, unknown>;
|
|
52
|
-
/**
|
|
53
|
-
* Delete an existing resource. A set of optional parameters can be passed to customize the delete behavior,
|
|
54
|
-
* which if specified, will add additional default behavior set via the hook options.
|
|
55
|
-
*
|
|
56
|
-
* @params {object} opts Optional parameters to pass to the resource delete
|
|
57
|
-
*/
|
|
58
|
-
remove: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').DeleteResult | null, unknown, {
|
|
59
|
-
gracePeriodSeconds?: number;
|
|
60
|
-
}, unknown>;
|
|
7
|
+
}) => {
|
|
8
|
+
resource: import('@tanstack/react-query').UseQueryResult<import('../..').HostRecord, Error>;
|
|
9
|
+
mutate: import('@tanstack/react-query').UseMutateAsyncFunction<import('../..').Record, unknown, Omit<MutationRequest, "route" | "reference">, unknown>;
|
|
61
10
|
};
|
|
62
11
|
export default useResource;
|
|
@@ -1,67 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The ID of the plugin responsible for this resource
|
|
4
|
-
* @example "kubernetes"
|
|
5
|
-
*/
|
|
1
|
+
import { AccessRoute, ActionRequest } from '../../resource/v2/domain';
|
|
2
|
+
export declare const useResourceActions: ({ pluginID: explicitPluginID, route, type, enabled, }: {
|
|
6
3
|
pluginID?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* @example "integration"
|
|
10
|
-
*/
|
|
11
|
-
connectionID: string;
|
|
12
|
-
/**
|
|
13
|
-
* The resource type key
|
|
14
|
-
* @example "helm::v1::Release"
|
|
15
|
-
*/
|
|
16
|
-
resourceKey: string;
|
|
17
|
-
/**
|
|
18
|
-
* Whether to enable the actions query
|
|
19
|
-
* @default true
|
|
20
|
-
*/
|
|
4
|
+
route: AccessRoute;
|
|
5
|
+
type: string;
|
|
21
6
|
enabled?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
* useResourceActions discovers available actions for a resource type.
|
|
25
|
-
* Returns the list of ActionDescriptors that the backend reports for the given resource key.
|
|
26
|
-
*/
|
|
27
|
-
export declare const useResourceActions: ({ pluginID: explicitPluginID, connectionID, resourceKey, enabled, }: UseResourceActionsOptions) => {
|
|
28
|
-
actions: import('../../models').ActionDescriptor[];
|
|
7
|
+
}) => {
|
|
8
|
+
actions: import('../..').ActionDescriptor[];
|
|
29
9
|
isLoading: boolean;
|
|
30
10
|
error: Error | null;
|
|
31
11
|
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The ID of the plugin responsible for this resource
|
|
35
|
-
* @example "kubernetes"
|
|
36
|
-
*/
|
|
12
|
+
export declare const useExecuteAction: ({ pluginID: explicitPluginID }: {
|
|
37
13
|
pluginID?: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* @example "integration"
|
|
41
|
-
*/
|
|
42
|
-
connectionID: string;
|
|
43
|
-
/**
|
|
44
|
-
* The resource type key
|
|
45
|
-
* @example "helm::v1::Release"
|
|
46
|
-
*/
|
|
47
|
-
resourceKey: string;
|
|
48
|
-
};
|
|
49
|
-
type ExecuteActionParams = {
|
|
50
|
-
/** The action ID to execute */
|
|
51
|
-
actionID: string;
|
|
52
|
-
/** The resource ID (for instance-scoped actions) */
|
|
53
|
-
id?: string;
|
|
54
|
-
/** The resource namespace */
|
|
55
|
-
namespace?: string;
|
|
56
|
-
/** Action-specific parameters */
|
|
57
|
-
params?: Record<string, unknown>;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* useExecuteAction provides a mutation for executing a resource action.
|
|
61
|
-
* Returns a mutate function that can be called with action details.
|
|
62
|
-
*/
|
|
63
|
-
export declare const useExecuteAction: ({ pluginID: explicitPluginID, connectionID, resourceKey, }: UseExecuteActionOptions) => {
|
|
64
|
-
executeAction: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').ActionResult | null, unknown, ExecuteActionParams, unknown>;
|
|
14
|
+
}) => {
|
|
15
|
+
executeAction: import('@tanstack/react-query').UseMutateAsyncFunction<import('../..').Value, unknown, ActionRequest, unknown>;
|
|
65
16
|
isExecuting: boolean;
|
|
66
17
|
error: unknown;
|
|
67
18
|
};
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
+
import { AccessRoute, ResourceReference } from '../../resource/v2/domain';
|
|
1
2
|
type UseResourceGraphOptions = {
|
|
2
3
|
/**
|
|
3
4
|
* The ID of the plugin responsible for this resource
|
|
4
5
|
* @example "kubernetes"
|
|
5
6
|
*/
|
|
6
7
|
pluginID?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The resource key of the root resource
|
|
11
|
-
* @example "core::v1::Pod"
|
|
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;
|
|
8
|
+
reference: ResourceReference;
|
|
9
|
+
route: AccessRoute;
|
|
18
10
|
/**
|
|
19
11
|
* How many hops to follow against edge direction: owners, selectors and
|
|
20
12
|
* other resources pointing at the root. The host caps this at 5.
|
|
@@ -36,7 +28,7 @@ type UseResourceGraphOptions = {
|
|
|
36
28
|
* paths keeps all of its edges. Refetches when the host reports a graph
|
|
37
29
|
* change for the connection.
|
|
38
30
|
*/
|
|
39
|
-
export declare const useResourceGraph: ({ pluginID: explicitPluginID,
|
|
31
|
+
export declare const useResourceGraph: ({ pluginID: explicitPluginID, reference, route, upDepth, downDepth, enabled, }: UseResourceGraphOptions) => {
|
|
40
32
|
graph: import('../../models').Subgraph | null;
|
|
41
33
|
isLoading: boolean;
|
|
42
34
|
isFetching: boolean;
|
|
@@ -1,23 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The ID of the plugin
|
|
4
|
-
*/
|
|
1
|
+
import { AccessRoute } from '../../resource/v2/domain';
|
|
2
|
+
export declare const useResourceGroups: ({ pluginID: explicitPluginID, route, enabled }: {
|
|
5
3
|
pluginID?: string;
|
|
6
|
-
|
|
7
|
-
* The ID of the connection
|
|
8
|
-
*/
|
|
9
|
-
connectionID: string;
|
|
4
|
+
route: AccessRoute;
|
|
10
5
|
enabled?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
* Fetch the resource groups for a given plugin and connection.
|
|
14
|
-
*/
|
|
15
|
-
export declare const useResourceGroups: ({ pluginID: explicitPluginID, connectionID, enabled }: UseResourceGroupsOptions) => {
|
|
16
|
-
/**
|
|
17
|
-
* The resource groups for the given plugin and connection.
|
|
18
|
-
*/
|
|
19
|
-
groups: import('@tanstack/react-query').UseQueryResult<{
|
|
20
|
-
[x: string]: import('../../models').ResourceGroup | undefined;
|
|
21
|
-
}, Error>;
|
|
6
|
+
}) => {
|
|
7
|
+
groups: import('@tanstack/react-query').UseQueryResult<import('../..').ResourceGroup[], Error>;
|
|
22
8
|
};
|
|
23
9
|
export default useResourceGroups;
|
|
@@ -1,64 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The connection ID to scope the resource to
|
|
4
|
-
* @example "integration"
|
|
5
|
-
*/
|
|
6
|
-
connectionID: string;
|
|
7
|
-
/**
|
|
8
|
-
* The GVR (Group, Version, Resource) identifier to fetch
|
|
9
|
-
* @example "core::v1::pods"
|
|
10
|
-
*/
|
|
11
|
-
resourceKey: string;
|
|
12
|
-
/**
|
|
13
|
-
* The ID of the resource to fetch
|
|
14
|
-
* @example "nginx-1452"
|
|
15
|
-
*/
|
|
16
|
-
resourceID: string;
|
|
17
|
-
/**
|
|
18
|
-
* Optional namespace to scope the resource to, if the backend
|
|
19
|
-
* supports the concept of namespaces of resources.
|
|
20
|
-
* @example "default"
|
|
21
|
-
*/
|
|
22
|
-
namespace?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Optional parameters to pass to the call
|
|
25
|
-
* @example { labelSelector: "app=nginx" }
|
|
26
|
-
*/
|
|
27
|
-
params?: Record<string, unknown>;
|
|
28
|
-
};
|
|
29
|
-
type UseResourceMutationsOptions = {
|
|
30
|
-
/**
|
|
31
|
-
* The ID of the plugin responsible for this resource
|
|
32
|
-
* @example "kubernetes"
|
|
33
|
-
*/
|
|
1
|
+
import { MutationRequest } from '../../resource/v2/domain';
|
|
2
|
+
export declare const useResourceMutations: ({ pluginID: explicitPluginID }: {
|
|
34
3
|
pluginID?: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* with, and fetching, the resource data.
|
|
39
|
-
*
|
|
40
|
-
* It should be noted that this hook does not perform any logic to ensure that either the resource exists,
|
|
41
|
-
* @throws If the resourceID is invalid
|
|
42
|
-
*/
|
|
43
|
-
export declare const useResourceMutations: ({ pluginID: explicitPluginID }: UseResourceMutationsOptions) => {
|
|
44
|
-
create: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').CreateResult | null, unknown, {
|
|
45
|
-
opts: ResourceMutationOptions;
|
|
46
|
-
input: {
|
|
47
|
-
input?: unknown;
|
|
48
|
-
namespace?: string;
|
|
49
|
-
};
|
|
50
|
-
}, unknown>;
|
|
51
|
-
update: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').UpdateResult | null, unknown, {
|
|
52
|
-
opts: ResourceMutationOptions;
|
|
53
|
-
input: {
|
|
54
|
-
input?: unknown;
|
|
55
|
-
};
|
|
56
|
-
}, unknown>;
|
|
57
|
-
remove: import('@tanstack/react-query').UseMutateAsyncFunction<import('../../models').DeleteResult | null, unknown, {
|
|
58
|
-
opts: ResourceMutationOptions;
|
|
59
|
-
input: {
|
|
60
|
-
gracePeriodSeconds?: number;
|
|
61
|
-
};
|
|
62
|
-
}, unknown>;
|
|
4
|
+
}) => {
|
|
5
|
+
mutate: import('@tanstack/react-query').UseMutateAsyncFunction<import('../..').Record, unknown, MutationRequest, unknown>;
|
|
6
|
+
mutation: import('@tanstack/react-query').UseMutationResult<import('../..').Record, unknown, MutationRequest, unknown>;
|
|
63
7
|
};
|
|
64
8
|
export default useResourceMutations;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @example "kubernetes"
|
|
5
|
-
*/
|
|
1
|
+
import { HostNativeQueryRequest } from '../../resource/v2/host';
|
|
2
|
+
/** Bounded provider-native acquisitions, not a host-wide query result. */
|
|
3
|
+
export declare const useResourceSearch: ({ pluginID: explicitPluginID, searches, enabled, }: {
|
|
6
4
|
pluginID?: string;
|
|
7
|
-
|
|
8
|
-
* The connection ID to scope the resource to
|
|
9
|
-
* @example "integration"
|
|
10
|
-
*/
|
|
11
|
-
connectionID: string;
|
|
12
|
-
/**
|
|
13
|
-
* Entry for the resource search
|
|
14
|
-
*/
|
|
15
|
-
searches: ResourceSearchEntry[];
|
|
5
|
+
searches: readonly HostNativeQueryRequest[];
|
|
16
6
|
enabled?: boolean;
|
|
17
|
-
};
|
|
18
|
-
type ResourceSearchEntry = {
|
|
19
|
-
/**
|
|
20
|
-
* The key of the resource
|
|
21
|
-
*/
|
|
22
|
-
key: string;
|
|
23
|
-
/**
|
|
24
|
-
* The namespaces to search for the resource
|
|
25
|
-
*/
|
|
26
|
-
namespaces: string[];
|
|
27
|
-
/**
|
|
28
|
-
* Post-retrieve function filter to apply after the resources are found
|
|
29
|
-
*/
|
|
30
|
-
postFilter?: (resource: unknown) => boolean;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* The useResourceSearch is a utility hook to search across multiple resources and/or namespaces. This hook is currently
|
|
34
|
-
* limited searching within a single plugin, and a single connection.
|
|
35
|
-
*/
|
|
36
|
-
export declare const useResourceSearch: ({ pluginID: explicitPluginID, connectionID, searches, enabled, }: UseResourceSearchOptions) => import('@tanstack/react-query').UseQueryResult<any[], Error>[];
|
|
7
|
+
}) => import('@tanstack/react-query').UseQueryResult<import('../..').HostSourcePage, Error>[];
|
|
37
8
|
export default useResourceSearch;
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The ID of the category responsible for this resource
|
|
4
|
-
* @example "appearance"
|
|
5
|
-
*/
|
|
1
|
+
import { AccessRoute } from '../../resource/v2/domain';
|
|
2
|
+
export declare const useResourceType: ({ pluginID: explicitPluginID, route, type }: {
|
|
6
3
|
pluginID?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Interact with a category of settings from the global settings provider. Intended for use in the settings UI - if
|
|
14
|
-
* you need to read or write settings from a specific plugin, use the `@hooks/settings/useSettings` hook instead.
|
|
15
|
-
*/
|
|
16
|
-
export declare const useResourceType: ({ pluginID: explicitPluginID, resourceKey }: UseResourceTypesOptions) => {
|
|
17
|
-
/**
|
|
18
|
-
* The current settings from the provider.
|
|
19
|
-
*/
|
|
20
|
-
resourceType: import('@tanstack/react-query').UseQueryResult<import('../../models').ResourceMeta | null, Error>;
|
|
4
|
+
route: AccessRoute;
|
|
5
|
+
type: string;
|
|
6
|
+
}) => {
|
|
7
|
+
resourceType: import('@tanstack/react-query').UseQueryResult<import('../..').ResourceType | undefined, Error>;
|
|
21
8
|
};
|
|
22
9
|
export default useResourceType;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* The ID of the plugin
|
|
4
|
-
*/
|
|
1
|
+
import { AccessRoute } from '../../resource/v2/domain';
|
|
2
|
+
export declare const useResourceTypes: ({ pluginID: explicitPluginID, route, enabled }: {
|
|
5
3
|
pluginID?: string;
|
|
6
|
-
|
|
7
|
-
* The ID of the connection
|
|
8
|
-
*/
|
|
9
|
-
connectionID: string;
|
|
4
|
+
route: AccessRoute;
|
|
10
5
|
enabled?: boolean;
|
|
6
|
+
}) => {
|
|
7
|
+
resourceTypes: import('@tanstack/react-query').UseQueryResult<readonly import('../..').ResourceType[], Error>;
|
|
11
8
|
};
|
|
12
|
-
/**
|
|
13
|
-
* Fetch the resource types for a given plugin and connection.
|
|
14
|
-
*/
|
|
15
|
-
export declare const useResourceTypes: ({ pluginID: explicitPluginID, connectionID, enabled }: UseResourceTypesOptions) => {
|
|
16
|
-
/**
|
|
17
|
-
* The resource types for the given plugin and connection.
|
|
18
|
-
*/
|
|
19
|
-
types: import('@tanstack/react-query').UseQueryResult<{
|
|
20
|
-
[x: string]: import('../../models').ResourceMeta | undefined;
|
|
21
|
-
}, Error>;
|
|
22
|
-
};
|
|
23
|
-
export {};
|
|
@@ -1,65 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @example "kubernetes"
|
|
5
|
-
*/
|
|
1
|
+
import { HostEnumerateRequest, ResourceView } from '../../resource/v2/host';
|
|
2
|
+
import { WatchState } from '../../types/watch';
|
|
3
|
+
export interface UseResourcesOptions {
|
|
6
4
|
pluginID?: string;
|
|
7
|
-
|
|
8
|
-
* The connection ID to scope the resource to
|
|
9
|
-
* @example "integration"
|
|
10
|
-
*/
|
|
11
|
-
connectionID: string;
|
|
12
|
-
/**
|
|
13
|
-
* The GVR (Group, Version, Resource) identifier to fetch
|
|
14
|
-
* @example "core::v1::pods"
|
|
15
|
-
*/
|
|
16
|
-
resourceKey: string;
|
|
17
|
-
/**
|
|
18
|
-
* Optional namespace to scope the resource to, if the backend
|
|
19
|
-
* supports the concept of namespaces of resources. If the backend
|
|
20
|
-
* supports the concept of namespaces, and this is not provided,
|
|
21
|
-
* it will default to selecting from all namespaces.
|
|
22
|
-
* @example "default"
|
|
23
|
-
*/
|
|
24
|
-
namespaces?: string[];
|
|
25
|
-
/**
|
|
26
|
-
* The dot-delimited path on which id's can be used for updates. In order for the watch
|
|
27
|
-
* live functionality to work, this must be set to the path on which the ID is located.
|
|
28
|
-
*/
|
|
29
|
-
idAccessor?: string;
|
|
5
|
+
request?: HostEnumerateRequest;
|
|
30
6
|
enabled?: boolean;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/** Current watch state for this resource type */
|
|
57
|
-
watchState: import('../../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource').WatchState;
|
|
58
|
-
/** Whether the watch is currently syncing */
|
|
7
|
+
/** Actual advisory native updates, never inferred from a finite page. */
|
|
8
|
+
live?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface AcquiredResourcePage {
|
|
11
|
+
/** Exact successful request, including its actual source cursor. */
|
|
12
|
+
request: HostEnumerateRequest;
|
|
13
|
+
page: ResourceView;
|
|
14
|
+
}
|
|
15
|
+
/** One attempted acquisition and one displayed successful page; never accumulated row history. */
|
|
16
|
+
export declare const useResources: ({ pluginID: explicitPluginID, request, enabled, live }: UseResourcesOptions) => {
|
|
17
|
+
/** Attempted request state; an error does not rename or replace the acquired page. */
|
|
18
|
+
resources: import('@tanstack/react-query').UseQueryResult<import('../..').HostSourcePage, Error>;
|
|
19
|
+
acquired: AcquiredResourcePage | undefined;
|
|
20
|
+
/** Gate acquired readiness when a consumer chooses to display the attempted page instead. */
|
|
21
|
+
isAcquiredRequestCurrent: boolean;
|
|
22
|
+
refreshAcquiredPage: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<import('../..').HostSourcePage, Error>>;
|
|
23
|
+
view: {
|
|
24
|
+
guarantee: "bestEffort";
|
|
25
|
+
count: import('../..').Count;
|
|
26
|
+
sourceRevision?: string;
|
|
27
|
+
membershipStale: boolean;
|
|
28
|
+
} | undefined;
|
|
29
|
+
membershipStale: boolean;
|
|
30
|
+
watchState: WatchState;
|
|
31
|
+
isLive: boolean;
|
|
59
32
|
isSyncing: boolean;
|
|
60
|
-
/**
|
|
33
|
+
/** Native cache readiness only, not snapshot/update continuity. */
|
|
61
34
|
isSynced: boolean;
|
|
62
|
-
|
|
63
|
-
|
|
35
|
+
watchError: {} | undefined;
|
|
36
|
+
guarantee: "bestEffort" | undefined;
|
|
64
37
|
};
|
|
65
|
-
export {};
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
+
import { ActionRequest } from '../../resource/v2/domain';
|
|
1
2
|
type UseStreamActionOptions = {
|
|
2
3
|
pluginID?: string;
|
|
3
|
-
connectionID: string;
|
|
4
|
-
resourceKey: string;
|
|
5
4
|
};
|
|
6
5
|
type StartStreamActionParams = {
|
|
7
|
-
|
|
8
|
-
id: string;
|
|
9
|
-
namespace: string;
|
|
6
|
+
request: ActionRequest;
|
|
10
7
|
label: string;
|
|
11
|
-
params?: Record<string, unknown>;
|
|
12
8
|
};
|
|
13
9
|
/** Host-ready open, listener-first attachment and owning cleanup of current actions. */
|
|
14
|
-
export declare const useStreamAction: ({ pluginID: explicitPluginID
|
|
15
|
-
startStreamAction: ({
|
|
10
|
+
export declare const useStreamAction: ({ pluginID: explicitPluginID }: UseStreamActionOptions) => {
|
|
11
|
+
startStreamAction: ({ request, label }: StartStreamActionParams) => Promise<string>;
|
|
16
12
|
cancelStreamAction: (handle: string) => void;
|
|
17
13
|
};
|
|
18
14
|
export {};
|