Write apps/backend/docs/api-devices.md covering every route in routes/devices.ts (list devices, register, revoke, logout-everywhere, prekey upload) and the legacy-alias routes in routes/userDevices.ts. Include the prekey batch-upload contract (signed vs one-time prekeys, the 200-OTP cap and trimming behavior) and the side effects of revocation (prekey deletion, device_revoked:* publish, key-change system event).
Acceptance criteria:
- Every route's request/response shape, status codes, and ownership/authorization checks are documented
- Prekey upload documents the signed-vs-one-time distinction and cap/trim behavior precisely
- Revocation side effects are documented as part of the
DELETE /:id and logout-everywhere entries
- Verified against the current
routes/devices.ts and routes/userDevices.ts
Write
apps/backend/docs/api-devices.mdcovering every route inroutes/devices.ts(list devices, register, revoke, logout-everywhere, prekey upload) and the legacy-alias routes inroutes/userDevices.ts. Include the prekey batch-upload contract (signed vs one-time prekeys, the 200-OTP cap and trimming behavior) and the side effects of revocation (prekey deletion,device_revoked:*publish, key-change system event).Acceptance criteria:
DELETE /:idandlogout-everywhereentriesroutes/devices.tsandroutes/userDevices.ts