gmessages/libgm/gmproto/rpc.proto
2024-02-22 22:39:28 +02:00

165 lines
3.8 KiB
Protocol Buffer

syntax = "proto3";
package rpc;
option go_package = "../gmproto";
import "authentication.proto";
import "util.proto";
import "pblite.proto";
message StartAckMessage {
optional int32 count = 1;
}
message LongPollingPayload {
optional IncomingRPCMessage data = 2;
optional util.EmptyArr heartbeat = 3;
optional StartAckMessage ack = 4;
optional util.EmptyArr startRead = 5;
}
message IncomingRPCMessage {
string responseID = 1;
BugleRoute bugleRoute = 2;
string startExecute = 3;
MessageType messageType = 5;
string finishExecute = 6;
string microsecondsTaken = 7;
authentication.Device mobile = 8;
authentication.Device browser = 9;
// Either a RPCMessageData or a RPCPairData encoded as bytes
bytes messageData = 12;
string signatureID = 17;
string timestamp = 21;
}
message RPCMessageData {
string sessionID = 1;
int64 timestamp = 3;
ActionType action = 4;
bytes unencryptedData = 5;
bool bool1 = 6;
bool bool2 = 7;
bytes encryptedData = 8;
bool bool3 = 9;
bytes encryptedData2 = 11;
}
message OutgoingRPCMessage {
message Auth {
string requestID = 1;
bytes tachyonAuthToken = 6;
authentication.ConfigVersion configVersion = 7;
}
message Data {
string requestID = 1;
BugleRoute bugleRoute = 2;
// OutgoingRPCData encoded as bytes
bytes messageData = 12;
message Type {
util.EmptyArr emptyArr = 1;
MessageType messageType = 2;
}
Type messageTypeData = 23;
}
authentication.Device mobile = 1;
Data data = 2;
Auth auth = 3;
int64 TTL = 5;
repeated string destRegistrationIDs = 9 [(pblite.pblite_binary) = true];
}
message OutgoingRPCData {
string requestID = 1;
ActionType action = 2;
bytes unencryptedProtoData = 3;
bytes encryptedProtoData = 5;
string sessionID = 6;
}
message OutgoingRPCResponse {
message SomeIdentifier {
// 1 -> unknown
string someNumber = 2;
}
SomeIdentifier someIdentifier = 1;
// This is not present for AckMessage responses, only for SendMessage
optional string timestamp = 2;
}
enum BugleRoute {
Unknown = 0;
DataEvent = 19;
PairEvent = 14;
GaiaEvent = 7;
}
enum ActionType {
UNSPECIFIED = 0;
LIST_CONVERSATIONS = 1;
LIST_MESSAGES = 2;
SEND_MESSAGE = 3;
MESSAGE_UPDATES = 4;
LIST_CONTACTS = 6;
CONVERSATION_UPDATES = 7;
GET_OR_CREATE_CONVERSATION = 9;
MESSAGE_READ = 10;
BROWSER_PRESENCE_CHECK = 11;
TYPING_UPDATES = 12;
SETTINGS_UPDATE = 13;
USER_ALERT = 14;
UPDATE_CONVERSATION = 15;
GET_UPDATES = 16;
ACK_BROWSER_PRESENCE = 17;
LIST_STICKER_SETS = 18;
LEAVE_RCS_GROUP = 19;
ADD_PARTICIPANT_TO_RCS_GROUP = 20;
GET_CONVERSATION_TYPE = 21;
NOTIFY_DITTO_ACTIVITY = 22;
DELETE_MESSAGE = 23;
INSTALL_STICKER_SET = 24;
RESEND_MESSAGE = 25;
GET_CONTACT_RCS_GROUP_STATUS = 26;
DOWNLOAD_MESSAGE = 27;
LIST_TOP_CONTACTS = 28;
GET_CONTACTS_THUMBNAIL = 29;
CHANGE_PARTICIPANT_COLOR = 30;
IS_BUGLE_DEFAULT = 31;
STICKER_USER_CONTEXT = 32;
FAVORITE_STICKER_PACKS = 33;
RECENT_STICKERS = 34;
UPDATE_RECENT_STICKERS = 35;
GET_FULL_SIZE_IMAGE = 36;
GET_PARTICIPANTS_THUMBNAIL = 37;
SEND_REACTION = 38;
SEND_REPLY = 39;
GET_BLOB_FOR_ATTACHMENT = 40;
GET_DEVICES_AVAILABLE_FOR_GAIA_PAIRING = 41;
CREATE_GAIA_PAIRING = 42;
GET_CONVERSATION = 43;
CREATE_GAIA_PAIRING_CLIENT_INIT = 44;
CREATE_GAIA_PAIRING_CLIENT_FINISHED = 45;
UNPAIR_GAIA_PAIRING = 46;
CANCEL_GAIA_PAIRING = 47;
}
enum MessageType {
UNKNOWN_MESSAGE_TYPE = 0;
BUGLE_MESSAGE = 2;
GAIA_1 = 3;
BUGLE_ANNOTATION = 16;
GAIA_2 = 20;
}