import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { Query } from '../build/metapair/search/query/v1/query_pb'; declare type Primitive = null | string | boolean | number | Date | Timestamp | Primitive[]; declare function value(data: Primitive): Query.Value; /** * Build bool query. * * @param must * @param mustNot * @param should * @param filter */ declare function bool(must?: Query[], mustNot?: Query[], should?: Query[], filter?: Query[]): Query; export declare type MatchOpts = { operator?: Query.MatchQuery.Operator; }; /** * Build match query * * @param field * @param item * @param param2 */ declare function match(field: string, item: any, { operator }?: MatchOpts): Query; /** * Build term query * * @param field * @param item */ declare function term(field: string, item: any): Query; /** * Build nested query * * @param path * @param query */ declare function nested(path: string, query: Query): Query; /** * Build exists query. * * @param field */ declare function exists(field: string): Query; export declare type LikeValue = string | { id: string; }; /** * Build more like this query. * * @param likes * @param fields */ declare function moreLikeThis(likes: LikeValue[], fields?: string[]): Query; declare const _default: { bool: typeof bool; match: typeof match; value: typeof value; term: typeof term; nested: typeof nested; exists: typeof exists; moreLikeThis: typeof moreLikeThis; }; export default _default;