import type { Database } from 'better-sqlite3'; import type { IContainer } from 'node-cqrs'; import type { IEvent, IEventLocker } from '../interfaces/index.ts'; import type { SqliteViewLockerParams } from './SqliteViewLocker.ts'; import type { SqliteProjectionDataParams } from './SqliteProjectionDataParams.ts'; import { AbstractSqliteAccessor } from './AbstractSqliteAccessor.ts'; export type SqliteEventLockerParams = SqliteProjectionDataParams & Pick & { /** * (Optional) SQLite table name where event locks are stored * * @default "tbl_event_lock" */ eventLockTableName?: string; /** * (Optional) Time-to-live (TTL) duration in milliseconds * for which an event remains in the "processing" state until released. * * @default 15_000 */ eventLockTtl?: number; }; export declare class SqliteEventLocker extends AbstractSqliteAccessor implements IEventLocker { #private; constructor(o: Pick & SqliteEventLockerParams); protected initialize(db: Database): void; tryMarkAsProjecting(event: IEvent): Promise; markAsProjected(event: IEvent): Promise; markAsLastEvent(event: IEvent): Promise; getLastEvent(): Promise | undefined>; }