mezon-js 2.7.18 → 2.7.19
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 +5 -8
- package/client.ts +1 -1
- package/dist/api.gen.d.ts +1 -1
- package/dist/mezon-js.cjs.js +6 -6
- package/dist/mezon-js.esm.mjs +6 -6
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -2846,24 +2846,21 @@ return Promise.race([
|
|
2846
2846
|
/** Update fields in a given clan. */
|
2847
2847
|
updateClanDesc(bearerToken: string,
|
2848
2848
|
clanId:string,
|
2849
|
-
|
2850
|
-
clanName?:string,
|
2851
|
-
logo?:string,
|
2852
|
-
banner?:string,
|
2849
|
+
body: {},
|
2853
2850
|
options: any = {}): Promise<any> {
|
2854
2851
|
|
2855
2852
|
if (clanId === null || clanId === undefined) {
|
2856
2853
|
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
2854
|
+
}
|
2855
|
+
if (body === null || body === undefined) {
|
2856
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
2857
2857
|
}
|
2858
2858
|
const urlPath = "/v2/clandesc/{clanId}"
|
2859
2859
|
.replace("{clanId}", encodeURIComponent(String(clanId)));
|
2860
2860
|
const queryParams = new Map<string, any>();
|
2861
|
-
queryParams.set("creator_id", creatorId);
|
2862
|
-
queryParams.set("clan_name", clanName);
|
2863
|
-
queryParams.set("logo", logo);
|
2864
|
-
queryParams.set("banner", banner);
|
2865
2861
|
|
2866
2862
|
let bodyJson : string = "";
|
2863
|
+
bodyJson = JSON.stringify(body || {});
|
2867
2864
|
|
2868
2865
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2869
2866
|
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
package/client.ts
CHANGED
@@ -1803,7 +1803,7 @@ export class Client {
|
|
1803
1803
|
await this.sessionRefresh(session);
|
1804
1804
|
}
|
1805
1805
|
|
1806
|
-
return this.apiClient.updateClanDesc(session.token, clanId, request
|
1806
|
+
return this.apiClient.updateClanDesc(session.token, clanId, request).then((response: any) => {
|
1807
1807
|
return response !== undefined;
|
1808
1808
|
});
|
1809
1809
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -708,7 +708,7 @@ export declare class MezonApi {
|
|
708
708
|
/** Delete a clan desc by ID. */
|
709
709
|
deleteClanDesc(bearerToken: string, clanDescId: string, options?: any): Promise<any>;
|
710
710
|
/** Update fields in a given clan. */
|
711
|
-
updateClanDesc(bearerToken: string, clanId: string,
|
711
|
+
updateClanDesc(bearerToken: string, clanId: string, body: {}, options?: any): Promise<any>;
|
712
712
|
/** List all users that are part of a clan. */
|
713
713
|
listClanUsers(bearerToken: string, clanId: string, options?: any): Promise<ApiClanUserList>;
|
714
714
|
/** Get a clan desc profile */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -2057,17 +2057,17 @@ var MezonApi = class {
|
|
2057
2057
|
]);
|
2058
2058
|
}
|
2059
2059
|
/** Update fields in a given clan. */
|
2060
|
-
updateClanDesc(bearerToken, clanId,
|
2060
|
+
updateClanDesc(bearerToken, clanId, body, options = {}) {
|
2061
2061
|
if (clanId === null || clanId === void 0) {
|
2062
2062
|
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
2063
2063
|
}
|
2064
|
+
if (body === null || body === void 0) {
|
2065
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
2066
|
+
}
|
2064
2067
|
const urlPath = "/v2/clandesc/{clanId}".replace("{clanId}", encodeURIComponent(String(clanId)));
|
2065
2068
|
const queryParams = /* @__PURE__ */ new Map();
|
2066
|
-
queryParams.set("creator_id", creatorId);
|
2067
|
-
queryParams.set("clan_name", clanName);
|
2068
|
-
queryParams.set("logo", logo);
|
2069
|
-
queryParams.set("banner", banner);
|
2070
2069
|
let bodyJson = "";
|
2070
|
+
bodyJson = JSON.stringify(body || {});
|
2071
2071
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2072
2072
|
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
2073
2073
|
if (bearerToken) {
|
@@ -5348,7 +5348,7 @@ var Client = class {
|
|
5348
5348
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
5349
5349
|
yield this.sessionRefresh(session);
|
5350
5350
|
}
|
5351
|
-
return this.apiClient.updateClanDesc(session.token, clanId, request
|
5351
|
+
return this.apiClient.updateClanDesc(session.token, clanId, request).then((response) => {
|
5352
5352
|
return response !== void 0;
|
5353
5353
|
});
|
5354
5354
|
});
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -2029,17 +2029,17 @@ var MezonApi = class {
|
|
2029
2029
|
]);
|
2030
2030
|
}
|
2031
2031
|
/** Update fields in a given clan. */
|
2032
|
-
updateClanDesc(bearerToken, clanId,
|
2032
|
+
updateClanDesc(bearerToken, clanId, body, options = {}) {
|
2033
2033
|
if (clanId === null || clanId === void 0) {
|
2034
2034
|
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
2035
2035
|
}
|
2036
|
+
if (body === null || body === void 0) {
|
2037
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
2038
|
+
}
|
2036
2039
|
const urlPath = "/v2/clandesc/{clanId}".replace("{clanId}", encodeURIComponent(String(clanId)));
|
2037
2040
|
const queryParams = /* @__PURE__ */ new Map();
|
2038
|
-
queryParams.set("creator_id", creatorId);
|
2039
|
-
queryParams.set("clan_name", clanName);
|
2040
|
-
queryParams.set("logo", logo);
|
2041
|
-
queryParams.set("banner", banner);
|
2042
2041
|
let bodyJson = "";
|
2042
|
+
bodyJson = JSON.stringify(body || {});
|
2043
2043
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2044
2044
|
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
2045
2045
|
if (bearerToken) {
|
@@ -5320,7 +5320,7 @@ var Client = class {
|
|
5320
5320
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
5321
5321
|
yield this.sessionRefresh(session);
|
5322
5322
|
}
|
5323
|
-
return this.apiClient.updateClanDesc(session.token, clanId, request
|
5323
|
+
return this.apiClient.updateClanDesc(session.token, clanId, request).then((response) => {
|
5324
5324
|
return response !== void 0;
|
5325
5325
|
});
|
5326
5326
|
});
|