@devtron-labs/devtron-fe-common-lib 0.0.79-beta-12 → 0.0.79-beta-13

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 (57) hide show
  1. package/dist/Common/Api.d.ts +1 -0
  2. package/dist/Common/Common.service.d.ts +3 -5
  3. package/dist/Common/Constants.d.ts +12 -7
  4. package/dist/Common/GenericDescription/GenericDescription.d.ts +4 -0
  5. package/dist/Common/GenericDescription/constant.d.ts +2 -0
  6. package/dist/Common/GenericDescription/index.d.ts +2 -0
  7. package/dist/Common/GenericDescription/types.d.ts +14 -0
  8. package/dist/Common/Helper.d.ts +11 -2
  9. package/dist/Common/Hooks/index.d.ts +0 -1
  10. package/dist/Common/Markdown/constant.d.ts +28 -0
  11. package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
  12. package/dist/Common/Types.d.ts +0 -2
  13. package/dist/Common/index.d.ts +1 -1
  14. package/dist/Pages/index.d.ts +0 -1
  15. package/dist/Shared/Components/ActivityIndicator/ActivityIndicator.d.ts +1 -1
  16. package/dist/Shared/Components/ActivityIndicator/types.d.ts +2 -0
  17. package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +1 -1
  18. package/dist/Shared/Components/BulkSelection/types.d.ts +1 -0
  19. package/dist/Shared/Components/ButtonWithSelector/ButtonWithSelector.d.ts +18 -0
  20. package/dist/Shared/Components/ButtonWithSelector/index.d.ts +1 -0
  21. package/dist/Shared/Components/ButtonWithSelector/types.d.ts +10 -0
  22. package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
  23. package/dist/Shared/Components/Header/types.d.ts +7 -9
  24. package/dist/Shared/Components/ReactSelect/utils.d.ts +11 -0
  25. package/dist/Shared/Components/ScannedByToolModal/ScannedByToolModal.d.ts +1 -2
  26. package/dist/Shared/Components/ScannedByToolModal/types.d.ts +0 -2
  27. package/dist/Shared/Components/Vulnerabilities/index.d.ts +0 -1
  28. package/dist/Shared/Components/index.d.ts +1 -1
  29. package/dist/Shared/Helpers.d.ts +2 -2
  30. package/dist/Shared/Providers/ImageSelectionUtility/ImageSelectionUtility.d.ts +5 -0
  31. package/dist/Shared/Providers/ImageSelectionUtility/index.d.ts +1 -0
  32. package/dist/Shared/Providers/ImageSelectionUtility/types.d.ts +9 -0
  33. package/dist/Shared/Providers/index.d.ts +1 -0
  34. package/dist/Shared/constants.d.ts +14 -0
  35. package/dist/Shared/index.d.ts +1 -0
  36. package/dist/Shared/types.d.ts +100 -68
  37. package/dist/Shared/validations.d.ts +10 -1
  38. package/dist/assets/index.css +1 -1
  39. package/dist/index.d.ts +1 -2
  40. package/dist/index.js +7265 -6993
  41. package/package.json +8 -4
  42. package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcut.d.ts +0 -2
  43. package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcutContext.d.ts +0 -3
  44. package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcutProvider.d.ts +0 -4
  45. package/dist/Common/Hooks/UseRegisterShortcut/index.d.ts +0 -2
  46. package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +0 -8
  47. package/dist/Common/SegmentedBarChart/SegmentedBarChart.d.ts +0 -5
  48. package/dist/Common/SegmentedBarChart/constants.d.ts +0 -5
  49. package/dist/Common/SegmentedBarChart/index.d.ts +0 -2
  50. package/dist/Common/SegmentedBarChart/types.d.ts +0 -11
  51. package/dist/Pages/ResourceBrowser/Helper.d.ts +0 -3
  52. package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +0 -20
  53. package/dist/Pages/ResourceBrowser/index.d.ts +0 -2
  54. package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +0 -4
  55. package/dist/Shared/Components/ScannedObjectBar/index.d.ts +0 -1
  56. package/dist/Shared/Components/ScannedObjectBar/types.d.ts +0 -7
  57. package/dist/Shared/Components/Vulnerabilities/utils.d.ts +0 -4
@@ -3,6 +3,7 @@ import { MutableRefObject } from 'react';
3
3
 
4
4
  export declare const post: (url: string, data: object, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType>;
5
5
  export declare const put: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
6
+ export declare const patch: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
6
7
  export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType>;
7
8
  export declare const trash: (url: string, data?: object, options?: APIOptions) => Promise<ResponseType>;
8
9
  /**
@@ -1,5 +1,4 @@
1
- import { ApiResourceType } from '../Pages';
2
- import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType } from './Types';
1
+ import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery } from './Types';
3
2
 
4
3
  export declare const getTeamListMin: () => Promise<TeamList>;
5
4
  interface UserRole extends ResponseType {
@@ -15,12 +14,11 @@ export declare const SourceTypeMap: {
15
14
  };
16
15
  export declare function getUserRole(appName?: string): Promise<UserRole>;
17
16
  export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
17
+ export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
18
18
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
19
19
  export declare function extractImage(image: string): string;
20
20
  export declare function createGitCommitUrl(url: string, revision: string): string;
21
21
  export declare function fetchChartTemplateVersions(): Promise<ResponseType<any>>;
22
22
  export declare const getDefaultConfig: () => Promise<ResponseType>;
23
- export declare function getEnvironmentListMinPublic(includeAllowedDeploymentTypes?: boolean): Promise<ResponseType<any>>;
24
- export declare function getClusterListMin(): Promise<ResponseType<any>>;
25
- export declare const getResourceGroupListRaw: (clusterId: string) => Promise<ResponseType<ApiResourceType>>;
23
+ export declare function getWebhookEventsForEventId(eventId: string | number): Promise<ResponseType<any>>;
26
24
  export {};
@@ -25,8 +25,8 @@ export declare const URLS: {
25
25
  GETTING_STARTED: string;
26
26
  STACK_MANAGER_ABOUT: string;
27
27
  APP_LIST_HELM: string;
28
- APP_CI_DETAILS: string;
29
- LOGS: string;
28
+ CREATE: string;
29
+ RELEASES: string;
30
30
  };
31
31
  export declare const ROUTES: {
32
32
  APP_ARTIFACT_PROMOTE_MATERIAL: string;
@@ -43,10 +43,9 @@ export declare const ROUTES: {
43
43
  SERVER_INFO_API: string;
44
44
  ATTRIBUTES_USER: string;
45
45
  UPDATE: string;
46
- ENVIRONMENT_LIST_MIN: string;
47
- CLUSTER: string;
48
- API_RESOURCE: string;
49
- GVK: string;
46
+ CLUSTER_NOTE: string;
47
+ APPLICATION_NOTE: string;
48
+ GIT_HOST_EVENT: string;
50
49
  };
51
50
  export declare enum KEY_VALUE {
52
51
  KEY = "key",
@@ -203,6 +202,7 @@ export declare enum ReactSelectInputAction {
203
202
  export declare const ZERO_TIME_STRING = "0001-01-01T00:00:00Z";
204
203
  export declare const EXCLUDED_FALSY_VALUES: readonly [any, any, "", number];
205
204
  export declare const API_STATUS_CODES: {
205
+ BAD_REQUEST: number;
206
206
  UNAUTHORIZED: number;
207
207
  PERMISSION_DENIED: number;
208
208
  NOT_FOUND: number;
@@ -226,5 +226,10 @@ export declare const POSTHOG_EVENT_ONBOARDING: {
226
226
  SKIP_AND_EXPLORE_DEVTRON: string;
227
227
  };
228
228
  export declare const MAX_LOGIN_COUNT = 5;
229
+ export declare const BULK_EDIT_HEADER = "Bulk Edit";
229
230
  export declare const LOGIN_COUNT = "login-count";
230
- export declare const DEFAULT_ENV = "devtron-ci";
231
+ export declare const DATE_TIME_FORMATS: {
232
+ TWELVE_HOURS_FORMAT: string;
233
+ TWELVE_HOURS_FORMAT_WITHOUT_WEEKDAY: string;
234
+ TWELVE_HOURS_EXPORT_FORMAT: string;
235
+ };
@@ -0,0 +1,4 @@
1
+ import { GenericDescriptionProps } from './types';
2
+
3
+ declare const GenericDescription: ({ text, updatedBy, updatedOn, isDescriptionPreview, tabIndex, updateDescription, title, minEditorHeight, }: GenericDescriptionProps) => JSX.Element;
4
+ export default GenericDescription;
@@ -0,0 +1,2 @@
1
+ export declare const DESCRIPTION_EMPTY_ERROR_MSG = "Readme cannot be empty. Please add some information or cancel the changes.";
2
+ export declare const DESCRIPTION_UNSAVED_CHANGES_MSG = "Are you sure you want to discard your changes?";
@@ -0,0 +1,2 @@
1
+ export { default as GenericDescription } from './GenericDescription';
2
+ export * from './types';
@@ -0,0 +1,14 @@
1
+ export interface GenericDescriptionProps {
2
+ text?: string;
3
+ updatedBy?: string;
4
+ updatedOn?: string;
5
+ isDescriptionPreview: boolean;
6
+ updateDescription: (string: any) => Promise<void>;
7
+ title: string;
8
+ tabIndex?: number;
9
+ minEditorHeight?: number;
10
+ }
11
+ export declare enum MDEditorSelectedTabType {
12
+ WRITE = "write",
13
+ PREVIEW = "preview"
14
+ }
@@ -1,5 +1,5 @@
1
1
  import { AsyncOptions, UseSearchString } from './Types';
2
- import { default as React } from 'react';
2
+ import { default as React, SyntheticEvent } from 'react';
3
3
 
4
4
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
5
5
  interface ConditionalWrapper<T> {
@@ -10,6 +10,7 @@ interface ConditionalWrapper<T> {
10
10
  export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
11
11
  export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 0 | 1 | -1;
12
12
  export declare const stopPropagation: (event: any) => void;
13
+ export declare const preventDefault: (event: SyntheticEvent) => void;
13
14
  export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
14
15
  export declare function getRandomColor(email: string): string;
15
16
  export declare const getAlphabetIcon: (str: string, rootClassName?: string) => JSX.Element;
@@ -47,7 +48,7 @@ export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: a
47
48
  * @param url URL to which the search params needs to be added
48
49
  * @param params Object for the search parameters
49
50
  */
50
- export declare const getUrlWithSearchParams: (url: string, params: Record<string | number, any>) => string;
51
+ export declare const getUrlWithSearchParams: (url: string, params?: Record<string | number, any>) => string;
51
52
  /**
52
53
  * Custom exception logger function for logging errors to sentry
53
54
  */
@@ -77,4 +78,12 @@ export declare const handleRelativeDateSorting: (dateStringA: any, dateStringB:
77
78
  * Returns a stringified YAML with default indentation & line width
78
79
  */
79
80
  export declare const YAMLStringify: (obj: object | unknown, option?: object) => string;
81
+ /**
82
+ * compare Object Length of the object
83
+ */
84
+ export declare const compareObjectLength: (objA: any, objB: any) => boolean;
85
+ /**
86
+ * Return deep copy of the object
87
+ */
88
+ export declare function deepEqual(configA: any, configB: any): boolean;
80
89
  export {};
@@ -2,4 +2,3 @@ export { useSuperAdmin } from './UseSuperAdmin/UseSuperAdmin';
2
2
  export { useClickOutside } from './UseClickOutside/UseClickOutside';
3
3
  export { useWindowSize } from './UseWindowSize/UseWindowSize';
4
4
  export * from './useUrlFilters';
5
- export * from './UseRegisterShortcut';
@@ -0,0 +1,28 @@
1
+ export declare const DEFAULT_MARKDOWN_EDITOR_PREVIEW_MESSAGE = "\n<br>\nNothing to preview\n";
2
+ export declare const MARKDOWN_EDITOR_COMMANDS: string[][];
3
+ export declare enum MARKDOWN_EDITOR_COMMAND_TITLE {
4
+ HEADER = "header",
5
+ BOLD = "bold",
6
+ ITALIC = "italic",
7
+ STRIKETHROUGH = "strikethrough",
8
+ LINK = "link",
9
+ QUOTE = "quote",
10
+ CODE = "code",
11
+ IMAGE = "image",
12
+ UNORDERED_LIST = "unordered-list",
13
+ ORDERED_LIST = "ordered-list",
14
+ CHECKED_LIST = "checked-list"
15
+ }
16
+ export declare const MARKDOWN_EDITOR_COMMAND_ICON_TIPPY_CONTENT: {
17
+ header: string;
18
+ bold: string;
19
+ italic: string;
20
+ strikethrough: string;
21
+ link: string;
22
+ quote: string;
23
+ code: string;
24
+ image: string;
25
+ "unordered-list": string;
26
+ "ordered-list": string;
27
+ "checked-list": string;
28
+ };
@@ -1,3 +1,3 @@
1
1
  import { ScanVulnerabilitiesTableProps } from '../Types';
2
2
 
3
- export default function ScanVulnerabilitiesTable({ vulnerabilities, hidePolicy, shouldStick }: ScanVulnerabilitiesTableProps): JSX.Element;
3
+ export default function ScanVulnerabilitiesTable({ vulnerabilities }: ScanVulnerabilitiesTableProps): JSX.Element;
@@ -467,8 +467,6 @@ export interface VulnerabilityType {
467
467
  }
468
468
  export interface ScanVulnerabilitiesTableProps {
469
469
  vulnerabilities: VulnerabilityType[];
470
- hidePolicy?: boolean;
471
- shouldStick?: boolean;
472
470
  }
473
471
  export interface MaterialInfo {
474
472
  revision: string;
@@ -51,4 +51,4 @@ export * from './CustomInput';
51
51
  export * from './DraggableWrapper';
52
52
  export * from './Pagination';
53
53
  export * from './Markdown';
54
- export * from './SegmentedBarChart';
54
+ export * from './GenericDescription';
@@ -1,2 +1 @@
1
1
  export * from './GlobalConfigurations';
2
- export * from './ResourceBrowser';
@@ -1,4 +1,4 @@
1
1
  import { ActivityIndicatorProps } from './types';
2
2
 
3
- declare const ActivityIndicator: ({ rootClassName }: ActivityIndicatorProps) => JSX.Element;
3
+ declare const ActivityIndicator: ({ rootClassName, backgroundColorClass, iconSizeClass, }: ActivityIndicatorProps) => JSX.Element;
4
4
  export default ActivityIndicator;
@@ -1,3 +1,5 @@
1
1
  export interface ActivityIndicatorProps {
2
2
  rootClassName?: string;
3
+ backgroundColorClass?: string;
4
+ iconSizeClass?: string;
3
5
  }
@@ -1,4 +1,4 @@
1
1
  import { BulkSelectionProps } from './types';
2
2
 
3
- declare const BulkSelection: <T>({ showPagination }: BulkSelectionProps) => JSX.Element;
3
+ declare const BulkSelection: <T>({ showPagination, disabled }: BulkSelectionProps) => JSX.Element;
4
4
  export default BulkSelection;
@@ -28,6 +28,7 @@ export interface UseBulkSelectionReturnType<T> extends GetBulkSelectionCheckboxV
28
28
  }
29
29
  export interface BulkSelectionProps {
30
30
  showPagination: boolean;
31
+ disabled?: boolean;
31
32
  }
32
33
  export interface BulkSelectionDropdownItemsType {
33
34
  locator: BulkSelectionEvents;
@@ -0,0 +1,18 @@
1
+ import { ButtonWithSelectorProps } from './types';
2
+
3
+ /**
4
+ * Button With Selector
5
+ * @param content Content to show in button
6
+ * @param onClick Handler Function for button click
7
+ * @param children Dropdown Content
8
+ * @param className Other Classes to be applied
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <ButtonWithSelector content='Create Job' onClick={() => {}} className=''>
13
+ * {dropdownOptions}
14
+ * </ButtonWithSelector>
15
+ * ```
16
+ */
17
+ declare const ButtonWithSelector: ({ content, onClick, children, className, popUpBodyClassName, showPopUp, }: ButtonWithSelectorProps) => JSX.Element;
18
+ export default ButtonWithSelector;
@@ -0,0 +1 @@
1
+ export { default as ButtonWithSelector } from './ButtonWithSelector';
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface ButtonWithSelectorProps {
4
+ content: ReactNode;
5
+ onClick: () => void;
6
+ children: ReactNode;
7
+ className?: string;
8
+ popUpBodyClassName?: string;
9
+ showPopUp?: boolean;
10
+ }
@@ -1,4 +1,4 @@
1
1
  import { PageHeaderType } from './types';
2
2
 
3
- declare const PageHeader: ({ headerName, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, showCloseButton, onClose, markAsBeta, showAnnouncementHeader, tippyProps, }: PageHeaderType) => JSX.Element;
3
+ declare const PageHeader: ({ headerName, additionalHeaderInfo, isTippyShown, tippyRedirectLink, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, TippyIcon, tippyMessage, onClickTippybutton, renderActionButtons, showCloseButton, onClose, markAsBeta, showAnnouncementHeader, }: PageHeaderType) => JSX.Element;
4
4
  export default PageHeader;
@@ -1,4 +1,4 @@
1
- import { ResponseType, TippyCustomizedProps } from '../../../Common';
1
+ import { ResponseType } from '../../../Common';
2
2
 
3
3
  export declare enum InstallationType {
4
4
  OSS_KUBECTL = "oss_kubectl",
@@ -19,23 +19,21 @@ export declare enum ModuleStatus {
19
19
  }
20
20
  export interface PageHeaderType {
21
21
  headerName?: string;
22
- showTabs?: boolean;
23
22
  additionalHeaderInfo?: () => JSX.Element;
23
+ isTippyShown?: boolean;
24
+ tippyRedirectLink?: string;
25
+ showTabs?: boolean;
24
26
  renderHeaderTabs?: () => JSX.Element;
25
27
  isBreadcrumbs?: boolean;
26
28
  breadCrumbs?: () => JSX.Element;
29
+ TippyIcon?: React.FunctionComponent<any>;
30
+ tippyMessage?: string;
31
+ onClickTippybutton?: () => void;
27
32
  renderActionButtons?: () => JSX.Element;
28
33
  showCloseButton?: boolean;
29
34
  onClose?: () => void;
30
35
  markAsBeta?: boolean;
31
36
  showAnnouncementHeader?: boolean;
32
- tippyProps?: Pick<TippyCustomizedProps, 'additionalContent'> & {
33
- isTippyCustomized?: boolean;
34
- tippyRedirectLink?: string;
35
- TippyIcon?: React.FunctionComponent<any>;
36
- tippyMessage?: string;
37
- onClickTippyButton?: () => void;
38
- };
39
37
  }
40
38
  export interface ServerInfo {
41
39
  currentVersion: string;
@@ -13,3 +13,14 @@ export declare const getCustomOptionSelectionStyle: (styleOverrides?: {}) => (ba
13
13
  export declare const SelectOption: (props: any) => JSX.Element;
14
14
  export declare const LoadingIndicator: () => JSX.Element;
15
15
  export declare const GroupHeading: (props: any) => JSX.Element;
16
+ export declare const commonSelectStyles: {
17
+ container: (base: any, state: any) => any;
18
+ menuList: (base: any) => any;
19
+ control: (base: any, state: any) => any;
20
+ option: (base: any, state: any) => any;
21
+ dropdownIndicator: (base: any, state: any) => any;
22
+ valueContainer: (base: any) => any;
23
+ loadingMessage: (base: any) => any;
24
+ noOptionsMessage: (base: any) => any;
25
+ placeholder: (base: any) => any;
26
+ };
@@ -1,5 +1,4 @@
1
1
  import { ScannedByToolModalProps } from './types';
2
- import { default as React } from 'react';
3
2
 
4
- declare const ScannedByToolModal: React.FC<ScannedByToolModalProps>;
3
+ declare const ScannedByToolModal: ({ scanToolId }: ScannedByToolModalProps) => JSX.Element;
5
4
  export default ScannedByToolModal;
@@ -1,5 +1,3 @@
1
1
  export interface ScannedByToolModalProps {
2
2
  scanToolId?: number;
3
- fontSize?: number;
4
- spacingBetweenTextAndIcon?: number;
5
3
  }
@@ -1,2 +1 @@
1
1
  export { default as Vulnerabilities } from './Vulnerabilities';
2
- export * from './utils';
@@ -10,9 +10,9 @@ export * from './FilterChips';
10
10
  export * from './ActivityIndicator';
11
11
  export * from './GenericSectionErrorState';
12
12
  export * from './KeyValueList';
13
- export * from './ScannedObjectBar';
14
13
  export * from './InfoIconTippy';
15
14
  export * from './EditableTextArea';
16
15
  export * from './Header';
17
16
  export * from './AnnouncementBanner';
18
17
  export * from './ButtonWithLoader';
18
+ export * from './ButtonWithSelector';
@@ -1,4 +1,4 @@
1
- import { GitTriggers } from './types';
1
+ import { GitTriggers, WebhookEventNameType } from './types';
2
2
  import { MaterialInfo } from '../Common';
3
3
 
4
4
  interface HighlightSearchTextProps {
@@ -20,5 +20,5 @@ export declare const preventBodyScroll: (lock: boolean) => void;
20
20
  export declare const getIsMaterialInfoAvailable: (materialInfo: MaterialInfo[]) => boolean;
21
21
  export declare const getGitCommitInfo: (materialInfo: MaterialInfo) => GitTriggers;
22
22
  export declare const caseInsensitiveStringComparator: (a: string, b: string) => number;
23
- export declare const isNullOrUndefined: (value: unknown) => boolean;
23
+ export declare const getWebhookEventIcon: (eventName: WebhookEventNameType) => JSX.Element;
24
24
  export {};
@@ -0,0 +1,5 @@
1
+ import { ImageSelectionUtilityContextType, ImageSelectionUtilityProviderProps } from './types';
2
+
3
+ export declare const ImageSelectionUtilityContext: import('react').Context<ImageSelectionUtilityContextType>;
4
+ export declare const useImageSelectionUtilityContext: () => ImageSelectionUtilityContextType;
5
+ export declare const ImageSelectionUtilityProvider: ({ children, value }: ImageSelectionUtilityProviderProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './ImageSelectionUtility';
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export interface ImageSelectionUtilityContextType {
3
+ gitCommitInfoGeneric: (...props: any[]) => JSX.Element;
4
+ getModuleInfo: (moduleName: string) => Promise<any>;
5
+ }
6
+ export interface ImageSelectionUtilityProviderProps {
7
+ children: React.ReactNode;
8
+ value: ImageSelectionUtilityContextType;
9
+ }
@@ -1 +1,2 @@
1
1
  export * from './MainContextProvider';
2
+ export * from './ImageSelectionUtility';
@@ -29,3 +29,17 @@ export declare const ModuleNameMap: {
29
29
  };
30
30
  export declare const DATE_TIME_FORMAT_STRING = "ddd DD MMM YYYY HH:mm:ss";
31
31
  export declare const API_TOKEN_PREFIX = "API-TOKEN:";
32
+ export declare enum PatchOperationType {
33
+ replace = "replace",
34
+ remove = "remove"
35
+ }
36
+ export declare enum DeploymentStageType {
37
+ PRE = "PRE",
38
+ DEPLOY = "DEPLOY",
39
+ POST = "POST"
40
+ }
41
+ export declare enum DeploymentWithConfigType {
42
+ LAST_SAVED_CONFIG = "LAST_SAVED_CONFIG",
43
+ LATEST_TRIGGER_CONFIG = "LATEST_TRIGGER_CONFIG",
44
+ SPECIFIC_TRIGGER_CONFIG = "SPECIFIC_TRIGGER_CONFIG"
45
+ }
@@ -4,3 +4,4 @@ export * from './Helpers';
4
4
  export * from './constants';
5
5
  export * from './types';
6
6
  export * from './Providers';
7
+ export * from './constants';
@@ -1,4 +1,5 @@
1
- import { CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType } from '../Common';
1
+ import { PatchOperationType } from './constants';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType } from '../Common';
2
3
 
3
4
  export declare enum RegistryType {
4
5
  GIT = "git",
@@ -95,15 +96,91 @@ export declare enum CIMaterialSidebarType {
95
96
  CODE_SOURCE = "Code Source",
96
97
  PARAMETERS = "Parameters"
97
98
  }
98
- export interface LastExecutionResultType {
99
+ /**
100
+ * @example Usage with specific enum for path & `unknown` type for value
101
+ * ```ts
102
+ * enum PatchKeys {
103
+ * name = 'name',
104
+ * description = 'description',
105
+ * }
106
+ *
107
+ * const query: PatchQueryType<PatchKeys> = {
108
+ * op: PatchOperationType.replace,
109
+ * path: PatchKeys.name,
110
+ * value: '1'
111
+ * }
112
+ * ```
113
+ *
114
+ * @example Usage with specific enum for path & custom type for value
115
+ * ```ts
116
+ * enum PatchKeys {
117
+ * name = 'name',
118
+ * description = 'description',
119
+ * }
120
+ *
121
+ * const query: PatchQueryType<PatchKeys, number> = {
122
+ * op: PatchOperationType.replace,
123
+ * path: PatchKeys.name,
124
+ * value: 1
125
+ * }
126
+ * ```
127
+ *
128
+ * @example Usage with `PatchOperationType.remove`
129
+ * Note: Value is not allowed for remove operation
130
+ *
131
+ * ```ts
132
+ * const query: PatchQueryType<string> = {
133
+ * op: PatchOperationType.remove,
134
+ * path: 'name'
135
+ * }
136
+ * ```
137
+ */
138
+ export type PatchQueryType<T extends string, K = unknown> = {
139
+ /**
140
+ * The path of the json to be patched
141
+ */
142
+ path: T;
143
+ } & ({
144
+ /**
145
+ * Operation type for patch
146
+ */
147
+ op: PatchOperationType.replace;
148
+ /**
149
+ * Corresponding value for the operation
150
+ */
151
+ value: K;
152
+ } | {
153
+ /**
154
+ * Operation type for patch
155
+ */
156
+ op: PatchOperationType.remove;
157
+ value?: never;
158
+ });
159
+ export interface GroupedOptionsType {
160
+ label: string;
161
+ options: OptionType[];
162
+ }
163
+ /**
164
+ * Enum for devtron resources
165
+ */
166
+ export declare enum ResourceKindType {
167
+ devtronApplication = "application/devtron-application",
168
+ helmChart = "application/helm-application",
169
+ job = "job",
170
+ cluster = "cluster",
171
+ release = "release",
172
+ releaseTrack = "release-track"
173
+ }
174
+ /**
175
+ * Versions support for the resources on BE
176
+ */
177
+ export declare enum ResourceVersionType {
178
+ v1 = "v1",
179
+ alpha1 = "alpha1"
180
+ }
181
+ interface LastExecutionResultType {
182
+ scanExecutionId: number;
99
183
  lastExecution: string;
100
- severityCount: {
101
- critical: number;
102
- moderate: number;
103
- low: number;
104
- };
105
- vulnerabilities: VulnerabilityType[];
106
- scanExecutionId?: number;
107
184
  appId?: number;
108
185
  appName?: string;
109
186
  envId?: number;
@@ -111,9 +188,15 @@ export interface LastExecutionResultType {
111
188
  pod?: string;
112
189
  replicaSet?: string;
113
190
  image?: string;
114
- objectType?: 'app' | 'chart';
115
- scanned?: boolean;
116
- scanEnabled?: boolean;
191
+ objectType: 'app' | 'chart';
192
+ scanned: boolean;
193
+ scanEnabled: boolean;
194
+ severityCount: {
195
+ critical: number;
196
+ moderate: number;
197
+ low: number;
198
+ };
199
+ vulnerabilities: VulnerabilityType[];
117
200
  scanToolId?: number;
118
201
  }
119
202
  export interface LastExecutionResponseType extends ResponseType<LastExecutionResultType> {
@@ -122,59 +205,8 @@ export interface MaterialSecurityInfoType {
122
205
  isScanned: boolean;
123
206
  isScanEnabled: boolean;
124
207
  }
125
- export declare enum Nodes {
126
- Service = "Service",
127
- Alertmanager = "Alertmanager",
128
- PodSecurity = "PodSecurityPolicy",
129
- ConfigMap = "ConfigMap",
130
- ServiceAccount = "ServiceAccount",
131
- ClusterRoleBinding = "ClusterRoleBinding",
132
- RoleBinding = "RoleBinding",
133
- ClusterRole = "ClusterRole",
134
- Role = "Role",
135
- Prometheus = "Prometheus",
136
- ServiceMonitor = "ServiceMonitor",
137
- Deployment = "Deployment",
138
- MutatingWebhookConfiguration = "MutatingWebhookConfiguration",
139
- DaemonSet = "DaemonSet",
140
- Secret = "Secret",
141
- ValidatingWebhookConfiguration = "ValidatingWebhookConfiguration",
142
- Pod = "Pod",
143
- Ingress = "Ingress",
144
- ReplicaSet = "ReplicaSet",
145
- Endpoints = "Endpoints",
146
- Cluster = "ClusterRoleBinding",
147
- PodSecurityPolicy = "PodSecurityPolicy",
148
- CronJob = "CronJob",
149
- Job = "Job",
150
- ReplicationController = "ReplicationController",
151
- StatefulSet = "StatefulSet",
152
- Rollout = "Rollout",
153
- PersistentVolumeClaim = "PersistentVolumeClaim",
154
- PersistentVolume = "PersistentVolume",
155
- Containers = "Containers",
156
- InitContainers = "InitContainers",
157
- EndpointSlice = "EndpointSlice",
158
- NetworkPolicy = "NetworkPolicy",
159
- StorageClass = "StorageClass",
160
- VolumeSnapshot = "VolumeSnapshot",
161
- VolumeSnapshotContent = "VolumeSnapshotContent",
162
- VolumeSnapshotClass = "VolumeSnapshotClass",
163
- PodDisruptionBudget = "PodDisruptionBudget",
164
- Event = "Event",
165
- Namespace = "Namespace",
166
- Overview = "Overview"
167
- }
168
- export type NodeType = keyof typeof Nodes;
169
- export declare enum AggregationKeys {
170
- Workloads = "Workloads",
171
- Networking = "Networking",
172
- 'Config & Storage' = "Config & Storage",
173
- RBAC = "RBAC",
174
- Administration = "Administration",
175
- 'Custom Resource' = "Custom Resource",
176
- 'Other Resources' = "Other Resources",
177
- Events = "Events",
178
- Namespaces = "Namespaces"
179
- }
180
- export type AggregationKeysType = keyof typeof AggregationKeys;
208
+ export declare enum WebhookEventNameType {
209
+ PULL_REQUEST = "Pull Request",
210
+ TAG_CREATION = "Tag Creation"
211
+ }
212
+ export {};
@@ -2,7 +2,16 @@ export interface ValidationResponseType {
2
2
  isValid: boolean;
3
3
  message?: string;
4
4
  }
5
- export declare const requiredField: (value: string) => ValidationResponseType;
5
+ export declare const MESSAGES: {
6
+ PROVIDE_A_NUMBER: string;
7
+ LOWERCASE_ALPHANUMERIC: string;
8
+ CAN_NOT_START_END_WITH_SEPARATORS: string;
9
+ getMinMaxCharMessage: (min: number, max: number) => string;
10
+ getMaxCharMessage: (max: number) => string;
11
+ VALID_POSITIVE_NUMBER: string;
12
+ VALID_POSITIVE_INTEGER: string;
13
+ MAX_SAFE_INTEGER: string;
14
+ };
6
15
  export declare const validateName: (name: string) => ValidationResponseType;
7
16
  export declare const validateDescription: (description: string) => ValidationResponseType;
8
17
  export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;