Files
open-im-server/pkg/proto/sdk_ws/ws.proto
T

333 lines
6.4 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
2022-01-14 18:16:50 +08:00
package server_api_params;//The package name to which the proto file belongs
2021-12-23 17:34:32 +08:00
//option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk
2021-12-26 18:47:11 +08:00
////////////////////////////////base///////////////////////////////
message GroupInfo{
2022-01-14 09:51:43 +08:00
string groupID = 1;
string groupName = 2;
string notification = 3;
string introduction = 4;
string faceURL = 5;
string ownerUserID = 6;
uint32 createTime = 7;
uint32 memberCount = 8;
string ex = 9;
int32 status = 10;
string creatorUserID = 11;
int32 groupType = 12;
2021-12-26 18:47:11 +08:00
}
2021-12-28 14:07:06 +08:00
2021-12-26 18:47:11 +08:00
message GroupMemberFullInfo {
2022-01-14 09:51:43 +08:00
string groupID = 1 ;
string userID = 2 ;
2021-12-26 18:47:11 +08:00
int32 roleLevel = 3;
2022-01-14 09:51:43 +08:00
int64 joinTime = 4;
string nickname = 5;
string faceURL = 6;
int32 appMangerLevel = 7; //if >0
int32 joinSource = 8;
string operatorUserID = 9;
string ex = 10;
2021-12-26 18:47:11 +08:00
}
message PublicUserInfo{
2022-01-14 09:51:43 +08:00
string userID = 1;
string nickname = 2;
string faceURL = 3;
int32 gender = 4;
int32 appMangerLevel = 5; //if >0
2021-12-26 18:47:11 +08:00
}
message UserInfo{
2022-01-14 09:51:43 +08:00
string userID = 1;
string nickname = 2;
string faceURL = 3;
int32 gender = 4;
string phoneNumber = 5;
uint32 birth = 6;
string email = 7;
string ex = 8;
uint32 createTime = 9;
int32 appMangerLevel = 10;
2021-12-26 18:47:11 +08:00
}
message FriendInfo{
2022-01-14 09:51:43 +08:00
string ownerUserID = 1;
string remark = 2;
uint32 createTime = 3;
UserInfo friendUser = 4;
int32 addSource = 5;
string operatorUserID = 6;
string ex = 7;
2021-12-26 18:47:11 +08:00
}
message BlackInfo{
2022-01-14 09:51:43 +08:00
string ownerUserID = 1;
uint32 createTime = 2;
PublicUserInfo blackUserInfo = 3;
int32 addSource = 4;
string operatorUserID = 5;
string ex = 6;
2021-12-26 18:47:11 +08:00
}
message GroupRequest{
2022-01-15 11:14:29 +08:00
PublicUserInfo userInfo = 1;
GroupInfo groupInfo = 2;
2022-01-19 14:10:15 +08:00
int32 handleResult = 3;
2022-01-14 09:51:43 +08:00
string reqMsg = 4;
string handleMsg = 5;
uint32 reqTime = 6;
string handleUserID = 7;
uint32 handleTime = 8;
string ex = 9;
2021-12-26 18:47:11 +08:00
}
message FriendRequest{
2022-01-14 18:16:50 +08:00
string fromUserID = 1;
string fromNickname = 2;
string fromFaceURL = 3;
2022-01-14 18:29:09 +08:00
int32 fromGender = 4;
2022-01-14 18:16:50 +08:00
string toUserID = 5;
string toNickname = 6;
string toFaceURL = 7;
2022-01-14 18:29:09 +08:00
int32 toGender = 8;
2022-01-14 18:16:50 +08:00
int32 handleResult = 9;
string reqMsg = 10;
uint32 createTime = 11;
string handlerUserID = 12;
string handleMsg = 13;
uint32 handleTime = 14;
string ex = 15;
2021-12-26 18:47:11 +08:00
}
///////////////////////////////////base end/////////////////////////////////////
message PullMessageBySeqListResp {
2021-12-23 17:34:32 +08:00
int32 errCode = 1;
string errMsg = 2;
2022-01-20 10:00:02 +08:00
repeated MsgData list = 3;
}
message PullMessageBySeqListReq{
2021-12-23 17:34:32 +08:00
string userID = 1;
string operationID = 2;
2022-01-20 11:36:43 +08:00
repeated uint32 seqList = 3;
}
message GetMaxAndMinSeqReq {
}
message GetMaxAndMinSeqResp {
2022-01-20 11:36:43 +08:00
uint32 maxSeq = 1;
uint32 minSeq = 2;
}
message UserSendMsgResp {
2022-01-14 09:51:43 +08:00
string serverMsgID = 1;
string clientMsgID = 2;
int64 sendTime = 3;
}
message MsgData {
string sendID = 1;
string recvID = 2;
2021-12-22 09:31:33 +08:00
string groupID = 3;
2021-12-26 18:47:11 +08:00
string clientMsgID = 4;
string serverMsgID = 5;
int32 senderPlatformID = 6;
string senderNickname = 7;
string senderFaceURL = 8;
2021-12-22 09:31:33 +08:00
int32 sessionType = 9;
int32 msgFrom = 10;
int32 contentType = 11;
2021-12-26 18:47:11 +08:00
bytes content = 12;
2022-01-20 11:36:43 +08:00
uint32 seq = 14;
2021-12-22 09:31:33 +08:00
int64 sendTime = 15;
int64 createTime = 16;
2022-01-18 11:54:48 +08:00
int32 status = 17;
map<string, bool> options = 18;
OfflinePushInfo offlinePushInfo = 19;
}
2021-12-10 11:07:44 +08:00
message OfflinePushInfo{
2022-01-14 09:51:43 +08:00
string title = 1;
string desc = 2;
string ex = 3;
2021-12-26 18:47:11 +08:00
string iOSPushSound = 4;
bool iOSBadgeCount = 5;
2021-12-10 11:07:44 +08:00
}
2021-12-10 17:30:11 +08:00
2021-12-21 21:40:50 +08:00
2021-12-26 18:47:11 +08:00
2021-12-21 21:40:50 +08:00
message TipsComm{
2022-01-14 09:51:43 +08:00
bytes detail = 1;
string defaultTips = 2;
2021-12-21 21:40:50 +08:00
}
//////////////////////group/////////////////////
2022-01-16 12:25:41 +08:00
// OnGroupCreated()
message GroupCreatedTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
2022-01-16 16:31:28 +08:00
GroupMemberFullInfo opUser = 2;
2022-01-16 12:25:41 +08:00
repeated GroupMemberFullInfo memberList = 3;
int64 operationTime = 4;
2022-01-16 16:31:28 +08:00
GroupMemberFullInfo groupOwnerUser = 5;
2022-01-16 12:25:41 +08:00
}
// OnGroupInfoSet()
2022-01-16 16:31:28 +08:00
message GroupInfoSetTips{
2022-01-16 12:25:41 +08:00
GroupMemberFullInfo opUser = 1; //who do this
int64 muteTime = 2;
GroupInfo group = 3;
2021-12-21 21:40:50 +08:00
}
2022-01-16 12:25:41 +08:00
// OnJoinGroupApplication()
message JoinGroupApplicationTips{
GroupInfo group = 1;
PublicUserInfo applicant = 2;
2022-01-16 16:31:28 +08:00
string reqMsg = 3;
2022-01-16 12:25:41 +08:00
}
// OnQuitGroup()
2021-12-21 21:40:50 +08:00
//Actively leave the group
2022-01-16 12:25:41 +08:00
message MemberQuitTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
2022-01-16 12:25:41 +08:00
GroupMemberFullInfo quitUser = 2;
2022-01-14 09:51:43 +08:00
int64 operationTime = 3;
2021-12-21 21:40:50 +08:00
}
2022-01-16 12:25:41 +08:00
// OnApplicationGroupAccepted()
message GroupApplicationAcceptedTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
2022-01-16 12:25:41 +08:00
string handleMsg = 4;
2021-12-21 21:40:50 +08:00
}
2022-01-16 12:25:41 +08:00
// OnApplicationGroupRejected()
message GroupApplicationRejectedTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
2022-01-16 12:25:41 +08:00
string handleMsg = 4;
2021-12-21 21:40:50 +08:00
}
2022-01-16 12:25:41 +08:00
// OnTransferGroupOwner()
message GroupOwnerTransferredTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
2022-01-16 12:25:41 +08:00
GroupMemberFullInfo opUser = 2;
GroupMemberFullInfo newGroupOwner = 3;
2022-01-14 09:51:43 +08:00
int64 operationTime = 4;
2021-12-21 21:40:50 +08:00
}
2021-12-10 17:30:11 +08:00
2022-01-16 12:25:41 +08:00
// OnMemberKicked()
2021-12-21 21:40:50 +08:00
message MemberKickedTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
repeated GroupMemberFullInfo kickedUserList = 3;
int64 operationTime = 4;
2021-12-21 21:40:50 +08:00
}
2022-01-16 12:25:41 +08:00
// OnMemberInvited()
message MemberInvitedTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
2022-01-16 12:25:41 +08:00
repeated GroupMemberFullInfo invitedUserList = 3;
2022-01-14 09:51:43 +08:00
int64 operationTime = 4;
2021-12-21 21:40:50 +08:00
}
2022-01-16 12:25:41 +08:00
//Actively join the group
2022-01-16 16:31:28 +08:00
message MemberEnterTips{
GroupInfo group = 1;
GroupMemberFullInfo entrantUser = 2;
int64 operationTime = 3;
}
2022-01-16 12:25:41 +08:00
2021-12-21 21:40:50 +08:00
//////////////////////friend/////////////////////
2021-12-26 18:47:11 +08:00
//message FriendInfo{
// UserInfo OwnerUser = 1;
// string Remark = 2;
// uint64 CreateTime = 3;
// UserInfo FriendUser = 4;
//}
2021-12-10 17:30:11 +08:00
2021-12-21 21:40:50 +08:00
message FriendApplication{
2022-01-14 09:51:43 +08:00
int64 addTime = 1;
string addSource = 2;
string addWording = 3;
2021-12-20 17:27:05 +08:00
}
2021-12-24 15:02:47 +08:00
message FromToUserID{
2022-01-14 09:51:43 +08:00
string fromUserID = 1;
string toUserID = 2;
2021-12-24 15:02:47 +08:00
}
//FromUserID apply to add ToUserID
2022-01-16 18:58:07 +08:00
message FriendApplicationTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2021-12-20 17:27:05 +08:00
}
2021-12-10 17:30:11 +08:00
2021-12-24 15:02:47 +08:00
//FromUserID accept or reject ToUserID
2022-01-16 16:31:28 +08:00
message FriendApplicationApprovedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2022-01-16 16:31:28 +08:00
string handleMsg = 2;
2021-12-20 17:27:05 +08:00
}
2021-12-10 17:30:11 +08:00
2021-12-24 15:02:47 +08:00
//FromUserID accept or reject ToUserID
2022-01-16 16:31:28 +08:00
message FriendApplicationRejectedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2022-01-16 16:31:28 +08:00
string handleMsg = 2;
2021-12-10 17:30:11 +08:00
}
2022-01-16 16:31:28 +08:00
2021-12-24 15:02:47 +08:00
// FromUserID Added a friend ToUserID
2021-12-21 21:40:50 +08:00
message FriendAddedTips{
2022-01-14 09:51:43 +08:00
FriendInfo friend = 1;
int64 operationTime = 2;
PublicUserInfo opUser = 3; //who do this
2021-12-24 15:02:47 +08:00
2021-12-21 21:40:50 +08:00
}
2021-12-10 17:30:11 +08:00
2021-12-24 15:02:47 +08:00
// FromUserID deleted a friend ToUserID
2021-12-21 21:40:50 +08:00
message FriendDeletedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2021-12-21 21:40:50 +08:00
}
2021-12-10 17:30:11 +08:00
2021-12-26 18:47:11 +08:00
2021-12-21 21:40:50 +08:00
message BlackAddedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2021-12-21 21:40:50 +08:00
}
2021-12-20 17:27:05 +08:00
2021-12-21 21:40:50 +08:00
message BlackDeletedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2021-12-21 21:40:50 +08:00
}
message FriendInfoChangedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2021-12-21 21:40:50 +08:00
}
//////////////////////user/////////////////////
2022-01-16 18:58:07 +08:00
message UserInfoUpdatedTips{
2022-01-14 09:51:43 +08:00
string userID = 1;
2021-12-21 21:40:50 +08:00
}