2021-05-26 19:19:41 +08:00
|
|
|
syntax = "proto3";
|
2023-02-10 22:10:37 +08:00
|
|
|
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
|
|
|
|
|
import "Open-IM-Server/pkg/proto/sdkws/wrappers.proto";
|
2022-09-21 08:36:33 +08:00
|
|
|
option go_package = "Open_IM/pkg/proto/msg;msg";
|
2022-07-20 20:59:52 +08:00
|
|
|
package msg;
|
2022-03-16 10:44:58 +08:00
|
|
|
|
2021-12-22 10:47:07 +08:00
|
|
|
message MsgDataToMQ{
|
|
|
|
|
string token =1;
|
|
|
|
|
string operationID = 2;
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.MsgData msgData = 3;
|
2021-05-26 19:19:41 +08:00
|
|
|
}
|
2021-06-28 15:33:26 +08:00
|
|
|
|
|
|
|
|
|
2021-12-22 10:47:07 +08:00
|
|
|
message MsgDataToDB {
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.MsgData msgData = 1;
|
2021-12-23 17:34:32 +08:00
|
|
|
string operationID = 2;
|
2021-07-02 14:24:33 +08:00
|
|
|
|
2021-05-26 19:19:41 +08:00
|
|
|
}
|
2021-12-22 10:47:07 +08:00
|
|
|
message PushMsgDataToMQ{
|
|
|
|
|
string OperationID = 1;
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.MsgData msgData = 2;
|
2022-02-08 16:49:45 +08:00
|
|
|
string pushToUserID = 3;
|
2021-12-22 10:47:07 +08:00
|
|
|
}
|
2022-06-16 12:04:57 +08:00
|
|
|
message MsgDataToMongoByMQ{
|
|
|
|
|
uint64 lastSeq =1;
|
|
|
|
|
string aggregationID = 2;
|
|
|
|
|
repeated MsgDataToMQ messageList = 3;
|
|
|
|
|
string triggerID = 4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2021-05-26 19:19:41 +08:00
|
|
|
|
2021-11-10 15:24:59 +08:00
|
|
|
message GetMaxAndMinSeqReq {
|
|
|
|
|
string UserID = 1;
|
|
|
|
|
string OperationID = 2;
|
|
|
|
|
}
|
|
|
|
|
message GetMaxAndMinSeqResp {
|
2021-05-26 19:19:41 +08:00
|
|
|
int32 ErrCode = 1;
|
|
|
|
|
string ErrMsg = 2;
|
2022-01-20 11:36:43 +08:00
|
|
|
uint32 MaxSeq = 3;
|
|
|
|
|
uint32 MinSeq = 4;
|
2021-05-26 19:19:41 +08:00
|
|
|
}
|
|
|
|
|
|
2021-12-21 21:40:50 +08:00
|
|
|
message SendMsgReq {
|
2023-02-10 21:04:22 +08:00
|
|
|
sdkws.MsgData msgData = 3;
|
2021-05-26 19:19:41 +08:00
|
|
|
}
|
|
|
|
|
|
2021-12-21 21:40:50 +08:00
|
|
|
message SendMsgResp {
|
2021-12-23 17:34:32 +08:00
|
|
|
string serverMsgID = 4;
|
|
|
|
|
string clientMsgID = 5;
|
2021-11-10 15:24:59 +08:00
|
|
|
int64 sendTime = 6;
|
2022-05-31 19:16:29 +08:00
|
|
|
}
|
|
|
|
|
|
2021-05-26 19:19:41 +08:00
|
|
|
|
2022-05-31 19:16:29 +08:00
|
|
|
message ClearMsgReq{
|
2023-02-10 21:04:22 +08:00
|
|
|
string userID = 1;
|
2021-05-26 19:19:41 +08:00
|
|
|
}
|
2022-03-15 18:13:58 +08:00
|
|
|
|
|
|
|
|
|
2022-05-31 19:16:29 +08:00
|
|
|
message ClearMsgResp{
|
|
|
|
|
}
|
2022-03-15 18:13:58 +08:00
|
|
|
|
2022-07-20 20:59:52 +08:00
|
|
|
message SetMsgMinSeqReq{
|
|
|
|
|
string userID = 1;
|
|
|
|
|
string groupID = 2;
|
|
|
|
|
uint32 minSeq = 3;
|
|
|
|
|
}
|
|
|
|
|
message SetMsgMinSeqResp{
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-06 15:51:18 +08:00
|
|
|
message SetSendMsgStatusReq{
|
|
|
|
|
int32 status = 2;
|
2022-07-26 15:16:46 +08:00
|
|
|
}
|
|
|
|
|
|
2022-09-06 15:51:18 +08:00
|
|
|
message SetSendMsgStatusResp{
|
2022-07-26 15:16:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message GetSendMsgStatusReq{
|
|
|
|
|
string operationID = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message GetSendMsgStatusResp{
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
|
|
|
|
int32 status = 3;
|
|
|
|
|
}
|
2022-07-29 12:24:54 +08:00
|
|
|
message DelSuperGroupMsgReq{
|
|
|
|
|
string userID = 2;
|
|
|
|
|
string groupID = 3;
|
|
|
|
|
}
|
|
|
|
|
message DelSuperGroupMsgResp{
|
|
|
|
|
}
|
2022-09-29 17:57:26 +08:00
|
|
|
message GetSuperGroupMsgReq{
|
|
|
|
|
string operationID = 1;
|
|
|
|
|
uint32 Seq = 2;
|
|
|
|
|
string groupID = 3;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
message GetSuperGroupMsgResp{
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.MsgData msgData = 3;
|
2022-09-29 17:57:26 +08:00
|
|
|
}
|
|
|
|
|
message GetWriteDiffMsgReq{
|
|
|
|
|
string operationID = 1;
|
|
|
|
|
uint32 Seq = 2;
|
2022-09-21 18:44:21 +08:00
|
|
|
|
2022-09-29 17:57:26 +08:00
|
|
|
}
|
|
|
|
|
message GetWriteDiffMsgResp{
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.MsgData msgData = 3;
|
2022-09-29 17:57:26 +08:00
|
|
|
}
|
2022-09-21 18:44:21 +08:00
|
|
|
|
2022-12-08 19:50:28 +08:00
|
|
|
message ModifyMessageReactionExtensionsReq {
|
2022-12-07 21:12:48 +08:00
|
|
|
string operationID = 1;
|
2022-12-08 19:50:28 +08:00
|
|
|
string sourceID = 2;
|
|
|
|
|
string opUserID = 3;
|
|
|
|
|
int32 sessionType = 4;
|
2023-02-09 20:36:34 +08:00
|
|
|
map <string, sdkws.KeyValue>reactionExtensionList = 5;
|
2022-12-08 19:50:28 +08:00
|
|
|
string clientMsgID = 6;
|
|
|
|
|
google.protobuf.StringValue ex = 7;
|
|
|
|
|
google.protobuf.StringValue attachedInfo = 8;
|
|
|
|
|
bool isReact = 9;
|
|
|
|
|
bool isExternalExtensions = 10;
|
|
|
|
|
int64 msgFirstModifyTime = 11;
|
|
|
|
|
}
|
2022-12-12 15:34:49 +08:00
|
|
|
message SetMessageReactionExtensionsReq {
|
|
|
|
|
string operationID = 1;
|
|
|
|
|
string sourceID = 2;
|
|
|
|
|
string opUserID = 3;
|
|
|
|
|
int32 sessionType = 4;
|
2023-02-09 20:36:34 +08:00
|
|
|
map <string, sdkws.KeyValue>reactionExtensionList = 5;
|
2022-12-12 15:34:49 +08:00
|
|
|
string clientMsgID = 6;
|
|
|
|
|
google.protobuf.StringValue ex = 7;
|
|
|
|
|
google.protobuf.StringValue attachedInfo = 8;
|
|
|
|
|
bool isReact = 9;
|
|
|
|
|
bool isExternalExtensions = 10;
|
|
|
|
|
int64 msgFirstModifyTime = 11;
|
|
|
|
|
}
|
|
|
|
|
message SetMessageReactionExtensionsResp {
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
|
|
|
|
string clientMsgID = 3;
|
|
|
|
|
int64 msgFirstModifyTime = 4;
|
2022-12-12 16:52:36 +08:00
|
|
|
bool isReact = 5;
|
|
|
|
|
repeated KeyValueResp result = 6;
|
2022-12-12 15:34:49 +08:00
|
|
|
}
|
2022-12-08 19:50:28 +08:00
|
|
|
|
2022-12-12 19:15:31 +08:00
|
|
|
|
|
|
|
|
message GetMessageListReactionExtensionsReq {
|
|
|
|
|
string operationID = 1;
|
|
|
|
|
string opUserID = 2;
|
|
|
|
|
string sourceID = 3;
|
|
|
|
|
int32 sessionType = 4;
|
|
|
|
|
message MessageReactionKey {
|
|
|
|
|
string clientMsgID = 1;
|
|
|
|
|
int64 msgFirstModifyTime = 2;
|
|
|
|
|
}
|
|
|
|
|
repeated MessageReactionKey messageReactionKeyList = 5;
|
|
|
|
|
}
|
|
|
|
|
message GetMessageListReactionExtensionsResp{
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
|
|
|
|
repeated SingleMessageExtensionResult singleMessageResult =3;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
message SingleMessageExtensionResult {
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
2023-02-09 20:36:34 +08:00
|
|
|
map <string, sdkws.KeyValue>reactionExtensionList = 3;
|
2022-12-12 19:15:31 +08:00
|
|
|
string clientMsgID = 4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-12-08 19:50:28 +08:00
|
|
|
message ModifyMessageReactionExtensionsResp {
|
|
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
2022-12-09 16:55:01 +08:00
|
|
|
repeated ExtendMsgResp successList = 3;
|
|
|
|
|
repeated ExtendMsgResp failedList = 4;
|
2022-12-08 19:50:28 +08:00
|
|
|
}
|
|
|
|
|
|
2022-12-12 19:15:31 +08:00
|
|
|
message DeleteMessageListReactionExtensionsReq {
|
2022-12-08 19:50:28 +08:00
|
|
|
string operationID = 1;
|
|
|
|
|
string opUserID = 2;
|
|
|
|
|
string sourceID = 3;
|
2022-12-09 16:42:43 +08:00
|
|
|
int32 sessionType = 4;
|
2022-12-12 19:53:04 +08:00
|
|
|
string clientMsgID = 5;
|
2022-12-23 16:05:51 +08:00
|
|
|
bool isExternalExtensions = 6;
|
|
|
|
|
int64 msgFirstModifyTime = 7;
|
2023-02-09 20:36:34 +08:00
|
|
|
repeated sdkws.KeyValue reactionExtensionList = 8;
|
2022-12-07 21:12:48 +08:00
|
|
|
}
|
|
|
|
|
|
2022-12-12 19:15:31 +08:00
|
|
|
message DeleteMessageListReactionExtensionsResp {
|
2022-12-07 21:12:48 +08:00
|
|
|
int32 errCode = 1;
|
|
|
|
|
string errMsg = 2;
|
2022-12-12 19:53:04 +08:00
|
|
|
repeated KeyValueResp result = 6;
|
2022-12-09 16:42:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ExtendMsgResp {
|
2022-12-09 17:29:18 +08:00
|
|
|
ExtendMsg extendMsg = 1;
|
|
|
|
|
int32 errCode = 2;
|
|
|
|
|
string errMsg = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message ExtendMsg {
|
|
|
|
|
map <string, KeyValueResp>reactionExtensionList = 1;
|
|
|
|
|
string clientMsgID = 2;
|
|
|
|
|
int64 msgFirstModifyTime = 3;
|
|
|
|
|
string attachedInfo = 4;
|
|
|
|
|
string ex = 5;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message KeyValueResp {
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.KeyValue keyValue = 1;
|
2022-12-09 16:42:43 +08:00
|
|
|
int32 errCode = 2;
|
|
|
|
|
string errMsg = 3;
|
2022-12-07 21:12:48 +08:00
|
|
|
}
|
2022-09-21 18:44:21 +08:00
|
|
|
|
2022-12-12 19:22:50 +08:00
|
|
|
message MsgDataToModifyByMQ{
|
|
|
|
|
string aggregationID = 1;
|
|
|
|
|
repeated MsgDataToMQ messageList = 2;
|
|
|
|
|
string triggerID = 3;
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-16 15:20:59 +08:00
|
|
|
message DelMsgListReq{
|
|
|
|
|
string userID = 2;
|
|
|
|
|
repeated uint32 seqList = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
message DelMsgListResp{
|
|
|
|
|
}
|
2022-12-12 19:22:50 +08:00
|
|
|
|
2022-07-20 20:59:52 +08:00
|
|
|
service msg {
|
2023-02-10 21:04:22 +08:00
|
|
|
//获取最小最大seq(包括用户的,以及指定群组的)
|
2023-02-09 20:36:34 +08:00
|
|
|
rpc GetMaxAndMinSeq(sdkws.GetMaxAndMinSeqReq) returns(sdkws.GetMaxAndMinSeqResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
//拉取历史消息(包括用户的,以及指定群组的)
|
2023-02-09 20:36:34 +08:00
|
|
|
rpc PullMessageBySeqList(sdkws.PullMessageBySeqListReq) returns(sdkws.PullMessageBySeqListResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
//发送消息
|
2021-12-21 21:40:50 +08:00
|
|
|
rpc SendMsg(SendMsgReq) returns(SendMsgResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
//删除某人消息
|
2023-02-16 15:20:59 +08:00
|
|
|
rpc DelMsgList(DelMsgListReq) returns(DelMsgListResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
//删除某个用户某个大群消息
|
2022-07-29 12:24:54 +08:00
|
|
|
rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
//清空某人所有消息
|
2022-05-31 19:16:29 +08:00
|
|
|
rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
|
|
|
|
|
//设置消息是否发送成功-针对api发送的消息
|
2022-09-06 15:51:18 +08:00
|
|
|
rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp);
|
2023-02-10 21:04:22 +08:00
|
|
|
//获取消息发送状态
|
2022-07-26 15:16:46 +08:00
|
|
|
rpc GetSendMsgStatus(GetSendMsgStatusReq) returns(GetSendMsgStatusResp);
|
2022-12-07 21:12:48 +08:00
|
|
|
|
2023-02-10 21:04:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// 修改消息
|
2022-12-12 15:34:49 +08:00
|
|
|
rpc SetMessageReactionExtensions(SetMessageReactionExtensionsReq) returns(SetMessageReactionExtensionsResp);
|
2022-12-12 19:15:31 +08:00
|
|
|
rpc GetMessageListReactionExtensions(GetMessageListReactionExtensionsReq) returns(GetMessageListReactionExtensionsResp);
|
2022-12-08 19:50:28 +08:00
|
|
|
rpc AddMessageReactionExtensions(ModifyMessageReactionExtensionsReq) returns(ModifyMessageReactionExtensionsResp);
|
2022-12-12 19:15:31 +08:00
|
|
|
rpc DeleteMessageReactionExtensions(DeleteMessageListReactionExtensionsReq) returns(DeleteMessageListReactionExtensionsResp);
|
2021-05-26 19:19:41 +08:00
|
|
|
}
|