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

419 lines
9.8 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;
message CommonResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
}
3 years ago
message GroupAddMemberInfo{
string UserID = 1;
3 years ago
int32 RoleLevel = 2;
3 years ago
}
3 years ago
3 years ago
message CreateGroupReq{
3 years ago
repeated GroupAddMemberInfo InitMemberList = 1;
3 years ago
server_api_params.GroupInfo GroupInfo = 2;
3 years ago
string OperationID = 3;
string OpUserID = 4; //app manager or group owner
string OwnerUserID = 5; //owner
3 years ago
}
message CreateGroupResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
server_api_params.GroupInfo GroupInfo = 3;
}
3 years ago
3 years ago
message GetGroupsInfoReq{
3 years ago
repeated string GroupIDList = 1;
string OperationID = 2;
3 years ago
string OpUserID = 3; //No verification permission
}
3 years ago
message GetGroupsInfoResp{
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.GroupInfo GroupInfoList = 3;
}
3 years ago
3 years ago
message SetGroupInfoReq{
2 years ago
server_api_params.GroupInfoForSet groupInfoForSet = 1;
3 years ago
string OpUserID = 2; //app manager or group owner
string OperationID = 3;
3 years ago
}
3 years ago
message SetGroupInfoResp{
CommonResp CommonResp = 1;
}
3 years ago
3 years ago
3 years ago
message GetGroupApplicationListReq {
3 years ago
string OpUserID = 1; //app manager or group owner(manager)
string OperationID = 2;
3 years ago
string FromUserID = 3; //owner or manager
}
3 years ago
message GetGroupApplicationListResp {
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.GroupRequest GroupRequestList = 3;
3 years ago
}
3 years ago
message GetUserReqApplicationListReq{
string UserID = 1;
string OpUserID = 2;
string OperationID = 3;
}
message GetUserReqApplicationListResp{
CommonResp CommonResp = 1;
repeated server_api_params.GroupRequest GroupRequestList = 2;
}
3 years ago
3 years ago
message TransferGroupOwnerReq {
string GroupID = 1;
3 years ago
string OldOwnerUserID = 2;
string NewOwnerUserID = 3;
string OperationID = 4;
3 years ago
string OpUserID = 5; //app manager or group owner
}
3 years ago
message TransferGroupOwnerResp{
CommonResp CommonResp = 1;
}
3 years ago
message JoinGroupReq{
3 years ago
string GroupID = 1;
string ReqMessage = 2;
3 years ago
string OpUserID = 3;
string OperationID = 4;
int32 JoinSource = 5;
string InviterUserID = 6;
}
3 years ago
message JoinGroupResp{
CommonResp CommonResp = 1;
}
3 years ago
message GroupApplicationResponseReq{
string OperationID = 1;
3 years ago
string OpUserID = 2;
string GroupID = 3;
3 years ago
string FromUserID = 4; //
string HandledMsg = 5;
int32 HandleResult = 6;
3 years ago
}
3 years ago
message GroupApplicationResponseResp{
CommonResp CommonResp = 1;
}
3 years ago
3 years ago
message QuitGroupReq{
3 years ago
string GroupID = 1;
string OperationID = 2;
3 years ago
string OpUserID = 3;
}
3 years ago
message QuitGroupResp{
CommonResp CommonResp = 1;
}
3 years ago
message GetGroupMemberListReq {
3 years ago
string GroupID = 1;
3 years ago
string OpUserID = 2; //No verification permission
3 years ago
string OperationID = 3;
int32 Filter = 4;
int32 NextSeq = 5;
3 years ago
}
message GetGroupMemberListResp {
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.GroupMemberFullInfo memberList = 3;
int32 nextSeq = 4;
3 years ago
}
message GetGroupMembersInfoReq {
3 years ago
string GroupID = 1;
repeated string memberList = 2;
3 years ago
string OpUserID = 3; //No verification permission
3 years ago
string OperationID = 4;
}
3 years ago
message GetGroupMembersInfoResp {
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.GroupMemberFullInfo memberList = 3;
3 years ago
}
3 years ago
message KickGroupMemberReq {
3 years ago
string GroupID = 1;
repeated string KickedUserIDList = 2;
string Reason = 3;
string OperationID = 5;
3 years ago
string OpUserID = 6; //app manger or group manager
3 years ago
}
message Id2Result {
3 years ago
string UserID = 1;
int32 Result = 2; //0 ok; -1 error
}
3 years ago
message KickGroupMemberResp {
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated Id2Result Id2ResultList = 3;
3 years ago
}
3 years ago
message GetJoinedGroupListReq {
string FromUserID = 1;
string operationID = 2;
3 years ago
string OpUserID = 3; //app manager or FromUserID
3 years ago
}
3 years ago
message GetJoinedGroupListResp{
3 years ago
int32 ErrCode = 1;
3 years ago
string ErrMsg = 2;
3 years ago
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;
3 years ago
string OpUserID = 6; //group member or app manager
3 years ago
}
3 years ago
message InviteUserToGroupResp {
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated Id2Result Id2ResultList = 3; // 0 ok, -1 error
3 years ago
}
3 years ago
3 years ago
message GetGroupAllMemberReq {
3 years ago
string GroupID = 1;
3 years ago
string OpUserID = 2; //No verification permission
3 years ago
string OperationID = 3;
int32 Offset = 4;
int32 Count = 5;
3 years ago
}
message GetGroupAllMemberResp {
3 years ago
int32 ErrCode = 1;
string ErrMsg = 2;
3 years ago
repeated server_api_params.GroupMemberFullInfo memberList = 3;
3 years ago
}
3 years ago
message CMSGroup {
server_api_params.GroupInfo GroupInfo = 1;
2 years ago
string GroupOwnerUserName = 2;
string GroupOwnerUserID = 3;
3 years ago
}
3 years ago
message GetGroupsReq {
3 years ago
server_api_params.RequestPagination Pagination = 1;
2 years ago
string GroupName = 2;
string GroupID = 3;
string OperationID = 4;
3 years ago
}
message GetGroupsResp {
3 years ago
repeated CMSGroup CMSGroups = 1;
2 years ago
server_api_params.ResponsePagination Pagination = 2;
3 years ago
int32 GroupNum = 3;
2 years ago
CommonResp commonResp = 4;
3 years ago
}
message GetGroupMemberReq {
2 years ago
string GroupID = 1;
3 years ago
string OperationID = 2;
}
3 years ago
3 years ago
message GetGroupMembersCMSReq {
2 years ago
string GroupID = 1;
3 years ago
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;
2 years ago
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{
CommonResp commonResp = 1;
}
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{
CommonResp commonResp = 1;
}
message CancelMuteGroupMemberReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
string userID = 4;
}
message CancelMuteGroupMemberResp{
CommonResp commonResp = 1;
}
message MuteGroupReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
}
message MuteGroupResp{
CommonResp commonResp = 1;
}
message CancelMuteGroupReq{
string opUserID = 1; //group or app manager
string operationID = 2;
string groupID = 3;
}
message CancelMuteGroupResp{
CommonResp commonResp = 1;
}
message SetGroupMemberNicknameReq{
string groupID = 1;
string nickname = 2;
string opUserID = 3;
string operationID = 4;
string userID = 5;
}
message SetGroupMemberNicknameResp{
CommonResp CommonResp = 1;
}
3 years ago
message GetJoinedSuperGroupListReq {
string operationID = 1;
string userID = 2;
string opUserID = 3;
}
3 years ago
message GetJoinedSuperGroupListResp {
CommonResp commonResp = 1;
repeated server_api_params.GroupInfo GroupList = 3;
}
3 years ago
message GetSuperGroupsInfoReq {
repeated string GroupIDList = 1;
string OperationID = 2;
string OpUserID = 3; //No verification permission
}
message GetSuperGroupsInfoResp {
CommonResp commonResp = 1;
repeated server_api_params.GroupInfo GroupInfoList = 3;
}
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{
CommonResp CommonResp = 1;
}
3 years ago
message GetGroupAbstractInfoReq{
string groupID = 1;
string opUserID = 2;
string operationID = 3;
}
message GetGroupAbstractInfoResp{
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
}