mezon-js 2.12.35 → 2.12.37
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 +2 -2
- package/client.ts +2 -2
- package/dist/api.gen.d.ts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/mezon-js.cjs.js +12 -5
- package/dist/mezon-js.esm.mjs +9 -2
- package/dist/socket.d.ts +58 -2
- package/package.json +2 -4
- package/socket.ts +96 -1
package/api.gen.ts
CHANGED
@@ -2853,7 +2853,7 @@ export interface ApiWebhookListResponse {
|
|
2853
2853
|
}
|
2854
2854
|
|
2855
2855
|
/** A collection of zero or more notifications. */
|
2856
|
-
export interface
|
2856
|
+
export interface ApiEmojiRecentList {
|
2857
2857
|
//Collection of emojiRecents.
|
2858
2858
|
emoji_recents?: Array<ApiEmojiRecent>;
|
2859
2859
|
}
|
@@ -6007,7 +6007,7 @@ export class MezonApi {
|
|
6007
6007
|
|
6008
6008
|
/** get list emoji recent by user id */
|
6009
6009
|
emojiRecentList(bearerToken: string,
|
6010
|
-
options: any = {}): Promise<
|
6010
|
+
options: any = {}): Promise<ApiEmojiRecentList> {
|
6011
6011
|
|
6012
6012
|
const urlPath = "/v2/emojirecents";
|
6013
6013
|
const queryParams = new Map<string, any>();
|
package/client.ts
CHANGED
@@ -155,7 +155,7 @@ import {
|
|
155
155
|
ApiMezonOauthClientList,
|
156
156
|
ApiMezonOauthClient,
|
157
157
|
ApiCreateHashChannelAppsResponse,
|
158
|
-
|
158
|
+
ApiEmojiRecentList,
|
159
159
|
ApiUserEventRequest,
|
160
160
|
ApiUpdateRoleOrderRequest,
|
161
161
|
ApiGenerateMezonMeetResponse,
|
@@ -3482,7 +3482,7 @@ export class Client {
|
|
3482
3482
|
|
3483
3483
|
async emojiRecentList(
|
3484
3484
|
session: Session
|
3485
|
-
): Promise<
|
3485
|
+
): Promise<ApiEmojiRecentList> {
|
3486
3486
|
if (
|
3487
3487
|
this.autoRefreshSession &&
|
3488
3488
|
session.refresh_token &&
|
package/dist/api.gen.d.ts
CHANGED
@@ -1634,7 +1634,7 @@ export interface ApiWebhookListResponse {
|
|
1634
1634
|
webhooks?: Array<ApiWebhook>;
|
1635
1635
|
}
|
1636
1636
|
/** A collection of zero or more notifications. */
|
1637
|
-
export interface
|
1637
|
+
export interface ApiEmojiRecentList {
|
1638
1638
|
emoji_recents?: Array<ApiEmojiRecent>;
|
1639
1639
|
}
|
1640
1640
|
/** Represents an event to be passed through the server to registered event handlers. */
|
@@ -2020,7 +2020,7 @@ export declare class MezonApi {
|
|
2020
2020
|
/** Update ClanEmoj By id */
|
2021
2021
|
updateClanEmojiById(bearerToken: string, id: string, body: MezonUpdateClanEmojiByIdBody, options?: any): Promise<any>;
|
2022
2022
|
/** get list emoji recent by user id */
|
2023
|
-
emojiRecentList(bearerToken: string, options?: any): Promise<
|
2023
|
+
emojiRecentList(bearerToken: string, options?: any): Promise<ApiEmojiRecentList>;
|
2024
2024
|
/** get list emoji by user id */
|
2025
2025
|
getListEmojisByUserId(bearerToken: string, options?: any): Promise<ApiEmojiListedResponse>;
|
2026
2026
|
/** Search message from elasticsearch service. */
|
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, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, 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, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse,
|
16
|
+
import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, 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, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -555,7 +555,7 @@ export declare class Client {
|
|
555
555
|
listChannelByUserId(session: Session): Promise<ApiChannelDescList>;
|
556
556
|
listChannelUsersUC(session: Session, channel_id: string, limit: number): Promise<ApiAllUsersAddChannelResponse>;
|
557
557
|
getListEmojisByUserId(session: Session): Promise<ApiEmojiListedResponse>;
|
558
|
-
emojiRecentList(session: Session): Promise<
|
558
|
+
emojiRecentList(session: Session): Promise<ApiEmojiRecentList>;
|
559
559
|
getListStickersByUserId(session: Session): Promise<ApiStickerListedResponse>;
|
560
560
|
listUserClansByUserId(session: Session): Promise<ApiAllUserClans>;
|
561
561
|
listRoles(session: Session, clanId?: string, limit?: number, state?: number, cursor?: string): Promise<ApiRoleListEventResponse>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -52,8 +52,8 @@ var __async = (__this, __arguments, generator) => {
|
|
52
52
|
};
|
53
53
|
|
54
54
|
// index.ts
|
55
|
-
var
|
56
|
-
__export(
|
55
|
+
var index_exports = {};
|
56
|
+
__export(index_exports, {
|
57
57
|
ChannelStreamMode: () => ChannelStreamMode,
|
58
58
|
ChannelType: () => ChannelType,
|
59
59
|
Client: () => Client,
|
@@ -67,7 +67,7 @@ __export(mezon_js_exports, {
|
|
67
67
|
buildFetchOptions: () => buildFetchOptions,
|
68
68
|
safeJSONParse: () => safeJSONParse
|
69
69
|
});
|
70
|
-
module.exports = __toCommonJS(
|
70
|
+
module.exports = __toCommonJS(index_exports);
|
71
71
|
|
72
72
|
// ../../node_modules/whatwg-fetch/fetch.js
|
73
73
|
var g = typeof globalThis !== "undefined" && globalThis || typeof self !== "undefined" && self || // eslint-disable-next-line no-undef
|
@@ -206,8 +206,7 @@ if (support.iterable) {
|
|
206
206
|
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
207
207
|
}
|
208
208
|
function consumed(body) {
|
209
|
-
if (body._noBody)
|
210
|
-
return;
|
209
|
+
if (body._noBody) return;
|
211
210
|
if (body.bodyUsed) {
|
212
211
|
return Promise.reject(new TypeError("Already read"));
|
213
212
|
}
|
@@ -7997,6 +7996,14 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7997
7996
|
return response.channel_app_event;
|
7998
7997
|
});
|
7999
7998
|
}
|
7999
|
+
listDataSocket(request) {
|
8000
|
+
return __async(this, null, function* () {
|
8001
|
+
const response = yield this.send({
|
8002
|
+
list_data_socket: request
|
8003
|
+
});
|
8004
|
+
return response.list_data_socket;
|
8005
|
+
});
|
8006
|
+
}
|
8000
8007
|
pingPong() {
|
8001
8008
|
return __async(this, null, function* () {
|
8002
8009
|
if (!this.adapter.isOpen()) {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -172,8 +172,7 @@ if (support.iterable) {
|
|
172
172
|
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
173
173
|
}
|
174
174
|
function consumed(body) {
|
175
|
-
if (body._noBody)
|
176
|
-
return;
|
175
|
+
if (body._noBody) return;
|
177
176
|
if (body.bodyUsed) {
|
178
177
|
return Promise.reject(new TypeError("Already read"));
|
179
178
|
}
|
@@ -7963,6 +7962,14 @@ var _DefaultSocket = class _DefaultSocket {
|
|
7963
7962
|
return response.channel_app_event;
|
7964
7963
|
});
|
7965
7964
|
}
|
7965
|
+
listDataSocket(request) {
|
7966
|
+
return __async(this, null, function* () {
|
7967
|
+
const response = yield this.send({
|
7968
|
+
list_data_socket: request
|
7969
|
+
});
|
7970
|
+
return response.list_data_socket;
|
7971
|
+
});
|
7972
|
+
}
|
7966
7973
|
pingPong() {
|
7967
7974
|
return __async(this, null, function* () {
|
7968
7975
|
if (!this.adapter.isOpen()) {
|
package/dist/socket.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 { ApiChannelDescription, ApiChannelMessage, ApiChannelMessageHeader, ApiCreateEventRequest, ApiGiveCoffeeEvent, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiNotificationUserChannel, ApiPermissionUpdate, ApiRole, ApiRpc, ApiTokenSentEvent, ApiUserActivity, ApiWebhook } from "./api.gen";
|
16
|
+
import { ApiAllUsersAddChannelResponse, ApiChannelAttachmentList, ApiChannelDescList, ApiChannelDescription, ApiChannelMessage, ApiChannelMessageHeader, ApiChannelMessageList, ApiChannelSettingListResponse, ApiChannelUserList, ApiClanDescList, ApiCreateEventRequest, ApiEmojiListedResponse, ApiGiveCoffeeEvent, ApiHashtagDmList, ApiListClanWebhookResponse, ApiListFavoriteChannelResponse, ApiMessageAttachment, ApiMessageMention, ApiMessageReaction, ApiMessageRef, ApiNotification, ApiNotificationChannel, ApiNotificationChannelCategorySettingList, ApiNotificationList, ApiNotificationSetting, ApiNotificationUserChannel, ApiNotifiReactMessage, ApiPermissionList, ApiPermissionRoleChannelListEventResponse, ApiPermissionUpdate, ApiRole, ApiRoleList, ApiRoleListEventResponse, ApiRoleUserList, ApiRpc, ApiStickerListedResponse, ApiTokenSentEvent, ApiUserActivity, ApiUserPermissionInChannelListResponse, ApiVoiceChannelUserList, ApiWebhook, ApiWebhookListResponse, ApiEmojiRecentList } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { ChannelMessage } from "./client";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -781,6 +781,60 @@ export interface ChannelCanvas {
|
|
781
781
|
channel_id?: string;
|
782
782
|
status?: number;
|
783
783
|
}
|
784
|
+
export interface ListDataSocket {
|
785
|
+
api_name?: string;
|
786
|
+
list_clan_req?: any;
|
787
|
+
clan_desc_list?: ApiClanDescList;
|
788
|
+
list_thread_req?: any;
|
789
|
+
channel_desc_list?: ApiChannelDescList;
|
790
|
+
list_channel_users_uc_req?: any;
|
791
|
+
channel_users_uc_list?: ApiAllUsersAddChannelResponse;
|
792
|
+
list_channel_detail_req?: any;
|
793
|
+
channel_desc?: ApiChannelDescription;
|
794
|
+
list_channel_req?: any;
|
795
|
+
list_channel_message_req?: any;
|
796
|
+
channel_message_list?: ApiChannelMessageList;
|
797
|
+
list_channel_users_req?: any;
|
798
|
+
voice_user_list?: ApiVoiceChannelUserList;
|
799
|
+
channel_user_list?: ApiChannelUserList;
|
800
|
+
list_channel_attachment_req?: any;
|
801
|
+
channel_attachment_list?: ApiChannelAttachmentList;
|
802
|
+
hashtag_dm_req?: any;
|
803
|
+
hashtag_dm_list?: ApiHashtagDmList;
|
804
|
+
channel_setting_req?: any;
|
805
|
+
channel_setting_list?: ApiChannelSettingListResponse;
|
806
|
+
favorite_channel_req?: any;
|
807
|
+
favorite_channel_list?: ApiListFavoriteChannelResponse;
|
808
|
+
search_thread_req?: any;
|
809
|
+
notification_channel?: ApiNotificationChannel;
|
810
|
+
notificaion_user_channel?: ApiNotificationUserChannel;
|
811
|
+
notification_category?: any;
|
812
|
+
notification_clan?: any;
|
813
|
+
notification_setting?: ApiNotificationSetting;
|
814
|
+
notification_message?: ApiNotifiReactMessage;
|
815
|
+
noti_channel_cat_setting_list?: ApiNotificationChannelCategorySettingList;
|
816
|
+
list_notification_req?: any;
|
817
|
+
notification_list?: ApiNotificationList;
|
818
|
+
sticker_list?: ApiStickerListedResponse;
|
819
|
+
emoji_recent_list?: ApiEmojiRecentList;
|
820
|
+
clan_webhook_req?: any;
|
821
|
+
clan_webhook_list?: ApiListClanWebhookResponse;
|
822
|
+
webhook_list_req?: any;
|
823
|
+
webhook_list?: ApiWebhookListResponse;
|
824
|
+
permission_list_req?: any;
|
825
|
+
permission_list?: ApiPermissionList;
|
826
|
+
role_user_req?: any;
|
827
|
+
role_user_list?: ApiRoleUserList;
|
828
|
+
permission_user_req?: any;
|
829
|
+
role_list?: ApiRoleList;
|
830
|
+
role_list_event_req?: any;
|
831
|
+
role_event_list?: ApiRoleListEventResponse;
|
832
|
+
user_permission_req?: any;
|
833
|
+
user_permission_list?: ApiUserPermissionInChannelListResponse;
|
834
|
+
permission_role_req?: any;
|
835
|
+
permission_role_list?: ApiPermissionRoleChannelListEventResponse;
|
836
|
+
emoji_list?: ApiEmojiListedResponse;
|
837
|
+
}
|
784
838
|
/** A socket connection to Mezon server. */
|
785
839
|
export interface Socket {
|
786
840
|
/** Connection is Open */
|
@@ -833,6 +887,7 @@ export interface Socket {
|
|
833
887
|
forwardWebrtcSignaling: (receiverId: string, dataType: number, jsonData: string, channelId: string, caller_id: string) => Promise<WebrtcSignalingFwd>;
|
834
888
|
makeCallPush: (receiverId: string, jsonData: string, channelId: string, caller_id: string) => Promise<IncomingCallPush>;
|
835
889
|
writeChannelAppEvent: (clan_id: string, channel_id: string, action: number) => Promise<ChannelAppEvent>;
|
890
|
+
listDataSocket(request: ListDataSocket): Promise<any>;
|
836
891
|
/** Handle disconnect events received from the socket. */
|
837
892
|
ondisconnect: (evt: Event) => void;
|
838
893
|
/** Handle error events received from the socket. */
|
@@ -1010,7 +1065,7 @@ export declare class DefaultSocket implements Socket {
|
|
1010
1065
|
onuserstatusevent(user_status_event: UserStatusEvent): void;
|
1011
1066
|
onJoinChannelAppEvent(join_channel_app_data: JoinChannelAppData): void;
|
1012
1067
|
onUnpinMessageEvent(unpin_message_event: UnpinMessageEvent): void;
|
1013
|
-
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping | WebrtcSignalingFwd | IncomingCallPush | MessageButtonClicked | DropdownBoxSelected | ChannelAppEvent | EphemeralMessageSend | VoiceReactionSend, sendTimeout?: number): Promise<any>;
|
1068
|
+
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping | WebrtcSignalingFwd | IncomingCallPush | MessageButtonClicked | DropdownBoxSelected | ChannelAppEvent | EphemeralMessageSend | VoiceReactionSend | ListDataSocket, sendTimeout?: number): Promise<any>;
|
1014
1069
|
followUsers(userIds: string[]): Promise<Status>;
|
1015
1070
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
1016
1071
|
follower(): Promise<void>;
|
@@ -1036,6 +1091,7 @@ export declare class DefaultSocket implements Socket {
|
|
1036
1091
|
handleDropdownBoxSelected(message_id: string, channel_id: string, selectbox_id: string, sender_id: string, user_id: string, value: Array<string>): Promise<DropdownBoxSelected>;
|
1037
1092
|
handleMessageButtonClick(message_id: string, channel_id: string, button_id: string, sender_id: string, user_id: string, extra_data: string): Promise<MessageButtonClicked>;
|
1038
1093
|
writeChannelAppEvent(clan_id: string, channel_id: string, action: number): Promise<ChannelAppEvent>;
|
1094
|
+
listDataSocket(request: ListDataSocket): Promise<any>;
|
1039
1095
|
private pingPong;
|
1040
1096
|
}
|
1041
1097
|
export {};
|
package/package.json
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mezon-js",
|
3
|
-
|
4
|
-
"version": "2.12.35",
|
5
|
-
|
3
|
+
"version": "2.12.37",
|
6
4
|
"scripts": {
|
7
5
|
"build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
|
8
6
|
},
|
@@ -38,7 +36,7 @@
|
|
38
36
|
"dependencies": {
|
39
37
|
"@scarf/scarf": "^1.1.1",
|
40
38
|
"base64-arraybuffer": "^1.0.2",
|
41
|
-
"esbuild": "^0.
|
39
|
+
"esbuild": "^0.25.5",
|
42
40
|
"js-base64": "^3.7.4",
|
43
41
|
"whatwg-fetch": "^3.6.2"
|
44
42
|
},
|
package/socket.ts
CHANGED
@@ -15,23 +15,49 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import {
|
18
|
+
ApiAllUsersAddChannelResponse,
|
19
|
+
ApiChannelAttachmentList,
|
20
|
+
ApiChannelDescList,
|
18
21
|
ApiChannelDescription,
|
19
22
|
ApiChannelMessage,
|
20
23
|
ApiChannelMessageHeader,
|
24
|
+
ApiChannelMessageList,
|
25
|
+
ApiChannelSettingListResponse,
|
26
|
+
ApiChannelUserList,
|
27
|
+
ApiClanDescList,
|
21
28
|
ApiCreateEventRequest,
|
29
|
+
ApiEmojiListedResponse,
|
22
30
|
ApiGiveCoffeeEvent,
|
31
|
+
ApiHashtagDmList,
|
32
|
+
ApiListClanWebhookResponse,
|
33
|
+
ApiListFavoriteChannelResponse,
|
23
34
|
ApiMessageAttachment,
|
24
35
|
ApiMessageMention,
|
25
36
|
ApiMessageReaction,
|
26
37
|
ApiMessageRef,
|
27
38
|
ApiNotification,
|
39
|
+
ApiNotificationChannel,
|
40
|
+
ApiNotificationChannelCategorySettingList,
|
41
|
+
ApiNotificationList,
|
42
|
+
ApiNotificationSetting,
|
28
43
|
ApiNotificationUserChannel,
|
44
|
+
ApiNotifiReactMessage,
|
45
|
+
ApiPermissionList,
|
46
|
+
ApiPermissionRoleChannelListEventResponse,
|
29
47
|
ApiPermissionUpdate,
|
30
48
|
ApiRole,
|
49
|
+
ApiRoleList,
|
50
|
+
ApiRoleListEventResponse,
|
51
|
+
ApiRoleUserList,
|
31
52
|
ApiRpc,
|
53
|
+
ApiStickerListedResponse,
|
32
54
|
ApiTokenSentEvent,
|
33
55
|
ApiUserActivity,
|
56
|
+
ApiUserPermissionInChannelListResponse,
|
57
|
+
ApiVoiceChannelUserList,
|
34
58
|
ApiWebhook,
|
59
|
+
ApiWebhookListResponse,
|
60
|
+
ApiEmojiRecentList,
|
35
61
|
} from "./api.gen";
|
36
62
|
import { Session } from "./session";
|
37
63
|
import { ChannelMessage } from "./client";
|
@@ -1119,6 +1145,61 @@ export interface ChannelCanvas {
|
|
1119
1145
|
status?: number;
|
1120
1146
|
}
|
1121
1147
|
|
1148
|
+
export interface ListDataSocket {
|
1149
|
+
api_name?: string;
|
1150
|
+
list_clan_req?: any;
|
1151
|
+
clan_desc_list?: ApiClanDescList;
|
1152
|
+
list_thread_req?: any;
|
1153
|
+
channel_desc_list?: ApiChannelDescList;
|
1154
|
+
list_channel_users_uc_req?: any;
|
1155
|
+
channel_users_uc_list?: ApiAllUsersAddChannelResponse;
|
1156
|
+
list_channel_detail_req?: any;
|
1157
|
+
channel_desc?: ApiChannelDescription;
|
1158
|
+
list_channel_req?: any;
|
1159
|
+
list_channel_message_req?: any;
|
1160
|
+
channel_message_list?: ApiChannelMessageList;
|
1161
|
+
list_channel_users_req?: any;
|
1162
|
+
voice_user_list?: ApiVoiceChannelUserList;
|
1163
|
+
channel_user_list?: ApiChannelUserList;
|
1164
|
+
list_channel_attachment_req?: any;
|
1165
|
+
channel_attachment_list?: ApiChannelAttachmentList;
|
1166
|
+
hashtag_dm_req?: any;
|
1167
|
+
hashtag_dm_list?: ApiHashtagDmList;
|
1168
|
+
channel_setting_req?: any;
|
1169
|
+
channel_setting_list?: ApiChannelSettingListResponse;
|
1170
|
+
favorite_channel_req?: any;
|
1171
|
+
favorite_channel_list?: ApiListFavoriteChannelResponse;
|
1172
|
+
search_thread_req?: any;
|
1173
|
+
notification_channel?: ApiNotificationChannel;
|
1174
|
+
notificaion_user_channel?: ApiNotificationUserChannel;
|
1175
|
+
notification_category?: any;
|
1176
|
+
notification_clan?: any;
|
1177
|
+
notification_setting?: ApiNotificationSetting;
|
1178
|
+
notification_message?: ApiNotifiReactMessage;
|
1179
|
+
noti_channel_cat_setting_list?: ApiNotificationChannelCategorySettingList;
|
1180
|
+
list_notification_req?: any;
|
1181
|
+
notification_list?: ApiNotificationList;
|
1182
|
+
sticker_list?: ApiStickerListedResponse;
|
1183
|
+
emoji_recent_list?: ApiEmojiRecentList;
|
1184
|
+
clan_webhook_req?: any;
|
1185
|
+
clan_webhook_list?: ApiListClanWebhookResponse;
|
1186
|
+
webhook_list_req?: any;
|
1187
|
+
webhook_list?: ApiWebhookListResponse;
|
1188
|
+
permission_list_req?: any;
|
1189
|
+
permission_list?: ApiPermissionList;
|
1190
|
+
role_user_req?: any;
|
1191
|
+
role_user_list?: ApiRoleUserList;
|
1192
|
+
permission_user_req?: any;
|
1193
|
+
role_list?: ApiRoleList;
|
1194
|
+
role_list_event_req?: any;
|
1195
|
+
role_event_list?: ApiRoleListEventResponse;
|
1196
|
+
user_permission_req?: any;
|
1197
|
+
user_permission_list?: ApiUserPermissionInChannelListResponse;
|
1198
|
+
permission_role_req?: any;
|
1199
|
+
permission_role_list?: ApiPermissionRoleChannelListEventResponse;
|
1200
|
+
emoji_list?: ApiEmojiListedResponse;
|
1201
|
+
}
|
1202
|
+
|
1122
1203
|
function CreateChannelMessageFromEvent(message: any) {
|
1123
1204
|
var content, reactions, mentions, attachments, references, referencedMessags;
|
1124
1205
|
try {
|
@@ -1415,6 +1496,10 @@ export interface Socket {
|
|
1415
1496
|
action: number
|
1416
1497
|
) => Promise<ChannelAppEvent>;
|
1417
1498
|
|
1499
|
+
listDataSocket(
|
1500
|
+
request: ListDataSocket
|
1501
|
+
): Promise<any>;
|
1502
|
+
|
1418
1503
|
/** Handle disconnect events received from the socket. */
|
1419
1504
|
ondisconnect: (evt: Event) => void;
|
1420
1505
|
|
@@ -2287,7 +2372,8 @@ export class DefaultSocket implements Socket {
|
|
2287
2372
|
| DropdownBoxSelected
|
2288
2373
|
| ChannelAppEvent
|
2289
2374
|
| EphemeralMessageSend
|
2290
|
-
| VoiceReactionSend
|
2375
|
+
| VoiceReactionSend
|
2376
|
+
| ListDataSocket,
|
2291
2377
|
sendTimeout = DefaultSocket.DefaultSendTimeoutMs
|
2292
2378
|
): Promise<any> {
|
2293
2379
|
const untypedMessage = message as any;
|
@@ -2783,6 +2869,15 @@ export class DefaultSocket implements Socket {
|
|
2783
2869
|
return response.channel_app_event;
|
2784
2870
|
}
|
2785
2871
|
|
2872
|
+
async listDataSocket(
|
2873
|
+
request: ListDataSocket
|
2874
|
+
): Promise<any> {
|
2875
|
+
const response = await this.send({
|
2876
|
+
list_data_socket: request,
|
2877
|
+
});
|
2878
|
+
return response.list_data_socket;
|
2879
|
+
}
|
2880
|
+
|
2786
2881
|
private async pingPong(): Promise<void> {
|
2787
2882
|
if (!this.adapter.isOpen()) {
|
2788
2883
|
return;
|