@devtron-labs/devtron-fe-common-lib 0.2.6-beta-2 → 0.2.6-beta-3

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.
@@ -3,6 +3,7 @@ import { Placement } from 'tippy.js';
3
3
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
4
4
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
5
5
  import { RegistryType } from '../Shared';
6
+ import { UserGroupDTO } from '../Pages/GlobalConfigurations';
6
7
 
7
8
  /**
8
9
  * Generic response type object with support for overriding the result type
@@ -263,9 +264,28 @@ export declare enum DeploymentNodeType {
263
264
  POSTCD = "POSTCD",
264
265
  APPROVAL = "APPROVAL"
265
266
  }
267
+ export declare enum ManualApprovalType {
268
+ specific = "SPECIFIC",
269
+ any = "ANY",
270
+ notConfigured = "NOT_CONFIGURED"
271
+ }
266
272
  export interface UserApprovalConfigType {
273
+ type: ManualApprovalType;
267
274
  requiredCount: number;
268
- }
275
+ specificUsers: {
276
+ identifiers: string[];
277
+ };
278
+ userGroups: (Pick<UserGroupDTO, 'identifier'> & {
279
+ requiredCount: number;
280
+ })[];
281
+ }
282
+ export type UserApprovalConfigPayloadType = ({
283
+ type: ManualApprovalType.any;
284
+ } & Pick<UserApprovalConfigType, 'requiredCount'>) | ({
285
+ type: ManualApprovalType.specific;
286
+ } & Pick<UserApprovalConfigType, 'userGroups' | 'specificUsers'>) | {
287
+ type: ManualApprovalType.notConfigured;
288
+ };
269
289
  interface ApprovalUserDataType {
270
290
  dataId: number;
271
291
  userActionTime: string;
@@ -1,3 +1,4 @@
1
1
  export * from './constants';
2
2
  export type { UserListFilterParams, UserRoleGroup, UserGroupDTO, UserGroupType } from './types';
3
3
  export * from './shared';
4
+ export * from './service';
@@ -0,0 +1,4 @@
1
+ import { SelectPickerCustomOptionType } from '../../../Shared/Components';
2
+ import { GroupBase } from 'react-select';
3
+
4
+ export declare const getUserAndApiTokenOptions: () => Promise<GroupBase<SelectPickerCustomOptionType<string>>[]>;
@@ -44,10 +44,18 @@ export interface UserGroupDTO {
44
44
  identifier: string;
45
45
  /**
46
46
  * Associated description
47
+ *
48
+ * @default ''
47
49
  */
48
50
  description?: string;
51
+ /**
52
+ * Number of users assigned to the group
53
+ *
54
+ * @default 0
55
+ */
56
+ usersCount?: number;
49
57
  }
50
- export interface UserGroupType extends Required<Pick<UserGroupDTO, 'description' | 'name'>> {
58
+ export interface UserGroupType extends Required<Pick<UserGroupDTO, 'description' | 'name' | 'usersCount'>> {
51
59
  /**
52
60
  * Unique id of the user group
53
61
  *
@@ -1,3 +1,4 @@
1
1
  export { default as SelectPickerCustom } from './SelectPicker.component';
2
2
  export { default as FilterSelectPickerCustom } from './FilterSelectPicker';
3
- export type { SelectPickerOptionType as SelectPickerCustomOptionType, SelectPickerVariantType as SelectPickerCustomVariantType, SelectPickerProps as SelectPickerCustomProps, FilterSelectPickerProps as FilterSelectPickerCustomProps, } from './type';
3
+ export type { SelectPickerOptionType as SelectPickerCustomOptionType, SelectPickerProps as SelectPickerCustomProps, FilterSelectPickerProps as FilterSelectPickerCustomProps, } from './type';
4
+ export { SelectPickerVariantType as SelectPickerCustomVariantType } from './type';
@@ -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-a419ec38.js";
4
+ import { m as Ne } from "./index-b35d5cc6.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-a419ec38.js";
1
+ import { m as F } from "./index-b35d5cc6.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-a419ec38.js";
1
+ import { m as i } from "./index-b35d5cc6.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-a419ec38.js";
1
+ import { m as d } from "./index-b35d5cc6.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-a419ec38.js";
4
+ import { m as Qe } from "./index-b35d5cc6.js";
5
5
  /*!-----------------------------------------------------------------------------
6
6
  * Copyright (c) Microsoft Corporation. All rights reserved.
7
7
  * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)