/** * @typedef {import('./mongo-types.js').IndexDefinitions} IndexDefinitions */ export class Mongo { /** * @type {import('mongodb').MongoClient | undefined} * @private */ private _client; get client(): MongoClient; get db(): import("mongodb").Db; /** * @param {string} mongoUrl * @param {import('mongodb').MongoClientOptions} options */ connect: (mongoUrl: string, options?: import('mongodb').MongoClientOptions) => Promise; /** * Create an index if it does not exist and manage overwriting existing and conflicting index definitions * @param {string} collection * @param {import('mongodb').IndexSpecification} key * @param {import('mongodb').CreateIndexesOptions} options */ ensureIndex: (collection: string, key: import('mongodb').IndexSpecification, options?: import('mongodb').CreateIndexesOptions) => Promise; /** * create a bunch of indexes and overtwrite previous definitions * the structure forces giving names to indexes which is better for managing them properly * @param {IndexDefinitions} indexDefinitions */ configure: (indexDefinitions: IndexDefinitions) => Promise; } export default mongo; export type IndexDefinitions = import('./mongo-types.js').IndexDefinitions; import { MongoClient } from 'mongodb'; declare const mongo: Mongo; //# sourceMappingURL=mongo.d.ts.map