import { QueryDef } from '../types.js';
import { FilterBranch } from './FilterBranch.js';
export type Filter = [fieldStr: string, ctx: FilterCtx, value: any];
export type FilterBranchFn = (filterBranch: FilterBranch) => void;
export type FilterAst = (Filter | FilterAst)[];
export declare const IsFilter: (f: FilterAst) => f is Filter;
export type Operator = '=' | 'has' | '!has' | '<' | '>' | '!=' | 'like' | '>=' | '<=' | '..' | '!..' | 'like' | 'exists' | '!exists';
export declare const VECTOR_FNS: string[];
export type FilterOpts<O = Operator> = {
    lowerCase?: boolean;
    fn?: 'dotProduct' | 'manhattanDistance' | 'cosineSimilarity' | 'euclideanDistance';
    score?: number;
};
export declare const EQUAL = 1;
export declare const HAS = 2;
export declare const ENDS_WITH = 4;
export declare const STARTS_WITH = 5;
export declare const EQUAL_CRC32 = 17;
export declare const GREATER_THAN = 6;
export declare const SMALLER_THAN = 7;
export declare const GREATER_THAN_INCLUSIVE = 8;
export declare const SMALLER_THAN_INCLUSIVE = 9;
export declare const RANGE = 10;
export declare const RANGE_EXCLUDE = 11;
export declare const EQUAL_LOWER_CASE = 12;
export declare const HAS_TO_LOWER_CASE = 13;
export declare const STARTS_WITH_LOWER_CASE = 14;
export declare const ENDS_WITH_LOWER_CASE = 15;
export declare const LIKE = 18;
export declare const EXISTS = 19;
export type OPERATOR = typeof EQUAL | typeof HAS | typeof ENDS_WITH | typeof STARTS_WITH | typeof GREATER_THAN | typeof SMALLER_THAN | typeof GREATER_THAN_INCLUSIVE | typeof SMALLER_THAN_INCLUSIVE | typeof RANGE | typeof RANGE_EXCLUDE | typeof EQUAL_LOWER_CASE | typeof HAS_TO_LOWER_CASE | typeof STARTS_WITH_LOWER_CASE | typeof ENDS_WITH_LOWER_CASE | typeof LIKE | typeof EQUAL_CRC32 | typeof EXISTS;
export declare const isNumerical: (op: OPERATOR) => boolean;
export declare const TYPE_NEGATE = 1;
export declare const TYPE_DEFAULT = 2;
export type FILTER_TYPE = typeof TYPE_NEGATE | typeof TYPE_DEFAULT;
export declare const MODE_DEFAULT = 0;
export declare const MODE_OR_FIXED = 1;
export declare const MODE_OR_VAR = 2;
export declare const MODE_AND_FIXED = 3;
export declare const MODE_DEFAULT_VAR = 4;
export declare const MODE_REFERENCE = 5;
export type FILTER_MODE = typeof MODE_DEFAULT | typeof MODE_OR_FIXED | typeof MODE_OR_VAR | typeof MODE_AND_FIXED | typeof MODE_DEFAULT_VAR | typeof MODE_REFERENCE;
export declare const META_EXISTS = 251;
export declare const META_EDGE = 252;
export declare const META_OR_BRANCH = 253;
export declare const META_REFERENCE = 254;
export type FILTER_META = typeof META_EDGE | typeof META_OR_BRANCH | typeof META_REFERENCE | typeof META_EXISTS;
export type FilterCtx = {
    operation: OPERATOR;
    type: FILTER_TYPE;
    opts: FilterOpts;
};
export declare const VECTOR_DOT_PRODUCT = 0;
export declare const VECTOR_MANHATTAN_DIST = 1;
export declare const VECTOR_COSTINE_SIMILARITY = 2;
export declare const VECTOR_EUCLIDEAN_DIST = 3;
export declare const getVectorFn: (optsFn?: FilterOpts["fn"]) => 0 | 1 | 2 | 3;
export declare const toFilterCtx: (def: QueryDef, op: Operator, opts?: FilterOpts) => FilterCtx;
export declare const operatorReverseMap: Record<OPERATOR, string>;
export declare const ALIGNMENT_NOT_SET = 255;
