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

590 lines
11 KiB

syntax = "proto3";
option go_package = "./sdk_ws;server_api_params";
package server_api_params;
////////////////////////////////base///////////////////////////////
message GroupInfo{
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;
}
message GroupMemberFullInfo {
string groupID = 1 ;
string userID = 2 ;
int32 roleLevel = 3;
int32 joinTime = 4;
string nickname = 5;
string faceURL = 6;
int32 appMangerLevel = 7; //if >0
int32 joinSource = 8;
string operatorUserID = 9;
string ex = 10;
uint32 muteEndTime = 11;
}
message PublicUserInfo{
string userID = 1;
string nickname = 2;
string faceURL = 3;
int32 gender = 4;
string ex = 5;
}
message UserInfo{
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;
}
message FriendInfo{
string ownerUserID = 1;
string remark = 2;
uint32 createTime = 3;
UserInfo friendUser = 4;
int32 addSource = 5;
string operatorUserID = 6;
string ex = 7;
}
message BlackInfo{
string ownerUserID = 1;
uint32 createTime = 2;
PublicUserInfo blackUserInfo = 3;
int32 addSource = 4;
string operatorUserID = 5;
string ex = 6;
}
message GroupRequest{
PublicUserInfo userInfo = 1;
GroupInfo groupInfo = 2;
int32 handleResult = 3;
string reqMsg = 4;
string handleMsg = 5;
uint32 reqTime = 6;
string handleUserID = 7;
uint32 handleTime = 8;
string ex = 9;
}
message FriendRequest{
string fromUserID = 1;
string fromNickname = 2;
string fromFaceURL = 3;
int32 fromGender = 4;
string toUserID = 5;
string toNickname = 6;
string toFaceURL = 7;
int32 toGender = 8;
int32 handleResult = 9;
string reqMsg = 10;
uint32 createTime = 11;
string handlerUserID = 12;
string handleMsg = 13;
uint32 handleTime = 14;
string ex = 15;
}
///////////////////////////////////organization/////////////////////////////////////
message Department {
string departmentID = 1;
string faceURL = 2;
string name = 3;
string parentID = 4;
int32 order = 5;
int32 departmentType = 6;
uint32 createTime = 7;
uint32 subDepartmentNum = 8;
uint32 memberNum = 9;
string ex = 10;
}
message OrganizationUser {
string userID = 1;
string nickname = 2;
string englishName = 3;
string faceURL = 4;
int32 gender = 5;
string mobile = 6;
string telephone = 7;
uint32 birth = 8;
string email = 9;
uint32 createTime = 10;
string ex = 11;
}
message DepartmentMember {
string userID = 1;
3 years ago
string departmentID = 2;
int32 order = 3;
string position = 4;
int32 leader = 5;
int32 status = 6;
string ex = 7;
}
3 years ago
message UserDepartmentMember {
OrganizationUser organizationUser = 1;
DepartmentMember departmentMember = 2;
}
message UserInDepartment {
OrganizationUser organizationUser = 1;
repeated DepartmentMember departmentMemberList = 2;
}
///////////////////////////////////organization end//////////////////////////////////
///////////////////////////////////base end/////////////////////////////////////
message PullMessageBySeqListResp {
int32 errCode = 1;
string errMsg = 2;
repeated MsgData list = 3;
}
message PullMessageBySeqListReq{
string userID = 1;
string operationID = 2;
repeated uint32 seqList = 3;
}
message GetMaxAndMinSeqReq {
}
message GetMaxAndMinSeqResp {
uint32 maxSeq = 1;
uint32 minSeq = 2;
}
message UserSendMsgResp {
string serverMsgID = 1;
string clientMsgID = 2;
int64 sendTime = 3;
}
message MsgData {
string sendID = 1;
string recvID = 2;
string groupID = 3;
string clientMsgID = 4;
string serverMsgID = 5;
int32 senderPlatformID = 6;
string senderNickname = 7;
string senderFaceURL = 8;
int32 sessionType = 9;
int32 msgFrom = 10;
int32 contentType = 11;
bytes content = 12;
uint32 seq = 14;
int64 sendTime = 15;
int64 createTime = 16;
int32 status = 17;
map<string, bool> options = 18;
OfflinePushInfo offlinePushInfo = 19;
}
// repeated string atUserIDList = 20;
message OfflinePushInfo{
string title = 1;
string desc = 2;
string ex = 3;
string iOSPushSound = 4;
bool iOSBadgeCount = 5;
}
message TipsComm{
bytes detail = 1;
string defaultTips = 2;
string jsonDetail = 3;
}
//////////////////////group/////////////////////
// OnGroupCreated()
message GroupCreatedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
repeated GroupMemberFullInfo memberList = 3;
int64 operationTime = 4;
GroupMemberFullInfo groupOwnerUser = 5;
}
// OnGroupInfoSet()
message GroupInfoSetTips{
GroupMemberFullInfo opUser = 1; //who do this
int64 muteTime = 2;
GroupInfo group = 3;
}
// OnJoinGroupApplication()
message JoinGroupApplicationTips{
GroupInfo group = 1;
PublicUserInfo applicant = 2;
string reqMsg = 3;
}
// OnQuitGroup()
//Actively leave the group
message MemberQuitTips{
GroupInfo group = 1;
GroupMemberFullInfo quitUser = 2;
int64 operationTime = 3;
}
// OnApplicationGroupAccepted()
message GroupApplicationAcceptedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
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;
int64 operationTime = 4;
}
// OnMemberKicked()
message MemberKickedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
repeated GroupMemberFullInfo kickedUserList = 3;
int64 operationTime = 4;
}
// OnMemberInvited()
message MemberInvitedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
repeated GroupMemberFullInfo invitedUserList = 3;
int64 operationTime = 4;
}
//Actively join the group
message MemberEnterTips{
GroupInfo group = 1;
GroupMemberFullInfo entrantUser = 2;
int64 operationTime = 3;
}
message GroupDismissedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
}
message GroupMemberMutedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
GroupMemberFullInfo mutedUser = 4;
uint32 mutedSeconds = 5;
}
message GroupMemberCancelMutedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
GroupMemberFullInfo mutedUser = 4;
}
message GroupMutedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
}
message GroupCancelMutedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
}
message GroupMemberInfoSetTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
GroupMemberFullInfo changedUser = 4;
}
3 years ago
message OrganizationChangedTips{
UserInfo opUser = 2;
int64 operationTime = 3;
}
//////////////////////friend/////////////////////
//message FriendInfo{
// UserInfo OwnerUser = 1;
// string Remark = 2;
// uint64 CreateTime = 3;
// UserInfo FriendUser = 4;
//}
message FriendApplication{
int64 addTime = 1;
string addSource = 2;
string addWording = 3;
}
message FromToUserID{
string fromUserID = 1;
string toUserID = 2;
}
//FromUserID apply to add ToUserID
message FriendApplicationTips{
FromToUserID fromToUserID = 1;
}
//FromUserID accept or reject ToUserID
message FriendApplicationApprovedTips{
FromToUserID fromToUserID = 1;
string handleMsg = 2;
}
//FromUserID accept or reject ToUserID
message FriendApplicationRejectedTips{
FromToUserID fromToUserID = 1;
string handleMsg = 2;
}
// FromUserID Added a friend ToUserID
message FriendAddedTips{
FriendInfo friend = 1;
int64 operationTime = 2;
PublicUserInfo opUser = 3; //who do this
}
// FromUserID deleted a friend ToUserID
message FriendDeletedTips{
FromToUserID fromToUserID = 1;
}
message BlackAddedTips{
FromToUserID fromToUserID = 1;
}
message BlackDeletedTips{
FromToUserID fromToUserID = 1;
}
message FriendInfoChangedTips{
FromToUserID fromToUserID = 1;
}
//////////////////////user/////////////////////
message UserInfoUpdatedTips{
string userID = 1;
}
//////////////////////conversation/////////////////////
message ConversationUpdateTips{
string UserID = 1;
}
message ConversationSetPrivateTips{
string recvID = 1;
string sendID = 2;
bool isPrivate = 3;
}
///cms
message RequestPagination {
int32 pageNumber = 1;
int32 showNumber = 2;
}
message ResponsePagination {
int32 CurrentPage = 5;
int32 ShowNumber = 6;
}
///////////////////signal//////////////
message SignalReq {
oneof payload {
SignalInviteReq invite = 1;
SignalInviteInGroupReq inviteInGroup= 2;
SignalCancelReq cancel = 3;
SignalAcceptReq accept = 4;
SignalHungUpReq hungUp = 5;
SignalRejectReq reject = 6;
}
}
message SignalResp {
oneof payload {
SignalInviteReply invite = 1;
SignalInviteInGroupReply inviteInGroup= 2;
SignalCancelReply cancel = 3;
SignalAcceptReply accept = 4;
SignalHungUpReply hungUp = 5;
SignalRejectReply reject = 6;
}
}
message InvitationInfo {
string inviterUserID = 1;
repeated string inviteeUserIDList = 2;
string customData = 3;
string groupID = 4;
string roomID = 5;
int32 timeout = 6;
string mediaType = 7;
int32 platformID = 8;
int32 sessionType = 9;
}
message ParticipantMetaData{
GroupInfo groupInfo = 1;
GroupMemberFullInfo groupMemberInfo = 2;
PublicUserInfo userInfo = 3;
}
message SignalInviteReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
}
message SignalInviteReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
}
message SignalInviteInGroupReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
}
message SignalInviteInGroupReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
}
message SignalCancelReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
}
message SignalCancelReply {
}
message SignalAcceptReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
int32 opUserPlatformID = 5;
}
message SignalAcceptReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
}
message SignalHungUpReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
}
message SignalHungUpReply {
}
message SignalRejectReq {
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
int32 opUserPlatformID = 5;
}
message SignalRejectReply {
}
message DelMsgListReq{
string opUserID = 1;
string userID = 2;
repeated uint32 seqList = 3;
string operationID = 4;
}
message DelMsgListResp{
int32 errCode = 1;
string errMsg = 2;
}