Skip to content

Commit 188008c

Browse files
committed
feat: add support for add operation in patch operation type
1 parent 23fe07c commit 188008c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Shared/constants.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export const API_TOKEN_PREFIX = 'API-TOKEN:'
5656
export const DEFAULT_SECRET_PLACEHOLDER = '••••••••'
5757

5858
export enum PatchOperationType {
59+
add = 'add',
5960
replace = 'replace',
6061
remove = 'remove',
6162
}

src/Shared/types.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,13 @@ export type PatchQueryType<T extends string, K = unknown> = {
393393
op: PatchOperationType.remove
394394
value?: never
395395
}
396+
| {
397+
/**
398+
* Operation type for add
399+
*/
400+
op: PatchOperationType.add
401+
value?: K
402+
}
396403
)
397404

398405
export interface GroupedOptionsType {

0 commit comments

Comments
 (0)