mezon-js 2.10.74 → 2.10.76

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -2304,6 +2304,8 @@ export interface ApiTransactionDetail {
2304
2304
  //
2305
2305
  create_time?: string;
2306
2306
  //
2307
+ update_time?: string;
2308
+ //
2307
2309
  receiver_id?: string;
2308
2310
  //
2309
2311
  receiver_username?: string;
@@ -2312,6 +2314,8 @@ export interface ApiTransactionDetail {
2312
2314
  //
2313
2315
  sender_username?: string;
2314
2316
  //
2317
+ metadata?: string;
2318
+ //
2315
2319
  trans_id?: string;
2316
2320
  }
2317
2321
 
package/dist/api.gen.d.ts CHANGED
@@ -1333,10 +1333,12 @@ export interface ApiTokenSentEvent {
1333
1333
  export interface ApiTransactionDetail {
1334
1334
  amount?: number;
1335
1335
  create_time?: string;
1336
+ update_time?: string;
1336
1337
  receiver_id?: string;
1337
1338
  receiver_username?: string;
1338
1339
  sender_id?: string;
1339
1340
  sender_username?: string;
1341
+ metadata?: string;
1340
1342
  trans_id?: string;
1341
1343
  }
1342
1344
  /** Update a user's account details. */
@@ -7304,9 +7304,7 @@ var _DefaultSocket = class _DefaultSocket {
7304
7304
  message.user_channel_removed_event
7305
7305
  );
7306
7306
  } else if (message.remove_friend) {
7307
- this.onremovefriend(
7308
- message.remove_friend
7309
- );
7307
+ this.onremovefriend(message.remove_friend);
7310
7308
  } else if (message.user_clan_removed_event) {
7311
7309
  this.onuserclanremoved(
7312
7310
  message.user_clan_removed_event
@@ -7356,9 +7354,7 @@ var _DefaultSocket = class _DefaultSocket {
7356
7354
  message.webrtc_signaling_fwd
7357
7355
  );
7358
7356
  } else if (message.sfu_signaling_fwd) {
7359
- this.onsfusignalingfwd(
7360
- message.sfu_signaling_fwd
7361
- );
7357
+ this.onsfusignalingfwd(message.sfu_signaling_fwd);
7362
7358
  } else if (message.list_activity) {
7363
7359
  this.onactivityupdated(message.list_activity);
7364
7360
  } else if (message.sd_topic_event) {
@@ -7933,10 +7929,15 @@ var _DefaultSocket = class _DefaultSocket {
7933
7929
  return response.voice_leaved_event;
7934
7930
  });
7935
7931
  }
7936
- writeCustomStatus(clan_id, status) {
7932
+ writeCustomStatus(clan_id, status, time_reset, no_clear) {
7937
7933
  return __async(this, null, function* () {
7938
7934
  const response = yield this.send({
7939
- custom_status_event: { clan_id, status }
7935
+ custom_status_event: {
7936
+ clan_id,
7937
+ status,
7938
+ time_reset,
7939
+ no_clear
7940
+ }
7940
7941
  });
7941
7942
  return response.custom_status_event;
7942
7943
  });
@@ -7270,9 +7270,7 @@ var _DefaultSocket = class _DefaultSocket {
7270
7270
  message.user_channel_removed_event
7271
7271
  );
7272
7272
  } else if (message.remove_friend) {
7273
- this.onremovefriend(
7274
- message.remove_friend
7275
- );
7273
+ this.onremovefriend(message.remove_friend);
7276
7274
  } else if (message.user_clan_removed_event) {
7277
7275
  this.onuserclanremoved(
7278
7276
  message.user_clan_removed_event
@@ -7322,9 +7320,7 @@ var _DefaultSocket = class _DefaultSocket {
7322
7320
  message.webrtc_signaling_fwd
7323
7321
  );
7324
7322
  } else if (message.sfu_signaling_fwd) {
7325
- this.onsfusignalingfwd(
7326
- message.sfu_signaling_fwd
7327
- );
7323
+ this.onsfusignalingfwd(message.sfu_signaling_fwd);
7328
7324
  } else if (message.list_activity) {
7329
7325
  this.onactivityupdated(message.list_activity);
7330
7326
  } else if (message.sd_topic_event) {
@@ -7899,10 +7895,15 @@ var _DefaultSocket = class _DefaultSocket {
7899
7895
  return response.voice_leaved_event;
7900
7896
  });
7901
7897
  }
7902
- writeCustomStatus(clan_id, status) {
7898
+ writeCustomStatus(clan_id, status, time_reset, no_clear) {
7903
7899
  return __async(this, null, function* () {
7904
7900
  const response = yield this.send({
7905
- custom_status_event: { clan_id, status }
7901
+ custom_status_event: {
7902
+ clan_id,
7903
+ status,
7904
+ time_reset,
7905
+ no_clear
7906
+ }
7906
7907
  });
7907
7908
  return response.custom_status_event;
7908
7909
  });
package/dist/socket.d.ts CHANGED
@@ -282,6 +282,10 @@ export interface CustomStatusEvent {
282
282
  user_id: string;
283
283
  username: string;
284
284
  status: string;
285
+ /** time reset */
286
+ time_reset: number;
287
+ /** no clear */
288
+ no_clear: boolean;
285
289
  }
286
290
  export interface ChannelUpdatedEvent {
287
291
  clan_id: string;
@@ -693,7 +697,7 @@ export interface Socket {
693
697
  /** Send last pin message */
694
698
  writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
695
699
  /** Send custom user status */
696
- writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
700
+ writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
697
701
  /** send voice joined */
698
702
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
699
703
  /** send voice leaved */
@@ -886,7 +890,7 @@ export declare class DefaultSocket implements Socket {
886
890
  writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
887
891
  writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
888
892
  writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
889
- writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
893
+ writeCustomStatus(clan_id: string, status: string, time_reset: number, no_clear: boolean): Promise<CustomStatusEvent>;
890
894
  checkDuplicateName(name: string, condition_id: string, type: number): Promise<CheckNameExistedEvent>;
891
895
  forwardWebrtcSignaling(receiver_id: string, data_type: number, json_data: string, channel_id: string, caller_id: string): Promise<WebrtcSignalingFwd>;
892
896
  forwardSFUSignaling(user_id: string, data_type: number, json_data: string, channel_id: string, clan_id: string): Promise<SFUSignalingFwd>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.74",
4
+ "version": "2.10.76",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -412,6 +412,10 @@ export interface CustomStatusEvent {
412
412
  username: string;
413
413
  // the status
414
414
  status: string;
415
+ /** time reset */
416
+ time_reset: number;
417
+ /** no clear */
418
+ no_clear: boolean;
415
419
  }
416
420
 
417
421
  export interface ChannelUpdatedEvent {
@@ -757,7 +761,7 @@ export interface UserEmojiUsage {
757
761
  create_time: string;
758
762
  }
759
763
  export interface RemoveFriend {
760
- //
764
+ //
761
765
  user_id: string;
762
766
  }
763
767
 
@@ -1058,7 +1062,9 @@ export interface Socket {
1058
1062
  /** Send custom user status */
1059
1063
  writeCustomStatus(
1060
1064
  clan_id: string,
1061
- status: string
1065
+ status: string,
1066
+ time_reset: number,
1067
+ no_clear: boolean
1062
1068
  ): Promise<CustomStatusEvent>;
1063
1069
 
1064
1070
  /** send voice joined */
@@ -1510,9 +1516,7 @@ export class DefaultSocket implements Socket {
1510
1516
  <UserChannelRemovedEvent>message.user_channel_removed_event
1511
1517
  );
1512
1518
  } else if (message.remove_friend) {
1513
- this.onremovefriend(
1514
- <RemoveFriend>message.remove_friend
1515
- );
1519
+ this.onremovefriend(<RemoveFriend>message.remove_friend);
1516
1520
  } else if (message.user_clan_removed_event) {
1517
1521
  this.onuserclanremoved(
1518
1522
  <UserClanRemovedEvent>message.user_clan_removed_event
@@ -1562,9 +1566,7 @@ export class DefaultSocket implements Socket {
1562
1566
  <WebrtcSignalingFwd>message.webrtc_signaling_fwd
1563
1567
  );
1564
1568
  } else if (message.sfu_signaling_fwd) {
1565
- this.onsfusignalingfwd(
1566
- <SFUSignalingFwd>message.sfu_signaling_fwd
1567
- );
1569
+ this.onsfusignalingfwd(<SFUSignalingFwd>message.sfu_signaling_fwd);
1568
1570
  } else if (message.list_activity) {
1569
1571
  this.onactivityupdated(<ListActivity>message.list_activity);
1570
1572
  } else if (message.sd_topic_event) {
@@ -2312,10 +2314,17 @@ export class DefaultSocket implements Socket {
2312
2314
 
2313
2315
  async writeCustomStatus(
2314
2316
  clan_id: string,
2315
- status: string
2317
+ status: string,
2318
+ time_reset: number,
2319
+ no_clear: boolean
2316
2320
  ): Promise<CustomStatusEvent> {
2317
2321
  const response = await this.send({
2318
- custom_status_event: { clan_id: clan_id, status: status },
2322
+ custom_status_event: {
2323
+ clan_id: clan_id,
2324
+ status: status,
2325
+ time_reset: time_reset,
2326
+ no_clear: no_clear,
2327
+ },
2319
2328
  });
2320
2329
  return response.custom_status_event;
2321
2330
  }