mezon-js 2.9.31 → 2.9.32

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -707,6 +707,8 @@ export interface ApiChannelSettingItem {
707
707
  //
708
708
  meeting_code?: string;
709
709
  //
710
+ message_count?: string;
711
+ //
710
712
  parent_id?: string;
711
713
  //
712
714
  user_ids?: Array<string>;
@@ -1328,8 +1330,6 @@ export interface ApiMessageReaction {
1328
1330
  channel_label: string;
1329
1331
  /** The message that user react */
1330
1332
  message_id: string;
1331
- // The parent id to sent to.
1332
- parent_id?: string;
1333
1333
  }
1334
1334
 
1335
1335
  export interface ApiListChannelAppsResponse {
package/dist/api.gen.d.ts CHANGED
@@ -406,6 +406,7 @@ export interface ApiChannelSettingItem {
406
406
  creator_id?: string;
407
407
  id?: string;
408
408
  meeting_code?: string;
409
+ message_count?: string;
409
410
  parent_id?: string;
410
411
  user_ids?: Array<string>;
411
412
  }
@@ -770,7 +771,6 @@ export interface ApiMessageReaction {
770
771
  channel_label: string;
771
772
  /** The message that user react */
772
773
  message_id: string;
773
- parent_id?: string;
774
774
  }
775
775
  export interface ApiListChannelAppsResponse {
776
776
  channel_apps?: Array<ApiChannelAppResponse>;
@@ -6294,13 +6294,12 @@ 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) {
6297
+ joinChat(clan_id, channel_id, channel_type, is_public) {
6298
6298
  return __async(this, null, function* () {
6299
6299
  const response = yield this.send(
6300
6300
  {
6301
6301
  channel_join: {
6302
6302
  clan_id,
6303
- parent_id,
6304
6303
  channel_id,
6305
6304
  channel_type,
6306
6305
  is_public
@@ -6310,16 +6309,15 @@ var _DefaultSocket = class _DefaultSocket {
6310
6309
  return response.channel;
6311
6310
  });
6312
6311
  }
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 } });
6312
+ leaveChat(clan_id, channel_id, channel_type, is_public) {
6313
+ return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
6315
6314
  }
6316
- removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id) {
6315
+ removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
6317
6316
  return __async(this, null, function* () {
6318
6317
  const response = yield this.send(
6319
6318
  {
6320
6319
  channel_message_remove: {
6321
6320
  clan_id,
6322
- parent_id,
6323
6321
  channel_id,
6324
6322
  mode,
6325
6323
  message_id,
@@ -6347,30 +6345,30 @@ var _DefaultSocket = class _DefaultSocket {
6347
6345
  unfollowUsers(user_ids) {
6348
6346
  return this.send({ status_unfollow: { user_ids } });
6349
6347
  }
6350
- updateChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
6348
+ updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
6351
6349
  return __async(this, null, function* () {
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 } });
6350
+ const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
6353
6351
  return response.channel_message_ack;
6354
6352
  });
6355
6353
  }
6356
6354
  updateStatus(status) {
6357
6355
  return this.send({ status_update: { status } });
6358
6356
  }
6359
- writeChatMessage(clan_id, parent_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6357
+ writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6360
6358
  return __async(this, null, function* () {
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 } });
6359
+ const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
6362
6360
  return response.channel_message_ack;
6363
6361
  });
6364
6362
  }
6365
- writeMessageReaction(id, clan_id, parent_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6363
+ writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6366
6364
  return __async(this, null, function* () {
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 } });
6365
+ const response = yield this.send({ message_reaction_event: { id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
6368
6366
  return response.message_reaction_event;
6369
6367
  });
6370
6368
  }
6371
- writeMessageTyping(clan_id, parent_id, channel_id, mode, is_public) {
6369
+ writeMessageTyping(clan_id, channel_id, mode, is_public) {
6372
6370
  return __async(this, null, function* () {
6373
- const response = yield this.send({ message_typing_event: { clan_id, parent_id, channel_id, mode, is_public } });
6371
+ const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
6374
6372
  return response.message_typing_event;
6375
6373
  });
6376
6374
  }
@@ -6380,9 +6378,9 @@ var _DefaultSocket = class _DefaultSocket {
6380
6378
  return response.last_seen_message_event;
6381
6379
  });
6382
6380
  }
6383
- writeLastPinMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
6381
+ writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
6384
6382
  return __async(this, null, function* () {
6385
- const response = yield this.send({ last_pin_message_event: { clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
6383
+ const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
6386
6384
  return response.last_pin_message_event;
6387
6385
  });
6388
6386
  }
@@ -6265,13 +6265,12 @@ 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) {
6268
+ joinChat(clan_id, channel_id, channel_type, is_public) {
6269
6269
  return __async(this, null, function* () {
6270
6270
  const response = yield this.send(
6271
6271
  {
6272
6272
  channel_join: {
6273
6273
  clan_id,
6274
- parent_id,
6275
6274
  channel_id,
6276
6275
  channel_type,
6277
6276
  is_public
@@ -6281,16 +6280,15 @@ var _DefaultSocket = class _DefaultSocket {
6281
6280
  return response.channel;
6282
6281
  });
6283
6282
  }
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 } });
6283
+ leaveChat(clan_id, channel_id, channel_type, is_public) {
6284
+ return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
6286
6285
  }
6287
- removeChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id) {
6286
+ removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
6288
6287
  return __async(this, null, function* () {
6289
6288
  const response = yield this.send(
6290
6289
  {
6291
6290
  channel_message_remove: {
6292
6291
  clan_id,
6293
- parent_id,
6294
6292
  channel_id,
6295
6293
  mode,
6296
6294
  message_id,
@@ -6318,30 +6316,30 @@ var _DefaultSocket = class _DefaultSocket {
6318
6316
  unfollowUsers(user_ids) {
6319
6317
  return this.send({ status_unfollow: { user_ids } });
6320
6318
  }
6321
- updateChatMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
6319
+ updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
6322
6320
  return __async(this, null, function* () {
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 } });
6321
+ const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
6324
6322
  return response.channel_message_ack;
6325
6323
  });
6326
6324
  }
6327
6325
  updateStatus(status) {
6328
6326
  return this.send({ status_update: { status } });
6329
6327
  }
6330
- writeChatMessage(clan_id, parent_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6328
+ writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
6331
6329
  return __async(this, null, function* () {
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 } });
6330
+ const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
6333
6331
  return response.channel_message_ack;
6334
6332
  });
6335
6333
  }
6336
- writeMessageReaction(id, clan_id, parent_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6334
+ writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
6337
6335
  return __async(this, null, function* () {
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 } });
6336
+ const response = yield this.send({ message_reaction_event: { id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
6339
6337
  return response.message_reaction_event;
6340
6338
  });
6341
6339
  }
6342
- writeMessageTyping(clan_id, parent_id, channel_id, mode, is_public) {
6340
+ writeMessageTyping(clan_id, channel_id, mode, is_public) {
6343
6341
  return __async(this, null, function* () {
6344
- const response = yield this.send({ message_typing_event: { clan_id, parent_id, channel_id, mode, is_public } });
6342
+ const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
6345
6343
  return response.message_typing_event;
6346
6344
  });
6347
6345
  }
@@ -6351,9 +6349,9 @@ var _DefaultSocket = class _DefaultSocket {
6351
6349
  return response.last_seen_message_event;
6352
6350
  });
6353
6351
  }
6354
- writeLastPinMessage(clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
6352
+ writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
6355
6353
  return __async(this, null, function* () {
6356
- const response = yield this.send({ last_pin_message_event: { clan_id, parent_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
6354
+ const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
6357
6355
  return response.last_pin_message_event;
6358
6356
  });
6359
6357
  }
package/dist/socket.d.ts CHANGED
@@ -61,7 +61,6 @@ interface ChannelJoin {
61
61
  /** Whether the user's channel presence is hidden when joining. */
62
62
  hidden: boolean;
63
63
  is_public: boolean;
64
- parent_id: string;
65
64
  };
66
65
  }
67
66
  /** Leave a realtime chat channel. */
@@ -72,7 +71,6 @@ interface ChannelLeave {
72
71
  mode: number;
73
72
  channel_label: string;
74
73
  is_public: boolean;
75
- parent_id: string;
76
74
  };
77
75
  }
78
76
  export interface AddClanUserEvent {
@@ -103,7 +101,6 @@ export interface UserChannelAddedEvent {
103
101
  clan_id: string;
104
102
  channel_type: number;
105
103
  is_public: boolean;
106
- parent_id: string;
107
104
  }
108
105
  export interface UserChannelRemovedEvent {
109
106
  channel_id: string;
@@ -127,7 +124,6 @@ export interface LastPinMessageEvent {
127
124
  /** operation */
128
125
  operation: number;
129
126
  is_public: boolean;
130
- parent_id?: string;
131
127
  }
132
128
  /** Last seen message by user */
133
129
  export interface LastSeenMessageEvent {
@@ -148,7 +144,6 @@ export interface MessageTypingEvent {
148
144
  /** Message sender, usually a user ID. */
149
145
  sender_id: string;
150
146
  is_public: boolean;
151
- parent_id?: string;
152
147
  }
153
148
  export interface UserProfileUpdatedEvent {
154
149
  user_id: string;
@@ -193,7 +188,6 @@ interface ChannelMessageSend {
193
188
  mention_everyone?: boolean;
194
189
  avatar: string;
195
190
  is_public: boolean;
196
- parent_id?: string;
197
191
  };
198
192
  }
199
193
  /** Update a message previously sent to a realtime chat channel. */
@@ -212,7 +206,6 @@ interface ChannelMessageUpdate {
212
206
  /** The mode payload. */
213
207
  mode: number;
214
208
  is_public: boolean;
215
- parent_id?: string;
216
209
  };
217
210
  }
218
211
  /** Remove a message previously sent to a realtime chat channel. */
@@ -227,7 +220,6 @@ interface ChannelMessageRemove {
227
220
  /** A unique ID for the chat message to be removed. */
228
221
  message_id: string;
229
222
  is_public: boolean;
230
- parent_id?: string;
231
223
  };
232
224
  }
233
225
  /** Presence update for a particular realtime chat channel. */
@@ -297,7 +289,6 @@ export interface ChannelCreatedEvent {
297
289
  channel_private: number;
298
290
  channel_type: number;
299
291
  status: number;
300
- parent_id: string;
301
292
  app_url: string;
302
293
  }
303
294
  export interface ChannelDeletedEvent {
@@ -591,29 +582,29 @@ export interface Socket {
591
582
  /** Join clan chat */
592
583
  joinClanChat(clan_id: string): Promise<ClanJoin>;
593
584
  /** Join a chat channel on the server. */
594
- joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
585
+ joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
595
586
  /** Leave a chat channel on the server. */
596
- leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
587
+ leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
597
588
  /** Remove a chat message from a chat channel on the server. */
598
- removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
589
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
599
590
  /** Execute an RPC function to the server. */
600
591
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
601
592
  /** Unfollow one or more users from their status updates. */
602
593
  unfollowUsers(user_ids: string[]): Promise<void>;
603
594
  /** Update a chat message on a chat channel in the server. */
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>;
595
+ updateChatMessage(clan_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>;
605
596
  /** Update the status for the current user online. */
606
597
  updateStatus(status?: string): Promise<void>;
607
598
  /** Send a chat message to a chat channel on the server. */
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>;
599
+ writeChatMessage(clan_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>;
609
600
  /** Send message typing */
610
- writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
601
+ writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
611
602
  /** Send message reaction */
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>;
603
+ writeMessageReaction(id: string, clan_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>;
613
604
  /** Send last seen message */
614
605
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
615
606
  /** Send last pin message */
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>;
607
+ writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
617
608
  /** Send custom user status */
618
609
  writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
619
610
  /** send voice joined */
@@ -763,18 +754,18 @@ export declare class DefaultSocket implements Socket {
763
754
  send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout?: number): Promise<any>;
764
755
  followUsers(userIds: string[]): Promise<Status>;
765
756
  joinClanChat(clan_id: string): Promise<ClanJoin>;
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>;
757
+ joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
758
+ leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
759
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
769
760
  rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
770
761
  unfollowUsers(user_ids: string[]): Promise<void>;
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>;
762
+ updateChatMessage(clan_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>;
772
763
  updateStatus(status?: string): Promise<void>;
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>;
764
+ writeChatMessage(clan_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>;
765
+ writeMessageReaction(id: string, clan_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>;
766
+ writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
776
767
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
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>;
768
+ writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
778
769
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
779
770
  writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
780
771
  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.31",
4
+ "version": "2.9.32",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -75,8 +75,6 @@ interface ChannelJoin {
75
75
  hidden: boolean;
76
76
  // is public
77
77
  is_public: boolean;
78
- // parent id
79
- parent_id: string;
80
78
  };
81
79
  }
82
80
 
@@ -91,8 +89,6 @@ interface ChannelLeave {
91
89
  channel_label: string;
92
90
  // Is public
93
91
  is_public: boolean;
94
- // parent id
95
- parent_id: string;
96
92
  };
97
93
  }
98
94
 
@@ -134,8 +130,6 @@ export interface UserChannelAddedEvent {
134
130
  channel_type: number;
135
131
  // is public
136
132
  is_public: boolean;
137
- // parent id
138
- parent_id: string;
139
133
  }
140
134
 
141
135
  export interface UserChannelRemovedEvent {
@@ -170,8 +164,6 @@ export interface LastPinMessageEvent {
170
164
  operation: number;
171
165
  // Is public
172
166
  is_public: boolean;
173
- // The parent id to sent to.
174
- parent_id?: string;
175
167
  }
176
168
 
177
169
  /** Last seen message by user */
@@ -200,8 +192,6 @@ export interface MessageTypingEvent {
200
192
  sender_id: string;
201
193
  // Is public
202
194
  is_public: boolean;
203
- // The parent id to sent to.
204
- parent_id?: string;
205
195
  }
206
196
 
207
197
  // user profile updated event
@@ -265,8 +255,6 @@ interface ChannelMessageSend {
265
255
  avatar: string;
266
256
  // Is public
267
257
  is_public: boolean;
268
- // The parent id to sent to.
269
- parent_id?: string;
270
258
  };
271
259
  }
272
260
 
@@ -287,8 +275,6 @@ interface ChannelMessageUpdate {
287
275
  mode: number;
288
276
  // Is public
289
277
  is_public: boolean;
290
- // The parent id to sent to.
291
- parent_id?: string;
292
278
  };
293
279
  }
294
280
 
@@ -307,8 +293,6 @@ interface ChannelMessageRemove {
307
293
  message_id: string;
308
294
  // Is public
309
295
  is_public: boolean;
310
- // The parent id to sent to.
311
- parent_id?: string;
312
296
  };
313
297
  }
314
298
 
@@ -429,8 +413,6 @@ export interface ChannelCreatedEvent {
429
413
  channel_type: number;
430
414
  // status
431
415
  status: number;
432
- // parent
433
- parent_id: string;
434
416
  // app url
435
417
  app_url: string;
436
418
  }
@@ -831,13 +813,13 @@ export interface Socket {
831
813
  joinClanChat(clan_id: string) : Promise<ClanJoin>;
832
814
 
833
815
  /** Join a chat channel on the server. */
834
- joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<Channel>;
816
+ joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<Channel>;
835
817
 
836
818
  /** Leave a chat channel on the server. */
837
- leaveChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
819
+ leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
838
820
 
839
821
  /** Remove a chat message from a chat channel on the server. */
840
- removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
822
+ removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
841
823
 
842
824
  /** Execute an RPC function to the server. */
843
825
  rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
@@ -846,25 +828,25 @@ export interface Socket {
846
828
  unfollowUsers(user_ids : string[]) : Promise<void>;
847
829
 
848
830
  /** Update a chat message on a chat channel in the server. */
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>;
831
+ updateChatMessage(clan_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>;
850
832
 
851
833
  /** Update the status for the current user online. */
852
834
  updateStatus(status?: string) : Promise<void>;
853
835
 
854
836
  /** Send a chat message to a chat channel on the server. */
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>;
837
+ writeChatMessage(clan_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>;
856
838
 
857
839
  /** Send message typing */
858
- writeMessageTyping(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean) : Promise<MessageTypingEvent>;
840
+ writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean) : Promise<MessageTypingEvent>;
859
841
 
860
842
  /** Send message reaction */
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>;
843
+ writeMessageReaction(id: string, clan_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>;
862
844
 
863
845
  /** Send last seen message */
864
846
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number) : Promise<LastSeenMessageEvent>;
865
847
 
866
848
  /** Send last pin message */
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>;
849
+ writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number) : Promise<LastPinMessageEvent>;
868
850
 
869
851
  /** Send custom user status */
870
852
  writeCustomStatus(clan_id: string, status: string) : Promise<CustomStatusEvent>;
@@ -1571,12 +1553,11 @@ export class DefaultSocket implements Socket {
1571
1553
  return response.clan_join;
1572
1554
  }
1573
1555
 
1574
- async joinChat(clan_id: string, parent_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel> {
1556
+ async joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel> {
1575
1557
 
1576
1558
  const response = await this.send({
1577
1559
  channel_join: {
1578
1560
  clan_id: clan_id,
1579
- parent_id: parent_id,
1580
1561
  channel_id: channel_id,
1581
1562
  channel_type: channel_type,
1582
1563
  is_public: is_public
@@ -1587,16 +1568,15 @@ export class DefaultSocket implements Socket {
1587
1568
  return response.channel;
1588
1569
  }
1589
1570
 
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}});
1571
+ leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void> {
1572
+ return this.send({channel_leave: {clan_id: clan_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public}});
1592
1573
  }
1593
1574
 
1594
- async removeChatMessage(clan_id: string, parent_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
1575
+ async removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
1595
1576
  const response = await this.send(
1596
1577
  {
1597
1578
  channel_message_remove: {
1598
1579
  clan_id: clan_id,
1599
- parent_id: parent_id,
1600
1580
  channel_id: channel_id,
1601
1581
  mode: mode,
1602
1582
  message_id: message_id,
@@ -1625,8 +1605,8 @@ export class DefaultSocket implements Socket {
1625
1605
  return this.send({status_unfollow: {user_ids: user_ids}});
1626
1606
  }
1627
1607
 
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}});
1608
+ async updateChatMessage(clan_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> {
1609
+ const response = await this.send({channel_message_update: {clan_id: clan_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, attachments: attachments, mode: mode, is_public: is_public, hide_editted: hideEditted}});
1630
1610
  return response.channel_message_ack;
1631
1611
  }
1632
1612
 
@@ -1634,18 +1614,18 @@ export class DefaultSocket implements Socket {
1634
1614
  return this.send({status_update: {status: status}});
1635
1615
  }
1636
1616
 
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}});
1617
+ async writeChatMessage(clan_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> {
1618
+ const response = await this.send({channel_message_send: {clan_id: clan_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}});
1639
1619
  return response.channel_message_ack;
1640
1620
  }
1641
1621
 
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}});
1622
+ async writeMessageReaction(id: string, clan_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> {
1623
+ const response = await this.send({message_reaction_event: {id: id, clan_id: clan_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}});
1644
1624
  return response.message_reaction_event
1645
1625
  }
1646
1626
 
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}});
1627
+ async writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent> {
1628
+ const response = await this.send({message_typing_event: {clan_id: clan_id, channel_id: channel_id, mode:mode, is_public: is_public}});
1649
1629
  return response.message_typing_event
1650
1630
  }
1651
1631
 
@@ -1654,8 +1634,8 @@ export class DefaultSocket implements Socket {
1654
1634
  return response.last_seen_message_event
1655
1635
  }
1656
1636
 
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}});
1637
+ async writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent> {
1638
+ const response = await this.send({last_pin_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, timestamp_seconds: timestamp_seconds, operation: operation}});
1659
1639
  return response.last_pin_message_event
1660
1640
  }
1661
1641