mezon-js 2.13.1 → 2.13.3

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
@@ -2691,7 +2691,9 @@ export interface ApiUser {
2691
2691
  //The location set by the user.
2692
2692
  location?: string;
2693
2693
  //Additional information stored as a JSON object.
2694
- metadata?: string;
2694
+ user_status?: string;
2695
+ // online, offline, invisible, idle, do not disturb
2696
+ status?: string;
2695
2697
  //Indicates whether the user is currently online.
2696
2698
  online?: boolean;
2697
2699
  //The timezone set by the user.
package/client.ts CHANGED
@@ -473,6 +473,8 @@ export interface ApiUpdateChannelDescRequest {
473
473
  topic?: string;
474
474
  //
475
475
  age_restricted?: number;
476
+ //
477
+ channel_avatar?: string;
476
478
  }
477
479
 
478
480
  /** Add users to a channel. */
@@ -1535,8 +1537,8 @@ export class Client {
1535
1537
  timezone: gu.user!.timezone,
1536
1538
  update_time: gu.user!.update_time,
1537
1539
  username: gu.user!.username,
1538
- metadata: gu.user!.metadata
1539
- ? safeJSONParse(gu.user!.metadata!)
1540
+ user_status: gu.user!.user_status
1541
+ ? safeJSONParse(gu.user!.user_status!)
1540
1542
  : undefined,
1541
1543
  },
1542
1544
  role_id: gu!.role_id,
@@ -1907,8 +1909,8 @@ export class Client {
1907
1909
  update_time: f.user!.update_time,
1908
1910
  username: f.user!.username,
1909
1911
  is_mobile: f.user?.is_mobile,
1910
- metadata: f.user!.metadata
1911
- ? safeJSONParse(f.user!.metadata!)
1912
+ metadata: f.user!.user_status
1913
+ ? safeJSONParse(f.user!.user_status!)
1912
1914
  : undefined,
1913
1915
  },
1914
1916
  state: f.state,
package/dist/api.gen.d.ts CHANGED
@@ -1539,7 +1539,8 @@ export interface ApiUser {
1539
1539
  join_time?: string;
1540
1540
  lang_tag?: string;
1541
1541
  location?: string;
1542
- metadata?: string;
1542
+ user_status?: string;
1543
+ status?: string;
1543
1544
  online?: boolean;
1544
1545
  timezone?: string;
1545
1546
  update_time?: string;
package/dist/client.d.ts CHANGED
@@ -255,6 +255,7 @@ export interface ApiUpdateChannelDescRequest {
255
255
  e2ee?: number;
256
256
  topic?: string;
257
257
  age_restricted?: number;
258
+ channel_avatar?: string;
258
259
  }
259
260
  /** Add users to a channel. */
260
261
  export interface ApiAddChannelUsersRequest {
@@ -8086,7 +8086,7 @@ var _DefaultSocket = class _DefaultSocket {
8086
8086
  return response.message_reaction_event;
8087
8087
  });
8088
8088
  }
8089
- writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name) {
8089
+ writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name, topic_id) {
8090
8090
  return __async(this, null, function* () {
8091
8091
  const response = yield this.send({
8092
8092
  message_typing_event: {
@@ -8094,7 +8094,8 @@ var _DefaultSocket = class _DefaultSocket {
8094
8094
  channel_id,
8095
8095
  mode,
8096
8096
  is_public,
8097
- sender_display_name
8097
+ sender_display_name,
8098
+ topic_id
8098
8099
  }
8099
8100
  });
8100
8101
  return response.message_typing_event;
@@ -8948,7 +8949,7 @@ var Client = class {
8948
8949
  timezone: gu.user.timezone,
8949
8950
  update_time: gu.user.update_time,
8950
8951
  username: gu.user.username,
8951
- metadata: gu.user.metadata ? safeJSONParse(gu.user.metadata) : void 0
8952
+ user_status: gu.user.user_status ? safeJSONParse(gu.user.user_status) : void 0
8952
8953
  },
8953
8954
  role_id: gu.role_id,
8954
8955
  clan_nick: gu.clan_nick,
@@ -9169,7 +9170,7 @@ var Client = class {
9169
9170
  update_time: f.user.update_time,
9170
9171
  username: f.user.username,
9171
9172
  is_mobile: (_a = f.user) == null ? void 0 : _a.is_mobile,
9172
- metadata: f.user.metadata ? safeJSONParse(f.user.metadata) : void 0
9173
+ metadata: f.user.user_status ? safeJSONParse(f.user.user_status) : void 0
9173
9174
  },
9174
9175
  state: f.state,
9175
9176
  source_id: f.source_id
@@ -8052,7 +8052,7 @@ var _DefaultSocket = class _DefaultSocket {
8052
8052
  return response.message_reaction_event;
8053
8053
  });
8054
8054
  }
8055
- writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name) {
8055
+ writeMessageTyping(clan_id, channel_id, mode, is_public, sender_display_name, topic_id) {
8056
8056
  return __async(this, null, function* () {
8057
8057
  const response = yield this.send({
8058
8058
  message_typing_event: {
@@ -8060,7 +8060,8 @@ var _DefaultSocket = class _DefaultSocket {
8060
8060
  channel_id,
8061
8061
  mode,
8062
8062
  is_public,
8063
- sender_display_name
8063
+ sender_display_name,
8064
+ topic_id
8064
8065
  }
8065
8066
  });
8066
8067
  return response.message_typing_event;
@@ -8914,7 +8915,7 @@ var Client = class {
8914
8915
  timezone: gu.user.timezone,
8915
8916
  update_time: gu.user.update_time,
8916
8917
  username: gu.user.username,
8917
- metadata: gu.user.metadata ? safeJSONParse(gu.user.metadata) : void 0
8918
+ user_status: gu.user.user_status ? safeJSONParse(gu.user.user_status) : void 0
8918
8919
  },
8919
8920
  role_id: gu.role_id,
8920
8921
  clan_nick: gu.clan_nick,
@@ -9135,7 +9136,7 @@ var Client = class {
9135
9136
  update_time: f.user.update_time,
9136
9137
  username: f.user.username,
9137
9138
  is_mobile: (_a = f.user) == null ? void 0 : _a.is_mobile,
9138
- metadata: f.user.metadata ? safeJSONParse(f.user.metadata) : void 0
9139
+ metadata: f.user.user_status ? safeJSONParse(f.user.user_status) : void 0
9139
9140
  },
9140
9141
  state: f.state,
9141
9142
  source_id: f.source_id
package/dist/socket.d.ts CHANGED
@@ -193,6 +193,7 @@ export interface MessageTypingEvent {
193
193
  is_public: boolean;
194
194
  sender_username: string;
195
195
  sender_display_name: string;
196
+ topic_id?: string;
196
197
  }
197
198
  export interface UserProfileUpdatedEvent {
198
199
  user_id: string;
@@ -935,7 +936,7 @@ export interface Socket {
935
936
  /** Send a quick menu event to a chat channel on the server. */
936
937
  writeQuickMenuEvent(menu_name: string, 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, code?: number, topic_id?: string): Promise<QuickMenuEvent>;
937
938
  /** Send message typing */
938
- writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string): Promise<MessageTypingEvent>;
939
+ writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string, topic_id?: string): Promise<MessageTypingEvent>;
939
940
  /** Send message reaction */
940
941
  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, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ApiMessageReaction>;
941
942
  /** Send last seen message */
@@ -1157,7 +1158,7 @@ export declare class DefaultSocket implements Socket {
1157
1158
  writeEphemeralMessage(receiver_id: string, 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, code?: number, topic_id?: string): Promise<ChannelMessageAck>;
1158
1159
  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, code?: number, topic_id?: string): Promise<ChannelMessageAck>;
1159
1160
  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, topic_id?: string, emoji_recent_id?: string, sender_name?: string): Promise<ApiMessageReaction>;
1160
- writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string): Promise<MessageTypingEvent>;
1161
+ writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean, sender_display_name: string, topic_id?: string): Promise<MessageTypingEvent>;
1161
1162
  writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number, badge_count: number): Promise<LastSeenMessageEvent>;
1162
1163
  writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number, message_sender_avatar: string, message_sender_id: string, message_sender_username: string, message_content: string, message_attachment: string, message_created_time: string): Promise<LastPinMessageEvent>;
1163
1164
  writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.13.1",
3
+ "version": "2.13.3",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -317,6 +317,8 @@ export interface MessageTypingEvent {
317
317
  sender_username: string;
318
318
  // sender display name
319
319
  sender_display_name: string;
320
+ // topic id
321
+ topic_id?: string;
320
322
  }
321
323
 
322
324
  // user profile updated event
@@ -1513,6 +1515,7 @@ export interface Socket {
1513
1515
  mode: number,
1514
1516
  is_public: boolean,
1515
1517
  sender_display_name: string,
1518
+ topic_id?: string
1516
1519
  ): Promise<MessageTypingEvent>;
1517
1520
 
1518
1521
  /** Send message reaction */
@@ -2905,7 +2908,8 @@ export class DefaultSocket implements Socket {
2905
2908
  channel_id: string,
2906
2909
  mode: number,
2907
2910
  is_public: boolean,
2908
- sender_display_name: string
2911
+ sender_display_name: string,
2912
+ topic_id?: string
2909
2913
  ): Promise<MessageTypingEvent> {
2910
2914
  const response = await this.send({
2911
2915
  message_typing_event: {
@@ -2913,7 +2917,8 @@ export class DefaultSocket implements Socket {
2913
2917
  channel_id: channel_id,
2914
2918
  mode: mode,
2915
2919
  is_public: is_public,
2916
- sender_display_name: sender_display_name
2920
+ sender_display_name: sender_display_name,
2921
+ topic_id: topic_id
2917
2922
  },
2918
2923
  });
2919
2924
  return response.message_typing_event;