mezon-js 2.10.23 → 2.10.25

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.
@@ -7720,7 +7720,7 @@ var _DefaultSocket = class _DefaultSocket {
7720
7720
  }
7721
7721
  });
7722
7722
  }
7723
- removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
7723
+ removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
7724
7724
  return __async(this, null, function* () {
7725
7725
  const response = yield this.send({
7726
7726
  channel_message_remove: {
@@ -7728,7 +7728,8 @@ var _DefaultSocket = class _DefaultSocket {
7728
7728
  channel_id,
7729
7729
  mode,
7730
7730
  message_id,
7731
- is_public
7731
+ is_public,
7732
+ has_attachment
7732
7733
  }
7733
7734
  });
7734
7735
  return response.channel_message_ack;
@@ -7975,10 +7976,11 @@ var _DefaultSocket = class _DefaultSocket {
7975
7976
  return response.join_ptt_channel;
7976
7977
  });
7977
7978
  }
7978
- talkPTTChannel(channelId, isTalk) {
7979
+ talkPTTChannel(clan_id, channelId, isTalk) {
7979
7980
  return __async(this, null, function* () {
7980
7981
  const response = yield this.send({
7981
7982
  talk_ptt_channel: {
7983
+ clan_id,
7982
7984
  channel_id: channelId,
7983
7985
  isTalk
7984
7986
  }
@@ -7686,7 +7686,7 @@ var _DefaultSocket = class _DefaultSocket {
7686
7686
  }
7687
7687
  });
7688
7688
  }
7689
- removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
7689
+ removeChatMessage(clan_id, channel_id, mode, is_public, message_id, has_attachment) {
7690
7690
  return __async(this, null, function* () {
7691
7691
  const response = yield this.send({
7692
7692
  channel_message_remove: {
@@ -7694,7 +7694,8 @@ var _DefaultSocket = class _DefaultSocket {
7694
7694
  channel_id,
7695
7695
  mode,
7696
7696
  message_id,
7697
- is_public
7697
+ is_public,
7698
+ has_attachment
7698
7699
  }
7699
7700
  });
7700
7701
  return response.channel_message_ack;
@@ -7941,10 +7942,11 @@ var _DefaultSocket = class _DefaultSocket {
7941
7942
  return response.join_ptt_channel;
7942
7943
  });
7943
7944
  }
7944
- talkPTTChannel(channelId, isTalk) {
7945
+ talkPTTChannel(clan_id, channelId, isTalk) {
7945
7946
  return __async(this, null, function* () {
7946
7947
  const response = yield this.send({
7947
7948
  talk_ptt_channel: {
7949
+ clan_id,
7948
7950
  channel_id: channelId,
7949
7951
  isTalk
7950
7952
  }
package/dist/socket.d.ts CHANGED
@@ -229,6 +229,8 @@ interface ChannelMessageRemove {
229
229
  /** A unique ID for the chat message to be removed. */
230
230
  message_id: string;
231
231
  is_public: boolean;
232
+ /** attachments */
233
+ has_attachment?: boolean;
232
234
  };
233
235
  }
234
236
  /** Presence update for a particular realtime chat channel. */
@@ -634,6 +636,8 @@ export interface JoinPTTChannel {
634
636
  export interface TalkPTTChannel {
635
637
  user_id: string;
636
638
  channel_id: string;
639
+ clan_id: string;
640
+ isTalk: boolean;
637
641
  }
638
642
  /** PTT Joined event */
639
643
  export interface PTTLeavedEvent {
@@ -689,7 +693,7 @@ export interface Socket {
689
693
  /** Leave a chat channel on the server. */
690
694
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
691
695
  /** Remove a chat message from a chat channel on the server. */
692
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
696
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
693
697
  /** Execute an RPC function to the server. */
694
698
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
695
699
  /** Unfollow one or more users from their status updates. */
@@ -715,7 +719,7 @@ export interface Socket {
715
719
  /** send voice leaved */
716
720
  writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
717
721
  joinPTTChannel(clanId: string, channelId: string, dataType: number, jsonData: string): Promise<JoinPTTChannel>;
718
- talkPTTChannel(channelId: string, isTalk: boolean): Promise<TalkPTTChannel>;
722
+ talkPTTChannel(clan_id: string, channelId: string, isTalk: boolean): Promise<TalkPTTChannel>;
719
723
  setHeartbeatTimeoutMs(ms: number): void;
720
724
  getHeartbeatTimeoutMs(): number;
721
725
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
@@ -887,7 +891,7 @@ export declare class DefaultSocket implements Socket {
887
891
  joinClanChat(clan_id: string): Promise<ClanJoin>;
888
892
  joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
889
893
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
890
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
894
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, has_attachment?: boolean): Promise<ChannelMessageAck>;
891
895
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
892
896
  unfollowUsers(user_ids: string[]): Promise<void>;
893
897
  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>;
@@ -906,7 +910,7 @@ export declare class DefaultSocket implements Socket {
906
910
  handleDropdownBoxSelected(message_id: string, channel_id: string, selectbox_id: string, sender_id: string, user_id: string, value: Array<string>): Promise<DropdownBoxSelected>;
907
911
  handleMessageButtonClick(message_id: string, channel_id: string, button_id: string, sender_id: string, user_id: string, extra_data: string): Promise<MessageButtonClicked>;
908
912
  joinPTTChannel(clanId: string, channelId: string, dataType: number, jsonData: string): Promise<JoinPTTChannel>;
909
- talkPTTChannel(channelId: string, isTalk: boolean): Promise<TalkPTTChannel>;
913
+ talkPTTChannel(clan_id: string, channelId: string, isTalk: boolean): Promise<TalkPTTChannel>;
910
914
  private pingPong;
911
915
  }
912
916
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.23",
4
+ "version": "2.10.25",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -323,6 +323,8 @@ interface ChannelMessageRemove {
323
323
  message_id: string;
324
324
  // Is public
325
325
  is_public: boolean;
326
+ /** attachments */
327
+ has_attachment?: boolean;
326
328
  };
327
329
  }
328
330
 
@@ -889,6 +891,10 @@ export interface TalkPTTChannel {
889
891
  user_id: string;
890
892
  // channel id
891
893
  channel_id: string;
894
+ // clan id
895
+ clan_id: string;
896
+ // is talk
897
+ isTalk: boolean;
892
898
  }
893
899
 
894
900
  /** PTT Joined event */
@@ -977,7 +983,8 @@ export interface Socket {
977
983
  channel_id: string,
978
984
  mode: number,
979
985
  is_public: boolean,
980
- message_id: string
986
+ message_id: string,
987
+ has_attachment?: boolean
981
988
  ): Promise<ChannelMessageAck>;
982
989
 
983
990
  /** Execute an RPC function to the server. */
@@ -1095,6 +1102,7 @@ export interface Socket {
1095
1102
  ): Promise<JoinPTTChannel>;
1096
1103
 
1097
1104
  talkPTTChannel(
1105
+ clan_id: string,
1098
1106
  channelId: string,
1099
1107
  isTalk: boolean
1100
1108
  ): Promise<TalkPTTChannel>;
@@ -2059,7 +2067,8 @@ export class DefaultSocket implements Socket {
2059
2067
  channel_id: string,
2060
2068
  mode: number,
2061
2069
  is_public: boolean,
2062
- message_id: string
2070
+ message_id: string,
2071
+ has_attachment?: boolean
2063
2072
  ): Promise<ChannelMessageAck> {
2064
2073
  const response = await this.send({
2065
2074
  channel_message_remove: {
@@ -2068,6 +2077,7 @@ export class DefaultSocket implements Socket {
2068
2077
  mode: mode,
2069
2078
  message_id: message_id,
2070
2079
  is_public: is_public,
2080
+ has_attachment: has_attachment
2071
2081
  },
2072
2082
  });
2073
2083
 
@@ -2408,11 +2418,13 @@ export class DefaultSocket implements Socket {
2408
2418
  }
2409
2419
 
2410
2420
  async talkPTTChannel(
2421
+ clan_id: string,
2411
2422
  channelId: string,
2412
2423
  isTalk: boolean
2413
2424
  ): Promise<TalkPTTChannel> {
2414
2425
  const response = await this.send({
2415
2426
  talk_ptt_channel: {
2427
+ clan_id: clan_id,
2416
2428
  channel_id: channelId,
2417
2429
  isTalk
2418
2430
  },