mezon-js-protobuf 1.8.72 → 1.8.73

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.
@@ -2522,7 +2522,7 @@ function createBaseChannelMessage() {
2522
2522
  clan_id: "",
2523
2523
  channel_id: "",
2524
2524
  message_id: "",
2525
- code: void 0,
2525
+ code: 0,
2526
2526
  sender_id: "",
2527
2527
  username: "",
2528
2528
  avatar: "",
@@ -2559,8 +2559,8 @@ var ChannelMessage = {
2559
2559
  if (message.message_id !== "") {
2560
2560
  writer.uint32(26).string(message.message_id);
2561
2561
  }
2562
- if (message.code !== void 0) {
2563
- Int32Value.encode({ value: message.code }, writer.uint32(34).fork()).ldelim();
2562
+ if (message.code !== 0) {
2563
+ writer.uint32(32).int32(message.code);
2564
2564
  }
2565
2565
  if (message.sender_id !== "") {
2566
2566
  writer.uint32(42).string(message.sender_id);
@@ -2659,10 +2659,10 @@ var ChannelMessage = {
2659
2659
  message.message_id = reader.string();
2660
2660
  continue;
2661
2661
  case 4:
2662
- if (tag !== 34) {
2662
+ if (tag !== 32) {
2663
2663
  break;
2664
2664
  }
2665
- message.code = Int32Value.decode(reader, reader.uint32()).value;
2665
+ message.code = reader.int32();
2666
2666
  continue;
2667
2667
  case 5:
2668
2668
  if (tag !== 42) {
@@ -2815,7 +2815,7 @@ var ChannelMessage = {
2815
2815
  clan_id: isSet3(object.clan_id) ? globalThis.String(object.clan_id) : "",
2816
2816
  channel_id: isSet3(object.channel_id) ? globalThis.String(object.channel_id) : "",
2817
2817
  message_id: isSet3(object.message_id) ? globalThis.String(object.message_id) : "",
2818
- code: isSet3(object.code) ? Number(object.code) : void 0,
2818
+ code: isSet3(object.code) ? globalThis.Number(object.code) : 0,
2819
2819
  sender_id: isSet3(object.sender_id) ? globalThis.String(object.sender_id) : "",
2820
2820
  username: isSet3(object.username) ? globalThis.String(object.username) : "",
2821
2821
  avatar: isSet3(object.avatar) ? globalThis.String(object.avatar) : "",
@@ -2852,8 +2852,8 @@ var ChannelMessage = {
2852
2852
  if (message.message_id !== "") {
2853
2853
  obj.message_id = message.message_id;
2854
2854
  }
2855
- if (message.code !== void 0) {
2856
- obj.code = message.code;
2855
+ if (message.code !== 0) {
2856
+ obj.code = Math.round(message.code);
2857
2857
  }
2858
2858
  if (message.sender_id !== "") {
2859
2859
  obj.sender_id = message.sender_id;
@@ -2935,7 +2935,7 @@ var ChannelMessage = {
2935
2935
  message.clan_id = (_a = object.clan_id) != null ? _a : "";
2936
2936
  message.channel_id = (_b = object.channel_id) != null ? _b : "";
2937
2937
  message.message_id = (_c = object.message_id) != null ? _c : "";
2938
- message.code = (_d = object.code) != null ? _d : void 0;
2938
+ message.code = (_d = object.code) != null ? _d : 0;
2939
2939
  message.sender_id = (_e = object.sender_id) != null ? _e : "";
2940
2940
  message.username = (_f = object.username) != null ? _f : "";
2941
2941
  message.avatar = (_g = object.avatar) != null ? _g : "";
@@ -7238,7 +7238,7 @@ function createBaseChannelDescription() {
7238
7238
  channel_id: "",
7239
7239
  category_id: "",
7240
7240
  category_name: "",
7241
- type: void 0,
7241
+ type: 0,
7242
7242
  creator_id: "",
7243
7243
  channel_label: "",
7244
7244
  channel_private: 0,
@@ -7283,8 +7283,8 @@ var ChannelDescription = {
7283
7283
  if (message.category_name !== "") {
7284
7284
  writer.uint32(42).string(message.category_name);
7285
7285
  }
7286
- if (message.type !== void 0) {
7287
- Int32Value.encode({ value: message.type }, writer.uint32(50).fork()).ldelim();
7286
+ if (message.type !== 0) {
7287
+ writer.uint32(48).int32(message.type);
7288
7288
  }
7289
7289
  if (message.creator_id !== "") {
7290
7290
  writer.uint32(58).string(message.creator_id);
@@ -7403,10 +7403,10 @@ var ChannelDescription = {
7403
7403
  message.category_name = reader.string();
7404
7404
  continue;
7405
7405
  case 6:
7406
- if (tag !== 50) {
7406
+ if (tag !== 48) {
7407
7407
  break;
7408
7408
  }
7409
- message.type = Int32Value.decode(reader, reader.uint32()).value;
7409
+ message.type = reader.int32();
7410
7410
  continue;
7411
7411
  case 7:
7412
7412
  if (tag !== 58) {
@@ -7580,7 +7580,7 @@ var ChannelDescription = {
7580
7580
  channel_id: isSet3(object.channel_id) ? globalThis.String(object.channel_id) : "",
7581
7581
  category_id: isSet3(object.category_id) ? globalThis.String(object.category_id) : "",
7582
7582
  category_name: isSet3(object.category_name) ? globalThis.String(object.category_name) : "",
7583
- type: isSet3(object.type) ? Number(object.type) : void 0,
7583
+ type: isSet3(object.type) ? globalThis.Number(object.type) : 0,
7584
7584
  creator_id: isSet3(object.creator_id) ? globalThis.String(object.creator_id) : "",
7585
7585
  channel_label: isSet3(object.channel_label) ? globalThis.String(object.channel_label) : "",
7586
7586
  channel_private: isSet3(object.channel_private) ? globalThis.Number(object.channel_private) : 0,
@@ -7626,8 +7626,8 @@ var ChannelDescription = {
7626
7626
  if (message.category_name !== "") {
7627
7627
  obj.category_name = message.category_name;
7628
7628
  }
7629
- if (message.type !== void 0) {
7630
- obj.type = message.type;
7629
+ if (message.type !== 0) {
7630
+ obj.type = Math.round(message.type);
7631
7631
  }
7632
7632
  if (message.creator_id !== "") {
7633
7633
  obj.creator_id = message.creator_id;
@@ -7717,7 +7717,7 @@ var ChannelDescription = {
7717
7717
  message.channel_id = (_c = object.channel_id) != null ? _c : "";
7718
7718
  message.category_id = (_d = object.category_id) != null ? _d : "";
7719
7719
  message.category_name = (_e = object.category_name) != null ? _e : "";
7720
- message.type = (_f = object.type) != null ? _f : void 0;
7720
+ message.type = (_f = object.type) != null ? _f : 0;
7721
7721
  message.creator_id = (_g = object.creator_id) != null ? _g : "";
7722
7722
  message.channel_label = (_h = object.channel_label) != null ? _h : "";
7723
7723
  message.channel_private = (_i = object.channel_private) != null ? _i : 0;
@@ -14477,7 +14477,8 @@ function createBaseEnvelope() {
14477
14477
  add_friend: void 0,
14478
14478
  ban_user_event: void 0,
14479
14479
  active_archived_thread: void 0,
14480
- allow_anonymous_event: void 0
14480
+ allow_anonymous_event: void 0,
14481
+ update_localcache_event: void 0
14481
14482
  };
14482
14483
  }
14483
14484
  var Envelope = {
@@ -14755,6 +14756,9 @@ var Envelope = {
14755
14756
  if (message.allow_anonymous_event !== void 0) {
14756
14757
  AllowAnonymousEvent.encode(message.allow_anonymous_event, writer.uint32(730).fork()).ldelim();
14757
14758
  }
14759
+ if (message.update_localcache_event !== void 0) {
14760
+ UpdateLocalCacheEvent.encode(message.update_localcache_event, writer.uint32(738).fork()).ldelim();
14761
+ }
14758
14762
  return writer;
14759
14763
  },
14760
14764
  decode(input, length) {
@@ -15310,6 +15314,12 @@ var Envelope = {
15310
15314
  }
15311
15315
  message.allow_anonymous_event = AllowAnonymousEvent.decode(reader, reader.uint32());
15312
15316
  continue;
15317
+ case 92:
15318
+ if (tag !== 738) {
15319
+ break;
15320
+ }
15321
+ message.update_localcache_event = UpdateLocalCacheEvent.decode(reader, reader.uint32());
15322
+ continue;
15313
15323
  }
15314
15324
  if ((tag & 7) === 4 || tag === 0) {
15315
15325
  break;
@@ -15410,7 +15420,8 @@ var Envelope = {
15410
15420
  add_friend: isSet4(object.add_friend) ? AddFriend.fromJSON(object.add_friend) : void 0,
15411
15421
  ban_user_event: isSet4(object.ban_user_event) ? BannedUserEvent.fromJSON(object.ban_user_event) : void 0,
15412
15422
  active_archived_thread: isSet4(object.active_archived_thread) ? ActiveArchivedThread.fromJSON(object.active_archived_thread) : void 0,
15413
- allow_anonymous_event: isSet4(object.allow_anonymous_event) ? AllowAnonymousEvent.fromJSON(object.allow_anonymous_event) : void 0
15423
+ allow_anonymous_event: isSet4(object.allow_anonymous_event) ? AllowAnonymousEvent.fromJSON(object.allow_anonymous_event) : void 0,
15424
+ update_localcache_event: isSet4(object.update_localcache_event) ? UpdateLocalCacheEvent.fromJSON(object.update_localcache_event) : void 0
15414
15425
  };
15415
15426
  },
15416
15427
  toJSON(message) {
@@ -15690,6 +15701,9 @@ var Envelope = {
15690
15701
  if (message.allow_anonymous_event !== void 0) {
15691
15702
  obj.allow_anonymous_event = AllowAnonymousEvent.toJSON(message.allow_anonymous_event);
15692
15703
  }
15704
+ if (message.update_localcache_event !== void 0) {
15705
+ obj.update_localcache_event = UpdateLocalCacheEvent.toJSON(message.update_localcache_event);
15706
+ }
15693
15707
  return obj;
15694
15708
  },
15695
15709
  create(base) {
@@ -15789,6 +15803,75 @@ var Envelope = {
15789
15803
  message.ban_user_event = object.ban_user_event !== void 0 && object.ban_user_event !== null ? BannedUserEvent.fromPartial(object.ban_user_event) : void 0;
15790
15804
  message.active_archived_thread = object.active_archived_thread !== void 0 && object.active_archived_thread !== null ? ActiveArchivedThread.fromPartial(object.active_archived_thread) : void 0;
15791
15805
  message.allow_anonymous_event = object.allow_anonymous_event !== void 0 && object.allow_anonymous_event !== null ? AllowAnonymousEvent.fromPartial(object.allow_anonymous_event) : void 0;
15806
+ message.update_localcache_event = object.update_localcache_event !== void 0 && object.update_localcache_event !== null ? UpdateLocalCacheEvent.fromPartial(object.update_localcache_event) : void 0;
15807
+ return message;
15808
+ }
15809
+ };
15810
+ function createBaseUpdateLocalCacheEvent() {
15811
+ return { user_ids: [], channel_ids: [] };
15812
+ }
15813
+ var UpdateLocalCacheEvent = {
15814
+ encode(message, writer = import_minimal5.default.Writer.create()) {
15815
+ for (const v of message.user_ids) {
15816
+ writer.uint32(10).string(v);
15817
+ }
15818
+ for (const v of message.channel_ids) {
15819
+ writer.uint32(18).string(v);
15820
+ }
15821
+ return writer;
15822
+ },
15823
+ decode(input, length) {
15824
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
15825
+ let end = length === void 0 ? reader.len : reader.pos + length;
15826
+ const message = createBaseUpdateLocalCacheEvent();
15827
+ while (reader.pos < end) {
15828
+ const tag = reader.uint32();
15829
+ switch (tag >>> 3) {
15830
+ case 1:
15831
+ if (tag !== 10) {
15832
+ break;
15833
+ }
15834
+ message.user_ids.push(reader.string());
15835
+ continue;
15836
+ case 2:
15837
+ if (tag !== 18) {
15838
+ break;
15839
+ }
15840
+ message.channel_ids.push(reader.string());
15841
+ continue;
15842
+ }
15843
+ if ((tag & 7) === 4 || tag === 0) {
15844
+ break;
15845
+ }
15846
+ reader.skipType(tag & 7);
15847
+ }
15848
+ return message;
15849
+ },
15850
+ fromJSON(object) {
15851
+ return {
15852
+ user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
15853
+ channel_ids: globalThis.Array.isArray(object == null ? void 0 : object.channel_ids) ? object.channel_ids.map((e) => globalThis.String(e)) : []
15854
+ };
15855
+ },
15856
+ toJSON(message) {
15857
+ var _a, _b;
15858
+ const obj = {};
15859
+ if ((_a = message.user_ids) == null ? void 0 : _a.length) {
15860
+ obj.user_ids = message.user_ids;
15861
+ }
15862
+ if ((_b = message.channel_ids) == null ? void 0 : _b.length) {
15863
+ obj.channel_ids = message.channel_ids;
15864
+ }
15865
+ return obj;
15866
+ },
15867
+ create(base) {
15868
+ return UpdateLocalCacheEvent.fromPartial(base != null ? base : {});
15869
+ },
15870
+ fromPartial(object) {
15871
+ var _a, _b;
15872
+ const message = createBaseUpdateLocalCacheEvent();
15873
+ message.user_ids = ((_a = object.user_ids) == null ? void 0 : _a.map((e) => e)) || [];
15874
+ message.channel_ids = ((_b = object.channel_ids) == null ? void 0 : _b.map((e) => e)) || [];
15792
15875
  return message;
15793
15876
  }
15794
15877
  };
@@ -16863,7 +16946,7 @@ function createBaseChannelMessageAck() {
16863
16946
  return {
16864
16947
  channel_id: "",
16865
16948
  message_id: "",
16866
- code: void 0,
16949
+ code: 0,
16867
16950
  username: "",
16868
16951
  create_time: void 0,
16869
16952
  update_time: void 0,
@@ -16880,8 +16963,8 @@ var ChannelMessageAck = {
16880
16963
  if (message.message_id !== "") {
16881
16964
  writer.uint32(18).string(message.message_id);
16882
16965
  }
16883
- if (message.code !== void 0) {
16884
- Int32Value.encode({ value: message.code }, writer.uint32(26).fork()).ldelim();
16966
+ if (message.code !== 0) {
16967
+ writer.uint32(24).int32(message.code);
16885
16968
  }
16886
16969
  if (message.username !== "") {
16887
16970
  writer.uint32(34).string(message.username);
@@ -16923,10 +17006,10 @@ var ChannelMessageAck = {
16923
17006
  message.message_id = reader.string();
16924
17007
  continue;
16925
17008
  case 3:
16926
- if (tag !== 26) {
17009
+ if (tag !== 24) {
16927
17010
  break;
16928
17011
  }
16929
- message.code = Int32Value.decode(reader, reader.uint32()).value;
17012
+ message.code = reader.int32();
16930
17013
  continue;
16931
17014
  case 4:
16932
17015
  if (tag !== 34) {
@@ -16976,7 +17059,7 @@ var ChannelMessageAck = {
16976
17059
  return {
16977
17060
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
16978
17061
  message_id: isSet4(object.message_id) ? globalThis.String(object.message_id) : "",
16979
- code: isSet4(object.code) ? Number(object.code) : void 0,
17062
+ code: isSet4(object.code) ? globalThis.Number(object.code) : 0,
16980
17063
  username: isSet4(object.username) ? globalThis.String(object.username) : "",
16981
17064
  create_time: isSet4(object.create_time) ? fromJsonTimestamp2(object.create_time) : void 0,
16982
17065
  update_time: isSet4(object.update_time) ? fromJsonTimestamp2(object.update_time) : void 0,
@@ -16993,8 +17076,8 @@ var ChannelMessageAck = {
16993
17076
  if (message.message_id !== "") {
16994
17077
  obj.message_id = message.message_id;
16995
17078
  }
16996
- if (message.code !== void 0) {
16997
- obj.code = message.code;
17079
+ if (message.code !== 0) {
17080
+ obj.code = Math.round(message.code);
16998
17081
  }
16999
17082
  if (message.username !== "") {
17000
17083
  obj.username = message.username;
@@ -17024,7 +17107,7 @@ var ChannelMessageAck = {
17024
17107
  const message = createBaseChannelMessageAck();
17025
17108
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
17026
17109
  message.message_id = (_b = object.message_id) != null ? _b : "";
17027
- message.code = (_c = object.code) != null ? _c : void 0;
17110
+ message.code = (_c = object.code) != null ? _c : 0;
17028
17111
  message.username = (_d = object.username) != null ? _d : "";
17029
17112
  message.create_time = (_e = object.create_time) != null ? _e : void 0;
17030
17113
  message.update_time = (_f = object.update_time) != null ? _f : void 0;
@@ -21238,7 +21321,7 @@ function createBaseChannelUpdatedEvent() {
21238
21321
  parent_id: "",
21239
21322
  channel_id: "",
21240
21323
  channel_label: "",
21241
- channel_type: void 0,
21324
+ channel_type: 0,
21242
21325
  status: 0,
21243
21326
  meeting_code: "",
21244
21327
  is_error: false,
@@ -21274,8 +21357,8 @@ var ChannelUpdatedEvent = {
21274
21357
  if (message.channel_label !== "") {
21275
21358
  writer.uint32(50).string(message.channel_label);
21276
21359
  }
21277
- if (message.channel_type !== void 0) {
21278
- Int32Value.encode({ value: message.channel_type }, writer.uint32(58).fork()).ldelim();
21360
+ if (message.channel_type !== 0) {
21361
+ writer.uint32(56).int32(message.channel_type);
21279
21362
  }
21280
21363
  if (message.status !== 0) {
21281
21364
  writer.uint32(64).int32(message.status);
@@ -21362,10 +21445,10 @@ var ChannelUpdatedEvent = {
21362
21445
  message.channel_label = reader.string();
21363
21446
  continue;
21364
21447
  case 7:
21365
- if (tag !== 58) {
21448
+ if (tag !== 56) {
21366
21449
  break;
21367
21450
  }
21368
- message.channel_type = Int32Value.decode(reader, reader.uint32()).value;
21451
+ message.channel_type = reader.int32();
21369
21452
  continue;
21370
21453
  case 8:
21371
21454
  if (tag !== 64) {
@@ -21461,7 +21544,7 @@ var ChannelUpdatedEvent = {
21461
21544
  parent_id: isSet4(object.parent_id) ? globalThis.String(object.parent_id) : "",
21462
21545
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
21463
21546
  channel_label: isSet4(object.channel_label) ? globalThis.String(object.channel_label) : "",
21464
- channel_type: isSet4(object.channel_type) ? Number(object.channel_type) : void 0,
21547
+ channel_type: isSet4(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
21465
21548
  status: isSet4(object.status) ? globalThis.Number(object.status) : 0,
21466
21549
  meeting_code: isSet4(object.meeting_code) ? globalThis.String(object.meeting_code) : "",
21467
21550
  is_error: isSet4(object.is_error) ? globalThis.Boolean(object.is_error) : false,
@@ -21498,8 +21581,8 @@ var ChannelUpdatedEvent = {
21498
21581
  if (message.channel_label !== "") {
21499
21582
  obj.channel_label = message.channel_label;
21500
21583
  }
21501
- if (message.channel_type !== void 0) {
21502
- obj.channel_type = message.channel_type;
21584
+ if (message.channel_type !== 0) {
21585
+ obj.channel_type = Math.round(message.channel_type);
21503
21586
  }
21504
21587
  if (message.status !== 0) {
21505
21588
  obj.status = Math.round(message.status);
@@ -21554,7 +21637,7 @@ var ChannelUpdatedEvent = {
21554
21637
  message.parent_id = (_d = object.parent_id) != null ? _d : "";
21555
21638
  message.channel_id = (_e = object.channel_id) != null ? _e : "";
21556
21639
  message.channel_label = (_f = object.channel_label) != null ? _f : "";
21557
- message.channel_type = (_g = object.channel_type) != null ? _g : void 0;
21640
+ message.channel_type = (_g = object.channel_type) != null ? _g : 0;
21558
21641
  message.status = (_h = object.status) != null ? _h : 0;
21559
21642
  message.meeting_code = (_i = object.meeting_code) != null ? _i : "";
21560
21643
  message.is_error = (_j = object.is_error) != null ? _j : false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.8.72",
3
+ "version": "1.8.73",
4
4
  "description": "Websocket adapter adding protocol buffer support to the Mezon Javascript client.",
5
5
  "main": "dist/mezon-js-protobuf.cjs.js",
6
6
  "module": "dist/mezon-js-protobuf.esm.mjs",
package/rtapi/realtime.ts CHANGED
@@ -452,7 +452,16 @@ export interface Envelope {
452
452
  | ActiveArchivedThread
453
453
  | undefined;
454
454
  /** Config Allow Anonymous */
455
- allow_anonymous_event?: AllowAnonymousEvent | undefined;
455
+ allow_anonymous_event?:
456
+ | AllowAnonymousEvent
457
+ | undefined;
458
+ /** Message sending to another server for update localcache */
459
+ update_localcache_event?: UpdateLocalCacheEvent | undefined;
460
+ }
461
+
462
+ export interface UpdateLocalCacheEvent {
463
+ user_ids: string[];
464
+ channel_ids: string[];
456
465
  }
457
466
 
458
467
  export interface FollowEvent {
@@ -657,9 +666,7 @@ export interface ChannelMessageAck {
657
666
  /** The unique ID assigned to the message. */
658
667
  message_id: string;
659
668
  /** The code representing a message type or category. */
660
- code:
661
- | number
662
- | undefined;
669
+ code: number;
663
670
  /** Username of the message sender. */
664
671
  username: string;
665
672
  /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created. */
@@ -1264,9 +1271,7 @@ export interface ChannelUpdatedEvent {
1264
1271
  /** channel label */
1265
1272
  channel_label: string;
1266
1273
  /** channel type */
1267
- channel_type:
1268
- | number
1269
- | undefined;
1274
+ channel_type: number;
1270
1275
  /** status */
1271
1276
  status: number;
1272
1277
  /** meeting code */
@@ -1874,6 +1879,7 @@ function createBaseEnvelope(): Envelope {
1874
1879
  ban_user_event: undefined,
1875
1880
  active_archived_thread: undefined,
1876
1881
  allow_anonymous_event: undefined,
1882
+ update_localcache_event: undefined,
1877
1883
  };
1878
1884
  }
1879
1885
 
@@ -2153,6 +2159,9 @@ export const Envelope = {
2153
2159
  if (message.allow_anonymous_event !== undefined) {
2154
2160
  AllowAnonymousEvent.encode(message.allow_anonymous_event, writer.uint32(730).fork()).ldelim();
2155
2161
  }
2162
+ if (message.update_localcache_event !== undefined) {
2163
+ UpdateLocalCacheEvent.encode(message.update_localcache_event, writer.uint32(738).fork()).ldelim();
2164
+ }
2156
2165
  return writer;
2157
2166
  },
2158
2167
 
@@ -2800,6 +2809,13 @@ export const Envelope = {
2800
2809
 
2801
2810
  message.allow_anonymous_event = AllowAnonymousEvent.decode(reader, reader.uint32());
2802
2811
  continue;
2812
+ case 92:
2813
+ if (tag !== 738) {
2814
+ break;
2815
+ }
2816
+
2817
+ message.update_localcache_event = UpdateLocalCacheEvent.decode(reader, reader.uint32());
2818
+ continue;
2803
2819
  }
2804
2820
  if ((tag & 7) === 4 || tag === 0) {
2805
2821
  break;
@@ -3018,6 +3034,9 @@ export const Envelope = {
3018
3034
  allow_anonymous_event: isSet(object.allow_anonymous_event)
3019
3035
  ? AllowAnonymousEvent.fromJSON(object.allow_anonymous_event)
3020
3036
  : undefined,
3037
+ update_localcache_event: isSet(object.update_localcache_event)
3038
+ ? UpdateLocalCacheEvent.fromJSON(object.update_localcache_event)
3039
+ : undefined,
3021
3040
  };
3022
3041
  },
3023
3042
 
@@ -3298,6 +3317,9 @@ export const Envelope = {
3298
3317
  if (message.allow_anonymous_event !== undefined) {
3299
3318
  obj.allow_anonymous_event = AllowAnonymousEvent.toJSON(message.allow_anonymous_event);
3300
3319
  }
3320
+ if (message.update_localcache_event !== undefined) {
3321
+ obj.update_localcache_event = UpdateLocalCacheEvent.toJSON(message.update_localcache_event);
3322
+ }
3301
3323
  return obj;
3302
3324
  },
3303
3325
 
@@ -3600,6 +3622,86 @@ export const Envelope = {
3600
3622
  (object.allow_anonymous_event !== undefined && object.allow_anonymous_event !== null)
3601
3623
  ? AllowAnonymousEvent.fromPartial(object.allow_anonymous_event)
3602
3624
  : undefined;
3625
+ message.update_localcache_event =
3626
+ (object.update_localcache_event !== undefined && object.update_localcache_event !== null)
3627
+ ? UpdateLocalCacheEvent.fromPartial(object.update_localcache_event)
3628
+ : undefined;
3629
+ return message;
3630
+ },
3631
+ };
3632
+
3633
+ function createBaseUpdateLocalCacheEvent(): UpdateLocalCacheEvent {
3634
+ return { user_ids: [], channel_ids: [] };
3635
+ }
3636
+
3637
+ export const UpdateLocalCacheEvent = {
3638
+ encode(message: UpdateLocalCacheEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3639
+ for (const v of message.user_ids) {
3640
+ writer.uint32(10).string(v!);
3641
+ }
3642
+ for (const v of message.channel_ids) {
3643
+ writer.uint32(18).string(v!);
3644
+ }
3645
+ return writer;
3646
+ },
3647
+
3648
+ decode(input: _m0.Reader | Uint8Array, length?: number): UpdateLocalCacheEvent {
3649
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
3650
+ let end = length === undefined ? reader.len : reader.pos + length;
3651
+ const message = createBaseUpdateLocalCacheEvent();
3652
+ while (reader.pos < end) {
3653
+ const tag = reader.uint32();
3654
+ switch (tag >>> 3) {
3655
+ case 1:
3656
+ if (tag !== 10) {
3657
+ break;
3658
+ }
3659
+
3660
+ message.user_ids.push(reader.string());
3661
+ continue;
3662
+ case 2:
3663
+ if (tag !== 18) {
3664
+ break;
3665
+ }
3666
+
3667
+ message.channel_ids.push(reader.string());
3668
+ continue;
3669
+ }
3670
+ if ((tag & 7) === 4 || tag === 0) {
3671
+ break;
3672
+ }
3673
+ reader.skipType(tag & 7);
3674
+ }
3675
+ return message;
3676
+ },
3677
+
3678
+ fromJSON(object: any): UpdateLocalCacheEvent {
3679
+ return {
3680
+ user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
3681
+ channel_ids: globalThis.Array.isArray(object?.channel_ids)
3682
+ ? object.channel_ids.map((e: any) => globalThis.String(e))
3683
+ : [],
3684
+ };
3685
+ },
3686
+
3687
+ toJSON(message: UpdateLocalCacheEvent): unknown {
3688
+ const obj: any = {};
3689
+ if (message.user_ids?.length) {
3690
+ obj.user_ids = message.user_ids;
3691
+ }
3692
+ if (message.channel_ids?.length) {
3693
+ obj.channel_ids = message.channel_ids;
3694
+ }
3695
+ return obj;
3696
+ },
3697
+
3698
+ create<I extends Exact<DeepPartial<UpdateLocalCacheEvent>, I>>(base?: I): UpdateLocalCacheEvent {
3699
+ return UpdateLocalCacheEvent.fromPartial(base ?? ({} as any));
3700
+ },
3701
+ fromPartial<I extends Exact<DeepPartial<UpdateLocalCacheEvent>, I>>(object: I): UpdateLocalCacheEvent {
3702
+ const message = createBaseUpdateLocalCacheEvent();
3703
+ message.user_ids = object.user_ids?.map((e) => e) || [];
3704
+ message.channel_ids = object.channel_ids?.map((e) => e) || [];
3603
3705
  return message;
3604
3706
  },
3605
3707
  };
@@ -5506,7 +5608,7 @@ function createBaseChannelMessageAck(): ChannelMessageAck {
5506
5608
  return {
5507
5609
  channel_id: "",
5508
5610
  message_id: "",
5509
- code: undefined,
5611
+ code: 0,
5510
5612
  username: "",
5511
5613
  create_time: undefined,
5512
5614
  update_time: undefined,
@@ -5524,8 +5626,8 @@ export const ChannelMessageAck = {
5524
5626
  if (message.message_id !== "") {
5525
5627
  writer.uint32(18).string(message.message_id);
5526
5628
  }
5527
- if (message.code !== undefined) {
5528
- Int32Value.encode({ value: message.code! }, writer.uint32(26).fork()).ldelim();
5629
+ if (message.code !== 0) {
5630
+ writer.uint32(24).int32(message.code);
5529
5631
  }
5530
5632
  if (message.username !== "") {
5531
5633
  writer.uint32(34).string(message.username);
@@ -5570,11 +5672,11 @@ export const ChannelMessageAck = {
5570
5672
  message.message_id = reader.string();
5571
5673
  continue;
5572
5674
  case 3:
5573
- if (tag !== 26) {
5675
+ if (tag !== 24) {
5574
5676
  break;
5575
5677
  }
5576
5678
 
5577
- message.code = Int32Value.decode(reader, reader.uint32()).value;
5679
+ message.code = reader.int32();
5578
5680
  continue;
5579
5681
  case 4:
5580
5682
  if (tag !== 34) {
@@ -5631,7 +5733,7 @@ export const ChannelMessageAck = {
5631
5733
  return {
5632
5734
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
5633
5735
  message_id: isSet(object.message_id) ? globalThis.String(object.message_id) : "",
5634
- code: isSet(object.code) ? Number(object.code) : undefined,
5736
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
5635
5737
  username: isSet(object.username) ? globalThis.String(object.username) : "",
5636
5738
  create_time: isSet(object.create_time) ? fromJsonTimestamp(object.create_time) : undefined,
5637
5739
  update_time: isSet(object.update_time) ? fromJsonTimestamp(object.update_time) : undefined,
@@ -5649,8 +5751,8 @@ export const ChannelMessageAck = {
5649
5751
  if (message.message_id !== "") {
5650
5752
  obj.message_id = message.message_id;
5651
5753
  }
5652
- if (message.code !== undefined) {
5653
- obj.code = message.code;
5754
+ if (message.code !== 0) {
5755
+ obj.code = Math.round(message.code);
5654
5756
  }
5655
5757
  if (message.username !== "") {
5656
5758
  obj.username = message.username;
@@ -5680,7 +5782,7 @@ export const ChannelMessageAck = {
5680
5782
  const message = createBaseChannelMessageAck();
5681
5783
  message.channel_id = object.channel_id ?? "";
5682
5784
  message.message_id = object.message_id ?? "";
5683
- message.code = object.code ?? undefined;
5785
+ message.code = object.code ?? 0;
5684
5786
  message.username = object.username ?? "";
5685
5787
  message.create_time = object.create_time ?? undefined;
5686
5788
  message.update_time = object.update_time ?? undefined;
@@ -10299,7 +10401,7 @@ function createBaseChannelUpdatedEvent(): ChannelUpdatedEvent {
10299
10401
  parent_id: "",
10300
10402
  channel_id: "",
10301
10403
  channel_label: "",
10302
- channel_type: undefined,
10404
+ channel_type: 0,
10303
10405
  status: 0,
10304
10406
  meeting_code: "",
10305
10407
  is_error: false,
@@ -10336,8 +10438,8 @@ export const ChannelUpdatedEvent = {
10336
10438
  if (message.channel_label !== "") {
10337
10439
  writer.uint32(50).string(message.channel_label);
10338
10440
  }
10339
- if (message.channel_type !== undefined) {
10340
- Int32Value.encode({ value: message.channel_type! }, writer.uint32(58).fork()).ldelim();
10441
+ if (message.channel_type !== 0) {
10442
+ writer.uint32(56).int32(message.channel_type);
10341
10443
  }
10342
10444
  if (message.status !== 0) {
10343
10445
  writer.uint32(64).int32(message.status);
@@ -10431,11 +10533,11 @@ export const ChannelUpdatedEvent = {
10431
10533
  message.channel_label = reader.string();
10432
10534
  continue;
10433
10535
  case 7:
10434
- if (tag !== 58) {
10536
+ if (tag !== 56) {
10435
10537
  break;
10436
10538
  }
10437
10539
 
10438
- message.channel_type = Int32Value.decode(reader, reader.uint32()).value;
10540
+ message.channel_type = reader.int32();
10439
10541
  continue;
10440
10542
  case 8:
10441
10543
  if (tag !== 64) {
@@ -10545,7 +10647,7 @@ export const ChannelUpdatedEvent = {
10545
10647
  parent_id: isSet(object.parent_id) ? globalThis.String(object.parent_id) : "",
10546
10648
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
10547
10649
  channel_label: isSet(object.channel_label) ? globalThis.String(object.channel_label) : "",
10548
- channel_type: isSet(object.channel_type) ? Number(object.channel_type) : undefined,
10650
+ channel_type: isSet(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
10549
10651
  status: isSet(object.status) ? globalThis.Number(object.status) : 0,
10550
10652
  meeting_code: isSet(object.meeting_code) ? globalThis.String(object.meeting_code) : "",
10551
10653
  is_error: isSet(object.is_error) ? globalThis.Boolean(object.is_error) : false,
@@ -10582,8 +10684,8 @@ export const ChannelUpdatedEvent = {
10582
10684
  if (message.channel_label !== "") {
10583
10685
  obj.channel_label = message.channel_label;
10584
10686
  }
10585
- if (message.channel_type !== undefined) {
10586
- obj.channel_type = message.channel_type;
10687
+ if (message.channel_type !== 0) {
10688
+ obj.channel_type = Math.round(message.channel_type);
10587
10689
  }
10588
10690
  if (message.status !== 0) {
10589
10691
  obj.status = Math.round(message.status);
@@ -10638,7 +10740,7 @@ export const ChannelUpdatedEvent = {
10638
10740
  message.parent_id = object.parent_id ?? "";
10639
10741
  message.channel_id = object.channel_id ?? "";
10640
10742
  message.channel_label = object.channel_label ?? "";
10641
- message.channel_type = object.channel_type ?? undefined;
10743
+ message.channel_type = object.channel_type ?? 0;
10642
10744
  message.status = object.status ?? 0;
10643
10745
  message.meeting_code = object.meeting_code ?? "";
10644
10746
  message.is_error = object.is_error ?? false;