mezon-js 2.8.24 → 2.8.26
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +326 -81
- package/client.ts +28 -17
- package/dist/api.gen.d.ts +55 -29
- package/dist/client.d.ts +3 -2
- package/dist/mezon-js.cjs.js +234 -37
- package/dist/mezon-js.esm.mjs +234 -37
- package/dist/socket.d.ts +32 -0
- package/package.json +1 -1
- package/socket.ts +66 -0
package/socket.ts
CHANGED
@@ -675,6 +675,58 @@ export interface ClanEmoji {
|
|
675
675
|
src?: string;
|
676
676
|
}
|
677
677
|
|
678
|
+
/** */
|
679
|
+
export interface ChannelDescListEvent {
|
680
|
+
//
|
681
|
+
channeldesc?: Array<ChannelDescription>;
|
682
|
+
}
|
683
|
+
|
684
|
+
/** */
|
685
|
+
export interface ChannelDescription {
|
686
|
+
// The clan of this channel
|
687
|
+
clan_id?: string;
|
688
|
+
// The channel this message belongs to.
|
689
|
+
channel_id?: string;
|
690
|
+
// The channel type.
|
691
|
+
type?: number;
|
692
|
+
// The channel lable
|
693
|
+
channel_label?: string;
|
694
|
+
// The channel private
|
695
|
+
channel_private?: number;
|
696
|
+
// meeting code
|
697
|
+
meeting_code?: string;
|
698
|
+
//
|
699
|
+
clan_name?: string;
|
700
|
+
}
|
701
|
+
|
702
|
+
// A list of Channel
|
703
|
+
export interface HashtagDmListEvent {
|
704
|
+
// user Id
|
705
|
+
user_id?: Array<string>;
|
706
|
+
// Max number of records to return. Between 1 and 100.
|
707
|
+
limit?: number;
|
708
|
+
// A list of channel.
|
709
|
+
hashtag_dm?: Array<HashtagDm>;
|
710
|
+
}
|
711
|
+
|
712
|
+
// hashtagDM
|
713
|
+
export interface HashtagDm {
|
714
|
+
// The channel id.
|
715
|
+
channel_id?: string;
|
716
|
+
// The channel lable
|
717
|
+
channel_label?: string;
|
718
|
+
// The clan of this channel
|
719
|
+
clan_id?: string;
|
720
|
+
// The clan name
|
721
|
+
clan_name?: string;
|
722
|
+
//
|
723
|
+
meeting_code?: string;
|
724
|
+
//
|
725
|
+
type?: number;
|
726
|
+
//
|
727
|
+
channel_private?: number;
|
728
|
+
}
|
729
|
+
|
678
730
|
/** A socket connection to Mezon server. */
|
679
731
|
export interface Socket {
|
680
732
|
/** Connection is Open */
|
@@ -830,6 +882,10 @@ export interface Socket {
|
|
830
882
|
listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
|
831
883
|
|
832
884
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
885
|
+
|
886
|
+
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
887
|
+
|
888
|
+
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
833
889
|
}
|
834
890
|
|
835
891
|
/** Reports an error received from a socket message. */
|
@@ -1373,6 +1429,16 @@ export class DefaultSocket implements Socket {
|
|
1373
1429
|
return response.emojis_listed_event
|
1374
1430
|
}
|
1375
1431
|
|
1432
|
+
async ListChannelByUserId(): Promise<ChannelDescListEvent> {
|
1433
|
+
const response = await this.send({channel_desc_list_event: {}});
|
1434
|
+
return response.channel_desc_list_event
|
1435
|
+
}
|
1436
|
+
|
1437
|
+
async hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent> {
|
1438
|
+
const response = await this.send({hashtag_dm_list_event: {user_id: user_id, limit: limit }});
|
1439
|
+
return response.hashtag_dm_list_event
|
1440
|
+
}
|
1441
|
+
|
1376
1442
|
async listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent> {
|
1377
1443
|
const response = await this.send({sticker_listed_event: {clan_id: clan_id}});
|
1378
1444
|
return response.sticker_listed_event
|