mezon-js 2.7.66 → 2.7.67
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/mezon-js.cjs.js +6 -0
- package/dist/mezon-js.esm.mjs +6 -0
- package/dist/socket.d.ts +12 -0
- package/package.json +1 -1
- package/socket.ts +20 -0
package/dist/mezon-js.cjs.js
CHANGED
@@ -4809,6 +4809,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4809
4809
|
return response.last_seen_message_event;
|
4810
4810
|
});
|
4811
4811
|
}
|
4812
|
+
writeLastPinMessage(channel_id, mode, message_id, timestamp) {
|
4813
|
+
return __async(this, null, function* () {
|
4814
|
+
const response = yield this.send({ last_pin_message_event: { channel_id, mode, message_id, timestamp } });
|
4815
|
+
return response.last_pin_message_event;
|
4816
|
+
});
|
4817
|
+
}
|
4812
4818
|
writeVoiceJoined(id, clanId, clanName, voiceChannelId, voiceChannelLabel, participant, lastScreenshot) {
|
4813
4819
|
return __async(this, null, function* () {
|
4814
4820
|
const response = yield this.send({ voice_joined_event: { clan_id: clanId, clan_name: clanName, id, participant, voice_channel_id: voiceChannelId, voice_channel_label: voiceChannelLabel, last_screenshot: lastScreenshot } });
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4780,6 +4780,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4780
4780
|
return response.last_seen_message_event;
|
4781
4781
|
});
|
4782
4782
|
}
|
4783
|
+
writeLastPinMessage(channel_id, mode, message_id, timestamp) {
|
4784
|
+
return __async(this, null, function* () {
|
4785
|
+
const response = yield this.send({ last_pin_message_event: { channel_id, mode, message_id, timestamp } });
|
4786
|
+
return response.last_pin_message_event;
|
4787
|
+
});
|
4788
|
+
}
|
4783
4789
|
writeVoiceJoined(id, clanId, clanName, voiceChannelId, voiceChannelLabel, participant, lastScreenshot) {
|
4784
4790
|
return __async(this, null, function* () {
|
4785
4791
|
const response = yield this.send({ voice_joined_event: { clan_id: clanId, clan_name: clanName, id, participant, voice_channel_id: voiceChannelId, voice_channel_label: voiceChannelLabel, last_screenshot: lastScreenshot } });
|
package/dist/socket.d.ts
CHANGED
@@ -72,6 +72,15 @@ interface ChannelLeave {
|
|
72
72
|
};
|
73
73
|
}
|
74
74
|
/** Last seen message by user */
|
75
|
+
export interface LastPinMessageEvent {
|
76
|
+
/** The channel this message belongs to. */
|
77
|
+
channel_id: string;
|
78
|
+
mode: number;
|
79
|
+
channel_label: string;
|
80
|
+
/** The unique ID of this message. */
|
81
|
+
message_id: string;
|
82
|
+
}
|
83
|
+
/** Last seen message by user */
|
75
84
|
export interface LastSeenMessageEvent {
|
76
85
|
/** The channel this message belongs to. */
|
77
86
|
channel_id: string;
|
@@ -402,6 +411,8 @@ export interface Socket {
|
|
402
411
|
writeMessageReaction(id: string, channel_id: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
|
403
412
|
/** Send last seen message */
|
404
413
|
writeLastSeenMessage(channel_id: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
|
414
|
+
/** Send last pin message */
|
415
|
+
writeLastPinMessage(channel_id: string, mode: number, message_id: string, timestamp: string): Promise<LastPinMessageEvent>;
|
405
416
|
/** send voice joined */
|
406
417
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
407
418
|
/** send voice leaved */
|
@@ -504,6 +515,7 @@ export declare class DefaultSocket implements Socket {
|
|
504
515
|
writeMessageReaction(id: string, channel_id: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
|
505
516
|
writeMessageTyping(channel_id: string, mode: number): Promise<MessageTypingEvent>;
|
506
517
|
writeLastSeenMessage(channel_id: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
|
518
|
+
writeLastPinMessage(channel_id: string, mode: number, message_id: string, timestamp: string): Promise<LastPinMessageEvent>;
|
507
519
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
508
520
|
writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
|
509
521
|
private pingPong;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -88,6 +88,18 @@ interface ChannelLeave {
|
|
88
88
|
};
|
89
89
|
}
|
90
90
|
|
91
|
+
/** Last seen message by user */
|
92
|
+
export interface LastPinMessageEvent {
|
93
|
+
/** The channel this message belongs to. */
|
94
|
+
channel_id:string;
|
95
|
+
// The mode
|
96
|
+
mode: number;
|
97
|
+
// The channel label
|
98
|
+
channel_label: string;
|
99
|
+
/** The unique ID of this message. */
|
100
|
+
message_id: string;
|
101
|
+
}
|
102
|
+
|
91
103
|
/** Last seen message by user */
|
92
104
|
export interface LastSeenMessageEvent {
|
93
105
|
/** The channel this message belongs to. */
|
@@ -555,6 +567,9 @@ export interface Socket {
|
|
555
567
|
/** Send last seen message */
|
556
568
|
writeLastSeenMessage(channel_id: string, mode: number, message_id: string, timestamp: string) : Promise<LastSeenMessageEvent>;
|
557
569
|
|
570
|
+
/** Send last pin message */
|
571
|
+
writeLastPinMessage(channel_id: string, mode: number, message_id: string, timestamp: string) : Promise<LastPinMessageEvent>;
|
572
|
+
|
558
573
|
/** send voice joined */
|
559
574
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string) : Promise<VoiceJoinedEvent>;
|
560
575
|
|
@@ -1054,6 +1069,11 @@ export class DefaultSocket implements Socket {
|
|
1054
1069
|
return response.last_seen_message_event
|
1055
1070
|
}
|
1056
1071
|
|
1072
|
+
async writeLastPinMessage(channel_id: string, mode: number, message_id: string, timestamp: string) : Promise<LastPinMessageEvent> {
|
1073
|
+
const response = await this.send({last_pin_message_event: {channel_id: channel_id, mode: mode, message_id: message_id, timestamp: timestamp}});
|
1074
|
+
return response.last_pin_message_event
|
1075
|
+
}
|
1076
|
+
|
1057
1077
|
async writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string) : Promise<VoiceJoinedEvent> {
|
1058
1078
|
const response = await this.send({voice_joined_event: {clan_id: clanId, clan_name: clanName, id: id, participant: participant, voice_channel_id: voiceChannelId, voice_channel_label: voiceChannelLabel, last_screenshot: lastScreenshot}});
|
1059
1079
|
return response.voice_joined_event
|