import { type Dictionary, EntityMetadata, type EntityName } from '../typings.js'; import type { EntityManager } from '../EntityManager.js'; /** Registry that stores and provides access to entity metadata by class, name, or id. */ export declare class MetadataStorage { #private; static readonly PATH_SYMBOL: unique symbol; constructor(metadata?: Dictionary); /** Returns the global metadata dictionary, or a specific entry by entity name and path. */ static getMetadata(): Dictionary; static getMetadata(entity: string, path: string): EntityMetadata; /** Checks whether an entity with the given class name exists in the global metadata. */ static isKnownEntity(name: string): boolean; /** Clears all entries from the global metadata registry. */ static clear(): void; /** Returns the map of all registered entity metadata. */ getAll(): Map; /** Returns metadata for the given entity, optionally initializing it if not found. */ get(entityName: EntityName, init?: boolean): EntityMetadata; /** Finds metadata for the given entity, returning undefined if not registered. */ find(entityName: EntityName): EntityMetadata | undefined; /** Checks whether metadata exists for the given entity. */ has(entityName: EntityName): boolean; /** Registers metadata for the given entity. */ set(entityName: EntityName, meta: EntityMetadata): EntityMetadata; /** Removes metadata for the given entity from all internal maps. */ reset(entityName: EntityName): void; /** Decorates all entity prototypes with helper methods (e.g. init, toJSON). */ decorate(em: EntityManager): void; [Symbol.iterator](): IterableIterator; /** Returns metadata by its internal numeric id. */ getById(id: number): EntityMetadata; /** Returns metadata by class name, optionally throwing if not found. */ getByClassName(className: string, validate?: V): V extends true ? EntityMetadata : EntityMetadata | undefined; /** Returns metadata by unique name, optionally throwing if not found. */ getByUniqueName(uniqueName: string, validate?: V): V extends true ? EntityMetadata : EntityMetadata | undefined; private validate; }