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

736 lines
15 KiB

syntax = "proto3";
2 years ago
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
2 years ago
option go_package = "Open_IM/pkg/proto/sdk_ws;server_api_params";
package server_api_params;
3 years ago
////////////////////////////////base///////////////////////////////
2 years ago
message CommonResp{
int32 errCode = 1;
string errMsg = 2;
string detailErrMsg =3;
}
3 years ago
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;
2 years ago
int32 needVerification = 13;
2 years ago
int32 lookMemberInfo =14;
int32 applyMemberFriend = 15;
uint32 notificationUpdateTime = 16;
string notificationUserID = 17;
2 years ago
}
message GroupInfoForSet{
string groupID = 1;
string groupName = 2;
string notification = 3;
string introduction = 4;
string faceURL = 5;
string ex = 6;
google.protobuf.Int32Value needVerification = 7;
2 years ago
google.protobuf.Int32Value lookMemberInfo = 8;
google.protobuf.Int32Value applyMemberFriend = 9;
3 years ago
}
3 years ago
3 years ago
message GroupMemberFullInfo {
string groupID = 1 ;
string userID = 2 ;
3 years ago
int32 roleLevel = 3;
3 years ago
int32 joinTime = 4;
string nickname = 5;
string faceURL = 6;
int32 appMangerLevel = 7; //if >0
int32 joinSource = 8;
string operatorUserID = 9;
string ex = 10;
3 years ago
uint32 muteEndTime = 11;
2 years ago
string inviterUserID = 12;
3 years ago
}
message PublicUserInfo{
string userID = 1;
string nickname = 2;
string faceURL = 3;
int32 gender = 4;
string ex = 5;
3 years ago
}
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;
2 years ago
uint32 createTime = 9;
int32 appMangerLevel = 10;
int32 globalRecvMsgOpt = 11;
int64 birthday = 13;
3 years ago
}
message FriendInfo{
string ownerUserID = 1;
string remark = 2;
uint32 createTime = 3;
UserInfo friendUser = 4;
int32 addSource = 5;
string operatorUserID = 6;
string ex = 7;
3 years ago
}
message BlackInfo{
string ownerUserID = 1;
uint32 createTime = 2;
PublicUserInfo blackUserInfo = 3;
int32 addSource = 4;
string operatorUserID = 5;
string ex = 6;
3 years ago
}
message GroupRequest{
3 years ago
PublicUserInfo userInfo = 1;
GroupInfo groupInfo = 2;
3 years ago
int32 handleResult = 3;
string reqMsg = 4;
string handleMsg = 5;
uint32 reqTime = 6;
string handleUserID = 7;
uint32 handleTime = 8;
string ex = 9;
int32 joinSource = 10;
string inviterUserID = 11;
3 years ago
}
message FriendRequest{
3 years ago
string fromUserID = 1;
string fromNickname = 2;
string fromFaceURL = 3;
3 years ago
int32 fromGender = 4;
3 years ago
string toUserID = 5;
string toNickname = 6;
string toFaceURL = 7;
3 years ago
int32 toGender = 8;
3 years ago
int32 handleResult = 9;
string reqMsg = 10;
uint32 createTime = 11;
string handlerUserID = 12;
string handleMsg = 13;
uint32 handleTime = 14;
string ex = 15;
3 years ago
}
///////////////////////////////////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;
string birthStr = 12;
}
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 {
3 years ago
OrganizationUser organizationUser = 1;
repeated DepartmentMember departmentMemberList = 2;
}
///////////////////////////////////organization end//////////////////////////////////
3 years ago
///////////////////////////////////base end/////////////////////////////////////
3 years ago
message PullMessageBySeqListReq{
string userID = 1;
string operationID = 2;
repeated uint32 seqList = 3;
map <string, seqList>groupSeqList = 4;
}
message seqList {
repeated uint32 seqList = 1;
}
message MsgDataList {
repeated MsgData msgDataList = 1;
}
message PullMessageBySeqListResp {
int32 errCode = 1;
string errMsg = 2;
3 years ago
repeated MsgData list = 3;
3 years ago
map<string, MsgDataList> groupMsgDataList = 4;
}
3 years ago
message GetMaxAndMinSeqReq {
3 years ago
repeated string groupIDList = 1;
string userID = 2;
3 years ago
string operationID =3;
3 years ago
}
message MaxAndMinSeq{
uint32 maxSeq = 1;
uint32 minSeq = 2;
}
message GetMaxAndMinSeqResp {
3 years ago
uint32 maxSeq = 1;
uint32 minSeq = 2;
3 years ago
int32 errCode = 3;
string errMsg = 4;
map<string, MaxAndMinSeq> groupMaxAndMinSeq = 5;
}
message UserSendMsgResp {
string serverMsgID = 1;
string clientMsgID = 2;
int64 sendTime = 3;
}
3 years ago
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
uint32 seq = 14;
3 years ago
int64 sendTime = 15;
int64 createTime = 16;
int32 status = 17;
map<string, bool> options = 18;
OfflinePushInfo offlinePushInfo = 19;
3 years ago
repeated string atUserIDList = 20;
2 years ago
bytes msgDataList = 21;
2 years ago
string attachedInfo = 22;
string ex = 23;
3 years ago
}
message OfflinePushInfo{
string title = 1;
string desc = 2;
string ex = 3;
3 years ago
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;
3 years ago
string jsonDetail = 3;
3 years ago
}
//////////////////////group/////////////////////
3 years ago
// OnGroupCreated()
message GroupCreatedTips{
GroupInfo group = 1;
3 years ago
GroupMemberFullInfo opUser = 2;
3 years ago
repeated GroupMemberFullInfo memberList = 3;
int64 operationTime = 4;
3 years ago
GroupMemberFullInfo groupOwnerUser = 5;
3 years ago
}
// OnGroupInfoSet()
3 years ago
message GroupInfoSetTips{
3 years ago
GroupMemberFullInfo opUser = 1; //who do this
int64 muteTime = 2;
GroupInfo group = 3;
3 years ago
}
3 years ago
// OnJoinGroupApplication()
message JoinGroupApplicationTips{
GroupInfo group = 1;
PublicUserInfo applicant = 2;
3 years ago
string reqMsg = 3;
3 years ago
}
// OnQuitGroup()
3 years ago
//Actively leave the group
3 years ago
message MemberQuitTips{
GroupInfo group = 1;
3 years ago
GroupMemberFullInfo quitUser = 2;
int64 operationTime = 3;
3 years ago
}
3 years ago
// OnApplicationGroupAccepted()
message GroupApplicationAcceptedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
3 years ago
string handleMsg = 4;
int32 receiverAs = 5; // admin(==1) or applicant(==0)
3 years ago
}
3 years ago
// OnApplicationGroupRejected()
message GroupApplicationRejectedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
3 years ago
string handleMsg = 4;
int32 receiverAs = 5; // admin(==1) or applicant(==0)
3 years ago
}
3 years ago
// OnTransferGroupOwner()
message GroupOwnerTransferredTips{
GroupInfo group = 1;
3 years ago
GroupMemberFullInfo opUser = 2;
GroupMemberFullInfo newGroupOwner = 3;
int64 operationTime = 4;
3 years ago
}
3 years ago
3 years ago
// OnMemberKicked()
3 years ago
message MemberKickedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
repeated GroupMemberFullInfo kickedUserList = 3;
int64 operationTime = 4;
3 years ago
}
3 years ago
// OnMemberInvited()
message MemberInvitedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
3 years ago
repeated GroupMemberFullInfo invitedUserList = 3;
int64 operationTime = 4;
3 years ago
}
3 years ago
//Actively join the group
3 years ago
message MemberEnterTips{
GroupInfo group = 1;
GroupMemberFullInfo entrantUser = 2;
int64 operationTime = 3;
}
3 years ago
3 years ago
message GroupDismissedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int64 operationTime = 3;
}
3 years ago
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{
3 years ago
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
3 years ago
message OrganizationChangedTips{
UserInfo opUser = 2;
int64 operationTime = 3;
}
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{
int64 addTime = 1;
string addSource = 2;
string addWording = 3;
}
3 years ago
message FromToUserID{
string fromUserID = 1;
string toUserID = 2;
3 years ago
}
//FromUserID apply to add ToUserID
3 years ago
message FriendApplicationTips{
FromToUserID fromToUserID = 1;
}
3 years ago
3 years ago
//FromUserID accept or reject ToUserID
3 years ago
message FriendApplicationApprovedTips{
FromToUserID fromToUserID = 1;
3 years ago
string handleMsg = 2;
}
3 years ago
3 years ago
//FromUserID accept or reject ToUserID
3 years ago
message FriendApplicationRejectedTips{
FromToUserID fromToUserID = 1;
3 years ago
string handleMsg = 2;
3 years ago
}
3 years ago
3 years ago
// FromUserID Added a friend ToUserID
3 years ago
message FriendAddedTips{
FriendInfo friend = 1;
int64 operationTime = 2;
PublicUserInfo opUser = 3; //who do this
3 years ago
3 years ago
}
3 years ago
3 years ago
// FromUserID deleted a friend ToUserID
3 years ago
message FriendDeletedTips{
FromToUserID fromToUserID = 1;
3 years ago
}
3 years ago
3 years ago
3 years ago
message BlackAddedTips{
FromToUserID fromToUserID = 1;
3 years ago
}
3 years ago
message BlackDeletedTips{
FromToUserID fromToUserID = 1;
3 years ago
}
message FriendInfoChangedTips{
FromToUserID fromToUserID = 1;
3 years ago
}
//////////////////////user/////////////////////
3 years ago
message UserInfoUpdatedTips{
string userID = 1;
3 years ago
}
3 years ago
3 years ago
//////////////////////conversation/////////////////////
message ConversationUpdateTips{
string UserID = 1;
2 years ago
repeated string conversationIDList = 2;
int64 updateUnreadCountTime = 3;
}
3 years ago
message ConversationSetPrivateTips{
string recvID = 1;
string sendID = 2;
bool isPrivate = 3;
3 years ago
}
3 years ago
////////////////////message///////////////////////
message DeleteMessageTips{
string opUserID = 1;
string userID =2;
3 years ago
repeated uint32 seqList = 3;
3 years ago
}
3 years ago
///cms
message RequestPagination {
int32 pageNumber = 1;
int32 showNumber = 2;
3 years ago
}
3 years ago
///////////////////signal//////////////
message SignalReq {
oneof payload {
SignalInviteReq invite = 1;
SignalInviteInGroupReq inviteInGroup= 2;
SignalCancelReq cancel = 3;
SignalAcceptReq accept = 4;
SignalHungUpReq hungUp = 5;
SignalRejectReq reject = 6;
2 years ago
SignalGetRoomByGroupIDReq getRoomByGroupID = 7;
2 years ago
2 years ago
SignalOnRoomParticipantConnectedReq onRoomParticipantConnectedReq = 8;
SignalOnRoomParticipantDisconnectedReq onRoomParticipantDisconnectedReq = 9;
SignalGetTokenByRoomIDReq getTokenByRoomID = 10;
3 years ago
}
}
message SignalResp {
oneof payload {
SignalInviteReply invite = 1;
SignalInviteInGroupReply inviteInGroup= 2;
2 years ago
SignalCancelReply cancel = 3;
3 years ago
SignalAcceptReply accept = 4;
SignalHungUpReply hungUp = 5;
SignalRejectReply reject = 6;
2 years ago
SignalGetRoomByGroupIDReply getRoomByGroupID = 7;
SignalGetTokenByRoomIDReply getTokenByRoomID = 8;
3 years ago
}
}
2 years ago
3 years ago
message InvitationInfo {
string inviterUserID = 1;
repeated string inviteeUserIDList = 2;
2 years ago
string customData = 3;
string groupID = 4;
string roomID = 5;
int32 timeout = 6;
string mediaType = 7;
int32 platformID = 8;
int32 sessionType = 9;
int32 initiateTime = 10;
repeated string busyLineUserIDList = 11;
3 years ago
}
3 years ago
message ParticipantMetaData{
GroupInfo groupInfo = 1;
GroupMemberFullInfo groupMemberInfo = 2;
PublicUserInfo userInfo = 3;
}
3 years ago
message SignalInviteReq {
3 years ago
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
3 years ago
ParticipantMetaData participant = 4;
3 years ago
}
message SignalInviteReply {
string token = 1;
3 years ago
string roomID = 2;
3 years ago
string liveURL = 3;
2 years ago
repeated string busyLineUserIDList = 4;
3 years ago
}
message SignalInviteInGroupReq {
3 years ago
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
3 years ago
ParticipantMetaData participant = 4;
3 years ago
}
message SignalInviteInGroupReply {
string token = 1;
string roomID = 2;
string liveURL = 3;
2 years ago
repeated string busyLineUserIDList = 4;
3 years ago
}
message SignalCancelReq {
3 years ago
string opUserID = 1;
3 years ago
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
3 years ago
ParticipantMetaData participant = 4;
3 years ago
}
message SignalCancelReply {
}
message SignalAcceptReq {
3 years ago
string opUserID = 1;
3 years ago
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
3 years ago
ParticipantMetaData participant = 4;
int32 opUserPlatformID = 5;
3 years ago
}
message SignalAcceptReply {
3 years ago
string token = 1;
string roomID = 2;
string liveURL = 3;
3 years ago
}
message SignalHungUpReq {
3 years ago
string opUserID = 1;
3 years ago
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
3 years ago
}
message SignalHungUpReply {
}
message SignalRejectReq {
3 years ago
string opUserID = 1;
3 years ago
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
ParticipantMetaData participant = 4;
int32 opUserPlatformID = 5;
3 years ago
}
message SignalRejectReply {
}
message SignalGetRoomByGroupIDReq {
string opUserID = 1;
string groupID = 2;
2 years ago
ParticipantMetaData participant = 3;
}
message SignalGetRoomByGroupIDReply {
InvitationInfo invitation = 1;
2 years ago
repeated ParticipantMetaData participant = 2;
2 years ago
string roomID = 3;
}
2 years ago
message SignalOnRoomParticipantConnectedReq {
2 years ago
InvitationInfo invitation = 1;
2 years ago
repeated ParticipantMetaData participant = 2;
2 years ago
string groupID = 3;
}
3 years ago
2 years ago
message SignalOnRoomParticipantDisconnectedReq {
InvitationInfo invitation = 1;
repeated ParticipantMetaData participant = 2;
string groupID = 3;
}
2 years ago
message SignalGetTokenByRoomIDReq {
string roomID = 1;
string opUserID = 2;
ParticipantMetaData participant = 3;
string operationID = 4;
}
message SignalGetTokenByRoomIDReply {
string token = 1;
string liveURL = 2;
}
2 years ago
message DelMsgListReq{
string opUserID = 1;
string userID = 2;
repeated uint32 seqList = 3;
string operationID = 4;
}
message DelMsgListResp{
int32 errCode = 1;
string errMsg = 2;
}
2 years ago
message SetAppBackgroundStatusReq {
string userID = 1;
bool isBackground = 2;
}
3 years ago
2 years ago
message SetAppBackgroundStatusResp {
int32 errCode = 1;
string errMsg = 2;
2 years ago
}
message ExtendMsgSet {
2 years ago
string sourceID = 1;
int32 sessionType = 2;
map <string, ExtendMsg>extendMsgs = 3;
int64 MaxMsgUpdateTime = 4;
int32 extendMsgNum = 5;
int64 createTime = 6;
2 years ago
}
message ExtendMsg {
2 years ago
map <string, KeyValue>reactionExtensionList = 1;
2 years ago
string clientMsgID = 2;
2 years ago
int64 msgFirstModifyTime = 3;
2 years ago
string attachedInfo = 4;
string ex = 5;
}
2 years ago
message KeyValue {
string typeKey = 1;
2 years ago
string value = 2;
2 years ago
int64 latestUpdateTime = 3;
2 years ago
}