/** * Model Factory and Utilities - TypeScript Implementation * * This module focuses solely on model creation, factory functions, and collection management. * It provides utilities for creating custom models and managing collections. */ import { BaseMockModel } from './baseMockModel.js'; interface MockModelConstructor { new (data?: any): BaseMockModel; modelName?: string; } interface SchemaDefinition { [key: string]: any; } /** * Create custom mock model class * * Factory function that creates a new mock model class with the specified name. * The created class extends BaseMockModel and can be used like any Mongoose model. * * @example * const User = createMockModel('User'); * const user = new User({ name: 'John', email: 'john@example.com' }); * await user.save(); */ declare function createMockModel(modelName: string, schema?: SchemaDefinition): MockModelConstructor; /** * Reset all mock collections * * Utility function that clears all in-memory collections for clean test state. * Useful for test setup and teardown to ensure test isolation. */ declare function resetAllCollections(): void; /** * Get all collections for debugging or testing */ declare function getAllCollections(): Map; /** * Clear specific collection by model name */ declare function clearCollection(modelName: string): boolean; export { createMockModel, resetAllCollections, getAllCollections, clearCollection }; //# sourceMappingURL=modelFactory.d.ts.map