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/sdkws/sdkws.proto

639 lines
13 KiB

syntax = "proto3";
package OpenIMServer.sdkws;
2 years ago
import "wrapperspb/wrapperspb.proto";
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws";
3 years ago
////////////////////////////////base///////////////////////////////
message GroupInfo{
string groupID = 1;
string groupName = 2;
string notification = 3;
string introduction = 4;
string faceURL = 5;
string ownerUserID = 6;
2 years ago
int64 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;
2 years ago
int32 applyMemberFriend = 15;
2 years ago
int64 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;
2 years ago
OpenIMServer.protobuf.Int32Value needVerification = 7;
OpenIMServer.protobuf.Int32Value lookMemberInfo = 8;
OpenIMServer.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;
2 years ago
int64 joinTime = 4;
string nickname = 5;
string faceURL = 6;
int32 appMangerLevel = 7; //if >0
int32 joinSource = 8;
string operatorUserID = 9;
string ex = 10;
2 years ago
int64 muteEndTime = 11;
2 years ago
string inviterUserID = 12;
3 years ago
}
message PublicUserInfo{
string userID = 1;
string nickname = 2;
string faceURL = 3;
2 years ago
string ex = 4;
3 years ago
}
message UserInfo{
string userID = 1;
string nickname = 2;
string faceURL = 3;
2 years ago
string ex = 4;
int64 createTime = 5;
int32 appMangerLevel = 6;
int32 globalRecvMsgOpt = 7;
3 years ago
}
message FriendInfo{
string ownerUserID = 1;
string remark = 2;
2 years ago
int64 createTime = 3;
UserInfo friendUser = 4;
int32 addSource = 5;
string operatorUserID = 6;
string ex = 7;
3 years ago
}
message BlackInfo{
string ownerUserID = 1;
2 years ago
int64 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;
2 years ago
int64 reqTime = 6;
string handleUserID = 7;
2 years ago
int64 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;
2 years ago
string toUserID = 4;
string toNickname = 5;
string toFaceURL = 6;
int32 handleResult = 7;
string reqMsg = 8;
int64 createTime = 9;
string handlerUserID = 10;
string handleMsg = 11;
int64 handleTime = 12;
string ex = 13;
3 years ago
}
///////////////////////////////////base end/////////////////////////////////////
2 years ago
message PullMessageBySeqsReq{
3 years ago
string userID = 1;
repeated SeqRange seqRanges = 2;
3 years ago
}
message SeqRange {
string conversationID = 1;
int64 begin = 2;
int64 end = 3;
2 years ago
int64 num = 4;
3 years ago
}
message PullMsgs {
repeated MsgData Msgs = 1;
3 years ago
}
2 years ago
message PullMessageBySeqsResp {
2 years ago
map<string, PullMsgs> msgs = 1;
map<string, PullMsgs> notificationMsgs = 2;
}
3 years ago
2 years ago
message GetMaxSeqReq {
string userID = 1;
}
2 years ago
message GetMaxSeqResp {
map<string, int64> maxSeqs = 1;
}
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;
2 years ago
int64 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
string attachedInfo = 21;
string ex = 22;
2 years ago
}
2 years ago
message PushMessages{
2 years ago
repeated MsgData msgs = 1;
}
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
3 years ago
//////////////////////friend/////////////////////
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; //from发起者 to接收者
}
3 years ago
3 years ago
//FromUserID accept or reject ToUserID
3 years ago
message FriendApplicationApprovedTips{
FromToUserID fromToUserID = 1; //from同意者to请求发起者
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; //from拒绝者to请求发起者
2 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; //fromowner tofriend
3 years ago
}
3 years ago
3 years ago
3 years ago
message BlackAddedTips{
FromToUserID fromToUserID = 1; //fromowner toblack
3 years ago
}
3 years ago
message BlackDeletedTips{
FromToUserID fromToUserID = 1; //fromowner toblack
3 years ago
}
message FriendInfoChangedTips{
FromToUserID fromToUserID = 1; //fromchanged tofriend
3 years ago
}
//////////////////////user/////////////////////
3 years ago
message UserInfoUpdatedTips{
string userID = 1;
3 years ago
}
3 years ago
3 years ago
//////////////////////conversation/////////////////////
message ConversationUpdateTips{
2 years ago
string UserID = 1;
repeated string conversationIDList = 2;
int64 updateUnreadCountTime = 3;
}
3 years ago
message ConversationSetPrivateTips{
2 years ago
string recvID = 1;
string sendID = 2;
bool isPrivate = 3;
3 years ago
}
3 years ago
////////////////////message///////////////////////
message seqs {
repeated int64 seqs = 1;
}
3 years ago
message DeleteMessageTips{
string opUserID = 1;
2 years ago
string userID = 2;
2 years ago
repeated int64 seqs = 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 {
2 years ago
SignalInviteReq invite = 1;
SignalInviteInGroupReq inviteInGroup = 2;
SignalCancelReq cancel = 3;
SignalAcceptReq accept = 4;
SignalHungUpReq hungUp = 5;
SignalRejectReq reject = 6;
SignalGetRoomByGroupIDReq getRoomByGroupID = 7;
SignalOnRoomParticipantConnectedReq onRoomParticipantConnectedReq = 8;
SignalOnRoomParticipantDisconnectedReq onRoomParticipantDisconnectedReq = 9;
SignalGetTokenByRoomIDReq getTokenByRoomID = 10;
3 years ago
}
}
message SignalResp {
oneof payload {
SignalInviteReply invite = 1;
2 years ago
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 {
2 years ago
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;
int32 initiateTime = 10;
2 years ago
repeated string busyLineUserIDList = 11;
3 years ago
}
3 years ago
message ParticipantMetaData{
2 years ago
GroupInfo groupInfo = 1;
GroupMemberFullInfo groupMemberInfo = 2;
PublicUserInfo userInfo = 3;
3 years ago
}
3 years ago
message SignalInviteReq {
2 years ago
string opUserID = 1;
InvitationInfo invitation = 2;
OfflinePushInfo offlinePushInfo = 3;
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;
2 years ago
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;
2 years ago
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;
2 years ago
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;
2 years ago
OfflinePushInfo offlinePushInfo = 3;
3 years ago
}
message SignalHungUpReply {
}
message SignalRejectReq {
3 years ago
string opUserID = 1;
3 years ago
InvitationInfo invitation = 2;
2 years ago
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;
}
message SignalGetTokenByRoomIDReply {
string token = 1;
string liveURL = 2;
}
2 years ago
2 years ago
message SetAppBackgroundStatusReq {
string userID = 1;
bool isBackground = 2;
}
3 years ago
2 years ago
message SetAppBackgroundStatusResp {
2 years ago
}
message ExtendMsgSet {
string conversationID = 1;
2 years ago
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
}
2 years ago
message ReactionMessageModifierNotification {
string conversationID = 1;
2 years ago
string opUserID = 2;
int32 sessionType = 3;
map <string, KeyValue>successReactionExtensions = 4;
string clientMsgID = 5;
bool isReact = 6;
bool isExternalExtensions = 7;
int64 msgFirstModifyTime = 8;
}
message ReactionMessageDeleteNotification {
string conversationID = 1;
2 years ago
string opUserID = 2;
int32 sessionType = 3;
map <string, KeyValue>successReactionExtensions = 4;
string clientMsgID = 5;
int64 msgFirstModifyTime = 6;
}