Merge remote-tracking branch 'origin/errcode' into errcode

# Conflicts:
#	internal/common/notification/conversation_notification.go
#	internal/common/notification/work_moments_notification.go
#	internal/rpc/conversation/conversaion.go
#	internal/rpc/group/callback.go
#	internal/rpc/group/group.go
#	internal/rpc/office/office.go
This commit is contained in:
skiffer-git
2023-02-10 21:05:49 +08:00
113 changed files with 1336 additions and 36247 deletions
File diff suppressed because it is too large Load Diff
-175
View File
@@ -1,175 +0,0 @@
syntax = "proto3";
option go_package = "Open_IM/pkg/proto/admincms;admincms";
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
package admincms;
message AdminLoginReq {
string adminID = 2;
string secret = 3;
}
message AdminLoginResp {
string token = 1;
string userName = 2;
string faceURL = 3;
}
message GetChatLogsReq {
string content = 1;
string sendID = 2;
string recvID = 3;
string sendTime = 4;
int32 sessionType = 5;
int32 contentType = 6;
sdkws.RequestPagination pagination = 7;
}
message ChatLog {
string serverMsgID = 1;
string clientMsgID = 2;
string sendID = 3;
string recvID = 4;
string groupID = 5;
string recvNickname = 6;
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;
}
message GetChatLogsResp {
repeated ChatLog chatLogs = 1;
int32 chatLogsNum = 2;
}
message StatisticsReq {
string from = 1;
string to = 2;
}
message GetActiveUserReq{
StatisticsReq statisticsReq = 1;
}
message UserResp{
string nickName = 1;
string userID = 2;
int32 messageNum = 3;
}
message GetActiveUserResp {
repeated UserResp Users = 1;
}
message GetActiveGroupReq{
StatisticsReq statisticsReq = 1;
}
message GroupResp {
string GroupName = 1;
string GroupID = 2;
int32 MessageNum = 3;
}
message GetActiveGroupResp {
repeated GroupResp Groups = 1;
}
message DateNumList {
string Date = 1;
int32 Num = 2;
}
message GetMessageStatisticsReq {
StatisticsReq StatisticsReq = 1;
}
message GetMessageStatisticsResp {
int32 PrivateMessageNum = 1;
int32 GroupMessageNum = 2;
repeated DateNumList PrivateMessageNumList = 3;
repeated DateNumList GroupMessageNumList = 4;
}
message GetGroupStatisticsReq {
StatisticsReq StatisticsReq = 1;
}
message GetGroupStatisticsResp {
int32 IncreaseGroupNum = 1;
int32 TotalGroupNum = 2;
repeated DateNumList IncreaseGroupNumList = 3;
repeated DateNumList TotalGroupNumList = 4;
}
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;
}
message GetUserFriendsReq {
string operationID = 1;
string userID = 2;
string friendUserID = 3;
string friendUserName = 4;
sdkws.RequestPagination pagination = 5;
}
message GetUserFriendsResp {
repeated sdkws.FriendInfo friendInfoList = 2;
int32 friendNums = 3;
}
message GetUserIDByEmailAndPhoneNumberReq{
string email = 2;
string phoneNumber = 3;
}
message GetUserIDByEmailAndPhoneNumberResp{
repeated string userIDList = 1;
}
message GetUserTokenReq {
string userID = 1;
int32 platformID = 2;
}
message GetUserTokenResp {
string token = 1;
int64 expTime = 2;
}
service adminCMS {
rpc AdminLogin(AdminLoginReq) returns(AdminLoginResp);
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);
rpc GetUserFriends(GetUserFriendsReq) returns(GetUserFriendsResp);
rpc GetUserIDByEmailAndPhoneNumber(GetUserIDByEmailAndPhoneNumberReq) returns(GetUserIDByEmailAndPhoneNumberResp);
rpc GetUserToken(GetUserTokenReq) returns(GetUserTokenResp);
}
File diff suppressed because it is too large Load Diff
-303
View File
@@ -1,303 +0,0 @@
syntax = "proto3";
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
option go_package = "Open_IM/pkg/proto/office;office";
package office;
message CommonResp{
int32 errCode = 1;
string errMsg = 2;
}
message TagUser {
string userID = 1;
string userName = 2;
}
message Tag {
string tagID = 1;
string tagName = 2;
repeated TagUser userList = 3;
}
message GetUserTagsReq{
string userID = 1;
string operationID = 2;
}
message GetUserTagsResp{
CommonResp commonResp = 1;
repeated Tag tags = 2;
}
message CreateTagReq {
string tagName = 1;
string userID = 2;
repeated string userIDList = 3;
string operationID = 4;
}
message CreateTagResp {
CommonResp commonResp = 1;
}
message DeleteTagReq {
string userID = 1;
string tagID = 2;
string operationID = 3;
}
message DeleteTagResp {
CommonResp commonResp = 1;
}
message SetTagReq {
string userID = 1;
string tagID = 2;
string newName = 3;
repeated string increaseUserIDList = 4;
repeated string reduceUserIDList = 5;
string operationID = 6;
}
message SetTagResp {
CommonResp commonResp = 1;
}
message SendMsg2TagReq {
repeated string tagList = 1;
repeated string UserList = 2;
repeated string GroupList = 3;
string sendID = 4;
int32 senderPlatformID = 5;
string content = 6;
string operationID = 7;
}
message SendMsg2TagResp {
CommonResp commonResp = 1;
}
message GetTagSendLogsReq {
sdkws.RequestPagination Pagination = 1;
string userID = 2;
string operationID = 3;
}
message TagSendLog {
repeated TagUser userList = 1;
string content = 2;
int64 sendTime = 3;
}
message GetTagSendLogsResp {
CommonResp commonResp = 1;
sdkws.ResponsePagination Pagination = 2;
repeated TagSendLog tagSendLogs = 3;
}
message GetUserTagByIDReq {
string userID = 1;
string tagID = 2;
string operationID = 3;
}
message GetUserTagByIDResp {
CommonResp commonResp = 1;
Tag tag = 2;
}
/// WorkMoment
message LikeUser {
string userID = 1;
string userName = 2;
}
message NotificationUser {
string userID = 1;
string userName = 2;
}
message Comment {
string userID = 1;
string userName = 2;
string faceURL = 3;
string replyUserID = 4;
string replyUserName = 5;
string contentID = 6;
string content = 7;
int32 createTime = 8;
}
message PermissionGroup {
string groupName = 1;
string groupID = 2;
}
message WorkMomentUser {
string userID = 1;
string userName = 2;
}
message WorkMoment {
string workMomentID = 1;
string userID = 2;
string userName = 3;
string faceURL = 4;
string content = 5;
repeated WorkMomentUser likeUserList = 6;
repeated Comment comments = 7;
int32 permission = 8;
repeated WorkMomentUser permissionUserList = 9;
repeated PermissionGroup permissionGroupList = 10;
repeated WorkMomentUser atUserList = 11;
int32 createTime = 12;
}
message CreateOneWorkMomentReq {
WorkMoment workMoment = 1;
string operationID = 2;
}
message CreateOneWorkMomentResp {
CommonResp commonResp = 1;
}
message DeleteOneWorkMomentReq {
string workMomentID = 1;
string userID = 2;
string operationID = 3;
}
message DeleteOneWorkMomentResp {
CommonResp commonResp = 1;
}
message LikeOneWorkMomentReq {
string userID = 1;
string WorkMomentID = 2;
string operationID = 3;
}
message LikeOneWorkMomentResp {
CommonResp commonResp = 1;
}
message CommentOneWorkMomentReq {
string userID = 1;
string workMomentID = 2;
string replyUserID = 3;
string content = 4;
string operationID = 5;
}
message CommentOneWorkMomentResp {
CommonResp commonResp = 1;
}
message DeleteCommentReq {
string workMomentID = 1;
string contentID = 2;
string opUserID = 3;
string operationID = 4;
}
message DeleteCommentResp {
CommonResp commonResp = 1;
}
message GetWorkMomentByIDReq {
string workMomentID = 1;
string opUserID = 2;
string operationID = 3;
}
message GetWorkMomentByIDResp {
CommonResp commonResp = 1;
WorkMoment workMoment = 2;
}
message ChangeWorkMomentPermissionReq {
string workMomentID = 1;
string opUserID = 2;
int32 permission = 3;
repeated string permissionUserIDList = 4;
string operationID = 5;
}
message ChangeWorkMomentPermissionResp {
CommonResp commonResp = 1;
}
message GetUserWorkMomentsReq {
string userID = 1;
string opUserID = 2;
sdkws.RequestPagination Pagination = 3;
string operationID = 4;
}
message GetUserWorkMomentsResp {
CommonResp commonResp = 1;
repeated WorkMoment workMoments = 2;
sdkws.ResponsePagination Pagination = 3;
}
message GetUserFriendWorkMomentsReq {
string userID = 1;
sdkws.RequestPagination Pagination = 2;
string operationID = 3;
}
message GetUserFriendWorkMomentsResp {
CommonResp commonResp = 1;
repeated WorkMoment workMoments = 2;
sdkws.ResponsePagination Pagination = 3;
}
message WorkMomentNotificationMsg {
int32 notificationMsgType = 1;
string replyUserName = 2;
string replyUserID = 3;
string content = 4;
string contentID = 5;
string workMomentID = 6;
string userID = 7;
string userName = 8;
string faceURL = 9;
string workMomentContent = 10;
int32 createTime = 11;
}
message SetUserWorkMomentsLevelReq {
string userID = 1;
int32 level = 2;
string operationID = 3;
}
message SetUserWorkMomentsLevelResp {
CommonResp commonResp = 1;
}
service OfficeService {
rpc GetUserTags(GetUserTagsReq) returns(GetUserTagsResp);
rpc CreateTag(CreateTagReq) returns(CreateTagResp);
rpc DeleteTag(DeleteTagReq) returns(DeleteTagResp);
rpc SetTag(SetTagReq) returns(SetTagResp);
rpc SendMsg2Tag(SendMsg2TagReq) returns(SendMsg2TagResp);
rpc GetTagSendLogs(GetTagSendLogsReq) returns(GetTagSendLogsResp);
rpc GetUserTagByID(GetUserTagByIDReq) returns(GetUserTagByIDResp);
rpc CreateOneWorkMoment(CreateOneWorkMomentReq) returns(CreateOneWorkMomentResp);
rpc DeleteOneWorkMoment(DeleteOneWorkMomentReq) returns(DeleteOneWorkMomentResp);
rpc LikeOneWorkMoment(LikeOneWorkMomentReq) returns(LikeOneWorkMomentResp);
rpc CommentOneWorkMoment(CommentOneWorkMomentReq) returns(CommentOneWorkMomentResp);
rpc DeleteComment(DeleteCommentReq) returns(DeleteCommentResp);
rpc GetWorkMomentByID(GetWorkMomentByIDReq) returns(GetWorkMomentByIDResp);
rpc ChangeWorkMomentPermission(ChangeWorkMomentPermissionReq) returns(ChangeWorkMomentPermissionResp);
/// user self
rpc GetUserWorkMoments(GetUserWorkMomentsReq) returns(GetUserWorkMomentsResp);
/// users friend
rpc GetUserFriendWorkMoments(GetUserFriendWorkMomentsReq) returns(GetUserFriendWorkMomentsResp);
rpc SetUserWorkMomentsLevel(SetUserWorkMomentsLevelReq) returns(SetUserWorkMomentsLevelResp);
}
-2
View File
@@ -1,6 +1,5 @@
all_proto=(
admin_cms/admin_cms.proto
auth/auth.proto
friend/friend.proto
group/group.proto
@@ -11,5 +10,4 @@ all_proto=(
relay/relay.proto
sdkws/ws.proto
conversation/conversation.proto
office/office.proto
)
-6
View File
@@ -345,12 +345,6 @@ message GroupMemberInfoSetTips{
}
message OrganizationChangedTips{
UserInfo opUser = 2;
int64 operationTime = 3;
}
//////////////////////friend/////////////////////
message FriendApplication{