mezon-js 2.7.8 → 2.7.10
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 +7 -7
- package/dist/api.gen.d.ts +4 -4
- package/dist/mezon-js.cjs.js +27 -21
- package/dist/mezon-js.esm.mjs +5264 -5258
- package/package.json +1 -1
- package/socket.ts +30 -24
package/api.gen.ts
CHANGED
@@ -213,7 +213,7 @@ export interface ApiChannelDescription {
|
|
213
213
|
//
|
214
214
|
category_name?: string;
|
215
215
|
//
|
216
|
-
channel_avatar?: string
|
216
|
+
channel_avatar?: Array<string>;
|
217
217
|
//The channel this message belongs to.
|
218
218
|
channel_id?: string;
|
219
219
|
//
|
@@ -233,7 +233,7 @@ export interface ApiChannelDescription {
|
|
233
233
|
//The channel type.
|
234
234
|
type?: number;
|
235
235
|
//
|
236
|
-
user_id?: string
|
236
|
+
user_id?: Array<string>;
|
237
237
|
}
|
238
238
|
|
239
239
|
/** A message sent on a channel. */
|
@@ -671,6 +671,8 @@ export interface ApiRole {
|
|
671
671
|
//
|
672
672
|
allow_mention?: number;
|
673
673
|
//
|
674
|
+
channel_ids?: Array<string>;
|
675
|
+
//
|
674
676
|
clan_id?: string;
|
675
677
|
//
|
676
678
|
color?: string;
|
@@ -685,6 +687,8 @@ export interface ApiRole {
|
|
685
687
|
//
|
686
688
|
permission_list?: ApiPermissionList;
|
687
689
|
//
|
690
|
+
role_channel_active?: number;
|
691
|
+
//
|
688
692
|
role_icon?: string;
|
689
693
|
//
|
690
694
|
role_user_list?: ApiRoleUserList;
|
@@ -692,10 +696,6 @@ export interface ApiRole {
|
|
692
696
|
slug?: string;
|
693
697
|
//
|
694
698
|
title?: string;
|
695
|
-
//
|
696
|
-
role_channel_active?: string;
|
697
|
-
//
|
698
|
-
channel_ids?: Array<string>;
|
699
699
|
}
|
700
700
|
|
701
701
|
/** A list of role description, usually a result of a list operation. */
|
@@ -3419,7 +3419,7 @@ return Promise.race([
|
|
3419
3419
|
getListPermission(bearerToken: string,
|
3420
3420
|
options: any = {}): Promise<ApiPermissionList> {
|
3421
3421
|
|
3422
|
-
const urlPath = "/v2/
|
3422
|
+
const urlPath = "/v2/permissions";
|
3423
3423
|
const queryParams = new Map<string, any>();
|
3424
3424
|
|
3425
3425
|
let bodyJson : string = "";
|
package/dist/api.gen.d.ts
CHANGED
@@ -123,7 +123,7 @@ export interface ApiChannelDescList {
|
|
123
123
|
export interface ApiChannelDescription {
|
124
124
|
category_id?: string;
|
125
125
|
category_name?: string;
|
126
|
-
channel_avatar?: string
|
126
|
+
channel_avatar?: Array<string>;
|
127
127
|
channel_id?: string;
|
128
128
|
channel_label?: string;
|
129
129
|
channel_private?: number;
|
@@ -133,7 +133,7 @@ export interface ApiChannelDescription {
|
|
133
133
|
last_sent_message?: ApiChannelMessageHeader;
|
134
134
|
parrent_id?: string;
|
135
135
|
type?: number;
|
136
|
-
user_id?: string
|
136
|
+
user_id?: Array<string>;
|
137
137
|
}
|
138
138
|
/** A message sent on a channel. */
|
139
139
|
export interface ApiChannelMessage {
|
@@ -387,6 +387,7 @@ export interface ApiReadStorageObjectsRequest {
|
|
387
387
|
export interface ApiRole {
|
388
388
|
active?: number;
|
389
389
|
allow_mention?: number;
|
390
|
+
channel_ids?: Array<string>;
|
390
391
|
clan_id?: string;
|
391
392
|
color?: string;
|
392
393
|
creator_id?: string;
|
@@ -394,12 +395,11 @@ export interface ApiRole {
|
|
394
395
|
display_online?: number;
|
395
396
|
id?: string;
|
396
397
|
permission_list?: ApiPermissionList;
|
398
|
+
role_channel_active?: number;
|
397
399
|
role_icon?: string;
|
398
400
|
role_user_list?: ApiRoleUserList;
|
399
401
|
slug?: string;
|
400
402
|
title?: string;
|
401
|
-
role_channel_active?: string;
|
402
|
-
channel_ids?: Array<string>;
|
403
403
|
}
|
404
404
|
/** A list of role description, usually a result of a list operation. */
|
405
405
|
export interface ApiRoleList {
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -3558,30 +3558,36 @@ var _DefaultSocket = class _DefaultSocket {
|
|
3558
3558
|
} else if (message.stream_data) {
|
3559
3559
|
this.onstreamdata(message.stream_data);
|
3560
3560
|
} else if (message.channel_message) {
|
3561
|
+
var content, reactions, mentions, attachments, references;
|
3561
3562
|
try {
|
3562
|
-
|
3563
|
-
|
3564
|
-
|
3565
|
-
|
3566
|
-
|
3567
|
-
clan_id: message.channel_message.clan_id,
|
3568
|
-
code: message.channel_message.code,
|
3569
|
-
content: JSON.parse(message.channel_message.content),
|
3570
|
-
create_time: message.channel_message.create_time,
|
3571
|
-
id: message.channel_message.message_id,
|
3572
|
-
sender_id: message.channel_message.sender_id,
|
3573
|
-
update_time: message.channel_message.update_time,
|
3574
|
-
user_id_one: message.channel_message.user_id_one,
|
3575
|
-
user_id_two: message.channel_message.user_id_two,
|
3576
|
-
username: message.channel_message.username,
|
3577
|
-
reactions: JSON.parse(message.channel_message.reactions),
|
3578
|
-
mentions: JSON.parse(message.channel_message.mentions),
|
3579
|
-
attachments: JSON.parse(message.channel_message.attachments),
|
3580
|
-
references: JSON.parse(message.channel_message.references)
|
3581
|
-
};
|
3582
|
-
this.onchannelmessage(e);
|
3563
|
+
content = JSON.parse(message.channel_message.content);
|
3564
|
+
reactions = JSON.parse(message.channel_message.reactions);
|
3565
|
+
mentions = JSON.parse(message.channel_message.mentions);
|
3566
|
+
attachments = JSON.parse(message.channel_message.attachments);
|
3567
|
+
references = JSON.parse(message.channel_message.references);
|
3583
3568
|
} catch (e2) {
|
3584
3569
|
}
|
3570
|
+
var e = {
|
3571
|
+
avatar: message.channel_message.avatar,
|
3572
|
+
channel_id: message.channel_message.channel_id,
|
3573
|
+
mode: message.channel_message.mode,
|
3574
|
+
channel_label: message.channel_message.channel_label,
|
3575
|
+
clan_id: message.channel_message.clan_id,
|
3576
|
+
code: message.channel_message.code,
|
3577
|
+
create_time: message.channel_message.create_time,
|
3578
|
+
id: message.channel_message.message_id,
|
3579
|
+
sender_id: message.channel_message.sender_id,
|
3580
|
+
update_time: message.channel_message.update_time,
|
3581
|
+
user_id_one: message.channel_message.user_id_one,
|
3582
|
+
user_id_two: message.channel_message.user_id_two,
|
3583
|
+
username: message.channel_message.username,
|
3584
|
+
content,
|
3585
|
+
reactions,
|
3586
|
+
mentions,
|
3587
|
+
attachments,
|
3588
|
+
references
|
3589
|
+
};
|
3590
|
+
this.onchannelmessage(e);
|
3585
3591
|
} else if (message.message_typing_event) {
|
3586
3592
|
this.onmessagetyping(message.message_typing_event);
|
3587
3593
|
} else if (message.message_reaction_event) {
|