import type IEventStoreDBAL from "../EventSourcing/IEventStoreDBAL"; import type { IProjectionPositionStore } from "./ProjectionPositionStore"; import type Projector from "./Projector"; export default class ProjectionManager { private readonly eventStore; private readonly positionStore; constructor(eventStore: IEventStoreDBAL, positionStore: IProjectionPositionStore); /** * Rebuild a projection from scratch by replaying all events from position 0. * This resets the projection position and processes all events. */ rebuild(projector: Projector): Promise; /** * Catch up a projection from its last processed position. * Useful for incremental updates after projection is back online. */ catchUp(projector: Projector): Promise; /** * Get the current position of a projector. */ getPosition(projectorName: string): Promise; private processEventsFrom; private getProjectorName; }