mezon-js 2.8.75 → 2.8.76

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.
@@ -5112,16 +5112,18 @@ var _DefaultSocket = class _DefaultSocket {
5112
5112
  leaveChat(clan_id, channel_id, channel_type, is_public) {
5113
5113
  return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
5114
5114
  }
5115
- removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
5115
+ removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id) {
5116
5116
  return __async(this, null, function* () {
5117
5117
  const response = yield this.send(
5118
5118
  {
5119
5119
  channel_message_remove: {
5120
5120
  clan_id,
5121
+ parent_id,
5121
5122
  channel_id,
5122
5123
  mode,
5123
5124
  message_id,
5124
- is_public
5125
+ is_public,
5126
+ is_parent_public
5125
5127
  }
5126
5128
  }
5127
5129
  );
@@ -5083,16 +5083,18 @@ var _DefaultSocket = class _DefaultSocket {
5083
5083
  leaveChat(clan_id, channel_id, channel_type, is_public) {
5084
5084
  return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
5085
5085
  }
5086
- removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
5086
+ removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id) {
5087
5087
  return __async(this, null, function* () {
5088
5088
  const response = yield this.send(
5089
5089
  {
5090
5090
  channel_message_remove: {
5091
5091
  clan_id,
5092
+ parent_id,
5092
5093
  channel_id,
5093
5094
  mode,
5094
5095
  message_id,
5095
- is_public
5096
+ is_public,
5097
+ is_parent_public
5096
5098
  }
5097
5099
  }
5098
5100
  );
package/dist/socket.d.ts CHANGED
@@ -60,6 +60,9 @@ interface ChannelJoin {
60
60
  persistence: boolean;
61
61
  /** Whether the user's channel presence is hidden when joining. */
62
62
  hidden: boolean;
63
+ is_public: boolean;
64
+ parent_id: string;
65
+ is_parent_public: boolean;
63
66
  };
64
67
  }
65
68
  /** Leave a realtime chat channel. */
@@ -520,7 +523,7 @@ export interface Socket {
520
523
  /** Leave a chat channel on the server. */
521
524
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
522
525
  /** Remove a chat message from a chat channel on the server. */
523
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
526
+ removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck>;
524
527
  /** Execute an RPC function to the server. */
525
528
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
526
529
  /** Unfollow one or more users from their status updates. */
@@ -673,7 +676,7 @@ export declare class DefaultSocket implements Socket {
673
676
  joinClanChat(clan_id: string): Promise<ClanJoin>;
674
677
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
675
678
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
676
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
679
+ removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck>;
677
680
  removePartyMember(party_id: string, member: Presence): Promise<void>;
678
681
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
679
682
  sendPartyData(party_id: string, op_code: number, data: string | Uint8Array): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.75",
3
+ "version": "2.8.76",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -73,6 +73,12 @@ interface ChannelJoin {
73
73
  persistence: boolean;
74
74
  /** Whether the user's channel presence is hidden when joining. */
75
75
  hidden: boolean;
76
+ // is public
77
+ is_public: boolean;
78
+ // parent id
79
+ parent_id: string;
80
+ // parent public
81
+ is_parent_public: boolean;
76
82
  };
77
83
  }
78
84
 
@@ -783,7 +789,7 @@ export interface Socket {
783
789
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
784
790
 
785
791
  /** Remove a chat message from a chat channel on the server. */
786
- removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
792
+ removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
787
793
 
788
794
  /** Execute an RPC function to the server. */
789
795
  rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
@@ -1406,15 +1412,17 @@ export class DefaultSocket implements Socket {
1406
1412
  return this.send({channel_leave: {clan_id: clan_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public}});
1407
1413
  }
1408
1414
 
1409
- async removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
1415
+ async removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck> {
1410
1416
  const response = await this.send(
1411
1417
  {
1412
1418
  channel_message_remove: {
1413
1419
  clan_id: clan_id,
1420
+ parent_id: parent_id,
1414
1421
  channel_id: channel_id,
1415
1422
  mode: mode,
1416
1423
  message_id: message_id,
1417
- is_public: is_public
1424
+ is_public: is_public,
1425
+ is_parent_public: is_parent_public
1418
1426
  }
1419
1427
  }
1420
1428
  );