@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.6 → 1.4.0-alpha.8

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.
@@ -0,0 +1,6 @@
1
+ import { TFormName } from '../../../../../localTypes/form';
2
+ export declare const prettyFieldPath: (name: TFormName) => string;
3
+ export declare const getRequiredRule: (isRequired: boolean, name: TFormName) => {
4
+ required: boolean;
5
+ message: string;
6
+ };
@@ -6,6 +6,7 @@ export type TManageableSidebarProviderProps = {
6
6
  plural: string;
7
7
  isEnabled?: boolean;
8
8
  replaceValues: Record<string, string | undefined>;
9
+ multiQueryData?: Record<string, unknown>;
9
10
  pathname: string;
10
11
  searchParams?: string;
11
12
  idToCompare: string;
@@ -1,7 +1,17 @@
1
+ export type TResourcesList = {
2
+ cluster: string;
3
+ apiGroup?: string;
4
+ apiVersion: string;
5
+ plural: string;
6
+ namespace?: string;
7
+ linkToResource: string;
8
+ jsonPathToName: string;
9
+ };
1
10
  export type TLink = {
2
11
  key: string;
3
12
  label: string;
4
13
  link?: string;
14
+ resourcesList?: TResourcesList;
5
15
  children?: TLink[];
6
16
  };
7
17
  export type TCrdResource = {
@@ -1,6 +1,24 @@
1
1
  import { ItemType } from 'antd/es/menu/interface';
2
2
  import { TLink } from './types';
3
- export declare const prepareDataForManageableSidebar: ({ data, replaceValues, pathname, searchParams, idToCompare, fallbackIdToCompare, currentTags, }: {
3
+ export type TResourcesListFetchEntry = {
4
+ nodePath: string;
5
+ k8sParams: {
6
+ cluster: string;
7
+ apiGroup?: string;
8
+ apiVersion: string;
9
+ plural: string;
10
+ namespace?: string;
11
+ isEnabled: boolean;
12
+ };
13
+ };
14
+ export declare const collectLinksWithResourcesList: ({ items, parentPath, replaceValues, multiQueryData, isEnabled, }: {
15
+ items: TLink[];
16
+ parentPath?: string | undefined;
17
+ replaceValues: Record<string, string | undefined>;
18
+ multiQueryData: Record<string, unknown>;
19
+ isEnabled?: boolean | undefined;
20
+ }) => TResourcesListFetchEntry[];
21
+ export declare const prepareDataForManageableSidebar: ({ data, replaceValues, multiQueryData, pathname, searchParams, idToCompare, fallbackIdToCompare, currentTags, resourcesListData, }: {
4
22
  data: {
5
23
  id: string;
6
24
  menuItems: TLink[];
@@ -8,11 +26,15 @@ export declare const prepareDataForManageableSidebar: ({ data, replaceValues, pa
8
26
  externalKeys?: string[];
9
27
  }[];
10
28
  replaceValues: Record<string, string | undefined>;
29
+ multiQueryData?: Record<string, unknown> | undefined;
11
30
  pathname: string;
12
31
  searchParams?: string | undefined;
13
32
  idToCompare: string;
14
33
  fallbackIdToCompare?: string | undefined;
15
34
  currentTags?: string[] | undefined;
35
+ resourcesListData?: Record<string, {
36
+ items?: Record<string, unknown>[] | undefined;
37
+ }> | undefined;
16
38
  }) => {
17
39
  menuItems: ItemType[];
18
40
  selectedKeys: string[];
@@ -8,7 +8,7 @@ export type TMarketPlaceProps = {
8
8
  marketplaceKind: string;
9
9
  baseprefix?: string;
10
10
  standalone?: boolean;
11
- forceAddedMode?: boolean;
11
+ addedMode?: boolean;
12
12
  showZeroResources?: boolean;
13
13
  };
14
14
  export declare const MarketPlace: FC<TMarketPlaceProps>;
@@ -8,6 +8,6 @@ export type TMarketplaceCardProps = {
8
8
  marketplaceKind: string;
9
9
  baseprefix?: string;
10
10
  standalone?: boolean;
11
- forceAddedMode?: boolean;
11
+ addedMode?: boolean;
12
12
  showZeroResources?: boolean;
13
13
  };
@@ -24,6 +24,7 @@ export type TPrepareFormRes = {
24
24
  error: string | undefined;
25
25
  kind: string | undefined;
26
26
  fallbackToManualMode: true;
27
+ forceViewMode?: 'OpenAPI' | 'Manual';
27
28
  isNamespaced: boolean;
28
29
  } | {
29
30
  result: 'success';
@@ -37,6 +38,7 @@ export type TPrepareFormRes = {
37
38
  sortPaths: string[][] | undefined;
38
39
  kind: string | undefined;
39
40
  isNamespaced: boolean;
41
+ forceViewMode?: 'OpenAPI' | 'Manual';
40
42
  formPrefills?: TFormPrefill;
41
43
  namespacesData?: string[];
42
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prorobotech/openapi-k8s-toolkit",
3
- "version": "1.4.0-alpha.6",
3
+ "version": "1.4.0-alpha.8",
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",