mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-09 21:10:59 +00:00
POST [id]/restore clears the soft-delete tombstone inside the 30-day undo grace; it answers 409 once the tombstone is purged (the undo window is over) and 409 with meta.reason=duplicateExists when an identical live document would collide with the live-dedupe index. Restoring an already-live row is a no-op success, so a late undo toast never errors. POST /bulk applies one action (setKind / linkEpisode / unlinkEpisode / delete / restore) to up to 100 owner-scoped documents and reports per-id outcomes — a partial failure never aborts the batch. GET /usage returns usedBytes (tombstone-inclusive), the effective quota, the per-file cap, and the accepted-extension list for picker accept attributes. The serve route now derives its posture from the serving class: inline types keep their true Content-Type and gain Content-Security-Policy: sandbox as defence-in-depth for the PDF viewer context; attachment types ALWAYS go out as application/octet-stream + Content-Disposition: attachment. nosniff and private,no-store on both; RFC 5987 filename handling unchanged; decrypt dispatches on the row codec and stays fail-closed. Header matrix pinned per class in the route tests. Tasks: W1-T8, W1-T9, W1-T10.