import 'reflect-metadata'; import { GenericObject, EncodedObject } from '@ant-basement/core'; import { JSONEncoder, JSONDecoder } from '../codec'; import { Collection, CollectionJSONObject } from './collection'; import { BaseCommand, CommandJSONObject } from './command'; import { ResultJSONObject } from './result'; export interface QueryJSONObject extends CollectionJSONObject, CommandJSONObject, EncodedObject { } export declare class Query { protected coll: Collection; protected comm: BaseCommand; protected encoder: JSONEncoder; protected decoder: JSONDecoder; collection(name: string): this; aggregate(pipeline: Array>, options?: GenericObject): Promise; count(query: GenericObject, options?: GenericObject): Promise; distinct(key: string, query: GenericObject, options?: GenericObject): Promise; findOne(query: GenericObject, options?: GenericObject): Promise; find(query?: GenericObject, options?: GenericObject): Promise; insertOne(doc: GenericObject, options?: GenericObject): Promise; insertMany(docs: Array>, options?: GenericObject): Promise; findOneAndUpdate(filter: GenericObject, update: GenericObject, options?: GenericObject): Promise; updateOne(filter: GenericObject, update: GenericObject, options?: GenericObject): Promise; updateMany(filter: GenericObject, update: GenericObject, options?: GenericObject): Promise; findOneAndReplace(filter: GenericObject, replacement: GenericObject, options?: GenericObject): Promise; replaceOne(filter: GenericObject, doc: GenericObject, options?: GenericObject): Promise; findOneAndDelete(filter: GenericObject, options?: GenericObject): Promise; deleteOne(filter: GenericObject, options?: GenericObject): Promise; deleteMany(filter?: GenericObject, options?: GenericObject): Promise; validate(): void; execute(..._: any[]): Promise; static fromRawResponse(raw: GenericObject): Query; } export declare class FullQuery extends Query { collections(): Promise; createCollection(name: string, options?: GenericObject): Promise; rename(newName: string, options?: GenericObject): Promise; drop(options?: GenericObject): Promise; listIndexes(options?: GenericObject): Promise; createIndex(field: string | GenericObject, options?: GenericObject): Promise; createIndexes(fields: Array | string>, options?: GenericObject): Promise; dropIndex(indexName: string | GenericObject, options?: GenericObject): Promise; dropIndexes(options?: GenericObject): Promise; }