mezon-js 2.12.22 → 2.12.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.
- package/api.gen.ts +4 -0
- package/dist/api.gen.d.ts +2 -0
- package/dist/mezon-js.cjs.js +10 -3
- package/dist/mezon-js.esm.mjs +10 -3
- package/dist/socket.d.ts +7 -0
- package/package.json +1 -1
- package/socket.ts +23 -2
package/api.gen.ts
CHANGED
@@ -1018,6 +1018,8 @@ export interface ApiClanSticker {
|
|
1018
1018
|
shortname?: string;
|
1019
1019
|
//
|
1020
1020
|
source?: string;
|
1021
|
+
//
|
1022
|
+
media_type?: number;
|
1021
1023
|
}
|
1022
1024
|
|
1023
1025
|
/** */
|
@@ -1032,6 +1034,8 @@ export interface ApiClanStickerAddRequest {
|
|
1032
1034
|
shortname?: string;
|
1033
1035
|
//
|
1034
1036
|
source?: string;
|
1037
|
+
//
|
1038
|
+
media_type?: number;
|
1035
1039
|
}
|
1036
1040
|
|
1037
1041
|
/** A list of users belonging to a clan, along with their role. */
|
package/dist/api.gen.d.ts
CHANGED
@@ -577,6 +577,7 @@ export interface ApiClanSticker {
|
|
577
577
|
logo?: string;
|
578
578
|
shortname?: string;
|
579
579
|
source?: string;
|
580
|
+
media_type?: number;
|
580
581
|
}
|
581
582
|
/** */
|
582
583
|
export interface ApiClanStickerAddRequest {
|
@@ -585,6 +586,7 @@ export interface ApiClanStickerAddRequest {
|
|
585
586
|
id?: string;
|
586
587
|
shortname?: string;
|
587
588
|
source?: string;
|
589
|
+
media_type?: number;
|
588
590
|
}
|
589
591
|
/** A list of users belonging to a clan, along with their role. */
|
590
592
|
export interface ApiClanUserList {
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6961,9 +6961,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6961
6961
|
this.onerror(evt);
|
6962
6962
|
};
|
6963
6963
|
this.adapter.onMessage = (message) => __async(this, null, function* () {
|
6964
|
-
|
6965
|
-
console.log("Response: %o", JSON.stringify(message));
|
6966
|
-
}
|
6964
|
+
console.log("Response: %o", JSON.stringify(message));
|
6967
6965
|
if (!message.cid) {
|
6968
6966
|
if (message.notifications) {
|
6969
6967
|
message.notifications.notifications.forEach((n) => {
|
@@ -7108,6 +7106,10 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7108
7106
|
this.onmessagedropdownboxselected(
|
7109
7107
|
message.dropdown_box_selected
|
7110
7108
|
);
|
7109
|
+
} else if (message.mark_as_read) {
|
7110
|
+
this.onmarkasread(
|
7111
|
+
message.mark_as_read
|
7112
|
+
);
|
7111
7113
|
} else if (message.voice_reaction_send) {
|
7112
7114
|
this.onvoicereactionmessage(
|
7113
7115
|
message.voice_reaction_send
|
@@ -7455,6 +7457,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7455
7457
|
console.log(msg);
|
7456
7458
|
}
|
7457
7459
|
}
|
7460
|
+
onmarkasread(event) {
|
7461
|
+
if (this.verbose && window && window.console) {
|
7462
|
+
console.log(event);
|
7463
|
+
}
|
7464
|
+
}
|
7458
7465
|
onvoicereactionmessage(event) {
|
7459
7466
|
if (this.verbose && window && window.console) {
|
7460
7467
|
console.log(event);
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6927,9 +6927,7 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6927
6927
|
this.onerror(evt);
|
6928
6928
|
};
|
6929
6929
|
this.adapter.onMessage = (message) => __async(this, null, function* () {
|
6930
|
-
|
6931
|
-
console.log("Response: %o", JSON.stringify(message));
|
6932
|
-
}
|
6930
|
+
console.log("Response: %o", JSON.stringify(message));
|
6933
6931
|
if (!message.cid) {
|
6934
6932
|
if (message.notifications) {
|
6935
6933
|
message.notifications.notifications.forEach((n) => {
|
@@ -7074,6 +7072,10 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7074
7072
|
this.onmessagedropdownboxselected(
|
7075
7073
|
message.dropdown_box_selected
|
7076
7074
|
);
|
7075
|
+
} else if (message.mark_as_read) {
|
7076
|
+
this.onmarkasread(
|
7077
|
+
message.mark_as_read
|
7078
|
+
);
|
7077
7079
|
} else if (message.voice_reaction_send) {
|
7078
7080
|
this.onvoicereactionmessage(
|
7079
7081
|
message.voice_reaction_send
|
@@ -7421,6 +7423,11 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7421
7423
|
console.log(msg);
|
7422
7424
|
}
|
7423
7425
|
}
|
7426
|
+
onmarkasread(event) {
|
7427
|
+
if (this.verbose && window && window.console) {
|
7428
|
+
console.log(event);
|
7429
|
+
}
|
7430
|
+
}
|
7424
7431
|
onvoicereactionmessage(event) {
|
7425
7432
|
if (this.verbose && window && window.console) {
|
7426
7433
|
console.log(event);
|
package/dist/socket.d.ts
CHANGED
@@ -733,6 +733,11 @@ export interface VoiceReactionSend {
|
|
733
733
|
channel_id: string;
|
734
734
|
sender_id: string;
|
735
735
|
}
|
736
|
+
export interface MarkAsRead {
|
737
|
+
channel_id: string;
|
738
|
+
category_id: string;
|
739
|
+
clan_id: string;
|
740
|
+
}
|
736
741
|
export interface WebrtcSignalingFwd {
|
737
742
|
receiver_id: string;
|
738
743
|
data_type: number;
|
@@ -889,6 +894,7 @@ export interface Socket {
|
|
889
894
|
onmessagedropdownboxselected: (event: DropdownBoxSelected) => void;
|
890
895
|
onwebrtcsignalingfwd: (event: WebrtcSignalingFwd) => void;
|
891
896
|
onvoicereactionmessage: (event: VoiceReactionSend) => void;
|
897
|
+
onmarkasread: (event: MarkAsRead) => void;
|
892
898
|
oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
|
893
899
|
oncoffeegiven: (give_coffee_event: ApiGiveCoffeeEvent) => void;
|
894
900
|
oneventemoji: (event_emoji: EventEmoji) => void;
|
@@ -994,6 +1000,7 @@ export declare class DefaultSocket implements Socket {
|
|
994
1000
|
ontokensent(tokenSentEvent: ApiTokenSentEvent): void;
|
995
1001
|
onmessagebuttonclicked(messageButtonClicked: MessageButtonClicked): void;
|
996
1002
|
onmessagedropdownboxselected(msg: DropdownBoxSelected): void;
|
1003
|
+
onmarkasread(event: MarkAsRead): void;
|
997
1004
|
onvoicereactionmessage(event: VoiceReactionSend): void;
|
998
1005
|
onwebrtcsignalingfwd(event: WebrtcSignalingFwd): void;
|
999
1006
|
onactivityupdated(list_activity: ListActivity): void;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -1049,6 +1049,15 @@ export interface VoiceReactionSend {
|
|
1049
1049
|
sender_id: string;
|
1050
1050
|
}
|
1051
1051
|
|
1052
|
+
export interface MarkAsRead {
|
1053
|
+
// channel id
|
1054
|
+
channel_id: string;
|
1055
|
+
// category_id
|
1056
|
+
category_id: string;
|
1057
|
+
// clan id
|
1058
|
+
clan_id: string;
|
1059
|
+
}
|
1060
|
+
|
1052
1061
|
export interface WebrtcSignalingFwd {
|
1053
1062
|
receiver_id: string;
|
1054
1063
|
data_type: number;
|
@@ -1519,6 +1528,8 @@ export interface Socket {
|
|
1519
1528
|
|
1520
1529
|
onvoicereactionmessage: (event: VoiceReactionSend) => void;
|
1521
1530
|
|
1531
|
+
onmarkasread: (event: MarkAsRead) => void;
|
1532
|
+
|
1522
1533
|
oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
|
1523
1534
|
|
1524
1535
|
oncoffeegiven: (give_coffee_event: ApiGiveCoffeeEvent) => void;
|
@@ -1642,9 +1653,9 @@ export class DefaultSocket implements Socket {
|
|
1642
1653
|
};
|
1643
1654
|
|
1644
1655
|
this.adapter.onMessage = async (message: any) => {
|
1645
|
-
if (this.verbose && window && window.console) {
|
1656
|
+
//if (this.verbose && window && window.console) {
|
1646
1657
|
console.log("Response: %o", JSON.stringify(message));
|
1647
|
-
}
|
1658
|
+
//}
|
1648
1659
|
/** Inbound message from server. */
|
1649
1660
|
if (!message.cid) {
|
1650
1661
|
if (message.notifications) {
|
@@ -1790,6 +1801,10 @@ export class DefaultSocket implements Socket {
|
|
1790
1801
|
this.onmessagedropdownboxselected(
|
1791
1802
|
<DropdownBoxSelected>message.dropdown_box_selected
|
1792
1803
|
);
|
1804
|
+
} else if (message.mark_as_read) {
|
1805
|
+
this.onmarkasread(
|
1806
|
+
<MarkAsRead>message.mark_as_read
|
1807
|
+
);
|
1793
1808
|
} else if (message.voice_reaction_send) {
|
1794
1809
|
this.onvoicereactionmessage(
|
1795
1810
|
<VoiceReactionSend>message.voice_reaction_send
|
@@ -2201,6 +2216,12 @@ export class DefaultSocket implements Socket {
|
|
2201
2216
|
}
|
2202
2217
|
}
|
2203
2218
|
|
2219
|
+
onmarkasread(event: MarkAsRead) {
|
2220
|
+
if (this.verbose && window && window.console) {
|
2221
|
+
console.log(event);
|
2222
|
+
}
|
2223
|
+
}
|
2224
|
+
|
2204
2225
|
onvoicereactionmessage(event: VoiceReactionSend) {
|
2205
2226
|
if (this.verbose && window && window.console) {
|
2206
2227
|
console.log(event);
|