mezon-js-protobuf 1.7.14 → 1.7.15

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.
@@ -6556,7 +6556,8 @@ function createBaseEnvelope() {
6556
6556
  remove_friend: void 0,
6557
6557
  webhook_event: void 0,
6558
6558
  noti_user_channel: void 0,
6559
- join_channel_app_data: void 0
6559
+ join_channel_app_data: void 0,
6560
+ canvas_event: void 0
6560
6561
  };
6561
6562
  }
6562
6563
  var Envelope = {
@@ -6780,6 +6781,9 @@ var Envelope = {
6780
6781
  if (message.join_channel_app_data !== void 0) {
6781
6782
  JoinChannelAppData.encode(message.join_channel_app_data, writer.uint32(586).fork()).ldelim();
6782
6783
  }
6784
+ if (message.canvas_event !== void 0) {
6785
+ ChannelCanvas.encode(message.canvas_event, writer.uint32(594).fork()).ldelim();
6786
+ }
6783
6787
  return writer;
6784
6788
  },
6785
6789
  decode(input, length) {
@@ -7227,6 +7231,12 @@ var Envelope = {
7227
7231
  }
7228
7232
  message.join_channel_app_data = JoinChannelAppData.decode(reader, reader.uint32());
7229
7233
  continue;
7234
+ case 74:
7235
+ if (tag !== 594) {
7236
+ break;
7237
+ }
7238
+ message.canvas_event = ChannelCanvas.decode(reader, reader.uint32());
7239
+ continue;
7230
7240
  }
7231
7241
  if ((tag & 7) === 4 || tag === 0) {
7232
7242
  break;
@@ -7309,7 +7319,8 @@ var Envelope = {
7309
7319
  remove_friend: isSet4(object.remove_friend) ? RemoveFriend.fromJSON(object.remove_friend) : void 0,
7310
7320
  webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
7311
7321
  noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0,
7312
- join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0
7322
+ join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0,
7323
+ canvas_event: isSet4(object.canvas_event) ? ChannelCanvas.fromJSON(object.canvas_event) : void 0
7313
7324
  };
7314
7325
  },
7315
7326
  toJSON(message) {
@@ -7533,6 +7544,9 @@ var Envelope = {
7533
7544
  if (message.join_channel_app_data !== void 0) {
7534
7545
  obj.join_channel_app_data = JoinChannelAppData.toJSON(message.join_channel_app_data);
7535
7546
  }
7547
+ if (message.canvas_event !== void 0) {
7548
+ obj.canvas_event = ChannelCanvas.toJSON(message.canvas_event);
7549
+ }
7536
7550
  return obj;
7537
7551
  },
7538
7552
  create(base) {
@@ -7614,6 +7628,7 @@ var Envelope = {
7614
7628
  message.webhook_event = object.webhook_event !== void 0 && object.webhook_event !== null ? Webhook.fromPartial(object.webhook_event) : void 0;
7615
7629
  message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
7616
7630
  message.join_channel_app_data = object.join_channel_app_data !== void 0 && object.join_channel_app_data !== null ? JoinChannelAppData.fromPartial(object.join_channel_app_data) : void 0;
7631
+ message.canvas_event = object.canvas_event !== void 0 && object.canvas_event !== null ? ChannelCanvas.fromPartial(object.canvas_event) : void 0;
7617
7632
  return message;
7618
7633
  }
7619
7634
  };
@@ -7654,6 +7669,166 @@ var FollowEvent = {
7654
7669
  return message;
7655
7670
  }
7656
7671
  };
7672
+ function createBaseChannelCanvas() {
7673
+ return {
7674
+ id: "",
7675
+ title: "",
7676
+ content: "",
7677
+ creator_id: "",
7678
+ editor_id: "",
7679
+ is_default: false,
7680
+ channel_id: "",
7681
+ status: 0
7682
+ };
7683
+ }
7684
+ var ChannelCanvas = {
7685
+ encode(message, writer = import_minimal5.default.Writer.create()) {
7686
+ if (message.id !== "") {
7687
+ writer.uint32(10).string(message.id);
7688
+ }
7689
+ if (message.title !== "") {
7690
+ writer.uint32(18).string(message.title);
7691
+ }
7692
+ if (message.content !== "") {
7693
+ writer.uint32(26).string(message.content);
7694
+ }
7695
+ if (message.creator_id !== "") {
7696
+ writer.uint32(34).string(message.creator_id);
7697
+ }
7698
+ if (message.editor_id !== "") {
7699
+ writer.uint32(42).string(message.editor_id);
7700
+ }
7701
+ if (message.is_default !== false) {
7702
+ writer.uint32(48).bool(message.is_default);
7703
+ }
7704
+ if (message.channel_id !== "") {
7705
+ writer.uint32(58).string(message.channel_id);
7706
+ }
7707
+ if (message.status !== 0) {
7708
+ writer.uint32(64).int32(message.status);
7709
+ }
7710
+ return writer;
7711
+ },
7712
+ decode(input, length) {
7713
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
7714
+ let end = length === void 0 ? reader.len : reader.pos + length;
7715
+ const message = createBaseChannelCanvas();
7716
+ while (reader.pos < end) {
7717
+ const tag = reader.uint32();
7718
+ switch (tag >>> 3) {
7719
+ case 1:
7720
+ if (tag !== 10) {
7721
+ break;
7722
+ }
7723
+ message.id = reader.string();
7724
+ continue;
7725
+ case 2:
7726
+ if (tag !== 18) {
7727
+ break;
7728
+ }
7729
+ message.title = reader.string();
7730
+ continue;
7731
+ case 3:
7732
+ if (tag !== 26) {
7733
+ break;
7734
+ }
7735
+ message.content = reader.string();
7736
+ continue;
7737
+ case 4:
7738
+ if (tag !== 34) {
7739
+ break;
7740
+ }
7741
+ message.creator_id = reader.string();
7742
+ continue;
7743
+ case 5:
7744
+ if (tag !== 42) {
7745
+ break;
7746
+ }
7747
+ message.editor_id = reader.string();
7748
+ continue;
7749
+ case 6:
7750
+ if (tag !== 48) {
7751
+ break;
7752
+ }
7753
+ message.is_default = reader.bool();
7754
+ continue;
7755
+ case 7:
7756
+ if (tag !== 58) {
7757
+ break;
7758
+ }
7759
+ message.channel_id = reader.string();
7760
+ continue;
7761
+ case 8:
7762
+ if (tag !== 64) {
7763
+ break;
7764
+ }
7765
+ message.status = reader.int32();
7766
+ continue;
7767
+ }
7768
+ if ((tag & 7) === 4 || tag === 0) {
7769
+ break;
7770
+ }
7771
+ reader.skipType(tag & 7);
7772
+ }
7773
+ return message;
7774
+ },
7775
+ fromJSON(object) {
7776
+ return {
7777
+ id: isSet4(object.id) ? globalThis.String(object.id) : "",
7778
+ title: isSet4(object.title) ? globalThis.String(object.title) : "",
7779
+ content: isSet4(object.content) ? globalThis.String(object.content) : "",
7780
+ creator_id: isSet4(object.creator_id) ? globalThis.String(object.creator_id) : "",
7781
+ editor_id: isSet4(object.editor_id) ? globalThis.String(object.editor_id) : "",
7782
+ is_default: isSet4(object.is_default) ? globalThis.Boolean(object.is_default) : false,
7783
+ channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
7784
+ status: isSet4(object.status) ? globalThis.Number(object.status) : 0
7785
+ };
7786
+ },
7787
+ toJSON(message) {
7788
+ const obj = {};
7789
+ if (message.id !== "") {
7790
+ obj.id = message.id;
7791
+ }
7792
+ if (message.title !== "") {
7793
+ obj.title = message.title;
7794
+ }
7795
+ if (message.content !== "") {
7796
+ obj.content = message.content;
7797
+ }
7798
+ if (message.creator_id !== "") {
7799
+ obj.creator_id = message.creator_id;
7800
+ }
7801
+ if (message.editor_id !== "") {
7802
+ obj.editor_id = message.editor_id;
7803
+ }
7804
+ if (message.is_default !== false) {
7805
+ obj.is_default = message.is_default;
7806
+ }
7807
+ if (message.channel_id !== "") {
7808
+ obj.channel_id = message.channel_id;
7809
+ }
7810
+ if (message.status !== 0) {
7811
+ obj.status = Math.round(message.status);
7812
+ }
7813
+ return obj;
7814
+ },
7815
+ create(base) {
7816
+ return ChannelCanvas.fromPartial(base != null ? base : {});
7817
+ },
7818
+ fromPartial(object) {
7819
+ var _a, _b, _c, _d, _e, _f, _g, _h;
7820
+ const message = createBaseChannelCanvas();
7821
+ message.id = (_a = object.id) != null ? _a : "";
7822
+ message.title = (_b = object.title) != null ? _b : "";
7823
+ message.content = (_c = object.content) != null ? _c : "";
7824
+ message.creator_id = (_d = object.creator_id) != null ? _d : "";
7825
+ message.editor_id = (_e = object.editor_id) != null ? _e : "";
7826
+ message.is_default = (_f = object.is_default) != null ? _f : false;
7827
+ message.channel_id = (_g = object.channel_id) != null ? _g : "";
7828
+ message.status = (_h = object.status) != null ? _h : 0;
7829
+ return message;
7830
+ }
7831
+ };
7657
7832
  function createBaseIncomingCallPush() {
7658
7833
  return { receiver_id: "", json_data: "", channel_id: "", caller_id: "" };
7659
7834
  }
@@ -6543,7 +6543,8 @@ function createBaseEnvelope() {
6543
6543
  remove_friend: void 0,
6544
6544
  webhook_event: void 0,
6545
6545
  noti_user_channel: void 0,
6546
- join_channel_app_data: void 0
6546
+ join_channel_app_data: void 0,
6547
+ canvas_event: void 0
6547
6548
  };
6548
6549
  }
6549
6550
  var Envelope = {
@@ -6767,6 +6768,9 @@ var Envelope = {
6767
6768
  if (message.join_channel_app_data !== void 0) {
6768
6769
  JoinChannelAppData.encode(message.join_channel_app_data, writer.uint32(586).fork()).ldelim();
6769
6770
  }
6771
+ if (message.canvas_event !== void 0) {
6772
+ ChannelCanvas.encode(message.canvas_event, writer.uint32(594).fork()).ldelim();
6773
+ }
6770
6774
  return writer;
6771
6775
  },
6772
6776
  decode(input, length) {
@@ -7214,6 +7218,12 @@ var Envelope = {
7214
7218
  }
7215
7219
  message.join_channel_app_data = JoinChannelAppData.decode(reader, reader.uint32());
7216
7220
  continue;
7221
+ case 74:
7222
+ if (tag !== 594) {
7223
+ break;
7224
+ }
7225
+ message.canvas_event = ChannelCanvas.decode(reader, reader.uint32());
7226
+ continue;
7217
7227
  }
7218
7228
  if ((tag & 7) === 4 || tag === 0) {
7219
7229
  break;
@@ -7296,7 +7306,8 @@ var Envelope = {
7296
7306
  remove_friend: isSet4(object.remove_friend) ? RemoveFriend.fromJSON(object.remove_friend) : void 0,
7297
7307
  webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
7298
7308
  noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0,
7299
- join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0
7309
+ join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0,
7310
+ canvas_event: isSet4(object.canvas_event) ? ChannelCanvas.fromJSON(object.canvas_event) : void 0
7300
7311
  };
7301
7312
  },
7302
7313
  toJSON(message) {
@@ -7520,6 +7531,9 @@ var Envelope = {
7520
7531
  if (message.join_channel_app_data !== void 0) {
7521
7532
  obj.join_channel_app_data = JoinChannelAppData.toJSON(message.join_channel_app_data);
7522
7533
  }
7534
+ if (message.canvas_event !== void 0) {
7535
+ obj.canvas_event = ChannelCanvas.toJSON(message.canvas_event);
7536
+ }
7523
7537
  return obj;
7524
7538
  },
7525
7539
  create(base) {
@@ -7601,6 +7615,7 @@ var Envelope = {
7601
7615
  message.webhook_event = object.webhook_event !== void 0 && object.webhook_event !== null ? Webhook.fromPartial(object.webhook_event) : void 0;
7602
7616
  message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
7603
7617
  message.join_channel_app_data = object.join_channel_app_data !== void 0 && object.join_channel_app_data !== null ? JoinChannelAppData.fromPartial(object.join_channel_app_data) : void 0;
7618
+ message.canvas_event = object.canvas_event !== void 0 && object.canvas_event !== null ? ChannelCanvas.fromPartial(object.canvas_event) : void 0;
7604
7619
  return message;
7605
7620
  }
7606
7621
  };
@@ -7641,6 +7656,166 @@ var FollowEvent = {
7641
7656
  return message;
7642
7657
  }
7643
7658
  };
7659
+ function createBaseChannelCanvas() {
7660
+ return {
7661
+ id: "",
7662
+ title: "",
7663
+ content: "",
7664
+ creator_id: "",
7665
+ editor_id: "",
7666
+ is_default: false,
7667
+ channel_id: "",
7668
+ status: 0
7669
+ };
7670
+ }
7671
+ var ChannelCanvas = {
7672
+ encode(message, writer = import_minimal5.default.Writer.create()) {
7673
+ if (message.id !== "") {
7674
+ writer.uint32(10).string(message.id);
7675
+ }
7676
+ if (message.title !== "") {
7677
+ writer.uint32(18).string(message.title);
7678
+ }
7679
+ if (message.content !== "") {
7680
+ writer.uint32(26).string(message.content);
7681
+ }
7682
+ if (message.creator_id !== "") {
7683
+ writer.uint32(34).string(message.creator_id);
7684
+ }
7685
+ if (message.editor_id !== "") {
7686
+ writer.uint32(42).string(message.editor_id);
7687
+ }
7688
+ if (message.is_default !== false) {
7689
+ writer.uint32(48).bool(message.is_default);
7690
+ }
7691
+ if (message.channel_id !== "") {
7692
+ writer.uint32(58).string(message.channel_id);
7693
+ }
7694
+ if (message.status !== 0) {
7695
+ writer.uint32(64).int32(message.status);
7696
+ }
7697
+ return writer;
7698
+ },
7699
+ decode(input, length) {
7700
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
7701
+ let end = length === void 0 ? reader.len : reader.pos + length;
7702
+ const message = createBaseChannelCanvas();
7703
+ while (reader.pos < end) {
7704
+ const tag = reader.uint32();
7705
+ switch (tag >>> 3) {
7706
+ case 1:
7707
+ if (tag !== 10) {
7708
+ break;
7709
+ }
7710
+ message.id = reader.string();
7711
+ continue;
7712
+ case 2:
7713
+ if (tag !== 18) {
7714
+ break;
7715
+ }
7716
+ message.title = reader.string();
7717
+ continue;
7718
+ case 3:
7719
+ if (tag !== 26) {
7720
+ break;
7721
+ }
7722
+ message.content = reader.string();
7723
+ continue;
7724
+ case 4:
7725
+ if (tag !== 34) {
7726
+ break;
7727
+ }
7728
+ message.creator_id = reader.string();
7729
+ continue;
7730
+ case 5:
7731
+ if (tag !== 42) {
7732
+ break;
7733
+ }
7734
+ message.editor_id = reader.string();
7735
+ continue;
7736
+ case 6:
7737
+ if (tag !== 48) {
7738
+ break;
7739
+ }
7740
+ message.is_default = reader.bool();
7741
+ continue;
7742
+ case 7:
7743
+ if (tag !== 58) {
7744
+ break;
7745
+ }
7746
+ message.channel_id = reader.string();
7747
+ continue;
7748
+ case 8:
7749
+ if (tag !== 64) {
7750
+ break;
7751
+ }
7752
+ message.status = reader.int32();
7753
+ continue;
7754
+ }
7755
+ if ((tag & 7) === 4 || tag === 0) {
7756
+ break;
7757
+ }
7758
+ reader.skipType(tag & 7);
7759
+ }
7760
+ return message;
7761
+ },
7762
+ fromJSON(object) {
7763
+ return {
7764
+ id: isSet4(object.id) ? globalThis.String(object.id) : "",
7765
+ title: isSet4(object.title) ? globalThis.String(object.title) : "",
7766
+ content: isSet4(object.content) ? globalThis.String(object.content) : "",
7767
+ creator_id: isSet4(object.creator_id) ? globalThis.String(object.creator_id) : "",
7768
+ editor_id: isSet4(object.editor_id) ? globalThis.String(object.editor_id) : "",
7769
+ is_default: isSet4(object.is_default) ? globalThis.Boolean(object.is_default) : false,
7770
+ channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
7771
+ status: isSet4(object.status) ? globalThis.Number(object.status) : 0
7772
+ };
7773
+ },
7774
+ toJSON(message) {
7775
+ const obj = {};
7776
+ if (message.id !== "") {
7777
+ obj.id = message.id;
7778
+ }
7779
+ if (message.title !== "") {
7780
+ obj.title = message.title;
7781
+ }
7782
+ if (message.content !== "") {
7783
+ obj.content = message.content;
7784
+ }
7785
+ if (message.creator_id !== "") {
7786
+ obj.creator_id = message.creator_id;
7787
+ }
7788
+ if (message.editor_id !== "") {
7789
+ obj.editor_id = message.editor_id;
7790
+ }
7791
+ if (message.is_default !== false) {
7792
+ obj.is_default = message.is_default;
7793
+ }
7794
+ if (message.channel_id !== "") {
7795
+ obj.channel_id = message.channel_id;
7796
+ }
7797
+ if (message.status !== 0) {
7798
+ obj.status = Math.round(message.status);
7799
+ }
7800
+ return obj;
7801
+ },
7802
+ create(base) {
7803
+ return ChannelCanvas.fromPartial(base != null ? base : {});
7804
+ },
7805
+ fromPartial(object) {
7806
+ var _a, _b, _c, _d, _e, _f, _g, _h;
7807
+ const message = createBaseChannelCanvas();
7808
+ message.id = (_a = object.id) != null ? _a : "";
7809
+ message.title = (_b = object.title) != null ? _b : "";
7810
+ message.content = (_c = object.content) != null ? _c : "";
7811
+ message.creator_id = (_d = object.creator_id) != null ? _d : "";
7812
+ message.editor_id = (_e = object.editor_id) != null ? _e : "";
7813
+ message.is_default = (_f = object.is_default) != null ? _f : false;
7814
+ message.channel_id = (_g = object.channel_id) != null ? _g : "";
7815
+ message.status = (_h = object.status) != null ? _h : 0;
7816
+ return message;
7817
+ }
7818
+ };
7644
7819
  function createBaseIncomingCallPush() {
7645
7820
  return { receiver_id: "", json_data: "", channel_id: "", caller_id: "" };
7646
7821
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.7.14",
3
+ "version": "1.7.15",
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",