import type { DB } from '../../data/db/index.js'; export interface IdempotencyConfig { database: string; table?: string; headerName?: string; ttlSeconds?: number; lockTimeoutMs?: number; methods?: ReadonlyArray<'POST' | 'PUT' | 'PATCH' | 'DELETE'>; } export interface IdempotencyRecord { key: string; tenantId: string; method: string; path: string; statusCode: number | null; responseBody: unknown; lockedUntil: Date | null; createdAt: Date; } export interface IdempotencyStore { ensureTable(db: DB): Promise; find(db: DB, tenantId: string, key: string): Promise; lock(db: DB, tenantId: string, key: string, method: string, path: string, lockMs: number): Promise; complete(db: DB, tenantId: string, key: string, statusCode: number, responseBody: unknown): Promise; remove(db: DB, tenantId: string, key: string): Promise; cleanup(db: DB, ttlSeconds: number): Promise; } //# sourceMappingURL=types.d.ts.map