Server-to-server endpoint for the e-Court backend (x-api-key against
DOCVER_API_KEY or EXTERNAL_API_KEY):
- type=pdf returns the latest version's PDF bytes (404 when absent)
- type=docx stamps fresh ticket custom properties (exp + HmacSha256 via
addinTicketSecret(), Ed25519 when PRIVATE_KEY_HEX is set) into an
in-memory copy before returning — MinIO object is never modified
- docId comes from fid inside the ticket_data query param, which must
include fid/uid/uname so the stamped file stays redeemable by the
add-in at /api/documents/token (buildStampedTicketData drops null
values because parseDocverTicket rejects tid:null)
- adds parseTicketDataParam, parseLatestTypeParam, requireDocumentApiKey,
findLatestVersionForDoc, getVersionObjectBytes + unit tests (320 pass)
- syncs PLAN-DOCVER.md, OpenAPI spec and .env.example
Co-Authored-By: Claude Code <noreply@anthropic.com>