mezon-js 2.8.77 → 2.8.79
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +15 -2
- package/client.ts +4 -3
- package/dist/api.gen.d.ts +6 -1
- package/dist/client.d.ts +3 -3
- package/dist/mezon-js.cjs.js +9 -6
- package/dist/mezon-js.esm.mjs +9 -6
- package/package.json +1 -1
- package/socket.ts +3 -3
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
@@ -196,9 +196,9 @@ export interface ChannelMessage {
|
|
196
196
|
//
|
197
197
|
message_id?: string;
|
198
198
|
//
|
199
|
-
|
199
|
+
hide_editted?: boolean;
|
200
200
|
//
|
201
|
-
|
201
|
+
is_public?: boolean;
|
202
202
|
}
|
203
203
|
|
204
204
|
/** A list of channel messages, usually a result of a list operation. */
|
@@ -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
@@ -71,8 +71,8 @@ export interface ChannelMessage {
|
|
71
71
|
update_time_seconds?: number;
|
72
72
|
mode?: number;
|
73
73
|
message_id?: string;
|
74
|
-
|
75
|
-
|
74
|
+
hide_editted?: boolean;
|
75
|
+
is_public?: boolean;
|
76
76
|
}
|
77
77
|
/** A list of channel messages, usually a result of a list operation. */
|
78
78
|
export interface ChannelMessageList {
|
@@ -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 || {});
|
@@ -4837,8 +4840,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4837
4840
|
mentions,
|
4838
4841
|
attachments,
|
4839
4842
|
references,
|
4840
|
-
|
4841
|
-
|
4843
|
+
hide_editted: message.channel_message.hide_editted,
|
4844
|
+
is_public: message.channel_message.is_public
|
4842
4845
|
};
|
4843
4846
|
this.onchannelmessage(e);
|
4844
4847
|
} else if (message.message_typing_event) {
|
@@ -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 || {});
|
@@ -4808,8 +4811,8 @@ var _DefaultSocket = class _DefaultSocket {
|
|
4808
4811
|
mentions,
|
4809
4812
|
attachments,
|
4810
4813
|
references,
|
4811
|
-
|
4812
|
-
|
4814
|
+
hide_editted: message.channel_message.hide_editted,
|
4815
|
+
is_public: message.channel_message.is_public
|
4813
4816
|
};
|
4814
4817
|
this.onchannelmessage(e);
|
4815
4818
|
} else if (message.message_typing_event) {
|
@@ -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
|
});
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -954,7 +954,7 @@ export interface Socket {
|
|
954
954
|
|
955
955
|
getNotificationChannelCategorySetting(clan_id : string): Promise<NotificationChannelCategorySettingEvent>;
|
956
956
|
|
957
|
-
oneventcreated: (clan_event_created: ApiCreateEventRequest) => void
|
957
|
+
oneventcreated: (clan_event_created: ApiCreateEventRequest) => void;
|
958
958
|
}
|
959
959
|
|
960
960
|
/** Reports an error received from a socket message. */
|
@@ -1100,8 +1100,8 @@ export class DefaultSocket implements Socket {
|
|
1100
1100
|
mentions: mentions,
|
1101
1101
|
attachments: attachments,
|
1102
1102
|
references: references,
|
1103
|
-
|
1104
|
-
|
1103
|
+
hide_editted: message.channel_message.hide_editted,
|
1104
|
+
is_public: message.channel_message.is_public
|
1105
1105
|
};
|
1106
1106
|
this.onchannelmessage(e);
|
1107
1107
|
} else if (message.message_typing_event) {
|