syntax = "proto3"; package events; option go_package = "../binary"; import "conversations.proto"; import "authentication.proto"; import "settings.proto"; /* ConversationEvent = 2 MessageEvent = 3 TypingEvent = 4 SettingsEvent = 5 UserAlertEvent = 6 BrowserPresenceCheckEvent = 7 ParticipantsEvent = 8 ConversationTypeEvent = 9 FavoriteStickersEvent = 10 RecentStickerEvent = 11 CloudStoreInfoEvent = 12 BlobForAttachmentProgressUpdate = 13 */ message UpdateEvents { oneof event { ConversationEvent conversationEvent = 2; MessageEvent messageEvent = 3; TypingEvent typingEvent = 4; settings.Settings settingsEvent = 5; UserAlertEvent userAlertEvent = 6; } } message ConversationEvent { conversations.Conversation data = 2; } message TypingEvent { TypingData data = 2; } message MessageEvent { conversations.Message data = 2; } message UserAlertEvent { AlertType alertType = 2; } message TypingData { string conversationID = 1; User user = 2; TypingTypes type = 3; } message User { int64 field1 = 1; string number = 2; } message PairEvents { oneof event { authentication.PairedData paired = 4; authentication.RevokePairData revoked = 5; } } enum AlertType { ALERT_TYPE_UNKNOWN = 0; BROWSER_INACTIVE = 1; // Emitted whenever browser connection becomes inactive BROWSER_ACTIVE = 2; // Emitted whenever a new browser session is created MOBILE_DATA_CONNECTION = 3; // Emitted when the paired device connects to data MOBILE_WIFI_CONNECTION = 4; // Emitted when the paired device connects to wifi MOBILE_BATTERY_LOW = 5; // Emitted if the paired device reaches low battery MOBILE_BATTERY_RESTORED = 6; // Emitted if the paired device has restored battery enough to not be considered low BROWSER_INACTIVE_FROM_TIMEOUT = 7; // Emitted whenever browser connection becomes inactive due to timeout BROWSER_INACTIVE_FROM_INACTIVITY = 8; // Emitted whenever browser connection becomes inactive due to inactivity RCS_CONNECTION = 9; // Emitted whenever RCS connection has been established successfully OBSERVER_REGISTERED = 10; // Unknown MOBILE_DATABASE_SYNCING = 11; // Emitted whenever the paired device is attempting to sync db MOBILE_DATABASE_SYNC_COMPLETE = 12; // Emitted whenever the paired device has completed the db sync MOBILE_DATABASE_SYNC_STARTED = 13; // Emitted whenever the paired device has begun syncing the db MOBILE_DATABASE_PARTIAL_SYNC_COMPLETED = 14; // Emitted whenever the paired device has successfully synced a chunk of the db MOBILE_DATABASE_PARTIAL_SYNC_STARTED = 15; // Emitted whenever the paired device has begun syncing a chunk of the db CONTACTS_REFRESH_STARTED = 16; // Emitted whenever the paired device has begun refreshing contacts CONTACTS_REFRESH_COMPLETED = 17; // Emitted whenever the paired device has successfully refreshed contacts } enum GRPCStatus { OK = 0; CANCELLED = 1; UNKNOWN = 2; INVALID_ARGUMENT = 3; DEADLINE_EXCEEDED = 4; NOT_FOUND = 5; ALREADY_EXISTS = 6; PERMISSION_DENIED = 7; RESOURCE_EXHAUSTED = 8; FAILED_PRECONDITION = 9; ABORTED = 10; OUT_OF_RANGE = 11; UNIMPLEMENTED = 12; INTERNAL = 13; UNAVAILABLE = 14; DATA_LOSS = 15; UNAUTHENTICATED = 16; } enum TypingTypes { STOPPED_TYPING = 0; STARTED_TYPING = 1; }