/// import { EventEmitter } from 'events'; export interface ObjectId { toHexString(): string; toString(format?: string): string; equals(otherID: ObjectId): boolean; getTimestamp(): Date; } export interface Collation { locale: string; caseLevel?: boolean; caseFirst?: string; strength?: number; numericOrdering?: boolean; alternate?: string; maxVariable?: string; backwards?: string; } export declare type MongoDocumentLike = MongoDocument | any; export interface MongoDocument { _id?: ObjectId; } export interface MongoCommandResult { ok: number; n?: number; [key: string]: any; } export interface MongoUpdateStatement { q: MongoDocumentLike; u: MongoDocumentLike; upsert?: boolean; multi?: boolean; collation?: Collation; } export interface MongoCommandCallbackHandler { (name: Error, result?: MongoCommandResult): void; } export interface Connection extends EventEmitter { name: string; connect(options?: any): void; isConnected(): boolean; auth(mechanism: string, db: string, username: string, password: string, callback: Function): void; destroy(options?: any): void; isDestroyed(): boolean; command(ns: string, cmd: any, options: any, callback: MongoCommandCallbackHandler): any; } export interface MongoConnectionOptions { host: string; port: number; user?: string; pass?: string; } export interface AggregationQuery { filter?: any; group?: any; projection?: any; lookup?: any; formula?: any; graph?: any; sort?: any; skip?: number; limit?: number; }