diff --git a/events/message.go b/events/message.go index 70605c9..5a58841 100644 --- a/events/message.go +++ b/events/message.go @@ -25,8 +25,8 @@ import ( // ChangeType represents the possible event types for a ChangeMessage type ChangeType string -// AuthRelationshipRequestType represents the possible auth relationship request types for an AuthRelationshipRequest -type AuthRelationshipRequestType string +// AuthRelationshipAction represents the possible auth relationship request actions for an AuthRelationshipRequest +type AuthRelationshipAction string var ( // CreateChangeType provides the event type for create events @@ -35,10 +35,10 @@ var ( UpdateChangeType ChangeType = "update" // DeleteChangeType provides the event type for delete events DeleteChangeType ChangeType = "delete" - // WriteAuthRelationshipType provides the auth relationship event type for write requests - WriteAuthRelationshipType = "write" - // DeleteAuthRelationshipType provides the auth relationship event type for delete requests - DeleteAuthRelationshipType = "delete" + // WriteAuthRelationshipAction provides the auth relationship action for write requests + WriteAuthRelationshipAction = "write" + // DeleteAuthRelationshipAction provides the auth relationship action for delete requests + DeleteAuthRelationshipAction = "delete" ) // FieldChange represents a single field that was changed in a changeset and is used to map fields to the old and new values @@ -102,8 +102,8 @@ type EventMessage struct { // AuthRelationshipRequest contains the data structure expected to be used to write or delete // an auth relationship from PermissionsAPI type AuthRelationshipRequest struct { - // EventType describes the type of event that has triggered this message. Valid options are "write" and "delete". - EventType string `json:"eventType"` + // Action describes the type of action being performed. Valid options are "write" and "delete". + Action string `json:"action"` // ObjectID is the PrefixedID of the object the permissions will be granted on ObjectID gidx.PrefixedID `json:"objectID"` // RelationshipName is the relationship being created on the object for the subject