mezon-js 2.10.19 → 2.10.21
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 +13 -6
- package/client.ts +4 -2
- package/dist/api.gen.d.ts +4 -2
- 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
@@ -206,6 +206,8 @@ export interface MezonUpdateEventBody {
|
|
206
206
|
channel_id?: string;
|
207
207
|
//
|
208
208
|
clan_id?: string;
|
209
|
+
//
|
210
|
+
creator_id?: string;
|
209
211
|
//
|
210
212
|
description?: string;
|
211
213
|
//
|
@@ -1177,6 +1179,8 @@ export interface ApiDeleteChannelDescRequest {
|
|
1177
1179
|
export interface ApiDeleteEventRequest {
|
1178
1180
|
//
|
1179
1181
|
clan_id?: string;
|
1182
|
+
//
|
1183
|
+
creator_id?: string;
|
1180
1184
|
//The id of a event.
|
1181
1185
|
event_id?: string;
|
1182
1186
|
}
|
@@ -4919,6 +4923,7 @@ export class MezonApi {
|
|
4919
4923
|
messageId?: string,
|
4920
4924
|
direction?: number,
|
4921
4925
|
limit?: number,
|
4926
|
+
topicId?:string,
|
4922
4927
|
options: any = {}
|
4923
4928
|
): Promise<ApiChannelMessageList> {
|
4924
4929
|
if (channelId === null || channelId === undefined) {
|
@@ -4935,6 +4940,7 @@ export class MezonApi {
|
|
4935
4940
|
queryParams.set("message_id", messageId);
|
4936
4941
|
queryParams.set("limit", limit);
|
4937
4942
|
queryParams.set("direction", direction);
|
4943
|
+
queryParams.set("topic_id", topicId);
|
4938
4944
|
|
4939
4945
|
let bodyJson: string = "";
|
4940
4946
|
|
@@ -6557,12 +6563,12 @@ export class MezonApi {
|
|
6557
6563
|
}
|
6558
6564
|
|
6559
6565
|
/** Delete a event by ID. */
|
6560
|
-
deleteEvent(
|
6561
|
-
|
6562
|
-
|
6563
|
-
|
6564
|
-
|
6565
|
-
|
6566
|
+
deleteEvent(bearerToken: string,
|
6567
|
+
eventId:string,
|
6568
|
+
clanId?:string,
|
6569
|
+
creatorId?:string,
|
6570
|
+
options: any = {}): Promise<any> {
|
6571
|
+
|
6566
6572
|
if (eventId === null || eventId === undefined) {
|
6567
6573
|
throw new Error(
|
6568
6574
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -6574,6 +6580,7 @@ export class MezonApi {
|
|
6574
6580
|
);
|
6575
6581
|
const queryParams = new Map<string, any>();
|
6576
6582
|
queryParams.set("clan_id", clanId);
|
6583
|
+
queryParams.set("creator_id", creatorId);
|
6577
6584
|
|
6578
6585
|
let bodyJson: string = "";
|
6579
6586
|
|
package/client.ts
CHANGED
@@ -1408,7 +1408,8 @@ export class Client {
|
|
1408
1408
|
channelId: string,
|
1409
1409
|
messageId?: string,
|
1410
1410
|
direction?: number,
|
1411
|
-
limit?: number
|
1411
|
+
limit?: number,
|
1412
|
+
topicId?:string
|
1412
1413
|
): Promise<ChannelMessageList> {
|
1413
1414
|
if (
|
1414
1415
|
this.autoRefreshSession &&
|
@@ -1425,7 +1426,8 @@ export class Client {
|
|
1425
1426
|
channelId,
|
1426
1427
|
messageId,
|
1427
1428
|
direction,
|
1428
|
-
limit
|
1429
|
+
limit,
|
1430
|
+
topicId
|
1429
1431
|
)
|
1430
1432
|
.then((response: ApiChannelMessageList) => {
|
1431
1433
|
var result: ChannelMessageList = {
|
package/dist/api.gen.d.ts
CHANGED
@@ -121,6 +121,7 @@ export interface MezonUpdateEventBody {
|
|
121
121
|
address?: string;
|
122
122
|
channel_id?: string;
|
123
123
|
clan_id?: string;
|
124
|
+
creator_id?: string;
|
124
125
|
description?: string;
|
125
126
|
end_time?: string;
|
126
127
|
logo?: string;
|
@@ -675,6 +676,7 @@ export interface ApiDeleteChannelDescRequest {
|
|
675
676
|
/** */
|
676
677
|
export interface ApiDeleteEventRequest {
|
677
678
|
clan_id?: string;
|
679
|
+
creator_id?: string;
|
678
680
|
event_id?: string;
|
679
681
|
}
|
680
682
|
/** Delete a role the user has access to. */
|
@@ -1712,7 +1714,7 @@ export declare class MezonApi {
|
|
1712
1714
|
/** */
|
1713
1715
|
getListFavoriteChannel(bearerToken: string, clanId: string, options?: any): Promise<ApiListFavoriteChannelResponse>;
|
1714
1716
|
/** List a channel's message history. */
|
1715
|
-
listChannelMessages(bearerToken: string, clanId: string, channelId: string, messageId?: string, direction?: number, limit?: number, options?: any): Promise<ApiChannelMessageList>;
|
1717
|
+
listChannelMessages(bearerToken: string, clanId: string, channelId: string, messageId?: string, direction?: number, limit?: number, topicId?: string, options?: any): Promise<ApiChannelMessageList>;
|
1716
1718
|
/** Add users to a channel. */
|
1717
1719
|
addChannelUsers(bearerToken: string, channelId: string, userIds?: Array<string>, options?: any): Promise<any>;
|
1718
1720
|
/** List all attachment that are part of a channel. */
|
@@ -1790,7 +1792,7 @@ export declare class MezonApi {
|
|
1790
1792
|
/** Update fields in a given event. */
|
1791
1793
|
updateEventUser(bearerToken: string, body: ApiDeleteEventRequest, options?: any): Promise<any>;
|
1792
1794
|
/** Delete a event by ID. */
|
1793
|
-
deleteEvent(bearerToken: string, eventId: string, clanId?: string, options?: any): Promise<any>;
|
1795
|
+
deleteEvent(bearerToken: string, eventId: string, clanId?: string, creatorId?: string, options?: any): Promise<any>;
|
1794
1796
|
/** Update fields in a given event. */
|
1795
1797
|
updateEvent(bearerToken: string, eventId: string, body: MezonUpdateEventBody, options?: any): Promise<any>;
|
1796
1798
|
/** Delete one or more users by ID or username. */
|
package/dist/client.d.ts
CHANGED
@@ -418,7 +418,7 @@ export declare class Client {
|
|
418
418
|
/** Kick users from a channel, or decline their join requests. */
|
419
419
|
removeChannelUsers(session: Session, channelId: string, ids?: Array<string>): Promise<boolean>;
|
420
420
|
/** List a channel's message history. */
|
421
|
-
listChannelMessages(session: Session, clanId: string, channelId: string, messageId?: string, direction?: number, limit?: number): Promise<ChannelMessageList>;
|
421
|
+
listChannelMessages(session: Session, clanId: string, channelId: string, messageId?: string, direction?: number, limit?: number, topicId?: string): Promise<ChannelMessageList>;
|
422
422
|
/** List a channel's users. */
|
423
423
|
listChannelVoiceUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiVoiceChannelUserList>;
|
424
424
|
/** List a channel's users. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -2419,7 +2419,7 @@ var MezonApi = class {
|
|
2419
2419
|
]);
|
2420
2420
|
}
|
2421
2421
|
/** List a channel's message history. */
|
2422
|
-
listChannelMessages(bearerToken, clanId, channelId, messageId, direction, limit, options = {}) {
|
2422
|
+
listChannelMessages(bearerToken, clanId, channelId, messageId, direction, limit, topicId, options = {}) {
|
2423
2423
|
if (channelId === null || channelId === void 0) {
|
2424
2424
|
throw new Error(
|
2425
2425
|
"'channelId' is a required parameter but is null or undefined."
|
@@ -2434,6 +2434,7 @@ var MezonApi = class {
|
|
2434
2434
|
queryParams.set("message_id", messageId);
|
2435
2435
|
queryParams.set("limit", limit);
|
2436
2436
|
queryParams.set("direction", direction);
|
2437
|
+
queryParams.set("topic_id", topicId);
|
2437
2438
|
let bodyJson = "";
|
2438
2439
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2439
2440
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
@@ -3707,7 +3708,7 @@ var MezonApi = class {
|
|
3707
3708
|
]);
|
3708
3709
|
}
|
3709
3710
|
/** Delete a event by ID. */
|
3710
|
-
deleteEvent(bearerToken, eventId, clanId, options = {}) {
|
3711
|
+
deleteEvent(bearerToken, eventId, clanId, creatorId, options = {}) {
|
3711
3712
|
if (eventId === null || eventId === void 0) {
|
3712
3713
|
throw new Error(
|
3713
3714
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -3719,6 +3720,7 @@ var MezonApi = class {
|
|
3719
3720
|
);
|
3720
3721
|
const queryParams = /* @__PURE__ */ new Map();
|
3721
3722
|
queryParams.set("clan_id", clanId);
|
3723
|
+
queryParams.set("creator_id", creatorId);
|
3722
3724
|
let bodyJson = "";
|
3723
3725
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3724
3726
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -8569,7 +8571,7 @@ var Client = class {
|
|
8569
8571
|
});
|
8570
8572
|
}
|
8571
8573
|
/** List a channel's message history. */
|
8572
|
-
listChannelMessages(session, clanId, channelId, messageId, direction, limit) {
|
8574
|
+
listChannelMessages(session, clanId, channelId, messageId, direction, limit, topicId) {
|
8573
8575
|
return __async(this, null, function* () {
|
8574
8576
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8575
8577
|
yield this.sessionRefresh(session);
|
@@ -8580,7 +8582,8 @@ var Client = class {
|
|
8580
8582
|
channelId,
|
8581
8583
|
messageId,
|
8582
8584
|
direction,
|
8583
|
-
limit
|
8585
|
+
limit,
|
8586
|
+
topicId
|
8584
8587
|
).then((response) => {
|
8585
8588
|
var result = {
|
8586
8589
|
messages: [],
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -2385,7 +2385,7 @@ var MezonApi = class {
|
|
2385
2385
|
]);
|
2386
2386
|
}
|
2387
2387
|
/** List a channel's message history. */
|
2388
|
-
listChannelMessages(bearerToken, clanId, channelId, messageId, direction, limit, options = {}) {
|
2388
|
+
listChannelMessages(bearerToken, clanId, channelId, messageId, direction, limit, topicId, options = {}) {
|
2389
2389
|
if (channelId === null || channelId === void 0) {
|
2390
2390
|
throw new Error(
|
2391
2391
|
"'channelId' is a required parameter but is null or undefined."
|
@@ -2400,6 +2400,7 @@ var MezonApi = class {
|
|
2400
2400
|
queryParams.set("message_id", messageId);
|
2401
2401
|
queryParams.set("limit", limit);
|
2402
2402
|
queryParams.set("direction", direction);
|
2403
|
+
queryParams.set("topic_id", topicId);
|
2403
2404
|
let bodyJson = "";
|
2404
2405
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2405
2406
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
@@ -3673,7 +3674,7 @@ var MezonApi = class {
|
|
3673
3674
|
]);
|
3674
3675
|
}
|
3675
3676
|
/** Delete a event by ID. */
|
3676
|
-
deleteEvent(bearerToken, eventId, clanId, options = {}) {
|
3677
|
+
deleteEvent(bearerToken, eventId, clanId, creatorId, options = {}) {
|
3677
3678
|
if (eventId === null || eventId === void 0) {
|
3678
3679
|
throw new Error(
|
3679
3680
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -3685,6 +3686,7 @@ var MezonApi = class {
|
|
3685
3686
|
);
|
3686
3687
|
const queryParams = /* @__PURE__ */ new Map();
|
3687
3688
|
queryParams.set("clan_id", clanId);
|
3689
|
+
queryParams.set("creator_id", creatorId);
|
3688
3690
|
let bodyJson = "";
|
3689
3691
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3690
3692
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -8535,7 +8537,7 @@ var Client = class {
|
|
8535
8537
|
});
|
8536
8538
|
}
|
8537
8539
|
/** List a channel's message history. */
|
8538
|
-
listChannelMessages(session, clanId, channelId, messageId, direction, limit) {
|
8540
|
+
listChannelMessages(session, clanId, channelId, messageId, direction, limit, topicId) {
|
8539
8541
|
return __async(this, null, function* () {
|
8540
8542
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8541
8543
|
yield this.sessionRefresh(session);
|
@@ -8546,7 +8548,8 @@ var Client = class {
|
|
8546
8548
|
channelId,
|
8547
8549
|
messageId,
|
8548
8550
|
direction,
|
8549
|
-
limit
|
8551
|
+
limit,
|
8552
|
+
topicId
|
8550
8553
|
).then((response) => {
|
8551
8554
|
var result = {
|
8552
8555
|
messages: [],
|