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

156 lines
3.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

syntax = "proto3";
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
import "Open-IM-Server/pkg/proto/conversation/conversation.proto";
option go_package = "OpenIM/pkg/proto/user;user";
package OpenIMServer.user;
message getAllUserIDReq{
sdkws.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 getDesignateUsersReq{
repeated string userIDs = 1;
}
message getDesignateUsersResp{
repeated sdkws.UserInfo usersInfo = 1;
}
message updateUserInfoReq{
sdkws.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 getPaginationUsersReq {
sdkws.RequestPagination pagination = 2;
}
message getPaginationUsersResp{
int32 total = 1;
repeated sdkws.UserInfo users = 2;
}
message userRegisterReq {
repeated sdkws.UserInfo users = 1;
}
message userRegisterResp {
}
message getGlobalRecvMessageOptReq{
string userID = 1;
}
message getGlobalRecvMessageOptResp{
int32 globalRecvMsgOpt = 1;
}
service user {
//获取指定的用户信息 全字段
rpc getDesignateUsers(getDesignateUsersReq) returns(getDesignateUsersResp);
//更新用户信息
rpc updateUserInfo(updateUserInfoReq) returns(updateUserInfoResp);
//设置用户消息接收选项
rpc setGlobalRecvMessageOpt(setGlobalRecvMessageOptReq) returns(setGlobalRecvMessageOptResp);
//获取用户消息接收选项 没找到不返回错误
rpc getGlobalRecvMessageOpt(getGlobalRecvMessageOptReq) returns(getGlobalRecvMessageOptResp);
//检查userID是否存在
rpc accountCheck(accountCheckReq) returns (accountCheckResp);
//翻页或指定userID昵称拉取用户信息 全字段
rpc getPaginationUsers(getPaginationUsersReq) returns (getPaginationUsersResp);
//用户注册
rpc userRegister(userRegisterReq) returns (userRegisterResp);
}