@devtron-labs/devtron-fe-common-lib 0.0.79-beta-8 → 0.0.79-beta-10
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.
- package/dist/Common/Api.d.ts +0 -1
- package/dist/Common/Common.service.d.ts +5 -3
- package/dist/Common/Constants.d.ts +5 -9
- package/dist/Common/Helper.d.ts +2 -11
- package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcut.d.ts +2 -0
- package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcutContext.d.ts +3 -0
- package/dist/Common/Hooks/UseRegisterShortcut/UseRegisterShortcutProvider.d.ts +4 -0
- package/dist/Common/Hooks/UseRegisterShortcut/index.d.ts +2 -0
- package/dist/Common/Hooks/UseRegisterShortcut/types.d.ts +8 -0
- package/dist/Common/Hooks/index.d.ts +1 -0
- package/dist/Common/Security/ScanVulnerabilitiesTable.d.ts +1 -1
- package/dist/Common/SegmentedBarChart/SegmentedBarChart.d.ts +5 -0
- package/dist/Common/SegmentedBarChart/constants.d.ts +5 -0
- package/dist/Common/SegmentedBarChart/index.d.ts +2 -0
- package/dist/Common/SegmentedBarChart/types.d.ts +11 -0
- package/dist/Common/Types.d.ts +2 -0
- package/dist/Common/index.d.ts +1 -1
- package/dist/Pages/ResourceBrowser/Constants.d.ts +11 -0
- package/dist/Pages/ResourceBrowser/Helper.d.ts +13 -0
- package/dist/Pages/ResourceBrowser/ResourceBrowser.Types.d.ts +23 -0
- package/dist/Pages/ResourceBrowser/index.d.ts +3 -0
- package/dist/Pages/index.d.ts +1 -0
- package/dist/Shared/Components/BulkSelection/BulkSelection.d.ts +1 -1
- package/dist/Shared/Components/BulkSelection/types.d.ts +0 -1
- package/dist/Shared/Components/Header/PageHeader.d.ts +1 -1
- package/dist/Shared/Components/Header/types.d.ts +9 -7
- package/dist/Shared/Components/ScannedByToolModal/ScannedByToolModal.d.ts +2 -1
- package/dist/Shared/Components/ScannedByToolModal/types.d.ts +2 -0
- package/dist/Shared/Components/ScannedObjectBar/ScannedObjectBar.d.ts +4 -0
- package/dist/Shared/Components/ScannedObjectBar/index.d.ts +1 -0
- package/dist/Shared/Components/ScannedObjectBar/types.d.ts +7 -0
- package/dist/Shared/Components/Vulnerabilities/index.d.ts +1 -0
- package/dist/Shared/Components/Vulnerabilities/utils.d.ts +4 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/Helpers.d.ts +2 -2
- package/dist/Shared/Providers/index.d.ts +0 -1
- package/dist/Shared/constants.d.ts +0 -4
- package/dist/Shared/index.d.ts +0 -1
- package/dist/Shared/types.d.ts +68 -100
- package/dist/Shared/validations.d.ts +0 -10
- package/dist/assets/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6840 -7013
- package/package.json +4 -8
- package/dist/Common/GenericDescription/GenericDescription.d.ts +0 -4
- package/dist/Common/GenericDescription/constant.d.ts +0 -2
- package/dist/Common/GenericDescription/index.d.ts +0 -2
- package/dist/Common/GenericDescription/types.d.ts +0 -14
- package/dist/Common/Markdown/constant.d.ts +0 -28
- package/dist/Shared/Providers/ImageSelectionUtility/ImageSelectionUtility.d.ts +0 -5
- package/dist/Shared/Providers/ImageSelectionUtility/index.d.ts +0 -1
- package/dist/Shared/Providers/ImageSelectionUtility/types.d.ts +0 -9
package/dist/Common/Api.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ 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>;
|
|
7
6
|
export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType>;
|
|
8
7
|
export declare const trash: (url: string, data?: object, options?: APIOptions) => Promise<ResponseType>;
|
|
9
8
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ApiResourceType } from '../Pages';
|
|
2
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType } from './Types';
|
|
2
3
|
|
|
3
4
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
|
4
5
|
interface UserRole extends ResponseType {
|
|
@@ -14,11 +15,12 @@ export declare const SourceTypeMap: {
|
|
|
14
15
|
};
|
|
15
16
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
16
17
|
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
|
|
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>>;
|
|
24
26
|
export {};
|
|
@@ -41,9 +41,10 @@ export declare const ROUTES: {
|
|
|
41
41
|
SERVER_INFO_API: string;
|
|
42
42
|
ATTRIBUTES_USER: string;
|
|
43
43
|
UPDATE: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
ENVIRONMENT_LIST_MIN: string;
|
|
45
|
+
CLUSTER: string;
|
|
46
|
+
API_RESOURCE: string;
|
|
47
|
+
GVK: string;
|
|
47
48
|
};
|
|
48
49
|
export declare enum KEY_VALUE {
|
|
49
50
|
KEY = "key",
|
|
@@ -223,10 +224,5 @@ export declare const POSTHOG_EVENT_ONBOARDING: {
|
|
|
223
224
|
SKIP_AND_EXPLORE_DEVTRON: string;
|
|
224
225
|
};
|
|
225
226
|
export declare const MAX_LOGIN_COUNT = 5;
|
|
226
|
-
export declare const BULK_EDIT_HEADER = "Bulk Edit";
|
|
227
227
|
export declare const LOGIN_COUNT = "login-count";
|
|
228
|
-
export declare const
|
|
229
|
-
TWELVE_HOURS_FORMAT: string;
|
|
230
|
-
TWELVE_HOURS_FORMAT_WITHOUT_WEEKDAY: string;
|
|
231
|
-
TWELVE_HOURS_EXPORT_FORMAT: string;
|
|
232
|
-
};
|
|
228
|
+
export declare const DEFAULT_ENV = "devtron-ci";
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AsyncOptions, UseSearchString } from './Types';
|
|
2
|
-
import { default as React
|
|
2
|
+
import { default as React } from 'react';
|
|
3
3
|
|
|
4
4
|
export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
|
|
5
5
|
interface ConditionalWrapper<T> {
|
|
@@ -10,7 +10,6 @@ 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;
|
|
14
13
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
15
14
|
export declare function getRandomColor(email: string): string;
|
|
16
15
|
export declare const getAlphabetIcon: (str: string, rootClassName?: string) => JSX.Element;
|
|
@@ -48,7 +47,7 @@ export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: a
|
|
|
48
47
|
* @param url URL to which the search params needs to be added
|
|
49
48
|
* @param params Object for the search parameters
|
|
50
49
|
*/
|
|
51
|
-
export declare const getUrlWithSearchParams: (url: string, params
|
|
50
|
+
export declare const getUrlWithSearchParams: (url: string, params: Record<string | number, any>) => string;
|
|
52
51
|
/**
|
|
53
52
|
* Custom exception logger function for logging errors to sentry
|
|
54
53
|
*/
|
|
@@ -78,12 +77,4 @@ export declare const handleRelativeDateSorting: (dateStringA: any, dateStringB:
|
|
|
78
77
|
* Returns a stringified YAML with default indentation & line width
|
|
79
78
|
*/
|
|
80
79
|
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;
|
|
89
80
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ScanVulnerabilitiesTableProps } from '../Types';
|
|
2
2
|
|
|
3
|
-
export default function ScanVulnerabilitiesTable({ vulnerabilities }: ScanVulnerabilitiesTableProps): JSX.Element;
|
|
3
|
+
export default function ScanVulnerabilitiesTable({ vulnerabilities, hidePolicy, shouldStick }: ScanVulnerabilitiesTableProps): JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -467,6 +467,8 @@ export interface VulnerabilityType {
|
|
|
467
467
|
}
|
|
468
468
|
export interface ScanVulnerabilitiesTableProps {
|
|
469
469
|
vulnerabilities: VulnerabilityType[];
|
|
470
|
+
hidePolicy?: boolean;
|
|
471
|
+
shouldStick?: boolean;
|
|
470
472
|
}
|
|
471
473
|
export interface MaterialInfo {
|
|
472
474
|
revision: string;
|
package/dist/Common/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ApiResourceGroupType, K8SObjectType } from './ResourceBrowser.Types';
|
|
2
|
+
import { AggregationKeys, NodeType } from '../../Shared';
|
|
3
|
+
|
|
4
|
+
export declare function createClusterEnvGroup<T extends Record<string, string>>(list: T[], propKey: string, optionLabel?: string, optionValue?: string): {
|
|
5
|
+
label: string;
|
|
6
|
+
options: T[];
|
|
7
|
+
isVirtualEnvironment?: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function getAggregator(nodeType: NodeType, defaultAsOtherResources?: boolean): AggregationKeys;
|
|
10
|
+
export declare const processK8SObjects: (k8sObjects: ApiResourceGroupType[], selectedResourceKind?: string, disableGroupFilter?: boolean) => {
|
|
11
|
+
k8SObjectMap: Map<string, K8SObjectType>;
|
|
12
|
+
selectedResource: ApiResourceGroupType;
|
|
13
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NodeType, Nodes } from '../../Shared';
|
|
2
|
+
|
|
3
|
+
export interface GVKType {
|
|
4
|
+
Group: string;
|
|
5
|
+
Version: string;
|
|
6
|
+
Kind: Nodes | NodeType;
|
|
7
|
+
}
|
|
8
|
+
export interface ApiResourceGroupType {
|
|
9
|
+
gvk: GVKType;
|
|
10
|
+
namespaced: boolean;
|
|
11
|
+
isGrouped?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ApiResourceType {
|
|
14
|
+
apiResources: ApiResourceGroupType[];
|
|
15
|
+
allowedAll: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface K8SObjectBaseType {
|
|
18
|
+
name: string;
|
|
19
|
+
isExpanded: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface K8SObjectType extends K8SObjectBaseType {
|
|
22
|
+
child: ApiResourceGroupType[];
|
|
23
|
+
}
|
package/dist/Pages/index.d.ts
CHANGED
|
@@ -28,7 +28,6 @@ export interface UseBulkSelectionReturnType<T> extends GetBulkSelectionCheckboxV
|
|
|
28
28
|
}
|
|
29
29
|
export interface BulkSelectionProps {
|
|
30
30
|
showPagination: boolean;
|
|
31
|
-
disabled?: boolean;
|
|
32
31
|
}
|
|
33
32
|
export interface BulkSelectionDropdownItemsType {
|
|
34
33
|
locator: BulkSelectionEvents;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PageHeaderType } from './types';
|
|
2
2
|
|
|
3
|
-
declare const PageHeader: ({ headerName, additionalHeaderInfo,
|
|
3
|
+
declare const PageHeader: ({ headerName, additionalHeaderInfo, showTabs, renderHeaderTabs, isBreadcrumbs, breadCrumbs, renderActionButtons, showCloseButton, onClose, markAsBeta, showAnnouncementHeader, tippyProps, }: PageHeaderType) => JSX.Element;
|
|
4
4
|
export default PageHeader;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResponseType } from '../../../Common';
|
|
1
|
+
import { ResponseType, TippyCustomizedProps } from '../../../Common';
|
|
2
2
|
|
|
3
3
|
export declare enum InstallationType {
|
|
4
4
|
OSS_KUBECTL = "oss_kubectl",
|
|
@@ -19,21 +19,23 @@ export declare enum ModuleStatus {
|
|
|
19
19
|
}
|
|
20
20
|
export interface PageHeaderType {
|
|
21
21
|
headerName?: string;
|
|
22
|
-
additionalHeaderInfo?: () => JSX.Element;
|
|
23
|
-
isTippyShown?: boolean;
|
|
24
|
-
tippyRedirectLink?: string;
|
|
25
22
|
showTabs?: boolean;
|
|
23
|
+
additionalHeaderInfo?: () => JSX.Element;
|
|
26
24
|
renderHeaderTabs?: () => JSX.Element;
|
|
27
25
|
isBreadcrumbs?: boolean;
|
|
28
26
|
breadCrumbs?: () => JSX.Element;
|
|
29
|
-
TippyIcon?: React.FunctionComponent<any>;
|
|
30
|
-
tippyMessage?: string;
|
|
31
|
-
onClickTippybutton?: () => void;
|
|
32
27
|
renderActionButtons?: () => JSX.Element;
|
|
33
28
|
showCloseButton?: boolean;
|
|
34
29
|
onClose?: () => void;
|
|
35
30
|
markAsBeta?: boolean;
|
|
36
31
|
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
|
+
};
|
|
37
39
|
}
|
|
38
40
|
export interface ServerInfo {
|
|
39
41
|
currentVersion: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ScannedByToolModalProps } from './types';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
|
|
3
|
-
declare const ScannedByToolModal:
|
|
4
|
+
declare const ScannedByToolModal: React.FC<ScannedByToolModalProps>;
|
|
4
5
|
export default ScannedByToolModal;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ScannedObjectBarProps } from './types';
|
|
2
|
+
|
|
3
|
+
declare const ScannedObjectBar: ({ criticalVulnerabilitiesCount, moderateVulnerabilitiesCount, lowVulnerabilitiesCount, objectBarClassName, removeObjectCountMargin, }: ScannedObjectBarProps) => JSX.Element;
|
|
4
|
+
export default ScannedObjectBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ScannedObjectBar } from './ScannedObjectBar';
|
|
@@ -10,6 +10,7 @@ export * from './FilterChips';
|
|
|
10
10
|
export * from './ActivityIndicator';
|
|
11
11
|
export * from './GenericSectionErrorState';
|
|
12
12
|
export * from './KeyValueList';
|
|
13
|
+
export * from './ScannedObjectBar';
|
|
13
14
|
export * from './InfoIconTippy';
|
|
14
15
|
export * from './EditableTextArea';
|
|
15
16
|
export * from './Header';
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GitTriggers
|
|
1
|
+
import { GitTriggers } 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
|
|
23
|
+
export declare const isNullOrUndefined: (value: unknown) => boolean;
|
|
24
24
|
export {};
|
|
@@ -29,7 +29,3 @@ 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
|
-
}
|
package/dist/Shared/index.d.ts
CHANGED
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType } from '../Common';
|
|
1
|
+
import { CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType } from '../Common';
|
|
3
2
|
|
|
4
3
|
export declare enum RegistryType {
|
|
5
4
|
GIT = "git",
|
|
@@ -96,91 +95,15 @@ export declare enum CIMaterialSidebarType {
|
|
|
96
95
|
CODE_SOURCE = "Code Source",
|
|
97
96
|
PARAMETERS = "Parameters"
|
|
98
97
|
}
|
|
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;
|
|
98
|
+
export interface LastExecutionResultType {
|
|
183
99
|
lastExecution: string;
|
|
100
|
+
severityCount: {
|
|
101
|
+
critical: number;
|
|
102
|
+
moderate: number;
|
|
103
|
+
low: number;
|
|
104
|
+
};
|
|
105
|
+
vulnerabilities: VulnerabilityType[];
|
|
106
|
+
scanExecutionId?: number;
|
|
184
107
|
appId?: number;
|
|
185
108
|
appName?: string;
|
|
186
109
|
envId?: number;
|
|
@@ -188,15 +111,9 @@ interface LastExecutionResultType {
|
|
|
188
111
|
pod?: string;
|
|
189
112
|
replicaSet?: string;
|
|
190
113
|
image?: string;
|
|
191
|
-
objectType
|
|
192
|
-
scanned
|
|
193
|
-
scanEnabled
|
|
194
|
-
severityCount: {
|
|
195
|
-
critical: number;
|
|
196
|
-
moderate: number;
|
|
197
|
-
low: number;
|
|
198
|
-
};
|
|
199
|
-
vulnerabilities: VulnerabilityType[];
|
|
114
|
+
objectType?: 'app' | 'chart';
|
|
115
|
+
scanned?: boolean;
|
|
116
|
+
scanEnabled?: boolean;
|
|
200
117
|
scanToolId?: number;
|
|
201
118
|
}
|
|
202
119
|
export interface LastExecutionResponseType extends ResponseType<LastExecutionResultType> {
|
|
@@ -205,8 +122,59 @@ export interface MaterialSecurityInfoType {
|
|
|
205
122
|
isScanned: boolean;
|
|
206
123
|
isScanEnabled: boolean;
|
|
207
124
|
}
|
|
208
|
-
export declare enum
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
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;
|
|
@@ -2,16 +2,6 @@ export interface ValidationResponseType {
|
|
|
2
2
|
isValid: boolean;
|
|
3
3
|
message?: string;
|
|
4
4
|
}
|
|
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
|
-
};
|
|
15
5
|
export declare const validateName: (name: string) => ValidationResponseType;
|
|
16
6
|
export declare const validateDescription: (description: string) => ValidationResponseType;
|
|
17
7
|
export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;
|