Commit 4427ece
committed
docs(web): add frontend type contracts for API responses
Documents every TypeScript type apps/web uses to model backend REST/
WebSocket responses, alongside the backend shape (route handler
return value, Drizzle row, or Zod request schema where relevant) each
one is meant to track. Notes that the backend has no response-side
schema at all -- Zod is request-validation only.
Explicitly calls out known drift as follow-ups rather than fixing it
here, including two live correctness bugs: sequenceNumber is typed
everywhere on the frontend but never sent by the backend (message
ordering silently collapses to 0), and GET /sync's cursor is a string
the frontend never sends correctly (sync never resumes, always
restarts from the beginning of the retention window).
Closes #4531 parent 4fe860c commit 4427ece
1 file changed
Lines changed: 318 additions & 0 deletions
0 commit comments