Files
pdf/gateway/app/routers/edits.py
T

17 lines
629 B
Python

"""Edit operations — proxies to `engine.apply_edits()` (pybind11).
Phase 0 placeholder. Real implementation produces an incremental save
(append-only xref, Rule R4) and returns a new document revision id.
"""
from fastapi import APIRouter, HTTPException, status
router = APIRouter(prefix="/documents/{document_id}/edits", tags=["edits"])
_NOT_IMPLEMENTED = "Engine bridge (bindings/python) not yet available — Phase 0 placeholder."
@router.post("", status_code=status.HTTP_501_NOT_IMPLEMENTED)
def apply_edits(document_id: str) -> None:
raise HTTPException(status.HTTP_501_NOT_IMPLEMENTED, detail=_NOT_IMPLEMENTED)