From f316650c8262bd92c62e430b3640e2ea0b9e5250 Mon Sep 17 00:00:00 2001 From: Subomi Oluwalana Date: Thu, 8 Feb 2024 11:48:30 -0800 Subject: [PATCH] fix: removed metadata fields --- event.go | 11 +++++------ event_delivery.go | 11 +++++------ subscription.go | 3 +-- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/event.go b/event.go index fc7220c..be09989 100644 --- a/event.go +++ b/event.go @@ -40,12 +40,11 @@ type CreateDynamicEventRequest struct { } type EventResponse struct { - UID string `json:"uid"` - EventType string `json:"event_type"` - MatchedEndpoints int `json:"matched_endpoints"` - ProviderID string `json:"provider_id"` - Data json.RawMessage `json:"data"` - EndpointMetadata []*EndpointResponse `json:"endpoint_metadata"` + UID string `json:"uid"` + EventType string `json:"event_type"` + MatchedEndpoints int `json:"matched_endpoints"` + ProviderID string `json:"provider_id"` + Data json.RawMessage `json:"data"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/event_delivery.go b/event_delivery.go index a68d6ad..d509308 100644 --- a/event_delivery.go +++ b/event_delivery.go @@ -18,12 +18,11 @@ type EventDelivery struct { } type EventDeliveryResponse struct { - UID string `json:"uid"` - EventMetadata EventMetadata `json:"event_metadata"` - EndpointMetadata EndpointResponse `json:"endpoint_metadata"` - Metadata Metadata `json:"metadata"` - Description string `json:"description,omitempty"` - Status string `json:"status"` + UID string `json:"uid"` + EventMetadata EventMetadata `json:"event_metadata"` + Metadata Metadata `json:"metadata"` + Description string `json:"description,omitempty"` + Status string `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` diff --git a/subscription.go b/subscription.go index 4fcf171..dd17765 100644 --- a/subscription.go +++ b/subscription.go @@ -47,8 +47,7 @@ type SubscriptionResponse struct { Type string `json:"type"` Status string `json:"status"` - Source *SourceResponse `json:"source_metadata,omitempty"` - Endpoint *EndpointResponse `json:"endpoint_metadata,omitempty"` + Source *SourceResponse `json:"source_metadata,omitempty"` // subscription config AlertConfig *AlertConfiguration `json:"alert_config,omitempty"`