@devtron-labs/devtron-fe-common-lib 0.1.12 → 0.1.13-beta-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 (45) hide show
  1. package/dist/Common/Constants.d.ts +2 -0
  2. package/dist/Shared/Components/CICDHistory/Artifacts.d.ts +1 -1
  3. package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDiffView.d.ts +1 -1
  4. package/dist/Shared/Components/CICDHistory/service.d.ts +0 -1
  5. package/dist/Shared/Components/CICDHistory/types.d.ts +4 -2
  6. package/dist/Shared/Components/CollapsibleList/CollapsibleList.component.d.ts +3 -0
  7. package/dist/Shared/Components/CollapsibleList/CollapsibleList.types.d.ts +96 -0
  8. package/dist/Shared/Components/CollapsibleList/index.d.ts +2 -0
  9. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +3 -0
  10. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +3 -0
  11. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +3 -0
  12. package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +3 -0
  13. package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +2 -0
  14. package/dist/Shared/Components/DeploymentConfigDiff/types.d.ts +63 -0
  15. package/dist/Shared/Components/KeyValueTable/KeyValueTable.component.d.ts +1 -1
  16. package/dist/Shared/Components/KeyValueTable/KeyValueTable.types.d.ts +23 -1
  17. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  18. package/dist/Shared/Components/SelectPicker/type.d.ts +10 -0
  19. package/dist/Shared/Components/SelectPicker/utils.d.ts +1 -1
  20. package/dist/Shared/Components/index.d.ts +2 -0
  21. package/dist/Shared/Helpers.d.ts +3 -0
  22. package/dist/Shared/Hooks/UseDownload/UseDownload.d.ts +8 -0
  23. package/dist/Shared/Hooks/UseDownload/index.d.ts +2 -0
  24. package/dist/Shared/Hooks/UseDownload/service.d.ts +1 -0
  25. package/dist/Shared/Hooks/UseDownload/types.d.ts +7 -0
  26. package/dist/Shared/Hooks/index.d.ts +1 -0
  27. package/dist/assets/index.css +1 -1
  28. package/dist/{cssMode-54250664.js → cssMode-a5177f7a.js} +1 -1
  29. package/dist/{freemarker2-fd9e5987.js → freemarker2-d25ab52e.js} +1 -1
  30. package/dist/{handlebars-df984a80.js → handlebars-c4247c35.js} +1 -1
  31. package/dist/{html-1efc890e.js → html-a5950efe.js} +1 -1
  32. package/dist/{htmlMode-f997dc3a.js → htmlMode-f36d1668.js} +1 -1
  33. package/dist/{index-eddeddd0.js → index-efbed7b6.js} +25375 -24988
  34. package/dist/index.js +414 -409
  35. package/dist/{javascript-6fe12319.js → javascript-abcb2f2d.js} +1 -1
  36. package/dist/{jsonMode-b24c48c5.js → jsonMode-6c88ce67.js} +1 -1
  37. package/dist/{liquid-a978f64f.js → liquid-c7ddeb14.js} +1 -1
  38. package/dist/{mdx-530d8d00.js → mdx-2e390329.js} +1 -1
  39. package/dist/{python-c532f131.js → python-afcbaa47.js} +1 -1
  40. package/dist/{razor-36289beb.js → razor-118ced08.js} +1 -1
  41. package/dist/{tsMode-2db8a392.js → tsMode-70909544.js} +1 -1
  42. package/dist/{typescript-3e03a2ee.js → typescript-4cc6892f.js} +1 -1
  43. package/dist/{xml-19801996.js → xml-84fae98c.js} +1 -1
  44. package/dist/{yaml-7fab141f.js → yaml-d6365512.js} +1 -1
  45. package/package.json +1 -1
@@ -229,6 +229,8 @@ export declare enum ReactSelectInputAction {
229
229
  export declare const ZERO_TIME_STRING = "0001-01-01T00:00:00Z";
230
230
  export declare const EXCLUDED_FALSY_VALUES: readonly [any, any, "", number];
231
231
  export declare const API_STATUS_CODES: {
232
+ OK: number;
233
+ NO_CONTENT: number;
232
234
  BAD_REQUEST: number;
233
235
  UNAUTHORIZED: number;
234
236
  PERMISSION_DENIED: number;
@@ -1,5 +1,5 @@
1
1
  import { ArtifactType, CIListItemType } from './types';
2
2
 
3
3
  export declare const CIListItem: ({ type, userApprovalMetadata, triggeredBy, children, ciPipelineId, artifactId, imageComment, imageReleaseTags, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, appliedFilters, isSuperAdmin, promotionApprovalMetadata, appliedFiltersTimestamp, selectedEnvironmentName, renderCIListHeader, }: CIListItemType) => JSX.Element;
4
- declare const Artifacts: ({ status, artifact, blobStorageEnabled, isArtifactUploaded, getArtifactPromise, ciPipelineId, artifactId, isJobView, isJobCI, imageComment, imageReleaseTags, type, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, jobCIClass, renderCIListHeader, }: ArtifactType) => JSX.Element;
4
+ declare const Artifacts: ({ status, artifact, blobStorageEnabled, isArtifactUploaded, downloadArtifactUrl, ciPipelineId, artifactId, isJobView, isJobCI, imageComment, imageReleaseTags, type, appReleaseTagNames, tagsEditable, hideImageTaggingHardDelete, jobCIClass, renderCIListHeader, }: ArtifactType) => JSX.Element;
5
5
  export default Artifacts;
@@ -1,4 +1,4 @@
1
1
  import { DeploymentTemplateHistoryType } from '../types';
2
2
 
3
- declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, }: DeploymentTemplateHistoryType) => JSX.Element;
3
+ declare const DeploymentHistoryDiffView: ({ currentConfiguration, baseTemplateConfiguration, previousConfigAvailable, isUnpublished, isDeleteDraft, rootClassName, comparisonBodyClassName, sortOrder, }: DeploymentTemplateHistoryType) => JSX.Element;
4
4
  export default DeploymentHistoryDiffView;
@@ -23,6 +23,5 @@ export declare const preparePipelineConfigData: (rawData: any) => Record<string,
23
23
  export declare const prepareConfigMapAndSecretData: (rawData: any, type: string, historyData: DeploymentHistoryDetail, skipDecode?: boolean) => Record<string, DeploymentHistorySingleValue>;
24
24
  export declare const prepareHistoryData: (rawData: any, historyComponent: string, skipDecode?: boolean) => DeploymentHistoryDetail;
25
25
  export declare const getDeploymentDiffSelector: (pipelineId: string, historyComponent: any, baseConfigurationId: any, historyComponentName: any) => Promise<HistoryDiffSelectorRes>;
26
- export declare function getCDBuildReport(appId: any, envId: any, pipelineId: any, workflowId: any): Promise<ResponseType<any>>;
27
26
  export declare const getTriggerHistory: ({ appId, envId, pagination, releaseId, showCurrentReleaseDeployments, }: TriggerHistoryParamsType) => Promise<Pick<DeploymentHistoryResult, 'result'>>;
28
27
  export declare const getModuleConfigured: (moduleName: string) => Promise<ModuleConfigResponse>;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'react';
2
- import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps } from '../../../Common';
2
+ import { OptionType, UserApprovalMetadataType, ReleaseTag, ImageComment, PromotionApprovalMetadataType, FilterConditionsListType, DeploymentAppTypes, ResponseType, PaginationProps, SortingOrder } from '../../../Common';
3
3
  import { DeploymentStageType } from '../../constants';
4
4
  import { AggregationKeys, GitTriggers, Node, NodeType, ResourceKindType, ResourceVersionType } from '../../types';
5
5
 
@@ -368,6 +368,8 @@ export interface DeploymentTemplateHistoryType {
368
368
  isUnpublished?: boolean;
369
369
  isDeleteDraft?: boolean;
370
370
  rootClassName?: string;
371
+ comparisonBodyClassName?: string;
372
+ sortOrder?: SortingOrder;
371
373
  }
372
374
  export interface DeploymentHistoryDetailRes extends ResponseType {
373
375
  result?: DeploymentHistoryDetail;
@@ -469,7 +471,7 @@ export interface ArtifactType {
469
471
  artifact: string;
470
472
  blobStorageEnabled: boolean;
471
473
  isArtifactUploaded?: boolean;
472
- getArtifactPromise?: () => Promise<any>;
474
+ downloadArtifactUrl?: string;
473
475
  isJobView?: boolean;
474
476
  isJobCI?: boolean;
475
477
  type: HistoryComponentType;
@@ -0,0 +1,3 @@
1
+ import { CollapsibleListProps } from './CollapsibleList.types';
2
+
3
+ export declare const CollapsibleList: ({ config, onCollapseBtnClick }: CollapsibleListProps) => JSX.Element;
@@ -0,0 +1,96 @@
1
+ import { default as React } from 'react';
2
+ import { TippyProps } from '@tippyjs/react';
3
+
4
+ export interface CollapsibleListItem {
5
+ /**
6
+ * The title of the list item.
7
+ */
8
+ title: string;
9
+ /**
10
+ * The subtitle of the list item.
11
+ */
12
+ subtitle?: string;
13
+ /**
14
+ * Configuration for the icon.
15
+ */
16
+ iconConfig?: {
17
+ /**
18
+ * A React component representing an icon to be displayed with the list item.
19
+ */
20
+ Icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
21
+ /**
22
+ * Properties for the icon component.
23
+ */
24
+ props?: React.SVGProps<SVGSVGElement>;
25
+ /**
26
+ * Properties for the tooltip component of the icon.
27
+ */
28
+ tooltipProps?: TippyProps;
29
+ };
30
+ /**
31
+ * The URL of the nav link.
32
+ */
33
+ href?: string;
34
+ /**
35
+ * The callback function to handle click events on the nav link.
36
+ */
37
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
38
+ }
39
+ export interface CollapsibleListConfig {
40
+ /**
41
+ * The unique identifier for the collapsible list.
42
+ */
43
+ id: string;
44
+ /**
45
+ * The header text for the collapsible list.
46
+ */
47
+ header: string;
48
+ /**
49
+ * Configuration for the header icon.
50
+ */
51
+ headerIconConfig?: {
52
+ /**
53
+ * A React component representing an icon button to be displayed with the header.
54
+ */
55
+ Icon: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
56
+ /**
57
+ * Properties for the header icon component.
58
+ */
59
+ props?: React.SVGProps<SVGSVGElement>;
60
+ /**
61
+ * Properties for the header icon button component.
62
+ */
63
+ btnProps?: React.ButtonHTMLAttributes<HTMLButtonElement>;
64
+ /**
65
+ * Properties for the tooltip component of the icon.
66
+ */
67
+ tooltipProps?: TippyProps;
68
+ };
69
+ /**
70
+ * Text to display when there are no items in the list.
71
+ * @default 'No items found.'
72
+ */
73
+ noItemsText?: string;
74
+ /**
75
+ * An array of items to be displayed in the collapsible list.
76
+ */
77
+ items: CollapsibleListItem[];
78
+ /**
79
+ * Boolean indicating whether the list is expanded or not.
80
+ */
81
+ isExpanded?: boolean;
82
+ }
83
+ export interface CollapsibleListProps {
84
+ /**
85
+ * An array of collapsible list configurations.
86
+ */
87
+ config: CollapsibleListConfig[];
88
+ /**
89
+ * Function to handle the collapse button click event.
90
+ *
91
+ * @param id - The unique identifier for the item to collapse.
92
+ * @param e - The mouse event triggered by the button click.
93
+ *
94
+ */
95
+ onCollapseBtnClick?: (id: string, e: React.MouseEvent<HTMLButtonElement>) => void;
96
+ }
@@ -0,0 +1,2 @@
1
+ export * from './CollapsibleList.component';
2
+ export * from './CollapsibleList.types';
@@ -0,0 +1,3 @@
1
+ import { DeploymentConfigDiffProps } from './types';
2
+
3
+ export declare const DeploymentConfigDiff: ({ isLoading, configList, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, ...resProps }: DeploymentConfigDiffProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { DeploymentConfigDiffAccordionProps } from './types';
2
+
3
+ export declare const DeploymentConfigDiffAccordion: import('react').ForwardRefExoticComponent<DeploymentConfigDiffAccordionProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import { DeploymentConfigDiffMainProps } from './types';
2
+
3
+ export declare const DeploymentConfigDiffMain: ({ isLoading, headerText, configList, scrollIntoViewId, selectorsConfig, sortOrder, onSortBtnClick, }: DeploymentConfigDiffMainProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { DeploymentConfigDiffNavigationProps } from './types';
2
+
3
+ export declare const DeploymentConfigDiffNavigation: ({ isLoading, collapsibleNavList, navList, goBackURL, navHeading, navHelpText, }: DeploymentConfigDiffNavigationProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './DeploymentConfigDiff.component';
2
+ export * from './types';
@@ -0,0 +1,63 @@
1
+ import { SortingOrder } from '../../../Common/Constants';
2
+ import { DeploymentHistoryDetail } from '../CICDHistory';
3
+ import { CollapsibleListConfig, CollapsibleListItem } from '../CollapsibleList';
4
+ import { SelectPickerProps } from '../SelectPicker';
5
+
6
+ export interface DeploymentConfigType {
7
+ list: DeploymentHistoryDetail;
8
+ heading: React.ReactNode;
9
+ }
10
+ export interface DeploymentConfigListItem {
11
+ id: string;
12
+ title: string;
13
+ primaryConfig: DeploymentConfigType;
14
+ secondaryConfig: DeploymentConfigType;
15
+ hasDiff?: boolean;
16
+ isDeploymentTemplate?: boolean;
17
+ }
18
+ export type DeploymentConfigDiffSelectPickerProps = {
19
+ type: 'string';
20
+ id: string;
21
+ text: string | React.ReactNode;
22
+ selectPickerProps?: never;
23
+ } | {
24
+ type: 'selectPicker';
25
+ id: string;
26
+ text?: never;
27
+ selectPickerProps: SelectPickerProps;
28
+ };
29
+ export interface DeploymentConfigDiffNavigationItem extends Pick<CollapsibleListItem, 'href' | 'title' | 'onClick'> {
30
+ hasDiff?: boolean;
31
+ }
32
+ export interface DeploymentConfigDiffNavigationCollapsibleItem extends Pick<CollapsibleListConfig, 'id' | 'header' | 'noItemsText'> {
33
+ items: DeploymentConfigDiffNavigationItem[];
34
+ }
35
+ export interface DeploymentConfigDiffProps {
36
+ isLoading?: boolean;
37
+ configList: DeploymentConfigListItem[];
38
+ headerText?: string;
39
+ scrollIntoViewId?: string;
40
+ selectorsConfig: {
41
+ primaryConfig: DeploymentConfigDiffSelectPickerProps[];
42
+ secondaryConfig: DeploymentConfigDiffSelectPickerProps[];
43
+ };
44
+ sortOrder?: SortingOrder;
45
+ onSortBtnClick?: () => void;
46
+ navList: DeploymentConfigDiffNavigationItem[];
47
+ collapsibleNavList: DeploymentConfigDiffNavigationCollapsibleItem[];
48
+ goBackURL?: string;
49
+ navHeading: string;
50
+ navHelpText?: string;
51
+ }
52
+ export interface DeploymentConfigDiffNavigationProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'navList' | 'collapsibleNavList' | 'goBackURL' | 'navHeading' | 'navHelpText'> {
53
+ }
54
+ export interface DeploymentConfigDiffMainProps extends Pick<DeploymentConfigDiffProps, 'isLoading' | 'headerText' | 'configList' | 'scrollIntoViewId' | 'selectorsConfig' | 'sortOrder' | 'onSortBtnClick'> {
55
+ }
56
+ export interface DeploymentConfigDiffAccordionProps {
57
+ id: string;
58
+ title: string;
59
+ children: React.ReactNode;
60
+ hasDiff?: boolean;
61
+ isExpanded?: boolean;
62
+ handleOnClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
63
+ }
@@ -1,3 +1,3 @@
1
1
  import { KeyValueTableProps } from './KeyValueTable.types';
2
2
 
3
- export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, }: KeyValueTableProps<K>) => JSX.Element;
3
+ export declare const KeyValueTable: <K extends string>({ config, maskValue, isSortable, headerComponent, onChange, onDelete, placeholder, isAdditionNotAllowed, readOnly, showError, validationSchema, errorMessages, onError, }: KeyValueTableProps<K>) => JSX.Element;
@@ -60,8 +60,10 @@ export interface KeyValueTableProps<K extends string> {
60
60
  isSortable?: boolean;
61
61
  /** An optional React node for a custom header component. */
62
62
  headerComponent?: ReactNode;
63
- /** When true, data addition field will not be shown */
63
+ /** When true, data addition field will not be shown. */
64
64
  isAdditionNotAllowed?: boolean;
65
+ /** When true, data add or update is disabled. */
66
+ readOnly?: boolean;
65
67
  /**
66
68
  * An optional function to handle changes in the table rows.
67
69
  * @param rowId - The id of the row that changed.
@@ -74,4 +76,24 @@ export interface KeyValueTableProps<K extends string> {
74
76
  * @param deletedRowIndex - The index of the row that was deleted.
75
77
  */
76
78
  onDelete?: (deletedRowId: string | number) => void;
79
+ /**
80
+ * Indicates whether to show errors.
81
+ */
82
+ showError?: boolean;
83
+ /**
84
+ * The function to use to validate the value of the cell.
85
+ * @param value - The value to validate.
86
+ * @returns Return true if the value is valid, otherwise false
87
+ * and set `showError` to `true` and provide errorMessages array to show error message.
88
+ */
89
+ validationSchema?: (value: string) => boolean;
90
+ /**
91
+ * An array of error messages to be displayed in the cell error tooltip.
92
+ */
93
+ errorMessages?: string[];
94
+ /**
95
+ * A callback function called when an error occurs.
96
+ * @param errorState - The error state, true when any cell has error, otherwise false.
97
+ */
98
+ onError?: (errorState: boolean) => void;
77
99
  }
@@ -81,5 +81,5 @@ import { SelectPickerProps } from './type';
81
81
  * <SelectPicker ... showSelectedOptionsCount />
82
82
  * ```
83
83
  */
84
- declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, ...props }: SelectPickerProps) => JSX.Element;
84
+ declare const SelectPicker: ({ error, icon, renderMenuListFooter, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, variant, ...props }: SelectPickerProps) => JSX.Element;
85
85
  export default SelectPicker;
@@ -17,6 +17,10 @@ export interface SelectPickerOptionType extends OptionType<number | string, Reac
17
17
  */
18
18
  endIcon?: ReactElement;
19
19
  }
20
+ export declare enum SelectPickerVariantType {
21
+ DEFAULT = "default",
22
+ BORDERLESS = "borderless"
23
+ }
20
24
  type SelectProps = ReactSelectProps<SelectPickerOptionType>;
21
25
  export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'isLoading' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder'>, Required<Pick<SelectProps, 'classNamePrefix' | 'inputId' | 'name'>> {
22
26
  /**
@@ -70,5 +74,11 @@ export interface SelectPickerProps extends Pick<SelectProps, 'options' | 'value'
70
74
  * @default 'ComponentSizeType.small'
71
75
  */
72
76
  menuSize?: ComponentSizeType;
77
+ /**
78
+ * Variant of the select.
79
+ *
80
+ * @default SelectPickerVariantType.DEFAULT
81
+ */
82
+ variant?: SelectPickerVariantType;
73
83
  }
74
84
  export {};
@@ -1,4 +1,4 @@
1
1
  import { StylesConfig } from 'react-select';
2
2
  import { SelectPickerOptionType, SelectPickerProps } from './type';
3
3
 
4
- export declare const getCommonSelectStyle: ({ error, size, menuSize, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize'>) => StylesConfig<SelectPickerOptionType>;
4
+ export declare const getCommonSelectStyle: ({ error, size, menuSize, variant, }: Pick<SelectPickerProps, 'error' | 'size' | 'menuSize' | 'variant'>) => StylesConfig<SelectPickerOptionType>;
@@ -32,3 +32,5 @@ export * from './MaterialHistory';
32
32
  export * from './IframeContainer';
33
33
  export * from './KeyValueTable';
34
34
  export * from './SelectPicker';
35
+ export * from './CollapsibleList';
36
+ export * from './DeploymentConfigDiff';
@@ -1,4 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
+ import { Pair } from 'yaml';
2
3
  import { MaterialInfo, SortingOrder } from '../Common';
3
4
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
4
5
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
@@ -24,6 +25,7 @@ export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTrigge
24
25
  export declare const stringComparatorBySortOrder: (a: string, b: string, sortOrder?: SortingOrder, isCaseSensitive?: boolean) => number;
25
26
  export declare const numberComparatorBySortOrder: (a: number, b: number, sortOrder?: SortingOrder) => number;
26
27
  export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
28
+ export declare const yamlComparatorBySortOrder: (a: Pair, b: Pair, sortOrder?: SortingOrder) => number;
27
29
  export declare const useIntersection: (target: React.RefObject<Element> | Element | null, options?: IntersectionOptions, callback?: IntersectionChangeHandler) => boolean;
28
30
  export declare const isNullOrUndefined: (value: unknown) => boolean;
29
31
  export declare const handleDisableSubmitOnEnter: (event: React.KeyboardEvent<HTMLFormElement>) => void;
@@ -32,4 +34,5 @@ export declare const renderValidInputButtonTippy: (children: ReactElement) => JS
32
34
  export declare const processDeploymentStatusDetailsData: (data?: DeploymentStatusDetailsType) => DeploymentStatusDetailsBreakdownDataType;
33
35
  export declare function aggregateNodes(nodes: any[], podMetadata: PodMetadatum[]): AggregatedNodes;
34
36
  export declare const decode: (data: any, isEncoded?: boolean) => {};
37
+ export declare const getFileNameFromHeaders: (headers: Headers) => string;
35
38
  export {};
@@ -0,0 +1,8 @@
1
+ import { ServerErrors } from '../../../Common/ServerError';
2
+ import { HandleDownloadProps } from './types';
3
+
4
+ declare const useDownload: () => {
5
+ handleDownload: ({ downloadUrl, showFilePreparingToast, fileName, showSuccessfulToast, downloadSuccessToastContent, }: HandleDownloadProps) => Promise<Error | ServerErrors>;
6
+ isDownloading: boolean;
7
+ };
8
+ export default useDownload;
@@ -0,0 +1,2 @@
1
+ export { default as useDownload } from './UseDownload';
2
+ export * from './types';
@@ -0,0 +1 @@
1
+ export declare const getDownloadResponse: (downloadUrl: string) => Promise<Response>;
@@ -0,0 +1,7 @@
1
+ export interface HandleDownloadProps {
2
+ downloadUrl: string;
3
+ showFilePreparingToast?: boolean;
4
+ fileName?: string;
5
+ showSuccessfulToast?: boolean;
6
+ downloadSuccessToastContent?: string;
7
+ }
@@ -1 +1,2 @@
1
1
  export * from './UsePrompt';
2
+ export * from './UseDownload';