mezon-js 2.8.53 → 2.8.55
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/mezon-js.cjs.js +10 -4
- package/dist/mezon-js.esm.mjs +10 -4
- package/dist/socket.d.ts +12 -5
- package/package.json +1 -1
- package/socket.ts +22 -7
package/dist/mezon-js.cjs.js
CHANGED
@@ -5058,15 +5058,15 @@ var _DefaultSocket = class _DefaultSocket {
|
|
5058
5058
|
return response.message_typing_event;
|
5059
5059
|
});
|
5060
5060
|
}
|
5061
|
-
writeLastSeenMessage(clan_id, channel_id, mode, message_id,
|
5061
|
+
writeLastSeenMessage(clan_id, channel_id, mode, message_id, timestamp_seconds) {
|
5062
5062
|
return __async(this, null, function* () {
|
5063
|
-
const response = yield this.send({ last_seen_message_event: { clan_id, channel_id, mode, message_id,
|
5063
|
+
const response = yield this.send({ last_seen_message_event: { clan_id, channel_id, mode, message_id, timestamp_seconds } });
|
5064
5064
|
return response.last_seen_message_event;
|
5065
5065
|
});
|
5066
5066
|
}
|
5067
|
-
writeLastPinMessage(clan_id, channel_id, mode, message_id,
|
5067
|
+
writeLastPinMessage(clan_id, channel_id, mode, message_id, timestamp_seconds, operation) {
|
5068
5068
|
return __async(this, null, function* () {
|
5069
|
-
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, message_id,
|
5069
|
+
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, message_id, timestamp_seconds, operation } });
|
5070
5070
|
return response.last_pin_message_event;
|
5071
5071
|
});
|
5072
5072
|
}
|
@@ -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 } });
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -5029,15 +5029,15 @@ var _DefaultSocket = class _DefaultSocket {
|
|
5029
5029
|
return response.message_typing_event;
|
5030
5030
|
});
|
5031
5031
|
}
|
5032
|
-
writeLastSeenMessage(clan_id, channel_id, mode, message_id,
|
5032
|
+
writeLastSeenMessage(clan_id, channel_id, mode, message_id, timestamp_seconds) {
|
5033
5033
|
return __async(this, null, function* () {
|
5034
|
-
const response = yield this.send({ last_seen_message_event: { clan_id, channel_id, mode, message_id,
|
5034
|
+
const response = yield this.send({ last_seen_message_event: { clan_id, channel_id, mode, message_id, timestamp_seconds } });
|
5035
5035
|
return response.last_seen_message_event;
|
5036
5036
|
});
|
5037
5037
|
}
|
5038
|
-
writeLastPinMessage(clan_id, channel_id, mode, message_id,
|
5038
|
+
writeLastPinMessage(clan_id, channel_id, mode, message_id, timestamp_seconds, operation) {
|
5039
5039
|
return __async(this, null, function* () {
|
5040
|
-
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, message_id,
|
5040
|
+
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, message_id, timestamp_seconds, operation } });
|
5041
5041
|
return response.last_pin_message_event;
|
5042
5042
|
});
|
5043
5043
|
}
|
@@ -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 } });
|
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>;
|
@@ -499,9 +504,9 @@ export interface Socket {
|
|
499
504
|
/** Send message reaction */
|
500
505
|
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
|
501
506
|
/** Send last seen message */
|
502
|
-
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
507
|
+
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
503
508
|
/** Send last pin message */
|
504
|
-
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
509
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
505
510
|
/** Send custom user status */
|
506
511
|
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
507
512
|
/** send voice joined */
|
@@ -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>;
|
@@ -641,14 +647,15 @@ export declare class DefaultSocket implements Socket {
|
|
641
647
|
writeChatMessage(clan_id: string, channel_id: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string): Promise<ChannelMessageAck>;
|
642
648
|
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
|
643
649
|
writeMessageTyping(clan_id: string, channel_id: string, mode: number): Promise<MessageTypingEvent>;
|
644
|
-
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
645
|
-
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
650
|
+
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
651
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
646
652
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
647
653
|
writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
|
648
654
|
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
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
|
@@ -738,10 +746,10 @@ export interface Socket {
|
|
738
746
|
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean) : Promise<ApiMessageReaction>;
|
739
747
|
|
740
748
|
/** Send last seen message */
|
741
|
-
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
749
|
+
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number) : Promise<LastSeenMessageEvent>;
|
742
750
|
|
743
751
|
/** Send last pin message */
|
744
|
-
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
752
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, operation: number) : Promise<LastPinMessageEvent>;
|
745
753
|
|
746
754
|
/** Send custom user status */
|
747
755
|
writeCustomStatus(clan_id: string, status: string) : Promise<CustomStatusEvent>;
|
@@ -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
|
|
@@ -1384,13 +1394,13 @@ export class DefaultSocket implements Socket {
|
|
1384
1394
|
return response.message_typing_event
|
1385
1395
|
}
|
1386
1396
|
|
1387
|
-
async writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
1388
|
-
const response = await this.send({last_seen_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, message_id: message_id,
|
1397
|
+
async writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent> {
|
1398
|
+
const response = await this.send({last_seen_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, message_id: message_id, timestamp_seconds: timestamp_seconds}});
|
1389
1399
|
return response.last_seen_message_event
|
1390
1400
|
}
|
1391
1401
|
|
1392
|
-
async writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string,
|
1393
|
-
const response = await this.send({last_pin_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, message_id: message_id,
|
1402
|
+
async writeLastPinMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent> {
|
1403
|
+
const response = await this.send({last_pin_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, message_id: message_id, timestamp_seconds: timestamp_seconds, operation: operation}});
|
1394
1404
|
return response.last_pin_message_event
|
1395
1405
|
}
|
1396
1406
|
|
@@ -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
|