mezon-js 2.13.70 → 2.13.72

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
@@ -179,6 +179,31 @@ export interface MezonUpdateChannelDescBody {
179
179
  topic?: string;
180
180
  }
181
181
 
182
+
183
+ /** */
184
+ export interface ApiLogedDevice {
185
+ //
186
+ device_id?: string;
187
+ //
188
+ device_name?: string;
189
+ //
190
+ ip?: string;
191
+ //
192
+ last_active?: string;
193
+ //
194
+ login_at?: string;
195
+ //
196
+ platform?: string;
197
+ //
198
+ status?: number;
199
+ }
200
+
201
+ /** */
202
+ export interface ApiLogedDeviceList {
203
+ //
204
+ devices?: Array<ApiLogedDevice>;
205
+ }
206
+
182
207
  /** */
183
208
  export interface MezonUpdateClanDescBody {
184
209
  //
@@ -4196,19 +4221,21 @@ export class MezonApi {
4196
4221
  if (bearerToken) {
4197
4222
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4198
4223
  }
4224
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4199
4225
 
4200
4226
  return Promise.race([
4201
- fetch(fullUrl, fetchOptions).then((response) => {
4227
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4202
4228
  if (response.status == 204) {
4203
- return response;
4229
+ return {} as ApiListUserActivity;
4204
4230
  } else if (response.status >= 200 && response.status < 300) {
4205
- return response.json();
4231
+ const buffer = await response.arrayBuffer();
4232
+ return tsproto.ListUserActivity.decode(new Uint8Array(buffer)) as unknown as ApiListUserActivity;
4206
4233
  } else {
4207
4234
  throw response;
4208
4235
  }
4209
4236
  }),
4210
- new Promise((_, reject) =>
4211
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4237
+ new Promise<never>((_, reject) =>
4238
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4212
4239
  ),
4213
4240
  ]);
4214
4241
  }
@@ -4312,19 +4339,21 @@ export class MezonApi {
4312
4339
  if (bearerToken) {
4313
4340
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4314
4341
  }
4342
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4315
4343
 
4316
4344
  return Promise.race([
4317
- fetch(fullUrl, fetchOptions).then((response) => {
4345
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4318
4346
  if (response.status == 204) {
4319
- return response;
4347
+ return {} as ApiAppList;
4320
4348
  } else if (response.status >= 200 && response.status < 300) {
4321
- return response.json();
4349
+ const buffer = await response.arrayBuffer();
4350
+ return tsproto.AppList.decode(new Uint8Array(buffer)) as unknown as ApiAppList;
4322
4351
  } else {
4323
4352
  throw response;
4324
4353
  }
4325
4354
  }),
4326
- new Promise((_, reject) =>
4327
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4355
+ new Promise<never>((_, reject) =>
4356
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4328
4357
  ),
4329
4358
  ]);
4330
4359
  }
@@ -4585,19 +4614,21 @@ export class MezonApi {
4585
4614
  if (bearerToken) {
4586
4615
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4587
4616
  }
4617
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4588
4618
 
4589
4619
  return Promise.race([
4590
- fetch(fullUrl, fetchOptions).then((response) => {
4620
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4591
4621
  if (response.status == 204) {
4592
- return response;
4622
+ return {} as MezonapiListAuditLog;
4593
4623
  } else if (response.status >= 200 && response.status < 300) {
4594
- return response.json();
4624
+ const buffer = await response.arrayBuffer();
4625
+ return tsproto.ListAuditLog.decode(new Uint8Array(buffer)) as unknown as MezonapiListAuditLog;
4595
4626
  } else {
4596
4627
  throw response;
4597
4628
  }
4598
4629
  }),
4599
- new Promise((_, reject) =>
4600
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4630
+ new Promise<never>((_, reject) =>
4631
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4601
4632
  ),
4602
4633
  ]);
4603
4634
  }
@@ -4672,19 +4703,21 @@ export class MezonApi {
4672
4703
  if (bearerToken) {
4673
4704
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4674
4705
  }
4706
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4675
4707
 
4676
4708
  return Promise.race([
4677
- fetch(fullUrl, fetchOptions).then((response) => {
4709
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4678
4710
  if (response.status == 204) {
4679
- return response;
4711
+ return {} as ApiCategoryDescList;
4680
4712
  } else if (response.status >= 200 && response.status < 300) {
4681
- return response.json();
4713
+ const buffer = await response.arrayBuffer();
4714
+ return tsproto.CategoryDescList.decode(new Uint8Array(buffer)) as unknown as ApiCategoryDescList;
4682
4715
  } else {
4683
4716
  throw response;
4684
4717
  }
4685
4718
  }),
4686
- new Promise((_, reject) =>
4687
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4719
+ new Promise<never>((_, reject) =>
4720
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4688
4721
  ),
4689
4722
  ]);
4690
4723
  }
@@ -4706,19 +4739,21 @@ export class MezonApi {
4706
4739
  if (bearerToken) {
4707
4740
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4708
4741
  }
4742
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4709
4743
 
4710
4744
  return Promise.race([
4711
- fetch(fullUrl, fetchOptions).then((response) => {
4745
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4712
4746
  if (response.status == 204) {
4713
- return response;
4747
+ return {} as ApiListChannelAppsResponse;
4714
4748
  } else if (response.status >= 200 && response.status < 300) {
4715
- return response.json();
4749
+ const buffer = await response.arrayBuffer();
4750
+ return tsproto.ListChannelAppsResponse.decode(new Uint8Array(buffer)) as unknown as ApiListChannelAppsResponse;
4716
4751
  } else {
4717
4752
  throw response;
4718
4753
  }
4719
4754
  }),
4720
- new Promise((_, reject) =>
4721
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4755
+ new Promise<never>((_, reject) =>
4756
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4722
4757
  ),
4723
4758
  ]);
4724
4759
  }
@@ -4753,19 +4788,21 @@ export class MezonApi {
4753
4788
  if (bearerToken) {
4754
4789
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4755
4790
  }
4791
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4756
4792
 
4757
4793
  return Promise.race([
4758
- fetch(fullUrl, fetchOptions).then((response) => {
4794
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4759
4795
  if (response.status == 204) {
4760
- return response;
4796
+ return {} as ApiChannelCanvasListResponse;
4761
4797
  } else if (response.status >= 200 && response.status < 300) {
4762
- return response.json();
4798
+ const buffer = await response.arrayBuffer();
4799
+ return tsproto.ChannelCanvasListResponse.decode(new Uint8Array(buffer)) as unknown as ApiChannelCanvasListResponse;
4763
4800
  } else {
4764
4801
  throw response;
4765
4802
  }
4766
4803
  }),
4767
- new Promise((_, reject) =>
4768
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4804
+ new Promise<never>((_, reject) =>
4805
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4769
4806
  ),
4770
4807
  ]);
4771
4808
  }
@@ -4871,19 +4908,21 @@ export class MezonApi {
4871
4908
  if (bearerToken) {
4872
4909
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4873
4910
  }
4911
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4874
4912
 
4875
4913
  return Promise.race([
4876
- fetch(fullUrl, fetchOptions).then((response) => {
4914
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4877
4915
  if (response.status == 204) {
4878
- return response;
4916
+ return {} as ApiListFavoriteChannelResponse;
4879
4917
  } else if (response.status >= 200 && response.status < 300) {
4880
- return response.json();
4918
+ const buffer = await response.arrayBuffer();
4919
+ return tsproto.ListFavoriteChannelResponse.decode(new Uint8Array(buffer)) as unknown as ApiListFavoriteChannelResponse;
4881
4920
  } else {
4882
4921
  throw response;
4883
4922
  }
4884
4923
  }),
4885
- new Promise((_, reject) =>
4886
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4924
+ new Promise<never>((_, reject) =>
4925
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4887
4926
  ),
4888
4927
  ]);
4889
4928
  }
@@ -5017,19 +5056,21 @@ export class MezonApi {
5017
5056
  if (bearerToken) {
5018
5057
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5019
5058
  }
5059
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
5020
5060
 
5021
5061
  return Promise.race([
5022
- fetch(fullUrl, fetchOptions).then((response) => {
5062
+ fetch(fullUrl, fetchOptions).then(async (response) => {
5023
5063
  if (response.status == 204) {
5024
- return response;
5064
+ return {} as ApiChannelAttachmentList;
5025
5065
  } else if (response.status >= 200 && response.status < 300) {
5026
- return response.json();
5066
+ const buffer = await response.arrayBuffer();
5067
+ return tsproto.ChannelAttachmentList.decode(new Uint8Array(buffer)) as unknown as ApiChannelAttachmentList;
5027
5068
  } else {
5028
5069
  throw response;
5029
5070
  }
5030
5071
  }),
5031
- new Promise((_, reject) =>
5032
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5072
+ new Promise<never>((_, reject) =>
5073
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
5033
5074
  ),
5034
5075
  ]);
5035
5076
  }
@@ -5240,19 +5281,21 @@ export class MezonApi {
5240
5281
  if (bearerToken) {
5241
5282
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5242
5283
  }
5284
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
5243
5285
 
5244
5286
  return Promise.race([
5245
- fetch(fullUrl, fetchOptions).then((response) => {
5287
+ fetch(fullUrl, fetchOptions).then(async(response) => {
5246
5288
  if (response.status == 204) {
5247
- return response;
5289
+ return {} as ApiChannelUserList;
5248
5290
  } else if (response.status >= 200 && response.status < 300) {
5249
- return response.json();
5291
+ const buffer = await response.arrayBuffer();
5292
+ return tsproto.ChannelUserList.decode(new Uint8Array(buffer)) as unknown as ApiChannelUserList;
5250
5293
  } else {
5251
5294
  throw response;
5252
5295
  }
5253
5296
  }),
5254
- new Promise((_, reject) =>
5255
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5297
+ new Promise<never>((_, reject) =>
5298
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
5256
5299
  ),
5257
5300
  ]);
5258
5301
  }
@@ -5833,19 +5876,21 @@ export class MezonApi {
5833
5876
  if (bearerToken) {
5834
5877
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5835
5878
  }
5879
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
5836
5880
 
5837
5881
  return Promise.race([
5838
- fetch(fullUrl, fetchOptions).then((response) => {
5882
+ fetch(fullUrl, fetchOptions).then(async(response) => {
5839
5883
  if (response.status == 204) {
5840
- return response;
5884
+ return {} as ApiBannedUserList;
5841
5885
  } else if (response.status >= 200 && response.status < 300) {
5842
- return response.json();
5886
+ const buffer = await response.arrayBuffer();
5887
+ return tsproto.BannedUserList.decode(new Uint8Array(buffer)) as unknown as ApiBannedUserList;
5843
5888
  } else {
5844
5889
  throw response;
5845
5890
  }
5846
5891
  }),
5847
- new Promise((_, reject) =>
5848
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5892
+ new Promise<never>((_, reject) =>
5893
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
5849
5894
  ),
5850
5895
  ]);
5851
5896
  }
@@ -7131,19 +7176,21 @@ export class MezonApi {
7131
7176
  if (bearerToken) {
7132
7177
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7133
7178
  }
7179
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
7134
7180
 
7135
7181
  return Promise.race([
7136
- fetch(fullUrl, fetchOptions).then((response) => {
7182
+ fetch(fullUrl, fetchOptions).then(async(response) => {
7137
7183
  if (response.status == 204) {
7138
- return response;
7184
+ return {} as ApiNotifiReactMessage;
7139
7185
  } else if (response.status >= 200 && response.status < 300) {
7140
- return response.json();
7186
+ const buffer = await response.arrayBuffer();
7187
+ return tsproto.NotifiReactMessage.decode(new Uint8Array(buffer)) as unknown as ApiNotifiReactMessage;
7141
7188
  } else {
7142
7189
  throw response;
7143
7190
  }
7144
7191
  }),
7145
- new Promise((_, reject) =>
7146
- setTimeout(reject, this.timeoutMs, "Request timed out.")
7192
+ new Promise<never>((_, reject) =>
7193
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
7147
7194
  ),
7148
7195
  ]);
7149
7196
  }
@@ -7219,42 +7266,6 @@ export class MezonApi {
7219
7266
  ]);
7220
7267
  }
7221
7268
 
7222
- /** List HashtagDMList */
7223
- hashtagDMList(
7224
- bearerToken: string,
7225
- userId?: Array<string>,
7226
- limit?: number,
7227
- options: any = {}
7228
- ): Promise<ApiHashtagDmList> {
7229
- const urlPath = "/v2/hashtagdmlist";
7230
- const queryParams = new Map<string, any>();
7231
- queryParams.set("user_id", userId);
7232
- queryParams.set("limit", limit);
7233
-
7234
- let bodyJson: string = "";
7235
-
7236
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
7237
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
7238
- if (bearerToken) {
7239
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7240
- }
7241
-
7242
- return Promise.race([
7243
- fetch(fullUrl, fetchOptions).then((response) => {
7244
- if (response.status == 204) {
7245
- return response;
7246
- } else if (response.status >= 200 && response.status < 300) {
7247
- return response.json();
7248
- } else {
7249
- throw response;
7250
- }
7251
- }),
7252
- new Promise((_, reject) =>
7253
- setTimeout(reject, this.timeoutMs, "Request timed out.")
7254
- ),
7255
- ]);
7256
- }
7257
-
7258
7269
  /** Add users to a channel. */
7259
7270
  createLinkInviteUser(
7260
7271
  bearerToken: string,
@@ -7465,19 +7476,21 @@ export class MezonApi {
7465
7476
  if (bearerToken) {
7466
7477
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7467
7478
  }
7479
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
7468
7480
 
7469
7481
  return Promise.race([
7470
- fetch(fullUrl, fetchOptions).then((response) => {
7482
+ fetch(fullUrl, fetchOptions).then(async (response) => {
7471
7483
  if (response.status == 204) {
7472
- return response;
7484
+ return {} as ApiMezonOauthClientList;
7473
7485
  } else if (response.status >= 200 && response.status < 300) {
7474
- return response.json();
7486
+ const buffer = await response.arrayBuffer();
7487
+ return tsproto.MezonOauthClientList.decode(new Uint8Array(buffer)) as unknown as ApiMezonOauthClientList;
7475
7488
  } else {
7476
7489
  throw response;
7477
7490
  }
7478
7491
  }),
7479
- new Promise((_, reject) =>
7480
- setTimeout(reject, this.timeoutMs, "Request timed out.")
7492
+ new Promise<never>((_, reject) =>
7493
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
7481
7494
  ),
7482
7495
  ]);
7483
7496
  }
@@ -8886,20 +8899,22 @@ export class MezonApi {
8886
8899
  if (bearerToken) {
8887
8900
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8888
8901
  }
8902
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
8889
8903
 
8890
8904
  return Promise.race([
8891
- fetch(fullUrl, fetchOptions).then((response) => {
8905
+ fetch(fullUrl, fetchOptions).then(async (response) => {
8892
8906
  if (response.status == 204) {
8893
- return response;
8907
+ return {} as ApiChannelDescList;
8894
8908
  } else if (response.status >= 200 && response.status < 300) {
8895
- return response.json();
8909
+ const buffer = await response.arrayBuffer();
8910
+ return tsproto.ChannelDescList.decode(new Uint8Array(buffer)) as unknown as ApiChannelDescList;
8896
8911
  } else {
8897
8912
  throw response;
8898
8913
  }
8899
8914
  }),
8900
- new Promise((_, reject) =>
8901
- setTimeout(reject, this.timeoutMs, "Request timed out.")
8902
- ),
8915
+ new Promise<never>((_, reject) =>
8916
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
8917
+ ),
8903
8918
  ]);
8904
8919
  }
8905
8920
 
@@ -9862,19 +9877,21 @@ export class MezonApi {
9862
9877
  if (bearerToken) {
9863
9878
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9864
9879
  }
9880
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
9865
9881
 
9866
9882
  return Promise.race([
9867
- fetch(fullUrl, fetchOptions).then((response) => {
9883
+ fetch(fullUrl, fetchOptions).then(async (response) => {
9868
9884
  if (response.status == 204) {
9869
- return response;
9885
+ return {} as ApiUserPermissionInChannelListResponse;
9870
9886
  } else if (response.status >= 200 && response.status < 300) {
9871
- return response.json();
9887
+ const buffer = await response.arrayBuffer();
9888
+ return tsproto.UserPermissionInChannelListResponse.decode(new Uint8Array(buffer)) as unknown as ApiUserPermissionInChannelListResponse;
9872
9889
  } else {
9873
9890
  throw response;
9874
9891
  }
9875
9892
  }),
9876
- new Promise((_, reject) =>
9877
- setTimeout(reject, this.timeoutMs, "Request timed out.")
9893
+ new Promise<never>((_, reject) =>
9894
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
9878
9895
  ),
9879
9896
  ]);
9880
9897
  }
@@ -9950,42 +9967,6 @@ export class MezonApi {
9950
9967
  ]);
9951
9968
  }
9952
9969
 
9953
- /** list transaction detail */
9954
- listTransactionDetail(bearerToken: string,
9955
- transId:string,
9956
- options: any = {}): Promise<ApiTransactionDetail> {
9957
-
9958
- if (transId === null || transId === undefined) {
9959
- throw new Error("'transId' is a required parameter but is null or undefined.");
9960
- }
9961
- const urlPath = "/v2/transaction/{transId}"
9962
- .replace("{transId}", encodeURIComponent(String(transId)));
9963
- const queryParams = new Map<string, any>();
9964
-
9965
- let bodyJson : string = "";
9966
-
9967
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
9968
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
9969
- if (bearerToken) {
9970
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9971
- }
9972
-
9973
- return Promise.race([
9974
- fetch(fullUrl, fetchOptions).then((response) => {
9975
- if (response.status == 204) {
9976
- return response;
9977
- } else if (response.status >= 200 && response.status < 300) {
9978
- return response.json();
9979
- } else {
9980
- throw response;
9981
- }
9982
- }),
9983
- new Promise((_, reject) =>
9984
- setTimeout(reject, this.timeoutMs, "Request timed out.")
9985
- ),
9986
- ]);
9987
- }
9988
-
9989
9970
  /** Store wallet key */
9990
9971
  storeWalletKey(bearerToken: string,
9991
9972
  body:ApiStoreWalletKeyRequest,
@@ -10022,45 +10003,6 @@ export class MezonApi {
10022
10003
  ]);
10023
10004
  }
10024
10005
 
10025
- /** Get user status */
10026
- listWalletLedger(bearerToken: string,
10027
- limit?:number,
10028
- filter?:number,
10029
- transactionId?:string,
10030
- page?:number,
10031
- options: any = {}): Promise<ApiWalletLedgerList> {
10032
-
10033
- const urlPath = "/v2/walletledger";
10034
- const queryParams = new Map<string, any>();
10035
- queryParams.set("limit", limit);
10036
- queryParams.set("filter", filter);
10037
- queryParams.set("transaction_id", transactionId);
10038
- queryParams.set("page", page);
10039
-
10040
- let bodyJson : string = "";
10041
-
10042
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10043
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
10044
- if (bearerToken) {
10045
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10046
- }
10047
-
10048
- return Promise.race([
10049
- fetch(fullUrl, fetchOptions).then((response) => {
10050
- if (response.status == 204) {
10051
- return response;
10052
- } else if (response.status >= 200 && response.status < 300) {
10053
- return response.json();
10054
- } else {
10055
- throw response;
10056
- }
10057
- }),
10058
- new Promise((_, reject) =>
10059
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10060
- ),
10061
- ]);
10062
- }
10063
-
10064
10006
  /** create webhook */
10065
10007
  generateWebhook(
10066
10008
  bearerToken: string,
@@ -10172,19 +10114,21 @@ export class MezonApi {
10172
10114
  if (bearerToken) {
10173
10115
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10174
10116
  }
10117
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
10175
10118
 
10176
10119
  return Promise.race([
10177
- fetch(fullUrl, fetchOptions).then((response) => {
10120
+ fetch(fullUrl, fetchOptions).then(async (response) => {
10178
10121
  if (response.status == 204) {
10179
- return response;
10122
+ return {} as ApiWebhookListResponse;
10180
10123
  } else if (response.status >= 200 && response.status < 300) {
10181
- return response.json();
10124
+ const buffer = await response.arrayBuffer();
10125
+ return tsproto.WebhookListResponse.decode(new Uint8Array(buffer)) as unknown as ApiWebhookListResponse;
10182
10126
  } else {
10183
10127
  throw response;
10184
10128
  }
10185
10129
  }),
10186
- new Promise((_, reject) =>
10187
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10130
+ new Promise<never>((_, reject) =>
10131
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
10188
10132
  ),
10189
10133
  ]);
10190
10134
  }
@@ -10658,19 +10602,21 @@ export class MezonApi {
10658
10602
  if (bearerToken) {
10659
10603
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10660
10604
  }
10605
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
10661
10606
 
10662
10607
  return Promise.race([
10663
- fetch(fullUrl, fetchOptions).then((response) => {
10608
+ fetch(fullUrl, fetchOptions).then(async (response) => {
10664
10609
  if (response.status == 204) {
10665
- return response;
10610
+ return {} as ApiListClanWebhookResponse;
10666
10611
  } else if (response.status >= 200 && response.status < 300) {
10667
- return response.json();
10612
+ const buffer = await response.arrayBuffer();
10613
+ return tsproto.ListClanWebhookResponse.decode(new Uint8Array(buffer)) as unknown as ApiListClanWebhookResponse;
10668
10614
  } else {
10669
10615
  throw response;
10670
10616
  }
10671
10617
  }),
10672
- new Promise((_, reject) =>
10673
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10618
+ new Promise<never>((_, reject) =>
10619
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
10674
10620
  ),
10675
10621
  ]);
10676
10622
  }
@@ -11336,19 +11282,21 @@ export class MezonApi {
11336
11282
  if (bearerToken) {
11337
11283
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11338
11284
  }
11285
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11339
11286
 
11340
11287
  return Promise.race([
11341
- fetch(fullUrl, fetchOptions).then((response) => {
11288
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11342
11289
  if (response.status == 204) {
11343
- return response;
11290
+ return {} as ApiChannelDescription;
11344
11291
  } else if (response.status >= 200 && response.status < 300) {
11345
- return response.json();
11292
+ const buffer = await response.arrayBuffer();
11293
+ return tsproto.ChannelDescription.decode(new Uint8Array(buffer)) as unknown as ApiChannelDescription;
11346
11294
  } else {
11347
11295
  throw response;
11348
11296
  }
11349
11297
  }),
11350
- new Promise((_, reject) =>
11351
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11298
+ new Promise<never>((_, reject) =>
11299
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11352
11300
  ),
11353
11301
  ]);
11354
11302
  }
@@ -11773,23 +11721,25 @@ export class MezonApi {
11773
11721
  let bodyJson : string = "";
11774
11722
 
11775
11723
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11776
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
11724
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
11777
11725
  if (bearerToken) {
11778
11726
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11779
11727
  }
11728
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11780
11729
 
11781
11730
  return Promise.race([
11782
- fetch(fullUrl, fetchOptions).then((response) => {
11731
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11783
11732
  if (response.status == 204) {
11784
- return response;
11733
+ return {} as ApiIsBannedResponse;
11785
11734
  } else if (response.status >= 200 && response.status < 300) {
11786
- return response.json();
11735
+ const buffer = await response.arrayBuffer();
11736
+ return tsproto.IsBannedResponse.decode(new Uint8Array(buffer)) as unknown as ApiIsBannedResponse;
11787
11737
  } else {
11788
11738
  throw response;
11789
11739
  }
11790
11740
  }),
11791
- new Promise((_, reject) =>
11792
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11741
+ new Promise<never>((_, reject) =>
11742
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11793
11743
  ),
11794
11744
  ]);
11795
11745
  }
@@ -11829,5 +11779,38 @@ export class MezonApi {
11829
11779
  ]);
11830
11780
  }
11831
11781
 
11782
+ /** */
11783
+ listLogedDevice(bearerToken: string,
11784
+ options: any = {}): Promise<ApiLogedDeviceList> {
11785
+
11786
+ const urlPath = "/v2/loged/device";
11787
+ const queryParams = new Map<string, any>();
11788
+
11789
+ let bodyJson : string = "";
11790
+
11791
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11792
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
11793
+ if (bearerToken) {
11794
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11795
+ }
11796
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11797
+
11798
+ return Promise.race([
11799
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11800
+ if (response.status == 204) {
11801
+ return {} as ApiLogedDeviceList;
11802
+ } else if (response.status >= 200 && response.status < 300) {
11803
+ const buffer = await response.arrayBuffer();
11804
+ return tsproto.LogedDeviceList.decode(new Uint8Array(buffer)) as unknown as ApiLogedDeviceList;
11805
+ } else {
11806
+ throw response;
11807
+ }
11808
+ }),
11809
+ new Promise<never>((_, reject) =>
11810
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11811
+ ),
11812
+ ]);
11813
+ }
11814
+
11832
11815
  }
11833
11816