Skip to content

feat(notification): build subscription webhook system with event filtering - #1046

Open
ayomideadeniran wants to merge 1 commit into
Smartdevs17:mainfrom
ayomideadeniran:feat/issue-955-webhook-filtering
Open

feat(notification): build subscription webhook system with event filtering#1046
ayomideadeniran wants to merge 1 commit into
Smartdevs17:mainfrom
ayomideadeniran:feat/issue-955-webhook-filtering

Conversation

@ayomideadeniran

Copy link
Copy Markdown

Summary

Builds a subscription webhook event filtering system supporting wildcard topic patterns, complex attribute rules, exclusion filters, and field projection, along with developer portal documentation and simulation capabilities.

Key Changes

1. Webhook Event Filter Engine (backend/services/notification/)

  • Implemented WebhookEventFilterEngine in backend/services/notification/webhookFilterEngine.ts:
    • Topic Pattern Matching: Supports wildcard glob matching (subscription.*, payment.*, *.created, *).
    • Exclusion Filters: Allows endpoints to exclude specific noisy or non-actionable event subtypes.
    • Attribute Evaluation Engine: Supports multiple comparison operators (eq, neq, gt, gte, lt, lte, in, nin, contains, regex, exists) on nested payload paths (e.g. data.plan.price, data.currency, data.customer.tier).
    • Logical Rule Combinations: Supports AND and OR composite rule evaluation.
    • Field Projections: Optional payload slicing/projection to strip unneeded fields.
    • Simulation Utility: simulate() method to validate filters against sample payloads with execution telemetry for developer portal testing.
  • Exported filter engine, utilities, and types in unified barrel file backend/services/notification/webhooks.ts.

2. Developer Portal Integration & Documentation (developer-portal/)

  • Added comprehensive "Advanced Attribute & Event Filtering" section to developer-portal/docs/webhook-guide.md with schema examples and operator definitions.

3. Tests & Verification

  • Added backend/services/notification/__tests__/webhookFilter.test.ts with 13 unit tests verifying:
    • Deep nested property extraction
    • Wildcard and pattern matching
    • Numerical, string, and regex attribute operators
    • Exclusion list enforcement and rule combination logic
    • Field projection and developer simulation runner

Closes #955

…ering

- Implemented WebhookEventFilterEngine with topic wildcards, attribute comparisons, and logical rule combinations
- Added exclusion patterns and payload field projection support
- Added developer portal documentation for event filtering in developer-portal/docs/webhook-guide.md
- Added comprehensive unit test suite in backend/services/notification/__tests__/webhookFilter.test.ts

Closes Smartdevs17#955
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@ayomideadeniran Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build subscription webhook system with event filtering

1 participant