You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/proto/sdk_ws/ws.proto

341 lines
7.2 KiB

syntax = "proto3";
package open_im_sdk;//The package name to which the proto file belongs
//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
3 years ago
////////////////////////////////base///////////////////////////////
message GroupInfo{
string GroupID = 1;
string GroupName = 2;
string Notification = 3;
string Introduction = 4;
string FaceUrl = 5;
string OwnerUserID = 6;
int64 CreateTime = 7;
uint32 MemberCount = 8;
string Ex = 9;
int32 Status = 10;
string CreatorUserID = 11;
int32 GroupType = 12;
}
3 years ago
3 years ago
message GroupMemberFullInfo {
string GroupID = 1 ;
string UserID = 2 ;
int32 roleLevel = 3;
int64 JoinTime = 4;
string NickName = 5;
string FaceUrl = 6;
3 years ago
int32 AppMangerLevel = 7; //if >0
int32 JoinSource = 8;
string OperatorUserID = 9;
string Ex = 10;
3 years ago
}
message PublicUserInfo{
string UserID = 1;
string Nickname = 2;
string FaceUrl = 3;
int32 Gender = 4;
int32 AppMangerLevel = 5; //if >0
}
message UserInfo{
string UserID = 1;
string Nickname = 2;
string FaceUrl = 3;
int32 Gender = 4;
string PhoneNumber = 5;
3 years ago
int64 Birth = 6;
3 years ago
string Email = 7;
string Ex = 8;
3 years ago
int64 CreateTime = 9;
int32 AppMangerLevel = 10;
3 years ago
}
message FriendInfo{
string OwnerUserID = 1;
string Remark = 2;
int64 CreateTime = 3;
UserInfo FriendUser = 4;
int32 AddSource = 5;
string OperatorUserID = 6;
string Ex = 7;
}
message BlackInfo{
string OwnerUserID = 1;
int64 CreateTime = 2;
3 years ago
PublicUserInfo BlackUserInfo = 3;
int32 AddSource = 4;
string OperatorUserID = 5;
string Ex = 6;
3 years ago
}
message GroupRequest{
string UserID = 1;
string GroupID = 2;
string HandleResult = 3;
string ReqMsg = 4;
string HandleMsg = 5;
int64 ReqTime = 6;
string HandleUserID = 7;
int64 HandleTime = 8;
string Ex = 9;
}
message FriendRequest{
string FromUserID = 1;
string ToUserID = 2;
int32 HandleResult = 3;
string ReqMsg = 4;
int64 CreateTime = 5;
string HandlerUserID = 6;
string HandleMsg = 7;
int64 HandleTime = 8;
string Ex = 9;
}
///////////////////////////////////base end/////////////////////////////////////
message PullMessageBySeqListResp {
int32 errCode = 1;
string errMsg = 2;
int64 maxSeq = 3;
int64 minSeq = 4;
repeated GatherFormat singleUserMsg = 5;
repeated GatherFormat groupUserMsg = 6;
}
message PullMessageBySeqListReq{
string userID = 1;
string operationID = 2;
3 years ago
repeated int64 seqList = 3;
}
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"
string id = 1;
// @inject_tag: json:"list"
repeated MsgData list = 2;//detail msg
}
//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 {
string ServerMsgID = 1;
string ClientMsgID = 2;
int64 sendTime = 3;
}
message MsgData {
string sendID = 1;
string recvID = 2;
3 years ago
string groupID = 3;
3 years ago
string clientMsgID = 4;
string serverMsgID = 5;
int32 senderPlatformID = 6;
string senderNickname = 7;
string senderFaceURL = 8;
3 years ago
int32 sessionType = 9;
int32 msgFrom = 10;
int32 contentType = 11;
3 years ago
bytes content = 12;
3 years ago
repeated string forceList = 13;
3 years ago
int64 seq = 14;
3 years ago
int64 sendTime = 15;
int64 createTime = 16;
3 years ago
map<string, bool> Options = 17;
OfflinePushInfo offlinePushInfo = 18;
}
message OfflinePushInfo{
3 years ago
string Title = 1;
string Desc = 2;
string Ex = 3;
string iOSPushSound = 4;
bool iOSBadgeCount = 5;
}
3 years ago
3 years ago
3 years ago
3 years ago
message TipsComm{
bytes Detail = 1;
string DefaultTips = 2;
}
//////////////////////group/////////////////////
//Actively join the group
message MemberEnterTips{
GroupInfo Group = 1;
GroupMemberFullInfo EntrantUser = 2;
3 years ago
int64 OperationTime = 3;
3 years ago
}
//Actively leave the group
message MemberLeaveTips{
GroupInfo Group = 1;
GroupMemberFullInfo LeaverUser = 2;
3 years ago
int64 OperationTime = 3;
3 years ago
}
message MemberInvitedTips{
GroupInfo Group = 1;
GroupMemberFullInfo OpUser = 2;
3 years ago
repeated GroupMemberFullInfo InvitedUserList = 3;
3 years ago
int64 OperationTime = 4;
3 years ago
}
message MemberKickedTips{
GroupInfo Group = 1;
GroupMemberFullInfo OpUser = 2;
3 years ago
repeated GroupMemberFullInfo KickedUserList = 3;
3 years ago
int64 OperationTime = 4;
3 years ago
}
message MemberInfoChangedTips{
3 years ago
int32 ChangeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ;
3 years ago
GroupMemberFullInfo OpUser = 2; //who do this
GroupMemberFullInfo FinalInfo = 3; //
3 years ago
int64 MuteTime = 4;
3 years ago
GroupInfo Group = 5;
}
message GroupCreatedTips{
GroupInfo Group = 1;
GroupMemberFullInfo Creator = 2;
repeated GroupMemberFullInfo MemberList = 3;
3 years ago
int64 OperationTime = 4;
3 years ago
}
message GroupInfoChangedTips{
3 years ago
int32 ChangedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl
3 years ago
GroupInfo Group = 2;
GroupMemberFullInfo OpUser = 3;
3 years ago
}
3 years ago
message JoinGroupApplicationTips{
3 years ago
GroupInfo Group = 1;
3 years ago
PublicUserInfo Applicant = 2;
string Reason = 3;
3 years ago
}
message ApplicationProcessedTips{
GroupInfo Group = 1;
GroupMemberFullInfo OpUser = 2;
int32 Result = 3;
3 years ago
string Reason = 4;
3 years ago
}
//////////////////////friend/////////////////////
3 years ago
//message FriendInfo{
// UserInfo OwnerUser = 1;
// string Remark = 2;
// uint64 CreateTime = 3;
// UserInfo FriendUser = 4;
//}
3 years ago
3 years ago
message FriendApplication{
3 years ago
int64 AddTime = 1;
3 years ago
string AddSource = 2;
string AddWording = 3;
}
3 years ago
message FromToUserID{
string FromUserID = 1;
string ToUserID = 2;
}
//FromUserID apply to add ToUserID
3 years ago
message FriendApplicationAddedTips{
3 years ago
FromToUserID FromToUserID = 1;
}
3 years ago
3 years ago
//FromUserID accept or reject ToUserID
3 years ago
message FriendApplicationProcessedTips{
3 years ago
FromToUserID FromToUserID = 1;
3 years ago
}
3 years ago
// FromUserID Added a friend ToUserID
3 years ago
message FriendAddedTips{
FriendInfo Friend = 1;
3 years ago
int64 OperationTime = 2;
3 years ago
PublicUserInfo OpUser = 3; //who do this
3 years ago
}
3 years ago
3 years ago
// FromUserID deleted a friend ToUserID
3 years ago
message FriendDeletedTips{
3 years ago
FromToUserID FromToUserID = 1;
3 years ago
}
3 years ago
3 years ago
3 years ago
message BlackAddedTips{
3 years ago
FromToUserID FromToUserID = 1;
3 years ago
}
3 years ago
message BlackDeletedTips{
3 years ago
FromToUserID FromToUserID = 1;
3 years ago
}
message FriendInfoChangedTips{
3 years ago
FromToUserID FromToUserID = 1;
3 years ago
}
//////////////////////user/////////////////////
message SelfInfoUpdatedTips{
3 years ago
string UserID = 1;
3 years ago
}