Skip to content

Add Outbound Webhook Events Stub #54

Description

@aji70

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions