mezon-js 2.9.13 → 2.9.14

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -546,6 +546,8 @@ export interface ApiChannelDescription {
546
546
  //
547
547
  clan_id?: string;
548
548
  //
549
+ clan_name?: string;
550
+ //
549
551
  count_mess_unread?: number;
550
552
  //
551
553
  create_time_seconds?: number;
@@ -1084,6 +1086,32 @@ export interface ApiGiveCoffeeEvent {
1084
1086
  token_count?: number;
1085
1087
  }
1086
1088
 
1089
+ /** */
1090
+ export interface ApiHashtagDm {
1091
+ //The channel id.
1092
+ channel_id?: string;
1093
+ //
1094
+ channel_label?: string;
1095
+ //
1096
+ channel_private?: number;
1097
+ //
1098
+ clan_id?: string;
1099
+ //
1100
+ clan_name?: string;
1101
+ //
1102
+ meeting_code?: string;
1103
+ //
1104
+ parrent_id?: string;
1105
+ //
1106
+ type?: number;
1107
+ }
1108
+
1109
+ /** */
1110
+ export interface ApiHashtagDmList {
1111
+ //
1112
+ hashtag_dm?: Array<ApiHashtagDm>;
1113
+ }
1114
+
1087
1115
  /** Add link invite users to. */
1088
1116
  export interface ApiInviteUserRes {
1089
1117
  //id channel to add link to.
@@ -1316,6 +1344,26 @@ export interface ApiNotificationChannel {
1316
1344
  channel_id?: string;
1317
1345
  }
1318
1346
 
1347
+ /** */
1348
+ export interface ApiNotificationChannelCategorySetting {
1349
+ //
1350
+ action?: number;
1351
+ //
1352
+ channel_category_label?: string;
1353
+ //
1354
+ channel_category_title?: string;
1355
+ //
1356
+ id?: string;
1357
+ //
1358
+ notification_setting_type?: number;
1359
+ }
1360
+
1361
+ /** */
1362
+ export interface ApiNotificationChannelCategorySettingList {
1363
+ //
1364
+ notification_channel_category_settings_list?: Array<ApiNotificationChannelCategorySetting>;
1365
+ }
1366
+
1319
1367
  /** A collection of zero or more notifications. */
1320
1368
  export interface ApiNotificationList {
1321
1369
  //Use this cursor to paginate notifications. Cache this to catch up to new notifications.
@@ -5272,6 +5320,39 @@ export class MezonApi {
5272
5320
  ]);
5273
5321
  }
5274
5322
 
5323
+ /** List GetChannelCategoryNotiSettingsList */
5324
+ getChannelCategoryNotiSettingsList(bearerToken: string,
5325
+ clanId?:string,
5326
+ options: any = {}): Promise<ApiNotificationChannelCategorySettingList> {
5327
+
5328
+ const urlPath = "/v2/getChannelCategoryNotiSettingsList";
5329
+ const queryParams = new Map<string, any>();
5330
+ queryParams.set("clan_id", clanId);
5331
+
5332
+ let bodyJson : string = "";
5333
+
5334
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5335
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5336
+ if (bearerToken) {
5337
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5338
+ }
5339
+
5340
+ return Promise.race([
5341
+ fetch(fullUrl, fetchOptions).then((response) => {
5342
+ if (response.status == 204) {
5343
+ return response;
5344
+ } else if (response.status >= 200 && response.status < 300) {
5345
+ return response.json();
5346
+ } else {
5347
+ throw response;
5348
+ }
5349
+ }),
5350
+ new Promise((_, reject) =>
5351
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5352
+ ),
5353
+ ]);
5354
+ }
5355
+
5275
5356
  /** */
5276
5357
  getUserProfileOnClan(bearerToken: string,
5277
5358
  clanId:string,
@@ -5308,6 +5389,138 @@ export class MezonApi {
5308
5389
  ]);
5309
5390
  }
5310
5391
 
5392
+ /** List GetNotificationChannel */
5393
+ getNotificationCategory(bearerToken: string,
5394
+ categoryId?:string,
5395
+ options: any = {}): Promise<ApiNotificationUserChannel> {
5396
+
5397
+ const urlPath = "/v2/getnotificationcategory";
5398
+ const queryParams = new Map<string, any>();
5399
+ queryParams.set("category_id", categoryId);
5400
+
5401
+ let bodyJson : string = "";
5402
+
5403
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5404
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5405
+ if (bearerToken) {
5406
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5407
+ }
5408
+
5409
+ return Promise.race([
5410
+ fetch(fullUrl, fetchOptions).then((response) => {
5411
+ if (response.status == 204) {
5412
+ return response;
5413
+ } else if (response.status >= 200 && response.status < 300) {
5414
+ return response.json();
5415
+ } else {
5416
+ throw response;
5417
+ }
5418
+ }),
5419
+ new Promise((_, reject) =>
5420
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5421
+ ),
5422
+ ]);
5423
+ }
5424
+
5425
+ /** List GetNotificationChannel */
5426
+ getNotificationChannel(bearerToken: string,
5427
+ channelId?:string,
5428
+ options: any = {}): Promise<ApiNotificationUserChannel> {
5429
+
5430
+ const urlPath = "/v2/getnotificationchannel";
5431
+ const queryParams = new Map<string, any>();
5432
+ queryParams.set("channel_id", channelId);
5433
+
5434
+ let bodyJson : string = "";
5435
+
5436
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5437
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5438
+ if (bearerToken) {
5439
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5440
+ }
5441
+
5442
+ return Promise.race([
5443
+ fetch(fullUrl, fetchOptions).then((response) => {
5444
+ if (response.status == 204) {
5445
+ return response;
5446
+ } else if (response.status >= 200 && response.status < 300) {
5447
+ return response.json();
5448
+ } else {
5449
+ throw response;
5450
+ }
5451
+ }),
5452
+ new Promise((_, reject) =>
5453
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5454
+ ),
5455
+ ]);
5456
+ }
5457
+
5458
+ /** List GetNotificationClan */
5459
+ getNotificationClan(bearerToken: string,
5460
+ clanId?:string,
5461
+ options: any = {}): Promise<ApiNotificationSetting> {
5462
+
5463
+ const urlPath = "/v2/getnotificationclan";
5464
+ const queryParams = new Map<string, any>();
5465
+ queryParams.set("clan_id", clanId);
5466
+
5467
+ let bodyJson : string = "";
5468
+
5469
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5470
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5471
+ if (bearerToken) {
5472
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5473
+ }
5474
+
5475
+ return Promise.race([
5476
+ fetch(fullUrl, fetchOptions).then((response) => {
5477
+ if (response.status == 204) {
5478
+ return response;
5479
+ } else if (response.status >= 200 && response.status < 300) {
5480
+ return response.json();
5481
+ } else {
5482
+ throw response;
5483
+ }
5484
+ }),
5485
+ new Promise((_, reject) =>
5486
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5487
+ ),
5488
+ ]);
5489
+ }
5490
+
5491
+ /** List GetNotificationReactMessage */
5492
+ getNotificationReactMessage(bearerToken: string,
5493
+ channelId?:string,
5494
+ options: any = {}): Promise<ApiNotifiReactMessage> {
5495
+
5496
+ const urlPath = "/v2/getnotificationreactmessage";
5497
+ const queryParams = new Map<string, any>();
5498
+ queryParams.set("channel_id", channelId);
5499
+
5500
+ let bodyJson : string = "";
5501
+
5502
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5503
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5504
+ if (bearerToken) {
5505
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5506
+ }
5507
+
5508
+ return Promise.race([
5509
+ fetch(fullUrl, fetchOptions).then((response) => {
5510
+ if (response.status == 204) {
5511
+ return response;
5512
+ } else if (response.status >= 200 && response.status < 300) {
5513
+ return response.json();
5514
+ } else {
5515
+ throw response;
5516
+ }
5517
+ }),
5518
+ new Promise((_, reject) =>
5519
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5520
+ ),
5521
+ ]);
5522
+ }
5523
+
5311
5524
  /** Give a coffee */
5312
5525
  giveMeACoffee(bearerToken: string,
5313
5526
  body:ApiGiveCoffeeEvent,
@@ -5344,6 +5557,41 @@ export class MezonApi {
5344
5557
  ]);
5345
5558
  }
5346
5559
 
5560
+ /** List HashtagDMList */
5561
+ hashtagDMList(bearerToken: string,
5562
+ userId?:Array<string>,
5563
+ limit?:number,
5564
+ options: any = {}): Promise<ApiHashtagDmList> {
5565
+
5566
+ const urlPath = "/v2/hashtagdmlist";
5567
+ const queryParams = new Map<string, any>();
5568
+ queryParams.set("user_id", userId);
5569
+ queryParams.set("limit", limit);
5570
+
5571
+ let bodyJson : string = "";
5572
+
5573
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5574
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5575
+ if (bearerToken) {
5576
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5577
+ }
5578
+
5579
+ return Promise.race([
5580
+ fetch(fullUrl, fetchOptions).then((response) => {
5581
+ if (response.status == 204) {
5582
+ return response;
5583
+ } else if (response.status >= 200 && response.status < 300) {
5584
+ return response.json();
5585
+ } else {
5586
+ throw response;
5587
+ }
5588
+ }),
5589
+ new Promise((_, reject) =>
5590
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5591
+ ),
5592
+ ]);
5593
+ }
5594
+
5347
5595
  /** Add users to a channel. */
5348
5596
  createLinkInviteUser(bearerToken: string,
5349
5597
  body:ApiLinkInviteUserRequest,
@@ -5452,6 +5700,37 @@ export class MezonApi {
5452
5700
  ]);
5453
5701
  }
5454
5702
 
5703
+ /** List HashtagDMList */
5704
+ listChannelByUserId(bearerToken: string,
5705
+ options: any = {}): Promise<ApiChannelDescList> {
5706
+
5707
+ const urlPath = "/v2/listchannelbyuserid";
5708
+ const queryParams = new Map<string, any>();
5709
+
5710
+ let bodyJson : string = "";
5711
+
5712
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5713
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5714
+ if (bearerToken) {
5715
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5716
+ }
5717
+
5718
+ return Promise.race([
5719
+ fetch(fullUrl, fetchOptions).then((response) => {
5720
+ if (response.status == 204) {
5721
+ return response;
5722
+ } else if (response.status >= 200 && response.status < 300) {
5723
+ return response.json();
5724
+ } else {
5725
+ throw response;
5726
+ }
5727
+ }),
5728
+ new Promise((_, reject) =>
5729
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
5730
+ ),
5731
+ ]);
5732
+ }
5733
+
5455
5734
  /** set mute notification user channel. */
5456
5735
  setMuteNotificationCategory(bearerToken: string,
5457
5736
  body:ApiSetMuteNotificationRequest,
package/client.ts CHANGED
@@ -108,8 +108,13 @@ import {
108
108
  ApiRegisterStreamingChannelResponse,
109
109
  ApiRoleList,
110
110
  ApiListChannelAppsResponse,
111
- ApiStickerListedResponse,
111
+ ApiNotificationChannelCategorySettingList,
112
+ ApiNotificationUserChannel,
113
+ ApiNotificationSetting,
114
+ ApiNotifiReactMessage,
115
+ ApiHashtagDmList,
112
116
  ApiEmojiListedResponse,
117
+ ApiStickerListedResponse,
113
118
  ApiAllUsersAddChannelResponse,
114
119
  } from "./api.gen";
115
120
 
@@ -3603,7 +3608,10 @@ export class Client {
3603
3608
  });
3604
3609
  }
3605
3610
 
3606
- async getListStickersByUserId(session: Session): Promise<ApiStickerListedResponse> {
3611
+ async getChannelCategoryNotiSettingsList(
3612
+ session: Session,
3613
+ clanId: string
3614
+ ): Promise<ApiNotificationChannelCategorySettingList> {
3607
3615
  if (
3608
3616
  this.autoRefreshSession &&
3609
3617
  session.refresh_token &&
@@ -3613,7 +3621,138 @@ export class Client {
3613
3621
  }
3614
3622
 
3615
3623
  return this.apiClient
3616
- .getListStickersByUserId(session.token)
3624
+ .getChannelCategoryNotiSettingsList(session.token, clanId)
3625
+ .then((response: ApiNotificationChannelCategorySettingList) => {
3626
+ return Promise.resolve(response);
3627
+ });
3628
+ }
3629
+
3630
+ async getNotificationCategory(
3631
+ session: Session,
3632
+ categoryId: string
3633
+ ): Promise<ApiNotificationUserChannel> {
3634
+ if (
3635
+ this.autoRefreshSession &&
3636
+ session.refresh_token &&
3637
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3638
+ ) {
3639
+ await this.sessionRefresh(session);
3640
+ }
3641
+
3642
+ return this.apiClient
3643
+ .getNotificationCategory(session.token, categoryId)
3644
+ .then((response: ApiNotificationUserChannel) => {
3645
+ return Promise.resolve(response);
3646
+ });
3647
+ }
3648
+
3649
+ async getNotificationChannel(
3650
+ session: Session,
3651
+ channelId: string
3652
+ ): Promise<ApiNotificationUserChannel> {
3653
+ if (
3654
+ this.autoRefreshSession &&
3655
+ session.refresh_token &&
3656
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3657
+ ) {
3658
+ await this.sessionRefresh(session);
3659
+ }
3660
+
3661
+ return this.apiClient
3662
+ .getNotificationChannel(session.token, channelId)
3663
+ .then((response: ApiNotificationUserChannel) => {
3664
+ return Promise.resolve(response);
3665
+ });
3666
+ }
3667
+
3668
+ async getNotificationClan(
3669
+ session: Session,
3670
+ clanId: string
3671
+ ): Promise<ApiNotificationSetting> {
3672
+ if (
3673
+ this.autoRefreshSession &&
3674
+ session.refresh_token &&
3675
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3676
+ ) {
3677
+ await this.sessionRefresh(session);
3678
+ }
3679
+
3680
+ return this.apiClient
3681
+ .getNotificationClan(session.token, clanId)
3682
+ .then((response: ApiNotificationSetting) => {
3683
+ return Promise.resolve(response);
3684
+ });
3685
+ }
3686
+
3687
+ async getNotificationReactMessage(
3688
+ session: Session,
3689
+ channelId: string
3690
+ ): Promise<ApiNotifiReactMessage> {
3691
+ if (
3692
+ this.autoRefreshSession &&
3693
+ session.refresh_token &&
3694
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3695
+ ) {
3696
+ await this.sessionRefresh(session);
3697
+ }
3698
+
3699
+ return this.apiClient
3700
+ .getNotificationReactMessage(session.token, channelId)
3701
+ .then((response: ApiNotifiReactMessage) => {
3702
+ return Promise.resolve(response);
3703
+ });
3704
+ }
3705
+
3706
+ async hashtagDMList(
3707
+ session: Session,
3708
+ userId: Array<string>,
3709
+ limit:number
3710
+ ): Promise<ApiHashtagDmList> {
3711
+ if (
3712
+ this.autoRefreshSession &&
3713
+ session.refresh_token &&
3714
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3715
+ ) {
3716
+ await this.sessionRefresh(session);
3717
+ }
3718
+
3719
+ return this.apiClient
3720
+ .hashtagDMList(session.token, userId, limit)
3721
+ .then((response: ApiHashtagDmList) => {
3722
+ return Promise.resolve(response);
3723
+ });
3724
+ }
3725
+
3726
+ async listChannelByUserId(
3727
+ session: Session
3728
+ ): Promise<ApiChannelDescList> {
3729
+ if (
3730
+ this.autoRefreshSession &&
3731
+ session.refresh_token &&
3732
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3733
+ ) {
3734
+ await this.sessionRefresh(session);
3735
+ }
3736
+
3737
+ return this.apiClient
3738
+ .listChannelByUserId(session.token)
3739
+ .then((response: ApiChannelDescList) => {
3740
+ return Promise.resolve(response);
3741
+ });
3742
+ }
3743
+
3744
+
3745
+ async listUsersAddChannelByChannelId(session: Session, channel_id : string, limit : number): Promise<ApiAllUsersAddChannelResponse> {
3746
+ if (
3747
+ this.autoRefreshSession &&
3748
+ session.refresh_token &&
3749
+ session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
3750
+ ) {
3751
+ await this.sessionRefresh(session);
3752
+ }
3753
+
3754
+ return this.apiClient
3755
+ .listUsersAddChannelByChannelId(session.token, channel_id, limit)
3617
3756
  .then((response: any) => {
3618
3757
  return Promise.resolve(response);
3619
3758
  });
@@ -3635,7 +3774,8 @@ export class Client {
3635
3774
  });
3636
3775
  }
3637
3776
 
3638
- async listUsersAddChannelByChannelId(session: Session, channel_id : string, limit : number): Promise<ApiAllUsersAddChannelResponse> {
3777
+
3778
+ async getListStickersByUserId(session: Session): Promise<ApiStickerListedResponse> {
3639
3779
  if (
3640
3780
  this.autoRefreshSession &&
3641
3781
  session.refresh_token &&
@@ -3645,7 +3785,7 @@ export class Client {
3645
3785
  }
3646
3786
 
3647
3787
  return this.apiClient
3648
- .listUsersAddChannelByChannelId(session.token, channel_id, limit)
3788
+ .getListStickersByUserId(session.token)
3649
3789
  .then((response: any) => {
3650
3790
  return Promise.resolve(response);
3651
3791
  });
package/dist/api.gen.d.ts CHANGED
@@ -318,6 +318,7 @@ export interface ApiChannelDescription {
318
318
  channel_label?: string;
319
319
  channel_private?: number;
320
320
  clan_id?: string;
321
+ clan_name?: string;
321
322
  count_mess_unread?: number;
322
323
  create_time_seconds?: number;
323
324
  creator_id?: string;
@@ -623,6 +624,21 @@ export interface ApiGiveCoffeeEvent {
623
624
  sender_id?: string;
624
625
  token_count?: number;
625
626
  }
627
+ /** */
628
+ export interface ApiHashtagDm {
629
+ channel_id?: string;
630
+ channel_label?: string;
631
+ channel_private?: number;
632
+ clan_id?: string;
633
+ clan_name?: string;
634
+ meeting_code?: string;
635
+ parrent_id?: string;
636
+ type?: number;
637
+ }
638
+ /** */
639
+ export interface ApiHashtagDmList {
640
+ hashtag_dm?: Array<ApiHashtagDm>;
641
+ }
626
642
  /** Add link invite users to. */
627
643
  export interface ApiInviteUserRes {
628
644
  channel_id?: string;
@@ -761,6 +777,18 @@ export interface ApiNotification {
761
777
  export interface ApiNotificationChannel {
762
778
  channel_id?: string;
763
779
  }
780
+ /** */
781
+ export interface ApiNotificationChannelCategorySetting {
782
+ action?: number;
783
+ channel_category_label?: string;
784
+ channel_category_title?: string;
785
+ id?: string;
786
+ notification_setting_type?: number;
787
+ }
788
+ /** */
789
+ export interface ApiNotificationChannelCategorySettingList {
790
+ notification_channel_category_settings_list?: Array<ApiNotificationChannelCategorySetting>;
791
+ }
764
792
  /** A collection of zero or more notifications. */
765
793
  export interface ApiNotificationList {
766
794
  cacheable_cursor?: string;
@@ -1324,16 +1352,30 @@ export declare class MezonApi {
1324
1352
  importFacebookFriends(bearerToken: string, account: ApiAccountFacebook, reset?: boolean, options?: any): Promise<any>;
1325
1353
  /** Import Steam friends and add them to a user's account. */
1326
1354
  importSteamFriends(bearerToken: string, account: ApiAccountSteam, reset?: boolean, options?: any): Promise<any>;
1355
+ /** List GetChannelCategoryNotiSettingsList */
1356
+ getChannelCategoryNotiSettingsList(bearerToken: string, clanId?: string, options?: any): Promise<ApiNotificationChannelCategorySettingList>;
1327
1357
  /** */
1328
1358
  getUserProfileOnClan(bearerToken: string, clanId: string, options?: any): Promise<ApiClanProfile>;
1359
+ /** List GetNotificationChannel */
1360
+ getNotificationCategory(bearerToken: string, categoryId?: string, options?: any): Promise<ApiNotificationUserChannel>;
1361
+ /** List GetNotificationChannel */
1362
+ getNotificationChannel(bearerToken: string, channelId?: string, options?: any): Promise<ApiNotificationUserChannel>;
1363
+ /** List GetNotificationClan */
1364
+ getNotificationClan(bearerToken: string, clanId?: string, options?: any): Promise<ApiNotificationSetting>;
1365
+ /** List GetNotificationReactMessage */
1366
+ getNotificationReactMessage(bearerToken: string, channelId?: string, options?: any): Promise<ApiNotifiReactMessage>;
1329
1367
  /** Give a coffee */
1330
1368
  giveMeACoffee(bearerToken: string, body: ApiGiveCoffeeEvent, options?: any): Promise<any>;
1369
+ /** List HashtagDMList */
1370
+ hashtagDMList(bearerToken: string, userId?: Array<string>, limit?: number, options?: any): Promise<ApiHashtagDmList>;
1331
1371
  /** Add users to a channel. */
1332
1372
  createLinkInviteUser(bearerToken: string, body: ApiLinkInviteUserRequest, options?: any): Promise<ApiLinkInviteUser>;
1333
1373
  /** Add users to a channel. */
1334
1374
  getLinkInvite(bearerToken: string, inviteId: string, options?: any): Promise<ApiInviteUserRes>;
1335
1375
  /** Add users to a channel. */
1336
1376
  inviteUser(bearerToken: string, inviteId: string, options?: any): Promise<ApiInviteUserRes>;
1377
+ /** List HashtagDMList */
1378
+ listChannelByUserId(bearerToken: string, options?: any): Promise<ApiChannelDescList>;
1337
1379
  /** set mute notification user channel. */
1338
1380
  setMuteNotificationCategory(bearerToken: string, body: ApiSetMuteNotificationRequest, options?: any): Promise<any>;
1339
1381
  /** set mute notification user channel. */
package/dist/client.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiStickerListedResponse, ApiEmojiListedResponse, ApiAllUsersAddChannelResponse } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -560,7 +560,14 @@ export declare class Client {
560
560
  registerStreamingChannel(session: Session, request: ApiRegisterStreamingChannelRequest): Promise<boolean>;
561
561
  /** List a channel's users. */
562
562
  listChannelApps(session: Session, clanId: string): Promise<ApiListChannelAppsResponse>;
563
- getListStickersByUserId(session: Session): Promise<ApiStickerListedResponse>;
564
- getListEmojisByUserId(session: Session): Promise<ApiEmojiListedResponse>;
563
+ getChannelCategoryNotiSettingsList(session: Session, clanId: string): Promise<ApiNotificationChannelCategorySettingList>;
564
+ getNotificationCategory(session: Session, categoryId: string): Promise<ApiNotificationUserChannel>;
565
+ getNotificationChannel(session: Session, channelId: string): Promise<ApiNotificationUserChannel>;
566
+ getNotificationClan(session: Session, clanId: string): Promise<ApiNotificationSetting>;
567
+ getNotificationReactMessage(session: Session, channelId: string): Promise<ApiNotifiReactMessage>;
568
+ hashtagDMList(session: Session, userId: Array<string>, limit: number): Promise<ApiHashtagDmList>;
569
+ listChannelByUserId(session: Session): Promise<ApiChannelDescList>;
565
570
  listUsersAddChannelByChannelId(session: Session, channel_id: string, limit: number): Promise<ApiAllUsersAddChannelResponse>;
571
+ getListEmojisByUserId(session: Session): Promise<ApiEmojiListedResponse>;
572
+ getListStickersByUserId(session: Session): Promise<ApiStickerListedResponse>;
566
573
  }
@@ -3257,6 +3257,32 @@ var MezonApi = class {
3257
3257
  )
3258
3258
  ]);
3259
3259
  }
3260
+ /** List GetChannelCategoryNotiSettingsList */
3261
+ getChannelCategoryNotiSettingsList(bearerToken, clanId, options = {}) {
3262
+ const urlPath = "/v2/getChannelCategoryNotiSettingsList";
3263
+ const queryParams = /* @__PURE__ */ new Map();
3264
+ queryParams.set("clan_id", clanId);
3265
+ let bodyJson = "";
3266
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3267
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3268
+ if (bearerToken) {
3269
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3270
+ }
3271
+ return Promise.race([
3272
+ fetch(fullUrl, fetchOptions).then((response) => {
3273
+ if (response.status == 204) {
3274
+ return response;
3275
+ } else if (response.status >= 200 && response.status < 300) {
3276
+ return response.json();
3277
+ } else {
3278
+ throw response;
3279
+ }
3280
+ }),
3281
+ new Promise(
3282
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3283
+ )
3284
+ ]);
3285
+ }
3260
3286
  /** */
3261
3287
  getUserProfileOnClan(bearerToken, clanId, options = {}) {
3262
3288
  if (clanId === null || clanId === void 0) {
@@ -3285,6 +3311,110 @@ var MezonApi = class {
3285
3311
  )
3286
3312
  ]);
3287
3313
  }
3314
+ /** List GetNotificationChannel */
3315
+ getNotificationCategory(bearerToken, categoryId, options = {}) {
3316
+ const urlPath = "/v2/getnotificationcategory";
3317
+ const queryParams = /* @__PURE__ */ new Map();
3318
+ queryParams.set("category_id", categoryId);
3319
+ let bodyJson = "";
3320
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3321
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3322
+ if (bearerToken) {
3323
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3324
+ }
3325
+ return Promise.race([
3326
+ fetch(fullUrl, fetchOptions).then((response) => {
3327
+ if (response.status == 204) {
3328
+ return response;
3329
+ } else if (response.status >= 200 && response.status < 300) {
3330
+ return response.json();
3331
+ } else {
3332
+ throw response;
3333
+ }
3334
+ }),
3335
+ new Promise(
3336
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3337
+ )
3338
+ ]);
3339
+ }
3340
+ /** List GetNotificationChannel */
3341
+ getNotificationChannel(bearerToken, channelId, options = {}) {
3342
+ const urlPath = "/v2/getnotificationchannel";
3343
+ const queryParams = /* @__PURE__ */ new Map();
3344
+ queryParams.set("channel_id", channelId);
3345
+ let bodyJson = "";
3346
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3347
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3348
+ if (bearerToken) {
3349
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3350
+ }
3351
+ return Promise.race([
3352
+ fetch(fullUrl, fetchOptions).then((response) => {
3353
+ if (response.status == 204) {
3354
+ return response;
3355
+ } else if (response.status >= 200 && response.status < 300) {
3356
+ return response.json();
3357
+ } else {
3358
+ throw response;
3359
+ }
3360
+ }),
3361
+ new Promise(
3362
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3363
+ )
3364
+ ]);
3365
+ }
3366
+ /** List GetNotificationClan */
3367
+ getNotificationClan(bearerToken, clanId, options = {}) {
3368
+ const urlPath = "/v2/getnotificationclan";
3369
+ const queryParams = /* @__PURE__ */ new Map();
3370
+ queryParams.set("clan_id", clanId);
3371
+ let bodyJson = "";
3372
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3373
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3374
+ if (bearerToken) {
3375
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3376
+ }
3377
+ return Promise.race([
3378
+ fetch(fullUrl, fetchOptions).then((response) => {
3379
+ if (response.status == 204) {
3380
+ return response;
3381
+ } else if (response.status >= 200 && response.status < 300) {
3382
+ return response.json();
3383
+ } else {
3384
+ throw response;
3385
+ }
3386
+ }),
3387
+ new Promise(
3388
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3389
+ )
3390
+ ]);
3391
+ }
3392
+ /** List GetNotificationReactMessage */
3393
+ getNotificationReactMessage(bearerToken, channelId, options = {}) {
3394
+ const urlPath = "/v2/getnotificationreactmessage";
3395
+ const queryParams = /* @__PURE__ */ new Map();
3396
+ queryParams.set("channel_id", channelId);
3397
+ let bodyJson = "";
3398
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3399
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3400
+ if (bearerToken) {
3401
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3402
+ }
3403
+ return Promise.race([
3404
+ fetch(fullUrl, fetchOptions).then((response) => {
3405
+ if (response.status == 204) {
3406
+ return response;
3407
+ } else if (response.status >= 200 && response.status < 300) {
3408
+ return response.json();
3409
+ } else {
3410
+ throw response;
3411
+ }
3412
+ }),
3413
+ new Promise(
3414
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3415
+ )
3416
+ ]);
3417
+ }
3288
3418
  /** Give a coffee */
3289
3419
  giveMeACoffee(bearerToken, body, options = {}) {
3290
3420
  if (body === null || body === void 0) {
@@ -3314,6 +3444,33 @@ var MezonApi = class {
3314
3444
  )
3315
3445
  ]);
3316
3446
  }
3447
+ /** List HashtagDMList */
3448
+ hashtagDMList(bearerToken, userId, limit, options = {}) {
3449
+ const urlPath = "/v2/hashtagdmlist";
3450
+ const queryParams = /* @__PURE__ */ new Map();
3451
+ queryParams.set("user_id", userId);
3452
+ queryParams.set("limit", limit);
3453
+ let bodyJson = "";
3454
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3455
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3456
+ if (bearerToken) {
3457
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3458
+ }
3459
+ return Promise.race([
3460
+ fetch(fullUrl, fetchOptions).then((response) => {
3461
+ if (response.status == 204) {
3462
+ return response;
3463
+ } else if (response.status >= 200 && response.status < 300) {
3464
+ return response.json();
3465
+ } else {
3466
+ throw response;
3467
+ }
3468
+ }),
3469
+ new Promise(
3470
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3471
+ )
3472
+ ]);
3473
+ }
3317
3474
  /** Add users to a channel. */
3318
3475
  createLinkInviteUser(bearerToken, body, options = {}) {
3319
3476
  if (body === null || body === void 0) {
@@ -3399,6 +3556,31 @@ var MezonApi = class {
3399
3556
  )
3400
3557
  ]);
3401
3558
  }
3559
+ /** List HashtagDMList */
3560
+ listChannelByUserId(bearerToken, options = {}) {
3561
+ const urlPath = "/v2/listchannelbyuserid";
3562
+ const queryParams = /* @__PURE__ */ new Map();
3563
+ let bodyJson = "";
3564
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3565
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3566
+ if (bearerToken) {
3567
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3568
+ }
3569
+ return Promise.race([
3570
+ fetch(fullUrl, fetchOptions).then((response) => {
3571
+ if (response.status == 204) {
3572
+ return response;
3573
+ } else if (response.status >= 200 && response.status < 300) {
3574
+ return response.json();
3575
+ } else {
3576
+ throw response;
3577
+ }
3578
+ }),
3579
+ new Promise(
3580
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3581
+ )
3582
+ ]);
3583
+ }
3402
3584
  /** set mute notification user channel. */
3403
3585
  setMuteNotificationCategory(bearerToken, body, options = {}) {
3404
3586
  if (body === null || body === void 0) {
@@ -7665,22 +7847,72 @@ var Client = class {
7665
7847
  });
7666
7848
  });
7667
7849
  }
7668
- getListStickersByUserId(session) {
7850
+ getChannelCategoryNotiSettingsList(session, clanId) {
7669
7851
  return __async(this, null, function* () {
7670
7852
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7671
7853
  yield this.sessionRefresh(session);
7672
7854
  }
7673
- return this.apiClient.getListStickersByUserId(session.token).then((response) => {
7855
+ return this.apiClient.getChannelCategoryNotiSettingsList(session.token, clanId).then((response) => {
7674
7856
  return Promise.resolve(response);
7675
7857
  });
7676
7858
  });
7677
7859
  }
7678
- getListEmojisByUserId(session) {
7860
+ getNotificationCategory(session, categoryId) {
7679
7861
  return __async(this, null, function* () {
7680
7862
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7681
7863
  yield this.sessionRefresh(session);
7682
7864
  }
7683
- return this.apiClient.getListEmojisByUserId(session.token).then((response) => {
7865
+ return this.apiClient.getNotificationCategory(session.token, categoryId).then((response) => {
7866
+ return Promise.resolve(response);
7867
+ });
7868
+ });
7869
+ }
7870
+ getNotificationChannel(session, channelId) {
7871
+ return __async(this, null, function* () {
7872
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7873
+ yield this.sessionRefresh(session);
7874
+ }
7875
+ return this.apiClient.getNotificationChannel(session.token, channelId).then((response) => {
7876
+ return Promise.resolve(response);
7877
+ });
7878
+ });
7879
+ }
7880
+ getNotificationClan(session, clanId) {
7881
+ return __async(this, null, function* () {
7882
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7883
+ yield this.sessionRefresh(session);
7884
+ }
7885
+ return this.apiClient.getNotificationClan(session.token, clanId).then((response) => {
7886
+ return Promise.resolve(response);
7887
+ });
7888
+ });
7889
+ }
7890
+ getNotificationReactMessage(session, channelId) {
7891
+ return __async(this, null, function* () {
7892
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7893
+ yield this.sessionRefresh(session);
7894
+ }
7895
+ return this.apiClient.getNotificationReactMessage(session.token, channelId).then((response) => {
7896
+ return Promise.resolve(response);
7897
+ });
7898
+ });
7899
+ }
7900
+ hashtagDMList(session, userId, limit) {
7901
+ return __async(this, null, function* () {
7902
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7903
+ yield this.sessionRefresh(session);
7904
+ }
7905
+ return this.apiClient.hashtagDMList(session.token, userId, limit).then((response) => {
7906
+ return Promise.resolve(response);
7907
+ });
7908
+ });
7909
+ }
7910
+ listChannelByUserId(session) {
7911
+ return __async(this, null, function* () {
7912
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7913
+ yield this.sessionRefresh(session);
7914
+ }
7915
+ return this.apiClient.listChannelByUserId(session.token).then((response) => {
7684
7916
  return Promise.resolve(response);
7685
7917
  });
7686
7918
  });
@@ -7695,4 +7927,24 @@ var Client = class {
7695
7927
  });
7696
7928
  });
7697
7929
  }
7930
+ getListEmojisByUserId(session) {
7931
+ return __async(this, null, function* () {
7932
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7933
+ yield this.sessionRefresh(session);
7934
+ }
7935
+ return this.apiClient.getListEmojisByUserId(session.token).then((response) => {
7936
+ return Promise.resolve(response);
7937
+ });
7938
+ });
7939
+ }
7940
+ getListStickersByUserId(session) {
7941
+ return __async(this, null, function* () {
7942
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7943
+ yield this.sessionRefresh(session);
7944
+ }
7945
+ return this.apiClient.getListStickersByUserId(session.token).then((response) => {
7946
+ return Promise.resolve(response);
7947
+ });
7948
+ });
7949
+ }
7698
7950
  };
@@ -3228,6 +3228,32 @@ var MezonApi = class {
3228
3228
  )
3229
3229
  ]);
3230
3230
  }
3231
+ /** List GetChannelCategoryNotiSettingsList */
3232
+ getChannelCategoryNotiSettingsList(bearerToken, clanId, options = {}) {
3233
+ const urlPath = "/v2/getChannelCategoryNotiSettingsList";
3234
+ const queryParams = /* @__PURE__ */ new Map();
3235
+ queryParams.set("clan_id", clanId);
3236
+ let bodyJson = "";
3237
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3238
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3239
+ if (bearerToken) {
3240
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3241
+ }
3242
+ return Promise.race([
3243
+ fetch(fullUrl, fetchOptions).then((response) => {
3244
+ if (response.status == 204) {
3245
+ return response;
3246
+ } else if (response.status >= 200 && response.status < 300) {
3247
+ return response.json();
3248
+ } else {
3249
+ throw response;
3250
+ }
3251
+ }),
3252
+ new Promise(
3253
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3254
+ )
3255
+ ]);
3256
+ }
3231
3257
  /** */
3232
3258
  getUserProfileOnClan(bearerToken, clanId, options = {}) {
3233
3259
  if (clanId === null || clanId === void 0) {
@@ -3256,6 +3282,110 @@ var MezonApi = class {
3256
3282
  )
3257
3283
  ]);
3258
3284
  }
3285
+ /** List GetNotificationChannel */
3286
+ getNotificationCategory(bearerToken, categoryId, options = {}) {
3287
+ const urlPath = "/v2/getnotificationcategory";
3288
+ const queryParams = /* @__PURE__ */ new Map();
3289
+ queryParams.set("category_id", categoryId);
3290
+ let bodyJson = "";
3291
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3292
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3293
+ if (bearerToken) {
3294
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3295
+ }
3296
+ return Promise.race([
3297
+ fetch(fullUrl, fetchOptions).then((response) => {
3298
+ if (response.status == 204) {
3299
+ return response;
3300
+ } else if (response.status >= 200 && response.status < 300) {
3301
+ return response.json();
3302
+ } else {
3303
+ throw response;
3304
+ }
3305
+ }),
3306
+ new Promise(
3307
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3308
+ )
3309
+ ]);
3310
+ }
3311
+ /** List GetNotificationChannel */
3312
+ getNotificationChannel(bearerToken, channelId, options = {}) {
3313
+ const urlPath = "/v2/getnotificationchannel";
3314
+ const queryParams = /* @__PURE__ */ new Map();
3315
+ queryParams.set("channel_id", channelId);
3316
+ let bodyJson = "";
3317
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3318
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3319
+ if (bearerToken) {
3320
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3321
+ }
3322
+ return Promise.race([
3323
+ fetch(fullUrl, fetchOptions).then((response) => {
3324
+ if (response.status == 204) {
3325
+ return response;
3326
+ } else if (response.status >= 200 && response.status < 300) {
3327
+ return response.json();
3328
+ } else {
3329
+ throw response;
3330
+ }
3331
+ }),
3332
+ new Promise(
3333
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3334
+ )
3335
+ ]);
3336
+ }
3337
+ /** List GetNotificationClan */
3338
+ getNotificationClan(bearerToken, clanId, options = {}) {
3339
+ const urlPath = "/v2/getnotificationclan";
3340
+ const queryParams = /* @__PURE__ */ new Map();
3341
+ queryParams.set("clan_id", clanId);
3342
+ let bodyJson = "";
3343
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3344
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3345
+ if (bearerToken) {
3346
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3347
+ }
3348
+ return Promise.race([
3349
+ fetch(fullUrl, fetchOptions).then((response) => {
3350
+ if (response.status == 204) {
3351
+ return response;
3352
+ } else if (response.status >= 200 && response.status < 300) {
3353
+ return response.json();
3354
+ } else {
3355
+ throw response;
3356
+ }
3357
+ }),
3358
+ new Promise(
3359
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3360
+ )
3361
+ ]);
3362
+ }
3363
+ /** List GetNotificationReactMessage */
3364
+ getNotificationReactMessage(bearerToken, channelId, options = {}) {
3365
+ const urlPath = "/v2/getnotificationreactmessage";
3366
+ const queryParams = /* @__PURE__ */ new Map();
3367
+ queryParams.set("channel_id", channelId);
3368
+ let bodyJson = "";
3369
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3370
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3371
+ if (bearerToken) {
3372
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3373
+ }
3374
+ return Promise.race([
3375
+ fetch(fullUrl, fetchOptions).then((response) => {
3376
+ if (response.status == 204) {
3377
+ return response;
3378
+ } else if (response.status >= 200 && response.status < 300) {
3379
+ return response.json();
3380
+ } else {
3381
+ throw response;
3382
+ }
3383
+ }),
3384
+ new Promise(
3385
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3386
+ )
3387
+ ]);
3388
+ }
3259
3389
  /** Give a coffee */
3260
3390
  giveMeACoffee(bearerToken, body, options = {}) {
3261
3391
  if (body === null || body === void 0) {
@@ -3285,6 +3415,33 @@ var MezonApi = class {
3285
3415
  )
3286
3416
  ]);
3287
3417
  }
3418
+ /** List HashtagDMList */
3419
+ hashtagDMList(bearerToken, userId, limit, options = {}) {
3420
+ const urlPath = "/v2/hashtagdmlist";
3421
+ const queryParams = /* @__PURE__ */ new Map();
3422
+ queryParams.set("user_id", userId);
3423
+ queryParams.set("limit", limit);
3424
+ let bodyJson = "";
3425
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3426
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3427
+ if (bearerToken) {
3428
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3429
+ }
3430
+ return Promise.race([
3431
+ fetch(fullUrl, fetchOptions).then((response) => {
3432
+ if (response.status == 204) {
3433
+ return response;
3434
+ } else if (response.status >= 200 && response.status < 300) {
3435
+ return response.json();
3436
+ } else {
3437
+ throw response;
3438
+ }
3439
+ }),
3440
+ new Promise(
3441
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3442
+ )
3443
+ ]);
3444
+ }
3288
3445
  /** Add users to a channel. */
3289
3446
  createLinkInviteUser(bearerToken, body, options = {}) {
3290
3447
  if (body === null || body === void 0) {
@@ -3370,6 +3527,31 @@ var MezonApi = class {
3370
3527
  )
3371
3528
  ]);
3372
3529
  }
3530
+ /** List HashtagDMList */
3531
+ listChannelByUserId(bearerToken, options = {}) {
3532
+ const urlPath = "/v2/listchannelbyuserid";
3533
+ const queryParams = /* @__PURE__ */ new Map();
3534
+ let bodyJson = "";
3535
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3536
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3537
+ if (bearerToken) {
3538
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3539
+ }
3540
+ return Promise.race([
3541
+ fetch(fullUrl, fetchOptions).then((response) => {
3542
+ if (response.status == 204) {
3543
+ return response;
3544
+ } else if (response.status >= 200 && response.status < 300) {
3545
+ return response.json();
3546
+ } else {
3547
+ throw response;
3548
+ }
3549
+ }),
3550
+ new Promise(
3551
+ (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
3552
+ )
3553
+ ]);
3554
+ }
3373
3555
  /** set mute notification user channel. */
3374
3556
  setMuteNotificationCategory(bearerToken, body, options = {}) {
3375
3557
  if (body === null || body === void 0) {
@@ -7636,22 +7818,72 @@ var Client = class {
7636
7818
  });
7637
7819
  });
7638
7820
  }
7639
- getListStickersByUserId(session) {
7821
+ getChannelCategoryNotiSettingsList(session, clanId) {
7640
7822
  return __async(this, null, function* () {
7641
7823
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7642
7824
  yield this.sessionRefresh(session);
7643
7825
  }
7644
- return this.apiClient.getListStickersByUserId(session.token).then((response) => {
7826
+ return this.apiClient.getChannelCategoryNotiSettingsList(session.token, clanId).then((response) => {
7645
7827
  return Promise.resolve(response);
7646
7828
  });
7647
7829
  });
7648
7830
  }
7649
- getListEmojisByUserId(session) {
7831
+ getNotificationCategory(session, categoryId) {
7650
7832
  return __async(this, null, function* () {
7651
7833
  if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7652
7834
  yield this.sessionRefresh(session);
7653
7835
  }
7654
- return this.apiClient.getListEmojisByUserId(session.token).then((response) => {
7836
+ return this.apiClient.getNotificationCategory(session.token, categoryId).then((response) => {
7837
+ return Promise.resolve(response);
7838
+ });
7839
+ });
7840
+ }
7841
+ getNotificationChannel(session, channelId) {
7842
+ return __async(this, null, function* () {
7843
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7844
+ yield this.sessionRefresh(session);
7845
+ }
7846
+ return this.apiClient.getNotificationChannel(session.token, channelId).then((response) => {
7847
+ return Promise.resolve(response);
7848
+ });
7849
+ });
7850
+ }
7851
+ getNotificationClan(session, clanId) {
7852
+ return __async(this, null, function* () {
7853
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7854
+ yield this.sessionRefresh(session);
7855
+ }
7856
+ return this.apiClient.getNotificationClan(session.token, clanId).then((response) => {
7857
+ return Promise.resolve(response);
7858
+ });
7859
+ });
7860
+ }
7861
+ getNotificationReactMessage(session, channelId) {
7862
+ return __async(this, null, function* () {
7863
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7864
+ yield this.sessionRefresh(session);
7865
+ }
7866
+ return this.apiClient.getNotificationReactMessage(session.token, channelId).then((response) => {
7867
+ return Promise.resolve(response);
7868
+ });
7869
+ });
7870
+ }
7871
+ hashtagDMList(session, userId, limit) {
7872
+ return __async(this, null, function* () {
7873
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7874
+ yield this.sessionRefresh(session);
7875
+ }
7876
+ return this.apiClient.hashtagDMList(session.token, userId, limit).then((response) => {
7877
+ return Promise.resolve(response);
7878
+ });
7879
+ });
7880
+ }
7881
+ listChannelByUserId(session) {
7882
+ return __async(this, null, function* () {
7883
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7884
+ yield this.sessionRefresh(session);
7885
+ }
7886
+ return this.apiClient.listChannelByUserId(session.token).then((response) => {
7655
7887
  return Promise.resolve(response);
7656
7888
  });
7657
7889
  });
@@ -7666,6 +7898,26 @@ var Client = class {
7666
7898
  });
7667
7899
  });
7668
7900
  }
7901
+ getListEmojisByUserId(session) {
7902
+ return __async(this, null, function* () {
7903
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7904
+ yield this.sessionRefresh(session);
7905
+ }
7906
+ return this.apiClient.getListEmojisByUserId(session.token).then((response) => {
7907
+ return Promise.resolve(response);
7908
+ });
7909
+ });
7910
+ }
7911
+ getListStickersByUserId(session) {
7912
+ return __async(this, null, function* () {
7913
+ if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
7914
+ yield this.sessionRefresh(session);
7915
+ }
7916
+ return this.apiClient.getListStickersByUserId(session.token).then((response) => {
7917
+ return Promise.resolve(response);
7918
+ });
7919
+ });
7920
+ }
7669
7921
  };
7670
7922
  export {
7671
7923
  ChannelStreamMode,
package/dist/socket.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiPermissionList, ApiRole, ApiRoleList, ApiRpc, ApiUser } from "./api.gen";
16
+ import { ApiChannelDescList, ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiHashtagDmList, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotificationChannelCategorySettingList, ApiPermissionList, ApiRole, ApiRoleList, ApiRpc, ApiUser } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { ChannelMessage, Notification } from "./client";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -497,7 +497,7 @@ export interface ClanEmoji {
497
497
  }
498
498
  /** */
499
499
  export interface ChannelDescListEvent {
500
- channeldesc?: Array<ChannelDescription>;
500
+ channeldesc?: ApiChannelDescList;
501
501
  }
502
502
  /** */
503
503
  export interface AllUserClans {
@@ -518,7 +518,7 @@ export interface ChannelDescription {
518
518
  export interface HashtagDmListEvent {
519
519
  user_id?: Array<string>;
520
520
  limit?: number;
521
- hashtag_dm?: Array<HashtagDm>;
521
+ hashtag_dm?: ApiHashtagDmList;
522
522
  }
523
523
  export interface HashtagDm {
524
524
  channel_id?: string;
@@ -570,7 +570,7 @@ export interface NotificationChannelCategorySetting {
570
570
  }
571
571
  export interface NotificationChannelCategorySettingEvent {
572
572
  clan_id?: string;
573
- notification_channel_category_settings_list?: NotificationChannelCategorySetting[];
573
+ notification_channel_category_settings_list?: ApiNotificationChannelCategorySettingList;
574
574
  }
575
575
  export interface UserEmojiUsage {
576
576
  user_id: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.9.13",
4
+ "version": "2.9.14",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
package/socket.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiPermissionList, ApiRole, ApiRoleList, ApiRpc, ApiUser} from "./api.gen";
17
+ import { ApiChannelDescList, ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiHashtagDmList, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiNotificationChannelCategorySettingList, ApiPermissionList, ApiRole, ApiRoleList, ApiRpc, ApiUser} from "./api.gen";
18
18
  import {Session} from "./session";
19
19
  import {ChannelMessage, Notification} from "./client";
20
20
  import {WebSocketAdapter, WebSocketAdapterText} from "./web_socket_adapter"
@@ -724,7 +724,7 @@ export interface ClanEmoji {
724
724
  /** */
725
725
  export interface ChannelDescListEvent {
726
726
  //
727
- channeldesc?: Array<ChannelDescription>;
727
+ channeldesc?: ApiChannelDescList;
728
728
  }
729
729
 
730
730
  /** */
@@ -762,7 +762,7 @@ export interface HashtagDmListEvent {
762
762
  // Max number of records to return. Between 1 and 100.
763
763
  limit?: number;
764
764
  // A list of channel.
765
- hashtag_dm?: Array<HashtagDm>;
765
+ hashtag_dm?: ApiHashtagDmList;
766
766
  }
767
767
 
768
768
  // hashtagDM
@@ -855,7 +855,7 @@ export interface NotificationChannelCategorySetting {
855
855
 
856
856
  export interface NotificationChannelCategorySettingEvent {
857
857
  clan_id? : string;
858
- notification_channel_category_settings_list?: NotificationChannelCategorySetting[]
858
+ notification_channel_category_settings_list?: ApiNotificationChannelCategorySettingList
859
859
  }
860
860
 
861
861
  export interface UserEmojiUsage {
@@ -1120,7 +1120,7 @@ export interface Socket {
1120
1120
  listUserClansByUserId(): Promise<AllUserClans>;
1121
1121
 
1122
1122
  listUsersAddChannelByChannelId(channelId: string, limit: number): Promise<AllUsersAddChannelEvent>;
1123
-
1123
+
1124
1124
  hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
1125
1125
 
1126
1126
  getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
@@ -1132,7 +1132,7 @@ export interface Socket {
1132
1132
  getNotificationReactMessage(channel_id_req: string): Promise<NotifiReactMessageEvent>;
1133
1133
 
1134
1134
  getPermissionByRoleIdChannelId(role_id: string, channel_id: string, user_id: string): Promise<PermissionRoleChannelListEvent>;
1135
-
1135
+
1136
1136
  getNotificationChannelCategorySetting(clan_id : string): Promise<NotificationChannelCategorySettingEvent>;
1137
1137
 
1138
1138
  oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;