mezon-js 2.9.18 → 2.9.19
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +45 -0
- package/dist/api.gen.d.ts +11 -0
- package/dist/mezon-js.cjs.js +25 -0
- package/dist/mezon-js.esm.mjs +25 -0
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -36,6 +36,14 @@ export interface ClanUserListClanUser {
|
|
36
36
|
user?: ApiUser;
|
37
37
|
}
|
38
38
|
|
39
|
+
/** */
|
40
|
+
export interface CountClanBadgeResponseBadge {
|
41
|
+
//
|
42
|
+
clan_id?: string;
|
43
|
+
//
|
44
|
+
count?: number;
|
45
|
+
}
|
46
|
+
|
39
47
|
/** */
|
40
48
|
export interface MezonChangeChannelCategoryBody {
|
41
49
|
//
|
@@ -823,6 +831,12 @@ export interface ApiClanUserList {
|
|
823
831
|
cursor?: string;
|
824
832
|
}
|
825
833
|
|
834
|
+
/** */
|
835
|
+
export interface ApiCountClanBadgeResponse {
|
836
|
+
//
|
837
|
+
badges?: Array<CountClanBadgeResponseBadge>;
|
838
|
+
}
|
839
|
+
|
826
840
|
/** */
|
827
841
|
export interface ApiCreateCategoryDescRequest {
|
828
842
|
//
|
@@ -3570,6 +3584,37 @@ export class MezonApi {
|
|
3570
3584
|
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
3571
3585
|
),
|
3572
3586
|
]);
|
3587
|
+
}
|
3588
|
+
|
3589
|
+
/** count clan badge */
|
3590
|
+
countClanBadge(bearerToken: string,
|
3591
|
+
options: any = {}): Promise<ApiCountClanBadgeResponse> {
|
3592
|
+
|
3593
|
+
const urlPath = "/v2/badges";
|
3594
|
+
const queryParams = new Map<string, any>();
|
3595
|
+
|
3596
|
+
let bodyJson : string = "";
|
3597
|
+
|
3598
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3599
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
3600
|
+
if (bearerToken) {
|
3601
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
3602
|
+
}
|
3603
|
+
|
3604
|
+
return Promise.race([
|
3605
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
3606
|
+
if (response.status == 204) {
|
3607
|
+
return response;
|
3608
|
+
} else if (response.status >= 200 && response.status < 300) {
|
3609
|
+
return response.json();
|
3610
|
+
} else {
|
3611
|
+
throw response;
|
3612
|
+
}
|
3613
|
+
}),
|
3614
|
+
new Promise((_, reject) =>
|
3615
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
3616
|
+
),
|
3617
|
+
]);
|
3573
3618
|
}
|
3574
3619
|
/** */
|
3575
3620
|
updateCategoryOrder(bearerToken: string,
|
package/dist/api.gen.d.ts
CHANGED
@@ -17,6 +17,11 @@ export interface ClanUserListClanUser {
|
|
17
17
|
user?: ApiUser;
|
18
18
|
}
|
19
19
|
/** */
|
20
|
+
export interface CountClanBadgeResponseBadge {
|
21
|
+
clan_id?: string;
|
22
|
+
count?: number;
|
23
|
+
}
|
24
|
+
/** */
|
20
25
|
export interface MezonChangeChannelCategoryBody {
|
21
26
|
channel_id?: string;
|
22
27
|
}
|
@@ -473,6 +478,10 @@ export interface ApiClanUserList {
|
|
473
478
|
cursor?: string;
|
474
479
|
}
|
475
480
|
/** */
|
481
|
+
export interface ApiCountClanBadgeResponse {
|
482
|
+
badges?: Array<CountClanBadgeResponseBadge>;
|
483
|
+
}
|
484
|
+
/** */
|
476
485
|
export interface ApiCreateCategoryDescRequest {
|
477
486
|
category_name?: string;
|
478
487
|
clan_id?: string;
|
@@ -1272,6 +1281,8 @@ export declare class MezonApi {
|
|
1272
1281
|
banApp(bearerToken: string, id: string, options?: any): Promise<any>;
|
1273
1282
|
/** Unban an app. */
|
1274
1283
|
unbanApp(bearerToken: string, id: string, options?: any): Promise<any>;
|
1284
|
+
/** count clan badge */
|
1285
|
+
countClanBadge(bearerToken: string, options?: any): Promise<ApiCountClanBadgeResponse>;
|
1275
1286
|
/** */
|
1276
1287
|
updateCategoryOrder(bearerToken: string, body: ApiUpdateCategoryOrderRequest, options?: any): Promise<any>;
|
1277
1288
|
/** */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -1885,6 +1885,31 @@ var MezonApi = class {
|
|
1885
1885
|
)
|
1886
1886
|
]);
|
1887
1887
|
}
|
1888
|
+
/** count clan badge */
|
1889
|
+
countClanBadge(bearerToken, options = {}) {
|
1890
|
+
const urlPath = "/v2/badges";
|
1891
|
+
const queryParams = /* @__PURE__ */ new Map();
|
1892
|
+
let bodyJson = "";
|
1893
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
1894
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
1895
|
+
if (bearerToken) {
|
1896
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
1897
|
+
}
|
1898
|
+
return Promise.race([
|
1899
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
1900
|
+
if (response.status == 204) {
|
1901
|
+
return response;
|
1902
|
+
} else if (response.status >= 200 && response.status < 300) {
|
1903
|
+
return response.json();
|
1904
|
+
} else {
|
1905
|
+
throw response;
|
1906
|
+
}
|
1907
|
+
}),
|
1908
|
+
new Promise(
|
1909
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
1910
|
+
)
|
1911
|
+
]);
|
1912
|
+
}
|
1888
1913
|
/** */
|
1889
1914
|
updateCategoryOrder(bearerToken, body, options = {}) {
|
1890
1915
|
if (body === null || body === void 0) {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -1856,6 +1856,31 @@ var MezonApi = class {
|
|
1856
1856
|
)
|
1857
1857
|
]);
|
1858
1858
|
}
|
1859
|
+
/** count clan badge */
|
1860
|
+
countClanBadge(bearerToken, options = {}) {
|
1861
|
+
const urlPath = "/v2/badges";
|
1862
|
+
const queryParams = /* @__PURE__ */ new Map();
|
1863
|
+
let bodyJson = "";
|
1864
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
1865
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
1866
|
+
if (bearerToken) {
|
1867
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
1868
|
+
}
|
1869
|
+
return Promise.race([
|
1870
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
1871
|
+
if (response.status == 204) {
|
1872
|
+
return response;
|
1873
|
+
} else if (response.status >= 200 && response.status < 300) {
|
1874
|
+
return response.json();
|
1875
|
+
} else {
|
1876
|
+
throw response;
|
1877
|
+
}
|
1878
|
+
}),
|
1879
|
+
new Promise(
|
1880
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
1881
|
+
)
|
1882
|
+
]);
|
1883
|
+
}
|
1859
1884
|
/** */
|
1860
1885
|
updateCategoryOrder(bearerToken, body, options = {}) {
|
1861
1886
|
if (body === null || body === void 0) {
|