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

389 lines
7.9 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-14 09:51:43 +08:00
string handleResult = 3;
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;
int64 maxSeq = 3;
int64 minSeq = 4;
repeated GatherFormat singleUserMsg = 5;
repeated GatherFormat groupUserMsg = 6;
}
message PullMessageBySeqListReq{
2021-12-23 17:34:32 +08:00
string userID = 1;
string operationID = 2;
2021-12-26 18:47:11 +08:00
repeated int64 seqList = 3;
2021-12-23 17:34:32 +08:00
}
message PullMessageReq {
string userID = 1;
int64 seqBegin = 2;
int64 seqEnd = 3;
string operationID = 4;
}
message PullMessageResp {
int32 errCode = 1;
string errMsg = 2;
int64 maxSeq = 3;
int64 minSeq = 4;
repeated GatherFormat singleUserMsg = 5;
repeated GatherFormat groupUserMsg = 6;
}
message GetMaxAndMinSeqReq {
}
message GetMaxAndMinSeqResp {
int64 maxSeq = 1;
int64 minSeq = 2;
}
message GatherFormat{
// @inject_tag: json:"id"
2021-12-23 17:34:32 +08:00
string id = 1;
// @inject_tag: json:"list"
2021-12-23 17:34:32 +08:00
repeated MsgData list = 2;//detail msg
}
2021-12-23 17:34:32 +08:00
//message MsgFormat{
// // @inject_tag: json:"sendID"
// string SendID = 1;
// // @inject_tag: json:"recvID"
// string RecvID = 2;
// // @inject_tag: json:"msgFrom"
// int32 MsgFrom = 3;
// // @inject_tag: json:"contentType"
// int32 ContentType = 4;
// // @inject_tag: json:"serverMsgID"
// string ServerMsgID = 5;
// // @inject_tag: json:"content"
// string Content = 6;
// // @inject_tag: json:"seq"
// int64 Seq = 7;
// // @inject_tag: json:"sendTime"
// int64 SendTime = 8;
// // @inject_tag: json:"senderPlatformID"
// int32 SenderPlatformID = 9;
// // @inject_tag: json:"senderNickName"
// string SenderNickName = 10;
// // @inject_tag: json:"senderFaceUrl"
// string SenderFaceURL = 11;
// // @inject_tag: json:"clientMsgID"
// string ClientMsgID = 12;
//}
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;
2021-12-22 09:31:33 +08:00
repeated string forceList = 13;
2021-12-26 18:47:11 +08:00
int64 seq = 14;
2021-12-22 09:31:33 +08:00
int64 sendTime = 15;
int64 createTime = 16;
2022-01-14 09:51:43 +08:00
map<string, bool> options = 17;
2021-12-26 18:47:11 +08:00
OfflinePushInfo offlinePushInfo = 18;
}
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 12:25:41 +08:00
GroupMemberFullInfo creator = 2;
repeated GroupMemberFullInfo memberList = 3;
int64 operationTime = 4;
}
// OnGroupInfoSet()
message MemberInfoSetTips{
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;
string reason = 3;
}
// 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;
}
// OnApplicationGroupRejected()
message GroupApplicationRejectedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
string handleMsg = 4;
}
// OnTransferGroupOwner()
message GroupOwnerTransferredTips{
GroupInfo group = 1;
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
}
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;
2022-01-16 12:25:41 +08:00
GroupMemberFullInfo opUser = 2;
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
//message MemberEnterTips{
// GroupInfo group = 1;
// GroupMemberFullInfo entrantUser = 2;
// int64 operationTime = 3;
//}
2021-12-21 21:40:50 +08:00
message GroupInfoChangedTips{
2022-01-14 09:51:43 +08:00
int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl
GroupInfo group = 2;
GroupMemberFullInfo opUser = 3;
2021-12-10 17:30:11 +08:00
}
2021-12-24 15:02:47 +08:00
message JoinGroupApplicationTips{
2022-01-14 09:51:43 +08:00
GroupInfo group = 1;
PublicUserInfo applicant = 2;
string reason = 3;
2021-12-21 21:40:50 +08:00
}
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
2021-12-21 21:40:50 +08:00
message FriendApplicationAddedTips{
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
2021-12-21 21:40:50 +08:00
message FriendApplicationProcessedTips{
2022-01-14 09:51:43 +08:00
FromToUserID fromToUserID = 1;
2022-01-15 11:14:29 +08:00
int32 handleResult = 2;
2021-12-10 17:30:11 +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/////////////////////
message SelfInfoUpdatedTips{
2022-01-14 09:51:43 +08:00
string userID = 1;
2021-12-21 21:40:50 +08:00
}