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

323 lines
6.8 KiB

syntax = "proto3";
3 years ago
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./user;user";
package user;
message CommonResp{
3 years ago
int32 errCode = 1;
string errMsg = 2;
}
3 years ago
message DeleteUsersReq{
3 years ago
repeated string DeleteUserIDList = 2;
string OpUserID = 3;
string OperationID = 4;
}
3 years ago
3 years ago
message DeleteUsersResp{
CommonResp CommonResp = 1;
repeated string FailedUserIDList = 2;
}
3 years ago
message GetAllUserIDReq{
string opUserID = 1;
string operationID = 2;
}
message GetAllUserIDResp{
CommonResp CommonResp = 1;
repeated string UserIDList = 2;
3 years ago
}
3 years ago
3 years ago
message AccountCheckReq{
3 years ago
repeated string CheckUserIDList = 1;
string OpUserID = 2;
string OperationID = 3;
3 years ago
}
message AccountCheckResp{
CommonResp commonResp = 1;
message SingleUserStatus {
string userID = 1;
string accountStatus = 2;
}
3 years ago
repeated SingleUserStatus ResultList = 2;
}
3 years ago
message GetUserInfoReq{
repeated string userIDList = 1;
3 years ago
string OpUserID = 2;
string OperationID = 3;
}
message GetUserInfoResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
repeated server_api_params.UserInfo UserInfoList = 3;
}
message UpdateUserInfoReq{
3 years ago
server_api_params.UserInfo UserInfo = 1;
3 years ago
string OpUserID = 2;
string operationID = 3;
}
message UpdateUserInfoResp{
CommonResp commonResp = 1;
}
3 years ago
3 years ago
message Conversation{
string OwnerUserID = 1;
string ConversationID = 2;
int32 RecvMsgOpt = 3;
int32 ConversationType = 4;
string UserID = 5;
string GroupID = 6;
int32 UnreadCount = 7;
int64 DraftTextTime = 8;
bool IsPinned = 9;
string AttachedInfo = 10;
bool IsPrivateChat = 11;
3 years ago
int32 GroupAtType = 12;
bool IsNotInGroup = 13;
string Ex = 14;
3 years ago
}
message SetConversationReq{
Conversation Conversation = 1;
int32 notificationType = 2;
string OperationID = 3;
3 years ago
}
3 years ago
3 years ago
message SetConversationResp{
CommonResp commonResp = 1;
3 years ago
}
3 years ago
3 years ago
message SetRecvMsgOptReq {
string OwnerUserID = 1;
string ConversationID = 2;
int32 RecvMsgOpt = 3;
int32 notificationType = 4;
string OperationID = 5;
3 years ago
}
message SetRecvMsgOptResp {
CommonResp commonResp = 1;
}
3 years ago
message GetConversationReq{
string ConversationID = 1;
string OwnerUserID = 2;
string OperationID = 3;
}
3 years ago
message GetConversationResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
Conversation Conversation = 2;
}
3 years ago
message GetConversationsReq{
string OwnerUserID = 1;
repeated string ConversationIDs = 2;
string OperationID = 3;
}
3 years ago
message GetConversationsResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
repeated Conversation Conversations = 2;
}
3 years ago
message GetAllConversationsReq{
string OwnerUserID = 1;
string OperationID = 2;
}
3 years ago
message GetAllConversationsResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
repeated Conversation Conversations = 2;
}
message BatchSetConversationsReq{
repeated Conversation Conversations = 1;
string OwnerUserID = 2;
int32 notificationType = 3;
string OperationID = 4;
3 years ago
}
message BatchSetConversationsResp{
3 years ago
CommonResp commonResp = 1;
repeated string Success = 2;
repeated string Failed = 3;
}
3 years ago
message ResignUserReq{
3 years ago
string UserId = 1;
string OperationID = 2;
3 years ago
}
message ResignUserResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
}
3 years ago
message GetUserByIdReq{
3 years ago
string UserId = 1;
string OperationID = 2;
3 years ago
}
message User{
3 years ago
string ProfilePhoto = 1;
string Nickname = 2;
3 years ago
string UserId = 3;
3 years ago
string CreateTime = 4;
bool IsBlock = 5;
3 years ago
}
3 years ago
message GetUserByIdResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
User user = 2;
3 years ago
}
3 years ago
message GetUsersByNameReq {
3 years ago
string UserName = 1;
server_api_params.RequestPagination Pagination = 2;
string OperationID = 3;
3 years ago
}
message GetUsersByNameResp {
repeated User users = 1;
server_api_params.ResponsePagination Pagination = 2;
int32 UserNums = 3;
}
3 years ago
message AlterUserReq{
3 years ago
string UserId = 1;
string OperationID = 2;
3 years ago
int64 PhoneNumber = 3;
string Nickname = 4;
string Email = 5;
3 years ago
string OpUserId = 6;
3 years ago
}
message AlterUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
3 years ago
message GetUsersReq {
string OperationID = 1;
server_api_params.RequestPagination Pagination = 2;
3 years ago
string UserName = 3;
3 years ago
}
message GetUsersResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
repeated User user = 2;
server_api_params.ResponsePagination Pagination = 3;
3 years ago
int32 UserNums = 4;
3 years ago
}
message AddUserReq{
3 years ago
string OperationID = 1;
3 years ago
string PhoneNumber = 2;
string UserId = 3;
3 years ago
string name = 4;
3 years ago
string OpUserId = 5;
3 years ago
}
message AddUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
3 years ago
message BlockUserReq{
3 years ago
string UserId = 1;
3 years ago
string EndDisableTime = 2;
string OperationID = 3;
3 years ago
string OpUserId = 4;
3 years ago
}
message BlockUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
message UnBlockUserReq{
3 years ago
string UserId = 1;
3 years ago
string OperationID = 2;
3 years ago
string OpUserId = 3;
3 years ago
}
message UnBlockUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
message GetBlockUsersReq{
3 years ago
server_api_params.RequestPagination Pagination = 1;
3 years ago
string OperationID = 2;
3 years ago
int32 BlockUserNum = 3;
3 years ago
}
3 years ago
message BlockUser {
3 years ago
User User = 1;
string BeginDisableTime = 2;
string EndDisableTime = 3;
3 years ago
}
3 years ago
message GetBlockUsersResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
repeated BlockUser BlockUsers = 2;
3 years ago
server_api_params.ResponsePagination Pagination = 3;
3 years ago
int32 UserNums = 4;
3 years ago
}
3 years ago
message GetBlockUserByIdReq {
3 years ago
string User_id = 1;
string OperationID = 2;
3 years ago
}
3 years ago
message GetBlockUserByIdResp {
3 years ago
BlockUser BlockUser = 2;
3 years ago
}
3 years ago
3 years ago
message DeleteUserReq {
3 years ago
string User_id = 1;
string OperationID = 2;
string OpUserId = 3;
3 years ago
}
message DeleteUserResp {
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
3 years ago
service user {
3 years ago
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp);
3 years ago
rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp);
3 years ago
3 years ago
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
3 years ago
rpc GetConversation(GetConversationReq)returns(GetConversationResp);
rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp);
rpc GetConversations(GetConversationsReq)returns(GetConversationsResp);
rpc BatchSetConversations(BatchSetConversationsReq)returns(BatchSetConversationsResp);
rpc SetConversation(SetConversationReq)returns(SetConversationResp);
3 years ago
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
3 years ago
3 years ago
rpc GetUserById(GetUserByIdReq) returns (GetUserByIdResp);
rpc GetUsersByName(GetUsersByNameReq) returns (GetUsersByNameResp);
3 years ago
rpc ResignUser(ResignUserReq) returns (ResignUserResp);
3 years ago
rpc AlterUser(AlterUserReq) returns (AlterUserResp);
rpc GetUsers(GetUsersReq) returns (GetUsersResp);
rpc AddUser(AddUserReq) returns (AddUserResp);
rpc BlockUser(BlockUserReq) returns (BlockUserResp);
rpc UnBlockUser(UnBlockUserReq) returns (UnBlockUserResp);
rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp);
3 years ago
rpc GetBlockUserById(GetBlockUserByIdReq) returns (GetBlockUserByIdResp);
rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp);
3 years ago
rpc GetUserInfoFromCache(GetUserInfoReq) returns(GetUserInfoResp);
}