mezon-js 2.8.28 → 2.8.29
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/dist/mezon-js.cjs.js +24 -0
- package/dist/mezon-js.esm.mjs +24 -0
- package/dist/socket.d.ts +33 -0
- package/package.json +1 -1
- package/socket.ts +75 -0
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -5205,6 +5205,30 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
5205
5205
|
return response.sticker_listed_event;
|
|
5206
5206
|
});
|
|
5207
5207
|
}
|
|
5208
|
+
getNotificationChannelSetting(channel_id) {
|
|
5209
|
+
return __async(this, null, function* () {
|
|
5210
|
+
const response = yield this.send({ notification_channel_setting_event: { channel_id } });
|
|
5211
|
+
return response.notification_channel_setting_event;
|
|
5212
|
+
});
|
|
5213
|
+
}
|
|
5214
|
+
getNotificationCategorySetting(category_id) {
|
|
5215
|
+
return __async(this, null, function* () {
|
|
5216
|
+
const response = yield this.send({ notification_category_setting_event: { category_id } });
|
|
5217
|
+
return response.notification_category_setting_event;
|
|
5218
|
+
});
|
|
5219
|
+
}
|
|
5220
|
+
getNotificationClanSetting(clan_id) {
|
|
5221
|
+
return __async(this, null, function* () {
|
|
5222
|
+
const response = yield this.send({ notification_clan_setting_event: { clan_id } });
|
|
5223
|
+
return response.notification_clan_setting_event;
|
|
5224
|
+
});
|
|
5225
|
+
}
|
|
5226
|
+
getNotificationReactMessage(channel_id_req) {
|
|
5227
|
+
return __async(this, null, function* () {
|
|
5228
|
+
const response = yield this.send({ notifi_react_message_event: { channel_id_req } });
|
|
5229
|
+
return response.notifi_react_message_event;
|
|
5230
|
+
});
|
|
5231
|
+
}
|
|
5208
5232
|
pingPong() {
|
|
5209
5233
|
return __async(this, null, function* () {
|
|
5210
5234
|
if (!this.adapter.isOpen()) {
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -5176,6 +5176,30 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
5176
5176
|
return response.sticker_listed_event;
|
|
5177
5177
|
});
|
|
5178
5178
|
}
|
|
5179
|
+
getNotificationChannelSetting(channel_id) {
|
|
5180
|
+
return __async(this, null, function* () {
|
|
5181
|
+
const response = yield this.send({ notification_channel_setting_event: { channel_id } });
|
|
5182
|
+
return response.notification_channel_setting_event;
|
|
5183
|
+
});
|
|
5184
|
+
}
|
|
5185
|
+
getNotificationCategorySetting(category_id) {
|
|
5186
|
+
return __async(this, null, function* () {
|
|
5187
|
+
const response = yield this.send({ notification_category_setting_event: { category_id } });
|
|
5188
|
+
return response.notification_category_setting_event;
|
|
5189
|
+
});
|
|
5190
|
+
}
|
|
5191
|
+
getNotificationClanSetting(clan_id) {
|
|
5192
|
+
return __async(this, null, function* () {
|
|
5193
|
+
const response = yield this.send({ notification_clan_setting_event: { clan_id } });
|
|
5194
|
+
return response.notification_clan_setting_event;
|
|
5195
|
+
});
|
|
5196
|
+
}
|
|
5197
|
+
getNotificationReactMessage(channel_id_req) {
|
|
5198
|
+
return __async(this, null, function* () {
|
|
5199
|
+
const response = yield this.send({ notifi_react_message_event: { channel_id_req } });
|
|
5200
|
+
return response.notifi_react_message_event;
|
|
5201
|
+
});
|
|
5202
|
+
}
|
|
5179
5203
|
pingPong() {
|
|
5180
5204
|
return __async(this, null, function* () {
|
|
5181
5205
|
if (!this.adapter.isOpen()) {
|
package/dist/socket.d.ts
CHANGED
|
@@ -501,6 +501,31 @@ export interface HashtagDm {
|
|
|
501
501
|
channel_private?: number;
|
|
502
502
|
parrent_id?: string;
|
|
503
503
|
}
|
|
504
|
+
export interface NotificationChannelSettingEvent {
|
|
505
|
+
active?: number;
|
|
506
|
+
id?: string;
|
|
507
|
+
notification_setting_type?: number;
|
|
508
|
+
time_mute?: string;
|
|
509
|
+
channel_id?: string;
|
|
510
|
+
}
|
|
511
|
+
export interface NotificationCategorySettingEvent {
|
|
512
|
+
active?: number;
|
|
513
|
+
id?: string;
|
|
514
|
+
notification_setting_type?: number;
|
|
515
|
+
time_mute?: string;
|
|
516
|
+
category_id?: string;
|
|
517
|
+
}
|
|
518
|
+
export interface NotificationClanSettingEvent {
|
|
519
|
+
id?: string;
|
|
520
|
+
notification_setting_type?: number;
|
|
521
|
+
clan_id?: string;
|
|
522
|
+
}
|
|
523
|
+
export interface NotifiReactMessageEvent {
|
|
524
|
+
channel_id?: string;
|
|
525
|
+
id?: string;
|
|
526
|
+
user_id?: string;
|
|
527
|
+
channel_id_req?: string;
|
|
528
|
+
}
|
|
504
529
|
/** A socket connection to Mezon server. */
|
|
505
530
|
export interface Socket {
|
|
506
531
|
/** Connection is Open */
|
|
@@ -597,6 +622,10 @@ export interface Socket {
|
|
|
597
622
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
|
598
623
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
599
624
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
625
|
+
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
626
|
+
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
627
|
+
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
|
628
|
+
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
|
600
629
|
}
|
|
601
630
|
/** Reports an error received from a socket message. */
|
|
602
631
|
export interface SocketError {
|
|
@@ -677,6 +706,10 @@ export declare class DefaultSocket implements Socket {
|
|
|
677
706
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
678
707
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
679
708
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
|
709
|
+
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
710
|
+
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
711
|
+
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
|
712
|
+
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
|
680
713
|
private pingPong;
|
|
681
714
|
}
|
|
682
715
|
export {};
|
package/package.json
CHANGED
package/socket.ts
CHANGED
|
@@ -731,6 +731,52 @@ export interface HashtagDm {
|
|
|
731
731
|
parrent_id?: string;
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
+
export interface NotificationChannelSettingEvent {
|
|
735
|
+
//
|
|
736
|
+
active?: number;
|
|
737
|
+
//
|
|
738
|
+
id?: string;
|
|
739
|
+
//
|
|
740
|
+
notification_setting_type?: number;
|
|
741
|
+
//
|
|
742
|
+
time_mute?: string;
|
|
743
|
+
// The channel id.
|
|
744
|
+
channel_id?: string;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
export interface NotificationCategorySettingEvent {
|
|
748
|
+
//
|
|
749
|
+
active?: number;
|
|
750
|
+
//
|
|
751
|
+
id?: string;
|
|
752
|
+
//
|
|
753
|
+
notification_setting_type?: number;
|
|
754
|
+
//
|
|
755
|
+
time_mute?: string;
|
|
756
|
+
//
|
|
757
|
+
category_id?: string;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export interface NotificationClanSettingEvent {
|
|
761
|
+
//
|
|
762
|
+
id?: string;
|
|
763
|
+
//
|
|
764
|
+
notification_setting_type?: number;
|
|
765
|
+
// The clan of this channel
|
|
766
|
+
clan_id?: string;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export interface NotifiReactMessageEvent {
|
|
770
|
+
//
|
|
771
|
+
channel_id?: string;
|
|
772
|
+
//
|
|
773
|
+
id?: string;
|
|
774
|
+
//
|
|
775
|
+
user_id?: string;
|
|
776
|
+
//
|
|
777
|
+
channel_id_req?: string;
|
|
778
|
+
}
|
|
779
|
+
|
|
734
780
|
/** A socket connection to Mezon server. */
|
|
735
781
|
export interface Socket {
|
|
736
782
|
/** Connection is Open */
|
|
@@ -890,6 +936,15 @@ export interface Socket {
|
|
|
890
936
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
891
937
|
|
|
892
938
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
939
|
+
|
|
940
|
+
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
941
|
+
|
|
942
|
+
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
943
|
+
|
|
944
|
+
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
|
945
|
+
|
|
946
|
+
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
|
947
|
+
|
|
893
948
|
}
|
|
894
949
|
|
|
895
950
|
/** Reports an error received from a socket message. */
|
|
@@ -1448,6 +1503,26 @@ export class DefaultSocket implements Socket {
|
|
|
1448
1503
|
return response.sticker_listed_event
|
|
1449
1504
|
}
|
|
1450
1505
|
|
|
1506
|
+
async getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent> {
|
|
1507
|
+
const response = await this.send({notification_channel_setting_event: {channel_id: channel_id}})
|
|
1508
|
+
return response.notification_channel_setting_event
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
async getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent> {
|
|
1512
|
+
const response = await this.send({notification_category_setting_event: {category_id: category_id}})
|
|
1513
|
+
return response.notification_category_setting_event
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
async getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent> {
|
|
1517
|
+
const response = await this.send({notification_clan_setting_event: {clan_id: clan_id}})
|
|
1518
|
+
return response.notification_clan_setting_event
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
async getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent> {
|
|
1522
|
+
const response = await this.send({notifi_react_message_event: {channel_id_req: channel_id_req}})
|
|
1523
|
+
return response.notifi_react_message_event
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1451
1526
|
private async pingPong(): Promise<void> {
|
|
1452
1527
|
if (!this.adapter.isOpen()) {
|
|
1453
1528
|
return;
|