/** * Purge-batch reversible soft-delete routes (FEAT-467, ADR-013 Decision 4 โ€” * hard prerequisite for FEAT-458's proxy capture tier). Design settled in * docs/specs/FEAT-458-S1-design.md ยง1. * * POST /capture/purge { capture_source, restore_window_days? } * -> 200 { batch_id, count } | 400 | 401 * POST /capture/purge/:batchId/restore -> 200 { restored } | 401 | 404 | 409 * POST /capture/purge/:batchId/finalize -> 200 { erased } | 401 | 404 | 409 * * `capture_source` is a plain scoping parameter with no branching in this * route or in `MemoryEventRepo.purgeBatch()` itself (FEAT-467 AC-5) โ€” today * only `'auto_capture'` has a caller (`runAutoCaptureDisable`, * src/cli/capture.ts, retrofitted onto this route in the same change that * added it), `'proxy'` is FEAT-458's future disable flow reusing this * unmodified. Error-status mapping reuses `mapLifecycleError` * (server/routes/lifecycle.ts) unchanged โ€” no new error-status convention. */ import type { FastifyInstance } from 'fastify'; import type { DB } from '../../storage/db.js'; import type { Config } from '../../config/config.js'; export declare function capturePurgeRoutes(db: DB, config: Config): (app: FastifyInstance) => Promise;