mezon-js-protobuf 1.8.4 → 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.
- package/api/api.ts +21 -2
- package/dist/mezon-js-protobuf/api/api.d.ts +16 -0
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +261 -161
- package/dist/mezon-js-protobuf.cjs.js +165 -2
- package/dist/mezon-js-protobuf.esm.mjs +165 -2
- package/package.json +1 -1
- package/rtapi/realtime.ts +207 -1
package/rtapi/realtime.ts
CHANGED
|
@@ -341,7 +341,15 @@ export interface Envelope {
|
|
|
341
341
|
| DeleteAccountEvent
|
|
342
342
|
| undefined;
|
|
343
343
|
/** ephemeral message send */
|
|
344
|
-
ephemeral_message_send?:
|
|
344
|
+
ephemeral_message_send?:
|
|
345
|
+
| EphemeralMessageSend
|
|
346
|
+
| undefined;
|
|
347
|
+
/** block friend */
|
|
348
|
+
block_friend?:
|
|
349
|
+
| BlockFriend
|
|
350
|
+
| undefined;
|
|
351
|
+
/** voice reaction message */
|
|
352
|
+
voice_reaction_send?: VoiceReactionSend | undefined;
|
|
345
353
|
}
|
|
346
354
|
|
|
347
355
|
export interface FollowEvent {
|
|
@@ -565,6 +573,15 @@ export interface EphemeralMessageSend {
|
|
|
565
573
|
receiver_id: string;
|
|
566
574
|
}
|
|
567
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
|
+
|
|
568
585
|
/** Send a message to a realtime channel. */
|
|
569
586
|
export interface ChannelMessageSend {
|
|
570
587
|
/** The clan that channel belong to. */
|
|
@@ -759,6 +776,11 @@ export interface RemoveFriend {
|
|
|
759
776
|
user_id: string;
|
|
760
777
|
}
|
|
761
778
|
|
|
779
|
+
export interface BlockFriend {
|
|
780
|
+
/** */
|
|
781
|
+
user_id: string;
|
|
782
|
+
}
|
|
783
|
+
|
|
762
784
|
/** Application-level heartbeat and connection check. */
|
|
763
785
|
export interface Ping {
|
|
764
786
|
}
|
|
@@ -1534,6 +1556,8 @@ function createBaseEnvelope(): Envelope {
|
|
|
1534
1556
|
handle_participant_meet_state_event: undefined,
|
|
1535
1557
|
delete_account_event: undefined,
|
|
1536
1558
|
ephemeral_message_send: undefined,
|
|
1559
|
+
block_friend: undefined,
|
|
1560
|
+
voice_reaction_send: undefined,
|
|
1537
1561
|
};
|
|
1538
1562
|
}
|
|
1539
1563
|
|
|
@@ -1777,6 +1801,12 @@ export const Envelope = {
|
|
|
1777
1801
|
if (message.ephemeral_message_send !== undefined) {
|
|
1778
1802
|
EphemeralMessageSend.encode(message.ephemeral_message_send, writer.uint32(634).fork()).ldelim();
|
|
1779
1803
|
}
|
|
1804
|
+
if (message.block_friend !== undefined) {
|
|
1805
|
+
BlockFriend.encode(message.block_friend, writer.uint32(642).fork()).ldelim();
|
|
1806
|
+
}
|
|
1807
|
+
if (message.voice_reaction_send !== undefined) {
|
|
1808
|
+
VoiceReactionSend.encode(message.voice_reaction_send, writer.uint32(650).fork()).ldelim();
|
|
1809
|
+
}
|
|
1780
1810
|
return writer;
|
|
1781
1811
|
},
|
|
1782
1812
|
|
|
@@ -2340,6 +2370,20 @@ export const Envelope = {
|
|
|
2340
2370
|
|
|
2341
2371
|
message.ephemeral_message_send = EphemeralMessageSend.decode(reader, reader.uint32());
|
|
2342
2372
|
continue;
|
|
2373
|
+
case 80:
|
|
2374
|
+
if (tag !== 642) {
|
|
2375
|
+
break;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
message.block_friend = BlockFriend.decode(reader, reader.uint32());
|
|
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;
|
|
2343
2387
|
}
|
|
2344
2388
|
if ((tag & 7) === 4 || tag === 0) {
|
|
2345
2389
|
break;
|
|
@@ -2534,6 +2578,10 @@ export const Envelope = {
|
|
|
2534
2578
|
ephemeral_message_send: isSet(object.ephemeral_message_send)
|
|
2535
2579
|
? EphemeralMessageSend.fromJSON(object.ephemeral_message_send)
|
|
2536
2580
|
: undefined,
|
|
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,
|
|
2537
2585
|
};
|
|
2538
2586
|
},
|
|
2539
2587
|
|
|
@@ -2778,6 +2826,12 @@ export const Envelope = {
|
|
|
2778
2826
|
if (message.ephemeral_message_send !== undefined) {
|
|
2779
2827
|
obj.ephemeral_message_send = EphemeralMessageSend.toJSON(message.ephemeral_message_send);
|
|
2780
2828
|
}
|
|
2829
|
+
if (message.block_friend !== undefined) {
|
|
2830
|
+
obj.block_friend = BlockFriend.toJSON(message.block_friend);
|
|
2831
|
+
}
|
|
2832
|
+
if (message.voice_reaction_send !== undefined) {
|
|
2833
|
+
obj.voice_reaction_send = VoiceReactionSend.toJSON(message.voice_reaction_send);
|
|
2834
|
+
}
|
|
2781
2835
|
return obj;
|
|
2782
2836
|
},
|
|
2783
2837
|
|
|
@@ -3040,6 +3094,12 @@ export const Envelope = {
|
|
|
3040
3094
|
(object.ephemeral_message_send !== undefined && object.ephemeral_message_send !== null)
|
|
3041
3095
|
? EphemeralMessageSend.fromPartial(object.ephemeral_message_send)
|
|
3042
3096
|
: undefined;
|
|
3097
|
+
message.block_friend = (object.block_friend !== undefined && object.block_friend !== null)
|
|
3098
|
+
? BlockFriend.fromPartial(object.block_friend)
|
|
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;
|
|
3043
3103
|
return message;
|
|
3044
3104
|
},
|
|
3045
3105
|
};
|
|
@@ -5073,6 +5133,95 @@ export const EphemeralMessageSend = {
|
|
|
5073
5133
|
},
|
|
5074
5134
|
};
|
|
5075
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
|
+
|
|
5076
5225
|
function createBaseChannelMessageSend(): ChannelMessageSend {
|
|
5077
5226
|
return {
|
|
5078
5227
|
clan_id: "",
|
|
@@ -6148,6 +6297,63 @@ export const RemoveFriend = {
|
|
|
6148
6297
|
},
|
|
6149
6298
|
};
|
|
6150
6299
|
|
|
6300
|
+
function createBaseBlockFriend(): BlockFriend {
|
|
6301
|
+
return { user_id: "" };
|
|
6302
|
+
}
|
|
6303
|
+
|
|
6304
|
+
export const BlockFriend = {
|
|
6305
|
+
encode(message: BlockFriend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
6306
|
+
if (message.user_id !== "") {
|
|
6307
|
+
writer.uint32(10).string(message.user_id);
|
|
6308
|
+
}
|
|
6309
|
+
return writer;
|
|
6310
|
+
},
|
|
6311
|
+
|
|
6312
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BlockFriend {
|
|
6313
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
6314
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
6315
|
+
const message = createBaseBlockFriend();
|
|
6316
|
+
while (reader.pos < end) {
|
|
6317
|
+
const tag = reader.uint32();
|
|
6318
|
+
switch (tag >>> 3) {
|
|
6319
|
+
case 1:
|
|
6320
|
+
if (tag !== 10) {
|
|
6321
|
+
break;
|
|
6322
|
+
}
|
|
6323
|
+
|
|
6324
|
+
message.user_id = reader.string();
|
|
6325
|
+
continue;
|
|
6326
|
+
}
|
|
6327
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6328
|
+
break;
|
|
6329
|
+
}
|
|
6330
|
+
reader.skipType(tag & 7);
|
|
6331
|
+
}
|
|
6332
|
+
return message;
|
|
6333
|
+
},
|
|
6334
|
+
|
|
6335
|
+
fromJSON(object: any): BlockFriend {
|
|
6336
|
+
return { user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "" };
|
|
6337
|
+
},
|
|
6338
|
+
|
|
6339
|
+
toJSON(message: BlockFriend): unknown {
|
|
6340
|
+
const obj: any = {};
|
|
6341
|
+
if (message.user_id !== "") {
|
|
6342
|
+
obj.user_id = message.user_id;
|
|
6343
|
+
}
|
|
6344
|
+
return obj;
|
|
6345
|
+
},
|
|
6346
|
+
|
|
6347
|
+
create<I extends Exact<DeepPartial<BlockFriend>, I>>(base?: I): BlockFriend {
|
|
6348
|
+
return BlockFriend.fromPartial(base ?? ({} as any));
|
|
6349
|
+
},
|
|
6350
|
+
fromPartial<I extends Exact<DeepPartial<BlockFriend>, I>>(object: I): BlockFriend {
|
|
6351
|
+
const message = createBaseBlockFriend();
|
|
6352
|
+
message.user_id = object.user_id ?? "";
|
|
6353
|
+
return message;
|
|
6354
|
+
},
|
|
6355
|
+
};
|
|
6356
|
+
|
|
6151
6357
|
function createBasePing(): Ping {
|
|
6152
6358
|
return {};
|
|
6153
6359
|
}
|