-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
syntax = "proto3"; | ||
|
||
package aep.api.webhooks; | ||
Check failure on line 3 in proto/aep-api/aep/api/webhook.proto GitHub Actions / buf
|
||
|
||
import "google/protobuf/any.proto"; | ||
import "google/protobuf/descriptor.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
option java_package = "com.aep.api.webhooks"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "NotificationProto"; | ||
option go_package = "apis.roblox.com/aep.api.webhooks"; | ||
|
||
// Provides a generic wrapper for all webhook notifications. | ||
message Notification { | ||
// An ID that represents a single notification. | ||
// | ||
// The value of this field should be consistent across multiple attempts to | ||
// send the same notification; clients can use it to deduplicate redundant | ||
// notifications. | ||
// | ||
// This is typically, though not always, a UUID. | ||
string id = 1; | ||
|
||
// The type of the event that triggered the notification. | ||
// | ||
// The value of this field should directly correspond to the type of the | ||
// payload. | ||
// | ||
// Clients can use this field to route the event without having to inspect the | ||
// contents of the payload. | ||
string event_type = 2; | ||
|
||
// The time when the event that triggered the notification occurred. | ||
google.protobuf.Timestamp event_time = 3; | ||
|
||
// The payload of the notification. | ||
// | ||
// The type of this payload should directly correspond to the event type. | ||
google.protobuf.Any payload = 4; | ||
} | ||
|
||
extend google.protobuf.MessageOptions { | ||
// Indicates that the message is a webhook payload. | ||
WebhookPayloadConfiguration webhook_payload = 50000; | ||
} | ||
|
||
// Contains metadata about webhook payloads. | ||
// | ||
// Example: | ||
// | ||
// ```proto | ||
// // This notification is sent when a GroupJoinRequest is created; that is, | ||
// // when a user requests to join a group. | ||
// message BookArchived { | ||
// option (aep.api.webhook_payload) = { | ||
// event_type: "book_archived" | ||
// }; | ||
// } | ||
// ``` | ||
message WebhookPayloadConfiguration { | ||
// The event type of the webhook notification that this payload is associated | ||
// with. | ||
string event_type = 1; | ||
} |