|
|
syntax = "proto3";
|
|
|
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
|
|
|
import "Open-IM-Server/pkg/proto/conversation/conversation.proto";
|
|
|
option go_package = "Open_IM/pkg/proto/user;user";
|
|
|
package user;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message GetAllUserIDReq{
|
|
|
server_api_params.RequestPagination pagination = 1;
|
|
|
}
|
|
|
message GetAllUserIDResp{
|
|
|
int32 total = 1;
|
|
|
repeated string UserIDList = 2;
|
|
|
}
|
|
|
|
|
|
|
|
|
message AccountCheckReq{
|
|
|
repeated string checkUserIDs = 1;
|
|
|
}
|
|
|
message AccountCheckResp{
|
|
|
message SingleUserStatus {
|
|
|
string userID = 1;
|
|
|
string accountStatus = 2;
|
|
|
}
|
|
|
repeated SingleUserStatus results = 1;
|
|
|
}
|
|
|
|
|
|
|
|
|
message GetUsersInfoReq{
|
|
|
repeated string userIDs = 1;
|
|
|
}
|
|
|
message GetUsersInfoResp{
|
|
|
repeated server_api_params.UserInfo usersInfo = 1;
|
|
|
}
|
|
|
|
|
|
message UpdateUserInfoReq{
|
|
|
server_api_params.UserInfo userInfo = 1;
|
|
|
}
|
|
|
message UpdateUserInfoResp{
|
|
|
}
|
|
|
|
|
|
message SetGlobalRecvMessageOptReq{
|
|
|
string userID = 1;
|
|
|
int32 globalRecvMsgOpt = 3;
|
|
|
}
|
|
|
message SetGlobalRecvMessageOptResp{
|
|
|
}
|
|
|
|
|
|
message SetConversationReq{
|
|
|
conversation.Conversation Conversation = 1;
|
|
|
int32 notificationType = 2;
|
|
|
string OperationID = 3;
|
|
|
}
|
|
|
|
|
|
message SetConversationResp{
|
|
|
|
|
|
}
|
|
|
|
|
|
message SetRecvMsgOptReq {
|
|
|
string OwnerUserID = 1;
|
|
|
string ConversationID = 2;
|
|
|
int32 RecvMsgOpt = 3;
|
|
|
int32 notificationType = 4;
|
|
|
string OperationID = 5;
|
|
|
}
|
|
|
|
|
|
message SetRecvMsgOptResp {
|
|
|
|
|
|
}
|
|
|
|
|
|
message GetConversationReq{
|
|
|
string ConversationID = 1;
|
|
|
string OwnerUserID = 2;
|
|
|
string OperationID = 3;
|
|
|
}
|
|
|
|
|
|
message GetConversationResp{
|
|
|
conversation.Conversation Conversation = 2;
|
|
|
}
|
|
|
|
|
|
message GetConversationsReq{
|
|
|
string OwnerUserID = 1;
|
|
|
repeated string ConversationIDs = 2;
|
|
|
string OperationID = 3;
|
|
|
}
|
|
|
|
|
|
message GetConversationsResp{
|
|
|
repeated conversation.Conversation Conversations = 2;
|
|
|
}
|
|
|
|
|
|
message GetAllConversationsReq{
|
|
|
string OwnerUserID = 1;
|
|
|
string OperationID = 2;
|
|
|
}
|
|
|
|
|
|
message GetAllConversationsResp{
|
|
|
repeated conversation.Conversation Conversations = 2;
|
|
|
}
|
|
|
|
|
|
message BatchSetConversationsReq{
|
|
|
repeated conversation.Conversation Conversations = 1;
|
|
|
string OwnerUserID = 2;
|
|
|
int32 notificationType = 3;
|
|
|
string OperationID = 4;
|
|
|
}
|
|
|
|
|
|
message BatchSetConversationsResp{
|
|
|
repeated string Success = 2;
|
|
|
repeated string Failed = 3;
|
|
|
}
|
|
|
|
|
|
|
|
|
message GetUsersReq {
|
|
|
server_api_params.RequestPagination pagination = 2;
|
|
|
string userName = 3;
|
|
|
string userID = 4;
|
|
|
string content = 5;
|
|
|
}
|
|
|
|
|
|
message GetUsersResp{
|
|
|
int32 total = 1;
|
|
|
repeated server_api_params.UserInfo users = 2;
|
|
|
}
|
|
|
|
|
|
message AddUserReq{
|
|
|
server_api_params.UserInfo userInfo = 1;
|
|
|
string operationID = 2;
|
|
|
}
|
|
|
|
|
|
message AddUserResp{
|
|
|
}
|
|
|
|
|
|
|
|
|
message BlockUserReq{
|
|
|
string userID = 1;
|
|
|
string endDisableTime = 2;
|
|
|
string operationID = 3;
|
|
|
string opUserID = 4;
|
|
|
}
|
|
|
|
|
|
message BlockUserResp{
|
|
|
CommonResp CommonResp = 1;
|
|
|
}
|
|
|
|
|
|
message UnBlockUserReq{
|
|
|
string userID = 1;
|
|
|
string operationID = 2;
|
|
|
string opUserID = 3;
|
|
|
}
|
|
|
|
|
|
message UnBlockUserResp{
|
|
|
CommonResp CommonResp = 1;
|
|
|
}
|
|
|
|
|
|
message GetBlockUsersReq{
|
|
|
server_api_params.RequestPagination pagination = 1;
|
|
|
string operationID = 2;
|
|
|
string userID = 3;
|
|
|
int32 totalBlockUserNum = 4;
|
|
|
}
|
|
|
|
|
|
message BlockUser {
|
|
|
server_api_params.UserInfo UserInfo = 1;
|
|
|
string BeginDisableTime = 2;
|
|
|
string EndDisableTime = 3;
|
|
|
}
|
|
|
|
|
|
message GetBlockUsersResp{
|
|
|
repeated BlockUser BlockUsers = 2;
|
|
|
server_api_params.ResponsePagination Pagination = 3;
|
|
|
int32 UserNums = 4;
|
|
|
}
|
|
|
|
|
|
|
|
|
service user {
|
|
|
//获取指定的用户信息 全字段
|
|
|
rpc GetUsersInfo(GetUsersInfoReq) returns(GetUsersInfoResp);
|
|
|
//更新用户信息
|
|
|
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
|
|
|
//设置用户消息接收选项
|
|
|
rpc SetGlobalRecvMessageOpt(SetGlobalRecvMessageOptReq) returns(SetGlobalRecvMessageOptResp);
|
|
|
//检查userID是否存在
|
|
|
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
|
|
|
//翻页(或指定userID,昵称)拉取用户信息 全字段
|
|
|
rpc GetUsers(GetUsersReq) returns (GetUsersResp);
|
|
|
}
|
|
|
|