/** * Base Mock Model Class - TypeScript Implementation * * This class focuses solely on providing the foundation for Mongoose-compatible mock models. * It handles core model functionality like save, remove, and collection management. */ export interface QueryObject { [key: string]: any; } export interface DeleteResult { deletedCount: number; acknowledged: boolean; } export interface UpdateResult { matchedCount: number; modifiedCount: number; acknowledged: boolean; } declare const mockCollections: Map; /** * Base Mock Model Class * * This class provides the foundation for creating Mongoose-compatible mock models * that store data in memory instead of a database. It implements the most commonly * used Mongoose model methods for comprehensive testing scenarios. */ declare class BaseMockModel { _id?: string; [key: string]: any; /** * Constructor for mock model instances */ constructor(data?: any); /** * Save instance to in-memory collection */ save(): Promise; /** * Remove instance from collection */ remove(): Promise; /** * Get or create collection for this model class */ static getCollection(): any[]; /** * Clear collection for this model class */ static clearCollection(): void; /** * Delete many documents matching query */ static deleteMany(query?: QueryObject): Promise; /** * Find one document matching query */ static findOne(query?: QueryObject): Promise; /** * Find all documents matching query */ static find(query?: QueryObject): any; /** * Update many documents matching query */ static updateMany(query: QueryObject, update: QueryObject): Promise; /** * Generate unique ID for model instances */ static generateId(): string; /** * Create new model instance */ static create(data: any): Promise; } export { BaseMockModel, mockCollections }; //# sourceMappingURL=baseMockModel.d.ts.map