| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379 |
- syntax = "proto3";
- package chatto.realtime.v1;
- // A public role was created. Read its current metadata with RoleService.
- message RoleCreatedEvent {
- // Stable role name.
- string role_name = 1;
- }
- // Public role metadata changed. Read its current metadata with RoleService.
- // This event does not change permission decisions.
- message RoleUpdatedEvent {
- // Stable role name.
- string role_name = 1;
- }
- // A role was deleted. Remove it from role catalogues and member role lists.
- // Clients retaining this role for their viewer must discard private cached
- // data and load current authorized state before displaying it again.
- message RoleDeletedEvent {
- // Stable name of the deleted role.
- string role_name = 1;
- }
- // Custom roles changed display order. Permission decisions are unchanged.
- message RolesReorderedEvent {
- // Custom role names in ascending display position.
- repeated string role_names = 1;
- }
- // A user was assigned a role. The named user's clients must discard private
- // cached data and load current authorized state. Other viewers update member
- // role lists without a full reload.
- message RoleAssignedEvent {
- // User whose assignment changed.
- string user_id = 1;
- // Stable role name.
- string role_name = 2;
- }
- // A user's role assignment was removed. The named user's clients must discard
- // private cached data and load current authorized state.
- message RoleRevokedEvent {
- // User whose assignment changed.
- string user_id = 1;
- // Stable role name.
- string role_name = 2;
- }
- // A role's permission decisions changed. Clients whose viewer has this role
- // must discard private cached data and load current authorized state. The
- // implicit everyone role applies to every viewer. Private scopes and permission
- // decisions are not included. Read current decisions through authorized APIs.
- message RolePermissionsChangedEvent {
- // Stable role name.
- string role_name = 1;
- }
- // The authenticated viewer's permission decisions may have changed. This also
- // covers changes to a bot's owner permission ceiling. Delivered only to the
- // affected viewer. Discard private cached data and load current authorized
- // state before displaying it again. The connection itself remains open.
- message ViewerPermissionsChangedEvent {}
- import "chatto/api/v1/common.proto";
- import "chatto/api/v1/presence.proto";
- import "chatto/api/v1/rooms.proto";
- // RoomCreatedEvent reports a new room that is visible to the caller.
- message RoomCreatedEvent {
- string room_id = 1;
- string name = 2;
- string description = 3;
- chatto.api.v1.RoomKind kind = 4;
- bool universal = 5;
- chatto.api.v1.RoomThreadingMode threading_mode = 6;
- }
- // RoomUpdatedEvent reports changed room metadata.
- message RoomUpdatedEvent {
- string room_id = 1;
- string name = 2;
- string description = 3;
- }
- // RoomDeletedEvent reports a deleted room.
- message RoomDeletedEvent {
- string room_id = 1;
- }
- // RoomArchivedEvent reports a room that became archived.
- message RoomArchivedEvent {
- string room_id = 1;
- }
- // RoomUnarchivedEvent reports a room that became active again.
- message RoomUnarchivedEvent {
- string room_id = 1;
- }
- // RoomUniversalChangedEvent reports the current universal-membership setting.
- message RoomUniversalChangedEvent {
- string room_id = 1;
- bool universal = 2;
- }
- // RoomSlowModeChangedEvent reports the current slow-mode interval.
- message RoomSlowModeChangedEvent {
- string room_id = 1;
- uint32 slow_mode_seconds = 2;
- }
- // RoomThreadingModeChangedEvent reports the current room threading policy.
- message RoomThreadingModeChangedEvent {
- string room_id = 1;
- chatto.api.v1.RoomThreadingMode threading_mode = 2;
- }
- // UserJoinedRoomEvent reports that the actor joined a room.
- message UserJoinedRoomEvent {
- string room_id = 1;
- }
- // UserLeftRoomEvent reports that the actor left a room.
- message UserLeftRoomEvent {
- string room_id = 1;
- }
- // VoiceCallParticipantJoinedEvent reports that the actor joined a call session.
- message VoiceCallParticipantJoinedEvent {
- string room_id = 1;
- string call_id = 2;
- }
- // VoiceCallParticipantLeftEvent reports that the actor left a call session.
- message VoiceCallParticipantLeftEvent {
- string room_id = 1;
- string call_id = 2;
- }
- // VoiceCallStartedEvent reports a new call session.
- message VoiceCallStartedEvent {
- string room_id = 1;
- string call_id = 2;
- }
- // VoiceCallEndedEvent reports the end of a call session.
- message VoiceCallEndedEvent {
- string room_id = 1;
- string call_id = 2;
- }
- // MessagePostedEvent reports a new room message.
- message MessagePostedEvent {
- string room_id = 1;
- string in_reply_to = 2;
- // Root message ID for a thread reply. Empty for a room-level message.
- string thread_root_event_id = 3;
- reserved 4;
- reserved "mentioned_user_ids";
- string echo_of_event_id = 5;
- string echo_from_thread_root_event_id = 6;
- // Distinct mention targets, without expanded role or broadcast recipients.
- repeated MessageMention mentions = 7;
- // Plaintext message text. The field is absent after key shredding.
- optional string body_plaintext = 8;
- // Immutable room kind. Direct messages do not require a mention to address a bot.
- chatto.api.v1.RoomKind room_kind = 9;
- }
- // DirectUserMention identifies a direct user mention.
- message DirectUserMention {
- string user_id = 1;
- }
- // RoleMessageMention identifies the role that caused a mention.
- message RoleMessageMention {
- string role_name = 1;
- }
- // HereMessageMention identifies a presence-scoped mention.
- message HereMessageMention {}
- // AllMessageMention identifies a room-wide mention.
- message AllMessageMention {}
- // MessageMention identifies one distinct mention target. Role, here, and all
- // targets occur once, regardless of the number of recipients. Targets with no
- // resolved recipients are omitted. Recipient decisions are from message creation,
- // including during replay; clients must not infer them from current membership.
- message MessageMention {
- reserved 1;
- reserved "user_id";
- oneof cause {
- DirectUserMention direct = 2;
- RoleMessageMention role = 3;
- HereMessageMention here = 4;
- AllMessageMention all = 5;
- }
- // True if this target included the authenticated caller when the message was posted.
- bool includes_viewer = 6;
- }
- // MessageEditedEvent reports changed message content or metadata.
- message MessageEditedEvent {
- string room_id = 1;
- string message_event_id = 2;
- }
- // MessageRetractedEvent reports a retracted message.
- message MessageRetractedEvent {
- string room_id = 1;
- string message_event_id = 2;
- }
- // MessagePinnedEvent reports a newly pinned message.
- message MessagePinnedEvent {
- string room_id = 1;
- string message_event_id = 2;
- }
- // MessageUnpinnedEvent reports a message that is no longer pinned.
- message MessageUnpinnedEvent {
- string room_id = 1;
- string message_event_id = 2;
- }
- // ThreadCreatedEvent reports a new message thread.
- message ThreadCreatedEvent {
- string room_id = 1;
- string thread_root_event_id = 2;
- }
- // AssetProcessingStartedEvent reports that message-asset processing started.
- message AssetProcessingStartedEvent {
- string asset_id = 1;
- string message_event_id = 2;
- // Room containing the affected message.
- string room_id = 3;
- }
- // AssetProcessingSucceededEvent reports successful message-asset processing.
- // Read the message resource for current attachments and processed video data.
- message AssetProcessingSucceededEvent {
- string asset_id = 1;
- reserved 2;
- reserved "video";
- string message_event_id = 3;
- // Room containing the affected message.
- string room_id = 4;
- }
- // AssetProcessingFailureCode identifies a stable processing failure class.
- enum AssetProcessingFailureCode {
- // The failure class is not known.
- ASSET_PROCESSING_FAILURE_CODE_UNSPECIFIED = 0;
- // Asset processing failed without a more specific public reason.
- ASSET_PROCESSING_FAILURE_CODE_PROCESSING_FAILED = 1;
- // The source asset was not available.
- ASSET_PROCESSING_FAILURE_CODE_SOURCE_MISSING = 2;
- }
- // AssetProcessingFailedEvent reports failed message-asset processing.
- message AssetProcessingFailedEvent {
- string asset_id = 1;
- AssetProcessingFailureCode failure_code = 2;
- string message_event_id = 3;
- // Room containing the affected message.
- string room_id = 4;
- }
- // AssetDeletedEvent reports a deleted asset.
- message AssetDeletedEvent {
- string asset_id = 1;
- // Room containing the affected message.
- string room_id = 2;
- // Message that owns the asset, including a deleted derivative asset.
- string message_event_id = 3;
- }
- // ServerMotdChangedEvent reports the current message of the day.
- message ServerMotdChangedEvent {
- string motd = 1;
- }
- // UserAccountCreatedEvent reports a new public user account.
- message UserAccountCreatedEvent {
- string user_id = 1;
- bool is_bot = 2;
- }
- // UserAccountDeletedEvent reports a deleted user account.
- message UserAccountDeletedEvent {
- string user_id = 1;
- }
- // ReactionAddedEvent reports a new message reaction.
- message ReactionAddedEvent {
- string room_id = 1;
- string message_event_id = 2;
- string emoji = 3;
- }
- // ReactionRemovedEvent reports a removed message reaction.
- message ReactionRemovedEvent {
- string room_id = 1;
- string message_event_id = 2;
- string emoji = 3;
- }
- // RoomLayoutChangedEvent reports a change to room groups, their entries, or order.
- // Refresh RoomDirectoryService.ListRoomGroups with this event's cursor as the
- // minimum boundary. The event contains no room IDs or other hidden layout data.
- message RoomLayoutChangedEvent {}
- // UserProfileChangedEvent reports that the current public user resource changed.
- // Read the user through UserService with this event's resume cursor as the
- // minimum boundary.
- message UserProfileChangedEvent {
- string user_id = 1;
- }
- // ViewerPreferencesChangedEvent reports that the caller's private user
- // preferences changed. Read ViewerService with this event's resume cursor as
- // the minimum boundary.
- message ViewerPreferencesChangedEvent {}
- // ThreadViewerStateChangedEvent reports the caller's current thread state.
- message ThreadViewerStateChangedEvent {
- string room_id = 1;
- string thread_root_event_id = 2;
- bool is_following = 3;
- }
- // ServerProfileChangedEvent reports that the public server profile changed.
- // Read ServerService with this event's resume cursor as the minimum boundary.
- message ServerProfileChangedEvent {}
- // UserTypingEvent reports current typing activity for the event actor.
- // Track each actor separately for each room and thread. Clear the indicator
- // 6 seconds after the last received typing event, or when that actor posts
- // a message in the same room or thread. No stop-typing event is sent.
- message UserTypingEvent {
- string room_id = 1;
- optional string thread_root_event_id = 2;
- }
- // PresenceChangedEvent reports the actor's current presence.
- message PresenceChangedEvent {
- chatto.api.v1.PresenceStatus status = 1;
- }
- // Delivered only to the account whose private availability choice changed.
- // Refetch MyAccountService.GetPresencePreference to obtain the current choice.
- message ViewerPresencePreferenceChangedEvent {}
- // NotificationOccurrencesChangedEvent reports that the caller's current
- // notification occurrences changed and requests an authoritative resource read.
- message NotificationOccurrencesChangedEvent {
- // ID of a newly created notification, including read notifications and
- // creations during Do Not Disturb. Absent for updates and removals.
- // This is a best-effort live hint, not a sound instruction or durable delivery.
- // Clients decide whether to alert after they read current notification state.
- optional string created_notification_id = 1;
- }
- // NotificationUnreadStateChangedEvent reports that the caller's notification
- // unread state changed and requests authoritative notification and room reads.
- message NotificationUnreadStateChangedEvent {
- string room_id = 1;
- // Event ID of the affected thread root, or empty for room state.
- string thread_root_event_id = 2;
- }
- // RoomReadStateChangedEvent reports the caller's current room read state.
- message RoomReadStateChangedEvent {
- string room_id = 1;
- }
|