import type { DatabaseSync } from "node:sqlite"; import type { Context } from "@/types"; import type { SignalEventDbRecord } from "./databaseTypes.js"; export type SignalEventsFindManyOptions = { type?: string; limit?: number; offset?: number; }; type SignalEventsQueryOptions = SignalEventsFindManyOptions & { userId?: string; }; /** * Signal events repository backed by SQLite with write-through caching. * Expects: schema migrations already applied for signals_events. */ export declare class SignalEventsRepository { private readonly db; private readonly eventsById; private readonly eventLocks; private readonly cacheLock; private readonly createLock; private allEventsLoaded; constructor(db: DatabaseSync); create(record: SignalEventDbRecord): Promise; findMany(ctx: Context, options?: SignalEventsFindManyOptions): Promise; findAll(options?: SignalEventsQueryOptions): Promise; findRecent(ctx: Context, limit?: number): Promise; findRecentAll(limit?: number): Promise; findById(id: string): Promise; private eventCacheSet; private eventLoadById; private eventParse; private eventLockForId; } export {}; //# sourceMappingURL=signalEventsRepository.d.ts.map