zalo-api-sdk 1.0.0
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/.prettierrc +5 -0
- package/.tmp-cache/_update-notifier-last-checked +0 -0
- package/CODE_OF_CONDUCT.md +157 -0
- package/CONTRIBUTING.md +491 -0
- package/LICENSE +21 -0
- package/README.md +421 -0
- package/SECURITY.md +82 -0
- package/commit-push.sh +79 -0
- package/deploy.sh +172 -0
- package/dist/Errors/ZaloApiError.d.ts +4 -0
- package/dist/Errors/ZaloApiError.js +7 -0
- package/dist/Errors/index.d.ts +1 -0
- package/dist/Errors/index.js +1 -0
- package/dist/apis/acceptFriendRequest.d.ts +2 -0
- package/dist/apis/acceptFriendRequest.js +28 -0
- package/dist/apis/addGroupBlockedMember.d.ts +2 -0
- package/dist/apis/addGroupBlockedMember.js +28 -0
- package/dist/apis/addGroupDeputy.d.ts +2 -0
- package/dist/apis/addGroupDeputy.js +30 -0
- package/dist/apis/addQuickMessage.d.ts +11 -0
- package/dist/apis/addQuickMessage.js +60 -0
- package/dist/apis/addReaction.d.ts +18 -0
- package/dist/apis/addReaction.js +294 -0
- package/dist/apis/addUnreadMark.d.ts +8 -0
- package/dist/apis/addUnreadMark.js +52 -0
- package/dist/apis/addUserToGroup.d.ts +5 -0
- package/dist/apis/addUserToGroup.js +34 -0
- package/dist/apis/blockUser.d.ts +2 -0
- package/dist/apis/blockUser.js +28 -0
- package/dist/apis/blockViewFeed.d.ts +2 -0
- package/dist/apis/blockViewFeed.js +30 -0
- package/dist/apis/changeAccountAvatar.d.ts +3 -0
- package/dist/apis/changeAccountAvatar.js +52 -0
- package/dist/apis/changeFriendAlias.d.ts +2 -0
- package/dist/apis/changeFriendAlias.js +27 -0
- package/dist/apis/changeGroupAvatar.d.ts +3 -0
- package/dist/apis/changeGroupAvatar.js +44 -0
- package/dist/apis/changeGroupName.d.ts +4 -0
- package/dist/apis/changeGroupName.js +32 -0
- package/dist/apis/changeGroupOwner.d.ts +4 -0
- package/dist/apis/changeGroupOwner.js +30 -0
- package/dist/apis/createAutoReply.d.ts +14 -0
- package/dist/apis/createAutoReply.js +37 -0
- package/dist/apis/createCatalog.d.ts +7 -0
- package/dist/apis/createCatalog.js +29 -0
- package/dist/apis/createGroup.d.ts +28 -0
- package/dist/apis/createGroup.js +43 -0
- package/dist/apis/createNoteGroup.d.ts +7 -0
- package/dist/apis/createNoteGroup.js +47 -0
- package/dist/apis/createPoll.d.ts +57 -0
- package/dist/apis/createPoll.js +40 -0
- package/dist/apis/createProductCatalog.d.ts +23 -0
- package/dist/apis/createProductCatalog.js +50 -0
- package/dist/apis/createReminder.d.ts +10 -0
- package/dist/apis/createReminder.js +63 -0
- package/dist/apis/custom.d.ts +9 -0
- package/dist/apis/custom.js +15 -0
- package/dist/apis/deleteAutoReply.d.ts +5 -0
- package/dist/apis/deleteAutoReply.js +29 -0
- package/dist/apis/deleteAvatar.d.ts +9 -0
- package/dist/apis/deleteAvatar.js +27 -0
- package/dist/apis/deleteCatalog.d.ts +2 -0
- package/dist/apis/deleteCatalog.js +28 -0
- package/dist/apis/deleteChat.d.ts +19 -0
- package/dist/apis/deleteChat.js +50 -0
- package/dist/apis/deleteMessage.d.ts +14 -0
- package/dist/apis/deleteMessage.js +52 -0
- package/dist/apis/deleteProductCatalog.d.ts +10 -0
- package/dist/apis/deleteProductCatalog.js +31 -0
- package/dist/apis/disableGroupLink.d.ts +2 -0
- package/dist/apis/disableGroupLink.js +24 -0
- package/dist/apis/disperseGroup.d.ts +2 -0
- package/dist/apis/disperseGroup.js +28 -0
- package/dist/apis/editNoteGroup.d.ts +32 -0
- package/dist/apis/editNoteGroup.js +40 -0
- package/dist/apis/editReminder.d.ts +18 -0
- package/dist/apis/editReminder.js +61 -0
- package/dist/apis/enableGroupLink.d.ts +6 -0
- package/dist/apis/enableGroupLink.js +25 -0
- package/dist/apis/fetchAccountInfo.d.ts +34 -0
- package/dist/apis/fetchAccountInfo.js +10 -0
- package/dist/apis/findUser.d.ts +15 -0
- package/dist/apis/findUser.js +40 -0
- package/dist/apis/forwardMessage.d.ts +26 -0
- package/dist/apis/forwardMessage.js +99 -0
- package/dist/apis/getAliasList.d.ts +8 -0
- package/dist/apis/getAliasList.js +27 -0
- package/dist/apis/getAllFriends.d.ts +34 -0
- package/dist/apis/getAllFriends.js +32 -0
- package/dist/apis/getAllGroups.d.ts +7 -0
- package/dist/apis/getAllGroups.js +10 -0
- package/dist/apis/getArchivedChatList.d.ts +5 -0
- package/dist/apis/getArchivedChatList.js +23 -0
- package/dist/apis/getAutoDeleteChat.d.ts +9 -0
- package/dist/apis/getAutoDeleteChat.js +21 -0
- package/dist/apis/getAutoReplyList.d.ts +6 -0
- package/dist/apis/getAutoReplyList.js +24 -0
- package/dist/apis/getAvatarList.d.ts +12 -0
- package/dist/apis/getAvatarList.js +28 -0
- package/dist/apis/getBizAccount.d.ts +19 -0
- package/dist/apis/getBizAccount.js +27 -0
- package/dist/apis/getCatalogList.d.ts +12 -0
- package/dist/apis/getCatalogList.js +32 -0
- package/dist/apis/getContext.d.ts +1 -0
- package/dist/apis/getContext.js +4 -0
- package/dist/apis/getCookie.d.ts +1 -0
- package/dist/apis/getCookie.js +9 -0
- package/dist/apis/getFriendBoardList.d.ts +5 -0
- package/dist/apis/getFriendBoardList.js +26 -0
- package/dist/apis/getFriendRequestStatus.d.ts +8 -0
- package/dist/apis/getFriendRequestStatus.js +25 -0
- package/dist/apis/getGroupBlockedMember.d.ts +17 -0
- package/dist/apis/getGroupBlockedMember.js +29 -0
- package/dist/apis/getGroupInfo.d.ts +43 -0
- package/dist/apis/getGroupInfo.js +32 -0
- package/dist/apis/getGroupLinkDetail.d.ts +6 -0
- package/dist/apis/getGroupLinkDetail.js +25 -0
- package/dist/apis/getGroupLinkInfo.d.ts +31 -0
- package/dist/apis/getGroupLinkInfo.js +28 -0
- package/dist/apis/getGroupMembersInfo.d.ts +17 -0
- package/dist/apis/getGroupMembersInfo.js +24 -0
- package/dist/apis/getHiddenConversations.d.ts +11 -0
- package/dist/apis/getHiddenConversations.js +23 -0
- package/dist/apis/getLabels.d.ts +15 -0
- package/dist/apis/getLabels.js +28 -0
- package/dist/apis/getListBoard.d.ts +15 -0
- package/dist/apis/getListBoard.js +45 -0
- package/dist/apis/getListReminder.d.ts +22 -0
- package/dist/apis/getListReminder.js +47 -0
- package/dist/apis/getMute.d.ts +13 -0
- package/dist/apis/getMute.js +22 -0
- package/dist/apis/getOwnId.d.ts +1 -0
- package/dist/apis/getOwnId.js +4 -0
- package/dist/apis/getPendingGroupMembers.d.ts +10 -0
- package/dist/apis/getPendingGroupMembers.js +27 -0
- package/dist/apis/getPinConversations.d.ts +5 -0
- package/dist/apis/getPinConversations.js +22 -0
- package/dist/apis/getPollDetail.d.ts +3 -0
- package/dist/apis/getPollDetail.js +30 -0
- package/dist/apis/getProductCatalogList.d.ts +14 -0
- package/dist/apis/getProductCatalogList.js +33 -0
- package/dist/apis/getQR.d.ts +4 -0
- package/dist/apis/getQR.js +29 -0
- package/dist/apis/getQuickMessage.d.ts +7 -0
- package/dist/apis/getQuickMessage.js +24 -0
- package/dist/apis/getReceivedFriendRequests.d.ts +35 -0
- package/dist/apis/getReceivedFriendRequests.js +22 -0
- package/dist/apis/getReminder.d.ts +13 -0
- package/dist/apis/getReminder.js +25 -0
- package/dist/apis/getReminderResponses.d.ts +5 -0
- package/dist/apis/getReminderResponses.js +24 -0
- package/dist/apis/getSentFriendRequest.d.ts +17 -0
- package/dist/apis/getSentFriendRequest.js +24 -0
- package/dist/apis/getStickers.d.ts +1 -0
- package/dist/apis/getStickers.js +40 -0
- package/dist/apis/getStickersDetail.d.ts +24 -0
- package/dist/apis/getStickersDetail.js +40 -0
- package/dist/apis/getUnreadMark.d.ts +14 -0
- package/dist/apis/getUnreadMark.js +30 -0
- package/dist/apis/getUserInfo.d.ts +39 -0
- package/dist/apis/getUserInfo.js +42 -0
- package/dist/apis/inviteUserToGroups.d.ts +10 -0
- package/dist/apis/inviteUserToGroups.js +30 -0
- package/dist/apis/joinGroupLink.d.ts +2 -0
- package/dist/apis/joinGroupLink.js +27 -0
- package/dist/apis/keepAlive.d.ts +4 -0
- package/dist/apis/keepAlive.js +22 -0
- package/dist/apis/lastOnline.d.ts +7 -0
- package/dist/apis/lastOnline.js +26 -0
- package/dist/apis/leaveGroup.d.ts +4 -0
- package/dist/apis/leaveGroup.js +33 -0
- package/dist/apis/listen.d.ts +100 -0
- package/dist/apis/listen.js +424 -0
- package/dist/apis/lockPoll.d.ts +2 -0
- package/dist/apis/lockPoll.js +28 -0
- package/dist/apis/login.d.ts +3 -0
- package/dist/apis/login.js +96 -0
- package/dist/apis/loginQR.d.ts +70 -0
- package/dist/apis/loginQR.js +359 -0
- package/dist/apis/parseLink.d.ts +21 -0
- package/dist/apis/parseLink.js +27 -0
- package/dist/apis/removeFriend.d.ts +2 -0
- package/dist/apis/removeFriend.js +28 -0
- package/dist/apis/removeFriendAlias.d.ts +2 -0
- package/dist/apis/removeFriendAlias.js +24 -0
- package/dist/apis/removeGroupBlockedMember.d.ts +2 -0
- package/dist/apis/removeGroupBlockedMember.js +28 -0
- package/dist/apis/removeGroupDeputy.d.ts +2 -0
- package/dist/apis/removeGroupDeputy.js +30 -0
- package/dist/apis/removeQuickMessage.d.ts +5 -0
- package/dist/apis/removeQuickMessage.js +27 -0
- package/dist/apis/removeReminder.d.ts +3 -0
- package/dist/apis/removeReminder.js +40 -0
- package/dist/apis/removeUnreadMark.d.ts +8 -0
- package/dist/apis/removeUnreadMark.js +50 -0
- package/dist/apis/removeUserFromGroup.d.ts +4 -0
- package/dist/apis/removeUserFromGroup.js +34 -0
- package/dist/apis/resetHiddenConversPin.d.ts +2 -0
- package/dist/apis/resetHiddenConversPin.js +20 -0
- package/dist/apis/reuseAvatar.d.ts +2 -0
- package/dist/apis/reuseAvatar.js +26 -0
- package/dist/apis/reviewPendingMemberRequest.d.ts +6 -0
- package/dist/apis/reviewPendingMemberRequest.js +31 -0
- package/dist/apis/sendBankCard.d.ts +9 -0
- package/dist/apis/sendBankCard.js +39 -0
- package/dist/apis/sendCard.d.ts +10 -0
- package/dist/apis/sendCard.js +59 -0
- package/dist/apis/sendDeliveredEvent.d.ts +16 -0
- package/dist/apis/sendDeliveredEvent.js +55 -0
- package/dist/apis/sendFriendRequest.d.ts +2 -0
- package/dist/apis/sendFriendRequest.js +39 -0
- package/dist/apis/sendLink.d.ts +10 -0
- package/dist/apis/sendLink.js +61 -0
- package/dist/apis/sendMessage.d.ts +99 -0
- package/dist/apis/sendMessage.js +460 -0
- package/dist/apis/sendReport.d.ts +17 -0
- package/dist/apis/sendReport.js +53 -0
- package/dist/apis/sendSeenEvent.d.ts +16 -0
- package/dist/apis/sendSeenEvent.js +63 -0
- package/dist/apis/sendSticker.d.ts +6 -0
- package/dist/apis/sendSticker.js +56 -0
- package/dist/apis/sendTypingEvent.d.ts +5 -0
- package/dist/apis/sendTypingEvent.js +33 -0
- package/dist/apis/sendVideo.d.ts +35 -0
- package/dist/apis/sendVideo.js +118 -0
- package/dist/apis/sendVoice.d.ts +12 -0
- package/dist/apis/sendVoice.js +73 -0
- package/dist/apis/setHiddenConversations.d.ts +3 -0
- package/dist/apis/setHiddenConversations.js +37 -0
- package/dist/apis/setMute.d.ts +17 -0
- package/dist/apis/setMute.js +67 -0
- package/dist/apis/setPinnedConversations.d.ts +3 -0
- package/dist/apis/setPinnedConversations.js +34 -0
- package/dist/apis/unblockUser.d.ts +2 -0
- package/dist/apis/unblockUser.js +28 -0
- package/dist/apis/undo.d.ts +9 -0
- package/dist/apis/undo.js +42 -0
- package/dist/apis/undoFriendRequest.d.ts +2 -0
- package/dist/apis/undoFriendRequest.js +27 -0
- package/dist/apis/updateAutoDeleteChat.d.ts +9 -0
- package/dist/apis/updateAutoDeleteChat.js +40 -0
- package/dist/apis/updateAutoReply.d.ts +14 -0
- package/dist/apis/updateAutoReply.js +37 -0
- package/dist/apis/updateCatalog.d.ts +11 -0
- package/dist/apis/updateCatalog.js +30 -0
- package/dist/apis/updateGroupSettings.d.ts +40 -0
- package/dist/apis/updateGroupSettings.js +43 -0
- package/dist/apis/updateHiddenConversPin.d.ts +2 -0
- package/dist/apis/updateHiddenConversPin.js +30 -0
- package/dist/apis/updateLabels.d.ts +24 -0
- package/dist/apis/updateLabels.js +34 -0
- package/dist/apis/updateLang.d.ts +7 -0
- package/dist/apis/updateLang.js +32 -0
- package/dist/apis/updateProductCatalog.d.ts +25 -0
- package/dist/apis/updateProductCatalog.js +51 -0
- package/dist/apis/updateProfile.d.ts +13 -0
- package/dist/apis/updateProfile.js +42 -0
- package/dist/apis/updateQuickMessage.d.ts +11 -0
- package/dist/apis/updateQuickMessage.js +61 -0
- package/dist/apis/updateSettings.d.ts +3 -0
- package/dist/apis/updateSettings.js +23 -0
- package/dist/apis/uploadAttachment.d.ts +50 -0
- package/dist/apis/uploadAttachment.js +205 -0
- package/dist/apis/uploadProductPhoto.d.ts +14 -0
- package/dist/apis/uploadProductPhoto.js +50 -0
- package/dist/cjs/Errors/ZaloApiError.cjs +11 -0
- package/dist/cjs/apis/acceptFriendRequest.cjs +33 -0
- package/dist/cjs/apis/addGroupBlockedMember.cjs +33 -0
- package/dist/cjs/apis/addGroupDeputy.cjs +35 -0
- package/dist/cjs/apis/addQuickMessage.cjs +65 -0
- package/dist/cjs/apis/addReaction.cjs +304 -0
- package/dist/cjs/apis/addUnreadMark.cjs +62 -0
- package/dist/cjs/apis/addUserToGroup.cjs +39 -0
- package/dist/cjs/apis/blockUser.cjs +33 -0
- package/dist/cjs/apis/blockViewFeed.cjs +35 -0
- package/dist/cjs/apis/changeAccountAvatar.cjs +57 -0
- package/dist/cjs/apis/changeFriendAlias.cjs +32 -0
- package/dist/cjs/apis/changeGroupAvatar.cjs +49 -0
- package/dist/cjs/apis/changeGroupName.cjs +37 -0
- package/dist/cjs/apis/changeGroupOwner.cjs +35 -0
- package/dist/cjs/apis/createAutoReply.cjs +42 -0
- package/dist/cjs/apis/createCatalog.cjs +34 -0
- package/dist/cjs/apis/createGroup.cjs +48 -0
- package/dist/cjs/apis/createNoteGroup.cjs +52 -0
- package/dist/cjs/apis/createPoll.cjs +45 -0
- package/dist/cjs/apis/createProductCatalog.cjs +55 -0
- package/dist/cjs/apis/createReminder.cjs +73 -0
- package/dist/cjs/apis/custom.cjs +19 -0
- package/dist/cjs/apis/deleteAutoReply.cjs +34 -0
- package/dist/cjs/apis/deleteAvatar.cjs +32 -0
- package/dist/cjs/apis/deleteCatalog.cjs +33 -0
- package/dist/cjs/apis/deleteChat.cjs +60 -0
- package/dist/cjs/apis/deleteMessage.cjs +62 -0
- package/dist/cjs/apis/deleteProductCatalog.cjs +36 -0
- package/dist/cjs/apis/disableGroupLink.cjs +29 -0
- package/dist/cjs/apis/disperseGroup.cjs +33 -0
- package/dist/cjs/apis/editNoteGroup.cjs +45 -0
- package/dist/cjs/apis/editReminder.cjs +71 -0
- package/dist/cjs/apis/enableGroupLink.cjs +30 -0
- package/dist/cjs/apis/fetchAccountInfo.cjs +15 -0
- package/dist/cjs/apis/findUser.cjs +45 -0
- package/dist/cjs/apis/forwardMessage.cjs +109 -0
- package/dist/cjs/apis/getAliasList.cjs +32 -0
- package/dist/cjs/apis/getAllFriends.cjs +37 -0
- package/dist/cjs/apis/getAllGroups.cjs +15 -0
- package/dist/cjs/apis/getArchivedChatList.cjs +28 -0
- package/dist/cjs/apis/getAutoDeleteChat.cjs +26 -0
- package/dist/cjs/apis/getAutoReplyList.cjs +29 -0
- package/dist/cjs/apis/getAvatarList.cjs +33 -0
- package/dist/cjs/apis/getBizAccount.cjs +32 -0
- package/dist/cjs/apis/getCatalogList.cjs +37 -0
- package/dist/cjs/apis/getContext.cjs +9 -0
- package/dist/cjs/apis/getCookie.cjs +14 -0
- package/dist/cjs/apis/getFriendBoardList.cjs +31 -0
- package/dist/cjs/apis/getFriendRequestStatus.cjs +30 -0
- package/dist/cjs/apis/getGroupBlockedMember.cjs +34 -0
- package/dist/cjs/apis/getGroupInfo.cjs +37 -0
- package/dist/cjs/apis/getGroupLinkDetail.cjs +30 -0
- package/dist/cjs/apis/getGroupLinkInfo.cjs +33 -0
- package/dist/cjs/apis/getGroupMembersInfo.cjs +29 -0
- package/dist/cjs/apis/getHiddenConversations.cjs +28 -0
- package/dist/cjs/apis/getLabels.cjs +33 -0
- package/dist/cjs/apis/getListBoard.cjs +55 -0
- package/dist/cjs/apis/getListReminder.cjs +57 -0
- package/dist/cjs/apis/getMute.cjs +27 -0
- package/dist/cjs/apis/getOwnId.cjs +9 -0
- package/dist/cjs/apis/getPendingGroupMembers.cjs +32 -0
- package/dist/cjs/apis/getPinConversations.cjs +27 -0
- package/dist/cjs/apis/getPollDetail.cjs +35 -0
- package/dist/cjs/apis/getProductCatalogList.cjs +38 -0
- package/dist/cjs/apis/getQR.cjs +34 -0
- package/dist/cjs/apis/getQuickMessage.cjs +29 -0
- package/dist/cjs/apis/getReceivedFriendRequests.cjs +27 -0
- package/dist/cjs/apis/getReminder.cjs +30 -0
- package/dist/cjs/apis/getReminderResponses.cjs +29 -0
- package/dist/cjs/apis/getSentFriendRequest.cjs +29 -0
- package/dist/cjs/apis/getStickers.cjs +45 -0
- package/dist/cjs/apis/getStickersDetail.cjs +45 -0
- package/dist/cjs/apis/getUnreadMark.cjs +35 -0
- package/dist/cjs/apis/getUserInfo.cjs +47 -0
- package/dist/cjs/apis/inviteUserToGroups.cjs +35 -0
- package/dist/cjs/apis/joinGroupLink.cjs +32 -0
- package/dist/cjs/apis/keepAlive.cjs +27 -0
- package/dist/cjs/apis/lastOnline.cjs +31 -0
- package/dist/cjs/apis/leaveGroup.cjs +38 -0
- package/dist/cjs/apis/listen.cjs +435 -0
- package/dist/cjs/apis/lockPoll.cjs +33 -0
- package/dist/cjs/apis/login.cjs +102 -0
- package/dist/cjs/apis/loginQR.cjs +364 -0
- package/dist/cjs/apis/parseLink.cjs +32 -0
- package/dist/cjs/apis/removeFriend.cjs +33 -0
- package/dist/cjs/apis/removeFriendAlias.cjs +29 -0
- package/dist/cjs/apis/removeGroupBlockedMember.cjs +33 -0
- package/dist/cjs/apis/removeGroupDeputy.cjs +35 -0
- package/dist/cjs/apis/removeQuickMessage.cjs +32 -0
- package/dist/cjs/apis/removeReminder.cjs +50 -0
- package/dist/cjs/apis/removeUnreadMark.cjs +60 -0
- package/dist/cjs/apis/removeUserFromGroup.cjs +39 -0
- package/dist/cjs/apis/resetHiddenConversPin.cjs +25 -0
- package/dist/cjs/apis/reuseAvatar.cjs +31 -0
- package/dist/cjs/apis/reviewPendingMemberRequest.cjs +36 -0
- package/dist/cjs/apis/sendBankCard.cjs +49 -0
- package/dist/cjs/apis/sendCard.cjs +69 -0
- package/dist/cjs/apis/sendDeliveredEvent.cjs +65 -0
- package/dist/cjs/apis/sendFriendRequest.cjs +44 -0
- package/dist/cjs/apis/sendLink.cjs +71 -0
- package/dist/cjs/apis/sendMessage.cjs +469 -0
- package/dist/cjs/apis/sendReport.cjs +63 -0
- package/dist/cjs/apis/sendSeenEvent.cjs +73 -0
- package/dist/cjs/apis/sendSticker.cjs +66 -0
- package/dist/cjs/apis/sendTypingEvent.cjs +43 -0
- package/dist/cjs/apis/sendVideo.cjs +128 -0
- package/dist/cjs/apis/sendVoice.cjs +83 -0
- package/dist/cjs/apis/setHiddenConversations.cjs +47 -0
- package/dist/cjs/apis/setMute.cjs +77 -0
- package/dist/cjs/apis/setPinnedConversations.cjs +44 -0
- package/dist/cjs/apis/unblockUser.cjs +33 -0
- package/dist/cjs/apis/undo.cjs +52 -0
- package/dist/cjs/apis/undoFriendRequest.cjs +32 -0
- package/dist/cjs/apis/updateAutoDeleteChat.cjs +50 -0
- package/dist/cjs/apis/updateAutoReply.cjs +42 -0
- package/dist/cjs/apis/updateCatalog.cjs +35 -0
- package/dist/cjs/apis/updateGroupSettings.cjs +48 -0
- package/dist/cjs/apis/updateHiddenConversPin.cjs +35 -0
- package/dist/cjs/apis/updateLabels.cjs +39 -0
- package/dist/cjs/apis/updateLang.cjs +37 -0
- package/dist/cjs/apis/updateProductCatalog.cjs +56 -0
- package/dist/cjs/apis/updateProfile.cjs +47 -0
- package/dist/cjs/apis/updateQuickMessage.cjs +66 -0
- package/dist/cjs/apis/updateSettings.cjs +28 -0
- package/dist/cjs/apis/uploadAttachment.cjs +215 -0
- package/dist/cjs/apis/uploadProductPhoto.cjs +55 -0
- package/dist/cjs/context.cjs +34 -0
- package/dist/cjs/index.cjs +121 -0
- package/dist/cjs/models/AutoReply.cjs +9 -0
- package/dist/cjs/models/DeliveredMessage.cjs +23 -0
- package/dist/cjs/models/Enum.cjs +95 -0
- package/dist/cjs/models/FriendEvent.cjs +87 -0
- package/dist/cjs/models/GroupEvent.cjs +88 -0
- package/dist/cjs/models/Message.cjs +32 -0
- package/dist/cjs/models/Reaction.cjs +74 -0
- package/dist/cjs/models/SeenMessage.cjs +23 -0
- package/dist/cjs/models/Typing.cjs +23 -0
- package/dist/cjs/models/Undo.cjs +16 -0
- package/dist/cjs/models/ZBusiness.cjs +46 -0
- package/dist/cjs/update.cjs +27 -0
- package/dist/cjs/utils.cjs +732 -0
- package/dist/cjs/zalo.cjs +360 -0
- package/dist/context.d.ts +177 -0
- package/dist/context.js +28 -0
- package/dist/index.d.ts +130 -0
- package/dist/index.js +11 -0
- package/dist/models/Attachment.d.ts +9 -0
- package/dist/models/Attachment.js +1 -0
- package/dist/models/AutoReply.d.ts +20 -0
- package/dist/models/AutoReply.js +7 -0
- package/dist/models/Board.d.ts +54 -0
- package/dist/models/Board.js +1 -0
- package/dist/models/Catalog.d.ts +16 -0
- package/dist/models/Catalog.js +1 -0
- package/dist/models/DeliveredMessage.d.ts +27 -0
- package/dist/models/DeliveredMessage.js +17 -0
- package/dist/models/Enum.d.ts +87 -0
- package/dist/models/Enum.js +93 -0
- package/dist/models/FriendEvent.d.ts +107 -0
- package/dist/models/FriendEvent.js +83 -0
- package/dist/models/GroupEvent.d.ts +197 -0
- package/dist/models/GroupEvent.js +84 -0
- package/dist/models/Message.d.ts +91 -0
- package/dist/models/Message.js +26 -0
- package/dist/models/ProductCatalog.d.ts +17 -0
- package/dist/models/ProductCatalog.js +1 -0
- package/dist/models/QuickMessage.d.ts +25 -0
- package/dist/models/QuickMessage.js +1 -0
- package/dist/models/Reaction.d.ts +85 -0
- package/dist/models/Reaction.js +70 -0
- package/dist/models/Reminder.d.ts +35 -0
- package/dist/models/Reminder.js +1 -0
- package/dist/models/SeenMessage.d.ts +26 -0
- package/dist/models/SeenMessage.js +17 -0
- package/dist/models/Typing.d.ts +24 -0
- package/dist/models/Typing.js +17 -0
- package/dist/models/Undo.d.ts +34 -0
- package/dist/models/Undo.js +12 -0
- package/dist/models/ZBusiness.d.ts +29 -0
- package/dist/models/ZBusiness.js +42 -0
- package/dist/models/index.d.ts +17 -0
- package/dist/models/index.js +17 -0
- package/dist/update.d.ts +2 -0
- package/dist/update.js +22 -0
- package/dist/utils.d.ts +168 -0
- package/dist/utils.js +748 -0
- package/dist/zalo.d.ts +291 -0
- package/dist/zalo.js +354 -0
- package/eslint.config.js +21 -0
- package/index.d.ts +2 -0
- package/package.json +143 -0
- package/qr.png +0 -0
- package/rollup.config.js +28 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ZaloApiError = require('./Errors/ZaloApiError.cjs');
|
|
4
|
+
var DeliveredMessage = require('./models/DeliveredMessage.cjs');
|
|
5
|
+
var Enum = require('./models/Enum.cjs');
|
|
6
|
+
var FriendEvent = require('./models/FriendEvent.cjs');
|
|
7
|
+
var GroupEvent = require('./models/GroupEvent.cjs');
|
|
8
|
+
var Message = require('./models/Message.cjs');
|
|
9
|
+
var Reaction = require('./models/Reaction.cjs');
|
|
10
|
+
var SeenMessage = require('./models/SeenMessage.cjs');
|
|
11
|
+
var Typing = require('./models/Typing.cjs');
|
|
12
|
+
var Undo = require('./models/Undo.cjs');
|
|
13
|
+
var ZBusiness = require('./models/ZBusiness.cjs');
|
|
14
|
+
var AutoReply = require('./models/AutoReply.cjs');
|
|
15
|
+
var zalo = require('./zalo.cjs');
|
|
16
|
+
var listen = require('./apis/listen.cjs');
|
|
17
|
+
var loginQR = require('./apis/loginQR.cjs');
|
|
18
|
+
var sendMessage = require('./apis/sendMessage.cjs');
|
|
19
|
+
var sendReport = require('./apis/sendReport.cjs');
|
|
20
|
+
var setMute = require('./apis/setMute.cjs');
|
|
21
|
+
var updateAutoDeleteChat = require('./apis/updateAutoDeleteChat.cjs');
|
|
22
|
+
var updateLang = require('./apis/updateLang.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
exports.ZaloApiError = ZaloApiError.ZaloApiError;
|
|
27
|
+
exports.GroupDeliveredMessage = DeliveredMessage.GroupDeliveredMessage;
|
|
28
|
+
exports.UserDeliveredMessage = DeliveredMessage.UserDeliveredMessage;
|
|
29
|
+
Object.defineProperty(exports, "BinBankCard", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return Enum.BinBankCard; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "BoardType", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return Enum.BoardType; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "DestType", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return Enum.DestType; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "Gender", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return Enum.Gender; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "ReminderRepeatMode", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return Enum.ReminderRepeatMode; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "ThreadType", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return Enum.ThreadType; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "FriendEventType", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return FriendEvent.FriendEventType; }
|
|
56
|
+
});
|
|
57
|
+
exports.initializeFriendEvent = FriendEvent.initializeFriendEvent;
|
|
58
|
+
Object.defineProperty(exports, "GroupEventType", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return GroupEvent.GroupEventType; }
|
|
61
|
+
});
|
|
62
|
+
exports.initializeGroupEvent = GroupEvent.initializeGroupEvent;
|
|
63
|
+
exports.GroupMessage = Message.GroupMessage;
|
|
64
|
+
exports.UserMessage = Message.UserMessage;
|
|
65
|
+
exports.Reaction = Reaction.Reaction;
|
|
66
|
+
Object.defineProperty(exports, "Reactions", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return Reaction.Reactions; }
|
|
69
|
+
});
|
|
70
|
+
exports.GroupSeenMessage = SeenMessage.GroupSeenMessage;
|
|
71
|
+
exports.UserSeenMessage = SeenMessage.UserSeenMessage;
|
|
72
|
+
exports.GroupTyping = Typing.GroupTyping;
|
|
73
|
+
exports.UserTyping = Typing.UserTyping;
|
|
74
|
+
exports.Undo = Undo.Undo;
|
|
75
|
+
Object.defineProperty(exports, "BusinessCategory", {
|
|
76
|
+
enumerable: true,
|
|
77
|
+
get: function () { return ZBusiness.BusinessCategory; }
|
|
78
|
+
});
|
|
79
|
+
exports.BusinessCategoryName = ZBusiness.BusinessCategoryName;
|
|
80
|
+
Object.defineProperty(exports, "AutoReplyScope", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return AutoReply.AutoReplyScope; }
|
|
83
|
+
});
|
|
84
|
+
exports.API = zalo.API;
|
|
85
|
+
exports.Zalo = zalo.Zalo;
|
|
86
|
+
Object.defineProperty(exports, "CloseReason", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function () { return listen.CloseReason; }
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "LoginQRCallbackEventType", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () { return loginQR.LoginQRCallbackEventType; }
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "TextStyle", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () { return sendMessage.TextStyle; }
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "Urgency", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () { return sendMessage.Urgency; }
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "ReportReason", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () { return sendReport.ReportReason; }
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "MuteAction", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () { return setMute.MuteAction; }
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "MuteDuration", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () { return setMute.MuteDuration; }
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "ChatTTL", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () { return updateAutoDeleteChat.ChatTTL; }
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, "UpdateLangAvailableLanguages", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () { return updateLang.UpdateLangAvailableLanguages; }
|
|
121
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.AutoReplyScope = void 0;
|
|
4
|
+
(function (AutoReplyScope) {
|
|
5
|
+
AutoReplyScope[AutoReplyScope["Everyone"] = 0] = "Everyone";
|
|
6
|
+
AutoReplyScope[AutoReplyScope["Stranger"] = 1] = "Stranger";
|
|
7
|
+
AutoReplyScope[AutoReplyScope["SpecificFriends"] = 2] = "SpecificFriends";
|
|
8
|
+
AutoReplyScope[AutoReplyScope["FriendsExcept"] = 3] = "FriendsExcept";
|
|
9
|
+
})(exports.AutoReplyScope || (exports.AutoReplyScope = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Enum = require('./Enum.cjs');
|
|
4
|
+
|
|
5
|
+
class UserDeliveredMessage {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
this.type = Enum.ThreadType.User;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.threadId = data.deliveredUids[0];
|
|
10
|
+
this.isSelf = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class GroupDeliveredMessage {
|
|
14
|
+
constructor(uid, data) {
|
|
15
|
+
this.type = Enum.ThreadType.Group;
|
|
16
|
+
this.data = data;
|
|
17
|
+
this.threadId = data.groupId;
|
|
18
|
+
this.isSelf = data.deliveredUids.includes(uid);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.GroupDeliveredMessage = GroupDeliveredMessage;
|
|
23
|
+
exports.UserDeliveredMessage = UserDeliveredMessage;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.ThreadType = void 0;
|
|
4
|
+
(function (ThreadType) {
|
|
5
|
+
ThreadType[ThreadType["User"] = 0] = "User";
|
|
6
|
+
ThreadType[ThreadType["Group"] = 1] = "Group";
|
|
7
|
+
})(exports.ThreadType || (exports.ThreadType = {}));
|
|
8
|
+
exports.DestType = void 0;
|
|
9
|
+
(function (DestType) {
|
|
10
|
+
DestType[DestType["Group"] = 1] = "Group";
|
|
11
|
+
DestType[DestType["User"] = 3] = "User";
|
|
12
|
+
DestType[DestType["Page"] = 5] = "Page";
|
|
13
|
+
})(exports.DestType || (exports.DestType = {}));
|
|
14
|
+
exports.ReminderRepeatMode = void 0;
|
|
15
|
+
(function (ReminderRepeatMode) {
|
|
16
|
+
ReminderRepeatMode[ReminderRepeatMode["None"] = 0] = "None";
|
|
17
|
+
ReminderRepeatMode[ReminderRepeatMode["Daily"] = 1] = "Daily";
|
|
18
|
+
ReminderRepeatMode[ReminderRepeatMode["Weekly"] = 2] = "Weekly";
|
|
19
|
+
ReminderRepeatMode[ReminderRepeatMode["Monthly"] = 3] = "Monthly";
|
|
20
|
+
})(exports.ReminderRepeatMode || (exports.ReminderRepeatMode = {}));
|
|
21
|
+
exports.Gender = void 0;
|
|
22
|
+
(function (Gender) {
|
|
23
|
+
Gender[Gender["Male"] = 0] = "Male";
|
|
24
|
+
Gender[Gender["Female"] = 1] = "Female";
|
|
25
|
+
})(exports.Gender || (exports.Gender = {}));
|
|
26
|
+
exports.BoardType = void 0;
|
|
27
|
+
(function (BoardType) {
|
|
28
|
+
BoardType[BoardType["Note"] = 1] = "Note";
|
|
29
|
+
BoardType[BoardType["PinnedMessage"] = 2] = "PinnedMessage";
|
|
30
|
+
BoardType[BoardType["Poll"] = 3] = "Poll";
|
|
31
|
+
})(exports.BoardType || (exports.BoardType = {}));
|
|
32
|
+
/**
|
|
33
|
+
* @note Bank codes list after Mitm on Mobile and Bank's supported by Zalo
|
|
34
|
+
* @documents https://developers.zalo.me/docs/zalo-notification-service/phu-luc/danh-sach-bin-code - docs missing bin code and short_name bank
|
|
35
|
+
*/
|
|
36
|
+
exports.BinBankCard = void 0;
|
|
37
|
+
(function (BinBankCard) {
|
|
38
|
+
BinBankCard[BinBankCard["ABBank"] = 970425] = "ABBank";
|
|
39
|
+
BinBankCard[BinBankCard["ACB"] = 970416] = "ACB";
|
|
40
|
+
BinBankCard[BinBankCard["Agribank"] = 970405] = "Agribank";
|
|
41
|
+
BinBankCard[BinBankCard["BIDV"] = 970418] = "BIDV";
|
|
42
|
+
BinBankCard[BinBankCard["BVBank"] = 970454] = "BVBank";
|
|
43
|
+
BinBankCard[BinBankCard["BacA_Bank"] = 970409] = "BacA_Bank";
|
|
44
|
+
BinBankCard[BinBankCard["BaoViet_Bank"] = 970438] = "BaoViet_Bank";
|
|
45
|
+
BinBankCard[BinBankCard["CAKE"] = 546034] = "CAKE";
|
|
46
|
+
BinBankCard[BinBankCard["CB_Bank"] = 970444] = "CB_Bank";
|
|
47
|
+
BinBankCard[BinBankCard["CIMB_Bank"] = 422589] = "CIMB_Bank";
|
|
48
|
+
BinBankCard[BinBankCard["Coop_Bank"] = 970446] = "Coop_Bank";
|
|
49
|
+
BinBankCard[BinBankCard["DBS_Bank"] = 796500] = "DBS_Bank";
|
|
50
|
+
BinBankCard[BinBankCard["DongA_Bank"] = 970406] = "DongA_Bank";
|
|
51
|
+
BinBankCard[BinBankCard["Eximbank"] = 970431] = "Eximbank";
|
|
52
|
+
BinBankCard[BinBankCard["GPBank"] = 970408] = "GPBank";
|
|
53
|
+
BinBankCard[BinBankCard["HDBank"] = 970437] = "HDBank";
|
|
54
|
+
BinBankCard[BinBankCard["HSBC"] = 458761] = "HSBC";
|
|
55
|
+
BinBankCard[BinBankCard["HongLeong_Bank"] = 970442] = "HongLeong_Bank";
|
|
56
|
+
BinBankCard[BinBankCard["IBK_HCM"] = 970456] = "IBK_HCM";
|
|
57
|
+
BinBankCard[BinBankCard["IBK_HN"] = 970455] = "IBK_HN";
|
|
58
|
+
BinBankCard[BinBankCard["Indovina_Bank"] = 970434] = "Indovina_Bank";
|
|
59
|
+
BinBankCard[BinBankCard["KBank"] = 668888] = "KBank";
|
|
60
|
+
BinBankCard[BinBankCard["KienlongBank"] = 970452] = "KienlongBank";
|
|
61
|
+
BinBankCard[BinBankCard["Kookmin_Bank_HCM"] = 970463] = "Kookmin_Bank_HCM";
|
|
62
|
+
BinBankCard[BinBankCard["Kookmin_Bank_HN"] = 970462] = "Kookmin_Bank_HN";
|
|
63
|
+
BinBankCard[BinBankCard["LPBank"] = 970449] = "LPBank";
|
|
64
|
+
BinBankCard[BinBankCard["MB_Bank"] = 970422] = "MB_Bank";
|
|
65
|
+
BinBankCard[BinBankCard["MSB"] = 970426] = "MSB";
|
|
66
|
+
BinBankCard[BinBankCard["NCB"] = 970419] = "NCB";
|
|
67
|
+
BinBankCard[BinBankCard["Nam_A_Bank"] = 970428] = "Nam_A_Bank";
|
|
68
|
+
BinBankCard[BinBankCard["NongHyup_Bank"] = 801011] = "NongHyup_Bank";
|
|
69
|
+
BinBankCard[BinBankCard["OCB"] = 970448] = "OCB";
|
|
70
|
+
BinBankCard[BinBankCard["Ocean_Bank"] = 970414] = "Ocean_Bank";
|
|
71
|
+
BinBankCard[BinBankCard["PGBank"] = 970430] = "PGBank";
|
|
72
|
+
BinBankCard[BinBankCard["PVcomBank"] = 970412] = "PVcomBank";
|
|
73
|
+
BinBankCard[BinBankCard["Public_Bank_Vietnam"] = 970439] = "Public_Bank_Vietnam";
|
|
74
|
+
BinBankCard[BinBankCard["SCB"] = 970429] = "SCB";
|
|
75
|
+
BinBankCard[BinBankCard["SHB"] = 970443] = "SHB";
|
|
76
|
+
BinBankCard[BinBankCard["Sacombank"] = 970403] = "Sacombank";
|
|
77
|
+
BinBankCard[BinBankCard["Saigon_Bank"] = 970400] = "Saigon_Bank";
|
|
78
|
+
BinBankCard[BinBankCard["SeABank"] = 970440] = "SeABank";
|
|
79
|
+
BinBankCard[BinBankCard["Shinhan_Bank"] = 970424] = "Shinhan_Bank";
|
|
80
|
+
BinBankCard[BinBankCard["Standard_Chartered_Vietnam"] = 970410] = "Standard_Chartered_Vietnam";
|
|
81
|
+
BinBankCard[BinBankCard["TNEX"] = 9704261] = "TNEX";
|
|
82
|
+
BinBankCard[BinBankCard["TPBank"] = 970423] = "TPBank";
|
|
83
|
+
BinBankCard[BinBankCard["Techcombank"] = 970407] = "Techcombank";
|
|
84
|
+
BinBankCard[BinBankCard["Timo"] = 963388] = "Timo";
|
|
85
|
+
BinBankCard[BinBankCard["UBank"] = 546035] = "UBank";
|
|
86
|
+
BinBankCard[BinBankCard["United_Overseas_Bank_Vietnam"] = 970458] = "United_Overseas_Bank_Vietnam";
|
|
87
|
+
BinBankCard[BinBankCard["VIB"] = 970441] = "VIB";
|
|
88
|
+
BinBankCard[BinBankCard["VPBank"] = 970432] = "VPBank";
|
|
89
|
+
BinBankCard[BinBankCard["VRB"] = 970421] = "VRB";
|
|
90
|
+
BinBankCard[BinBankCard["VietABank"] = 970427] = "VietABank";
|
|
91
|
+
BinBankCard[BinBankCard["VietBank"] = 970433] = "VietBank";
|
|
92
|
+
BinBankCard[BinBankCard["Vietcombank"] = 970436] = "Vietcombank";
|
|
93
|
+
BinBankCard[BinBankCard["VietinBank"] = 970415] = "VietinBank";
|
|
94
|
+
BinBankCard[BinBankCard["Woori_Bank"] = 970457] = "Woori_Bank";
|
|
95
|
+
})(exports.BinBankCard || (exports.BinBankCard = {}));
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.FriendEventType = void 0;
|
|
4
|
+
(function (FriendEventType) {
|
|
5
|
+
FriendEventType[FriendEventType["ADD"] = 0] = "ADD";
|
|
6
|
+
FriendEventType[FriendEventType["REMOVE"] = 1] = "REMOVE";
|
|
7
|
+
FriendEventType[FriendEventType["REQUEST"] = 2] = "REQUEST";
|
|
8
|
+
FriendEventType[FriendEventType["UNDO_REQUEST"] = 3] = "UNDO_REQUEST";
|
|
9
|
+
FriendEventType[FriendEventType["REJECT_REQUEST"] = 4] = "REJECT_REQUEST";
|
|
10
|
+
FriendEventType[FriendEventType["SEEN_FRIEND_REQUEST"] = 5] = "SEEN_FRIEND_REQUEST";
|
|
11
|
+
FriendEventType[FriendEventType["BLOCK"] = 6] = "BLOCK";
|
|
12
|
+
FriendEventType[FriendEventType["UNBLOCK"] = 7] = "UNBLOCK";
|
|
13
|
+
FriendEventType[FriendEventType["BLOCK_CALL"] = 8] = "BLOCK_CALL";
|
|
14
|
+
FriendEventType[FriendEventType["UNBLOCK_CALL"] = 9] = "UNBLOCK_CALL";
|
|
15
|
+
FriendEventType[FriendEventType["PIN_UNPIN"] = 10] = "PIN_UNPIN";
|
|
16
|
+
FriendEventType[FriendEventType["PIN_CREATE"] = 11] = "PIN_CREATE";
|
|
17
|
+
FriendEventType[FriendEventType["UNKNOWN"] = 12] = "UNKNOWN";
|
|
18
|
+
})(exports.FriendEventType || (exports.FriendEventType = {}));
|
|
19
|
+
function initializeFriendEvent(uid, data, type) {
|
|
20
|
+
if (type == exports.FriendEventType.ADD ||
|
|
21
|
+
type == exports.FriendEventType.REMOVE ||
|
|
22
|
+
type == exports.FriendEventType.BLOCK ||
|
|
23
|
+
type == exports.FriendEventType.UNBLOCK ||
|
|
24
|
+
type == exports.FriendEventType.BLOCK_CALL ||
|
|
25
|
+
type == exports.FriendEventType.UNBLOCK_CALL) {
|
|
26
|
+
return {
|
|
27
|
+
type,
|
|
28
|
+
data: data,
|
|
29
|
+
threadId: data,
|
|
30
|
+
isSelf: ![exports.FriendEventType.ADD, exports.FriendEventType.REMOVE].includes(type),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
else if (type == exports.FriendEventType.REJECT_REQUEST || type == exports.FriendEventType.UNDO_REQUEST) {
|
|
34
|
+
const threadId = data.toUid;
|
|
35
|
+
return {
|
|
36
|
+
type,
|
|
37
|
+
data: data,
|
|
38
|
+
threadId,
|
|
39
|
+
isSelf: data.fromUid == uid,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else if (type == exports.FriendEventType.REQUEST) {
|
|
43
|
+
const threadId = data.toUid;
|
|
44
|
+
return {
|
|
45
|
+
type,
|
|
46
|
+
data: data,
|
|
47
|
+
threadId,
|
|
48
|
+
isSelf: data.fromUid == uid,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
else if (type == exports.FriendEventType.SEEN_FRIEND_REQUEST) {
|
|
52
|
+
return {
|
|
53
|
+
type,
|
|
54
|
+
data: data,
|
|
55
|
+
threadId: uid,
|
|
56
|
+
isSelf: true,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
else if (type == exports.FriendEventType.PIN_CREATE) {
|
|
60
|
+
const threadId = data.conversationId;
|
|
61
|
+
return {
|
|
62
|
+
type,
|
|
63
|
+
data: data,
|
|
64
|
+
threadId,
|
|
65
|
+
isSelf: data.actorId == uid,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
else if (type == exports.FriendEventType.PIN_UNPIN) {
|
|
69
|
+
const threadId = data.conversationId;
|
|
70
|
+
return {
|
|
71
|
+
type,
|
|
72
|
+
data: data,
|
|
73
|
+
threadId,
|
|
74
|
+
isSelf: data.actorId == uid,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return {
|
|
79
|
+
type: exports.FriendEventType.UNKNOWN,
|
|
80
|
+
data: JSON.stringify(data),
|
|
81
|
+
threadId: "",
|
|
82
|
+
isSelf: false,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
exports.initializeFriendEvent = initializeFriendEvent;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.GroupEventType = void 0;
|
|
4
|
+
(function (GroupEventType) {
|
|
5
|
+
GroupEventType[GroupEventType["JOIN_REQUEST"] = 0] = "JOIN_REQUEST";
|
|
6
|
+
GroupEventType[GroupEventType["JOIN"] = 1] = "JOIN";
|
|
7
|
+
GroupEventType[GroupEventType["LEAVE"] = 2] = "LEAVE";
|
|
8
|
+
GroupEventType[GroupEventType["REMOVE_MEMBER"] = 3] = "REMOVE_MEMBER";
|
|
9
|
+
GroupEventType[GroupEventType["BLOCK_MEMBER"] = 4] = "BLOCK_MEMBER";
|
|
10
|
+
GroupEventType[GroupEventType["UPDATE_SETTING"] = 5] = "UPDATE_SETTING";
|
|
11
|
+
GroupEventType[GroupEventType["UPDATE"] = 6] = "UPDATE";
|
|
12
|
+
GroupEventType[GroupEventType["NEW_LINK"] = 7] = "NEW_LINK";
|
|
13
|
+
GroupEventType[GroupEventType["ADD_ADMIN"] = 8] = "ADD_ADMIN";
|
|
14
|
+
GroupEventType[GroupEventType["REMOVE_ADMIN"] = 9] = "REMOVE_ADMIN";
|
|
15
|
+
GroupEventType[GroupEventType["NEW_PIN_TOPIC"] = 10] = "NEW_PIN_TOPIC";
|
|
16
|
+
GroupEventType[GroupEventType["UPDATE_PIN_TOPIC"] = 11] = "UPDATE_PIN_TOPIC";
|
|
17
|
+
GroupEventType[GroupEventType["REORDER_PIN_TOPIC"] = 12] = "REORDER_PIN_TOPIC";
|
|
18
|
+
GroupEventType[GroupEventType["UPDATE_BOARD"] = 13] = "UPDATE_BOARD";
|
|
19
|
+
GroupEventType[GroupEventType["REMOVE_BOARD"] = 14] = "REMOVE_BOARD";
|
|
20
|
+
GroupEventType[GroupEventType["UPDATE_TOPIC"] = 15] = "UPDATE_TOPIC";
|
|
21
|
+
GroupEventType[GroupEventType["UNPIN_TOPIC"] = 16] = "UNPIN_TOPIC";
|
|
22
|
+
GroupEventType[GroupEventType["REMOVE_TOPIC"] = 17] = "REMOVE_TOPIC";
|
|
23
|
+
GroupEventType[GroupEventType["ACCEPT_REMIND"] = 18] = "ACCEPT_REMIND";
|
|
24
|
+
GroupEventType[GroupEventType["REJECT_REMIND"] = 19] = "REJECT_REMIND";
|
|
25
|
+
GroupEventType[GroupEventType["REMIND_TOPIC"] = 20] = "REMIND_TOPIC";
|
|
26
|
+
GroupEventType[GroupEventType["UPDATE_AVATAR"] = 21] = "UPDATE_AVATAR";
|
|
27
|
+
GroupEventType[GroupEventType["UNKNOWN"] = 22] = "UNKNOWN";
|
|
28
|
+
})(exports.GroupEventType || (exports.GroupEventType = {}));
|
|
29
|
+
function initializeGroupEvent(uid, data, type) {
|
|
30
|
+
var _a;
|
|
31
|
+
const threadId = "group_id" in data ? data.group_id : data.groupId;
|
|
32
|
+
if (type == exports.GroupEventType.JOIN_REQUEST) {
|
|
33
|
+
return { type, data: data, threadId, isSelf: false };
|
|
34
|
+
}
|
|
35
|
+
else if (type == exports.GroupEventType.NEW_PIN_TOPIC ||
|
|
36
|
+
type == exports.GroupEventType.UNPIN_TOPIC ||
|
|
37
|
+
type == exports.GroupEventType.UPDATE_PIN_TOPIC) {
|
|
38
|
+
return {
|
|
39
|
+
type,
|
|
40
|
+
data: data,
|
|
41
|
+
threadId,
|
|
42
|
+
isSelf: data.actorId == uid,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
else if (type == exports.GroupEventType.REORDER_PIN_TOPIC) {
|
|
46
|
+
return {
|
|
47
|
+
type,
|
|
48
|
+
data: data,
|
|
49
|
+
threadId,
|
|
50
|
+
isSelf: data.actorId == uid,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
else if (type == exports.GroupEventType.UPDATE_BOARD || type == exports.GroupEventType.REMOVE_BOARD) {
|
|
54
|
+
return {
|
|
55
|
+
type,
|
|
56
|
+
data: data,
|
|
57
|
+
threadId,
|
|
58
|
+
isSelf: data.sourceId == uid,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
else if (type == exports.GroupEventType.ACCEPT_REMIND || type == exports.GroupEventType.REJECT_REMIND) {
|
|
62
|
+
return {
|
|
63
|
+
type,
|
|
64
|
+
data: data,
|
|
65
|
+
threadId,
|
|
66
|
+
isSelf: data.updateMembers.some((memberId) => memberId == uid),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
else if (type == exports.GroupEventType.REMIND_TOPIC) {
|
|
70
|
+
return {
|
|
71
|
+
type,
|
|
72
|
+
data: data,
|
|
73
|
+
threadId,
|
|
74
|
+
isSelf: data.creatorId == uid,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
const baseData = data;
|
|
79
|
+
return {
|
|
80
|
+
type,
|
|
81
|
+
data: baseData,
|
|
82
|
+
threadId,
|
|
83
|
+
isSelf: ((_a = baseData.updateMembers) === null || _a === void 0 ? void 0 : _a.some((member) => member.id == uid)) || baseData.sourceId == uid,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
exports.initializeGroupEvent = initializeGroupEvent;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Enum = require('./Enum.cjs');
|
|
4
|
+
|
|
5
|
+
class UserMessage {
|
|
6
|
+
constructor(uid, data) {
|
|
7
|
+
this.type = Enum.ThreadType.User;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.threadId = data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
10
|
+
this.isSelf = data.uidFrom == "0";
|
|
11
|
+
if (data.idTo == "0")
|
|
12
|
+
data.idTo = uid;
|
|
13
|
+
if (data.uidFrom == "0")
|
|
14
|
+
data.uidFrom = uid;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class GroupMessage {
|
|
18
|
+
constructor(uid, data) {
|
|
19
|
+
this.type = Enum.ThreadType.Group;
|
|
20
|
+
this.data = data;
|
|
21
|
+
this.threadId = data.idTo;
|
|
22
|
+
this.isSelf = data.uidFrom == "0";
|
|
23
|
+
if (data.uidFrom == "0")
|
|
24
|
+
data.uidFrom = uid;
|
|
25
|
+
if (data.quote) {
|
|
26
|
+
data.quote.ownerId = String(data.quote.ownerId);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
exports.GroupMessage = GroupMessage;
|
|
32
|
+
exports.UserMessage = UserMessage;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.Reactions = void 0;
|
|
4
|
+
(function (Reactions) {
|
|
5
|
+
Reactions["HEART"] = "/-heart";
|
|
6
|
+
Reactions["LIKE"] = "/-strong";
|
|
7
|
+
Reactions["HAHA"] = ":>";
|
|
8
|
+
Reactions["WOW"] = ":o";
|
|
9
|
+
Reactions["CRY"] = ":-((";
|
|
10
|
+
Reactions["ANGRY"] = ":-h";
|
|
11
|
+
Reactions["KISS"] = ":-*";
|
|
12
|
+
Reactions["TEARS_OF_JOY"] = ":')";
|
|
13
|
+
Reactions["SHIT"] = "/-shit";
|
|
14
|
+
Reactions["ROSE"] = "/-rose";
|
|
15
|
+
Reactions["BROKEN_HEART"] = "/-break";
|
|
16
|
+
Reactions["DISLIKE"] = "/-weak";
|
|
17
|
+
Reactions["LOVE"] = ";xx";
|
|
18
|
+
Reactions["CONFUSED"] = ";-/";
|
|
19
|
+
Reactions["WINK"] = ";-)";
|
|
20
|
+
Reactions["FADE"] = "/-fade";
|
|
21
|
+
Reactions["SUN"] = "/-li";
|
|
22
|
+
Reactions["BIRTHDAY"] = "/-bd";
|
|
23
|
+
Reactions["BOMB"] = "/-bome";
|
|
24
|
+
Reactions["OK"] = "/-ok";
|
|
25
|
+
Reactions["PEACE"] = "/-v";
|
|
26
|
+
Reactions["THANKS"] = "/-thanks";
|
|
27
|
+
Reactions["PUNCH"] = "/-punch";
|
|
28
|
+
Reactions["SHARE"] = "/-share";
|
|
29
|
+
Reactions["PRAY"] = "_()_";
|
|
30
|
+
Reactions["NO"] = "/-no";
|
|
31
|
+
Reactions["BAD"] = "/-bad";
|
|
32
|
+
Reactions["LOVE_YOU"] = "/-loveu";
|
|
33
|
+
Reactions["SAD"] = "--b";
|
|
34
|
+
Reactions["VERY_SAD"] = ":((";
|
|
35
|
+
Reactions["COOL"] = "x-)";
|
|
36
|
+
Reactions["NERD"] = "8-)";
|
|
37
|
+
Reactions["BIG_SMILE"] = ";-d";
|
|
38
|
+
Reactions["SUNGLASSES"] = "b-)";
|
|
39
|
+
Reactions["NEUTRAL"] = ":--|";
|
|
40
|
+
Reactions["SAD_FACE"] = "p-(";
|
|
41
|
+
Reactions["BYE"] = ":-bye";
|
|
42
|
+
Reactions["SLEEPY"] = "|-)";
|
|
43
|
+
Reactions["WIPE"] = ":wipe";
|
|
44
|
+
Reactions["DIG"] = ":-dig";
|
|
45
|
+
Reactions["ANGUISH"] = "&-(";
|
|
46
|
+
Reactions["HANDCLAP"] = ":handclap";
|
|
47
|
+
Reactions["ANGRY_FACE"] = ">-|";
|
|
48
|
+
Reactions["F_CHAIR"] = ":-f";
|
|
49
|
+
Reactions["L_CHAIR"] = ":-l";
|
|
50
|
+
Reactions["R_CHAIR"] = ":-r";
|
|
51
|
+
Reactions["SILENT"] = ";-x";
|
|
52
|
+
Reactions["SURPRISE"] = ":-o";
|
|
53
|
+
Reactions["EMBARRASSED"] = ";-s";
|
|
54
|
+
Reactions["AFRAID"] = ";-a";
|
|
55
|
+
Reactions["SAD2"] = ":-<";
|
|
56
|
+
Reactions["BIG_LAUGH"] = ":))";
|
|
57
|
+
Reactions["RICH"] = "$-)";
|
|
58
|
+
Reactions["BEER"] = "/-beer";
|
|
59
|
+
Reactions["NONE"] = "";
|
|
60
|
+
})(exports.Reactions || (exports.Reactions = {}));
|
|
61
|
+
class Reaction {
|
|
62
|
+
constructor(uid, data, isGroup) {
|
|
63
|
+
this.data = data;
|
|
64
|
+
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
65
|
+
this.isSelf = data.uidFrom == "0";
|
|
66
|
+
this.isGroup = isGroup;
|
|
67
|
+
if (data.idTo == "0")
|
|
68
|
+
data.idTo = uid;
|
|
69
|
+
if (data.uidFrom == "0")
|
|
70
|
+
data.uidFrom = uid;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
exports.Reaction = Reaction;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Enum = require('./Enum.cjs');
|
|
4
|
+
|
|
5
|
+
class UserSeenMessage {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
this.type = Enum.ThreadType.User;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.threadId = data.idTo;
|
|
10
|
+
this.isSelf = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class GroupSeenMessage {
|
|
14
|
+
constructor(uid, data) {
|
|
15
|
+
this.type = Enum.ThreadType.Group;
|
|
16
|
+
this.data = data;
|
|
17
|
+
this.threadId = data.groupId;
|
|
18
|
+
this.isSelf = data.seenUids.includes(uid);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.GroupSeenMessage = GroupSeenMessage;
|
|
23
|
+
exports.UserSeenMessage = UserSeenMessage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Enum = require('./Enum.cjs');
|
|
4
|
+
|
|
5
|
+
class UserTyping {
|
|
6
|
+
constructor(data) {
|
|
7
|
+
this.type = Enum.ThreadType.User;
|
|
8
|
+
this.data = data;
|
|
9
|
+
this.threadId = data.uid;
|
|
10
|
+
this.isSelf = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
class GroupTyping {
|
|
14
|
+
constructor(data) {
|
|
15
|
+
this.type = Enum.ThreadType.Group;
|
|
16
|
+
this.data = data;
|
|
17
|
+
this.threadId = data.gid;
|
|
18
|
+
this.isSelf = false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.GroupTyping = GroupTyping;
|
|
23
|
+
exports.UserTyping = UserTyping;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
class Undo {
|
|
4
|
+
constructor(uid, data, isGroup) {
|
|
5
|
+
this.data = data;
|
|
6
|
+
this.threadId = isGroup || data.uidFrom == "0" ? data.idTo : data.uidFrom;
|
|
7
|
+
this.isSelf = data.uidFrom == "0";
|
|
8
|
+
this.isGroup = isGroup;
|
|
9
|
+
if (data.idTo == "0")
|
|
10
|
+
data.idTo = uid;
|
|
11
|
+
if (data.uidFrom == "0")
|
|
12
|
+
data.uidFrom = uid;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
exports.Undo = Undo;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.BusinessCategory = void 0;
|
|
4
|
+
(function (BusinessCategory) {
|
|
5
|
+
BusinessCategory[BusinessCategory["Other"] = 0] = "Other";
|
|
6
|
+
BusinessCategory[BusinessCategory["RealEstate"] = 1] = "RealEstate";
|
|
7
|
+
BusinessCategory[BusinessCategory["TechnologyAndDevices"] = 2] = "TechnologyAndDevices";
|
|
8
|
+
BusinessCategory[BusinessCategory["TravelAndHospitality"] = 3] = "TravelAndHospitality";
|
|
9
|
+
BusinessCategory[BusinessCategory["EducationAndTraining"] = 4] = "EducationAndTraining";
|
|
10
|
+
BusinessCategory[BusinessCategory["ShoppingAndRetail"] = 5] = "ShoppingAndRetail";
|
|
11
|
+
BusinessCategory[BusinessCategory["CosmeticsAndBeauty"] = 6] = "CosmeticsAndBeauty";
|
|
12
|
+
BusinessCategory[BusinessCategory["RestaurantAndCafe"] = 7] = "RestaurantAndCafe";
|
|
13
|
+
BusinessCategory[BusinessCategory["AutoAndMotorbike"] = 8] = "AutoAndMotorbike";
|
|
14
|
+
BusinessCategory[BusinessCategory["FashionAndApparel"] = 9] = "FashionAndApparel";
|
|
15
|
+
BusinessCategory[BusinessCategory["FoodAndBeverage"] = 10] = "FoodAndBeverage";
|
|
16
|
+
BusinessCategory[BusinessCategory["MediaAndEntertainment"] = 11] = "MediaAndEntertainment";
|
|
17
|
+
BusinessCategory[BusinessCategory["InternalCommunications"] = 12] = "InternalCommunications";
|
|
18
|
+
BusinessCategory[BusinessCategory["Transportation"] = 13] = "Transportation";
|
|
19
|
+
BusinessCategory[BusinessCategory["Telecommunications"] = 14] = "Telecommunications";
|
|
20
|
+
})(exports.BusinessCategory || (exports.BusinessCategory = {}));
|
|
21
|
+
/**
|
|
22
|
+
* eg.
|
|
23
|
+
import { BusinessCategory, BusinessCategoryName } from "../models";
|
|
24
|
+
|
|
25
|
+
const cate = BusinessCategory.FoodAndBeverage; // 10
|
|
26
|
+
const label = BusinessCategoryName[cate]; // "Thực phẩm & Đồ uống"
|
|
27
|
+
*/
|
|
28
|
+
const BusinessCategoryName = {
|
|
29
|
+
[exports.BusinessCategory.Other]: "Dịch vụ khác (Không hiển thị)",
|
|
30
|
+
[exports.BusinessCategory.RealEstate]: "Bất động sản",
|
|
31
|
+
[exports.BusinessCategory.TechnologyAndDevices]: "Công nghệ & Thiết bị",
|
|
32
|
+
[exports.BusinessCategory.TravelAndHospitality]: "Du lịch & Lưu trú",
|
|
33
|
+
[exports.BusinessCategory.EducationAndTraining]: "Giáo dục & Đào tạo",
|
|
34
|
+
[exports.BusinessCategory.ShoppingAndRetail]: "Mua sắm & Bán lẻ",
|
|
35
|
+
[exports.BusinessCategory.CosmeticsAndBeauty]: "Mỹ phẩm & Làm đẹp",
|
|
36
|
+
[exports.BusinessCategory.RestaurantAndCafe]: "Nhà hàng & Quán",
|
|
37
|
+
[exports.BusinessCategory.AutoAndMotorbike]: "Ô tô & Xe máy",
|
|
38
|
+
[exports.BusinessCategory.FashionAndApparel]: "Thời trang & May mặc",
|
|
39
|
+
[exports.BusinessCategory.FoodAndBeverage]: "Thực phẩm & Đồ uống",
|
|
40
|
+
[exports.BusinessCategory.MediaAndEntertainment]: "Truyền thông & Giải trí",
|
|
41
|
+
[exports.BusinessCategory.InternalCommunications]: "Truyền thông nội bộ",
|
|
42
|
+
[exports.BusinessCategory.Transportation]: "Vận tải",
|
|
43
|
+
[exports.BusinessCategory.Telecommunications]: "Viễn thông",
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
exports.BusinessCategoryName = BusinessCategoryName;
|