@devtron-labs/devtron-fe-common-lib 1.10.15 → 1.10.16-beta-2

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.
Files changed (45) hide show
  1. package/dist/{@code-editor-BlW2glPL.js → @code-editor-BPAbtV3J.js} +3988 -3815
  2. package/dist/{@common-rjsf-CyUXFGL0.js → @common-rjsf-BpO7Uh9_.js} +1 -1
  3. package/dist/Common/SegmentedControl/types.d.ts +4 -0
  4. package/dist/Common/Toggle/Toggle.d.ts +2 -1
  5. package/dist/Common/Types.d.ts +1 -0
  6. package/dist/Shared/Components/ActionMenu/ActionMenu.component.d.ts +3 -0
  7. package/dist/Shared/Components/ActionMenu/ActionMenuOption.d.ts +3 -0
  8. package/dist/Shared/Components/ActionMenu/index.d.ts +2 -0
  9. package/dist/Shared/Components/ActionMenu/types.d.ts +19 -0
  10. package/dist/Shared/Components/ConfirmationModal/index.d.ts +1 -0
  11. package/dist/Shared/Components/FramerComponents/MotionDiv.d.ts +2 -0
  12. package/dist/Shared/Components/FramerComponents/index.d.ts +3 -0
  13. package/dist/Shared/Components/Icon/Icon.d.ts +14 -0
  14. package/dist/Shared/Components/Icon/types.d.ts +1 -1
  15. package/dist/Shared/Components/SelectPicker/common.d.ts +2 -0
  16. package/dist/Shared/Components/TabGroup/TabGroup.helpers.d.ts +2 -2
  17. package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +5 -3
  18. package/dist/Shared/Components/TabGroup/TabGroup.utils.d.ts +2 -0
  19. package/dist/Shared/Components/index.d.ts +2 -0
  20. package/dist/Shared/Hooks/index.d.ts +1 -0
  21. package/dist/Shared/Hooks/useForm/useForm.d.ts +8 -0
  22. package/dist/Shared/Hooks/useOneTimePrompt/constants.d.ts +1 -0
  23. package/dist/Shared/Hooks/useOneTimePrompt/index.d.ts +1 -0
  24. package/dist/Shared/Hooks/useOneTimePrompt/types.d.ts +3 -0
  25. package/dist/Shared/Hooks/useOneTimePrompt/useOneTimePrompt.d.ts +6 -0
  26. package/dist/Shared/types.d.ts +13 -4
  27. package/dist/assets/@code-editor.css +1 -1
  28. package/dist/assets/ic-arrows-left-right.2d4dda45.svg +3 -0
  29. package/dist/assets/ic-check.a0f5ee85.svg +3 -0
  30. package/dist/assets/ic-close-large.fb6095e0.svg +3 -0
  31. package/dist/assets/ic-delete-lightning.2a7545bd.svg +3 -0
  32. package/dist/assets/ic-folder-user.ff0670e8.svg +3 -0
  33. package/dist/assets/ic-hibernate.f75c1e70.svg +19 -0
  34. package/dist/assets/ic-lightning-fill.25ce980f.svg +3 -0
  35. package/dist/assets/ic-lightning.02da5bf8.svg +3 -0
  36. package/dist/assets/ic-medium-delete.f33a9cd7.svg +11 -0
  37. package/dist/assets/ic-pencil.3ea1c075.svg +3 -0
  38. package/dist/assets/ic-sort-ascending.45f474ff.svg +3 -0
  39. package/dist/assets/ic-sort-descending.0ee6b8dd.svg +3 -0
  40. package/dist/assets/ic-sortable.1d3308e1.svg +3 -0
  41. package/dist/assets/ic-stamp.23836e37.svg +3 -0
  42. package/dist/assets/ic-users.102d4732.svg +3 -0
  43. package/dist/index.js +832 -826
  44. package/package.json +1 -1
  45. package/dist/assets/ic-hibernate.988d2323.svg +0 -28
@@ -1,7 +1,7 @@
1
1
  import { j as n, au as y, aw as k, av as W } from "./@vendor-DZHtXPTX.js";
2
2
  import V, { forwardRef as J, useMemo as P } from "react";
3
3
  import K, { getDefaultRegistry as q } from "@rjsf/core";
4
- import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-BlW2glPL.js";
4
+ import { T as F, j as N, c as v, b as S, a as Y, i as z, d as w, e as E, S as G } from "./@code-editor-BPAbtV3J.js";
5
5
  import Q, { components as D } from "react-select";
6
6
  import { ReactComponent as X } from "./assets/ic-chevron-down.fc70d7a7.svg";
7
7
  import { getUiOptions as B, getTemplate as $, getSubmitButtonOptions as Z, ADDITIONAL_PROPERTY_FLAG as L, errorId as ee, englishStringTranslator as te, TranslatableString as ne, titleId as re, canExpand as se, deepEquals as ae } from "@rjsf/utils";
@@ -8,6 +8,10 @@ export type SegmentType = Pick<SelectPickerOptionType, 'value'> & {
8
8
  * If true, the segment will be in error state with error icon
9
9
  */
10
10
  isError?: boolean;
11
+ /**
12
+ * If true, the segment will be in disabled state
13
+ */
14
+ isDisabled?: boolean;
11
15
  } & (({
12
16
  /**
13
17
  * Label for the segment
@@ -1,4 +1,4 @@
1
- declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, ...props }: {
1
+ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dataTestId, Icon, iconClass, throttleOnChange, shouldToggleValueOnLabelClick, isLoading, ...props }: {
2
2
  [x: string]: any;
3
3
  selected?: boolean;
4
4
  onSelect?: any;
@@ -10,5 +10,6 @@ declare const Toggle: ({ selected, onSelect, color, rootClassName, disabled, dat
10
10
  iconClass?: string;
11
11
  throttleOnChange?: boolean;
12
12
  shouldToggleValueOnLabelClick?: boolean;
13
+ isLoading?: boolean;
13
14
  }) => JSX.Element;
14
15
  export default Toggle;
@@ -349,6 +349,7 @@ export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentC
349
349
  groupName: UserGroupDTO['name'];
350
350
  })[];
351
351
  };
352
+ isExceptionUser: boolean;
352
353
  }
353
354
  export declare enum ApprovalRuntimeStateType {
354
355
  init = 0,
@@ -0,0 +1,3 @@
1
+ import { ActionMenuProps } from './types';
2
+ declare const ActionMenu: ({ options, disableDescriptionEllipsis, children, onClick }: ActionMenuProps) => JSX.Element;
3
+ export default ActionMenu;
@@ -0,0 +1,3 @@
1
+ import { ActionMenuOptionProps } from './types';
2
+ declare const ActionMenuOption: ({ option, onClick, disableDescriptionEllipsis }: ActionMenuOptionProps) => JSX.Element;
3
+ export default ActionMenuOption;
@@ -0,0 +1,2 @@
1
+ export { default as ActionMenu } from './ActionMenu.component';
2
+ export type { ActionMenuProps } from './types';
@@ -0,0 +1,19 @@
1
+ import { ReactElement } from 'react';
2
+ import { GroupBase, OptionsOrGroups } from 'react-select';
3
+ import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
4
+ type ActionMenuOptionType = SelectPickerOptionType & {
5
+ isDisabled?: boolean;
6
+ /**
7
+ * @default 'neutral'
8
+ */
9
+ type?: 'neutral' | 'negative';
10
+ };
11
+ export interface ActionMenuProps extends Pick<SelectPickerProps, 'disableDescriptionEllipsis'> {
12
+ children: ReactElement;
13
+ options: OptionsOrGroups<ActionMenuOptionType, GroupBase<ActionMenuOptionType>>;
14
+ onClick: (option: SelectPickerOptionType) => void;
15
+ }
16
+ export interface ActionMenuOptionProps extends Pick<ActionMenuProps, 'onClick' | 'disableDescriptionEllipsis'> {
17
+ option: ActionMenuOptionType;
18
+ }
19
+ export {};
@@ -4,3 +4,4 @@ export { ForceDeleteConfirmationModal } from './ForceDeleteConfirmationModal';
4
4
  export { CannotDeleteModal } from './CannotDeleteModal';
5
5
  export { ConfirmationModalVariantType, type ConfirmationModalProps } from './types';
6
6
  export { ConfirmationModalProvider } from './ConfirmationModalContext';
7
+ export { getConfirmationLabel } from './utils';
@@ -0,0 +1,2 @@
1
+ import { HTMLMotionProps } from 'framer-motion';
2
+ export declare const MotionDiv: (props: HTMLMotionProps<"div">) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { AnimatePresence } from 'framer-motion';
2
+ export * from './MotionDiv';
3
+ export { AnimatePresence };
@@ -6,6 +6,7 @@ export declare const iconMap: {
6
6
  'ic-apica': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
7
7
  'ic-app-group': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
8
8
  'ic-arrow-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
+ 'ic-arrows-left-right': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
9
10
  'ic-ather': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
10
11
  'ic-azure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
11
12
  'ic-bharatpe': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -19,10 +20,12 @@ export declare const iconMap: {
19
20
  'ic-caret-left': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
20
21
  'ic-cd': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
21
22
  'ic-chat-circle-dots': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
23
+ 'ic-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
22
24
  'ic-ci-linked': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
23
25
  'ic-ci-webhook': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
24
26
  'ic-circle-loader': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
25
27
  'ic-clock': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
28
+ 'ic-close-large': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
26
29
  'ic-close-small': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
27
30
  'ic-code': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
28
31
  'ic-container': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -30,6 +33,7 @@ export declare const iconMap: {
30
33
  'ic-copy': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
31
34
  'ic-crown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
32
35
  'ic-cube': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
36
+ 'ic-delete-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
33
37
  'ic-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
34
38
  'ic-delhivery': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
35
39
  'ic-devtron-header-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -39,6 +43,7 @@ export declare const iconMap: {
39
43
  'ic-env': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
40
44
  'ic-error': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
41
45
  'ic-failure': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
46
+ 'ic-folder-user': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
42
47
  'ic-gear': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
43
48
  'ic-git': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
44
49
  'ic-github': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -59,9 +64,12 @@ export declare const iconMap: {
59
64
  'ic-job-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
60
65
  'ic-k8s-job': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
61
66
  'ic-ldap': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
67
+ 'ic-lightning-fill': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
68
+ 'ic-lightning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
62
69
  'ic-livspace': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
63
70
  'ic-login-devtron-logo': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
64
71
  'ic-logout': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
72
+ 'ic-medium-delete': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
65
73
  'ic-medium-paintbucket': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
66
74
  'ic-microsoft': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
67
75
  'ic-missing': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -74,11 +82,16 @@ export declare const iconMap: {
74
82
  'ic-openshift': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
75
83
  'ic-out-of-sync': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
76
84
  'ic-paper-plane-color': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
85
+ 'ic-pencil': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
77
86
  'ic-quay': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
78
87
  'ic-quote': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
79
88
  'ic-shield-check': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
89
+ 'ic-sort-ascending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
90
+ 'ic-sort-descending': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
91
+ 'ic-sortable': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
80
92
  'ic-spinny': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
81
93
  'ic-stack': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
94
+ 'ic-stamp': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
82
95
  'ic-success': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
83
96
  'ic-suspended': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
84
97
  'ic-tata1mg': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
@@ -87,6 +100,7 @@ export declare const iconMap: {
87
100
  'ic-travclan': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
88
101
  'ic-unknown': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
89
102
  'ic-user-key': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
103
+ 'ic-users': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
90
104
  'ic-warning': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement>>;
91
105
  };
92
106
  export type IconName = keyof typeof iconMap;
@@ -18,6 +18,6 @@ export interface IconBaseProps {
18
18
  * If `null`, the default color present in icon is used.
19
19
  * @example `'B500'`, `'N200'`, `'G50'`, `'R700'`
20
20
  */
21
- color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50'}` | 'white' | 'black' | null;
21
+ color: `${'B' | 'N' | 'G' | 'Y' | 'R' | 'V' | 'O'}${`${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}00` | '50' | '0'}` | 'white' | 'black' | null;
22
22
  }
23
23
  export {};
@@ -1,5 +1,7 @@
1
1
  import { DropdownIndicatorProps, ControlProps, OptionProps, ClearIndicatorProps, ValueContainerProps, MenuListProps, MultiValueRemoveProps, MultiValueProps, InputProps } from 'react-select';
2
+ import { TooltipProps } from '@Common/Tooltip/types';
2
3
  import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type';
4
+ export declare const getTooltipProps: (tooltipProps?: SelectPickerOptionType["tooltipProps"]) => TooltipProps;
3
5
  export declare const SelectPickerDropdownIndicator: <OptionValue>(props: DropdownIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
4
6
  export declare const SelectPickerClearIndicator: <OptionValue>(props: ClearIndicatorProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
5
7
  export declare const SelectPickerControl: <OptionValue>(props: ControlProps<SelectPickerOptionType<OptionValue>>) => JSX.Element;
@@ -1,5 +1,5 @@
1
- import { TabProps } from './TabGroup.types';
2
- export declare const getTabIcon: ({ icon: Icon, showError, showWarning, className, }: Pick<TabProps, "showError" | "showWarning" | "icon"> & {
1
+ import { TabGroupProps, TabProps } from './TabGroup.types';
2
+ export declare const getTabIcon: ({ icon, showError, showWarning, className, size, active, }: Pick<TabProps, "showError" | "showWarning" | "icon" | "active"> & Pick<TabGroupProps, "size"> & {
3
3
  className: string;
4
4
  }) => JSX.Element;
5
5
  export declare const getTabBadge: (badge: TabProps["badge"], className: string) => JSX.Element;
@@ -2,6 +2,7 @@ import { LinkProps, NavLinkProps } from 'react-router-dom';
2
2
  import { ComponentSizeType } from '../../constants';
3
3
  import { DataAttributes } from '../../types';
4
4
  import { TooltipProps } from '@Common/Tooltip/types';
5
+ import { IconName } from '../Icon';
5
6
  type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
6
7
  type ConditionalTabType = {
7
8
  /**
@@ -79,10 +80,11 @@ export type TabProps = {
79
80
  */
80
81
  description?: string | string[];
81
82
  /**
82
- * Icon component to be displayed in the tab.
83
- * This should be a functional component that renders an SVG.
83
+ * Icon to be displayed in the tab.
84
+ * This can either be a functional component that renders a SVG
85
+ * or a string representing the name of the icon to be rendered by the Icon component.
84
86
  */
85
- icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
87
+ icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>> | IconName;
86
88
  /**
87
89
  * Badge number to be displayed on the tab, typically for notifications.
88
90
  */
@@ -1,7 +1,9 @@
1
+ import { IconsProps } from '../Icon';
1
2
  import { TabGroupProps } from './TabGroup.types';
2
3
  export declare const getClassNameBySizeMap: ({ hideTopPadding, alignActiveBorderWithContainer, }: Pick<TabGroupProps, "hideTopPadding" | "alignActiveBorderWithContainer">) => Record<TabGroupProps["size"], {
3
4
  tabClassName: string;
4
5
  iconClassName: string;
5
6
  badgeClassName: string;
6
7
  }>;
8
+ export declare const TAB_ICON_SIZE_MAP: Record<TabGroupProps['size'], IconsProps['size']>;
7
9
  export declare const tabGroupClassMap: Record<TabGroupProps['size'], string>;
@@ -77,3 +77,5 @@ export * from './FlagImage';
77
77
  export * from './DevtronLicenseCard';
78
78
  export * from './LoginBanner';
79
79
  export * from './Confetti';
80
+ export * from './FramerComponents';
81
+ export * from './ActionMenu';
@@ -3,3 +3,4 @@ export * from './useGetResourceKindsOptions';
3
3
  export * from './UseDownload';
4
4
  export * from './useForm';
5
5
  export * from './useStickyEvent';
6
+ export * from './useOneTimePrompt';
@@ -57,6 +57,8 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
57
57
  shouldDirty?: boolean;
58
58
  /** A boolean indicating whether to mark the field as touched after setting the value. */
59
59
  shouldTouch?: boolean;
60
+ /** A boolean indicating whether to trigger validation after setting the value. */
61
+ triggerError?: boolean;
60
62
  }) => void;
61
63
  reset: (formData: T, resetOptions?: {
62
64
  /** A boolean indicating whether to retain the current dirty state of the form fields. */
@@ -67,8 +69,14 @@ export declare const useForm: <T extends Record<keyof T, any> = {}>(options?: {
67
69
  keepErrors?: boolean;
68
70
  /** A boolean indicating whether the form should check for dirty state upon reset. */
69
71
  triggerDirty?: boolean;
72
+ /** A boolean indicating whether the form should check for errors upon reset. */
73
+ triggerError?: boolean;
70
74
  /** A boolean indicating whether the initial values of the form should be retained after reset. If false, provided formData will become initial data. */
71
75
  keepInitialValues?: boolean;
76
+ /** Partial initial values to override the current initial values upon reset.
77
+ * @note `keepInitialValues` will have no effect when this is provided.
78
+ */
79
+ formInitialValues?: Partial<T>;
72
80
  }) => void;
73
81
  /** An object representing additional form state. */
74
82
  formState: {
@@ -0,0 +1 @@
1
+ export declare const ONE_TIME_PROMPT_LOCAL_STORAGE_KEY = "one-time-prompt-do-not-show-again";
@@ -0,0 +1 @@
1
+ export * from './useOneTimePrompt';
@@ -0,0 +1,3 @@
1
+ export interface UseOneTimePromptProps {
2
+ localStorageKey: string;
3
+ }
@@ -0,0 +1,6 @@
1
+ import { UseOneTimePromptProps } from './types';
2
+ export declare const useOneTimePrompt: ({ localStorageKey }: UseOneTimePromptProps) => {
3
+ showPrompt: boolean;
4
+ handleClose: () => void;
5
+ handleDoNotShowAgainClose: () => void;
6
+ };
@@ -340,8 +340,7 @@ export declare enum CDMaterialSidebarType {
340
340
  * }
341
341
  * ```
342
342
  *
343
- * @example Usage with `PatchOperationType.remove`
344
- * Note: Value is not allowed for remove operation
343
+ * @example Usage with `PatchOperationType.remove` without value
345
344
  *
346
345
  * ```ts
347
346
  * const query: PatchQueryType<string> = {
@@ -349,8 +348,18 @@ export declare enum CDMaterialSidebarType {
349
348
  * path: 'name'
350
349
  * }
351
350
  * ```
351
+ *
352
+ * @example Usage with `PatchOperationType.remove` with value
353
+ *
354
+ * ```ts
355
+ * const query: PatchQueryType<string, number, true> = {
356
+ * op: PatchOperationType.remove,
357
+ * path: 'name'
358
+ * value: 1
359
+ * }
360
+ * ```
352
361
  */
353
- export type PatchQueryType<T extends string, K = unknown> = {
362
+ export type PatchQueryType<T extends string, K = unknown, IsRemoveValueEnabled extends boolean = false> = {
354
363
  /**
355
364
  * The path of the json to be patched
356
365
  */
@@ -369,7 +378,7 @@ export type PatchQueryType<T extends string, K = unknown> = {
369
378
  * Operation type for patch
370
379
  */
371
380
  op: PatchOperationType.remove;
372
- value?: never;
381
+ value?: IsRemoveValueEnabled extends true ? K : never;
373
382
  } | {
374
383
  /**
375
384
  * Operation type for add