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
package/README.md
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
# 🚀 Zalo API Final - API Zalo Cá Nhân Hoàn Chỉnh
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/zalo-api-final)
|
|
4
|
+
[](https://www.npmjs.com/package/zalo-api-final)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
**Thư viện API Zalo cá nhân mạnh mẽ và hoàn chỉnh nhất cho JavaScript/TypeScript**
|
|
8
|
+
|
|
9
|
+
✨ Phiên bản cuối cùng và tốt nhất của zalo-api-final với nhiều cải tiến về bảo mật, ổn định và tính năng.
|
|
10
|
+
|
|
11
|
+
## 📖 Tài liệu chính thức
|
|
12
|
+
|
|
13
|
+
🔗 **[Xem hướng dẫn đầy đủ tại Documentation](https://hiennguyen270995.github.io/zalo-api-final/)**
|
|
14
|
+
|
|
15
|
+
Tài liệu bao gồm:
|
|
16
|
+
- 📋 Hướng dẫn cài đặt và sử dụng từng bước
|
|
17
|
+
- 🔧 API Methods và Examples chi tiết
|
|
18
|
+
- 📚 Models & Types reference
|
|
19
|
+
- 🎧 Event Listeners và Webhook
|
|
20
|
+
- 🔐 Các phương thức đăng nhập
|
|
21
|
+
- 🎯 Ví dụ thực tế và best practices
|
|
22
|
+
|
|
23
|
+
## 🎯 Dành cho ai?
|
|
24
|
+
|
|
25
|
+
- 🏢 **Doanh nghiệp** muốn quản lý nhiều tài khoản Zalo để tăng doanh số
|
|
26
|
+
- 💻 **Developer** xây dựng bot, backend, hoặc ứng dụng tích hợp Zalo
|
|
27
|
+
- 🔧 **N8N Users** tạo node tự động hóa workflow Zalo
|
|
28
|
+
- 📱 **Marketer** cần tự động hóa marketing qua Zalo
|
|
29
|
+
- 🛒 **Bán hàng online** quản lý khách hàng qua Zalo
|
|
30
|
+
|
|
31
|
+
## ⭐ Tính năng chính
|
|
32
|
+
|
|
33
|
+
### 💬 Quản lý tin nhắn
|
|
34
|
+
- ✅ Gửi tin nhắn văn bản, hình ảnh, video
|
|
35
|
+
- ✅ Gửi sticker, emoji, link preview
|
|
36
|
+
- ✅ Forward tin nhắn
|
|
37
|
+
- ✅ Xóa tin nhắn đã gửi
|
|
38
|
+
- ✅ Nhận webhook tin nhắn real-time
|
|
39
|
+
|
|
40
|
+
### 👥 Quản lý bạn bè
|
|
41
|
+
- ✅ Lấy danh sách bạn bè
|
|
42
|
+
- ✅ Tìm kiếm người dùng qua số điện thoại
|
|
43
|
+
- ✅ Gửi lời mời kết bạn
|
|
44
|
+
- ✅ Chấp nhận/từ chối lời mời kết bạn
|
|
45
|
+
- ✅ Hủy lời mời đã gửi
|
|
46
|
+
- ✅ Chặn/bỏ chặn người dùng
|
|
47
|
+
- ✅ Đặt/xóa biệt danh bạn bè
|
|
48
|
+
|
|
49
|
+
### 🏘️ Quản lý nhóm
|
|
50
|
+
- ✅ Tạo nhóm mới
|
|
51
|
+
- ✅ Thêm/xóa thành viên
|
|
52
|
+
- ✅ Thay đổi tên nhóm, avatar
|
|
53
|
+
- ✅ Đặt/xóa phó nhóm
|
|
54
|
+
- ✅ Chuyển quyền quản trị
|
|
55
|
+
- ✅ Chặn/bỏ chặn thành viên
|
|
56
|
+
- ✅ Tạo link mời nhóm
|
|
57
|
+
- ✅ Giải tán nhóm
|
|
58
|
+
|
|
59
|
+
### 🔔 Webhook & Events
|
|
60
|
+
- ✅ Lắng nghe tin nhắn mới
|
|
61
|
+
- ✅ Theo dõi thay đổi nhóm
|
|
62
|
+
- ✅ Nhận thông báo bạn bè
|
|
63
|
+
- ✅ Event typing, seen, delivered
|
|
64
|
+
|
|
65
|
+
### 🛠️ Tính năng nâng cao
|
|
66
|
+
- ✅ Tạo poll/bình chọn
|
|
67
|
+
- ✅ Quản lý ghi chú nhóm
|
|
68
|
+
- ✅ Tạo reminder/nhắc nhở
|
|
69
|
+
- ✅ Upload file đính kèm
|
|
70
|
+
- ✅ Quản lý thông tin cá nhân
|
|
71
|
+
|
|
72
|
+
## 🚀 Ứng dụng thực tế
|
|
73
|
+
|
|
74
|
+
### 🏢 Multi-Account Management cho Doanh nghiệp
|
|
75
|
+
```javascript
|
|
76
|
+
import { Zalo } from 'zalo-api-final';
|
|
77
|
+
|
|
78
|
+
// Quản lý nhiều tài khoản Zalo
|
|
79
|
+
const accounts = [
|
|
80
|
+
new Zalo({ sessionId: 'account1' }),
|
|
81
|
+
new Zalo({ sessionId: 'account2' }),
|
|
82
|
+
new Zalo({ sessionId: 'account3' })
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
// Gửi tin nhắn marketing hàng loạt
|
|
86
|
+
for (const zalo of accounts) {
|
|
87
|
+
await zalo.sendMessage({
|
|
88
|
+
userId: 'customer_id',
|
|
89
|
+
message: 'Khuyến mãi đặc biệt hôm nay!'
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 🔧 Xây dựng Node N8N
|
|
95
|
+
```javascript
|
|
96
|
+
// Tạo node N8N tùy chỉnh
|
|
97
|
+
export class ZaloNode implements INodeType {
|
|
98
|
+
description: INodeTypeDescription = {
|
|
99
|
+
displayName: 'Zalo',
|
|
100
|
+
name: 'zalo',
|
|
101
|
+
// ... cấu hình node
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
async execute(this: IExecuteFunctions) {
|
|
105
|
+
const zalo = new Zalo();
|
|
106
|
+
// Logic xử lý
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 📱 Backend API Server
|
|
112
|
+
```javascript
|
|
113
|
+
import express from 'express';
|
|
114
|
+
import { Zalo } from 'zalo-api-final';
|
|
115
|
+
|
|
116
|
+
const app = express();
|
|
117
|
+
const zalo = new Zalo();
|
|
118
|
+
|
|
119
|
+
// API endpoint gửi tin nhắn
|
|
120
|
+
app.post('/send-message', async (req, res) => {
|
|
121
|
+
const { userId, message } = req.body;
|
|
122
|
+
|
|
123
|
+
try {
|
|
124
|
+
await zalo.sendMessage({ userId, message });
|
|
125
|
+
res.json({ success: true });
|
|
126
|
+
} catch (error) {
|
|
127
|
+
res.status(500).json({ error: error.message });
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
app.listen(3000);
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### 🛒 Phần mềm bán hàng
|
|
135
|
+
```javascript
|
|
136
|
+
class ZaloSalesBot {
|
|
137
|
+
constructor() {
|
|
138
|
+
this.zalo = new Zalo();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Tự động trả lời khách hàng
|
|
142
|
+
async handleCustomerMessage(message) {
|
|
143
|
+
if (message.includes('giá')) {
|
|
144
|
+
await this.sendPriceList(message.userId);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (message.includes('đặt hàng')) {
|
|
148
|
+
await this.processOrder(message.userId);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Gửi bảng giá
|
|
153
|
+
async sendPriceList(userId) {
|
|
154
|
+
await this.zalo.sendMessage({
|
|
155
|
+
userId,
|
|
156
|
+
message: '📋 Bảng giá sản phẩm:\n...'
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## ☕ Ủng hộ dự án
|
|
163
|
+
|
|
164
|
+
Nếu thư viện này giúp bạn tiết kiệm thời gian hoặc giải quyết được vấn đề, hãy cân nhắc ủng hộ tác giả một ☕ để duy trì và phát triển thêm tính năng mới!
|
|
165
|
+
|
|
166
|
+
**📱 Quét QR Code để mời cafe:**
|
|
167
|
+
|
|
168
|
+
<div align="center">
|
|
169
|
+
<img src="qr.png" alt="QR Code VietinBank" width="200">
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
*VietinBank - 100884532014 - NGUYEN THI HIEN*
|
|
173
|
+
|
|
174
|
+
## � Tài liệu chi tiết
|
|
175
|
+
|
|
176
|
+
Xem tài liệu API đầy đủ tại: **[https://hiennguyen270995.github.io/zalo-api-final/](https://hiennguyen270995.github.io/zalo-api-final/)**
|
|
177
|
+
|
|
178
|
+
- 📖 [API Methods](https://hiennguyen270995.github.io/zalo-api-final/#/api/)
|
|
179
|
+
- 🏗️ [Models & Types](https://hiennguyen270995.github.io/zalo-api-final/#/models/)
|
|
180
|
+
- 🎧 [Event Listeners](https://hiennguyen270995.github.io/zalo-api-final/#/listeners/)
|
|
181
|
+
- 🔐 [Login Methods](https://hiennguyen270995.github.io/zalo-api-final/#/login/)
|
|
182
|
+
|
|
183
|
+
## �📦 Cài đặt
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# NPM
|
|
187
|
+
npm install zalo-api-final
|
|
188
|
+
|
|
189
|
+
# Yarn
|
|
190
|
+
yarn add zalo-api-final
|
|
191
|
+
|
|
192
|
+
# PNPM
|
|
193
|
+
pnpm add zalo-api-final
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## 🔧 Sử dụng cơ bản
|
|
197
|
+
|
|
198
|
+
### Đăng nhập QR Code
|
|
199
|
+
```javascript
|
|
200
|
+
import { Zalo } from 'zalo-api-final';
|
|
201
|
+
|
|
202
|
+
const zalo = new Zalo();
|
|
203
|
+
|
|
204
|
+
// Đăng nhập bằng QR
|
|
205
|
+
await zalo.loginQR((qr) => {
|
|
206
|
+
console.log('Quét mã QR này để đăng nhập:');
|
|
207
|
+
console.log(qr);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
console.log('Đăng nhập thành công!');
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Gửi tin nhắn
|
|
214
|
+
```javascript
|
|
215
|
+
// Gửi tin nhắn văn bản
|
|
216
|
+
await zalo.sendMessage({
|
|
217
|
+
userId: 'recipient_id',
|
|
218
|
+
message: 'Xin chào! 👋'
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// Gửi hình ảnh
|
|
222
|
+
await zalo.sendMessage({
|
|
223
|
+
userId: 'recipient_id',
|
|
224
|
+
attachment: {
|
|
225
|
+
type: 'image',
|
|
226
|
+
url: 'https://example.com/image.jpg'
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Quản lý bạn bè
|
|
232
|
+
```javascript
|
|
233
|
+
// Lấy danh sách bạn bè
|
|
234
|
+
const friends = await zalo.getAllFriends();
|
|
235
|
+
|
|
236
|
+
// Gửi lời mời kết bạn
|
|
237
|
+
await zalo.sendFriendRequest({
|
|
238
|
+
phone: '0123456789',
|
|
239
|
+
message: 'Xin chào, kết bạn nhé!'
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// Chấp nhận lời mời kết bạn
|
|
243
|
+
await zalo.acceptFriendRequest('request_id');
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Quản lý nhóm
|
|
247
|
+
```javascript
|
|
248
|
+
// Tạo nhóm mới
|
|
249
|
+
const group = await zalo.createGroup({
|
|
250
|
+
name: 'Nhóm Marketing',
|
|
251
|
+
members: ['user1', 'user2', 'user3']
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// Thêm thành viên vào nhóm
|
|
255
|
+
await zalo.addUserToGroup({
|
|
256
|
+
groupId: group.id,
|
|
257
|
+
userId: 'new_member_id'
|
|
258
|
+
});
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Lắng nghe webhook
|
|
262
|
+
```javascript
|
|
263
|
+
// Lắng nghe tin nhắn mới
|
|
264
|
+
zalo.listen((message) => {
|
|
265
|
+
console.log('Tin nhắn mới:', message);
|
|
266
|
+
|
|
267
|
+
// Tự động trả lời
|
|
268
|
+
if (message.type === 'text') {
|
|
269
|
+
zalo.sendMessage({
|
|
270
|
+
userId: message.userId,
|
|
271
|
+
message: `Bạn vừa nói: ${message.text}`
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## 🏗️ Ví dụ nâng cao
|
|
278
|
+
|
|
279
|
+
### Hệ thống customer service tự động
|
|
280
|
+
```javascript
|
|
281
|
+
class ZaloCustomerService {
|
|
282
|
+
constructor() {
|
|
283
|
+
this.zalo = new Zalo();
|
|
284
|
+
this.supportKeywords = {
|
|
285
|
+
'hỗ trợ': this.handleSupport,
|
|
286
|
+
'khiếu nại': this.handleComplaint,
|
|
287
|
+
'đơn hàng': this.handleOrder
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async start() {
|
|
292
|
+
await this.zalo.loginQR();
|
|
293
|
+
|
|
294
|
+
this.zalo.listen(async (message) => {
|
|
295
|
+
for (const [keyword, handler] of Object.entries(this.supportKeywords)) {
|
|
296
|
+
if (message.text.toLowerCase().includes(keyword)) {
|
|
297
|
+
await handler.call(this, message);
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
async handleSupport(message) {
|
|
305
|
+
await this.zalo.sendMessage({
|
|
306
|
+
userId: message.userId,
|
|
307
|
+
message: '🆘 Chúng tôi sẽ hỗ trợ bạn ngay! Vui lòng mô tả vấn đề cụ thể.'
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
### Multi-account marketing automation
|
|
314
|
+
```javascript
|
|
315
|
+
class ZaloMarketing {
|
|
316
|
+
constructor(accounts) {
|
|
317
|
+
this.accounts = accounts.map(acc => new Zalo(acc));
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
async broadcastMessage(message, customerList) {
|
|
321
|
+
const chunks = this.chunkArray(customerList, this.accounts.length);
|
|
322
|
+
|
|
323
|
+
const promises = chunks.map(async (chunk, index) => {
|
|
324
|
+
const zalo = this.accounts[index];
|
|
325
|
+
|
|
326
|
+
for (const customerId of chunk) {
|
|
327
|
+
await zalo.sendMessage({
|
|
328
|
+
userId: customerId,
|
|
329
|
+
message: this.personalizeMessage(message, customerId)
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// Delay để tránh spam
|
|
333
|
+
await this.delay(1000);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
await Promise.all(promises);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
personalizeMessage(template, customerId) {
|
|
341
|
+
// Cá nhân hóa tin nhắn
|
|
342
|
+
return template.replace('{name}', this.getCustomerName(customerId));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
## 🔒 Bảo mật & Lưu ý
|
|
348
|
+
|
|
349
|
+
### ⚠️ Lưu ý quan trọng
|
|
350
|
+
- Thư viện này dành cho mục đích học tập và phát triển
|
|
351
|
+
- Việc sử dụng có thể vi phạm điều khoản dịch vụ của Zalo
|
|
352
|
+
- Tác giả không chịu trách nhiệm nếu tài khoản bị khóa
|
|
353
|
+
- Hãy sử dụng có trách nhiệm và tuân thủ pháp luật
|
|
354
|
+
|
|
355
|
+
### 🛡️ Best practices
|
|
356
|
+
```javascript
|
|
357
|
+
// Sử dụng rate limiting
|
|
358
|
+
const rateLimiter = new RateLimit({
|
|
359
|
+
windowMs: 60000, // 1 phút
|
|
360
|
+
max: 30 // Tối đa 30 tin nhắn/phút
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
// Xử lý lỗi properly
|
|
364
|
+
try {
|
|
365
|
+
await zalo.sendMessage(params);
|
|
366
|
+
} catch (error) {
|
|
367
|
+
if (error.code === 'RATE_LIMITED') {
|
|
368
|
+
await delay(60000); // Chờ 1 phút
|
|
369
|
+
return retry();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
console.error('Lỗi:', error.message);
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## 🤝 Đóng góp
|
|
377
|
+
|
|
378
|
+
Chúng tôi hoan nghênh mọi đóng góp! Hãy:
|
|
379
|
+
|
|
380
|
+
1. Fork repository này
|
|
381
|
+
2. Tạo nhánh tính năng (`git checkout -b tinh-nang/TinhNangTuyetVoi`)
|
|
382
|
+
3. Commit thay đổi (`git commit -m 'Thêm tính năng tuyệt vời'`)
|
|
383
|
+
4. Push lên nhánh (`git push origin tinh-nang/TinhNangTuyetVoi`)
|
|
384
|
+
5. Mở Pull Request
|
|
385
|
+
|
|
386
|
+
## 📞 Hỗ trợ
|
|
387
|
+
|
|
388
|
+
- 📧 Email: hiennguyen270995@gmail.com
|
|
389
|
+
- 🐛 Issues: [GitHub Issues](https://github.com/hiennguyen270995/zalo-api-final/issues)
|
|
390
|
+
- 💬 Discussions: [GitHub Discussions](https://github.com/hiennguyen270995/zalo-api-final/discussions)
|
|
391
|
+
|
|
392
|
+
## 📝 Changelog
|
|
393
|
+
|
|
394
|
+
### v2.1.0
|
|
395
|
+
- ✨ Thêm hỗ trợ multi-account management
|
|
396
|
+
- 🚀 Cải thiện performance và stability
|
|
397
|
+
- 🔧 Tối ưu hóa cho N8N integration
|
|
398
|
+
- 📖 Hoàn thiện documentation tiếng Việt
|
|
399
|
+
- 🛡️ Tăng cường bảo mật
|
|
400
|
+
|
|
401
|
+
### v2.0.0
|
|
402
|
+
- 🎉 Release chính thức
|
|
403
|
+
- 📦 Hỗ trợ cả ESM và CommonJS
|
|
404
|
+
- 🔄 Rebuild từ zalo-api-final với nhiều cải tiến
|
|
405
|
+
- 🎯 Tối ưu cho business applications
|
|
406
|
+
|
|
407
|
+
## 📄 License
|
|
408
|
+
|
|
409
|
+
MIT License - xem [LICENSE](LICENSE) để biết thêm chi tiết.
|
|
410
|
+
|
|
411
|
+
## Credits
|
|
412
|
+
|
|
413
|
+
Dựa trên thư viện [zalo-api-final](https://github.com/hiennguyen270995/zalo-api-final) với nhiều cải tiến và tối ưu hóa.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
**⭐ Nếu thư viện hữu ích, hãy cho chúng tôi một star trên GitHub!**
|
|
418
|
+
|
|
419
|
+
**💡 Có ý tưởng tính năng mới? Hãy tạo issue để thảo luận!**
|
|
420
|
+
|
|
421
|
+
**💡 Có ý tưởng tính năng mới? Hãy tạo issue để thảo luận!**
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
We actively maintain and provide security updates for the following versions:
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| ------- | ------------------ |
|
|
9
|
+
| 2.0.x | :white_check_mark: |
|
|
10
|
+
| 1.x.x | :x: |
|
|
11
|
+
| < 1.0 | :x: |
|
|
12
|
+
|
|
13
|
+
## Reporting a Vulnerability
|
|
14
|
+
|
|
15
|
+
We take security vulnerabilities seriously. If you discover a security vulnerability in zalo-api-final, please follow these steps:
|
|
16
|
+
|
|
17
|
+
### 1. **DO NOT** create a public GitHub issue
|
|
18
|
+
Security vulnerabilities should be reported privately to prevent potential exploitation.
|
|
19
|
+
|
|
20
|
+
### 2. Report the vulnerability
|
|
21
|
+
Send an email to the maintainers with the following information:
|
|
22
|
+
- **Subject**: `[SECURITY] zalo-api-final vulnerability report`
|
|
23
|
+
- **Description**: Detailed description of the vulnerability
|
|
24
|
+
- **Steps to reproduce**: Clear steps to reproduce the issue
|
|
25
|
+
- **Impact assessment**: Potential impact of the vulnerability
|
|
26
|
+
- **Suggested fix** (if available): Any suggestions for fixing the issue
|
|
27
|
+
|
|
28
|
+
### 3. Response timeline
|
|
29
|
+
- **Initial response**: Within 48 hours
|
|
30
|
+
- **Status update**: Within 1 week
|
|
31
|
+
- **Resolution**: As soon as possible, typically within 30 days
|
|
32
|
+
|
|
33
|
+
## Security Considerations
|
|
34
|
+
|
|
35
|
+
### Important Warnings
|
|
36
|
+
|
|
37
|
+
⚠️ **This is an unofficial API library** that simulates browser interactions with Zalo Web. Please be aware of the following security considerations:
|
|
38
|
+
|
|
39
|
+
1. **Account Risk**: Using this API may result in your Zalo account being locked or banned. Use at your own risk.
|
|
40
|
+
|
|
41
|
+
2. **Authentication**: The library handles sensitive authentication data. Ensure proper security measures when storing or transmitting this information.
|
|
42
|
+
|
|
43
|
+
3. **Rate Limiting**: Respect Zalo's rate limits to avoid triggering security measures.
|
|
44
|
+
|
|
45
|
+
4. **Data Privacy**: Be mindful of user privacy and comply with relevant data protection regulations.
|
|
46
|
+
|
|
47
|
+
### Best Practices
|
|
48
|
+
|
|
49
|
+
1. **Environment Variables**: Store sensitive configuration in environment variables, not in code
|
|
50
|
+
2. **HTTPS Only**: Always use HTTPS when transmitting data
|
|
51
|
+
3. **Input Validation**: Validate all inputs before processing
|
|
52
|
+
4. **Error Handling**: Implement proper error handling to avoid information disclosure
|
|
53
|
+
5. **Regular Updates**: Keep the library updated to the latest version
|
|
54
|
+
|
|
55
|
+
### Known Limitations
|
|
56
|
+
|
|
57
|
+
- This library is not officially supported by Zalo
|
|
58
|
+
- API endpoints and behavior may change without notice
|
|
59
|
+
- No guarantee of service availability or stability
|
|
60
|
+
- May break with Zalo Web updates
|
|
61
|
+
|
|
62
|
+
## Security Updates
|
|
63
|
+
|
|
64
|
+
Security updates will be released as patch versions (e.g., 2.0.1, 2.0.2) and will be clearly marked in the changelog.
|
|
65
|
+
|
|
66
|
+
## Contact Information
|
|
67
|
+
|
|
68
|
+
For security-related issues, please contact:
|
|
69
|
+
- **GitHub Issues**: Create a private issue with the `[SECURITY]` label
|
|
70
|
+
- **GitHub Discussions**: Use the "Security" category for general security questions
|
|
71
|
+
- **Team Members**:
|
|
72
|
+
- [@hiennguyen270995](https://github.com/hiennguyen270995)
|
|
73
|
+
|
|
74
|
+
- **Alternative**: Contact any team member through GitHub for urgent security matters
|
|
75
|
+
|
|
76
|
+
## Acknowledgments
|
|
77
|
+
|
|
78
|
+
We appreciate security researchers and community members who responsibly disclose vulnerabilities. Contributors will be acknowledged in our security advisories unless they prefer to remain anonymous.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
**Note**: This security policy is subject to change. Please check back regularly for updates.
|
package/commit-push.sh
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "🚀 Git Commit & Push cho zalo-api-final"
|
|
4
|
+
echo "======================================="
|
|
5
|
+
echo
|
|
6
|
+
|
|
7
|
+
# Hiển thị thông tin Git hiện tại
|
|
8
|
+
echo "✅ Thông tin commit:"
|
|
9
|
+
echo " Name: $(git config user.name)"
|
|
10
|
+
echo " Email: $(git config user.email)"
|
|
11
|
+
echo
|
|
12
|
+
|
|
13
|
+
# Nhập GitHub username với default
|
|
14
|
+
echo "📱 GitHub username (Enter để dùng 'hiennguyen270995'):"
|
|
15
|
+
read -p "Username: " github_username
|
|
16
|
+
|
|
17
|
+
# Sử dụng default nếu không nhập gì
|
|
18
|
+
if [ -z "$github_username" ]; then
|
|
19
|
+
github_username="hiennguyen270995"
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
echo "✅ Sử dụng username: $github_username"
|
|
23
|
+
echo
|
|
24
|
+
|
|
25
|
+
# Kiểm tra và thêm remote
|
|
26
|
+
if git remote get-url origin >/dev/null 2>&1; then
|
|
27
|
+
echo "🔗 Remote origin đã tồn tại:"
|
|
28
|
+
git remote -v
|
|
29
|
+
else
|
|
30
|
+
echo "🔗 Thêm remote repository..."
|
|
31
|
+
git remote add origin github-zalo-api:$github_username/zalo-api-final.git
|
|
32
|
+
echo "✅ Remote đã được thêm:"
|
|
33
|
+
git remote -v
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
echo
|
|
37
|
+
echo "📤 Bắt đầu commit và push..."
|
|
38
|
+
|
|
39
|
+
# Add files
|
|
40
|
+
echo "📦 Adding files..."
|
|
41
|
+
git add .
|
|
42
|
+
|
|
43
|
+
# Check if there are changes to commit
|
|
44
|
+
if git diff --staged --quiet; then
|
|
45
|
+
echo "⚠️ Không có thay đổi để commit"
|
|
46
|
+
exit 0
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# Commit
|
|
50
|
+
echo "💾 Committing..."
|
|
51
|
+
git commit -m "🎉 Initial commit - zalo-api-final v2.1.0
|
|
52
|
+
|
|
53
|
+
✨ Features:
|
|
54
|
+
- Complete Zalo API for JavaScript/TypeScript
|
|
55
|
+
- Multi-account management support
|
|
56
|
+
- N8N node integration
|
|
57
|
+
- Vietnamese localization
|
|
58
|
+
- QR code login & VietinBank donation
|
|
59
|
+
- Message, Group, Friend management
|
|
60
|
+
- Webhook support
|
|
61
|
+
|
|
62
|
+
📦 Package:
|
|
63
|
+
- ESM + CJS builds (575 files)
|
|
64
|
+
- TypeScript declarations
|
|
65
|
+
- Ready for npm publish
|
|
66
|
+
|
|
67
|
+
🔧 Build & Tools:
|
|
68
|
+
- TypeScript + Rollup
|
|
69
|
+
- ESLint + Prettier + Husky
|
|
70
|
+
- Complete Vietnamese documentation"
|
|
71
|
+
|
|
72
|
+
# Push
|
|
73
|
+
echo "🚀 Pushing to GitHub..."
|
|
74
|
+
git push -u origin main
|
|
75
|
+
|
|
76
|
+
echo
|
|
77
|
+
echo "🎉 Hoàn thành!"
|
|
78
|
+
echo "🔗 Repository: https://github.com/$github_username/zalo-api-final"
|
|
79
|
+
echo "📦 Sẵn sàng publish lên npm!"
|