mezon-js-protobuf 1.8.1 → 1.8.3

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.
@@ -13548,7 +13548,7 @@ var UserChannelAdded = {
13548
13548
  }
13549
13549
  };
13550
13550
  function createBaseUserChannelRemoved() {
13551
- return { channel_id: "", user_ids: [], channel_type: 0, clan_id: "" };
13551
+ return { channel_id: "", user_ids: [], channel_type: 0, clan_id: "", badge_counts: [] };
13552
13552
  }
13553
13553
  var UserChannelRemoved = {
13554
13554
  encode(message, writer = import_minimal5.default.Writer.create()) {
@@ -13564,6 +13564,11 @@ var UserChannelRemoved = {
13564
13564
  if (message.clan_id !== "") {
13565
13565
  writer.uint32(34).string(message.clan_id);
13566
13566
  }
13567
+ writer.uint32(50).fork();
13568
+ for (const v of message.badge_counts) {
13569
+ writer.int32(v);
13570
+ }
13571
+ writer.ldelim();
13567
13572
  return writer;
13568
13573
  },
13569
13574
  decode(input, length) {
@@ -13597,6 +13602,19 @@ var UserChannelRemoved = {
13597
13602
  }
13598
13603
  message.clan_id = reader.string();
13599
13604
  continue;
13605
+ case 6:
13606
+ if (tag === 48) {
13607
+ message.badge_counts.push(reader.int32());
13608
+ continue;
13609
+ }
13610
+ if (tag === 50) {
13611
+ const end2 = reader.uint32() + reader.pos;
13612
+ while (reader.pos < end2) {
13613
+ message.badge_counts.push(reader.int32());
13614
+ }
13615
+ continue;
13616
+ }
13617
+ break;
13600
13618
  }
13601
13619
  if ((tag & 7) === 4 || tag === 0) {
13602
13620
  break;
@@ -13610,11 +13628,12 @@ var UserChannelRemoved = {
13610
13628
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
13611
13629
  user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
13612
13630
  channel_type: isSet4(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
13613
- clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : ""
13631
+ clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : "",
13632
+ badge_counts: globalThis.Array.isArray(object == null ? void 0 : object.badge_counts) ? object.badge_counts.map((e) => globalThis.Number(e)) : []
13614
13633
  };
13615
13634
  },
13616
13635
  toJSON(message) {
13617
- var _a;
13636
+ var _a, _b;
13618
13637
  const obj = {};
13619
13638
  if (message.channel_id !== "") {
13620
13639
  obj.channel_id = message.channel_id;
@@ -13628,18 +13647,22 @@ var UserChannelRemoved = {
13628
13647
  if (message.clan_id !== "") {
13629
13648
  obj.clan_id = message.clan_id;
13630
13649
  }
13650
+ if ((_b = message.badge_counts) == null ? void 0 : _b.length) {
13651
+ obj.badge_counts = message.badge_counts.map((e) => Math.round(e));
13652
+ }
13631
13653
  return obj;
13632
13654
  },
13633
13655
  create(base) {
13634
13656
  return UserChannelRemoved.fromPartial(base != null ? base : {});
13635
13657
  },
13636
13658
  fromPartial(object) {
13637
- var _a, _b, _c, _d;
13659
+ var _a, _b, _c, _d, _e;
13638
13660
  const message = createBaseUserChannelRemoved();
13639
13661
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
13640
13662
  message.user_ids = ((_b = object.user_ids) == null ? void 0 : _b.map((e) => e)) || [];
13641
13663
  message.channel_type = (_c = object.channel_type) != null ? _c : 0;
13642
13664
  message.clan_id = (_d = object.clan_id) != null ? _d : "";
13665
+ message.badge_counts = ((_e = object.badge_counts) == null ? void 0 : _e.map((e) => e)) || [];
13643
13666
  return message;
13644
13667
  }
13645
13668
  };
@@ -14129,7 +14152,8 @@ function createBaseUserProfileRedis() {
14129
14152
  mezon_id: "",
14130
14153
  app_token: "",
14131
14154
  app_url: "",
14132
- is_bot: false
14155
+ is_bot: false,
14156
+ voip_token: ""
14133
14157
  };
14134
14158
  }
14135
14159
  var UserProfileRedis = {
@@ -14185,6 +14209,9 @@ var UserProfileRedis = {
14185
14209
  if (message.is_bot !== false) {
14186
14210
  writer.uint32(136).bool(message.is_bot);
14187
14211
  }
14212
+ if (message.voip_token !== "") {
14213
+ writer.uint32(146).string(message.voip_token);
14214
+ }
14188
14215
  return writer;
14189
14216
  },
14190
14217
  decode(input, length) {
@@ -14296,6 +14323,12 @@ var UserProfileRedis = {
14296
14323
  }
14297
14324
  message.is_bot = reader.bool();
14298
14325
  continue;
14326
+ case 18:
14327
+ if (tag !== 146) {
14328
+ break;
14329
+ }
14330
+ message.voip_token = reader.string();
14331
+ continue;
14299
14332
  }
14300
14333
  if ((tag & 7) === 4 || tag === 0) {
14301
14334
  break;
@@ -14322,7 +14355,8 @@ var UserProfileRedis = {
14322
14355
  mezon_id: isSet4(object.mezon_id) ? globalThis.String(object.mezon_id) : "",
14323
14356
  app_token: isSet4(object.app_token) ? globalThis.String(object.app_token) : "",
14324
14357
  app_url: isSet4(object.app_url) ? globalThis.String(object.app_url) : "",
14325
- is_bot: isSet4(object.is_bot) ? globalThis.Boolean(object.is_bot) : false
14358
+ is_bot: isSet4(object.is_bot) ? globalThis.Boolean(object.is_bot) : false,
14359
+ voip_token: isSet4(object.voip_token) ? globalThis.String(object.voip_token) : ""
14326
14360
  };
14327
14361
  },
14328
14362
  toJSON(message) {
@@ -14379,13 +14413,16 @@ var UserProfileRedis = {
14379
14413
  if (message.is_bot !== false) {
14380
14414
  obj.is_bot = message.is_bot;
14381
14415
  }
14416
+ if (message.voip_token !== "") {
14417
+ obj.voip_token = message.voip_token;
14418
+ }
14382
14419
  return obj;
14383
14420
  },
14384
14421
  create(base) {
14385
14422
  return UserProfileRedis.fromPartial(base != null ? base : {});
14386
14423
  },
14387
14424
  fromPartial(object) {
14388
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
14425
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
14389
14426
  const message = createBaseUserProfileRedis();
14390
14427
  message.user_id = (_a = object.user_id) != null ? _a : "";
14391
14428
  message.username = (_b = object.username) != null ? _b : "";
@@ -14404,6 +14441,7 @@ var UserProfileRedis = {
14404
14441
  message.app_token = (_o = object.app_token) != null ? _o : "";
14405
14442
  message.app_url = (_p = object.app_url) != null ? _p : "";
14406
14443
  message.is_bot = (_q = object.is_bot) != null ? _q : false;
14444
+ message.voip_token = (_r = object.voip_token) != null ? _r : "";
14407
14445
  return message;
14408
14446
  }
14409
14447
  };
@@ -13535,7 +13535,7 @@ var UserChannelAdded = {
13535
13535
  }
13536
13536
  };
13537
13537
  function createBaseUserChannelRemoved() {
13538
- return { channel_id: "", user_ids: [], channel_type: 0, clan_id: "" };
13538
+ return { channel_id: "", user_ids: [], channel_type: 0, clan_id: "", badge_counts: [] };
13539
13539
  }
13540
13540
  var UserChannelRemoved = {
13541
13541
  encode(message, writer = import_minimal5.default.Writer.create()) {
@@ -13551,6 +13551,11 @@ var UserChannelRemoved = {
13551
13551
  if (message.clan_id !== "") {
13552
13552
  writer.uint32(34).string(message.clan_id);
13553
13553
  }
13554
+ writer.uint32(50).fork();
13555
+ for (const v of message.badge_counts) {
13556
+ writer.int32(v);
13557
+ }
13558
+ writer.ldelim();
13554
13559
  return writer;
13555
13560
  },
13556
13561
  decode(input, length) {
@@ -13584,6 +13589,19 @@ var UserChannelRemoved = {
13584
13589
  }
13585
13590
  message.clan_id = reader.string();
13586
13591
  continue;
13592
+ case 6:
13593
+ if (tag === 48) {
13594
+ message.badge_counts.push(reader.int32());
13595
+ continue;
13596
+ }
13597
+ if (tag === 50) {
13598
+ const end2 = reader.uint32() + reader.pos;
13599
+ while (reader.pos < end2) {
13600
+ message.badge_counts.push(reader.int32());
13601
+ }
13602
+ continue;
13603
+ }
13604
+ break;
13587
13605
  }
13588
13606
  if ((tag & 7) === 4 || tag === 0) {
13589
13607
  break;
@@ -13597,11 +13615,12 @@ var UserChannelRemoved = {
13597
13615
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
13598
13616
  user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
13599
13617
  channel_type: isSet4(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
13600
- clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : ""
13618
+ clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : "",
13619
+ badge_counts: globalThis.Array.isArray(object == null ? void 0 : object.badge_counts) ? object.badge_counts.map((e) => globalThis.Number(e)) : []
13601
13620
  };
13602
13621
  },
13603
13622
  toJSON(message) {
13604
- var _a;
13623
+ var _a, _b;
13605
13624
  const obj = {};
13606
13625
  if (message.channel_id !== "") {
13607
13626
  obj.channel_id = message.channel_id;
@@ -13615,18 +13634,22 @@ var UserChannelRemoved = {
13615
13634
  if (message.clan_id !== "") {
13616
13635
  obj.clan_id = message.clan_id;
13617
13636
  }
13637
+ if ((_b = message.badge_counts) == null ? void 0 : _b.length) {
13638
+ obj.badge_counts = message.badge_counts.map((e) => Math.round(e));
13639
+ }
13618
13640
  return obj;
13619
13641
  },
13620
13642
  create(base) {
13621
13643
  return UserChannelRemoved.fromPartial(base != null ? base : {});
13622
13644
  },
13623
13645
  fromPartial(object) {
13624
- var _a, _b, _c, _d;
13646
+ var _a, _b, _c, _d, _e;
13625
13647
  const message = createBaseUserChannelRemoved();
13626
13648
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
13627
13649
  message.user_ids = ((_b = object.user_ids) == null ? void 0 : _b.map((e) => e)) || [];
13628
13650
  message.channel_type = (_c = object.channel_type) != null ? _c : 0;
13629
13651
  message.clan_id = (_d = object.clan_id) != null ? _d : "";
13652
+ message.badge_counts = ((_e = object.badge_counts) == null ? void 0 : _e.map((e) => e)) || [];
13630
13653
  return message;
13631
13654
  }
13632
13655
  };
@@ -14116,7 +14139,8 @@ function createBaseUserProfileRedis() {
14116
14139
  mezon_id: "",
14117
14140
  app_token: "",
14118
14141
  app_url: "",
14119
- is_bot: false
14142
+ is_bot: false,
14143
+ voip_token: ""
14120
14144
  };
14121
14145
  }
14122
14146
  var UserProfileRedis = {
@@ -14172,6 +14196,9 @@ var UserProfileRedis = {
14172
14196
  if (message.is_bot !== false) {
14173
14197
  writer.uint32(136).bool(message.is_bot);
14174
14198
  }
14199
+ if (message.voip_token !== "") {
14200
+ writer.uint32(146).string(message.voip_token);
14201
+ }
14175
14202
  return writer;
14176
14203
  },
14177
14204
  decode(input, length) {
@@ -14283,6 +14310,12 @@ var UserProfileRedis = {
14283
14310
  }
14284
14311
  message.is_bot = reader.bool();
14285
14312
  continue;
14313
+ case 18:
14314
+ if (tag !== 146) {
14315
+ break;
14316
+ }
14317
+ message.voip_token = reader.string();
14318
+ continue;
14286
14319
  }
14287
14320
  if ((tag & 7) === 4 || tag === 0) {
14288
14321
  break;
@@ -14309,7 +14342,8 @@ var UserProfileRedis = {
14309
14342
  mezon_id: isSet4(object.mezon_id) ? globalThis.String(object.mezon_id) : "",
14310
14343
  app_token: isSet4(object.app_token) ? globalThis.String(object.app_token) : "",
14311
14344
  app_url: isSet4(object.app_url) ? globalThis.String(object.app_url) : "",
14312
- is_bot: isSet4(object.is_bot) ? globalThis.Boolean(object.is_bot) : false
14345
+ is_bot: isSet4(object.is_bot) ? globalThis.Boolean(object.is_bot) : false,
14346
+ voip_token: isSet4(object.voip_token) ? globalThis.String(object.voip_token) : ""
14313
14347
  };
14314
14348
  },
14315
14349
  toJSON(message) {
@@ -14366,13 +14400,16 @@ var UserProfileRedis = {
14366
14400
  if (message.is_bot !== false) {
14367
14401
  obj.is_bot = message.is_bot;
14368
14402
  }
14403
+ if (message.voip_token !== "") {
14404
+ obj.voip_token = message.voip_token;
14405
+ }
14369
14406
  return obj;
14370
14407
  },
14371
14408
  create(base) {
14372
14409
  return UserProfileRedis.fromPartial(base != null ? base : {});
14373
14410
  },
14374
14411
  fromPartial(object) {
14375
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
14412
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
14376
14413
  const message = createBaseUserProfileRedis();
14377
14414
  message.user_id = (_a = object.user_id) != null ? _a : "";
14378
14415
  message.username = (_b = object.username) != null ? _b : "";
@@ -14391,6 +14428,7 @@ var UserProfileRedis = {
14391
14428
  message.app_token = (_o = object.app_token) != null ? _o : "";
14392
14429
  message.app_url = (_p = object.app_url) != null ? _p : "";
14393
14430
  message.is_bot = (_q = object.is_bot) != null ? _q : false;
14431
+ message.voip_token = (_r = object.voip_token) != null ? _r : "";
14394
14432
  return message;
14395
14433
  }
14396
14434
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
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
@@ -1195,6 +1195,7 @@ export interface UserChannelRemoved {
1195
1195
  channel_type: number;
1196
1196
  /** the clan_id */
1197
1197
  clan_id: string;
1198
+ badge_counts: number[];
1198
1199
  }
1199
1200
 
1200
1201
  /** */
@@ -1291,6 +1292,8 @@ export interface UserProfileRedis {
1291
1292
  app_url: string;
1292
1293
  /** is bot */
1293
1294
  is_bot: boolean;
1295
+ /** for call DM iOS */
1296
+ voip_token: string;
1294
1297
  }
1295
1298
 
1296
1299
  export interface FCMTokens {
@@ -9900,7 +9903,7 @@ export const UserChannelAdded = {
9900
9903
  };
9901
9904
 
9902
9905
  function createBaseUserChannelRemoved(): UserChannelRemoved {
9903
- return { channel_id: "", user_ids: [], channel_type: 0, clan_id: "" };
9906
+ return { channel_id: "", user_ids: [], channel_type: 0, clan_id: "", badge_counts: [] };
9904
9907
  }
9905
9908
 
9906
9909
  export const UserChannelRemoved = {
@@ -9917,6 +9920,11 @@ export const UserChannelRemoved = {
9917
9920
  if (message.clan_id !== "") {
9918
9921
  writer.uint32(34).string(message.clan_id);
9919
9922
  }
9923
+ writer.uint32(50).fork();
9924
+ for (const v of message.badge_counts) {
9925
+ writer.int32(v);
9926
+ }
9927
+ writer.ldelim();
9920
9928
  return writer;
9921
9929
  },
9922
9930
 
@@ -9955,6 +9963,23 @@ export const UserChannelRemoved = {
9955
9963
 
9956
9964
  message.clan_id = reader.string();
9957
9965
  continue;
9966
+ case 6:
9967
+ if (tag === 48) {
9968
+ message.badge_counts.push(reader.int32());
9969
+
9970
+ continue;
9971
+ }
9972
+
9973
+ if (tag === 50) {
9974
+ const end2 = reader.uint32() + reader.pos;
9975
+ while (reader.pos < end2) {
9976
+ message.badge_counts.push(reader.int32());
9977
+ }
9978
+
9979
+ continue;
9980
+ }
9981
+
9982
+ break;
9958
9983
  }
9959
9984
  if ((tag & 7) === 4 || tag === 0) {
9960
9985
  break;
@@ -9970,6 +9995,9 @@ export const UserChannelRemoved = {
9970
9995
  user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
9971
9996
  channel_type: isSet(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
9972
9997
  clan_id: isSet(object.clan_id) ? globalThis.String(object.clan_id) : "",
9998
+ badge_counts: globalThis.Array.isArray(object?.badge_counts)
9999
+ ? object.badge_counts.map((e: any) => globalThis.Number(e))
10000
+ : [],
9973
10001
  };
9974
10002
  },
9975
10003
 
@@ -9987,6 +10015,9 @@ export const UserChannelRemoved = {
9987
10015
  if (message.clan_id !== "") {
9988
10016
  obj.clan_id = message.clan_id;
9989
10017
  }
10018
+ if (message.badge_counts?.length) {
10019
+ obj.badge_counts = message.badge_counts.map((e) => Math.round(e));
10020
+ }
9990
10021
  return obj;
9991
10022
  },
9992
10023
 
@@ -9999,6 +10030,7 @@ export const UserChannelRemoved = {
9999
10030
  message.user_ids = object.user_ids?.map((e) => e) || [];
10000
10031
  message.channel_type = object.channel_type ?? 0;
10001
10032
  message.clan_id = object.clan_id ?? "";
10033
+ message.badge_counts = object.badge_counts?.map((e) => e) || [];
10002
10034
  return message;
10003
10035
  },
10004
10036
  };
@@ -10530,6 +10562,7 @@ function createBaseUserProfileRedis(): UserProfileRedis {
10530
10562
  app_token: "",
10531
10563
  app_url: "",
10532
10564
  is_bot: false,
10565
+ voip_token: "",
10533
10566
  };
10534
10567
  }
10535
10568
 
@@ -10586,6 +10619,9 @@ export const UserProfileRedis = {
10586
10619
  if (message.is_bot !== false) {
10587
10620
  writer.uint32(136).bool(message.is_bot);
10588
10621
  }
10622
+ if (message.voip_token !== "") {
10623
+ writer.uint32(146).string(message.voip_token);
10624
+ }
10589
10625
  return writer;
10590
10626
  },
10591
10627
 
@@ -10715,6 +10751,13 @@ export const UserProfileRedis = {
10715
10751
 
10716
10752
  message.is_bot = reader.bool();
10717
10753
  continue;
10754
+ case 18:
10755
+ if (tag !== 146) {
10756
+ break;
10757
+ }
10758
+
10759
+ message.voip_token = reader.string();
10760
+ continue;
10718
10761
  }
10719
10762
  if ((tag & 7) === 4 || tag === 0) {
10720
10763
  break;
@@ -10747,6 +10790,7 @@ export const UserProfileRedis = {
10747
10790
  app_token: isSet(object.app_token) ? globalThis.String(object.app_token) : "",
10748
10791
  app_url: isSet(object.app_url) ? globalThis.String(object.app_url) : "",
10749
10792
  is_bot: isSet(object.is_bot) ? globalThis.Boolean(object.is_bot) : false,
10793
+ voip_token: isSet(object.voip_token) ? globalThis.String(object.voip_token) : "",
10750
10794
  };
10751
10795
  },
10752
10796
 
@@ -10803,6 +10847,9 @@ export const UserProfileRedis = {
10803
10847
  if (message.is_bot !== false) {
10804
10848
  obj.is_bot = message.is_bot;
10805
10849
  }
10850
+ if (message.voip_token !== "") {
10851
+ obj.voip_token = message.voip_token;
10852
+ }
10806
10853
  return obj;
10807
10854
  },
10808
10855
 
@@ -10828,6 +10875,7 @@ export const UserProfileRedis = {
10828
10875
  message.app_token = object.app_token ?? "";
10829
10876
  message.app_url = object.app_url ?? "";
10830
10877
  message.is_bot = object.is_bot ?? false;
10878
+ message.voip_token = object.voip_token ?? "";
10831
10879
  return message;
10832
10880
  },
10833
10881
  };