Files
open-im-server/pkg/proto/admin_cms/admin_cms.proto
T

180 lines
4.1 KiB
Protocol Buffer
Raw Normal View History

2022-02-12 17:13:31 +08:00
syntax = "proto3";
2022-09-21 08:36:33 +08:00
option go_package = "Open_IM/pkg/proto/admin_cms;admin_cms";
2022-09-20 23:31:28 +08:00
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
2022-02-12 17:13:31 +08:00
package admin_cms;
message AdminLoginReq {
2022-09-02 02:01:42 +08:00
string adminID = 2;
string secret = 3;
2022-02-12 17:13:31 +08:00
}
message AdminLoginResp {
string token = 1;
2022-09-06 17:19:13 +08:00
string userName = 2;
string faceURL = 3;
2022-02-12 17:13:31 +08:00
}
2022-08-26 17:51:01 +08:00
message GetChatLogsReq {
2022-09-02 02:01:42 +08:00
string content = 1;
string sendID = 2;
string recvID = 3;
string sendTime = 4;
int32 sessionType = 5;
int32 contentType = 6;
server_api_params.RequestPagination pagination = 7;
2022-08-26 17:51:01 +08:00
}
message ChatLog {
2022-09-02 02:01:42 +08:00
string serverMsgID = 1;
string clientMsgID = 2;
string sendID = 3;
string recvID = 4;
2022-08-30 01:38:23 +08:00
string groupID = 5;
string recvNickname = 6;
2022-09-02 02:01:42 +08:00
int32 senderPlatformID = 7;
string senderNickname = 8;
string senderFaceURL = 9;
string groupName = 10;
int32 sessionType = 11;
int32 msgFrom = 12;
int32 contentType = 13;
string content = 14;
int32 status = 15;
int64 sendTime = 16;
int64 createTime = 17;
string ex = 18;
2022-08-26 17:51:01 +08:00
}
message GetChatLogsResp {
2022-09-02 02:01:42 +08:00
repeated ChatLog chatLogs = 1;
2023-01-29 15:01:11 +08:00
int32 chatLogsNum = 2;
2022-08-26 17:51:01 +08:00
}
message StatisticsReq {
string from = 1;
string to = 2;
}
message GetActiveUserReq{
2022-09-02 02:01:42 +08:00
StatisticsReq statisticsReq = 1;
2022-08-26 17:51:01 +08:00
}
message UserResp{
2022-09-02 02:01:42 +08:00
string nickName = 1;
string userID = 2;
int32 messageNum = 3;
2022-08-26 17:51:01 +08:00
}
message GetActiveUserResp {
repeated UserResp Users = 1;
}
message GetActiveGroupReq{
2022-09-02 02:01:42 +08:00
StatisticsReq statisticsReq = 1;
2022-08-26 17:51:01 +08:00
}
message GroupResp {
string GroupName = 1;
2023-01-29 15:01:11 +08:00
string GroupID = 2;
2022-08-26 17:51:01 +08:00
int32 MessageNum = 3;
}
message GetActiveGroupResp {
repeated GroupResp Groups = 1;
}
message DateNumList {
string Date = 1;
int32 Num = 2;
}
message GetMessageStatisticsReq {
StatisticsReq StatisticsReq = 1;
string OperationID = 2;
}
message GetMessageStatisticsResp {
int32 PrivateMessageNum = 1;
int32 GroupMessageNum = 2;
repeated DateNumList PrivateMessageNumList = 3;
repeated DateNumList GroupMessageNumList = 4;
2022-09-02 02:01:42 +08:00
CommonResp commonResp = 5;
2022-08-26 17:51:01 +08:00
}
message GetGroupStatisticsReq {
StatisticsReq StatisticsReq = 1;
string OperationID = 2;
}
message GetGroupStatisticsResp {
int32 IncreaseGroupNum = 1;
int32 TotalGroupNum = 2;
repeated DateNumList IncreaseGroupNumList = 3;
repeated DateNumList TotalGroupNumList = 4;
2022-09-02 02:01:42 +08:00
CommonResp commonResp = 5;
2022-08-26 17:51:01 +08:00
}
message GetUserStatisticsReq {
StatisticsReq StatisticsReq = 1;
string OperationID = 2;
}
message GetUserStatisticsResp {
int32 IncreaseUserNum = 1;
int32 ActiveUserNum = 2;
int32 TotalUserNum = 3;
repeated DateNumList IncreaseUserNumList = 4;
repeated DateNumList ActiveUserNumList = 5;
repeated DateNumList TotalUserNumList = 6;
2022-09-02 02:01:42 +08:00
}
message GetUserFriendsReq {
string operationID = 1;
string userID = 2;
string friendUserID = 3;
string friendUserName = 4;
server_api_params.RequestPagination pagination = 5;
}
message GetUserFriendsResp {
repeated server_api_params.FriendInfo friendInfoList = 2;
int32 friendNums = 3;
2022-08-12 18:37:51 +08:00
}
2022-09-19 11:52:03 +08:00
message GetUserIDByEmailAndPhoneNumberReq{
string email = 2;
string phoneNumber = 3;
}
message GetUserIDByEmailAndPhoneNumberResp{
repeated string userIDList = 1;
}
2023-01-29 15:01:11 +08:00
message GetUserTokenReq {
string userID = 1;
int32 platformID = 2;
}
2022-09-19 11:52:03 +08:00
2023-01-29 15:01:11 +08:00
message GetUserTokenResp {
string token = 1;
int64 expTime = 2;
}
2022-09-19 11:52:03 +08:00
2022-02-12 17:13:31 +08:00
service adminCMS {
rpc AdminLogin(AdminLoginReq) returns(AdminLoginResp);
2022-08-26 17:51:01 +08:00
rpc GetChatLogs(GetChatLogsReq) returns(GetChatLogsResp);
rpc GetActiveUser(GetActiveUserReq) returns(GetActiveUserResp);
rpc GetActiveGroup(GetActiveGroupReq) returns(GetActiveGroupResp);
rpc GetMessageStatistics(GetMessageStatisticsReq) returns(GetMessageStatisticsResp);
rpc GetGroupStatistics(GetGroupStatisticsReq) returns(GetGroupStatisticsResp);
rpc GetUserStatistics(GetUserStatisticsReq) returns(GetUserStatisticsResp);
2022-09-02 02:01:42 +08:00
rpc GetUserFriends(GetUserFriendsReq) returns(GetUserFriendsResp);
2022-09-19 11:52:03 +08:00
rpc GetUserIDByEmailAndPhoneNumber(GetUserIDByEmailAndPhoneNumberReq) returns(GetUserIDByEmailAndPhoneNumberResp);
2022-11-23 11:08:44 +08:00
rpc GetUserToken(GetUserTokenReq) returns(GetUserTokenResp);
2022-08-26 17:51:01 +08:00
}