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.
Files changed (459) hide show
  1. package/.prettierrc +5 -0
  2. package/.tmp-cache/_update-notifier-last-checked +0 -0
  3. package/CODE_OF_CONDUCT.md +157 -0
  4. package/CONTRIBUTING.md +491 -0
  5. package/LICENSE +21 -0
  6. package/README.md +421 -0
  7. package/SECURITY.md +82 -0
  8. package/commit-push.sh +79 -0
  9. package/deploy.sh +172 -0
  10. package/dist/Errors/ZaloApiError.d.ts +4 -0
  11. package/dist/Errors/ZaloApiError.js +7 -0
  12. package/dist/Errors/index.d.ts +1 -0
  13. package/dist/Errors/index.js +1 -0
  14. package/dist/apis/acceptFriendRequest.d.ts +2 -0
  15. package/dist/apis/acceptFriendRequest.js +28 -0
  16. package/dist/apis/addGroupBlockedMember.d.ts +2 -0
  17. package/dist/apis/addGroupBlockedMember.js +28 -0
  18. package/dist/apis/addGroupDeputy.d.ts +2 -0
  19. package/dist/apis/addGroupDeputy.js +30 -0
  20. package/dist/apis/addQuickMessage.d.ts +11 -0
  21. package/dist/apis/addQuickMessage.js +60 -0
  22. package/dist/apis/addReaction.d.ts +18 -0
  23. package/dist/apis/addReaction.js +294 -0
  24. package/dist/apis/addUnreadMark.d.ts +8 -0
  25. package/dist/apis/addUnreadMark.js +52 -0
  26. package/dist/apis/addUserToGroup.d.ts +5 -0
  27. package/dist/apis/addUserToGroup.js +34 -0
  28. package/dist/apis/blockUser.d.ts +2 -0
  29. package/dist/apis/blockUser.js +28 -0
  30. package/dist/apis/blockViewFeed.d.ts +2 -0
  31. package/dist/apis/blockViewFeed.js +30 -0
  32. package/dist/apis/changeAccountAvatar.d.ts +3 -0
  33. package/dist/apis/changeAccountAvatar.js +52 -0
  34. package/dist/apis/changeFriendAlias.d.ts +2 -0
  35. package/dist/apis/changeFriendAlias.js +27 -0
  36. package/dist/apis/changeGroupAvatar.d.ts +3 -0
  37. package/dist/apis/changeGroupAvatar.js +44 -0
  38. package/dist/apis/changeGroupName.d.ts +4 -0
  39. package/dist/apis/changeGroupName.js +32 -0
  40. package/dist/apis/changeGroupOwner.d.ts +4 -0
  41. package/dist/apis/changeGroupOwner.js +30 -0
  42. package/dist/apis/createAutoReply.d.ts +14 -0
  43. package/dist/apis/createAutoReply.js +37 -0
  44. package/dist/apis/createCatalog.d.ts +7 -0
  45. package/dist/apis/createCatalog.js +29 -0
  46. package/dist/apis/createGroup.d.ts +28 -0
  47. package/dist/apis/createGroup.js +43 -0
  48. package/dist/apis/createNoteGroup.d.ts +7 -0
  49. package/dist/apis/createNoteGroup.js +47 -0
  50. package/dist/apis/createPoll.d.ts +57 -0
  51. package/dist/apis/createPoll.js +40 -0
  52. package/dist/apis/createProductCatalog.d.ts +23 -0
  53. package/dist/apis/createProductCatalog.js +50 -0
  54. package/dist/apis/createReminder.d.ts +10 -0
  55. package/dist/apis/createReminder.js +63 -0
  56. package/dist/apis/custom.d.ts +9 -0
  57. package/dist/apis/custom.js +15 -0
  58. package/dist/apis/deleteAutoReply.d.ts +5 -0
  59. package/dist/apis/deleteAutoReply.js +29 -0
  60. package/dist/apis/deleteAvatar.d.ts +9 -0
  61. package/dist/apis/deleteAvatar.js +27 -0
  62. package/dist/apis/deleteCatalog.d.ts +2 -0
  63. package/dist/apis/deleteCatalog.js +28 -0
  64. package/dist/apis/deleteChat.d.ts +19 -0
  65. package/dist/apis/deleteChat.js +50 -0
  66. package/dist/apis/deleteMessage.d.ts +14 -0
  67. package/dist/apis/deleteMessage.js +52 -0
  68. package/dist/apis/deleteProductCatalog.d.ts +10 -0
  69. package/dist/apis/deleteProductCatalog.js +31 -0
  70. package/dist/apis/disableGroupLink.d.ts +2 -0
  71. package/dist/apis/disableGroupLink.js +24 -0
  72. package/dist/apis/disperseGroup.d.ts +2 -0
  73. package/dist/apis/disperseGroup.js +28 -0
  74. package/dist/apis/editNoteGroup.d.ts +32 -0
  75. package/dist/apis/editNoteGroup.js +40 -0
  76. package/dist/apis/editReminder.d.ts +18 -0
  77. package/dist/apis/editReminder.js +61 -0
  78. package/dist/apis/enableGroupLink.d.ts +6 -0
  79. package/dist/apis/enableGroupLink.js +25 -0
  80. package/dist/apis/fetchAccountInfo.d.ts +34 -0
  81. package/dist/apis/fetchAccountInfo.js +10 -0
  82. package/dist/apis/findUser.d.ts +15 -0
  83. package/dist/apis/findUser.js +40 -0
  84. package/dist/apis/forwardMessage.d.ts +26 -0
  85. package/dist/apis/forwardMessage.js +99 -0
  86. package/dist/apis/getAliasList.d.ts +8 -0
  87. package/dist/apis/getAliasList.js +27 -0
  88. package/dist/apis/getAllFriends.d.ts +34 -0
  89. package/dist/apis/getAllFriends.js +32 -0
  90. package/dist/apis/getAllGroups.d.ts +7 -0
  91. package/dist/apis/getAllGroups.js +10 -0
  92. package/dist/apis/getArchivedChatList.d.ts +5 -0
  93. package/dist/apis/getArchivedChatList.js +23 -0
  94. package/dist/apis/getAutoDeleteChat.d.ts +9 -0
  95. package/dist/apis/getAutoDeleteChat.js +21 -0
  96. package/dist/apis/getAutoReplyList.d.ts +6 -0
  97. package/dist/apis/getAutoReplyList.js +24 -0
  98. package/dist/apis/getAvatarList.d.ts +12 -0
  99. package/dist/apis/getAvatarList.js +28 -0
  100. package/dist/apis/getBizAccount.d.ts +19 -0
  101. package/dist/apis/getBizAccount.js +27 -0
  102. package/dist/apis/getCatalogList.d.ts +12 -0
  103. package/dist/apis/getCatalogList.js +32 -0
  104. package/dist/apis/getContext.d.ts +1 -0
  105. package/dist/apis/getContext.js +4 -0
  106. package/dist/apis/getCookie.d.ts +1 -0
  107. package/dist/apis/getCookie.js +9 -0
  108. package/dist/apis/getFriendBoardList.d.ts +5 -0
  109. package/dist/apis/getFriendBoardList.js +26 -0
  110. package/dist/apis/getFriendRequestStatus.d.ts +8 -0
  111. package/dist/apis/getFriendRequestStatus.js +25 -0
  112. package/dist/apis/getGroupBlockedMember.d.ts +17 -0
  113. package/dist/apis/getGroupBlockedMember.js +29 -0
  114. package/dist/apis/getGroupInfo.d.ts +43 -0
  115. package/dist/apis/getGroupInfo.js +32 -0
  116. package/dist/apis/getGroupLinkDetail.d.ts +6 -0
  117. package/dist/apis/getGroupLinkDetail.js +25 -0
  118. package/dist/apis/getGroupLinkInfo.d.ts +31 -0
  119. package/dist/apis/getGroupLinkInfo.js +28 -0
  120. package/dist/apis/getGroupMembersInfo.d.ts +17 -0
  121. package/dist/apis/getGroupMembersInfo.js +24 -0
  122. package/dist/apis/getHiddenConversations.d.ts +11 -0
  123. package/dist/apis/getHiddenConversations.js +23 -0
  124. package/dist/apis/getLabels.d.ts +15 -0
  125. package/dist/apis/getLabels.js +28 -0
  126. package/dist/apis/getListBoard.d.ts +15 -0
  127. package/dist/apis/getListBoard.js +45 -0
  128. package/dist/apis/getListReminder.d.ts +22 -0
  129. package/dist/apis/getListReminder.js +47 -0
  130. package/dist/apis/getMute.d.ts +13 -0
  131. package/dist/apis/getMute.js +22 -0
  132. package/dist/apis/getOwnId.d.ts +1 -0
  133. package/dist/apis/getOwnId.js +4 -0
  134. package/dist/apis/getPendingGroupMembers.d.ts +10 -0
  135. package/dist/apis/getPendingGroupMembers.js +27 -0
  136. package/dist/apis/getPinConversations.d.ts +5 -0
  137. package/dist/apis/getPinConversations.js +22 -0
  138. package/dist/apis/getPollDetail.d.ts +3 -0
  139. package/dist/apis/getPollDetail.js +30 -0
  140. package/dist/apis/getProductCatalogList.d.ts +14 -0
  141. package/dist/apis/getProductCatalogList.js +33 -0
  142. package/dist/apis/getQR.d.ts +4 -0
  143. package/dist/apis/getQR.js +29 -0
  144. package/dist/apis/getQuickMessage.d.ts +7 -0
  145. package/dist/apis/getQuickMessage.js +24 -0
  146. package/dist/apis/getReceivedFriendRequests.d.ts +35 -0
  147. package/dist/apis/getReceivedFriendRequests.js +22 -0
  148. package/dist/apis/getReminder.d.ts +13 -0
  149. package/dist/apis/getReminder.js +25 -0
  150. package/dist/apis/getReminderResponses.d.ts +5 -0
  151. package/dist/apis/getReminderResponses.js +24 -0
  152. package/dist/apis/getSentFriendRequest.d.ts +17 -0
  153. package/dist/apis/getSentFriendRequest.js +24 -0
  154. package/dist/apis/getStickers.d.ts +1 -0
  155. package/dist/apis/getStickers.js +40 -0
  156. package/dist/apis/getStickersDetail.d.ts +24 -0
  157. package/dist/apis/getStickersDetail.js +40 -0
  158. package/dist/apis/getUnreadMark.d.ts +14 -0
  159. package/dist/apis/getUnreadMark.js +30 -0
  160. package/dist/apis/getUserInfo.d.ts +39 -0
  161. package/dist/apis/getUserInfo.js +42 -0
  162. package/dist/apis/inviteUserToGroups.d.ts +10 -0
  163. package/dist/apis/inviteUserToGroups.js +30 -0
  164. package/dist/apis/joinGroupLink.d.ts +2 -0
  165. package/dist/apis/joinGroupLink.js +27 -0
  166. package/dist/apis/keepAlive.d.ts +4 -0
  167. package/dist/apis/keepAlive.js +22 -0
  168. package/dist/apis/lastOnline.d.ts +7 -0
  169. package/dist/apis/lastOnline.js +26 -0
  170. package/dist/apis/leaveGroup.d.ts +4 -0
  171. package/dist/apis/leaveGroup.js +33 -0
  172. package/dist/apis/listen.d.ts +100 -0
  173. package/dist/apis/listen.js +424 -0
  174. package/dist/apis/lockPoll.d.ts +2 -0
  175. package/dist/apis/lockPoll.js +28 -0
  176. package/dist/apis/login.d.ts +3 -0
  177. package/dist/apis/login.js +96 -0
  178. package/dist/apis/loginQR.d.ts +70 -0
  179. package/dist/apis/loginQR.js +359 -0
  180. package/dist/apis/parseLink.d.ts +21 -0
  181. package/dist/apis/parseLink.js +27 -0
  182. package/dist/apis/removeFriend.d.ts +2 -0
  183. package/dist/apis/removeFriend.js +28 -0
  184. package/dist/apis/removeFriendAlias.d.ts +2 -0
  185. package/dist/apis/removeFriendAlias.js +24 -0
  186. package/dist/apis/removeGroupBlockedMember.d.ts +2 -0
  187. package/dist/apis/removeGroupBlockedMember.js +28 -0
  188. package/dist/apis/removeGroupDeputy.d.ts +2 -0
  189. package/dist/apis/removeGroupDeputy.js +30 -0
  190. package/dist/apis/removeQuickMessage.d.ts +5 -0
  191. package/dist/apis/removeQuickMessage.js +27 -0
  192. package/dist/apis/removeReminder.d.ts +3 -0
  193. package/dist/apis/removeReminder.js +40 -0
  194. package/dist/apis/removeUnreadMark.d.ts +8 -0
  195. package/dist/apis/removeUnreadMark.js +50 -0
  196. package/dist/apis/removeUserFromGroup.d.ts +4 -0
  197. package/dist/apis/removeUserFromGroup.js +34 -0
  198. package/dist/apis/resetHiddenConversPin.d.ts +2 -0
  199. package/dist/apis/resetHiddenConversPin.js +20 -0
  200. package/dist/apis/reuseAvatar.d.ts +2 -0
  201. package/dist/apis/reuseAvatar.js +26 -0
  202. package/dist/apis/reviewPendingMemberRequest.d.ts +6 -0
  203. package/dist/apis/reviewPendingMemberRequest.js +31 -0
  204. package/dist/apis/sendBankCard.d.ts +9 -0
  205. package/dist/apis/sendBankCard.js +39 -0
  206. package/dist/apis/sendCard.d.ts +10 -0
  207. package/dist/apis/sendCard.js +59 -0
  208. package/dist/apis/sendDeliveredEvent.d.ts +16 -0
  209. package/dist/apis/sendDeliveredEvent.js +55 -0
  210. package/dist/apis/sendFriendRequest.d.ts +2 -0
  211. package/dist/apis/sendFriendRequest.js +39 -0
  212. package/dist/apis/sendLink.d.ts +10 -0
  213. package/dist/apis/sendLink.js +61 -0
  214. package/dist/apis/sendMessage.d.ts +99 -0
  215. package/dist/apis/sendMessage.js +460 -0
  216. package/dist/apis/sendReport.d.ts +17 -0
  217. package/dist/apis/sendReport.js +53 -0
  218. package/dist/apis/sendSeenEvent.d.ts +16 -0
  219. package/dist/apis/sendSeenEvent.js +63 -0
  220. package/dist/apis/sendSticker.d.ts +6 -0
  221. package/dist/apis/sendSticker.js +56 -0
  222. package/dist/apis/sendTypingEvent.d.ts +5 -0
  223. package/dist/apis/sendTypingEvent.js +33 -0
  224. package/dist/apis/sendVideo.d.ts +35 -0
  225. package/dist/apis/sendVideo.js +118 -0
  226. package/dist/apis/sendVoice.d.ts +12 -0
  227. package/dist/apis/sendVoice.js +73 -0
  228. package/dist/apis/setHiddenConversations.d.ts +3 -0
  229. package/dist/apis/setHiddenConversations.js +37 -0
  230. package/dist/apis/setMute.d.ts +17 -0
  231. package/dist/apis/setMute.js +67 -0
  232. package/dist/apis/setPinnedConversations.d.ts +3 -0
  233. package/dist/apis/setPinnedConversations.js +34 -0
  234. package/dist/apis/unblockUser.d.ts +2 -0
  235. package/dist/apis/unblockUser.js +28 -0
  236. package/dist/apis/undo.d.ts +9 -0
  237. package/dist/apis/undo.js +42 -0
  238. package/dist/apis/undoFriendRequest.d.ts +2 -0
  239. package/dist/apis/undoFriendRequest.js +27 -0
  240. package/dist/apis/updateAutoDeleteChat.d.ts +9 -0
  241. package/dist/apis/updateAutoDeleteChat.js +40 -0
  242. package/dist/apis/updateAutoReply.d.ts +14 -0
  243. package/dist/apis/updateAutoReply.js +37 -0
  244. package/dist/apis/updateCatalog.d.ts +11 -0
  245. package/dist/apis/updateCatalog.js +30 -0
  246. package/dist/apis/updateGroupSettings.d.ts +40 -0
  247. package/dist/apis/updateGroupSettings.js +43 -0
  248. package/dist/apis/updateHiddenConversPin.d.ts +2 -0
  249. package/dist/apis/updateHiddenConversPin.js +30 -0
  250. package/dist/apis/updateLabels.d.ts +24 -0
  251. package/dist/apis/updateLabels.js +34 -0
  252. package/dist/apis/updateLang.d.ts +7 -0
  253. package/dist/apis/updateLang.js +32 -0
  254. package/dist/apis/updateProductCatalog.d.ts +25 -0
  255. package/dist/apis/updateProductCatalog.js +51 -0
  256. package/dist/apis/updateProfile.d.ts +13 -0
  257. package/dist/apis/updateProfile.js +42 -0
  258. package/dist/apis/updateQuickMessage.d.ts +11 -0
  259. package/dist/apis/updateQuickMessage.js +61 -0
  260. package/dist/apis/updateSettings.d.ts +3 -0
  261. package/dist/apis/updateSettings.js +23 -0
  262. package/dist/apis/uploadAttachment.d.ts +50 -0
  263. package/dist/apis/uploadAttachment.js +205 -0
  264. package/dist/apis/uploadProductPhoto.d.ts +14 -0
  265. package/dist/apis/uploadProductPhoto.js +50 -0
  266. package/dist/cjs/Errors/ZaloApiError.cjs +11 -0
  267. package/dist/cjs/apis/acceptFriendRequest.cjs +33 -0
  268. package/dist/cjs/apis/addGroupBlockedMember.cjs +33 -0
  269. package/dist/cjs/apis/addGroupDeputy.cjs +35 -0
  270. package/dist/cjs/apis/addQuickMessage.cjs +65 -0
  271. package/dist/cjs/apis/addReaction.cjs +304 -0
  272. package/dist/cjs/apis/addUnreadMark.cjs +62 -0
  273. package/dist/cjs/apis/addUserToGroup.cjs +39 -0
  274. package/dist/cjs/apis/blockUser.cjs +33 -0
  275. package/dist/cjs/apis/blockViewFeed.cjs +35 -0
  276. package/dist/cjs/apis/changeAccountAvatar.cjs +57 -0
  277. package/dist/cjs/apis/changeFriendAlias.cjs +32 -0
  278. package/dist/cjs/apis/changeGroupAvatar.cjs +49 -0
  279. package/dist/cjs/apis/changeGroupName.cjs +37 -0
  280. package/dist/cjs/apis/changeGroupOwner.cjs +35 -0
  281. package/dist/cjs/apis/createAutoReply.cjs +42 -0
  282. package/dist/cjs/apis/createCatalog.cjs +34 -0
  283. package/dist/cjs/apis/createGroup.cjs +48 -0
  284. package/dist/cjs/apis/createNoteGroup.cjs +52 -0
  285. package/dist/cjs/apis/createPoll.cjs +45 -0
  286. package/dist/cjs/apis/createProductCatalog.cjs +55 -0
  287. package/dist/cjs/apis/createReminder.cjs +73 -0
  288. package/dist/cjs/apis/custom.cjs +19 -0
  289. package/dist/cjs/apis/deleteAutoReply.cjs +34 -0
  290. package/dist/cjs/apis/deleteAvatar.cjs +32 -0
  291. package/dist/cjs/apis/deleteCatalog.cjs +33 -0
  292. package/dist/cjs/apis/deleteChat.cjs +60 -0
  293. package/dist/cjs/apis/deleteMessage.cjs +62 -0
  294. package/dist/cjs/apis/deleteProductCatalog.cjs +36 -0
  295. package/dist/cjs/apis/disableGroupLink.cjs +29 -0
  296. package/dist/cjs/apis/disperseGroup.cjs +33 -0
  297. package/dist/cjs/apis/editNoteGroup.cjs +45 -0
  298. package/dist/cjs/apis/editReminder.cjs +71 -0
  299. package/dist/cjs/apis/enableGroupLink.cjs +30 -0
  300. package/dist/cjs/apis/fetchAccountInfo.cjs +15 -0
  301. package/dist/cjs/apis/findUser.cjs +45 -0
  302. package/dist/cjs/apis/forwardMessage.cjs +109 -0
  303. package/dist/cjs/apis/getAliasList.cjs +32 -0
  304. package/dist/cjs/apis/getAllFriends.cjs +37 -0
  305. package/dist/cjs/apis/getAllGroups.cjs +15 -0
  306. package/dist/cjs/apis/getArchivedChatList.cjs +28 -0
  307. package/dist/cjs/apis/getAutoDeleteChat.cjs +26 -0
  308. package/dist/cjs/apis/getAutoReplyList.cjs +29 -0
  309. package/dist/cjs/apis/getAvatarList.cjs +33 -0
  310. package/dist/cjs/apis/getBizAccount.cjs +32 -0
  311. package/dist/cjs/apis/getCatalogList.cjs +37 -0
  312. package/dist/cjs/apis/getContext.cjs +9 -0
  313. package/dist/cjs/apis/getCookie.cjs +14 -0
  314. package/dist/cjs/apis/getFriendBoardList.cjs +31 -0
  315. package/dist/cjs/apis/getFriendRequestStatus.cjs +30 -0
  316. package/dist/cjs/apis/getGroupBlockedMember.cjs +34 -0
  317. package/dist/cjs/apis/getGroupInfo.cjs +37 -0
  318. package/dist/cjs/apis/getGroupLinkDetail.cjs +30 -0
  319. package/dist/cjs/apis/getGroupLinkInfo.cjs +33 -0
  320. package/dist/cjs/apis/getGroupMembersInfo.cjs +29 -0
  321. package/dist/cjs/apis/getHiddenConversations.cjs +28 -0
  322. package/dist/cjs/apis/getLabels.cjs +33 -0
  323. package/dist/cjs/apis/getListBoard.cjs +55 -0
  324. package/dist/cjs/apis/getListReminder.cjs +57 -0
  325. package/dist/cjs/apis/getMute.cjs +27 -0
  326. package/dist/cjs/apis/getOwnId.cjs +9 -0
  327. package/dist/cjs/apis/getPendingGroupMembers.cjs +32 -0
  328. package/dist/cjs/apis/getPinConversations.cjs +27 -0
  329. package/dist/cjs/apis/getPollDetail.cjs +35 -0
  330. package/dist/cjs/apis/getProductCatalogList.cjs +38 -0
  331. package/dist/cjs/apis/getQR.cjs +34 -0
  332. package/dist/cjs/apis/getQuickMessage.cjs +29 -0
  333. package/dist/cjs/apis/getReceivedFriendRequests.cjs +27 -0
  334. package/dist/cjs/apis/getReminder.cjs +30 -0
  335. package/dist/cjs/apis/getReminderResponses.cjs +29 -0
  336. package/dist/cjs/apis/getSentFriendRequest.cjs +29 -0
  337. package/dist/cjs/apis/getStickers.cjs +45 -0
  338. package/dist/cjs/apis/getStickersDetail.cjs +45 -0
  339. package/dist/cjs/apis/getUnreadMark.cjs +35 -0
  340. package/dist/cjs/apis/getUserInfo.cjs +47 -0
  341. package/dist/cjs/apis/inviteUserToGroups.cjs +35 -0
  342. package/dist/cjs/apis/joinGroupLink.cjs +32 -0
  343. package/dist/cjs/apis/keepAlive.cjs +27 -0
  344. package/dist/cjs/apis/lastOnline.cjs +31 -0
  345. package/dist/cjs/apis/leaveGroup.cjs +38 -0
  346. package/dist/cjs/apis/listen.cjs +435 -0
  347. package/dist/cjs/apis/lockPoll.cjs +33 -0
  348. package/dist/cjs/apis/login.cjs +102 -0
  349. package/dist/cjs/apis/loginQR.cjs +364 -0
  350. package/dist/cjs/apis/parseLink.cjs +32 -0
  351. package/dist/cjs/apis/removeFriend.cjs +33 -0
  352. package/dist/cjs/apis/removeFriendAlias.cjs +29 -0
  353. package/dist/cjs/apis/removeGroupBlockedMember.cjs +33 -0
  354. package/dist/cjs/apis/removeGroupDeputy.cjs +35 -0
  355. package/dist/cjs/apis/removeQuickMessage.cjs +32 -0
  356. package/dist/cjs/apis/removeReminder.cjs +50 -0
  357. package/dist/cjs/apis/removeUnreadMark.cjs +60 -0
  358. package/dist/cjs/apis/removeUserFromGroup.cjs +39 -0
  359. package/dist/cjs/apis/resetHiddenConversPin.cjs +25 -0
  360. package/dist/cjs/apis/reuseAvatar.cjs +31 -0
  361. package/dist/cjs/apis/reviewPendingMemberRequest.cjs +36 -0
  362. package/dist/cjs/apis/sendBankCard.cjs +49 -0
  363. package/dist/cjs/apis/sendCard.cjs +69 -0
  364. package/dist/cjs/apis/sendDeliveredEvent.cjs +65 -0
  365. package/dist/cjs/apis/sendFriendRequest.cjs +44 -0
  366. package/dist/cjs/apis/sendLink.cjs +71 -0
  367. package/dist/cjs/apis/sendMessage.cjs +469 -0
  368. package/dist/cjs/apis/sendReport.cjs +63 -0
  369. package/dist/cjs/apis/sendSeenEvent.cjs +73 -0
  370. package/dist/cjs/apis/sendSticker.cjs +66 -0
  371. package/dist/cjs/apis/sendTypingEvent.cjs +43 -0
  372. package/dist/cjs/apis/sendVideo.cjs +128 -0
  373. package/dist/cjs/apis/sendVoice.cjs +83 -0
  374. package/dist/cjs/apis/setHiddenConversations.cjs +47 -0
  375. package/dist/cjs/apis/setMute.cjs +77 -0
  376. package/dist/cjs/apis/setPinnedConversations.cjs +44 -0
  377. package/dist/cjs/apis/unblockUser.cjs +33 -0
  378. package/dist/cjs/apis/undo.cjs +52 -0
  379. package/dist/cjs/apis/undoFriendRequest.cjs +32 -0
  380. package/dist/cjs/apis/updateAutoDeleteChat.cjs +50 -0
  381. package/dist/cjs/apis/updateAutoReply.cjs +42 -0
  382. package/dist/cjs/apis/updateCatalog.cjs +35 -0
  383. package/dist/cjs/apis/updateGroupSettings.cjs +48 -0
  384. package/dist/cjs/apis/updateHiddenConversPin.cjs +35 -0
  385. package/dist/cjs/apis/updateLabels.cjs +39 -0
  386. package/dist/cjs/apis/updateLang.cjs +37 -0
  387. package/dist/cjs/apis/updateProductCatalog.cjs +56 -0
  388. package/dist/cjs/apis/updateProfile.cjs +47 -0
  389. package/dist/cjs/apis/updateQuickMessage.cjs +66 -0
  390. package/dist/cjs/apis/updateSettings.cjs +28 -0
  391. package/dist/cjs/apis/uploadAttachment.cjs +215 -0
  392. package/dist/cjs/apis/uploadProductPhoto.cjs +55 -0
  393. package/dist/cjs/context.cjs +34 -0
  394. package/dist/cjs/index.cjs +121 -0
  395. package/dist/cjs/models/AutoReply.cjs +9 -0
  396. package/dist/cjs/models/DeliveredMessage.cjs +23 -0
  397. package/dist/cjs/models/Enum.cjs +95 -0
  398. package/dist/cjs/models/FriendEvent.cjs +87 -0
  399. package/dist/cjs/models/GroupEvent.cjs +88 -0
  400. package/dist/cjs/models/Message.cjs +32 -0
  401. package/dist/cjs/models/Reaction.cjs +74 -0
  402. package/dist/cjs/models/SeenMessage.cjs +23 -0
  403. package/dist/cjs/models/Typing.cjs +23 -0
  404. package/dist/cjs/models/Undo.cjs +16 -0
  405. package/dist/cjs/models/ZBusiness.cjs +46 -0
  406. package/dist/cjs/update.cjs +27 -0
  407. package/dist/cjs/utils.cjs +732 -0
  408. package/dist/cjs/zalo.cjs +360 -0
  409. package/dist/context.d.ts +177 -0
  410. package/dist/context.js +28 -0
  411. package/dist/index.d.ts +130 -0
  412. package/dist/index.js +11 -0
  413. package/dist/models/Attachment.d.ts +9 -0
  414. package/dist/models/Attachment.js +1 -0
  415. package/dist/models/AutoReply.d.ts +20 -0
  416. package/dist/models/AutoReply.js +7 -0
  417. package/dist/models/Board.d.ts +54 -0
  418. package/dist/models/Board.js +1 -0
  419. package/dist/models/Catalog.d.ts +16 -0
  420. package/dist/models/Catalog.js +1 -0
  421. package/dist/models/DeliveredMessage.d.ts +27 -0
  422. package/dist/models/DeliveredMessage.js +17 -0
  423. package/dist/models/Enum.d.ts +87 -0
  424. package/dist/models/Enum.js +93 -0
  425. package/dist/models/FriendEvent.d.ts +107 -0
  426. package/dist/models/FriendEvent.js +83 -0
  427. package/dist/models/GroupEvent.d.ts +197 -0
  428. package/dist/models/GroupEvent.js +84 -0
  429. package/dist/models/Message.d.ts +91 -0
  430. package/dist/models/Message.js +26 -0
  431. package/dist/models/ProductCatalog.d.ts +17 -0
  432. package/dist/models/ProductCatalog.js +1 -0
  433. package/dist/models/QuickMessage.d.ts +25 -0
  434. package/dist/models/QuickMessage.js +1 -0
  435. package/dist/models/Reaction.d.ts +85 -0
  436. package/dist/models/Reaction.js +70 -0
  437. package/dist/models/Reminder.d.ts +35 -0
  438. package/dist/models/Reminder.js +1 -0
  439. package/dist/models/SeenMessage.d.ts +26 -0
  440. package/dist/models/SeenMessage.js +17 -0
  441. package/dist/models/Typing.d.ts +24 -0
  442. package/dist/models/Typing.js +17 -0
  443. package/dist/models/Undo.d.ts +34 -0
  444. package/dist/models/Undo.js +12 -0
  445. package/dist/models/ZBusiness.d.ts +29 -0
  446. package/dist/models/ZBusiness.js +42 -0
  447. package/dist/models/index.d.ts +17 -0
  448. package/dist/models/index.js +17 -0
  449. package/dist/update.d.ts +2 -0
  450. package/dist/update.js +22 -0
  451. package/dist/utils.d.ts +168 -0
  452. package/dist/utils.js +748 -0
  453. package/dist/zalo.d.ts +291 -0
  454. package/dist/zalo.js +354 -0
  455. package/eslint.config.js +21 -0
  456. package/index.d.ts +2 -0
  457. package/package.json +143 -0
  458. package/qr.png +0 -0
  459. 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
+ [![npm version](https://badge.fury.io/js/zalo-api-final.svg)](https://badge.fury.io/js/zalo-api-final)
4
+ [![Downloads](https://img.shields.io/npm/dm/zalo-api-final.svg)](https://www.npmjs.com/package/zalo-api-final)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](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!"