mezon-js 2.8.75 → 2.8.77

Sign up to get free protection for your applications and to get access to all the features.
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,33 +5109,27 @@ 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
- 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
  );
5128
5130
  return response.channel_message_ack;
5129
5131
  });
5130
5132
  }
5131
- removePartyMember(party_id, member) {
5132
- return __async(this, null, function* () {
5133
- return this.send({ party_remove: {
5134
- party_id,
5135
- presence: member
5136
- } });
5137
- });
5138
- }
5139
5133
  rpc(id, payload, http_key) {
5140
5134
  return __async(this, null, function* () {
5141
5135
  const response = yield this.send(
@@ -5150,9 +5144,6 @@ var _DefaultSocket = class _DefaultSocket {
5150
5144
  return response.rpc;
5151
5145
  });
5152
5146
  }
5153
- sendPartyData(party_id, op_code, data) {
5154
- return this.send({ party_data_send: { party_id, op_code, data } });
5155
- }
5156
5147
  unfollowUsers(user_ids) {
5157
5148
  return this.send({ status_unfollow: { user_ids } });
5158
5149
  }
@@ -5080,33 +5080,27 @@ 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
- 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
  );
5099
5101
  return response.channel_message_ack;
5100
5102
  });
5101
5103
  }
5102
- removePartyMember(party_id, member) {
5103
- return __async(this, null, function* () {
5104
- return this.send({ party_remove: {
5105
- party_id,
5106
- presence: member
5107
- } });
5108
- });
5109
- }
5110
5104
  rpc(id, payload, http_key) {
5111
5105
  return __async(this, null, function* () {
5112
5106
  const response = yield this.send(
@@ -5121,9 +5115,6 @@ var _DefaultSocket = class _DefaultSocket {
5121
5115
  return response.rpc;
5122
5116
  });
5123
5117
  }
5124
- sendPartyData(party_id, op_code, data) {
5125
- return this.send({ party_data_send: { party_id, op_code, data } });
5126
- }
5127
5118
  unfollowUsers(user_ids) {
5128
5119
  return this.send({ status_unfollow: { user_ids } });
5129
5120
  }
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. */
@@ -70,6 +73,8 @@ interface ChannelLeave {
70
73
  mode: number;
71
74
  channel_label: string;
72
75
  is_public: boolean;
76
+ parent_id: string;
77
+ is_parent_public: boolean;
73
78
  };
74
79
  }
75
80
  export interface AddClanUserEvent {
@@ -114,6 +119,8 @@ export interface LastPinMessageEvent {
114
119
  /** operation */
115
120
  operation: number;
116
121
  is_public: boolean;
122
+ parent_id?: string;
123
+ is_parent_public?: string;
117
124
  }
118
125
  /** Last seen message by user */
119
126
  export interface LastSeenMessageEvent {
@@ -518,9 +525,9 @@ export interface Socket {
518
525
  /** Join a chat channel on the server. */
519
526
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
520
527
  /** Leave a chat channel on the server. */
521
- 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>;
522
529
  /** 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>;
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>;
524
531
  /** Execute an RPC function to the server. */
525
532
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
526
533
  /** Unfollow one or more users from their status updates. */
@@ -672,11 +679,9 @@ export declare class DefaultSocket implements Socket {
672
679
  followUsers(userIds: string[]): Promise<Status>;
673
680
  joinClanChat(clan_id: string): Promise<ClanJoin>;
674
681
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
675
- 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>;
677
- removePartyMember(party_id: string, member: Presence): 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>;
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>;
678
684
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
679
- sendPartyData(party_id: string, op_code: number, data: string | Uint8Array): Promise<void>;
680
685
  unfollowUsers(user_ids: string[]): Promise<void>;
681
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>;
682
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.75",
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
@@ -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
 
@@ -87,6 +93,10 @@ interface ChannelLeave {
87
93
  channel_label: string;
88
94
  // Is public
89
95
  is_public: boolean;
96
+ // parent id
97
+ parent_id: string;
98
+ // parent public
99
+ is_parent_public: boolean;
90
100
  };
91
101
  }
92
102
 
@@ -158,6 +168,10 @@ export interface LastPinMessageEvent {
158
168
  operation: number;
159
169
  // Is public
160
170
  is_public: boolean;
171
+ // The parent id to sent to.
172
+ parent_id?: string;
173
+ // is parent public
174
+ is_parent_public?: string;
161
175
  }
162
176
 
163
177
  /** Last seen message by user */
@@ -780,10 +794,10 @@ export interface Socket {
780
794
  joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean) : Promise<Channel>;
781
795
 
782
796
  /** Leave a chat channel on the server. */
783
- 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>;
784
798
 
785
799
  /** 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>;
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>;
787
801
 
788
802
  /** Execute an RPC function to the server. */
789
803
  rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
@@ -1402,19 +1416,21 @@ export class DefaultSocket implements Socket {
1402
1416
  return response.channel;
1403
1417
  }
1404
1418
 
1405
- leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void> {
1406
- 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}});
1407
1421
  }
1408
1422
 
1409
- async removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
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> {
1410
1424
  const response = await this.send(
1411
1425
  {
1412
1426
  channel_message_remove: {
1413
1427
  clan_id: clan_id,
1428
+ parent_id: parent_id,
1414
1429
  channel_id: channel_id,
1415
1430
  mode: mode,
1416
1431
  message_id: message_id,
1417
- is_public: is_public
1432
+ is_public: is_public,
1433
+ is_parent_public: is_parent_public
1418
1434
  }
1419
1435
  }
1420
1436
  );
@@ -1422,13 +1438,6 @@ export class DefaultSocket implements Socket {
1422
1438
  return response.channel_message_ack;
1423
1439
  }
1424
1440
 
1425
- async removePartyMember(party_id: string, member: Presence): Promise<void> {
1426
- return this.send({party_remove: {
1427
- party_id: party_id,
1428
- presence: member
1429
- }});
1430
- }
1431
-
1432
1441
  async rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc> {
1433
1442
  const response = await this.send(
1434
1443
  {
@@ -1442,10 +1451,6 @@ export class DefaultSocket implements Socket {
1442
1451
  return response.rpc;
1443
1452
  }
1444
1453
 
1445
- sendPartyData(party_id: string, op_code: number, data: string | Uint8Array): Promise<void> {
1446
- return this.send({party_data_send: {party_id: party_id, op_code: op_code, data: data}})
1447
- }
1448
-
1449
1454
  unfollowUsers(user_ids : string[]): Promise<void> {
1450
1455
  return this.send({status_unfollow: {user_ids: user_ids}});
1451
1456
  }