@phuquy2203/n8n-nodes-zl-sumo 2.0.15
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/README.md +0 -0
- package/dist/credentials/ZaloApi.credentials.d.ts +7 -0
- package/dist/credentials/ZaloApi.credentials.js +49 -0
- package/dist/nodes/Zalo/Zalo.node.d.ts +5 -0
- package/dist/nodes/Zalo/Zalo.node.js +260 -0
- package/dist/nodes/Zalo/zalo.png +0 -0
- package/dist/nodes/Zalo/zalo.svg +3 -0
- package/dist/src/Errors/ZaloApiError.d.ts +4 -0
- package/dist/src/Errors/ZaloApiError.js +11 -0
- package/dist/src/Errors/ZaloApiLoginQRAborted.d.ts +4 -0
- package/dist/src/Errors/ZaloApiLoginQRAborted.js +11 -0
- package/dist/src/Errors/ZaloApiLoginQRDeclined.d.ts +4 -0
- package/dist/src/Errors/ZaloApiLoginQRDeclined.js +11 -0
- package/dist/src/Errors/ZaloApiMissingImageMetadataGetter.d.ts +4 -0
- package/dist/src/Errors/ZaloApiMissingImageMetadataGetter.js +11 -0
- package/dist/src/Errors/index.d.ts +4 -0
- package/dist/src/Errors/index.js +20 -0
- package/dist/src/apis/acceptFriendRequest.d.ts +2 -0
- package/dist/src/apis/acceptFriendRequest.js +31 -0
- package/dist/src/apis/addGroupBlockedMember.d.ts +2 -0
- package/dist/src/apis/addGroupBlockedMember.js +31 -0
- package/dist/src/apis/addGroupDeputy.d.ts +2 -0
- package/dist/src/apis/addGroupDeputy.js +33 -0
- package/dist/src/apis/addPollOptions.d.ts +14 -0
- package/dist/src/apis/addPollOptions.js +29 -0
- package/dist/src/apis/addQuickMessage.d.ts +11 -0
- package/dist/src/apis/addQuickMessage.js +63 -0
- package/dist/src/apis/addReaction.d.ts +18 -0
- package/dist/src/apis/addReaction.js +297 -0
- package/dist/src/apis/addUnreadMark.d.ts +8 -0
- package/dist/src/apis/addUnreadMark.js +55 -0
- package/dist/src/apis/addUserToGroup.d.ts +5 -0
- package/dist/src/apis/addUserToGroup.js +37 -0
- package/dist/src/apis/blockUser.d.ts +2 -0
- package/dist/src/apis/blockUser.js +31 -0
- package/dist/src/apis/blockViewFeed.d.ts +2 -0
- package/dist/src/apis/blockViewFeed.js +33 -0
- package/dist/src/apis/changeAccountAvatar.d.ts +3 -0
- package/dist/src/apis/changeAccountAvatar.js +58 -0
- package/dist/src/apis/changeFriendAlias.d.ts +2 -0
- package/dist/src/apis/changeFriendAlias.js +30 -0
- package/dist/src/apis/changeGroupAvatar.d.ts +3 -0
- package/dist/src/apis/changeGroupAvatar.js +50 -0
- package/dist/src/apis/changeGroupName.d.ts +4 -0
- package/dist/src/apis/changeGroupName.js +35 -0
- package/dist/src/apis/changeGroupOwner.d.ts +4 -0
- package/dist/src/apis/changeGroupOwner.js +33 -0
- package/dist/src/apis/createAutoReply.d.ts +14 -0
- package/dist/src/apis/createAutoReply.js +40 -0
- package/dist/src/apis/createCatalog.d.ts +7 -0
- package/dist/src/apis/createCatalog.js +32 -0
- package/dist/src/apis/createGroup.d.ts +28 -0
- package/dist/src/apis/createGroup.js +46 -0
- package/dist/src/apis/createNote.d.ts +7 -0
- package/dist/src/apis/createNote.js +50 -0
- package/dist/src/apis/createPoll.d.ts +36 -0
- package/dist/src/apis/createPoll.js +43 -0
- package/dist/src/apis/createProductCatalog.d.ts +23 -0
- package/dist/src/apis/createProductCatalog.js +53 -0
- package/dist/src/apis/createReminder.d.ts +12 -0
- package/dist/src/apis/createReminder.js +66 -0
- package/dist/src/apis/custom.d.ts +9 -0
- package/dist/src/apis/custom.js +17 -0
- package/dist/src/apis/deleteAutoReply.d.ts +5 -0
- package/dist/src/apis/deleteAutoReply.js +32 -0
- package/dist/src/apis/deleteAvatar.d.ts +9 -0
- package/dist/src/apis/deleteAvatar.js +30 -0
- package/dist/src/apis/deleteCatalog.d.ts +2 -0
- package/dist/src/apis/deleteCatalog.js +31 -0
- package/dist/src/apis/deleteChat.d.ts +19 -0
- package/dist/src/apis/deleteChat.js +53 -0
- package/dist/src/apis/deleteGroupInviteBox.d.ts +9 -0
- package/dist/src/apis/deleteGroupInviteBox.js +30 -0
- package/dist/src/apis/deleteMessage.d.ts +14 -0
- package/dist/src/apis/deleteMessage.js +55 -0
- package/dist/src/apis/deleteProductCatalog.d.ts +10 -0
- package/dist/src/apis/deleteProductCatalog.js +34 -0
- package/dist/src/apis/disableGroupLink.d.ts +2 -0
- package/dist/src/apis/disableGroupLink.js +27 -0
- package/dist/src/apis/disperseGroup.d.ts +2 -0
- package/dist/src/apis/disperseGroup.js +31 -0
- package/dist/src/apis/editNote.d.ts +17 -0
- package/dist/src/apis/editNote.js +49 -0
- package/dist/src/apis/editReminder.d.ts +13 -0
- package/dist/src/apis/editReminder.js +64 -0
- package/dist/src/apis/enableGroupLink.d.ts +6 -0
- package/dist/src/apis/enableGroupLink.js +28 -0
- package/dist/src/apis/fetchAccountInfo.d.ts +3 -0
- package/dist/src/apis/fetchAccountInfo.js +13 -0
- package/dist/src/apis/findUser.d.ts +15 -0
- package/dist/src/apis/findUser.js +43 -0
- package/dist/src/apis/forwardMessage.d.ts +24 -0
- package/dist/src/apis/forwardMessage.js +102 -0
- package/dist/src/apis/getAliasList.d.ts +8 -0
- package/dist/src/apis/getAliasList.js +30 -0
- package/dist/src/apis/getAllFriends.d.ts +3 -0
- package/dist/src/apis/getAllFriends.js +35 -0
- package/dist/src/apis/getAllGroups.d.ts +7 -0
- package/dist/src/apis/getAllGroups.js +13 -0
- package/dist/src/apis/getArchivedChatList.d.ts +5 -0
- package/dist/src/apis/getArchivedChatList.js +26 -0
- package/dist/src/apis/getAutoDeleteChat.d.ts +9 -0
- package/dist/src/apis/getAutoDeleteChat.js +24 -0
- package/dist/src/apis/getAutoReplyList.d.ts +6 -0
- package/dist/src/apis/getAutoReplyList.js +27 -0
- package/dist/src/apis/getAvatarList.d.ts +12 -0
- package/dist/src/apis/getAvatarList.js +31 -0
- package/dist/src/apis/getBizAccount.d.ts +24 -0
- package/dist/src/apis/getBizAccount.js +30 -0
- package/dist/src/apis/getCatalogList.d.ts +18 -0
- package/dist/src/apis/getCatalogList.js +35 -0
- package/dist/src/apis/getContext.d.ts +1 -0
- package/dist/src/apis/getContext.js +7 -0
- package/dist/src/apis/getCookie.d.ts +1 -0
- package/dist/src/apis/getCookie.js +12 -0
- package/dist/src/apis/getFriendBoardList.d.ts +5 -0
- package/dist/src/apis/getFriendBoardList.js +29 -0
- package/dist/src/apis/getFriendOnlines.d.ts +10 -0
- package/dist/src/apis/getFriendOnlines.js +38 -0
- package/dist/src/apis/getFriendRecommendations.d.ts +42 -0
- package/dist/src/apis/getFriendRecommendations.js +30 -0
- package/dist/src/apis/getFriendRequestStatus.d.ts +8 -0
- package/dist/src/apis/getFriendRequestStatus.js +28 -0
- package/dist/src/apis/getGroupBlockedMember.d.ts +23 -0
- package/dist/src/apis/getGroupBlockedMember.js +32 -0
- package/dist/src/apis/getGroupInfo.d.ts +16 -0
- package/dist/src/apis/getGroupInfo.js +35 -0
- package/dist/src/apis/getGroupInviteBoxInfo.d.ts +32 -0
- package/dist/src/apis/getGroupInviteBoxInfo.js +41 -0
- package/dist/src/apis/getGroupInviteBoxList.d.ts +38 -0
- package/dist/src/apis/getGroupInviteBoxList.js +34 -0
- package/dist/src/apis/getGroupLinkDetail.d.ts +9 -0
- package/dist/src/apis/getGroupLinkDetail.js +28 -0
- package/dist/src/apis/getGroupLinkInfo.d.ts +34 -0
- package/dist/src/apis/getGroupLinkInfo.js +31 -0
- package/dist/src/apis/getGroupMembersInfo.d.ts +17 -0
- package/dist/src/apis/getGroupMembersInfo.js +27 -0
- package/dist/src/apis/getHiddenConversations.d.ts +11 -0
- package/dist/src/apis/getHiddenConversations.js +26 -0
- package/dist/src/apis/getLabels.d.ts +7 -0
- package/dist/src/apis/getLabels.js +31 -0
- package/dist/src/apis/getListBoard.d.ts +21 -0
- package/dist/src/apis/getListBoard.js +48 -0
- package/dist/src/apis/getListReminder.d.ts +28 -0
- package/dist/src/apis/getListReminder.js +50 -0
- package/dist/src/apis/getMute.d.ts +13 -0
- package/dist/src/apis/getMute.js +25 -0
- package/dist/src/apis/getOwnId.d.ts +1 -0
- package/dist/src/apis/getOwnId.js +7 -0
- package/dist/src/apis/getPendingGroupMembers.d.ts +11 -0
- package/dist/src/apis/getPendingGroupMembers.js +30 -0
- package/dist/src/apis/getPinConversations.d.ts +5 -0
- package/dist/src/apis/getPinConversations.js +25 -0
- package/dist/src/apis/getPollDetail.d.ts +3 -0
- package/dist/src/apis/getPollDetail.js +33 -0
- package/dist/src/apis/getProductCatalogList.d.ts +20 -0
- package/dist/src/apis/getProductCatalogList.js +36 -0
- package/dist/src/apis/getQR.d.ts +4 -0
- package/dist/src/apis/getQR.js +32 -0
- package/dist/src/apis/getQuickMessageList.d.ts +7 -0
- package/dist/src/apis/getQuickMessageList.js +27 -0
- package/dist/src/apis/getRelatedFriendGroup.d.ts +6 -0
- package/dist/src/apis/getRelatedFriendGroup.js +33 -0
- package/dist/src/apis/getReminder.d.ts +3 -0
- package/dist/src/apis/getReminder.js +28 -0
- package/dist/src/apis/getReminderResponses.d.ts +5 -0
- package/dist/src/apis/getReminderResponses.js +27 -0
- package/dist/src/apis/getSentFriendRequest.d.ts +18 -0
- package/dist/src/apis/getSentFriendRequest.js +27 -0
- package/dist/src/apis/getSettings.d.ts +3 -0
- package/dist/src/apis/getSettings.js +23 -0
- package/dist/src/apis/getStickers.d.ts +1 -0
- package/dist/src/apis/getStickers.js +43 -0
- package/dist/src/apis/getStickersDetail.d.ts +24 -0
- package/dist/src/apis/getStickersDetail.js +43 -0
- package/dist/src/apis/getUnreadMark.d.ts +14 -0
- package/dist/src/apis/getUnreadMark.js +33 -0
- package/dist/src/apis/getUserInfo.d.ts +8 -0
- package/dist/src/apis/getUserInfo.js +45 -0
- package/dist/src/apis/inviteUserToGroups.d.ts +10 -0
- package/dist/src/apis/inviteUserToGroups.js +33 -0
- package/dist/src/apis/joinGroupInviteBox.d.ts +2 -0
- package/dist/src/apis/joinGroupInviteBox.js +28 -0
- package/dist/src/apis/joinGroupLink.d.ts +2 -0
- package/dist/src/apis/joinGroupLink.js +30 -0
- package/dist/src/apis/keepAlive.d.ts +4 -0
- package/dist/src/apis/keepAlive.js +25 -0
- package/dist/src/apis/lastOnline.d.ts +7 -0
- package/dist/src/apis/lastOnline.js +29 -0
- package/dist/src/apis/leaveGroup.d.ts +4 -0
- package/dist/src/apis/leaveGroup.js +36 -0
- package/dist/src/apis/listen.d.ts +103 -0
- package/dist/src/apis/listen.js +432 -0
- package/dist/src/apis/lockPoll.d.ts +2 -0
- package/dist/src/apis/lockPoll.js +31 -0
- package/dist/src/apis/login.d.ts +3 -0
- package/dist/src/apis/login.js +101 -0
- package/dist/src/apis/loginQR.d.ts +70 -0
- package/dist/src/apis/loginQR.js +369 -0
- package/dist/src/apis/parseLink.d.ts +21 -0
- package/dist/src/apis/parseLink.js +30 -0
- package/dist/src/apis/rejectFriendRequest.d.ts +2 -0
- package/dist/src/apis/rejectFriendRequest.js +30 -0
- package/dist/src/apis/removeFriend.d.ts +2 -0
- package/dist/src/apis/removeFriend.js +31 -0
- package/dist/src/apis/removeFriendAlias.d.ts +2 -0
- package/dist/src/apis/removeFriendAlias.js +27 -0
- package/dist/src/apis/removeGroupBlockedMember.d.ts +2 -0
- package/dist/src/apis/removeGroupBlockedMember.js +31 -0
- package/dist/src/apis/removeGroupDeputy.d.ts +2 -0
- package/dist/src/apis/removeGroupDeputy.js +33 -0
- package/dist/src/apis/removeQuickMessage.d.ts +5 -0
- package/dist/src/apis/removeQuickMessage.js +30 -0
- package/dist/src/apis/removeReminder.d.ts +3 -0
- package/dist/src/apis/removeReminder.js +43 -0
- package/dist/src/apis/removeUnreadMark.d.ts +8 -0
- package/dist/src/apis/removeUnreadMark.js +53 -0
- package/dist/src/apis/removeUserFromGroup.d.ts +4 -0
- package/dist/src/apis/removeUserFromGroup.js +37 -0
- package/dist/src/apis/resetHiddenConversPin.d.ts +2 -0
- package/dist/src/apis/resetHiddenConversPin.js +23 -0
- package/dist/src/apis/reuseAvatar.d.ts +2 -0
- package/dist/src/apis/reuseAvatar.js +29 -0
- package/dist/src/apis/reviewPendingMemberRequest.d.ts +14 -0
- package/dist/src/apis/reviewPendingMemberRequest.js +41 -0
- package/dist/src/apis/sendBankCard.d.ts +9 -0
- package/dist/src/apis/sendBankCard.js +40 -0
- package/dist/src/apis/sendCard.d.ts +10 -0
- package/dist/src/apis/sendCard.js +62 -0
- package/dist/src/apis/sendDeliveredEvent.d.ts +16 -0
- package/dist/src/apis/sendDeliveredEvent.js +58 -0
- package/dist/src/apis/sendFriendRequest.d.ts +2 -0
- package/dist/src/apis/sendFriendRequest.js +42 -0
- package/dist/src/apis/sendLink.d.ts +10 -0
- package/dist/src/apis/sendLink.js +64 -0
- package/dist/src/apis/sendMessage.d.ts +99 -0
- package/dist/src/apis/sendMessage.js +455 -0
- package/dist/src/apis/sendReport.d.ts +17 -0
- package/dist/src/apis/sendReport.js +56 -0
- package/dist/src/apis/sendSeenEvent.d.ts +16 -0
- package/dist/src/apis/sendSeenEvent.js +66 -0
- package/dist/src/apis/sendSticker.d.ts +10 -0
- package/dist/src/apis/sendSticker.js +60 -0
- package/dist/src/apis/sendTypingEvent.d.ts +5 -0
- package/dist/src/apis/sendTypingEvent.js +36 -0
- package/dist/src/apis/sendVideo.d.ts +35 -0
- package/dist/src/apis/sendVideo.js +121 -0
- package/dist/src/apis/sendVoice.d.ts +12 -0
- package/dist/src/apis/sendVoice.js +76 -0
- package/dist/src/apis/setArchivedConversations.d.ts +10 -0
- package/dist/src/apis/setArchivedConversations.js +37 -0
- package/dist/src/apis/setHiddenConversations.d.ts +3 -0
- package/dist/src/apis/setHiddenConversations.js +42 -0
- package/dist/src/apis/setMute.d.ts +20 -0
- package/dist/src/apis/setMute.js +70 -0
- package/dist/src/apis/setPinnedConversations.d.ts +3 -0
- package/dist/src/apis/setPinnedConversations.js +37 -0
- package/dist/src/apis/sharePoll.d.ts +2 -0
- package/dist/src/apis/sharePoll.js +31 -0
- package/dist/src/apis/unblockUser.d.ts +2 -0
- package/dist/src/apis/unblockUser.js +31 -0
- package/dist/src/apis/undo.d.ts +9 -0
- package/dist/src/apis/undo.js +45 -0
- package/dist/src/apis/undoFriendRequest.d.ts +2 -0
- package/dist/src/apis/undoFriendRequest.js +30 -0
- package/dist/src/apis/updateActiveStatus.d.ts +4 -0
- package/dist/src/apis/updateActiveStatus.js +30 -0
- package/dist/src/apis/updateAutoDeleteChat.d.ts +9 -0
- package/dist/src/apis/updateAutoDeleteChat.js +43 -0
- package/dist/src/apis/updateAutoReply.d.ts +15 -0
- package/dist/src/apis/updateAutoReply.js +41 -0
- package/dist/src/apis/updateCatalog.d.ts +11 -0
- package/dist/src/apis/updateCatalog.js +33 -0
- package/dist/src/apis/updateGroupSettings.d.ts +40 -0
- package/dist/src/apis/updateGroupSettings.js +46 -0
- package/dist/src/apis/updateHiddenConversPin.d.ts +2 -0
- package/dist/src/apis/updateHiddenConversPin.js +33 -0
- package/dist/src/apis/updateLabels.d.ts +15 -0
- package/dist/src/apis/updateLabels.js +37 -0
- package/dist/src/apis/updateLang.d.ts +6 -0
- package/dist/src/apis/updateLang.js +33 -0
- package/dist/src/apis/updateProductCatalog.d.ts +25 -0
- package/dist/src/apis/updateProductCatalog.js +54 -0
- package/dist/src/apis/updateProfile.d.ts +20 -0
- package/dist/src/apis/updateProfile.js +46 -0
- package/dist/src/apis/updateQuickMessage.d.ts +11 -0
- package/dist/src/apis/updateQuickMessage.js +64 -0
- package/dist/src/apis/updateSettings.d.ts +16 -0
- package/dist/src/apis/updateSettings.js +93 -0
- package/dist/src/apis/uploadAttachment.d.ts +50 -0
- package/dist/src/apis/uploadAttachment.js +202 -0
- package/dist/src/apis/uploadProductPhoto.d.ts +14 -0
- package/dist/src/apis/uploadProductPhoto.js +56 -0
- package/dist/src/apis/votePoll.d.ts +5 -0
- package/dist/src/apis/votePoll.js +32 -0
- package/dist/src/apis.d.ts +279 -0
- package/dist/src/apis.js +283 -0
- package/dist/src/context.d.ts +183 -0
- package/dist/src/context.js +33 -0
- package/dist/src/index.d.ts +146 -0
- package/dist/src/index.js +41 -0
- package/dist/src/models/Attachment.d.ts +11 -0
- package/dist/src/models/Attachment.js +2 -0
- package/dist/src/models/AutoReply.d.ts +20 -0
- package/dist/src/models/AutoReply.js +10 -0
- package/dist/src/models/Board.d.ts +60 -0
- package/dist/src/models/Board.js +9 -0
- package/dist/src/models/Catalog.d.ts +16 -0
- package/dist/src/models/Catalog.js +2 -0
- package/dist/src/models/DeliveredMessage.d.ts +27 -0
- package/dist/src/models/DeliveredMessage.js +22 -0
- package/dist/src/models/Enum.d.ts +247 -0
- package/dist/src/models/Enum.js +254 -0
- package/dist/src/models/FriendEvent.d.ts +107 -0
- package/dist/src/models/FriendEvent.js +87 -0
- package/dist/src/models/Group.d.ts +125 -0
- package/dist/src/models/Group.js +14 -0
- package/dist/src/models/GroupEvent.d.ts +178 -0
- package/dist/src/models/GroupEvent.js +94 -0
- package/dist/src/models/Label.d.ts +10 -0
- package/dist/src/models/Label.js +2 -0
- package/dist/src/models/Message.d.ts +91 -0
- package/dist/src/models/Message.js +34 -0
- package/dist/src/models/ProductCatalog.d.ts +17 -0
- package/dist/src/models/ProductCatalog.js +2 -0
- package/dist/src/models/QuickMessage.d.ts +25 -0
- package/dist/src/models/QuickMessage.js +2 -0
- package/dist/src/models/Reaction.d.ts +85 -0
- package/dist/src/models/Reaction.js +74 -0
- package/dist/src/models/Reminder.d.ts +51 -0
- package/dist/src/models/Reminder.js +10 -0
- package/dist/src/models/SeenMessage.d.ts +26 -0
- package/dist/src/models/SeenMessage.js +22 -0
- package/dist/src/models/Typing.d.ts +24 -0
- package/dist/src/models/Typing.js +22 -0
- package/dist/src/models/Undo.d.ts +34 -0
- package/dist/src/models/Undo.js +16 -0
- package/dist/src/models/User.d.ts +49 -0
- package/dist/src/models/User.js +2 -0
- package/dist/src/models/ZBusiness.d.ts +22 -0
- package/dist/src/models/ZBusiness.js +38 -0
- package/dist/src/models/index.d.ts +20 -0
- package/dist/src/models/index.js +36 -0
- package/dist/src/update.d.ts +2 -0
- package/dist/src/update.js +33 -0
- package/dist/src/utils.d.ts +169 -0
- package/dist/src/utils.js +737 -0
- package/dist/src/zalo.d.ts +41 -0
- package/dist/src/zalo.js +110 -0
- package/package.json +60 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Reaction = exports.Reactions = void 0;
|
|
4
|
+
var Reactions;
|
|
5
|
+
(function (Reactions) {
|
|
6
|
+
Reactions["HEART"] = "/-heart";
|
|
7
|
+
Reactions["LIKE"] = "/-strong";
|
|
8
|
+
Reactions["HAHA"] = ":>";
|
|
9
|
+
Reactions["WOW"] = ":o";
|
|
10
|
+
Reactions["CRY"] = ":-((";
|
|
11
|
+
Reactions["ANGRY"] = ":-h";
|
|
12
|
+
Reactions["KISS"] = ":-*";
|
|
13
|
+
Reactions["TEARS_OF_JOY"] = ":')";
|
|
14
|
+
Reactions["SHIT"] = "/-shit";
|
|
15
|
+
Reactions["ROSE"] = "/-rose";
|
|
16
|
+
Reactions["BROKEN_HEART"] = "/-break";
|
|
17
|
+
Reactions["DISLIKE"] = "/-weak";
|
|
18
|
+
Reactions["LOVE"] = ";xx";
|
|
19
|
+
Reactions["CONFUSED"] = ";-/";
|
|
20
|
+
Reactions["WINK"] = ";-)";
|
|
21
|
+
Reactions["FADE"] = "/-fade";
|
|
22
|
+
Reactions["SUN"] = "/-li";
|
|
23
|
+
Reactions["BIRTHDAY"] = "/-bd";
|
|
24
|
+
Reactions["BOMB"] = "/-bome";
|
|
25
|
+
Reactions["OK"] = "/-ok";
|
|
26
|
+
Reactions["PEACE"] = "/-v";
|
|
27
|
+
Reactions["THANKS"] = "/-thanks";
|
|
28
|
+
Reactions["PUNCH"] = "/-punch";
|
|
29
|
+
Reactions["SHARE"] = "/-share";
|
|
30
|
+
Reactions["PRAY"] = "_()_";
|
|
31
|
+
Reactions["NO"] = "/-no";
|
|
32
|
+
Reactions["BAD"] = "/-bad";
|
|
33
|
+
Reactions["LOVE_YOU"] = "/-loveu";
|
|
34
|
+
Reactions["SAD"] = "--b";
|
|
35
|
+
Reactions["VERY_SAD"] = ":((";
|
|
36
|
+
Reactions["COOL"] = "x-)";
|
|
37
|
+
Reactions["NERD"] = "8-)";
|
|
38
|
+
Reactions["BIG_SMILE"] = ";-d";
|
|
39
|
+
Reactions["SUNGLASSES"] = "b-)";
|
|
40
|
+
Reactions["NEUTRAL"] = ":--|";
|
|
41
|
+
Reactions["SAD_FACE"] = "p-(";
|
|
42
|
+
Reactions["BYE"] = ":-bye";
|
|
43
|
+
Reactions["SLEEPY"] = "|-)";
|
|
44
|
+
Reactions["WIPE"] = ":wipe";
|
|
45
|
+
Reactions["DIG"] = ":-dig";
|
|
46
|
+
Reactions["ANGUISH"] = "&-(";
|
|
47
|
+
Reactions["HANDCLAP"] = ":handclap";
|
|
48
|
+
Reactions["ANGRY_FACE"] = ">-|";
|
|
49
|
+
Reactions["F_CHAIR"] = ":-f";
|
|
50
|
+
Reactions["L_CHAIR"] = ":-l";
|
|
51
|
+
Reactions["R_CHAIR"] = ":-r";
|
|
52
|
+
Reactions["SILENT"] = ";-x";
|
|
53
|
+
Reactions["SURPRISE"] = ":-o";
|
|
54
|
+
Reactions["EMBARRASSED"] = ";-s";
|
|
55
|
+
Reactions["AFRAID"] = ";-a";
|
|
56
|
+
Reactions["SAD2"] = ":-<";
|
|
57
|
+
Reactions["BIG_LAUGH"] = ":))";
|
|
58
|
+
Reactions["RICH"] = "$-)";
|
|
59
|
+
Reactions["BEER"] = "/-beer";
|
|
60
|
+
Reactions["NONE"] = "";
|
|
61
|
+
})(Reactions || (exports.Reactions = Reactions = {}));
|
|
62
|
+
class Reaction {
|
|
63
|
+
constructor(uid, data, isGroup) {
|
|
64
|
+
this.data = data;
|
|
65
|
+
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
66
|
+
this.isSelf = data.uidFrom == "0";
|
|
67
|
+
this.isGroup = isGroup;
|
|
68
|
+
if (data.idTo == "0")
|
|
69
|
+
data.idTo = uid;
|
|
70
|
+
if (data.uidFrom == "0")
|
|
71
|
+
data.uidFrom = uid;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Reaction = Reaction;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export declare enum ReminderRepeatMode {
|
|
2
|
+
None = 0,
|
|
3
|
+
Daily = 1,
|
|
4
|
+
Weekly = 2,
|
|
5
|
+
Monthly = 3
|
|
6
|
+
}
|
|
7
|
+
export type ReminderUser = {
|
|
8
|
+
creatorUid: string;
|
|
9
|
+
toUid: string;
|
|
10
|
+
emoji: string;
|
|
11
|
+
color: number;
|
|
12
|
+
reminderId: string;
|
|
13
|
+
createTime: number;
|
|
14
|
+
repeat: ReminderRepeatMode;
|
|
15
|
+
startTime: number;
|
|
16
|
+
editTime: number;
|
|
17
|
+
endTime: number;
|
|
18
|
+
params: {
|
|
19
|
+
title: string;
|
|
20
|
+
setTitle: boolean;
|
|
21
|
+
};
|
|
22
|
+
type: number;
|
|
23
|
+
};
|
|
24
|
+
export type ReminderGroup = {
|
|
25
|
+
editorId: string;
|
|
26
|
+
emoji: string;
|
|
27
|
+
color: number;
|
|
28
|
+
groupId: string;
|
|
29
|
+
creatorId: string;
|
|
30
|
+
editTime: number;
|
|
31
|
+
eventType: number;
|
|
32
|
+
responseMem: {
|
|
33
|
+
rejectMember: number;
|
|
34
|
+
myResp: number;
|
|
35
|
+
acceptMember: number;
|
|
36
|
+
};
|
|
37
|
+
params: {
|
|
38
|
+
title: string;
|
|
39
|
+
setTitle?: boolean;
|
|
40
|
+
};
|
|
41
|
+
type: number;
|
|
42
|
+
duration: number;
|
|
43
|
+
repeatInfo: {
|
|
44
|
+
list_ts: unknown[];
|
|
45
|
+
} | null;
|
|
46
|
+
repeatData: unknown[];
|
|
47
|
+
createTime: number;
|
|
48
|
+
repeat: ReminderRepeatMode;
|
|
49
|
+
startTime: number;
|
|
50
|
+
id: string;
|
|
51
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReminderRepeatMode = void 0;
|
|
4
|
+
var ReminderRepeatMode;
|
|
5
|
+
(function (ReminderRepeatMode) {
|
|
6
|
+
ReminderRepeatMode[ReminderRepeatMode["None"] = 0] = "None";
|
|
7
|
+
ReminderRepeatMode[ReminderRepeatMode["Daily"] = 1] = "Daily";
|
|
8
|
+
ReminderRepeatMode[ReminderRepeatMode["Weekly"] = 2] = "Weekly";
|
|
9
|
+
ReminderRepeatMode[ReminderRepeatMode["Monthly"] = 3] = "Monthly";
|
|
10
|
+
})(ReminderRepeatMode || (exports.ReminderRepeatMode = ReminderRepeatMode = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ThreadType } from "./Enum.js";
|
|
2
|
+
export type TUserSeenMessage = {
|
|
3
|
+
idTo: string;
|
|
4
|
+
msgId: string;
|
|
5
|
+
realMsgId: string;
|
|
6
|
+
};
|
|
7
|
+
export type TGroupSeenMessage = {
|
|
8
|
+
msgId: string;
|
|
9
|
+
groupId: string;
|
|
10
|
+
seenUids: string[];
|
|
11
|
+
};
|
|
12
|
+
export declare class UserSeenMessage {
|
|
13
|
+
type: ThreadType.User;
|
|
14
|
+
data: TUserSeenMessage;
|
|
15
|
+
threadId: string;
|
|
16
|
+
isSelf: false;
|
|
17
|
+
constructor(data: TUserSeenMessage);
|
|
18
|
+
}
|
|
19
|
+
export declare class GroupSeenMessage {
|
|
20
|
+
type: ThreadType.Group;
|
|
21
|
+
data: TGroupSeenMessage;
|
|
22
|
+
threadId: string;
|
|
23
|
+
isSelf: boolean;
|
|
24
|
+
constructor(uid: string, data: TGroupSeenMessage);
|
|
25
|
+
}
|
|
26
|
+
export type SeenMessage = UserSeenMessage | GroupSeenMessage;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupSeenMessage = exports.UserSeenMessage = void 0;
|
|
4
|
+
const Enum_js_1 = require("./Enum.js");
|
|
5
|
+
class UserSeenMessage {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
this.type = Enum_js_1.ThreadType.User;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.threadId = data.idTo;
|
|
10
|
+
this.isSelf = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.UserSeenMessage = UserSeenMessage;
|
|
14
|
+
class GroupSeenMessage {
|
|
15
|
+
constructor(uid, data) {
|
|
16
|
+
this.type = Enum_js_1.ThreadType.Group;
|
|
17
|
+
this.data = data;
|
|
18
|
+
this.threadId = data.groupId;
|
|
19
|
+
this.isSelf = data.seenUids.includes(uid);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.GroupSeenMessage = GroupSeenMessage;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ThreadType } from "./Enum.js";
|
|
2
|
+
export type TTyping = {
|
|
3
|
+
uid: string;
|
|
4
|
+
ts: string;
|
|
5
|
+
isPC: 0 | 1;
|
|
6
|
+
};
|
|
7
|
+
export type TGroupTyping = TTyping & {
|
|
8
|
+
gid: string;
|
|
9
|
+
};
|
|
10
|
+
export declare class UserTyping {
|
|
11
|
+
type: ThreadType.User;
|
|
12
|
+
data: TTyping;
|
|
13
|
+
threadId: string;
|
|
14
|
+
isSelf: false;
|
|
15
|
+
constructor(data: TTyping);
|
|
16
|
+
}
|
|
17
|
+
export declare class GroupTyping {
|
|
18
|
+
type: ThreadType.Group;
|
|
19
|
+
data: TGroupTyping;
|
|
20
|
+
threadId: string;
|
|
21
|
+
isSelf: false;
|
|
22
|
+
constructor(data: TGroupTyping);
|
|
23
|
+
}
|
|
24
|
+
export type Typing = UserTyping | GroupTyping;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GroupTyping = exports.UserTyping = void 0;
|
|
4
|
+
const Enum_js_1 = require("./Enum.js");
|
|
5
|
+
class UserTyping {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
this.type = Enum_js_1.ThreadType.User;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.threadId = data.uid;
|
|
10
|
+
this.isSelf = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.UserTyping = UserTyping;
|
|
14
|
+
class GroupTyping {
|
|
15
|
+
constructor(data) {
|
|
16
|
+
this.type = Enum_js_1.ThreadType.Group;
|
|
17
|
+
this.data = data;
|
|
18
|
+
this.threadId = data.gid;
|
|
19
|
+
this.isSelf = false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.GroupTyping = GroupTyping;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type TUndoContent = {
|
|
2
|
+
globalMsgId: number;
|
|
3
|
+
cliMsgId: number;
|
|
4
|
+
deleteMsg: number;
|
|
5
|
+
srcId: number;
|
|
6
|
+
destId: number;
|
|
7
|
+
};
|
|
8
|
+
export type TUndo = {
|
|
9
|
+
actionId: string;
|
|
10
|
+
msgId: string;
|
|
11
|
+
cliMsgId: string;
|
|
12
|
+
msgType: string;
|
|
13
|
+
uidFrom: string;
|
|
14
|
+
idTo: string;
|
|
15
|
+
dName: string;
|
|
16
|
+
ts: string;
|
|
17
|
+
status: number;
|
|
18
|
+
content: TUndoContent;
|
|
19
|
+
notify: string;
|
|
20
|
+
ttl: number;
|
|
21
|
+
userId: string;
|
|
22
|
+
uin: string;
|
|
23
|
+
cmd: number;
|
|
24
|
+
st: number;
|
|
25
|
+
at: number;
|
|
26
|
+
realMsgId: string;
|
|
27
|
+
};
|
|
28
|
+
export declare class Undo {
|
|
29
|
+
data: TUndo;
|
|
30
|
+
threadId: string;
|
|
31
|
+
isSelf: boolean;
|
|
32
|
+
isGroup: boolean;
|
|
33
|
+
constructor(uid: string, data: TUndo, isGroup: boolean);
|
|
34
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Undo = void 0;
|
|
4
|
+
class Undo {
|
|
5
|
+
constructor(uid, data, isGroup) {
|
|
6
|
+
this.data = data;
|
|
7
|
+
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
8
|
+
this.isSelf = data.uidFrom == "0";
|
|
9
|
+
this.isGroup = isGroup;
|
|
10
|
+
if (data.idTo == "0")
|
|
11
|
+
data.idTo = uid;
|
|
12
|
+
if (data.uidFrom == "0")
|
|
13
|
+
data.uidFrom = uid;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Undo = Undo;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Gender } from "./Enum.js";
|
|
2
|
+
import type { ZBusinessPackage } from "./ZBusiness.js";
|
|
3
|
+
export type User = {
|
|
4
|
+
userId: string;
|
|
5
|
+
username: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
zaloName: string;
|
|
8
|
+
avatar: string;
|
|
9
|
+
bgavatar: string;
|
|
10
|
+
cover: string;
|
|
11
|
+
gender: Gender;
|
|
12
|
+
dob: number;
|
|
13
|
+
sdob: string;
|
|
14
|
+
status: string;
|
|
15
|
+
phoneNumber: string;
|
|
16
|
+
isFr: number;
|
|
17
|
+
isBlocked: number;
|
|
18
|
+
lastActionTime: number;
|
|
19
|
+
lastUpdateTime: number;
|
|
20
|
+
isActive: number;
|
|
21
|
+
key: number;
|
|
22
|
+
type: number;
|
|
23
|
+
isActivePC: number;
|
|
24
|
+
isActiveWeb: number;
|
|
25
|
+
isValid: number;
|
|
26
|
+
userKey: string;
|
|
27
|
+
accountStatus: number;
|
|
28
|
+
oaInfo: unknown;
|
|
29
|
+
user_mode: number;
|
|
30
|
+
globalId: string;
|
|
31
|
+
bizPkg: ZBusinessPackage;
|
|
32
|
+
createdTs: number;
|
|
33
|
+
oa_status: unknown;
|
|
34
|
+
};
|
|
35
|
+
export type UserSetting = {
|
|
36
|
+
add_friend_via_contact: number;
|
|
37
|
+
display_on_recommend_friend: number;
|
|
38
|
+
add_friend_via_group: number;
|
|
39
|
+
add_friend_via_qr: number;
|
|
40
|
+
quick_message_status: number;
|
|
41
|
+
show_online_status: boolean;
|
|
42
|
+
accept_stranger_call: number;
|
|
43
|
+
archived_chat_status: number;
|
|
44
|
+
receive_message: number;
|
|
45
|
+
add_friend_via_phone: number;
|
|
46
|
+
display_seen_status: number;
|
|
47
|
+
view_birthday: number;
|
|
48
|
+
setting_2FA_status: number;
|
|
49
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type ZBusinessPackage = {
|
|
2
|
+
label?: Record<string, string> | null;
|
|
3
|
+
pkgId: number;
|
|
4
|
+
};
|
|
5
|
+
export declare enum BusinessCategory {
|
|
6
|
+
Other = 0,
|
|
7
|
+
RealEstate = 1,
|
|
8
|
+
TechnologyAndDevices = 2,
|
|
9
|
+
TravelAndHospitality = 3,
|
|
10
|
+
EducationAndTraining = 4,
|
|
11
|
+
ShoppingAndRetail = 5,
|
|
12
|
+
CosmeticsAndBeauty = 6,
|
|
13
|
+
RestaurantAndCafe = 7,
|
|
14
|
+
AutoAndMotorbike = 8,
|
|
15
|
+
FashionAndApparel = 9,
|
|
16
|
+
FoodAndBeverage = 10,
|
|
17
|
+
MediaAndEntertainment = 11,
|
|
18
|
+
InternalCommunications = 12,
|
|
19
|
+
Transportation = 13,
|
|
20
|
+
Telecommunications = 14
|
|
21
|
+
}
|
|
22
|
+
export declare const BusinessCategoryName: Record<BusinessCategory, string>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BusinessCategoryName = exports.BusinessCategory = void 0;
|
|
4
|
+
var BusinessCategory;
|
|
5
|
+
(function (BusinessCategory) {
|
|
6
|
+
BusinessCategory[BusinessCategory["Other"] = 0] = "Other";
|
|
7
|
+
BusinessCategory[BusinessCategory["RealEstate"] = 1] = "RealEstate";
|
|
8
|
+
BusinessCategory[BusinessCategory["TechnologyAndDevices"] = 2] = "TechnologyAndDevices";
|
|
9
|
+
BusinessCategory[BusinessCategory["TravelAndHospitality"] = 3] = "TravelAndHospitality";
|
|
10
|
+
BusinessCategory[BusinessCategory["EducationAndTraining"] = 4] = "EducationAndTraining";
|
|
11
|
+
BusinessCategory[BusinessCategory["ShoppingAndRetail"] = 5] = "ShoppingAndRetail";
|
|
12
|
+
BusinessCategory[BusinessCategory["CosmeticsAndBeauty"] = 6] = "CosmeticsAndBeauty";
|
|
13
|
+
BusinessCategory[BusinessCategory["RestaurantAndCafe"] = 7] = "RestaurantAndCafe";
|
|
14
|
+
BusinessCategory[BusinessCategory["AutoAndMotorbike"] = 8] = "AutoAndMotorbike";
|
|
15
|
+
BusinessCategory[BusinessCategory["FashionAndApparel"] = 9] = "FashionAndApparel";
|
|
16
|
+
BusinessCategory[BusinessCategory["FoodAndBeverage"] = 10] = "FoodAndBeverage";
|
|
17
|
+
BusinessCategory[BusinessCategory["MediaAndEntertainment"] = 11] = "MediaAndEntertainment";
|
|
18
|
+
BusinessCategory[BusinessCategory["InternalCommunications"] = 12] = "InternalCommunications";
|
|
19
|
+
BusinessCategory[BusinessCategory["Transportation"] = 13] = "Transportation";
|
|
20
|
+
BusinessCategory[BusinessCategory["Telecommunications"] = 14] = "Telecommunications";
|
|
21
|
+
})(BusinessCategory || (exports.BusinessCategory = BusinessCategory = {}));
|
|
22
|
+
exports.BusinessCategoryName = {
|
|
23
|
+
[BusinessCategory.Other]: "Dịch vụ khác (Không hiển thị)",
|
|
24
|
+
[BusinessCategory.RealEstate]: "Bất động sản",
|
|
25
|
+
[BusinessCategory.TechnologyAndDevices]: "Công nghệ & Thiết bị",
|
|
26
|
+
[BusinessCategory.TravelAndHospitality]: "Du lịch & Lưu trú",
|
|
27
|
+
[BusinessCategory.EducationAndTraining]: "Giáo dục & Đào tạo",
|
|
28
|
+
[BusinessCategory.ShoppingAndRetail]: "Mua sắm & Bán lẻ",
|
|
29
|
+
[BusinessCategory.CosmeticsAndBeauty]: "Mỹ phẩm & Làm đẹp",
|
|
30
|
+
[BusinessCategory.RestaurantAndCafe]: "Nhà hàng & Quán",
|
|
31
|
+
[BusinessCategory.AutoAndMotorbike]: "Ô tô & Xe máy",
|
|
32
|
+
[BusinessCategory.FashionAndApparel]: "Thời trang & May mặc",
|
|
33
|
+
[BusinessCategory.FoodAndBeverage]: "Thực phẩm & Đồ uống",
|
|
34
|
+
[BusinessCategory.MediaAndEntertainment]: "Truyền thông & Giải trí",
|
|
35
|
+
[BusinessCategory.InternalCommunications]: "Truyền thông nội bộ",
|
|
36
|
+
[BusinessCategory.Transportation]: "Vận tải",
|
|
37
|
+
[BusinessCategory.Telecommunications]: "Viễn thông",
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export * from "./Attachment.js";
|
|
2
|
+
export * from "./AutoReply.js";
|
|
3
|
+
export * from "./Board.js";
|
|
4
|
+
export * from "./Catalog.js";
|
|
5
|
+
export * from "./DeliveredMessage.js";
|
|
6
|
+
export * from "./Enum.js";
|
|
7
|
+
export * from "./FriendEvent.js";
|
|
8
|
+
export * from "./Group.js";
|
|
9
|
+
export * from "./GroupEvent.js";
|
|
10
|
+
export * from "./Message.js";
|
|
11
|
+
export * from "./ProductCatalog.js";
|
|
12
|
+
export * from "./QuickMessage.js";
|
|
13
|
+
export * from "./Reaction.js";
|
|
14
|
+
export * from "./Reminder.js";
|
|
15
|
+
export * from "./SeenMessage.js";
|
|
16
|
+
export * from "./Typing.js";
|
|
17
|
+
export * from "./Undo.js";
|
|
18
|
+
export * from "./User.js";
|
|
19
|
+
export * from "./ZBusiness.js";
|
|
20
|
+
export * from "./Label.js";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Attachment.js"), exports);
|
|
18
|
+
__exportStar(require("./AutoReply.js"), exports);
|
|
19
|
+
__exportStar(require("./Board.js"), exports);
|
|
20
|
+
__exportStar(require("./Catalog.js"), exports);
|
|
21
|
+
__exportStar(require("./DeliveredMessage.js"), exports);
|
|
22
|
+
__exportStar(require("./Enum.js"), exports);
|
|
23
|
+
__exportStar(require("./FriendEvent.js"), exports);
|
|
24
|
+
__exportStar(require("./Group.js"), exports);
|
|
25
|
+
__exportStar(require("./GroupEvent.js"), exports);
|
|
26
|
+
__exportStar(require("./Message.js"), exports);
|
|
27
|
+
__exportStar(require("./ProductCatalog.js"), exports);
|
|
28
|
+
__exportStar(require("./QuickMessage.js"), exports);
|
|
29
|
+
__exportStar(require("./Reaction.js"), exports);
|
|
30
|
+
__exportStar(require("./Reminder.js"), exports);
|
|
31
|
+
__exportStar(require("./SeenMessage.js"), exports);
|
|
32
|
+
__exportStar(require("./Typing.js"), exports);
|
|
33
|
+
__exportStar(require("./Undo.js"), exports);
|
|
34
|
+
__exportStar(require("./User.js"), exports);
|
|
35
|
+
__exportStar(require("./ZBusiness.js"), exports);
|
|
36
|
+
__exportStar(require("./Label.js"), exports);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkUpdate = void 0;
|
|
4
|
+
const semver_1 = require("semver");
|
|
5
|
+
const utils_js_1 = require("./utils.js");
|
|
6
|
+
const VERSION = "2.0.4";
|
|
7
|
+
const NPM_REGISTRY = "https://registry.npmjs.org/zca-js";
|
|
8
|
+
async function checkUpdate(ctx) {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
if (!ctx.options.checkUpdate)
|
|
11
|
+
return;
|
|
12
|
+
const _options = Object.assign({}, (utils_js_1.isBun
|
|
13
|
+
? {
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
proxy: (_b = (_a = ctx.options.agent) === null || _a === void 0 ? void 0 : _a.proxy) === null || _b === void 0 ? void 0 : _b.href,
|
|
17
|
+
}
|
|
18
|
+
: { agent: ctx.options.agent }));
|
|
19
|
+
const response = await ctx.options.polyfill(NPM_REGISTRY, _options).catch(() => null);
|
|
20
|
+
if (!response || !response.ok)
|
|
21
|
+
return;
|
|
22
|
+
const data = await response.json().catch(() => null);
|
|
23
|
+
if (!data)
|
|
24
|
+
return;
|
|
25
|
+
const latestVersion = data["dist-tags"].latest;
|
|
26
|
+
if ((0, semver_1.compare)(VERSION, latestVersion) === -1) {
|
|
27
|
+
(0, utils_js_1.logger)(ctx).info(`A new version of zca-js is available: ${latestVersion}`);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
(0, utils_js_1.logger)(ctx).info("zca-js is up to date");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.checkUpdate = checkUpdate;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
import cryptojs from "crypto-js";
|
|
5
|
+
import { type ContextSession, type ContextBase } from "./context.js";
|
|
6
|
+
import { FriendEventType } from "./models/FriendEvent.js";
|
|
7
|
+
import { GroupEventType } from "./models/GroupEvent.js";
|
|
8
|
+
import type { API } from "./zalo.js";
|
|
9
|
+
import type { AttachmentSource } from "./models/Attachment.js";
|
|
10
|
+
declare global {
|
|
11
|
+
var Bun: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare const isBun: boolean;
|
|
14
|
+
export declare function hasOwn(obj: Record<string, unknown>, key: string): key is keyof typeof obj;
|
|
15
|
+
/**
|
|
16
|
+
* Get signed key for API requests.
|
|
17
|
+
*
|
|
18
|
+
* @param type
|
|
19
|
+
* @param params
|
|
20
|
+
* @returns MD5 hash
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export declare function getSignKey(type: string, params: Record<string, unknown>): string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param baseURL
|
|
27
|
+
* @param params
|
|
28
|
+
* @param apiVersion automatically add zalo api version to url params
|
|
29
|
+
* @returns
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
export declare function makeURL(ctx: ContextBase, baseURL: string, params?: Record<string, string | number>, apiVersion?: boolean): string;
|
|
33
|
+
export declare class ParamsEncryptor {
|
|
34
|
+
private zcid;
|
|
35
|
+
private enc_ver;
|
|
36
|
+
private zcid_ext;
|
|
37
|
+
private encryptKey;
|
|
38
|
+
constructor({ type, imei, firstLaunchTime }: {
|
|
39
|
+
type: number;
|
|
40
|
+
imei: string;
|
|
41
|
+
firstLaunchTime: number;
|
|
42
|
+
});
|
|
43
|
+
getEncryptKey(): string;
|
|
44
|
+
createZcid(type: number, imei: string, firstLaunchTime: number): void;
|
|
45
|
+
createEncryptKey(e?: number): boolean;
|
|
46
|
+
getParams(): {
|
|
47
|
+
zcid: string;
|
|
48
|
+
zcid_ext: string;
|
|
49
|
+
enc_ver: string;
|
|
50
|
+
};
|
|
51
|
+
static processStr(e: string): {
|
|
52
|
+
even: string[];
|
|
53
|
+
odd: string[];
|
|
54
|
+
};
|
|
55
|
+
static randomString(e?: number, t?: number): string;
|
|
56
|
+
static encodeAES(e: string, message: string, type: "hex" | "base64", uppercase: boolean, s?: number): string | null;
|
|
57
|
+
}
|
|
58
|
+
export declare function decryptResp(key: string, data: string): Record<string, unknown> | null | string;
|
|
59
|
+
export declare function decodeBase64ToBuffer(data: string): Buffer;
|
|
60
|
+
export declare function decodeUnit8Array(data: Uint8Array): string;
|
|
61
|
+
export declare function encodeAES(secretKey: string, data: cryptojs.lib.WordArray | string, t?: number): string | null;
|
|
62
|
+
export declare function decodeAES(secretKey: string, data: string, t?: number): string | null;
|
|
63
|
+
export declare function getDefaultHeaders(ctx: ContextBase, origin?: string): Promise<{
|
|
64
|
+
Accept: string;
|
|
65
|
+
"Accept-Encoding": string;
|
|
66
|
+
"Accept-Language": string;
|
|
67
|
+
"content-type": string;
|
|
68
|
+
Cookie: string;
|
|
69
|
+
Origin: string;
|
|
70
|
+
Referer: string;
|
|
71
|
+
"User-Agent": string;
|
|
72
|
+
}>;
|
|
73
|
+
export declare function request(ctx: ContextBase, url: string, options?: RequestInit, raw?: boolean): Promise<Response>;
|
|
74
|
+
export declare function getImageMetaData(ctx: ContextBase, filePath: string): Promise<{
|
|
75
|
+
fileName: string;
|
|
76
|
+
totalSize: number;
|
|
77
|
+
width: number;
|
|
78
|
+
height: number;
|
|
79
|
+
}>;
|
|
80
|
+
export declare function getFileSize(filePath: string): Promise<number>;
|
|
81
|
+
export declare function getGifMetaData(ctx: ContextBase, filePath: string): Promise<{
|
|
82
|
+
fileName: string;
|
|
83
|
+
totalSize: number;
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
}>;
|
|
87
|
+
export declare function decodeEventData(parsed: Record<string, unknown>, cipherKey?: string): Promise<any>;
|
|
88
|
+
export declare function getMd5LargeFileObject(source: AttachmentSource, fileSize: number): Promise<{
|
|
89
|
+
currentChunk: number;
|
|
90
|
+
data: string;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const logger: (ctx: {
|
|
93
|
+
options: {
|
|
94
|
+
logging?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}) => {
|
|
97
|
+
verbose: (...args: unknown[]) => void;
|
|
98
|
+
info: (...args: unknown[]) => void;
|
|
99
|
+
warn: (...args: unknown[]) => void;
|
|
100
|
+
error: (...args: unknown[]) => void;
|
|
101
|
+
success: (...args: unknown[]) => void;
|
|
102
|
+
timestamp: (...args: unknown[]) => void;
|
|
103
|
+
};
|
|
104
|
+
export declare function getClientMessageType(msgType: string): 1 | 31 | 32 | 44 | 46 | 49 | 36 | 37 | 38 | 43;
|
|
105
|
+
export declare function strPadLeft(e: number | string, t: string, n: number): string;
|
|
106
|
+
export declare function formatTime(format: string, timestamp?: number): string;
|
|
107
|
+
export declare function getFullTimeFromMillisecond(e: number): string;
|
|
108
|
+
export declare function getFileExtension(e: string): string;
|
|
109
|
+
export declare function getFileName(e: string): string;
|
|
110
|
+
export declare function removeUndefinedKeys(e: Record<string, unknown>): Record<string, unknown>;
|
|
111
|
+
export declare function getGroupEventType(act: string): GroupEventType;
|
|
112
|
+
export declare function getFriendEventType(act: string): FriendEventType;
|
|
113
|
+
type ZaloResponse<T> = {
|
|
114
|
+
data: T | null;
|
|
115
|
+
error: {
|
|
116
|
+
message: string;
|
|
117
|
+
code?: number;
|
|
118
|
+
} | null;
|
|
119
|
+
};
|
|
120
|
+
export declare function handleZaloResponse<T = unknown>(ctx: ContextSession, response: Response, isEncrypted?: boolean): Promise<ZaloResponse<T>>;
|
|
121
|
+
export declare function resolveResponse<T = unknown>(ctx: ContextSession, res: Response, cb?: (result: ZaloResponse<unknown>) => T, isEncrypted?: boolean): Promise<T>;
|
|
122
|
+
export type FactoryUtils<T> = {
|
|
123
|
+
makeURL: (baseURL: string, params?: Record<string, string | number>, apiVersion?: boolean) => ReturnType<typeof makeURL>;
|
|
124
|
+
encodeAES: (data: cryptojs.lib.WordArray | string, t?: number) => ReturnType<typeof encodeAES>;
|
|
125
|
+
request: (url: string, options?: RequestInit, raw?: boolean) => ReturnType<typeof request>;
|
|
126
|
+
logger: ReturnType<typeof logger>;
|
|
127
|
+
resolve: (res: Response, cb?: (result: ZaloResponse<unknown>) => T, isEncrypted?: boolean) => ReturnType<typeof resolveResponse<T>>;
|
|
128
|
+
};
|
|
129
|
+
export declare function apiFactory<T>(): <K extends (api: API, ctx: ContextSession, utils: FactoryUtils<T>) => unknown>(callback: K) => (ctx: ContextBase, api: API) => ReturnType<K>;
|
|
130
|
+
export declare function generateZaloUUID(userAgent: string): string;
|
|
131
|
+
/**
|
|
132
|
+
* Encrypts a 4-digit PIN to a 32-character hex string
|
|
133
|
+
* @param pin 4-digit PIN number
|
|
134
|
+
* @returns 32-character hex string
|
|
135
|
+
*/
|
|
136
|
+
export declare function encryptPin(pin: string): string;
|
|
137
|
+
/**
|
|
138
|
+
* Decrypts a 32-character hex string back to 4-digit PIN
|
|
139
|
+
* Note: This is a one-way hash, so we can only verify if a PIN matches the hash
|
|
140
|
+
* @param encryptedPin 32-character hex string
|
|
141
|
+
* @param pin 4-digit PIN to verify
|
|
142
|
+
* @returns true if the PIN matches the hash
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* const encryptedPin = (await api.getHiddenConversations()).pin;
|
|
146
|
+
* checking pin created..
|
|
147
|
+
* const isValid = validatePin(encryptedPin, "1234"); // true if pin created is 1234
|
|
148
|
+
* const isInvalid = validatePin(encryptedPin, "5678"); // false if not pin created is 5678
|
|
149
|
+
*/
|
|
150
|
+
export declare function validatePin(encryptedPin: string, pin: string): boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Converts a hex color code to a negative color number used by Zalo API
|
|
153
|
+
* @param hex Hex color code (e.g. '#00FF00' or '00FF00')
|
|
154
|
+
* @returns Negative color number (e.g. -16711936)
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* const negativeColor = hexToNegativeColor('#00FF00'); // Result: -16711936
|
|
158
|
+
*/
|
|
159
|
+
export declare function hexToNegativeColor(hex: string): number;
|
|
160
|
+
/**
|
|
161
|
+
* Converts a negative color number from Zalo API to hex color code
|
|
162
|
+
* @param negativeColor Negative color number (e.g. -16711936)
|
|
163
|
+
* @returns Hex color code (e.g. '#00FF00')
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* const hexColor = negativeColorToHex(-16711936); // Result: '#00FF00'
|
|
167
|
+
*/
|
|
168
|
+
export declare function negativeColorToHex(negativeColor: number): string;
|
|
169
|
+
export {};
|