/** * @fileoverview BrightDB model registry — singleton for managing BrightDB * collection registrations. Parallel to upstream's ModelRegistry. * * @module bright-db-model-registry */ import type { CollectionSchema } from '@digitaldefiance/suite-core-lib'; import type { BrightDbCollection } from './services/bright-db-collection'; /** * Registration entry for a BrightDB collection. */ export interface BrightDbModelRegistration { collectionName: string; schema?: CollectionSchema; collection: BrightDbCollection; } /** * Singleton registry for BrightDB collections. * Manages collection registration and retrieval across the application. * Parallel to upstream's ModelRegistry for Mongoose models. */ export declare class BrightDbModelRegistry { private static _instance; private readonly _models; private constructor(); /** * Gets the singleton instance of BrightDbModelRegistry. */ static get instance(): BrightDbModelRegistry; /** * Creates an isolated registry instance (useful for testing). */ static createIsolated(): BrightDbModelRegistry; /** * Registers a collection with the registry. */ register(registration: BrightDbModelRegistration): void; /** * Retrieves a collection registration by name. * @throws {Error} If the collection is not registered. */ get(modelName: string): BrightDbModelRegistration; /** * Checks if a collection is registered. */ has(modelName: string): boolean; /** * Lists all registered collection names. */ list(): string[]; /** * Clears all registrations (useful for testing). */ clear(): void; } //# sourceMappingURL=bright-db-model-registry.d.ts.map