From 4324d9683306eb1667c0948313f39d8c5d83118d Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Thu, 10 Oct 2024 13:20:20 +0200 Subject: [PATCH] Add onEmptyFilter --- packages/types/src/api/web/app/rows.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/types/src/api/web/app/rows.ts b/packages/types/src/api/web/app/rows.ts index 45e065cc59..4652ea7df5 100644 --- a/packages/types/src/api/web/app/rows.ts +++ b/packages/types/src/api/web/app/rows.ts @@ -1,6 +1,7 @@ import { ArrayOperator, BasicOperator, + EmptyFilterOption, LogicalOperator, RangeOperator, SearchFilterKey, @@ -59,10 +60,13 @@ const queryFilterValidation: Record = { } const searchRowRequest = z.object({ - query: z.object({ - allOr: z.boolean().optional(), - ...queryFilterValidation, - }), + 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(),