export declare const Match: Readonly<{
    MUST: string;
    MUST_NOT: string;
    isMust(match: any): boolean;
    isMustClause(clause: any): boolean;
}>;
export declare const Operator: Readonly<{
    EQ: string;
    EXACT: string;
    GT: string;
    GTE: string;
    LT: string;
    LTE: string;
    isEQ(match: any): boolean;
    isEQClause(clause: any): boolean;
    isEXACT(match: any): boolean;
    isEXACTClause(clause: any): boolean;
    isRange(match: any): boolean;
    isRangeClause(clause: any): boolean;
    isGT(match: any): boolean;
    isGTClause(clause: any): boolean;
    isGTE(match: any): boolean;
    isGTEClause(clause: any): boolean;
    isLT(match: any): boolean;
    isLTClause(clause: any): boolean;
    isLTE(match: any): boolean;
    isLTEClause(clause: any): boolean;
}>;
/**
 * The AST structure is an array of clauses. There are 3 types of clauses that are supported:
 *
 * :term:
 * Holds a VALUE and an OCCUR. The OCCUR indicates whether the value must match or must not match. Default
 * clauses are not associated with any specific field - when executing the search, one can specify what are
 * the default fields that the default clauses will be matched against.
 *
 * :field:
 * Like the `term` clause, holds a VALUE and an MATCH, but this clause also specifies the field that the
 * value will be matched against.
 *
 * :is:
 * Holds a FLAG and indicates whether this flag must be applied or must not be applied. Typically this clause
 * matches against boolean values of a record (e.g. "is:online", "is:internal", "is:on", etc..)
 *
 * This AST is immutable - every "mutating" operation returns a newly mutated AST.
 */
export declare class _AST {
    private _clauses;
    private _indexedClauses;
    static create(clauses: any): _AST;
    constructor(clauses?: any);
    readonly clauses: any;
    getTermClauses(): any;
    getTermClause(value: any): any;
    getFieldNames(): string[];
    getFieldClauses(field?: any): any;
    getFieldClause(field: any, predicate: any): any;
    hasOrFieldClause(field: any, value?: any): any;
    getOrFieldClause(field: any, value?: any): any;
    addOrFieldValue(field: any, value: any, must?: boolean, operator?: string): _AST;
    removeOrFieldValue(field: any, value: any): _AST;
    removeOrFieldClauses(field: any): _AST;
    hasSimpleFieldClause(field: any, value?: any): any;
    getSimpleFieldClause(field: any, value?: any): any;
    addSimpleFieldValue(field: any, value: any, must?: boolean, operator?: string): _AST;
    removeSimpleFieldValue(field: any, value: any): _AST;
    removeSimpleFieldClauses(field: any): _AST;
    getIsClauses(): {}[];
    getIsClause(flag: any): any;
    removeIsClause(flag: any): _AST;
    getGroupClauses(): {}[];
    /**
     * Creates and returns a new AST with the given clause added to the current clauses. If
     * the current clauses already include a similar clause, it will be (in-place) replaced by
     * the given clause. Whether a clause is similar to the given one depends on the type of the clause.
     * Two clauses are similar if:
     *
     * - they are both of the same type
     * - if they are `default` clauses, they must have the same value
     * - if they are `term` clauses, they must have the same fields and values
     * - if they are `is` clauses, they must have the same flags
     *
     * The reasoning behind not including the `match` attributes of the clauses in the rules above, stems
     * in the fact that the AST clauses are ANDed, and having two similar clauses with two different
     * match attributes creates a logically contradicted AST (e.g. what does it mean to
     * "(must have x) AND (must not have x)"?)
     *
     * note:  in-place replacement means the given clause will be placed in the same position as the one it
     *        replaced
     */
    addClause(newClause: any): _AST;
}
export declare const AST: Readonly<{
    Match: Readonly<{
        MUST: string;
        MUST_NOT: string;
        isMust(match: any): boolean;
        isMustClause(clause: any): boolean;
    }>;
    Operator: Readonly<{
        EQ: string;
        EXACT: string;
        GT: string;
        GTE: string;
        LT: string;
        LTE: string;
        isEQ(match: any): boolean;
        isEQClause(clause: any): boolean;
        isEXACT(match: any): boolean;
        isEXACTClause(clause: any): boolean;
        isRange(match: any): boolean;
        isRangeClause(clause: any): boolean;
        isGT(match: any): boolean;
        isGTClause(clause: any): boolean;
        isGTE(match: any): boolean;
        isGTEClause(clause: any): boolean;
        isLT(match: any): boolean;
        isLTClause(clause: any): boolean;
        isLTE(match: any): boolean;
        isLTEClause(clause: any): boolean;
    }>;
    Term: Readonly<{
        TYPE: string;
        isInstance: (clause: any) => boolean;
        must: (value: any) => {
            type: string;
            value: any;
            match: string;
        };
        mustNot: (value: any) => {
            type: string;
            value: any;
            match: string;
        };
    }>;
    Group: Readonly<{
        TYPE: string;
        isInstance: (clause: any) => boolean;
        must: (value: any) => {
            type: string;
            value: any;
            match: string;
        };
    }>;
    Field: Readonly<{
        TYPE: string;
        isInstance: (clause: any) => boolean;
        must: {
            eq: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            exact: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            gt: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            gte: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            lt: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            lte: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
        };
        mustNot: {
            eq: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            exact: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            gt: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            gte: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            lt: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
            lte: (field: any, value: any) => {
                type: string;
                field: any;
                value: any;
                match: string;
                operator: string;
            };
        };
    }>;
    Is: Readonly<{
        TYPE: string;
        isInstance: (clause: any) => boolean;
        must: (flag: any) => {
            type: string;
            flag: any;
            match: string;
        };
        mustNot: (flag: any) => {
            type: string;
            flag: any;
            match: string;
        };
    }>;
    create: (clauses: any) => _AST;
}>;
