@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.7 → 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.
@@ -24,5 +24,6 @@ export declare const useK8sSmartResource: <T>(params: TUseK8sSmartResourceParams
24
24
  _meta?: {
25
25
  used: "disabled" | "list" | "watch" | "verbs-loading" | "verbs-error";
26
26
  } | undefined;
27
+ debugTick?: number | undefined;
27
28
  };
28
29
  export {};
@@ -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 {};
@@ -14,4 +14,5 @@ export declare const useManyK8sSmartResource: <T>(paramsList: readonly TUseK8sSm
14
14
  _meta?: {
15
15
  used: "disabled" | "list" | "watch" | "verbs-loading" | "verbs-error";
16
16
  } | undefined;
17
+ debugTick?: number | undefined;
17
18
  }[];
@@ -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
- }) => TUseK8sSmartResourceParams<unknown>[];
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 {};
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prorobotech/openapi-k8s-toolkit",
3
- "version": "1.2.0-alpha.7",
3
+ "version": "1.2.0-alpha.9",
4
4
  "description": "ProRobotech OpenAPI k8s tools",
5
5
  "main": "dist/openapi-k8s-toolkit.cjs.js",
6
6
  "module": "dist/openapi-k8s-toolkit.es.js",