zalo-toolkit 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 (393) hide show
  1. package/dist/Errors/ZaloApiError.d.ts +4 -0
  2. package/dist/Errors/ZaloApiError.js +7 -0
  3. package/dist/Errors/ZaloApiLoginQRAborted.d.ts +4 -0
  4. package/dist/Errors/ZaloApiLoginQRAborted.js +7 -0
  5. package/dist/Errors/ZaloApiLoginQRDeclined.d.ts +4 -0
  6. package/dist/Errors/ZaloApiLoginQRDeclined.js +7 -0
  7. package/dist/Errors/ZaloApiMissingImageMetadataGetter.d.ts +4 -0
  8. package/dist/Errors/ZaloApiMissingImageMetadataGetter.js +7 -0
  9. package/dist/Errors/index.d.ts +4 -0
  10. package/dist/Errors/index.js +4 -0
  11. package/dist/apis/acceptFriendRequest.d.ts +2 -0
  12. package/dist/apis/acceptFriendRequest.js +28 -0
  13. package/dist/apis/addGroupBlockedMember.d.ts +2 -0
  14. package/dist/apis/addGroupBlockedMember.js +28 -0
  15. package/dist/apis/addGroupDeputy.d.ts +2 -0
  16. package/dist/apis/addGroupDeputy.js +31 -0
  17. package/dist/apis/addPollOptions.d.ts +14 -0
  18. package/dist/apis/addPollOptions.js +26 -0
  19. package/dist/apis/addQuickMessage.d.ts +11 -0
  20. package/dist/apis/addQuickMessage.js +60 -0
  21. package/dist/apis/addReaction.d.ts +19 -0
  22. package/dist/apis/addReaction.js +292 -0
  23. package/dist/apis/addUnreadMark.d.ts +8 -0
  24. package/dist/apis/addUnreadMark.js +52 -0
  25. package/dist/apis/addUserToGroup.d.ts +5 -0
  26. package/dist/apis/addUserToGroup.js +34 -0
  27. package/dist/apis/blockUser.d.ts +2 -0
  28. package/dist/apis/blockUser.js +28 -0
  29. package/dist/apis/blockViewFeed.d.ts +2 -0
  30. package/dist/apis/blockViewFeed.js +30 -0
  31. package/dist/apis/changeAccountAvatar.d.ts +2 -0
  32. package/dist/apis/changeAccountAvatar.js +51 -0
  33. package/dist/apis/changeFriendAlias.d.ts +2 -0
  34. package/dist/apis/changeFriendAlias.js +27 -0
  35. package/dist/apis/changeGroupAvatar.d.ts +2 -0
  36. package/dist/apis/changeGroupAvatar.js +42 -0
  37. package/dist/apis/changeGroupName.d.ts +4 -0
  38. package/dist/apis/changeGroupName.js +32 -0
  39. package/dist/apis/changeGroupOwner.d.ts +4 -0
  40. package/dist/apis/changeGroupOwner.js +31 -0
  41. package/dist/apis/createAutoReply.d.ts +14 -0
  42. package/dist/apis/createAutoReply.js +37 -0
  43. package/dist/apis/createCatalog.d.ts +7 -0
  44. package/dist/apis/createCatalog.js +29 -0
  45. package/dist/apis/createGroup.d.ts +22 -0
  46. package/dist/apis/createGroup.js +43 -0
  47. package/dist/apis/createNote.d.ts +7 -0
  48. package/dist/apis/createNote.js +47 -0
  49. package/dist/apis/createPoll.d.ts +55 -0
  50. package/dist/apis/createPoll.js +40 -0
  51. package/dist/apis/createProductCatalog.d.ts +23 -0
  52. package/dist/apis/createProductCatalog.js +50 -0
  53. package/dist/apis/createReminder.d.ts +12 -0
  54. package/dist/apis/createReminder.js +63 -0
  55. package/dist/apis/custom.d.ts +9 -0
  56. package/dist/apis/custom.js +15 -0
  57. package/dist/apis/deleteAutoReply.d.ts +5 -0
  58. package/dist/apis/deleteAutoReply.js +29 -0
  59. package/dist/apis/deleteAvatar.d.ts +9 -0
  60. package/dist/apis/deleteAvatar.js +27 -0
  61. package/dist/apis/deleteCatalog.d.ts +2 -0
  62. package/dist/apis/deleteCatalog.js +28 -0
  63. package/dist/apis/deleteChat.d.ts +19 -0
  64. package/dist/apis/deleteChat.js +50 -0
  65. package/dist/apis/deleteGroupInviteBox.d.ts +9 -0
  66. package/dist/apis/deleteGroupInviteBox.js +27 -0
  67. package/dist/apis/deleteMessage.d.ts +14 -0
  68. package/dist/apis/deleteMessage.js +52 -0
  69. package/dist/apis/deleteProductCatalog.d.ts +10 -0
  70. package/dist/apis/deleteProductCatalog.js +31 -0
  71. package/dist/apis/disableGroupLink.d.ts +2 -0
  72. package/dist/apis/disableGroupLink.js +24 -0
  73. package/dist/apis/disperseGroup.d.ts +2 -0
  74. package/dist/apis/disperseGroup.js +28 -0
  75. package/dist/apis/editNote.d.ts +17 -0
  76. package/dist/apis/editNote.js +46 -0
  77. package/dist/apis/editReminder.d.ts +13 -0
  78. package/dist/apis/editReminder.js +61 -0
  79. package/dist/apis/enableGroupLink.d.ts +6 -0
  80. package/dist/apis/enableGroupLink.js +25 -0
  81. package/dist/apis/fetchAccountInfo.d.ts +3 -0
  82. package/dist/apis/fetchAccountInfo.js +10 -0
  83. package/dist/apis/findUser.d.ts +15 -0
  84. package/dist/apis/findUser.js +40 -0
  85. package/dist/apis/forwardAttachment.d.ts +16 -0
  86. package/dist/apis/forwardAttachment.js +80 -0
  87. package/dist/apis/forwardMessage.d.ts +33 -0
  88. package/dist/apis/forwardMessage.js +119 -0
  89. package/dist/apis/getAliasList.d.ts +8 -0
  90. package/dist/apis/getAliasList.js +28 -0
  91. package/dist/apis/getAllFriends.d.ts +3 -0
  92. package/dist/apis/getAllFriends.js +32 -0
  93. package/dist/apis/getAllGroups.d.ts +7 -0
  94. package/dist/apis/getAllGroups.js +10 -0
  95. package/dist/apis/getArchivedChatList.d.ts +5 -0
  96. package/dist/apis/getArchivedChatList.js +23 -0
  97. package/dist/apis/getAutoDeleteChat.d.ts +9 -0
  98. package/dist/apis/getAutoDeleteChat.js +21 -0
  99. package/dist/apis/getAutoReplyList.d.ts +6 -0
  100. package/dist/apis/getAutoReplyList.js +24 -0
  101. package/dist/apis/getAvatarList.d.ts +12 -0
  102. package/dist/apis/getAvatarList.js +28 -0
  103. package/dist/apis/getBizAccount.d.ts +24 -0
  104. package/dist/apis/getBizAccount.js +27 -0
  105. package/dist/apis/getCatalogList.d.ts +18 -0
  106. package/dist/apis/getCatalogList.js +32 -0
  107. package/dist/apis/getContext.d.ts +1 -0
  108. package/dist/apis/getContext.js +4 -0
  109. package/dist/apis/getCookie.d.ts +1 -0
  110. package/dist/apis/getCookie.js +9 -0
  111. package/dist/apis/getFriendBoardList.d.ts +5 -0
  112. package/dist/apis/getFriendBoardList.js +26 -0
  113. package/dist/apis/getFriendOnlines.d.ts +10 -0
  114. package/dist/apis/getFriendOnlines.js +35 -0
  115. package/dist/apis/getFriendRecommendations.d.ts +42 -0
  116. package/dist/apis/getFriendRecommendations.js +27 -0
  117. package/dist/apis/getFriendRequestStatus.d.ts +8 -0
  118. package/dist/apis/getFriendRequestStatus.js +25 -0
  119. package/dist/apis/getGroupBlockedMember.d.ts +23 -0
  120. package/dist/apis/getGroupBlockedMember.js +29 -0
  121. package/dist/apis/getGroupInfo.d.ts +16 -0
  122. package/dist/apis/getGroupInfo.js +32 -0
  123. package/dist/apis/getGroupInviteBoxInfo.d.ts +32 -0
  124. package/dist/apis/getGroupInviteBoxInfo.js +38 -0
  125. package/dist/apis/getGroupInviteBoxList.d.ts +38 -0
  126. package/dist/apis/getGroupInviteBoxList.js +31 -0
  127. package/dist/apis/getGroupLinkDetail.d.ts +9 -0
  128. package/dist/apis/getGroupLinkDetail.js +25 -0
  129. package/dist/apis/getGroupLinkInfo.d.ts +34 -0
  130. package/dist/apis/getGroupLinkInfo.js +28 -0
  131. package/dist/apis/getGroupMembersInfo.d.ts +17 -0
  132. package/dist/apis/getGroupMembersInfo.js +24 -0
  133. package/dist/apis/getHiddenConversations.d.ts +11 -0
  134. package/dist/apis/getHiddenConversations.js +23 -0
  135. package/dist/apis/getLabels.d.ts +7 -0
  136. package/dist/apis/getLabels.js +28 -0
  137. package/dist/apis/getLastMessage.d.ts +9 -0
  138. package/dist/apis/getLastMessage.js +20 -0
  139. package/dist/apis/getListBoard.d.ts +21 -0
  140. package/dist/apis/getListBoard.js +45 -0
  141. package/dist/apis/getListReminder.d.ts +28 -0
  142. package/dist/apis/getListReminder.js +47 -0
  143. package/dist/apis/getMute.d.ts +13 -0
  144. package/dist/apis/getMute.js +22 -0
  145. package/dist/apis/getOwnId.d.ts +1 -0
  146. package/dist/apis/getOwnId.js +4 -0
  147. package/dist/apis/getPendingGroupMembers.d.ts +11 -0
  148. package/dist/apis/getPendingGroupMembers.js +27 -0
  149. package/dist/apis/getPinConversations.d.ts +5 -0
  150. package/dist/apis/getPinConversations.js +22 -0
  151. package/dist/apis/getPollDetail.d.ts +3 -0
  152. package/dist/apis/getPollDetail.js +30 -0
  153. package/dist/apis/getProductCatalogList.d.ts +20 -0
  154. package/dist/apis/getProductCatalogList.js +33 -0
  155. package/dist/apis/getQR.d.ts +4 -0
  156. package/dist/apis/getQR.js +29 -0
  157. package/dist/apis/getQuickMessageList.d.ts +7 -0
  158. package/dist/apis/getQuickMessageList.js +24 -0
  159. package/dist/apis/getRecommendFriends.d.ts +40 -0
  160. package/dist/apis/getRecommendFriends.js +20 -0
  161. package/dist/apis/getRelatedFriendGroup.d.ts +6 -0
  162. package/dist/apis/getRelatedFriendGroup.js +30 -0
  163. package/dist/apis/getReminder.d.ts +3 -0
  164. package/dist/apis/getReminder.js +25 -0
  165. package/dist/apis/getReminderResponses.d.ts +5 -0
  166. package/dist/apis/getReminderResponses.js +24 -0
  167. package/dist/apis/getSentFriendRequest.d.ts +18 -0
  168. package/dist/apis/getSentFriendRequest.js +24 -0
  169. package/dist/apis/getSettings.d.ts +3 -0
  170. package/dist/apis/getSettings.js +20 -0
  171. package/dist/apis/getStickers.d.ts +1 -0
  172. package/dist/apis/getStickers.js +40 -0
  173. package/dist/apis/getStickersDetail.d.ts +24 -0
  174. package/dist/apis/getStickersDetail.js +40 -0
  175. package/dist/apis/getUnreadMark.d.ts +14 -0
  176. package/dist/apis/getUnreadMark.js +30 -0
  177. package/dist/apis/getUserInfo.d.ts +8 -0
  178. package/dist/apis/getUserInfo.js +42 -0
  179. package/dist/apis/inviteUserToGroups.d.ts +10 -0
  180. package/dist/apis/inviteUserToGroups.js +30 -0
  181. package/dist/apis/joinGroupInviteBox.d.ts +2 -0
  182. package/dist/apis/joinGroupInviteBox.js +25 -0
  183. package/dist/apis/joinGroupLink.d.ts +2 -0
  184. package/dist/apis/joinGroupLink.js +27 -0
  185. package/dist/apis/keepAlive.d.ts +4 -0
  186. package/dist/apis/keepAlive.js +22 -0
  187. package/dist/apis/lastOnline.d.ts +7 -0
  188. package/dist/apis/lastOnline.js +26 -0
  189. package/dist/apis/leaveGroup.d.ts +4 -0
  190. package/dist/apis/leaveGroup.js +33 -0
  191. package/dist/apis/listen.d.ts +141 -0
  192. package/dist/apis/listen.js +822 -0
  193. package/dist/apis/lockPoll.d.ts +2 -0
  194. package/dist/apis/lockPoll.js +28 -0
  195. package/dist/apis/login.d.ts +3 -0
  196. package/dist/apis/login.js +96 -0
  197. package/dist/apis/loginQR.d.ts +42 -0
  198. package/dist/apis/loginQR.js +274 -0
  199. package/dist/apis/parseLink.d.ts +21 -0
  200. package/dist/apis/parseLink.js +27 -0
  201. package/dist/apis/rejectFriendRequest.d.ts +2 -0
  202. package/dist/apis/rejectFriendRequest.js +27 -0
  203. package/dist/apis/removeFriend.d.ts +2 -0
  204. package/dist/apis/removeFriend.js +28 -0
  205. package/dist/apis/removeFriendAlias.d.ts +2 -0
  206. package/dist/apis/removeFriendAlias.js +24 -0
  207. package/dist/apis/removeGroupBlockedMember.d.ts +2 -0
  208. package/dist/apis/removeGroupBlockedMember.js +28 -0
  209. package/dist/apis/removeGroupDeputy.d.ts +2 -0
  210. package/dist/apis/removeGroupDeputy.js +30 -0
  211. package/dist/apis/removeQuickMessage.d.ts +5 -0
  212. package/dist/apis/removeQuickMessage.js +27 -0
  213. package/dist/apis/removeReminder.d.ts +3 -0
  214. package/dist/apis/removeReminder.js +40 -0
  215. package/dist/apis/removeUnreadMark.d.ts +8 -0
  216. package/dist/apis/removeUnreadMark.js +50 -0
  217. package/dist/apis/removeUserFromGroup.d.ts +4 -0
  218. package/dist/apis/removeUserFromGroup.js +34 -0
  219. package/dist/apis/resetHiddenConversPin.d.ts +2 -0
  220. package/dist/apis/resetHiddenConversPin.js +20 -0
  221. package/dist/apis/reuseAvatar.d.ts +2 -0
  222. package/dist/apis/reuseAvatar.js +26 -0
  223. package/dist/apis/reviewPendingMemberRequest.d.ts +14 -0
  224. package/dist/apis/reviewPendingMemberRequest.js +38 -0
  225. package/dist/apis/sendBankCard.d.ts +9 -0
  226. package/dist/apis/sendBankCard.js +37 -0
  227. package/dist/apis/sendCard.d.ts +10 -0
  228. package/dist/apis/sendCard.js +59 -0
  229. package/dist/apis/sendDeliveredEvent.d.ts +16 -0
  230. package/dist/apis/sendDeliveredEvent.js +55 -0
  231. package/dist/apis/sendFriendRequest.d.ts +2 -0
  232. package/dist/apis/sendFriendRequest.js +39 -0
  233. package/dist/apis/sendLink.d.ts +10 -0
  234. package/dist/apis/sendLink.js +57 -0
  235. package/dist/apis/sendMessage.d.ts +100 -0
  236. package/dist/apis/sendMessage.js +437 -0
  237. package/dist/apis/sendReport.d.ts +17 -0
  238. package/dist/apis/sendReport.js +53 -0
  239. package/dist/apis/sendSeenEvent.d.ts +16 -0
  240. package/dist/apis/sendSeenEvent.js +63 -0
  241. package/dist/apis/sendSticker.d.ts +10 -0
  242. package/dist/apis/sendSticker.js +56 -0
  243. package/dist/apis/sendTypingEvent.d.ts +5 -0
  244. package/dist/apis/sendTypingEvent.js +33 -0
  245. package/dist/apis/sendVideo.d.ts +35 -0
  246. package/dist/apis/sendVideo.js +118 -0
  247. package/dist/apis/sendVoice.d.ts +12 -0
  248. package/dist/apis/sendVoice.js +73 -0
  249. package/dist/apis/setArchivedConversations.d.ts +10 -0
  250. package/dist/apis/setArchivedConversations.js +34 -0
  251. package/dist/apis/setHiddenConversations.d.ts +3 -0
  252. package/dist/apis/setHiddenConversations.js +39 -0
  253. package/dist/apis/setMute.d.ts +20 -0
  254. package/dist/apis/setMute.js +67 -0
  255. package/dist/apis/setPinnedConversations.d.ts +3 -0
  256. package/dist/apis/setPinnedConversations.js +34 -0
  257. package/dist/apis/sharePoll.d.ts +2 -0
  258. package/dist/apis/sharePoll.js +28 -0
  259. package/dist/apis/unblockUser.d.ts +2 -0
  260. package/dist/apis/unblockUser.js +28 -0
  261. package/dist/apis/undo.d.ts +9 -0
  262. package/dist/apis/undo.js +42 -0
  263. package/dist/apis/undoFriendRequest.d.ts +2 -0
  264. package/dist/apis/undoFriendRequest.js +27 -0
  265. package/dist/apis/updateActiveStatus.d.ts +4 -0
  266. package/dist/apis/updateActiveStatus.js +27 -0
  267. package/dist/apis/updateAutoDeleteChat.d.ts +9 -0
  268. package/dist/apis/updateAutoDeleteChat.js +40 -0
  269. package/dist/apis/updateAutoReply.d.ts +15 -0
  270. package/dist/apis/updateAutoReply.js +38 -0
  271. package/dist/apis/updateCatalog.d.ts +11 -0
  272. package/dist/apis/updateCatalog.js +30 -0
  273. package/dist/apis/updateGroupSettings.d.ts +40 -0
  274. package/dist/apis/updateGroupSettings.js +43 -0
  275. package/dist/apis/updateHiddenConversPin.d.ts +2 -0
  276. package/dist/apis/updateHiddenConversPin.js +30 -0
  277. package/dist/apis/updateLabels.d.ts +15 -0
  278. package/dist/apis/updateLabels.js +34 -0
  279. package/dist/apis/updateLang.d.ts +6 -0
  280. package/dist/apis/updateLang.js +30 -0
  281. package/dist/apis/updateProductCatalog.d.ts +25 -0
  282. package/dist/apis/updateProductCatalog.js +51 -0
  283. package/dist/apis/updateProfile.d.ts +20 -0
  284. package/dist/apis/updateProfile.js +43 -0
  285. package/dist/apis/updateQuickMessage.d.ts +11 -0
  286. package/dist/apis/updateQuickMessage.js +61 -0
  287. package/dist/apis/updateSettings.d.ts +16 -0
  288. package/dist/apis/updateSettings.js +90 -0
  289. package/dist/apis/uploadAttachment.d.ts +51 -0
  290. package/dist/apis/uploadAttachment.js +195 -0
  291. package/dist/apis/uploadProductPhoto.d.ts +13 -0
  292. package/dist/apis/uploadProductPhoto.js +45 -0
  293. package/dist/apis/votePoll.d.ts +5 -0
  294. package/dist/apis/votePoll.js +29 -0
  295. package/dist/apis.d.ts +293 -0
  296. package/dist/apis.js +287 -0
  297. package/dist/cjs/Errors/ZaloApiError.cjs +11 -0
  298. package/dist/cjs/Errors/ZaloApiLoginQRAborted.cjs +12 -0
  299. package/dist/cjs/Errors/ZaloApiLoginQRDeclined.cjs +12 -0
  300. package/dist/cjs/Errors/ZaloApiMissingImageMetadataGetter.cjs +12 -0
  301. package/dist/cjs/apis/login.cjs +102 -0
  302. package/dist/cjs/apis/loginQR.cjs +282 -0
  303. package/dist/cjs/apis/reviewPendingMemberRequest.cjs +21 -0
  304. package/dist/cjs/apis/sendMessage.cjs +44 -0
  305. package/dist/cjs/apis/sendReport.cjs +28 -0
  306. package/dist/cjs/apis/setMute.cjs +33 -0
  307. package/dist/cjs/apis/updateAutoDeleteChat.cjs +28 -0
  308. package/dist/cjs/apis/updateLang.cjs +19 -0
  309. package/dist/cjs/apis/updateSettings.cjs +29 -0
  310. package/dist/cjs/context.cjs +19 -0
  311. package/dist/cjs/index.cjs +142 -0
  312. package/dist/cjs/models/AutoReply.cjs +9 -0
  313. package/dist/cjs/models/Board.cjs +8 -0
  314. package/dist/cjs/models/DeliveredMessage.cjs +23 -0
  315. package/dist/cjs/models/Enum.cjs +253 -0
  316. package/dist/cjs/models/FriendEvent.cjs +87 -0
  317. package/dist/cjs/models/Group.cjs +13 -0
  318. package/dist/cjs/models/GroupEvent.cjs +94 -0
  319. package/dist/cjs/models/Listen.cjs +134 -0
  320. package/dist/cjs/models/Message.cjs +40 -0
  321. package/dist/cjs/models/Reaction.cjs +74 -0
  322. package/dist/cjs/models/Reminder.cjs +9 -0
  323. package/dist/cjs/models/SeenMessage.cjs +23 -0
  324. package/dist/cjs/models/Typing.cjs +23 -0
  325. package/dist/cjs/models/Undo.cjs +16 -0
  326. package/dist/cjs/models/ZBusiness.cjs +39 -0
  327. package/dist/cjs/utils.cjs +320 -0
  328. package/dist/cjs/zalo.cjs +127 -0
  329. package/dist/context.d.ts +199 -0
  330. package/dist/context.js +27 -0
  331. package/dist/core/enums/common.d.ts +11 -0
  332. package/dist/core/enums/common.js +12 -0
  333. package/dist/core/interfaces/common.d.ts +7 -0
  334. package/dist/core/interfaces/common.js +1 -0
  335. package/dist/core/utils/deserializer.d.ts +4 -0
  336. package/dist/core/utils/deserializer.js +25 -0
  337. package/dist/core/utils/index.d.ts +2 -0
  338. package/dist/core/utils/index.js +28 -0
  339. package/dist/core/utils/serializer.d.ts +9 -0
  340. package/dist/core/utils/serializer.js +24 -0
  341. package/dist/index.d.ts +144 -0
  342. package/dist/index.js +12 -0
  343. package/dist/models/AutoReply.d.ts +20 -0
  344. package/dist/models/AutoReply.js +7 -0
  345. package/dist/models/Board.d.ts +60 -0
  346. package/dist/models/Board.js +6 -0
  347. package/dist/models/Catalog.d.ts +16 -0
  348. package/dist/models/Catalog.js +1 -0
  349. package/dist/models/DeliveredMessage.d.ts +27 -0
  350. package/dist/models/DeliveredMessage.js +17 -0
  351. package/dist/models/Enum.d.ts +247 -0
  352. package/dist/models/Enum.js +251 -0
  353. package/dist/models/FriendEvent.d.ts +107 -0
  354. package/dist/models/FriendEvent.js +83 -0
  355. package/dist/models/Group.d.ts +125 -0
  356. package/dist/models/Group.js +11 -0
  357. package/dist/models/GroupEvent.d.ts +178 -0
  358. package/dist/models/GroupEvent.js +90 -0
  359. package/dist/models/Label.d.ts +10 -0
  360. package/dist/models/Label.js +1 -0
  361. package/dist/models/Listen.d.ts +186 -0
  362. package/dist/models/Listen.js +194 -0
  363. package/dist/models/Message.d.ts +97 -0
  364. package/dist/models/Message.js +34 -0
  365. package/dist/models/Mute.d.ts +10 -0
  366. package/dist/models/Mute.js +1 -0
  367. package/dist/models/ProductCatalog.d.ts +17 -0
  368. package/dist/models/ProductCatalog.js +1 -0
  369. package/dist/models/QuickMessage.d.ts +25 -0
  370. package/dist/models/QuickMessage.js +1 -0
  371. package/dist/models/Reaction.d.ts +85 -0
  372. package/dist/models/Reaction.js +70 -0
  373. package/dist/models/Reminder.d.ts +51 -0
  374. package/dist/models/Reminder.js +7 -0
  375. package/dist/models/SeenMessage.d.ts +26 -0
  376. package/dist/models/SeenMessage.js +17 -0
  377. package/dist/models/Typing.d.ts +24 -0
  378. package/dist/models/Typing.js +17 -0
  379. package/dist/models/Undo.d.ts +34 -0
  380. package/dist/models/Undo.js +12 -0
  381. package/dist/models/User.d.ts +49 -0
  382. package/dist/models/User.js +1 -0
  383. package/dist/models/ZBusiness.d.ts +22 -0
  384. package/dist/models/ZBusiness.js +35 -0
  385. package/dist/models/index.d.ts +19 -0
  386. package/dist/models/index.js +19 -0
  387. package/dist/socket/config-socket.d.ts +38 -0
  388. package/dist/socket/config-socket.js +202 -0
  389. package/dist/utils.d.ts +190 -0
  390. package/dist/utils.js +749 -0
  391. package/dist/zalo.d.ts +64 -0
  392. package/dist/zalo.js +103 -0
  393. package/package.json +61 -0
@@ -0,0 +1,4 @@
1
+ export declare class ZaloApiError extends Error {
2
+ code: number | null;
3
+ constructor(message: string, code?: number);
4
+ }
@@ -0,0 +1,7 @@
1
+ export class ZaloApiError extends Error {
2
+ constructor(message, code) {
3
+ super(message);
4
+ this.name = "ZcaApiError";
5
+ this.code = code || null;
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ import { ZaloApiError } from "./ZaloApiError.js";
2
+ export declare class ZaloApiLoginQRAborted extends ZaloApiError {
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,7 @@
1
+ import { ZaloApiError } from "./ZaloApiError.js";
2
+ export class ZaloApiLoginQRAborted extends ZaloApiError {
3
+ constructor(message = "Operation aborted") {
4
+ super(message);
5
+ this.name = "ZaloApiLoginQRAborted";
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ import { ZaloApiError } from "./ZaloApiError.js";
2
+ export declare class ZaloApiLoginQRDeclined extends ZaloApiError {
3
+ constructor(message?: string);
4
+ }
@@ -0,0 +1,7 @@
1
+ import { ZaloApiError } from "./ZaloApiError.js";
2
+ export class ZaloApiLoginQRDeclined extends ZaloApiError {
3
+ constructor(message = "Login QR request declined") {
4
+ super(message);
5
+ this.name = "ZaloApiLoginQRDeclined";
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ import { ZaloApiError } from "./ZaloApiError.js";
2
+ export declare class ZaloApiMissingImageMetadataGetter extends ZaloApiError {
3
+ constructor();
4
+ }
@@ -0,0 +1,7 @@
1
+ import { ZaloApiError } from "./ZaloApiError.js";
2
+ export class ZaloApiMissingImageMetadataGetter extends ZaloApiError {
3
+ constructor() {
4
+ super("Missing `imageMetadataGetter`. Please provide it in the Zalo object options.");
5
+ this.name = "ZaloApiMissingImageMetadataGetter";
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./ZaloApiError.js";
2
+ export * from "./ZaloApiMissingImageMetadataGetter.js";
3
+ export * from "./ZaloApiLoginQRAborted.js";
4
+ export * from "./ZaloApiLoginQRDeclined.js";
@@ -0,0 +1,4 @@
1
+ export * from "./ZaloApiError.js";
2
+ export * from "./ZaloApiMissingImageMetadataGetter.js";
3
+ export * from "./ZaloApiLoginQRAborted.js";
4
+ export * from "./ZaloApiLoginQRDeclined.js";
@@ -0,0 +1,2 @@
1
+ export type AcceptFriendRequestResponse = '';
2
+ export declare const acceptFriendRequestFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (userId: string) => Promise<"">;
@@ -0,0 +1,28 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { apiFactory } from '../utils.js';
3
+ export const acceptFriendRequestFactory = apiFactory()((api, ctx, utils) => {
4
+ const serviceURL = utils.makeURL(`${api.zpwServiceMap.friend[0]}/api/friend/accept`);
5
+ /**
6
+ * Accept a friend request from a User
7
+ *
8
+ * @param userId The User ID to friend request is accept
9
+ *
10
+ * @throws ZaloApiError
11
+ */
12
+ return async function acceptFriendRequest(userId) {
13
+ const params = {
14
+ fid: userId,
15
+ language: ctx.language,
16
+ };
17
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
18
+ if (!encryptedParams)
19
+ throw new ZaloApiError('Failed to encrypt params');
20
+ const response = await utils.request(serviceURL, {
21
+ method: 'POST',
22
+ body: new URLSearchParams({
23
+ params: encryptedParams,
24
+ }),
25
+ });
26
+ return utils.resolve(response);
27
+ };
28
+ });
@@ -0,0 +1,2 @@
1
+ export type AddGroupBlockedMemberResponse = '';
2
+ export declare const addGroupBlockedMemberFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (memberId: string | string[], groupId: string) => Promise<"">;
@@ -0,0 +1,28 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { apiFactory } from '../utils.js';
3
+ export const addGroupBlockedMemberFactory = apiFactory()((api, _, utils) => {
4
+ const serviceURL = utils.makeURL(`${api.zpwServiceMap.group[0]}/api/group/blockedmems/add`);
5
+ /**
6
+ * Add group blocked member
7
+ *
8
+ * @param memberId member id(s)
9
+ * @param groupId group id
10
+ *
11
+ * @throws {ZaloApiError}
12
+ */
13
+ return async function addGroupBlockedMember(memberId, groupId) {
14
+ if (!Array.isArray(memberId))
15
+ memberId = [memberId];
16
+ const params = {
17
+ grid: groupId,
18
+ members: memberId,
19
+ };
20
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
21
+ if (!encryptedParams)
22
+ throw new ZaloApiError('Failed to encrypt params');
23
+ const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams }), {
24
+ method: 'GET',
25
+ });
26
+ return utils.resolve(response);
27
+ };
28
+ });
@@ -0,0 +1,2 @@
1
+ export type AddGroupDeputyResponse = '';
2
+ export declare const addGroupDeputyFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (memberId: string | string[], groupId: string) => Promise<"">;
@@ -0,0 +1,31 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { apiFactory } from '../utils.js';
3
+ export const addGroupDeputyFactory = apiFactory()((api, ctx, utils) => {
4
+ const serviceURL = utils.makeURL(`${api.zpwServiceMap.group[0]}/api/group/admins/add`);
5
+ /**
6
+ * Add group deputy
7
+ *
8
+ * @param memberId user Id or list of user Ids
9
+ * @param groupId group Id
10
+ *
11
+ * @throws ZaloApiError
12
+ *
13
+ */
14
+ return async function addGroupDeputy(memberId, groupId) {
15
+ if (!Array.isArray(memberId))
16
+ memberId = [memberId];
17
+ const params = {
18
+ grid: groupId,
19
+ members: memberId,
20
+ imei: ctx.imei,
21
+ };
22
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
23
+ if (!encryptedParams)
24
+ throw new ZaloApiError('Failed to encrypt params');
25
+ const urlWithParams = `${serviceURL}&params=${encodeURIComponent(encryptedParams)}`;
26
+ const response = await utils.request(urlWithParams, {
27
+ method: 'GET',
28
+ });
29
+ return utils.resolve(response);
30
+ };
31
+ });
@@ -0,0 +1,14 @@
1
+ import type { PollOptions } from '../models/index.js';
2
+ export type AddPollOptionsOption = {
3
+ voted: boolean;
4
+ content: string;
5
+ };
6
+ export type AddPollOptionsPayload = {
7
+ pollId: number;
8
+ options: AddPollOptionsOption[];
9
+ votedOptionIds: number[];
10
+ };
11
+ export type AddPollOptionsResponse = {
12
+ options: PollOptions[];
13
+ };
14
+ export declare const addPollOptionsFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (payload: AddPollOptionsPayload) => Promise<AddPollOptionsResponse>;
@@ -0,0 +1,26 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { apiFactory } from '../utils.js';
3
+ export const addPollOptionsFactory = apiFactory()((api, _ctx, utils) => {
4
+ const serviceURL = utils.makeURL(`${api.zpwServiceMap.group[0]}/api/poll/option/add`);
5
+ /**
6
+ * Add new option to poll
7
+ *
8
+ * @param payload
9
+ *
10
+ * @throws {ZaloApiError}
11
+ */
12
+ return async function addPollOptions(payload) {
13
+ const params = {
14
+ poll_id: payload.pollId,
15
+ new_options: JSON.stringify(payload.options),
16
+ voted_option_ids: payload.votedOptionIds,
17
+ };
18
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
19
+ if (!encryptedParams)
20
+ throw new ZaloApiError('Failed to encrypt params');
21
+ const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams }), {
22
+ method: 'GET',
23
+ });
24
+ return utils.resolve(response);
25
+ };
26
+ });
@@ -0,0 +1,11 @@
1
+ import type { QuickMessage } from '../models/index.js';
2
+ export type AddQuickMessagePayload = {
3
+ keyword: string;
4
+ title: string;
5
+ media?: string;
6
+ };
7
+ export type AddQuickMessageResponse = {
8
+ item: QuickMessage;
9
+ version: number;
10
+ };
11
+ export declare const addQuickMessageFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (addPayload: AddQuickMessagePayload) => Promise<AddQuickMessageResponse>;
@@ -0,0 +1,60 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { apiFactory } from '../utils.js';
3
+ export const addQuickMessageFactory = apiFactory()((api, ctx, utils) => {
4
+ const serviceURL = utils.makeURL(`${api.zpwServiceMap.quick_message[0]}/api/quickmessage/create`);
5
+ /**
6
+ * Add quick message
7
+ *
8
+ * @param addPayload - The payload containing data to add the quick message
9
+ *
10
+ * @note Zalo might throw an error with code 821 if you have reached the limit of quick messages.
11
+ *
12
+ * @throws {ZaloApiError}
13
+ */
14
+ return async function addQuickMessage(addPayload) {
15
+ const isType = !addPayload.media ? 0 : 1;
16
+ const params = {
17
+ keyword: addPayload.keyword,
18
+ message: {
19
+ title: addPayload.title,
20
+ params: '',
21
+ },
22
+ type: isType,
23
+ imei: ctx.imei,
24
+ };
25
+ if (isType === 1) {
26
+ if (!addPayload.media)
27
+ throw new ZaloApiError('Media is required');
28
+ const uploadMedia = await api.uploadProductPhoto({
29
+ url: addPayload.media,
30
+ });
31
+ const photoId = uploadMedia.photoId;
32
+ const thumbUrl = uploadMedia.thumbUrl;
33
+ const normalUrl = uploadMedia.normalUrl;
34
+ const hdUrl = uploadMedia.hdUrl;
35
+ params.media = {
36
+ items: [
37
+ {
38
+ type: 0,
39
+ photoId: photoId,
40
+ title: '',
41
+ width: '',
42
+ height: '',
43
+ previewThumb: thumbUrl,
44
+ rawUrl: normalUrl || hdUrl,
45
+ thumbUrl: thumbUrl,
46
+ normalUrl: normalUrl || hdUrl,
47
+ hdUrl: hdUrl || normalUrl,
48
+ },
49
+ ],
50
+ };
51
+ }
52
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
53
+ if (!encryptedParams)
54
+ throw new ZaloApiError('Failed to encrypt params');
55
+ const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams }), {
56
+ method: 'GET',
57
+ });
58
+ return utils.resolve(response);
59
+ };
60
+ });
@@ -0,0 +1,19 @@
1
+ import { ThreadType } from '../models/Enum.js';
2
+ import { Reactions } from '../models/Reaction.js';
3
+ export type AddReactionResponse = {
4
+ msgIds: number[];
5
+ };
6
+ export type CustomReaction = {
7
+ rType: number;
8
+ source: number;
9
+ icon: string;
10
+ };
11
+ export type AddReactionDestination = {
12
+ data: {
13
+ msgId: string;
14
+ cliMsgId: string;
15
+ };
16
+ threadId: string;
17
+ type: ThreadType;
18
+ };
19
+ export declare const addReactionFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (icon: Reactions | CustomReaction, dest: AddReactionDestination) => Promise<AddReactionResponse>;
@@ -0,0 +1,292 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { ThreadType } from '../models/Enum.js';
3
+ import { Reactions } from '../models/Reaction.js';
4
+ import { apiFactory } from '../utils.js';
5
+ export const addReactionFactory = apiFactory()((api, ctx, utils) => {
6
+ const serviceURLs = {
7
+ [ThreadType.User]: utils.makeURL(`${api.zpwServiceMap.reaction[0]}/api/message/reaction`),
8
+ [ThreadType.Group]: utils.makeURL(`${api.zpwServiceMap.reaction[0]}/api/group/reaction`),
9
+ };
10
+ /**
11
+ * Add reaction to a message
12
+ *
13
+ * @param icon Reaction icon
14
+ * @param dest Destination data including message IDs and thread information
15
+ *
16
+ * @throws ZaloApiError
17
+ */
18
+ return async function addReaction(icon, dest) {
19
+ const serviceURL = serviceURLs[dest.type];
20
+ let rType, source;
21
+ if (typeof icon == 'object') {
22
+ rType = icon.rType;
23
+ source = icon.source;
24
+ }
25
+ else
26
+ switch (icon) {
27
+ case Reactions.HAHA:
28
+ rType = 0;
29
+ source = 6;
30
+ break;
31
+ case Reactions.LIKE:
32
+ rType = 3;
33
+ source = 6;
34
+ break;
35
+ case Reactions.HEART:
36
+ rType = 5;
37
+ source = 6;
38
+ break;
39
+ case Reactions.WOW:
40
+ rType = 32;
41
+ source = 6;
42
+ break;
43
+ case Reactions.CRY:
44
+ rType = 2;
45
+ source = 6;
46
+ break;
47
+ case Reactions.ANGRY:
48
+ rType = 20;
49
+ source = 6;
50
+ break;
51
+ case Reactions.KISS:
52
+ rType = 8;
53
+ source = 6;
54
+ break;
55
+ case Reactions.TEARS_OF_JOY:
56
+ rType = 7;
57
+ source = 6;
58
+ break;
59
+ case Reactions.SHIT:
60
+ rType = 66;
61
+ source = 6;
62
+ break;
63
+ case Reactions.ROSE:
64
+ rType = 120;
65
+ source = 6;
66
+ break;
67
+ case Reactions.BROKEN_HEART:
68
+ rType = 65;
69
+ source = 6;
70
+ break;
71
+ case Reactions.DISLIKE:
72
+ rType = 4;
73
+ source = 6;
74
+ break;
75
+ case Reactions.LOVE:
76
+ rType = 29;
77
+ source = 6;
78
+ break;
79
+ case Reactions.CONFUSED:
80
+ rType = 51;
81
+ source = 6;
82
+ break;
83
+ case Reactions.WINK:
84
+ rType = 45;
85
+ source = 6;
86
+ break;
87
+ case Reactions.FADE:
88
+ rType = 121;
89
+ source = 6;
90
+ break;
91
+ case Reactions.SUN:
92
+ rType = 67;
93
+ source = 6;
94
+ break;
95
+ case Reactions.BIRTHDAY:
96
+ rType = 126;
97
+ source = 6;
98
+ break;
99
+ case Reactions.BOMB:
100
+ rType = 127;
101
+ source = 6;
102
+ break;
103
+ case Reactions.OK:
104
+ rType = 68;
105
+ source = 6;
106
+ break;
107
+ case Reactions.PEACE:
108
+ rType = 69;
109
+ source = 6;
110
+ break;
111
+ case Reactions.THANKS:
112
+ rType = 70;
113
+ source = 6;
114
+ break;
115
+ case Reactions.PUNCH:
116
+ rType = 71;
117
+ source = 6;
118
+ break;
119
+ case Reactions.SHARE:
120
+ rType = 72;
121
+ source = 6;
122
+ break;
123
+ case Reactions.PRAY:
124
+ rType = 73;
125
+ source = 6;
126
+ break;
127
+ case Reactions.NO:
128
+ rType = 131;
129
+ source = 6;
130
+ break;
131
+ case Reactions.BAD:
132
+ rType = 132;
133
+ source = 6;
134
+ break;
135
+ case Reactions.LOVE_YOU:
136
+ rType = 133;
137
+ source = 6;
138
+ break;
139
+ case Reactions.SAD:
140
+ rType = 1;
141
+ source = 6;
142
+ break;
143
+ case Reactions.VERY_SAD:
144
+ rType = 16;
145
+ source = 6;
146
+ break;
147
+ case Reactions.COOL:
148
+ rType = 21;
149
+ source = 6;
150
+ break;
151
+ case Reactions.NERD:
152
+ rType = 22;
153
+ source = 6;
154
+ break;
155
+ case Reactions.BIG_SMILE:
156
+ rType = 23;
157
+ source = 6;
158
+ break;
159
+ case Reactions.SUNGLASSES:
160
+ rType = 26;
161
+ source = 6;
162
+ break;
163
+ case Reactions.NEUTRAL:
164
+ rType = 30;
165
+ source = 6;
166
+ break;
167
+ case Reactions.SAD_FACE:
168
+ rType = 35;
169
+ source = 6;
170
+ break;
171
+ case Reactions.BYE:
172
+ rType = 36;
173
+ source = 6;
174
+ break;
175
+ case Reactions.SLEEPY:
176
+ rType = 38;
177
+ source = 6;
178
+ break;
179
+ case Reactions.WIPE:
180
+ rType = 39;
181
+ source = 6;
182
+ break;
183
+ case Reactions.DIG:
184
+ rType = 42;
185
+ source = 6;
186
+ break;
187
+ case Reactions.ANGUISH:
188
+ rType = 44;
189
+ source = 6;
190
+ break;
191
+ case Reactions.HANDCLAP:
192
+ rType = 46;
193
+ source = 6;
194
+ break;
195
+ case Reactions.ANGRY_FACE:
196
+ rType = 47;
197
+ source = 6;
198
+ break;
199
+ case Reactions.F_CHAIR:
200
+ rType = 48;
201
+ source = 6;
202
+ break;
203
+ case Reactions.L_CHAIR:
204
+ rType = 49;
205
+ source = 6;
206
+ break;
207
+ case Reactions.R_CHAIR:
208
+ rType = 50;
209
+ source = 6;
210
+ break;
211
+ case Reactions.SILENT:
212
+ rType = 52;
213
+ source = 6;
214
+ break;
215
+ case Reactions.SURPRISE:
216
+ rType = 53;
217
+ source = 6;
218
+ break;
219
+ case Reactions.EMBARRASSED:
220
+ rType = 54;
221
+ source = 6;
222
+ break;
223
+ case Reactions.AFRAID:
224
+ rType = 60;
225
+ source = 6;
226
+ break;
227
+ case Reactions.SAD2:
228
+ rType = 61;
229
+ source = 6;
230
+ break;
231
+ case Reactions.BIG_LAUGH:
232
+ rType = 62;
233
+ source = 6;
234
+ break;
235
+ case Reactions.RICH:
236
+ rType = 63;
237
+ source = 6;
238
+ break;
239
+ case Reactions.BEER:
240
+ rType = 99;
241
+ source = 6;
242
+ break;
243
+ default:
244
+ rType = -1;
245
+ source = 6;
246
+ }
247
+ const params = {
248
+ react_list: [
249
+ {
250
+ message: JSON.stringify({
251
+ rMsg: [
252
+ {
253
+ gMsgID: parseInt(dest.data.msgId),
254
+ cMsgID: parseInt(dest.data.cliMsgId),
255
+ msgType: 1,
256
+ },
257
+ ],
258
+ rIcon: icon,
259
+ rType,
260
+ source,
261
+ }),
262
+ clientId: Date.now(),
263
+ },
264
+ ],
265
+ imei: ctx.imei,
266
+ };
267
+ if (dest.type == ThreadType.User) {
268
+ params.toid = dest.threadId;
269
+ }
270
+ else {
271
+ params.grid = dest.threadId;
272
+ params.imei = ctx.imei;
273
+ }
274
+ const encryptedParams = utils.encodeAES(JSON.stringify(params));
275
+ if (!encryptedParams)
276
+ throw new ZaloApiError('Failed to encrypt message');
277
+ const response = await utils.request(serviceURL, {
278
+ method: 'POST',
279
+ body: new URLSearchParams({
280
+ params: encryptedParams,
281
+ }),
282
+ });
283
+ return utils.resolve(response, (result) => {
284
+ if (typeof result.data.msgIds === 'string') {
285
+ return {
286
+ msgIds: JSON.parse(result.data.msgIds),
287
+ };
288
+ }
289
+ return result.data;
290
+ });
291
+ };
292
+ });
@@ -0,0 +1,8 @@
1
+ import { ThreadType } from '../models/index.js';
2
+ export type AddUnreadMarkResponse = {
3
+ data: {
4
+ updateId: number;
5
+ };
6
+ status: number;
7
+ };
8
+ export declare const addUnreadMarkFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (threadId: string, type?: ThreadType) => Promise<AddUnreadMarkResponse>;
@@ -0,0 +1,52 @@
1
+ import { ZaloApiError } from '../Errors/ZaloApiError.js';
2
+ import { ThreadType } from '../models/index.js';
3
+ import { apiFactory } from '../utils.js';
4
+ export const addUnreadMarkFactory = apiFactory()((api, ctx, utils) => {
5
+ const serviceURL = utils.makeURL(`${api.zpwServiceMap.conversation[0]}/api/conv/addUnreadMark`);
6
+ /**
7
+ * Add unread mark to conversation
8
+ *
9
+ * @param threadId Thread ID
10
+ * @param type Thread type (User/Group)
11
+ *
12
+ * @throws {ZaloApiError}
13
+ */
14
+ return async function addUnreadMark(threadId, type = ThreadType.User) {
15
+ const timestamp = Date.now();
16
+ const timestampString = timestamp.toString();
17
+ const isGroup = type === ThreadType.Group;
18
+ const requestParams = {
19
+ param: JSON.stringify({
20
+ [isGroup ? 'convsGroup' : 'convsUser']: [
21
+ {
22
+ id: threadId,
23
+ cliMsgId: timestampString,
24
+ fromUid: '0',
25
+ ts: timestamp,
26
+ },
27
+ ],
28
+ [isGroup ? 'convsUser' : 'convsGroup']: [],
29
+ imei: ctx.imei,
30
+ }),
31
+ };
32
+ const encryptedParams = utils.encodeAES(JSON.stringify(requestParams));
33
+ if (!encryptedParams)
34
+ throw new ZaloApiError('Failed to encrypt params');
35
+ const response = await utils.request(serviceURL, {
36
+ method: 'POST',
37
+ body: new URLSearchParams({
38
+ params: encryptedParams,
39
+ }),
40
+ });
41
+ return utils.resolve(response, (result) => {
42
+ const data = result.data;
43
+ if (typeof data.data === 'string') {
44
+ return {
45
+ data: JSON.parse(data.data),
46
+ status: data.status,
47
+ };
48
+ }
49
+ return result.data;
50
+ });
51
+ };
52
+ });
@@ -0,0 +1,5 @@
1
+ export type AddUserToGroupResponse = {
2
+ errorMemebers: string[];
3
+ error_data: Record<string, any>;
4
+ };
5
+ export declare const addUserToGroupFactory: (ctx: import("../context.js").ContextBase, api: import("../apis.js").ZaloAPI) => (groupId: string, members: string | string[]) => Promise<AddUserToGroupResponse>;