import type Database from 'better-sqlite3';
declare const VALID_STATUSES: readonly ["pending", "approved", "rejected", "expired", "cancelled"];
type ConfirmationStatus = (typeof VALID_STATUSES)[number];
export declare class InvalidTransitionError extends Error {
    constructor(from: string, to: string);
}
export interface ConfirmationRow {
    id: string;
    correlationId: string;
    actionType: string;
    actionSummary: string;
    riskLevel: string;
    riskScore: number;
    riskFactors: string;
    status: string;
    channel: string | null;
    notifiedAt: string | null;
    respondedAt: string | null;
    ownerResponse: string | null;
    expiresAt: string;
    idempotencyKey: string | null;
    createdAt: string;
}
export interface CreateConfirmationInput {
    correlationId: string;
    actionType: string;
    actionSummary: string;
    riskLevel: string;
    riskScore: number;
    riskFactors: string[];
    timeoutSeconds?: number;
    idempotencyKey?: string;
}
interface StorageProvider {
    getDatabase(): Database.Database;
}
export declare class ConfirmationStore {
    private readonly db;
    private readonly insertStmt;
    private readonly resolveStmt;
    private readonly getByIdStmt;
    constructor(storage: StorageProvider);
    private initTables;
    create(input: CreateConfirmationInput): ConfirmationRow;
    resolve(id: string, status: ConfirmationStatus, response?: string): ConfirmationRow;
    getById(id: string): ConfirmationRow | null;
    getExpired(): ConfirmationRow[];
    getPending(): ConfirmationRow[];
    getByCorrelation(correlationId: string): ConfirmationRow[];
    updateChannel(id: string, channel: string): void;
    getPendingCount(): number;
    private getByIdempotencyKey;
}
export {};
//# sourceMappingURL=ConfirmationStore.d.ts.map