import type { SqliteDatabase } from '../db/adapter.js'; import { NUDGE_CODES, NUDGE_POLICY_VERSION, type DeliveredNudge, type NudgeCode } from './nudges.js'; export interface NudgeHistory { deliveredOccurrenceIds: ReadonlySet; runDeliveryCount: number; lastSequenceByCode: ReadonlyMap; } export interface NewNudgeDelivery { readonly id: string; readonly runId: string; readonly policyVersion: typeof NUDGE_POLICY_VERSION; readonly code: NudgeCode; readonly occurrenceId: string; readonly checkpointId: string; readonly throughSequence: number; readonly priority: number; readonly evidenceEventIds: readonly string[]; readonly referenceIds: readonly string[]; readonly deliveredAt: string; } export interface NudgeDeliveryInsertRow { readonly id: string; readonly runId: string; readonly policyVersion: string; readonly code: string; readonly occurrenceId: string; readonly checkpointId: string; readonly throughSequence: number; readonly priority: number; readonly evidenceEventIdsJson: string; readonly referenceIdsJson: string; readonly deliveredAt: string; } export interface NudgeDeliveryInput { readonly runId: string; readonly policyVersion: string; readonly code: NudgeCode; readonly occurrenceId: string; readonly checkpointId: string; readonly throughSequence: number; readonly priority: number; readonly evidenceEventIds?: readonly string[]; readonly referenceIds?: readonly string[]; readonly deliveredAt: string; } export declare function parseNewNudgeDelivery(input: unknown): NewNudgeDelivery; export declare function serializeNudgeDelivery(value: NewNudgeDelivery): NudgeDeliveryInsertRow; export declare function insertNudgeDelivery(database: SqliteDatabase, row: NudgeDeliveryInsertRow): void; export declare function readNudgeDeliveryForCheckpoint(database: SqliteDatabase, input: { runId: string; policyVersion: string; checkpointId: string; }): DeliveredNudge | null; export declare function readNudgeHistory(database: SqliteDatabase, runId: string, policyVersion: string): NudgeHistory; export declare function recordNudgeDeliveryInTransaction(database: SqliteDatabase, input: NudgeDeliveryInput): void; export { NUDGE_CODES, NUDGE_POLICY_VERSION }; //# sourceMappingURL=nudge-store.d.ts.map