@devtron-labs/devtron-fe-common-lib 1.2.17-beta-2 → 1.2.17-beta-4

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.
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-BG3OpQCq.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-DokNNq3L.js";
5
+ import { T as y, c as H, a as J, d as w } from "./@code-editor-CYQLzc_i.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";
@@ -209,10 +209,6 @@ export interface DockerConfigOverrideType {
209
209
  dockerRepository: string;
210
210
  ciBuildConfig: CIBuildConfigType;
211
211
  }
212
- export declare enum WORKFLOW_CACHE_CONFIG_ENUM {
213
- INHERIT = "INHERIT",
214
- OVERRIDE = "OVERRIDE"
215
- }
216
212
  export interface FormType {
217
213
  name: string;
218
214
  args: {
@@ -251,11 +247,6 @@ export interface FormType {
251
247
  isDockerConfigOverridden?: boolean;
252
248
  dockerConfigOverride?: DockerConfigOverrideType;
253
249
  isOffendingMandatoryPlugin?: boolean;
254
- workflowCacheConfig?: {
255
- type: WORKFLOW_CACHE_CONFIG_ENUM;
256
- value: boolean;
257
- globalValue: boolean;
258
- };
259
250
  }
260
251
  export interface ErrorObj {
261
252
  isValid: boolean;
@@ -1,6 +1,6 @@
1
1
  import { MutableRefObject } from 'react';
2
2
  import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '../Shared/types';
3
- import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, GlobalVariableOptionType } from './Types';
3
+ import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, UserApprovalMetadataType, GlobalVariableOptionType } from './Types';
4
4
  import { ApiResourceType } from '../Pages';
5
5
  export declare const getTeamListMin: () => Promise<TeamList>;
6
6
  interface UserRole extends ResponseType {
@@ -16,6 +16,7 @@ export declare const SourceTypeMap: {
16
16
  };
17
17
  export declare function getUserRole(appName?: string): Promise<UserRole>;
18
18
  export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
19
+ export declare const sanitizeUserApprovalMetadata: (userApprovalMetadata: UserApprovalMetadataType) => UserApprovalMetadataType;
19
20
  export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimePluginVariables[];
20
21
  export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
21
22
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
@@ -10,7 +10,7 @@ interface ConditionalWrapper<T> {
10
10
  children: T;
11
11
  }
12
12
  export declare const ConditionalWrap: React.FC<ConditionalWrapper<any>>;
13
- export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 0 | 1 | -1;
13
+ export declare function sortCallback(key: string, a: any, b: any, isCaseSensitive?: boolean): 1 | -1 | 0;
14
14
  export declare const stopPropagation: (event: any) => void;
15
15
  export declare const preventDefault: (event: SyntheticEvent) => void;
16
16
  export declare function useThrottledEffect(callback: any, delay: any, deps?: any[]): void;
@@ -1,6 +1,5 @@
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
5
  import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity } from '../Shared';
@@ -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?: Placement;
76
+ placement?: TippyProps['placement'];
78
77
  className?: string;
79
78
  Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
80
79
  iconPath?: string;
@@ -275,21 +274,6 @@ export declare enum ManualApprovalType {
275
274
  any = "ANY",
276
275
  notConfigured = "NOT_CONFIGURED"
277
276
  }
278
- export interface UserGroupApproverType {
279
- email: string;
280
- hasAccess: boolean;
281
- }
282
- export interface ImageApprovalPolicyUserGroupDataType {
283
- dataStore: Record<string, UserGroupApproverType>;
284
- requiredCount: number;
285
- emails: string[];
286
- }
287
- export interface ImageApprovalPolicyType {
288
- isPolicyConfigured: boolean;
289
- specificUsersData: ImageApprovalPolicyUserGroupDataType;
290
- userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
291
- validGroups: string[];
292
- }
293
277
  export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
294
278
  export interface UserApprovalConfigType {
295
279
  type: ManualApprovalType;
@@ -302,13 +286,6 @@ export interface UserApprovalConfigType {
302
286
  requiredCount: number;
303
287
  })[];
304
288
  }
305
- export type UserApprovalConfigPayloadType = ({
306
- type: ManualApprovalType.any;
307
- } & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
308
- type: ManualApprovalType.specific;
309
- } & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
310
- type: ManualApprovalType.notConfigured;
311
- };
312
289
  interface ApprovalUserDataType {
313
290
  dataId: number;
314
291
  userActionTime: string;
@@ -318,12 +295,45 @@ interface ApprovalUserDataType {
318
295
  userResponse: number;
319
296
  userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
320
297
  }
298
+ export interface UserApprovalInfo {
299
+ requiredCount: number;
300
+ currentCount: number;
301
+ approverList: {
302
+ hasApproved: boolean;
303
+ canApprove: boolean;
304
+ identifier: string;
305
+ }[];
306
+ }
307
+ export declare enum ApprovalConfigDataKindType {
308
+ configMap = "configuration/config-map",
309
+ configSecret = "configuration/config-secret",
310
+ deploymentTemplate = "configuration/deployment-template",
311
+ deploymentTrigger = "approval/deployment"
312
+ }
313
+ export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {
314
+ kind: ApprovalConfigDataKindType | null;
315
+ anyUserApprovedInfo: UserApprovalInfo;
316
+ specificUsersApprovedInfo: UserApprovalInfo;
317
+ userGroupsApprovedInfo: Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> & {
318
+ userGroups: (UserApprovalInfo & {
319
+ groupIdentifier: UserGroupDTO['identifier'];
320
+ groupName: UserGroupDTO['name'];
321
+ })[];
322
+ };
323
+ }
324
+ export declare enum ApprovalRuntimeStateType {
325
+ init = 0,
326
+ requested = 1,
327
+ approved = 2,
328
+ consumed = 3
329
+ }
321
330
  export interface UserApprovalMetadataType {
322
331
  approvalRequestId: number;
323
- approvalRuntimeState: number;
324
- approvedUsersData: ApprovalUserDataType[];
332
+ approvalRuntimeState: ApprovalRuntimeStateType;
325
333
  requestedUserData: ApprovalUserDataType;
326
- approvalConfig?: UserApprovalConfigType;
334
+ hasCurrentUserApproved: boolean;
335
+ canCurrentUserApprove: boolean;
336
+ approvalConfigData: ApprovalConfigDataType;
327
337
  }
328
338
  export declare enum FilterStates {
329
339
  ALLOWED = 0,
@@ -380,7 +390,6 @@ export interface CDMaterialListModalServiceUtilProps {
380
390
  artifactId?: number;
381
391
  artifactStatus?: string;
382
392
  disableDefaultSelection?: boolean;
383
- userApprovalConfig?: UserApprovalConfigType;
384
393
  }
385
394
  export interface CDMaterialType {
386
395
  index: number;
@@ -516,8 +525,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
516
525
  primaryBranchAfterRegex?: string;
517
526
  storageConfigured?: boolean;
518
527
  deploymentAppDeleteRequest?: boolean;
519
- approvalUsers?: string[];
520
- userApprovalConfig?: UserApprovalConfigType;
528
+ approvalConfigData: ApprovalConfigDataType;
521
529
  requestedUserId?: number;
522
530
  showPluginWarning: boolean;
523
531
  helmPackageName?: string;
@@ -574,14 +582,17 @@ export interface FilterConditionsListType {
574
582
  description: string;
575
583
  conditions: FilterConditionsInfo[];
576
584
  }
585
+ export interface DeploymentApprovalInfoType {
586
+ eligibleApprovers: {
587
+ specificUsers: Pick<UserApprovalInfo, 'approverList'>;
588
+ anyUsers: Pick<UserApprovalInfo, 'approverList'>;
589
+ userGroups: (Pick<ApprovalConfigDataType['userGroupsApprovedInfo']['userGroups'][number], 'groupIdentifier' | 'groupName'> & Pick<UserApprovalInfo, 'approverList'>)[];
590
+ };
591
+ approvalConfigData: ApprovalConfigDataType;
592
+ }
577
593
  export interface CDMaterialsApprovalInfo {
578
- approvalUsers: string[];
579
- userApprovalConfig: UserApprovalConfigType;
580
594
  canApproverDeploy: boolean;
581
- /**
582
- * Only available incase of approvals do'nt use in cd materials or any other flow since approvalUsers are not present there
583
- */
584
- imageApprovalPolicyDetails: ImageApprovalPolicyType;
595
+ deploymentApprovalInfo: DeploymentApprovalInfoType;
585
596
  }
586
597
  export interface CDMaterialsMetaInfo {
587
598
  tagsEditable: boolean;
@@ -660,7 +671,6 @@ export interface AppEnvironment {
660
671
  appStatus?: string;
661
672
  deploymentAppDeleteRequest?: boolean;
662
673
  isVirtualEnvironment?: boolean;
663
- isProtected?: boolean;
664
674
  pipelineId?: number;
665
675
  latestCdWorkflowRunnerId?: number;
666
676
  commits?: string[];
@@ -711,7 +721,6 @@ export interface CdPipeline {
711
721
  parentPipelineType?: string;
712
722
  deploymentAppDeleteRequest?: boolean;
713
723
  deploymentAppCreated?: boolean;
714
- userApprovalConfig?: UserApprovalConfigType;
715
724
  isVirtualEnvironment?: boolean;
716
725
  deploymentAppType: DeploymentAppTypes;
717
726
  helmPackageName?: string;
@@ -720,6 +729,7 @@ export interface CdPipeline {
720
729
  isProdEnv?: boolean;
721
730
  isGitOpsRepoNotConfigured?: boolean;
722
731
  isDeploymentBlocked?: boolean;
732
+ approvalConfigData: ApprovalConfigDataType;
723
733
  }
724
734
  export interface ExternalCiConfig {
725
735
  id: number;
@@ -821,12 +831,11 @@ export interface Point {
821
831
  export interface EdgeNodeType {
822
832
  height: number;
823
833
  width: number;
824
- userApprovalConfig?: UserApprovalConfigType;
825
834
  type?: any;
826
835
  id?: number | string;
827
836
  }
828
837
  export interface EdgeEndNodeType extends EdgeNodeType {
829
- userApprovalConfig?: UserApprovalConfigType;
838
+ approvalConfigData: ApprovalConfigDataType;
830
839
  }
831
840
  /**
832
841
  * Search params for sorting configuration
@@ -1,5 +1,5 @@
1
1
  import { BuildStageType, FormType } from '../../../../../Common/CIPipeline.Types';
2
- import { DeploymentAppTypes, UserApprovalConfigType } from '../../../../../Common/Types';
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;
@@ -1,2 +1,2 @@
1
1
  import { FeatureDescriptionModalProps } from './types';
2
- export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, }: FeatureDescriptionModalProps) => JSX.Element;
2
+ export declare const FeatureDescriptionModal: ({ title, renderDescriptionContent, closeModalText, docLink, closeModal, imageVariant, SVGImage, imageStyles, tabsConfig, }: 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, }: DescriptorProps) => JSX.Element;
2
+ declare const FeatureTitleWithInfo: ({ additionalContainerClasses, breadCrumbs, children, iconClassName, title, renderDescriptionContent, closeModalText, docLink, SVGImage, showInfoIconTippy, docLinkText, dataTestId, additionalContent, showInfoIcon, tabsConfig, }: DescriptorProps) => JSX.Element;
3
3
  export default FeatureTitleWithInfo;
@@ -1,17 +1,44 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { ImageType } from '../../../Common';
3
3
  import { Breadcrumb } from '../../../Common/BreadCrumb/Types';
4
- export interface FeatureDescriptionModalProps {
5
- title: string;
4
+ interface BaseFeatureDescriptionModalProps {
6
5
  renderDescriptionContent?: () => ReactNode;
7
- closeModalText?: string;
8
6
  docLink?: string;
9
- closeModal?: () => void;
10
7
  imageVariant?: ImageType;
11
8
  SVGImage?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
12
9
  imageStyles?: React.CSSProperties;
13
10
  }
14
- export interface DescriptorProps extends FeatureDescriptionModalProps {
11
+ type FeatureDescriptionModalWithTabsConfig = {
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)) & {
15
42
  breadCrumbs?: Breadcrumb[];
16
43
  additionalContainerClasses?: string;
17
44
  iconClassName?: string;
@@ -26,4 +53,5 @@ export interface DescriptorProps extends FeatureDescriptionModalProps {
26
53
  * @default false
27
54
  */
28
55
  showInfoIcon?: boolean;
29
- }
56
+ };
57
+ export {};
@@ -2,7 +2,7 @@ import { ReactElement } from 'react';
2
2
  import { Pair } from 'yaml';
3
3
  import { StrictRJSFSchema } from '@rjsf/utils';
4
4
  import { MaterialHistoryType } from '@Shared/Services/app.types';
5
- import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
5
+ import { MaterialInfo, SortingOrder, UserApprovalConfigType, ApprovalConfigDataType, UserApprovalInfo } from '../Common';
6
6
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, PreventOutsideFocusProps, WebhookEventNameType } from './types';
7
7
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
8
8
  interface HighlightSearchTextProps {
@@ -41,12 +41,13 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
41
41
  export declare const isTimeStringAvailable: (time: string) => boolean;
42
42
  export declare const getTimeDifference: (startTime: string, endTime: string) => string;
43
43
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
44
- export declare const sanitizeUserApprovalConfig: (userApprovalConfig: UserApprovalConfigType) => UserApprovalConfigType;
44
+ export declare const sanitizeUserApprovalList: (approverList: UserApprovalInfo["approverList"]) => UserApprovalInfo["approverList"];
45
+ export declare const sanitizeApprovalConfigData: (approvalConfigData: ApprovalConfigDataType | null) => ApprovalConfigDataType;
45
46
  /**
46
47
  * Manual approval is considered configured only if the type is not notConfigured
47
48
  */
48
49
  export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
49
- export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<UserApprovalConfigType, "type">) => boolean;
50
+ export declare const getIsApprovalPolicyConfigured: (approvalConfigData: ApprovalConfigDataType) => boolean;
50
51
  /**
51
52
  * @description - Function to open a new tab with the given url
52
53
  * @param url - url to be opened in new tab
@@ -1,5 +1,5 @@
1
1
  import { OverrideMergeStrategyType } from '../../Pages/Applications';
2
- import { ReleaseTag } from '../../Common';
2
+ import { ReleaseTag, UserApprovalMetadataType } from '../../Common';
3
3
  interface WebhookDataType {
4
4
  id: number;
5
5
  eventActionType: string;
@@ -133,6 +133,13 @@ export interface DraftMetadataDTO {
133
133
  commentsCount: number;
134
134
  dataEncrypted: boolean;
135
135
  isAppAdmin: boolean;
136
+ userApprovalMetadata: UserApprovalMetadataType;
137
+ /**
138
+ * User id of the user who has requested the data
139
+ *
140
+ * This would be the id of the user whose token is sent in the cookie
141
+ */
142
+ requestedUserId: number;
136
143
  }
137
144
  export declare enum CMSecretExternalType {
138
145
  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";
@@ -1,6 +1,7 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
3
- import { EnvironmentTypeEnum, PatchOperationType } from './constants';
2
+ import { ApprovalConfigDataType } from '../Common/Types';
3
+ import { OptionType, CommonNodeAttr, ResponseType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
4
+ import { BASE_CONFIGURATION_ENV_ID, EnvironmentTypeEnum, PatchOperationType } from './constants';
4
5
  export declare enum EnvType {
5
6
  CHART = "helm_charts",
6
7
  APPLICATION = "apps"
@@ -185,7 +186,7 @@ export interface AppDetails {
185
186
  clusterName?: string;
186
187
  dockerRegistryId?: string;
187
188
  deploymentAppDeleteRequest?: boolean;
188
- userApprovalConfig?: string;
189
+ isApprovalPolicyApplicable?: boolean;
189
190
  isVirtualEnvironment?: boolean;
190
191
  imageTag?: string;
191
192
  helmPackageName?: string;
@@ -245,7 +246,7 @@ export interface WorkflowType {
245
246
  showTippy?: boolean;
246
247
  appId?: number;
247
248
  isSelected?: boolean;
248
- approvalConfiguredIdsMap?: Record<number, UserApprovalConfigType>;
249
+ approvalConfiguredIdsMap?: Record<number, ApprovalConfigDataType>;
249
250
  imageReleaseTags: string[];
250
251
  appReleaseTags?: string[];
251
252
  tagsEditable?: boolean;
@@ -418,7 +419,8 @@ export interface SeverityCount {
418
419
  export declare enum PolicyKindType {
419
420
  lockConfiguration = "lock-configuration",
420
421
  imagePromotion = "image-promotion",
421
- plugins = "plugin"
422
+ plugins = "plugin",
423
+ approval = "approval"
422
424
  }
423
425
  export interface LastExecutionResultType {
424
426
  lastExecution: string;
@@ -748,6 +750,16 @@ export interface DynamicTabType extends CommonTabArgsType {
748
750
  */
749
751
  lastActiveTabId: string | null;
750
752
  }
753
+ export interface ResourceApprovalPolicyConfigDTO {
754
+ appId: number;
755
+ envId: number;
756
+ approvalConfigurations: ApprovalConfigDataType[];
757
+ }
758
+ export interface ResourceApprovalPolicyConfigType extends Omit<ResourceApprovalPolicyConfigDTO, 'state' | 'approvalConfigurations'> {
759
+ isApprovalApplicable: boolean;
760
+ approvalConfigurationMap: Record<ApprovalConfigDataType['kind'], ApprovalConfigDataType>;
761
+ }
762
+ export type ResourceIdToResourceApprovalPolicyConfigMapType = Record<ResourceApprovalPolicyConfigType['envId'] | typeof BASE_CONFIGURATION_ENV_ID, Pick<ResourceApprovalPolicyConfigType, 'isApprovalApplicable' | 'approvalConfigurationMap'>>;
751
763
  export interface PreventOutsideFocusProps {
752
764
  identifier: string;
753
765
  preventFocus: boolean;