mezon-js-protobuf 1.8.23 → 1.8.24

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.
@@ -6376,7 +6376,9 @@ function createBaseClanDesc() {
6376
6376
  is_onboarding: false,
6377
6377
  welcome_channel_id: "",
6378
6378
  onboarding_banner: "",
6379
- clan_order: 0
6379
+ clan_order: 0,
6380
+ is_community: false,
6381
+ community_banner: ""
6380
6382
  };
6381
6383
  }
6382
6384
  var ClanDesc = {
@@ -6414,6 +6416,12 @@ var ClanDesc = {
6414
6416
  if (message.clan_order !== 0) {
6415
6417
  writer.uint32(88).int32(message.clan_order);
6416
6418
  }
6419
+ if (message.is_community !== false) {
6420
+ writer.uint32(96).bool(message.is_community);
6421
+ }
6422
+ if (message.community_banner !== "") {
6423
+ writer.uint32(106).string(message.community_banner);
6424
+ }
6417
6425
  return writer;
6418
6426
  },
6419
6427
  decode(input, length) {
@@ -6489,6 +6497,18 @@ var ClanDesc = {
6489
6497
  }
6490
6498
  message.clan_order = reader.int32();
6491
6499
  continue;
6500
+ case 12:
6501
+ if (tag !== 96) {
6502
+ break;
6503
+ }
6504
+ message.is_community = reader.bool();
6505
+ continue;
6506
+ case 13:
6507
+ if (tag !== 106) {
6508
+ break;
6509
+ }
6510
+ message.community_banner = reader.string();
6511
+ continue;
6492
6512
  }
6493
6513
  if ((tag & 7) === 4 || tag === 0) {
6494
6514
  break;
@@ -6509,7 +6529,9 @@ var ClanDesc = {
6509
6529
  is_onboarding: isSet3(object.is_onboarding) ? globalThis.Boolean(object.is_onboarding) : false,
6510
6530
  welcome_channel_id: isSet3(object.welcome_channel_id) ? globalThis.String(object.welcome_channel_id) : "",
6511
6531
  onboarding_banner: isSet3(object.onboarding_banner) ? globalThis.String(object.onboarding_banner) : "",
6512
- clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0
6532
+ clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0,
6533
+ is_community: isSet3(object.is_community) ? globalThis.Boolean(object.is_community) : false,
6534
+ community_banner: isSet3(object.community_banner) ? globalThis.String(object.community_banner) : ""
6513
6535
  };
6514
6536
  },
6515
6537
  toJSON(message) {
@@ -6547,13 +6569,19 @@ var ClanDesc = {
6547
6569
  if (message.clan_order !== 0) {
6548
6570
  obj.clan_order = Math.round(message.clan_order);
6549
6571
  }
6572
+ if (message.is_community !== false) {
6573
+ obj.is_community = message.is_community;
6574
+ }
6575
+ if (message.community_banner !== "") {
6576
+ obj.community_banner = message.community_banner;
6577
+ }
6550
6578
  return obj;
6551
6579
  },
6552
6580
  create(base) {
6553
6581
  return ClanDesc.fromPartial(base != null ? base : {});
6554
6582
  },
6555
6583
  fromPartial(object) {
6556
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
6584
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
6557
6585
  const message = createBaseClanDesc();
6558
6586
  message.creator_id = (_a = object.creator_id) != null ? _a : "";
6559
6587
  message.clan_name = (_b = object.clan_name) != null ? _b : "";
@@ -6566,6 +6594,8 @@ var ClanDesc = {
6566
6594
  message.welcome_channel_id = (_i = object.welcome_channel_id) != null ? _i : "";
6567
6595
  message.onboarding_banner = (_j = object.onboarding_banner) != null ? _j : "";
6568
6596
  message.clan_order = (_k = object.clan_order) != null ? _k : 0;
6597
+ message.is_community = (_l = object.is_community) != null ? _l : false;
6598
+ message.community_banner = (_m = object.community_banner) != null ? _m : "";
6569
6599
  return message;
6570
6600
  }
6571
6601
  };
@@ -20471,7 +20501,9 @@ function createBaseChannelUpdatedEvent() {
20471
20501
  topic: "",
20472
20502
  age_restricted: 0,
20473
20503
  active: 0,
20474
- count_mess_unread: 0
20504
+ count_mess_unread: 0,
20505
+ user_ids: [],
20506
+ role_ids: []
20475
20507
  };
20476
20508
  }
20477
20509
  var ChannelUpdatedEvent = {
@@ -20527,6 +20559,12 @@ var ChannelUpdatedEvent = {
20527
20559
  if (message.count_mess_unread !== 0) {
20528
20560
  writer.uint32(136).int32(message.count_mess_unread);
20529
20561
  }
20562
+ for (const v of message.user_ids) {
20563
+ writer.uint32(146).string(v);
20564
+ }
20565
+ for (const v of message.role_ids) {
20566
+ writer.uint32(154).string(v);
20567
+ }
20530
20568
  return writer;
20531
20569
  },
20532
20570
  decode(input, length) {
@@ -20638,6 +20676,18 @@ var ChannelUpdatedEvent = {
20638
20676
  }
20639
20677
  message.count_mess_unread = reader.int32();
20640
20678
  continue;
20679
+ case 18:
20680
+ if (tag !== 146) {
20681
+ break;
20682
+ }
20683
+ message.user_ids.push(reader.string());
20684
+ continue;
20685
+ case 19:
20686
+ if (tag !== 154) {
20687
+ break;
20688
+ }
20689
+ message.role_ids.push(reader.string());
20690
+ continue;
20641
20691
  }
20642
20692
  if ((tag & 7) === 4 || tag === 0) {
20643
20693
  break;
@@ -20664,10 +20714,13 @@ var ChannelUpdatedEvent = {
20664
20714
  topic: isSet4(object.topic) ? globalThis.String(object.topic) : "",
20665
20715
  age_restricted: isSet4(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
20666
20716
  active: isSet4(object.active) ? globalThis.Number(object.active) : 0,
20667
- count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0
20717
+ count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
20718
+ user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
20719
+ role_ids: globalThis.Array.isArray(object == null ? void 0 : object.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : []
20668
20720
  };
20669
20721
  },
20670
20722
  toJSON(message) {
20723
+ var _a, _b;
20671
20724
  const obj = {};
20672
20725
  if (message.clan_id !== "") {
20673
20726
  obj.clan_id = message.clan_id;
@@ -20720,13 +20773,19 @@ var ChannelUpdatedEvent = {
20720
20773
  if (message.count_mess_unread !== 0) {
20721
20774
  obj.count_mess_unread = Math.round(message.count_mess_unread);
20722
20775
  }
20776
+ if ((_a = message.user_ids) == null ? void 0 : _a.length) {
20777
+ obj.user_ids = message.user_ids;
20778
+ }
20779
+ if ((_b = message.role_ids) == null ? void 0 : _b.length) {
20780
+ obj.role_ids = message.role_ids;
20781
+ }
20723
20782
  return obj;
20724
20783
  },
20725
20784
  create(base) {
20726
20785
  return ChannelUpdatedEvent.fromPartial(base != null ? base : {});
20727
20786
  },
20728
20787
  fromPartial(object) {
20729
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
20788
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
20730
20789
  const message = createBaseChannelUpdatedEvent();
20731
20790
  message.clan_id = (_a = object.clan_id) != null ? _a : "";
20732
20791
  message.category_id = (_b = object.category_id) != null ? _b : "";
@@ -20745,6 +20804,8 @@ var ChannelUpdatedEvent = {
20745
20804
  message.age_restricted = (_o = object.age_restricted) != null ? _o : 0;
20746
20805
  message.active = (_p = object.active) != null ? _p : 0;
20747
20806
  message.count_mess_unread = (_q = object.count_mess_unread) != null ? _q : 0;
20807
+ message.user_ids = ((_r = object.user_ids) == null ? void 0 : _r.map((e) => e)) || [];
20808
+ message.role_ids = ((_s = object.role_ids) == null ? void 0 : _s.map((e) => e)) || [];
20748
20809
  return message;
20749
20810
  }
20750
20811
  };
@@ -6363,7 +6363,9 @@ function createBaseClanDesc() {
6363
6363
  is_onboarding: false,
6364
6364
  welcome_channel_id: "",
6365
6365
  onboarding_banner: "",
6366
- clan_order: 0
6366
+ clan_order: 0,
6367
+ is_community: false,
6368
+ community_banner: ""
6367
6369
  };
6368
6370
  }
6369
6371
  var ClanDesc = {
@@ -6401,6 +6403,12 @@ var ClanDesc = {
6401
6403
  if (message.clan_order !== 0) {
6402
6404
  writer.uint32(88).int32(message.clan_order);
6403
6405
  }
6406
+ if (message.is_community !== false) {
6407
+ writer.uint32(96).bool(message.is_community);
6408
+ }
6409
+ if (message.community_banner !== "") {
6410
+ writer.uint32(106).string(message.community_banner);
6411
+ }
6404
6412
  return writer;
6405
6413
  },
6406
6414
  decode(input, length) {
@@ -6476,6 +6484,18 @@ var ClanDesc = {
6476
6484
  }
6477
6485
  message.clan_order = reader.int32();
6478
6486
  continue;
6487
+ case 12:
6488
+ if (tag !== 96) {
6489
+ break;
6490
+ }
6491
+ message.is_community = reader.bool();
6492
+ continue;
6493
+ case 13:
6494
+ if (tag !== 106) {
6495
+ break;
6496
+ }
6497
+ message.community_banner = reader.string();
6498
+ continue;
6479
6499
  }
6480
6500
  if ((tag & 7) === 4 || tag === 0) {
6481
6501
  break;
@@ -6496,7 +6516,9 @@ var ClanDesc = {
6496
6516
  is_onboarding: isSet3(object.is_onboarding) ? globalThis.Boolean(object.is_onboarding) : false,
6497
6517
  welcome_channel_id: isSet3(object.welcome_channel_id) ? globalThis.String(object.welcome_channel_id) : "",
6498
6518
  onboarding_banner: isSet3(object.onboarding_banner) ? globalThis.String(object.onboarding_banner) : "",
6499
- clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0
6519
+ clan_order: isSet3(object.clan_order) ? globalThis.Number(object.clan_order) : 0,
6520
+ is_community: isSet3(object.is_community) ? globalThis.Boolean(object.is_community) : false,
6521
+ community_banner: isSet3(object.community_banner) ? globalThis.String(object.community_banner) : ""
6500
6522
  };
6501
6523
  },
6502
6524
  toJSON(message) {
@@ -6534,13 +6556,19 @@ var ClanDesc = {
6534
6556
  if (message.clan_order !== 0) {
6535
6557
  obj.clan_order = Math.round(message.clan_order);
6536
6558
  }
6559
+ if (message.is_community !== false) {
6560
+ obj.is_community = message.is_community;
6561
+ }
6562
+ if (message.community_banner !== "") {
6563
+ obj.community_banner = message.community_banner;
6564
+ }
6537
6565
  return obj;
6538
6566
  },
6539
6567
  create(base) {
6540
6568
  return ClanDesc.fromPartial(base != null ? base : {});
6541
6569
  },
6542
6570
  fromPartial(object) {
6543
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
6571
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
6544
6572
  const message = createBaseClanDesc();
6545
6573
  message.creator_id = (_a = object.creator_id) != null ? _a : "";
6546
6574
  message.clan_name = (_b = object.clan_name) != null ? _b : "";
@@ -6553,6 +6581,8 @@ var ClanDesc = {
6553
6581
  message.welcome_channel_id = (_i = object.welcome_channel_id) != null ? _i : "";
6554
6582
  message.onboarding_banner = (_j = object.onboarding_banner) != null ? _j : "";
6555
6583
  message.clan_order = (_k = object.clan_order) != null ? _k : 0;
6584
+ message.is_community = (_l = object.is_community) != null ? _l : false;
6585
+ message.community_banner = (_m = object.community_banner) != null ? _m : "";
6556
6586
  return message;
6557
6587
  }
6558
6588
  };
@@ -20458,7 +20488,9 @@ function createBaseChannelUpdatedEvent() {
20458
20488
  topic: "",
20459
20489
  age_restricted: 0,
20460
20490
  active: 0,
20461
- count_mess_unread: 0
20491
+ count_mess_unread: 0,
20492
+ user_ids: [],
20493
+ role_ids: []
20462
20494
  };
20463
20495
  }
20464
20496
  var ChannelUpdatedEvent = {
@@ -20514,6 +20546,12 @@ var ChannelUpdatedEvent = {
20514
20546
  if (message.count_mess_unread !== 0) {
20515
20547
  writer.uint32(136).int32(message.count_mess_unread);
20516
20548
  }
20549
+ for (const v of message.user_ids) {
20550
+ writer.uint32(146).string(v);
20551
+ }
20552
+ for (const v of message.role_ids) {
20553
+ writer.uint32(154).string(v);
20554
+ }
20517
20555
  return writer;
20518
20556
  },
20519
20557
  decode(input, length) {
@@ -20625,6 +20663,18 @@ var ChannelUpdatedEvent = {
20625
20663
  }
20626
20664
  message.count_mess_unread = reader.int32();
20627
20665
  continue;
20666
+ case 18:
20667
+ if (tag !== 146) {
20668
+ break;
20669
+ }
20670
+ message.user_ids.push(reader.string());
20671
+ continue;
20672
+ case 19:
20673
+ if (tag !== 154) {
20674
+ break;
20675
+ }
20676
+ message.role_ids.push(reader.string());
20677
+ continue;
20628
20678
  }
20629
20679
  if ((tag & 7) === 4 || tag === 0) {
20630
20680
  break;
@@ -20651,10 +20701,13 @@ var ChannelUpdatedEvent = {
20651
20701
  topic: isSet4(object.topic) ? globalThis.String(object.topic) : "",
20652
20702
  age_restricted: isSet4(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
20653
20703
  active: isSet4(object.active) ? globalThis.Number(object.active) : 0,
20654
- count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0
20704
+ count_mess_unread: isSet4(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
20705
+ user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
20706
+ role_ids: globalThis.Array.isArray(object == null ? void 0 : object.role_ids) ? object.role_ids.map((e) => globalThis.String(e)) : []
20655
20707
  };
20656
20708
  },
20657
20709
  toJSON(message) {
20710
+ var _a, _b;
20658
20711
  const obj = {};
20659
20712
  if (message.clan_id !== "") {
20660
20713
  obj.clan_id = message.clan_id;
@@ -20707,13 +20760,19 @@ var ChannelUpdatedEvent = {
20707
20760
  if (message.count_mess_unread !== 0) {
20708
20761
  obj.count_mess_unread = Math.round(message.count_mess_unread);
20709
20762
  }
20763
+ if ((_a = message.user_ids) == null ? void 0 : _a.length) {
20764
+ obj.user_ids = message.user_ids;
20765
+ }
20766
+ if ((_b = message.role_ids) == null ? void 0 : _b.length) {
20767
+ obj.role_ids = message.role_ids;
20768
+ }
20710
20769
  return obj;
20711
20770
  },
20712
20771
  create(base) {
20713
20772
  return ChannelUpdatedEvent.fromPartial(base != null ? base : {});
20714
20773
  },
20715
20774
  fromPartial(object) {
20716
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
20775
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
20717
20776
  const message = createBaseChannelUpdatedEvent();
20718
20777
  message.clan_id = (_a = object.clan_id) != null ? _a : "";
20719
20778
  message.category_id = (_b = object.category_id) != null ? _b : "";
@@ -20732,6 +20791,8 @@ var ChannelUpdatedEvent = {
20732
20791
  message.age_restricted = (_o = object.age_restricted) != null ? _o : 0;
20733
20792
  message.active = (_p = object.active) != null ? _p : 0;
20734
20793
  message.count_mess_unread = (_q = object.count_mess_unread) != null ? _q : 0;
20794
+ message.user_ids = ((_r = object.user_ids) == null ? void 0 : _r.map((e) => e)) || [];
20795
+ message.role_ids = ((_s = object.role_ids) == null ? void 0 : _s.map((e) => e)) || [];
20735
20796
  return message;
20736
20797
  }
20737
20798
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.8.23",
3
+ "version": "1.8.24",
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
@@ -1210,6 +1210,10 @@ export interface ChannelUpdatedEvent {
1210
1210
  active: number;
1211
1211
  /** count message unread */
1212
1212
  count_mess_unread: number;
1213
+ /** The users to add. */
1214
+ user_ids: string[];
1215
+ /** This is the role that needs to be added to the channel */
1216
+ role_ids: string[];
1213
1217
  }
1214
1218
 
1215
1219
  /** Stop receiving status updates for some set of users. */
@@ -9569,6 +9573,8 @@ function createBaseChannelUpdatedEvent(): ChannelUpdatedEvent {
9569
9573
  age_restricted: 0,
9570
9574
  active: 0,
9571
9575
  count_mess_unread: 0,
9576
+ user_ids: [],
9577
+ role_ids: [],
9572
9578
  };
9573
9579
  }
9574
9580
 
@@ -9625,6 +9631,12 @@ export const ChannelUpdatedEvent = {
9625
9631
  if (message.count_mess_unread !== 0) {
9626
9632
  writer.uint32(136).int32(message.count_mess_unread);
9627
9633
  }
9634
+ for (const v of message.user_ids) {
9635
+ writer.uint32(146).string(v!);
9636
+ }
9637
+ for (const v of message.role_ids) {
9638
+ writer.uint32(154).string(v!);
9639
+ }
9628
9640
  return writer;
9629
9641
  },
9630
9642
 
@@ -9754,6 +9766,20 @@ export const ChannelUpdatedEvent = {
9754
9766
 
9755
9767
  message.count_mess_unread = reader.int32();
9756
9768
  continue;
9769
+ case 18:
9770
+ if (tag !== 146) {
9771
+ break;
9772
+ }
9773
+
9774
+ message.user_ids.push(reader.string());
9775
+ continue;
9776
+ case 19:
9777
+ if (tag !== 154) {
9778
+ break;
9779
+ }
9780
+
9781
+ message.role_ids.push(reader.string());
9782
+ continue;
9757
9783
  }
9758
9784
  if ((tag & 7) === 4 || tag === 0) {
9759
9785
  break;
@@ -9782,6 +9808,8 @@ export const ChannelUpdatedEvent = {
9782
9808
  age_restricted: isSet(object.age_restricted) ? globalThis.Number(object.age_restricted) : 0,
9783
9809
  active: isSet(object.active) ? globalThis.Number(object.active) : 0,
9784
9810
  count_mess_unread: isSet(object.count_mess_unread) ? globalThis.Number(object.count_mess_unread) : 0,
9811
+ user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
9812
+ role_ids: globalThis.Array.isArray(object?.role_ids) ? object.role_ids.map((e: any) => globalThis.String(e)) : [],
9785
9813
  };
9786
9814
  },
9787
9815
 
@@ -9838,6 +9866,12 @@ export const ChannelUpdatedEvent = {
9838
9866
  if (message.count_mess_unread !== 0) {
9839
9867
  obj.count_mess_unread = Math.round(message.count_mess_unread);
9840
9868
  }
9869
+ if (message.user_ids?.length) {
9870
+ obj.user_ids = message.user_ids;
9871
+ }
9872
+ if (message.role_ids?.length) {
9873
+ obj.role_ids = message.role_ids;
9874
+ }
9841
9875
  return obj;
9842
9876
  },
9843
9877
 
@@ -9863,6 +9897,8 @@ export const ChannelUpdatedEvent = {
9863
9897
  message.age_restricted = object.age_restricted ?? 0;
9864
9898
  message.active = object.active ?? 0;
9865
9899
  message.count_mess_unread = object.count_mess_unread ?? 0;
9900
+ message.user_ids = object.user_ids?.map((e) => e) || [];
9901
+ message.role_ids = object.role_ids?.map((e) => e) || [];
9866
9902
  return message;
9867
9903
  },
9868
9904
  };