@prorobotech/openapi-k8s-toolkit 1.1.0-alpha.20 → 1.1.0-alpha.21
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 +52 -10
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +52 -8
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +1 -0
- package/dist/types/hooks/useK8sSmartResource/index.d.ts +2 -0
- package/dist/types/hooks/useK8sSmartResource/useManyK8sSmartResource.d.ts +17 -0
- package/dist/types/hooks/useK8sSmartResource/useSmartResourceParams.d.ts +9 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { useK8sSmartResource } from './useK8sSmartResource';
|
|
2
2
|
export type { TUseK8sSmartResourceParams } from './useK8sSmartResourceWithoutKinds';
|
|
3
|
+
export { useManyK8sSmartResource } from './useManyK8sSmartResource';
|
|
4
|
+
export { useSmartResourceParams } from './useSmartResourceParams';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TUseK8sSmartResourceParams } from './useK8sSmartResourceWithoutKinds';
|
|
2
|
+
export declare const useManyK8sSmartResource: <T>(paramsList: readonly TUseK8sSmartResourceParams<T>[]) => {
|
|
3
|
+
data: (T extends {
|
|
4
|
+
items: (infer U)[];
|
|
5
|
+
} ? Omit<T, "items"> & {
|
|
6
|
+
items: (U & {
|
|
7
|
+
kind?: string | undefined;
|
|
8
|
+
apiVersion?: string | undefined;
|
|
9
|
+
})[];
|
|
10
|
+
} : T) | undefined;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
isError: boolean;
|
|
13
|
+
error: string | Error | import("axios").AxiosError<unknown, any> | undefined;
|
|
14
|
+
_meta?: {
|
|
15
|
+
used: "disabled" | "list" | "watch" | "verbs-loading" | "verbs-error";
|
|
16
|
+
} | undefined;
|
|
17
|
+
}[];
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export declare const useSmartResourceParams: ({ cluster, namespace }: {
|
|
7
|
+
cluster: string;
|
|
8
|
+
namespace?: string | undefined;
|
|
9
|
+
}) => TUseK8sSmartResourceParams<unknown>[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { usePermissions } from './hooks/usePermissions';
|
|
|
26
26
|
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
|
-
export { useK8sSmartResource } from './hooks/useK8sSmartResource';
|
|
29
|
+
export { useK8sSmartResource, useManyK8sSmartResource, useSmartResourceParams } from './hooks/useK8sSmartResource';
|
|
30
30
|
export type { TRequestError } from './localTypes/api';
|
|
31
31
|
export type { TClusterList } from './localTypes/clusterList';
|
|
32
32
|
export type { TItemTypeMap, TRenderableItem, TRendererComponents, TFactoryDataK8s, TFactoryResponse, TFactoryResource, } from './localTypes/dynamicRender';
|
package/package.json
CHANGED