mezon-js 2.8.74 → 2.8.76

Sign up to get free protection for your applications and to get access to all the features.
@@ -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. */
@@ -84,6 +87,8 @@ export interface UserChannelAddedEvent {
84
87
  clan_id: string;
85
88
  channel_type: number;
86
89
  is_public: boolean;
90
+ parent_id: string;
91
+ is_parent_public: boolean;
87
92
  }
88
93
  export interface AddUsers {
89
94
  user_id: string;
@@ -281,6 +286,8 @@ export interface ChannelCreatedEvent {
281
286
  channel_private: number;
282
287
  channel_type: number;
283
288
  status: number;
289
+ parent_id: string;
290
+ is_parent_public: boolean;
284
291
  }
285
292
  export interface ChannelDeletedEvent {
286
293
  clan_id: string;
@@ -516,7 +523,7 @@ export interface Socket {
516
523
  /** Leave a chat channel on the server. */
517
524
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
518
525
  /** Remove a chat message from a chat channel on the server. */
519
- 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>;
520
527
  /** Execute an RPC function to the server. */
521
528
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
522
529
  /** Unfollow one or more users from their status updates. */
@@ -669,7 +676,7 @@ export declare class DefaultSocket implements Socket {
669
676
  joinClanChat(clan_id: string): Promise<ClanJoin>;
670
677
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
671
678
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
672
- 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>;
673
680
  removePartyMember(party_id: string, member: Presence): Promise<void>;
674
681
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
675
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.74",
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
 
@@ -111,6 +117,10 @@ export interface UserChannelAddedEvent {
111
117
  channel_type: number;
112
118
  // is public
113
119
  is_public: boolean;
120
+ // parent id
121
+ parent_id: string;
122
+ // parent public
123
+ is_parent_public: boolean;
114
124
  }
115
125
 
116
126
  export interface AddUsers {
@@ -413,6 +423,10 @@ export interface ChannelCreatedEvent {
413
423
  channel_type: number;
414
424
  // status
415
425
  status: number;
426
+ // parent
427
+ parent_id: string;
428
+ // parent public
429
+ is_parent_public: boolean;
416
430
  }
417
431
 
418
432
  export interface ChannelDeletedEvent {
@@ -775,7 +789,7 @@ export interface Socket {
775
789
  leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
776
790
 
777
791
  /** Remove a chat message from a chat channel on the server. */
778
- 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>;
779
793
 
780
794
  /** Execute an RPC function to the server. */
781
795
  rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
@@ -1398,15 +1412,17 @@ export class DefaultSocket implements Socket {
1398
1412
  return this.send({channel_leave: {clan_id: clan_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public}});
1399
1413
  }
1400
1414
 
1401
- 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> {
1402
1416
  const response = await this.send(
1403
1417
  {
1404
1418
  channel_message_remove: {
1405
1419
  clan_id: clan_id,
1420
+ parent_id: parent_id,
1406
1421
  channel_id: channel_id,
1407
1422
  mode: mode,
1408
1423
  message_id: message_id,
1409
- is_public: is_public
1424
+ is_public: is_public,
1425
+ is_parent_public: is_parent_public
1410
1426
  }
1411
1427
  }
1412
1428
  );