openbird 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of openbird might be problematic. Click here for more details.

@@ -0,0 +1,949 @@
1
+ syntax = "proto3";
2
+
3
+ message Frame {
4
+ uint64 seqid = 1;
5
+ uint64 logid = 2;
6
+ int32 service = 3;
7
+ int32 method = 4;
8
+ repeated ExtendedEntry headers = 5;
9
+ string payloadEncoding = 6;
10
+ string payloadType = 7;
11
+ bytes payload = 8;
12
+ }
13
+
14
+ message Packet {
15
+ string sid = 1;
16
+ PayloadType payloadType = 2;
17
+ int32 cmd = 3;
18
+ uint32 status = 4;
19
+ bytes payload = 5;
20
+ string cid = 6;
21
+ PipeEntity pipeEntity = 7;
22
+ repeated VersionPayload versionPayloads = 8;
23
+ repeated PipeEntity pipeEntities = 9;
24
+ uint32 waitRetryInterval = 10;
25
+ int32 command = 11;
26
+ uint64 cursor = 12;
27
+ }
28
+
29
+ message PushMessagesRequest {
30
+ map<string, entities.Message> messages = 1;
31
+ map<string, bool> participatedMessageIds = 3;
32
+ map<string, bool> forcePush = 8;
33
+ map<string, bool> messagesAtMe = 9;
34
+ }
35
+
36
+ message PutMessageRequest {
37
+ Type type = 1;
38
+ Content content = 2;
39
+ string chatId = 3;
40
+ string rootId = 4;
41
+ string parentId = 5;
42
+ string cid = 6;
43
+ bool isNotified = 7;
44
+ bool sendToChat = 8;
45
+ int32 version = 9;
46
+ bool isThreadGroupTopic = 10;
47
+ bool isAnonymous = 11;
48
+ repeated string leftStaticResourceKeys = 101;
49
+ bytes thriftMessage = 102;
50
+ }
51
+
52
+
53
+ message PutChatRequest {
54
+ Type type = 1;
55
+ repeated string userIds = 2;
56
+ string groupName = 3;
57
+ string groupDesc = 4;
58
+ bool isPublic = 5;
59
+ repeated string chatterIds = 6;
60
+ string organizationId = 7;
61
+ string fromChatId = 8;
62
+ repeated string initMessageIds = 9;
63
+ string iconKey = 10;
64
+ map<string, DocPermType> docPerms = 11;
65
+ bool isCrossTenant = 12;
66
+ bool isPublicV2 = 13;
67
+ map<string, DocPair> docPerms2 = 15;
68
+ string cid = 16;
69
+
70
+ enum DocPermType {
71
+ UNKNOWN = 0;
72
+ READ = 1;
73
+ EDIT = 2;
74
+ }
75
+
76
+ message DocPair {
77
+ map<string, DocPermType> perms = 1;
78
+ }
79
+ }
80
+
81
+ message PutChatResponse {
82
+ Chat chat = 1;
83
+ FeedCard feedCard = 2;
84
+ }
85
+
86
+ message UniversalSearchRequest {
87
+ SearchCommonRequestHeader header = 1;
88
+ }
89
+
90
+
91
+
92
+ message UniversalSearchResponse {
93
+ SearchCommonResponseHeader header = 1;
94
+ repeated SearchResult results = 2;
95
+ SearchExtraFields extraFields = 3;
96
+ repeated FailedEntityInfo failedEntityInfos = 5;
97
+
98
+
99
+ message SearchResult {
100
+ string id = 1;
101
+ SearchEntityType type = 2;
102
+ string titleHighlighted = 3;
103
+ string summaryHighlighted = 4;
104
+ string extrasHighlighted = 5;
105
+ string avatarKey = 6;
106
+ string extraInfoSeparator = 10;
107
+ }
108
+
109
+ enum SearchEntityType {
110
+ UNKNOWN = 0;
111
+ USER = 1;
112
+ BOT = 2;
113
+ GROUP_CHAT = 3;
114
+ CRYPTO_P2P_CHAT = 4;
115
+ MESSAGE = 5;
116
+ DOC = 7;
117
+ WIKI = 8;
118
+ APP = 9;
119
+ ONCALL = 10;
120
+ THREAD = 11;
121
+ QA_CARD = 12;
122
+ URL = 13;
123
+ DEPARTMENT = 14;
124
+ PANO = 15;
125
+ SLASH_COMMAND = 16;
126
+ SECTION = 17;
127
+ RESOURCE = 18;
128
+ CUSTOMIZATION = 19;
129
+ FACILITY = 20;
130
+ MAIL_CONTACT = 21;
131
+ CHAMELEON = 22;
132
+ CALENDAR_EVENT = 23;
133
+ }
134
+
135
+
136
+ message SearchCommonResponseHeader {
137
+ string searchSession = 1;
138
+ int32 sessionSeqId = 2;
139
+ int32 total = 3;
140
+ bool hasMore = 4;
141
+ string paginationToken = 5;
142
+ InvokeAbnormalNotice invokeAbnormalNotice = 6;
143
+ ColdAndHotStorageInfo storageInfo = 7;
144
+
145
+ enum InvokeAbnormalNotice {
146
+ INVOKE_NORMAL = 0;
147
+ REQUEST_CANCELED = 1;
148
+ VERSION_SWITCH = 2;
149
+ QUERY_LENGTH_EXCEEDED = 3;
150
+ }
151
+
152
+ message ColdAndHotStorageInfo {
153
+ bool isNeedColdData = 1;
154
+ int32 timeSize = 2;
155
+ TimeUnit timeUnit = 3;
156
+ string timeText = 4;
157
+ HasMoreInfo hasMoreInfo = 5;
158
+
159
+ enum TimeUnit {
160
+ TimeUNKNOWN = 0;
161
+ DAY = 1;
162
+ WEEK = 2;
163
+ MONTH = 3;
164
+ YEAR = 4;
165
+ }
166
+ enum HasMoreInfo {
167
+ UNKNOWN = 0;
168
+ HOT_HAS_MORE = 1;
169
+ HOT_HAS_NO_MORE = 2;
170
+ COLD_HAS_MORE = 3;
171
+ COLD_HAS_NO_MORE = 4;
172
+ }
173
+ }
174
+ }
175
+
176
+ message SearchExtraFields {
177
+ bytes chatterPermissionResponse = 1;
178
+ }
179
+
180
+ message FailedEntityInfo {
181
+ SearchEntityType entityType = 1;
182
+ bool isNeedLocalFallback = 2;
183
+ string localPaginationToken = 3;
184
+
185
+ enum SearchEntityType {
186
+ UNKNOWN = 0;
187
+ USER = 1;
188
+ BOT = 2;
189
+ GROUP_CHAT = 3;
190
+ CRYPTO_P2P_CHAT = 4;
191
+ MESSAGE = 5;
192
+ DOC = 7;
193
+ WIKI = 8;
194
+ APP = 9;
195
+ ONCALL = 10;
196
+ THREAD = 11;
197
+ QA_CARD = 12;
198
+ URL = 13;
199
+ DEPARTMENT = 14;
200
+ PANO = 15;
201
+ SLASH_COMMAND = 16;
202
+ SECTION = 17;
203
+ RESOURCE = 18;
204
+ CUSTOMIZATION = 19;
205
+ FACILITY = 20;
206
+ MAIL_CONTACT = 21;
207
+ CHAMELEON = 22;
208
+ CALENDAR_EVENT = 23;
209
+ }
210
+ }
211
+ }
212
+
213
+ message SearchCommonRequestHeader {
214
+ string searchSession = 1;
215
+ int32 sessionSeqId = 2;
216
+ string query = 3;
217
+ string paginationToken = 4;
218
+ BaseEntity.SearchContext searchContext = 5;
219
+ string locale = 6;
220
+ string impressionId = 7;
221
+ SearchExtraParam extraParam = 8;
222
+ Layout titleLayout = 9;
223
+ Layout summaryLayout = 10;
224
+ int32 pageSize = 11;
225
+ Layout sectionSummaryLayout = 13;
226
+ message Layout {
227
+ int32 line = 1;
228
+ int32 width = 2;
229
+ }
230
+ }
231
+ message SearchExtraParam {
232
+ bytes chatterPermissionRequest = 1;
233
+ int32 queryInputState = 2;
234
+ }
235
+ message BaseEntity {
236
+ message SearchContext {
237
+ string tagName = 1;
238
+ repeated EntityItem entityItems = 2;
239
+ CommonFilter commonFilter = 3;
240
+ string sourceKey = 5;
241
+ }
242
+ }
243
+
244
+ message CommonFilter {
245
+ bool includeOuterTenant = 1;
246
+ string chatId = 2;
247
+ }
248
+ message UserFilter {
249
+ message FieldValues {
250
+ repeated string values = 1;
251
+ }
252
+ bool isResigned = 1;
253
+ bool haveChatter = 2;
254
+ map<string, FieldValues> customFields = 3;
255
+ bool exclude = 4;
256
+ }
257
+ message GroupChatFilter {
258
+ repeated SearchType searchTypes = 1;
259
+ repeated string chatMemberIds = 2;
260
+ repeated string excludedChatIds = 3;
261
+ bool searchCrypto = 4;
262
+ bool addableAsUser = 5;
263
+ }
264
+
265
+ enum SearchType {
266
+ TYPE_UNSPECIFIED = 0;
267
+ SEARCH_TYPE_1 = 1;
268
+ SEARCH_TYPE_2 = 2;
269
+ }
270
+ message EntityItem {
271
+ SearchEntityType type = 1;
272
+ EntityFilter filter = 2;
273
+ repeated string boostChatIds = 4;
274
+ string localPaginationToken = 5;
275
+
276
+ message EntityFilter {
277
+ oneof filter {
278
+ UserFilter userFilter = 1;
279
+ GroupChatFilter groupChatFilter = 2;
280
+ }
281
+ }
282
+ enum SearchEntityType {
283
+ UNKNOWN = 0;
284
+ USER = 1;
285
+ BOT = 2;
286
+ GROUP_CHAT = 3;
287
+ CRYPTO_P2P_CHAT = 4;
288
+ MESSAGE = 5;
289
+ DOC = 7;
290
+ WIKI = 8;
291
+ APP = 9;
292
+ ONCALL = 10;
293
+ THREAD = 11;
294
+ QA_CARD = 12;
295
+ URL = 13;
296
+ DEPARTMENT = 14;
297
+ PANO = 15;
298
+ SLASH_COMMAND = 16;
299
+ SECTION = 17;
300
+ RESOURCE = 18;
301
+ CUSTOMIZATION = 19;
302
+ FACILITY = 20;
303
+ MAIL_CONTACT = 21;
304
+ CHAMELEON = 22;
305
+ CALENDAR_EVENT = 23;
306
+ }
307
+ }
308
+
309
+ message Content {
310
+ string text = 1;
311
+ string imageKey = 2;
312
+ bool isOriginSource = 31;
313
+ string title = 3;
314
+ repeated string attachments = 4;
315
+ bool isNotified = 5;
316
+ // Note: field 6 is overloaded - used as fileKey for file messages, richText for POST messages
317
+ // string fileKey = 6; // Moved to make room for richText
318
+ RichText richText = 6; // Changed from 14 to 6 to match actual POST message format
319
+ string fileKey = 14; // Swapped with richText
320
+ string audioKey = 7;
321
+ int32 audioDuration = 8;
322
+ string chatId = 9;
323
+ string cryptoToken = 10;
324
+ string fileName = 11;
325
+ string fileMime = 12;
326
+ int64 fileSize = 13;
327
+ FileTransMode fileTransMode = 28;
328
+ string senderDeviceId = 29;
329
+ int32 duration = 15;
330
+ int32 attendeesCount = 17;
331
+ bool isGroupAnnouncement = 18;
332
+ string stickerSetId = 24;
333
+ string stickerId = 25;
334
+ string shareUserId = 27;
335
+
336
+ enum FileTransMode {
337
+ UNKNOWN = 0;
338
+ LAN_TRANS = 1;
339
+ }
340
+ }
341
+
342
+ // 图片消息内容
343
+ message ImageContent {
344
+ ImageSet image = 1;
345
+ ImageSetV2 imageV2 = 2;
346
+ bool isOriginSource = 3;
347
+ uint64 originSize = 4;
348
+ repeated string riskObjectKeys = 5;
349
+ repeated string cleanResourceKeys = 6;
350
+ }
351
+
352
+ // 图片集合 (旧版本)
353
+ message ImageSet {
354
+ string key = 1 [deprecated = true];
355
+ Image origin = 2;
356
+ Image thumbnail = 3;
357
+ string imageKey = 4 [deprecated = true];
358
+ Image middle = 5;
359
+ Image thumbnailWebp = 6;
360
+ Image middleWebp = 7;
361
+ Image middleMp4 = 8;
362
+ Image cover = 9;
363
+ }
364
+
365
+ // 图片集合 V2 (新版本)
366
+ message ImageSetV2 {
367
+ string imageKey = 1;
368
+ string fsUnit = 2;
369
+ Crypto crypto = 3;
370
+ repeated ImageInfo images = 4;
371
+ }
372
+
373
+ // 图片信息 (V2)
374
+ message ImageInfo {
375
+ ImageType type = 1;
376
+ ImageAttribute attribute = 2;
377
+ string key = 3;
378
+
379
+ enum ImageType {
380
+ UNKNOWN = 0;
381
+ ORIGIN = 1;
382
+ THUMBNAIL = 2;
383
+ MIDDLE = 3;
384
+ THUMBNAIL_WEBP = 4;
385
+ MIDDLE_WEBP = 5;
386
+ MIDDLE_MP4 = 6;
387
+ COVER = 7;
388
+ }
389
+ }
390
+
391
+ message ImageAttribute {
392
+ int32 width = 1;
393
+ int32 height = 2;
394
+ int32 size = 3;
395
+ }
396
+
397
+ // 单个图片
398
+ message Image {
399
+ string key = 1;
400
+ repeated string urls = 2 [deprecated = true];
401
+ int32 width = 3;
402
+ int32 height = 4;
403
+ string secureKey = 5;
404
+ repeated string secureUrls = 6 [deprecated = true];
405
+ int32 secureWidth = 7;
406
+ int32 secureHeight = 8;
407
+ Crypto crypto = 9;
408
+ int32 size = 10;
409
+ string fsUnit = 11;
410
+ map<string, string> params = 12;
411
+ string etag = 13;
412
+ }
413
+
414
+ // 加密信息
415
+ message Crypto {
416
+ CryptoType type = 1;
417
+ Cipher cipher = 2;
418
+
419
+ enum CryptoType {
420
+ CRYPTO_UNKNOWN = 0;
421
+ AES_256_GCM = 1;
422
+ AES_CTR = 2;
423
+ CRYPTO_SDK_UNIFIED = 3;
424
+ CRYPTO_SDK_DOWNGRADE = 4;
425
+ CRYPTO_SDK_THIRDPARTY = 5;
426
+ SM4_128 = 6;
427
+ }
428
+ }
429
+
430
+ // 加密密钥信息
431
+ message Cipher {
432
+ bytes secret = 1;
433
+ bytes nonce = 2;
434
+ bytes additionalData = 3;
435
+ }
436
+ message entities {
437
+ message Message {
438
+ string id = 1;
439
+ Type type = 2;
440
+ string fromId = 3;
441
+ int64 createTime = 4;
442
+ bytes content = 5;
443
+ Status status = 6;
444
+ FromType fromType = 7;
445
+ string rootId = 8;
446
+ string parentId = 9;
447
+ string chatId = 10;
448
+ int64 lastModifyTime = 11;
449
+ string cid = 12;
450
+ int32 position = 13;
451
+ int64 updateTime = 14;
452
+ bool isNotified = 15;
453
+ string replyCount = 16;
454
+ string parentSourceMessageId = 17;
455
+ string rootSourceMessageId = 18;
456
+ bool isDing = 19;
457
+ string threadId = 20;
458
+ bool sendToChat = 21;
459
+ bool isTruncated = 22;
460
+ bool isRemoved = 23;
461
+ string channelId = 24;
462
+ int32 threadPosition = 28;
463
+ int64 removerId = 29;
464
+ string translateLanguage = 30;
465
+ RemoverType removerType = 31;
466
+ int32 noBadgedCount = 33;
467
+ bool isBadged = 34;
468
+ int32 badgeCount = 35;
469
+ int32 threadBadgeCount = 36;
470
+ int32 threadReplyCount = 37;
471
+ repeated string atOutChatterIds = 38;
472
+ string messageLanguage = 39;
473
+ bool isNoTraceRemoved = 41;
474
+ bool isAutoTranslatedByReceiver = 42;
475
+ MessageSensitivity sensitivity = 43;
476
+ bool isVisibleV2 = 44;
477
+ ChatType chatType = 46;
478
+ string originalSenderId = 47;
479
+ bool isStaticResourceMessageDeleted = 48;
480
+ int64 messagePipeVersion = 52;
481
+ bool isBatchCopyMessages = 53;
482
+ bool isSpecialFocus = 56;
483
+ bool isIncludeDocUrl = 58;
484
+ int64 cipherId = 59;
485
+ enum Type {
486
+ UNKNOWN = 0;
487
+ POST = 2;
488
+ FILE = 3;
489
+ TEXT = 4;
490
+ IMAGE = 5;
491
+ SYSTEM = 6;
492
+ AUDIO = 7;
493
+ EMAIL = 8;
494
+ SHARE_GROUP_CHAT = 9;
495
+ STICKER = 10;
496
+ MERGE_FORWARD = 11;
497
+ CALENDAR = 12;
498
+ CLOUD_FILE = 13;
499
+ CARD = 14;
500
+ MEDIA = 15;
501
+ SHARE_CALENDAR_EVENT = 16;
502
+ HONGBAO = 17;
503
+ GENERAL_CALENDAR = 18;
504
+ VIDEO_CHAT = 19;
505
+ LOCATION = 20;
506
+ COMMERCIALIZED_HONGBAO = 22;
507
+ SHARE_USER_CARD = 23;
508
+ TODO = 24;
509
+ FOLDER = 25;
510
+ }
511
+ }
512
+
513
+
514
+ enum FromType {
515
+ UNKNOWN_FROMTYPE = 0;
516
+ USER = 1;
517
+ BOT = 2;
518
+ }
519
+
520
+ enum Status {
521
+ UNKNOWN_STATUS = 0;
522
+ NORMAL = 1;
523
+ DELETED = 2;
524
+ MODIFIED = 3;
525
+ }
526
+
527
+ enum RemoverType {
528
+ UNKNOWN_REMOVERTYPE = 0;
529
+ GROUPOWNER = 1;
530
+ SYSADMIN = 2;
531
+ GROUPADMIN = 3;
532
+ }
533
+
534
+ enum MessageSensitivity {
535
+ UNKNOWN_SENSITIVITY = 0;
536
+ SAFE = 1;
537
+ DANGEROUS = 2;
538
+ }
539
+
540
+ enum ChatType {
541
+ UNKNOWN_CHAT_TYPE = 0;
542
+ P2P = 1;
543
+ GROUP = 2;
544
+ TOPIC_GROUP = 3;
545
+ }
546
+
547
+ }
548
+
549
+ message TextContent {
550
+ string text = 1;
551
+ RichText richText = 3;
552
+ }
553
+
554
+ message RichText {
555
+ repeated string elementIds = 1;
556
+ string innerText = 2;
557
+ RichTextElements elements = 3;
558
+ repeated string imageIds = 5;
559
+ repeated string atIds = 6;
560
+ repeated string anchorIds = 7;
561
+ repeated string i18nIds = 8;
562
+ repeated string mediaIds = 9;
563
+ repeated string docsIds = 10;
564
+ repeated string interactiveIds = 11;
565
+ repeated string mentionIds = 12;
566
+ int32 version = 13;
567
+ }
568
+
569
+
570
+ message RichTextElements {
571
+ map<string, RichTextElement> dictionary = 1;
572
+ map<string, RichTextElementStyleRefs> styleRefs = 2;
573
+ repeated RichTextStyle styles = 3;
574
+
575
+ message RichTextStyle {
576
+ string name = 1;
577
+ string value = 2;
578
+ }
579
+
580
+ message RichTextElementStyleRefs {
581
+ repeated int32 styleIds = 1 [packed = false];
582
+ }
583
+ }
584
+
585
+
586
+ message RichTextElement {
587
+ Tag tag = 1;
588
+ map<string, string> style = 2;
589
+ bytes property = 3;
590
+ repeated string childIds = 4;
591
+ repeated string styleKeys = 5;
592
+ enum Tag {
593
+ UNKNOWN_TAG = 0;
594
+ TEXT = 1;
595
+ IMG = 2;
596
+ P = 3;
597
+ FIGURE = 4;
598
+ AT = 5;
599
+ A = 6;
600
+ B = 7;
601
+ I = 8;
602
+ U = 9;
603
+ EMOTION = 10;
604
+ BUTTON = 11;
605
+ SELECT = 12;
606
+ PROGRESS_SELECT_OPTION = 13;
607
+ DIV = 14;
608
+ TEXTABLE_AREA = 15;
609
+ TIME = 16;
610
+ LINK = 17;
611
+ MEDIA = 18;
612
+ SELECTMENU = 19;
613
+ OVERFLOWMENU = 20;
614
+ DATEPICKER = 21;
615
+ DOCS = 22;
616
+ H1 = 23;
617
+ H2 = 24;
618
+ H3 = 25;
619
+ UL = 26;
620
+ OL = 27;
621
+ LI = 28;
622
+ QUOTE = 29;
623
+ CODE = 30;
624
+ CODE_BLOCK = 31;
625
+ HR = 32;
626
+ TIMEPICKER = 33;
627
+ DATETIMEPICKER = 34;
628
+ REACTION = 35;
629
+ MENTION = 36;
630
+ }
631
+ }
632
+
633
+
634
+ message TextProperty {
635
+ string content = 1;
636
+ string i18nKey = 2;
637
+ int32 numberOfLines = 3;
638
+ }
639
+ message ExtendedEntry {
640
+ string key = 1;
641
+ string value = 2;
642
+ }
643
+
644
+
645
+ enum PayloadType {
646
+ TYPE_UNKNOWN = 0;
647
+ PB2 = 1;
648
+ JSON = 2;
649
+ }
650
+
651
+ message PipeEntity {
652
+ string type = 1;
653
+ int64 id = 3;
654
+ }
655
+
656
+ message VersionPayload {
657
+ VersionRange versionRange = 1;
658
+ bytes payload = 2;
659
+ }
660
+
661
+ message VersionRange {
662
+ string start = 1;
663
+ string end = 2;
664
+ }
665
+
666
+ enum Type {
667
+ UNKNOWN = 0;
668
+ POST = 2;
669
+ FILE = 3;
670
+ TEXT = 4;
671
+ IMAGE = 5;
672
+ SYSTEM = 6;
673
+ AUDIO = 7;
674
+ EMAIL = 8;
675
+ SHARE_GROUP_CHAT = 9;
676
+ STICKER = 10;
677
+ MERGE_FORWARD = 11;
678
+ CALENDAR = 12;
679
+ CLOUD_FILE = 13;
680
+ CARD = 14;
681
+ MEDIA = 15;
682
+ SHARE_CALENDAR_EVENT = 16;
683
+ HONGBAO = 17;
684
+ GENERAL_CALENDAR = 18;
685
+ VIDEO_CHAT = 19;
686
+ LOCATION = 20;
687
+ COMMERCIALIZED_HONGBAO = 22;
688
+ SHARE_USER_CARD = 23;
689
+ TODO = 24;
690
+ FOLDER = 25;
691
+ }
692
+
693
+ message Chat {
694
+ string id = 1;
695
+ Type type = 2;
696
+ string lastMessageId = 3;
697
+ string name = 4;
698
+ string ownerId = 6;
699
+ int32 newMessageCount = 7;
700
+ Status status = 8;
701
+ int64 updateTime = 9;
702
+ string key = 10;
703
+ string description = 11;
704
+ int32 memberCount = 12;
705
+ bool isDepartment = 13;
706
+ bool isPublic = 14;
707
+ int32 lastMessagePosition = 15;
708
+ int32 userCount = 16;
709
+ string namePinyin = 17;
710
+ int64 createTime = 18;
711
+ bool isCustomerService = 19;
712
+ Role role = 20;
713
+ bool isCustomIcon = 21;
714
+ int32 noBadgedNewMessageCount = 22;
715
+ bool offEditGroupChatInfo = 23;
716
+ Announcement announcement = 24;
717
+ string tenantId = 25;
718
+ int64 updateTimeMs = 26;
719
+ bool isRemind = 27;
720
+ bool isDissolved = 30;
721
+ bool isMeeting = 31;
722
+ string lastVisibleMessageId = 32;
723
+ string lastThreadId = 33;
724
+ int32 newThreadCount = 34;
725
+ int32 lastThreadPosition = 35;
726
+ bool isCrypto = 36;
727
+ int32 noBadgedNewThreadCount = 37;
728
+ int32 threadStartPosition = 38;
729
+ ChatMode chatMode = 39;
730
+ bool isCrossTenant = 41;
731
+ bool isTenant = 42;
732
+ SupportView supportView = 43;
733
+ int64 joinTimeMs = 44;
734
+ int64 oncallId = 45;
735
+ int32 lastVisibleMessagePosition = 46;
736
+ int32 lastVisibleMessageNoBadgedCount = 47;
737
+ int32 readPosition = 48;
738
+ int32 readPositionBadgeCount = 49;
739
+ int32 lastMessagePositionBadgeCount = 50;
740
+ bool enableWatermark = 51;
741
+ string sidebarId = 53;
742
+ string namePy = 100;
743
+ map<string, string> i18nNames = 101 [deprecated = true];
744
+ I18nInf i18nInf = 102;
745
+ int32 readThreadPosition = 103;
746
+ int32 readThreadPositionBadgeCount = 104;
747
+ int32 lastThreadPositionBadgeCount = 105;
748
+ int32 lastVisibleThreadPosition = 106;
749
+ string lastVisibleThreadId = 107;
750
+ bool isPublicV2 = 109;
751
+ bool allowPost = 111;
752
+ int64 burnedTime = 112;
753
+ int32 putChatterApplyCount = 113;
754
+ bool showBanner = 114;
755
+ bool isLargeGroup = 115;
756
+ int32 firstChatMessagePosition = 116;
757
+ repeated int32 tags = 117 [packed = false];
758
+ map<string, string> extra = 118;
759
+ bool isSamePageMeeting = 119;
760
+ int64 myThreadsReadTimestamp = 120;
761
+ int64 myThreadsLastTimestamp = 121;
762
+
763
+ enum Type {
764
+ UNKNOWN = 0;
765
+ P2P = 1;
766
+ GROUP = 2;
767
+ TOPIC_GROUP = 3;
768
+ }
769
+
770
+ enum Status {
771
+ NORMAL = 0;
772
+ ARCHIVE = 1;
773
+ DELETED = 2;
774
+ }
775
+
776
+ enum ChatMode {
777
+ UNKNOWN_CHAT_MODE = 0;
778
+ DEFAULT = 1;
779
+ THREAD = 2;
780
+ THREAD_V2 = 3;
781
+ }
782
+
783
+ enum SupportView {
784
+ VIEW_UNKNOWN = 0;
785
+ VIEW_P2PGROUP = 1;
786
+ VIEW_MEETING = 2;
787
+ VIEW_THREAD = 3;
788
+ VIEW_CRYPTO = 4;
789
+ }
790
+
791
+ enum Role {
792
+ IGNORE = 0;
793
+ MEMBER = 1;
794
+ VISITOR = 2;
795
+ THREAD_FOLLOWER = 3;
796
+ }
797
+
798
+ message Announcement {
799
+ string content = 1;
800
+ int64 updateTime = 2;
801
+ string lastEditorId = 3;
802
+ string docUrl = 4;
803
+ bool enableOpendoc = 5;
804
+ }
805
+
806
+ message I18nInf {
807
+ map<string, string> i18nNames = 1;
808
+ }
809
+ }
810
+
811
+
812
+ message FeedCard {
813
+ string id = 1;
814
+ Type type = 2;
815
+ int64 updateTime = 3;
816
+ bool isDelayed = 4;
817
+ int64 parentCardId = 5;
818
+ int64 rankTime = 6;
819
+ FeedType feedType = 7;
820
+ string imprId = 8;
821
+ int64 updateTimeMs = 9;
822
+
823
+ enum Type {
824
+ UNKNOWN_TYPE = 0;
825
+ CHAT = 1;
826
+ MAIL = 2;
827
+ DOC = 3;
828
+ THREAD = 4;
829
+ BOX = 5;
830
+ OPENAPP = 6;
831
+ TOPIC = 7;
832
+ APP_CHAT = 8;
833
+ }
834
+
835
+ enum FeedType {
836
+ TYPE_UNKNOWN = 0;
837
+ TYPE_NEWS = 1;
838
+ TYPE_SOCIAL = 2;
839
+ }
840
+ }
841
+
842
+ // ==================== Chat History (cmd=43) ====================
843
+
844
+ // Request to get chat messages by positions
845
+ message GetChatHistoryRequest {
846
+ string chatId = 1; // Chat ID (19-digit number string)
847
+ repeated int32 positions = 2 [packed = false]; // Message position/sequence numbers to fetch
848
+ int32 flag1 = 3; // Unknown flag, typically 1
849
+ int32 flag2 = 6; // Unknown flag, typically 1
850
+ int32 flag3 = 7; // Unknown flag, typically 2
851
+ int32 flag4 = 12; // Unknown flag, typically 1
852
+ }
853
+
854
+ // Response containing chat messages
855
+ message GetChatHistoryResponse {
856
+ repeated ChatMessageEntry entries = 1;
857
+ }
858
+
859
+ // A single message entry in chat history
860
+ message ChatMessageEntry {
861
+ int32 position = 1; // Message position/sequence number
862
+ ChatMessage message = 2; // The message content
863
+ }
864
+
865
+ // Chat message structure (based on recorded responses)
866
+ message ChatMessage {
867
+ string messageId = 1; // Unique message ID (19-digit number string)
868
+ int32 type = 2; // Message type: 2=POST, 4=TEXT
869
+ string fromId = 3; // Sender user ID
870
+ int64 createTime = 4; // Unix timestamp (seconds)
871
+ ChatMessageContent content = 5; // Message content
872
+ int32 status = 6; // Status flag
873
+ int32 fromType = 7; // 1=USER, 2=BOT
874
+ string chatId = 10; // Chat ID this message belongs to
875
+ string cid = 12; // Short message ID (10-char string like "7i9n6mSAaS")
876
+ int32 position2 = 13; // Same as position
877
+ int64 createTime2 = 14; // Same as createTime
878
+ int32 flag1 = 15; // Unknown flag
879
+ string replyCount = 16; // Reply count as string
880
+ string parentMsgId = 18; // Parent message ID (for replies)
881
+ int32 flag2 = 19; // Unknown flag
882
+ string messageId2 = 20; // Same as messageId
883
+ string chatId2 = 24; // Same as chatId
884
+ int32 flag3 = 25; // Unknown flag
885
+ int32 flag4 = 26; // Unknown flag
886
+ string language = 39; // Message language (e.g., "zh")
887
+ }
888
+ // Chat message content - varies by message type
889
+ message ChatMessageContent {
890
+ string text = 1; // For TEXT messages (type=4)
891
+ bytes richTextOrImageBytes = 2; // For POST: HTML bytes; For IMAGE: ImageInfo protobuf
892
+ bytes richTextBytes = 3; // Raw rich text protobuf
893
+ int32 flag = 4; // Unknown flag
894
+ bytes richTextData = 6; // Additional rich text data
895
+ }
896
+
897
+ // ==================== WS Push Events ====================
898
+
899
+ // cmd=74: 群消息已读状态推送
900
+ message PushGroupMessageReadStateNotice {
901
+ string groupId = 1;
902
+ int32 newMessageCount = 2;
903
+ int32 lastMessagePosition = 3;
904
+ repeated string messageIds = 4;
905
+ int32 noBadgedNewMessageCount = 5;
906
+ PushGroupMessageReadStateNotice_ReadStateType type = 6;
907
+ map<string, int64> readTimes = 7;
908
+ string lastMessageId = 9;
909
+ // field 10: PushThreadMessageReadStateNotice threadNotice (skip for now)
910
+ string lastVisibleMessageId = 11;
911
+ int32 lastVisibleMessagePosition = 12;
912
+ int32 lastVisibleMessageNoBadgedCount = 13;
913
+ int32 readPosition = 14;
914
+ int32 readPositionBadgeCount = 15;
915
+ int32 lastMessagePositionBadgeCount = 16;
916
+ int32 startPushTimestamp = 17;
917
+ bool isBatchClear = 18;
918
+ }
919
+
920
+ enum PushGroupMessageReadStateNotice_ReadStateType {
921
+ PUSH_READ_STATE_CHAT = 0;
922
+ PUSH_READ_STATE_EMAIL = 1;
923
+ }
924
+
925
+ // cmd=7001: 设备在线状态推送
926
+ message PushDeviceOnlineStatus {
927
+ DeviceOnlineStatus deviceOnlineStatus = 1;
928
+ }
929
+
930
+ message DeviceOnlineStatus {
931
+ string deviceId = 1;
932
+ DeviceOnlineStatus_TerminalType terminalType = 2;
933
+ DeviceOnlineStatus_OnlineStatus onlineStatus = 3;
934
+ }
935
+
936
+ enum DeviceOnlineStatus_TerminalType {
937
+ UNKNOWN_TERMINAL = 0;
938
+ PC = 1;
939
+ WEB = 2;
940
+ ANDROID = 3;
941
+ IOS = 4;
942
+ }
943
+
944
+ enum DeviceOnlineStatus_OnlineStatus {
945
+ UNKNOWN_ONLINE = 0;
946
+ ONLINE = 1;
947
+ OFFLINE = 2;
948
+ }
949
+