mezon-js 2.8.85 → 2.8.87

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
@@ -206,8 +206,16 @@ export interface MezonUpdateRoleDeleteBody {
206
206
 
207
207
  /** Request to get system message by clan and channel IDs. */
208
208
  export interface MezonUpdateSystemMessageBody {
209
+ //
210
+ boost_message?: string;
209
211
  //
210
212
  channel_id?: string;
213
+ //
214
+ setup_tips?: string;
215
+ //
216
+ welcome_random?: string;
217
+ //
218
+ welcome_sticker?: string;
211
219
  }
212
220
 
213
221
  /** */
@@ -1471,20 +1479,36 @@ export interface ApiSortParam {
1471
1479
 
1472
1480
  /** System message details. */
1473
1481
  export interface ApiSystemMessage {
1482
+ //
1483
+ boost_message?: string;
1474
1484
  //
1475
1485
  channel_id?: string;
1476
1486
  //
1477
1487
  clan_id?: string;
1478
1488
  //
1479
1489
  id?: string;
1490
+ //
1491
+ setup_tips?: string;
1492
+ //
1493
+ welcome_random?: string;
1494
+ //
1495
+ welcome_sticker?: string;
1480
1496
  }
1481
1497
 
1482
1498
  /** Request to get system message by clan and channel IDs. */
1483
1499
  export interface ApiSystemMessageRequest {
1500
+ //
1501
+ boost_message?: string;
1484
1502
  //
1485
1503
  channel_id?: string;
1486
1504
  //
1487
1505
  clan_id?: string;
1506
+ //
1507
+ setup_tips?: string;
1508
+ //
1509
+ welcome_random?: string;
1510
+ //
1511
+ welcome_sticker?: string;
1488
1512
  }
1489
1513
 
1490
1514
  /** List of system message. */
package/dist/api.gen.d.ts CHANGED
@@ -118,7 +118,11 @@ export interface MezonUpdateRoleDeleteBody {
118
118
  }
119
119
  /** Request to get system message by clan and channel IDs. */
120
120
  export interface MezonUpdateSystemMessageBody {
121
+ boost_message?: string;
121
122
  channel_id?: string;
123
+ setup_tips?: string;
124
+ welcome_random?: string;
125
+ welcome_sticker?: string;
122
126
  }
123
127
  /** */
124
128
  export interface MezonUpdateUserProfileByClanBody {
@@ -852,14 +856,22 @@ export interface ApiSortParam {
852
856
  }
853
857
  /** System message details. */
854
858
  export interface ApiSystemMessage {
859
+ boost_message?: string;
855
860
  channel_id?: string;
856
861
  clan_id?: string;
857
862
  id?: string;
863
+ setup_tips?: string;
864
+ welcome_random?: string;
865
+ welcome_sticker?: string;
858
866
  }
859
867
  /** Request to get system message by clan and channel IDs. */
860
868
  export interface ApiSystemMessageRequest {
869
+ boost_message?: string;
861
870
  channel_id?: string;
862
871
  clan_id?: string;
872
+ setup_tips?: string;
873
+ welcome_random?: string;
874
+ welcome_sticker?: string;
863
875
  }
864
876
  /** List of system message. */
865
877
  export interface ApiSystemMessagesList {
@@ -5385,6 +5385,18 @@ var _DefaultSocket = class _DefaultSocket {
5385
5385
  return response.notification_channel_category_setting_event;
5386
5386
  });
5387
5387
  }
5388
+ addUserEmojiUsage(add_user_emoji_usage_event) {
5389
+ return __async(this, null, function* () {
5390
+ const response = yield this.send({ add_user_emoji_usage_event: { add_user_emoji_usage_event } });
5391
+ return response.add_user_emoji_usage_event;
5392
+ });
5393
+ }
5394
+ getUserEmojiUsage(clanId) {
5395
+ return __async(this, null, function* () {
5396
+ const response = yield this.send({ get_user_emoji_usage_event: { clanId } });
5397
+ return response.get_user_emoji_usage_event;
5398
+ });
5399
+ }
5388
5400
  pingPong() {
5389
5401
  return __async(this, null, function* () {
5390
5402
  if (!this.adapter.isOpen()) {
@@ -5356,6 +5356,18 @@ var _DefaultSocket = class _DefaultSocket {
5356
5356
  return response.notification_channel_category_setting_event;
5357
5357
  });
5358
5358
  }
5359
+ addUserEmojiUsage(add_user_emoji_usage_event) {
5360
+ return __async(this, null, function* () {
5361
+ const response = yield this.send({ add_user_emoji_usage_event: { add_user_emoji_usage_event } });
5362
+ return response.add_user_emoji_usage_event;
5363
+ });
5364
+ }
5365
+ getUserEmojiUsage(clanId) {
5366
+ return __async(this, null, function* () {
5367
+ const response = yield this.send({ get_user_emoji_usage_event: { clanId } });
5368
+ return response.get_user_emoji_usage_event;
5369
+ });
5370
+ }
5359
5371
  pingPong() {
5360
5372
  return __async(this, null, function* () {
5361
5373
  if (!this.adapter.isOpen()) {
package/dist/socket.d.ts CHANGED
@@ -522,6 +522,21 @@ export interface NotificationChannelCategorySettingEvent {
522
522
  clan_id?: string;
523
523
  notification_channel_category_settings_list?: NotificationChannelCategorySetting[];
524
524
  }
525
+ export interface UserEmojiUsage {
526
+ user_id: string;
527
+ emoji_id: string;
528
+ clan_id: string;
529
+ create_time: string;
530
+ }
531
+ export interface AddUserEmojiUsageEvent {
532
+ emoji_id: string;
533
+ clan_id: string;
534
+ }
535
+ /** Response cho ListUserEmojiUsage */
536
+ export interface GetUserEmojiUsageEvent {
537
+ clanId: string;
538
+ user_emoji_usage: Array<UserEmojiUsage>;
539
+ }
525
540
  /** A socket connection to Mezon server. */
526
541
  export interface Socket {
527
542
  /** Connection is Open */
@@ -630,6 +645,8 @@ export interface Socket {
630
645
  GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
631
646
  getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
632
647
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
648
+ addUserEmojiUsage: (add_user_emoji_usage_event: AddUserEmojiUsageEvent) => void;
649
+ getUserEmojiUsage(clanId: string): Promise<GetUserEmojiUsageEvent>;
633
650
  }
634
651
  /** Reports an error received from a socket message. */
635
652
  export interface SocketError {
@@ -719,6 +736,8 @@ export declare class DefaultSocket implements Socket {
719
736
  getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
720
737
  getNotificationReactMessage(channel_id: string): Promise<NotifiReactMessageEvent>;
721
738
  getNotificationChannelCategorySetting(clan_id: string): Promise<NotificationChannelCategorySettingEvent>;
739
+ addUserEmojiUsage(add_user_emoji_usage_event: AddUserEmojiUsageEvent): Promise<any>;
740
+ getUserEmojiUsage(clanId: string): Promise<GetUserEmojiUsageEvent>;
722
741
  private pingPong;
723
742
  }
724
743
  export {};
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.8.85",
3
+
4
+ "version": "2.8.87",
5
+
4
6
  "scripts": {
5
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
8
  },
package/socket.ts CHANGED
@@ -782,6 +782,23 @@ export interface NotificationChannelCategorySettingEvent {
782
782
  notification_channel_category_settings_list?: NotificationChannelCategorySetting[]
783
783
  }
784
784
 
785
+ export interface UserEmojiUsage {
786
+ user_id: string;
787
+ emoji_id: string;
788
+ clan_id: string;
789
+ create_time: string;
790
+ }
791
+
792
+ export interface AddUserEmojiUsageEvent {
793
+ emoji_id: string;
794
+ clan_id: string;
795
+ }
796
+
797
+ /** Response cho ListUserEmojiUsage */
798
+ export interface GetUserEmojiUsageEvent {
799
+ clanId: string;
800
+ user_emoji_usage: Array<UserEmojiUsage>;
801
+ }
785
802
 
786
803
  /** A socket connection to Mezon server. */
787
804
  export interface Socket {
@@ -965,6 +982,11 @@ export interface Socket {
965
982
  getNotificationChannelCategorySetting(clan_id : string): Promise<NotificationChannelCategorySettingEvent>;
966
983
 
967
984
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
985
+
986
+ addUserEmojiUsage: (add_user_emoji_usage_event: AddUserEmojiUsageEvent) => void;
987
+
988
+ getUserEmojiUsage(clanId: string): Promise<GetUserEmojiUsageEvent>
989
+
968
990
  }
969
991
 
970
992
  /** Reports an error received from a socket message. */
@@ -1584,6 +1606,15 @@ export class DefaultSocket implements Socket {
1584
1606
  return response.notification_channel_category_setting_event
1585
1607
  }
1586
1608
 
1609
+ async addUserEmojiUsage(add_user_emoji_usage_event: AddUserEmojiUsageEvent) {
1610
+ const response = await this.send({add_user_emoji_usage_event: {add_user_emoji_usage_event: add_user_emoji_usage_event}})
1611
+ return response.add_user_emoji_usage_event
1612
+ }
1613
+
1614
+ async getUserEmojiUsage(clanId: string): Promise<GetUserEmojiUsageEvent> {
1615
+ const response = await this.send({get_user_emoji_usage_event: {clanId: clanId}})
1616
+ return response.get_user_emoji_usage_event
1617
+ }
1587
1618
 
1588
1619
  private async pingPong(): Promise<void> {
1589
1620
  if (!this.adapter.isOpen()) {