@softtynet/zca-js 2.2.7 → 2.2.9

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 (147) hide show
  1. package/README.md +160 -179
  2. package/dist/apis/clearUnreadFriendRequests.d.ts +2 -0
  3. package/dist/apis/clearUnreadFriendRequests.js +29 -0
  4. package/dist/apis/encryptGids.d.ts +4 -0
  5. package/dist/apis/encryptGids.js +24 -0
  6. package/dist/apis/getAliasListV2.d.ts +10 -0
  7. package/dist/apis/getAliasListV2.js +28 -0
  8. package/dist/apis/getBlockFriends.d.ts +6 -0
  9. package/dist/apis/getBlockFriends.js +28 -0
  10. package/dist/apis/getCloudInfo.d.ts +3 -0
  11. package/dist/apis/getCloudInfo.js +34 -0
  12. package/dist/apis/getCloudSettings.d.ts +10 -0
  13. package/dist/apis/getCloudSettings.js +34 -0
  14. package/dist/apis/getCloudViewerKey.d.ts +5 -0
  15. package/dist/apis/getCloudViewerKey.js +25 -0
  16. package/dist/apis/getConversationMedia.d.ts +26 -0
  17. package/dist/apis/getConversationMedia.js +39 -0
  18. package/dist/apis/getEmojiStatusConfig.d.ts +17 -0
  19. package/dist/apis/getEmojiStatusConfig.js +23 -0
  20. package/dist/apis/getExtraFriendInfo.d.ts +3 -0
  21. package/dist/apis/getExtraFriendInfo.js +31 -0
  22. package/dist/apis/getExtraGroupInfo.d.ts +7 -0
  23. package/dist/apis/getExtraGroupInfo.js +32 -0
  24. package/dist/apis/getFamilyProfile.d.ts +3 -0
  25. package/dist/apis/getFamilyProfile.js +34 -0
  26. package/dist/apis/getFamilyUsage.d.ts +7 -0
  27. package/dist/apis/getFamilyUsage.js +34 -0
  28. package/dist/apis/getFamilyViewerKey.d.ts +5 -0
  29. package/dist/apis/getFamilyViewerKey.js +25 -0
  30. package/dist/apis/getFriendsEmojiStatus.d.ts +17 -0
  31. package/dist/apis/getFriendsEmojiStatus.js +30 -0
  32. package/dist/apis/getGroupCloudMessageJump.d.ts +3 -0
  33. package/dist/apis/getGroupCloudMessageJump.js +46 -0
  34. package/dist/apis/getLastReadContactTab.d.ts +4 -0
  35. package/dist/apis/getLastReadContactTab.js +15 -0
  36. package/dist/apis/getLastSeen.d.ts +11 -0
  37. package/dist/apis/getLastSeen.js +40 -0
  38. package/dist/apis/getLastSeenReaction.d.ts +9 -0
  39. package/dist/apis/getLastSeenReaction.js +28 -0
  40. package/dist/apis/getListPinTopics.d.ts +5 -0
  41. package/dist/apis/getListPinTopics.js +28 -0
  42. package/dist/apis/getMediaStorePreview.d.ts +3 -0
  43. package/dist/apis/getMediaStorePreview.js +31 -0
  44. package/dist/apis/getMiniProfile.d.ts +13 -0
  45. package/dist/apis/getMiniProfile.js +34 -0
  46. package/dist/apis/getPersonalizedStickerList.d.ts +5 -0
  47. package/dist/apis/getPersonalizedStickerList.js +24 -0
  48. package/dist/apis/getPhonebookV2.d.ts +6 -0
  49. package/dist/apis/getPhonebookV2.js +21 -0
  50. package/dist/apis/getProfileRank.d.ts +5 -0
  51. package/dist/apis/getProfileRank.js +25 -0
  52. package/dist/apis/getProfileVerificationStatus.d.ts +5 -0
  53. package/dist/apis/getProfileVerificationStatus.js +20 -0
  54. package/dist/apis/getQuotaCommunity.d.ts +8 -0
  55. package/dist/apis/getQuotaCommunity.js +27 -0
  56. package/dist/apis/getRecentSearchList.d.ts +6 -0
  57. package/dist/apis/getRecentSearchList.js +25 -0
  58. package/dist/apis/getStickerCategoriesV2.d.ts +17 -0
  59. package/dist/apis/getStickerCategoriesV2.js +21 -0
  60. package/dist/apis/getStickerCategoryData.d.ts +3 -0
  61. package/dist/apis/getStickerCategoryData.js +25 -0
  62. package/dist/apis/getStickerHello.d.ts +16 -0
  63. package/dist/apis/getStickerHello.js +34 -0
  64. package/dist/apis/getStickerSuggestKeywords.d.ts +12 -0
  65. package/dist/apis/getStickerSuggestKeywords.js +24 -0
  66. package/dist/apis/getStickerSuggestion.d.ts +12 -0
  67. package/dist/apis/getStickerSuggestion.js +30 -0
  68. package/dist/apis/getUsageMyCloud.d.ts +7 -0
  69. package/dist/apis/getUsageMyCloud.js +34 -0
  70. package/dist/apis/getUsageZCloud.d.ts +11 -0
  71. package/dist/apis/getUsageZCloud.js +34 -0
  72. package/dist/apis/keepAlive.d.ts +2 -1
  73. package/dist/apis/keepAlive.js +5 -3
  74. package/dist/apis/listen.d.ts +13 -0
  75. package/dist/apis/listen.js +10 -0
  76. package/dist/apis/readContactTab.d.ts +2 -0
  77. package/dist/apis/readContactTab.js +26 -0
  78. package/dist/apis/removeConversationMedia.d.ts +8 -0
  79. package/dist/apis/removeConversationMedia.js +30 -0
  80. package/dist/apis/undoMultiMessage.d.ts +9 -0
  81. package/dist/apis/undoMultiMessage.js +46 -0
  82. package/dist/apis/updateRecentSearch.d.ts +11 -0
  83. package/dist/apis/updateRecentSearch.js +41 -0
  84. package/dist/apis/verifyCloudMedia.d.ts +14 -0
  85. package/dist/apis/verifyCloudMedia.js +43 -0
  86. package/dist/apis/voiceToText.d.ts +4 -0
  87. package/dist/apis/voiceToText.js +30 -0
  88. package/dist/apis.d.ts +82 -0
  89. package/dist/apis.js +82 -0
  90. package/dist/cjs/apis/clearUnreadFriendRequests.cjs +34 -0
  91. package/dist/cjs/apis/encryptGids.cjs +29 -0
  92. package/dist/cjs/apis/getAliasListV2.cjs +33 -0
  93. package/dist/cjs/apis/getBlockFriends.cjs +33 -0
  94. package/dist/cjs/apis/getCloudInfo.cjs +39 -0
  95. package/dist/cjs/apis/getCloudSettings.cjs +39 -0
  96. package/dist/cjs/apis/getCloudViewerKey.cjs +30 -0
  97. package/dist/cjs/apis/getConversationMedia.cjs +44 -0
  98. package/dist/cjs/apis/getEmojiStatusConfig.cjs +28 -0
  99. package/dist/cjs/apis/getExtraFriendInfo.cjs +36 -0
  100. package/dist/cjs/apis/getExtraGroupInfo.cjs +37 -0
  101. package/dist/cjs/apis/getFamilyProfile.cjs +39 -0
  102. package/dist/cjs/apis/getFamilyUsage.cjs +39 -0
  103. package/dist/cjs/apis/getFamilyViewerKey.cjs +30 -0
  104. package/dist/cjs/apis/getFriendsEmojiStatus.cjs +35 -0
  105. package/dist/cjs/apis/getGroupCloudMessageJump.cjs +63 -0
  106. package/dist/cjs/apis/getLastReadContactTab.cjs +20 -0
  107. package/dist/cjs/apis/getLastSeen.cjs +45 -0
  108. package/dist/cjs/apis/getLastSeenReaction.cjs +33 -0
  109. package/dist/cjs/apis/getListPinTopics.cjs +33 -0
  110. package/dist/cjs/apis/getMediaStorePreview.cjs +36 -0
  111. package/dist/cjs/apis/getMiniProfile.cjs +39 -0
  112. package/dist/cjs/apis/getPersonalizedStickerList.cjs +29 -0
  113. package/dist/cjs/apis/getPhonebookV2.cjs +26 -0
  114. package/dist/cjs/apis/getProfileRank.cjs +30 -0
  115. package/dist/cjs/apis/getProfileVerificationStatus.cjs +25 -0
  116. package/dist/cjs/apis/getQuotaCommunity.cjs +32 -0
  117. package/dist/cjs/apis/getRecentSearchList.cjs +30 -0
  118. package/dist/cjs/apis/getStickerCategoriesV2.cjs +26 -0
  119. package/dist/cjs/apis/getStickerCategoryData.cjs +30 -0
  120. package/dist/cjs/apis/getStickerHello.cjs +39 -0
  121. package/dist/cjs/apis/getStickerSuggestKeywords.cjs +29 -0
  122. package/dist/cjs/apis/getStickerSuggestion.cjs +35 -0
  123. package/dist/cjs/apis/getUsageMyCloud.cjs +39 -0
  124. package/dist/cjs/apis/getUsageZCloud.cjs +39 -0
  125. package/dist/cjs/apis/keepAlive.cjs +5 -3
  126. package/dist/cjs/apis/listen.cjs +10 -0
  127. package/dist/cjs/apis/readContactTab.cjs +31 -0
  128. package/dist/cjs/apis/removeConversationMedia.cjs +35 -0
  129. package/dist/cjs/apis/undoMultiMessage.cjs +62 -0
  130. package/dist/cjs/apis/updateRecentSearch.cjs +46 -0
  131. package/dist/cjs/apis/verifyCloudMedia.cjs +48 -0
  132. package/dist/cjs/apis/voiceToText.cjs +35 -0
  133. package/dist/cjs/apis.cjs +82 -0
  134. package/dist/cjs/index.cjs +2 -0
  135. package/dist/cjs/update.cjs +8 -6
  136. package/dist/cjs/utils.cjs +25 -0
  137. package/dist/context.d.ts +4 -0
  138. package/dist/index.d.ts +42 -1
  139. package/dist/index.js +1 -1
  140. package/dist/update.js +8 -6
  141. package/dist/utils.d.ts +10 -0
  142. package/dist/utils.js +23 -0
  143. package/docs/INTEGRATION_GUIDE_SYNC_AND_CALL.md +110 -0
  144. package/package.json +12 -9
  145. package/CODE_OF_CONDUCT.md +0 -163
  146. package/CONTRIBUTING.md +0 -470
  147. package/SECURITY.md +0 -83
package/dist/cjs/apis.cjs CHANGED
@@ -18,6 +18,7 @@ var changeFriendAlias = require('./apis/changeFriendAlias.cjs');
18
18
  var changeGroupAvatar = require('./apis/changeGroupAvatar.cjs');
19
19
  var changeGroupName = require('./apis/changeGroupName.cjs');
20
20
  var changeGroupOwner = require('./apis/changeGroupOwner.cjs');
21
+ var clearUnreadFriendRequests = require('./apis/clearUnreadFriendRequests.cjs');
21
22
  var createAutoReply = require('./apis/createAutoReply.cjs');
22
23
  var createBankAccount = require('./apis/createBankAccount.cjs');
23
24
  var createCatalog = require('./apis/createCatalog.cjs');
@@ -41,12 +42,14 @@ var downloadTransferSync = require('./apis/downloadTransferSync.cjs');
41
42
  var editNote = require('./apis/editNote.cjs');
42
43
  var editReminder = require('./apis/editReminder.cjs');
43
44
  var enableGroupLink = require('./apis/enableGroupLink.cjs');
45
+ var encryptGids = require('./apis/encryptGids.cjs');
44
46
  var endVoiceCall = require('./apis/endVoiceCall.cjs');
45
47
  var fetchAccountInfo = require('./apis/fetchAccountInfo.cjs');
46
48
  var findUser = require('./apis/findUser.cjs');
47
49
  var findUserByUsername = require('./apis/findUserByUsername.cjs');
48
50
  var forwardMessage = require('./apis/forwardMessage.cjs');
49
51
  var getAliasList = require('./apis/getAliasList.cjs');
52
+ var getAliasListV2 = require('./apis/getAliasListV2.cjs');
50
53
  var getAllFriends = require('./apis/getAllFriends.cjs');
51
54
  var getAllGroups = require('./apis/getAllGroups.cjs');
52
55
  var getArchivedChatList = require('./apis/getArchivedChatList.cjs');
@@ -55,17 +58,30 @@ var getAutoReplyList = require('./apis/getAutoReplyList.cjs');
55
58
  var getAvatarList = require('./apis/getAvatarList.cjs');
56
59
  var getAvatarUrlProfile = require('./apis/getAvatarUrlProfile.cjs');
57
60
  var getBizAccount = require('./apis/getBizAccount.cjs');
61
+ var getBlockFriends = require('./apis/getBlockFriends.cjs');
58
62
  var getCatalogList = require('./apis/getCatalogList.cjs');
59
63
  var getCloseFriends = require('./apis/getCloseFriends.cjs');
64
+ var getCloudInfo = require('./apis/getCloudInfo.cjs');
65
+ var getCloudSettings = require('./apis/getCloudSettings.cjs');
66
+ var getCloudViewerKey = require('./apis/getCloudViewerKey.cjs');
60
67
  var getContext = require('./apis/getContext.cjs');
68
+ var getConversationMedia = require('./apis/getConversationMedia.cjs');
61
69
  var getCookie = require('./apis/getCookie.cjs');
70
+ var getEmojiStatusConfig = require('./apis/getEmojiStatusConfig.cjs');
71
+ var getExtraFriendInfo = require('./apis/getExtraFriendInfo.cjs');
72
+ var getExtraGroupInfo = require('./apis/getExtraGroupInfo.cjs');
73
+ var getFamilyProfile = require('./apis/getFamilyProfile.cjs');
74
+ var getFamilyUsage = require('./apis/getFamilyUsage.cjs');
75
+ var getFamilyViewerKey = require('./apis/getFamilyViewerKey.cjs');
62
76
  var getFriendBoardList = require('./apis/getFriendBoardList.cjs');
63
77
  var getFriendOnlines = require('./apis/getFriendOnlines.cjs');
64
78
  var getFriendRecommendations = require('./apis/getFriendRecommendations.cjs');
65
79
  var getFriendRequestStatus = require('./apis/getFriendRequestStatus.cjs');
80
+ var getFriendsEmojiStatus = require('./apis/getFriendsEmojiStatus.cjs');
66
81
  var getFullAvatar = require('./apis/getFullAvatar.cjs');
67
82
  var getGroupBlockedMember = require('./apis/getGroupBlockedMember.cjs');
68
83
  var getGroupChatHistory = require('./apis/getGroupChatHistory.cjs');
84
+ var getGroupCloudMessageJump = require('./apis/getGroupCloudMessageJump.cjs');
69
85
  var getGroupInfo = require('./apis/getGroupInfo.cjs');
70
86
  var getGroupInviteBoxInfo = require('./apis/getGroupInviteBoxInfo.cjs');
71
87
  var getGroupInviteBoxList = require('./apis/getGroupInviteBoxList.cjs');
@@ -74,31 +90,50 @@ var getGroupLinkInfo = require('./apis/getGroupLinkInfo.cjs');
74
90
  var getGroupMembersInfo = require('./apis/getGroupMembersInfo.cjs');
75
91
  var getHiddenConversations = require('./apis/getHiddenConversations.cjs');
76
92
  var getLabels = require('./apis/getLabels.cjs');
93
+ var getLastReadContactTab = require('./apis/getLastReadContactTab.cjs');
94
+ var getLastSeen = require('./apis/getLastSeen.cjs');
95
+ var getLastSeenReaction = require('./apis/getLastSeenReaction.cjs');
77
96
  var getListBank = require('./apis/getListBank.cjs');
78
97
  var getListBankAccount = require('./apis/getListBankAccount.cjs');
79
98
  var getListBoard = require('./apis/getListBoard.cjs');
80
99
  var getListDevice = require('./apis/getListDevice.cjs');
100
+ var getListPinTopics = require('./apis/getListPinTopics.cjs');
81
101
  var getListReminder = require('./apis/getListReminder.cjs');
102
+ var getMediaStorePreview = require('./apis/getMediaStorePreview.cjs');
103
+ var getMiniProfile = require('./apis/getMiniProfile.cjs');
82
104
  var getMultiUsersByPhones = require('./apis/getMultiUsersByPhones.cjs');
83
105
  var getMute = require('./apis/getMute.cjs');
84
106
  var getNoisedIds = require('./apis/getNoisedIds.cjs');
85
107
  var getOwnId = require('./apis/getOwnId.cjs');
86
108
  var getPendingGroupMembers = require('./apis/getPendingGroupMembers.cjs');
109
+ var getPersonalizedStickerList = require('./apis/getPersonalizedStickerList.cjs');
110
+ var getPhonebookV2 = require('./apis/getPhonebookV2.cjs');
87
111
  var getPinConversations = require('./apis/getPinConversations.cjs');
88
112
  var getPollDetail = require('./apis/getPollDetail.cjs');
89
113
  var getProductCatalogList = require('./apis/getProductCatalogList.cjs');
114
+ var getProfileRank = require('./apis/getProfileRank.cjs');
115
+ var getProfileVerificationStatus = require('./apis/getProfileVerificationStatus.cjs');
90
116
  var getQR = require('./apis/getQR.cjs');
91
117
  var getQuickMessageList = require('./apis/getQuickMessageList.cjs');
118
+ var getQuotaCommunity = require('./apis/getQuotaCommunity.cjs');
119
+ var getRecentSearchList = require('./apis/getRecentSearchList.cjs');
92
120
  var getRelatedFriendGroup = require('./apis/getRelatedFriendGroup.cjs');
93
121
  var getReminder = require('./apis/getReminder.cjs');
94
122
  var getReminderResponses = require('./apis/getReminderResponses.cjs');
95
123
  var getSentFriendRequest = require('./apis/getSentFriendRequest.cjs');
96
124
  var getSettings = require('./apis/getSettings.cjs');
125
+ var getStickerCategoriesV2 = require('./apis/getStickerCategoriesV2.cjs');
126
+ var getStickerCategoryData = require('./apis/getStickerCategoryData.cjs');
97
127
  var getStickerCategoryDetail = require('./apis/getStickerCategoryDetail.cjs');
128
+ var getStickerHello = require('./apis/getStickerHello.cjs');
129
+ var getStickerSuggestKeywords = require('./apis/getStickerSuggestKeywords.cjs');
130
+ var getStickerSuggestion = require('./apis/getStickerSuggestion.cjs');
98
131
  var getStickers = require('./apis/getStickers.cjs');
99
132
  var getStickersDetail = require('./apis/getStickersDetail.cjs');
100
133
  var getSyncData = require('./apis/getSyncData.cjs');
101
134
  var getUnreadMark = require('./apis/getUnreadMark.cjs');
135
+ var getUsageMyCloud = require('./apis/getUsageMyCloud.cjs');
136
+ var getUsageZCloud = require('./apis/getUsageZCloud.cjs');
102
137
  var getUserInfo = require('./apis/getUserInfo.cjs');
103
138
  var inviteUserToGroups = require('./apis/inviteUserToGroups.cjs');
104
139
  var joinGroupInviteBox = require('./apis/joinGroupInviteBox.cjs');
@@ -111,8 +146,10 @@ var lostFocus = require('./apis/lostFocus.cjs');
111
146
  var parseLink = require('./apis/parseLink.cjs');
112
147
  var preloadConversations = require('./apis/preloadConversations.cjs');
113
148
  var pullMobile = require('./apis/pullMobile.cjs');
149
+ var readContactTab = require('./apis/readContactTab.cjs');
114
150
  var registerCatalog = require('./apis/registerCatalog.cjs');
115
151
  var rejectFriendRequest = require('./apis/rejectFriendRequest.cjs');
152
+ var removeConversationMedia = require('./apis/removeConversationMedia.cjs');
116
153
  var removeFriend = require('./apis/removeFriend.cjs');
117
154
  var removeFriendAlias = require('./apis/removeFriendAlias.cjs');
118
155
  var removeGroupBlockedMember = require('./apis/removeGroupBlockedMember.cjs');
@@ -147,6 +184,7 @@ var sharePoll = require('./apis/sharePoll.cjs');
147
184
  var unblockUser = require('./apis/unblockUser.cjs');
148
185
  var undo = require('./apis/undo.cjs');
149
186
  var undoFriendRequest = require('./apis/undoFriendRequest.cjs');
187
+ var undoMultiMessage = require('./apis/undoMultiMessage.cjs');
150
188
  var updateActiveStatus = require('./apis/updateActiveStatus.cjs');
151
189
  var updateArchivedChatList = require('./apis/updateArchivedChatList.cjs');
152
190
  var updateAutoDeleteChat = require('./apis/updateAutoDeleteChat.cjs');
@@ -161,10 +199,13 @@ var updateProductCatalog = require('./apis/updateProductCatalog.cjs');
161
199
  var updateProfile = require('./apis/updateProfile.cjs');
162
200
  var updateProfileBio = require('./apis/updateProfileBio.cjs');
163
201
  var updateQuickMessage = require('./apis/updateQuickMessage.cjs');
202
+ var updateRecentSearch = require('./apis/updateRecentSearch.cjs');
164
203
  var updateSettings = require('./apis/updateSettings.cjs');
165
204
  var upgradeGroupToCommunity = require('./apis/upgradeGroupToCommunity.cjs');
166
205
  var uploadAttachment = require('./apis/uploadAttachment.cjs');
167
206
  var uploadProductPhoto = require('./apis/uploadProductPhoto.cjs');
207
+ var verifyCloudMedia = require('./apis/verifyCloudMedia.cjs');
208
+ var voiceToText = require('./apis/voiceToText.cjs');
168
209
  var votePoll = require('./apis/votePoll.cjs');
169
210
  var custom = require('./apis/custom.cjs');
170
211
 
@@ -189,6 +230,7 @@ class API {
189
230
  this.changeGroupAvatar = changeGroupAvatar.changeGroupAvatarFactory(ctx, this);
190
231
  this.changeGroupName = changeGroupName.changeGroupNameFactory(ctx, this);
191
232
  this.changeGroupOwner = changeGroupOwner.changeGroupOwnerFactory(ctx, this);
233
+ this.clearUnreadFriendRequests = clearUnreadFriendRequests.clearUnreadFriendRequestsFactory(ctx, this);
192
234
  this.createAutoReply = createAutoReply.createAutoReplyFactory(ctx, this);
193
235
  this.createBankAccount = createBankAccount.createBankAccountFactory(ctx, this);
194
236
  this.createCatalog = createCatalog.createCatalogFactory(ctx, this);
@@ -212,12 +254,14 @@ class API {
212
254
  this.editNote = editNote.editNoteFactory(ctx, this);
213
255
  this.editReminder = editReminder.editReminderFactory(ctx, this);
214
256
  this.enableGroupLink = enableGroupLink.enableGroupLinkFactory(ctx, this);
257
+ this.encryptGids = encryptGids.encryptGidsFactory(ctx, this);
215
258
  this.endVoiceCall = endVoiceCall.endVoiceCallFactory(ctx, this);
216
259
  this.fetchAccountInfo = fetchAccountInfo.fetchAccountInfoFactory(ctx, this);
217
260
  this.findUser = findUser.findUserFactory(ctx, this);
218
261
  this.findUserByUsername = findUserByUsername.findUserByUsernameFactory(ctx, this);
219
262
  this.forwardMessage = forwardMessage.forwardMessageFactory(ctx, this);
220
263
  this.getAliasList = getAliasList.getAliasListFactory(ctx, this);
264
+ this.getAliasListV2 = getAliasListV2.getAliasListV2Factory(ctx, this);
221
265
  this.getAllFriends = getAllFriends.getAllFriendsFactory(ctx, this);
222
266
  this.getAllGroups = getAllGroups.getAllGroupsFactory(ctx, this);
223
267
  this.getArchivedChatList = getArchivedChatList.getArchivedChatListFactory(ctx, this);
@@ -226,17 +270,30 @@ class API {
226
270
  this.getAvatarList = getAvatarList.getAvatarListFactory(ctx, this);
227
271
  this.getAvatarUrlProfile = getAvatarUrlProfile.getAvatarUrlProfileFactory(ctx, this);
228
272
  this.getBizAccount = getBizAccount.getBizAccountFactory(ctx, this);
273
+ this.getBlockFriends = getBlockFriends.getBlockFriendsFactory(ctx, this);
229
274
  this.getCatalogList = getCatalogList.getCatalogListFactory(ctx, this);
230
275
  this.getCloseFriends = getCloseFriends.getCloseFriendsFactory(ctx, this);
276
+ this.getCloudInfo = getCloudInfo.getCloudInfoFactory(ctx, this);
277
+ this.getCloudSettings = getCloudSettings.getCloudSettingsFactory(ctx, this);
278
+ this.getCloudViewerKey = getCloudViewerKey.getCloudViewerKeyFactory(ctx, this);
231
279
  this.getContext = getContext.getContextFactory(ctx, this);
280
+ this.getConversationMedia = getConversationMedia.getConversationMediaFactory(ctx, this);
232
281
  this.getCookie = getCookie.getCookieFactory(ctx, this);
282
+ this.getEmojiStatusConfig = getEmojiStatusConfig.getEmojiStatusConfigFactory(ctx, this);
283
+ this.getExtraFriendInfo = getExtraFriendInfo.getExtraFriendInfoFactory(ctx, this);
284
+ this.getExtraGroupInfo = getExtraGroupInfo.getExtraGroupInfoFactory(ctx, this);
285
+ this.getFamilyProfile = getFamilyProfile.getFamilyProfileFactory(ctx, this);
286
+ this.getFamilyUsage = getFamilyUsage.getFamilyUsageFactory(ctx, this);
287
+ this.getFamilyViewerKey = getFamilyViewerKey.getFamilyViewerKeyFactory(ctx, this);
233
288
  this.getFriendBoardList = getFriendBoardList.getFriendBoardListFactory(ctx, this);
234
289
  this.getFriendOnlines = getFriendOnlines.getFriendOnlinesFactory(ctx, this);
235
290
  this.getFriendRecommendations = getFriendRecommendations.getFriendRecommendationsFactory(ctx, this);
236
291
  this.getFriendRequestStatus = getFriendRequestStatus.getFriendRequestStatusFactory(ctx, this);
292
+ this.getFriendsEmojiStatus = getFriendsEmojiStatus.getFriendsEmojiStatusFactory(ctx, this);
237
293
  this.getFullAvatar = getFullAvatar.getFullAvatarFactory(ctx, this);
238
294
  this.getGroupBlockedMember = getGroupBlockedMember.getGroupBlockedMemberFactory(ctx, this);
239
295
  this.getGroupChatHistory = getGroupChatHistory.getGroupChatHistoryFactory(ctx, this);
296
+ this.getGroupCloudMessageJump = getGroupCloudMessageJump.getGroupCloudMessageJumpFactory(ctx, this);
240
297
  this.getGroupInfo = getGroupInfo.getGroupInfoFactory(ctx, this);
241
298
  this.getGroupInviteBoxInfo = getGroupInviteBoxInfo.getGroupInviteBoxInfoFactory(ctx, this);
242
299
  this.getGroupInviteBoxList = getGroupInviteBoxList.getGroupInviteBoxListFactory(ctx, this);
@@ -245,31 +302,50 @@ class API {
245
302
  this.getGroupMembersInfo = getGroupMembersInfo.getGroupMembersInfoFactory(ctx, this);
246
303
  this.getHiddenConversations = getHiddenConversations.getHiddenConversationsFactory(ctx, this);
247
304
  this.getLabels = getLabels.getLabelsFactory(ctx, this);
305
+ this.getLastReadContactTab = getLastReadContactTab.getLastReadContactTabFactory(ctx, this);
306
+ this.getLastSeen = getLastSeen.getLastSeenFactory(ctx, this);
307
+ this.getLastSeenReaction = getLastSeenReaction.getLastSeenReactionFactory(ctx, this);
248
308
  this.getListBank = getListBank.getListBankFactory(ctx, this);
249
309
  this.getListBankAccount = getListBankAccount.getListBankAccountFactory(ctx, this);
250
310
  this.getListBoard = getListBoard.getListBoardFactory(ctx, this);
251
311
  this.getListDevice = getListDevice.getListDeviceFactory(ctx, this);
312
+ this.getListPinTopics = getListPinTopics.getListPinTopicsFactory(ctx, this);
252
313
  this.getListReminder = getListReminder.getListReminderFactory(ctx, this);
314
+ this.getMediaStorePreview = getMediaStorePreview.getMediaStorePreviewFactory(ctx, this);
315
+ this.getMiniProfile = getMiniProfile.getMiniProfileFactory(ctx, this);
253
316
  this.getMultiUsersByPhones = getMultiUsersByPhones.getMultiUsersByPhonesFactory(ctx, this);
254
317
  this.getMute = getMute.getMuteFactory(ctx, this);
255
318
  this.getNoisedIds = getNoisedIds.getNoisedIdsFactory(ctx, this);
256
319
  this.getOwnId = getOwnId.getOwnIdFactory(ctx, this);
257
320
  this.getPendingGroupMembers = getPendingGroupMembers.getPendingGroupMembersFactory(ctx, this);
321
+ this.getPersonalizedStickerList = getPersonalizedStickerList.getPersonalizedStickerListFactory(ctx, this);
322
+ this.getPhonebookV2 = getPhonebookV2.getPhonebookV2Factory(ctx, this);
258
323
  this.getPinConversations = getPinConversations.getPinConversationsFactory(ctx, this);
259
324
  this.getPollDetail = getPollDetail.getPollDetailFactory(ctx, this);
260
325
  this.getProductCatalogList = getProductCatalogList.getProductCatalogListFactory(ctx, this);
326
+ this.getProfileRank = getProfileRank.getProfileRankFactory(ctx, this);
327
+ this.getProfileVerificationStatus = getProfileVerificationStatus.getProfileVerificationStatusFactory(ctx, this);
261
328
  this.getQR = getQR.getQRFactory(ctx, this);
262
329
  this.getQuickMessageList = getQuickMessageList.getQuickMessageListFactory(ctx, this);
330
+ this.getQuotaCommunity = getQuotaCommunity.getQuotaCommunityFactory(ctx, this);
331
+ this.getRecentSearchList = getRecentSearchList.getRecentSearchListFactory(ctx, this);
263
332
  this.getRelatedFriendGroup = getRelatedFriendGroup.getRelatedFriendGroupFactory(ctx, this);
264
333
  this.getReminder = getReminder.getReminderFactory(ctx, this);
265
334
  this.getReminderResponses = getReminderResponses.getReminderResponsesFactory(ctx, this);
266
335
  this.getSentFriendRequest = getSentFriendRequest.getSentFriendRequestFactory(ctx, this);
267
336
  this.getSettings = getSettings.getSettingsFactory(ctx, this);
337
+ this.getStickerCategoriesV2 = getStickerCategoriesV2.getStickerCategoriesV2Factory(ctx, this);
338
+ this.getStickerCategoryData = getStickerCategoryData.getStickerCategoryDataFactory(ctx, this);
268
339
  this.getStickerCategoryDetail = getStickerCategoryDetail.getStickerCategoryDetailFactory(ctx, this);
340
+ this.getStickerHello = getStickerHello.getStickerHelloFactory(ctx, this);
341
+ this.getStickerSuggestKeywords = getStickerSuggestKeywords.getStickerSuggestKeywordsFactory(ctx, this);
342
+ this.getStickerSuggestion = getStickerSuggestion.getStickerSuggestionFactory(ctx, this);
269
343
  this.getStickers = getStickers.getStickersFactory(ctx, this);
270
344
  this.getStickersDetail = getStickersDetail.getStickersDetailFactory(ctx, this);
271
345
  this.getSyncData = getSyncData.getSyncDataFactory(ctx, this);
272
346
  this.getUnreadMark = getUnreadMark.getUnreadMarkFactory(ctx, this);
347
+ this.getUsageMyCloud = getUsageMyCloud.getUsageMyCloudFactory(ctx, this);
348
+ this.getUsageZCloud = getUsageZCloud.getUsageZCloudFactory(ctx, this);
273
349
  this.getUserInfo = getUserInfo.getUserInfoFactory(ctx, this);
274
350
  this.inviteUserToGroups = inviteUserToGroups.inviteUserToGroupsFactory(ctx, this);
275
351
  this.joinGroupInviteBox = joinGroupInviteBox.joinGroupInviteBoxFactory(ctx, this);
@@ -282,8 +358,10 @@ class API {
282
358
  this.parseLink = parseLink.parseLinkFactory(ctx, this);
283
359
  this.preloadConversations = preloadConversations.preloadConversationsFactory(ctx, this);
284
360
  this.pullMobile = pullMobile.pullMobileFactory(ctx, this);
361
+ this.readContactTab = readContactTab.readContactTabFactory(ctx, this);
285
362
  this.registerCatalog = registerCatalog.registerCatalogFactory(ctx, this);
286
363
  this.rejectFriendRequest = rejectFriendRequest.rejectFriendRequestFactory(ctx, this);
364
+ this.removeConversationMedia = removeConversationMedia.removeConversationMediaFactory(ctx, this);
287
365
  this.removeFriend = removeFriend.removeFriendFactory(ctx, this);
288
366
  this.removeFriendAlias = removeFriendAlias.removeFriendAliasFactory(ctx, this);
289
367
  this.removeGroupBlockedMember = removeGroupBlockedMember.removeGroupBlockedMemberFactory(ctx, this);
@@ -318,6 +396,7 @@ class API {
318
396
  this.unblockUser = unblockUser.unblockUserFactory(ctx, this);
319
397
  this.undo = undo.undoFactory(ctx, this);
320
398
  this.undoFriendRequest = undoFriendRequest.undoFriendRequestFactory(ctx, this);
399
+ this.undoMultiMessage = undoMultiMessage.undoMultiMessageFactory(ctx, this);
321
400
  this.updateActiveStatus = updateActiveStatus.updateActiveStatusFactory(ctx, this);
322
401
  this.updateArchivedChatList = updateArchivedChatList.updateArchivedChatListFactory(ctx, this);
323
402
  this.updateAutoDeleteChat = updateAutoDeleteChat.updateAutoDeleteChatFactory(ctx, this);
@@ -332,10 +411,13 @@ class API {
332
411
  this.updateProfile = updateProfile.updateProfileFactory(ctx, this);
333
412
  this.updateProfileBio = updateProfileBio.updateProfileBioFactory(ctx, this);
334
413
  this.updateQuickMessage = updateQuickMessage.updateQuickMessageFactory(ctx, this);
414
+ this.updateRecentSearch = updateRecentSearch.updateRecentSearchFactory(ctx, this);
335
415
  this.updateSettings = updateSettings.updateSettingsFactory(ctx, this);
336
416
  this.upgradeGroupToCommunity = upgradeGroupToCommunity.upgradeGroupToCommunityFactory(ctx, this);
337
417
  this.uploadAttachment = uploadAttachment.uploadAttachmentFactory(ctx, this);
338
418
  this.uploadProductPhoto = uploadProductPhoto.uploadProductPhotoFactory(ctx, this);
419
+ this.verifyCloudMedia = verifyCloudMedia.verifyCloudMediaFactory(ctx, this);
420
+ this.voiceToText = voiceToText.voiceToTextFactory(ctx, this);
339
421
  this.votePoll = votePoll.votePollFactory(ctx, this);
340
422
  this.custom = custom.customFactory(ctx, this);
341
423
  }
@@ -177,8 +177,10 @@ Object.defineProperty(exports, "CallType", {
177
177
  get: function () { return sendVoiceCall.CallType; }
178
178
  });
179
179
  exports.decryptWithPrivateKey = utils.decryptWithPrivateKey;
180
+ exports.decryptZCloudAES = utils.decryptZCloudAES;
180
181
  exports.decryptZdbBuffer = utils.decryptZdbBuffer;
181
182
  exports.deriveZdbAesKey = utils.deriveZdbAesKey;
183
+ exports.encryptZCloudAES = utils.encryptZCloudAES;
182
184
  exports.generateRSAKeyPair = utils.generateRSAKeyPair;
183
185
  exports.parseZdbHeader = utils.parseZdbHeader;
184
186
  exports.API = apis.API;
@@ -3,10 +3,10 @@
3
3
  var semver = require('semver');
4
4
  var utils = require('./utils.cjs');
5
5
 
6
- const VERSION = "2.2.0";
7
- const NPM_REGISTRY = "https://registry.npmjs.org/zca-js";
6
+ const VERSION = "2.2.7";
7
+ const NPM_REGISTRY = "https://registry.npmjs.org/@softtynet/zca-js";
8
8
  async function checkUpdate(ctx) {
9
- var _a, _b;
9
+ var _a, _b, _c;
10
10
  if (!ctx.options.checkUpdate)
11
11
  return;
12
12
  const _options = Object.assign({}, (utils.isBun
@@ -22,12 +22,14 @@ async function checkUpdate(ctx) {
22
22
  const data = await response.json().catch(() => null);
23
23
  if (!data)
24
24
  return;
25
- const latestVersion = data["dist-tags"].latest;
25
+ const latestVersion = (_c = data["dist-tags"]) === null || _c === void 0 ? void 0 : _c.latest;
26
+ if (!latestVersion)
27
+ return;
26
28
  if (semver.compare(VERSION, latestVersion) === -1) {
27
- utils.logger(ctx).info(`A new version of zca-js is available: ${latestVersion}`);
29
+ utils.logger(ctx).info(`A new version of @softtynet/zca-js is available: ${latestVersion}`);
28
30
  }
29
31
  else {
30
- utils.logger(ctx).info("zca-js is up to date");
32
+ utils.logger(ctx).info("@softtynet/zca-js is up to date");
31
33
  }
32
34
  }
33
35
 
@@ -931,6 +931,29 @@ function parseZdbHeader(zdbPlaintext) {
931
931
  }
932
932
  return { entries, xzOffset: offset };
933
933
  }
934
+ /**
935
+ * Encrypts a plaintext string for ZCloud / ZFamily APIs (`CLOUD_API` / `CLOUD_FAMILY_API`, module `"98yS"`),
936
+ * using AES-256-CBC with a random 16-byte IV prepended to the ciphertext before Base64 encoding.
937
+ */
938
+ function encryptZCloudAES(plainText, base64Key) {
939
+ const key = Buffer.from(base64Key, "base64");
940
+ const iv = crypto.randomBytes(16);
941
+ const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
942
+ const encrypted = Buffer.concat([cipher.update(plainText, "utf8"), cipher.final()]);
943
+ return Buffer.concat([iv, encrypted]).toString("base64");
944
+ }
945
+ /**
946
+ * Decrypts a Base64 payload from ZCloud / ZFamily APIs (`CLOUD_API` / `CLOUD_FAMILY_API`, module `"98yS"`),
947
+ * extracting the first 16 bytes as the AES-256-CBC IV and the remainder as PKCS#7-padded ciphertext.
948
+ */
949
+ function decryptZCloudAES(base64CipherText, base64Key) {
950
+ const key = Buffer.from(base64Key, "base64");
951
+ const raw = Buffer.from(base64CipherText, "base64");
952
+ const iv = raw.subarray(0, 16);
953
+ const ciphertext = raw.subarray(16);
954
+ const decipher = crypto.createDecipheriv("aes-256-cbc", key, iv);
955
+ return Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString("utf8");
956
+ }
934
957
 
935
958
  exports.ParamsEncryptor = ParamsEncryptor;
936
959
  exports.apiFactory = apiFactory;
@@ -940,10 +963,12 @@ exports.decodeEventData = decodeEventData;
940
963
  exports.decodeUnit8Array = decodeUnit8Array;
941
964
  exports.decryptResp = decryptResp;
942
965
  exports.decryptWithPrivateKey = decryptWithPrivateKey;
966
+ exports.decryptZCloudAES = decryptZCloudAES;
943
967
  exports.decryptZdbBuffer = decryptZdbBuffer;
944
968
  exports.deriveZdbAesKey = deriveZdbAesKey;
945
969
  exports.encodeAES = encodeAES;
946
970
  exports.encryptPin = encryptPin;
971
+ exports.encryptZCloudAES = encryptZCloudAES;
947
972
  exports.formatTime = formatTime;
948
973
  exports.generateRSAKeyPair = generateRSAKeyPair;
949
974
  exports.generateZaloUUID = generateZaloUUID;
package/dist/context.d.ts CHANGED
@@ -100,6 +100,10 @@ type LoginInfo = {
100
100
  recent_search: string[];
101
101
  group_e2e: string[];
102
102
  quick_message: string[];
103
+ ai_features: string[];
104
+ emoji_stt: string[];
105
+ backuppcmobile: string[];
106
+ banner: string[];
103
107
  };
104
108
  };
105
109
  type ExtraVer = {
package/dist/index.d.ts CHANGED
@@ -165,6 +165,47 @@ export type { FileData, ImageData, UploadAttachmentResponse, UploadAttachmentTyp
165
165
  export type { UploadProductPhotoPayload, UploadProductPhotoResponse } from "./apis/uploadProductPhoto.js";
166
166
  export type { VotePollResponse } from "./apis/votePoll.js";
167
167
  export type { CustomAPICallback, CustomAPIProps } from "./apis/custom.js";
168
+ export type { ClearUnreadFriendRequestsResponse } from "./apis/clearUnreadFriendRequests.js";
169
+ export type { EncryptGidsResponse } from "./apis/encryptGids.js";
170
+ export type { GetAliasListV2Response } from "./apis/getAliasListV2.js";
171
+ export type { GetBlockFriendsResponse } from "./apis/getBlockFriends.js";
172
+ export type { GetCloudInfoResponse } from "./apis/getCloudInfo.js";
173
+ export type { GetCloudSettingsResponse } from "./apis/getCloudSettings.js";
174
+ export type { GetCloudViewerKeyResponse } from "./apis/getCloudViewerKey.js";
175
+ export type { GetConversationMediaOptions, GetConversationMediaResponse } from "./apis/getConversationMedia.js";
176
+ export type { GetEmojiStatusConfigResponse } from "./apis/getEmojiStatusConfig.js";
177
+ export type { GetExtraFriendInfoResponse } from "./apis/getExtraFriendInfo.js";
178
+ export type { GetExtraGroupInfoResponse } from "./apis/getExtraGroupInfo.js";
179
+ export type { GetFamilyProfileResponse } from "./apis/getFamilyProfile.js";
180
+ export type { GetFamilyUsageResponse } from "./apis/getFamilyUsage.js";
181
+ export type { GetFamilyViewerKeyResponse } from "./apis/getFamilyViewerKey.js";
182
+ export type { GetFriendsEmojiStatusOptions, GetFriendsEmojiStatusResponse } from "./apis/getFriendsEmojiStatus.js";
183
+ export type { GetGroupCloudMessageJumpResponse } from "./apis/getGroupCloudMessageJump.js";
184
+ export type { GetLastReadContactTabResponse } from "./apis/getLastReadContactTab.js";
185
+ export type { GetLastSeenOptions, GetLastSeenResponse } from "./apis/getLastSeen.js";
186
+ export type { GetLastSeenReactionOptions, GetLastSeenReactionResponse } from "./apis/getLastSeenReaction.js";
187
+ export type { GetMediaStorePreviewResponse } from "./apis/getMediaStorePreview.js";
188
+ export type { GetMiniProfileResponse, MiniProfileItem } from "./apis/getMiniProfile.js";
189
+ export type { GetPersonalizedStickerListResponse } from "./apis/getPersonalizedStickerList.js";
190
+ export type { GetPhonebookV2Response } from "./apis/getPhonebookV2.js";
191
+ export type { GetProfileRankResponse } from "./apis/getProfileRank.js";
192
+ export type { GetProfileVerificationStatusResponse } from "./apis/getProfileVerificationStatus.js";
193
+ export type { GetQuotaCommunityResponse } from "./apis/getQuotaCommunity.js";
194
+ export type { GetRecentSearchListResponse } from "./apis/getRecentSearchList.js";
195
+ export type { GetStickerCategoriesV2Response, StickerCategoryV2Item } from "./apis/getStickerCategoriesV2.js";
196
+ export type { GetStickerCategoryDataResponse } from "./apis/getStickerCategoryData.js";
197
+ export type { GetStickerHelloResponse, StickerHelloItem } from "./apis/getStickerHello.js";
198
+ export type { GetStickerSuggestionOptions, GetStickerSuggestionResponse } from "./apis/getStickerSuggestion.js";
199
+ export type { GetStickerSuggestKeywordsResponse } from "./apis/getStickerSuggestKeywords.js";
200
+ export type { GetUsageMyCloudResponse } from "./apis/getUsageMyCloud.js";
201
+ export type { GetUsageZCloudResponse } from "./apis/getUsageZCloud.js";
202
+ export type { ReadContactTabResponse } from "./apis/readContactTab.js";
203
+ export type { RemoveConversationMediaOptions, RemoveConversationMediaResponse } from "./apis/removeConversationMedia.js";
204
+ export type { UndoMultiMessageItem, UndoMultiMessageResponse } from "./apis/undoMultiMessage.js";
205
+ export type { UpdateRecentSearchOptions, UpdateRecentSearchResponse } from "./apis/updateRecentSearch.js";
206
+ export type { VerifyCloudMediaOptions, VerifyCloudMediaResponse } from "./apis/verifyCloudMedia.js";
207
+ export type { VoiceToTextResponse } from "./apis/voiceToText.js";
208
+ export type { Voice2TextEvent, Voice2TextEventData } from "./apis/listen.js";
168
209
  export { CloseReason } from "./apis/listen.js";
169
210
  export { LoginQRCallbackEventType } from "./apis/loginQR.js";
170
211
  export { FriendRecommendationsType } from "./apis/getFriendRecommendations.js";
@@ -176,4 +217,4 @@ export { ChatTTL } from "./apis/updateAutoDeleteChat.js";
176
217
  export { UpdateLangAvailableLanguages } from "./apis/updateLang.js";
177
218
  export { UpdateSettingsType } from "./apis/updateSettings.js";
178
219
  export { CallType } from "./apis/sendVoiceCall.js";
179
- export { generateRSAKeyPair, decryptWithPrivateKey, deriveZdbAesKey, decryptZdbBuffer, parseZdbHeader, type ZdbTocEntry, } from "./utils.js";
220
+ export { generateRSAKeyPair, decryptWithPrivateKey, deriveZdbAesKey, decryptZdbBuffer, parseZdbHeader, encryptZCloudAES, decryptZCloudAES, type ZdbTocEntry, } from "./utils.js";
package/dist/index.js CHANGED
@@ -13,4 +13,4 @@ export { ChatTTL } from "./apis/updateAutoDeleteChat.js";
13
13
  export { UpdateLangAvailableLanguages } from "./apis/updateLang.js";
14
14
  export { UpdateSettingsType } from "./apis/updateSettings.js";
15
15
  export { CallType } from "./apis/sendVoiceCall.js";
16
- export { generateRSAKeyPair, decryptWithPrivateKey, deriveZdbAesKey, decryptZdbBuffer, parseZdbHeader, } from "./utils.js";
16
+ export { generateRSAKeyPair, decryptWithPrivateKey, deriveZdbAesKey, decryptZdbBuffer, parseZdbHeader, encryptZCloudAES, decryptZCloudAES, } from "./utils.js";
package/dist/update.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { compare } from "semver";
2
2
  import { isBun, logger } from "./utils.js";
3
- const VERSION = "2.2.0";
4
- const NPM_REGISTRY = "https://registry.npmjs.org/zca-js";
3
+ const VERSION = "2.2.7";
4
+ const NPM_REGISTRY = "https://registry.npmjs.org/@softtynet/zca-js";
5
5
  export async function checkUpdate(ctx) {
6
- var _a, _b;
6
+ var _a, _b, _c;
7
7
  if (!ctx.options.checkUpdate)
8
8
  return;
9
9
  const _options = Object.assign({}, (isBun
@@ -19,11 +19,13 @@ export async function checkUpdate(ctx) {
19
19
  const data = await response.json().catch(() => null);
20
20
  if (!data)
21
21
  return;
22
- const latestVersion = data["dist-tags"].latest;
22
+ const latestVersion = (_c = data["dist-tags"]) === null || _c === void 0 ? void 0 : _c.latest;
23
+ if (!latestVersion)
24
+ return;
23
25
  if (compare(VERSION, latestVersion) === -1) {
24
- logger(ctx).info(`A new version of zca-js is available: ${latestVersion}`);
26
+ logger(ctx).info(`A new version of @softtynet/zca-js is available: ${latestVersion}`);
25
27
  }
26
28
  else {
27
- logger(ctx).info("zca-js is up to date");
29
+ logger(ctx).info("@softtynet/zca-js is up to date");
28
30
  }
29
31
  }
package/dist/utils.d.ts CHANGED
@@ -255,4 +255,14 @@ export declare function parseZdbHeader(zdbPlaintext: Buffer): {
255
255
  entries: ZdbTocEntry[];
256
256
  xzOffset: number;
257
257
  };
258
+ /**
259
+ * Encrypts a plaintext string for ZCloud / ZFamily APIs (`CLOUD_API` / `CLOUD_FAMILY_API`, module `"98yS"`),
260
+ * using AES-256-CBC with a random 16-byte IV prepended to the ciphertext before Base64 encoding.
261
+ */
262
+ export declare function encryptZCloudAES(plainText: string, base64Key: string): string;
263
+ /**
264
+ * Decrypts a Base64 payload from ZCloud / ZFamily APIs (`CLOUD_API` / `CLOUD_FAMILY_API`, module `"98yS"`),
265
+ * extracting the first 16 bytes as the AES-256-CBC IV and the remainder as PKCS#7-padded ciphertext.
266
+ */
267
+ export declare function decryptZCloudAES(base64CipherText: string, base64Key: string): string;
258
268
  export {};
package/dist/utils.js CHANGED
@@ -981,3 +981,26 @@ export function parseZdbHeader(zdbPlaintext) {
981
981
  }
982
982
  return { entries, xzOffset: offset };
983
983
  }
984
+ /**
985
+ * Encrypts a plaintext string for ZCloud / ZFamily APIs (`CLOUD_API` / `CLOUD_FAMILY_API`, module `"98yS"`),
986
+ * using AES-256-CBC with a random 16-byte IV prepended to the ciphertext before Base64 encoding.
987
+ */
988
+ export function encryptZCloudAES(plainText, base64Key) {
989
+ const key = Buffer.from(base64Key, "base64");
990
+ const iv = crypto.randomBytes(16);
991
+ const cipher = crypto.createCipheriv("aes-256-cbc", key, iv);
992
+ const encrypted = Buffer.concat([cipher.update(plainText, "utf8"), cipher.final()]);
993
+ return Buffer.concat([iv, encrypted]).toString("base64");
994
+ }
995
+ /**
996
+ * Decrypts a Base64 payload from ZCloud / ZFamily APIs (`CLOUD_API` / `CLOUD_FAMILY_API`, module `"98yS"`),
997
+ * extracting the first 16 bytes as the AES-256-CBC IV and the remainder as PKCS#7-padded ciphertext.
998
+ */
999
+ export function decryptZCloudAES(base64CipherText, base64Key) {
1000
+ const key = Buffer.from(base64Key, "base64");
1001
+ const raw = Buffer.from(base64CipherText, "base64");
1002
+ const iv = raw.subarray(0, 16);
1003
+ const ciphertext = raw.subarray(16);
1004
+ const decipher = crypto.createDecipheriv("aes-256-cbc", key, iv);
1005
+ return Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString("utf8");
1006
+ }
@@ -369,3 +369,113 @@ api.listener.on("call_event", (event) => {
369
369
  > - Kiểm định toàn diện trên Server thật (6 bước): `npm run test:live`
370
370
  > - Chỉ test nhanh Gọi Thoại + Video tới 1 UID: `npm run test:live -- --only-call --call <UID>`
371
371
  > - Chỉ test riêng Gọi Video tới 1 UID: `npm run test:live -- --only-call --video-only --call <UID>`
372
+
373
+ ---
374
+
375
+ ## 6. Hệ Sinh Thái 36 API Mới Bóc Tách Từ Zalo PC `26.7.10` (Đã Kiểm Định Live 100%)
376
+
377
+ Toàn bộ các API dưới đây được bóc tách từ mã nguồn Zalo PC `26.7.10` (macOS) và **đã vượt qua 100% kiểm định trực tiếp trên máy chủ Zalo thật (`error_code === 0`)**:
378
+
379
+ ### 6.1. Hệ Sinh Thái ZCloud & ZFamily (Chuẩn mã hóa `98yS` — AES-256-CBC với 16-Byte Random IV)
380
+
381
+ Khác với các API thông thường dùng Zero-IV, các dịch vụ ZCloud (`zcld.chat.zalo.me`) và ZFamily (`zfml.chat.zalo.me`) sử dụng cặp khóa `{ viewer_key, enk }` từ `getCloudViewerKey()` / `getFamilyViewerKey()` và giải mã dữ liệu bằng `decryptZCloudAES(data, enk)` (tự động trích xuất 16 byte đầu của bản mã Base64 làm IV).
382
+
383
+ ```ts
384
+ // 1. Lấy khóa phiên ZCloud (tùy chọn — các hàm dưới đây sẽ tự động gọi nếu không truyền vào)
385
+ const cloudKey = await api.getCloudViewerKey();
386
+
387
+ // 2. Kiểm tra dung lượng ZCloud V2, MyCloud, cài đặt ZCloud và gói Gia đình
388
+ const zcloudUsage = await api.getUsageZCloud(cloudKey);
389
+ const myCloudUsage = await api.getUsageMyCloud(cloudKey);
390
+ const cloudSettings = await api.getCloudSettings(cloudKey);
391
+ const cloudInfo = await api.getCloudInfo(cloudKey);
392
+ const familyUsage = await api.getFamilyUsage(cloudKey);
393
+ const verifyQueue = await api.verifyCloudMedia({}, cloudKey);
394
+
395
+ // 3. Lấy khóa phiên ZFamily và thông tin gói ZFamily
396
+ const familyKey = await api.getFamilyViewerKey();
397
+ const familyProfile = await api.getFamilyProfile(familyKey);
398
+ ```
399
+
400
+ ### 6.2. AI Voice-to-Text (`13394`) & Sự Kiện WebSocket `voice2text_event`
401
+
402
+ Chuyển đổi tin nhắn thoại sang văn bản bằng trí tuệ nhân tạo của Zalo:
403
+
404
+ ```ts
405
+ // Lắng nghe kết quả nhận diện giọng nói trả về bất đồng bộ qua Control WebSocket (cmd=601)
406
+ api.listener.on("voice2text_event", (event) => {
407
+ console.log("Hoàn tất chuyển giọng nói thành văn bản:", event.data.req_id, event.data);
408
+ });
409
+
410
+ // Gửi yêu cầu chuyển đổi URL file âm thanh (.aac / .m4a)
411
+ const { req_id } = await api.voiceToText("https://voice.chat.zalo.me/...");
412
+ ```
413
+
414
+ ### 6.3. Trạng Thái Cảm Xúc (Emoji Status) & Lịch Sử Tìm Kiếm Gần Đây (Recent Search)
415
+
416
+ ```ts
417
+ // Lấy bộ cấu hình Emoji Status và trạng thái hiện tại của danh sách bạn bè
418
+ const emojiConfig = await api.getEmojiStatusConfig(0);
419
+ const friendsEmoji = await api.getFriendsEmojiStatus();
420
+
421
+ // Lấy và cập nhật lịch sử tìm kiếm gần đây (tự động đồng bộ version chống lỗi 160)
422
+ const recentSearch = await api.getRecentSearchList(0);
423
+ await api.updateRecentSearch({
424
+ listRecent: recentSearch.list_recent,
425
+ listKeyword: ["SofttyNet", "Zalo SDK"],
426
+ });
427
+ ```
428
+
429
+ ### 6.4. Kho Lưu Trữ Hội Thoại (Media Store — Ảnh/Video, File, Link)
430
+
431
+ > **Lưu ý quan trọng:** Máy chủ Zalo yêu cầu `mediaType` phải thuộc 1 trong 3 giá trị: `"media"` (ảnh & video), `"file"`, hoặc `"link"`.
432
+
433
+ ```ts
434
+ // Lấy danh sách Ảnh/Video, File hoặc Link trong kho lưu trữ nhóm
435
+ const mediaItems = await api.getConversationMedia({
436
+ groupId: "6522526361652130721",
437
+ mediaType: "media", // "media" | "file" | "link"
438
+ limit: 20,
439
+ });
440
+
441
+ // Xem trước kho lưu trữ nhóm
442
+ const preview = await api.getMediaStorePreview("6522526361652130721", ThreadType.Group, 10);
443
+
444
+ // Xóa media khỏi kho lưu trữ hội thoại
445
+ await api.removeConversationMedia({
446
+ threadId: "6522526361652130721",
447
+ type: ThreadType.Group,
448
+ msgIds: ["8404893204600"],
449
+ });
450
+ ```
451
+
452
+ ### 6.5. Nhóm, Hồ Sơ, Danh Bạ, Tin Nhắn & Nhãn Dán Mở Rộng
453
+
454
+ | Phương thức `api.*` | Command ID | Endpoint | Công dụng |
455
+ | :--- | :---: | :--- | :--- |
456
+ | `api.encryptGids(uids)` | `12053` | `/api/gid/encrypt` | Mã hóa danh sách UID thật sang Global/Noise ID (chiều ngược của `decryptGids`) |
457
+ | `api.getMiniProfile(friendIds)` | `12134` | `/api/social/friend/getminiprofiles` | Lấy hồ sơ rút gọn hàng loạt của danh sách UID |
458
+ | `api.getPhonebookV2(version?)` | `12428` | `/api/social/friend/phonebook/v2` | Lấy danh bạ đồng bộ từ điện thoại (Phonebook V2) |
459
+ | `api.getAliasListV2(options?)` | `12205` | `/api/alias/list/v2` | Lấy danh sách tên gợi nhớ (Alias V2) |
460
+ | `api.getBlockFriends(options?)` | `11429` | `/api/friend/blocklistv2` | Lấy danh sách người dùng đang bị chặn (Blocklist V2) |
461
+ | `api.getExtraGroupInfo(groupIds)` | `12607` | `/api/group/userctx/multiget` | Lấy ngữ cảnh mục đích & vai trò (`purpose`, `role`) của nhiều nhóm |
462
+ | `api.getExtraFriendInfo(friendIds)` | `11442` | `/api/friend/context/multiget` | Lấy ngữ cảnh mục đích & vai trò (`purpose`, `role`) của nhiều bạn bè |
463
+ | `api.getQuotaCommunity(groupId)` | `12181` | `/api/group/quota/community` | Kiểm tra hạn mức nâng cấp Nhóm lên Cộng đồng |
464
+ | `api.getProfileRank(profileId?)` | `12012` | `/api/social/profile/getrank` | Lấy hạng tài khoản (`userRank`) |
465
+ | `api.getProfileVerificationStatus()` | `12150` | `/api/social/profile/verification/status` | Kiểm tra trạng thái xác thực định danh tài khoản |
466
+ | `api.getLastSeen({ groupIds, userIds })` | `12009` | `/api/preloadconvers/get-last-seen` | Lấy mốc tin nhắn đã xem cuối cùng của danh sách nhóm & cá nhân |
467
+ | `api.getLastSeenReaction({ groupIds, userIds })` | `12450` | `/api/react/gLastSn` | Lấy mốc biểu cảm (reaction) đã xem cuối cùng |
468
+ | `api.undoMultiMessage(items, type)` | `12115`/`12116` | `/api/message/multi_undo` | Thu hồi hàng loạt nhiều tin nhắn cá nhân hoặc nhóm cùng lúc |
469
+ | `api.getLastReadContactTab()` | `12230` | `/api/friend/last-read-contact-tab` | Lấy dấu thời gian lần cuối đọc tab Danh bạ |
470
+ | `api.readContactTab(ts?)` | `12231` | `/api/friend/read-contact-tab` | Đánh dấu đã đọc tab Danh bạ |
471
+ | `api.clearUnreadFriendRequests(uids)` | `12232` | `/api/friend/recommendsv2/read-requests` | Đánh dấu đã xem danh sách lời mời kết bạn |
472
+ | `api.getListPinTopics(groupId, ver?)` | `12001` | `/api/board/pin/list` | Lấy danh sách chủ đề / tin nhắn đã ghim trong nhóm |
473
+ | `api.getGroupCloudMessageJump(groupId, globalMsgId, count?)` | `12508` | `/api/cm/rgetv2` | Nhảy tới vị trí một tin nhắn nhóm cụ thể trên Cloud và tải ngữ cảnh xung quanh |
474
+ | `api.getStickerCategoriesV2()` | `12020` | `/api/message/sticker/category/list/v2` | Lấy danh mục các bộ Sticker V2 |
475
+ | `api.getStickerCategoryData(cid)` | `11156` | `/api/message/sticker/category/detail` | Lấy thông tin chi tiết một bộ Sticker theo `cid` |
476
+ | `api.getStickerSuggestKeywords()` | `11740` | `/api/message/sticker/suggest/keywords` | Lấy danh sách từ khóa gợi ý Sticker tự động |
477
+ | `api.getStickerSuggestion(keyword)` | `11741` | `/api/message/sticker/suggest/stickers` | Gợi ý Sticker theo từ khóa đang gõ |
478
+ | `api.getPersonalizedStickerList()` | `11745` | `/api/message/sticker/personalized/list` | Lấy danh sách Sticker cá nhân hóa |
479
+ | `api.getStickerHello()` | `11751` | `/api/message/sticker/suggestion` | Lấy bộ Sticker chào hỏi gợi ý theo khung giờ |
480
+ | `api.keepAlive()` | `11770` | `/keepalive` | Gửi tín hiệu duy trì phiên kết nối HTTP tới máy chủ Chat |
481
+