From e151c963ce9287674d2f502b1637c69738127c53 Mon Sep 17 00:00:00 2001 From: lil-sahil Date: Sat, 15 Jun 2024 21:52:45 -0400 Subject: [PATCH] Enhance Subscription API to include additional filtering options. --- subscription.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subscription.go b/subscription.go index cda49d2..fdf9646 100644 --- a/subscription.go +++ b/subscription.go @@ -37,8 +37,14 @@ type RetryConfiguration struct { RetryCount int `json:"retry_count"` } +type Filter struct { + Body map[string]interface{} `json:"body"` + Headers map[string]interface{} `json:"headers"` +} + type FilterConfiguration struct { EventTypes []string `json:"event_types" bson:"event_types,omitempty"` + Filter Filter `json:"filter" bson:"filter,omitempty"` } type SubscriptionResponse struct {