2020-09-16 18:34:24 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2020-09-18 15:51:15 +02:00
|
|
|
/*********** PARTIAL MESSAGES **************/
|
2020-09-18 13:57:38 +02:00
|
|
|
|
|
|
|
message PositionMessage {
|
|
|
|
int32 x = 1;
|
|
|
|
int32 y = 2;
|
|
|
|
enum Direction {
|
|
|
|
UP = 0;
|
|
|
|
RIGHT = 1;
|
|
|
|
DOWN = 2;
|
|
|
|
LEFT = 3;
|
|
|
|
}
|
|
|
|
Direction direction = 3;
|
|
|
|
bool moving = 4;
|
|
|
|
}
|
|
|
|
|
2020-09-18 17:47:18 +02:00
|
|
|
message PointMessage {
|
|
|
|
int32 x = 1;
|
|
|
|
int32 y = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-18 13:57:38 +02:00
|
|
|
message ViewportMessage {
|
|
|
|
int32 left = 1;
|
|
|
|
int32 top = 2;
|
|
|
|
int32 right = 3;
|
|
|
|
int32 bottom = 4;
|
|
|
|
}
|
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
message SilentMessage {
|
|
|
|
bool silent = 1;
|
|
|
|
}
|
|
|
|
|
2020-10-20 16:39:23 +02:00
|
|
|
message CharacterLayerMessage {
|
|
|
|
string url = 1;
|
|
|
|
string name = 2;
|
|
|
|
}
|
|
|
|
|
2021-04-06 18:54:45 +02:00
|
|
|
message CompanionMessage {
|
2021-04-02 21:21:11 +02:00
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
2020-09-18 15:51:15 +02:00
|
|
|
/*********** CLIENT TO SERVER MESSAGES *************/
|
|
|
|
|
2020-11-10 18:26:46 +01:00
|
|
|
message PingMessage {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-09-18 15:51:15 +02:00
|
|
|
message SetPlayerDetailsMessage {
|
2021-12-22 18:30:23 +01:00
|
|
|
//string name = 1;
|
|
|
|
//repeated string characterLayers = 2;
|
|
|
|
|
|
|
|
// TODO: switch to google.protobuf.Int32Value when we migrate to ts-proto
|
2021-12-23 10:22:19 +01:00
|
|
|
uint32 outlineColor = 3;
|
2021-12-22 18:30:23 +01:00
|
|
|
bool removeOutlineColor = 4;
|
2020-09-18 15:51:15 +02:00
|
|
|
}
|
|
|
|
|
2020-09-18 13:57:38 +02:00
|
|
|
message UserMovesMessage {
|
|
|
|
PositionMessage position = 1;
|
|
|
|
ViewportMessage viewport = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcSignalToServerMessage {
|
|
|
|
int32 receiverId = 1;
|
|
|
|
string signal = 2;
|
|
|
|
}
|
|
|
|
|
2020-10-12 11:22:41 +02:00
|
|
|
message ReportPlayerMessage {
|
2021-07-07 11:24:51 +02:00
|
|
|
string reportedUserUuid = 1;
|
2020-10-12 11:22:41 +02:00
|
|
|
string reportComment = 2;
|
|
|
|
}
|
|
|
|
|
2021-03-31 11:21:06 +02:00
|
|
|
message EmotePromptMessage {
|
2021-12-07 22:14:51 +01:00
|
|
|
string emote = 2;
|
2021-03-31 11:21:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message EmoteEventMessage {
|
2021-12-07 22:14:51 +01:00
|
|
|
int32 actorUserId = 1;
|
|
|
|
string emote = 2;
|
2021-03-31 11:21:06 +02:00
|
|
|
}
|
|
|
|
|
2020-10-16 19:13:26 +02:00
|
|
|
message QueryJitsiJwtMessage {
|
|
|
|
string jitsiRoom = 1;
|
|
|
|
string tag = 2; // FIXME: rather than reading the tag from the query, we should read it from the current map!
|
|
|
|
}
|
|
|
|
|
2021-12-12 16:56:26 +01:00
|
|
|
message FollowRequestMessage {
|
2021-12-15 14:48:45 +01:00
|
|
|
int32 leader = 1;
|
2021-12-12 00:24:39 +01:00
|
|
|
}
|
|
|
|
|
2021-12-12 16:56:26 +01:00
|
|
|
message FollowConfirmationMessage {
|
2021-12-15 14:48:45 +01:00
|
|
|
int32 leader = 1;
|
|
|
|
int32 follower = 2;
|
2021-12-12 16:56:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message FollowAbortMessage {
|
2021-12-15 14:48:45 +01:00
|
|
|
int32 leader = 1;
|
|
|
|
int32 follower = 2;
|
2021-12-12 00:24:39 +01:00
|
|
|
}
|
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
message ClientToServerMessage {
|
|
|
|
oneof message {
|
|
|
|
UserMovesMessage userMovesMessage = 2;
|
|
|
|
SilentMessage silentMessage = 3;
|
|
|
|
ViewportMessage viewportMessage = 4;
|
|
|
|
ItemEventMessage itemEventMessage = 5;
|
|
|
|
SetPlayerDetailsMessage setPlayerDetailsMessage = 6;
|
2020-09-29 16:01:22 +02:00
|
|
|
WebRtcSignalToServerMessage webRtcSignalToServerMessage = 7;
|
|
|
|
WebRtcSignalToServerMessage webRtcScreenSharingSignalToServerMessage = 8;
|
2020-10-01 14:11:34 +02:00
|
|
|
PlayGlobalMessage playGlobalMessage = 9;
|
|
|
|
StopGlobalMessage stopGlobalMessage = 10;
|
2020-10-12 11:22:41 +02:00
|
|
|
ReportPlayerMessage reportPlayerMessage = 11;
|
2020-10-16 19:13:26 +02:00
|
|
|
QueryJitsiJwtMessage queryJitsiJwtMessage = 12;
|
2021-03-31 11:21:06 +02:00
|
|
|
EmotePromptMessage emotePromptMessage = 13;
|
2021-07-02 11:31:44 +02:00
|
|
|
VariableMessage variableMessage = 14;
|
2021-12-12 16:56:26 +01:00
|
|
|
FollowRequestMessage followRequestMessage = 15;
|
|
|
|
FollowConfirmationMessage followConfirmationMessage = 16;
|
|
|
|
FollowAbortMessage followAbortMessage = 17;
|
2020-09-28 18:52:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-24 17:24:37 +02:00
|
|
|
/************ BI-DIRECTIONAL MESSAGES **************/
|
|
|
|
|
|
|
|
message ItemEventMessage {
|
|
|
|
int32 itemId = 1;
|
|
|
|
string event = 2;
|
|
|
|
string stateJson = 3;
|
|
|
|
string parametersJson = 4;
|
|
|
|
}
|
2020-09-18 13:57:38 +02:00
|
|
|
|
2021-07-02 11:31:44 +02:00
|
|
|
message VariableMessage {
|
|
|
|
string name = 1;
|
|
|
|
string value = 2;
|
|
|
|
}
|
|
|
|
|
2021-07-19 10:16:43 +02:00
|
|
|
/**
|
|
|
|
* A variable, along the tag describing who it is targeted at
|
|
|
|
*/
|
|
|
|
message VariableWithTagMessage {
|
|
|
|
string name = 1;
|
|
|
|
string value = 2;
|
|
|
|
string readableBy = 3;
|
|
|
|
}
|
|
|
|
|
2020-10-01 14:11:34 +02:00
|
|
|
message PlayGlobalMessage {
|
2021-07-20 15:16:51 +02:00
|
|
|
string type = 1;
|
|
|
|
string content = 2;
|
|
|
|
bool broadcastToWorld = 3;
|
|
|
|
}
|
|
|
|
|
2020-10-01 14:11:34 +02:00
|
|
|
message StopGlobalMessage {
|
|
|
|
string id = 1;
|
|
|
|
}
|
|
|
|
|
2020-09-18 13:57:38 +02:00
|
|
|
/*********** SERVER TO CLIENT MESSAGES *************/
|
|
|
|
|
|
|
|
message UserMovedMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
PositionMessage position = 2;
|
|
|
|
}
|
2020-09-18 15:51:15 +02:00
|
|
|
|
|
|
|
message SubMessage {
|
|
|
|
oneof message {
|
|
|
|
UserMovedMessage userMovedMessage = 1;
|
2020-09-24 10:05:16 +02:00
|
|
|
GroupUpdateMessage groupUpdateMessage = 2;
|
|
|
|
GroupDeleteMessage groupDeleteMessage = 3;
|
2020-09-24 14:50:28 +02:00
|
|
|
UserJoinedMessage userJoinedMessage = 4;
|
2020-09-24 16:11:47 +02:00
|
|
|
UserLeftMessage userLeftMessage = 5;
|
2020-09-24 17:24:37 +02:00
|
|
|
ItemEventMessage itemEventMessage = 6;
|
2021-03-31 11:21:06 +02:00
|
|
|
EmoteEventMessage emoteEventMessage = 7;
|
2021-07-02 11:31:44 +02:00
|
|
|
VariableMessage variableMessage = 8;
|
2021-07-19 10:16:43 +02:00
|
|
|
ErrorMessage errorMessage = 9;
|
2021-12-22 18:30:23 +01:00
|
|
|
PlayerDetailsUpdatedMessage playerDetailsUpdatedMessage = 10;
|
2020-09-18 15:51:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message BatchMessage {
|
|
|
|
string event = 1;
|
|
|
|
repeated SubMessage payload = 2;
|
|
|
|
}
|
2020-09-18 17:47:18 +02:00
|
|
|
|
|
|
|
message GroupUpdateMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
PointMessage position = 2;
|
2020-10-21 16:07:42 +02:00
|
|
|
int32 groupSize = 3;
|
2020-09-18 17:47:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message GroupDeleteMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
}
|
2020-09-24 14:50:28 +02:00
|
|
|
|
|
|
|
message UserJoinedMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
string name = 2;
|
2020-10-20 16:39:23 +02:00
|
|
|
repeated CharacterLayerMessage characterLayers = 3;
|
2020-09-24 14:50:28 +02:00
|
|
|
PositionMessage position = 4;
|
2021-04-06 18:54:45 +02:00
|
|
|
CompanionMessage companion = 5;
|
2021-06-08 16:30:58 +02:00
|
|
|
string visitCardUrl = 6;
|
2021-07-07 11:24:51 +02:00
|
|
|
string userUuid = 7;
|
2021-12-23 10:22:19 +01:00
|
|
|
uint32 outlineColor = 8;
|
|
|
|
bool hasOutline = 9;
|
2020-09-24 14:50:28 +02:00
|
|
|
}
|
2020-09-24 16:11:47 +02:00
|
|
|
|
|
|
|
message UserLeftMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
|
|
|
message ErrorMessage {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ItemStateMessage {
|
|
|
|
int32 itemId = 1;
|
|
|
|
string stateJson = 2;
|
|
|
|
}
|
|
|
|
|
2022-02-28 13:47:08 +01:00
|
|
|
message GroupUsersUpdateMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
repeated int32 userIds = 2;
|
|
|
|
}
|
|
|
|
|
2020-09-28 18:52:54 +02:00
|
|
|
message RoomJoinedMessage {
|
2020-11-13 18:00:22 +01:00
|
|
|
//repeated UserJoinedMessage user = 1;
|
|
|
|
//repeated GroupUpdateMessage group = 2;
|
2020-09-28 18:52:54 +02:00
|
|
|
repeated ItemStateMessage item = 3;
|
2020-10-13 16:46:46 +02:00
|
|
|
int32 currentUserId = 4;
|
2020-10-14 11:07:34 +02:00
|
|
|
repeated string tag = 5;
|
2021-07-06 10:58:12 +02:00
|
|
|
repeated VariableMessage variable = 6;
|
2021-12-01 16:38:34 +01:00
|
|
|
string userRoomToken = 7;
|
2020-09-28 18:52:54 +02:00
|
|
|
}
|
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcStartMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
bool initiator = 3;
|
2021-02-16 09:58:08 +01:00
|
|
|
string webrtcUserName = 4;
|
|
|
|
string webrtcPassword = 5;
|
2020-09-29 16:01:22 +02:00
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcDisconnectMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
2020-09-29 16:01:22 +02:00
|
|
|
message WebRtcSignalToClientMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
string signal = 2;
|
2021-02-16 18:13:30 +01:00
|
|
|
string webrtcUserName = 4;
|
|
|
|
string webrtcPassword = 5;
|
2020-09-29 16:01:22 +02:00
|
|
|
}
|
2020-09-28 18:52:54 +02:00
|
|
|
|
2020-10-13 11:39:07 +02:00
|
|
|
message TeleportMessageMessage{
|
|
|
|
string map = 1;
|
|
|
|
}
|
|
|
|
|
2020-10-16 19:13:26 +02:00
|
|
|
message SendJitsiJwtMessage {
|
|
|
|
string jitsiRoom = 1;
|
|
|
|
string jwt = 2;
|
|
|
|
}
|
|
|
|
|
2020-10-19 19:32:47 +02:00
|
|
|
message SendUserMessage{
|
|
|
|
string type = 1;
|
|
|
|
string message = 2;
|
|
|
|
}
|
|
|
|
|
2021-03-11 16:14:34 +01:00
|
|
|
message WorldFullWarningMessage{
|
|
|
|
}
|
|
|
|
message WorldFullWarningToRoomMessage{
|
2021-12-07 22:14:51 +01:00
|
|
|
string roomId = 1;
|
2021-03-11 16:14:34 +01:00
|
|
|
}
|
2021-04-01 16:43:12 +02:00
|
|
|
message RefreshRoomPromptMessage{
|
2021-12-07 22:14:51 +01:00
|
|
|
string roomId = 1;
|
2021-04-01 16:43:12 +02:00
|
|
|
}
|
|
|
|
message RefreshRoomMessage{
|
2021-12-07 22:14:51 +01:00
|
|
|
string roomId = 1;
|
|
|
|
int32 versionNumber = 2;
|
2021-04-01 16:43:12 +02:00
|
|
|
}
|
2021-03-11 16:14:34 +01:00
|
|
|
|
|
|
|
message WorldFullMessage{
|
|
|
|
}
|
2021-07-27 16:37:01 +02:00
|
|
|
message TokenExpiredMessage{
|
|
|
|
}
|
2021-03-11 16:14:34 +01:00
|
|
|
|
2021-04-29 23:47:30 +02:00
|
|
|
message WorldConnexionMessage{
|
|
|
|
string message = 2;
|
|
|
|
}
|
|
|
|
|
2021-01-17 03:07:46 +01:00
|
|
|
message BanUserMessage{
|
|
|
|
string type = 1;
|
|
|
|
string message = 2;
|
|
|
|
}
|
|
|
|
|
2021-12-08 10:58:53 +01:00
|
|
|
/**
|
|
|
|
* Messages going from back and pusher to the front
|
|
|
|
*/
|
2020-09-28 18:52:54 +02:00
|
|
|
message ServerToClientMessage {
|
|
|
|
oneof message {
|
|
|
|
BatchMessage batchMessage = 1;
|
|
|
|
ErrorMessage errorMessage = 2;
|
|
|
|
RoomJoinedMessage roomJoinedMessage = 3;
|
2020-10-13 16:46:46 +02:00
|
|
|
WebRtcStartMessage webRtcStartMessage = 4;
|
|
|
|
WebRtcSignalToClientMessage webRtcSignalToClientMessage = 5;
|
|
|
|
WebRtcSignalToClientMessage webRtcScreenSharingSignalToClientMessage = 6;
|
|
|
|
WebRtcDisconnectMessage webRtcDisconnectMessage = 7;
|
2020-10-13 20:39:29 +02:00
|
|
|
TeleportMessageMessage teleportMessageMessage = 10;
|
2020-10-16 19:13:26 +02:00
|
|
|
SendJitsiJwtMessage sendJitsiJwtMessage = 11;
|
2020-10-19 19:32:47 +02:00
|
|
|
SendUserMessage sendUserMessage = 12;
|
2021-01-17 03:07:46 +01:00
|
|
|
BanUserMessage banUserMessage = 13;
|
2021-12-06 18:00:17 +01:00
|
|
|
//AdminRoomMessage adminRoomMessage = 14;
|
2021-03-11 16:14:34 +01:00
|
|
|
WorldFullWarningMessage worldFullWarningMessage = 15;
|
|
|
|
WorldFullMessage worldFullMessage = 16;
|
2021-07-06 17:13:08 +02:00
|
|
|
RefreshRoomMessage refreshRoomMessage = 17;
|
2021-04-29 23:47:30 +02:00
|
|
|
WorldConnexionMessage worldConnexionMessage = 18;
|
2021-12-06 18:00:17 +01:00
|
|
|
//EmoteEventMessage emoteEventMessage = 19;
|
2021-07-27 16:37:01 +02:00
|
|
|
TokenExpiredMessage tokenExpiredMessage = 20;
|
2021-12-12 16:56:26 +01:00
|
|
|
FollowRequestMessage followRequestMessage = 21;
|
|
|
|
FollowConfirmationMessage followConfirmationMessage = 22;
|
|
|
|
FollowAbortMessage followAbortMessage = 23;
|
2022-02-28 13:47:08 +01:00
|
|
|
GroupUsersUpdateMessage groupUsersUpdateMessage = 24;
|
2020-09-28 18:52:54 +02:00
|
|
|
}
|
|
|
|
}
|
2020-11-13 18:00:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
/************************** SERVICES **************************/
|
|
|
|
|
|
|
|
message JoinRoomMessage {
|
|
|
|
PositionMessage positionMessage = 1;
|
|
|
|
string name = 2;
|
|
|
|
repeated CharacterLayerMessage characterLayer = 3;
|
|
|
|
string userUuid = 4;
|
|
|
|
string roomId = 5;
|
|
|
|
repeated string tag = 6;
|
2021-01-15 03:19:58 +01:00
|
|
|
string IPAddress = 7;
|
2021-04-06 18:54:45 +02:00
|
|
|
CompanionMessage companion = 8;
|
2021-06-08 16:30:58 +02:00
|
|
|
string visitCardUrl = 9;
|
2021-12-01 16:38:34 +01:00
|
|
|
string userRoomToken = 10;
|
2020-11-13 18:00:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserJoinedZoneMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
string name = 2;
|
|
|
|
repeated CharacterLayerMessage characterLayers = 3;
|
|
|
|
PositionMessage position = 4;
|
|
|
|
Zone fromZone = 5;
|
2021-04-06 18:54:45 +02:00
|
|
|
CompanionMessage companion = 6;
|
2021-06-08 16:30:58 +02:00
|
|
|
string visitCardUrl = 7;
|
2021-07-07 11:24:51 +02:00
|
|
|
string userUuid = 8;
|
2021-12-23 10:22:19 +01:00
|
|
|
uint32 outlineColor = 9;
|
|
|
|
bool hasOutline = 10;
|
2020-11-13 18:00:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message UserLeftZoneMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
Zone toZone = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GroupUpdateZoneMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
PointMessage position = 2;
|
|
|
|
int32 groupSize = 3;
|
|
|
|
Zone fromZone = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GroupLeftZoneMessage {
|
|
|
|
int32 groupId = 1;
|
|
|
|
Zone toZone = 2;
|
|
|
|
}
|
|
|
|
|
2021-12-22 18:30:23 +01:00
|
|
|
message PlayerDetailsUpdatedMessage {
|
|
|
|
int32 userId = 1;
|
|
|
|
SetPlayerDetailsMessage details = 2;
|
|
|
|
}
|
2020-11-13 18:00:22 +01:00
|
|
|
|
|
|
|
message Zone {
|
|
|
|
int32 x = 1;
|
|
|
|
int32 y = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ZoneMessage {
|
|
|
|
string roomId = 1;
|
|
|
|
int32 x = 2;
|
|
|
|
int32 y = 3;
|
|
|
|
}
|
|
|
|
|
2021-07-06 15:30:49 +02:00
|
|
|
message RoomMessage {
|
|
|
|
string roomId = 1;
|
|
|
|
}
|
|
|
|
|
2020-11-13 18:00:22 +01:00
|
|
|
message PusherToBackMessage {
|
|
|
|
oneof message {
|
|
|
|
JoinRoomMessage joinRoomMessage = 1;
|
|
|
|
UserMovesMessage userMovesMessage = 2;
|
|
|
|
SilentMessage silentMessage = 3;
|
2020-12-11 16:47:59 +01:00
|
|
|
ItemEventMessage itemEventMessage = 4;
|
|
|
|
SetPlayerDetailsMessage setPlayerDetailsMessage = 5;
|
|
|
|
WebRtcSignalToServerMessage webRtcSignalToServerMessage = 6;
|
|
|
|
WebRtcSignalToServerMessage webRtcScreenSharingSignalToServerMessage = 7;
|
|
|
|
ReportPlayerMessage reportPlayerMessage = 10;
|
|
|
|
QueryJitsiJwtMessage queryJitsiJwtMessage = 11;
|
2021-01-17 03:07:46 +01:00
|
|
|
SendUserMessage sendUserMessage = 12;
|
|
|
|
BanUserMessage banUserMessage = 13;
|
2021-03-31 11:21:06 +02:00
|
|
|
EmotePromptMessage emotePromptMessage = 14;
|
2021-07-02 11:31:44 +02:00
|
|
|
VariableMessage variableMessage = 15;
|
2021-12-12 16:56:26 +01:00
|
|
|
FollowRequestMessage followRequestMessage = 16;
|
|
|
|
FollowConfirmationMessage followConfirmationMessage = 17;
|
|
|
|
FollowAbortMessage followAbortMessage = 18;
|
2020-11-13 18:00:22 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message BatchToPusherMessage {
|
|
|
|
repeated SubToPusherMessage payload = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubToPusherMessage {
|
|
|
|
oneof message {
|
|
|
|
UserJoinedZoneMessage userJoinedZoneMessage = 1;
|
|
|
|
GroupUpdateZoneMessage groupUpdateZoneMessage = 2;
|
|
|
|
UserMovedMessage userMovedMessage = 3;
|
|
|
|
GroupLeftZoneMessage groupLeftZoneMessage = 4;
|
|
|
|
UserLeftZoneMessage userLeftZoneMessage = 5;
|
|
|
|
ItemEventMessage itemEventMessage = 6;
|
2020-12-11 12:23:50 +01:00
|
|
|
SendUserMessage sendUserMessage = 7;
|
2021-01-17 03:07:46 +01:00
|
|
|
BanUserMessage banUserMessage = 8;
|
2021-03-31 11:21:06 +02:00
|
|
|
EmoteEventMessage emoteEventMessage = 9;
|
2021-07-19 10:16:43 +02:00
|
|
|
ErrorMessage errorMessage = 10;
|
2021-12-22 18:30:23 +01:00
|
|
|
PlayerDetailsUpdatedMessage playerDetailsUpdatedMessage = 11;
|
2020-11-13 18:00:22 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-06 15:30:49 +02:00
|
|
|
message BatchToPusherRoomMessage {
|
|
|
|
repeated SubToPusherRoomMessage payload = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SubToPusherRoomMessage {
|
|
|
|
oneof message {
|
2021-07-19 10:16:43 +02:00
|
|
|
VariableWithTagMessage variableMessage = 1;
|
|
|
|
ErrorMessage errorMessage = 2;
|
2021-07-06 15:30:49 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-10 17:46:15 +01:00
|
|
|
/*message BatchToAdminPusherMessage {
|
|
|
|
repeated SubToAdminPusherMessage payload = 2;
|
|
|
|
}*/
|
|
|
|
|
|
|
|
/*message SubToAdminPusherMessage {
|
|
|
|
oneof message {
|
|
|
|
string userUuidJoinedRoom = 1;
|
|
|
|
string userUuidLeftRoom = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message ServerToAdminClientMessage {
|
|
|
|
repeated SubToAdminPusherMessage payload = 2;
|
|
|
|
}*/
|
|
|
|
|
2021-01-18 15:07:40 +01:00
|
|
|
message UserJoinedRoomMessage {
|
|
|
|
string uuid = 1;
|
|
|
|
string ipAddress = 2;
|
|
|
|
string name = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UserLeftRoomMessage {
|
|
|
|
string uuid = 1;
|
|
|
|
}
|
|
|
|
|
2020-12-10 17:46:15 +01:00
|
|
|
message ServerToAdminClientMessage {
|
|
|
|
oneof message {
|
2021-01-18 15:07:40 +01:00
|
|
|
UserJoinedRoomMessage userJoinedRoom = 1;
|
|
|
|
UserLeftRoomMessage userLeftRoom = 2;
|
2020-12-10 17:46:15 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message AdminPusherToBackMessage {
|
|
|
|
oneof message {
|
|
|
|
string subscribeToRoom = 1;
|
|
|
|
// TODO ban, unban
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-11 12:23:50 +01:00
|
|
|
// A message sent by an administrator to a recipient
|
|
|
|
message AdminMessage {
|
|
|
|
string message = 1;
|
|
|
|
string recipientUuid = 2;
|
|
|
|
string roomId = 3;
|
2021-03-11 01:25:36 +01:00
|
|
|
string type = 4;
|
2020-12-11 12:23:50 +01:00
|
|
|
}
|
|
|
|
|
2021-03-01 17:47:00 +01:00
|
|
|
// A message sent by an administrator to everyone in a specific room
|
|
|
|
message AdminRoomMessage {
|
|
|
|
string message = 1;
|
|
|
|
string roomId = 2;
|
2021-07-22 16:14:27 +02:00
|
|
|
string type = 3;
|
2021-03-01 17:47:00 +01:00
|
|
|
}
|
|
|
|
|
2020-12-11 12:23:50 +01:00
|
|
|
// A message sent by an administrator to absolutely everybody
|
|
|
|
message AdminGlobalMessage {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BanMessage {
|
|
|
|
string recipientUuid = 1;
|
|
|
|
string roomId = 2;
|
2021-03-11 01:25:36 +01:00
|
|
|
string type = 3;
|
|
|
|
string message = 4;
|
2020-12-11 12:23:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message EmptyMessage {
|
|
|
|
|
|
|
|
}
|
2020-12-10 17:46:15 +01:00
|
|
|
|
2021-07-06 15:30:49 +02:00
|
|
|
/**
|
|
|
|
* Service handled by the "back". Pusher servers connect to this service.
|
|
|
|
*/
|
2020-11-13 18:00:22 +01:00
|
|
|
service RoomManager {
|
2021-07-06 15:30:49 +02:00
|
|
|
rpc joinRoom(stream PusherToBackMessage) returns (stream ServerToClientMessage); // Holds a connection between one given client and the back
|
|
|
|
rpc listenZone(ZoneMessage) returns (stream BatchToPusherMessage); // Connection used to send to a pusher messages related to a given zone of a given room
|
|
|
|
rpc listenRoom(RoomMessage) returns (stream BatchToPusherRoomMessage); // Connection used to send to a pusher messages related to a given room
|
2020-12-10 17:46:15 +01:00
|
|
|
rpc adminRoom(stream AdminPusherToBackMessage) returns (stream ServerToAdminClientMessage);
|
2020-12-11 12:23:50 +01:00
|
|
|
rpc sendAdminMessage(AdminMessage) returns (EmptyMessage);
|
|
|
|
rpc sendGlobalAdminMessage(AdminGlobalMessage) returns (EmptyMessage);
|
|
|
|
rpc ban(BanMessage) returns (EmptyMessage);
|
2021-03-01 17:47:00 +01:00
|
|
|
rpc sendAdminMessageToRoom(AdminRoomMessage) returns (EmptyMessage);
|
2021-03-11 16:14:34 +01:00
|
|
|
rpc sendWorldFullWarningToRoom(WorldFullWarningToRoomMessage) returns (EmptyMessage);
|
2021-04-01 16:43:12 +02:00
|
|
|
rpc sendRefreshRoomPrompt(RefreshRoomPromptMessage) returns (EmptyMessage);
|
2020-11-13 18:00:22 +01:00
|
|
|
}
|