import { type Collection, type Db, type DbOptions, type Document, MongoClient, type MongoClientOptions } from 'mongodb';
export declare class MongoConnector {
    /**
     * Get the MongoClient instance.
     */
    get client(): MongoClient;
    private _client;
    constructor(uri: string, options?: MongoClientOptions);
    /**
     * Aggregates data from a collection.
     */
    aggregate<T extends Document>(collection: Collection<T>, pipeline: Document[]): Promise<Document[]>;
    /**
     * Connect to MongoDB and return the database instance.
     */
    connect(): Promise<MongoClient>;
    /**
     * Create a new Db instance sharing the current socket connections.
     *
     * @param dbName - The name of the database we want to use. If not provided, use database name from connection string.
     * @param options - Optional settings for Db construction
     */
    db(dbName?: string, options?: DbOptions): Db;
    /**
   * Close the MongoDB connection.
   */
    disconnect(): Promise<void>;
    /**
     * Get a specific collection by name.
     * @param db - The database instance.
     * @param collectionName - The name of the collection to retrieve.
     * @returns The collection instance.
     */
    getCollection<T extends Document>(db: Db, collectionName: string): Promise<Collection<T>>;
    /**
     * Watches a collection for changes.
     */
    watch<T extends Document>(collection: Collection<T>): Promise<import("mongodb").ChangeStream<T, import("mongodb").ChangeStreamDocument<T>>>;
}
