Skip to content

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

Merged
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
ayomideadeniran:feat/issue-955-webhook-filtering
Aug 31, 2026
Merged

feat(notification): build subscription webhook system with event filtering#1046
Smartdevs17 merged 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

@Smartdevs17
Smartdevs17 merged commit 26a5454 into Smartdevs17:main Aug 31, 2026
1 check passed
@Smartdevs17

Copy link
Copy Markdown
Owner

Thanks for contributing! The changes have been merged. Feel free to leave a review or feedback.

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

2 participants