import { type CreateSchemaOptions, type MikroORM } from '@mikro-orm/core'; import { AbstractSchemaGenerator } from '@mikro-orm/core/schema'; import type { MongoDriver } from './MongoDriver.js'; /** Schema generator for MongoDB that manages collections and indexes. */ export declare class MongoSchemaGenerator extends AbstractSchemaGenerator { static register(orm: MikroORM): void; create(options?: MongoCreateSchemaOptions): Promise; drop(options?: { dropMigrationsTable?: boolean; }): Promise; update(options?: MongoCreateSchemaOptions): Promise; ensureDatabase(): Promise; refresh(options?: MongoCreateSchemaOptions): Promise; dropIndexes(options?: { skipIndexes?: { collection: string; indexName: string; }[]; collectionsWithFailedIndexes?: string[]; }): Promise; ensureIndexes(options?: EnsureIndexesOptions): Promise; private mapIndexProperties; private createIndexes; /** * An explicit `options.partialFilterExpression` wins over `where` — this preserves the * long-standing `options: { partialFilterExpression }` escape hatch. */ private applyPartialFilter; private executeQuery; private createUniqueIndexes; private createPropertyIndexes; } export interface MongoCreateSchemaOptions extends CreateSchemaOptions { /** create indexes? defaults to true */ ensureIndexes?: boolean; } /** Options for the `ensureIndexes()` method of `MongoSchemaGenerator`. */ export interface EnsureIndexesOptions { ensureCollections?: boolean; retry?: boolean | string[]; retryLimit?: number; }