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

202 lines
5.2 KiB

syntax = "proto3";
package OpenIMServer.conversation;
2 years ago
import "wrapperspb/wrapperspb.proto";
2 years ago
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation";
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;
int32 groupAtType = 12;
2 years ago
string ex = 13;
int64 updateUnreadCountTime = 14;
int32 burnDuration = 15;
int64 minSeq = 16;
int64 maxSeq = 17;
int64 hasReadSeq = 18;
}
2 years ago
message ConversationReq{
string conversationID = 1;
int32 conversationType = 2;
string userID = 3;
string groupID = 4;
OpenIMServer.protobuf.Int32Value recvMsgOpt = 5;
OpenIMServer.protobuf.Int64Value draftTextTime = 6;
OpenIMServer.protobuf.BoolValue isPinned = 7;
OpenIMServer.protobuf.StringValue attachedInfo = 8;
OpenIMServer.protobuf.BoolValue isPrivateChat = 9;
OpenIMServer.protobuf.StringValue ex = 10;
OpenIMServer.protobuf.Int64Value updateUnreadCountTime = 11;
OpenIMServer.protobuf.Int32Value burnDuration = 12;
OpenIMServer.protobuf.Int64Value minSeq = 13;
OpenIMServer.protobuf.Int64Value maxSeq = 14;
OpenIMServer.protobuf.Int64Value hasReadSeq = 15;
}
message ModifyConversationFieldReq{
2 years ago
repeated string userIDList = 1;
int32 FieldType = 2;
Conversation conversation = 3;
}
message ModifyConversationFieldResp{
}
2 years ago
message SetConversationReq{
2 years ago
Conversation conversation = 1;
2 years ago
}
message SetConversationResp{
}
message SetRecvMsgOptReq {
2 years ago
string ownerUserID = 1;
string conversationID = 2;
int32 recvMsgOpt = 3;
2 years ago
}
message SetRecvMsgOptResp {
}
message GetConversationReq{
2 years ago
string conversationID = 1;
string ownerUserID = 2;
2 years ago
}
message GetConversationResp{
2 years ago
Conversation conversation = 2;
2 years ago
}
message GetConversationsReq{
2 years ago
string ownerUserID = 1;
repeated string conversationIDs = 2;
2 years ago
}
message GetConversationsResp{
2 years ago
repeated Conversation conversations = 2;
2 years ago
}
message GetAllConversationsReq{
2 years ago
string ownerUserID = 1;
2 years ago
}
message GetAllConversationsResp{
2 years ago
repeated Conversation conversations = 2;
2 years ago
}
message BatchSetConversationsReq{
repeated Conversation Conversations = 1;
2 years ago
string ownerUserID = 2;
2 years ago
}
message BatchSetConversationsResp{
2 years ago
repeated string success = 1;
repeated string failed = 2;
2 years ago
}
2 years ago
message GetRecvMsgNotNotifyUserIDsReq {
string groupID = 1;
}
2 years ago
message GetRecvMsgNotNotifyUserIDsResp {
repeated string userIDs = 1;
}
2 years ago
message CreateSingleChatConversationsReq {
string recvID = 1;
string sendID = 2;
2 years ago
}
2 years ago
message CreateSingleChatConversationsResp {
}
message CreateGroupChatConversationsReq {
repeated string userIDs = 1;
string groupID = 2;
}
message CreateGroupChatConversationsResp {
}
message DelGroupChatConversationsReq {
string groupID = 1;
repeated string ownerUserID = 2;
int64 maxSeq = 3;
}
message DelGroupChatConversationsResp {
2 years ago
}
2 years ago
message GetConversationIDsReq {
string userID = 1;
}
message GetConversationIDsResp {
repeated string conversationIDs = 1;
}
2 years ago
message GetConversationsHasReadAndMaxSeqReq {
string userID = 1;
}
message Seqs {
int64 maxSeq = 1;
int64 hasReadSeq = 2;
}
message GetConversationsHasReadAndMaxSeqResp {
map<string, Seqs> seqs = 1;
}
2 years ago
message SetConversationsReq {
repeated string userIDs = 1;
ConversationReq conversation = 2;
}
message SetConversationsResp {
}
2 years ago
message GetUserConversationIDsHashReq {
string ownerUserID = 1;
}
message GetUserConversationIDsHashResp {
uint64 hash = 1;
}
message GetConversationByConversationIDReq {
string conversationID = 1;
}
message GetConversationByConversationIDResp {
Conversation conversation = 1;
}
service conversation {
rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp);
2 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);
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
rpc GetRecvMsgNotNotifyUserIDs(GetRecvMsgNotNotifyUserIDsReq) returns (GetRecvMsgNotNotifyUserIDsResp);
2 years ago
rpc CreateSingleChatConversations(CreateSingleChatConversationsReq) returns (CreateSingleChatConversationsResp);
rpc CreateGroupChatConversations(CreateGroupChatConversationsReq) returns (CreateGroupChatConversationsResp);
rpc DelGroupChatConversations(DelGroupChatConversationsReq) returns(DelGroupChatConversationsResp);
2 years ago
rpc GetConversationIDs(GetConversationIDsReq) returns(GetConversationIDsResp);
2 years ago
rpc GetConversationsHasReadAndMaxSeq(GetConversationsHasReadAndMaxSeqReq) returns(GetConversationsHasReadAndMaxSeqResp);
2 years ago
rpc SetConversations(SetConversationsReq) returns(SetConversationsResp);
rpc GetUserConversationIDsHash(GetUserConversationIDsHashReq) returns(GetUserConversationIDsHashResp);
rpc GetConversationByConversationID(GetConversationByConversationIDReq) returns(GetConversationByConversationIDResp);
}