mezon-js 2.8.80 → 2.8.81

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.
@@ -5291,6 +5291,18 @@ var _DefaultSocket = class _DefaultSocket {
5291
5291
  return response.notification_channel_category_setting_event;
5292
5292
  });
5293
5293
  }
5294
+ addUserEmojiUsage(add_user_emoji_usage_event) {
5295
+ return __async(this, null, function* () {
5296
+ const response = yield this.send({ add_user_emoji_usage_event: { add_user_emoji_usage_event } });
5297
+ return response.add_user_emoji_usage_event;
5298
+ });
5299
+ }
5300
+ getUserEmojiUsage(clan_id) {
5301
+ return __async(this, null, function* () {
5302
+ const response = yield this.send({ get_user_emoji_usage_event: { clan_id } });
5303
+ return response.get_user_emoji_usage_event;
5304
+ });
5305
+ }
5294
5306
  pingPong() {
5295
5307
  return __async(this, null, function* () {
5296
5308
  if (!this.adapter.isOpen()) {
@@ -5262,6 +5262,18 @@ var _DefaultSocket = class _DefaultSocket {
5262
5262
  return response.notification_channel_category_setting_event;
5263
5263
  });
5264
5264
  }
5265
+ addUserEmojiUsage(add_user_emoji_usage_event) {
5266
+ return __async(this, null, function* () {
5267
+ const response = yield this.send({ add_user_emoji_usage_event: { add_user_emoji_usage_event } });
5268
+ return response.add_user_emoji_usage_event;
5269
+ });
5270
+ }
5271
+ getUserEmojiUsage(clan_id) {
5272
+ return __async(this, null, function* () {
5273
+ const response = yield this.send({ get_user_emoji_usage_event: { clan_id } });
5274
+ return response.get_user_emoji_usage_event;
5275
+ });
5276
+ }
5265
5277
  pingPong() {
5266
5278
  return __async(this, null, function* () {
5267
5279
  if (!this.adapter.isOpen()) {
package/dist/socket.d.ts CHANGED
@@ -510,6 +510,21 @@ export interface NotificationChannelCategorySettingEvent {
510
510
  clan_id?: string;
511
511
  notification_channel_category_settings_list?: NotificationChannelCategorySetting[];
512
512
  }
513
+ export interface UserEmojiUsage {
514
+ user_id: string;
515
+ emoji_id: string;
516
+ clan_id: string;
517
+ create_time: string;
518
+ }
519
+ export interface AddUserEmojiUsageEvent {
520
+ emoji_id: string;
521
+ clan_id: string;
522
+ }
523
+ /** Response cho ListUserEmojiUsage */
524
+ export interface GetUserEmojiUsageEvent {
525
+ clanId: string;
526
+ user_emoji_usage: UserEmojiUsage[];
527
+ }
513
528
  /** A socket connection to Mezon server. */
514
529
  export interface Socket {
515
530
  /** Connection is Open */
@@ -618,6 +633,8 @@ export interface Socket {
618
633
  GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
619
634
  getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
620
635
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
636
+ addUserEmojiUsage: (add_user_emoji_usage_event: AddUserEmojiUsageEvent) => void;
637
+ getUserEmojiUsage(clan_id: string): Promise<GetUserEmojiUsageEvent>;
621
638
  }
622
639
  /** Reports an error received from a socket message. */
623
640
  export interface SocketError {
@@ -707,6 +724,8 @@ export declare class DefaultSocket implements Socket {
707
724
  getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
708
725
  getNotificationReactMessage(channel_id: string): Promise<NotifiReactMessageEvent>;
709
726
  getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
727
+ addUserEmojiUsage(add_user_emoji_usage_event: AddUserEmojiUsageEvent): Promise<any>;
728
+ getUserEmojiUsage(clan_id: string): Promise<GetUserEmojiUsageEvent>;
710
729
  private pingPong;
711
730
  }
712
731
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.80",
3
+ "version": "2.8.81",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },
package/socket.ts CHANGED
@@ -772,6 +772,23 @@ export interface NotificationChannelCategorySettingEvent {
772
772
  notification_channel_category_settings_list?: NotificationChannelCategorySetting[]
773
773
  }
774
774
 
775
+ export interface UserEmojiUsage {
776
+ user_id: string;
777
+ emoji_id: string;
778
+ clan_id: string;
779
+ create_time: string;
780
+ }
781
+
782
+ export interface AddUserEmojiUsageEvent {
783
+ emoji_id: string;
784
+ clan_id: string;
785
+ }
786
+
787
+ /** Response cho ListUserEmojiUsage */
788
+ export interface GetUserEmojiUsageEvent {
789
+ clanId: string;
790
+ user_emoji_usage: UserEmojiUsage[];
791
+ }
775
792
 
776
793
  /** A socket connection to Mezon server. */
777
794
  export interface Socket {
@@ -955,6 +972,11 @@ export interface Socket {
955
972
  getNotificationChannelCategorySetting(clan_id : string): Promise<NotificationChannelCategorySettingEvent>;
956
973
 
957
974
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
975
+
976
+ addUserEmojiUsage: (add_user_emoji_usage_event: AddUserEmojiUsageEvent) => void;
977
+
978
+ getUserEmojiUsage(clan_id: string): Promise<GetUserEmojiUsageEvent>
979
+
958
980
  }
959
981
 
960
982
  /** Reports an error received from a socket message. */
@@ -1574,7 +1596,16 @@ export class DefaultSocket implements Socket {
1574
1596
  return response.notification_channel_category_setting_event
1575
1597
  }
1576
1598
 
1599
+ async addUserEmojiUsage(add_user_emoji_usage_event: AddUserEmojiUsageEvent) {
1600
+ const response = await this.send({add_user_emoji_usage_event: {add_user_emoji_usage_event: add_user_emoji_usage_event}})
1601
+ return response.add_user_emoji_usage_event
1602
+ }
1577
1603
 
1604
+ async getUserEmojiUsage(clan_id: string): Promise<GetUserEmojiUsageEvent> {
1605
+ const response = await this.send({get_user_emoji_usage_event: {clan_id: clan_id}})
1606
+ return response.get_user_emoji_usage_event
1607
+ }
1608
+
1578
1609
  private async pingPong(): Promise<void> {
1579
1610
  if (!this.adapter.isOpen()) {
1580
1611
  return;