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

406 lines
10 KiB

syntax = "proto3";
2 years ago
import "Open-IM-Server/pkg/proto/sdk_ws/ws.proto";
import "Open-IM-Server/pkg/proto/sdk_ws/wrappers.proto";
2 years ago
option go_package = "Open_IM/pkg/proto/group;group";
package group;
3 years ago
message GroupAddMemberInfo{
string userID = 1;
int32 roleLevel = 2;
3 years ago
}
3 years ago
3 years ago
message CreateGroupReq{
repeated GroupAddMemberInfo initMemberList = 1;
server_api_params.GroupInfo groupInfo = 2;
string operationID = 3;
string opUserID = 4; //app manager or group owner
string ownerUserID = 5; //owner
3 years ago
}
message CreateGroupResp{
server_api_params.CommonResp commonResp = 1;
server_api_params.GroupInfo groupInfo = 3;
}
3 years ago
3 years ago
message GetGroupsInfoReq{
repeated string groupIDList = 1;
string operationID = 2;
string opUserID = 3; //No verification permission
}
3 years ago
message GetGroupsInfoResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.GroupInfo groupInfoList = 3;
}
3 years ago
3 years ago
message SetGroupInfoReq{
2 years ago
server_api_params.GroupInfoForSet groupInfoForSet = 1;
string opUserID = 2; //app manager or group owner
string operationID = 3;
3 years ago
}
3 years ago
message SetGroupInfoResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
3 years ago
3 years ago
3 years ago
message GetGroupApplicationListReq {
string opUserID = 1; //app manager or group owner(manager)
string operationID = 2;
string fromUserID = 3; //owner or manager
}
3 years ago
message GetGroupApplicationListResp {
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.GroupRequest groupRequestList = 3;
3 years ago
}
3 years ago
message GetUserReqApplicationListReq{
string userID = 1;
string opUserID = 2;
string operationID = 3;
3 years ago
}
message GetUserReqApplicationListResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.GroupRequest groupRequestList = 2;
3 years ago
}
3 years ago
3 years ago
message TransferGroupOwnerReq {
string groupID = 1;
string oldOwnerUserID = 2;
string newOwnerUserID = 3;
string operationID = 4;
string opUserID = 5; //app manager or group owner
}
3 years ago
message TransferGroupOwnerResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
3 years ago
message JoinGroupReq{
string groupID = 1;
string reqMessage = 2;
string opUserID = 3;
string operationID = 4;
int32 joinSource = 5;
string inviterUserID = 6;
}
3 years ago
message JoinGroupResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
3 years ago
message GroupApplicationResponseReq{
string operationID = 1;
string opUserID = 2;
string groupID = 3;
string fromUserID = 4; //
string handledMsg = 5;
int32 handleResult = 6;
3 years ago
}
3 years ago
message GroupApplicationResponseResp{
server_api_params.CommonResp commonResp = 1;
}
3 years ago
3 years ago
message QuitGroupReq{
string groupID = 1;
string operationID = 2;
string opUserID = 3;
}
3 years ago
message QuitGroupResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
3 years ago
message GetGroupMemberListReq {
string groupID = 1;
string opUserID = 2; //No verification permission
string operationID = 3;
int32 filter = 4;
int32 nextSeq = 5;
3 years ago
}
message GetGroupMemberListResp {
server_api_params.CommonResp commonResp = 1;
3 years ago
repeated server_api_params.GroupMemberFullInfo memberList = 3;
int32 nextSeq = 4;
3 years ago
}
message GetGroupMembersInfoReq {
string groupID = 1;
repeated string memberList = 2;
string opUserID = 3; //No verification permission
string operationID = 4;
}
3 years ago
message GetGroupMembersInfoResp {
server_api_params.CommonResp commonResp = 1;
3 years ago
repeated server_api_params.GroupMemberFullInfo memberList = 3;
3 years ago
}
3 years ago
message KickGroupMemberReq {
string groupID = 1;
repeated string kickedUserIDList = 2;
string reason = 3;
string operationID = 5;
string opUserID = 6; //app manger or group manager
3 years ago
}
message Id2Result {
string userID = 1;
int32 result = 2; //0 ok; -1 error
}
3 years ago
message KickGroupMemberResp {
server_api_params.CommonResp commonResp = 1;
repeated Id2Result id2ResultList = 3;
3 years ago
}
3 years ago
message GetJoinedGroupListReq {
string fromUserID = 1;
string operationID = 2;
string opUserID = 3; //app manager or FromUserID
3 years ago
}
3 years ago
message GetJoinedGroupListResp{
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.GroupInfo groupList = 3;
3 years ago
}
3 years ago
message InviteUserToGroupReq {
string operationID = 2;
string groupID = 3;
string reason = 4;
repeated string invitedUserIDList = 5;
string opUserID = 6; //group member or app manager
3 years ago
}
3 years ago
message InviteUserToGroupResp {
server_api_params.CommonResp commonResp = 1;
repeated Id2Result id2ResultList = 3; // 0 ok, -1 error
3 years ago
}
3 years ago
3 years ago
message GetGroupAllMemberReq {
string groupID = 1;
string opUserID = 2; //No verification permission
string operationID = 3;
int32 offset = 4;
int32 count = 5;
3 years ago
}
message GetGroupAllMemberResp {
server_api_params.CommonResp commonResp = 1;
3 years ago
repeated server_api_params.GroupMemberFullInfo memberList = 3;
3 years ago
}
3 years ago
message CMSGroup {
server_api_params.GroupInfo groupInfo = 1;
string groupOwnerUserName = 2;
string groupOwnerUserID = 3;
3 years ago
}
3 years ago
message GetGroupsReq {
server_api_params.RequestPagination pagination = 1;
string groupName = 2;
string groupID = 3;
string operationID = 4;
3 years ago
}
message GetGroupsResp {
repeated CMSGroup groups = 1;
server_api_params.ResponsePagination pagination = 2;
3 years ago
int32 GroupNum = 3;
server_api_params.CommonResp commonResp = 4;
3 years ago
}
message GetGroupMemberReq {
string groupID = 1;
string operationID = 2;
3 years ago
}
3 years ago
3 years ago
message GetGroupMembersCMSReq {
string groupID = 1;
string userName = 2;
server_api_params.RequestPagination pagination = 3;
string operationID = 4;
3 years ago
}
message GetGroupMembersCMSResp {
3 years ago
repeated server_api_params.GroupMemberFullInfo members = 1;
server_api_params.ResponsePagination pagination = 2;
int32 memberNums = 3;
server_api_params.CommonResp commonResp = 4;
3 years ago
}
3 years ago
message DismissGroupReq{
3 years ago
string opUserID = 1; //group or app manager
3 years ago
string operationID = 2;
string groupID = 3;
}
message DismissGroupResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
3 years ago
3 years ago
message MuteGroupMemberReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
string userID = 4;
uint32 mutedSeconds = 5;
}
message MuteGroupMemberResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message CancelMuteGroupMemberReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
string userID = 4;
}
message CancelMuteGroupMemberResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message MuteGroupReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
}
message MuteGroupResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message CancelMuteGroupReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
}
message CancelMuteGroupResp{
server_api_params.CommonResp commonResp = 1;
3 years ago
}
message SetGroupMemberNicknameReq{
string groupID = 1;
string nickname = 2;
string opUserID = 3;
string operationID = 4;
string userID = 5;
}
message SetGroupMemberNicknameResp{
server_api_params.CommonResp commonResp = 1;
}
3 years ago
message GetJoinedSuperGroupListReq {
string operationID = 1;
string userID = 2;
string opUserID = 3;
}
3 years ago
message GetJoinedSuperGroupListResp {
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.GroupInfo groupList = 3;
3 years ago
}
3 years ago
message GetSuperGroupsInfoReq {
repeated string groupIDList = 1;
string operationID = 2;
string opUserID = 3; //No verification permission
3 years ago
}
message GetSuperGroupsInfoResp {
server_api_params.CommonResp commonResp = 1;
repeated server_api_params.GroupInfo groupInfoList = 3;
3 years ago
}
3 years ago
message SetGroupMemberInfoReq{
string groupID = 1;
string userID = 2;
string opUserID = 3;
string operationID = 4;
google.protobuf.StringValue nickname = 5;
google.protobuf.StringValue faceURL = 6;
google.protobuf.Int32Value roleLevel = 7;
google.protobuf.StringValue ex = 8;
}
message SetGroupMemberInfoResp{
server_api_params.CommonResp commonResp = 1;
}
3 years ago
message GetGroupAbstractInfoReq{
string groupID = 1;
string opUserID = 2;
string operationID = 3;
}
message GetGroupAbstractInfoResp{
server_api_params.CommonResp commonResp = 1;
int32 groupMemberNumber = 2;
uint64 groupMemberListHash = 3;
}
3 years ago
service group{
rpc createGroup(CreateGroupReq) returns(CreateGroupResp);
3 years ago
rpc joinGroup(JoinGroupReq) returns(JoinGroupResp);
rpc quitGroup(QuitGroupReq) returns(QuitGroupResp);
rpc getGroupsInfo(GetGroupsInfoReq) returns(GetGroupsInfoResp);
3 years ago
rpc setGroupInfo(SetGroupInfoReq) returns(SetGroupInfoResp);
rpc getGroupApplicationList(GetGroupApplicationListReq) returns(GetGroupApplicationListResp);
3 years ago
rpc getUserReqApplicationList(GetUserReqApplicationListReq) returns(GetUserReqApplicationListResp);
3 years ago
rpc transferGroupOwner(TransferGroupOwnerReq) returns(TransferGroupOwnerResp);
rpc groupApplicationResponse(GroupApplicationResponseReq) returns(GroupApplicationResponseResp);
rpc getGroupMemberList(GetGroupMemberListReq) returns(GetGroupMemberListResp);
rpc getGroupMembersInfo(GetGroupMembersInfoReq) returns(GetGroupMembersInfoResp);
rpc kickGroupMember(KickGroupMemberReq) returns (KickGroupMemberResp);
3 years ago
rpc getJoinedGroupList(GetJoinedGroupListReq) returns (GetJoinedGroupListResp);
rpc inviteUserToGroup(InviteUserToGroupReq) returns (InviteUserToGroupResp);
rpc getGroupAllMember(GetGroupAllMemberReq) returns(GetGroupAllMemberResp);
3 years ago
rpc GetGroups(GetGroupsReq) returns(GetGroupsResp);
3 years ago
rpc GetGroupMembersCMS(GetGroupMembersCMSReq) returns(GetGroupMembersCMSResp);
2 years ago
3 years ago
rpc DismissGroup(DismissGroupReq) returns(DismissGroupResp);
3 years ago
rpc MuteGroupMember(MuteGroupMemberReq) returns(MuteGroupMemberResp);
rpc CancelMuteGroupMember(CancelMuteGroupMemberReq) returns(CancelMuteGroupMemberResp);
rpc MuteGroup(MuteGroupReq) returns(MuteGroupResp);
rpc CancelMuteGroup(CancelMuteGroupReq) returns(CancelMuteGroupResp);
rpc SetGroupMemberNickname(SetGroupMemberNicknameReq) returns (SetGroupMemberNicknameResp);
3 years ago
rpc GetJoinedSuperGroupList(GetJoinedSuperGroupListReq) returns (GetJoinedSuperGroupListResp);
3 years ago
rpc GetSuperGroupsInfo(GetSuperGroupsInfoReq) returns (GetSuperGroupsInfoResp);
rpc SetGroupMemberInfo(SetGroupMemberInfoReq) returns (SetGroupMemberInfoResp);
rpc GetGroupAbstractInfo(GetGroupAbstractInfoReq) returns (GetGroupAbstractInfoResp);
3 years ago
}