mezon-js 2.7.33 → 2.7.34

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.
@@ -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
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.33",
3
+ "version": "2.7.34",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
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