@devtron-labs/devtron-fe-common-lib 0.2.6-beta-3 → 0.2.6-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.
@@ -269,11 +269,28 @@ export declare enum ManualApprovalType {
269
269
  any = "ANY",
270
270
  notConfigured = "NOT_CONFIGURED"
271
271
  }
272
+ export interface UserGroupApproverType {
273
+ email: string;
274
+ hasAccess: boolean;
275
+ }
276
+ export interface ImageApprovalPolicyUserGroupDataType {
277
+ dataStore: Record<string, UserGroupApproverType>;
278
+ requiredCount: number;
279
+ emails: string[];
280
+ }
281
+ export interface ImageApprovalPolicyType {
282
+ isPolicyConfigured: boolean;
283
+ specificUsersData: ImageApprovalPolicyUserGroupDataType;
284
+ userGroupData: Record<string, ImageApprovalPolicyUserGroupDataType>;
285
+ validGroups: string[];
286
+ }
287
+ export type ImageApprovalUsersInfoDTO = Record<string, Pick<UserGroupDTO, 'identifier' | 'name'>[]>;
272
288
  export interface UserApprovalConfigType {
273
289
  type: ManualApprovalType;
274
290
  requiredCount: number;
275
291
  specificUsers: {
276
292
  identifiers: string[];
293
+ requiredCount?: number;
277
294
  };
278
295
  userGroups: (Pick<UserGroupDTO, 'identifier'> & {
279
296
  requiredCount: number;
@@ -293,12 +310,14 @@ interface ApprovalUserDataType {
293
310
  userEmail: string;
294
311
  userId: number;
295
312
  userResponse: number;
313
+ userGroups?: Pick<UserGroupDTO, 'identifier' | 'name'>[];
296
314
  }
297
315
  export interface UserApprovalMetadataType {
298
316
  approvalRequestId: number;
299
317
  approvalRuntimeState: number;
300
318
  approvedUsersData: ApprovalUserDataType[];
301
319
  requestedUserData: ApprovalUserDataType;
320
+ approvalConfig?: UserApprovalConfigType;
302
321
  }
303
322
  export declare enum FilterStates {
304
323
  ALLOWED = 0,
@@ -555,6 +574,7 @@ export interface CDMaterialsApprovalInfo {
555
574
  approvalUsers: string[];
556
575
  userApprovalConfig: UserApprovalConfigType;
557
576
  canApproverDeploy: boolean;
577
+ imageApprovalPolicyDetails: ImageApprovalPolicyType;
558
578
  }
559
579
  export interface CDMaterialsMetaInfo {
560
580
  tagsEditable: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
- import { MaterialInfo, SortingOrder } from '../Common';
2
+ import { MaterialInfo, SortingOrder, UserApprovalConfigType } from '../Common';
3
3
  import { GitTriggers, IntersectionChangeHandler, IntersectionOptions, WebhookEventNameType } from './types';
4
4
  import { AggregatedNodes, DeploymentStatusDetailsBreakdownDataType, DeploymentStatusDetailsType, PodMetadatum } from './Components';
5
5
 
@@ -37,4 +37,10 @@ export declare const decode: (data: any, isEncoded?: boolean) => {};
37
37
  export declare const isTimeStringAvailable: (time: string) => boolean;
38
38
  export declare const getTimeDifference: (startTime: string, endTime: string) => string;
39
39
  export declare const getFileNameFromHeaders: (headers: Headers) => string;
40
+ export declare const sanitizeUserApprovalConfig: (userApprovalConfig: UserApprovalConfigType) => UserApprovalConfigType;
41
+ /**
42
+ * Manual approval is considered configured only if the type is not notConfigured
43
+ */
44
+ export declare const getIsManualApprovalConfigured: (userApprovalConfig?: Pick<UserApprovalConfigType, 'type'>) => boolean;
45
+ export declare const getIsManualApprovalSpecific: (userApprovalConfig?: Pick<UserApprovalConfigType, 'type'>) => boolean;
40
46
  export {};
@@ -1,7 +1,7 @@
1
1
  var Le = Object.defineProperty;
2
2
  var je = (e, n, i) => n in e ? Le(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (je(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Ne } from "./index-b35d5cc6.js";
4
+ import { m as Ne } from "./index-f49c58fc.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as F } from "./index-b35d5cc6.js";
1
+ import { m as F } from "./index-f49c58fc.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as i } from "./index-b35d5cc6.js";
1
+ import { m as i } from "./index-f49c58fc.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,4 +1,4 @@
1
- import { m as d } from "./index-b35d5cc6.js";
1
+ import { m as d } from "./index-f49c58fc.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
@@ -1,7 +1,7 @@
1
1
  var $e = Object.defineProperty;
2
2
  var qe = (e, n, i) => n in e ? $e(e, n, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[n] = i;
3
3
  var k = (e, n, i) => (qe(e, typeof n != "symbol" ? n + "" : n, i), i);
4
- import { m as Qe } from "./index-b35d5cc6.js";
4
+ import { m as Qe } from "./index-f49c58fc.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)