-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structured Webhook Events #2
base: fb/webhook-events
Are you sure you want to change the base?
Conversation
2dcd81b
to
9c12ecf
Compare
@@ -13,6 +13,7 @@ type OutboundEventData struct { | |||
Object map[string]interface{} | |||
// The raw json data for use in structured unmarshalling. | |||
RawData json.RawMessage | |||
Type string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not currently making this of type EventDataType
as that would break support unstructured event handling.
IncidentNote EventDataType = "incident_note" | ||
) | ||
|
||
type IncidentEvent struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Come back and complete this if we actually agree on this approach.
@@ -0,0 +1,58 @@ | |||
package webhookv3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structured events are in a separate file so that it is easier to review simple PRs that add new event types and/or fields without changing any cross-cutting functionality or behavior.
Layers on support for structured events as well.