mezon-js 2.7.18 → 2.7.19

Sign up to get free protection for your applications and to get access to all the features.
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
- creatorId?:string,
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?.creator_id, request?.clan_name, request?.logo, request?.banner).then((response: any) => {
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, creatorId?: string, clanName?: string, logo?: string, banner?: string, options?: any): Promise<any>;
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 */
@@ -2057,17 +2057,17 @@ var MezonApi = class {
2057
2057
  ]);
2058
2058
  }
2059
2059
  /** Update fields in a given clan. */
2060
- updateClanDesc(bearerToken, clanId, creatorId, clanName, logo, banner, options = {}) {
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 == null ? void 0 : request.creator_id, request == null ? void 0 : request.clan_name, request == null ? void 0 : request.logo, request == null ? void 0 : request.banner).then((response) => {
5351
+ return this.apiClient.updateClanDesc(session.token, clanId, request).then((response) => {
5352
5352
  return response !== void 0;
5353
5353
  });
5354
5354
  });
@@ -2029,17 +2029,17 @@ var MezonApi = class {
2029
2029
  ]);
2030
2030
  }
2031
2031
  /** Update fields in a given clan. */
2032
- updateClanDesc(bearerToken, clanId, creatorId, clanName, logo, banner, options = {}) {
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 == null ? void 0 : request.creator_id, request == null ? void 0 : request.clan_name, request == null ? void 0 : request.logo, request == null ? void 0 : request.banner).then((response) => {
5323
+ return this.apiClient.updateClanDesc(session.token, clanId, request).then((response) => {
5324
5324
  return response !== void 0;
5325
5325
  });
5326
5326
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.18",
3
+ "version": "2.7.19",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },