mezon-js 2.8.77 → 2.8.78
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 +15 -2
- package/client.ts +2 -1
- package/dist/api.gen.d.ts +6 -1
- package/dist/client.d.ts +1 -1
- package/dist/mezon-js.cjs.js +7 -4
- package/dist/mezon-js.esm.mjs +7 -4
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -56,6 +56,14 @@ export interface MezonUpdateAppBody {
|
|
56
56
|
token?: string;
|
57
57
|
}
|
58
58
|
|
59
|
+
/** */
|
60
|
+
export interface MezonUpdateCategoryBody {
|
61
|
+
//The ID of the group to update.
|
62
|
+
category_id?: string;
|
63
|
+
//
|
64
|
+
category_name?: string;
|
65
|
+
}
|
66
|
+
|
59
67
|
/** */
|
60
68
|
export interface ApiAddAppRequest {
|
61
69
|
//The appname.
|
@@ -6297,13 +6305,18 @@ export class MezonApi {
|
|
6297
6305
|
|
6298
6306
|
/** Update fields in a given category. */
|
6299
6307
|
updateCategory(bearerToken: string,
|
6300
|
-
|
6308
|
+
clanId:string,
|
6309
|
+
body:MezonUpdateCategoryBody,
|
6301
6310
|
options: any = {}): Promise<any> {
|
6302
6311
|
|
6312
|
+
if (clanId === null || clanId === undefined) {
|
6313
|
+
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
6314
|
+
}
|
6303
6315
|
if (body === null || body === undefined) {
|
6304
6316
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
6305
6317
|
}
|
6306
|
-
const urlPath = "/v2/updatecategory"
|
6318
|
+
const urlPath = "/v2/updatecategory/{clanId}"
|
6319
|
+
.replace("{clanId}", encodeURIComponent(String(clanId)));
|
6307
6320
|
const queryParams = new Map<string, any>();
|
6308
6321
|
|
6309
6322
|
let bodyJson : string = "";
|
package/client.ts
CHANGED
@@ -2548,6 +2548,7 @@ export class Client {
|
|
2548
2548
|
/** Update fields in a given category. */
|
2549
2549
|
async updateCategory(
|
2550
2550
|
session: Session,
|
2551
|
+
clanId: string,
|
2551
2552
|
request: ApiUpdateCategoryDescRequest
|
2552
2553
|
): Promise<boolean> {
|
2553
2554
|
if (
|
@@ -2559,7 +2560,7 @@ export class Client {
|
|
2559
2560
|
}
|
2560
2561
|
|
2561
2562
|
return this.apiClient
|
2562
|
-
.updateCategory(session.token, request)
|
2563
|
+
.updateCategory(session.token, clanId, request)
|
2563
2564
|
.then((response: any) => {
|
2564
2565
|
return response !== undefined;
|
2565
2566
|
});
|
package/dist/api.gen.d.ts
CHANGED
@@ -29,6 +29,11 @@ export interface MezonUpdateAppBody {
|
|
29
29
|
token?: string;
|
30
30
|
}
|
31
31
|
/** */
|
32
|
+
export interface MezonUpdateCategoryBody {
|
33
|
+
category_id?: string;
|
34
|
+
category_name?: string;
|
35
|
+
}
|
36
|
+
/** */
|
32
37
|
export interface ApiAddAppRequest {
|
33
38
|
appname?: string;
|
34
39
|
creator_id?: string;
|
@@ -1223,7 +1228,7 @@ export declare class MezonApi {
|
|
1223
1228
|
/** Update a system messages. */
|
1224
1229
|
updateSystemMessage(bearerToken: string, clanId: string, body: MezonUpdateSystemMessageBody, options?: any): Promise<any>;
|
1225
1230
|
/** Update fields in a given category. */
|
1226
|
-
updateCategory(bearerToken: string, body:
|
1231
|
+
updateCategory(bearerToken: string, clanId: string, body: MezonUpdateCategoryBody, options?: any): Promise<any>;
|
1227
1232
|
/** Update channel private. */
|
1228
1233
|
updateChannelPrivate(bearerToken: string, body: ApiChangeChannelPrivateRequest, options?: any): Promise<any>;
|
1229
1234
|
/** */
|
package/dist/client.d.ts
CHANGED
@@ -483,7 +483,7 @@ export declare class Client {
|
|
483
483
|
/** Update fields in a given clan. */
|
484
484
|
updateClanDesc(session: Session, clanId: string, request: ApiUpdateClanDescRequest): Promise<boolean>;
|
485
485
|
/** Update fields in a given category. */
|
486
|
-
updateCategory(session: Session, request: ApiUpdateCategoryDescRequest): Promise<boolean>;
|
486
|
+
updateCategory(session: Session, clanId: string, request: ApiUpdateCategoryDescRequest): Promise<boolean>;
|
487
487
|
/** Update fields in a given clan profile. */
|
488
488
|
updateClanDescProfile(session: Session, clanId: string, request: ApiUpdateClanDescProfileRequest): Promise<boolean>;
|
489
489
|
updateUserProfileByClan(session: Session, clanId: string, request: ApiUpdateClanProfileRequest): Promise<boolean>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -4267,11 +4267,14 @@ var MezonApi = class {
|
|
4267
4267
|
]);
|
4268
4268
|
}
|
4269
4269
|
/** Update fields in a given category. */
|
4270
|
-
updateCategory(bearerToken, body, options = {}) {
|
4270
|
+
updateCategory(bearerToken, clanId, body, options = {}) {
|
4271
|
+
if (clanId === null || clanId === void 0) {
|
4272
|
+
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
4273
|
+
}
|
4271
4274
|
if (body === null || body === void 0) {
|
4272
4275
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
4273
4276
|
}
|
4274
|
-
const urlPath = "/v2/updatecategory";
|
4277
|
+
const urlPath = "/v2/updatecategory/{clanId}".replace("{clanId}", encodeURIComponent(String(clanId)));
|
4275
4278
|
const queryParams = /* @__PURE__ */ new Map();
|
4276
4279
|
let bodyJson = "";
|
4277
4280
|
bodyJson = JSON.stringify(body || {});
|
@@ -6637,12 +6640,12 @@ var Client = class {
|
|
6637
6640
|
});
|
6638
6641
|
}
|
6639
6642
|
/** Update fields in a given category. */
|
6640
|
-
updateCategory(session, request) {
|
6643
|
+
updateCategory(session, clanId, request) {
|
6641
6644
|
return __async(this, null, function* () {
|
6642
6645
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
6643
6646
|
yield this.sessionRefresh(session);
|
6644
6647
|
}
|
6645
|
-
return this.apiClient.updateCategory(session.token, request).then((response) => {
|
6648
|
+
return this.apiClient.updateCategory(session.token, clanId, request).then((response) => {
|
6646
6649
|
return response !== void 0;
|
6647
6650
|
});
|
6648
6651
|
});
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4238,11 +4238,14 @@ var MezonApi = class {
|
|
4238
4238
|
]);
|
4239
4239
|
}
|
4240
4240
|
/** Update fields in a given category. */
|
4241
|
-
updateCategory(bearerToken, body, options = {}) {
|
4241
|
+
updateCategory(bearerToken, clanId, body, options = {}) {
|
4242
|
+
if (clanId === null || clanId === void 0) {
|
4243
|
+
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
4244
|
+
}
|
4242
4245
|
if (body === null || body === void 0) {
|
4243
4246
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
4244
4247
|
}
|
4245
|
-
const urlPath = "/v2/updatecategory";
|
4248
|
+
const urlPath = "/v2/updatecategory/{clanId}".replace("{clanId}", encodeURIComponent(String(clanId)));
|
4246
4249
|
const queryParams = /* @__PURE__ */ new Map();
|
4247
4250
|
let bodyJson = "";
|
4248
4251
|
bodyJson = JSON.stringify(body || {});
|
@@ -6608,12 +6611,12 @@ var Client = class {
|
|
6608
6611
|
});
|
6609
6612
|
}
|
6610
6613
|
/** Update fields in a given category. */
|
6611
|
-
updateCategory(session, request) {
|
6614
|
+
updateCategory(session, clanId, request) {
|
6612
6615
|
return __async(this, null, function* () {
|
6613
6616
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
6614
6617
|
yield this.sessionRefresh(session);
|
6615
6618
|
}
|
6616
|
-
return this.apiClient.updateCategory(session.token, request).then((response) => {
|
6619
|
+
return this.apiClient.updateCategory(session.token, clanId, request).then((response) => {
|
6617
6620
|
return response !== void 0;
|
6618
6621
|
});
|
6619
6622
|
});
|