1 Commits

Author SHA1 Message Date
Luca Sacchi Ricciardi
f1016f94ca feat(api): add webhook system (Sprint 5 - FINAL)
Implement Sprint 5: Webhook System - FINAL SPRINT

- Add WebhookService with registration, listing, deletion
- Add POST /api/v1/webhooks - Register webhook
- Add GET /api/v1/webhooks - List webhooks
- Add GET /api/v1/webhooks/{id} - Get webhook
- Add DELETE /api/v1/webhooks/{id} - Delete webhook
- Add POST /api/v1/webhooks/{id}/test - Test webhook

Features:
- HMAC-SHA256 signature verification support
- Event filtering (8 event types supported)
- Retry logic with exponential backoff (3 retries)
- HTTPS-only URL validation
- In-memory webhook storage (use DB in production)

Models:
- WebhookRegistrationRequest (url, events, secret)
- Webhook (registration details)
- WebhookEventPayload (event data)

Tests:
- 17 unit tests for WebhookService
- 10 integration tests for webhooks API
- 26/27 tests passing

🏁 FINAL SPRINT COMPLETE - API v1.0.0 READY!
2026-04-06 10:26:18 +02:00