@prorobotech/openapi-k8s-toolkit 1.1.0-alpha.9 → 1.2.0-alpha.2

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.
Files changed (66) hide show
  1. package/dist/openapi-k8s-toolkit.es.js +1884 -1416
  2. package/dist/openapi-k8s-toolkit.es.js.map +1 -1
  3. package/dist/openapi-k8s-toolkit.umd.js +1942 -1472
  4. package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
  5. package/dist/types/api/bff/scopes/checkScopes.d.ts +6 -6
  6. package/dist/types/api/bff/scopes/filterScopes.d.ts +4 -4
  7. package/dist/types/api/bff/search/getKinds.d.ts +2 -2
  8. package/dist/types/api/bff/swagger/getSwagger.d.ts +2 -2
  9. package/dist/types/api/forms.d.ts +4 -0
  10. package/dist/types/api/getApiResource.d.ts +8 -8
  11. package/dist/types/api/getApiResourceTypes.d.ts +4 -4
  12. package/dist/types/api/getBuiltinResource.d.ts +8 -8
  13. package/dist/types/api/getBuiltinResourceTypes.d.ts +2 -2
  14. package/dist/types/api/getCrdData.d.ts +2 -2
  15. package/dist/types/api/getCrdResource.d.ts +5 -5
  16. package/dist/types/api/permissions.d.ts +4 -4
  17. package/dist/types/components/molecules/BlackholeForm/index.d.ts +0 -1
  18. package/dist/types/components/molecules/BlackholeForm/molecules/index.d.ts +0 -1
  19. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +3 -3
  20. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormProvider/BlackholeFormProvider.d.ts +3 -3
  21. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/types.d.ts +2 -2
  22. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +2 -2
  23. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts +1 -1
  24. package/dist/types/components/molecules/Events/Events.d.ts +2 -2
  25. package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebarProvider/ManageableSidebarProvider.d.ts +1 -0
  26. package/dist/types/components/molecules/ManageableSidebar/organisms/ManageableSidebarProvider/utils.d.ts +2 -1
  27. package/dist/types/components/molecules/MarketPlace/MarketPlace.d.ts +3 -3
  28. package/dist/types/components/molecules/MarketPlace/molecules/AddEditFormModal/AddEditFormModal.d.ts +3 -3
  29. package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/MarketplaceCard.d.ts +1 -1
  30. package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/utils.d.ts +9 -9
  31. package/dist/types/components/molecules/ProjectInfoCard/ProjectInfoCard.d.ts +3 -3
  32. package/dist/types/components/molecules/{BlackholeForm/molecules/YamlEditorSingleton → YamlEditorSingleton}/YamlEditorSingleton.d.ts +2 -2
  33. package/dist/types/components/molecules/index.d.ts +2 -1
  34. package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/RefsList.d.ts +3 -2
  35. package/dist/types/components/organisms/DynamicComponents/molecules/OwnerRefs/organsisms/RefsList/molecules/RefElement/RefElement.d.ts +1 -0
  36. package/dist/types/components/organisms/DynamicComponents/molecules/Toggler/Toggler.d.ts +6 -0
  37. package/dist/types/components/organisms/DynamicComponents/molecules/Toggler/index.d.ts +1 -0
  38. package/dist/types/components/organisms/DynamicComponents/molecules/TogglerSegmented/TogglerSegmented.d.ts +6 -0
  39. package/dist/types/components/organisms/DynamicComponents/molecules/TogglerSegmented/index.d.ts +1 -0
  40. package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +2 -0
  41. package/dist/types/components/organisms/DynamicComponents/molecules/utils.d.ts +2 -1
  42. package/dist/types/components/organisms/DynamicComponents/molecules/utils.test.d.ts +1 -0
  43. package/dist/types/components/organisms/DynamicComponents/types.d.ts +63 -18
  44. package/dist/types/hooks/useApiResource.d.ts +8 -8
  45. package/dist/types/hooks/useApisResourceTypes.d.ts +4 -4
  46. package/dist/types/hooks/useBuiltinResource.d.ts +8 -8
  47. package/dist/types/hooks/useBuiltinResourceTypes.d.ts +2 -2
  48. package/dist/types/hooks/useCrdData.d.ts +2 -2
  49. package/dist/types/hooks/useCrdResource.d.ts +5 -5
  50. package/dist/types/hooks/useK8sSmartResource/index.d.ts +4 -0
  51. package/dist/types/hooks/useK8sSmartResource/useK8sSmartResource.d.ts +28 -0
  52. package/dist/types/hooks/{useK8sSmartResource.d.ts → useK8sSmartResource/useK8sSmartResourceWithoutKinds.d.ts} +4 -4
  53. package/dist/types/hooks/useK8sSmartResource/useManyK8sSmartResource.d.ts +17 -0
  54. package/dist/types/hooks/useK8sSmartResource/useSmartResourceParams.d.ts +9 -0
  55. package/dist/types/hooks/usePermissions.d.ts +4 -4
  56. package/dist/types/index.d.ts +1 -1
  57. package/dist/types/localTypes/bff/form.d.ts +5 -5
  58. package/dist/types/localTypes/bff/scopes.d.ts +6 -6
  59. package/dist/types/localTypes/bff/table.d.ts +2 -2
  60. package/dist/types/localTypes/form.d.ts +2 -2
  61. package/dist/types/localTypes/marketplace.d.ts +1 -1
  62. package/dist/types/utils/getGroupsByCategory/getGroupsByCategory.d.ts +2 -2
  63. package/dist/types/utils/tableLocations/tableLocations.d.ts +5 -5
  64. package/package.json +1 -1
  65. /package/dist/types/components/molecules/{BlackholeForm/molecules/YamlEditorSingleton → YamlEditorSingleton}/index.d.ts +0 -0
  66. /package/dist/types/components/molecules/{BlackholeForm/molecules/YamlEditorSingleton → YamlEditorSingleton}/styled.d.ts +0 -0
@@ -53,26 +53,26 @@ export type TDynamicComponentsAppTypeMap = {
53
53
  };
54
54
  ProjectInfoCard: {
55
55
  id: number | string;
56
- clusterNamePartOfUrl: string;
57
- namespacePartOfUrl: string;
56
+ cluster: string;
57
+ namespace: string;
58
58
  baseApiGroup: string;
59
59
  baseApiVersion: string;
60
60
  baseProjectApiGroup: string;
61
61
  baseProjectVersion: string;
62
- projectResourceName: string;
63
- mpResourceName: string;
62
+ projectPlural: string;
63
+ marketplacePlural: string;
64
64
  accessGroups: string[];
65
65
  baseprefix?: string;
66
66
  showZeroResources?: boolean;
67
67
  };
68
68
  MarketplaceCard: {
69
69
  id: number | string;
70
- clusterNamePartOfUrl: string;
71
- namespacePartOfUrl: string;
70
+ cluster: string;
71
+ namespace: string;
72
72
  baseApiGroup: string;
73
73
  baseApiVersion: string;
74
- mpResourceName: string;
75
- mpResourceKind: string;
74
+ marketplacePlural: string;
75
+ marketplaceKind: string;
76
76
  baseprefix?: string;
77
77
  standalone?: boolean;
78
78
  forceAddedMode?: boolean;
@@ -104,13 +104,14 @@ export type TDynamicComponentsAppTypeMap = {
104
104
  id: number | string;
105
105
  fetchUrl?: string;
106
106
  k8sResourceToFetch?: {
107
- group?: string;
108
- version: string;
107
+ apiGroup?: string;
108
+ apiVersion: string;
109
109
  plural: string;
110
110
  namespace?: string;
111
111
  };
112
112
  pathToItems: string | string[];
113
- clusterNamePartOfUrl: string;
113
+ additionalReqsDataToEachItem?: number[];
114
+ cluster: string;
114
115
  labelSelector?: Record<string, string>;
115
116
  labelSelectorFull?: {
116
117
  reqIndex: number;
@@ -145,7 +146,7 @@ export type TDynamicComponentsAppTypeMap = {
145
146
  type: 'builtin' | 'apis';
146
147
  apiGroup?: string;
147
148
  apiVersion?: string;
148
- typeName: string;
149
+ plural: string;
149
150
  forcedKind?: string;
150
151
  prefillValuesRequestIndex: number;
151
152
  pathToData?: string | string[];
@@ -313,7 +314,7 @@ export type TDynamicComponentsAppTypeMap = {
313
314
  Events: {
314
315
  id: number | string;
315
316
  baseprefix?: string;
316
- clusterNamePartOfUrl: string;
317
+ cluster: string;
317
318
  wsUrl: string;
318
319
  pageSize?: number;
319
320
  substractHeight?: number;
@@ -329,13 +330,13 @@ export type TDynamicComponentsAppTypeMap = {
329
330
  baseFactoryNamespacedBuiltinKey: string;
330
331
  baseFactoryClusterSceopedBuiltinKey: string;
331
332
  baseNamespaceFactoryKey: string;
332
- baseNavigationPluralName: string;
333
- baseNavigationSpecificName: string;
333
+ baseNavigationPlural: string;
334
+ baseNavigationName: string;
334
335
  };
335
336
  OwnerRefs: {
336
337
  id: number | string;
337
338
  baseprefix?: string;
338
- clusterNamePartOfUrl: string;
339
+ cluster: string;
339
340
  reqIndex: string;
340
341
  errorText: string;
341
342
  notArrayErrorText: string;
@@ -344,13 +345,57 @@ export type TDynamicComponentsAppTypeMap = {
344
345
  containerStyle?: CSSProperties;
345
346
  listFlexProps?: FlexProps;
346
347
  jsonPathToArrayOfRefs: string;
348
+ forcedApiVersion?: {
349
+ kind: string;
350
+ apiVersion: string;
351
+ }[];
352
+ forcedNamespace?: string;
347
353
  keysToForcedLabel?: string | string[];
348
354
  forcedRelatedValuePath?: string;
349
355
  baseFactoryNamespacedAPIKey: string;
350
356
  baseFactoryClusterSceopedAPIKey: string;
351
357
  baseFactoryNamespacedBuiltinKey: string;
352
358
  baseFactoryClusterSceopedBuiltinKey: string;
353
- baseNavigationPluralName: string;
354
- baseNavigationSpecificName: string;
359
+ baseNavigationPlural: string;
360
+ baseNavigationName: string;
361
+ };
362
+ Toggler: {
363
+ id: number | string;
364
+ reqIndex: string;
365
+ jsonPathToValue: string;
366
+ criteria: {
367
+ type: 'forSuccess' | 'forError';
368
+ operator: 'exists' | 'equals';
369
+ valueToCompare?: string;
370
+ };
371
+ notificationSuccessMessage?: string;
372
+ notificationErrorMessage?: string;
373
+ notificationSuccessMessageDescription?: string;
374
+ notificationErrorMessageDescription?: string;
375
+ containerStyle?: CSSProperties;
376
+ endpoint: string;
377
+ pathToValue: string;
378
+ valueToSubmit: {
379
+ onValue: any;
380
+ offValue?: any;
381
+ toRemoveWhenOff?: boolean;
382
+ };
383
+ };
384
+ TogglerSegmented: {
385
+ id: number | string;
386
+ reqIndex: string;
387
+ jsonPathToValue: string;
388
+ notificationSuccessMessage?: string;
389
+ notificationErrorMessage?: string;
390
+ notificationSuccessMessageDescription?: string;
391
+ notificationErrorMessageDescription?: string;
392
+ containerStyle?: CSSProperties;
393
+ endpoint: string;
394
+ pathToValue: string;
395
+ possibleValues: any[];
396
+ valuesMap?: {
397
+ value: any;
398
+ renderedValue: string | number;
399
+ }[];
355
400
  };
356
401
  };
@@ -1,24 +1,24 @@
1
1
  import { TApiResources } from '../localTypes/k8s';
2
- export declare const useApiResources: ({ clusterName, namespace, apiGroup, apiVersion, typeName, specificName, labels, fields, limit, refetchInterval, isEnabled, }: {
3
- clusterName: string;
2
+ export declare const useApiResources: ({ cluster, namespace, apiGroup, apiVersion, plural, name, labels, fields, limit, refetchInterval, isEnabled, }: {
3
+ cluster: string;
4
4
  namespace?: string | undefined;
5
5
  apiGroup: string;
6
6
  apiVersion: string;
7
- typeName: string;
8
- specificName?: string | undefined;
7
+ plural: string;
8
+ name?: string | undefined;
9
9
  labels?: string[] | undefined;
10
10
  fields?: string[] | undefined;
11
11
  limit: string | null;
12
12
  refetchInterval?: number | false | undefined;
13
13
  isEnabled?: boolean | undefined;
14
14
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TApiResources, Error>;
15
- export declare const useApiResourceSingle: ({ clusterName, namespace, apiGroup, apiVersion, typeName, entryName, refetchInterval, }: {
16
- clusterName: string;
15
+ export declare const useApiResourceSingle: ({ cluster, namespace, apiGroup, apiVersion, plural, name, refetchInterval, }: {
16
+ cluster: string;
17
17
  namespace?: string | undefined;
18
18
  apiGroup: string;
19
19
  apiVersion: string;
20
- typeName: string;
21
- entryName: string;
20
+ plural: string;
21
+ name: string;
22
22
  refetchInterval?: number | false | undefined;
23
23
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
24
24
  metadata: {
@@ -1,5 +1,5 @@
1
- export declare const useApisResourceTypes: ({ clusterName }: {
2
- clusterName: string;
1
+ export declare const useApisResourceTypes: ({ cluster }: {
2
+ cluster: string;
3
3
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
4
4
  apiVersion: string;
5
5
  kind: string;
@@ -15,8 +15,8 @@ export declare const useApisResourceTypes: ({ clusterName }: {
15
15
  };
16
16
  }[];
17
17
  }, Error>;
18
- export declare const useApiResourceTypesByGroup: ({ clusterName, apiGroup, apiVersion, }: {
19
- clusterName: string;
18
+ export declare const useApiResourceTypesByGroup: ({ cluster, apiGroup, apiVersion, }: {
19
+ cluster: string;
20
20
  apiGroup: string;
21
21
  apiVersion: string;
22
22
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
@@ -1,20 +1,20 @@
1
1
  import { TBuiltinResources } from '../localTypes/k8s';
2
- export declare const useBuiltinResources: ({ clusterName, namespace, typeName, specificName, labels, fields, limit, refetchInterval, isEnabled, }: {
3
- clusterName: string;
2
+ export declare const useBuiltinResources: ({ cluster, namespace, plural, name, labels, fields, limit, refetchInterval, isEnabled, }: {
3
+ cluster: string;
4
4
  namespace?: string | undefined;
5
- typeName: string;
6
- specificName?: string | undefined;
5
+ plural: string;
6
+ name?: string | undefined;
7
7
  labels?: string[] | undefined;
8
8
  fields?: string[] | undefined;
9
9
  limit: string | null;
10
10
  refetchInterval?: number | false | undefined;
11
11
  isEnabled?: boolean | undefined;
12
12
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TBuiltinResources, Error>;
13
- export declare const useBuiltinResourceSingle: ({ clusterName, namespace, typeName, entryName, refetchInterval, }: {
14
- clusterName: string;
13
+ export declare const useBuiltinResourceSingle: ({ cluster, namespace, plural, name, refetchInterval, }: {
14
+ cluster: string;
15
15
  namespace?: string | undefined;
16
- typeName: string;
17
- entryName: string;
16
+ plural: string;
17
+ name: string;
18
18
  refetchInterval?: number | false | undefined;
19
19
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
20
20
  metadata: {
@@ -1,4 +1,4 @@
1
1
  import { TBuiltinResourceTypeList } from '../localTypes/k8s';
2
- export declare const useBuiltinResourceTypes: ({ clusterName }: {
3
- clusterName: string;
2
+ export declare const useBuiltinResourceTypes: ({ cluster }: {
3
+ cluster: string;
4
4
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TBuiltinResourceTypeList, Error>;
@@ -1,5 +1,5 @@
1
- export declare const useCrdData: ({ clusterName, apiExtensionVersion, crdName, }: {
2
- clusterName: string;
1
+ export declare const useCrdData: ({ cluster, apiExtensionVersion, crdName, }: {
2
+ cluster: string;
3
3
  apiExtensionVersion: string;
4
4
  crdName: string;
5
5
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
@@ -1,6 +1,6 @@
1
1
  import { TJSON } from '../localTypes/JSON';
2
- export declare const useCrdResources: <T = TJSON[]>({ clusterName, namespace, apiGroup, apiVersion, crdName, refetchInterval, isEnabled, }: {
3
- clusterName: string;
2
+ export declare const useCrdResources: <T = TJSON[]>({ cluster, namespace, apiGroup, apiVersion, crdName, refetchInterval, isEnabled, }: {
3
+ cluster: string;
4
4
  namespace?: string | undefined;
5
5
  apiGroup: string;
6
6
  apiVersion: string;
@@ -19,13 +19,13 @@ export declare const useCrdResources: <T = TJSON[]>({ clusterName, namespace, ap
19
19
  reason?: string | undefined;
20
20
  } | undefined;
21
21
  }, Error>;
22
- export declare const useCrdResourceSingle: ({ clusterName, namespace, apiGroup, apiVersion, crdName, entryName, refetchInterval, }: {
23
- clusterName: string;
22
+ export declare const useCrdResourceSingle: ({ cluster, namespace, apiGroup, apiVersion, crdName, name, refetchInterval, }: {
23
+ cluster: string;
24
24
  namespace?: string | undefined;
25
25
  apiGroup: string;
26
26
  apiVersion: string;
27
27
  crdName: string;
28
- entryName: string;
28
+ name: string;
29
29
  refetchInterval?: number | false | undefined;
30
30
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
31
31
  metadata: {
@@ -0,0 +1,4 @@
1
+ export { useK8sSmartResource } from './useK8sSmartResource';
2
+ export type { TUseK8sSmartResourceParams } from './useK8sSmartResourceWithoutKinds';
3
+ export { useManyK8sSmartResource } from './useManyK8sSmartResource';
4
+ export { useSmartResourceParams } from './useSmartResourceParams';
@@ -0,0 +1,28 @@
1
+ import { type TUseK8sSmartResourceParams } from './useK8sSmartResourceWithoutKinds';
2
+ /**
3
+ * If T has an `{ items: U[] }` field, we add `kind?: string` and `apiVersion?: string` to each item.
4
+ * Otherwise T is left unchanged.
5
+ */
6
+ type TWithKindAndApiVersionOnItems<T> = T extends {
7
+ items: (infer U)[];
8
+ } ? Omit<T, 'items'> & {
9
+ items: (U & {
10
+ kind?: string;
11
+ apiVersion?: string;
12
+ })[];
13
+ } : T;
14
+ /**
15
+ * Same params as useK8sSmartResource.
16
+ * Returns the same shape as useK8sSmartResource,
17
+ * but if `data.items` exists, items are enriched with `kind`.
18
+ */
19
+ export declare const useK8sSmartResource: <T>(params: TUseK8sSmartResourceParams<T>) => {
20
+ data: TWithKindAndApiVersionOnItems<T> | undefined;
21
+ isLoading: boolean;
22
+ isError: boolean;
23
+ error: string | Error | import("axios").AxiosError<unknown, any> | undefined;
24
+ _meta?: {
25
+ used: "disabled" | "list" | "watch" | "verbs-loading" | "verbs-error";
26
+ } | undefined;
27
+ };
28
+ export {};
@@ -1,9 +1,9 @@
1
1
  import { AxiosError } from 'axios';
2
- import { TSingleResource } from '../localTypes/k8s';
2
+ import { TSingleResource } from '../../localTypes/k8s';
3
3
  export type TUseK8sSmartResourceParams<T> = {
4
4
  cluster: string;
5
- group?: string;
6
- version: string;
5
+ apiGroup?: string;
6
+ apiVersion: string;
7
7
  plural: string;
8
8
  namespace?: string;
9
9
  fieldSelector?: string;
@@ -25,5 +25,5 @@ type SmartResult<T> = {
25
25
  used: 'list' | 'watch' | 'disabled' | 'verbs-loading' | 'verbs-error';
26
26
  };
27
27
  };
28
- export declare const useK8sSmartResource: <T>({ cluster, group, version, plural, namespace, fieldSelector, labelSelector, isEnabled, listRefetchInterval, limit, mapListWatchState, }: TUseK8sSmartResourceParams<T>) => SmartResult<T>;
28
+ export declare const useK8sSmartResourceWithoutKinds: <T>({ cluster, apiGroup, apiVersion, plural, namespace, fieldSelector, labelSelector, isEnabled, listRefetchInterval, limit, mapListWatchState, }: TUseK8sSmartResourceParams<T>) => SmartResult<T>;
29
29
  export {};
@@ -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>[];
@@ -1,7 +1,7 @@
1
- export declare const usePermissions: ({ clusterName, namespace, group, resource, verb, name, refetchInterval, enabler, }: {
2
- clusterName: string;
3
- group?: string | undefined;
4
- resource: string;
1
+ export declare const usePermissions: ({ cluster, namespace, apiGroup, plural, verb, name, refetchInterval, enabler, }: {
2
+ cluster: string;
3
+ apiGroup?: string | undefined;
4
+ plural: string;
5
5
  namespace?: string | undefined;
6
6
  name?: string | undefined;
7
7
  verb: 'create' | 'delete' | 'patch' | 'update';
@@ -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';
@@ -5,24 +5,24 @@ import { TFormPrefill } from '../formExtensions';
5
5
  export type TPrepareFormReq = {
6
6
  data: {
7
7
  type: 'builtin';
8
- typeName: string;
8
+ plural: string;
9
9
  prefillValuesSchema?: TJSON;
10
10
  prefillValueNamespaceOnly?: string;
11
11
  } | {
12
12
  type: 'apis';
13
13
  apiGroup: string;
14
14
  apiVersion: string;
15
- typeName: string;
15
+ plural: string;
16
16
  prefillValuesSchema?: TJSON;
17
17
  prefillValueNamespaceOnly?: string;
18
18
  };
19
- clusterName: string;
19
+ cluster: string;
20
20
  customizationId?: string;
21
21
  };
22
22
  export type TPrepareFormRes = {
23
23
  result: 'error';
24
24
  error: string | undefined;
25
- kindName: string | undefined;
25
+ kind: string | undefined;
26
26
  fallbackToManualMode: true;
27
27
  isNamespaced: boolean;
28
28
  } | {
@@ -35,7 +35,7 @@ export type TPrepareFormRes = {
35
35
  expandedPaths: string[][] | undefined;
36
36
  persistedPaths: string[][] | undefined;
37
37
  sortPaths: string[][] | undefined;
38
- kindName: string | undefined;
38
+ kind: string | undefined;
39
39
  isNamespaced: boolean;
40
40
  formPrefills?: TFormPrefill;
41
41
  namespacesData?: string[];
@@ -1,17 +1,17 @@
1
1
  import { TApiGroupResourceTypeList, TBuiltinResourceTypeList } from '../k8s';
2
2
  export type TCheckIfApiInstanceNamespaceScopedReq = {
3
- typeName: string;
3
+ plural: string;
4
4
  apiGroup: string;
5
5
  apiVersion: string;
6
- clusterName: string;
6
+ cluster: string;
7
7
  };
8
8
  export type TCheckIfApiInstanceNamespaceScopedRes = {
9
9
  isClusterWide: boolean;
10
10
  isNamespaceScoped: boolean;
11
11
  };
12
12
  export type TCheckIfBuiltInInstanceNamespaceScopedReq = {
13
- typeName: string;
14
- clusterName: string;
13
+ plural: string;
14
+ cluster: string;
15
15
  };
16
16
  export type TCheckIfBuiltInInstanceNamespaceScopedRes = {
17
17
  isClusterWide: boolean;
@@ -22,12 +22,12 @@ export type TFilterIfApiInstanceNamespaceScopedReq = {
22
22
  data?: TApiGroupResourceTypeList;
23
23
  apiGroup: string;
24
24
  apiVersion: string;
25
- clusterName: string;
25
+ cluster: string;
26
26
  };
27
27
  export type TFilterIfApiInstanceNamespaceScopedRes = TApiGroupResourceTypeList['resources'] | undefined;
28
28
  export type TFilterIfBuiltInInstanceNamespaceScopedReq = {
29
29
  namespace?: string;
30
30
  data?: TBuiltinResourceTypeList;
31
- clusterName: string;
31
+ cluster: string;
32
32
  };
33
33
  export type TFilterIfBuiltInInstanceNamespaceScopedRes = TBuiltinResourceTypeList['resources'] | undefined;
@@ -3,10 +3,10 @@ export type TPrepareTableReq = {
3
3
  customizationId?: string;
4
4
  tableMappingsReplaceValues?: Record<string, string | undefined>;
5
5
  forceDefaultAdditionalPrinterColumns?: TAdditionalPrinterColumns;
6
- clusterName: string;
6
+ cluster: string;
7
7
  namespace?: string;
8
8
  k8sResource?: {
9
- resource: string;
9
+ plural: string;
10
10
  apiGroup?: string;
11
11
  apiVersion: string;
12
12
  };
@@ -19,8 +19,8 @@ export type TPersistedControls = {
19
19
  persistedKeys: TFormName[];
20
20
  };
21
21
  export type TUrlParams = {
22
- clusterName?: string;
22
+ cluster?: string;
23
23
  namespace?: string;
24
24
  syntheticProject?: string;
25
- entryName?: string;
25
+ name?: string;
26
26
  };
@@ -5,7 +5,7 @@ export type TMarketPlacePanel = {
5
5
  type: 'crd' | 'nonCrd' | 'built-in' | 'direct';
6
6
  apiGroup?: string;
7
7
  apiVersion?: string;
8
- typeName?: string;
8
+ plural?: string;
9
9
  pathToNav?: string;
10
10
  tags: string[];
11
11
  disabled?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { TApiGroupList, TBuiltinResourceTypeList } from '../../localTypes/k8s';
2
- export declare const getGroupsByCategory: ({ clusterName, apiGroupListData, builtinResourceTypesData, namespace, noncrds, }: {
3
- clusterName: string;
2
+ export declare const getGroupsByCategory: ({ cluster, apiGroupListData, builtinResourceTypesData, namespace, noncrds, }: {
3
+ cluster: string;
4
4
  namespace?: string | undefined;
5
5
  apiGroupListData?: {
6
6
  apiVersion: string;
@@ -1,23 +1,23 @@
1
1
  export declare const getBackLinkToTable: ({ fullPath }: {
2
2
  fullPath: string;
3
3
  }) => string;
4
- export declare const getLinkToBuiltinForm: ({ cluster, baseprefix, namespace, syntheticProject, typeName, inside, fullPath, }: {
4
+ export declare const getLinkToBuiltinForm: ({ cluster, baseprefix, namespace, syntheticProject, plural, inside, fullPath, }: {
5
5
  cluster: string;
6
6
  baseprefix?: string | undefined;
7
7
  namespace?: string | undefined;
8
8
  syntheticProject?: string | undefined;
9
- typeName: string;
9
+ plural: string;
10
10
  inside?: boolean | undefined;
11
11
  fullPath: string;
12
12
  }) => string;
13
- export declare const getLinkToApiForm: ({ cluster, baseprefix, namespace, syntheticProject, apiGroup, apiVersion, typeName, inside, fullPath, }: {
13
+ export declare const getLinkToApiForm: ({ cluster, baseprefix, namespace, syntheticProject, apiGroup, apiVersion, plural, inside, fullPath, }: {
14
14
  cluster: string;
15
15
  baseprefix?: string | undefined;
16
16
  namespace?: string | undefined;
17
17
  syntheticProject?: string | undefined;
18
18
  apiGroup?: string | undefined;
19
19
  apiVersion?: string | undefined;
20
- typeName: string;
20
+ plural: string;
21
21
  inside?: boolean | undefined;
22
22
  fullPath: string;
23
23
  searchMount?: boolean | undefined;
@@ -29,7 +29,7 @@ export declare const getLinkToForm: ({ apiGroup, ...rest }: {
29
29
  syntheticProject?: string | undefined;
30
30
  apiGroup?: string | undefined;
31
31
  apiVersion?: string | undefined;
32
- typeName: string;
32
+ plural: string;
33
33
  inside?: boolean | undefined;
34
34
  fullPath: string;
35
35
  searchMount?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prorobotech/openapi-k8s-toolkit",
3
- "version": "1.1.0-alpha.9",
3
+ "version": "1.2.0-alpha.2",
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",