Task: Add Outbound Webhook Events Stub
Overview
Platform events (new subscriber, new post) are not externally consumable. An outbox stub prepares for future integrations and partner webhooks.
Goals
- Entity:
WebhookEvent (eventType, payload, status: pending|delivered|failed, attempts, createdAt)
- Emit from subscribe + post publish:
subscription.created, post.published
GET /api/v1/admin/webhook-events?page&limit — admin-only
- Dev dispatcher logs payload (no HTTP call yet)
Deliverables
WebhooksModule + dispatcher hook into subscriptions/posts
- Admin list endpoint with RBAC
- Tests verifying event emission
Acceptance Criteria
- Subscribe creates one
subscription.created outbox row
- Post publish emits
post.published with postId, creatorId, visibility
- Admin list requires admin role; non-admin gets
403
- Tokens/secrets never stored in payload
- At least 6 tests
Task: Add Outbound Webhook Events Stub
Overview
Platform events (new subscriber, new post) are not externally consumable. An outbox stub prepares for future integrations and partner webhooks.
Goals
WebhookEvent(eventType,payload,status: pending|delivered|failed,attempts,createdAt)subscription.created,post.publishedGET /api/v1/admin/webhook-events?page&limit— admin-onlyDeliverables
WebhooksModule+ dispatcher hook into subscriptions/postsAcceptance Criteria
subscription.createdoutbox rowpost.publishedwithpostId,creatorId,visibility403