2021-05-26 19:44:49 +08:00
|
|
|
syntax = "proto3";
|
2023-02-09 20:36:34 +08:00
|
|
|
import "Open-IM-Server/pkg/proto/sdkws/ws.proto";
|
2022-09-20 23:31:28 +08:00
|
|
|
import "Open-IM-Server/pkg/proto/conversation/conversation.proto";
|
2022-09-21 08:36:33 +08:00
|
|
|
option go_package = "Open_IM/pkg/proto/user;user";
|
2021-05-26 19:44:49 +08:00
|
|
|
package user;
|
|
|
|
|
|
2021-12-27 16:48:05 +08:00
|
|
|
|
2021-09-22 20:10:38 +08:00
|
|
|
|
2021-12-27 16:48:05 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getAllUserIDReq{
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.RequestPagination pagination = 1;
|
2021-12-27 16:48:05 +08:00
|
|
|
}
|
2023-01-31 17:04:08 +08:00
|
|
|
message getAllUserIDResp{
|
2023-01-29 14:47:21 +08:00
|
|
|
int32 total = 1;
|
2023-01-31 17:04:08 +08:00
|
|
|
repeated string userIDList = 2;
|
2021-12-17 12:15:33 +08:00
|
|
|
}
|
2021-12-27 16:48:05 +08:00
|
|
|
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message accountCheckReq{
|
2023-01-29 14:47:21 +08:00
|
|
|
repeated string checkUserIDs = 1;
|
2021-12-17 12:15:33 +08:00
|
|
|
}
|
2023-01-31 17:04:08 +08:00
|
|
|
message accountCheckResp{
|
|
|
|
|
message singleUserStatus {
|
2021-12-17 12:15:33 +08:00
|
|
|
string userID = 1;
|
|
|
|
|
string accountStatus = 2;
|
|
|
|
|
}
|
2023-01-31 17:04:08 +08:00
|
|
|
repeated singleUserStatus results = 1;
|
2021-09-22 20:10:38 +08:00
|
|
|
}
|
2021-12-27 16:48:05 +08:00
|
|
|
|
|
|
|
|
|
2023-02-07 20:33:56 +08:00
|
|
|
message getDesignateUsersReq{
|
2023-01-29 14:47:21 +08:00
|
|
|
repeated string userIDs = 1;
|
2021-05-26 19:44:49 +08:00
|
|
|
}
|
2023-02-07 20:33:56 +08:00
|
|
|
message getDesignateUsersResp{
|
2023-02-09 20:36:34 +08:00
|
|
|
repeated sdkws.UserInfo usersInfo = 1;
|
2021-05-26 19:44:49 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message updateUserInfoReq{
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.UserInfo userInfo = 1;
|
2021-12-27 16:48:05 +08:00
|
|
|
}
|
2023-01-31 17:04:08 +08:00
|
|
|
message updateUserInfoResp{
|
2021-05-26 19:44:49 +08:00
|
|
|
}
|
2023-01-29 14:47:21 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message setGlobalRecvMessageOptReq{
|
2022-06-16 18:59:17 +08:00
|
|
|
string userID = 1;
|
2022-06-16 19:12:50 +08:00
|
|
|
int32 globalRecvMsgOpt = 3;
|
2022-06-16 18:59:17 +08:00
|
|
|
}
|
2023-01-31 17:04:08 +08:00
|
|
|
message setGlobalRecvMessageOptResp{
|
2022-06-16 18:59:17 +08:00
|
|
|
}
|
2021-11-29 11:19:24 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message setConversationReq{
|
|
|
|
|
conversation.Conversation conversation = 1;
|
2022-03-31 14:50:02 +08:00
|
|
|
int32 notificationType = 2;
|
2023-01-31 17:04:08 +08:00
|
|
|
string operationID = 3;
|
2022-03-11 17:37:01 +08:00
|
|
|
}
|
2021-12-27 16:48:05 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message setConversationResp{
|
2023-01-29 14:47:21 +08:00
|
|
|
|
2021-12-27 16:48:05 +08:00
|
|
|
}
|
2022-03-11 17:37:01 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message setRecvMsgOptReq {
|
|
|
|
|
string ownerUserID = 1;
|
|
|
|
|
string conversationID = 2;
|
|
|
|
|
int32 recvMsgOpt = 3;
|
2022-03-31 14:50:02 +08:00
|
|
|
int32 notificationType = 4;
|
2023-01-31 17:04:08 +08:00
|
|
|
string operationID = 5;
|
2022-03-16 18:02:26 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message setRecvMsgOptResp {
|
2023-01-29 14:47:21 +08:00
|
|
|
|
2022-03-16 18:02:26 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getConversationReq{
|
|
|
|
|
string conversationID = 1;
|
|
|
|
|
string ownerUserID = 2;
|
|
|
|
|
string operationID = 3;
|
2021-12-07 14:28:07 +08:00
|
|
|
}
|
2022-03-11 17:37:01 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getConversationResp{
|
|
|
|
|
conversation.Conversation conversation = 2;
|
2021-12-07 14:28:07 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getConversationsReq{
|
|
|
|
|
string ownerUserID = 1;
|
|
|
|
|
repeated string conversationIDs = 2;
|
|
|
|
|
string operationID = 3;
|
2021-12-07 14:28:07 +08:00
|
|
|
}
|
2022-03-11 17:37:01 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getConversationsResp{
|
|
|
|
|
repeated conversation.Conversation conversations = 2;
|
2021-12-07 14:28:07 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getAllConversationsReq{
|
|
|
|
|
string ownerUserID = 1;
|
|
|
|
|
string operationID = 2;
|
2021-12-07 14:28:07 +08:00
|
|
|
}
|
2022-03-11 17:37:01 +08:00
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message getAllConversationsResp{
|
|
|
|
|
repeated conversation.Conversation conversations = 2;
|
2022-03-11 17:37:01 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message batchSetConversationsReq{
|
|
|
|
|
repeated conversation.Conversation conversations = 1;
|
2022-03-11 17:37:01 +08:00
|
|
|
string OwnerUserID = 2;
|
2022-03-31 14:50:02 +08:00
|
|
|
int32 notificationType = 3;
|
|
|
|
|
string OperationID = 4;
|
2022-03-11 17:37:01 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 17:04:08 +08:00
|
|
|
message batchSetConversationsResp{
|
2022-04-20 18:06:24 +08:00
|
|
|
repeated string Success = 2;
|
|
|
|
|
repeated string Failed = 3;
|
2021-12-07 14:28:07 +08:00
|
|
|
}
|
|
|
|
|
|
2022-01-21 18:39:57 +08:00
|
|
|
|
2023-02-07 20:33:56 +08:00
|
|
|
message getPaginationUsersReq {
|
2023-02-09 20:36:34 +08:00
|
|
|
sdkws.RequestPagination pagination = 2;
|
2022-01-21 18:39:57 +08:00
|
|
|
}
|
|
|
|
|
|
2023-02-07 20:33:56 +08:00
|
|
|
message getPaginationUsersResp{
|
2023-01-29 14:47:21 +08:00
|
|
|
int32 total = 1;
|
2023-02-09 20:36:34 +08:00
|
|
|
repeated sdkws.UserInfo users = 2;
|
2022-01-21 18:39:57 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-31 20:33:33 +08:00
|
|
|
message userRegisterReq {
|
2023-02-09 20:36:34 +08:00
|
|
|
repeated sdkws.UserInfo users = 1;
|
2023-01-31 17:04:08 +08:00
|
|
|
}
|
2023-01-31 20:33:33 +08:00
|
|
|
message userRegisterResp {
|
2023-01-31 17:04:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-07 08:44:21 +08:00
|
|
|
|
2021-05-26 19:44:49 +08:00
|
|
|
service user {
|
2023-01-29 14:47:21 +08:00
|
|
|
//获取指定的用户信息 全字段
|
2023-02-07 20:39:12 +08:00
|
|
|
rpc getDesignateUsers(getDesignateUsersReq) returns(getDesignateUsersResp);
|
2023-01-29 14:47:21 +08:00
|
|
|
//更新用户信息
|
2023-01-31 17:04:08 +08:00
|
|
|
rpc updateUserInfo(updateUserInfoReq) returns(updateUserInfoResp);
|
2023-01-29 14:47:21 +08:00
|
|
|
//设置用户消息接收选项
|
2023-01-31 17:04:08 +08:00
|
|
|
rpc setGlobalRecvMessageOpt(setGlobalRecvMessageOptReq) returns(setGlobalRecvMessageOptResp);
|
2023-01-29 14:47:21 +08:00
|
|
|
//检查userID是否存在
|
2023-01-31 17:04:08 +08:00
|
|
|
rpc accountCheck(accountCheckReq)returns(accountCheckResp);
|
2023-01-29 14:47:21 +08:00
|
|
|
//翻页(或指定userID,昵称)拉取用户信息 全字段
|
2023-02-07 20:33:56 +08:00
|
|
|
rpc getPaginationUsers(getPaginationUsersReq) returns (getPaginationUsersResp);
|
2023-01-31 20:33:33 +08:00
|
|
|
//用户注册
|
|
|
|
|
rpc userRegister(userRegisterReq) returns (userRegisterResp);
|
2021-05-26 19:44:49 +08:00
|
|
|
}
|
2022-08-26 17:51:01 +08:00
|
|
|
|