syntax = "proto3";

package raid;

option go_package = "raid";

import "eventbus/owner.proto";
import "google/protobuf/timestamp.proto";

// RaidUpdate triggers when a raid has been started.
message RaidUpdate {
  option (eventbus.owner.ldap_group) = "team-vx-prod-eng";
  // The Raid's ID.
  string id = 1;
  // The user ID of the channel that the raid is originating on.
  string from_broadcaster_user_id = 2;
  // The user ID of the channel that the raid is targeting.
  string to_broadcaster_user_id = 3;
  // The current status for the raid.
  Status status = 4;
  // The number of users that are part of the raid.
  int32 viewers = 5;
  // The date/time the raid was updated.
  google.protobuf.Timestamp updated_at = 6;
  // Whether alerts (such as chat notices) were sent to the target channel.
  // Alerts may be dropped to protect target channels from spam or harassment.
  bool alerts_sent = 7;
}

// Status describes a raid's place in its lifecycle.
enum Status {
  STATUS_INVALID = 0;
  // When a raid is started, viewers that have not opted out will be redirected to
  // the target's channel page. A raid can be started explicitly by its broadcaster,
  // or automatically when enough time passes.
  STATUS_STARTED = 1;
}
