@devtron-labs/devtron-fe-common-lib 1.2.3-beta-3 → 1.2.3-beta-5
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/{@code-editor-BtJfwdMs.js → @code-editor-2WOoAUF_.js} +3813 -3866
- package/dist/{@common-rjsf-Bk3LX7Z6.js → @common-rjsf-BcNqr3vn.js} +1 -1
- package/dist/Common/Common.service.d.ts +1 -2
- package/dist/Common/Helper.d.ts +3 -2
- package/dist/Common/Types.d.ts +41 -50
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +2 -1
- package/dist/Shared/Components/FeatureDescription/FeatureDescriptionModal.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/FeatureTitleWithInfo.d.ts +1 -1
- package/dist/Shared/Components/FeatureDescription/types.d.ts +6 -34
- package/dist/Shared/Helpers.d.ts +3 -4
- package/dist/Shared/Services/app.types.d.ts +1 -2
- package/dist/Shared/constants.d.ts +0 -7
- package/dist/Shared/types.d.ts +5 -17
- package/dist/index.js +599 -605
- package/package.json +1 -1
- /package/dist/assets/{ic-arrow-square-out.3d1a0d41.svg → ic-arrow-square-out.1be837ac.svg} +0 -0
|
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-RU8AW1bK.js";
|
|
|
2
2
|
import E, { forwardRef as $ } from "react";
|
|
3
3
|
import L, { getDefaultRegistry as k } from "@rjsf/core";
|
|
4
4
|
import D from "@rjsf/validator-ajv8";
|
|
5
|
-
import { T as y, c as H, a as J, d as w } from "./@code-editor-
|
|
5
|
+
import { T as y, c as H, a as J, d as w } from "./@code-editor-2WOoAUF_.js";
|
|
6
6
|
import M, { components as O } from "react-select";
|
|
7
7
|
import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as U, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as V, TranslatableString as q, titleId as K, canExpand as Y, deepEquals as z } from "@rjsf/utils";
|
|
8
8
|
import { ReactComponent as G } from "./assets/ic-chevron-down.fc70d7a7.svg";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
|
|
2
|
-
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse
|
|
2
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
|
3
3
|
import { ApiResourceType } from '../Pages';
|
|
4
4
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
|
5
5
|
interface UserRole extends ResponseType {
|
|
@@ -15,7 +15,6 @@ export declare const SourceTypeMap: {
|
|
|
15
15
|
};
|
|
16
16
|
export declare function getUserRole(appName?: string): Promise<UserRole>;
|
|
17
17
|
export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
|
|
18
|
-
export declare const sanitizeUserApprovalMetadata: (userApprovalMetadata: UserApprovalMetadataType) => UserApprovalMetadataType;
|
|
19
18
|
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
|
|
20
19
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
21
20
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { default as React, SyntheticEvent } from 'react';
|
|
|
2
2
|
import { JSONPathOptions } from 'jsonpath-plus';
|
|
3
3
|
import { AsyncOptions, UseSearchString } from './Types';
|
|
4
4
|
import { scrollableInterface } from '../Shared';
|
|
5
|
+
import * as Sentry from '@sentry/browser';
|
|
5
6
|
export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
|
|
6
7
|
interface ConditionalWrapper<T> {
|
|
7
8
|
condition: boolean;
|
|
@@ -9,7 +10,7 @@ interface ConditionalWrapper<T> {
|
|
|
9
10
|
children: T;
|
|
10
11
|
}
|
|
11
12
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
|
12
|
-
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean):
|
|
13
|
+
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 0 | 1 | -1;
|
|
13
14
|
export declare const stopPropagation: (event: any) => void;
|
|
14
15
|
export declare const preventDefault: (event: SyntheticEvent) => void;
|
|
15
16
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
|
@@ -45,7 +46,7 @@ export declare const getUrlWithSearchParams: <T extends string | number = string
|
|
|
45
46
|
/**
|
|
46
47
|
* Custom exception logger function for logging errors to sentry
|
|
47
48
|
*/
|
|
48
|
-
export declare const logExceptionToSentry:
|
|
49
|
+
export declare const logExceptionToSentry: typeof Sentry.captureException;
|
|
49
50
|
export declare const customStyles: {
|
|
50
51
|
control: (base: any, state: any) => any;
|
|
51
52
|
indicatorSeparator: (base: any, state: any) => any;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Placement } from 'tippy.js';
|
|
3
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
4
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
5
5
|
import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
|
|
@@ -65,7 +65,7 @@ export interface CheckboxProps {
|
|
|
65
65
|
id?: string;
|
|
66
66
|
dataTestId?: string;
|
|
67
67
|
}
|
|
68
|
-
export interface TippyCustomizedProps
|
|
68
|
+
export interface TippyCustomizedProps {
|
|
69
69
|
theme: TippyTheme;
|
|
70
70
|
visible?: boolean;
|
|
71
71
|
heading?: ReactNode | string;
|
|
@@ -73,7 +73,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
|
|
|
73
73
|
noHeadingBorder?: boolean;
|
|
74
74
|
infoTextHeading?: string;
|
|
75
75
|
hideHeading?: boolean;
|
|
76
|
-
placement?:
|
|
76
|
+
placement?: Placement;
|
|
77
77
|
className?: string;
|
|
78
78
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
79
79
|
iconPath?: string;
|
|
@@ -273,6 +273,21 @@ export declare enum ManualApprovalType {
|
|
|
273
273
|
any = "ANY",
|
|
274
274
|
notConfigured = "NOT_CONFIGURED"
|
|
275
275
|
}
|
|
276
|
+
export interface UserGroupApproverType {
|
|
277
|
+
email: string;
|
|
278
|
+
hasAccess: boolean;
|
|
279
|
+
}
|
|
280
|
+
export interface ImageApprovalPolicyUserGroupDataType {
|
|
281
|
+
dataStore: Record<string, UserGroupApproverType>;
|
|
282
|
+
requiredCount: number;
|
|
283
|
+
emails: string[];
|
|
284
|
+
}
|
|
285
|
+
export interface ImageApprovalPolicyType {
|
|
286
|
+
isPolicyConfigured: boolean;
|
|
287
|
+
specificUsersData: ImageApprovalPolicyUserGroupDataType;
|
|
288
|
+
userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
|
|
289
|
+
validGroups: string[];
|
|
290
|
+
}
|
|
276
291
|
export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
|
|
277
292
|
export interface UserApprovalConfigType {
|
|
278
293
|
type: ManualApprovalType;
|
|
@@ -285,6 +300,13 @@ export interface UserApprovalConfigType {
|
|
|
285
300
|
requiredCount: number;
|
|
286
301
|
})[];
|
|
287
302
|
}
|
|
303
|
+
export type UserApprovalConfigPayloadType = ({
|
|
304
|
+
type: ManualApprovalType.any;
|
|
305
|
+
} & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
|
|
306
|
+
type: ManualApprovalType.specific;
|
|
307
|
+
} & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
|
|
308
|
+
type: ManualApprovalType.notConfigured;
|
|
309
|
+
};
|
|
288
310
|
interface ApprovalUserDataType {
|
|
289
311
|
dataId: number;
|
|
290
312
|
userActionTime: string;
|
|
@@ -294,44 +316,12 @@ interface ApprovalUserDataType {
|
|
|
294
316
|
userResponse: number;
|
|
295
317
|
userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
|
|
296
318
|
}
|
|
297
|
-
export interface UserApprovalInfo {
|
|
298
|
-
requiredCount: number;
|
|
299
|
-
currentCount: number;
|
|
300
|
-
approverList: {
|
|
301
|
-
hasApproved: boolean;
|
|
302
|
-
canApprove: boolean;
|
|
303
|
-
identifier: string;
|
|
304
|
-
}[];
|
|
305
|
-
}
|
|
306
|
-
export declare enum ApprovalConfigDataKindType {
|
|
307
|
-
configMap = "CM",
|
|
308
|
-
configSecret = "CS",
|
|
309
|
-
deploymentTemplate = "DEPLOYMENT_TEMPLATE"
|
|
310
|
-
}
|
|
311
|
-
export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
|
|
312
|
-
kind: ApprovalConfigDataKindType | null;
|
|
313
|
-
anyUserApprovedInfo: UserApprovalInfo;
|
|
314
|
-
specificUsersApprovedInfo: UserApprovalInfo;
|
|
315
|
-
userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
|
|
316
|
-
userGroups: (UserApprovalInfo & {
|
|
317
|
-
groupIdentifier: UserGroupDTO['identifier'];
|
|
318
|
-
groupName: UserGroupDTO['name'];
|
|
319
|
-
})[];
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
export declare enum ApprovalRuntimeStateType {
|
|
323
|
-
init = 0,
|
|
324
|
-
requested = 1,
|
|
325
|
-
approved = 2,
|
|
326
|
-
consumed = 3
|
|
327
|
-
}
|
|
328
319
|
export interface UserApprovalMetadataType {
|
|
329
320
|
approvalRequestId: number;
|
|
330
|
-
approvalRuntimeState:
|
|
321
|
+
approvalRuntimeState: number;
|
|
322
|
+
approvedUsersData: ApprovalUserDataType[];
|
|
331
323
|
requestedUserData: ApprovalUserDataType;
|
|
332
|
-
|
|
333
|
-
canCurrentUserApprove: boolean;
|
|
334
|
-
approvalConfigData: ApprovalConfigDataType;
|
|
324
|
+
approvalConfig?: UserApprovalConfigType;
|
|
335
325
|
}
|
|
336
326
|
export declare enum FilterStates {
|
|
337
327
|
ALLOWED = 0,
|
|
@@ -388,6 +378,7 @@ export interface CDMaterialListModalServiceUtilProps {
|
|
|
388
378
|
artifactId?: number;
|
|
389
379
|
artifactStatus?: string;
|
|
390
380
|
disableDefaultSelection?: boolean;
|
|
381
|
+
userApprovalConfig?: UserApprovalConfigType;
|
|
391
382
|
}
|
|
392
383
|
export interface CDMaterialType {
|
|
393
384
|
index: number;
|
|
@@ -523,7 +514,8 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
|
523
514
|
primaryBranchAfterRegex?: string;
|
|
524
515
|
storageConfigured?: boolean;
|
|
525
516
|
deploymentAppDeleteRequest?: boolean;
|
|
526
|
-
|
|
517
|
+
approvalUsers?: string[];
|
|
518
|
+
userApprovalConfig?: UserApprovalConfigType;
|
|
527
519
|
requestedUserId?: number;
|
|
528
520
|
showPluginWarning: boolean;
|
|
529
521
|
helmPackageName?: string;
|
|
@@ -580,17 +572,14 @@ export interface FilterConditionsListType {
|
|
|
580
572
|
description: string;
|
|
581
573
|
conditions: FilterConditionsInfo[];
|
|
582
574
|
}
|
|
583
|
-
export interface DeploymentApprovalInfoType {
|
|
584
|
-
eligibleApprovers: {
|
|
585
|
-
specificUsers: Pick<UserApprovalInfo, 'approverList'>;
|
|
586
|
-
anyUsers: Pick<UserApprovalInfo, 'approverList'>;
|
|
587
|
-
userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
|
|
588
|
-
};
|
|
589
|
-
approvalConfigData: ApprovalConfigDataType;
|
|
590
|
-
}
|
|
591
575
|
export interface CDMaterialsApprovalInfo {
|
|
576
|
+
approvalUsers: string[];
|
|
577
|
+
userApprovalConfig: UserApprovalConfigType;
|
|
592
578
|
canApproverDeploy: boolean;
|
|
593
|
-
|
|
579
|
+
/**
|
|
580
|
+
* Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
|
|
581
|
+
*/
|
|
582
|
+
imageApprovalPolicyDetails: ImageApprovalPolicyType;
|
|
594
583
|
}
|
|
595
584
|
export interface CDMaterialsMetaInfo {
|
|
596
585
|
tagsEditable: boolean;
|
|
@@ -669,6 +658,7 @@ export interface AppEnvironment {
|
|
|
669
658
|
appStatus?: string;
|
|
670
659
|
deploymentAppDeleteRequest?: boolean;
|
|
671
660
|
isVirtualEnvironment?: boolean;
|
|
661
|
+
isProtected?: boolean;
|
|
672
662
|
pipelineId?: number;
|
|
673
663
|
latestCdWorkflowRunnerId?: number;
|
|
674
664
|
commits?: string[];
|
|
@@ -719,6 +709,7 @@ export interface CdPipeline {
|
|
|
719
709
|
parentPipelineType?: string;
|
|
720
710
|
deploymentAppDeleteRequest?: boolean;
|
|
721
711
|
deploymentAppCreated?: boolean;
|
|
712
|
+
userApprovalConfig?: UserApprovalConfigType;
|
|
722
713
|
isVirtualEnvironment?: boolean;
|
|
723
714
|
deploymentAppType: DeploymentAppTypes;
|
|
724
715
|
helmPackageName?: string;
|
|
@@ -727,7 +718,6 @@ export interface CdPipeline {
|
|
|
727
718
|
isProdEnv?: boolean;
|
|
728
719
|
isGitOpsRepoNotConfigured?: boolean;
|
|
729
720
|
isDeploymentBlocked?: boolean;
|
|
730
|
-
approvalConfigData: ApprovalConfigDataType;
|
|
731
721
|
}
|
|
732
722
|
export interface ExternalCiConfig {
|
|
733
723
|
id: number;
|
|
@@ -829,11 +819,12 @@ export interface Point {
|
|
|
829
819
|
export interface EdgeNodeType {
|
|
830
820
|
height: number;
|
|
831
821
|
width: number;
|
|
822
|
+
userApprovalConfig?: UserApprovalConfigType;
|
|
832
823
|
type?: any;
|
|
833
824
|
id?: number | string;
|
|
834
825
|
}
|
|
835
826
|
export interface EdgeEndNodeType extends EdgeNodeType {
|
|
836
|
-
|
|
827
|
+
userApprovalConfig?: UserApprovalConfigType;
|
|
837
828
|
}
|
|
838
829
|
/**
|
|
839
830
|
* Search params for sorting configuration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
|
|
2
|
-
import { DeploymentAppTypes } from '../../../../../Common/Types';
|
|
2
|
+
import { DeploymentAppTypes, UserApprovalConfigType } from '../../../../../Common/Types';
|
|
3
3
|
import { DeploymentStrategy } from '../../../../../Shared/Components';
|
|
4
4
|
import { EnvListMinDTO } from '../../../../../Shared/types';
|
|
5
5
|
interface ConfigSecretType {
|
|
@@ -53,6 +53,7 @@ export interface CDFormType {
|
|
|
53
53
|
secrets: ConfigSecretType[];
|
|
54
54
|
};
|
|
55
55
|
requiredApprovals: string;
|
|
56
|
+
userApprovalConfig?: UserApprovalConfigType;
|
|
56
57
|
isClusterCdActive: boolean;
|
|
57
58
|
deploymentAppCreated: boolean;
|
|
58
59
|
clusterId: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FeatureDescriptionModalProps } from './types';
|
|
2
|
-
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles,
|
|
2
|
+
export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: FeatureDescriptionModalProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { DescriptorProps } from './types';
|
|
2
|
-
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon,
|
|
2
|
+
declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, }: DescriptorProps) => JSX.Element;
|
|
3
3
|
export default FeatureTitleWithInfo;
|
|
@@ -1,44 +1,17 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
2
|
import { ImageType } from '../../../Common';
|
|
3
3
|
import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
|
|
4
|
-
interface
|
|
4
|
+
export interface FeatureDescriptionModalProps {
|
|
5
|
+
title: string;
|
|
5
6
|
renderDescriptionContent?: () => ReactNode;
|
|
7
|
+
closeModalText?: string;
|
|
6
8
|
docLink?: string;
|
|
9
|
+
closeModal?: () => void;
|
|
7
10
|
imageVariant?: ImageType;
|
|
8
11
|
SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
9
12
|
imageStyles?: React.CSSProperties;
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* If provided, tabs are shown and have higher precedence over normal modal
|
|
14
|
-
*/
|
|
15
|
-
tabsConfig: ({
|
|
16
|
-
/**
|
|
17
|
-
* Unique id of the tab
|
|
18
|
-
*/
|
|
19
|
-
id: string;
|
|
20
|
-
/**
|
|
21
|
-
* Title for the tab
|
|
22
|
-
*/
|
|
23
|
-
title: string;
|
|
24
|
-
} & BaseFeatureDescriptionModalProps)[];
|
|
25
|
-
} & {
|
|
26
|
-
renderDescriptionContent?: never;
|
|
27
|
-
docLink?: never;
|
|
28
|
-
imageVariant?: never;
|
|
29
|
-
SVGImage?: never;
|
|
30
|
-
imageStyles?: never;
|
|
31
|
-
};
|
|
32
|
-
export type FeatureDescriptionModalProps = {
|
|
33
|
-
title: string;
|
|
34
|
-
closeModalText?: string;
|
|
35
|
-
closeModal?: () => void;
|
|
36
|
-
} & ((BaseFeatureDescriptionModalProps & {
|
|
37
|
-
tabsConfig?: never;
|
|
38
|
-
}) | FeatureDescriptionModalWithTabsConfig);
|
|
39
|
-
export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'> & {
|
|
40
|
-
tabsConfig?: never;
|
|
41
|
-
}) | (Pick<FeatureDescriptionModalProps, 'title' | 'closeModalText' | 'closeModal'> & FeatureDescriptionModalWithTabsConfig)) & {
|
|
14
|
+
export interface DescriptorProps extends FeatureDescriptionModalProps {
|
|
42
15
|
breadCrumbs?: Breadcrumb[];
|
|
43
16
|
additionalContainerClasses?: string;
|
|
44
17
|
iconClassName?: string;
|
|
@@ -53,5 +26,4 @@ export type DescriptorProps = ((Omit<FeatureDescriptionModalProps, 'tabsConfig'>
|
|
|
53
26
|
* @default false
|
|
54
27
|
*/
|
|
55
28
|
showInfoIcon?: boolean;
|
|
56
|
-
}
|
|
57
|
-
export {};
|
|
29
|
+
}
|
package/dist/Shared/Helpers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Pair } from 'yaml';
|
|
3
3
|
import { MaterialHistoryType } from '@Shared/Services/app.types';
|
|
4
|
-
import { MaterialInfo, SortingOrder, UserApprovalConfigType
|
|
4
|
+
import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
|
|
5
5
|
import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
|
|
6
6
|
import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
|
|
7
7
|
interface HighlightSearchTextProps {
|
|
@@ -40,13 +40,12 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
|
|
|
40
40
|
export declare const isTimeStringAvailable: (time: string) => boolean;
|
|
41
41
|
export declare const getTimeDifference: (startTime: string, endTime: string) => string;
|
|
42
42
|
export declare const getFileNameFromHeaders: (headers: Headers) => string;
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
|
|
43
|
+
export declare const sanitizeUserApprovalConfig: (userApprovalConfig: UserApprovalConfigType) => UserApprovalConfigType;
|
|
45
44
|
/**
|
|
46
45
|
* Manual approval is considered configured only if the type is not notConfigured
|
|
47
46
|
*/
|
|
48
47
|
export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
|
49
|
-
export declare const
|
|
48
|
+
export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
|
50
49
|
/**
|
|
51
50
|
* @description - Function to open a new tab with the given url
|
|
52
51
|
* @param url - url to be opened in new tab
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReleaseTag
|
|
1
|
+
import { ReleaseTag } from '../../Common';
|
|
2
2
|
interface WebhookDataType {
|
|
3
3
|
id: number;
|
|
4
4
|
eventActionType: string;
|
|
@@ -132,7 +132,6 @@ export interface DraftMetadataDTO {
|
|
|
132
132
|
commentsCount: number;
|
|
133
133
|
dataEncrypted: boolean;
|
|
134
134
|
isAppAdmin: boolean;
|
|
135
|
-
userApprovalMetadata: UserApprovalMetadataType;
|
|
136
135
|
}
|
|
137
136
|
export declare enum CMSecretExternalType {
|
|
138
137
|
Internal = "",
|
|
@@ -417,11 +417,4 @@ export declare const ALL_RESOURCE_KIND_FILTER = "all";
|
|
|
417
417
|
export declare const OPEN_NEW_TICKET = "https://enterprise.devtron.ai/portal/en/newticket";
|
|
418
418
|
export declare const VIEW_ALL_TICKETS = "https://enterprise.devtron.ai/portal/en/myarea";
|
|
419
419
|
export declare const RAISE_ISSUE = "https://github.com/devtron-labs/devtron/issues/new/choose";
|
|
420
|
-
export declare const TARGET_IDS: {
|
|
421
|
-
WORKFLOW_EDITOR_CONTAINER: string;
|
|
422
|
-
};
|
|
423
|
-
/**
|
|
424
|
-
* Env ID to get the data for base configuration
|
|
425
|
-
*/
|
|
426
|
-
export declare const BASE_CONFIGURATION_ENV_ID = -1;
|
|
427
420
|
export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
-
import {
|
|
3
|
-
import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
2
|
+
import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
4
3
|
import { KeyValueListType } from './Components';
|
|
5
|
-
import {
|
|
4
|
+
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
6
5
|
export declare enum EnvType {
|
|
7
6
|
CHART = "helm_charts",
|
|
8
7
|
APPLICATION = "apps"
|
|
@@ -187,7 +186,7 @@ export interface AppDetails {
|
|
|
187
186
|
clusterName?: string;
|
|
188
187
|
dockerRegistryId?: string;
|
|
189
188
|
deploymentAppDeleteRequest?: boolean;
|
|
190
|
-
|
|
189
|
+
userApprovalConfig?: string;
|
|
191
190
|
isVirtualEnvironment?: boolean;
|
|
192
191
|
imageTag?: string;
|
|
193
192
|
helmPackageName?: string;
|
|
@@ -247,7 +246,7 @@ export interface WorkflowType {
|
|
|
247
246
|
showTippy?: boolean;
|
|
248
247
|
appId?: number;
|
|
249
248
|
isSelected?: boolean;
|
|
250
|
-
approvalConfiguredIdsMap?: Record<number,
|
|
249
|
+
approvalConfiguredIdsMap?: Record<number, UserApprovalConfigType>;
|
|
251
250
|
imageReleaseTags: string[];
|
|
252
251
|
appReleaseTags?: string[];
|
|
253
252
|
tagsEditable?: boolean;
|
|
@@ -404,8 +403,7 @@ export interface SeverityCount {
|
|
|
404
403
|
export declare enum PolicyKindType {
|
|
405
404
|
lockConfiguration = "lock-configuration",
|
|
406
405
|
imagePromotion = "image-promotion",
|
|
407
|
-
plugins = "plugin"
|
|
408
|
-
approval = "approval"
|
|
406
|
+
plugins = "plugin"
|
|
409
407
|
}
|
|
410
408
|
export interface LastExecutionResultType {
|
|
411
409
|
lastExecution: string;
|
|
@@ -737,16 +735,6 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
|
737
735
|
*/
|
|
738
736
|
lastActiveTabId: string | null;
|
|
739
737
|
}
|
|
740
|
-
export interface ResourceApprovalPolicyConfigDTO {
|
|
741
|
-
appId: number;
|
|
742
|
-
envId: number;
|
|
743
|
-
approvalConfigurations: ApprovalConfigDataType[];
|
|
744
|
-
}
|
|
745
|
-
export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalPolicyConfigDTO, 'state' | 'approvalConfigurations'> {
|
|
746
|
-
isApprovalApplicable: boolean;
|
|
747
|
-
approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
|
|
748
|
-
}
|
|
749
|
-
export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
|
|
750
738
|
export interface PreventOutsideFocusProps {
|
|
751
739
|
identifier: string;
|
|
752
740
|
preventFocus: boolean;
|