mezon-js 2.9.90 → 2.9.91

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.
@@ -7485,7 +7485,7 @@ var _DefaultSocket = class _DefaultSocket {
7485
7485
  updateStatus(status) {
7486
7486
  return this.send({ status_update: { status } });
7487
7487
  }
7488
- writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
7488
+ writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code) {
7489
7489
  return __async(this, null, function* () {
7490
7490
  const response = yield this.send({
7491
7491
  channel_message_send: {
@@ -7499,7 +7499,8 @@ var _DefaultSocket = class _DefaultSocket {
7499
7499
  references,
7500
7500
  anonymous_message,
7501
7501
  mention_everyone,
7502
- avatar
7502
+ avatar,
7503
+ code
7503
7504
  }
7504
7505
  });
7505
7506
  return response.channel_message_ack;
@@ -7455,7 +7455,7 @@ var _DefaultSocket = class _DefaultSocket {
7455
7455
  updateStatus(status) {
7456
7456
  return this.send({ status_update: { status } });
7457
7457
  }
7458
- writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
7458
+ writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar, code) {
7459
7459
  return __async(this, null, function* () {
7460
7460
  const response = yield this.send({
7461
7461
  channel_message_send: {
@@ -7469,7 +7469,8 @@ var _DefaultSocket = class _DefaultSocket {
7469
7469
  references,
7470
7470
  anonymous_message,
7471
7471
  mention_everyone,
7472
- avatar
7472
+ avatar,
7473
+ code
7473
7474
  }
7474
7475
  });
7475
7476
  return response.channel_message_ack;
package/dist/socket.d.ts CHANGED
@@ -197,6 +197,7 @@ interface ChannelMessageSend {
197
197
  mention_everyone?: boolean;
198
198
  avatar: string;
199
199
  is_public: boolean;
200
+ code: number;
200
201
  };
201
202
  }
202
203
  /** Update a message previously sent to a realtime chat channel. */
@@ -656,7 +657,7 @@ export interface Socket {
656
657
  /** Update the status for the current user online. */
657
658
  updateStatus(status?: string): Promise<void>;
658
659
  /** Send a chat message to a chat channel on the server. */
659
- writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string): Promise<ChannelMessageAck>;
660
+ writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string, code?: number): Promise<ChannelMessageAck>;
660
661
  /** Send message typing */
661
662
  writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
662
663
  /** Send message reaction */
@@ -843,7 +844,7 @@ export declare class DefaultSocket implements Socket {
843
844
  unfollowUsers(user_ids: string[]): Promise<void>;
844
845
  updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean): Promise<ChannelMessageAck>;
845
846
  updateStatus(status?: string): Promise<void>;
846
- writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string): Promise<ChannelMessageAck>;
847
+ writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string, code?: number): Promise<ChannelMessageAck>;
847
848
  writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
848
849
  writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
849
850
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.9.90",
4
+ "version": "2.9.91",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -284,6 +284,8 @@ interface ChannelMessageSend {
284
284
  avatar: string;
285
285
  // Is public
286
286
  is_public: boolean;
287
+ // code
288
+ code: number;
287
289
  };
288
290
  }
289
291
 
@@ -969,7 +971,8 @@ export interface Socket {
969
971
  references?: Array<ApiMessageRef>,
970
972
  anonymous_message?: boolean,
971
973
  mention_everyone?: boolean,
972
- avatar?: string
974
+ avatar?: string,
975
+ code?: number
973
976
  ): Promise<ChannelMessageAck>;
974
977
 
975
978
  /** Send message typing */
@@ -2056,7 +2059,8 @@ export class DefaultSocket implements Socket {
2056
2059
  references?: Array<ApiMessageRef>,
2057
2060
  anonymous_message?: boolean,
2058
2061
  mention_everyone?: Boolean,
2059
- avatar?: string
2062
+ avatar?: string,
2063
+ code?: number,
2060
2064
  ): Promise<ChannelMessageAck> {
2061
2065
  const response = await this.send({
2062
2066
  channel_message_send: {
@@ -2071,6 +2075,7 @@ export class DefaultSocket implements Socket {
2071
2075
  anonymous_message: anonymous_message,
2072
2076
  mention_everyone: mention_everyone,
2073
2077
  avatar: avatar,
2078
+ code: code,
2074
2079
  },
2075
2080
  });
2076
2081
  return response.channel_message_ack;