Skip to content

Commit

Permalink
Create webhook-related components.
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrankel committed Aug 17, 2024
1 parent 32fab75 commit e049aad
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions proto/aep-api/aep/api/webhook.proto
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

View workflow job for this annotation

GitHub Actions / buf

Multiple packages "aep.api,aep.api.webhooks" detected within directory "aep/api".

Check failure on line 3 in proto/aep-api/aep/api/webhook.proto

View workflow job for this annotation

GitHub Actions / buf

Files with package "aep.api.webhooks" must be within a directory "aep/api/webhooks" relative to root but were in directory "aep/api".

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;
}

0 comments on commit e049aad

Please sign in to comment.