ws.proto 7.2 KB
Newer Older
1 2
syntax = "proto3";
package open_im_sdk;//The package name to which the proto file belongs
programor_guo's avatar
programor_guo 已提交
3
//option go_package = "./sdk_ws;open_im_sdk";//The generated go pb file is in the current directory, and the package name is open_im_sdk
4

W
wenxu12345 已提交
5 6 7 8
////////////////////////////////base///////////////////////////////


message GroupInfo{
programor_guo's avatar
programor_guo 已提交
9 10 11 12 13 14 15 16 17 18 19 20
  string groupID = 1;
  string groupName = 2;
  string notification = 3;
  string introduction = 4;
  string faceURL = 5;
  string ownerUserID = 6;
  uint32 createTime = 7;
  uint32 memberCount = 8;
  string ex = 9;
  int32 status = 10;
  string creatorUserID = 11;
  int32 groupType = 12;
W
wenxu12345 已提交
21 22
}

W
wenxu12345 已提交
23

W
wenxu12345 已提交
24
message GroupMemberFullInfo {
programor_guo's avatar
programor_guo 已提交
25 26
  string groupID = 1 ;
  string userID = 2 ;
W
wenxu12345 已提交
27
  int32 roleLevel = 3;
programor_guo's avatar
programor_guo 已提交
28 29 30 31 32 33 34
  int64 joinTime = 4;
  string nickname = 5;
  string faceURL = 6;
  int32 appMangerLevel = 7; //if >0
  int32 joinSource = 8;
  string operatorUserID = 9;
  string ex = 10;
W
wenxu12345 已提交
35 36 37
}

message PublicUserInfo{
programor_guo's avatar
programor_guo 已提交
38 39 40 41 42
  string userID = 1;
  string nickname = 2;
  string faceURL = 3;
  int32 gender = 4;
  int32 appMangerLevel = 5; //if >0
W
wenxu12345 已提交
43 44 45
}

message UserInfo{
programor_guo's avatar
programor_guo 已提交
46 47 48 49 50 51 52 53 54 55
  string userID = 1;
  string nickname = 2;
  string faceURL = 3;
  int32 gender = 4;
  string phoneNumber = 5;
  uint32 birth = 6;
  string email = 7;
  string ex = 8;
  uint32 createTime = 9;
  int32 appMangerLevel = 10;
W
wenxu12345 已提交
56 57 58
}

message FriendInfo{
programor_guo's avatar
programor_guo 已提交
59 60 61 62 63 64 65
  string ownerUserID = 1;
  string remark = 2;
  uint32 createTime = 3;
  UserInfo friendUser = 4;
  int32 addSource = 5;
  string operatorUserID = 6;
  string ex = 7;
W
wenxu12345 已提交
66 67 68
}

message BlackInfo{
programor_guo's avatar
programor_guo 已提交
69 70 71 72 73 74
  string ownerUserID = 1;
  uint32 createTime = 2;
  PublicUserInfo blackUserInfo = 3;
  int32 addSource = 4;
  string operatorUserID = 5;
  string ex = 6;
W
wenxu12345 已提交
75 76 77
}

message GroupRequest{
programor_guo's avatar
programor_guo 已提交
78 79 80 81 82 83 84 85 86
  string userID = 1;
  string groupID = 2;
  string handleResult = 3;
  string reqMsg = 4;
  string  handleMsg = 5;
  uint32 reqTime = 6;
  string handleUserID = 7;
  uint32 handleTime = 8;
  string ex = 9;
W
wenxu12345 已提交
87 88 89
}

message FriendRequest{
programor_guo's avatar
programor_guo 已提交
90 91 92 93 94 95 96 97 98
  string  fromUserID = 1;
  string toUserID = 2;
  int32 handleResult = 3;
  string reqMsg = 4;
  uint32 createTime = 5;
  string handlerUserID = 6;
  string handleMsg = 7;
  uint32 handleTime = 8;
  string ex = 9;
W
wenxu12345 已提交
99 100 101 102
}

///////////////////////////////////base end/////////////////////////////////////

103 104

message PullMessageBySeqListResp {
programor_guo's avatar
programor_guo 已提交
105 106 107 108 109 110
  int32 errCode = 1;
  string errMsg = 2;
  int64 maxSeq = 3;
  int64 minSeq = 4;
  repeated GatherFormat singleUserMsg = 5;
  repeated GatherFormat groupUserMsg = 6;
111 112
}
message PullMessageBySeqListReq{
programor_guo's avatar
programor_guo 已提交
113 114
  string userID = 1;
  string operationID = 2;
W
wenxu12345 已提交
115
  repeated int64 seqList = 3;
programor_guo's avatar
programor_guo 已提交
116 117 118 119 120 121 122 123 124 125 126 127 128 129
}
message PullMessageReq {
  string userID = 1;
  int64 seqBegin = 2;
  int64 seqEnd = 3;
  string operationID = 4;
}
message PullMessageResp {
  int32 errCode = 1;
  string errMsg = 2;
  int64 maxSeq = 3;
  int64 minSeq = 4;
  repeated GatherFormat singleUserMsg = 5;
  repeated GatherFormat groupUserMsg = 6;
130 131 132 133 134 135 136 137 138
}
message GetMaxAndMinSeqReq {
}
message GetMaxAndMinSeqResp {
  int64 maxSeq = 1;
  int64 minSeq = 2;
}
message GatherFormat{
  // @inject_tag: json:"id"
programor_guo's avatar
programor_guo 已提交
139
  string id = 1;
140
  // @inject_tag: json:"list"
programor_guo's avatar
programor_guo 已提交
141
  repeated MsgData list = 2;//detail msg
142
}
programor_guo's avatar
programor_guo 已提交
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
//message MsgFormat{
//  // @inject_tag: json:"sendID"
//  string SendID = 1;
//  // @inject_tag: json:"recvID"
//  string RecvID = 2;
//  // @inject_tag: json:"msgFrom"
//  int32 MsgFrom = 3;
//  // @inject_tag: json:"contentType"
//  int32 ContentType = 4;
//  // @inject_tag: json:"serverMsgID"
//  string ServerMsgID = 5;
//  // @inject_tag: json:"content"
//  string Content = 6;
//  // @inject_tag: json:"seq"
//  int64 Seq = 7;
//  // @inject_tag: json:"sendTime"
//  int64 SendTime = 8;
//  // @inject_tag: json:"senderPlatformID"
//  int32 SenderPlatformID = 9;
//  // @inject_tag: json:"senderNickName"
//  string SenderNickName = 10;
//  // @inject_tag: json:"senderFaceUrl"
//  string SenderFaceURL = 11;
//  // @inject_tag: json:"clientMsgID"
//  string ClientMsgID = 12;
//}
169 170 171


message UserSendMsgResp {
programor_guo's avatar
programor_guo 已提交
172 173
  string serverMsgID = 1;
  string clientMsgID = 2;
174 175 176 177 178 179
  int64  sendTime = 3;

}
message MsgData {
  string  sendID = 1;
  string  recvID = 2;
programor_guo's avatar
programor_guo 已提交
180
  string groupID = 3;
W
wenxu12345 已提交
181 182 183 184 185
  string clientMsgID = 4;
  string serverMsgID = 5;
  int32 senderPlatformID = 6;
  string  senderNickname = 7;
  string  senderFaceURL = 8;
programor_guo's avatar
programor_guo 已提交
186 187 188
  int32   sessionType = 9;
  int32 msgFrom = 10;
  int32 contentType = 11;
W
wenxu12345 已提交
189 190
  bytes content = 12;
  int64 seq = 14;
programor_guo's avatar
programor_guo 已提交
191 192
  int64 sendTime = 15;
  int64 createTime = 16;
programor_guo's avatar
programor_guo 已提交
193 194 195
  int32 status = 17;
  map<string, bool> options = 18;
  OfflinePushInfo offlinePushInfo = 19;
196 197
}

W
wenxu12345 已提交
198
message OfflinePushInfo{
programor_guo's avatar
programor_guo 已提交
199 200 201
  string title = 1;
  string desc = 2;
  string ex = 3;
W
wenxu12345 已提交
202 203
  string iOSPushSound = 4;
  bool iOSBadgeCount = 5;
W
wenxu12345 已提交
204 205
}

W
pb  
wenxu12345 已提交
206 207


W
wenxu12345 已提交
208 209


W
wenxu12345 已提交
210 211 212



W
wenxu12345 已提交
213 214

message TipsComm{
programor_guo's avatar
programor_guo 已提交
215 216
  bytes detail = 1;
  string defaultTips = 2;
W
wenxu12345 已提交
217 218 219 220 221
}

//////////////////////group/////////////////////
//Actively join the group
message MemberEnterTips{
programor_guo's avatar
programor_guo 已提交
222 223 224
  GroupInfo group = 1;
  GroupMemberFullInfo entrantUser = 2;
  int64 operationTime = 3;
W
wenxu12345 已提交
225 226 227 228
}

//Actively leave the group
message MemberLeaveTips{
programor_guo's avatar
programor_guo 已提交
229 230 231
  GroupInfo group = 1;
  GroupMemberFullInfo leaverUser = 2;
  int64 operationTime = 3;
W
wenxu12345 已提交
232 233 234
}

message MemberInvitedTips{
programor_guo's avatar
programor_guo 已提交
235 236 237 238
  GroupInfo group = 1;
  GroupMemberFullInfo opUser = 2;
  repeated GroupMemberFullInfo invitedUserList = 3;
  int64 operationTime = 4;
W
wenxu12345 已提交
239 240 241
}

message MemberKickedTips{
programor_guo's avatar
programor_guo 已提交
242 243 244 245
  GroupInfo group = 1;
  GroupMemberFullInfo opUser = 2;
  repeated GroupMemberFullInfo kickedUserList = 3;
  int64 operationTime = 4;
W
wenxu12345 已提交
246 247 248
}

message MemberInfoChangedTips{
programor_guo's avatar
programor_guo 已提交
249 250 251 252 253
  int32 changeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ;
  GroupMemberFullInfo opUser = 2; //who do this
  GroupMemberFullInfo finalInfo = 3; //
  int64 muteTime = 4;
  GroupInfo group = 5;
W
wenxu12345 已提交
254 255 256
}

message GroupCreatedTips{
programor_guo's avatar
programor_guo 已提交
257 258 259 260
  GroupInfo group = 1;
  GroupMemberFullInfo creator = 2;
  repeated GroupMemberFullInfo memberList = 3;
  int64 operationTime = 4;
W
wenxu12345 已提交
261 262 263
}

message GroupInfoChangedTips{
programor_guo's avatar
programor_guo 已提交
264 265 266
  int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification  0100:Introduction; 1000:FaceUrl
  GroupInfo group = 2;
  GroupMemberFullInfo opUser = 3;
W
pb  
wenxu12345 已提交
267 268
}

W
wenxu12345 已提交
269
message JoinGroupApplicationTips{
programor_guo's avatar
programor_guo 已提交
270 271 272
  GroupInfo group = 1;
  PublicUserInfo applicant = 2;
  string  reason = 3;
W
wenxu12345 已提交
273 274 275
}

message ApplicationProcessedTips{
programor_guo's avatar
programor_guo 已提交
276 277 278 279
  GroupInfo group = 1;
  GroupMemberFullInfo opUser = 2;
  int32 result = 3;
  string  reason = 4;
W
wenxu12345 已提交
280 281 282
}

//////////////////////friend/////////////////////
W
wenxu12345 已提交
283 284 285 286 287 288
//message FriendInfo{
//  UserInfo OwnerUser = 1;
//  string Remark = 2;
//  uint64 CreateTime = 3;
//  UserInfo FriendUser = 4;
//}
W
pb  
wenxu12345 已提交
289

W
wenxu12345 已提交
290
message FriendApplication{
programor_guo's avatar
programor_guo 已提交
291 292 293
  int64 addTime = 1;
  string addSource = 2;
  string addWording = 3;
W
wenxu12345 已提交
294 295
}

W
wenxu12345 已提交
296
message FromToUserID{
programor_guo's avatar
programor_guo 已提交
297 298
  string fromUserID = 1;
  string toUserID = 2;
W
wenxu12345 已提交
299 300 301
}

//FromUserID apply to add ToUserID
W
wenxu12345 已提交
302
message FriendApplicationAddedTips{
programor_guo's avatar
programor_guo 已提交
303
  FromToUserID fromToUserID = 1;
W
wenxu12345 已提交
304
}
W
pb  
wenxu12345 已提交
305

W
wenxu12345 已提交
306
//FromUserID accept or reject ToUserID
W
wenxu12345 已提交
307
message FriendApplicationProcessedTips{
programor_guo's avatar
programor_guo 已提交
308
  FromToUserID fromToUserID = 1;
W
pb  
wenxu12345 已提交
309 310
}

W
wenxu12345 已提交
311
// FromUserID  Added a friend ToUserID
W
wenxu12345 已提交
312
message FriendAddedTips{
programor_guo's avatar
programor_guo 已提交
313 314 315
  FriendInfo friend = 1;
  int64 operationTime = 2;
  PublicUserInfo     opUser = 3;  //who do this
W
wenxu12345 已提交
316

W
wenxu12345 已提交
317
}
W
pb  
wenxu12345 已提交
318

W
wenxu12345 已提交
319
// FromUserID  deleted a friend ToUserID
W
wenxu12345 已提交
320
message FriendDeletedTips{
programor_guo's avatar
programor_guo 已提交
321
  FromToUserID fromToUserID = 1;
W
wenxu12345 已提交
322
}
W
pb  
wenxu12345 已提交
323

W
wenxu12345 已提交
324

W
wenxu12345 已提交
325 326

message BlackAddedTips{
programor_guo's avatar
programor_guo 已提交
327
  FromToUserID fromToUserID = 1;
W
wenxu12345 已提交
328
}
W
wenxu12345 已提交
329

W
wenxu12345 已提交
330
message BlackDeletedTips{
programor_guo's avatar
programor_guo 已提交
331
  FromToUserID fromToUserID = 1;
W
wenxu12345 已提交
332 333 334
}

message FriendInfoChangedTips{
programor_guo's avatar
programor_guo 已提交
335
  FromToUserID fromToUserID = 1;
W
wenxu12345 已提交
336 337 338
}
//////////////////////user/////////////////////
message SelfInfoUpdatedTips{
programor_guo's avatar
programor_guo 已提交
339
  string userID = 1;
W
wenxu12345 已提交
340
}