mezon-js 2.9.96 → 2.9.98

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
@@ -58,7 +58,6 @@ export interface MezonChangeChannelCategoryBody {
58
58
  channel_id?: string;
59
59
  }
60
60
 
61
-
62
61
  /** */
63
62
  export interface MezonChangeChannelCategoryBody {
64
63
  //
@@ -73,10 +72,10 @@ export interface MezonSetChanEncryptionMethodBody {
73
72
 
74
73
  /** */
75
74
  export interface MezonDeleteWebhookByIdBody {
76
- //
77
- channel_id?: string;
78
- //
79
- clan_id?: string;
75
+ //
76
+ channel_id?: string;
77
+ //
78
+ clan_id?: string;
80
79
  }
81
80
 
82
81
  /** Update app information. */
@@ -317,6 +316,10 @@ export interface ApiAccount {
317
316
  disable_time?: string;
318
317
  //The email address of the user.
319
318
  email?: string;
319
+ //
320
+ logo?: string;
321
+ //
322
+ splash_screen?: string;
320
323
  //The user object.
321
324
  user?: ApiUser;
322
325
  //The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified.
@@ -1158,14 +1161,6 @@ export interface ApiCreateRoleRequest {
1158
1161
  title?: string;
1159
1162
  }
1160
1163
 
1161
- /** */
1162
- export interface ApiCustomDisplay {
1163
- //
1164
- logo?: string;
1165
- //
1166
- splash_screen?: string;
1167
- }
1168
-
1169
1164
  /** Delete a channel the user has access to. */
1170
1165
  export interface ApiDeleteChannelDescRequest {
1171
1166
  //The id of a channel.
@@ -1474,20 +1469,20 @@ export interface ApiListUserActivity {
1474
1469
  }
1475
1470
  /** */
1476
1471
  export interface ApiLoginIDResponse {
1477
- //
1478
- address?: string;
1479
- //
1480
- create_time_second?: string;
1481
- //
1482
- login_id?: string;
1483
- //
1484
- platform?: string;
1485
- //
1486
- status?: number;
1487
- //
1488
- user_id?: string;
1489
- //
1490
- user_name?: string;
1472
+ //
1473
+ address?: string;
1474
+ //
1475
+ create_time_second?: string;
1476
+ //
1477
+ login_id?: string;
1478
+ //
1479
+ platform?: string;
1480
+ //
1481
+ status?: number;
1482
+ //
1483
+ user_id?: string;
1484
+ //
1485
+ user_name?: string;
1491
1486
  }
1492
1487
 
1493
1488
  /** */
@@ -1532,10 +1527,10 @@ export interface ApiMessageMention {
1532
1527
 
1533
1528
  /** */
1534
1529
  export interface ApiLoginRequest {
1535
- //
1536
- address?: string;
1537
- //
1538
- platform?: string;
1530
+ //
1531
+ address?: string;
1532
+ //
1533
+ platform?: string;
1539
1534
  }
1540
1535
 
1541
1536
  /** */
@@ -1881,7 +1876,6 @@ export interface ApiRegisterStreamingChannelResponse {
1881
1876
  streaming_url?: string;
1882
1877
  }
1883
1878
 
1884
-
1885
1879
  /** Storage objects to get. */
1886
1880
  export interface ApiReadStorageObjectId {
1887
1881
  //The collection which stores the object.
@@ -2224,6 +2218,10 @@ export interface ApiUpdateAccountRequest {
2224
2218
  lang_tag?: string;
2225
2219
  //The location set by the user.
2226
2220
  location?: string;
2221
+ //
2222
+ logo?: string;
2223
+ //
2224
+ splash_screen?: string;
2227
2225
  //The timezone set by the user.
2228
2226
  timezone?: string;
2229
2227
  //The username of the user's account.
@@ -2865,8 +2863,9 @@ export class MezonApi {
2865
2863
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2866
2864
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
2867
2865
  if (basicAuthUsername) {
2868
- fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
2869
- }
2866
+ fetchOptions.headers["Authorization"] =
2867
+ "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
2868
+ }
2870
2869
 
2871
2870
  return Promise.race([
2872
2871
  fetch(fullUrl, fetchOptions).then((response) => {
@@ -2882,28 +2881,32 @@ export class MezonApi {
2882
2881
  setTimeout(reject, this.timeoutMs, "Request timed out.")
2883
2882
  ),
2884
2883
  ]);
2885
- }
2884
+ }
2886
2885
 
2887
2886
  /** */
2888
- checkLoginRequest(basicAuthUsername: string,
2887
+ checkLoginRequest(
2888
+ basicAuthUsername: string,
2889
2889
  basicAuthPassword: string,
2890
- body:ApiConfirmLoginRequest,
2891
- options: any = {}): Promise<ApiSession> {
2892
-
2890
+ body: ApiConfirmLoginRequest,
2891
+ options: any = {}
2892
+ ): Promise<ApiSession> {
2893
2893
  if (body === null || body === undefined) {
2894
- throw new Error("'body' is a required parameter but is null or undefined.");
2894
+ throw new Error(
2895
+ "'body' is a required parameter but is null or undefined."
2896
+ );
2895
2897
  }
2896
2898
  const urlPath = "/v2/account/authenticate/checklogin";
2897
2899
  const queryParams = new Map<string, any>();
2898
2900
 
2899
- let bodyJson : string = "";
2901
+ let bodyJson: string = "";
2900
2902
  bodyJson = JSON.stringify(body || {});
2901
2903
 
2902
2904
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2903
2905
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
2904
- if (basicAuthUsername) {
2905
- fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
2906
- }
2906
+ if (basicAuthUsername) {
2907
+ fetchOptions.headers["Authorization"] =
2908
+ "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
2909
+ }
2907
2910
 
2908
2911
  return Promise.race([
2909
2912
  fetch(fullUrl, fetchOptions).then((response) => {
@@ -2919,26 +2922,29 @@ export class MezonApi {
2919
2922
  setTimeout(reject, this.timeoutMs, "Request timed out.")
2920
2923
  ),
2921
2924
  ]);
2922
- }
2925
+ }
2923
2926
 
2924
2927
  /** */
2925
- confirmLogin(bearerToken: string,
2926
- body:ApiConfirmLoginRequest,
2927
- options: any = {}): Promise<any> {
2928
-
2928
+ confirmLogin(
2929
+ bearerToken: string,
2930
+ body: ApiConfirmLoginRequest,
2931
+ options: any = {}
2932
+ ): Promise<any> {
2929
2933
  if (body === null || body === undefined) {
2930
- throw new Error("'body' is a required parameter but is null or undefined.");
2934
+ throw new Error(
2935
+ "'body' is a required parameter but is null or undefined."
2936
+ );
2931
2937
  }
2932
2938
  const urlPath = "/v2/account/authenticate/confirmlogin";
2933
2939
  const queryParams = new Map<string, any>();
2934
2940
 
2935
- let bodyJson : string = "";
2941
+ let bodyJson: string = "";
2936
2942
  bodyJson = JSON.stringify(body || {});
2937
2943
 
2938
2944
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2939
2945
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
2940
2946
  if (bearerToken) {
2941
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
2947
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
2942
2948
  }
2943
2949
 
2944
2950
  return Promise.race([
@@ -2955,27 +2961,31 @@ export class MezonApi {
2955
2961
  setTimeout(reject, this.timeoutMs, "Request timed out.")
2956
2962
  ),
2957
2963
  ]);
2958
- }
2964
+ }
2959
2965
 
2960
2966
  /** */
2961
- createQRLogin(basicAuthUsername: string,
2967
+ createQRLogin(
2968
+ basicAuthUsername: string,
2962
2969
  basicAuthPassword: string,
2963
- body:ApiLoginRequest,
2964
- options: any = {}): Promise<ApiLoginIDResponse> {
2965
-
2970
+ body: ApiLoginRequest,
2971
+ options: any = {}
2972
+ ): Promise<ApiLoginIDResponse> {
2966
2973
  if (body === null || body === undefined) {
2967
- throw new Error("'body' is a required parameter but is null or undefined.");
2974
+ throw new Error(
2975
+ "'body' is a required parameter but is null or undefined."
2976
+ );
2968
2977
  }
2969
2978
  const urlPath = "/v2/account/authenticate/createqrlogin";
2970
2979
  const queryParams = new Map<string, any>();
2971
2980
 
2972
- let bodyJson : string = "";
2981
+ let bodyJson: string = "";
2973
2982
  bodyJson = JSON.stringify(body || {});
2974
2983
 
2975
2984
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2976
2985
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
2977
- if (basicAuthUsername) {
2978
- fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
2986
+ if (basicAuthUsername) {
2987
+ fetchOptions.headers["Authorization"] =
2988
+ "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
2979
2989
  }
2980
2990
 
2981
2991
  return Promise.race([
@@ -3246,7 +3256,7 @@ export class MezonApi {
3246
3256
  if (basicAuthUsername) {
3247
3257
  fetchOptions.headers["Authorization"] =
3248
3258
  "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
3249
- }
3259
+ }
3250
3260
 
3251
3261
  return Promise.race([
3252
3262
  fetch(fullUrl, fetchOptions).then((response) => {
@@ -3262,7 +3272,7 @@ export class MezonApi {
3262
3272
  setTimeout(reject, this.timeoutMs, "Request timed out.")
3263
3273
  ),
3264
3274
  ]);
3265
- }
3275
+ }
3266
3276
 
3267
3277
  /** Authenticate a user with Google against the server. */
3268
3278
  authenticateGoogle(
@@ -4115,13 +4125,13 @@ export class MezonApi {
4115
4125
  const urlPath = "/v2/account/unlink/steam";
4116
4126
  const queryParams = new Map<string, any>();
4117
4127
 
4118
- let bodyJson : string = "";
4128
+ let bodyJson: string = "";
4119
4129
  bodyJson = JSON.stringify(body || {});
4120
4130
 
4121
4131
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4122
4132
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
4123
4133
  if (bearerToken) {
4124
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4134
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4125
4135
  }
4126
4136
 
4127
4137
  return Promise.race([
@@ -4138,21 +4148,22 @@ export class MezonApi {
4138
4148
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4139
4149
  ),
4140
4150
  ]);
4141
- }
4151
+ }
4142
4152
 
4143
4153
  /** List activity */
4144
- listActivity(bearerToken: string,
4145
- options: any = {}): Promise<ApiListUserActivity> {
4146
-
4154
+ listActivity(
4155
+ bearerToken: string,
4156
+ options: any = {}
4157
+ ): Promise<ApiListUserActivity> {
4147
4158
  const urlPath = "/v2/activity";
4148
4159
  const queryParams = new Map<string, any>();
4149
4160
 
4150
- let bodyJson : string = "";
4161
+ let bodyJson: string = "";
4151
4162
 
4152
4163
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4153
4164
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4154
4165
  if (bearerToken) {
4155
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4166
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4156
4167
  }
4157
4168
 
4158
4169
  return Promise.race([
@@ -4169,20 +4180,23 @@ export class MezonApi {
4169
4180
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4170
4181
  ),
4171
4182
  ]);
4172
- }
4183
+ }
4173
4184
 
4174
4185
  /** Create user activity */
4175
- createActiviy(bearerToken: string,
4176
- body:ApiCreateActivityRequest,
4177
- options: any = {}): Promise<ApiUserActivity> {
4178
-
4186
+ createActiviy(
4187
+ bearerToken: string,
4188
+ body: ApiCreateActivityRequest,
4189
+ options: any = {}
4190
+ ): Promise<ApiUserActivity> {
4179
4191
  if (body === null || body === undefined) {
4180
- throw new Error("'body' is a required parameter but is null or undefined.");
4192
+ throw new Error(
4193
+ "'body' is a required parameter but is null or undefined."
4194
+ );
4181
4195
  }
4182
4196
  const urlPath = "/v2/activity";
4183
4197
  const queryParams = new Map<string, any>();
4184
4198
 
4185
- let bodyJson : string = "";
4199
+ let bodyJson: string = "";
4186
4200
  bodyJson = JSON.stringify(body || {});
4187
4201
 
4188
4202
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
@@ -4520,53 +4534,55 @@ export class MezonApi {
4520
4534
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4521
4535
  ),
4522
4536
  ]);
4523
- }
4537
+ }
4524
4538
 
4525
4539
  /** */
4526
- listAuditLog(bearerToken: string,
4527
- actionLog?:string,
4528
- userId?:string,
4529
- clanId?:string,
4530
- page?:number,
4531
- pageSize?:number,
4532
- options: any = {}): Promise<MezonapiListAuditLog> {
4533
-
4534
- const urlPath = "/v2/audit_log";
4535
- const queryParams = new Map<string, any>();
4536
- queryParams.set("action_log", actionLog);
4537
- queryParams.set("user_id", userId);
4538
- queryParams.set("clan_id", clanId);
4539
- queryParams.set("page", page);
4540
- queryParams.set("page_size", pageSize);
4541
-
4542
- let bodyJson : string = "";
4543
-
4544
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4545
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4546
- if (bearerToken) {
4547
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4548
- }
4549
-
4550
- return Promise.race([
4551
- fetch(fullUrl, fetchOptions).then((response) => {
4552
- if (response.status == 204) {
4553
- return response;
4554
- } else if (response.status >= 200 && response.status < 300) {
4555
- return response.json();
4556
- } else {
4557
- throw response;
4558
- }
4559
- }),
4560
- new Promise((_, reject) =>
4561
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4562
- ),
4563
- ]);
4564
- }
4540
+ listAuditLog(
4541
+ bearerToken: string,
4542
+ actionLog?: string,
4543
+ userId?: string,
4544
+ clanId?: string,
4545
+ page?: number,
4546
+ pageSize?: number,
4547
+ options: any = {}
4548
+ ): Promise<MezonapiListAuditLog> {
4549
+ const urlPath = "/v2/audit_log";
4550
+ const queryParams = new Map<string, any>();
4551
+ queryParams.set("action_log", actionLog);
4552
+ queryParams.set("user_id", userId);
4553
+ queryParams.set("clan_id", clanId);
4554
+ queryParams.set("page", page);
4555
+ queryParams.set("page_size", pageSize);
4556
+
4557
+ let bodyJson: string = "";
4558
+
4559
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4560
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4561
+ if (bearerToken) {
4562
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4563
+ }
4564
+
4565
+ return Promise.race([
4566
+ fetch(fullUrl, fetchOptions).then((response) => {
4567
+ if (response.status == 204) {
4568
+ return response;
4569
+ } else if (response.status >= 200 && response.status < 300) {
4570
+ return response.json();
4571
+ } else {
4572
+ throw response;
4573
+ }
4574
+ }),
4575
+ new Promise((_, reject) =>
4576
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
4577
+ ),
4578
+ ]);
4579
+ }
4565
4580
  /** */
4566
- updateCategoryOrder(bearerToken: string,
4567
- body:ApiUpdateCategoryOrderRequest,
4568
- options: any = {}): Promise<any> {
4569
-
4581
+ updateCategoryOrder(
4582
+ bearerToken: string,
4583
+ body: ApiUpdateCategoryOrderRequest,
4584
+ options: any = {}
4585
+ ): Promise<any> {
4570
4586
  if (body === null || body === undefined) {
4571
4587
  throw new Error(
4572
4588
  "'body' is a required parameter but is null or undefined."
@@ -4659,12 +4675,12 @@ export class MezonApi {
4659
4675
  const queryParams = new Map<string, any>();
4660
4676
  queryParams.set("clan_id", clanId);
4661
4677
 
4662
- let bodyJson : string = "";
4678
+ let bodyJson: string = "";
4663
4679
 
4664
4680
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4665
4681
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4666
4682
  if (bearerToken) {
4667
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4683
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4668
4684
  }
4669
4685
 
4670
4686
  return Promise.race([
@@ -4681,32 +4697,37 @@ export class MezonApi {
4681
4697
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4682
4698
  ),
4683
4699
  ]);
4684
- }
4700
+ }
4685
4701
 
4686
4702
  /** */
4687
- getChannelCanvasList(bearerToken: string,
4688
- channelId:string,
4689
- clanId?:string,
4690
- limit?:number,
4691
- page?:number,
4692
- options: any = {}): Promise<ApiChannelCanvasListResponse> {
4693
-
4703
+ getChannelCanvasList(
4704
+ bearerToken: string,
4705
+ channelId: string,
4706
+ clanId?: string,
4707
+ limit?: number,
4708
+ page?: number,
4709
+ options: any = {}
4710
+ ): Promise<ApiChannelCanvasListResponse> {
4694
4711
  if (channelId === null || channelId === undefined) {
4695
- throw new Error("'channelId' is a required parameter but is null or undefined.");
4712
+ throw new Error(
4713
+ "'channelId' is a required parameter but is null or undefined."
4714
+ );
4696
4715
  }
4697
- const urlPath = "/v2/channel-canvases/{channelId}"
4698
- .replace("{channelId}", encodeURIComponent(String(channelId)));
4716
+ const urlPath = "/v2/channel-canvases/{channelId}".replace(
4717
+ "{channelId}",
4718
+ encodeURIComponent(String(channelId))
4719
+ );
4699
4720
  const queryParams = new Map<string, any>();
4700
4721
  queryParams.set("clan_id", clanId);
4701
4722
  queryParams.set("limit", limit);
4702
4723
  queryParams.set("page", page);
4703
4724
 
4704
- let bodyJson : string = "";
4725
+ let bodyJson: string = "";
4705
4726
 
4706
4727
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4707
4728
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4708
4729
  if (bearerToken) {
4709
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4730
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4710
4731
  }
4711
4732
 
4712
4733
  return Promise.race([
@@ -4723,26 +4744,29 @@ export class MezonApi {
4723
4744
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4724
4745
  ),
4725
4746
  ]);
4726
- }
4747
+ }
4727
4748
 
4728
4749
  /** */
4729
- addChannelFavorite(bearerToken: string,
4730
- body:ApiAddFavoriteChannelRequest,
4731
- options: any = {}): Promise<any> {
4732
-
4750
+ addChannelFavorite(
4751
+ bearerToken: string,
4752
+ body: ApiAddFavoriteChannelRequest,
4753
+ options: any = {}
4754
+ ): Promise<any> {
4733
4755
  if (body === null || body === undefined) {
4734
- throw new Error("'body' is a required parameter but is null or undefined.");
4756
+ throw new Error(
4757
+ "'body' is a required parameter but is null or undefined."
4758
+ );
4735
4759
  }
4736
4760
  const urlPath = "/v2/channel/favorite";
4737
4761
  const queryParams = new Map<string, any>();
4738
4762
 
4739
- let bodyJson : string = "";
4763
+ let bodyJson: string = "";
4740
4764
  bodyJson = JSON.stringify(body || {});
4741
4765
 
4742
4766
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4743
4767
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
4744
4768
  if (bearerToken) {
4745
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4769
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4746
4770
  }
4747
4771
 
4748
4772
  return Promise.race([
@@ -4759,26 +4783,31 @@ export class MezonApi {
4759
4783
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4760
4784
  ),
4761
4785
  ]);
4762
- }
4786
+ }
4763
4787
 
4764
4788
  /** */
4765
- removeChannelFavorite(bearerToken: string,
4766
- channelId:string,
4767
- options: any = {}): Promise<any> {
4768
-
4789
+ removeChannelFavorite(
4790
+ bearerToken: string,
4791
+ channelId: string,
4792
+ options: any = {}
4793
+ ): Promise<any> {
4769
4794
  if (channelId === null || channelId === undefined) {
4770
- throw new Error("'channelId' is a required parameter but is null or undefined.");
4795
+ throw new Error(
4796
+ "'channelId' is a required parameter but is null or undefined."
4797
+ );
4771
4798
  }
4772
- const urlPath = "/v2/channel/favorite/{channelId}"
4773
- .replace("{channelId}", encodeURIComponent(String(channelId)));
4799
+ const urlPath = "/v2/channel/favorite/{channelId}".replace(
4800
+ "{channelId}",
4801
+ encodeURIComponent(String(channelId))
4802
+ );
4774
4803
  const queryParams = new Map<string, any>();
4775
4804
 
4776
- let bodyJson : string = "";
4805
+ let bodyJson: string = "";
4777
4806
 
4778
4807
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4779
4808
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
4780
4809
  if (bearerToken) {
4781
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4810
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4782
4811
  }
4783
4812
 
4784
4813
  return Promise.race([
@@ -4795,21 +4824,26 @@ export class MezonApi {
4795
4824
  setTimeout(reject, this.timeoutMs, "Request timed out.")
4796
4825
  ),
4797
4826
  ]);
4798
- }
4827
+ }
4799
4828
 
4800
4829
  /** */
4801
- getListFavoriteChannel(bearerToken: string,
4802
- clanId:string,
4803
- options: any = {}): Promise<ApiListFavoriteChannelResponse> {
4804
-
4830
+ getListFavoriteChannel(
4831
+ bearerToken: string,
4832
+ clanId: string,
4833
+ options: any = {}
4834
+ ): Promise<ApiListFavoriteChannelResponse> {
4805
4835
  if (clanId === null || clanId === undefined) {
4806
- throw new Error("'clanId' is a required parameter but is null or undefined.");
4836
+ throw new Error(
4837
+ "'clanId' is a required parameter but is null or undefined."
4838
+ );
4807
4839
  }
4808
- const urlPath = "/v2/channel/favorite/{clanId}"
4809
- .replace("{clanId}", encodeURIComponent(String(clanId)));
4840
+ const urlPath = "/v2/channel/favorite/{clanId}".replace(
4841
+ "{clanId}",
4842
+ encodeURIComponent(String(clanId))
4843
+ );
4810
4844
  const queryParams = new Map<string, any>();
4811
4845
 
4812
- let bodyJson : string = "";
4846
+ let bodyJson: string = "";
4813
4847
 
4814
4848
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4815
4849
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -4977,25 +5011,30 @@ export class MezonApi {
4977
5011
  }
4978
5012
 
4979
5013
  /** get channel encryption method */
4980
- getChanEncryptionMethod(bearerToken: string,
4981
- channelId:string,
4982
- method?:string,
4983
- options: any = {}): Promise<ApiChanEncryptionMethod> {
4984
-
5014
+ getChanEncryptionMethod(
5015
+ bearerToken: string,
5016
+ channelId: string,
5017
+ method?: string,
5018
+ options: any = {}
5019
+ ): Promise<ApiChanEncryptionMethod> {
4985
5020
  if (channelId === null || channelId === undefined) {
4986
- throw new Error("'channelId' is a required parameter but is null or undefined.");
5021
+ throw new Error(
5022
+ "'channelId' is a required parameter but is null or undefined."
5023
+ );
4987
5024
  }
4988
- const urlPath = "/v2/channel/{channelId}/encrypt_method"
4989
- .replace("{channelId}", encodeURIComponent(String(channelId)));
5025
+ const urlPath = "/v2/channel/{channelId}/encrypt_method".replace(
5026
+ "{channelId}",
5027
+ encodeURIComponent(String(channelId))
5028
+ );
4990
5029
  const queryParams = new Map<string, any>();
4991
5030
  queryParams.set("method", method);
4992
5031
 
4993
- let bodyJson : string = "";
5032
+ let bodyJson: string = "";
4994
5033
 
4995
5034
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
4996
5035
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
4997
5036
  if (bearerToken) {
4998
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5037
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4999
5038
  }
5000
5039
 
5001
5040
  return Promise.race([
@@ -5012,31 +5051,38 @@ export class MezonApi {
5012
5051
  setTimeout(reject, this.timeoutMs, "Request timed out.")
5013
5052
  ),
5014
5053
  ]);
5015
- }
5054
+ }
5016
5055
 
5017
5056
  /** store channel encryption method */
5018
- setChanEncryptionMethod(bearerToken: string,
5019
- channelId:string,
5020
- body:MezonSetChanEncryptionMethodBody,
5021
- options: any = {}): Promise<any> {
5022
-
5057
+ setChanEncryptionMethod(
5058
+ bearerToken: string,
5059
+ channelId: string,
5060
+ body: MezonSetChanEncryptionMethodBody,
5061
+ options: any = {}
5062
+ ): Promise<any> {
5023
5063
  if (channelId === null || channelId === undefined) {
5024
- throw new Error("'channelId' is a required parameter but is null or undefined.");
5064
+ throw new Error(
5065
+ "'channelId' is a required parameter but is null or undefined."
5066
+ );
5025
5067
  }
5026
5068
  if (body === null || body === undefined) {
5027
- throw new Error("'body' is a required parameter but is null or undefined.");
5069
+ throw new Error(
5070
+ "'body' is a required parameter but is null or undefined."
5071
+ );
5028
5072
  }
5029
- const urlPath = "/v2/channel/{channelId}/encrypt_method"
5030
- .replace("{channelId}", encodeURIComponent(String(channelId)));
5073
+ const urlPath = "/v2/channel/{channelId}/encrypt_method".replace(
5074
+ "{channelId}",
5075
+ encodeURIComponent(String(channelId))
5076
+ );
5031
5077
  const queryParams = new Map<string, any>();
5032
5078
 
5033
- let bodyJson : string = "";
5079
+ let bodyJson: string = "";
5034
5080
  bodyJson = JSON.stringify(body || {});
5035
5081
 
5036
5082
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5037
5083
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
5038
5084
  if (bearerToken) {
5039
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5085
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5040
5086
  }
5041
5087
 
5042
5088
  return Promise.race([
@@ -5053,13 +5099,14 @@ export class MezonApi {
5053
5099
  setTimeout(reject, this.timeoutMs, "Request timed out.")
5054
5100
  ),
5055
5101
  ]);
5056
- }
5102
+ }
5057
5103
 
5058
5104
  /** Leave a channel the user is a member of. */
5059
- leaveThread(bearerToken: string,
5060
- channelId:string,
5061
- options: any = {}): Promise<any> {
5062
-
5105
+ leaveThread(
5106
+ bearerToken: string,
5107
+ channelId: string,
5108
+ options: any = {}
5109
+ ): Promise<any> {
5063
5110
  if (channelId === null || channelId === undefined) {
5064
5111
  throw new Error(
5065
5112
  "'channelId' is a required parameter but is null or undefined."
@@ -5396,24 +5443,29 @@ export class MezonApi {
5396
5443
  }
5397
5444
 
5398
5445
  /** List channel setting */
5399
- listChannelSetting(bearerToken: string,
5400
- clanId:string,
5401
- parentId?:string,
5402
- categoryId?:string,
5403
- privateChannel?:number,
5404
- active?:number,
5405
- status?:number,
5406
- type?:number,
5407
- limit?:number,
5408
- page?:number,
5409
- channelLabel?:string,
5410
- options: any = {}): Promise<ApiChannelSettingListResponse> {
5411
-
5446
+ listChannelSetting(
5447
+ bearerToken: string,
5448
+ clanId: string,
5449
+ parentId?: string,
5450
+ categoryId?: string,
5451
+ privateChannel?: number,
5452
+ active?: number,
5453
+ status?: number,
5454
+ type?: number,
5455
+ limit?: number,
5456
+ page?: number,
5457
+ channelLabel?: string,
5458
+ options: any = {}
5459
+ ): Promise<ApiChannelSettingListResponse> {
5412
5460
  if (clanId === null || clanId === undefined) {
5413
- throw new Error("'clanId' is a required parameter but is null or undefined.");
5461
+ throw new Error(
5462
+ "'clanId' is a required parameter but is null or undefined."
5463
+ );
5414
5464
  }
5415
- const urlPath = "/v2/channelsetting/{clanId}"
5416
- .replace("{clanId}", encodeURIComponent(String(clanId)));
5465
+ const urlPath = "/v2/channelsetting/{clanId}".replace(
5466
+ "{clanId}",
5467
+ encodeURIComponent(String(clanId))
5468
+ );
5417
5469
  const queryParams = new Map<string, any>();
5418
5470
  queryParams.set("parent_id", parentId);
5419
5471
  queryParams.set("category_id", categoryId);
@@ -5425,12 +5477,12 @@ export class MezonApi {
5425
5477
  queryParams.set("page", page);
5426
5478
  queryParams.set("channel_label", channelLabel);
5427
5479
 
5428
- let bodyJson : string = "";
5480
+ let bodyJson: string = "";
5429
5481
 
5430
5482
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5431
5483
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5432
5484
  if (bearerToken) {
5433
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5485
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5434
5486
  }
5435
5487
 
5436
5488
  return Promise.race([
@@ -5447,7 +5499,7 @@ export class MezonApi {
5447
5499
  setTimeout(reject, this.timeoutMs, "Request timed out.")
5448
5500
  ),
5449
5501
  ]);
5450
- }
5502
+ }
5451
5503
 
5452
5504
  /** List all users that are part of a channel. */
5453
5505
  listChannelVoiceUsers(
@@ -5910,86 +5962,19 @@ export class MezonApi {
5910
5962
  setTimeout(reject, this.timeoutMs, "Request timed out.")
5911
5963
  ),
5912
5964
  ]);
5913
- }
5914
-
5915
- /** */
5916
- getCustomDisplay(bearerToken: string,
5917
- options: any = {}): Promise<ApiCustomDisplay> {
5918
-
5919
- const urlPath = "/v2/customdisplay";
5920
- const queryParams = new Map<string, any>();
5921
-
5922
- let bodyJson : string = "";
5965
+ }
5923
5966
 
5924
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5925
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
5926
- if (bearerToken) {
5927
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5928
- }
5929
-
5930
- return Promise.race([
5931
- fetch(fullUrl, fetchOptions).then((response) => {
5932
- if (response.status == 204) {
5933
- return response;
5934
- } else if (response.status >= 200 && response.status < 300) {
5935
- return response.json();
5936
- } else {
5937
- throw response;
5938
- }
5939
- }),
5940
- new Promise((_, reject) =>
5941
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5942
- ),
5943
- ]);
5944
- }
5945
-
5946
- /** */
5947
- updateCustomDisplay(bearerToken: string,
5948
- body:ApiCustomDisplay,
5949
- options: any = {}): Promise<any> {
5950
-
5951
- if (body === null || body === undefined) {
5952
- throw new Error("'body' is a required parameter but is null or undefined.");
5953
- }
5954
- const urlPath = "/v2/customdisplay";
5955
- const queryParams = new Map<string, any>();
5956
-
5957
- let bodyJson : string = "";
5958
- bodyJson = JSON.stringify(body || {});
5959
-
5960
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
5961
- const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
5962
- if (bearerToken) {
5963
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5964
- }
5965
-
5966
- return Promise.race([
5967
- fetch(fullUrl, fetchOptions).then((response) => {
5968
- if (response.status == 204) {
5969
- return response;
5970
- } else if (response.status >= 200 && response.status < 300) {
5971
- return response.json();
5972
- } else {
5973
- throw response;
5974
- }
5975
- }),
5976
- new Promise((_, reject) =>
5977
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5978
- ),
5979
- ]);
5980
- }
5981
-
5982
- /** */
5983
- deleteCategoryDesc(
5984
- bearerToken: string,
5985
- categoryId: string,
5986
- clanId: string,
5987
- options: any = {}
5988
- ): Promise<any> {
5989
- if (categoryId === null || categoryId === undefined) {
5990
- throw new Error(
5991
- "'categoryId' is a required parameter but is null or undefined."
5992
- );
5967
+ /** */
5968
+ deleteCategoryDesc(
5969
+ bearerToken: string,
5970
+ categoryId: string,
5971
+ clanId: string,
5972
+ options: any = {}
5973
+ ): Promise<any> {
5974
+ if (categoryId === null || categoryId === undefined) {
5975
+ throw new Error(
5976
+ "'categoryId' is a required parameter but is null or undefined."
5977
+ );
5993
5978
  }
5994
5979
  if (clanId === null || clanId === undefined) {
5995
5980
  throw new Error(
@@ -6068,19 +6053,20 @@ export class MezonApi {
6068
6053
  }
6069
6054
 
6070
6055
  /** regist fcm device token */
6071
- registFCMDeviceToken(bearerToken: string,
6072
- token?:string,
6073
- deviceId?:string,
6074
- platform?:string,
6075
- options: any = {}): Promise<ApiRegistFcmDeviceTokenResponse> {
6076
-
6056
+ registFCMDeviceToken(
6057
+ bearerToken: string,
6058
+ token?: string,
6059
+ deviceId?: string,
6060
+ platform?: string,
6061
+ options: any = {}
6062
+ ): Promise<ApiRegistFcmDeviceTokenResponse> {
6077
6063
  const urlPath = "/v2/devicetoken";
6078
6064
  const queryParams = new Map<string, any>();
6079
6065
  queryParams.set("token", token);
6080
6066
  queryParams.set("device_id", deviceId);
6081
6067
  queryParams.set("platform", platform);
6082
6068
 
6083
- let bodyJson : string = "";
6069
+ let bodyJson: string = "";
6084
6070
 
6085
6071
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
6086
6072
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
@@ -7097,18 +7083,19 @@ export class MezonApi {
7097
7083
  }
7098
7084
 
7099
7085
  /** get key server */
7100
- getKeyServer(bearerToken: string,
7101
- options: any = {}): Promise<ApiGetKeyServerResp> {
7102
-
7086
+ getKeyServer(
7087
+ bearerToken: string,
7088
+ options: any = {}
7089
+ ): Promise<ApiGetKeyServerResp> {
7103
7090
  const urlPath = "/v2/e2ee/key_server";
7104
7091
  const queryParams = new Map<string, any>();
7105
7092
 
7106
- let bodyJson : string = "";
7093
+ let bodyJson: string = "";
7107
7094
 
7108
7095
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
7109
7096
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
7110
7097
  if (bearerToken) {
7111
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7098
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7112
7099
  }
7113
7100
 
7114
7101
  return Promise.race([
@@ -7317,23 +7304,26 @@ export class MezonApi {
7317
7304
  }
7318
7305
 
7319
7306
  /** Mark as read */
7320
- markAsRead(bearerToken: string,
7321
- body:ApiMarkAsReadRequest,
7322
- options: any = {}): Promise<any> {
7323
-
7307
+ markAsRead(
7308
+ bearerToken: string,
7309
+ body: ApiMarkAsReadRequest,
7310
+ options: any = {}
7311
+ ): Promise<any> {
7324
7312
  if (body === null || body === undefined) {
7325
- throw new Error("'body' is a required parameter but is null or undefined.");
7313
+ throw new Error(
7314
+ "'body' is a required parameter but is null or undefined."
7315
+ );
7326
7316
  }
7327
7317
  const urlPath = "/v2/markasread";
7328
7318
  const queryParams = new Map<string, any>();
7329
7319
 
7330
- let bodyJson : string = "";
7320
+ let bodyJson: string = "";
7331
7321
  bodyJson = JSON.stringify(body || {});
7332
7322
 
7333
7323
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
7334
7324
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
7335
7325
  if (bearerToken) {
7336
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7326
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7337
7327
  }
7338
7328
 
7339
7329
  return Promise.race([
@@ -7350,7 +7340,7 @@ export class MezonApi {
7350
7340
  setTimeout(reject, this.timeoutMs, "Request timed out.")
7351
7341
  ),
7352
7342
  ]);
7353
- }
7343
+ }
7354
7344
 
7355
7345
  /** set mute notification user channel. */
7356
7346
  setMuteNotificationCategory(
@@ -7943,12 +7933,13 @@ export class MezonApi {
7943
7933
  }
7944
7934
 
7945
7935
  /** */
7946
- getPinMessagesList(bearerToken: string,
7947
- messageId?:string,
7948
- channelId?:string,
7949
- clanId?:string,
7950
- options: any = {}): Promise<ApiPinMessagesList> {
7951
-
7936
+ getPinMessagesList(
7937
+ bearerToken: string,
7938
+ messageId?: string,
7939
+ channelId?: string,
7940
+ clanId?: string,
7941
+ options: any = {}
7942
+ ): Promise<ApiPinMessagesList> {
7952
7943
  const urlPath = "/v2/pinmessage/get";
7953
7944
  const queryParams = new Map<string, any>();
7954
7945
  queryParams.set("message_id", messageId);
@@ -7980,12 +7971,15 @@ export class MezonApi {
7980
7971
  }
7981
7972
 
7982
7973
  /** set notification user channel. */
7983
- createPinMessage(bearerToken: string,
7984
- body:ApiPinMessageRequest,
7985
- options: any = {}): Promise<ApiChannelMessageHeader> {
7986
-
7974
+ createPinMessage(
7975
+ bearerToken: string,
7976
+ body: ApiPinMessageRequest,
7977
+ options: any = {}
7978
+ ): Promise<ApiChannelMessageHeader> {
7987
7979
  if (body === null || body === undefined) {
7988
- throw new Error("'body' is a required parameter but is null or undefined.");
7980
+ throw new Error(
7981
+ "'body' is a required parameter but is null or undefined."
7982
+ );
7989
7983
  }
7990
7984
  const urlPath = "/v2/pinmessage/set";
7991
7985
  const queryParams = new Map<string, any>();
@@ -8016,15 +8010,16 @@ export class MezonApi {
8016
8010
  }
8017
8011
 
8018
8012
  /** List all users in ptt channel. */
8019
- listPTTChannelUsers(bearerToken: string,
8020
- clanId?:string,
8021
- channelId?:string,
8022
- channelType?:number,
8023
- limit?:number,
8024
- state?:number,
8025
- cursor?:string,
8026
- options: any = {}): Promise<ApiPTTChannelUserList> {
8027
-
8013
+ listPTTChannelUsers(
8014
+ bearerToken: string,
8015
+ clanId?: string,
8016
+ channelId?: string,
8017
+ channelType?: number,
8018
+ limit?: number,
8019
+ state?: number,
8020
+ cursor?: string,
8021
+ options: any = {}
8022
+ ): Promise<ApiPTTChannelUserList> {
8028
8023
  const urlPath = "/v2/ptt_channels/users";
8029
8024
  const queryParams = new Map<string, any>();
8030
8025
  queryParams.set("clan_id", clanId);
@@ -8034,12 +8029,12 @@ export class MezonApi {
8034
8029
  queryParams.set("state", state);
8035
8030
  queryParams.set("cursor", cursor);
8036
8031
 
8037
- let bodyJson : string = "";
8032
+ let bodyJson: string = "";
8038
8033
 
8039
8034
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8040
8035
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
8041
8036
  if (bearerToken) {
8042
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8037
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8043
8038
  }
8044
8039
 
8045
8040
  return Promise.race([
@@ -8056,76 +8051,80 @@ export class MezonApi {
8056
8051
  setTimeout(reject, this.timeoutMs, "Request timed out.")
8057
8052
  ),
8058
8053
  ]);
8059
- }
8054
+ }
8060
8055
 
8061
8056
  /** get pubkey */
8062
- getPubKeys(bearerToken: string,
8063
- userIds?:Array<string>,
8064
- options: any = {}): Promise<ApiGetPubKeysResponse> {
8065
-
8066
- const urlPath = "/v2/pubkey";
8067
- const queryParams = new Map<string, any>();
8068
- queryParams.set("user_ids", userIds);
8057
+ getPubKeys(
8058
+ bearerToken: string,
8059
+ userIds?: Array<string>,
8060
+ options: any = {}
8061
+ ): Promise<ApiGetPubKeysResponse> {
8062
+ const urlPath = "/v2/pubkey";
8063
+ const queryParams = new Map<string, any>();
8064
+ queryParams.set("user_ids", userIds);
8069
8065
 
8070
- let bodyJson : string = "";
8066
+ let bodyJson: string = "";
8071
8067
 
8072
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8073
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
8074
- if (bearerToken) {
8068
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8069
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
8070
+ if (bearerToken) {
8075
8071
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8076
- }
8077
-
8078
- return Promise.race([
8079
- fetch(fullUrl, fetchOptions).then((response) => {
8080
- if (response.status == 204) {
8081
- return response;
8082
- } else if (response.status >= 200 && response.status < 300) {
8083
- return response.json();
8084
- } else {
8085
- throw response;
8086
- }
8087
- }),
8088
- new Promise((_, reject) =>
8089
- setTimeout(reject, this.timeoutMs, "Request timed out.")
8090
- ),
8091
- ]);
8092
- }
8072
+ }
8093
8073
 
8094
- /** store pubkey for e2ee */
8095
- pushPubKey(bearerToken: string,
8096
- body:ApiPushPubKeyRequest,
8097
- options: any = {}): Promise<any> {
8098
-
8099
- if (body === null || body === undefined) {
8100
- throw new Error("'body' is a required parameter but is null or undefined.");
8074
+ return Promise.race([
8075
+ fetch(fullUrl, fetchOptions).then((response) => {
8076
+ if (response.status == 204) {
8077
+ return response;
8078
+ } else if (response.status >= 200 && response.status < 300) {
8079
+ return response.json();
8080
+ } else {
8081
+ throw response;
8082
+ }
8083
+ }),
8084
+ new Promise((_, reject) =>
8085
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
8086
+ ),
8087
+ ]);
8101
8088
  }
8102
- const urlPath = "/v2/pubkey/push";
8103
- const queryParams = new Map<string, any>();
8104
8089
 
8105
- let bodyJson : string = "";
8106
- bodyJson = JSON.stringify(body || {});
8090
+ /** store pubkey for e2ee */
8091
+ pushPubKey(
8092
+ bearerToken: string,
8093
+ body: ApiPushPubKeyRequest,
8094
+ options: any = {}
8095
+ ): Promise<any> {
8096
+ if (body === null || body === undefined) {
8097
+ throw new Error(
8098
+ "'body' is a required parameter but is null or undefined."
8099
+ );
8100
+ }
8101
+ const urlPath = "/v2/pubkey/push";
8102
+ const queryParams = new Map<string, any>();
8103
+
8104
+ let bodyJson: string = "";
8105
+ bodyJson = JSON.stringify(body || {});
8107
8106
 
8108
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8109
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
8110
- if (bearerToken) {
8107
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8108
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
8109
+ if (bearerToken) {
8111
8110
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8112
- }
8111
+ }
8113
8112
 
8114
- return Promise.race([
8115
- fetch(fullUrl, fetchOptions).then((response) => {
8116
- if (response.status == 204) {
8117
- return response;
8118
- } else if (response.status >= 200 && response.status < 300) {
8119
- return response.json();
8120
- } else {
8121
- throw response;
8122
- }
8123
- }),
8124
- new Promise((_, reject) =>
8125
- setTimeout(reject, this.timeoutMs, "Request timed out.")
8126
- ),
8127
- ]);
8128
- }
8113
+ return Promise.race([
8114
+ fetch(fullUrl, fetchOptions).then((response) => {
8115
+ if (response.status == 204) {
8116
+ return response;
8117
+ } else if (response.status >= 200 && response.status < 300) {
8118
+ return response.json();
8119
+ } else {
8120
+ throw response;
8121
+ }
8122
+ }),
8123
+ new Promise((_, reject) =>
8124
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
8125
+ ),
8126
+ ]);
8127
+ }
8129
8128
 
8130
8129
  /** */
8131
8130
  addRolesChannelDesc(
@@ -8680,12 +8679,13 @@ pushPubKey(bearerToken: string,
8680
8679
 
8681
8680
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8682
8681
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
8683
- if (bearerToken) {
8684
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8685
- }
8686
- if (basicAuthUsername) {
8687
- fetchOptions.headers["Authorization"] = "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
8688
- }
8682
+ if (bearerToken) {
8683
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8684
+ }
8685
+ if (basicAuthUsername) {
8686
+ fetchOptions.headers["Authorization"] =
8687
+ "Basic " + encode(basicAuthUsername + ":" + basicAuthPassword);
8688
+ }
8689
8689
 
8690
8690
  return Promise.race([
8691
8691
  fetch(fullUrl, fetchOptions).then((response) => {
@@ -8701,26 +8701,29 @@ pushPubKey(bearerToken: string,
8701
8701
  setTimeout(reject, this.timeoutMs, "Request timed out.")
8702
8702
  ),
8703
8703
  ]);
8704
- }
8704
+ }
8705
8705
 
8706
8706
  /** UpdateWallets */
8707
- sendToken(bearerToken: string,
8708
- body:ApiTokenSentEvent,
8709
- options: any = {}): Promise<any> {
8710
-
8707
+ sendToken(
8708
+ bearerToken: string,
8709
+ body: ApiTokenSentEvent,
8710
+ options: any = {}
8711
+ ): Promise<any> {
8711
8712
  if (body === null || body === undefined) {
8712
- throw new Error("'body' is a required parameter but is null or undefined.");
8713
+ throw new Error(
8714
+ "'body' is a required parameter but is null or undefined."
8715
+ );
8713
8716
  }
8714
8717
  const urlPath = "/v2/sendtoken";
8715
8718
  const queryParams = new Map<string, any>();
8716
8719
 
8717
- let bodyJson : string = "";
8720
+ let bodyJson: string = "";
8718
8721
  bodyJson = JSON.stringify(body || {});
8719
8722
 
8720
8723
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
8721
8724
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
8722
8725
  if (bearerToken) {
8723
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8726
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8724
8727
  }
8725
8728
 
8726
8729
  return Promise.race([
@@ -9255,31 +9258,36 @@ pushPubKey(bearerToken: string,
9255
9258
  }
9256
9259
 
9257
9260
  /** List user channels */
9258
- listThreadDescs(bearerToken: string,
9259
- channelId:string,
9260
- limit?:number,
9261
- state?:number,
9262
- clanId?:string,
9263
- threadId?:string,
9264
- options: any = {}): Promise<ApiChannelDescList> {
9265
-
9261
+ listThreadDescs(
9262
+ bearerToken: string,
9263
+ channelId: string,
9264
+ limit?: number,
9265
+ state?: number,
9266
+ clanId?: string,
9267
+ threadId?: string,
9268
+ options: any = {}
9269
+ ): Promise<ApiChannelDescList> {
9266
9270
  if (channelId === null || channelId === undefined) {
9267
- throw new Error("'channelId' is a required parameter but is null or undefined.");
9271
+ throw new Error(
9272
+ "'channelId' is a required parameter but is null or undefined."
9273
+ );
9268
9274
  }
9269
- const urlPath = "/v2/thread/{channelId}"
9270
- .replace("{channelId}", encodeURIComponent(String(channelId)));
9275
+ const urlPath = "/v2/thread/{channelId}".replace(
9276
+ "{channelId}",
9277
+ encodeURIComponent(String(channelId))
9278
+ );
9271
9279
  const queryParams = new Map<string, any>();
9272
9280
  queryParams.set("limit", limit);
9273
9281
  queryParams.set("state", state);
9274
9282
  queryParams.set("clan_id", clanId);
9275
9283
  queryParams.set("thread_id", threadId);
9276
9284
 
9277
- let bodyJson : string = "";
9285
+ let bodyJson: string = "";
9278
9286
 
9279
9287
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9280
9288
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
9281
9289
  if (bearerToken) {
9282
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9290
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9283
9291
  }
9284
9292
 
9285
9293
  return Promise.race([
@@ -9296,7 +9304,7 @@ pushPubKey(bearerToken: string,
9296
9304
  setTimeout(reject, this.timeoutMs, "Request timed out.")
9297
9305
  ),
9298
9306
  ]);
9299
- }
9307
+ }
9300
9308
 
9301
9309
  /** Update fields in a given category. */
9302
9310
  updateCategory(
@@ -9582,17 +9590,18 @@ pushPubKey(bearerToken: string,
9582
9590
  }
9583
9591
 
9584
9592
  /** ListUserPermissionInChannel */
9585
- listUserPermissionInChannel(bearerToken: string,
9586
- clanId?:string,
9587
- channelId?:string,
9588
- options: any = {}): Promise<ApiUserPermissionInChannelListResponse> {
9589
-
9593
+ listUserPermissionInChannel(
9594
+ bearerToken: string,
9595
+ clanId?: string,
9596
+ channelId?: string,
9597
+ options: any = {}
9598
+ ): Promise<ApiUserPermissionInChannelListResponse> {
9590
9599
  const urlPath = "/v2/users/clans/channels";
9591
9600
  const queryParams = new Map<string, any>();
9592
9601
  queryParams.set("clan_id", clanId);
9593
9602
  queryParams.set("channel_id", channelId);
9594
9603
 
9595
- let bodyJson : string = "";
9604
+ let bodyJson: string = "";
9596
9605
 
9597
9606
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9598
9607
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
@@ -9614,21 +9623,22 @@ pushPubKey(bearerToken: string,
9614
9623
  setTimeout(reject, this.timeoutMs, "Request timed out.")
9615
9624
  ),
9616
9625
  ]);
9617
- }
9626
+ }
9618
9627
 
9619
9628
  /** Get user status */
9620
- getUserStatus(bearerToken: string,
9621
- options: any = {}): Promise<ApiUserStatus> {
9622
-
9629
+ getUserStatus(
9630
+ bearerToken: string,
9631
+ options: any = {}
9632
+ ): Promise<ApiUserStatus> {
9623
9633
  const urlPath = "/v2/userstatus";
9624
9634
  const queryParams = new Map<string, any>();
9625
9635
 
9626
- let bodyJson : string = "";
9636
+ let bodyJson: string = "";
9627
9637
 
9628
9638
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9629
9639
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
9630
9640
  if (bearerToken) {
9631
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9641
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9632
9642
  }
9633
9643
 
9634
9644
  return Promise.race([
@@ -9645,26 +9655,29 @@ pushPubKey(bearerToken: string,
9645
9655
  setTimeout(reject, this.timeoutMs, "Request timed out.")
9646
9656
  ),
9647
9657
  ]);
9648
- }
9658
+ }
9649
9659
 
9650
9660
  /** Update user status */
9651
- updateUserStatus(bearerToken: string,
9652
- body:ApiUserStatusUpdate,
9653
- options: any = {}): Promise<any> {
9654
-
9661
+ updateUserStatus(
9662
+ bearerToken: string,
9663
+ body: ApiUserStatusUpdate,
9664
+ options: any = {}
9665
+ ): Promise<any> {
9655
9666
  if (body === null || body === undefined) {
9656
- throw new Error("'body' is a required parameter but is null or undefined.");
9667
+ throw new Error(
9668
+ "'body' is a required parameter but is null or undefined."
9669
+ );
9657
9670
  }
9658
9671
  const urlPath = "/v2/userstatus";
9659
9672
  const queryParams = new Map<string, any>();
9660
9673
 
9661
- let bodyJson : string = "";
9674
+ let bodyJson: string = "";
9662
9675
  bodyJson = JSON.stringify(body || {});
9663
9676
 
9664
9677
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9665
9678
  const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
9666
9679
  if (bearerToken) {
9667
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9680
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9668
9681
  }
9669
9682
 
9670
9683
  return Promise.race([
@@ -9684,12 +9697,13 @@ pushPubKey(bearerToken: string,
9684
9697
  }
9685
9698
 
9686
9699
  /** Get user status */
9687
- listWalletLedger(bearerToken: string,
9688
- limit?:number,
9689
- cursor?:string,
9690
- transactionId?:string,
9691
- options: any = {}): Promise<ApiWalletLedgerList> {
9692
-
9700
+ listWalletLedger(
9701
+ bearerToken: string,
9702
+ limit?: number,
9703
+ cursor?: string,
9704
+ transactionId?: string,
9705
+ options: any = {}
9706
+ ): Promise<ApiWalletLedgerList> {
9693
9707
  const urlPath = "/v2/walletledger";
9694
9708
  const queryParams = new Map<string, any>();
9695
9709
  queryParams.set("limit", limit);
@@ -9849,45 +9863,50 @@ pushPubKey(bearerToken: string,
9849
9863
  }
9850
9864
 
9851
9865
  /** disabled webhook */
9852
- deleteWebhookById(bearerToken: string,
9853
- id:string,
9854
- body:MezonDeleteWebhookByIdBody,
9855
- options: any = {}): Promise<any> {
9856
-
9857
- if (id === null || id === undefined) {
9858
- throw new Error("'id' is a required parameter but is null or undefined.");
9859
- }
9860
- if (body === null || body === undefined) {
9861
- throw new Error("'body' is a required parameter but is null or undefined.");
9862
- }
9863
- const urlPath = "/v2/webhooks/{id}"
9864
- .replace("{id}", encodeURIComponent(String(id)));
9865
- const queryParams = new Map<string, any>();
9866
+ deleteWebhookById(
9867
+ bearerToken: string,
9868
+ id: string,
9869
+ body: MezonDeleteWebhookByIdBody,
9870
+ options: any = {}
9871
+ ): Promise<any> {
9872
+ if (id === null || id === undefined) {
9873
+ throw new Error("'id' is a required parameter but is null or undefined.");
9874
+ }
9875
+ if (body === null || body === undefined) {
9876
+ throw new Error(
9877
+ "'body' is a required parameter but is null or undefined."
9878
+ );
9879
+ }
9880
+ const urlPath = "/v2/webhooks/{id}".replace(
9881
+ "{id}",
9882
+ encodeURIComponent(String(id))
9883
+ );
9884
+ const queryParams = new Map<string, any>();
9866
9885
 
9867
- let bodyJson : string = "";
9868
- bodyJson = JSON.stringify(body || {});
9886
+ let bodyJson: string = "";
9887
+ bodyJson = JSON.stringify(body || {});
9869
9888
 
9870
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9871
- const fetchOptions = buildFetchOptions("PATCH", options, bodyJson);
9872
- if (bearerToken) {
9889
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9890
+ const fetchOptions = buildFetchOptions("PATCH", options, bodyJson);
9891
+ if (bearerToken) {
9873
9892
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9874
- }
9893
+ }
9875
9894
 
9876
- return Promise.race([
9877
- fetch(fullUrl, fetchOptions).then((response) => {
9878
- if (response.status == 204) {
9879
- return response;
9880
- } else if (response.status >= 200 && response.status < 300) {
9881
- return response.json();
9882
- } else {
9883
- throw response;
9884
- }
9885
- }),
9886
- new Promise((_, reject) =>
9887
- setTimeout(reject, this.timeoutMs, "Request timed out.")
9888
- ),
9889
- ]);
9890
- }
9895
+ return Promise.race([
9896
+ fetch(fullUrl, fetchOptions).then((response) => {
9897
+ if (response.status == 204) {
9898
+ return response;
9899
+ } else if (response.status >= 200 && response.status < 300) {
9900
+ return response.json();
9901
+ } else {
9902
+ throw response;
9903
+ }
9904
+ }),
9905
+ new Promise((_, reject) =>
9906
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
9907
+ ),
9908
+ ]);
9909
+ }
9891
9910
 
9892
9911
  buildFullUrl(
9893
9912
  basePath: string,
@@ -9953,23 +9972,26 @@ pushPubKey(bearerToken: string,
9953
9972
  }
9954
9973
 
9955
9974
  /** WithdrawToken */
9956
- withdrawToken(bearerToken: string,
9957
- body:ApiWithdrawTokenRequest,
9958
- options: any = {}): Promise<any> {
9959
-
9975
+ withdrawToken(
9976
+ bearerToken: string,
9977
+ body: ApiWithdrawTokenRequest,
9978
+ options: any = {}
9979
+ ): Promise<any> {
9960
9980
  if (body === null || body === undefined) {
9961
- throw new Error("'body' is a required parameter but is null or undefined.");
9981
+ throw new Error(
9982
+ "'body' is a required parameter but is null or undefined."
9983
+ );
9962
9984
  }
9963
9985
  const urlPath = "/v2/withdrawtoken";
9964
9986
  const queryParams = new Map<string, any>();
9965
9987
 
9966
- let bodyJson : string = "";
9988
+ let bodyJson: string = "";
9967
9989
  bodyJson = JSON.stringify(body || {});
9968
9990
 
9969
9991
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9970
9992
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
9971
9993
  if (bearerToken) {
9972
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9994
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9973
9995
  }
9974
9996
 
9975
9997
  return Promise.race([
@@ -10077,62 +10099,66 @@ pushPubKey(bearerToken: string,
10077
10099
  }
10078
10100
 
10079
10101
  /** list onboarding. */
10080
- listOnboarding(bearerToken: string,
10081
- clanId?:string,
10082
- guideType?:number,
10083
- limit?:number,
10084
- page?:number,
10085
- options: any = {}): Promise<ApiListOnboardingResponse> {
10086
-
10087
- const urlPath = "/v2/onboarding";
10088
- const queryParams = new Map<string, any>();
10089
- queryParams.set("clan_id", clanId);
10090
- queryParams.set("guide_type", guideType);
10091
- queryParams.set("limit", limit);
10092
- queryParams.set("page", page);
10093
-
10094
- let bodyJson : string = "";
10095
-
10096
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10097
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10098
- if (bearerToken) {
10099
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10100
- }
10101
-
10102
- return Promise.race([
10103
- fetch(fullUrl, fetchOptions).then((response) => {
10104
- if (response.status == 204) {
10105
- return response;
10106
- } else if (response.status >= 200 && response.status < 300) {
10107
- return response.json();
10108
- } else {
10109
- throw response;
10110
- }
10111
- }),
10112
- new Promise((_, reject) =>
10113
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10114
- ),
10115
- ]);
10102
+ listOnboarding(
10103
+ bearerToken: string,
10104
+ clanId?: string,
10105
+ guideType?: number,
10106
+ limit?: number,
10107
+ page?: number,
10108
+ options: any = {}
10109
+ ): Promise<ApiListOnboardingResponse> {
10110
+ const urlPath = "/v2/onboarding";
10111
+ const queryParams = new Map<string, any>();
10112
+ queryParams.set("clan_id", clanId);
10113
+ queryParams.set("guide_type", guideType);
10114
+ queryParams.set("limit", limit);
10115
+ queryParams.set("page", page);
10116
+
10117
+ let bodyJson: string = "";
10118
+
10119
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10120
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10121
+ if (bearerToken) {
10122
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10123
+ }
10124
+
10125
+ return Promise.race([
10126
+ fetch(fullUrl, fetchOptions).then((response) => {
10127
+ if (response.status == 204) {
10128
+ return response;
10129
+ } else if (response.status >= 200 && response.status < 300) {
10130
+ return response.json();
10131
+ } else {
10132
+ throw response;
10133
+ }
10134
+ }),
10135
+ new Promise((_, reject) =>
10136
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10137
+ ),
10138
+ ]);
10116
10139
  }
10117
10140
 
10118
10141
  /** create onboarding. */
10119
- createOnboarding(bearerToken: string,
10120
- body:ApiCreateOnboardingRequest,
10121
- options: any = {}): Promise<any> {
10122
-
10142
+ createOnboarding(
10143
+ bearerToken: string,
10144
+ body: ApiCreateOnboardingRequest,
10145
+ options: any = {}
10146
+ ): Promise<any> {
10123
10147
  if (body === null || body === undefined) {
10124
- throw new Error("'body' is a required parameter but is null or undefined.");
10148
+ throw new Error(
10149
+ "'body' is a required parameter but is null or undefined."
10150
+ );
10125
10151
  }
10126
10152
  const urlPath = "/v2/onboarding";
10127
10153
  const queryParams = new Map<string, any>();
10128
10154
 
10129
- let bodyJson : string = "";
10155
+ let bodyJson: string = "";
10130
10156
  bodyJson = JSON.stringify(body || {});
10131
10157
 
10132
10158
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10133
10159
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10134
10160
  if (bearerToken) {
10135
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10161
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10136
10162
  }
10137
10163
 
10138
10164
  return Promise.race([
@@ -10152,25 +10178,28 @@ pushPubKey(bearerToken: string,
10152
10178
  }
10153
10179
 
10154
10180
  /** delete onboarding. */
10155
- deleteOnboarding(bearerToken: string,
10156
- id:string,
10157
- clanId?:string,
10158
- options: any = {}): Promise<any> {
10159
-
10181
+ deleteOnboarding(
10182
+ bearerToken: string,
10183
+ id: string,
10184
+ clanId?: string,
10185
+ options: any = {}
10186
+ ): Promise<any> {
10160
10187
  if (id === null || id === undefined) {
10161
10188
  throw new Error("'id' is a required parameter but is null or undefined.");
10162
10189
  }
10163
- const urlPath = "/v2/onboarding/{id}"
10164
- .replace("{id}", encodeURIComponent(String(id)));
10190
+ const urlPath = "/v2/onboarding/{id}".replace(
10191
+ "{id}",
10192
+ encodeURIComponent(String(id))
10193
+ );
10165
10194
  const queryParams = new Map<string, any>();
10166
10195
  queryParams.set("clan_id", clanId);
10167
10196
 
10168
- let bodyJson : string = "";
10197
+ let bodyJson: string = "";
10169
10198
 
10170
10199
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10171
10200
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
10172
10201
  if (bearerToken) {
10173
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10202
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10174
10203
  }
10175
10204
 
10176
10205
  return Promise.race([
@@ -10190,25 +10219,28 @@ pushPubKey(bearerToken: string,
10190
10219
  }
10191
10220
 
10192
10221
  /** get detailed onboarding information. */
10193
- getOnboardingDetail(bearerToken: string,
10194
- id:string,
10195
- clanId?:string,
10196
- options: any = {}): Promise<ApiOnboardingItem> {
10197
-
10222
+ getOnboardingDetail(
10223
+ bearerToken: string,
10224
+ id: string,
10225
+ clanId?: string,
10226
+ options: any = {}
10227
+ ): Promise<ApiOnboardingItem> {
10198
10228
  if (id === null || id === undefined) {
10199
10229
  throw new Error("'id' is a required parameter but is null or undefined.");
10200
10230
  }
10201
- const urlPath = "/v2/onboarding/{id}"
10202
- .replace("{id}", encodeURIComponent(String(id)));
10231
+ const urlPath = "/v2/onboarding/{id}".replace(
10232
+ "{id}",
10233
+ encodeURIComponent(String(id))
10234
+ );
10203
10235
  const queryParams = new Map<string, any>();
10204
10236
  queryParams.set("clan_id", clanId);
10205
10237
 
10206
- let bodyJson : string = "";
10238
+ let bodyJson: string = "";
10207
10239
 
10208
10240
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10209
10241
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10210
10242
  if (bearerToken) {
10211
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10243
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10212
10244
  }
10213
10245
 
10214
10246
  return Promise.race([
@@ -10228,28 +10260,33 @@ pushPubKey(bearerToken: string,
10228
10260
  }
10229
10261
 
10230
10262
  /** update onboarding. */
10231
- updateOnboarding(bearerToken: string,
10232
- id:string,
10233
- body:MezonUpdateOnboardingBody,
10234
- options: any = {}): Promise<any> {
10235
-
10263
+ updateOnboarding(
10264
+ bearerToken: string,
10265
+ id: string,
10266
+ body: MezonUpdateOnboardingBody,
10267
+ options: any = {}
10268
+ ): Promise<any> {
10236
10269
  if (id === null || id === undefined) {
10237
10270
  throw new Error("'id' is a required parameter but is null or undefined.");
10238
10271
  }
10239
10272
  if (body === null || body === undefined) {
10240
- throw new Error("'body' is a required parameter but is null or undefined.");
10273
+ throw new Error(
10274
+ "'body' is a required parameter but is null or undefined."
10275
+ );
10241
10276
  }
10242
- const urlPath = "/v2/onboarding/{id}"
10243
- .replace("{id}", encodeURIComponent(String(id)));
10277
+ const urlPath = "/v2/onboarding/{id}".replace(
10278
+ "{id}",
10279
+ encodeURIComponent(String(id))
10280
+ );
10244
10281
  const queryParams = new Map<string, any>();
10245
10282
 
10246
- let bodyJson : string = "";
10283
+ let bodyJson: string = "";
10247
10284
  bodyJson = JSON.stringify(body || {});
10248
10285
 
10249
10286
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10250
10287
  const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
10251
10288
  if (bearerToken) {
10252
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10289
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10253
10290
  }
10254
10291
 
10255
10292
  return Promise.race([
@@ -10269,23 +10306,26 @@ pushPubKey(bearerToken: string,
10269
10306
  }
10270
10307
 
10271
10308
  /** Generate clan webhook. */
10272
- generateClanWebhook(bearerToken: string,
10273
- body:ApiGenerateClanWebhookRequest,
10274
- options: any = {}): Promise<ApiGenerateClanWebhookResponse> {
10275
-
10309
+ generateClanWebhook(
10310
+ bearerToken: string,
10311
+ body: ApiGenerateClanWebhookRequest,
10312
+ options: any = {}
10313
+ ): Promise<ApiGenerateClanWebhookResponse> {
10276
10314
  if (body === null || body === undefined) {
10277
- throw new Error("'body' is a required parameter but is null or undefined.");
10315
+ throw new Error(
10316
+ "'body' is a required parameter but is null or undefined."
10317
+ );
10278
10318
  }
10279
10319
  const urlPath = "/v2/clanwebhooks";
10280
10320
  const queryParams = new Map<string, any>();
10281
10321
 
10282
- let bodyJson : string = "";
10322
+ let bodyJson: string = "";
10283
10323
  bodyJson = JSON.stringify(body || {});
10284
10324
 
10285
10325
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10286
10326
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10287
10327
  if (bearerToken) {
10288
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10328
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10289
10329
  }
10290
10330
 
10291
10331
  return Promise.race([
@@ -10305,23 +10345,28 @@ pushPubKey(bearerToken: string,
10305
10345
  }
10306
10346
 
10307
10347
  /** List clan webhook. */
10308
- listClanWebhook(bearerToken: string,
10309
- clanId:string,
10310
- options: any = {}): Promise<ApiListClanWebhookResponse> {
10311
-
10348
+ listClanWebhook(
10349
+ bearerToken: string,
10350
+ clanId: string,
10351
+ options: any = {}
10352
+ ): Promise<ApiListClanWebhookResponse> {
10312
10353
  if (clanId === null || clanId === undefined) {
10313
- throw new Error("'clanId' is a required parameter but is null or undefined.");
10354
+ throw new Error(
10355
+ "'clanId' is a required parameter but is null or undefined."
10356
+ );
10314
10357
  }
10315
- const urlPath = "/v2/clanwebhooks/{clanId}"
10316
- .replace("{clanId}", encodeURIComponent(String(clanId)));
10358
+ const urlPath = "/v2/clanwebhooks/{clanId}".replace(
10359
+ "{clanId}",
10360
+ encodeURIComponent(String(clanId))
10361
+ );
10317
10362
  const queryParams = new Map<string, any>();
10318
10363
 
10319
- let bodyJson : string = "";
10364
+ let bodyJson: string = "";
10320
10365
 
10321
10366
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10322
10367
  const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10323
10368
  if (bearerToken) {
10324
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10369
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10325
10370
  }
10326
10371
 
10327
10372
  return Promise.race([
@@ -10341,25 +10386,28 @@ pushPubKey(bearerToken: string,
10341
10386
  }
10342
10387
 
10343
10388
  /** Disabled clan webhook. */
10344
- deleteClanWebhookById(bearerToken: string,
10345
- id:string,
10346
- clanId?:string,
10347
- options: any = {}): Promise<any> {
10348
-
10389
+ deleteClanWebhookById(
10390
+ bearerToken: string,
10391
+ id: string,
10392
+ clanId?: string,
10393
+ options: any = {}
10394
+ ): Promise<any> {
10349
10395
  if (id === null || id === undefined) {
10350
10396
  throw new Error("'id' is a required parameter but is null or undefined.");
10351
10397
  }
10352
- const urlPath = "/v2/clanwebhooks/{id}"
10353
- .replace("{id}", encodeURIComponent(String(id)));
10398
+ const urlPath = "/v2/clanwebhooks/{id}".replace(
10399
+ "{id}",
10400
+ encodeURIComponent(String(id))
10401
+ );
10354
10402
  const queryParams = new Map<string, any>();
10355
10403
  queryParams.set("clan_id", clanId);
10356
10404
 
10357
- let bodyJson : string = "";
10405
+ let bodyJson: string = "";
10358
10406
 
10359
10407
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10360
10408
  const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
10361
10409
  if (bearerToken) {
10362
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10410
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10363
10411
  }
10364
10412
 
10365
10413
  return Promise.race([
@@ -10379,28 +10427,33 @@ pushPubKey(bearerToken: string,
10379
10427
  }
10380
10428
 
10381
10429
  /** Update clan webhook by id. */
10382
- updateClanWebhookById(bearerToken: string,
10383
- id:string,
10384
- body:MezonUpdateClanWebhookByIdBody,
10385
- options: any = {}): Promise<any> {
10386
-
10430
+ updateClanWebhookById(
10431
+ bearerToken: string,
10432
+ id: string,
10433
+ body: MezonUpdateClanWebhookByIdBody,
10434
+ options: any = {}
10435
+ ): Promise<any> {
10387
10436
  if (id === null || id === undefined) {
10388
10437
  throw new Error("'id' is a required parameter but is null or undefined.");
10389
10438
  }
10390
10439
  if (body === null || body === undefined) {
10391
- throw new Error("'body' is a required parameter but is null or undefined.");
10440
+ throw new Error(
10441
+ "'body' is a required parameter but is null or undefined."
10442
+ );
10392
10443
  }
10393
- const urlPath = "/v2/clanwebhooks/{id}"
10394
- .replace("{id}", encodeURIComponent(String(id)));
10444
+ const urlPath = "/v2/clanwebhooks/{id}".replace(
10445
+ "{id}",
10446
+ encodeURIComponent(String(id))
10447
+ );
10395
10448
  const queryParams = new Map<string, any>();
10396
10449
 
10397
- let bodyJson : string = "";
10450
+ let bodyJson: string = "";
10398
10451
  bodyJson = JSON.stringify(body || {});
10399
10452
 
10400
10453
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10401
10454
  const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
10402
10455
  if (bearerToken) {
10403
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10456
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10404
10457
  }
10405
10458
 
10406
10459
  return Promise.race([
@@ -10420,65 +10473,73 @@ pushPubKey(bearerToken: string,
10420
10473
  }
10421
10474
 
10422
10475
  /** List onboarding step. */
10423
- listOnboardingStep(bearerToken: string,
10424
- clanId?:string,
10425
- limit?:number,
10426
- page?:number,
10427
- options: any = {}): Promise<ApiListOnboardingStepResponse> {
10428
-
10429
- const urlPath = "/v2/onboardingsteps";
10430
- const queryParams = new Map<string, any>();
10431
- queryParams.set("clan_id", clanId);
10432
- queryParams.set("limit", limit);
10433
- queryParams.set("page", page);
10434
-
10435
- let bodyJson : string = "";
10436
-
10437
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10438
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10439
- if (bearerToken) {
10440
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10441
- }
10442
-
10443
- return Promise.race([
10444
- fetch(fullUrl, fetchOptions).then((response) => {
10445
- if (response.status == 204) {
10446
- return response;
10447
- } else if (response.status >= 200 && response.status < 300) {
10448
- return response.json();
10449
- } else {
10450
- throw response;
10451
- }
10452
- }),
10453
- new Promise((_, reject) =>
10454
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10455
- ),
10456
- ]);
10457
- }
10476
+ listOnboardingStep(
10477
+ bearerToken: string,
10478
+ clanId?: string,
10479
+ limit?: number,
10480
+ page?: number,
10481
+ options: any = {}
10482
+ ): Promise<ApiListOnboardingStepResponse> {
10483
+ const urlPath = "/v2/onboardingsteps";
10484
+ const queryParams = new Map<string, any>();
10485
+ queryParams.set("clan_id", clanId);
10486
+ queryParams.set("limit", limit);
10487
+ queryParams.set("page", page);
10488
+
10489
+ let bodyJson: string = "";
10490
+
10491
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10492
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10493
+ if (bearerToken) {
10494
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10495
+ }
10496
+
10497
+ return Promise.race([
10498
+ fetch(fullUrl, fetchOptions).then((response) => {
10499
+ if (response.status == 204) {
10500
+ return response;
10501
+ } else if (response.status >= 200 && response.status < 300) {
10502
+ return response.json();
10503
+ } else {
10504
+ throw response;
10505
+ }
10506
+ }),
10507
+ new Promise((_, reject) =>
10508
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10509
+ ),
10510
+ ]);
10511
+ }
10458
10512
 
10459
10513
  /** Update onboarding step. */
10460
- updateOnboardingStepByClanId(bearerToken: string,
10461
- clanId:string,
10462
- body:MezonUpdateOnboardingStepByClanIdBody,
10463
- options: any = {}): Promise<any> {
10464
-
10514
+ updateOnboardingStepByClanId(
10515
+ bearerToken: string,
10516
+ clanId: string,
10517
+ body: MezonUpdateOnboardingStepByClanIdBody,
10518
+ options: any = {}
10519
+ ): Promise<any> {
10465
10520
  if (clanId === null || clanId === undefined) {
10466
- throw new Error("'clanId' is a required parameter but is null or undefined.");
10521
+ throw new Error(
10522
+ "'clanId' is a required parameter but is null or undefined."
10523
+ );
10467
10524
  }
10468
10525
  if (body === null || body === undefined) {
10469
- throw new Error("'body' is a required parameter but is null or undefined.");
10526
+ throw new Error(
10527
+ "'body' is a required parameter but is null or undefined."
10528
+ );
10470
10529
  }
10471
- const urlPath = "/v2/onboardingsteps/{clanId}"
10472
- .replace("{clanId}", encodeURIComponent(String(clanId)));
10530
+ const urlPath = "/v2/onboardingsteps/{clanId}".replace(
10531
+ "{clanId}",
10532
+ encodeURIComponent(String(clanId))
10533
+ );
10473
10534
  const queryParams = new Map<string, any>();
10474
10535
 
10475
- let bodyJson : string = "";
10536
+ let bodyJson: string = "";
10476
10537
  bodyJson = JSON.stringify(body || {});
10477
10538
 
10478
10539
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10479
10540
  const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
10480
10541
  if (bearerToken) {
10481
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10542
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10482
10543
  }
10483
10544
 
10484
10545
  return Promise.race([