mezon-js 2.9.37 → 2.9.38
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 +4 -0
- package/client.ts +29 -49
- package/dist/api.gen.d.ts +2 -0
- package/dist/client.d.ts +2 -2
- package/dist/mezon-js.cjs.js +3 -21
- package/dist/mezon-js.esm.mjs +3 -21
- package/package.json +1 -1
package/api.gen.ts
CHANGED
|
@@ -1631,6 +1631,10 @@ export interface ApiPinMessage {
|
|
|
1631
1631
|
channel_id?: string;
|
|
1632
1632
|
//
|
|
1633
1633
|
content?: string;
|
|
1634
|
+
//The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
|
|
1635
|
+
create_time?: string;
|
|
1636
|
+
//
|
|
1637
|
+
create_time_seconds?: number;
|
|
1634
1638
|
//
|
|
1635
1639
|
id?: string;
|
|
1636
1640
|
//
|
package/client.ts
CHANGED
|
@@ -123,6 +123,7 @@ import {
|
|
|
123
123
|
ApiMarkAsReadRequest,
|
|
124
124
|
ApiChannelCanvasListResponse,
|
|
125
125
|
ApiEditChannelCanvasRequest,
|
|
126
|
+
ApiChannelSettingListResponse,
|
|
126
127
|
} from "./api.gen";
|
|
127
128
|
|
|
128
129
|
import { Session } from "./session";
|
|
@@ -3926,11 +3927,11 @@ export class Client {
|
|
|
3926
3927
|
/** List Threads. */
|
|
3927
3928
|
async listThreadDescs(
|
|
3928
3929
|
session: Session,
|
|
3929
|
-
channelId:string,
|
|
3930
|
-
limit?:number,
|
|
3931
|
-
state?:number,
|
|
3932
|
-
clanId?:string,
|
|
3933
|
-
threadId?: string
|
|
3930
|
+
channelId: string,
|
|
3931
|
+
limit?: number,
|
|
3932
|
+
state?: number,
|
|
3933
|
+
clanId?: string,
|
|
3934
|
+
threadId?: string
|
|
3934
3935
|
): Promise<ApiChannelDescList> {
|
|
3935
3936
|
if (
|
|
3936
3937
|
this.autoRefreshSession &&
|
|
@@ -3941,14 +3942,7 @@ export class Client {
|
|
|
3941
3942
|
}
|
|
3942
3943
|
|
|
3943
3944
|
return this.apiClient
|
|
3944
|
-
.listThreadDescs(
|
|
3945
|
-
session.token,
|
|
3946
|
-
channelId,
|
|
3947
|
-
limit,
|
|
3948
|
-
state,
|
|
3949
|
-
clanId,
|
|
3950
|
-
threadId
|
|
3951
|
-
)
|
|
3945
|
+
.listThreadDescs(session.token, channelId, limit, state, clanId, threadId)
|
|
3952
3946
|
.then((response: ApiChannelDescList) => {
|
|
3953
3947
|
var result: ApiChannelDescList = {
|
|
3954
3948
|
channeldesc: [],
|
|
@@ -3961,27 +3955,24 @@ export class Client {
|
|
|
3961
3955
|
result.channeldesc = response.channeldesc;
|
|
3962
3956
|
return Promise.resolve(result);
|
|
3963
3957
|
});
|
|
3964
|
-
}
|
|
3958
|
+
}
|
|
3965
3959
|
|
|
3966
|
-
async leaveThread(
|
|
3967
|
-
session: Session,
|
|
3968
|
-
channelId: string
|
|
3969
|
-
) : Promise<any> {
|
|
3960
|
+
async leaveThread(session: Session, channelId: string): Promise<any> {
|
|
3970
3961
|
if (
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3962
|
+
this.autoRefreshSession &&
|
|
3963
|
+
session.refresh_token &&
|
|
3964
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
|
3974
3965
|
) {
|
|
3975
|
-
|
|
3966
|
+
await this.sessionRefresh(session);
|
|
3976
3967
|
}
|
|
3977
|
-
|
|
3968
|
+
|
|
3978
3969
|
return this.apiClient
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3970
|
+
.leaveThread(session.token, channelId)
|
|
3971
|
+
.then((response: any) => {
|
|
3972
|
+
return Promise.resolve(response);
|
|
3973
|
+
});
|
|
3983
3974
|
}
|
|
3984
|
-
|
|
3975
|
+
|
|
3985
3976
|
async getChannelSettingInClan(
|
|
3986
3977
|
session: Session,
|
|
3987
3978
|
clanId: string,
|
|
@@ -3993,7 +3984,7 @@ export class Client {
|
|
|
3993
3984
|
type?: number,
|
|
3994
3985
|
limit?: number,
|
|
3995
3986
|
page?: number
|
|
3996
|
-
): Promise<
|
|
3987
|
+
): Promise<ApiChannelSettingListResponse> {
|
|
3997
3988
|
if (
|
|
3998
3989
|
this.autoRefreshSession &&
|
|
3999
3990
|
session.refresh_token &&
|
|
@@ -4022,10 +4013,10 @@ export class Client {
|
|
|
4022
4013
|
|
|
4023
4014
|
async getChannelCanvasList(
|
|
4024
4015
|
session: Session,
|
|
4025
|
-
channelId:string,
|
|
4026
|
-
clanId?:string,
|
|
4027
|
-
limit?:number,
|
|
4028
|
-
page?:number
|
|
4016
|
+
channelId: string,
|
|
4017
|
+
clanId?: string,
|
|
4018
|
+
limit?: number,
|
|
4019
|
+
page?: number
|
|
4029
4020
|
): Promise<any> {
|
|
4030
4021
|
if (
|
|
4031
4022
|
this.autoRefreshSession &&
|
|
@@ -4036,13 +4027,7 @@ export class Client {
|
|
|
4036
4027
|
}
|
|
4037
4028
|
|
|
4038
4029
|
return this.apiClient
|
|
4039
|
-
.getChannelCanvasList(
|
|
4040
|
-
session.token,
|
|
4041
|
-
channelId,
|
|
4042
|
-
clanId,
|
|
4043
|
-
limit,
|
|
4044
|
-
page
|
|
4045
|
-
)
|
|
4030
|
+
.getChannelCanvasList(session.token, channelId, clanId, limit, page)
|
|
4046
4031
|
.then((response: ApiChannelCanvasListResponse) => {
|
|
4047
4032
|
var result: ApiChannelCanvasListResponse = {
|
|
4048
4033
|
channel_canvases: [],
|
|
@@ -4061,9 +4046,9 @@ export class Client {
|
|
|
4061
4046
|
|
|
4062
4047
|
async getChannelCanvasDetail(
|
|
4063
4048
|
session: Session,
|
|
4064
|
-
id:string,
|
|
4065
|
-
clanId?:string,
|
|
4066
|
-
channelId?:string
|
|
4049
|
+
id: string,
|
|
4050
|
+
clanId?: string,
|
|
4051
|
+
channelId?: string
|
|
4067
4052
|
): Promise<any> {
|
|
4068
4053
|
if (
|
|
4069
4054
|
this.autoRefreshSession &&
|
|
@@ -4074,12 +4059,7 @@ export class Client {
|
|
|
4074
4059
|
}
|
|
4075
4060
|
|
|
4076
4061
|
return this.apiClient
|
|
4077
|
-
.getChannelCanvasDetail(
|
|
4078
|
-
session.token,
|
|
4079
|
-
id,
|
|
4080
|
-
clanId,
|
|
4081
|
-
channelId,
|
|
4082
|
-
)
|
|
4062
|
+
.getChannelCanvasDetail(session.token, id, clanId, channelId)
|
|
4083
4063
|
.then((response: any) => {
|
|
4084
4064
|
return Promise.resolve(response);
|
|
4085
4065
|
});
|
package/dist/api.gen.d.ts
CHANGED
package/dist/client.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest } from "./api.gen";
|
|
16
|
+
import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse } from "./api.gen";
|
|
17
17
|
import { Session } from "./session";
|
|
18
18
|
import { Socket } from "./socket";
|
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
|
@@ -580,7 +580,7 @@ export declare class Client {
|
|
|
580
580
|
/** List Threads. */
|
|
581
581
|
listThreadDescs(session: Session, channelId: string, limit?: number, state?: number, clanId?: string, threadId?: string): Promise<ApiChannelDescList>;
|
|
582
582
|
leaveThread(session: Session, channelId: string): Promise<any>;
|
|
583
|
-
getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number): Promise<
|
|
583
|
+
getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number): Promise<ApiChannelSettingListResponse>;
|
|
584
584
|
getChannelCanvasList(session: Session, channelId: string, clanId?: string, limit?: number, page?: number): Promise<any>;
|
|
585
585
|
getChannelCanvasDetail(session: Session, id: string, clanId?: string, channelId?: string): Promise<any>;
|
|
586
586
|
editChannelCanvases(session: Session, request: ApiEditChannelCanvasRequest): Promise<any>;
|
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -8636,14 +8636,7 @@ var Client = class {
|
|
|
8636
8636
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8637
8637
|
yield this.sessionRefresh(session);
|
|
8638
8638
|
}
|
|
8639
|
-
return this.apiClient.listThreadDescs(
|
|
8640
|
-
session.token,
|
|
8641
|
-
channelId,
|
|
8642
|
-
limit,
|
|
8643
|
-
state,
|
|
8644
|
-
clanId,
|
|
8645
|
-
threadId
|
|
8646
|
-
).then((response) => {
|
|
8639
|
+
return this.apiClient.listThreadDescs(session.token, channelId, limit, state, clanId, threadId).then((response) => {
|
|
8647
8640
|
var result = {
|
|
8648
8641
|
channeldesc: []
|
|
8649
8642
|
};
|
|
@@ -8691,13 +8684,7 @@ var Client = class {
|
|
|
8691
8684
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8692
8685
|
yield this.sessionRefresh(session);
|
|
8693
8686
|
}
|
|
8694
|
-
return this.apiClient.getChannelCanvasList(
|
|
8695
|
-
session.token,
|
|
8696
|
-
channelId,
|
|
8697
|
-
clanId,
|
|
8698
|
-
limit,
|
|
8699
|
-
page
|
|
8700
|
-
).then((response) => {
|
|
8687
|
+
return this.apiClient.getChannelCanvasList(session.token, channelId, clanId, limit, page).then((response) => {
|
|
8701
8688
|
var result = {
|
|
8702
8689
|
channel_canvases: []
|
|
8703
8690
|
};
|
|
@@ -8716,12 +8703,7 @@ var Client = class {
|
|
|
8716
8703
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8717
8704
|
yield this.sessionRefresh(session);
|
|
8718
8705
|
}
|
|
8719
|
-
return this.apiClient.getChannelCanvasDetail(
|
|
8720
|
-
session.token,
|
|
8721
|
-
id,
|
|
8722
|
-
clanId,
|
|
8723
|
-
channelId
|
|
8724
|
-
).then((response) => {
|
|
8706
|
+
return this.apiClient.getChannelCanvasDetail(session.token, id, clanId, channelId).then((response) => {
|
|
8725
8707
|
return Promise.resolve(response);
|
|
8726
8708
|
});
|
|
8727
8709
|
});
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -8607,14 +8607,7 @@ var Client = class {
|
|
|
8607
8607
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8608
8608
|
yield this.sessionRefresh(session);
|
|
8609
8609
|
}
|
|
8610
|
-
return this.apiClient.listThreadDescs(
|
|
8611
|
-
session.token,
|
|
8612
|
-
channelId,
|
|
8613
|
-
limit,
|
|
8614
|
-
state,
|
|
8615
|
-
clanId,
|
|
8616
|
-
threadId
|
|
8617
|
-
).then((response) => {
|
|
8610
|
+
return this.apiClient.listThreadDescs(session.token, channelId, limit, state, clanId, threadId).then((response) => {
|
|
8618
8611
|
var result = {
|
|
8619
8612
|
channeldesc: []
|
|
8620
8613
|
};
|
|
@@ -8662,13 +8655,7 @@ var Client = class {
|
|
|
8662
8655
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8663
8656
|
yield this.sessionRefresh(session);
|
|
8664
8657
|
}
|
|
8665
|
-
return this.apiClient.getChannelCanvasList(
|
|
8666
|
-
session.token,
|
|
8667
|
-
channelId,
|
|
8668
|
-
clanId,
|
|
8669
|
-
limit,
|
|
8670
|
-
page
|
|
8671
|
-
).then((response) => {
|
|
8658
|
+
return this.apiClient.getChannelCanvasList(session.token, channelId, clanId, limit, page).then((response) => {
|
|
8672
8659
|
var result = {
|
|
8673
8660
|
channel_canvases: []
|
|
8674
8661
|
};
|
|
@@ -8687,12 +8674,7 @@ var Client = class {
|
|
|
8687
8674
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8688
8675
|
yield this.sessionRefresh(session);
|
|
8689
8676
|
}
|
|
8690
|
-
return this.apiClient.getChannelCanvasDetail(
|
|
8691
|
-
session.token,
|
|
8692
|
-
id,
|
|
8693
|
-
clanId,
|
|
8694
|
-
channelId
|
|
8695
|
-
).then((response) => {
|
|
8677
|
+
return this.apiClient.getChannelCanvasDetail(session.token, id, clanId, channelId).then((response) => {
|
|
8696
8678
|
return Promise.resolve(response);
|
|
8697
8679
|
});
|
|
8698
8680
|
});
|