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

238 lines
5.0 KiB
Protocol Buffer
Raw Normal View History

2021-05-26 19:44:49 +08:00
syntax = "proto3";
2021-12-27 16:48:05 +08:00
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./user;user";
2021-05-26 19:44:49 +08:00
package user;
message CommonResp{
2021-12-27 16:48:05 +08:00
int32 errCode = 1;
string errMsg = 2;
2021-09-22 20:10:38 +08:00
}
2021-12-27 16:48:05 +08:00
2021-09-22 20:10:38 +08:00
message DeleteUsersReq{
2021-12-27 16:48:05 +08:00
repeated string DeleteUserIDList = 2;
string OpUserID = 3;
2021-09-22 20:10:38 +08:00
string OperationID = 4;
}
2022-01-24 01:40:49 +08:00
2021-12-27 16:48:05 +08:00
message DeleteUsersResp{
CommonResp CommonResp = 1;
repeated string FailedUserIDList = 2;
2021-09-22 20:10:38 +08:00
}
2021-12-27 16:48:05 +08:00
message GetAllUserIDReq{
string opUserID = 1;
string operationID = 2;
}
message GetAllUserIDResp{
CommonResp CommonResp = 1;
repeated string UserIDList = 2;
2021-12-17 12:15:33 +08:00
}
2021-12-27 16:48:05 +08:00
2021-12-17 12:15:33 +08:00
message AccountCheckReq{
2021-12-27 16:48:05 +08:00
repeated string CheckUserIDList = 1;
string OpUserID = 2;
string OperationID = 3;
2021-12-17 12:15:33 +08:00
}
message AccountCheckResp{
CommonResp commonResp = 1;
message SingleUserStatus {
string userID = 1;
string accountStatus = 2;
}
2021-12-27 16:48:05 +08:00
repeated SingleUserStatus ResultList = 2;
2021-09-22 20:10:38 +08:00
}
2021-12-27 16:48:05 +08:00
2021-05-26 19:44:49 +08:00
message GetUserInfoReq{
repeated string userIDList = 1;
2021-12-27 16:48:05 +08:00
string OpUserID = 2;
2021-05-26 19:44:49 +08:00
string OperationID = 3;
}
message GetUserInfoResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
2022-01-17 14:06:37 +08:00
repeated server_api_params.UserInfo UserInfoList = 3;
2021-05-26 19:44:49 +08:00
}
message UpdateUserInfoReq{
2022-01-17 14:06:37 +08:00
server_api_params.UserInfo UserInfo = 1;
2021-12-27 16:48:05 +08:00
string OpUserID = 2;
string operationID = 3;
}
message UpdateUserInfoResp{
CommonResp commonResp = 1;
2021-05-26 19:44:49 +08:00
}
2021-11-29 11:19:24 +08:00
2021-12-27 16:48:05 +08:00
2021-12-07 14:28:07 +08:00
message SetReceiveMessageOptReq{
2021-12-27 16:48:05 +08:00
string FromUserID = 1;
int32 opt = 2;
repeated string conversationIDList = 3;
string operationID = 4;
string OpUserID = 5;
}
message OptResult{
2021-12-29 15:52:19 +08:00
string conversationID = 1;
2021-12-27 16:48:05 +08:00
int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush
2021-12-07 14:28:07 +08:00
}
message SetReceiveMessageOptResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
2021-12-29 15:52:19 +08:00
repeated OptResult conversationOptResultList = 2;
2021-12-07 14:28:07 +08:00
}
message GetReceiveMessageOptReq{
2021-12-27 16:48:05 +08:00
string FromUserID = 1;
2021-12-29 15:52:19 +08:00
repeated string conversationIDList = 2;
2021-12-27 16:48:05 +08:00
string operationID = 3;
string OpUserID = 4;
2021-12-07 14:28:07 +08:00
}
message GetReceiveMessageOptResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 3;
2021-12-07 14:28:07 +08:00
}
2021-12-27 16:48:05 +08:00
2021-12-07 14:28:07 +08:00
message GetAllConversationMsgOptReq{
2021-12-29 15:07:36 +08:00
string FromUserID = 1;
2021-12-27 16:48:05 +08:00
string operationID = 2;
string OpUserID = 3;
2021-12-07 14:28:07 +08:00
}
message GetAllConversationMsgOptResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 3;
2021-12-07 14:28:07 +08:00
}
2022-01-21 18:39:57 +08:00
message ResignUserReq{
2022-01-24 01:40:49 +08:00
string UserId = 1;
string OperationID = 2;
2022-01-21 18:39:57 +08:00
}
message ResignUserResp{
2022-01-24 01:40:49 +08:00
CommonResp commonResp = 1;
2022-01-21 18:39:57 +08:00
}
message GetUserReq{
2022-01-24 01:40:49 +08:00
string UserId = 1;
string OperationID = 2;
2022-01-21 18:39:57 +08:00
}
message User{
2022-01-24 01:40:49 +08:00
string ProfilePhoto = 1;
string Nickname = 2;
2022-01-24 18:22:47 +08:00
string UserId = 3;
2022-01-25 19:18:04 +08:00
string CreateTime = 4;
bool IsBlock = 5;
2022-01-21 18:39:57 +08:00
}
message GetUserResp{
2022-01-24 18:22:47 +08:00
CommonResp CommonResp = 1;
User user = 2;
2022-01-21 18:39:57 +08:00
}
message AlterUserReq{
2022-01-24 01:40:49 +08:00
string UserId = 1;
string OperationID = 2;
2022-01-21 18:39:57 +08:00
}
message AlterUserResp{
2022-01-24 01:40:49 +08:00
CommonResp CommonResp = 1;
2022-01-21 18:39:57 +08:00
}
2022-01-24 01:40:49 +08:00
message GetUsersReq {
string OperationID = 1;
server_api_params.RequestPagination Pagination = 2;
2022-01-21 18:39:57 +08:00
}
message GetUsersResp{
2022-01-24 18:22:47 +08:00
CommonResp CommonResp = 1;
string OperationID = 2;
repeated User user = 3;
2022-01-25 19:18:04 +08:00
int32 UserNum = 4;
server_api_params.ResponsePagination Pagination = 5;
2022-01-21 18:39:57 +08:00
}
message AddUserReq{
2022-01-24 01:40:49 +08:00
string OperationID = 1;
2022-01-24 18:22:47 +08:00
string PhoneNumber = 2;
string UserId = 3;
2022-01-25 19:18:04 +08:00
string name = 4;
2022-01-21 18:39:57 +08:00
}
message AddUserResp{
2022-01-24 18:22:47 +08:00
CommonResp CommonResp = 1;
2022-01-21 18:39:57 +08:00
}
2021-05-26 19:44:49 +08:00
2022-01-24 01:40:49 +08:00
message BlockUserReq{
2022-01-25 19:18:04 +08:00
string UserId = 1;
2022-01-24 18:22:47 +08:00
string EndDisableTime = 2;
string OperationID = 3;
2022-01-24 01:40:49 +08:00
}
message BlockUserResp{
2022-01-24 18:22:47 +08:00
CommonResp CommonResp = 1;
2022-01-24 01:40:49 +08:00
}
message UnBlockUserReq{
2022-01-25 19:18:04 +08:00
string UserId = 1;
2022-01-24 01:40:49 +08:00
string OperationID = 2;
}
message UnBlockUserResp{
2022-01-24 18:22:47 +08:00
CommonResp CommonResp = 1;
2022-01-24 01:40:49 +08:00
}
message GetBlockUsersReq{
server_api_params.RequestPagination Pagination =1;
string OperationID = 2;
2022-01-25 19:18:04 +08:00
int32 BlockUserNum = 4;
2022-01-24 01:40:49 +08:00
}
2022-01-26 18:43:01 +08:00
message BlockUser {
User User = 1;
string BeginDisableTime = 2;
string EndDisableTime = 3;
}
2022-01-24 01:40:49 +08:00
message GetBlockUsersResp{
2022-01-24 18:22:47 +08:00
CommonResp CommonResp = 1;
2022-01-26 18:43:01 +08:00
repeated BlockUser BlockUsers = 2;
2022-01-25 19:18:04 +08:00
server_api_params.ResponsePagination Pagination = 3;
int32 BlockUserNum = 4;
2022-01-24 01:40:49 +08:00
}
2022-01-26 18:43:01 +08:00
message GetBlockUserReq {
string User_id = 1;
string OperationID = 2;
}
message GetBlockUserResp {
BlockUser BlockUser = 2;
}
2022-01-24 01:40:49 +08:00
2021-05-26 19:44:49 +08:00
service user {
2021-12-27 16:48:05 +08:00
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
2021-09-22 20:10:38 +08:00
rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp);
2021-12-27 16:48:05 +08:00
rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp);
2021-12-07 14:28:07 +08:00
rpc SetReceiveMessageOpt(SetReceiveMessageOptReq)returns(SetReceiveMessageOptResp);
rpc GetReceiveMessageOpt(GetReceiveMessageOptReq)returns(GetReceiveMessageOptResp);
rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp);
2021-12-17 12:52:12 +08:00
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
2022-01-21 18:39:57 +08:00
rpc GetUser(GetUserReq) returns (GetUserResp);
2022-01-24 01:40:49 +08:00
rpc ResignUser(ResignUserReq) returns (ResignUserResp);
2022-01-21 18:39:57 +08:00
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);
2022-01-26 18:43:01 +08:00
rpc GetBlockUser(GetBlockUserReq) returns (GetBlockUserResp);
2021-05-26 19:44:49 +08:00
}