import { Filter, FindOptions, MongoProvider } from './MongoProvider';
import { Condition, Gateway, Id, Json, JsonValue, List, LogicalCondition, Optional, PageList } from '@thisisagile/easy';
import { Collection } from './Collection';
export declare class MongoGateway implements Gateway<FindOptions> {
    readonly collection: Collection;
    readonly provider: MongoProvider;
    constructor(collection: Collection, provider?: MongoProvider);
    all(options?: FindOptions): Promise<PageList<Json>>;
    byId(id: Id): Promise<Json | undefined>;
    by(key: string, value: JsonValue, options?: FindOptions): Promise<PageList<Json>>;
    byIds(...ids: Id[]): Promise<List<Json>>;
    find(q: JsonValue | Condition | LogicalCondition, options?: FindOptions): Promise<PageList<Json>>;
    search(q: JsonValue, options?: FindOptions): Promise<PageList<Json>>;
    filter(options?: FindOptions): Promise<PageList<Json>>;
    exists(id: Id): Promise<boolean>;
    aggregate(...filters: Optional<Filter>[]): Promise<PageList<Json>>;
    count(...filters: Optional<Filter>[]): Promise<number>;
    match(f: Filter): Promise<PageList<Json>>;
    add(item: Json): Promise<Json>;
    update(item: Json): Promise<Json>;
    remove(id: Id): Promise<boolean>;
}
