This repository has been archived by the owner on Oct 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathGlobal.proto
414 lines (360 loc) · 7.74 KB
/
Global.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
syntax = "proto3";
package proto;
option java_package = "net.iGap.proto";
option java_outer_classname = "ProtoGlobal";
enum Gender {
UNKNOWN = 0;
MALE = 1;
FEMALE = 2;
}
enum Device {
UNKNOWN_DEVICE = 0;
PC = 1;
TABLET = 2;
MOBILE = 3;
}
enum Platform {
UNKNOWN_PLATFORM = 0;
ANDROID = 1;
IOS = 2;
MAC_OS = 3;
WINDOWS = 4;
LINUX = 5;
BLACK_BERRY = 6;
}
enum Language {
EN_US = 0;
FA_IR = 1;
}
enum RoomMessageType {
TEXT = 0;
IMAGE = 1;
IMAGE_TEXT = 2;
VIDEO = 3;
VIDEO_TEXT = 4;
AUDIO = 5;
AUDIO_TEXT = 6;
VOICE = 7;
GIF = 8;
GIF_TEXT = 14;
FILE = 9;
FILE_TEXT = 10;
LOCATION = 11;
LOG = 12;
CONTACT = 13;
WALLET = 15;
}
enum RoomMessageStatus {
FAILED = 0;
SENDING = 1;
SENT = 2;
DELIVERED = 3;
SEEN = 4;
LISTENED = 5;
}
enum RoomMessageReaction {
THUMBS_UP = 0;
THUMBS_DOWN = 1;
}
message RoomMessageLocation {
double lat = 1;
double lon = 2;
}
message RoomMessageLog {
enum Type {
USER_JOINED = 0;
USER_DELETED = 1;
ROOM_CREATED = 2;
MEMBER_ADDED = 3;
MEMBER_KICKED = 4;
MEMBER_LEFT = 5;
ROOM_CONVERTED_TO_PUBLIC = 6;
ROOM_CONVERTED_TO_PRIVATE = 7;
MEMBER_JOINED_BY_INVITE_LINK = 8;
ROOM_DELETED = 9;
MISSED_VOICE_CALL = 10;
MISSED_VIDEO_CALL = 11;
MISSED_SCREEN_SHARE = 12;
MISSED_SECRET_CHAT = 13;
PINNED_MESSAGE = 14;
}
Type type = 1;
enum ExtraType {
NO_EXTRA = 0;
TARGET_USER = 1;
}
ExtraType extra_type = 2;
message TargetUser {
uint64 id = 1;
}
TargetUser target_user = 3;
}
message RoomMessageContact {
string first_name = 1;
string last_name = 2;
string nickname = 3;
repeated string phone = 4;
repeated string email = 5;
}
message RoomMessageWallet {
enum Type {
MONEY_TRANSFER = 0;
}
Type type = 1;
message MoneyTransfer {
uint64 from_user_id = 1;
uint64 to_user_id = 2;
uint64 amount = 3;
int64 trace_number = 4;
int64 invoice_number = 5;
uint32 pay_time = 6;
string description = 7;
}
MoneyTransfer money_transfer = 2;
}
message RoomMessageForwardFrom {
uint64 room_id = 1;
uint64 message_id = 2;
}
message RegisteredUser {
uint64 id = 1;
string username = 2;
uint64 phone = 3;
string first_name = 4;
string last_name = 5;
string display_name = 6;
string initials = 7;
string color = 8;
enum Status {
LONG_TIME_AGO = 0;
LAST_MONTH = 1;
LAST_WEEK = 2;
ONLINE = 3;
EXACTLY = 4;
RECENTLY = 5;
SUPPORT = 6;
SERVICE_NOTIFICATIONS = 7;
}
Status status = 9;
uint32 last_seen = 10;
uint32 avatar_count = 11;
Avatar avatar = 12;
bool mutual = 13;
bool deleted = 14;
string cache_id = 15;
string bio = 16;
bool verified = 17;
bool bot = 18;
}
enum ClientAction {
CANCEL = 0;
TYPING = 1;
SENDING_IMAGE = 2;
CAPTURING_IMAGE = 3;
SENDING_VIDEO = 4;
CAPTURING_VIDEO = 5;
SENDING_AUDIO = 6;
RECORDING_VOICE = 7;
SENDING_VOICE = 8;
SENDING_DOCUMENT = 9;
SENDING_GIF = 10;
SENDING_FILE = 11;
SENDING_LOCATION = 12;
CHOOSING_CONTACT = 13;
PAINTING = 14;
}
message Avatar {
uint64 id = 1;
File file = 2;
}
message RoomMessage {
uint64 message_id = 1;
uint64 message_version = 2;
RoomMessageStatus status = 3;
uint64 status_version = 4;
RoomMessageType message_type = 5;
string message = 6;
File attachment = 7;
message Author {
string hash = 1;
message User {
uint64 user_id = 1;
string cache_id = 2;
}
User user = 2;
message Room {
uint64 room_id = 1;
}
Room room = 3;
}
Author author = 8;
RoomMessageLocation location = 9;
RoomMessageLog log = 10;
RoomMessageContact contact = 11;
RoomMessageWallet wallet = 22;
bool edited = 12;
uint32 create_time = 13;
uint32 update_time = 14;
bool deleted = 15;
RoomMessage forward_from = 16;
RoomMessage reply_to = 17;
uint64 previous_message_id = 18;
uint64 random_id = 21;
uint32 additional_type = 23;
string additional_data = 24;
enum ExtraType {
NO_EXTRA = 0;
CHANNEL_EXTRA = 1;
}
ExtraType extra_type = 19;
message ChannelExtra {
string signature = 1;
string views_label = 2;
string thumbs_up_label = 3;
string thumbs_down_label = 4;
}
ChannelExtra channel_extra = 20;
}
message RoomDraft {
string message = 1;
uint64 reply_to = 2;
}
enum RoomMute {
UNMUTE = 0;
MUTE = 1;
}
message Room {
uint64 id = 1;
enum Type {
CHAT = 0;
GROUP = 1;
CHANNEL = 2;
}
Type type = 2;
string title = 3;
string initials = 4;
string color = 5;
uint32 unread_count = 6;
RoomMessage last_message = 7;
bool read_only = 8;
bool is_participant = 9;
RoomDraft draft = 10;
RoomMessage first_unread_message = 14;
RoomMute room_mute = 15;
uint64 pin_id = 16;
RoomMessage pinned_message = 17;
uint32 priority = 18;
ChatRoom chat_room_extra = 11;
GroupRoom group_room_extra = 12;
ChannelRoom channel_room_extra = 13;
}
message ChatRoom {
RegisteredUser peer = 1;
}
message GroupRoom {
enum Type {
PRIVATE_ROOM = 0;
PUBLIC_ROOM = 1;
}
Type type = 1;
enum Role {
MEMBER = 0;
MODERATOR = 1;
ADMIN = 2;
OWNER = 3;
}
Role role = 2;
uint32 participants_count = 3;
string participants_count_label = 4;
uint32 participants_count_limit = 5;
string participants_count_limit_label = 6;
string description = 7;
uint32 avatar_count = 8;
Avatar avatar = 9;
message PrivateExtra {
string invite_link = 1;
string invite_token = 2;
}
PrivateExtra private_extra = 10;
message PublicExtra {
string username = 1;
}
PublicExtra public_extra = 11;
}
message ChannelRoom {
enum Type {
PRIVATE_ROOM = 0;
PUBLIC_ROOM = 1;
}
Type type = 1;
enum Role {
MEMBER = 0;
MODERATOR = 1;
ADMIN = 2;
OWNER = 3;
}
Role role = 2;
uint32 participants_count = 3;
string participants_count_label = 4;
string description = 5;
uint32 avatar_count = 6;
Avatar avatar = 7;
message PrivateExtra {
string invite_link = 1;
string invite_token = 2;
}
PrivateExtra private_extra = 8;
message PublicExtra {
string username = 1;
}
PublicExtra public_extra = 9;
bool signature = 10;
uint64 seen_id = 11;
bool verified = 12;
bool reaction_status = 13;
}
message Thumbnail {
int64 size = 1;
int32 width = 2;
int32 height = 3;
string cache_id = 4;
string name = 5;
string mime = 6;
}
message File {
string token = 1;
string name = 2;
int64 size = 3;
Thumbnail large_thumbnail = 4;
Thumbnail small_thumbnail = 5;
Thumbnail waveform_thumbnail = 6;
int32 width = 7;
int32 height = 8;
double duration = 9;
string cache_id = 10;
string mime = 11;
string public_url = 12;
}
enum PrivacyType {
USER_STATUS = 0;
AVATAR = 1;
GROUP_INVITE = 2;
CHANNEL_INVITE = 3;
VOICE_CALLING = 4;
VIDEO_CALLING = 5;
SCREEN_SHARING = 6;
SECRET_CHAT = 7;
}
enum PrivacyLevel {
ALLOW_ALL = 0;
DENY_ALL = 1;
ALLOW_CONTACTS = 2;
}
message Wallpaper {
File file = 1;
string color = 2;
}
message Pagination {
uint32 offset = 1;
uint32 limit = 2;
}