mezon-js 2.9.12 → 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
@@ -42,6 +42,10 @@ export interface MezonChangeChannelCategoryBody {
42
42
  channel_id?: string;
43
43
  }
44
44
 
45
+ /** */
46
+ export interface MezonDeleteWebhookByIdBody {
47
+ }
48
+
45
49
  /** Update app information. */
46
50
  export interface MezonUpdateAppBody {
47
51
  //about the app.
@@ -274,6 +278,18 @@ export interface ApiAccount {
274
278
  wallet?: string;
275
279
  }
276
280
 
281
+ /** Send a app token to the server. Used with authenticate/link/unlink. */
282
+ export interface ApiAccountApp {
283
+ //
284
+ appid?: string;
285
+ //
286
+ appname?: string;
287
+ //The account token when create apps to access their profile API.
288
+ token?: string;
289
+ //Extra information that will be bundled in the session token.
290
+ vars?: Record<string, string>;
291
+ }
292
+
277
293
  /** Send a Apple Sign In token to the server. Used with authenticate/link/unlink. */
278
294
  export interface ApiAccountApple {
279
295
  //The ID token received from Apple to validate.
@@ -368,6 +384,16 @@ export interface ApiAddRoleChannelDescRequest {
368
384
  role_ids?: Array<string>;
369
385
  }
370
386
 
387
+ /** */
388
+ export interface ApiAllUsersAddChannelResponse {
389
+ //
390
+ channel_id?: string;
391
+ //
392
+ limit?: number;
393
+ //
394
+ user_ids?: Array<string>;
395
+ }
396
+
371
397
  /** App information. */
372
398
  export interface ApiApp {
373
399
  //
@@ -400,6 +426,12 @@ export interface ApiAppList {
400
426
  total_count?: number;
401
427
  }
402
428
 
429
+ /** Authenticate against the server with a device ID. */
430
+ export interface ApiAuthenticateRequest {
431
+ //The App account details.
432
+ account?: ApiAccountApp;
433
+ }
434
+
403
435
  /** */
404
436
  export interface ApiCategoryDesc {
405
437
  //
@@ -514,6 +546,8 @@ export interface ApiChannelDescription {
514
546
  //
515
547
  clan_id?: string;
516
548
  //
549
+ clan_name?: string;
550
+ //
517
551
  count_mess_unread?: number;
518
552
  //
519
553
  create_time_seconds?: number;
@@ -691,6 +725,26 @@ export interface ApiClanDescProfile {
691
725
  profile_theme?: string;
692
726
  }
693
727
 
728
+ /** */
729
+ export interface ApiClanEmoji {
730
+ //
731
+ category?: string;
732
+ //
733
+ clan_id?: string;
734
+ //
735
+ clan_name?: string;
736
+ //
737
+ creator_id?: string;
738
+ //
739
+ id?: string;
740
+ //
741
+ logo?: string;
742
+ //
743
+ shortname?: string;
744
+ //
745
+ src?: string;
746
+ }
747
+
694
748
  /** */
695
749
  export interface ApiClanEmojiCreateRequest {
696
750
  //
@@ -717,6 +771,28 @@ export interface ApiClanProfile {
717
771
  user_id?: string;
718
772
  }
719
773
 
774
+ /** */
775
+ export interface ApiClanSticker {
776
+ //
777
+ category?: string;
778
+ //
779
+ clan_id?: string;
780
+ //
781
+ clan_name?: string;
782
+ //
783
+ create_time?: string;
784
+ //
785
+ creator_id?: string;
786
+ //
787
+ id?: string;
788
+ //
789
+ logo?: string;
790
+ //
791
+ shortname?: string;
792
+ //
793
+ source?: string;
794
+ }
795
+
720
796
  /** */
721
797
  export interface ApiClanStickerAddRequest {
722
798
  //
@@ -925,6 +1001,11 @@ export interface ApiListStreamingChannelsResponse {
925
1001
  streaming_channels?: Array<ApiStreamingChannelResponse>;
926
1002
  }
927
1003
 
1004
+ export interface ApiEmojiListedResponse {
1005
+ //
1006
+ emoji_list?: Array<ApiClanEmoji>;
1007
+ }
1008
+
928
1009
  /** */
929
1010
  export interface ApiEventList {
930
1011
  //A list of event.
@@ -1005,6 +1086,32 @@ export interface ApiGiveCoffeeEvent {
1005
1086
  token_count?: number;
1006
1087
  }
1007
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
+
1008
1115
  /** Add link invite users to. */
1009
1116
  export interface ApiInviteUserRes {
1010
1117
  //id channel to add link to.
@@ -1164,6 +1271,17 @@ export interface ApiMessageReaction {
1164
1271
  is_parent_public?: boolean;
1165
1272
  }
1166
1273
 
1274
+ export interface ApiListChannelAppsResponse {
1275
+ //
1276
+ channel_apps?: Array<ApiChannelAppResponse>;
1277
+ }
1278
+
1279
+ /** */
1280
+ export interface ApiListStreamingChannelsResponse {
1281
+ //
1282
+ streaming_channels?: Array<ApiStreamingChannelResponse>;
1283
+ }
1284
+
1167
1285
  /** */
1168
1286
  export interface ApiMessageRef {
1169
1287
  //
@@ -1226,6 +1344,26 @@ export interface ApiNotificationChannel {
1226
1344
  channel_id?: string;
1227
1345
  }
1228
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
+
1229
1367
  /** A collection of zero or more notifications. */
1230
1368
  export interface ApiNotificationList {
1231
1369
  //Use this cursor to paginate notifications. Cache this to catch up to new notifications.
@@ -1254,6 +1392,43 @@ export interface ApiNotificationUserChannel {
1254
1392
  time_mute?: string;
1255
1393
  }
1256
1394
 
1395
+ /** */
1396
+ export interface ApiOssrsHttpCallbackRequest {
1397
+ //
1398
+ action?: string;
1399
+ //
1400
+ app?: string;
1401
+ //
1402
+ client_id?: string;
1403
+ //
1404
+ ip?: string;
1405
+ //
1406
+ page_url?: string;
1407
+ //
1408
+ param?: string;
1409
+ //
1410
+ server_id?: string;
1411
+ //
1412
+ service_id?: string;
1413
+ //
1414
+ stream?: string;
1415
+ //
1416
+ stream_id?: string;
1417
+ //
1418
+ stream_url?: string;
1419
+ //
1420
+ tc_url?: string;
1421
+ //
1422
+ vhost?: string;
1423
+ }
1424
+
1425
+ /** */
1426
+ export interface ApiOssrsHttpCallbackResponse {
1427
+ //
1428
+ code?: number;
1429
+ //
1430
+ msg?: string;
1431
+ }
1257
1432
  /** */
1258
1433
  export interface ApiPermission {
1259
1434
  //
@@ -1544,6 +1719,12 @@ export interface ApiSortParam {
1544
1719
  order?: string;
1545
1720
  }
1546
1721
 
1722
+ /** */
1723
+ export interface ApiStickerListedResponse {
1724
+ //
1725
+ stickers?: Array<ApiClanSticker>;
1726
+ }
1727
+
1547
1728
  /** */
1548
1729
  export interface ApiStreamingChannelResponse {
1549
1730
  //
@@ -1809,6 +1990,18 @@ export interface ApiWebhookListResponse {
1809
1990
  webhooks?: Array<ApiWebhook>;
1810
1991
  }
1811
1992
 
1993
+ /** Represents an event to be passed through the server to registered event handlers. */
1994
+ export interface MezonapiEvent {
1995
+ //True if the event came directly from a client call, false otherwise.
1996
+ external?: boolean;
1997
+ //An event name, type, category, or identifier.
1998
+ name?: string;
1999
+ //Arbitrary event property values.
2000
+ properties?: Record<string, string>;
2001
+ //The time when the event was triggered.
2002
+ timestamp?: string;
2003
+ }
2004
+
1812
2005
  /** */
1813
2006
  export interface ProtobufAny {
1814
2007
  //
@@ -3792,6 +3985,41 @@ export class MezonApi {
3792
3985
  ]);
3793
3986
  }
3794
3987
 
3988
+ /** list user add channel by channel ids */
3989
+ listUsersAddChannelByChannelId(bearerToken: string,
3990
+ channelId?:string,
3991
+ limit?:number,
3992
+ options: any = {}): Promise<ApiAllUsersAddChannelResponse> {
3993
+
3994
+ const urlPath = "/v2/channeldesc/users/add";
3995
+ const queryParams = new Map<string, any>();
3996
+ queryParams.set("channel_id", channelId);
3997
+ queryParams.set("limit", limit);
3998
+
3999
+ let bodyJson : string = "";
4000
+
4001
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4002
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4003
+ if (bearerToken) {
4004
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4005
+ }
4006
+
4007
+ return Promise.race([
4008
+ fetch(fullUrl, fetchOptions).then((response) => {
4009
+ if (response.status == 204) {
4010
+ return response;
4011
+ } else if (response.status >= 200 && response.status < 300) {
4012
+ return response.json();
4013
+ } else {
4014
+ throw response;
4015
+ }
4016
+ }),
4017
+ new Promise((_, reject) =>
4018
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
4019
+ ),
4020
+ ]);
4021
+ }
4022
+
3795
4023
  /** Delete a channel by ID. */
3796
4024
  deleteChannelDesc(bearerToken: string,
3797
4025
  channelId:string,
@@ -4587,6 +4815,37 @@ export class MezonApi {
4587
4815
  ]);
4588
4816
  }
4589
4817
 
4818
+ /** get list emoji by user id */
4819
+ getListEmojisByUserId(bearerToken: string,
4820
+ options: any = {}): Promise<ApiEmojiListedResponse> {
4821
+
4822
+ const urlPath = "/v2/emojis";
4823
+ const queryParams = new Map<string, any>();
4824
+
4825
+ let bodyJson : string = "";
4826
+
4827
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4828
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4829
+ if (bearerToken) {
4830
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4831
+ }
4832
+
4833
+ return Promise.race([
4834
+ fetch(fullUrl, fetchOptions).then((response) => {
4835
+ if (response.status == 204) {
4836
+ return response;
4837
+ } else if (response.status >= 200 && response.status < 300) {
4838
+ return response.json();
4839
+ } else {
4840
+ throw response;
4841
+ }
4842
+ }),
4843
+ new Promise((_, reject) =>
4844
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
4845
+ ),
4846
+ ]);
4847
+ }
4848
+
4590
4849
  /** Search message from elasticsearch service. */
4591
4850
  searchMessage(bearerToken: string,
4592
4851
  body:ApiSearchMessageRequest,
@@ -5061,6 +5320,39 @@ export class MezonApi {
5061
5320
  ]);
5062
5321
  }
5063
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
+
5064
5356
  /** */
5065
5357
  getUserProfileOnClan(bearerToken: string,
5066
5358
  clanId:string,
@@ -5097,6 +5389,138 @@ export class MezonApi {
5097
5389
  ]);
5098
5390
  }
5099
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
+
5100
5524
  /** Give a coffee */
5101
5525
  giveMeACoffee(bearerToken: string,
5102
5526
  body:ApiGiveCoffeeEvent,
@@ -5133,6 +5557,41 @@ export class MezonApi {
5133
5557
  ]);
5134
5558
  }
5135
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
+
5136
5595
  /** Add users to a channel. */
5137
5596
  createLinkInviteUser(bearerToken: string,
5138
5597
  body:ApiLinkInviteUserRequest,
@@ -5241,6 +5700,37 @@ export class MezonApi {
5241
5700
  ]);
5242
5701
  }
5243
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
+
5244
5734
  /** set mute notification user channel. */
5245
5735
  setMuteNotificationCategory(bearerToken: string,
5246
5736
  body:ApiSetMuteNotificationRequest,
@@ -5626,6 +6116,42 @@ export class MezonApi {
5626
6116
  ]);
5627
6117
  }
5628
6118
 
6119
+ /** Ossrs http callback. */
6120
+ streamingServerCallback(bearerToken: string,
6121
+ body:ApiOssrsHttpCallbackRequest,
6122
+ options: any = {}): Promise<ApiOssrsHttpCallbackResponse> {
6123
+
6124
+ if (body === null || body === undefined) {
6125
+ throw new Error("'body' is a required parameter but is null or undefined.");
6126
+ }
6127
+ const urlPath = "/v2/ossrs/callback";
6128
+ const queryParams = new Map<string, any>();
6129
+
6130
+ let bodyJson : string = "";
6131
+ bodyJson = JSON.stringify(body || {});
6132
+
6133
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6134
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
6135
+ if (bearerToken) {
6136
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6137
+ }
6138
+
6139
+ return Promise.race([
6140
+ fetch(fullUrl, fetchOptions).then((response) => {
6141
+ if (response.status == 204) {
6142
+ return response;
6143
+ } else if (response.status >= 200 && response.status < 300) {
6144
+ return response.json();
6145
+ } else {
6146
+ throw response;
6147
+ }
6148
+ }),
6149
+ new Promise((_, reject) =>
6150
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
6151
+ ),
6152
+ ]);
6153
+ }
6154
+
5629
6155
  /** set permission role channel. */
5630
6156
  setRoleChannelPermission(bearerToken: string,
5631
6157
  body:ApiUpdateRoleChannelRequest,
@@ -6422,6 +6948,37 @@ export class MezonApi {
6422
6948
  ]);
6423
6949
  }
6424
6950
 
6951
+ /** get list sticker by user id */
6952
+ getListStickersByUserId(bearerToken: string,
6953
+ options: any = {}): Promise<ApiStickerListedResponse> {
6954
+
6955
+ const urlPath = "/v2/stickers";
6956
+ const queryParams = new Map<string, any>();
6957
+
6958
+ let bodyJson : string = "";
6959
+
6960
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6961
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
6962
+ if (bearerToken) {
6963
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
6964
+ }
6965
+
6966
+ return Promise.race([
6967
+ fetch(fullUrl, fetchOptions).then((response) => {
6968
+ if (response.status == 204) {
6969
+ return response;
6970
+ } else if (response.status >= 200 && response.status < 300) {
6971
+ return response.json();
6972
+ } else {
6973
+ throw response;
6974
+ }
6975
+ }),
6976
+ new Promise((_, reject) =>
6977
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
6978
+ ),
6979
+ ]);
6980
+ }
6981
+
6425
6982
  /** List streaming channels. */
6426
6983
  listStreamingChannels(bearerToken: string,
6427
6984
  clanId?:string,