2023-06-30 09:54:08 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package events;
|
|
|
|
|
2023-07-17 13:51:31 +00:00
|
|
|
option go_package = "../gmproto";
|
2023-06-30 09:54:08 +00:00
|
|
|
|
|
|
|
import "conversations.proto";
|
2023-07-09 11:16:52 +00:00
|
|
|
import "authentication.proto";
|
|
|
|
import "settings.proto";
|
|
|
|
|
2023-06-30 09:54:08 +00:00
|
|
|
|
|
|
|
/*
|
2023-07-09 11:16:52 +00:00
|
|
|
|
|
|
|
ConversationEvent = 2
|
|
|
|
MessageEvent = 3
|
|
|
|
TypingEvent = 4
|
|
|
|
SettingsEvent = 5
|
|
|
|
UserAlertEvent = 6
|
|
|
|
BrowserPresenceCheckEvent = 7
|
|
|
|
ParticipantsEvent = 8
|
|
|
|
ConversationTypeEvent = 9
|
|
|
|
FavoriteStickersEvent = 10
|
|
|
|
RecentStickerEvent = 11
|
|
|
|
CloudStoreInfoEvent = 12
|
|
|
|
BlobForAttachmentProgressUpdate = 13
|
2023-06-30 09:54:08 +00:00
|
|
|
*/
|
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
message UpdateEvents {
|
2023-06-30 09:54:08 +00:00
|
|
|
oneof event {
|
|
|
|
ConversationEvent conversationEvent = 2;
|
|
|
|
MessageEvent messageEvent = 3;
|
2023-07-09 11:16:52 +00:00
|
|
|
TypingEvent typingEvent = 4;
|
|
|
|
settings.Settings settingsEvent = 5;
|
2023-06-30 09:54:08 +00:00
|
|
|
UserAlertEvent userAlertEvent = 6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConversationEvent {
|
|
|
|
conversations.Conversation data = 2;
|
|
|
|
}
|
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
message TypingEvent {
|
|
|
|
TypingData data = 2;
|
|
|
|
}
|
|
|
|
|
2023-06-30 09:54:08 +00:00
|
|
|
message MessageEvent {
|
|
|
|
conversations.Message data = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserAlertEvent {
|
2023-07-09 11:16:52 +00:00
|
|
|
AlertType alertType = 2;
|
|
|
|
}
|
2023-06-30 09:54:08 +00:00
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
message TypingData {
|
|
|
|
string conversationID = 1;
|
|
|
|
User user = 2;
|
|
|
|
TypingTypes type = 3;
|
|
|
|
}
|
2023-06-30 09:54:08 +00:00
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
message User {
|
|
|
|
int64 field1 = 1;
|
|
|
|
string number = 2;
|
|
|
|
}
|
2023-06-30 09:54:08 +00:00
|
|
|
|
2023-07-17 23:01:06 +00:00
|
|
|
message RPCPairData {
|
2023-07-09 11:16:52 +00:00
|
|
|
oneof event {
|
|
|
|
authentication.PairedData paired = 4;
|
|
|
|
authentication.RevokePairData revoked = 5;
|
|
|
|
}
|
|
|
|
}
|
2023-06-30 09:54:08 +00:00
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
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
|
|
|
|
}
|
2023-06-30 09:54:08 +00:00
|
|
|
|
2023-07-09 11:16:52 +00:00
|
|
|
enum TypingTypes {
|
|
|
|
STOPPED_TYPING = 0;
|
|
|
|
STARTED_TYPING = 1;
|
2023-06-30 12:49:32 +00:00
|
|
|
}
|