@devtron-labs/devtron-fe-common-lib 1.4.0-beta-2 → 1.4.0-beta-4

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 (48) hide show
  1. package/dist/{@code-editor-DVKOAVeb.js → @code-editor-IUFpBLKC.js} +5576 -5931
  2. package/dist/{@common-rjsf-B-AVBwcg.js → @common-rjsf-CKq5dgAr.js} +2 -2
  3. package/dist/{@framer-motion-BxQTtYmm.js → @framer-motion-CK4h5UCd.js} +1 -1
  4. package/dist/{@react-dates-M_eJUVeH.js → @react-dates-CiugJpoJ.js} +20 -20
  5. package/dist/{@react-select-CywptBlV.js → @react-select-4qT_kJ_5.js} +1 -1
  6. package/dist/@react-virtualized-sticky-tree-CyO-wztE.js +452 -0
  7. package/dist/{@vendor-QI4m26H1.js → @vendor-Begv3w6F.js} +5670 -5306
  8. package/dist/Common/CodeEditor/CodeEditor.reducer.d.ts +13 -1
  9. package/dist/Common/CodeEditor/types.d.ts +4 -2
  10. package/dist/Common/Constants.d.ts +0 -3
  11. package/dist/Common/Drawer/Drawer.d.ts +3 -3
  12. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +1 -0
  13. package/dist/Pages/App/AppConfiguration/index.d.ts +1 -0
  14. package/dist/Pages/App/index.d.ts +1 -0
  15. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/index.d.ts +0 -1
  16. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +0 -3
  17. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +0 -2
  18. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +2 -36
  19. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +28 -24
  20. package/dist/Pages/ResourceBrowser/service.d.ts +2 -4
  21. package/dist/Pages/index.d.ts +1 -0
  22. package/dist/Shared/Components/ConfirmationModal/types.d.ts +13 -14
  23. package/dist/Shared/Components/VirtualizedList/VirtualizedList.component.d.ts +2 -0
  24. package/dist/Shared/Components/VirtualizedList/VirtualizedList.constants.d.ts +2 -0
  25. package/dist/Shared/Components/VirtualizedList/VirtualizedList.types.d.ts +36 -0
  26. package/dist/Shared/Components/VirtualizedList/index.d.ts +2 -0
  27. package/dist/Shared/Components/index.d.ts +1 -1
  28. package/dist/Shared/Hooks/UseDownload/UseDownload.d.ts +6 -2
  29. package/dist/Shared/Hooks/UseDownload/types.d.ts +0 -5
  30. package/dist/Shared/Hooks/useGetResourceKindsOptions/types.d.ts +1 -0
  31. package/dist/Shared/Services/types.d.ts +4 -0
  32. package/dist/Shared/constants.d.ts +0 -1
  33. package/dist/Shared/types.d.ts +6 -2
  34. package/dist/assets/@code-editor.css +1 -1
  35. package/dist/index.js +621 -627
  36. package/package.json +6 -1
  37. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/constants.d.ts +0 -6
  38. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/utils.d.ts +0 -10
  39. package/dist/Shared/Components/BulkOperations/BulkOperations.component.d.ts +0 -3
  40. package/dist/Shared/Components/BulkOperations/BulkOperationsResultModal.d.ts +0 -3
  41. package/dist/Shared/Components/BulkOperations/OperationResultStore.d.ts +0 -21
  42. package/dist/Shared/Components/BulkOperations/constants.d.ts +0 -13
  43. package/dist/Shared/Components/BulkOperations/index.d.ts +0 -2
  44. package/dist/Shared/Components/BulkOperations/types.d.ts +0 -69
  45. package/dist/assets/ic-arrows-clockwise.424f0538.svg +0 -7
  46. /package/dist/Pages/{Applications/DevtronApps/Details/AppConfigurations → App/AppConfiguration}/DeploymentTemplate/GUIView/index.d.ts +0 -0
  47. /package/dist/Pages/{Applications/DevtronApps/Details/AppConfigurations → App/AppConfiguration}/DeploymentTemplate/GUIView/types.d.ts +0 -0
  48. /package/dist/Pages/{Applications/DevtronApps/Details/AppConfigurations → App/AppConfiguration}/DeploymentTemplate/GUIView/utils.d.ts +0 -0
@@ -5,24 +5,35 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
5
5
  diffMode: boolean;
6
6
  theme: CodeEditorThemesKeys;
7
7
  code: string;
8
+ defaultCode: string;
8
9
  noParsing: boolean;
9
10
  } | {
10
11
  diffMode: any;
11
12
  mode: MODES;
12
13
  theme: CodeEditorThemesKeys;
13
14
  code: string;
15
+ defaultCode: string;
14
16
  noParsing: boolean;
15
17
  } | {
16
18
  theme: any;
17
19
  mode: MODES;
18
20
  diffMode: boolean;
19
21
  code: string;
22
+ defaultCode: string;
20
23
  noParsing: boolean;
21
24
  } | {
22
25
  code: any;
23
26
  mode: MODES;
24
27
  diffMode: boolean;
25
28
  theme: CodeEditorThemesKeys;
29
+ defaultCode: string;
30
+ noParsing: boolean;
31
+ } | {
32
+ defaultCode: any;
33
+ mode: MODES;
34
+ diffMode: boolean;
35
+ theme: CodeEditorThemesKeys;
36
+ code: string;
26
37
  noParsing: boolean;
27
38
  } | {
28
39
  height: any;
@@ -30,7 +41,8 @@ export declare const CodeEditorReducer: (state: CodeEditorState, action: Action)
30
41
  diffMode: boolean;
31
42
  theme: CodeEditorThemesKeys;
32
43
  code: string;
44
+ defaultCode: string;
33
45
  noParsing: boolean;
34
46
  };
35
47
  export declare const parseValueToCode: (value: string, mode: string, tabSize: number) => string;
36
- export declare const initialState: ({ mode, theme, value, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
48
+ export declare const initialState: ({ mode, theme, value, defaultValue, diffView, noParsing, tabSize, }: CodeEditorInitialValueType) => CodeEditorState;
@@ -8,7 +8,7 @@ interface CodeEditorBaseInterface {
8
8
  value?: string;
9
9
  lineDecorationsWidth?: number;
10
10
  responseType?: string;
11
- onChange?: (string: any) => void;
11
+ onChange?: (value: string, defaultValue: string) => void;
12
12
  onBlur?: () => void;
13
13
  onFocus?: () => void;
14
14
  children?: any;
@@ -63,7 +63,7 @@ export interface CodeEditorHeaderComposition {
63
63
  ValidationError?: React.FC<any>;
64
64
  Clipboard?: React.FC<any>;
65
65
  }
66
- export type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setHeight';
66
+ export type ActionTypes = 'changeLanguage' | 'setDiff' | 'setTheme' | 'setCode' | 'setDefaultCode' | 'setHeight';
67
67
  export interface Action {
68
68
  type: ActionTypes;
69
69
  value: any;
@@ -80,6 +80,7 @@ export interface CodeEditorInitialValueType {
80
80
  diffView: boolean;
81
81
  theme?: string;
82
82
  value: string;
83
+ defaultValue: string;
83
84
  noParsing?: boolean;
84
85
  tabSize: number;
85
86
  }
@@ -88,6 +89,7 @@ export interface CodeEditorState {
88
89
  diffMode: boolean;
89
90
  theme: CodeEditorThemesKeys;
90
91
  code: string;
92
+ defaultCode: string;
91
93
  noParsing: boolean;
92
94
  }
93
95
  export declare enum CodeEditorActionTypes {
@@ -107,9 +107,6 @@ export declare const ROUTES: {
107
107
  FILE_UPLOAD: string;
108
108
  PLUGIN_GLOBAL_VARIABLES: string;
109
109
  CONFIG_COMPARE_SECRET: string;
110
- CD_TRIGGER_POST: string;
111
- DELETE_RESOURCE: string;
112
- NODE_CAPACITY: string;
113
110
  };
114
111
  export declare enum KEY_VALUE {
115
112
  KEY = "key",
@@ -1,4 +1,4 @@
1
- export interface DrawerProps {
1
+ interface drawerInterface {
2
2
  position: 'left' | 'right' | 'bottom' | 'top';
3
3
  children?: any;
4
4
  backdrop?: boolean;
@@ -9,6 +9,6 @@ export interface DrawerProps {
9
9
  height?: string;
10
10
  parentClassName?: string;
11
11
  onEscape?: (e?: any) => void;
12
- disableTransition?: boolean;
13
12
  }
14
- export declare const Drawer: ({ children, position, height, width, minWidth, maxWidth, parentClassName, onEscape, onClose, disableTransition, }: DrawerProps) => JSX.Element;
13
+ export declare const Drawer: ({ children, position, height, width, minWidth, maxWidth, parentClassName, onEscape, onClose, }: drawerInterface) => JSX.Element;
14
+ export {};
@@ -0,0 +1 @@
1
+ export * from './GUIView';
@@ -0,0 +1 @@
1
+ export * from './DeploymentTemplate';
@@ -0,0 +1 @@
1
+ export * from './AppConfiguration';
@@ -2,4 +2,3 @@ export * from './types';
2
2
  export * from './service';
3
3
  export { default as DTApplicationMetricsFormField } from './DTApplicationMetricsFormField';
4
4
  export { GET_RESOLVED_DEPLOYMENT_TEMPLATE_EMPTY_RESPONSE } from './constants';
5
- export * from './GUIView';
@@ -1,5 +1,2 @@
1
1
  export * from './types';
2
2
  export * from './services';
3
- export { getAPIOptionsWithTriggerTimeout } from './utils';
4
- export { STAGE_MAP } from './constants';
5
- export { isImageActiveOnEnvironment } from './utils';
@@ -1,9 +1,7 @@
1
1
  import { MutableRefObject } from 'react';
2
2
  import { UploadFileDTO, UploadFileProps } from '../../../../../Shared/types';
3
- import { TriggerCDNodeServiceProps } from './types';
4
3
  export declare const uploadCDPipelineFile: ({ file, appId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: UploadFileProps & {
5
4
  appId: number;
6
5
  envId: number;
7
6
  abortControllerRef?: MutableRefObject<AbortController>;
8
7
  }) => Promise<UploadFileDTO>;
9
- export declare const triggerCDNode: ({ pipelineId, ciArtifactId, appId, stageType, deploymentWithConfig, wfrId, runtimeParamsPayload, abortControllerRef, }: TriggerCDNodeServiceProps) => Promise<import('../../../../../Common/Types').ResponseType<any>>;
@@ -1,8 +1,7 @@
1
1
  import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
2
- import { APIOptions, DeploymentAppTypes, DeploymentNodeType } from '../../../../../Common/Types';
3
- import { STAGE_MAP } from '../../../../index';
2
+ import { DeploymentAppTypes } from '../../../../../Common/Types';
4
3
  import { DeploymentStrategy } from '../../../../../Shared/Components';
5
- import { EnvListMinDTO, RuntimeParamsTriggerPayloadType } from '../../../../../Shared/types';
4
+ import { EnvListMinDTO } from '../../../../../Shared/types';
6
5
  interface ConfigSecretType {
7
6
  label: string;
8
7
  value: string;
@@ -78,37 +77,4 @@ export interface PipelineFormType extends Partial<FormType>, Partial<CDFormType>
78
77
  isDigestEnforcedForPipeline?: boolean;
79
78
  isDigestEnforcedForEnv?: boolean;
80
79
  }
81
- export interface OptionsBase {
82
- name: string;
83
- isInitContainer?: boolean;
84
- isEphemeralContainer?: boolean;
85
- isExternal?: boolean;
86
- }
87
- export interface SelectedResourceType {
88
- clusterId: number;
89
- group: string;
90
- version: string;
91
- kind: string;
92
- namespace: string;
93
- name: string;
94
- containers: OptionsBase[];
95
- selectedContainer?: string;
96
- clusterName?: string;
97
- }
98
- export interface TriggerCDNodeServiceProps extends Pick<APIOptions, 'abortControllerRef'> {
99
- pipelineId: number;
100
- ciArtifactId: number;
101
- appId: number;
102
- stageType: DeploymentNodeType;
103
- deploymentWithConfig?: string;
104
- wfrId?: number;
105
- /**
106
- * Would be available only case of PRE/POST CD
107
- */
108
- runtimeParamsPayload?: RuntimeParamsTriggerPayloadType;
109
- }
110
- export interface TriggerCDPipelinePayloadType extends Pick<TriggerCDNodeServiceProps, 'pipelineId' | 'appId' | 'ciArtifactId' | 'runtimeParamsPayload' | 'deploymentWithConfig'> {
111
- cdWorkflowType: (typeof STAGE_MAP)[keyof typeof STAGE_MAP];
112
- wfrIdForDeploymentWithSpecificTrigger?: number;
113
- }
114
80
  export {};
@@ -49,6 +49,34 @@ export interface BulkSelectionActionWidgetProps {
49
49
  parentRef: RefObject<HTMLDivElement>;
50
50
  showBulkRestartOption: boolean;
51
51
  }
52
+ interface BulkOperationAdditionalKeysType {
53
+ label: string;
54
+ value: string;
55
+ isSortable: boolean;
56
+ /**
57
+ * width to be given in gridTemplateColumns
58
+ */
59
+ width: string;
60
+ }
61
+ export interface BulkOperation {
62
+ name: string;
63
+ /**
64
+ * Would these keys beside the name
65
+ */
66
+ additionalKeys?: BulkOperationAdditionalKeysType[];
67
+ operation: (signal: AbortSignal, data?: unknown) => Promise<void>;
68
+ }
69
+ export type BulkOperationModalProps = {
70
+ operationType: 'restart' | 'delete' | 'creation';
71
+ clusterName: string;
72
+ operations: NonNullable<BulkOperation[]>;
73
+ handleModalClose: () => void;
74
+ resourceKind: string;
75
+ handleReloadDataAfterBulkOperation?: () => void;
76
+ hideResultsDrawer?: boolean;
77
+ shouldAllowForceOperation?: true;
78
+ };
79
+ export type BulkOperationModalState = BulkOperationModalProps['operationType'] | 'closed';
52
80
  export interface CreateResourceRequestBodyType {
53
81
  appId: string;
54
82
  clusterId: number;
@@ -79,28 +107,4 @@ export interface CreateResourceDTO {
79
107
  isUpdate: boolean;
80
108
  error: string;
81
109
  }
82
- export interface ResourceListPayloadType {
83
- clusterId: number;
84
- k8sRequest: {
85
- resourceIdentifier: {
86
- groupVersionKind: GVKType;
87
- namespace?: string;
88
- name?: string;
89
- };
90
- patch?: string;
91
- forceDelete?: boolean;
92
- };
93
- }
94
- export interface ResourceType {
95
- kind: string;
96
- name: string;
97
- isUpdate: boolean;
98
- error: string;
99
- }
100
- export interface NodeActionRequest {
101
- clusterId?: number;
102
- name: string;
103
- version: string;
104
- kind: string;
105
- }
106
110
  export {};
@@ -1,6 +1,4 @@
1
- import { APIOptions, ResponseType } from '../../Common/Types';
2
- import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType, NodeActionRequest, ResourceListPayloadType, ResourceType } from './ResourceBrowser.Types';
1
+ import { ResponseType } from '../../Common/Types';
2
+ import { CreateResourceDTO, CreateResourcePayload, K8sResourceDetailType, K8sResourceListPayloadType } from './ResourceBrowser.Types';
3
3
  export declare const getK8sResourceList: (resourceListPayload: K8sResourceListPayloadType, signal?: AbortSignal) => Promise<ResponseType<K8sResourceDetailType>>;
4
4
  export declare const createNewResource: (resourceListPayload: CreateResourcePayload) => Promise<ResponseType<CreateResourceDTO[]>>;
5
- export declare const deleteResource: (resourceListPayload: ResourceListPayloadType, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType<ResourceType[]>>;
6
- export declare const deleteNodeCapacity: (requestPayload: NodeActionRequest, abortControllerRef?: APIOptions["abortControllerRef"]) => Promise<ResponseType>;
@@ -1,3 +1,4 @@
1
1
  export * from './GlobalConfigurations';
2
2
  export * from './ResourceBrowser';
3
3
  export * from './Applications';
4
+ export * from './App';
@@ -6,22 +6,22 @@ export declare enum ConfirmationModalVariantType {
6
6
  warning = "warning",
7
7
  custom = "custom"
8
8
  }
9
- type CommonButtonProps<isConfig extends boolean, isCustomVariant extends boolean> = Pick<ButtonProps, 'text'> & Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'>> & (isConfig extends false ? Pick<ButtonProps, 'disabled'> & {
10
- onClick: (...args: Partial<Parameters<ButtonProps['onClick']>>) => void;
11
- } : {}) & (isCustomVariant extends true ? Pick<ButtonProps, 'style'> : {});
9
+ interface CommonButtonProps extends Pick<ButtonProps, 'text'>, Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'>> {
10
+ onClick: (e?: SyntheticEvent) => void;
11
+ }
12
12
  interface CustomInputConfig {
13
13
  identifier: string;
14
14
  confirmationKeyword: string;
15
15
  }
16
- type ButtonConfig<isConfig extends boolean, isCustomVariant extends boolean> = {
17
- primaryButtonConfig: Pick<ButtonProps, 'isLoading'> & CommonButtonProps<isConfig, isCustomVariant>;
18
- secondaryButtonConfig: CommonButtonProps<isConfig, isCustomVariant>;
16
+ type ButtonConfig<PrimaryButtonConfig, SecondaryButtonConfig> = {
17
+ primaryButtonConfig: PrimaryButtonConfig & CommonButtonProps;
18
+ secondaryButtonConfig: SecondaryButtonConfig & CommonButtonProps;
19
19
  } | {
20
- primaryButtonConfig: Pick<ButtonProps, 'isLoading'> & CommonButtonProps<isConfig, isCustomVariant>;
20
+ primaryButtonConfig: PrimaryButtonConfig & CommonButtonProps;
21
21
  secondaryButtonConfig?: never;
22
22
  } | {
23
23
  primaryButtonConfig?: never;
24
- secondaryButtonConfig?: CommonButtonProps<isConfig, isCustomVariant>;
24
+ secondaryButtonConfig?: SecondaryButtonConfig & CommonButtonProps;
25
25
  };
26
26
  type CustomInputConfigOrChildrenType = {
27
27
  customInputConfig: CustomInputConfig;
@@ -33,21 +33,20 @@ type CustomInputConfigOrChildrenType = {
33
33
  customInputConfig?: never;
34
34
  children?: never;
35
35
  };
36
- type ButtonConfigAndVariantType<isConfig extends boolean> = {
36
+ type ButtonConfigAndVariantType = {
37
37
  variant: Exclude<ConfirmationModalVariantType, ConfirmationModalVariantType.custom>;
38
38
  Icon?: never;
39
- buttonConfig: ButtonConfig<isConfig, false>;
39
+ buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled'>, Pick<ButtonProps, 'disabled'>>;
40
40
  } | {
41
41
  variant: ConfirmationModalVariantType.custom;
42
42
  Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
43
- buttonConfig: ButtonConfig<isConfig, true>;
43
+ buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled' | 'style'>, Pick<ButtonProps, 'disabled' | 'style'>>;
44
44
  };
45
- export type ConfirmationModalProps<isConfig extends boolean = false> = {
45
+ export type ConfirmationModalProps = {
46
46
  title: string;
47
47
  subtitle: ReactNode;
48
- } & ButtonConfigAndVariantType<isConfig> & CustomInputConfigOrChildrenType & (isConfig extends false ? {
49
48
  handleClose: (e?: SyntheticEvent) => void;
50
49
  showConfirmationModal: boolean;
51
- } : {});
50
+ } & ButtonConfigAndVariantType & CustomInputConfigOrChildrenType;
52
51
  export type ConfirmationModalBodyProps = Omit<ConfirmationModalProps, 'showConfirmationModal'>;
53
52
  export {};
@@ -0,0 +1,2 @@
1
+ import { VirtualizedListProps } from './VirtualizedList.types';
2
+ export declare const VirtualizedList: <ListKeys extends string | number, ExtendedType extends object>({ items, renderItem, ...restProps }: VirtualizedListProps<ListKeys, ExtendedType>) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const VIRTUALIZED_LIST_ROOT_ID = "virtualized-list-root";
2
+ export declare const VIRTUALIZED_LIST_ROOT_Z_INDEX = 2;
@@ -0,0 +1,36 @@
1
+ import { AutoSizedStickyTreeProps, StickyTreeRowRenderer } from 'react-virtualized-sticky-tree';
2
+ /**
3
+ * Represents a virtualized list item.
4
+ *
5
+ * @template ListKeys - The type of the keys used to identify list items (e.g., `string` or `number`).
6
+ * @template ExtendedType - An optional type to extend the base item structure with additional fields.
7
+ */
8
+ export type VirtualizedListItem<ListKeys, ExtendedType = {}> = ExtendedType & {
9
+ /** The unique identifier of the item. */
10
+ id: string | number;
11
+ /** The height of the item. (in pixels) */
12
+ height: number;
13
+ /** The depth level of the item in the hierarchical structure. */
14
+ depth: number;
15
+ /** An optional array of child item keys. */
16
+ children?: ListKeys[];
17
+ };
18
+ /**
19
+ * Props for the VirtualizedList component, which supports a virtualized tree-like structure.
20
+ *
21
+ * @template ListKeys - The type of the keys used to identify list items (e.g., `string` or `number`).
22
+ * @template ExtendedType - An optional type to extend the base item structure with additional fields.
23
+ */
24
+ export interface VirtualizedListProps<ListKeys extends string | number, ExtendedType extends object = {}> extends Omit<AutoSizedStickyTreeProps<VirtualizedListItem<ListKeys, ExtendedType>>, 'root' | 'renderRoot' | 'rowRenderer' | 'getChildren'> {
25
+ /**
26
+ * A dictionary of items keyed by their unique identifiers.
27
+ */
28
+ items: Record<ListKeys, VirtualizedListItem<ListKeys, ExtendedType>>;
29
+ /**
30
+ * A function that renders an individual list item.
31
+ *
32
+ * @param params - An object containing the node and nodeInfo to render.
33
+ * @returns A React node representing the rendered item.
34
+ */
35
+ renderItem: (params: Pick<Parameters<StickyTreeRowRenderer<VirtualizedListItem<ListKeys, ExtendedType>>>['0'], 'node' | 'nodeInfo'>) => React.ReactNode;
36
+ }
@@ -0,0 +1,2 @@
1
+ export * from './VirtualizedList.component';
2
+ export * from './VirtualizedList.types';
@@ -49,4 +49,4 @@ export * from './DynamicDataTable';
49
49
  export * from './TagsKeyValueTable';
50
50
  export * from './FileUpload';
51
51
  export * from './AnimatedDeployButton';
52
- export * from './BulkOperations';
52
+ export * from './VirtualizedList';
@@ -1,3 +1,7 @@
1
- import { UseDownloadReturnType } from './types';
2
- declare const useDownload: () => UseDownloadReturnType;
1
+ import { ServerErrors } from '../../../Common/ServerError';
2
+ import { HandleDownloadProps } from './types';
3
+ declare const useDownload: () => {
4
+ handleDownload: ({ downloadUrl, showFilePreparingToast, fileName, showSuccessfulToast, downloadSuccessToastContent, }: HandleDownloadProps) => Promise<Error | ServerErrors>;
5
+ isDownloading: boolean;
6
+ };
3
7
  export default useDownload;
@@ -1,4 +1,3 @@
1
- import { ServerErrors } from '../../../Common/ServerError';
2
1
  export interface HandleDownloadProps {
3
2
  downloadUrl: string;
4
3
  showFilePreparingToast?: boolean;
@@ -6,7 +5,3 @@ export interface HandleDownloadProps {
6
5
  showSuccessfulToast?: boolean;
7
6
  downloadSuccessToastContent?: string;
8
7
  }
9
- export interface UseDownloadReturnType {
10
- handleDownload: (props: HandleDownloadProps) => Promise<Error | ServerErrors>;
11
- isDownloading: boolean;
12
- }
@@ -17,6 +17,7 @@ export interface ClusterDTO {
17
17
  id: number;
18
18
  cluster_name: string;
19
19
  isVirtualCluster: boolean;
20
+ isProd: boolean;
20
21
  }
21
22
  export interface UseGetResourceKindsOptionsProps {
22
23
  resourcesToFetch: Extract<ResourceKindType, ResourceKindType.devtronApplication | ResourceKindType.project | ResourceKindType.cluster | ResourceKindType.environment>[];
@@ -7,6 +7,10 @@ export interface ClusterType {
7
7
  * If true, denotes virtual cluster
8
8
  */
9
9
  isVirtual: boolean;
10
+ /**
11
+ * If true, denotes prod labelled cluster
12
+ */
13
+ isProd: boolean;
10
14
  }
11
15
  /**
12
16
  * T => Type of query params
@@ -427,4 +427,3 @@ export declare const BASE_CONFIGURATION_ENV_ID = -1;
427
427
  export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
428
428
  export declare const SKIP_LABEL_KEY_VALIDATION_PREFIX = "devtron.ai/";
429
429
  export declare const UNSAVED_CHANGES_PROMPT_MESSAGE = "You have unsaved changes. Are you sure you want to leave?";
430
- export declare const DEFAULT_ROUTE_PROMPT_MESSAGE = "Please don't wander off! Reloading or going back might disrupt the ongoing operation.";
@@ -1,5 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { APIOptions, ApprovalConfigDataType } from '../Common/Types';
2
+ import { ApprovalConfigDataType } from '../Common/Types';
3
3
  import { OptionType, CommonNodeAttr, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
4
4
  import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
5
5
  export declare enum EnvType {
@@ -220,6 +220,10 @@ export declare enum Severity {
220
220
  LOW = "low",
221
221
  UNKNOWN = "unknown"
222
222
  }
223
+ export declare enum ImagePromotionTabs {
224
+ REQUEST = "request",
225
+ PENDING = "pending"
226
+ }
223
227
  export interface ArtifactPromotionMetadata {
224
228
  isConfigured: boolean;
225
229
  isApprovalPendingForPromotion: boolean;
@@ -772,7 +776,7 @@ export interface PolicyConsequencesDTO {
772
776
  cd: PipelineStageBlockInfo;
773
777
  ci: PipelineStageBlockInfo;
774
778
  }
775
- export interface GetPolicyConsequencesProps extends Pick<APIOptions, 'abortControllerRef'> {
779
+ export interface GetPolicyConsequencesProps {
776
780
  appId: number;
777
781
  envId: number;
778
782
  }