mezon-js 2.13.70 → 2.13.71

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,18 @@ export interface MezonUpdateChannelDescBody {
179
179
  topic?: string;
180
180
  }
181
181
 
182
+ /** */
183
+ export interface ApiLogedDeviceList {
184
+ //
185
+ device_name?: string;
186
+ //
187
+ loged_time?: string;
188
+ //
189
+ platform?: string;
190
+ //
191
+ status?: number;
192
+ }
193
+
182
194
  /** */
183
195
  export interface MezonUpdateClanDescBody {
184
196
  //
@@ -4196,19 +4208,21 @@ export class MezonApi {
4196
4208
  if (bearerToken) {
4197
4209
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4198
4210
  }
4211
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4199
4212
 
4200
4213
  return Promise.race([
4201
- fetch(fullUrl, fetchOptions).then((response) => {
4214
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4202
4215
  if (response.status == 204) {
4203
- return response;
4216
+ return {} as ApiListUserActivity;
4204
4217
  } else if (response.status >= 200 && response.status < 300) {
4205
- return response.json();
4218
+ const buffer = await response.arrayBuffer();
4219
+ return tsproto.ListUserActivity.decode(new Uint8Array(buffer)) as unknown as ApiListUserActivity;
4206
4220
  } else {
4207
4221
  throw response;
4208
4222
  }
4209
4223
  }),
4210
- new Promise((_, reject) =>
4211
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4224
+ new Promise<never>((_, reject) =>
4225
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4212
4226
  ),
4213
4227
  ]);
4214
4228
  }
@@ -4312,19 +4326,21 @@ export class MezonApi {
4312
4326
  if (bearerToken) {
4313
4327
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4314
4328
  }
4329
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4315
4330
 
4316
4331
  return Promise.race([
4317
- fetch(fullUrl, fetchOptions).then((response) => {
4332
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4318
4333
  if (response.status == 204) {
4319
- return response;
4334
+ return {} as ApiAppList;
4320
4335
  } else if (response.status >= 200 && response.status < 300) {
4321
- return response.json();
4336
+ const buffer = await response.arrayBuffer();
4337
+ return tsproto.AppList.decode(new Uint8Array(buffer)) as unknown as ApiAppList;
4322
4338
  } else {
4323
4339
  throw response;
4324
4340
  }
4325
4341
  }),
4326
- new Promise((_, reject) =>
4327
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4342
+ new Promise<never>((_, reject) =>
4343
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4328
4344
  ),
4329
4345
  ]);
4330
4346
  }
@@ -4585,19 +4601,21 @@ export class MezonApi {
4585
4601
  if (bearerToken) {
4586
4602
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4587
4603
  }
4604
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4588
4605
 
4589
4606
  return Promise.race([
4590
- fetch(fullUrl, fetchOptions).then((response) => {
4607
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4591
4608
  if (response.status == 204) {
4592
- return response;
4609
+ return {} as MezonapiListAuditLog;
4593
4610
  } else if (response.status >= 200 && response.status < 300) {
4594
- return response.json();
4611
+ const buffer = await response.arrayBuffer();
4612
+ return tsproto.ListAuditLog.decode(new Uint8Array(buffer)) as unknown as MezonapiListAuditLog;
4595
4613
  } else {
4596
4614
  throw response;
4597
4615
  }
4598
4616
  }),
4599
- new Promise((_, reject) =>
4600
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4617
+ new Promise<never>((_, reject) =>
4618
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4601
4619
  ),
4602
4620
  ]);
4603
4621
  }
@@ -4672,19 +4690,21 @@ export class MezonApi {
4672
4690
  if (bearerToken) {
4673
4691
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4674
4692
  }
4693
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4675
4694
 
4676
4695
  return Promise.race([
4677
- fetch(fullUrl, fetchOptions).then((response) => {
4696
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4678
4697
  if (response.status == 204) {
4679
- return response;
4698
+ return {} as ApiCategoryDescList;
4680
4699
  } else if (response.status >= 200 && response.status < 300) {
4681
- return response.json();
4700
+ const buffer = await response.arrayBuffer();
4701
+ return tsproto.CategoryDescList.decode(new Uint8Array(buffer)) as unknown as ApiCategoryDescList;
4682
4702
  } else {
4683
4703
  throw response;
4684
4704
  }
4685
4705
  }),
4686
- new Promise((_, reject) =>
4687
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4706
+ new Promise<never>((_, reject) =>
4707
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4688
4708
  ),
4689
4709
  ]);
4690
4710
  }
@@ -4706,19 +4726,21 @@ export class MezonApi {
4706
4726
  if (bearerToken) {
4707
4727
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4708
4728
  }
4729
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4709
4730
 
4710
4731
  return Promise.race([
4711
- fetch(fullUrl, fetchOptions).then((response) => {
4732
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4712
4733
  if (response.status == 204) {
4713
- return response;
4734
+ return {} as ApiListChannelAppsResponse;
4714
4735
  } else if (response.status >= 200 && response.status < 300) {
4715
- return response.json();
4736
+ const buffer = await response.arrayBuffer();
4737
+ return tsproto.ListChannelAppsResponse.decode(new Uint8Array(buffer)) as unknown as ApiListChannelAppsResponse;
4716
4738
  } else {
4717
4739
  throw response;
4718
4740
  }
4719
4741
  }),
4720
- new Promise((_, reject) =>
4721
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4742
+ new Promise<never>((_, reject) =>
4743
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4722
4744
  ),
4723
4745
  ]);
4724
4746
  }
@@ -4753,19 +4775,21 @@ export class MezonApi {
4753
4775
  if (bearerToken) {
4754
4776
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4755
4777
  }
4778
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4756
4779
 
4757
4780
  return Promise.race([
4758
- fetch(fullUrl, fetchOptions).then((response) => {
4781
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4759
4782
  if (response.status == 204) {
4760
- return response;
4783
+ return {} as ApiChannelCanvasListResponse;
4761
4784
  } else if (response.status >= 200 && response.status < 300) {
4762
- return response.json();
4785
+ const buffer = await response.arrayBuffer();
4786
+ return tsproto.ChannelCanvasListResponse.decode(new Uint8Array(buffer)) as unknown as ApiChannelCanvasListResponse;
4763
4787
  } else {
4764
4788
  throw response;
4765
4789
  }
4766
4790
  }),
4767
- new Promise((_, reject) =>
4768
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4791
+ new Promise<never>((_, reject) =>
4792
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4769
4793
  ),
4770
4794
  ]);
4771
4795
  }
@@ -4871,19 +4895,21 @@ export class MezonApi {
4871
4895
  if (bearerToken) {
4872
4896
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
4873
4897
  }
4898
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
4874
4899
 
4875
4900
  return Promise.race([
4876
- fetch(fullUrl, fetchOptions).then((response) => {
4901
+ fetch(fullUrl, fetchOptions).then(async (response) => {
4877
4902
  if (response.status == 204) {
4878
- return response;
4903
+ return {} as ApiListFavoriteChannelResponse;
4879
4904
  } else if (response.status >= 200 && response.status < 300) {
4880
- return response.json();
4905
+ const buffer = await response.arrayBuffer();
4906
+ return tsproto.ListFavoriteChannelResponse.decode(new Uint8Array(buffer)) as unknown as ApiListFavoriteChannelResponse;
4881
4907
  } else {
4882
4908
  throw response;
4883
4909
  }
4884
4910
  }),
4885
- new Promise((_, reject) =>
4886
- setTimeout(reject, this.timeoutMs, "Request timed out.")
4911
+ new Promise<never>((_, reject) =>
4912
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
4887
4913
  ),
4888
4914
  ]);
4889
4915
  }
@@ -5017,19 +5043,21 @@ export class MezonApi {
5017
5043
  if (bearerToken) {
5018
5044
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5019
5045
  }
5046
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
5020
5047
 
5021
5048
  return Promise.race([
5022
- fetch(fullUrl, fetchOptions).then((response) => {
5049
+ fetch(fullUrl, fetchOptions).then(async (response) => {
5023
5050
  if (response.status == 204) {
5024
- return response;
5051
+ return {} as ApiChannelAttachmentList;
5025
5052
  } else if (response.status >= 200 && response.status < 300) {
5026
- return response.json();
5053
+ const buffer = await response.arrayBuffer();
5054
+ return tsproto.ChannelAttachmentList.decode(new Uint8Array(buffer)) as unknown as ApiChannelAttachmentList;
5027
5055
  } else {
5028
5056
  throw response;
5029
5057
  }
5030
5058
  }),
5031
- new Promise((_, reject) =>
5032
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5059
+ new Promise<never>((_, reject) =>
5060
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
5033
5061
  ),
5034
5062
  ]);
5035
5063
  }
@@ -5240,19 +5268,21 @@ export class MezonApi {
5240
5268
  if (bearerToken) {
5241
5269
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5242
5270
  }
5271
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
5243
5272
 
5244
5273
  return Promise.race([
5245
- fetch(fullUrl, fetchOptions).then((response) => {
5274
+ fetch(fullUrl, fetchOptions).then(async(response) => {
5246
5275
  if (response.status == 204) {
5247
- return response;
5276
+ return {} as ApiChannelUserList;
5248
5277
  } else if (response.status >= 200 && response.status < 300) {
5249
- return response.json();
5278
+ const buffer = await response.arrayBuffer();
5279
+ return tsproto.ChannelUserList.decode(new Uint8Array(buffer)) as unknown as ApiChannelUserList;
5250
5280
  } else {
5251
5281
  throw response;
5252
5282
  }
5253
5283
  }),
5254
- new Promise((_, reject) =>
5255
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5284
+ new Promise<never>((_, reject) =>
5285
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
5256
5286
  ),
5257
5287
  ]);
5258
5288
  }
@@ -5833,19 +5863,21 @@ export class MezonApi {
5833
5863
  if (bearerToken) {
5834
5864
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
5835
5865
  }
5866
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
5836
5867
 
5837
5868
  return Promise.race([
5838
- fetch(fullUrl, fetchOptions).then((response) => {
5869
+ fetch(fullUrl, fetchOptions).then(async(response) => {
5839
5870
  if (response.status == 204) {
5840
- return response;
5871
+ return {} as ApiBannedUserList;
5841
5872
  } else if (response.status >= 200 && response.status < 300) {
5842
- return response.json();
5873
+ const buffer = await response.arrayBuffer();
5874
+ return tsproto.BannedUserList.decode(new Uint8Array(buffer)) as unknown as ApiBannedUserList;
5843
5875
  } else {
5844
5876
  throw response;
5845
5877
  }
5846
5878
  }),
5847
- new Promise((_, reject) =>
5848
- setTimeout(reject, this.timeoutMs, "Request timed out.")
5879
+ new Promise<never>((_, reject) =>
5880
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
5849
5881
  ),
5850
5882
  ]);
5851
5883
  }
@@ -7131,19 +7163,21 @@ export class MezonApi {
7131
7163
  if (bearerToken) {
7132
7164
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7133
7165
  }
7166
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
7134
7167
 
7135
7168
  return Promise.race([
7136
- fetch(fullUrl, fetchOptions).then((response) => {
7169
+ fetch(fullUrl, fetchOptions).then(async(response) => {
7137
7170
  if (response.status == 204) {
7138
- return response;
7171
+ return {} as ApiNotifiReactMessage;
7139
7172
  } else if (response.status >= 200 && response.status < 300) {
7140
- return response.json();
7173
+ const buffer = await response.arrayBuffer();
7174
+ return tsproto.NotifiReactMessage.decode(new Uint8Array(buffer)) as unknown as ApiNotifiReactMessage;
7141
7175
  } else {
7142
7176
  throw response;
7143
7177
  }
7144
7178
  }),
7145
- new Promise((_, reject) =>
7146
- setTimeout(reject, this.timeoutMs, "Request timed out.")
7179
+ new Promise<never>((_, reject) =>
7180
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
7147
7181
  ),
7148
7182
  ]);
7149
7183
  }
@@ -7219,42 +7253,6 @@ export class MezonApi {
7219
7253
  ]);
7220
7254
  }
7221
7255
 
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
7256
  /** Add users to a channel. */
7259
7257
  createLinkInviteUser(
7260
7258
  bearerToken: string,
@@ -7465,19 +7463,21 @@ export class MezonApi {
7465
7463
  if (bearerToken) {
7466
7464
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
7467
7465
  }
7466
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
7468
7467
 
7469
7468
  return Promise.race([
7470
- fetch(fullUrl, fetchOptions).then((response) => {
7469
+ fetch(fullUrl, fetchOptions).then(async (response) => {
7471
7470
  if (response.status == 204) {
7472
- return response;
7471
+ return {} as ApiMezonOauthClientList;
7473
7472
  } else if (response.status >= 200 && response.status < 300) {
7474
- return response.json();
7473
+ const buffer = await response.arrayBuffer();
7474
+ return tsproto.MezonOauthClientList.decode(new Uint8Array(buffer)) as unknown as ApiMezonOauthClientList;
7475
7475
  } else {
7476
7476
  throw response;
7477
7477
  }
7478
7478
  }),
7479
- new Promise((_, reject) =>
7480
- setTimeout(reject, this.timeoutMs, "Request timed out.")
7479
+ new Promise<never>((_, reject) =>
7480
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
7481
7481
  ),
7482
7482
  ]);
7483
7483
  }
@@ -8886,20 +8886,22 @@ export class MezonApi {
8886
8886
  if (bearerToken) {
8887
8887
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
8888
8888
  }
8889
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
8889
8890
 
8890
8891
  return Promise.race([
8891
- fetch(fullUrl, fetchOptions).then((response) => {
8892
+ fetch(fullUrl, fetchOptions).then(async (response) => {
8892
8893
  if (response.status == 204) {
8893
- return response;
8894
+ return {} as ApiChannelDescList;
8894
8895
  } else if (response.status >= 200 && response.status < 300) {
8895
- return response.json();
8896
+ const buffer = await response.arrayBuffer();
8897
+ return tsproto.ChannelDescList.decode(new Uint8Array(buffer)) as unknown as ApiChannelDescList;
8896
8898
  } else {
8897
8899
  throw response;
8898
8900
  }
8899
8901
  }),
8900
- new Promise((_, reject) =>
8901
- setTimeout(reject, this.timeoutMs, "Request timed out.")
8902
- ),
8902
+ new Promise<never>((_, reject) =>
8903
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
8904
+ ),
8903
8905
  ]);
8904
8906
  }
8905
8907
 
@@ -9862,19 +9864,21 @@ export class MezonApi {
9862
9864
  if (bearerToken) {
9863
9865
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
9864
9866
  }
9867
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
9865
9868
 
9866
9869
  return Promise.race([
9867
- fetch(fullUrl, fetchOptions).then((response) => {
9870
+ fetch(fullUrl, fetchOptions).then(async (response) => {
9868
9871
  if (response.status == 204) {
9869
- return response;
9872
+ return {} as ApiUserPermissionInChannelListResponse;
9870
9873
  } else if (response.status >= 200 && response.status < 300) {
9871
- return response.json();
9874
+ const buffer = await response.arrayBuffer();
9875
+ return tsproto.UserPermissionInChannelListResponse.decode(new Uint8Array(buffer)) as unknown as ApiUserPermissionInChannelListResponse;
9872
9876
  } else {
9873
9877
  throw response;
9874
9878
  }
9875
9879
  }),
9876
- new Promise((_, reject) =>
9877
- setTimeout(reject, this.timeoutMs, "Request timed out.")
9880
+ new Promise<never>((_, reject) =>
9881
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
9878
9882
  ),
9879
9883
  ]);
9880
9884
  }
@@ -9950,42 +9954,6 @@ export class MezonApi {
9950
9954
  ]);
9951
9955
  }
9952
9956
 
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
9957
  /** Store wallet key */
9990
9958
  storeWalletKey(bearerToken: string,
9991
9959
  body:ApiStoreWalletKeyRequest,
@@ -10022,45 +9990,6 @@ export class MezonApi {
10022
9990
  ]);
10023
9991
  }
10024
9992
 
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
9993
  /** create webhook */
10065
9994
  generateWebhook(
10066
9995
  bearerToken: string,
@@ -10172,19 +10101,21 @@ export class MezonApi {
10172
10101
  if (bearerToken) {
10173
10102
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10174
10103
  }
10104
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
10175
10105
 
10176
10106
  return Promise.race([
10177
- fetch(fullUrl, fetchOptions).then((response) => {
10107
+ fetch(fullUrl, fetchOptions).then(async (response) => {
10178
10108
  if (response.status == 204) {
10179
- return response;
10109
+ return {} as ApiWebhookListResponse;
10180
10110
  } else if (response.status >= 200 && response.status < 300) {
10181
- return response.json();
10111
+ const buffer = await response.arrayBuffer();
10112
+ return tsproto.WebhookListResponse.decode(new Uint8Array(buffer)) as unknown as ApiWebhookListResponse;
10182
10113
  } else {
10183
10114
  throw response;
10184
10115
  }
10185
10116
  }),
10186
- new Promise((_, reject) =>
10187
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10117
+ new Promise<never>((_, reject) =>
10118
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
10188
10119
  ),
10189
10120
  ]);
10190
10121
  }
@@ -10658,19 +10589,21 @@ export class MezonApi {
10658
10589
  if (bearerToken) {
10659
10590
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10660
10591
  }
10592
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
10661
10593
 
10662
10594
  return Promise.race([
10663
- fetch(fullUrl, fetchOptions).then((response) => {
10595
+ fetch(fullUrl, fetchOptions).then(async (response) => {
10664
10596
  if (response.status == 204) {
10665
- return response;
10597
+ return {} as ApiListClanWebhookResponse;
10666
10598
  } else if (response.status >= 200 && response.status < 300) {
10667
- return response.json();
10599
+ const buffer = await response.arrayBuffer();
10600
+ return tsproto.ListClanWebhookResponse.decode(new Uint8Array(buffer)) as unknown as ApiListClanWebhookResponse;
10668
10601
  } else {
10669
10602
  throw response;
10670
10603
  }
10671
10604
  }),
10672
- new Promise((_, reject) =>
10673
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10605
+ new Promise<never>((_, reject) =>
10606
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
10674
10607
  ),
10675
10608
  ]);
10676
10609
  }
@@ -11336,19 +11269,21 @@ export class MezonApi {
11336
11269
  if (bearerToken) {
11337
11270
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11338
11271
  }
11272
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11339
11273
 
11340
11274
  return Promise.race([
11341
- fetch(fullUrl, fetchOptions).then((response) => {
11275
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11342
11276
  if (response.status == 204) {
11343
- return response;
11277
+ return {} as ApiChannelDescription;
11344
11278
  } else if (response.status >= 200 && response.status < 300) {
11345
- return response.json();
11279
+ const buffer = await response.arrayBuffer();
11280
+ return tsproto.ChannelDescription.decode(new Uint8Array(buffer)) as unknown as ApiChannelDescription;
11346
11281
  } else {
11347
11282
  throw response;
11348
11283
  }
11349
11284
  }),
11350
- new Promise((_, reject) =>
11351
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11285
+ new Promise<never>((_, reject) =>
11286
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11352
11287
  ),
11353
11288
  ]);
11354
11289
  }
@@ -11773,23 +11708,25 @@ export class MezonApi {
11773
11708
  let bodyJson : string = "";
11774
11709
 
11775
11710
  const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11776
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
11711
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
11777
11712
  if (bearerToken) {
11778
11713
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11779
11714
  }
11715
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11780
11716
 
11781
11717
  return Promise.race([
11782
- fetch(fullUrl, fetchOptions).then((response) => {
11718
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11783
11719
  if (response.status == 204) {
11784
- return response;
11720
+ return {} as ApiIsBannedResponse;
11785
11721
  } else if (response.status >= 200 && response.status < 300) {
11786
- return response.json();
11722
+ const buffer = await response.arrayBuffer();
11723
+ return tsproto.IsBannedResponse.decode(new Uint8Array(buffer)) as unknown as ApiIsBannedResponse;
11787
11724
  } else {
11788
11725
  throw response;
11789
11726
  }
11790
11727
  }),
11791
- new Promise((_, reject) =>
11792
- setTimeout(reject, this.timeoutMs, "Request timed out.")
11728
+ new Promise<never>((_, reject) =>
11729
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11793
11730
  ),
11794
11731
  ]);
11795
11732
  }
@@ -11829,5 +11766,38 @@ export class MezonApi {
11829
11766
  ]);
11830
11767
  }
11831
11768
 
11769
+ /** */
11770
+ listLogedDevice(bearerToken: string,
11771
+ options: any = {}): Promise<ApiLogedDeviceList> {
11772
+
11773
+ const urlPath = "/v2/loged/device";
11774
+ const queryParams = new Map<string, any>();
11775
+
11776
+ let bodyJson : string = "";
11777
+
11778
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
11779
+ const fetchOptions = buildFetchOptions("GET", options, bodyJson);
11780
+ if (bearerToken) {
11781
+ fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
11782
+ }
11783
+ fetchOptions.headers["Accept"] = "application/x-protobuf";
11784
+
11785
+ return Promise.race([
11786
+ fetch(fullUrl, fetchOptions).then(async (response) => {
11787
+ if (response.status == 204) {
11788
+ return response;
11789
+ } else if (response.status >= 200 && response.status < 300) {
11790
+ const buffer = await response.arrayBuffer();
11791
+ return tsproto.LogedDeviceList.decode(new Uint8Array(buffer)) as unknown as ApiLogedDeviceList;
11792
+ } else {
11793
+ throw response;
11794
+ }
11795
+ }),
11796
+ new Promise<never>((_, reject) =>
11797
+ setTimeout(() => reject(new Error("Request timed out.")), this.timeoutMs)
11798
+ ),
11799
+ ]);
11800
+ }
11801
+
11832
11802
  }
11833
11803