mezon-js 2.10.39 → 2.10.40
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 +59 -40
- package/client.ts +24 -11
- package/dist/api.gen.d.ts +8 -5
- package/dist/client.d.ts +5 -5
- package/dist/mezon-js.cjs.js +20 -15
- package/dist/mezon-js.esm.mjs +20 -15
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -506,7 +506,7 @@ export interface ApiAuditLog {
|
|
506
506
|
action_log?: string;
|
507
507
|
//
|
508
508
|
channel_id?: string;
|
509
|
-
//
|
509
|
+
//
|
510
510
|
channel_label?: string;
|
511
511
|
//
|
512
512
|
clan_id?: string;
|
@@ -1187,6 +1187,8 @@ export interface ApiDeleteEventRequest {
|
|
1187
1187
|
creator_id?: string;
|
1188
1188
|
//The id of a event.
|
1189
1189
|
event_id?: string;
|
1190
|
+
//
|
1191
|
+
event_label?: string;
|
1190
1192
|
}
|
1191
1193
|
|
1192
1194
|
/** Delete a role the user has access to. */
|
@@ -1197,6 +1199,8 @@ export interface ApiDeleteRoleRequest {
|
|
1197
1199
|
clan_id?: string;
|
1198
1200
|
//The id of a role.
|
1199
1201
|
role_id?: string;
|
1202
|
+
//
|
1203
|
+
role_label?: string;
|
1200
1204
|
}
|
1201
1205
|
|
1202
1206
|
/** Storage objects to delete. */
|
@@ -2312,6 +2316,8 @@ export interface ApiUpdateRoleChannelRequest {
|
|
2312
2316
|
//The ID of the role to update.
|
2313
2317
|
role_id?: string;
|
2314
2318
|
//
|
2319
|
+
role_label?: string;
|
2320
|
+
//The ID of the role to update.
|
2315
2321
|
user_id?: string;
|
2316
2322
|
}
|
2317
2323
|
|
@@ -2559,7 +2565,7 @@ export interface MezonapiEvent {
|
|
2559
2565
|
|
2560
2566
|
/** */
|
2561
2567
|
export interface MezonapiListAuditLog {
|
2562
|
-
//
|
2568
|
+
//
|
2563
2569
|
date_log?: string;
|
2564
2570
|
//
|
2565
2571
|
logs?: Array<ApiAuditLog>;
|
@@ -4591,13 +4597,14 @@ export class MezonApi {
|
|
4591
4597
|
}
|
4592
4598
|
|
4593
4599
|
/** */
|
4594
|
-
listAuditLog(
|
4595
|
-
|
4596
|
-
|
4597
|
-
|
4598
|
-
|
4599
|
-
|
4600
|
-
|
4600
|
+
listAuditLog(
|
4601
|
+
bearerToken: string,
|
4602
|
+
actionLog?: string,
|
4603
|
+
userId?: string,
|
4604
|
+
clanId?: string,
|
4605
|
+
dateLog?: string,
|
4606
|
+
options: any = {}
|
4607
|
+
): Promise<MezonapiListAuditLog> {
|
4601
4608
|
const urlPath = "/v2/audit_log";
|
4602
4609
|
const queryParams = new Map<string, any>();
|
4603
4610
|
queryParams.set("action_log", actionLog);
|
@@ -6022,6 +6029,7 @@ export class MezonApi {
|
|
6022
6029
|
bearerToken: string,
|
6023
6030
|
categoryId: string,
|
6024
6031
|
clanId: string,
|
6032
|
+
categoryLabel?: string,
|
6025
6033
|
options: any = {}
|
6026
6034
|
): Promise<any> {
|
6027
6035
|
if (categoryId === null || categoryId === undefined) {
|
@@ -6039,6 +6047,7 @@ export class MezonApi {
|
|
6039
6047
|
.replace("{categoryId}", encodeURIComponent(String(categoryId)))
|
6040
6048
|
.replace("{clanId}", encodeURIComponent(String(clanId)));
|
6041
6049
|
const queryParams = new Map<string, any>();
|
6050
|
+
queryParams.set("category_label", categoryLabel);
|
6042
6051
|
|
6043
6052
|
let bodyJson: string = "";
|
6044
6053
|
|
@@ -6265,6 +6274,7 @@ export class MezonApi {
|
|
6265
6274
|
bearerToken: string,
|
6266
6275
|
id: string,
|
6267
6276
|
clanId?: string,
|
6277
|
+
emojiLabel?: string,
|
6268
6278
|
options: any = {}
|
6269
6279
|
): Promise<any> {
|
6270
6280
|
if (id === null || id === undefined) {
|
@@ -6276,6 +6286,7 @@ export class MezonApi {
|
|
6276
6286
|
);
|
6277
6287
|
const queryParams = new Map<string, any>();
|
6278
6288
|
queryParams.set("clan_id", clanId);
|
6289
|
+
queryParams.set("emoji_label", emojiLabel);
|
6279
6290
|
|
6280
6291
|
const body = { clan_id: clanId };
|
6281
6292
|
let bodyJson = JSON.stringify(body || {});
|
@@ -6572,6 +6583,7 @@ export class MezonApi {
|
|
6572
6583
|
eventId: string,
|
6573
6584
|
clanId?: string,
|
6574
6585
|
creatorId?: string,
|
6586
|
+
eventLabel?: string,
|
6575
6587
|
options: any = {}
|
6576
6588
|
): Promise<any> {
|
6577
6589
|
if (eventId === null || eventId === undefined) {
|
@@ -6586,6 +6598,7 @@ export class MezonApi {
|
|
6586
6598
|
const queryParams = new Map<string, any>();
|
6587
6599
|
queryParams.set("clan_id", clanId);
|
6588
6600
|
queryParams.set("creator_id", creatorId);
|
6601
|
+
queryParams.set("event_label", eventLabel);
|
6589
6602
|
|
6590
6603
|
let bodyJson: string = "";
|
6591
6604
|
|
@@ -8444,6 +8457,7 @@ export class MezonApi {
|
|
8444
8457
|
roleId: string,
|
8445
8458
|
channelId?: string,
|
8446
8459
|
clanId?: string,
|
8460
|
+
roleLabel?: string,
|
8447
8461
|
options: any = {}
|
8448
8462
|
): Promise<any> {
|
8449
8463
|
if (roleId === null || roleId === undefined) {
|
@@ -8458,6 +8472,8 @@ export class MezonApi {
|
|
8458
8472
|
const queryParams = new Map<string, any>();
|
8459
8473
|
queryParams.set("channel_id", channelId);
|
8460
8474
|
queryParams.set("clan_id", clanId);
|
8475
|
+
queryParams.set("role_label", roleLabel);
|
8476
|
+
|
8461
8477
|
let bodyJson: string = "";
|
8462
8478
|
|
8463
8479
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
@@ -8884,6 +8900,7 @@ export class MezonApi {
|
|
8884
8900
|
bearerToken: string,
|
8885
8901
|
id: string,
|
8886
8902
|
clanId?: string,
|
8903
|
+
stickerLabel?: string,
|
8887
8904
|
options: any = {}
|
8888
8905
|
): Promise<any> {
|
8889
8906
|
if (id === null || id === undefined) {
|
@@ -8895,6 +8912,7 @@ export class MezonApi {
|
|
8895
8912
|
);
|
8896
8913
|
const queryParams = new Map<string, any>();
|
8897
8914
|
queryParams.set("clan_id", clanId);
|
8915
|
+
queryParams.set("sticker_label", stickerLabel);
|
8898
8916
|
|
8899
8917
|
let bodyJson: string = "";
|
8900
8918
|
|
@@ -10606,37 +10624,38 @@ export class MezonApi {
|
|
10606
10624
|
]);
|
10607
10625
|
}
|
10608
10626
|
|
10609
|
-
|
10610
|
-
|
10611
|
-
|
10612
|
-
|
10613
|
-
|
10614
|
-
|
10615
|
-
|
10616
|
-
|
10617
|
-
|
10618
|
-
|
10619
|
-
|
10620
|
-
|
10621
|
-
|
10622
|
-
|
10623
|
-
|
10624
|
-
|
10625
|
-
|
10626
|
-
|
10627
|
-
|
10628
|
-
|
10629
|
-
|
10630
|
-
|
10631
|
-
|
10632
|
-
|
10633
|
-
|
10634
|
-
|
10635
|
-
}
|
10636
|
-
|
10637
|
-
|
10638
|
-
)
|
10639
|
-
|
10627
|
+
/** Sd Topic */
|
10628
|
+
getTopicDetail(
|
10629
|
+
bearerToken: string,
|
10630
|
+
topicId?: string,
|
10631
|
+
options: any = {}
|
10632
|
+
): Promise<ApiSdTopic> {
|
10633
|
+
const urlPath = "/v2/sdmtopic/detail";
|
10634
|
+
const queryParams = new Map<string, any>();
|
10635
|
+
queryParams.set("topic_id", topicId);
|
10636
|
+
|
10637
|
+
let bodyJson: string = "";
|
10638
|
+
|
10639
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
10640
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
10641
|
+
if (bearerToken) {
|
10642
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
10643
|
+
}
|
10644
|
+
|
10645
|
+
return Promise.race([
|
10646
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10647
|
+
if (response.status == 204) {
|
10648
|
+
return response;
|
10649
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10650
|
+
return response.json();
|
10651
|
+
} else {
|
10652
|
+
throw response;
|
10653
|
+
}
|
10654
|
+
}),
|
10655
|
+
new Promise((_, reject) =>
|
10656
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10657
|
+
),
|
10658
|
+
]);
|
10640
10659
|
}
|
10641
10660
|
|
10642
10661
|
/** List onboarding step. */
|
package/client.ts
CHANGED
@@ -1139,7 +1139,8 @@ export class Client {
|
|
1139
1139
|
async deleteCategoryDesc(
|
1140
1140
|
session: Session,
|
1141
1141
|
categoryId: string,
|
1142
|
-
clanId: string
|
1142
|
+
clanId: string,
|
1143
|
+
categoryLabel?: string
|
1143
1144
|
): Promise<boolean> {
|
1144
1145
|
if (
|
1145
1146
|
this.autoRefreshSession &&
|
@@ -1150,7 +1151,7 @@ export class Client {
|
|
1150
1151
|
}
|
1151
1152
|
|
1152
1153
|
return this.apiClient
|
1153
|
-
.deleteCategoryDesc(session.token, categoryId, clanId)
|
1154
|
+
.deleteCategoryDesc(session.token, categoryId, clanId, categoryLabel)
|
1154
1155
|
.then((response: any) => {
|
1155
1156
|
return response !== undefined;
|
1156
1157
|
});
|
@@ -1180,7 +1181,8 @@ export class Client {
|
|
1180
1181
|
async deleteRole(
|
1181
1182
|
session: Session,
|
1182
1183
|
roleId: string,
|
1183
|
-
clanId: string
|
1184
|
+
clanId: string,
|
1185
|
+
roleLabel?: string
|
1184
1186
|
): Promise<boolean> {
|
1185
1187
|
if (
|
1186
1188
|
this.autoRefreshSession &&
|
@@ -1191,7 +1193,7 @@ export class Client {
|
|
1191
1193
|
}
|
1192
1194
|
|
1193
1195
|
return this.apiClient
|
1194
|
-
.deleteRole(session.token, roleId, "", clanId)
|
1196
|
+
.deleteRole(session.token, roleId, "", clanId, roleLabel)
|
1195
1197
|
.then((response: any) => {
|
1196
1198
|
return response !== undefined;
|
1197
1199
|
});
|
@@ -1202,7 +1204,8 @@ export class Client {
|
|
1202
1204
|
session: Session,
|
1203
1205
|
eventId: string,
|
1204
1206
|
clanId: string,
|
1205
|
-
creatorId: string
|
1207
|
+
creatorId: string,
|
1208
|
+
eventLabel?: string
|
1206
1209
|
): Promise<boolean> {
|
1207
1210
|
if (
|
1208
1211
|
this.autoRefreshSession &&
|
@@ -1213,7 +1216,7 @@ export class Client {
|
|
1213
1216
|
}
|
1214
1217
|
|
1215
1218
|
return this.apiClient
|
1216
|
-
.deleteEvent(session.token, eventId, clanId, creatorId)
|
1219
|
+
.deleteEvent(session.token, eventId, clanId, creatorId, eventLabel)
|
1217
1220
|
.then((response: any) => {
|
1218
1221
|
return response !== undefined;
|
1219
1222
|
});
|
@@ -3154,7 +3157,12 @@ export class Client {
|
|
3154
3157
|
}
|
3155
3158
|
|
3156
3159
|
//**delete clan emoji by id */
|
3157
|
-
async deleteByIdClanEmoji(
|
3160
|
+
async deleteByIdClanEmoji(
|
3161
|
+
session: Session,
|
3162
|
+
id: string,
|
3163
|
+
clan_id: string,
|
3164
|
+
emojiLabel?: string
|
3165
|
+
) {
|
3158
3166
|
if (
|
3159
3167
|
this.autoRefreshSession &&
|
3160
3168
|
session.refresh_token &&
|
@@ -3164,7 +3172,7 @@ export class Client {
|
|
3164
3172
|
}
|
3165
3173
|
|
3166
3174
|
return this.apiClient
|
3167
|
-
.deleteClanEmojiById(session.token, id, clan_id)
|
3175
|
+
.deleteClanEmojiById(session.token, id, clan_id, emojiLabel)
|
3168
3176
|
.then((response: any) => {
|
3169
3177
|
return response !== undefined;
|
3170
3178
|
});
|
@@ -3291,7 +3299,12 @@ export class Client {
|
|
3291
3299
|
}
|
3292
3300
|
|
3293
3301
|
//**Delete a sticker by ID*/
|
3294
|
-
async deleteClanStickerById(
|
3302
|
+
async deleteClanStickerById(
|
3303
|
+
session: Session,
|
3304
|
+
id: string,
|
3305
|
+
clan_id: string,
|
3306
|
+
stickerLabel?: string
|
3307
|
+
) {
|
3295
3308
|
if (
|
3296
3309
|
this.autoRefreshSession &&
|
3297
3310
|
session.refresh_token &&
|
@@ -3301,7 +3314,7 @@ export class Client {
|
|
3301
3314
|
}
|
3302
3315
|
|
3303
3316
|
return this.apiClient
|
3304
|
-
.deleteClanStickerById(session.token, id, clan_id)
|
3317
|
+
.deleteClanStickerById(session.token, id, clan_id, stickerLabel)
|
3305
3318
|
.then((response: any) => {
|
3306
3319
|
return response !== undefined;
|
3307
3320
|
});
|
@@ -4844,7 +4857,7 @@ export class Client {
|
|
4844
4857
|
//**list sd topic */
|
4845
4858
|
async getTopicDetail(
|
4846
4859
|
session: Session,
|
4847
|
-
topicId?: string
|
4860
|
+
topicId?: string
|
4848
4861
|
): Promise<ApiSdTopic> {
|
4849
4862
|
if (
|
4850
4863
|
this.autoRefreshSession &&
|
package/dist/api.gen.d.ts
CHANGED
@@ -680,12 +680,14 @@ export interface ApiDeleteEventRequest {
|
|
680
680
|
clan_id?: string;
|
681
681
|
creator_id?: string;
|
682
682
|
event_id?: string;
|
683
|
+
event_label?: string;
|
683
684
|
}
|
684
685
|
/** Delete a role the user has access to. */
|
685
686
|
export interface ApiDeleteRoleRequest {
|
686
687
|
channel_id?: string;
|
687
688
|
clan_id?: string;
|
688
689
|
role_id?: string;
|
690
|
+
role_label?: string;
|
689
691
|
}
|
690
692
|
/** Storage objects to delete. */
|
691
693
|
export interface ApiDeleteStorageObjectId {
|
@@ -1343,6 +1345,7 @@ export interface ApiUpdateRoleChannelRequest {
|
|
1343
1345
|
max_permission_id: string;
|
1344
1346
|
permission_update?: Array<ApiPermissionUpdate>;
|
1345
1347
|
role_id?: string;
|
1348
|
+
role_label?: string;
|
1346
1349
|
user_id?: string;
|
1347
1350
|
}
|
1348
1351
|
/** Fetch a batch of zero or more users from the server. */
|
@@ -1767,7 +1770,7 @@ export declare class MezonApi {
|
|
1767
1770
|
/** */
|
1768
1771
|
createCategoryDesc(bearerToken: string, body: ApiCreateCategoryDescRequest, options?: any): Promise<ApiCategoryDesc>;
|
1769
1772
|
/** */
|
1770
|
-
deleteCategoryDesc(bearerToken: string, categoryId: string, clanId: string, options?: any): Promise<any>;
|
1773
|
+
deleteCategoryDesc(bearerToken: string, categoryId: string, clanId: string, categoryLabel?: string, options?: any): Promise<any>;
|
1771
1774
|
/** */
|
1772
1775
|
deleteCategoryOrder(bearerToken: string, clanId: string, options?: any): Promise<any>;
|
1773
1776
|
/** regist fcm device token */
|
@@ -1779,7 +1782,7 @@ export declare class MezonApi {
|
|
1779
1782
|
/** Post clan Emoji /v2/emoji/create */
|
1780
1783
|
createClanEmoji(bearerToken: string, body: ApiClanEmojiCreateRequest, options?: any): Promise<any>;
|
1781
1784
|
/** Delete a emoji by ID. */
|
1782
|
-
deleteClanEmojiById(bearerToken: string, id: string, clanId?: string, options?: any): Promise<any>;
|
1785
|
+
deleteClanEmojiById(bearerToken: string, id: string, clanId?: string, emojiLabel?: string, options?: any): Promise<any>;
|
1783
1786
|
/** Update ClanEmoj By id */
|
1784
1787
|
updateClanEmojiById(bearerToken: string, id: string, body: MezonUpdateClanEmojiByIdBody, options?: any): Promise<any>;
|
1785
1788
|
/** get list emoji by user id */
|
@@ -1795,7 +1798,7 @@ export declare class MezonApi {
|
|
1795
1798
|
/** Update fields in a given event. */
|
1796
1799
|
updateEventUser(bearerToken: string, body: ApiDeleteEventRequest, options?: any): Promise<any>;
|
1797
1800
|
/** Delete a event by ID. */
|
1798
|
-
deleteEvent(bearerToken: string, eventId: string, clanId?: string, creatorId?: string, options?: any): Promise<any>;
|
1801
|
+
deleteEvent(bearerToken: string, eventId: string, clanId?: string, creatorId?: string, eventLabel?: string, options?: any): Promise<any>;
|
1799
1802
|
/** Update fields in a given event. */
|
1800
1803
|
updateEvent(bearerToken: string, eventId: string, body: MezonUpdateEventBody, options?: any): Promise<any>;
|
1801
1804
|
/** Delete one or more users by ID or username. */
|
@@ -1893,7 +1896,7 @@ export declare class MezonApi {
|
|
1893
1896
|
/** Update a role when Delete a role by ID. */
|
1894
1897
|
updateRoleDelete(bearerToken: string, roleId: string, body: MezonUpdateRoleDeleteBody, options?: any): Promise<any>;
|
1895
1898
|
/** Delete a role by ID. */
|
1896
|
-
deleteRole(bearerToken: string, roleId: string, channelId?: string, clanId?: string, options?: any): Promise<any>;
|
1899
|
+
deleteRole(bearerToken: string, roleId: string, channelId?: string, clanId?: string, roleLabel?: string, options?: any): Promise<any>;
|
1897
1900
|
/** Update fields in a given role. */
|
1898
1901
|
updateRole(bearerToken: string, roleId: string, body: MezonUpdateRoleBody, options?: any): Promise<any>;
|
1899
1902
|
/** List role permissions */
|
@@ -1913,7 +1916,7 @@ export declare class MezonApi {
|
|
1913
1916
|
/** Add a new sticker */
|
1914
1917
|
addClanSticker(bearerToken: string, body: ApiClanStickerAddRequest, options?: any): Promise<any>;
|
1915
1918
|
/** Delete a sticker by ID */
|
1916
|
-
deleteClanStickerById(bearerToken: string, id: string, clanId?: string, options?: any): Promise<any>;
|
1919
|
+
deleteClanStickerById(bearerToken: string, id: string, clanId?: string, stickerLabel?: string, options?: any): Promise<any>;
|
1917
1920
|
/** Update a sticker by ID */
|
1918
1921
|
updateClanStickerById(bearerToken: string, id: string, body: MezonUpdateClanStickerByIdBody, options?: any): Promise<any>;
|
1919
1922
|
/** get list sticker by user id */
|
package/dist/client.d.ts
CHANGED
@@ -394,13 +394,13 @@ export declare class Client {
|
|
394
394
|
/** Delete a clan desc by ID. */
|
395
395
|
deleteClanDesc(session: Session, clanDescId: string): Promise<boolean>;
|
396
396
|
/** Delete a category by ID. */
|
397
|
-
deleteCategoryDesc(session: Session, categoryId: string, clanId: string): Promise<boolean>;
|
397
|
+
deleteCategoryDesc(session: Session, categoryId: string, clanId: string, categoryLabel?: string): Promise<boolean>;
|
398
398
|
/** Delete one or more notifications */
|
399
399
|
deleteNotifications(session: Session, ids?: Array<string>): Promise<boolean>;
|
400
400
|
/** Delete a role by ID. */
|
401
|
-
deleteRole(session: Session, roleId: string, clanId: string): Promise<boolean>;
|
401
|
+
deleteRole(session: Session, roleId: string, clanId: string, roleLabel?: string): Promise<boolean>;
|
402
402
|
/** Delete a event by ID. */
|
403
|
-
deleteEvent(session: Session, eventId: string, clanId: string, creatorId: string): Promise<boolean>;
|
403
|
+
deleteEvent(session: Session, eventId: string, clanId: string, creatorId: string, eventLabel?: string): Promise<boolean>;
|
404
404
|
/** update user a event by ID. */
|
405
405
|
updateEventUser(session: Session, request: ApiDeleteEventRequest): Promise<boolean>;
|
406
406
|
/** Submit an event for processing in the server's registered runtime custom events handler. */
|
@@ -546,14 +546,14 @@ export declare class Client {
|
|
546
546
|
/** create clan emoji */
|
547
547
|
createClanEmoji(session: Session, request: ApiClanEmojiCreateRequest): Promise<boolean>;
|
548
548
|
updateClanEmojiById(session: Session, id: string, request: MezonUpdateClanEmojiByIdBody): Promise<boolean>;
|
549
|
-
deleteByIdClanEmoji(session: Session, id: string, clan_id: string): Promise<boolean>;
|
549
|
+
deleteByIdClanEmoji(session: Session, id: string, clan_id: string, emojiLabel?: string): Promise<boolean>;
|
550
550
|
generateWebhookLink(session: Session, request: ApiWebhookCreateRequest): Promise<ApiWebhookGenerateResponse>;
|
551
551
|
listWebhookByChannelId(session: Session, channel_id: string, clan_id: string): Promise<ApiWebhookListResponse>;
|
552
552
|
updateWebhookById(session: Session, id: string, request: MezonUpdateWebhookByIdBody): Promise<boolean>;
|
553
553
|
deleteWebhookById(session: Session, id: string, request: MezonDeleteWebhookByIdBody): Promise<boolean>;
|
554
554
|
checkDuplicateClanName(session: Session, clan_name: string): Promise<ApiCheckDuplicateClanNameResponse>;
|
555
555
|
addClanSticker(session: Session, request: ApiClanStickerAddRequest): Promise<boolean>;
|
556
|
-
deleteClanStickerById(session: Session, id: string, clan_id: string): Promise<boolean>;
|
556
|
+
deleteClanStickerById(session: Session, id: string, clan_id: string, stickerLabel?: string): Promise<boolean>;
|
557
557
|
updateClanStickerById(session: Session, id: string, request: MezonUpdateClanStickerByIdBody): Promise<boolean>;
|
558
558
|
changeChannelCategory(session: Session, id: string, request: MezonChangeChannelCategoryBody): Promise<boolean>;
|
559
559
|
/** */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -3275,7 +3275,7 @@ var MezonApi = class {
|
|
3275
3275
|
]);
|
3276
3276
|
}
|
3277
3277
|
/** */
|
3278
|
-
deleteCategoryDesc(bearerToken, categoryId, clanId, options = {}) {
|
3278
|
+
deleteCategoryDesc(bearerToken, categoryId, clanId, categoryLabel, options = {}) {
|
3279
3279
|
if (categoryId === null || categoryId === void 0) {
|
3280
3280
|
throw new Error(
|
3281
3281
|
"'categoryId' is a required parameter but is null or undefined."
|
@@ -3288,6 +3288,7 @@ var MezonApi = class {
|
|
3288
3288
|
}
|
3289
3289
|
const urlPath = "/v2/deletecategory/category_id/{categoryId}/clan_id/{clanId}".replace("{categoryId}", encodeURIComponent(String(categoryId))).replace("{clanId}", encodeURIComponent(String(clanId)));
|
3290
3290
|
const queryParams = /* @__PURE__ */ new Map();
|
3291
|
+
queryParams.set("category_label", categoryLabel);
|
3291
3292
|
let bodyJson = "";
|
3292
3293
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3293
3294
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -3464,7 +3465,7 @@ var MezonApi = class {
|
|
3464
3465
|
]);
|
3465
3466
|
}
|
3466
3467
|
/** Delete a emoji by ID. */
|
3467
|
-
deleteClanEmojiById(bearerToken, id, clanId, options = {}) {
|
3468
|
+
deleteClanEmojiById(bearerToken, id, clanId, emojiLabel, options = {}) {
|
3468
3469
|
if (id === null || id === void 0) {
|
3469
3470
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
3470
3471
|
}
|
@@ -3474,6 +3475,7 @@ var MezonApi = class {
|
|
3474
3475
|
);
|
3475
3476
|
const queryParams = /* @__PURE__ */ new Map();
|
3476
3477
|
queryParams.set("clan_id", clanId);
|
3478
|
+
queryParams.set("emoji_label", emojiLabel);
|
3477
3479
|
const body = { clan_id: clanId };
|
3478
3480
|
let bodyJson = JSON.stringify(body || {});
|
3479
3481
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
@@ -3709,7 +3711,7 @@ var MezonApi = class {
|
|
3709
3711
|
]);
|
3710
3712
|
}
|
3711
3713
|
/** Delete a event by ID. */
|
3712
|
-
deleteEvent(bearerToken, eventId, clanId, creatorId, options = {}) {
|
3714
|
+
deleteEvent(bearerToken, eventId, clanId, creatorId, eventLabel, options = {}) {
|
3713
3715
|
if (eventId === null || eventId === void 0) {
|
3714
3716
|
throw new Error(
|
3715
3717
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -3722,6 +3724,7 @@ var MezonApi = class {
|
|
3722
3724
|
const queryParams = /* @__PURE__ */ new Map();
|
3723
3725
|
queryParams.set("clan_id", clanId);
|
3724
3726
|
queryParams.set("creator_id", creatorId);
|
3727
|
+
queryParams.set("event_label", eventLabel);
|
3725
3728
|
let bodyJson = "";
|
3726
3729
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3727
3730
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -5163,7 +5166,7 @@ var MezonApi = class {
|
|
5163
5166
|
]);
|
5164
5167
|
}
|
5165
5168
|
/** Delete a role by ID. */
|
5166
|
-
deleteRole(bearerToken, roleId, channelId, clanId, options = {}) {
|
5169
|
+
deleteRole(bearerToken, roleId, channelId, clanId, roleLabel, options = {}) {
|
5167
5170
|
if (roleId === null || roleId === void 0) {
|
5168
5171
|
throw new Error(
|
5169
5172
|
"'roleId' is a required parameter but is null or undefined."
|
@@ -5176,6 +5179,7 @@ var MezonApi = class {
|
|
5176
5179
|
const queryParams = /* @__PURE__ */ new Map();
|
5177
5180
|
queryParams.set("channel_id", channelId);
|
5178
5181
|
queryParams.set("clan_id", clanId);
|
5182
|
+
queryParams.set("role_label", roleLabel);
|
5179
5183
|
let bodyJson = "";
|
5180
5184
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5181
5185
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -5509,7 +5513,7 @@ var MezonApi = class {
|
|
5509
5513
|
]);
|
5510
5514
|
}
|
5511
5515
|
/** Delete a sticker by ID */
|
5512
|
-
deleteClanStickerById(bearerToken, id, clanId, options = {}) {
|
5516
|
+
deleteClanStickerById(bearerToken, id, clanId, stickerLabel, options = {}) {
|
5513
5517
|
if (id === null || id === void 0) {
|
5514
5518
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
5515
5519
|
}
|
@@ -5519,6 +5523,7 @@ var MezonApi = class {
|
|
5519
5523
|
);
|
5520
5524
|
const queryParams = /* @__PURE__ */ new Map();
|
5521
5525
|
queryParams.set("clan_id", clanId);
|
5526
|
+
queryParams.set("sticker_label", stickerLabel);
|
5522
5527
|
let bodyJson = "";
|
5523
5528
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5524
5529
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -8428,12 +8433,12 @@ var Client = class {
|
|
8428
8433
|
});
|
8429
8434
|
}
|
8430
8435
|
/** Delete a category by ID. */
|
8431
|
-
deleteCategoryDesc(session, categoryId, clanId) {
|
8436
|
+
deleteCategoryDesc(session, categoryId, clanId, categoryLabel) {
|
8432
8437
|
return __async(this, null, function* () {
|
8433
8438
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8434
8439
|
yield this.sessionRefresh(session);
|
8435
8440
|
}
|
8436
|
-
return this.apiClient.deleteCategoryDesc(session.token, categoryId, clanId).then((response) => {
|
8441
|
+
return this.apiClient.deleteCategoryDesc(session.token, categoryId, clanId, categoryLabel).then((response) => {
|
8437
8442
|
return response !== void 0;
|
8438
8443
|
});
|
8439
8444
|
});
|
@@ -8450,23 +8455,23 @@ var Client = class {
|
|
8450
8455
|
});
|
8451
8456
|
}
|
8452
8457
|
/** Delete a role by ID. */
|
8453
|
-
deleteRole(session, roleId, clanId) {
|
8458
|
+
deleteRole(session, roleId, clanId, roleLabel) {
|
8454
8459
|
return __async(this, null, function* () {
|
8455
8460
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8456
8461
|
yield this.sessionRefresh(session);
|
8457
8462
|
}
|
8458
|
-
return this.apiClient.deleteRole(session.token, roleId, "", clanId).then((response) => {
|
8463
|
+
return this.apiClient.deleteRole(session.token, roleId, "", clanId, roleLabel).then((response) => {
|
8459
8464
|
return response !== void 0;
|
8460
8465
|
});
|
8461
8466
|
});
|
8462
8467
|
}
|
8463
8468
|
/** Delete a event by ID. */
|
8464
|
-
deleteEvent(session, eventId, clanId, creatorId) {
|
8469
|
+
deleteEvent(session, eventId, clanId, creatorId, eventLabel) {
|
8465
8470
|
return __async(this, null, function* () {
|
8466
8471
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8467
8472
|
yield this.sessionRefresh(session);
|
8468
8473
|
}
|
8469
|
-
return this.apiClient.deleteEvent(session.token, eventId, clanId, creatorId).then((response) => {
|
8474
|
+
return this.apiClient.deleteEvent(session.token, eventId, clanId, creatorId, eventLabel).then((response) => {
|
8470
8475
|
return response !== void 0;
|
8471
8476
|
});
|
8472
8477
|
});
|
@@ -9642,12 +9647,12 @@ var Client = class {
|
|
9642
9647
|
});
|
9643
9648
|
}
|
9644
9649
|
//**delete clan emoji by id */
|
9645
|
-
deleteByIdClanEmoji(session, id, clan_id) {
|
9650
|
+
deleteByIdClanEmoji(session, id, clan_id, emojiLabel) {
|
9646
9651
|
return __async(this, null, function* () {
|
9647
9652
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9648
9653
|
yield this.sessionRefresh(session);
|
9649
9654
|
}
|
9650
|
-
return this.apiClient.deleteClanEmojiById(session.token, id, clan_id).then((response) => {
|
9655
|
+
return this.apiClient.deleteClanEmojiById(session.token, id, clan_id, emojiLabel).then((response) => {
|
9651
9656
|
return response !== void 0;
|
9652
9657
|
});
|
9653
9658
|
});
|
@@ -9719,12 +9724,12 @@ var Client = class {
|
|
9719
9724
|
});
|
9720
9725
|
}
|
9721
9726
|
//**Delete a sticker by ID*/
|
9722
|
-
deleteClanStickerById(session, id, clan_id) {
|
9727
|
+
deleteClanStickerById(session, id, clan_id, stickerLabel) {
|
9723
9728
|
return __async(this, null, function* () {
|
9724
9729
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9725
9730
|
yield this.sessionRefresh(session);
|
9726
9731
|
}
|
9727
|
-
return this.apiClient.deleteClanStickerById(session.token, id, clan_id).then((response) => {
|
9732
|
+
return this.apiClient.deleteClanStickerById(session.token, id, clan_id, stickerLabel).then((response) => {
|
9728
9733
|
return response !== void 0;
|
9729
9734
|
});
|
9730
9735
|
});
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -3241,7 +3241,7 @@ var MezonApi = class {
|
|
3241
3241
|
]);
|
3242
3242
|
}
|
3243
3243
|
/** */
|
3244
|
-
deleteCategoryDesc(bearerToken, categoryId, clanId, options = {}) {
|
3244
|
+
deleteCategoryDesc(bearerToken, categoryId, clanId, categoryLabel, options = {}) {
|
3245
3245
|
if (categoryId === null || categoryId === void 0) {
|
3246
3246
|
throw new Error(
|
3247
3247
|
"'categoryId' is a required parameter but is null or undefined."
|
@@ -3254,6 +3254,7 @@ var MezonApi = class {
|
|
3254
3254
|
}
|
3255
3255
|
const urlPath = "/v2/deletecategory/category_id/{categoryId}/clan_id/{clanId}".replace("{categoryId}", encodeURIComponent(String(categoryId))).replace("{clanId}", encodeURIComponent(String(clanId)));
|
3256
3256
|
const queryParams = /* @__PURE__ */ new Map();
|
3257
|
+
queryParams.set("category_label", categoryLabel);
|
3257
3258
|
let bodyJson = "";
|
3258
3259
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3259
3260
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -3430,7 +3431,7 @@ var MezonApi = class {
|
|
3430
3431
|
]);
|
3431
3432
|
}
|
3432
3433
|
/** Delete a emoji by ID. */
|
3433
|
-
deleteClanEmojiById(bearerToken, id, clanId, options = {}) {
|
3434
|
+
deleteClanEmojiById(bearerToken, id, clanId, emojiLabel, options = {}) {
|
3434
3435
|
if (id === null || id === void 0) {
|
3435
3436
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
3436
3437
|
}
|
@@ -3440,6 +3441,7 @@ var MezonApi = class {
|
|
3440
3441
|
);
|
3441
3442
|
const queryParams = /* @__PURE__ */ new Map();
|
3442
3443
|
queryParams.set("clan_id", clanId);
|
3444
|
+
queryParams.set("emoji_label", emojiLabel);
|
3443
3445
|
const body = { clan_id: clanId };
|
3444
3446
|
let bodyJson = JSON.stringify(body || {});
|
3445
3447
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
@@ -3675,7 +3677,7 @@ var MezonApi = class {
|
|
3675
3677
|
]);
|
3676
3678
|
}
|
3677
3679
|
/** Delete a event by ID. */
|
3678
|
-
deleteEvent(bearerToken, eventId, clanId, creatorId, options = {}) {
|
3680
|
+
deleteEvent(bearerToken, eventId, clanId, creatorId, eventLabel, options = {}) {
|
3679
3681
|
if (eventId === null || eventId === void 0) {
|
3680
3682
|
throw new Error(
|
3681
3683
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -3688,6 +3690,7 @@ var MezonApi = class {
|
|
3688
3690
|
const queryParams = /* @__PURE__ */ new Map();
|
3689
3691
|
queryParams.set("clan_id", clanId);
|
3690
3692
|
queryParams.set("creator_id", creatorId);
|
3693
|
+
queryParams.set("event_label", eventLabel);
|
3691
3694
|
let bodyJson = "";
|
3692
3695
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3693
3696
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -5129,7 +5132,7 @@ var MezonApi = class {
|
|
5129
5132
|
]);
|
5130
5133
|
}
|
5131
5134
|
/** Delete a role by ID. */
|
5132
|
-
deleteRole(bearerToken, roleId, channelId, clanId, options = {}) {
|
5135
|
+
deleteRole(bearerToken, roleId, channelId, clanId, roleLabel, options = {}) {
|
5133
5136
|
if (roleId === null || roleId === void 0) {
|
5134
5137
|
throw new Error(
|
5135
5138
|
"'roleId' is a required parameter but is null or undefined."
|
@@ -5142,6 +5145,7 @@ var MezonApi = class {
|
|
5142
5145
|
const queryParams = /* @__PURE__ */ new Map();
|
5143
5146
|
queryParams.set("channel_id", channelId);
|
5144
5147
|
queryParams.set("clan_id", clanId);
|
5148
|
+
queryParams.set("role_label", roleLabel);
|
5145
5149
|
let bodyJson = "";
|
5146
5150
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5147
5151
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -5475,7 +5479,7 @@ var MezonApi = class {
|
|
5475
5479
|
]);
|
5476
5480
|
}
|
5477
5481
|
/** Delete a sticker by ID */
|
5478
|
-
deleteClanStickerById(bearerToken, id, clanId, options = {}) {
|
5482
|
+
deleteClanStickerById(bearerToken, id, clanId, stickerLabel, options = {}) {
|
5479
5483
|
if (id === null || id === void 0) {
|
5480
5484
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
5481
5485
|
}
|
@@ -5485,6 +5489,7 @@ var MezonApi = class {
|
|
5485
5489
|
);
|
5486
5490
|
const queryParams = /* @__PURE__ */ new Map();
|
5487
5491
|
queryParams.set("clan_id", clanId);
|
5492
|
+
queryParams.set("sticker_label", stickerLabel);
|
5488
5493
|
let bodyJson = "";
|
5489
5494
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5490
5495
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -8394,12 +8399,12 @@ var Client = class {
|
|
8394
8399
|
});
|
8395
8400
|
}
|
8396
8401
|
/** Delete a category by ID. */
|
8397
|
-
deleteCategoryDesc(session, categoryId, clanId) {
|
8402
|
+
deleteCategoryDesc(session, categoryId, clanId, categoryLabel) {
|
8398
8403
|
return __async(this, null, function* () {
|
8399
8404
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8400
8405
|
yield this.sessionRefresh(session);
|
8401
8406
|
}
|
8402
|
-
return this.apiClient.deleteCategoryDesc(session.token, categoryId, clanId).then((response) => {
|
8407
|
+
return this.apiClient.deleteCategoryDesc(session.token, categoryId, clanId, categoryLabel).then((response) => {
|
8403
8408
|
return response !== void 0;
|
8404
8409
|
});
|
8405
8410
|
});
|
@@ -8416,23 +8421,23 @@ var Client = class {
|
|
8416
8421
|
});
|
8417
8422
|
}
|
8418
8423
|
/** Delete a role by ID. */
|
8419
|
-
deleteRole(session, roleId, clanId) {
|
8424
|
+
deleteRole(session, roleId, clanId, roleLabel) {
|
8420
8425
|
return __async(this, null, function* () {
|
8421
8426
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8422
8427
|
yield this.sessionRefresh(session);
|
8423
8428
|
}
|
8424
|
-
return this.apiClient.deleteRole(session.token, roleId, "", clanId).then((response) => {
|
8429
|
+
return this.apiClient.deleteRole(session.token, roleId, "", clanId, roleLabel).then((response) => {
|
8425
8430
|
return response !== void 0;
|
8426
8431
|
});
|
8427
8432
|
});
|
8428
8433
|
}
|
8429
8434
|
/** Delete a event by ID. */
|
8430
|
-
deleteEvent(session, eventId, clanId, creatorId) {
|
8435
|
+
deleteEvent(session, eventId, clanId, creatorId, eventLabel) {
|
8431
8436
|
return __async(this, null, function* () {
|
8432
8437
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8433
8438
|
yield this.sessionRefresh(session);
|
8434
8439
|
}
|
8435
|
-
return this.apiClient.deleteEvent(session.token, eventId, clanId, creatorId).then((response) => {
|
8440
|
+
return this.apiClient.deleteEvent(session.token, eventId, clanId, creatorId, eventLabel).then((response) => {
|
8436
8441
|
return response !== void 0;
|
8437
8442
|
});
|
8438
8443
|
});
|
@@ -9608,12 +9613,12 @@ var Client = class {
|
|
9608
9613
|
});
|
9609
9614
|
}
|
9610
9615
|
//**delete clan emoji by id */
|
9611
|
-
deleteByIdClanEmoji(session, id, clan_id) {
|
9616
|
+
deleteByIdClanEmoji(session, id, clan_id, emojiLabel) {
|
9612
9617
|
return __async(this, null, function* () {
|
9613
9618
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9614
9619
|
yield this.sessionRefresh(session);
|
9615
9620
|
}
|
9616
|
-
return this.apiClient.deleteClanEmojiById(session.token, id, clan_id).then((response) => {
|
9621
|
+
return this.apiClient.deleteClanEmojiById(session.token, id, clan_id, emojiLabel).then((response) => {
|
9617
9622
|
return response !== void 0;
|
9618
9623
|
});
|
9619
9624
|
});
|
@@ -9685,12 +9690,12 @@ var Client = class {
|
|
9685
9690
|
});
|
9686
9691
|
}
|
9687
9692
|
//**Delete a sticker by ID*/
|
9688
|
-
deleteClanStickerById(session, id, clan_id) {
|
9693
|
+
deleteClanStickerById(session, id, clan_id, stickerLabel) {
|
9689
9694
|
return __async(this, null, function* () {
|
9690
9695
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9691
9696
|
yield this.sessionRefresh(session);
|
9692
9697
|
}
|
9693
|
-
return this.apiClient.deleteClanStickerById(session.token, id, clan_id).then((response) => {
|
9698
|
+
return this.apiClient.deleteClanStickerById(session.token, id, clan_id, stickerLabel).then((response) => {
|
9694
9699
|
return response !== void 0;
|
9695
9700
|
});
|
9696
9701
|
});
|