import 'reflect-metadata'; import { Constructor } from '@cratis/fundamentals'; import { ProjectionId } from '../ProjectionId.js'; /** * Metadata stored on a declarative projection class. */ export interface ProjectionMetadata { /** The unique identifier for the projection. */ readonly id: ProjectionId; /** The optional explicit event sequence identifier. */ readonly eventSequenceId: string | undefined; /** The optional explicit read model constructor. */ readonly readModelType: Constructor | undefined; } /** * TypeScript decorator that marks a class as a declarative projection. * @param id - The unique identifier for the projection. Defaults to the class name if omitted. * @param readModelType - Optional explicit read model constructor (needed when TypeScript generic inference is insufficient). * @param eventSequenceId - Optional explicit event sequence identifier. * @returns A class decorator. */ export declare function projection(id?: string, readModelType?: Constructor, eventSequenceId?: string): ClassDecorator; /** * Gets the {@link ProjectionMetadata} associated with a class decorated with {@link projection}. * @param target - The class constructor to retrieve metadata for. * @returns The associated metadata, or undefined if not decorated. */ export declare function getProjectionMetadata(target: Function): ProjectionMetadata | undefined; /** * Checks whether a class has been decorated with {@link projection}. * @param target - The class constructor to check. * @returns True if the class has a projection decorator; false otherwise. */ export declare function isProjection(target: Function): boolean; //# sourceMappingURL=projection.d.ts.map