mezon-js 2.7.32 → 2.7.34
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +3 -3
- package/dist/api.gen.d.ts +2 -2
- package/dist/mezon-js.cjs.js +4 -4
- package/dist/mezon-js.esm.mjs +4 -4
- package/dist/socket.d.ts +3 -2
- package/package.json +1 -1
- package/socket.ts +5 -3
package/api.gen.ts
CHANGED
@@ -2458,8 +2458,8 @@ export class MezonApi {
|
|
2458
2458
|
listChannelMessages(bearerToken: string,
|
2459
2459
|
channelId:string,
|
2460
2460
|
messageId?:string,
|
2461
|
-
limit?:number,
|
2462
2461
|
direction?:number,
|
2462
|
+
limit?:number,
|
2463
2463
|
options: any = {}): Promise<ApiChannelMessageList> {
|
2464
2464
|
|
2465
2465
|
if (channelId === null || channelId === undefined) {
|
@@ -2656,8 +2656,8 @@ export class MezonApi {
|
|
2656
2656
|
|
2657
2657
|
/** List all users that are part of a channel. */
|
2658
2658
|
listChannelUsers(bearerToken: string,
|
2659
|
-
|
2660
|
-
|
2659
|
+
clanId: string,
|
2660
|
+
channelId: string,
|
2661
2661
|
channelType?:number,
|
2662
2662
|
limit?:number,
|
2663
2663
|
state?:number,
|
package/dist/api.gen.d.ts
CHANGED
@@ -776,7 +776,7 @@ export declare class MezonApi {
|
|
776
776
|
/** */
|
777
777
|
listCategoryDescs(bearerToken: string, clanId: string, creatorId?: string, categoryName?: string, categoryId?: string, options?: any): Promise<ApiCategoryDescList>;
|
778
778
|
/** List a channel's message history. */
|
779
|
-
listChannelMessages(bearerToken: string, channelId: string, messageId?: string,
|
779
|
+
listChannelMessages(bearerToken: string, channelId: string, messageId?: string, direction?: number, limit?: number, options?: any): Promise<ApiChannelMessageList>;
|
780
780
|
/** Add users to a channel. */
|
781
781
|
addChannelUsers(bearerToken: string, channelId: string, userIds?: Array<string>, options?: any): Promise<any>;
|
782
782
|
/** List all attachment that are part of a channel. */
|
@@ -786,7 +786,7 @@ export declare class MezonApi {
|
|
786
786
|
/** Kick a set of users from a channel. */
|
787
787
|
removeChannelUsers(bearerToken: string, channelId: string, userIds?: Array<string>, options?: any): Promise<any>;
|
788
788
|
/** List all users that are part of a channel. */
|
789
|
-
listChannelUsers(bearerToken: string,
|
789
|
+
listChannelUsers(bearerToken: string, clanId: string, channelId: string, channelType?: number, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiChannelUserList>;
|
790
790
|
/** List user channels */
|
791
791
|
listChannelDescs(bearerToken: string, limit?: number, state?: number, cursor?: string, clanId?: string, channelType?: number, options?: any): Promise<ApiChannelDescList>;
|
792
792
|
/** Create a new channel with the current user as the owner. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -1640,7 +1640,7 @@ var MezonApi = class {
|
|
1640
1640
|
]);
|
1641
1641
|
}
|
1642
1642
|
/** List a channel's message history. */
|
1643
|
-
listChannelMessages(bearerToken, channelId, messageId,
|
1643
|
+
listChannelMessages(bearerToken, channelId, messageId, direction, limit, options = {}) {
|
1644
1644
|
if (channelId === null || channelId === void 0) {
|
1645
1645
|
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1646
1646
|
}
|
@@ -1790,7 +1790,7 @@ var MezonApi = class {
|
|
1790
1790
|
]);
|
1791
1791
|
}
|
1792
1792
|
/** List all users that are part of a channel. */
|
1793
|
-
listChannelUsers(bearerToken,
|
1793
|
+
listChannelUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
|
1794
1794
|
if (channelId === null || channelId === void 0) {
|
1795
1795
|
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1796
1796
|
}
|
@@ -4456,9 +4456,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4456
4456
|
updateStatus(status) {
|
4457
4457
|
return this.send({ status_update: { status } });
|
4458
4458
|
}
|
4459
|
-
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message) {
|
4459
|
+
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message, mention_everyone) {
|
4460
4460
|
return __async(this, null, function* () {
|
4461
|
-
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message } });
|
4461
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message, mention_everyone } });
|
4462
4462
|
return response.channel_message_ack;
|
4463
4463
|
});
|
4464
4464
|
}
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -1611,7 +1611,7 @@ var MezonApi = class {
|
|
1611
1611
|
]);
|
1612
1612
|
}
|
1613
1613
|
/** List a channel's message history. */
|
1614
|
-
listChannelMessages(bearerToken, channelId, messageId,
|
1614
|
+
listChannelMessages(bearerToken, channelId, messageId, direction, limit, options = {}) {
|
1615
1615
|
if (channelId === null || channelId === void 0) {
|
1616
1616
|
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1617
1617
|
}
|
@@ -1761,7 +1761,7 @@ var MezonApi = class {
|
|
1761
1761
|
]);
|
1762
1762
|
}
|
1763
1763
|
/** List all users that are part of a channel. */
|
1764
|
-
listChannelUsers(bearerToken,
|
1764
|
+
listChannelUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
|
1765
1765
|
if (channelId === null || channelId === void 0) {
|
1766
1766
|
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1767
1767
|
}
|
@@ -4427,9 +4427,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4427
4427
|
updateStatus(status) {
|
4428
4428
|
return this.send({ status_update: { status } });
|
4429
4429
|
}
|
4430
|
-
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message) {
|
4430
|
+
writeChatMessage(clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message, mention_everyone) {
|
4431
4431
|
return __async(this, null, function* () {
|
4432
|
-
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message } });
|
4432
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, channel_label, mode, content, mentions, attachments, references, anonymous_message, mention_everyone } });
|
4433
4433
|
return response.channel_message_ack;
|
4434
4434
|
});
|
4435
4435
|
}
|
package/dist/socket.d.ts
CHANGED
@@ -198,6 +198,7 @@ interface ChannelMessageSend {
|
|
198
198
|
mentions?: Array<MessageMentionEvent>;
|
199
199
|
attachments?: Array<MessageAttachmentEvent>;
|
200
200
|
anonymous_message?: boolean;
|
201
|
+
mention_everyone?: boolean;
|
201
202
|
};
|
202
203
|
}
|
203
204
|
/** Update a message previously sent to a realtime chat channel. */
|
@@ -551,7 +552,7 @@ export interface Socket {
|
|
551
552
|
/** Update the status for the current user online. */
|
552
553
|
updateStatus(status?: string): Promise<void>;
|
553
554
|
/** Send a chat message to a chat channel on the server. */
|
554
|
-
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean): Promise<ChannelMessageAck>;
|
555
|
+
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean): Promise<ChannelMessageAck>;
|
555
556
|
/** Send message typing */
|
556
557
|
writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
|
557
558
|
/** Send message reaction */
|
@@ -678,7 +679,7 @@ export declare class DefaultSocket implements Socket {
|
|
678
679
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
679
680
|
updateChatMessage(channel_id: string, channel_label: string, mode: number, message_id: string, content: any): Promise<ChannelMessageAck>;
|
680
681
|
updateStatus(status?: string): Promise<void>;
|
681
|
-
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean): Promise<ChannelMessageAck>;
|
682
|
+
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean): Promise<ChannelMessageAck>;
|
682
683
|
writeMessageReaction(id: string, channel_id: string, channel_label: string, mode: number, message_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<MessageReactionEvent>;
|
683
684
|
writeMessageTyping(channel_id: string, channel_label: string, mode: number): Promise<MessageTypingEvent>;
|
684
685
|
writeLastSeenMessage(channel_id: string, channel_label: string, mode: number, message_id: string, timestamp: string): Promise<LastSeenMessageEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -274,6 +274,8 @@ interface ChannelMessageSend {
|
|
274
274
|
attachments?: Array<MessageAttachmentEvent>;
|
275
275
|
//
|
276
276
|
anonymous_message?: boolean;
|
277
|
+
//
|
278
|
+
mention_everyone?: boolean;
|
277
279
|
};
|
278
280
|
}
|
279
281
|
|
@@ -715,7 +717,7 @@ export interface Socket {
|
|
715
717
|
updateStatus(status? : string) : Promise<void>;
|
716
718
|
|
717
719
|
/** Send a chat message to a chat channel on the server. */
|
718
|
-
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean) : Promise<ChannelMessageAck>;
|
720
|
+
writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:boolean) : Promise<ChannelMessageAck>;
|
719
721
|
|
720
722
|
/** Send message typing */
|
721
723
|
writeMessageTyping(channel_id: string, channel_label: string, mode: number) : Promise<MessageTypingEvent>;
|
@@ -1305,8 +1307,8 @@ export class DefaultSocket implements Socket {
|
|
1305
1307
|
return this.send({status_update: {status: status}});
|
1306
1308
|
}
|
1307
1309
|
|
1308
|
-
async writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean ): Promise<ChannelMessageAck> {
|
1309
|
-
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, channel_label:channel_label, mode:mode, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message}});
|
1310
|
+
async writeChatMessage(clan_id: string, channel_id: string, channel_label: string, mode: number, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:Boolean ): Promise<ChannelMessageAck> {
|
1311
|
+
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, channel_label:channel_label, mode:mode, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone:mention_everyone}});
|
1310
1312
|
return response.channel_message_ack;
|
1311
1313
|
}
|
1312
1314
|
|