Add onEmptyFilter

This commit is contained in:
Adria Navarro 2024-10-10 13:20:20 +02:00
parent 7b789e7853
commit 4324d96833
1 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,7 @@
import {
ArrayOperator,
BasicOperator,
EmptyFilterOption,
LogicalOperator,
RangeOperator,
SearchFilterKey,
@ -59,10 +60,13 @@ const queryFilterValidation: Record<SearchFilterKey, z.ZodTypeAny> = {
}
const searchRowRequest = z.object({
query: z.object({
query: z
.object({
allOr: z.boolean().optional(),
onEmptyFilter: z.nativeEnum(EmptyFilterOption).optional(),
...queryFilterValidation,
}),
})
.optional(),
paginate: z.boolean().optional(),
bookmark: z.union([z.string(), z.number()]).optional(),
limit: z.number().optional(),