Commit Graph
3 Commits
Author SHA1 Message Date
David Santos 8b0044be82 feat(api): CRM parity mutations and recent-errors filters (BIT-726)
Add POST /api/error-monitoring/resolve, bulk-resolve, and purge-resolved with
resolve key or admin JWT (errors:triage / errors:delete). Extend GET
recent-errors with status, severity, project_slug, q, offset, and stable
ordering. Document contracts in api/docs/ERROR_MONITORING_PUBLIC_API.md;
add vitest for public auth helpers. Proxy new routes and widen admin-ui
middleware for /api/error-monitoring/*.

Paperclip-Issue: BIT-726
Paperclip-Run: 3fbf92be-736e-4b11-8e90-cf993d8cd5ca
Paperclip-Agent: Pedro Alves (id d706f4e6-5d05-4cec-b6e8-f8fb1f203aae)
Made-with: Cursor
2026-04-02 10:50:06 +00:00
David Santos bc8bd8707f feat(api): expose CRM-shaped GET /api/error-monitoring/recent-errors on Fastify
Register the same handler as /v1/paperclip/recent-errors so NPM and direct
API probes (e.g. :3200) match Paperclip default PAPERCLIP_ERROR_API_QUERY.
Admin UI proxy now calls the Fastify path for a single contract end-to-end.

Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-702
Paperclip-Run: 4ba525c4-3929-475c-a845-400c49eda817
Made-with: Cursor
2026-04-01 16:28:43 +00:00
David Santos 6811dba303 Expose recent-errors for Paperclip via api_key (BIT-684)
Add Fastify GET /v1/paperclip/recent-errors returning CRM-compatible JSON (data
envelope, project_slug per row, status open for open/investigating incidents).

Admin UI proxies the public path /api/error-monitoring/recent-errors to the API
base; middleware bypasses the session redirect for that path only.

Auth matches CRM env names: ERROR_RESOLVE_API_KEY or ERROR_REPORTING_API_KEY for
?api_key=, DEBUG_VIEW_ERRORS_KEY for ?view_errors=.

Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-684
Paperclip-Run: cf7cb964-6953-4476-af09-3feb5d10da17
Made-with: Cursor
2026-04-01 14:18:00 +00:00