import { FilterAst } from "./ast.mjs"; import { z } from "zod"; //#region src/querying/shared/filters.d.ts export declare const MAX_FILTER_DEPTH = 4; export declare const MAX_FILTER_NODES = 256; export declare const MAX_FILTER_IN_VALUES = 100; export type FieldSchemas = Record; export type FilterTree = string | number | bigint | boolean | null | undefined | FilterTree[] | { [key: string]: FilterTree; }; export interface PaginationValidatorOptions { validator: 'compact'; } export interface FilterBoundaryMetadata { readonly grammar: FilterGrammar; readonly semantic: z.ZodType; } /** Only constructors created here can carry permission to project a filter. */ export declare function compactFilterMetadata(schema: z.core.$ZodType): FilterBoundaryMetadata | undefined; /** Each boolean child and relation target expression consumes one of four edges. * some/none wrappers and fields namespaces consume nodes, but no extra depth. */ export interface FilterGrammar { fields: FieldSchemas; variants?: { discriminator: string; options: Record; }; relations: Record; } export declare function relationFilterSchema(grammar: FilterGrammar, cache?: WeakMap>>, options?: PaginationValidatorOptions): z.ZodType; /** * The engine's private filter boundary. It accepts exactly what * relationFilterSchema(grammar) accepts, but builds relation predicates only for * the relations an input names: absent optional relations validate nothing. So * a query never reads relation grammars, or their tables, that it does not use. */ export declare function lazyRelationFilterSchema(grammar: FilterGrammar, cache?: WeakMap>>): z.ZodType; export declare function paginationGrammar(schema: z.ZodType): FilterGrammar | undefined; export declare function normalizeFilters(value: FilterTree, grammar?: FilterGrammar): FilterAst; export declare function scalarPredicateFromSchema(scalar: z.ZodType, range: boolean, optional: boolean): z.ZodType; export declare function boundedFilterSchema(predicates: FieldSchemas, options?: PaginationValidatorOptions): z.ZodType; //#endregion //# sourceMappingURL=filters.d.mts.map