UNPKG

@thisisagile/easy-mongo

Version:
13 lines (12 loc) 719 B
import { MongoGateway } from './MongoGateway'; import { Collection } from './Collection'; import { MongoProvider } from './MongoProvider'; import { SearchDefinition } from './Lucene'; import { Filter, Json, PageList } from '@thisisagile/easy'; export declare const toFilters: (facets: unknown) => Filter[]; export declare class AtlasSearchGateway extends MongoGateway { readonly searchDef: SearchDefinition; readonly sortDef: Record<string, Record<string, 1 | -1>>; constructor(collection: Collection, searchDef: SearchDefinition, sortDef?: Record<string, Record<string, 1 | -1>>, provider?: MongoProvider); query(query: Record<keyof typeof this.searchDef, string | number>): Promise<PageList<Json>>; }