mezon-js 2.9.30 → 2.9.31

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
@@ -1330,8 +1330,6 @@ export interface ApiMessageReaction {
1330
1330
  message_id: string;
1331
1331
  // The parent id to sent to.
1332
1332
  parent_id?: string;
1333
- // is parent public
1334
- is_parent_public?: boolean;
1335
1333
  }
1336
1334
 
1337
1335
  export interface ApiListChannelAppsResponse {
package/dist/api.gen.d.ts CHANGED
@@ -771,7 +771,6 @@ export interface ApiMessageReaction {
771
771
  /** The message that user react */
772
772
  message_id: string;
773
773
  parent_id?: string;
774
- is_parent_public?: boolean;
775
774
  }
776
775
  export interface ApiListChannelAppsResponse {
777
776
  channel_apps?: Array<ApiChannelAppResponse>;
@@ -6294,7 +6294,7 @@ var _DefaultSocket = class _DefaultSocket {
6294
6294
  return response.clan_join;
6295
6295
  });
6296
6296
  }
6297
- joinChat(clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public) {
6297
+ joinChat(clan_id, parent_id, channel_id, channel_type, is_public) {
6298
6298
  return __async(this, null, function* () {
6299
6299
  const response = yield this.send(
6300
6300
  {
@@ -6303,18 +6303,17 @@ var _DefaultSocket = class _DefaultSocket {
6303
6303
  parent_id,
6304
6304
  channel_id,
6305
6305
  channel_type,
6306
- is_public,
6307
- is_parent_public
6306
+ is_public
6308
6307
  }
6309
6308
  }
6310
6309
  );
6311
6310
  return response.channel;
6312
6311
  });
6313
6312
  }
6314
- leaveChat(clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public) {
6315
- return this.send({ channel_leave: { clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public } });
6313
+ leaveChat(clan_id, parent_id, channel_id, channel_type, is_public) {
6314
+ return this.send({ channel_leave: { clan_id, parent_id, channel_id, channel_type, is_public } });
6316
6315
  }
6317
- removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id) {
6316
+ removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id) {
6318
6317
  return __async(this, null, function* () {
6319
6318
  const response = yield this.send(
6320
6319
  {
@@ -6324,8 +6323,7 @@ var _DefaultSocket = class _DefaultSocket {
6324
6323
  channel_id,
6325
6324
  mode,
6326
6325
  message_id,
6327
- is_public,
6328
- is_parent_public
6326
+ is_public
6329
6327
  }
6330
6328
  }
6331
6329
  );
@@ -6349,30 +6347,30 @@ var _DefaultSocket = class _DefaultSocket {
6349
6347
  unfollowUsers(user_ids) {
6350
6348
  return this.send({ status_unfollow: { user_ids } });
6351
6349
  }
6352
- updateChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, content, mentions, attachments, hideEditted) {
6350
+ updateChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
6353
6351
  return __async(this, null, function* () {
6354
- const response = yield this.send({ channel_message_update: { clan_id, parent_id, channel_id, message_id, content, mentions, attachments, mode, is_public, is_parent_public, hide_editted: hideEditted } });
6352
+ const response = yield this.send({ channel_message_update: { clan_id, parent_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
6355
6353
  return response.channel_message_ack;
6356
6354
  });
6357
6355
  }
6358
6356
  updateStatus(status) {
6359
6357
  return this.send({ status_update: { status } });
6360
6358
  }
6361
- writeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6359
+ writeChatMessage(clan_id, parent_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6362
6360
  return __async(this, null, function* () {
6363
- const response = yield this.send({ channel_message_send: { clan_id, parent_id, channel_id, mode, is_public, is_parent_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
6361
+ const response = yield this.send({ channel_message_send: { clan_id, parent_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
6364
6362
  return response.channel_message_ack;
6365
6363
  });
6366
6364
  }
6367
- writeMessageReaction(id, clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6365
+ writeMessageReaction(id, clan_id, parent_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6368
6366
  return __async(this, null, function* () {
6369
- const response = yield this.send({ message_reaction_event: { id, clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
6367
+ const response = yield this.send({ message_reaction_event: { id, clan_id, parent_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
6370
6368
  return response.message_reaction_event;
6371
6369
  });
6372
6370
  }
6373
- writeMessageTyping(clan_id, parent_id, channel_id, mode, is_public, is_parent_public) {
6371
+ writeMessageTyping(clan_id, parent_id, channel_id, mode, is_public) {
6374
6372
  return __async(this, null, function* () {
6375
- const response = yield this.send({ message_typing_event: { clan_id, parent_id, channel_id, mode, is_public, is_parent_public } });
6373
+ const response = yield this.send({ message_typing_event: { clan_id, parent_id, channel_id, mode, is_public } });
6376
6374
  return response.message_typing_event;
6377
6375
  });
6378
6376
  }
@@ -6382,9 +6380,9 @@ var _DefaultSocket = class _DefaultSocket {
6382
6380
  return response.last_seen_message_event;
6383
6381
  });
6384
6382
  }
6385
- writeLastPinMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, timestamp_seconds, operation) {
6383
+ writeLastPinMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
6386
6384
  return __async(this, null, function* () {
6387
- const response = yield this.send({ last_pin_message_event: { clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, timestamp_seconds, operation } });
6385
+ const response = yield this.send({ last_pin_message_event: { clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
6388
6386
  return response.last_pin_message_event;
6389
6387
  });
6390
6388
  }
@@ -6265,7 +6265,7 @@ var _DefaultSocket = class _DefaultSocket {
6265
6265
  return response.clan_join;
6266
6266
  });
6267
6267
  }
6268
- joinChat(clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public) {
6268
+ joinChat(clan_id, parent_id, channel_id, channel_type, is_public) {
6269
6269
  return __async(this, null, function* () {
6270
6270
  const response = yield this.send(
6271
6271
  {
@@ -6274,18 +6274,17 @@ var _DefaultSocket = class _DefaultSocket {
6274
6274
  parent_id,
6275
6275
  channel_id,
6276
6276
  channel_type,
6277
- is_public,
6278
- is_parent_public
6277
+ is_public
6279
6278
  }
6280
6279
  }
6281
6280
  );
6282
6281
  return response.channel;
6283
6282
  });
6284
6283
  }
6285
- leaveChat(clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public) {
6286
- return this.send({ channel_leave: { clan_id, parent_id, channel_id, channel_type, is_public, is_parent_public } });
6284
+ leaveChat(clan_id, parent_id, channel_id, channel_type, is_public) {
6285
+ return this.send({ channel_leave: { clan_id, parent_id, channel_id, channel_type, is_public } });
6287
6286
  }
6288
- removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id) {
6287
+ removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id) {
6289
6288
  return __async(this, null, function* () {
6290
6289
  const response = yield this.send(
6291
6290
  {
@@ -6295,8 +6294,7 @@ var _DefaultSocket = class _DefaultSocket {
6295
6294
  channel_id,
6296
6295
  mode,
6297
6296
  message_id,
6298
- is_public,
6299
- is_parent_public
6297
+ is_public
6300
6298
  }
6301
6299
  }
6302
6300
  );
@@ -6320,30 +6318,30 @@ var _DefaultSocket = class _DefaultSocket {
6320
6318
  unfollowUsers(user_ids) {
6321
6319
  return this.send({ status_unfollow: { user_ids } });
6322
6320
  }
6323
- updateChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, content, mentions, attachments, hideEditted) {
6321
+ updateChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
6324
6322
  return __async(this, null, function* () {
6325
- const response = yield this.send({ channel_message_update: { clan_id, parent_id, channel_id, message_id, content, mentions, attachments, mode, is_public, is_parent_public, hide_editted: hideEditted } });
6323
+ const response = yield this.send({ channel_message_update: { clan_id, parent_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
6326
6324
  return response.channel_message_ack;
6327
6325
  });
6328
6326
  }
6329
6327
  updateStatus(status) {
6330
6328
  return this.send({ status_update: { status } });
6331
6329
  }
6332
- writeChatMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6330
+ writeChatMessage(clan_id, parent_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6333
6331
  return __async(this, null, function* () {
6334
- const response = yield this.send({ channel_message_send: { clan_id, parent_id, channel_id, mode, is_public, is_parent_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
6332
+ const response = yield this.send({ channel_message_send: { clan_id, parent_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
6335
6333
  return response.channel_message_ack;
6336
6334
  });
6337
6335
  }
6338
- writeMessageReaction(id, clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6336
+ writeMessageReaction(id, clan_id, parent_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6339
6337
  return __async(this, null, function* () {
6340
- const response = yield this.send({ message_reaction_event: { id, clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
6338
+ const response = yield this.send({ message_reaction_event: { id, clan_id, parent_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
6341
6339
  return response.message_reaction_event;
6342
6340
  });
6343
6341
  }
6344
- writeMessageTyping(clan_id, parent_id, channel_id, mode, is_public, is_parent_public) {
6342
+ writeMessageTyping(clan_id, parent_id, channel_id, mode, is_public) {
6345
6343
  return __async(this, null, function* () {
6346
- const response = yield this.send({ message_typing_event: { clan_id, parent_id, channel_id, mode, is_public, is_parent_public } });
6344
+ const response = yield this.send({ message_typing_event: { clan_id, parent_id, channel_id, mode, is_public } });
6347
6345
  return response.message_typing_event;
6348
6346
  });
6349
6347
  }
@@ -6353,9 +6351,9 @@ var _DefaultSocket = class _DefaultSocket {
6353
6351
  return response.last_seen_message_event;
6354
6352
  });
6355
6353
  }
6356
- writeLastPinMessage(clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, timestamp_seconds, operation) {
6354
+ writeLastPinMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
6357
6355
  return __async(this, null, function* () {
6358
- const response = yield this.send({ last_pin_message_event: { clan_id, parent_id, channel_id, mode, is_public, is_parent_public, message_id, timestamp_seconds, operation } });
6356
+ const response = yield this.send({ last_pin_message_event: { clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
6359
6357
  return response.last_pin_message_event;
6360
6358
  });
6361
6359
  }
package/dist/socket.d.ts CHANGED
@@ -62,7 +62,6 @@ interface ChannelJoin {
62
62
  hidden: boolean;
63
63
  is_public: boolean;
64
64
  parent_id: string;
65
- is_parent_public: boolean;
66
65
  };
67
66
  }
68
67
  /** Leave a realtime chat channel. */
@@ -74,7 +73,6 @@ interface ChannelLeave {
74
73
  channel_label: string;
75
74
  is_public: boolean;
76
75
  parent_id: string;
77
- is_parent_public: boolean;
78
76
  };
79
77
  }
80
78
  export interface AddClanUserEvent {
@@ -106,7 +104,6 @@ export interface UserChannelAddedEvent {
106
104
  channel_type: number;
107
105
  is_public: boolean;
108
106
  parent_id: string;
109
- is_parent_public: boolean;
110
107
  }
111
108
  export interface UserChannelRemovedEvent {
112
109
  channel_id: string;
@@ -131,7 +128,6 @@ export interface LastPinMessageEvent {
131
128
  operation: number;
132
129
  is_public: boolean;
133
130
  parent_id?: string;
134
- is_parent_public?: string;
135
131
  }
136
132
  /** Last seen message by user */
137
133
  export interface LastSeenMessageEvent {
@@ -153,7 +149,6 @@ export interface MessageTypingEvent {
153
149
  sender_id: string;
154
150
  is_public: boolean;
155
151
  parent_id?: string;
156
- is_parent_public?: string;
157
152
  }
158
153
  export interface UserProfileUpdatedEvent {
159
154
  user_id: string;
@@ -199,7 +194,6 @@ interface ChannelMessageSend {
199
194
  avatar: string;
200
195
  is_public: boolean;
201
196
  parent_id?: string;
202
- is_parent_public?: boolean;
203
197
  };
204
198
  }
205
199
  /** Update a message previously sent to a realtime chat channel. */
@@ -219,7 +213,6 @@ interface ChannelMessageUpdate {
219
213
  mode: number;
220
214
  is_public: boolean;
221
215
  parent_id?: string;
222
- is_parent_public?: boolean;
223
216
  };
224
217
  }
225
218
  /** Remove a message previously sent to a realtime chat channel. */
@@ -235,7 +228,6 @@ interface ChannelMessageRemove {
235
228
  message_id: string;
236
229
  is_public: boolean;
237
230
  parent_id?: string;
238
- is_parent_public?: boolean;
239
231
  };
240
232
  }
241
233
  /** Presence update for a particular realtime chat channel. */
@@ -306,7 +298,6 @@ export interface ChannelCreatedEvent {
306
298
  channel_type: number;
307
299
  status: number;
308
300
  parent_id: string;
309
- is_parent_public: boolean;
310
301
  app_url: string;
311
302
  }
312
303
  export interface ChannelDeletedEvent {
@@ -600,29 +591,29 @@ export interface Socket {
600
591
  /** Join clan chat */
601
592
  joinClanChat(clan_id: string): Promise<ClanJoin>;
602
593
  /** Join a chat channel on the server. */
603
- joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
594
+ joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
604
595
  /** Leave a chat channel on the server. */
605
- leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<void>;
596
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
606
597
  /** Remove a chat message from a chat channel on the server. */
607
- removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck>;
598
+ removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
608
599
  /** Execute an RPC function to the server. */
609
600
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
610
601
  /** Unfollow one or more users from their status updates. */
611
602
  unfollowUsers(user_ids: string[]): Promise<void>;
612
603
  /** Update a chat message on a chat channel in the server. */
613
- 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>;
604
+ updateChatMessage(clan_id: string, parent_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>;
614
605
  /** Update the status for the current user online. */
615
606
  updateStatus(status?: string): Promise<void>;
616
607
  /** Send a chat message to a chat channel on the server. */
617
- writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string): Promise<ChannelMessageAck>;
608
+ writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string): Promise<ChannelMessageAck>;
618
609
  /** Send message typing */
619
- writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean): Promise<MessageTypingEvent>;
610
+ writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
620
611
  /** Send message reaction */
621
- writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
612
+ writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
622
613
  /** Send last seen message */
623
614
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
624
615
  /** Send last pin message */
625
- writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
616
+ writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
626
617
  /** Send custom user status */
627
618
  writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
628
619
  /** send voice joined */
@@ -772,18 +763,18 @@ export declare class DefaultSocket implements Socket {
772
763
  send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout?: number): Promise<any>;
773
764
  followUsers(userIds: string[]): Promise<Status>;
774
765
  joinClanChat(clan_id: string): Promise<ClanJoin>;
775
- joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel>;
776
- leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<void>;
777
- removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string): Promise<ChannelMessageAck>;
766
+ joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
767
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
768
+ removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
778
769
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
779
770
  unfollowUsers(user_ids: string[]): Promise<void>;
780
- 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>;
771
+ updateChatMessage(clan_id: string, parent_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>;
781
772
  updateStatus(status?: string): Promise<void>;
782
- writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string): Promise<ChannelMessageAck>;
783
- writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
784
- writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean): Promise<MessageTypingEvent>;
773
+ writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string): Promise<ChannelMessageAck>;
774
+ writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
775
+ writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
785
776
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
786
- writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
777
+ writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
787
778
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
788
779
  writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
789
780
  writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.9.30",
4
+ "version": "2.9.31",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -77,8 +77,6 @@ interface ChannelJoin {
77
77
  is_public: boolean;
78
78
  // parent id
79
79
  parent_id: string;
80
- // parent public
81
- is_parent_public: boolean;
82
80
  };
83
81
  }
84
82
 
@@ -95,8 +93,6 @@ interface ChannelLeave {
95
93
  is_public: boolean;
96
94
  // parent id
97
95
  parent_id: string;
98
- // parent public
99
- is_parent_public: boolean;
100
96
  };
101
97
  }
102
98
 
@@ -140,8 +136,6 @@ export interface UserChannelAddedEvent {
140
136
  is_public: boolean;
141
137
  // parent id
142
138
  parent_id: string;
143
- // parent public
144
- is_parent_public: boolean;
145
139
  }
146
140
 
147
141
  export interface UserChannelRemovedEvent {
@@ -178,8 +172,6 @@ export interface LastPinMessageEvent {
178
172
  is_public: boolean;
179
173
  // The parent id to sent to.
180
174
  parent_id?: string;
181
- // is parent public
182
- is_parent_public?: string;
183
175
  }
184
176
 
185
177
  /** Last seen message by user */
@@ -210,8 +202,6 @@ export interface MessageTypingEvent {
210
202
  is_public: boolean;
211
203
  // The parent id to sent to.
212
204
  parent_id?: string;
213
- // is parent public
214
- is_parent_public?: string;
215
205
  }
216
206
 
217
207
  // user profile updated event
@@ -277,8 +267,6 @@ interface ChannelMessageSend {
277
267
  is_public: boolean;
278
268
  // The parent id to sent to.
279
269
  parent_id?: string;
280
- // is parent public
281
- is_parent_public?: boolean;
282
270
  };
283
271
  }
284
272
 
@@ -301,8 +289,6 @@ interface ChannelMessageUpdate {
301
289
  is_public: boolean;
302
290
  // The parent id to sent to.
303
291
  parent_id?: string;
304
- // is parent public
305
- is_parent_public?: boolean;
306
292
  };
307
293
  }
308
294
 
@@ -323,8 +309,6 @@ interface ChannelMessageRemove {
323
309
  is_public: boolean;
324
310
  // The parent id to sent to.
325
311
  parent_id?: string;
326
- // is parent public
327
- is_parent_public?: boolean;
328
312
  };
329
313
  }
330
314
 
@@ -447,8 +431,6 @@ export interface ChannelCreatedEvent {
447
431
  status: number;
448
432
  // parent
449
433
  parent_id: string;
450
- // parent public
451
- is_parent_public: boolean;
452
434
  // app url
453
435
  app_url: string;
454
436
  }
@@ -849,13 +831,13 @@ export interface Socket {
849
831
  joinClanChat(clan_id: string) : Promise<ClanJoin>;
850
832
 
851
833
  /** Join a chat channel on the server. */
852
- joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean) : Promise<Channel>;
834
+ joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<Channel>;
853
835
 
854
836
  /** Leave a chat channel on the server. */
855
- leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean) : Promise<void>;
837
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
856
838
 
857
839
  /** Remove a chat message from a chat channel on the server. */
858
- removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
840
+ removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
859
841
 
860
842
  /** Execute an RPC function to the server. */
861
843
  rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
@@ -864,25 +846,25 @@ export interface Socket {
864
846
  unfollowUsers(user_ids : string[]) : Promise<void>;
865
847
 
866
848
  /** Update a chat message on a chat channel in the server. */
867
- 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>;
849
+ updateChatMessage(clan_id: string, parent_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>;
868
850
 
869
851
  /** Update the status for the current user online. */
870
852
  updateStatus(status?: string) : Promise<void>;
871
853
 
872
854
  /** Send a chat message to a chat channel on the server. */
873
- writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:boolean, avatar?: string) : Promise<ChannelMessageAck>;
855
+ writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:boolean, avatar?: string) : Promise<ChannelMessageAck>;
874
856
 
875
857
  /** Send message typing */
876
- writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean) : Promise<MessageTypingEvent>;
858
+ writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean) : Promise<MessageTypingEvent>;
877
859
 
878
860
  /** Send message reaction */
879
- writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean) : Promise<ApiMessageReaction>;
861
+ writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean) : Promise<ApiMessageReaction>;
880
862
 
881
863
  /** Send last seen message */
882
864
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number) : Promise<LastSeenMessageEvent>;
883
865
 
884
866
  /** Send last pin message */
885
- writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, timestamp_seconds: number, operation: number) : Promise<LastPinMessageEvent>;
867
+ writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number) : Promise<LastPinMessageEvent>;
886
868
 
887
869
  /** Send custom user status */
888
870
  writeCustomStatus(clan_id: string, status: string) : Promise<CustomStatusEvent>;
@@ -1589,7 +1571,7 @@ export class DefaultSocket implements Socket {
1589
1571
  return response.clan_join;
1590
1572
  }
1591
1573
 
1592
- async joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<Channel> {
1574
+ async joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel> {
1593
1575
 
1594
1576
  const response = await this.send({
1595
1577
  channel_join: {
@@ -1597,8 +1579,7 @@ export class DefaultSocket implements Socket {
1597
1579
  parent_id: parent_id,
1598
1580
  channel_id: channel_id,
1599
1581
  channel_type: channel_type,
1600
- is_public: is_public,
1601
- is_parent_public: is_parent_public
1582
+ is_public: is_public
1602
1583
  }
1603
1584
  }
1604
1585
  );
@@ -1606,11 +1587,11 @@ export class DefaultSocket implements Socket {
1606
1587
  return response.channel;
1607
1588
  }
1608
1589
 
1609
- leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean, is_parent_public: boolean): Promise<void> {
1610
- 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}});
1590
+ leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void> {
1591
+ 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}});
1611
1592
  }
1612
1593
 
1613
- 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> {
1594
+ async removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
1614
1595
  const response = await this.send(
1615
1596
  {
1616
1597
  channel_message_remove: {
@@ -1620,7 +1601,6 @@ export class DefaultSocket implements Socket {
1620
1601
  mode: mode,
1621
1602
  message_id: message_id,
1622
1603
  is_public: is_public,
1623
- is_parent_public: is_parent_public
1624
1604
  }
1625
1605
  }
1626
1606
  );
@@ -1645,8 +1625,8 @@ export class DefaultSocket implements Socket {
1645
1625
  return this.send({status_unfollow: {user_ids: user_ids}});
1646
1626
  }
1647
1627
 
1648
- async 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> {
1649
- const response = await this.send({channel_message_update: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, attachments: attachments, mode: mode, is_public: is_public, is_parent_public: is_parent_public, hide_editted: hideEditted}});
1628
+ async updateChatMessage(clan_id: string, parent_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> {
1629
+ const response = await this.send({channel_message_update: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, attachments: attachments, mode: mode, is_public: is_public, hide_editted: hideEditted}});
1650
1630
  return response.channel_message_ack;
1651
1631
  }
1652
1632
 
@@ -1654,18 +1634,18 @@ export class DefaultSocket implements Socket {
1654
1634
  return this.send({status_update: {status: status}});
1655
1635
  }
1656
1636
 
1657
- async writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:Boolean, avatar?: string ): Promise<ChannelMessageAck> {
1658
- const response = await this.send({channel_message_send: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode: mode, is_public: is_public, is_parent_public: is_parent_public, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone: mention_everyone, avatar: avatar}});
1637
+ async writeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:Boolean, avatar?: string ): Promise<ChannelMessageAck> {
1638
+ const response = await this.send({channel_message_send: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode: mode, is_public: is_public, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone: mention_everyone, avatar: avatar}});
1659
1639
  return response.channel_message_ack;
1660
1640
  }
1661
1641
 
1662
- async writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction> {
1663
- const response = await this.send({message_reaction_event: {id: id, clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode: mode, is_public: is_public, is_parent_public: is_parent_public, message_id: message_id, emoji_id: emoji_id, emoji: emoji, count: count, message_sender_id: message_sender_id, action: action_delete}});
1642
+ async writeMessageReaction(id: string, clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction> {
1643
+ const response = await this.send({message_reaction_event: {id: id, clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, emoji_id: emoji_id, emoji: emoji, count: count, message_sender_id: message_sender_id, action: action_delete}});
1664
1644
  return response.message_reaction_event
1665
1645
  }
1666
1646
 
1667
- async writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean): Promise<MessageTypingEvent> {
1668
- const response = await this.send({message_typing_event: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode:mode, is_public: is_public, is_parent_public: is_parent_public}});
1647
+ async writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent> {
1648
+ const response = await this.send({message_typing_event: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode:mode, is_public: is_public}});
1669
1649
  return response.message_typing_event
1670
1650
  }
1671
1651
 
@@ -1674,8 +1654,8 @@ export class DefaultSocket implements Socket {
1674
1654
  return response.last_seen_message_event
1675
1655
  }
1676
1656
 
1677
- async writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, is_parent_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent> {
1678
- const response = await this.send({last_pin_message_event: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode: mode, is_public: is_public, is_parent_public: is_parent_public, message_id: message_id, timestamp_seconds: timestamp_seconds, operation: operation}});
1657
+ async writeLastPinMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent> {
1658
+ const response = await this.send({last_pin_message_event: {clan_id: clan_id, parent_id: parent_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, timestamp_seconds: timestamp_seconds, operation: operation}});
1679
1659
  return response.last_pin_message_event
1680
1660
  }
1681
1661