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

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 (56) hide show
  1. package/dist/{@code-editor-DVKOAVeb.js → @code-editor-CJtUMNgR.js} +7417 -7699
  2. package/dist/{@common-rjsf-B-AVBwcg.js → @common-rjsf-8WBKwCV7.js} +2 -2
  3. package/dist/{@framer-motion-BxQTtYmm.js → @framer-motion-C4FMADic.js} +1 -1
  4. package/dist/{@react-dates-M_eJUVeH.js → @react-dates-Bw9xFSwg.js} +20 -20
  5. package/dist/{@react-select-CywptBlV.js → @react-select-DbkfUliH.js} +1 -1
  6. package/dist/{@vendor-QI4m26H1.js → @vendor-BfPc30M8.js} +4142 -4181
  7. package/dist/Common/Constants.d.ts +0 -3
  8. package/dist/Common/Drawer/Drawer.d.ts +3 -3
  9. package/dist/Common/SegmentedBarChart/types.d.ts +1 -0
  10. package/dist/Pages/App/AppConfiguration/DeploymentTemplate/index.d.ts +1 -0
  11. package/dist/Pages/App/AppConfiguration/index.d.ts +1 -0
  12. package/dist/Pages/App/index.d.ts +1 -0
  13. package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/index.d.ts +0 -1
  14. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +0 -3
  15. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +0 -2
  16. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +2 -36
  17. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +28 -24
  18. package/dist/Pages/ResourceBrowser/service.d.ts +2 -4
  19. package/dist/Pages/index.d.ts +1 -0
  20. package/dist/Shared/Components/ConfirmationModal/types.d.ts +13 -14
  21. package/dist/Shared/Components/Security/SecurityDetailsCards/SecurityCard.d.ts +3 -0
  22. package/dist/Shared/Components/Security/SecurityDetailsCards/SecurityDetailsCards.d.ts +3 -0
  23. package/dist/Shared/Components/Security/SecurityDetailsCards/index.d.ts +2 -0
  24. package/dist/Shared/Components/Security/SecurityDetailsCards/types.d.ts +11 -0
  25. package/dist/Shared/Components/Security/SecurityModal/constants.d.ts +5 -0
  26. package/dist/Shared/Components/Security/SecurityModal/index.d.ts +1 -0
  27. package/dist/Shared/Components/Security/SecurityModal/types.d.ts +1 -0
  28. package/dist/Shared/Components/Security/constants.d.ts +2 -0
  29. package/dist/Shared/Components/Security/index.d.ts +1 -1
  30. package/dist/Shared/Components/Security/types.d.ts +18 -0
  31. package/dist/Shared/Components/Security/utils.d.ts +5 -7
  32. package/dist/Shared/Components/index.d.ts +0 -1
  33. package/dist/Shared/Hooks/UseDownload/UseDownload.d.ts +6 -2
  34. package/dist/Shared/Hooks/UseDownload/types.d.ts +0 -5
  35. package/dist/Shared/constants.d.ts +0 -1
  36. package/dist/Shared/types.d.ts +6 -2
  37. package/dist/assets/@code-editor.css +1 -1
  38. package/dist/assets/ic-shield-check.7f018238.svg +3 -0
  39. package/dist/assets/ic-shield-warning-outline.70fea3e8.svg +3 -0
  40. package/dist/index.js +540 -543
  41. package/package.json +1 -1
  42. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/constants.d.ts +0 -6
  43. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/utils.d.ts +0 -10
  44. package/dist/Shared/Components/BulkOperations/BulkOperations.component.d.ts +0 -3
  45. package/dist/Shared/Components/BulkOperations/BulkOperationsResultModal.d.ts +0 -3
  46. package/dist/Shared/Components/BulkOperations/OperationResultStore.d.ts +0 -21
  47. package/dist/Shared/Components/BulkOperations/constants.d.ts +0 -13
  48. package/dist/Shared/Components/BulkOperations/index.d.ts +0 -2
  49. package/dist/Shared/Components/BulkOperations/types.d.ts +0 -69
  50. package/dist/Shared/Components/Security/SecuritySummaryCard/SecuritySummaryCard.d.ts +0 -3
  51. package/dist/Shared/Components/Security/SecuritySummaryCard/index.d.ts +0 -1
  52. package/dist/Shared/Components/Security/SecuritySummaryCard/types.d.ts +0 -10
  53. package/dist/assets/ic-arrows-clockwise.424f0538.svg +0 -7
  54. /package/dist/Pages/{Applications/DevtronApps/Details/AppConfigurations → App/AppConfiguration}/DeploymentTemplate/GUIView/index.d.ts +0 -0
  55. /package/dist/Pages/{Applications/DevtronApps/Details/AppConfigurations → App/AppConfiguration}/DeploymentTemplate/GUIView/types.d.ts +0 -0
  56. /package/dist/Pages/{Applications/DevtronApps/Details/AppConfigurations → App/AppConfiguration}/DeploymentTemplate/GUIView/utils.d.ts +0 -0
@@ -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 {};
@@ -9,4 +9,5 @@ export interface SegmentedBarChartProps {
9
9
  countClassName?: string;
10
10
  labelClassName?: string;
11
11
  isProportional?: boolean;
12
+ swapLegendAndBar?: boolean;
12
13
  }
@@ -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,3 @@
1
+ import { SecurityCardProps } from './types';
2
+ declare const SecurityCard: ({ category, subCategory, severityCount, handleCardClick }: SecurityCardProps) => JSX.Element;
3
+ export default SecurityCard;
@@ -0,0 +1,3 @@
1
+ import { SecurityDetailsCardsProps } from './types';
2
+ declare const SecurityDetailsCards: ({ scanResult, Sidebar }: SecurityDetailsCardsProps) => JSX.Element;
3
+ export default SecurityDetailsCards;
@@ -0,0 +1,2 @@
1
+ export { default as SecurityCard } from './SecurityCard';
2
+ export { default as SecurityDetailsCards } from './SecurityDetailsCards';
@@ -0,0 +1,11 @@
1
+ import { ScanResultDTO, SecurityModalPropsType, SeveritiesDTO } from '../SecurityModal/types';
2
+ import { ScanCategories, ScanSubCategories } from '../types';
3
+ export interface SecurityCardProps {
4
+ category: ScanCategories;
5
+ subCategory: ScanSubCategories;
6
+ severityCount: Partial<Record<SeveritiesDTO, number>>;
7
+ handleCardClick: () => void;
8
+ }
9
+ export interface SecurityDetailsCardsProps extends Pick<SecurityModalPropsType, 'Sidebar'> {
10
+ scanResult: ScanResultDTO;
11
+ }
@@ -1,4 +1,9 @@
1
1
  import { SeveritiesDTO, SortOrderEnum, EmptyStateType, StatusType, SidebarPropsType, SecurityModalStateType } from './types';
2
+ export declare const DEFAULT_SECURITY_MODAL_IMAGE_STATE: {
3
+ category: "imageScan";
4
+ subCategory: "vulnerability";
5
+ detailViewData: any;
6
+ };
2
7
  export declare const getDefaultSecurityModalState: (categoriesConfig: SidebarPropsType["categoriesConfig"]) => SecurityModalStateType;
3
8
  export declare const CATEGORY_LABELS: {
4
9
  readonly IMAGE_SCAN: "Image Scan";
@@ -1,6 +1,7 @@
1
1
  export { default as SecurityModal } from './SecurityModal';
2
2
  export { getSecurityScanSeveritiesCount, getTotalVulnerabilityCount, parseGetResourceScanDetailsResponse, } from './utils';
3
3
  export type { ScanResultDTO, SidebarPropsType, SidebarDataChildType, SidebarDataType, GetResourceScanDetailsPayloadType, GetResourceScanDetailsResponseType, } from './types';
4
+ export { SeveritiesDTO } from './types';
4
5
  export { getSidebarData, getProgressingStateForStatus } from './config';
5
6
  export { CATEGORY_LABELS } from './constants';
6
7
  export { getSecurityScan } from './service';
@@ -208,6 +208,7 @@ interface SecurityModalBaseProps {
208
208
  handleModalClose: (event?: React.MouseEvent<HTMLElement>) => void;
209
209
  Sidebar?: React.FC<SidebarPropsType>;
210
210
  hidePolicy?: boolean;
211
+ defaultState?: SecurityModalStateType;
211
212
  }
212
213
  export type SecurityModalPropsType = SecurityModalBaseProps;
213
214
  export interface IndexedTextDisplayPropsType {
@@ -0,0 +1,2 @@
1
+ import { SecurityConfigType } from './types';
2
+ export declare const SECURITY_CONFIG: SecurityConfigType;
@@ -1,4 +1,4 @@
1
- export * from './SecuritySummaryCard';
2
1
  export * from './Vulnerabilities';
3
2
  export * from './SecurityModal';
4
3
  export * from './utils';
4
+ export * from './SecurityDetailsCards';
@@ -0,0 +1,18 @@
1
+ import { CATEGORIES, SUB_CATEGORIES } from './SecurityModal/types';
2
+ export type ScanCategories = (typeof CATEGORIES)[keyof typeof CATEGORIES];
3
+ export type ScanSubCategories = (typeof SUB_CATEGORIES)[keyof typeof SUB_CATEGORIES];
4
+ export type CategoriesConfig = {
5
+ imageScan: boolean;
6
+ codeScan: boolean;
7
+ kubernetesManifest: boolean;
8
+ };
9
+ interface SecurityConfigCategoryType {
10
+ label: string;
11
+ subCategories: ScanSubCategories[];
12
+ }
13
+ export interface SecurityConfigType {
14
+ imageScan?: SecurityConfigCategoryType;
15
+ codeScan?: SecurityConfigCategoryType;
16
+ kubernetesManifest?: SecurityConfigCategoryType;
17
+ }
18
+ export {};
@@ -1,8 +1,6 @@
1
- import { SeverityCount } from '../../types';
2
- import { ScanResultDTO } from './SecurityModal/types';
1
+ import { ScanResultDTO, SeveritiesDTO } from './SecurityModal';
2
+ import { CategoriesConfig, SecurityConfigType } from './types';
3
3
  export declare const getCVEUrlFromCVEName: (cveName: string) => string;
4
- export declare const getScanToolAndSeverityCount: (scanResult: ScanResultDTO) => {
5
- scanToolId: number;
6
- severityCount: SeverityCount;
7
- totalCount: number;
8
- };
4
+ export declare const getTotalSeverities: (severityCount: Partial<Record<SeveritiesDTO, number>>) => number;
5
+ export declare const getSecurityConfig: ({ imageScan, codeScan, kubernetesManifest, }: CategoriesConfig) => SecurityConfigType;
6
+ export declare const getCompiledSecurityThreats: (scanResult: ScanResultDTO) => Partial<Record<SeveritiesDTO, number>>;
@@ -49,4 +49,3 @@ export * from './DynamicDataTable';
49
49
  export * from './TagsKeyValueTable';
50
50
  export * from './FileUpload';
51
51
  export * from './AnimatedDeployButton';
52
- export * from './BulkOperations';
@@ -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
- }
@@ -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
  }