mezon-js 2.8.52 → 2.8.54
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +4 -4
- package/client.ts +4 -4
- package/dist/api.gen.d.ts +4 -4
- package/dist/client.d.ts +2 -2
- package/dist/mezon-js.cjs.js +8 -2
- package/dist/mezon-js.esm.mjs +8 -2
- package/dist/socket.d.ts +8 -1
- package/package.json +1 -1
- package/socket.ts +16 -1
package/api.gen.ts
CHANGED
@@ -459,7 +459,7 @@ export interface ApiChannelDescription {
|
|
459
459
|
//
|
460
460
|
count_mess_unread?: number;
|
461
461
|
//
|
462
|
-
|
462
|
+
create_time_seconds?: number;
|
463
463
|
//creator ID.
|
464
464
|
creator_id?: string;
|
465
465
|
//
|
@@ -481,7 +481,7 @@ export interface ApiChannelDescription {
|
|
481
481
|
//The channel type.
|
482
482
|
type?: number;
|
483
483
|
//
|
484
|
-
|
484
|
+
update_time_seconds?: number;
|
485
485
|
//
|
486
486
|
user_id?: Array<string>;
|
487
487
|
//
|
@@ -517,7 +517,7 @@ export interface ApiChannelMessage {
|
|
517
517
|
//The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
|
518
518
|
create_time?: string;
|
519
519
|
//
|
520
|
-
|
520
|
+
create_time_seconds?: number;
|
521
521
|
//
|
522
522
|
display_name?: string;
|
523
523
|
//
|
@@ -535,7 +535,7 @@ export interface ApiChannelMessage {
|
|
535
535
|
//The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
|
536
536
|
update_time?: string;
|
537
537
|
//
|
538
|
-
|
538
|
+
update_time_seconds?: number;
|
539
539
|
//The username of the message sender, if any.
|
540
540
|
username?: string;
|
541
541
|
// channel mode
|
package/client.ts
CHANGED
@@ -186,9 +186,9 @@ export interface ChannelMessage {
|
|
186
186
|
//
|
187
187
|
display_name?: string;
|
188
188
|
//
|
189
|
-
|
189
|
+
create_time_seconds?: number;
|
190
190
|
//
|
191
|
-
|
191
|
+
update_time_seconds?: number;
|
192
192
|
//
|
193
193
|
mode?: number;
|
194
194
|
//
|
@@ -1046,8 +1046,8 @@ export class Client {
|
|
1046
1046
|
reactions: reactions,
|
1047
1047
|
references: references,
|
1048
1048
|
clan_id: m.clan_id,
|
1049
|
-
|
1050
|
-
|
1049
|
+
create_time_seconds: m.create_time_seconds,
|
1050
|
+
update_time_seconds: m.update_time_seconds,
|
1051
1051
|
})
|
1052
1052
|
});
|
1053
1053
|
return Promise.resolve(result);
|
package/dist/api.gen.d.ts
CHANGED
@@ -266,7 +266,7 @@ export interface ApiChannelDescription {
|
|
266
266
|
channel_private?: number;
|
267
267
|
clan_id?: string;
|
268
268
|
count_mess_unread?: number;
|
269
|
-
|
269
|
+
create_time_seconds?: number;
|
270
270
|
creator_id?: string;
|
271
271
|
creator_name?: string;
|
272
272
|
last_pin_message?: string;
|
@@ -277,7 +277,7 @@ export interface ApiChannelDescription {
|
|
277
277
|
parrent_id?: string;
|
278
278
|
status?: number;
|
279
279
|
type?: number;
|
280
|
-
|
280
|
+
update_time_seconds?: number;
|
281
281
|
user_id?: Array<string>;
|
282
282
|
usernames?: string;
|
283
283
|
}
|
@@ -296,7 +296,7 @@ export interface ApiChannelMessage {
|
|
296
296
|
code: number;
|
297
297
|
content: string;
|
298
298
|
create_time?: string;
|
299
|
-
|
299
|
+
create_time_seconds?: number;
|
300
300
|
display_name?: string;
|
301
301
|
mentions?: string;
|
302
302
|
message_id: string;
|
@@ -305,7 +305,7 @@ export interface ApiChannelMessage {
|
|
305
305
|
references?: string;
|
306
306
|
sender_id: string;
|
307
307
|
update_time?: string;
|
308
|
-
|
308
|
+
update_time_seconds?: number;
|
309
309
|
username?: string;
|
310
310
|
mode?: number;
|
311
311
|
hideEditted?: boolean;
|
package/dist/client.d.ts
CHANGED
@@ -67,8 +67,8 @@ export interface ChannelMessage {
|
|
67
67
|
clan_nick?: string;
|
68
68
|
clan_avatar?: string;
|
69
69
|
display_name?: string;
|
70
|
-
|
71
|
-
|
70
|
+
create_time_seconds?: number;
|
71
|
+
update_time_seconds?: number;
|
72
72
|
mode?: number;
|
73
73
|
message_id?: string;
|
74
74
|
hideEditted?: boolean;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -5106,6 +5106,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
5106
5106
|
return response.channel_desc_list_event;
|
5107
5107
|
});
|
5108
5108
|
}
|
5109
|
+
ListUsersByUserId() {
|
5110
|
+
return __async(this, null, function* () {
|
5111
|
+
const response = yield this.send({ list_user: {} });
|
5112
|
+
return response.list_user;
|
5113
|
+
});
|
5114
|
+
}
|
5109
5115
|
hashtagDMList(user_id, limit) {
|
5110
5116
|
return __async(this, null, function* () {
|
5111
5117
|
const response = yield this.send({ hashtag_dm_list_event: { user_id, limit } });
|
@@ -5724,8 +5730,8 @@ var Client = class {
|
|
5724
5730
|
reactions,
|
5725
5731
|
references,
|
5726
5732
|
clan_id: m.clan_id,
|
5727
|
-
|
5728
|
-
|
5733
|
+
create_time_seconds: m.create_time_seconds,
|
5734
|
+
update_time_seconds: m.update_time_seconds
|
5729
5735
|
});
|
5730
5736
|
});
|
5731
5737
|
return Promise.resolve(result);
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -5077,6 +5077,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
5077
5077
|
return response.channel_desc_list_event;
|
5078
5078
|
});
|
5079
5079
|
}
|
5080
|
+
ListUsersByUserId() {
|
5081
|
+
return __async(this, null, function* () {
|
5082
|
+
const response = yield this.send({ list_user: {} });
|
5083
|
+
return response.list_user;
|
5084
|
+
});
|
5085
|
+
}
|
5080
5086
|
hashtagDMList(user_id, limit) {
|
5081
5087
|
return __async(this, null, function* () {
|
5082
5088
|
const response = yield this.send({ hashtag_dm_list_event: { user_id, limit } });
|
@@ -5695,8 +5701,8 @@ var Client = class {
|
|
5695
5701
|
reactions,
|
5696
5702
|
references,
|
5697
5703
|
clan_id: m.clan_id,
|
5698
|
-
|
5699
|
-
|
5704
|
+
create_time_seconds: m.create_time_seconds,
|
5705
|
+
update_time_seconds: m.update_time_seconds
|
5700
5706
|
});
|
5701
5707
|
});
|
5702
5708
|
return Promise.resolve(result);
|
package/dist/socket.d.ts
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import { ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc } from "./api.gen";
|
16
|
+
import { ApiChannelMessageHeader, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiRpc, ApiUser } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { ChannelMessage, Notification } from "./client";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -400,6 +400,10 @@ export interface ChannelDescListEvent {
|
|
400
400
|
channeldesc?: Array<ChannelDescription>;
|
401
401
|
}
|
402
402
|
/** */
|
403
|
+
export interface ListUser {
|
404
|
+
user?: Array<ApiUser>;
|
405
|
+
}
|
406
|
+
/** */
|
403
407
|
export interface ChannelDescription {
|
404
408
|
clan_id?: string;
|
405
409
|
channel_id?: string;
|
@@ -409,6 +413,7 @@ export interface ChannelDescription {
|
|
409
413
|
meeting_code?: string;
|
410
414
|
clan_name?: string;
|
411
415
|
parrent_id?: string;
|
416
|
+
last_sent_message?: ApiChannelMessageHeader;
|
412
417
|
}
|
413
418
|
export interface HashtagDmListEvent {
|
414
419
|
user_id?: Array<string>;
|
@@ -563,6 +568,7 @@ export interface Socket {
|
|
563
568
|
listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
|
564
569
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
565
570
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
571
|
+
ListUsersByUserId(): Promise<ListUser>;
|
566
572
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
567
573
|
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
568
574
|
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
@@ -649,6 +655,7 @@ export declare class DefaultSocket implements Socket {
|
|
649
655
|
checkDuplicateClanName(clan_name: string): Promise<ClanNameExistedEvent>;
|
650
656
|
listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
|
651
657
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
658
|
+
ListUsersByUserId(): Promise<ListUser>;
|
652
659
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
653
660
|
GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
|
654
661
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc} from "./api.gen";
|
17
|
+
import { ApiChannelMessageHeader, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiRpc, ApiUser} from "./api.gen";
|
18
18
|
import {Session} from "./session";
|
19
19
|
import {ChannelMessage, Notification} from "./client";
|
20
20
|
import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
|
@@ -568,6 +568,12 @@ export interface ChannelDescListEvent {
|
|
568
568
|
channeldesc?: Array<ChannelDescription>;
|
569
569
|
}
|
570
570
|
|
571
|
+
/** */
|
572
|
+
export interface ListUser {
|
573
|
+
//
|
574
|
+
user?: Array<ApiUser>;
|
575
|
+
}
|
576
|
+
|
571
577
|
/** */
|
572
578
|
export interface ChannelDescription {
|
573
579
|
// The clan of this channel
|
@@ -586,6 +592,8 @@ export interface ChannelDescription {
|
|
586
592
|
clan_name?: string;
|
587
593
|
//
|
588
594
|
parrent_id?: string;
|
595
|
+
//
|
596
|
+
last_sent_message?: ApiChannelMessageHeader;
|
589
597
|
}
|
590
598
|
|
591
599
|
// A list of Channel
|
@@ -850,6 +858,8 @@ export interface Socket {
|
|
850
858
|
listClanStickersByClanId(clan_id: string): Promise<StrickerListedEvent>;
|
851
859
|
|
852
860
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
861
|
+
|
862
|
+
ListUsersByUserId(): Promise<ListUser>;
|
853
863
|
|
854
864
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
855
865
|
|
@@ -1424,6 +1434,11 @@ export class DefaultSocket implements Socket {
|
|
1424
1434
|
return response.channel_desc_list_event
|
1425
1435
|
}
|
1426
1436
|
|
1437
|
+
async ListUsersByUserId(): Promise<ListUser> {
|
1438
|
+
const response = await this.send({list_user: {}});
|
1439
|
+
return response.list_user
|
1440
|
+
}
|
1441
|
+
|
1427
1442
|
async hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent> {
|
1428
1443
|
const response = await this.send({hashtag_dm_list_event: {user_id: user_id, limit: limit }});
|
1429
1444
|
return response.hashtag_dm_list_event
|