Type logic filter

This commit is contained in:
Adria Navarro 2024-10-10 13:40:39 +02:00
parent e6b3b4f2a1
commit e095a596a1
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ export interface PatchRowResponse extends Row {}
const stringBasicFilter = z.record(z.string(), z.string())
const basicFilter = z.record(z.string(), z.any())
const arrayFilter = z.record(z.string(), z.union([z.any().array(), z.string()]))
const logicFilter = z.any()
const logicFilter = z.lazy(() =>
z.object({
conditions: z.array(z.object(queryFilterValidation)),
})
)
const stringOrNumber = z.union([z.string(), z.number()])