mezon-js 2.9.43 → 2.9.46
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 +48 -47
- package/client.ts +1 -0
- package/dist/api.gen.d.ts +5 -2
- package/dist/mezon-js.cjs.js +33 -36
- package/dist/mezon-js.esm.mjs +33 -36
- package/dist/socket.d.ts +2 -0
- package/package.json +1 -1
- package/socket.ts +2 -0
package/api.gen.ts
CHANGED
@@ -560,6 +560,10 @@ export interface ApiChannelCanvasDetailResponse {
|
|
560
560
|
|
561
561
|
/** */
|
562
562
|
export interface ApiChannelCanvasItem {
|
563
|
+
//
|
564
|
+
content?: string;
|
565
|
+
//
|
566
|
+
creator_id?: string;
|
563
567
|
//
|
564
568
|
id?: string;
|
565
569
|
//
|
@@ -2111,6 +2115,8 @@ export interface ApiUser {
|
|
2111
2115
|
//The id of the user's account.
|
2112
2116
|
id?: string;
|
2113
2117
|
//
|
2118
|
+
is_mobile?: boolean;
|
2119
|
+
//
|
2114
2120
|
join_time?: string;
|
2115
2121
|
//The language expected to be a tag which follows the BCP-47 spec.
|
2116
2122
|
lang_tag?: string;
|
@@ -4004,6 +4010,48 @@ export class MezonApi {
|
|
4004
4010
|
]);
|
4005
4011
|
}
|
4006
4012
|
|
4013
|
+
/** */
|
4014
|
+
getChannelCanvasList(bearerToken: string,
|
4015
|
+
channelId:string,
|
4016
|
+
clanId?:string,
|
4017
|
+
limit?:number,
|
4018
|
+
page?:number,
|
4019
|
+
options: any = {}): Promise<ApiChannelCanvasListResponse> {
|
4020
|
+
|
4021
|
+
if (channelId === null || channelId === undefined) {
|
4022
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
4023
|
+
}
|
4024
|
+
const urlPath = "/v2/channel-canvases/{channelId}"
|
4025
|
+
.replace("{channelId}", encodeURIComponent(String(channelId)));
|
4026
|
+
const queryParams = new Map<string, any>();
|
4027
|
+
queryParams.set("clan_id", clanId);
|
4028
|
+
queryParams.set("limit", limit);
|
4029
|
+
queryParams.set("page", page);
|
4030
|
+
|
4031
|
+
let bodyJson : string = "";
|
4032
|
+
|
4033
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
4034
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
4035
|
+
if (bearerToken) {
|
4036
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
4037
|
+
}
|
4038
|
+
|
4039
|
+
return Promise.race([
|
4040
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
4041
|
+
if (response.status == 204) {
|
4042
|
+
return response;
|
4043
|
+
} else if (response.status >= 200 && response.status < 300) {
|
4044
|
+
return response.json();
|
4045
|
+
} else {
|
4046
|
+
throw response;
|
4047
|
+
}
|
4048
|
+
}),
|
4049
|
+
new Promise((_, reject) =>
|
4050
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
4051
|
+
),
|
4052
|
+
]);
|
4053
|
+
}
|
4054
|
+
|
4007
4055
|
/** */
|
4008
4056
|
addChannelFavorite(bearerToken: string,
|
4009
4057
|
body:ApiAddFavoriteChannelRequest,
|
@@ -8846,53 +8894,6 @@ export class MezonApi {
|
|
8846
8894
|
]);
|
8847
8895
|
}
|
8848
8896
|
|
8849
|
-
/** */
|
8850
|
-
getChannelCanvasList(
|
8851
|
-
bearerToken: string,
|
8852
|
-
channelId: string,
|
8853
|
-
clanId?: string,
|
8854
|
-
limit?: number,
|
8855
|
-
page?: number,
|
8856
|
-
options: any = {}
|
8857
|
-
): Promise<ApiChannelCanvasListResponse> {
|
8858
|
-
if (channelId === null || channelId === undefined) {
|
8859
|
-
throw new Error(
|
8860
|
-
"'channelId' is a required parameter but is null or undefined."
|
8861
|
-
);
|
8862
|
-
}
|
8863
|
-
const urlPath = "/v2/channel_canvases/{channelId}".replace(
|
8864
|
-
"{channelId}",
|
8865
|
-
encodeURIComponent(String(channelId))
|
8866
|
-
);
|
8867
|
-
const queryParams = new Map<string, any>();
|
8868
|
-
queryParams.set("clan_id", clanId);
|
8869
|
-
queryParams.set("limit", limit);
|
8870
|
-
queryParams.set("page", page);
|
8871
|
-
|
8872
|
-
let bodyJson: string = "";
|
8873
|
-
|
8874
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
8875
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
8876
|
-
if (bearerToken) {
|
8877
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
8878
|
-
}
|
8879
|
-
|
8880
|
-
return Promise.race([
|
8881
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
8882
|
-
if (response.status == 204) {
|
8883
|
-
return response;
|
8884
|
-
} else if (response.status >= 200 && response.status < 300) {
|
8885
|
-
return response.json();
|
8886
|
-
} else {
|
8887
|
-
throw response;
|
8888
|
-
}
|
8889
|
-
}),
|
8890
|
-
new Promise((_, reject) =>
|
8891
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
8892
|
-
),
|
8893
|
-
]);
|
8894
|
-
}
|
8895
|
-
|
8896
8897
|
/** */
|
8897
8898
|
deleteChannelCanvas(
|
8898
8899
|
bearerToken: string,
|
package/client.ts
CHANGED
@@ -1636,6 +1636,7 @@ export class Client {
|
|
1636
1636
|
lang_tag: gu.user!.lang_tag,
|
1637
1637
|
location: gu.user!.location,
|
1638
1638
|
online: gu.user!.online,
|
1639
|
+
is_mobile: gu.user?.is_mobile,
|
1639
1640
|
steam_id: gu.user!.steam_id,
|
1640
1641
|
timezone: gu.user!.timezone,
|
1641
1642
|
update_time: gu.user!.update_time,
|
package/dist/api.gen.d.ts
CHANGED
@@ -331,6 +331,8 @@ export interface ApiChannelCanvasDetailResponse {
|
|
331
331
|
}
|
332
332
|
/** */
|
333
333
|
export interface ApiChannelCanvasItem {
|
334
|
+
content?: string;
|
335
|
+
creator_id?: string;
|
334
336
|
id?: string;
|
335
337
|
is_default?: boolean;
|
336
338
|
title?: string;
|
@@ -1226,6 +1228,7 @@ export interface ApiUser {
|
|
1226
1228
|
gamecenter_id?: string;
|
1227
1229
|
google_id?: string;
|
1228
1230
|
id?: string;
|
1231
|
+
is_mobile?: boolean;
|
1229
1232
|
join_time?: string;
|
1230
1233
|
lang_tag?: string;
|
1231
1234
|
location?: string;
|
@@ -1398,6 +1401,8 @@ export declare class MezonApi {
|
|
1398
1401
|
/** List channel apps. */
|
1399
1402
|
listChannelApps(bearerToken: string, clanId?: string, options?: any): Promise<ApiListChannelAppsResponse>;
|
1400
1403
|
/** */
|
1404
|
+
getChannelCanvasList(bearerToken: string, channelId: string, clanId?: string, limit?: number, page?: number, options?: any): Promise<ApiChannelCanvasListResponse>;
|
1405
|
+
/** */
|
1401
1406
|
addChannelFavorite(bearerToken: string, body: ApiAddFavoriteChannelRequest, options?: any): Promise<any>;
|
1402
1407
|
/** */
|
1403
1408
|
removeChannelFavorite(bearerToken: string, channelId: string, options?: any): Promise<any>;
|
@@ -1639,7 +1644,5 @@ export declare class MezonApi {
|
|
1639
1644
|
/** */
|
1640
1645
|
getChannelCanvasDetail(bearerToken: string, id: string, clanId?: string, channelId?: string, options?: any): Promise<ApiChannelCanvasDetailResponse>;
|
1641
1646
|
/** */
|
1642
|
-
getChannelCanvasList(bearerToken: string, channelId: string, clanId?: string, limit?: number, page?: number, options?: any): Promise<ApiChannelCanvasListResponse>;
|
1643
|
-
/** */
|
1644
1647
|
deleteChannelCanvas(bearerToken: string, canvasId: string, clanId?: string, channelId?: string, options?: any): Promise<any>;
|
1645
1648
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -2063,6 +2063,37 @@ var MezonApi = class {
|
|
2063
2063
|
]);
|
2064
2064
|
}
|
2065
2065
|
/** */
|
2066
|
+
getChannelCanvasList(bearerToken, channelId, clanId, limit, page, options = {}) {
|
2067
|
+
if (channelId === null || channelId === void 0) {
|
2068
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
2069
|
+
}
|
2070
|
+
const urlPath = "/v2/channel-canvases/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
2071
|
+
const queryParams = /* @__PURE__ */ new Map();
|
2072
|
+
queryParams.set("clan_id", clanId);
|
2073
|
+
queryParams.set("limit", limit);
|
2074
|
+
queryParams.set("page", page);
|
2075
|
+
let bodyJson = "";
|
2076
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2077
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
2078
|
+
if (bearerToken) {
|
2079
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
2080
|
+
}
|
2081
|
+
return Promise.race([
|
2082
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
2083
|
+
if (response.status == 204) {
|
2084
|
+
return response;
|
2085
|
+
} else if (response.status >= 200 && response.status < 300) {
|
2086
|
+
return response.json();
|
2087
|
+
} else {
|
2088
|
+
throw response;
|
2089
|
+
}
|
2090
|
+
}),
|
2091
|
+
new Promise(
|
2092
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
2093
|
+
)
|
2094
|
+
]);
|
2095
|
+
}
|
2096
|
+
/** */
|
2066
2097
|
addChannelFavorite(bearerToken, body, options = {}) {
|
2067
2098
|
if (body === null || body === void 0) {
|
2068
2099
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
@@ -5846,42 +5877,6 @@ var MezonApi = class {
|
|
5846
5877
|
]);
|
5847
5878
|
}
|
5848
5879
|
/** */
|
5849
|
-
getChannelCanvasList(bearerToken, channelId, clanId, limit, page, options = {}) {
|
5850
|
-
if (channelId === null || channelId === void 0) {
|
5851
|
-
throw new Error(
|
5852
|
-
"'channelId' is a required parameter but is null or undefined."
|
5853
|
-
);
|
5854
|
-
}
|
5855
|
-
const urlPath = "/v2/channel_canvases/{channelId}".replace(
|
5856
|
-
"{channelId}",
|
5857
|
-
encodeURIComponent(String(channelId))
|
5858
|
-
);
|
5859
|
-
const queryParams = /* @__PURE__ */ new Map();
|
5860
|
-
queryParams.set("clan_id", clanId);
|
5861
|
-
queryParams.set("limit", limit);
|
5862
|
-
queryParams.set("page", page);
|
5863
|
-
let bodyJson = "";
|
5864
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5865
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
5866
|
-
if (bearerToken) {
|
5867
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5868
|
-
}
|
5869
|
-
return Promise.race([
|
5870
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
5871
|
-
if (response.status == 204) {
|
5872
|
-
return response;
|
5873
|
-
} else if (response.status >= 200 && response.status < 300) {
|
5874
|
-
return response.json();
|
5875
|
-
} else {
|
5876
|
-
throw response;
|
5877
|
-
}
|
5878
|
-
}),
|
5879
|
-
new Promise(
|
5880
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5881
|
-
)
|
5882
|
-
]);
|
5883
|
-
}
|
5884
|
-
/** */
|
5885
5880
|
deleteChannelCanvas(bearerToken, canvasId, clanId, channelId, options = {}) {
|
5886
5881
|
if (canvasId === null || canvasId === void 0) {
|
5887
5882
|
throw new Error(
|
@@ -7431,6 +7426,7 @@ var Client = class {
|
|
7431
7426
|
return Promise.resolve(result);
|
7432
7427
|
}
|
7433
7428
|
response.clan_users.forEach((gu) => {
|
7429
|
+
var _a;
|
7434
7430
|
result.clan_users.push({
|
7435
7431
|
user: {
|
7436
7432
|
avatar_url: gu.user.avatar_url,
|
@@ -7444,6 +7440,7 @@ var Client = class {
|
|
7444
7440
|
lang_tag: gu.user.lang_tag,
|
7445
7441
|
location: gu.user.location,
|
7446
7442
|
online: gu.user.online,
|
7443
|
+
is_mobile: (_a = gu.user) == null ? void 0 : _a.is_mobile,
|
7447
7444
|
steam_id: gu.user.steam_id,
|
7448
7445
|
timezone: gu.user.timezone,
|
7449
7446
|
update_time: gu.user.update_time,
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -2034,6 +2034,37 @@ var MezonApi = class {
|
|
2034
2034
|
]);
|
2035
2035
|
}
|
2036
2036
|
/** */
|
2037
|
+
getChannelCanvasList(bearerToken, channelId, clanId, limit, page, options = {}) {
|
2038
|
+
if (channelId === null || channelId === void 0) {
|
2039
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
2040
|
+
}
|
2041
|
+
const urlPath = "/v2/channel-canvases/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
2042
|
+
const queryParams = /* @__PURE__ */ new Map();
|
2043
|
+
queryParams.set("clan_id", clanId);
|
2044
|
+
queryParams.set("limit", limit);
|
2045
|
+
queryParams.set("page", page);
|
2046
|
+
let bodyJson = "";
|
2047
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2048
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
2049
|
+
if (bearerToken) {
|
2050
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
2051
|
+
}
|
2052
|
+
return Promise.race([
|
2053
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
2054
|
+
if (response.status == 204) {
|
2055
|
+
return response;
|
2056
|
+
} else if (response.status >= 200 && response.status < 300) {
|
2057
|
+
return response.json();
|
2058
|
+
} else {
|
2059
|
+
throw response;
|
2060
|
+
}
|
2061
|
+
}),
|
2062
|
+
new Promise(
|
2063
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
2064
|
+
)
|
2065
|
+
]);
|
2066
|
+
}
|
2067
|
+
/** */
|
2037
2068
|
addChannelFavorite(bearerToken, body, options = {}) {
|
2038
2069
|
if (body === null || body === void 0) {
|
2039
2070
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
@@ -5817,42 +5848,6 @@ var MezonApi = class {
|
|
5817
5848
|
]);
|
5818
5849
|
}
|
5819
5850
|
/** */
|
5820
|
-
getChannelCanvasList(bearerToken, channelId, clanId, limit, page, options = {}) {
|
5821
|
-
if (channelId === null || channelId === void 0) {
|
5822
|
-
throw new Error(
|
5823
|
-
"'channelId' is a required parameter but is null or undefined."
|
5824
|
-
);
|
5825
|
-
}
|
5826
|
-
const urlPath = "/v2/channel_canvases/{channelId}".replace(
|
5827
|
-
"{channelId}",
|
5828
|
-
encodeURIComponent(String(channelId))
|
5829
|
-
);
|
5830
|
-
const queryParams = /* @__PURE__ */ new Map();
|
5831
|
-
queryParams.set("clan_id", clanId);
|
5832
|
-
queryParams.set("limit", limit);
|
5833
|
-
queryParams.set("page", page);
|
5834
|
-
let bodyJson = "";
|
5835
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5836
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
5837
|
-
if (bearerToken) {
|
5838
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5839
|
-
}
|
5840
|
-
return Promise.race([
|
5841
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
5842
|
-
if (response.status == 204) {
|
5843
|
-
return response;
|
5844
|
-
} else if (response.status >= 200 && response.status < 300) {
|
5845
|
-
return response.json();
|
5846
|
-
} else {
|
5847
|
-
throw response;
|
5848
|
-
}
|
5849
|
-
}),
|
5850
|
-
new Promise(
|
5851
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5852
|
-
)
|
5853
|
-
]);
|
5854
|
-
}
|
5855
|
-
/** */
|
5856
5851
|
deleteChannelCanvas(bearerToken, canvasId, clanId, channelId, options = {}) {
|
5857
5852
|
if (canvasId === null || canvasId === void 0) {
|
5858
5853
|
throw new Error(
|
@@ -7402,6 +7397,7 @@ var Client = class {
|
|
7402
7397
|
return Promise.resolve(result);
|
7403
7398
|
}
|
7404
7399
|
response.clan_users.forEach((gu) => {
|
7400
|
+
var _a;
|
7405
7401
|
result.clan_users.push({
|
7406
7402
|
user: {
|
7407
7403
|
avatar_url: gu.user.avatar_url,
|
@@ -7415,6 +7411,7 @@ var Client = class {
|
|
7415
7411
|
lang_tag: gu.user.lang_tag,
|
7416
7412
|
location: gu.user.location,
|
7417
7413
|
online: gu.user.online,
|
7414
|
+
is_mobile: (_a = gu.user) == null ? void 0 : _a.is_mobile,
|
7418
7415
|
steam_id: gu.user.steam_id,
|
7419
7416
|
timezone: gu.user.timezone,
|
7420
7417
|
update_time: gu.user.update_time,
|
package/dist/socket.d.ts
CHANGED
package/package.json
CHANGED