mezon-js 2.8.83 → 2.8.85
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 +10 -5
- package/client.ts +3 -2
- package/dist/api.gen.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/mezon-js.cjs.js +11 -8
- package/dist/mezon-js.esm.mjs +11 -8
- package/dist/socket.d.ts +22 -10
- package/package.json +1 -1
- package/socket.ts +26 -16
package/api.gen.ts
CHANGED
|
@@ -4127,14 +4127,19 @@ export class MezonApi {
|
|
|
4127
4127
|
|
|
4128
4128
|
/** */
|
|
4129
4129
|
deleteCategoryDesc(bearerToken: string,
|
|
4130
|
-
|
|
4130
|
+
categoryId:string,
|
|
4131
|
+
clanId:string,
|
|
4131
4132
|
options: any = {}): Promise<any> {
|
|
4132
4133
|
|
|
4133
|
-
if (
|
|
4134
|
-
throw new Error("'
|
|
4134
|
+
if (categoryId === null || categoryId === undefined) {
|
|
4135
|
+
throw new Error("'categoryId' is a required parameter but is null or undefined.");
|
|
4135
4136
|
}
|
|
4136
|
-
|
|
4137
|
-
|
|
4137
|
+
if (clanId === null || clanId === undefined) {
|
|
4138
|
+
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
|
4139
|
+
}
|
|
4140
|
+
const urlPath = "/v2/deletecategory/category_id/{categoryId}/clan_id/{clanId}"
|
|
4141
|
+
.replace("{categoryId}", encodeURIComponent(String(categoryId)))
|
|
4142
|
+
.replace("{clanId}", encodeURIComponent(String(clanId)));
|
|
4138
4143
|
const queryParams = new Map<string, any>();
|
|
4139
4144
|
|
|
4140
4145
|
let bodyJson : string = "";
|
package/client.ts
CHANGED
|
@@ -1055,7 +1055,8 @@ export class Client {
|
|
|
1055
1055
|
/** Delete a category by ID. */
|
|
1056
1056
|
async deleteCategoryDesc(
|
|
1057
1057
|
session: Session,
|
|
1058
|
-
|
|
1058
|
+
categoryId: string,
|
|
1059
|
+
clanId: string,
|
|
1059
1060
|
): Promise<boolean> {
|
|
1060
1061
|
if (
|
|
1061
1062
|
this.autoRefreshSession &&
|
|
@@ -1066,7 +1067,7 @@ export class Client {
|
|
|
1066
1067
|
}
|
|
1067
1068
|
|
|
1068
1069
|
return this.apiClient
|
|
1069
|
-
.deleteCategoryDesc(session.token,
|
|
1070
|
+
.deleteCategoryDesc(session.token, categoryId, clanId)
|
|
1070
1071
|
.then((response: any) => {
|
|
1071
1072
|
return response !== undefined;
|
|
1072
1073
|
});
|
package/dist/api.gen.d.ts
CHANGED
|
@@ -1121,7 +1121,7 @@ export declare class MezonApi {
|
|
|
1121
1121
|
/** */
|
|
1122
1122
|
createCategoryDesc(bearerToken: string, body: ApiCreateCategoryDescRequest, options?: any): Promise<ApiCategoryDesc>;
|
|
1123
1123
|
/** */
|
|
1124
|
-
deleteCategoryDesc(bearerToken: string,
|
|
1124
|
+
deleteCategoryDesc(bearerToken: string, categoryId: string, clanId: string, options?: any): Promise<any>;
|
|
1125
1125
|
/** */
|
|
1126
1126
|
deleteCategoryOrder(bearerToken: string, clanId: string, options?: any): Promise<any>;
|
|
1127
1127
|
/** regist fcm device token */
|
package/dist/client.d.ts
CHANGED
|
@@ -375,7 +375,7 @@ export declare class Client {
|
|
|
375
375
|
/** Delete a clan desc by ID. */
|
|
376
376
|
deleteClanDesc(session: Session, clanDescId: string): Promise<boolean>;
|
|
377
377
|
/** Delete a category by ID. */
|
|
378
|
-
deleteCategoryDesc(session: Session,
|
|
378
|
+
deleteCategoryDesc(session: Session, categoryId: string, clanId: string): Promise<boolean>;
|
|
379
379
|
/** Delete one or more notifications */
|
|
380
380
|
deleteNotifications(session: Session, ids?: Array<string>): Promise<boolean>;
|
|
381
381
|
/** Delete a role by ID. */
|
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -2571,11 +2571,14 @@ var MezonApi = class {
|
|
|
2571
2571
|
]);
|
|
2572
2572
|
}
|
|
2573
2573
|
/** */
|
|
2574
|
-
deleteCategoryDesc(bearerToken,
|
|
2575
|
-
if (
|
|
2576
|
-
throw new Error("'
|
|
2574
|
+
deleteCategoryDesc(bearerToken, categoryId, clanId, options = {}) {
|
|
2575
|
+
if (categoryId === null || categoryId === void 0) {
|
|
2576
|
+
throw new Error("'categoryId' is a required parameter but is null or undefined.");
|
|
2577
2577
|
}
|
|
2578
|
-
|
|
2578
|
+
if (clanId === null || clanId === void 0) {
|
|
2579
|
+
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
|
2580
|
+
}
|
|
2581
|
+
const urlPath = "/v2/deletecategory/category_id/{categoryId}/clan_id/{clanId}".replace("{categoryId}", encodeURIComponent(String(categoryId))).replace("{clanId}", encodeURIComponent(String(clanId)));
|
|
2579
2582
|
const queryParams = /* @__PURE__ */ new Map();
|
|
2580
2583
|
let bodyJson = "";
|
|
2581
2584
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
@@ -5346,9 +5349,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
5346
5349
|
return response.permission_role_channel_list_event;
|
|
5347
5350
|
});
|
|
5348
5351
|
}
|
|
5349
|
-
|
|
5352
|
+
listStickersByUserId() {
|
|
5350
5353
|
return __async(this, null, function* () {
|
|
5351
|
-
const response = yield this.send({ sticker_listed_event: {
|
|
5354
|
+
const response = yield this.send({ sticker_listed_event: {} });
|
|
5352
5355
|
return response.sticker_listed_event;
|
|
5353
5356
|
});
|
|
5354
5357
|
}
|
|
@@ -5799,12 +5802,12 @@ var Client = class {
|
|
|
5799
5802
|
});
|
|
5800
5803
|
}
|
|
5801
5804
|
/** Delete a category by ID. */
|
|
5802
|
-
deleteCategoryDesc(session,
|
|
5805
|
+
deleteCategoryDesc(session, categoryId, clanId) {
|
|
5803
5806
|
return __async(this, null, function* () {
|
|
5804
5807
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
5805
5808
|
yield this.sessionRefresh(session);
|
|
5806
5809
|
}
|
|
5807
|
-
return this.apiClient.deleteCategoryDesc(session.token,
|
|
5810
|
+
return this.apiClient.deleteCategoryDesc(session.token, categoryId, clanId).then((response) => {
|
|
5808
5811
|
return response !== void 0;
|
|
5809
5812
|
});
|
|
5810
5813
|
});
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -2542,11 +2542,14 @@ var MezonApi = class {
|
|
|
2542
2542
|
]);
|
|
2543
2543
|
}
|
|
2544
2544
|
/** */
|
|
2545
|
-
deleteCategoryDesc(bearerToken,
|
|
2546
|
-
if (
|
|
2547
|
-
throw new Error("'
|
|
2545
|
+
deleteCategoryDesc(bearerToken, categoryId, clanId, options = {}) {
|
|
2546
|
+
if (categoryId === null || categoryId === void 0) {
|
|
2547
|
+
throw new Error("'categoryId' is a required parameter but is null or undefined.");
|
|
2548
2548
|
}
|
|
2549
|
-
|
|
2549
|
+
if (clanId === null || clanId === void 0) {
|
|
2550
|
+
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
|
2551
|
+
}
|
|
2552
|
+
const urlPath = "/v2/deletecategory/category_id/{categoryId}/clan_id/{clanId}".replace("{categoryId}", encodeURIComponent(String(categoryId))).replace("{clanId}", encodeURIComponent(String(clanId)));
|
|
2550
2553
|
const queryParams = /* @__PURE__ */ new Map();
|
|
2551
2554
|
let bodyJson = "";
|
|
2552
2555
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
@@ -5317,9 +5320,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
|
5317
5320
|
return response.permission_role_channel_list_event;
|
|
5318
5321
|
});
|
|
5319
5322
|
}
|
|
5320
|
-
|
|
5323
|
+
listStickersByUserId() {
|
|
5321
5324
|
return __async(this, null, function* () {
|
|
5322
|
-
const response = yield this.send({ sticker_listed_event: {
|
|
5325
|
+
const response = yield this.send({ sticker_listed_event: {} });
|
|
5323
5326
|
return response.sticker_listed_event;
|
|
5324
5327
|
});
|
|
5325
5328
|
}
|
|
@@ -5770,12 +5773,12 @@ var Client = class {
|
|
|
5770
5773
|
});
|
|
5771
5774
|
}
|
|
5772
5775
|
/** Delete a category by ID. */
|
|
5773
|
-
deleteCategoryDesc(session,
|
|
5776
|
+
deleteCategoryDesc(session, categoryId, clanId) {
|
|
5774
5777
|
return __async(this, null, function* () {
|
|
5775
5778
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
5776
5779
|
yield this.sessionRefresh(session);
|
|
5777
5780
|
}
|
|
5778
|
-
return this.apiClient.deleteCategoryDesc(session.token,
|
|
5781
|
+
return this.apiClient.deleteCategoryDesc(session.token, categoryId, clanId).then((response) => {
|
|
5779
5782
|
return response !== void 0;
|
|
5780
5783
|
});
|
|
5781
5784
|
});
|
package/dist/socket.d.ts
CHANGED
|
@@ -79,12 +79,28 @@ interface ChannelLeave {
|
|
|
79
79
|
}
|
|
80
80
|
export interface AddClanUserEvent {
|
|
81
81
|
clan_id: string;
|
|
82
|
-
user:
|
|
82
|
+
user: UserProfileRedis;
|
|
83
|
+
}
|
|
84
|
+
export interface UserProfileRedis {
|
|
85
|
+
/** User IDs to follow. */
|
|
86
|
+
user_id: string;
|
|
87
|
+
/** Username to follow. */
|
|
88
|
+
username: string;
|
|
89
|
+
/** Avatar to follow. */
|
|
90
|
+
avatar: string;
|
|
91
|
+
/** Display name */
|
|
92
|
+
display_name: string;
|
|
93
|
+
/** about me */
|
|
94
|
+
about_me: string;
|
|
95
|
+
/** custom status */
|
|
96
|
+
custom_status: string;
|
|
97
|
+
/** create time */
|
|
98
|
+
create_time_second: number;
|
|
83
99
|
}
|
|
84
100
|
/** UserChannelAddedEvent */
|
|
85
101
|
export interface UserChannelAddedEvent {
|
|
86
102
|
channel_id: string;
|
|
87
|
-
users:
|
|
103
|
+
users: UserProfileRedis[];
|
|
88
104
|
status: string;
|
|
89
105
|
clan_id: string;
|
|
90
106
|
channel_type: number;
|
|
@@ -92,11 +108,6 @@ export interface UserChannelAddedEvent {
|
|
|
92
108
|
parent_id: string;
|
|
93
109
|
is_parent_public: boolean;
|
|
94
110
|
}
|
|
95
|
-
export interface AddUsers {
|
|
96
|
-
user_id: string;
|
|
97
|
-
avatar: string;
|
|
98
|
-
username: string;
|
|
99
|
-
}
|
|
100
111
|
export interface UserChannelRemovedEvent {
|
|
101
112
|
channel_id: string;
|
|
102
113
|
user_ids: string[];
|
|
@@ -396,7 +407,6 @@ export interface ClanNameExistedEvent {
|
|
|
396
407
|
}
|
|
397
408
|
/** */
|
|
398
409
|
export interface StrickerListedEvent {
|
|
399
|
-
clan_id: string;
|
|
400
410
|
stickers?: Array<ClanSticker>;
|
|
401
411
|
}
|
|
402
412
|
/** */
|
|
@@ -408,6 +418,8 @@ export interface ClanSticker {
|
|
|
408
418
|
id?: string;
|
|
409
419
|
shortname?: string;
|
|
410
420
|
source?: string;
|
|
421
|
+
logo?: string;
|
|
422
|
+
clan_name?: string;
|
|
411
423
|
}
|
|
412
424
|
/** */
|
|
413
425
|
export interface EmojiListedEvent {
|
|
@@ -607,7 +619,7 @@ export interface Socket {
|
|
|
607
619
|
listClanEmojiByClanId(clan_id: string): Promise<EmojiListedEvent>;
|
|
608
620
|
listUserPermissionInChannel(clan_id: string, channel_id: string): Promise<UserPermissionInChannelListEvent>;
|
|
609
621
|
listRoles(ClanId: string, Limit: number, State: number, Cursor: string): Promise<RoleListEvent>;
|
|
610
|
-
|
|
622
|
+
listStickersByUserId(): Promise<StrickerListedEvent>;
|
|
611
623
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
612
624
|
ListUserClansByUserId(): Promise<AllUserClans>;
|
|
613
625
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
@@ -701,7 +713,7 @@ export declare class DefaultSocket implements Socket {
|
|
|
701
713
|
ListUserClansByUserId(): Promise<AllUserClans>;
|
|
702
714
|
hashtagDMList(user_id: Array<string>, limit: number): Promise<HashtagDmListEvent>;
|
|
703
715
|
GetPermissionByRoleIdChannelId(role_id: string, channel_id: string): Promise<PermissionRoleChannelListEvent>;
|
|
704
|
-
|
|
716
|
+
listStickersByUserId(): Promise<StrickerListedEvent>;
|
|
705
717
|
getNotificationChannelSetting(channel_id: string): Promise<NotificationChannelSettingEvent>;
|
|
706
718
|
getNotificationCategorySetting(category_id: string): Promise<NotificationCategorySettingEvent>;
|
|
707
719
|
getNotificationClanSetting(clan_id: string): Promise<NotificationClanSettingEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
|
@@ -104,7 +104,24 @@ export interface AddClanUserEvent {
|
|
|
104
104
|
//the clan id
|
|
105
105
|
clan_id: string;
|
|
106
106
|
// the user
|
|
107
|
-
user:
|
|
107
|
+
user: UserProfileRedis;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface UserProfileRedis {
|
|
111
|
+
/** User IDs to follow. */
|
|
112
|
+
user_id: string;
|
|
113
|
+
/** Username to follow. */
|
|
114
|
+
username: string;
|
|
115
|
+
/** Avatar to follow. */
|
|
116
|
+
avatar: string;
|
|
117
|
+
/** Display name */
|
|
118
|
+
display_name: string;
|
|
119
|
+
/** about me */
|
|
120
|
+
about_me: string;
|
|
121
|
+
/** custom status */
|
|
122
|
+
custom_status: string;
|
|
123
|
+
/** create time */
|
|
124
|
+
create_time_second: number;
|
|
108
125
|
}
|
|
109
126
|
|
|
110
127
|
/** UserChannelAddedEvent */
|
|
@@ -112,7 +129,7 @@ export interface UserChannelAddedEvent {
|
|
|
112
129
|
// the channel id
|
|
113
130
|
channel_id: string;
|
|
114
131
|
// the user
|
|
115
|
-
users:
|
|
132
|
+
users: UserProfileRedis[];
|
|
116
133
|
// the custom status
|
|
117
134
|
status: string;
|
|
118
135
|
// the clan id
|
|
@@ -127,15 +144,6 @@ export interface UserChannelAddedEvent {
|
|
|
127
144
|
is_parent_public: boolean;
|
|
128
145
|
}
|
|
129
146
|
|
|
130
|
-
export interface AddUsers {
|
|
131
|
-
// User IDs to follow.
|
|
132
|
-
user_id: string;
|
|
133
|
-
// Avatar to follow.
|
|
134
|
-
avatar: string;
|
|
135
|
-
// Username to follow.
|
|
136
|
-
username: string;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
147
|
export interface UserChannelRemovedEvent {
|
|
140
148
|
// the channel id
|
|
141
149
|
channel_id: string;
|
|
@@ -570,8 +578,6 @@ export interface ClanNameExistedEvent {
|
|
|
570
578
|
|
|
571
579
|
/** */
|
|
572
580
|
export interface StrickerListedEvent {
|
|
573
|
-
// clan id
|
|
574
|
-
clan_id: string;
|
|
575
581
|
// sticker data
|
|
576
582
|
stickers?: Array<ClanSticker>;
|
|
577
583
|
}
|
|
@@ -592,6 +598,10 @@ export interface ClanSticker {
|
|
|
592
598
|
shortname?: string;
|
|
593
599
|
//
|
|
594
600
|
source?: string;
|
|
601
|
+
//
|
|
602
|
+
logo?: string;
|
|
603
|
+
//
|
|
604
|
+
clan_name?: string;
|
|
595
605
|
}
|
|
596
606
|
|
|
597
607
|
/** */
|
|
@@ -934,7 +944,7 @@ export interface Socket {
|
|
|
934
944
|
|
|
935
945
|
listRoles(ClanId: string, Limit: number, State: number, Cursor: string): Promise<RoleListEvent>;
|
|
936
946
|
|
|
937
|
-
|
|
947
|
+
listStickersByUserId(): Promise<StrickerListedEvent>;
|
|
938
948
|
|
|
939
949
|
ListChannelByUserId(): Promise<ChannelDescListEvent>;
|
|
940
950
|
|
|
@@ -1544,8 +1554,8 @@ export class DefaultSocket implements Socket {
|
|
|
1544
1554
|
return response.permission_role_channel_list_event
|
|
1545
1555
|
}
|
|
1546
1556
|
|
|
1547
|
-
async
|
|
1548
|
-
const response = await this.send({sticker_listed_event: {
|
|
1557
|
+
async listStickersByUserId(): Promise<StrickerListedEvent> {
|
|
1558
|
+
const response = await this.send({sticker_listed_event: {}});
|
|
1549
1559
|
return response.sticker_listed_event
|
|
1550
1560
|
}
|
|
1551
1561
|
|