gmessages/libgm/gmproto/rpc.proto

159 lines
3.5 KiB
Protocol Buffer
Raw Normal View History

2023-06-30 09:54:08 +00:00
syntax = "proto3";
2023-07-17 23:57:20 +00:00
package rpc;
2023-06-30 09:54:08 +00:00
2023-07-17 13:51:31 +00:00
option go_package = "../gmproto";
2023-06-30 09:54:08 +00:00
2023-07-17 23:57:20 +00:00
import "authentication.proto";
import "util.proto";
2023-06-30 09:54:08 +00:00
message StartAckMessage {
optional int32 count = 1;
}
message LongPollingPayload {
optional IncomingRPCMessage data = 2;
2023-07-17 23:57:20 +00:00
optional util.EmptyArr heartbeat = 3;
optional StartAckMessage ack = 4;
2023-07-17 23:57:20 +00:00
optional util.EmptyArr startRead = 5;
}
message IncomingRPCMessage {
string responseID = 1;
BugleRoute bugleRoute = 2;
string startExecute = 3;
2023-07-15 13:25:54 +00:00
MessageType messageType = 5;
string finishExecute = 6;
string millisecondsTaken = 7;
2023-07-17 23:57:20 +00:00
authentication.Device mobile = 8;
authentication.Device browser = 9;
2023-07-15 13:25:54 +00:00
// Either a RPCMessageData or a RPCPairData encoded as bytes
bytes messageData = 12;
2023-07-15 13:25:54 +00:00
string signatureID = 17;
2023-07-15 13:25:54 +00:00
string timestamp = 21;
}
message RPCMessageData {
string sessionID = 1;
int64 timestamp = 3;
ActionType action = 4;
bool bool1 = 6;
bool bool2 = 7;
bytes encryptedData = 8;
bool bool3 = 9;
bytes encryptedData2 = 11;
}
2023-07-17 23:57:20 +00:00
message OutgoingRPCMessage {
message Auth {
string requestID = 1;
2023-07-15 13:25:54 +00:00
2023-07-17 23:57:20 +00:00
bytes tachyonAuthToken = 6;
authentication.ConfigVersion configVersion = 7;
}
2023-06-30 09:54:08 +00:00
2023-07-17 23:57:20 +00:00
message Data {
string requestID = 1;
BugleRoute bugleRoute = 2;
2023-07-17 23:57:20 +00:00
// OutgoingRPCData encoded as bytes
bytes messageData = 12;
2023-07-17 23:57:20 +00:00
message Type {
util.EmptyArr emptyArr = 1;
MessageType messageType = 2;
}
2023-07-15 13:25:54 +00:00
2023-07-17 23:57:20 +00:00
Type messageTypeData = 23;
}
2023-07-15 13:25:54 +00:00
2023-07-17 23:57:20 +00:00
authentication.Device mobile = 1;
2023-07-18 00:08:01 +00:00
Data data = 2;
Auth auth = 3;
2023-07-17 23:57:20 +00:00
int64 TTL = 5;
2023-06-30 09:54:08 +00:00
2023-07-17 23:57:20 +00:00
util.EmptyArr emptyArr = 9;
2023-06-30 09:54:08 +00:00
}
2023-07-17 23:57:20 +00:00
message OutgoingRPCData {
2023-06-30 13:26:46 +00:00
string requestID = 1;
2023-07-17 23:57:20 +00:00
ActionType action = 2;
bytes encryptedProtoData = 5;
string sessionID = 6;
2023-06-30 09:54:08 +00:00
}
message OutgoingRPCResponse {
message SomeIdentifier {
// 1 -> unknown
string someNumber = 2;
}
2023-09-04 22:18:01 +00:00
SomeIdentifier someIdentifier = 1;
// This is not present for AckMessage responses, only for SendMessage
optional string timestamp = 2;
}
enum BugleRoute {
2023-07-18 00:08:01 +00:00
Unknown = 0;
DataEvent = 19;
PairEvent = 14;
}
enum ActionType {
2023-07-15 11:38:24 +00:00
UNSPECIFIED = 0;
LIST_CONVERSATIONS = 1;
LIST_MESSAGES = 2;
SEND_MESSAGE = 3;
2023-07-15 11:38:24 +00:00
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;
2023-07-15 11:38:24 +00:00
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;
2023-07-15 11:38:24 +00:00
INSTALL_STICKER_SET = 24;
RESEND_MESSAGE = 25;
2023-07-15 11:38:24 +00:00
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;
2023-07-15 11:38:24 +00:00
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;
2023-07-15 11:38:24 +00:00
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;
}
enum MessageType {
UNKNOWN_MESSAGE_TYPE = 0;
BUGLE_MESSAGE = 2;
BUGLE_ANNOTATION = 16;
}