mezon-js 2.8.28 → 2.8.31
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 +40 -0
- package/package.json +1 -1
- package/socket.ts +85 -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
|
@@ -442,6 +442,7 @@ interface StatusUpdate {
|
|
|
442
442
|
}
|
|
443
443
|
export interface ClanNameExistedEvent {
|
|
444
444
|
clan_name: string;
|
|
445
|
+
exist: boolean;
|
|
445
446
|
}
|
|
446
447
|
/** */
|
|
447
448
|
export interface StrickerListedEvent {
|
|
@@ -501,6 +502,37 @@ export interface HashtagDm {
|
|
|
501
502
|
channel_private?: number;
|
|
502
503
|
parrent_id?: string;
|
|
503
504
|
}
|
|
505
|
+
export interface NotificationChannelSettingEvent {
|
|
506
|
+
channel_id?: string;
|
|
507
|
+
notification_user_channel?: NotificationUserChannel;
|
|
508
|
+
}
|
|
509
|
+
export interface NotificationUserChannel {
|
|
510
|
+
active?: number;
|
|
511
|
+
id?: string;
|
|
512
|
+
notification_setting_type?: number;
|
|
513
|
+
time_mute?: string;
|
|
514
|
+
}
|
|
515
|
+
export interface NotificationCategorySettingEvent {
|
|
516
|
+
category_id?: string;
|
|
517
|
+
notification_user_channel?: NotificationUserChannel;
|
|
518
|
+
}
|
|
519
|
+
export interface NotificationClanSettingEvent {
|
|
520
|
+
clan_id?: string;
|
|
521
|
+
notification_setting?: NotificationSetting;
|
|
522
|
+
}
|
|
523
|
+
export interface NotificationSetting {
|
|
524
|
+
id?: string;
|
|
525
|
+
notification_setting_type?: number;
|
|
526
|
+
}
|
|
527
|
+
export interface NotifiReactMessageEvent {
|
|
528
|
+
channel_id?: string;
|
|
529
|
+
notifi_react_message?: NotifiReactMessage;
|
|
530
|
+
}
|
|
531
|
+
export interface NotifiReactMessage {
|
|
532
|
+
id?: string;
|
|
533
|
+
user_id?: string;
|
|
534
|
+
channel_id_req?: string;
|
|
535
|
+
}
|
|
504
536
|
/** A socket connection to Mezon server. */
|
|
505
537
|
export interface Socket {
|
|
506
538
|
/** Connection is Open */
|
|
@@ -597,6 +629,10 @@ export interface Socket {
|
|
|
597
629
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
|
598
630
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
599
631
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
632
|
+
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
633
|
+
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
634
|
+
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
|
635
|
+
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
|
600
636
|
}
|
|
601
637
|
/** Reports an error received from a socket message. */
|
|
602
638
|
export interface SocketError {
|
|
@@ -677,6 +713,10 @@ export declare class DefaultSocket implements Socket {
|
|
|
677
713
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
678
714
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
679
715
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
|
716
|
+
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
717
|
+
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
718
|
+
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
|
719
|
+
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
|
680
720
|
private pingPong;
|
|
681
721
|
}
|
|
682
722
|
export {};
|
package/package.json
CHANGED
package/socket.ts
CHANGED
|
@@ -624,6 +624,7 @@ interface StatusUpdate {
|
|
|
624
624
|
}
|
|
625
625
|
export interface ClanNameExistedEvent {
|
|
626
626
|
clan_name: string;
|
|
627
|
+
exist: boolean;
|
|
627
628
|
}
|
|
628
629
|
|
|
629
630
|
|
|
@@ -731,6 +732,61 @@ export interface HashtagDm {
|
|
|
731
732
|
parrent_id?: string;
|
|
732
733
|
}
|
|
733
734
|
|
|
735
|
+
export interface NotificationChannelSettingEvent {
|
|
736
|
+
// The channel id.
|
|
737
|
+
channel_id?: string;
|
|
738
|
+
//
|
|
739
|
+
notification_user_channel?: NotificationUserChannel;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export interface NotificationUserChannel {
|
|
743
|
+
//
|
|
744
|
+
active?: number;
|
|
745
|
+
//
|
|
746
|
+
id?: string;
|
|
747
|
+
//
|
|
748
|
+
notification_setting_type?: number;
|
|
749
|
+
//
|
|
750
|
+
time_mute?: string;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export interface NotificationCategorySettingEvent {
|
|
754
|
+
//
|
|
755
|
+
category_id?: string;
|
|
756
|
+
//
|
|
757
|
+
notification_user_channel?: NotificationUserChannel;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
export interface NotificationClanSettingEvent {
|
|
761
|
+
// The clan of this channel
|
|
762
|
+
clan_id?: string;
|
|
763
|
+
//
|
|
764
|
+
notification_setting?: NotificationSetting;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export interface NotificationSetting {
|
|
768
|
+
//
|
|
769
|
+
id?: string;
|
|
770
|
+
//
|
|
771
|
+
notification_setting_type?: number;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export interface NotifiReactMessageEvent {
|
|
775
|
+
//
|
|
776
|
+
channel_id?: string;
|
|
777
|
+
//
|
|
778
|
+
notifi_react_message?: NotifiReactMessage;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export interface NotifiReactMessage {
|
|
782
|
+
//
|
|
783
|
+
id?: string;
|
|
784
|
+
//
|
|
785
|
+
user_id?: string;
|
|
786
|
+
//
|
|
787
|
+
channel_id_req?: string;
|
|
788
|
+
}
|
|
789
|
+
|
|
734
790
|
/** A socket connection to Mezon server. */
|
|
735
791
|
export interface Socket {
|
|
736
792
|
/** Connection is Open */
|
|
@@ -890,6 +946,15 @@ export interface Socket {
|
|
|
890
946
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
891
947
|
|
|
892
948
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
949
|
+
|
|
950
|
+
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
951
|
+
|
|
952
|
+
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
953
|
+
|
|
954
|
+
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
|
955
|
+
|
|
956
|
+
getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
|
|
957
|
+
|
|
893
958
|
}
|
|
894
959
|
|
|
895
960
|
/** Reports an error received from a socket message. */
|
|
@@ -1448,6 +1513,26 @@ export class DefaultSocket implements Socket {
|
|
|
1448
1513
|
return response.sticker_listed_event
|
|
1449
1514
|
}
|
|
1450
1515
|
|
|
1516
|
+
async getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent> {
|
|
1517
|
+
const response = await this.send({notification_channel_setting_event: {channel_id: channel_id}})
|
|
1518
|
+
return response.notification_channel_setting_event
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
async getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent> {
|
|
1522
|
+
const response = await this.send({notification_category_setting_event: {category_id: category_id}})
|
|
1523
|
+
return response.notification_category_setting_event
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
async getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent> {
|
|
1527
|
+
const response = await this.send({notification_clan_setting_event: {clan_id: clan_id}})
|
|
1528
|
+
return response.notification_clan_setting_event
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
async getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent> {
|
|
1532
|
+
const response = await this.send({notifi_react_message_event: {channel_id_req: channel_id_req}})
|
|
1533
|
+
return response.notifi_react_message_event
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1451
1536
|
private async pingPong(): Promise<void> {
|
|
1452
1537
|
if (!this.adapter.isOpen()) {
|
|
1453
1538
|
return;
|