mezon-js 2.8.76 → 2.8.77

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.
package/api.gen.ts CHANGED
@@ -31,7 +31,7 @@ export interface ClanUserListClanUser {
31
31
  //from the `nick_name` field in the `clan_desc_profile` table.
32
32
  clan_nick?: string;
33
33
  //Their relationship to the role.
34
- role_id?: string;
34
+ role_id?: Array<string>;
35
35
  //User.
36
36
  user?: ApiUser;
37
37
  }
@@ -1495,6 +1495,8 @@ export interface ApiUpdateCategoryDescRequest {
1495
1495
  category_id?: string;
1496
1496
  //
1497
1497
  category_name?: string;
1498
+ // clan ID
1499
+ ClanId: string;
1498
1500
  }
1499
1501
 
1500
1502
  /** */
package/dist/api.gen.d.ts CHANGED
@@ -13,7 +13,7 @@ export interface ClanUserListClanUser {
13
13
  clan_avatar?: string;
14
14
  clan_id?: string;
15
15
  clan_nick?: string;
16
- role_id?: string;
16
+ role_id?: Array<string>;
17
17
  user?: ApiUser;
18
18
  }
19
19
  /** */
@@ -866,6 +866,7 @@ export interface ApiUpdateAccountRequest {
866
866
  export interface ApiUpdateCategoryDescRequest {
867
867
  category_id?: string;
868
868
  category_name?: string;
869
+ ClanId: string;
869
870
  }
870
871
  /** */
871
872
  export interface ApiUpdateRoleChannelRequest {
@@ -5109,8 +5109,8 @@ var _DefaultSocket = class _DefaultSocket {
5109
5109
  return response.channel;
5110
5110
  });
5111
5111
  }
5112
- leaveChat(clan_id, channel_id, channel_type, is_public) {
5113
- return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
5112
+ leaveChat(clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public) {
5113
+ return this.send({ channel_leave: { clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public } });
5114
5114
  }
5115
5115
  removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id) {
5116
5116
  return __async(this, null, function* () {
@@ -5130,14 +5130,6 @@ var _DefaultSocket = class _DefaultSocket {
5130
5130
  return response.channel_message_ack;
5131
5131
  });
5132
5132
  }
5133
- removePartyMember(party_id, member) {
5134
- return __async(this, null, function* () {
5135
- return this.send({ party_remove: {
5136
- party_id,
5137
- presence: member
5138
- } });
5139
- });
5140
- }
5141
5133
  rpc(id, payload, http_key) {
5142
5134
  return __async(this, null, function* () {
5143
5135
  const response = yield this.send(
@@ -5152,9 +5144,6 @@ var _DefaultSocket = class _DefaultSocket {
5152
5144
  return response.rpc;
5153
5145
  });
5154
5146
  }
5155
- sendPartyData(party_id, op_code, data) {
5156
- return this.send({ party_data_send: { party_id, op_code, data } });
5157
- }
5158
5147
  unfollowUsers(user_ids) {
5159
5148
  return this.send({ status_unfollow: { user_ids } });
5160
5149
  }
@@ -5080,8 +5080,8 @@ var _DefaultSocket = class _DefaultSocket {
5080
5080
  return response.channel;
5081
5081
  });
5082
5082
  }
5083
- leaveChat(clan_id, channel_id, channel_type, is_public) {
5084
- return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
5083
+ leaveChat(clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public) {
5084
+ return this.send({ channel_leave: { clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public } });
5085
5085
  }
5086
5086
  removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id) {
5087
5087
  return __async(this, null, function* () {
@@ -5101,14 +5101,6 @@ var _DefaultSocket = class _DefaultSocket {
5101
5101
  return response.channel_message_ack;
5102
5102
  });
5103
5103
  }
5104
- removePartyMember(party_id, member) {
5105
- return __async(this, null, function* () {
5106
- return this.send({ party_remove: {
5107
- party_id,
5108
- presence: member
5109
- } });
5110
- });
5111
- }
5112
5104
  rpc(id, payload, http_key) {
5113
5105
  return __async(this, null, function* () {
5114
5106
  const response = yield this.send(
@@ -5123,9 +5115,6 @@ var _DefaultSocket = class _DefaultSocket {
5123
5115
  return response.rpc;
5124
5116
  });
5125
5117
  }
5126
- sendPartyData(party_id, op_code, data) {
5127
- return this.send({ party_data_send: { party_id, op_code, data } });
5128
- }
5129
5118
  unfollowUsers(user_ids) {
5130
5119
  return this.send({ status_unfollow: { user_ids } });
5131
5120
  }
package/dist/socket.d.ts CHANGED
@@ -73,6 +73,8 @@ interface ChannelLeave {
73
73
  mode: number;
74
74
  channel_label: string;
75
75
  is_public: boolean;
76
+ parent_id: string;
77
+ is_parent_public: boolean;
76
78
  };
77
79
  }
78
80
  export interface AddClanUserEvent {
@@ -117,6 +119,8 @@ export interface LastPinMessageEvent {
117
119
  /** operation */
118
120
  operation: number;
119
121
  is_public: boolean;
122
+ parent_id?: string;
123
+ is_parent_public?: string;
120
124
  }
121
125
  /** Last seen message by user */
122
126
  export interface LastSeenMessageEvent {
@@ -521,7 +525,7 @@ export interface Socket {
521
525
  /** Join a chat channel on the server. */
522
526
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
523
527
  /** Leave a chat channel on the server. */
524
- leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
528
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<void>;
525
529
  /** Remove a chat message from a chat channel on the server. */
526
530
  removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck>;
527
531
  /** Execute an RPC function to the server. */
@@ -675,11 +679,9 @@ export declare class DefaultSocket implements Socket {
675
679
  followUsers(userIds: string[]): Promise<Status>;
676
680
  joinClanChat(clan_id: string): Promise<ClanJoin>;
677
681
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
678
- leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
682
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<void>;
679
683
  removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck>;
680
- removePartyMember(party_id: string, member: Presence): Promise<void>;
681
684
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
682
- sendPartyData(party_id: string, op_code: number, data: string | Uint8Array): Promise<void>;
683
685
  unfollowUsers(user_ids: string[]): Promise<void>;
684
686
  updateChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean): Promise<ChannelMessageAck>;
685
687
  updateStatus(status?: string): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.76",
3
+ "version": "2.8.77",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -93,6 +93,10 @@ interface ChannelLeave {
93
93
  channel_label: string;
94
94
  // Is public
95
95
  is_public: boolean;
96
+ // parent id
97
+ parent_id: string;
98
+ // parent public
99
+ is_parent_public: boolean;
96
100
  };
97
101
  }
98
102
 
@@ -164,6 +168,10 @@ export interface LastPinMessageEvent {
164
168
  operation: number;
165
169
  // Is public
166
170
  is_public: boolean;
171
+ // The parent id to sent to.
172
+ parent_id?: string;
173
+ // is parent public
174
+ is_parent_public?: string;
167
175
  }
168
176
 
169
177
  /** Last seen message by user */
@@ -786,7 +794,7 @@ export interface Socket {
786
794
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean) : Promise<Channel>;
787
795
 
788
796
  /** Leave a chat channel on the server. */
789
- leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
797
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean) : Promise<void>;
790
798
 
791
799
  /** Remove a chat message from a chat channel on the server. */
792
800
  removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
@@ -1408,8 +1416,8 @@ export class DefaultSocket implements Socket {
1408
1416
  return response.channel;
1409
1417
  }
1410
1418
 
1411
- leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void> {
1412
- return this.send({channel_leave: {clan_id: clan_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public}});
1419
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<void> {
1420
+ return this.send({channel_leave: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public, is_parent_public: is_parent_public}});
1413
1421
  }
1414
1422
 
1415
1423
  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> {
@@ -1430,13 +1438,6 @@ export class DefaultSocket implements Socket {
1430
1438
  return response.channel_message_ack;
1431
1439
  }
1432
1440
 
1433
- async removePartyMember(party_id: string, member: Presence): Promise<void> {
1434
- return this.send({party_remove: {
1435
- party_id: party_id,
1436
- presence: member
1437
- }});
1438
- }
1439
-
1440
1441
  async rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc> {
1441
1442
  const response = await this.send(
1442
1443
  {
@@ -1450,10 +1451,6 @@ export class DefaultSocket implements Socket {
1450
1451
  return response.rpc;
1451
1452
  }
1452
1453
 
1453
- sendPartyData(party_id: string, op_code: number, data: string | Uint8Array): Promise<void> {
1454
- return this.send({party_data_send: {party_id: party_id, op_code: op_code, data: data}})
1455
- }
1456
-
1457
1454
  unfollowUsers(user_ids : string[]): Promise<void> {
1458
1455
  return this.send({status_unfollow: {user_ids: user_ids}});
1459
1456
  }