@devtron-labs/devtron-fe-common-lib 1.1.6-beta-5 → 1.1.6-beta-6
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/Common.service.d.ts +2 -1
- package/dist/Common/CustomTagSelector/Types.d.ts +0 -12
- package/dist/Common/Helper.d.ts +1 -1
- package/dist/Common/Types.d.ts +49 -55
- package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/types.d.ts +1 -2
- package/dist/Shared/Components/SelectPicker/type.d.ts +4 -5
- package/dist/Shared/Components/index.d.ts +0 -2
- package/dist/Shared/Helpers.d.ts +4 -3
- package/dist/Shared/Services/app.types.d.ts +2 -1
- package/dist/Shared/constants.d.ts +7 -0
- package/dist/Shared/types.d.ts +16 -22
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-0yJ7e6IZ.js → cssMode-D11O2E1k.js} +1 -1
- package/dist/{freemarker2-D4QfmbvG.js → freemarker2-C51qAKbA.js} +1 -1
- package/dist/{handlebars-BPfTbad8.js → handlebars-CsLZABhp.js} +1 -1
- package/dist/{html-CqjcPRya.js → html-Ia2rtvLv.js} +1 -1
- package/dist/{htmlMode-CP6arrAi.js → htmlMode-D6P0aWy3.js} +1 -1
- package/dist/{index-DWQmgQlY.js → index-z1VqANAp.js} +23794 -24150
- package/dist/index.js +487 -486
- package/dist/{javascript-DZorxUEz.js → javascript-DJ_G6r3r.js} +1 -1
- package/dist/{jsonMode-Dyws5QA1.js → jsonMode-CiHBkSy6.js} +1 -1
- package/dist/{liquid-BKRZnxM9.js → liquid-x1bT-8OB.js} +1 -1
- package/dist/{mdx-BFtQumAP.js → mdx-_kU6hLlT.js} +1 -1
- package/dist/{python-DQiPaoOf.js → python-np82lYk3.js} +1 -1
- package/dist/{razor-DpkSSGVJ.js → razor-C3FwPvAF.js} +1 -1
- package/dist/{tsMode-DbjA76K2.js → tsMode-rksQTKEo.js} +1 -1
- package/dist/{typescript-BcW8u-MZ.js → typescript-Dj_9rN80.js} +1 -1
- package/dist/{xml-D4BfkDaf.js → xml-CsQwE1Dg.js} +1 -1
- package/dist/{yaml-DN711t0M.js → yaml-BROpCidz.js} +1 -1
- package/package.json +1 -1
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/index.d.ts +0 -2
- package/dist/Shared/Components/DynamicDataTable/types.d.ts +0 -161
- package/dist/Shared/Components/DynamicDataTable/utils.d.ts +0 -5
- package/dist/Shared/Components/MultipleResizableTextArea/MultipleResizableTextArea.d.ts +0 -2
- package/dist/Shared/Components/MultipleResizableTextArea/index.d.ts +0 -2
- package/dist/Shared/Components/MultipleResizableTextArea/types.d.ts +0 -9
- package/dist/Shared/Components/SelectTextArea/SelectTextArea.d.ts +0 -2
- package/dist/Shared/Components/SelectTextArea/index.d.ts +0 -2
- package/dist/Shared/Components/SelectTextArea/types.d.ts +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
|
|
2
|
-
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
|
|
2
|
+
import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType } from './Types';
|
|
3
3
|
import { ApiResourceType } from '../Pages';
|
|
4
4
|
export declare const getTeamListMin: () => Promise<TeamList>;
|
|
5
5
|
interface UserRole extends ResponseType {
|
|
@@ -15,6 +15,7 @@ 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;
|
|
18
19
|
export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
|
|
19
20
|
export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
|
|
20
21
|
export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
|
|
@@ -4,16 +4,6 @@ export interface SuggestedTagOptionType extends OptionType {
|
|
|
4
4
|
description: string;
|
|
5
5
|
propagate: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare enum DeploymentPolicy {
|
|
8
|
-
ALLOW = "allow",
|
|
9
|
-
BLOCK = "block",
|
|
10
|
-
BLOCK_PROD = "block-prod",
|
|
11
|
-
BLOCK_NON_PROD = "block-non-prod"
|
|
12
|
-
}
|
|
13
|
-
export interface VariableValueConstraintTypes {
|
|
14
|
-
choices?: string[];
|
|
15
|
-
blockCustomValue?: boolean;
|
|
16
|
-
}
|
|
17
7
|
export interface TagType {
|
|
18
8
|
id?: number;
|
|
19
9
|
key: string;
|
|
@@ -25,8 +15,6 @@ export interface TagType {
|
|
|
25
15
|
isInvalidValue?: boolean;
|
|
26
16
|
isSuggested?: boolean;
|
|
27
17
|
isPropagateDisabled?: boolean;
|
|
28
|
-
deploymentPolicy?: DeploymentPolicy;
|
|
29
|
-
valueConstraint?: VariableValueConstraintTypes;
|
|
30
18
|
}
|
|
31
19
|
export interface TagErrorType {
|
|
32
20
|
isValid: boolean;
|
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface ConditionalWrapper<T> {
|
|
|
9
9
|
children: T;
|
|
10
10
|
}
|
|
11
11
|
export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
|
|
12
|
-
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean):
|
|
12
|
+
export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 1 | -1 | 0;
|
|
13
13
|
export declare const stopPropagation: (event: any) => void;
|
|
14
14
|
export declare const preventDefault: (event: SyntheticEvent) => void;
|
|
15
15
|
export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
|
package/dist/Common/Types.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { default as React, ReactNode, CSSProperties, ReactElement, MutableRefObject } from 'react';
|
|
2
2
|
import { TippyProps } from '@tippyjs/react';
|
|
3
|
-
import { Placement } from 'tippy.js';
|
|
4
3
|
import { UserGroupDTO } from '../Pages/GlobalConfigurations';
|
|
5
4
|
import { ImageComment, ReleaseTag } from './ImageTags.Types';
|
|
6
|
-
import { MandatoryPluginBaseStateType,
|
|
5
|
+
import { MandatoryPluginBaseStateType, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
|
|
7
6
|
import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
|
|
8
7
|
/**
|
|
9
8
|
* Generic response type object with support for overriding the result type
|
|
@@ -74,7 +73,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
|
|
|
74
73
|
noHeadingBorder?: boolean;
|
|
75
74
|
infoTextHeading?: string;
|
|
76
75
|
hideHeading?: boolean;
|
|
77
|
-
placement?:
|
|
76
|
+
placement?: TippyProps['placement'];
|
|
78
77
|
className?: string;
|
|
79
78
|
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
80
79
|
iconPath?: string;
|
|
@@ -274,21 +273,6 @@ export declare enum ManualApprovalType {
|
|
|
274
273
|
any = "ANY",
|
|
275
274
|
notConfigured = "NOT_CONFIGURED"
|
|
276
275
|
}
|
|
277
|
-
export interface UserGroupApproverType {
|
|
278
|
-
email: string;
|
|
279
|
-
hasAccess: boolean;
|
|
280
|
-
}
|
|
281
|
-
export interface ImageApprovalPolicyUserGroupDataType {
|
|
282
|
-
dataStore: Record<string, UserGroupApproverType>;
|
|
283
|
-
requiredCount: number;
|
|
284
|
-
emails: string[];
|
|
285
|
-
}
|
|
286
|
-
export interface ImageApprovalPolicyType {
|
|
287
|
-
isPolicyConfigured: boolean;
|
|
288
|
-
specificUsersData: ImageApprovalPolicyUserGroupDataType;
|
|
289
|
-
userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
|
|
290
|
-
validGroups: string[];
|
|
291
|
-
}
|
|
292
276
|
export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
|
|
293
277
|
export interface UserApprovalConfigType {
|
|
294
278
|
type: ManualApprovalType;
|
|
@@ -301,13 +285,6 @@ export interface UserApprovalConfigType {
|
|
|
301
285
|
requiredCount: number;
|
|
302
286
|
})[];
|
|
303
287
|
}
|
|
304
|
-
export type UserApprovalConfigPayloadType = ({
|
|
305
|
-
type: ManualApprovalType.any;
|
|
306
|
-
} & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
|
|
307
|
-
type: ManualApprovalType.specific;
|
|
308
|
-
} & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
|
|
309
|
-
type: ManualApprovalType.notConfigured;
|
|
310
|
-
};
|
|
311
288
|
interface ApprovalUserDataType {
|
|
312
289
|
dataId: number;
|
|
313
290
|
userActionTime: string;
|
|
@@ -317,12 +294,44 @@ interface ApprovalUserDataType {
|
|
|
317
294
|
userResponse: number;
|
|
318
295
|
userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
|
|
319
296
|
}
|
|
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
|
+
}
|
|
320
328
|
export interface UserApprovalMetadataType {
|
|
321
329
|
approvalRequestId: number;
|
|
322
|
-
approvalRuntimeState:
|
|
323
|
-
approvedUsersData: ApprovalUserDataType[];
|
|
330
|
+
approvalRuntimeState: ApprovalRuntimeStateType;
|
|
324
331
|
requestedUserData: ApprovalUserDataType;
|
|
325
|
-
|
|
332
|
+
hasCurrentUserApproved: boolean;
|
|
333
|
+
canCurrentUserApprove: boolean;
|
|
334
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
326
335
|
}
|
|
327
336
|
export declare enum FilterStates {
|
|
328
337
|
ALLOWED = 0,
|
|
@@ -379,7 +388,6 @@ export interface CDMaterialListModalServiceUtilProps {
|
|
|
379
388
|
artifactId?: number;
|
|
380
389
|
artifactStatus?: string;
|
|
381
390
|
disableDefaultSelection?: boolean;
|
|
382
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
383
391
|
}
|
|
384
392
|
export interface CDMaterialType {
|
|
385
393
|
index: number;
|
|
@@ -432,7 +440,6 @@ export interface CDMaterialType {
|
|
|
432
440
|
* Would currently only be received in case of release
|
|
433
441
|
*/
|
|
434
442
|
appWorkflowId: number;
|
|
435
|
-
deploymentBlockedState?: PolicyBlockInfo;
|
|
436
443
|
}
|
|
437
444
|
export declare enum CDMaterialServiceEnum {
|
|
438
445
|
ROLLBACK = "rollback",
|
|
@@ -469,14 +476,6 @@ export interface DownstreamNodesEnvironmentsType {
|
|
|
469
476
|
environmentId: number;
|
|
470
477
|
environmentName: string;
|
|
471
478
|
}
|
|
472
|
-
export declare enum TriggerBlockType {
|
|
473
|
-
MANDATORY_TAG = "mandatory-tags",
|
|
474
|
-
MANDATORY_PLUGIN = "mandatory-plugins"
|
|
475
|
-
}
|
|
476
|
-
export interface TriggerBlockedInfo {
|
|
477
|
-
blockedBy: TriggerBlockType;
|
|
478
|
-
blockedReason?: string;
|
|
479
|
-
}
|
|
480
479
|
export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
|
|
481
480
|
connectingCiPipelineId?: number;
|
|
482
481
|
parents: string | number[] | string[];
|
|
@@ -524,8 +523,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
|
524
523
|
primaryBranchAfterRegex?: string;
|
|
525
524
|
storageConfigured?: boolean;
|
|
526
525
|
deploymentAppDeleteRequest?: boolean;
|
|
527
|
-
|
|
528
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
526
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
529
527
|
requestedUserId?: number;
|
|
530
528
|
showPluginWarning: boolean;
|
|
531
529
|
helmPackageName?: string;
|
|
@@ -539,7 +537,6 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
|
|
|
539
537
|
downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
|
|
540
538
|
cipipelineId?: number;
|
|
541
539
|
isDeploymentBlocked?: boolean;
|
|
542
|
-
triggerBlockedInfo?: TriggerBlockedInfo;
|
|
543
540
|
}
|
|
544
541
|
export declare enum DeploymentAppTypes {
|
|
545
542
|
HELM = "helm",
|
|
@@ -583,14 +580,17 @@ export interface FilterConditionsListType {
|
|
|
583
580
|
description: string;
|
|
584
581
|
conditions: FilterConditionsInfo[];
|
|
585
582
|
}
|
|
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
|
+
}
|
|
586
591
|
export interface CDMaterialsApprovalInfo {
|
|
587
|
-
approvalUsers: string[];
|
|
588
|
-
userApprovalConfig: UserApprovalConfigType;
|
|
589
592
|
canApproverDeploy: boolean;
|
|
590
|
-
|
|
591
|
-
* Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
|
|
592
|
-
*/
|
|
593
|
-
imageApprovalPolicyDetails: ImageApprovalPolicyType;
|
|
593
|
+
deploymentApprovalInfo: DeploymentApprovalInfoType;
|
|
594
594
|
}
|
|
595
595
|
export interface CDMaterialsMetaInfo {
|
|
596
596
|
tagsEditable: boolean;
|
|
@@ -603,7 +603,6 @@ export interface CDMaterialsMetaInfo {
|
|
|
603
603
|
*/
|
|
604
604
|
requestedUserId: number;
|
|
605
605
|
runtimeParams: RuntimeParamsListItemType[];
|
|
606
|
-
deploymentBlockedState?: PolicyBlockInfo;
|
|
607
606
|
}
|
|
608
607
|
export interface ImagePromotionMaterialInfo {
|
|
609
608
|
isApprovalPendingForPromotion: boolean;
|
|
@@ -670,7 +669,6 @@ export interface AppEnvironment {
|
|
|
670
669
|
appStatus?: string;
|
|
671
670
|
deploymentAppDeleteRequest?: boolean;
|
|
672
671
|
isVirtualEnvironment?: boolean;
|
|
673
|
-
isProtected?: boolean;
|
|
674
672
|
pipelineId?: number;
|
|
675
673
|
latestCdWorkflowRunnerId?: number;
|
|
676
674
|
commits?: string[];
|
|
@@ -697,7 +695,6 @@ export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
|
|
|
697
695
|
triggerType: string;
|
|
698
696
|
name: string;
|
|
699
697
|
status: string;
|
|
700
|
-
triggerBlockedInfo?: TriggerBlockedInfo;
|
|
701
698
|
}
|
|
702
699
|
export interface CdPipeline {
|
|
703
700
|
id: number;
|
|
@@ -722,7 +719,6 @@ export interface CdPipeline {
|
|
|
722
719
|
parentPipelineType?: string;
|
|
723
720
|
deploymentAppDeleteRequest?: boolean;
|
|
724
721
|
deploymentAppCreated?: boolean;
|
|
725
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
726
722
|
isVirtualEnvironment?: boolean;
|
|
727
723
|
deploymentAppType: DeploymentAppTypes;
|
|
728
724
|
helmPackageName?: string;
|
|
@@ -731,8 +727,7 @@ export interface CdPipeline {
|
|
|
731
727
|
isProdEnv?: boolean;
|
|
732
728
|
isGitOpsRepoNotConfigured?: boolean;
|
|
733
729
|
isDeploymentBlocked?: boolean;
|
|
734
|
-
|
|
735
|
-
triggerBlockedInfo?: TriggerBlockedInfo;
|
|
730
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
736
731
|
}
|
|
737
732
|
export interface ExternalCiConfig {
|
|
738
733
|
id: number;
|
|
@@ -834,12 +829,11 @@ export interface Point {
|
|
|
834
829
|
export interface EdgeNodeType {
|
|
835
830
|
height: number;
|
|
836
831
|
width: number;
|
|
837
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
838
832
|
type?: any;
|
|
839
833
|
id?: number | string;
|
|
840
834
|
}
|
|
841
835
|
export interface EdgeEndNodeType extends EdgeNodeType {
|
|
842
|
-
|
|
836
|
+
approvalConfigData: ApprovalConfigDataType;
|
|
843
837
|
}
|
|
844
838
|
/**
|
|
845
839
|
* Search params for sorting configuration
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
|
|
2
|
-
import { DeploymentAppTypes
|
|
2
|
+
import { DeploymentAppTypes } from '../../../../../Common/Types';
|
|
3
3
|
import { DeploymentStrategy } from '../../../../../Shared/Components';
|
|
4
4
|
import { EnvListMinDTO } from '../../../../../Shared/types';
|
|
5
5
|
interface ConfigSecretType {
|
|
@@ -53,7 +53,6 @@ export interface CDFormType {
|
|
|
53
53
|
secrets: ConfigSecretType[];
|
|
54
54
|
};
|
|
55
55
|
requiredApprovals: string;
|
|
56
|
-
userApprovalConfig?: UserApprovalConfigType;
|
|
57
56
|
isClusterCdActive: boolean;
|
|
58
57
|
deploymentAppCreated: boolean;
|
|
59
58
|
clusterId: string;
|
|
@@ -24,10 +24,6 @@ export interface SelectPickerOptionType<OptionValue = string | number> extends O
|
|
|
24
24
|
tooltipProps?: Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'shortcutKeyCombo'> | (Omit<TooltipProps, 'alwaysShowTippyOnHover' | 'showOnTruncate' | 'content'> & Required<Pick<TooltipProps, 'shortcutKeyCombo'>>);
|
|
25
25
|
}
|
|
26
26
|
type SelectProps<OptionValue, IsMulti extends boolean> = ReactSelectProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>;
|
|
27
|
-
export declare enum SelectPickerVariantType {
|
|
28
|
-
DEFAULT = "default",
|
|
29
|
-
BORDER_LESS = "border-less"
|
|
30
|
-
}
|
|
31
27
|
declare module 'react-select/base' {
|
|
32
28
|
interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
33
29
|
/**
|
|
@@ -59,9 +55,12 @@ declare module 'react-select/base' {
|
|
|
59
55
|
* @default 'true'
|
|
60
56
|
*/
|
|
61
57
|
showSelectedOptionIcon?: boolean;
|
|
62
|
-
variant?: SelectPickerVariantType;
|
|
63
58
|
}
|
|
64
59
|
}
|
|
60
|
+
export declare enum SelectPickerVariantType {
|
|
61
|
+
DEFAULT = "default",
|
|
62
|
+
BORDER_LESS = "border-less"
|
|
63
|
+
}
|
|
65
64
|
export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
|
|
66
65
|
/**
|
|
67
66
|
* Error message for the select
|
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 } from '../Common';
|
|
4
|
+
import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } 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,12 +40,13 @@ 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
|
|
43
|
+
export declare const sanitizeUserApprovalList: (approverList: UserApprovalInfo["approverList"]) => UserApprovalInfo["approverList"];
|
|
44
|
+
export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
|
|
44
45
|
/**
|
|
45
46
|
* Manual approval is considered configured only if the type is not notConfigured
|
|
46
47
|
*/
|
|
47
48
|
export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
|
|
48
|
-
export declare const
|
|
49
|
+
export declare const getIsApprovalPolicyConfigured: (approvalConfigData: ApprovalConfigDataType) => boolean;
|
|
49
50
|
/**
|
|
50
51
|
* @description - Function to open a new tab with the given url
|
|
51
52
|
* @param url - url to be opened in new tab
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReleaseTag } from '../../Common';
|
|
1
|
+
import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
|
|
2
2
|
interface WebhookDataType {
|
|
3
3
|
id: number;
|
|
4
4
|
eventActionType: string;
|
|
@@ -132,6 +132,7 @@ export interface DraftMetadataDTO {
|
|
|
132
132
|
commentsCount: number;
|
|
133
133
|
dataEncrypted: boolean;
|
|
134
134
|
isAppAdmin: boolean;
|
|
135
|
+
userApprovalMetadata: UserApprovalMetadataType;
|
|
135
136
|
}
|
|
136
137
|
export declare enum CMSecretExternalType {
|
|
137
138
|
Internal = "",
|
|
@@ -417,4 +417,11 @@ 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;
|
|
420
427
|
export declare const DEVTRON_BASE_MAIN_ID = "devtron-base-main-identifier";
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Dayjs } from 'dayjs';
|
|
2
|
-
import {
|
|
2
|
+
import { ApprovalConfigDataType } from '../Common/Types';
|
|
3
|
+
import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
|
|
3
4
|
import { KeyValueListType } from './Components';
|
|
4
|
-
import { EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
5
|
+
import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
|
|
5
6
|
export declare enum EnvType {
|
|
6
7
|
CHART = "helm_charts",
|
|
7
8
|
APPLICATION = "apps"
|
|
@@ -246,7 +247,7 @@ export interface WorkflowType {
|
|
|
246
247
|
showTippy?: boolean;
|
|
247
248
|
appId?: number;
|
|
248
249
|
isSelected?: boolean;
|
|
249
|
-
approvalConfiguredIdsMap?: Record<number,
|
|
250
|
+
approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
|
|
250
251
|
imageReleaseTags: string[];
|
|
251
252
|
appReleaseTags?: string[];
|
|
252
253
|
tagsEditable?: boolean;
|
|
@@ -403,7 +404,8 @@ export interface SeverityCount {
|
|
|
403
404
|
export declare enum PolicyKindType {
|
|
404
405
|
lockConfiguration = "lock-configuration",
|
|
405
406
|
imagePromotion = "image-promotion",
|
|
406
|
-
plugins = "plugin"
|
|
407
|
+
plugins = "plugin",
|
|
408
|
+
approval = "approval"
|
|
407
409
|
}
|
|
408
410
|
export interface LastExecutionResultType {
|
|
409
411
|
lastExecution: string;
|
|
@@ -735,26 +737,18 @@ export interface DynamicTabType extends CommonTabArgsType {
|
|
|
735
737
|
*/
|
|
736
738
|
lastActiveTabId: string | null;
|
|
737
739
|
}
|
|
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'>>;
|
|
738
750
|
export interface PreventOutsideFocusProps {
|
|
739
751
|
identifier: string;
|
|
740
752
|
preventFocus: boolean;
|
|
741
753
|
}
|
|
742
|
-
export interface PolicyBlockInfo {
|
|
743
|
-
isBlocked: boolean;
|
|
744
|
-
blockedBy: TriggerBlockType;
|
|
745
|
-
reason: string;
|
|
746
|
-
}
|
|
747
|
-
export interface PipelineStageBlockInfo {
|
|
748
|
-
node: PolicyBlockInfo;
|
|
749
|
-
pre: PolicyBlockInfo;
|
|
750
|
-
post: PolicyBlockInfo;
|
|
751
|
-
}
|
|
752
|
-
export interface PolicyConsequencesDTO {
|
|
753
|
-
cd: PipelineStageBlockInfo;
|
|
754
|
-
ci: PipelineStageBlockInfo;
|
|
755
|
-
}
|
|
756
|
-
export interface GetPolicyConsequencesProps {
|
|
757
|
-
appId: number;
|
|
758
|
-
envId: number;
|
|
759
|
-
}
|
|
760
754
|
export {};
|