mezon-js-protobuf 1.8.5 → 1.8.6

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.
@@ -6791,7 +6791,8 @@ function createBaseEnvelope() {
6791
6791
  handle_participant_meet_state_event: void 0,
6792
6792
  delete_account_event: void 0,
6793
6793
  ephemeral_message_send: void 0,
6794
- block_friend: void 0
6794
+ block_friend: void 0,
6795
+ voice_reaction_send: void 0
6795
6796
  };
6796
6797
  }
6797
6798
  var Envelope = {
@@ -7036,6 +7037,9 @@ var Envelope = {
7036
7037
  if (message.block_friend !== void 0) {
7037
7038
  BlockFriend.encode(message.block_friend, writer.uint32(642).fork()).ldelim();
7038
7039
  }
7040
+ if (message.voice_reaction_send !== void 0) {
7041
+ VoiceReactionSend.encode(message.voice_reaction_send, writer.uint32(650).fork()).ldelim();
7042
+ }
7039
7043
  return writer;
7040
7044
  },
7041
7045
  decode(input, length) {
@@ -7525,6 +7529,12 @@ var Envelope = {
7525
7529
  }
7526
7530
  message.block_friend = BlockFriend.decode(reader, reader.uint32());
7527
7531
  continue;
7532
+ case 81:
7533
+ if (tag !== 650) {
7534
+ break;
7535
+ }
7536
+ message.voice_reaction_send = VoiceReactionSend.decode(reader, reader.uint32());
7537
+ continue;
7528
7538
  }
7529
7539
  if ((tag & 7) === 4 || tag === 0) {
7530
7540
  break;
@@ -7614,7 +7624,8 @@ var Envelope = {
7614
7624
  handle_participant_meet_state_event: isSet4(object.handle_participant_meet_state_event) ? HandleParticipantMeetStateEvent.fromJSON(object.handle_participant_meet_state_event) : void 0,
7615
7625
  delete_account_event: isSet4(object.delete_account_event) ? DeleteAccountEvent.fromJSON(object.delete_account_event) : void 0,
7616
7626
  ephemeral_message_send: isSet4(object.ephemeral_message_send) ? EphemeralMessageSend.fromJSON(object.ephemeral_message_send) : void 0,
7617
- block_friend: isSet4(object.block_friend) ? BlockFriend.fromJSON(object.block_friend) : void 0
7627
+ block_friend: isSet4(object.block_friend) ? BlockFriend.fromJSON(object.block_friend) : void 0,
7628
+ voice_reaction_send: isSet4(object.voice_reaction_send) ? VoiceReactionSend.fromJSON(object.voice_reaction_send) : void 0
7618
7629
  };
7619
7630
  },
7620
7631
  toJSON(message) {
@@ -7861,6 +7872,9 @@ var Envelope = {
7861
7872
  if (message.block_friend !== void 0) {
7862
7873
  obj.block_friend = BlockFriend.toJSON(message.block_friend);
7863
7874
  }
7875
+ if (message.voice_reaction_send !== void 0) {
7876
+ obj.voice_reaction_send = VoiceReactionSend.toJSON(message.voice_reaction_send);
7877
+ }
7864
7878
  return obj;
7865
7879
  },
7866
7880
  create(base) {
@@ -7949,6 +7963,7 @@ var Envelope = {
7949
7963
  message.delete_account_event = object.delete_account_event !== void 0 && object.delete_account_event !== null ? DeleteAccountEvent.fromPartial(object.delete_account_event) : void 0;
7950
7964
  message.ephemeral_message_send = object.ephemeral_message_send !== void 0 && object.ephemeral_message_send !== null ? EphemeralMessageSend.fromPartial(object.ephemeral_message_send) : void 0;
7951
7965
  message.block_friend = object.block_friend !== void 0 && object.block_friend !== null ? BlockFriend.fromPartial(object.block_friend) : void 0;
7966
+ message.voice_reaction_send = object.voice_reaction_send !== void 0 && object.voice_reaction_send !== null ? VoiceReactionSend.fromPartial(object.voice_reaction_send) : void 0;
7952
7967
  return message;
7953
7968
  }
7954
7969
  };
@@ -9137,6 +9152,88 @@ var EphemeralMessageSend = {
9137
9152
  return message;
9138
9153
  }
9139
9154
  };
9155
+ function createBaseVoiceReactionSend() {
9156
+ return { emojis: [], channel_id: "", sender_id: "" };
9157
+ }
9158
+ var VoiceReactionSend = {
9159
+ encode(message, writer = import_minimal5.default.Writer.create()) {
9160
+ for (const v of message.emojis) {
9161
+ writer.uint32(10).string(v);
9162
+ }
9163
+ if (message.channel_id !== "") {
9164
+ writer.uint32(18).string(message.channel_id);
9165
+ }
9166
+ if (message.sender_id !== "") {
9167
+ writer.uint32(26).string(message.sender_id);
9168
+ }
9169
+ return writer;
9170
+ },
9171
+ decode(input, length) {
9172
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
9173
+ let end = length === void 0 ? reader.len : reader.pos + length;
9174
+ const message = createBaseVoiceReactionSend();
9175
+ while (reader.pos < end) {
9176
+ const tag = reader.uint32();
9177
+ switch (tag >>> 3) {
9178
+ case 1:
9179
+ if (tag !== 10) {
9180
+ break;
9181
+ }
9182
+ message.emojis.push(reader.string());
9183
+ continue;
9184
+ case 2:
9185
+ if (tag !== 18) {
9186
+ break;
9187
+ }
9188
+ message.channel_id = reader.string();
9189
+ continue;
9190
+ case 3:
9191
+ if (tag !== 26) {
9192
+ break;
9193
+ }
9194
+ message.sender_id = reader.string();
9195
+ continue;
9196
+ }
9197
+ if ((tag & 7) === 4 || tag === 0) {
9198
+ break;
9199
+ }
9200
+ reader.skipType(tag & 7);
9201
+ }
9202
+ return message;
9203
+ },
9204
+ fromJSON(object) {
9205
+ return {
9206
+ emojis: globalThis.Array.isArray(object == null ? void 0 : object.emojis) ? object.emojis.map((e) => globalThis.String(e)) : [],
9207
+ channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
9208
+ sender_id: isSet4(object.sender_id) ? globalThis.String(object.sender_id) : ""
9209
+ };
9210
+ },
9211
+ toJSON(message) {
9212
+ var _a;
9213
+ const obj = {};
9214
+ if ((_a = message.emojis) == null ? void 0 : _a.length) {
9215
+ obj.emojis = message.emojis;
9216
+ }
9217
+ if (message.channel_id !== "") {
9218
+ obj.channel_id = message.channel_id;
9219
+ }
9220
+ if (message.sender_id !== "") {
9221
+ obj.sender_id = message.sender_id;
9222
+ }
9223
+ return obj;
9224
+ },
9225
+ create(base) {
9226
+ return VoiceReactionSend.fromPartial(base != null ? base : {});
9227
+ },
9228
+ fromPartial(object) {
9229
+ var _a, _b, _c;
9230
+ const message = createBaseVoiceReactionSend();
9231
+ message.emojis = ((_a = object.emojis) == null ? void 0 : _a.map((e) => e)) || [];
9232
+ message.channel_id = (_b = object.channel_id) != null ? _b : "";
9233
+ message.sender_id = (_c = object.sender_id) != null ? _c : "";
9234
+ return message;
9235
+ }
9236
+ };
9140
9237
  function createBaseChannelMessageSend() {
9141
9238
  return {
9142
9239
  clan_id: "",
@@ -6778,7 +6778,8 @@ function createBaseEnvelope() {
6778
6778
  handle_participant_meet_state_event: void 0,
6779
6779
  delete_account_event: void 0,
6780
6780
  ephemeral_message_send: void 0,
6781
- block_friend: void 0
6781
+ block_friend: void 0,
6782
+ voice_reaction_send: void 0
6782
6783
  };
6783
6784
  }
6784
6785
  var Envelope = {
@@ -7023,6 +7024,9 @@ var Envelope = {
7023
7024
  if (message.block_friend !== void 0) {
7024
7025
  BlockFriend.encode(message.block_friend, writer.uint32(642).fork()).ldelim();
7025
7026
  }
7027
+ if (message.voice_reaction_send !== void 0) {
7028
+ VoiceReactionSend.encode(message.voice_reaction_send, writer.uint32(650).fork()).ldelim();
7029
+ }
7026
7030
  return writer;
7027
7031
  },
7028
7032
  decode(input, length) {
@@ -7512,6 +7516,12 @@ var Envelope = {
7512
7516
  }
7513
7517
  message.block_friend = BlockFriend.decode(reader, reader.uint32());
7514
7518
  continue;
7519
+ case 81:
7520
+ if (tag !== 650) {
7521
+ break;
7522
+ }
7523
+ message.voice_reaction_send = VoiceReactionSend.decode(reader, reader.uint32());
7524
+ continue;
7515
7525
  }
7516
7526
  if ((tag & 7) === 4 || tag === 0) {
7517
7527
  break;
@@ -7601,7 +7611,8 @@ var Envelope = {
7601
7611
  handle_participant_meet_state_event: isSet4(object.handle_participant_meet_state_event) ? HandleParticipantMeetStateEvent.fromJSON(object.handle_participant_meet_state_event) : void 0,
7602
7612
  delete_account_event: isSet4(object.delete_account_event) ? DeleteAccountEvent.fromJSON(object.delete_account_event) : void 0,
7603
7613
  ephemeral_message_send: isSet4(object.ephemeral_message_send) ? EphemeralMessageSend.fromJSON(object.ephemeral_message_send) : void 0,
7604
- block_friend: isSet4(object.block_friend) ? BlockFriend.fromJSON(object.block_friend) : void 0
7614
+ block_friend: isSet4(object.block_friend) ? BlockFriend.fromJSON(object.block_friend) : void 0,
7615
+ voice_reaction_send: isSet4(object.voice_reaction_send) ? VoiceReactionSend.fromJSON(object.voice_reaction_send) : void 0
7605
7616
  };
7606
7617
  },
7607
7618
  toJSON(message) {
@@ -7848,6 +7859,9 @@ var Envelope = {
7848
7859
  if (message.block_friend !== void 0) {
7849
7860
  obj.block_friend = BlockFriend.toJSON(message.block_friend);
7850
7861
  }
7862
+ if (message.voice_reaction_send !== void 0) {
7863
+ obj.voice_reaction_send = VoiceReactionSend.toJSON(message.voice_reaction_send);
7864
+ }
7851
7865
  return obj;
7852
7866
  },
7853
7867
  create(base) {
@@ -7936,6 +7950,7 @@ var Envelope = {
7936
7950
  message.delete_account_event = object.delete_account_event !== void 0 && object.delete_account_event !== null ? DeleteAccountEvent.fromPartial(object.delete_account_event) : void 0;
7937
7951
  message.ephemeral_message_send = object.ephemeral_message_send !== void 0 && object.ephemeral_message_send !== null ? EphemeralMessageSend.fromPartial(object.ephemeral_message_send) : void 0;
7938
7952
  message.block_friend = object.block_friend !== void 0 && object.block_friend !== null ? BlockFriend.fromPartial(object.block_friend) : void 0;
7953
+ message.voice_reaction_send = object.voice_reaction_send !== void 0 && object.voice_reaction_send !== null ? VoiceReactionSend.fromPartial(object.voice_reaction_send) : void 0;
7939
7954
  return message;
7940
7955
  }
7941
7956
  };
@@ -9124,6 +9139,88 @@ var EphemeralMessageSend = {
9124
9139
  return message;
9125
9140
  }
9126
9141
  };
9142
+ function createBaseVoiceReactionSend() {
9143
+ return { emojis: [], channel_id: "", sender_id: "" };
9144
+ }
9145
+ var VoiceReactionSend = {
9146
+ encode(message, writer = import_minimal5.default.Writer.create()) {
9147
+ for (const v of message.emojis) {
9148
+ writer.uint32(10).string(v);
9149
+ }
9150
+ if (message.channel_id !== "") {
9151
+ writer.uint32(18).string(message.channel_id);
9152
+ }
9153
+ if (message.sender_id !== "") {
9154
+ writer.uint32(26).string(message.sender_id);
9155
+ }
9156
+ return writer;
9157
+ },
9158
+ decode(input, length) {
9159
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
9160
+ let end = length === void 0 ? reader.len : reader.pos + length;
9161
+ const message = createBaseVoiceReactionSend();
9162
+ while (reader.pos < end) {
9163
+ const tag = reader.uint32();
9164
+ switch (tag >>> 3) {
9165
+ case 1:
9166
+ if (tag !== 10) {
9167
+ break;
9168
+ }
9169
+ message.emojis.push(reader.string());
9170
+ continue;
9171
+ case 2:
9172
+ if (tag !== 18) {
9173
+ break;
9174
+ }
9175
+ message.channel_id = reader.string();
9176
+ continue;
9177
+ case 3:
9178
+ if (tag !== 26) {
9179
+ break;
9180
+ }
9181
+ message.sender_id = reader.string();
9182
+ continue;
9183
+ }
9184
+ if ((tag & 7) === 4 || tag === 0) {
9185
+ break;
9186
+ }
9187
+ reader.skipType(tag & 7);
9188
+ }
9189
+ return message;
9190
+ },
9191
+ fromJSON(object) {
9192
+ return {
9193
+ emojis: globalThis.Array.isArray(object == null ? void 0 : object.emojis) ? object.emojis.map((e) => globalThis.String(e)) : [],
9194
+ channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
9195
+ sender_id: isSet4(object.sender_id) ? globalThis.String(object.sender_id) : ""
9196
+ };
9197
+ },
9198
+ toJSON(message) {
9199
+ var _a;
9200
+ const obj = {};
9201
+ if ((_a = message.emojis) == null ? void 0 : _a.length) {
9202
+ obj.emojis = message.emojis;
9203
+ }
9204
+ if (message.channel_id !== "") {
9205
+ obj.channel_id = message.channel_id;
9206
+ }
9207
+ if (message.sender_id !== "") {
9208
+ obj.sender_id = message.sender_id;
9209
+ }
9210
+ return obj;
9211
+ },
9212
+ create(base) {
9213
+ return VoiceReactionSend.fromPartial(base != null ? base : {});
9214
+ },
9215
+ fromPartial(object) {
9216
+ var _a, _b, _c;
9217
+ const message = createBaseVoiceReactionSend();
9218
+ message.emojis = ((_a = object.emojis) == null ? void 0 : _a.map((e) => e)) || [];
9219
+ message.channel_id = (_b = object.channel_id) != null ? _b : "";
9220
+ message.sender_id = (_c = object.sender_id) != null ? _c : "";
9221
+ return message;
9222
+ }
9223
+ };
9127
9224
  function createBaseChannelMessageSend() {
9128
9225
  return {
9129
9226
  clan_id: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
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
@@ -345,7 +345,11 @@ export interface Envelope {
345
345
  | EphemeralMessageSend
346
346
  | undefined;
347
347
  /** block friend */
348
- block_friend?: BlockFriend | undefined;
348
+ block_friend?:
349
+ | BlockFriend
350
+ | undefined;
351
+ /** voice reaction message */
352
+ voice_reaction_send?: VoiceReactionSend | undefined;
349
353
  }
350
354
 
351
355
  export interface FollowEvent {
@@ -569,6 +573,15 @@ export interface EphemeralMessageSend {
569
573
  receiver_id: string;
570
574
  }
571
575
 
576
+ export interface VoiceReactionSend {
577
+ /** list emoji */
578
+ emojis: string[];
579
+ /** channel_id */
580
+ channel_id: string;
581
+ /** sender id */
582
+ sender_id: string;
583
+ }
584
+
572
585
  /** Send a message to a realtime channel. */
573
586
  export interface ChannelMessageSend {
574
587
  /** The clan that channel belong to. */
@@ -1544,6 +1557,7 @@ function createBaseEnvelope(): Envelope {
1544
1557
  delete_account_event: undefined,
1545
1558
  ephemeral_message_send: undefined,
1546
1559
  block_friend: undefined,
1560
+ voice_reaction_send: undefined,
1547
1561
  };
1548
1562
  }
1549
1563
 
@@ -1790,6 +1804,9 @@ export const Envelope = {
1790
1804
  if (message.block_friend !== undefined) {
1791
1805
  BlockFriend.encode(message.block_friend, writer.uint32(642).fork()).ldelim();
1792
1806
  }
1807
+ if (message.voice_reaction_send !== undefined) {
1808
+ VoiceReactionSend.encode(message.voice_reaction_send, writer.uint32(650).fork()).ldelim();
1809
+ }
1793
1810
  return writer;
1794
1811
  },
1795
1812
 
@@ -2360,6 +2377,13 @@ export const Envelope = {
2360
2377
 
2361
2378
  message.block_friend = BlockFriend.decode(reader, reader.uint32());
2362
2379
  continue;
2380
+ case 81:
2381
+ if (tag !== 650) {
2382
+ break;
2383
+ }
2384
+
2385
+ message.voice_reaction_send = VoiceReactionSend.decode(reader, reader.uint32());
2386
+ continue;
2363
2387
  }
2364
2388
  if ((tag & 7) === 4 || tag === 0) {
2365
2389
  break;
@@ -2555,6 +2579,9 @@ export const Envelope = {
2555
2579
  ? EphemeralMessageSend.fromJSON(object.ephemeral_message_send)
2556
2580
  : undefined,
2557
2581
  block_friend: isSet(object.block_friend) ? BlockFriend.fromJSON(object.block_friend) : undefined,
2582
+ voice_reaction_send: isSet(object.voice_reaction_send)
2583
+ ? VoiceReactionSend.fromJSON(object.voice_reaction_send)
2584
+ : undefined,
2558
2585
  };
2559
2586
  },
2560
2587
 
@@ -2802,6 +2829,9 @@ export const Envelope = {
2802
2829
  if (message.block_friend !== undefined) {
2803
2830
  obj.block_friend = BlockFriend.toJSON(message.block_friend);
2804
2831
  }
2832
+ if (message.voice_reaction_send !== undefined) {
2833
+ obj.voice_reaction_send = VoiceReactionSend.toJSON(message.voice_reaction_send);
2834
+ }
2805
2835
  return obj;
2806
2836
  },
2807
2837
 
@@ -3067,6 +3097,9 @@ export const Envelope = {
3067
3097
  message.block_friend = (object.block_friend !== undefined && object.block_friend !== null)
3068
3098
  ? BlockFriend.fromPartial(object.block_friend)
3069
3099
  : undefined;
3100
+ message.voice_reaction_send = (object.voice_reaction_send !== undefined && object.voice_reaction_send !== null)
3101
+ ? VoiceReactionSend.fromPartial(object.voice_reaction_send)
3102
+ : undefined;
3070
3103
  return message;
3071
3104
  },
3072
3105
  };
@@ -5100,6 +5133,95 @@ export const EphemeralMessageSend = {
5100
5133
  },
5101
5134
  };
5102
5135
 
5136
+ function createBaseVoiceReactionSend(): VoiceReactionSend {
5137
+ return { emojis: [], channel_id: "", sender_id: "" };
5138
+ }
5139
+
5140
+ export const VoiceReactionSend = {
5141
+ encode(message: VoiceReactionSend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
5142
+ for (const v of message.emojis) {
5143
+ writer.uint32(10).string(v!);
5144
+ }
5145
+ if (message.channel_id !== "") {
5146
+ writer.uint32(18).string(message.channel_id);
5147
+ }
5148
+ if (message.sender_id !== "") {
5149
+ writer.uint32(26).string(message.sender_id);
5150
+ }
5151
+ return writer;
5152
+ },
5153
+
5154
+ decode(input: _m0.Reader | Uint8Array, length?: number): VoiceReactionSend {
5155
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
5156
+ let end = length === undefined ? reader.len : reader.pos + length;
5157
+ const message = createBaseVoiceReactionSend();
5158
+ while (reader.pos < end) {
5159
+ const tag = reader.uint32();
5160
+ switch (tag >>> 3) {
5161
+ case 1:
5162
+ if (tag !== 10) {
5163
+ break;
5164
+ }
5165
+
5166
+ message.emojis.push(reader.string());
5167
+ continue;
5168
+ case 2:
5169
+ if (tag !== 18) {
5170
+ break;
5171
+ }
5172
+
5173
+ message.channel_id = reader.string();
5174
+ continue;
5175
+ case 3:
5176
+ if (tag !== 26) {
5177
+ break;
5178
+ }
5179
+
5180
+ message.sender_id = reader.string();
5181
+ continue;
5182
+ }
5183
+ if ((tag & 7) === 4 || tag === 0) {
5184
+ break;
5185
+ }
5186
+ reader.skipType(tag & 7);
5187
+ }
5188
+ return message;
5189
+ },
5190
+
5191
+ fromJSON(object: any): VoiceReactionSend {
5192
+ return {
5193
+ emojis: globalThis.Array.isArray(object?.emojis) ? object.emojis.map((e: any) => globalThis.String(e)) : [],
5194
+ channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
5195
+ sender_id: isSet(object.sender_id) ? globalThis.String(object.sender_id) : "",
5196
+ };
5197
+ },
5198
+
5199
+ toJSON(message: VoiceReactionSend): unknown {
5200
+ const obj: any = {};
5201
+ if (message.emojis?.length) {
5202
+ obj.emojis = message.emojis;
5203
+ }
5204
+ if (message.channel_id !== "") {
5205
+ obj.channel_id = message.channel_id;
5206
+ }
5207
+ if (message.sender_id !== "") {
5208
+ obj.sender_id = message.sender_id;
5209
+ }
5210
+ return obj;
5211
+ },
5212
+
5213
+ create<I extends Exact<DeepPartial<VoiceReactionSend>, I>>(base?: I): VoiceReactionSend {
5214
+ return VoiceReactionSend.fromPartial(base ?? ({} as any));
5215
+ },
5216
+ fromPartial<I extends Exact<DeepPartial<VoiceReactionSend>, I>>(object: I): VoiceReactionSend {
5217
+ const message = createBaseVoiceReactionSend();
5218
+ message.emojis = object.emojis?.map((e) => e) || [];
5219
+ message.channel_id = object.channel_id ?? "";
5220
+ message.sender_id = object.sender_id ?? "";
5221
+ return message;
5222
+ },
5223
+ };
5224
+
5103
5225
  function createBaseChannelMessageSend(): ChannelMessageSend {
5104
5226
  return {
5105
5227
  clan_id: "",