@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.8 → 1.2.0-alpha.9
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/openapi-k8s-toolkit.es.js +114 -45
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +114 -44
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/hooks/useK8sSmartResource/useK8sSmartResource.d.ts +1 -0
- package/dist/types/hooks/useK8sSmartResource/useK8sSmartResourceWithoutKinds.d.ts +1 -0
- package/dist/types/hooks/useK8sSmartResource/useManyK8sSmartResource.d.ts +1 -0
- package/dist/types/hooks/useK8sSmartResource/useSmartResourceParams.d.ts +5 -5
- package/dist/types/hooks/useListThenWatch/useListWatch.d.ts +1 -0
- package/dist/types/hooks/useResourceScope/index.d.ts +1 -0
- package/dist/types/hooks/useResourceScope/useResourceScope.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -24,6 +24,7 @@ type SmartResult<T> = {
|
|
|
24
24
|
_meta?: {
|
|
25
25
|
used: 'list' | 'watch' | 'disabled' | 'verbs-loading' | 'verbs-error';
|
|
26
26
|
};
|
|
27
|
+
debugTick?: number;
|
|
27
28
|
};
|
|
28
29
|
export declare const useK8sSmartResourceWithoutKinds: <T>({ cluster, apiGroup, apiVersion, plural, namespace, fieldSelector, labelSelector, isEnabled, listRefetchInterval, limit, mapListWatchState, }: TUseK8sSmartResourceParams<T>) => SmartResult<T>;
|
|
29
30
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TUseK8sSmartResourceParams } from './useK8sSmartResourceWithoutKinds';
|
|
2
|
-
/**
|
|
3
|
-
* A single hook whose return value is a plain constant array,
|
|
4
|
-
* safe to pass to `useManyK8sSmartResource`.
|
|
5
|
-
*/
|
|
6
2
|
export declare const useSmartResourceParams: ({ cluster, namespace }: {
|
|
7
3
|
cluster: string;
|
|
8
4
|
namespace?: string | undefined;
|
|
9
|
-
}) =>
|
|
5
|
+
}) => {
|
|
6
|
+
paramsList: TUseK8sSmartResourceParams<unknown>[];
|
|
7
|
+
scopesLoading: boolean;
|
|
8
|
+
scopesError: Error | null | undefined;
|
|
9
|
+
};
|
|
@@ -68,5 +68,6 @@ export type TUseListWatchReturn = {
|
|
|
68
68
|
setUrl: (next: string) => void;
|
|
69
69
|
/** Update the list/watch query (will reconnect if enabled) */
|
|
70
70
|
setQuery: (q: TUseListWatchQuery) => void;
|
|
71
|
+
debugTick?: number;
|
|
71
72
|
};
|
|
72
73
|
export declare const useListWatch: ({ wsUrl, pageSize, paused, ignoreRemove, onStatus, onError, autoDrain, preserveStateOnUrlChange, isEnabled, query, }: TUseListWatchOptions) => TUseListWatchReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useResourceScope } from './useResourceScope';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type TUseResourceScopeArgs = {
|
|
2
|
+
cluster: string;
|
|
3
|
+
apiGroup?: string;
|
|
4
|
+
apiVersion?: string;
|
|
5
|
+
plural: string;
|
|
6
|
+
};
|
|
7
|
+
type TUseResourceScopeRes = {
|
|
8
|
+
isClusterWide: boolean;
|
|
9
|
+
isNamespaceScoped: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const useResourceScope: ({ plural, cluster, apiGroup, apiVersion }: TUseResourceScopeArgs) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TUseResourceScopeRes, Error>;
|
|
12
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export { useListWatch, useInfiniteSentinel } from './hooks/useListThenWatch';
|
|
|
27
27
|
export type { TConnStatus, TUseListWatchQuery, TUseListWatchOptions, TUseListWatchReturn, } from './hooks/useListThenWatch';
|
|
28
28
|
export { useK8sVerbs } from './hooks/useK8sVerbs';
|
|
29
29
|
export { useK8sSmartResource, useManyK8sSmartResource, useSmartResourceParams } from './hooks/useK8sSmartResource';
|
|
30
|
+
export { useResourceScope } from './hooks/useResourceScope';
|
|
30
31
|
export type { TRequestError } from './localTypes/api';
|
|
31
32
|
export type { TClusterList } from './localTypes/clusterList';
|
|
32
33
|
export type { TItemTypeMap, TRenderableItem, TRendererComponents, TFactoryDataK8s, TFactoryResponse, TFactoryResource, } from './localTypes/dynamicRender';
|
package/package.json
CHANGED