@softtynet/zca-js 2.3.3 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -21
- package/dist/apis/auth/exportSession.d.ts +7 -0
- package/dist/apis/auth/exportSession.js +17 -0
- package/dist/apis/chat/getDirectMessageStatus.d.ts +14 -0
- package/dist/apis/chat/getDirectMessageStatus.js +52 -0
- package/dist/apis/chat/getSuggestedConversations.d.ts +5 -0
- package/dist/apis/chat/getSuggestedConversations.js +24 -0
- package/dist/apis/chat/updatePinConversations.d.ts +24 -0
- package/dist/apis/chat/updatePinConversations.js +40 -0
- package/dist/apis/friend/getFriendProfilesV2.d.ts +26 -0
- package/dist/apis/friend/getFriendProfilesV2.js +38 -0
- package/dist/apis/friend/getFriendsActivePCWeb.d.ts +6 -0
- package/dist/apis/friend/getFriendsActivePCWeb.js +15 -0
- package/dist/apis/friend/verifyFriend.d.ts +11 -0
- package/dist/apis/friend/verifyFriend.js +37 -0
- package/dist/apis/group/analyseGroup.d.ts +4 -0
- package/dist/apis/group/analyseGroup.js +28 -0
- package/dist/apis/group/checkQuotaCommunityMember.d.ts +6 -0
- package/dist/apis/group/checkQuotaCommunityMember.js +34 -0
- package/dist/apis/group/getE2eeGroupList.d.ts +7 -0
- package/dist/apis/group/getE2eeGroupList.js +15 -0
- package/dist/apis/group/getGroupCloudMessagePath.d.ts +19 -0
- package/dist/apis/group/getGroupCloudMessagePath.js +51 -0
- package/dist/apis/group/getMultiGroupCloudMessages.d.ts +5 -0
- package/dist/apis/group/getMultiGroupCloudMessages.js +29 -0
- package/dist/apis/media/getPersonalMedia.d.ts +8 -0
- package/dist/apis/media/getPersonalMedia.js +31 -0
- package/dist/apis/media/getPersonalMediaPreview.d.ts +3 -0
- package/dist/apis/media/getPersonalMediaPreview.js +24 -0
- package/dist/apis/media/removePersonalMedia.d.ts +9 -0
- package/dist/apis/media/removePersonalMedia.js +28 -0
- package/dist/apis.d.ts +45 -0
- package/dist/apis.js +75 -0
- package/dist/cjs/apis/auth/exportSession.cjs +22 -0
- package/dist/cjs/apis/chat/getDirectMessageStatus.cjs +58 -0
- package/dist/cjs/apis/chat/getSuggestedConversations.cjs +29 -0
- package/dist/cjs/apis/chat/updatePinConversations.cjs +45 -0
- package/dist/cjs/apis/friend/getFriendProfilesV2.cjs +43 -0
- package/dist/cjs/apis/friend/getFriendsActivePCWeb.cjs +20 -0
- package/dist/cjs/apis/friend/verifyFriend.cjs +42 -0
- package/dist/cjs/apis/group/analyseGroup.cjs +33 -0
- package/dist/cjs/apis/group/checkQuotaCommunityMember.cjs +39 -0
- package/dist/cjs/apis/group/getE2eeGroupList.cjs +20 -0
- package/dist/cjs/apis/group/getGroupChatHistory.cjs +8 -7
- package/dist/cjs/apis/group/getGroupCloudMessagePath.cjs +69 -0
- package/dist/cjs/apis/group/getGroupHistoryLegacy.cjs +7 -6
- package/dist/cjs/apis/group/getGroupMessageStatus.cjs +7 -6
- package/dist/cjs/apis/group/getMultiGroupCloudMessages.cjs +34 -0
- package/dist/cjs/apis/media/getPersonalMedia.cjs +36 -0
- package/dist/cjs/apis/media/getPersonalMediaPreview.cjs +29 -0
- package/dist/cjs/apis/media/removePersonalMedia.cjs +33 -0
- package/dist/cjs/apis.cjs +75 -0
- package/dist/cjs/constants/protocol.cjs +1 -1
- package/dist/cjs/context.cjs +20 -2
- package/dist/cjs/core/zcloud-client.cjs +1 -2
- package/dist/cjs/crypto/ws-cipher.cjs +66 -2
- package/dist/cjs/index.cjs +9 -2
- package/dist/cjs/realtime/listener.cjs +18 -6
- package/dist/cjs/update.cjs +10 -1
- package/dist/cjs/utils.cjs +21 -68
- package/dist/constants/protocol.d.ts +1 -1
- package/dist/constants/protocol.js +1 -1
- package/dist/context.d.ts +10 -0
- package/dist/context.js +20 -2
- package/dist/crypto/ws-cipher.d.ts +7 -0
- package/dist/crypto/ws-cipher.js +64 -2
- package/dist/index.d.ts +15 -0
- package/dist/realtime/listener.d.ts +1 -0
- package/dist/realtime/listener.js +18 -6
- package/dist/update.js +10 -1
- package/dist/utils.d.ts +0 -7
- package/dist/utils.js +15 -64
- package/index.d.ts +1 -1
- package/package.json +15 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ZaloApiError } from "../../Errors/ZaloApiError.js";
|
|
2
|
+
import { apiFactory } from "../../utils.js";
|
|
3
|
+
export const getMultiGroupCloudMessagesFactory = apiFactory()((api, _ctx, utils) => {
|
|
4
|
+
const serviceURL = utils.makeURL(`${api.zpwServiceMap.group_cloud_message[0]}/api/cm/mget`);
|
|
5
|
+
/**
|
|
6
|
+
* Đồng bộ nhanh tin nhắn Cloud của nhiều nhóm cùng lúc theo danh sách `groupIds` (command 12503 - `syncCloudMsgFirstLogin`)
|
|
7
|
+
*
|
|
8
|
+
* @param groupIds Danh sách ID nhóm cần tải tin nhắn Cloud
|
|
9
|
+
* @param nretry Số lần thử lại (mặc định: `0`)
|
|
10
|
+
* @throws {ZaloApiError}
|
|
11
|
+
*/
|
|
12
|
+
return async function getMultiGroupCloudMessages(groupIds, nretry = 0) {
|
|
13
|
+
if (!Array.isArray(groupIds) || groupIds.length === 0) {
|
|
14
|
+
throw new ZaloApiError("Missing groupIds");
|
|
15
|
+
}
|
|
16
|
+
const cleanGroupIds = groupIds.map((gid) => (gid.startsWith("g") ? gid.slice(1) : gid));
|
|
17
|
+
const params = {
|
|
18
|
+
groupIds: cleanGroupIds,
|
|
19
|
+
};
|
|
20
|
+
const encryptedParams = utils.encodeAES(JSON.stringify(params));
|
|
21
|
+
if (!encryptedParams) {
|
|
22
|
+
throw new ZaloApiError("Failed to encrypt params");
|
|
23
|
+
}
|
|
24
|
+
const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams, nretry }), {
|
|
25
|
+
method: "GET",
|
|
26
|
+
});
|
|
27
|
+
return utils.resolve(response);
|
|
28
|
+
};
|
|
29
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GetConversationMediaResponse, MediaStoreType } from "./getConversationMedia.js";
|
|
2
|
+
export type GetPersonalMediaOptions = {
|
|
3
|
+
mediaType?: MediaStoreType;
|
|
4
|
+
limit?: number;
|
|
5
|
+
lastId?: number | string;
|
|
6
|
+
lastFetchId?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const getPersonalMediaFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (options?: GetPersonalMediaOptions) => Promise<GetConversationMediaResponse>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ZaloApiError } from "../../Errors/ZaloApiError.js";
|
|
2
|
+
import { apiFactory } from "../../utils.js";
|
|
3
|
+
export const getPersonalMediaFactory = apiFactory()((api, _ctx, utils) => {
|
|
4
|
+
const serviceURL = utils.makeURL(`${api.zpwServiceMap.media_store_send2me[0]}/api/media/oneone/list`);
|
|
5
|
+
/**
|
|
6
|
+
* Lấy danh sách Kho Lưu Trữ Ảnh/Video (`"media"`), File (`"file"`), hoặc Link (`"link"`) trong Cloud của tôi (Send2Me) (command 12220)
|
|
7
|
+
*
|
|
8
|
+
* @param options Tùy chọn truy vấn (`mediaType`, `limit`, `lastId`, `lastFetchId`)
|
|
9
|
+
* @throws {ZaloApiError}
|
|
10
|
+
*/
|
|
11
|
+
return async function getPersonalMedia(options = {}) {
|
|
12
|
+
const params = {
|
|
13
|
+
media_type: options.mediaType ?? "media",
|
|
14
|
+
limit: options.limit ?? 20,
|
|
15
|
+
};
|
|
16
|
+
if (options.lastId !== undefined) {
|
|
17
|
+
params.last_id = options.lastId;
|
|
18
|
+
}
|
|
19
|
+
if (options.lastFetchId !== undefined && !Number.isNaN(options.lastFetchId)) {
|
|
20
|
+
params.lastFetchId = options.lastFetchId;
|
|
21
|
+
}
|
|
22
|
+
const encryptedParams = utils.encodeAES(JSON.stringify(params));
|
|
23
|
+
if (!encryptedParams) {
|
|
24
|
+
throw new ZaloApiError("Failed to encrypt params");
|
|
25
|
+
}
|
|
26
|
+
const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams }), {
|
|
27
|
+
method: "GET",
|
|
28
|
+
});
|
|
29
|
+
return utils.resolve(response);
|
|
30
|
+
};
|
|
31
|
+
});
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MediaStoreItem } from "./getConversationMedia.js";
|
|
2
|
+
export type GetPersonalMediaPreviewResponse = MediaStoreItem[];
|
|
3
|
+
export declare const getPersonalMediaPreviewFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (limit?: number) => Promise<GetPersonalMediaPreviewResponse>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ZaloApiError } from "../../Errors/ZaloApiError.js";
|
|
2
|
+
import { apiFactory } from "../../utils.js";
|
|
3
|
+
export const getPersonalMediaPreviewFactory = apiFactory()((api, _ctx, utils) => {
|
|
4
|
+
const serviceURL = utils.makeURL(`${api.zpwServiceMap.media_store_send2me[0]}/api/media/oneone/preview`);
|
|
5
|
+
/**
|
|
6
|
+
* Lấy danh sách xem trước nhanh Kho Lưu Trữ trong Cloud của tôi (Send2Me) (command 12221)
|
|
7
|
+
*
|
|
8
|
+
* @param limit Số lượng mục tối đa (mặc định: `50`)
|
|
9
|
+
* @throws {ZaloApiError}
|
|
10
|
+
*/
|
|
11
|
+
return async function getPersonalMediaPreview(limit = 50) {
|
|
12
|
+
const params = {
|
|
13
|
+
limit,
|
|
14
|
+
};
|
|
15
|
+
const encryptedParams = utils.encodeAES(JSON.stringify(params));
|
|
16
|
+
if (!encryptedParams) {
|
|
17
|
+
throw new ZaloApiError("Failed to encrypt params");
|
|
18
|
+
}
|
|
19
|
+
const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams }), {
|
|
20
|
+
method: "POST",
|
|
21
|
+
});
|
|
22
|
+
return utils.resolve(response);
|
|
23
|
+
};
|
|
24
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MediaStoreType } from "./getConversationMedia.js";
|
|
2
|
+
export type RemovePersonalMediaOptions = {
|
|
3
|
+
mediaType: MediaStoreType;
|
|
4
|
+
mediaId: number | string | Array<number | string>;
|
|
5
|
+
};
|
|
6
|
+
export type RemovePersonalMediaResponse = {
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
export declare const removePersonalMediaFactory: (ctx: import("../../context.js").ContextBase, api: import("../../apis.js").API) => (options: RemovePersonalMediaOptions) => Promise<RemovePersonalMediaResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ZaloApiError } from "../../Errors/ZaloApiError.js";
|
|
2
|
+
import { apiFactory } from "../../utils.js";
|
|
3
|
+
export const removePersonalMediaFactory = apiFactory()((api, _ctx, utils) => {
|
|
4
|
+
const serviceURL = utils.makeURL(`${api.zpwServiceMap.media_store_send2me[0]}/api/media/oneone/remove`);
|
|
5
|
+
/**
|
|
6
|
+
* Xóa mục lưu trữ trong Kho Lưu Trữ Cloud của tôi (Send2Me) (command 12222)
|
|
7
|
+
*
|
|
8
|
+
* @param options Thông tin mục cần xóa (`mediaType`, `mediaId`)
|
|
9
|
+
* @throws {ZaloApiError}
|
|
10
|
+
*/
|
|
11
|
+
return async function removePersonalMedia(options) {
|
|
12
|
+
if (!options?.mediaType || options.mediaId === undefined) {
|
|
13
|
+
throw new ZaloApiError("Missing mediaType or mediaId");
|
|
14
|
+
}
|
|
15
|
+
const params = {
|
|
16
|
+
media_type: options.mediaType,
|
|
17
|
+
media_id: options.mediaId,
|
|
18
|
+
};
|
|
19
|
+
const encryptedParams = utils.encodeAES(JSON.stringify(params));
|
|
20
|
+
if (!encryptedParams) {
|
|
21
|
+
throw new ZaloApiError("Failed to encrypt params");
|
|
22
|
+
}
|
|
23
|
+
const response = await utils.request(utils.makeURL(serviceURL, { params: encryptedParams }), {
|
|
24
|
+
method: "POST",
|
|
25
|
+
});
|
|
26
|
+
return utils.resolve(response);
|
|
27
|
+
};
|
|
28
|
+
});
|
package/dist/apis.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { addQuickMessageFactory } from "./apis/business/addQuickMessage.js";
|
|
|
7
7
|
import { addReactionFactory } from "./apis/chat/addReaction.js";
|
|
8
8
|
import { addUnreadMarkFactory } from "./apis/chat/addUnreadMark.js";
|
|
9
9
|
import { addUserToGroupFactory } from "./apis/group/addUserToGroup.js";
|
|
10
|
+
import { analyseGroupFactory } from "./apis/group/analyseGroup.js";
|
|
10
11
|
import { blockUserFactory } from "./apis/friend/blockUser.js";
|
|
11
12
|
import { blockViewFeedFactory } from "./apis/friend/blockViewFeed.js";
|
|
12
13
|
import { cancelPullMobileFactory } from "./apis/sync/cancelPullMobile.js";
|
|
@@ -16,6 +17,7 @@ import { changeFriendAliasFactory } from "./apis/friend/changeFriendAlias.js";
|
|
|
16
17
|
import { changeGroupAvatarFactory } from "./apis/group/changeGroupAvatar.js";
|
|
17
18
|
import { changeGroupNameFactory } from "./apis/group/changeGroupName.js";
|
|
18
19
|
import { changeGroupOwnerFactory } from "./apis/group/changeGroupOwner.js";
|
|
20
|
+
import { checkQuotaCommunityMemberFactory } from "./apis/group/checkQuotaCommunityMember.js";
|
|
19
21
|
import { clearUnreadFriendRequestsFactory } from "./apis/friend/clearUnreadFriendRequests.js";
|
|
20
22
|
import { createAutoReplyFactory } from "./apis/business/createAutoReply.js";
|
|
21
23
|
import { createBankAccountFactory } from "./apis/business/createBankAccount.js";
|
|
@@ -42,6 +44,7 @@ import { editReminderFactory } from "./apis/board/editReminder.js";
|
|
|
42
44
|
import { enableGroupLinkFactory } from "./apis/group/enableGroupLink.js";
|
|
43
45
|
import { encryptGidsFactory } from "./apis/auth/encryptGids.js";
|
|
44
46
|
import { endVoiceCallFactory } from "./apis/call/endVoiceCall.js";
|
|
47
|
+
import { exportSessionFactory } from "./apis/auth/exportSession.js";
|
|
45
48
|
import { fetchAccountInfoFactory } from "./apis/profile/fetchAccountInfo.js";
|
|
46
49
|
import { findUserFactory } from "./apis/friend/findUser.js";
|
|
47
50
|
import { findUserByUsernameFactory } from "./apis/friend/findUserByUsername.js";
|
|
@@ -65,6 +68,8 @@ import { getCloudViewerKeyFactory } from "./apis/zcloud/getCloudViewerKey.js";
|
|
|
65
68
|
import { getContextFactory } from "./apis/auth/getContext.js";
|
|
66
69
|
import { getConversationMediaFactory } from "./apis/media/getConversationMedia.js";
|
|
67
70
|
import { getCookieFactory } from "./apis/auth/getCookie.js";
|
|
71
|
+
import { getDirectMessageStatusFactory } from "./apis/chat/getDirectMessageStatus.js";
|
|
72
|
+
import { getE2eeGroupListFactory } from "./apis/group/getE2eeGroupList.js";
|
|
68
73
|
import { getEmojiStatusConfigFactory } from "./apis/profile/getEmojiStatusConfig.js";
|
|
69
74
|
import { getExtraFriendInfoFactory } from "./apis/friend/getExtraFriendInfo.js";
|
|
70
75
|
import { getExtraGroupInfoFactory } from "./apis/group/getExtraGroupInfo.js";
|
|
@@ -73,13 +78,16 @@ import { getFamilyUsageFactory } from "./apis/zcloud/getFamilyUsage.js";
|
|
|
73
78
|
import { getFamilyViewerKeyFactory } from "./apis/zcloud/getFamilyViewerKey.js";
|
|
74
79
|
import { getFriendBoardListFactory } from "./apis/friend/getFriendBoardList.js";
|
|
75
80
|
import { getFriendOnlinesFactory } from "./apis/friend/getFriendOnlines.js";
|
|
81
|
+
import { getFriendProfilesV2Factory } from "./apis/friend/getFriendProfilesV2.js";
|
|
76
82
|
import { getFriendRecommendationsFactory } from "./apis/friend/getFriendRecommendations.js";
|
|
77
83
|
import { getFriendRequestStatusFactory } from "./apis/friend/getFriendRequestStatus.js";
|
|
84
|
+
import { getFriendsActivePCWebFactory } from "./apis/friend/getFriendsActivePCWeb.js";
|
|
78
85
|
import { getFriendsEmojiStatusFactory } from "./apis/friend/getFriendsEmojiStatus.js";
|
|
79
86
|
import { getFullAvatarFactory } from "./apis/profile/getFullAvatar.js";
|
|
80
87
|
import { getGroupBlockedMemberFactory } from "./apis/group/getGroupBlockedMember.js";
|
|
81
88
|
import { getGroupChatHistoryFactory } from "./apis/group/getGroupChatHistory.js";
|
|
82
89
|
import { getGroupCloudMessageJumpFactory } from "./apis/group/getGroupCloudMessageJump.js";
|
|
90
|
+
import { getGroupCloudMessagePathFactory } from "./apis/group/getGroupCloudMessagePath.js";
|
|
83
91
|
import { getGroupHistoryLegacyFactory } from "./apis/group/getGroupHistoryLegacy.js";
|
|
84
92
|
import { getGroupInfoFactory } from "./apis/group/getGroupInfo.js";
|
|
85
93
|
import { getGroupInfoV2Factory } from "./apis/group/getGroupInfoV2.js";
|
|
@@ -103,12 +111,15 @@ import { getListPinTopicsFactory } from "./apis/board/getListPinTopics.js";
|
|
|
103
111
|
import { getListReminderFactory } from "./apis/board/getListReminder.js";
|
|
104
112
|
import { getMediaStorePreviewFactory } from "./apis/media/getMediaStorePreview.js";
|
|
105
113
|
import { getMiniProfileFactory } from "./apis/profile/getMiniProfile.js";
|
|
114
|
+
import { getMultiGroupCloudMessagesFactory } from "./apis/group/getMultiGroupCloudMessages.js";
|
|
106
115
|
import { getMultiUsersByPhonesFactory } from "./apis/friend/getMultiUsersByPhones.js";
|
|
107
116
|
import { getMuteFactory } from "./apis/chat/getMute.js";
|
|
108
117
|
import { getNoisedIdsFactory } from "./apis/auth/getNoisedIds.js";
|
|
109
118
|
import { getOwnIdFactory } from "./apis/auth/getOwnId.js";
|
|
110
119
|
import { getPendingGroupMembersFactory } from "./apis/group/getPendingGroupMembers.js";
|
|
111
120
|
import { getPersonalizedStickerListFactory } from "./apis/sticker/getPersonalizedStickerList.js";
|
|
121
|
+
import { getPersonalMediaFactory } from "./apis/media/getPersonalMedia.js";
|
|
122
|
+
import { getPersonalMediaPreviewFactory } from "./apis/media/getPersonalMediaPreview.js";
|
|
112
123
|
import { getPhonebookV2Factory } from "./apis/friend/getPhonebookV2.js";
|
|
113
124
|
import { getPinConversationsFactory } from "./apis/chat/getPinConversations.js";
|
|
114
125
|
import { getPollDetailFactory } from "./apis/board/getPollDetail.js";
|
|
@@ -132,6 +143,7 @@ import { getStickersFactory } from "./apis/sticker/getStickers.js";
|
|
|
132
143
|
import { getStickersDetailFactory } from "./apis/sticker/getStickersDetail.js";
|
|
133
144
|
import { getStickerSuggestionFactory } from "./apis/sticker/getStickerSuggestion.js";
|
|
134
145
|
import { getStickerSuggestKeywordsFactory } from "./apis/sticker/getStickerSuggestKeywords.js";
|
|
146
|
+
import { getSuggestedConversationsFactory } from "./apis/chat/getSuggestedConversations.js";
|
|
135
147
|
import { getSyncDataFactory } from "./apis/sync/getSyncData.js";
|
|
136
148
|
import { getUnreadMarkFactory } from "./apis/chat/getUnreadMark.js";
|
|
137
149
|
import { getUsageMyCloudFactory } from "./apis/zcloud/getUsageMyCloud.js";
|
|
@@ -156,6 +168,7 @@ import { removeFriendFactory } from "./apis/friend/removeFriend.js";
|
|
|
156
168
|
import { removeFriendAliasFactory } from "./apis/friend/removeFriendAlias.js";
|
|
157
169
|
import { removeGroupBlockedMemberFactory } from "./apis/group/removeGroupBlockedMember.js";
|
|
158
170
|
import { removeGroupDeputyFactory } from "./apis/group/removeGroupDeputy.js";
|
|
171
|
+
import { removePersonalMediaFactory } from "./apis/media/removePersonalMedia.js";
|
|
159
172
|
import { removeQuickMessageFactory } from "./apis/business/removeQuickMessage.js";
|
|
160
173
|
import { removeReminderFactory } from "./apis/board/removeReminder.js";
|
|
161
174
|
import { removeUnreadMarkFactory } from "./apis/chat/removeUnreadMark.js";
|
|
@@ -197,6 +210,7 @@ import { updateGroupSettingsFactory } from "./apis/group/updateGroupSettings.js"
|
|
|
197
210
|
import { updateHiddenConversPinFactory } from "./apis/chat/updateHiddenConversPin.js";
|
|
198
211
|
import { updateLabelsFactory } from "./apis/business/updateLabels.js";
|
|
199
212
|
import { updateLangFactory } from "./apis/auth/updateLang.js";
|
|
213
|
+
import { updatePinConversationsFactory } from "./apis/chat/updatePinConversations.js";
|
|
200
214
|
import { updateProductCatalogFactory } from "./apis/business/updateProductCatalog.js";
|
|
201
215
|
import { updateProfileFactory } from "./apis/profile/updateProfile.js";
|
|
202
216
|
import { updateProfileBioFactory } from "./apis/profile/updateProfileBio.js";
|
|
@@ -207,6 +221,7 @@ import { upgradeGroupToCommunityFactory } from "./apis/group/upgradeGroupToCommu
|
|
|
207
221
|
import { uploadAttachmentFactory } from "./apis/media/uploadAttachment.js";
|
|
208
222
|
import { uploadProductPhotoFactory } from "./apis/business/uploadProductPhoto.js";
|
|
209
223
|
import { verifyCloudMediaFactory } from "./apis/zcloud/verifyCloudMedia.js";
|
|
224
|
+
import { verifyFriendFactory } from "./apis/friend/verifyFriend.js";
|
|
210
225
|
import { voiceToTextFactory } from "./apis/media/voiceToText.js";
|
|
211
226
|
import { votePollFactory } from "./apis/board/votePoll.js";
|
|
212
227
|
import { customFactory } from "./apis/custom.js";
|
|
@@ -214,6 +229,7 @@ import type { ZPWServiceMap, ContextSession } from "./context.js";
|
|
|
214
229
|
export type AuthDomainAPI = {
|
|
215
230
|
readonly decryptGids: ReturnType<typeof decryptGidsFactory>;
|
|
216
231
|
readonly encryptGids: ReturnType<typeof encryptGidsFactory>;
|
|
232
|
+
readonly exportSession: ReturnType<typeof exportSessionFactory>;
|
|
217
233
|
readonly getContext: ReturnType<typeof getContextFactory>;
|
|
218
234
|
readonly getCookie: ReturnType<typeof getCookieFactory>;
|
|
219
235
|
readonly getListDevice: ReturnType<typeof getListDeviceFactory>;
|
|
@@ -285,12 +301,14 @@ export type ChatDomainAPI = {
|
|
|
285
301
|
readonly forwardMessage: ReturnType<typeof forwardMessageFactory>;
|
|
286
302
|
readonly getArchivedChatList: ReturnType<typeof getArchivedChatListFactory>;
|
|
287
303
|
readonly getAutoDeleteChat: ReturnType<typeof getAutoDeleteChatFactory>;
|
|
304
|
+
readonly getDirectMessageStatus: ReturnType<typeof getDirectMessageStatusFactory>;
|
|
288
305
|
readonly getHiddenConversations: ReturnType<typeof getHiddenConversationsFactory>;
|
|
289
306
|
readonly getLastSeen: ReturnType<typeof getLastSeenFactory>;
|
|
290
307
|
readonly getLastSeenReaction: ReturnType<typeof getLastSeenReactionFactory>;
|
|
291
308
|
readonly getMute: ReturnType<typeof getMuteFactory>;
|
|
292
309
|
readonly getPinConversations: ReturnType<typeof getPinConversationsFactory>;
|
|
293
310
|
readonly getRecentSearchList: ReturnType<typeof getRecentSearchListFactory>;
|
|
311
|
+
readonly getSuggestedConversations: ReturnType<typeof getSuggestedConversationsFactory>;
|
|
294
312
|
readonly getUnreadMark: ReturnType<typeof getUnreadMarkFactory>;
|
|
295
313
|
readonly parseLink: ReturnType<typeof parseLinkFactory>;
|
|
296
314
|
readonly preloadConversations: ReturnType<typeof preloadConversationsFactory>;
|
|
@@ -315,6 +333,7 @@ export type ChatDomainAPI = {
|
|
|
315
333
|
readonly updateArchivedChatList: ReturnType<typeof updateArchivedChatListFactory>;
|
|
316
334
|
readonly updateAutoDeleteChat: ReturnType<typeof updateAutoDeleteChatFactory>;
|
|
317
335
|
readonly updateHiddenConversPin: ReturnType<typeof updateHiddenConversPinFactory>;
|
|
336
|
+
readonly updatePinConversations: ReturnType<typeof updatePinConversationsFactory>;
|
|
318
337
|
readonly updateRecentSearch: ReturnType<typeof updateRecentSearchFactory>;
|
|
319
338
|
};
|
|
320
339
|
export type FriendDomainAPI = {
|
|
@@ -333,8 +352,10 @@ export type FriendDomainAPI = {
|
|
|
333
352
|
readonly getExtraFriendInfo: ReturnType<typeof getExtraFriendInfoFactory>;
|
|
334
353
|
readonly getFriendBoardList: ReturnType<typeof getFriendBoardListFactory>;
|
|
335
354
|
readonly getFriendOnlines: ReturnType<typeof getFriendOnlinesFactory>;
|
|
355
|
+
readonly getFriendProfilesV2: ReturnType<typeof getFriendProfilesV2Factory>;
|
|
336
356
|
readonly getFriendRecommendations: ReturnType<typeof getFriendRecommendationsFactory>;
|
|
337
357
|
readonly getFriendRequestStatus: ReturnType<typeof getFriendRequestStatusFactory>;
|
|
358
|
+
readonly getFriendsActivePCWeb: ReturnType<typeof getFriendsActivePCWebFactory>;
|
|
338
359
|
readonly getFriendsEmojiStatus: ReturnType<typeof getFriendsEmojiStatusFactory>;
|
|
339
360
|
readonly getLastReadContactTab: ReturnType<typeof getLastReadContactTabFactory>;
|
|
340
361
|
readonly getMultiUsersByPhones: ReturnType<typeof getMultiUsersByPhonesFactory>;
|
|
@@ -348,24 +369,29 @@ export type FriendDomainAPI = {
|
|
|
348
369
|
readonly sendFriendRequest: ReturnType<typeof sendFriendRequestFactory>;
|
|
349
370
|
readonly unblockUser: ReturnType<typeof unblockUserFactory>;
|
|
350
371
|
readonly undoFriendRequest: ReturnType<typeof undoFriendRequestFactory>;
|
|
372
|
+
readonly verifyFriend: ReturnType<typeof verifyFriendFactory>;
|
|
351
373
|
};
|
|
352
374
|
export type GroupDomainAPI = {
|
|
353
375
|
readonly addGroupBlockedMember: ReturnType<typeof addGroupBlockedMemberFactory>;
|
|
354
376
|
readonly addGroupDeputy: ReturnType<typeof addGroupDeputyFactory>;
|
|
355
377
|
readonly addUserToGroup: ReturnType<typeof addUserToGroupFactory>;
|
|
378
|
+
readonly analyseGroup: ReturnType<typeof analyseGroupFactory>;
|
|
356
379
|
readonly changeGroupAvatar: ReturnType<typeof changeGroupAvatarFactory>;
|
|
357
380
|
readonly changeGroupName: ReturnType<typeof changeGroupNameFactory>;
|
|
358
381
|
readonly changeGroupOwner: ReturnType<typeof changeGroupOwnerFactory>;
|
|
382
|
+
readonly checkQuotaCommunityMember: ReturnType<typeof checkQuotaCommunityMemberFactory>;
|
|
359
383
|
readonly createGroup: ReturnType<typeof createGroupFactory>;
|
|
360
384
|
readonly deleteGroupInviteBox: ReturnType<typeof deleteGroupInviteBoxFactory>;
|
|
361
385
|
readonly disableGroupLink: ReturnType<typeof disableGroupLinkFactory>;
|
|
362
386
|
readonly disperseGroup: ReturnType<typeof disperseGroupFactory>;
|
|
363
387
|
readonly enableGroupLink: ReturnType<typeof enableGroupLinkFactory>;
|
|
364
388
|
readonly getAllGroups: ReturnType<typeof getAllGroupsFactory>;
|
|
389
|
+
readonly getE2eeGroupList: ReturnType<typeof getE2eeGroupListFactory>;
|
|
365
390
|
readonly getExtraGroupInfo: ReturnType<typeof getExtraGroupInfoFactory>;
|
|
366
391
|
readonly getGroupBlockedMember: ReturnType<typeof getGroupBlockedMemberFactory>;
|
|
367
392
|
readonly getGroupChatHistory: ReturnType<typeof getGroupChatHistoryFactory>;
|
|
368
393
|
readonly getGroupCloudMessageJump: ReturnType<typeof getGroupCloudMessageJumpFactory>;
|
|
394
|
+
readonly getGroupCloudMessagePath: ReturnType<typeof getGroupCloudMessagePathFactory>;
|
|
369
395
|
readonly getGroupHistoryLegacy: ReturnType<typeof getGroupHistoryLegacyFactory>;
|
|
370
396
|
readonly getGroupInfo: ReturnType<typeof getGroupInfoFactory>;
|
|
371
397
|
readonly getGroupInfoV2: ReturnType<typeof getGroupInfoV2Factory>;
|
|
@@ -376,6 +402,7 @@ export type GroupDomainAPI = {
|
|
|
376
402
|
readonly getGroupListV3: ReturnType<typeof getGroupListV3Factory>;
|
|
377
403
|
readonly getGroupMembersInfo: ReturnType<typeof getGroupMembersInfoFactory>;
|
|
378
404
|
readonly getGroupMessageStatus: ReturnType<typeof getGroupMessageStatusFactory>;
|
|
405
|
+
readonly getMultiGroupCloudMessages: ReturnType<typeof getMultiGroupCloudMessagesFactory>;
|
|
379
406
|
readonly getPendingGroupMembers: ReturnType<typeof getPendingGroupMembersFactory>;
|
|
380
407
|
readonly getQuotaCommunity: ReturnType<typeof getQuotaCommunityFactory>;
|
|
381
408
|
readonly getRelatedFriendGroup: ReturnType<typeof getRelatedFriendGroupFactory>;
|
|
@@ -393,7 +420,10 @@ export type GroupDomainAPI = {
|
|
|
393
420
|
export type MediaDomainAPI = {
|
|
394
421
|
readonly getConversationMedia: ReturnType<typeof getConversationMediaFactory>;
|
|
395
422
|
readonly getMediaStorePreview: ReturnType<typeof getMediaStorePreviewFactory>;
|
|
423
|
+
readonly getPersonalMedia: ReturnType<typeof getPersonalMediaFactory>;
|
|
424
|
+
readonly getPersonalMediaPreview: ReturnType<typeof getPersonalMediaPreviewFactory>;
|
|
396
425
|
readonly removeConversationMedia: ReturnType<typeof removeConversationMediaFactory>;
|
|
426
|
+
readonly removePersonalMedia: ReturnType<typeof removePersonalMediaFactory>;
|
|
397
427
|
readonly uploadAttachment: ReturnType<typeof uploadAttachmentFactory>;
|
|
398
428
|
readonly voiceToText: ReturnType<typeof voiceToTextFactory>;
|
|
399
429
|
};
|
|
@@ -473,6 +503,7 @@ export declare class API {
|
|
|
473
503
|
get addReaction(): ReturnType<typeof addReactionFactory>;
|
|
474
504
|
get addUnreadMark(): ReturnType<typeof addUnreadMarkFactory>;
|
|
475
505
|
get addUserToGroup(): ReturnType<typeof addUserToGroupFactory>;
|
|
506
|
+
get analyseGroup(): ReturnType<typeof analyseGroupFactory>;
|
|
476
507
|
get blockUser(): ReturnType<typeof blockUserFactory>;
|
|
477
508
|
get blockViewFeed(): ReturnType<typeof blockViewFeedFactory>;
|
|
478
509
|
get cancelPullMobile(): ReturnType<typeof cancelPullMobileFactory>;
|
|
@@ -482,6 +513,7 @@ export declare class API {
|
|
|
482
513
|
get changeGroupAvatar(): ReturnType<typeof changeGroupAvatarFactory>;
|
|
483
514
|
get changeGroupName(): ReturnType<typeof changeGroupNameFactory>;
|
|
484
515
|
get changeGroupOwner(): ReturnType<typeof changeGroupOwnerFactory>;
|
|
516
|
+
get checkQuotaCommunityMember(): ReturnType<typeof checkQuotaCommunityMemberFactory>;
|
|
485
517
|
get clearUnreadFriendRequests(): ReturnType<typeof clearUnreadFriendRequestsFactory>;
|
|
486
518
|
get createAutoReply(): ReturnType<typeof createAutoReplyFactory>;
|
|
487
519
|
get createBankAccount(): ReturnType<typeof createBankAccountFactory>;
|
|
@@ -508,6 +540,7 @@ export declare class API {
|
|
|
508
540
|
get enableGroupLink(): ReturnType<typeof enableGroupLinkFactory>;
|
|
509
541
|
get encryptGids(): ReturnType<typeof encryptGidsFactory>;
|
|
510
542
|
get endVoiceCall(): ReturnType<typeof endVoiceCallFactory>;
|
|
543
|
+
get exportSession(): ReturnType<typeof exportSessionFactory>;
|
|
511
544
|
get fetchAccountInfo(): ReturnType<typeof fetchAccountInfoFactory>;
|
|
512
545
|
get findUser(): ReturnType<typeof findUserFactory>;
|
|
513
546
|
get findUserByUsername(): ReturnType<typeof findUserByUsernameFactory>;
|
|
@@ -531,6 +564,8 @@ export declare class API {
|
|
|
531
564
|
get getContext(): ReturnType<typeof getContextFactory>;
|
|
532
565
|
get getConversationMedia(): ReturnType<typeof getConversationMediaFactory>;
|
|
533
566
|
get getCookie(): ReturnType<typeof getCookieFactory>;
|
|
567
|
+
get getDirectMessageStatus(): ReturnType<typeof getDirectMessageStatusFactory>;
|
|
568
|
+
get getE2eeGroupList(): ReturnType<typeof getE2eeGroupListFactory>;
|
|
534
569
|
get getEmojiStatusConfig(): ReturnType<typeof getEmojiStatusConfigFactory>;
|
|
535
570
|
get getExtraFriendInfo(): ReturnType<typeof getExtraFriendInfoFactory>;
|
|
536
571
|
get getExtraGroupInfo(): ReturnType<typeof getExtraGroupInfoFactory>;
|
|
@@ -539,13 +574,16 @@ export declare class API {
|
|
|
539
574
|
get getFamilyViewerKey(): ReturnType<typeof getFamilyViewerKeyFactory>;
|
|
540
575
|
get getFriendBoardList(): ReturnType<typeof getFriendBoardListFactory>;
|
|
541
576
|
get getFriendOnlines(): ReturnType<typeof getFriendOnlinesFactory>;
|
|
577
|
+
get getFriendProfilesV2(): ReturnType<typeof getFriendProfilesV2Factory>;
|
|
542
578
|
get getFriendRecommendations(): ReturnType<typeof getFriendRecommendationsFactory>;
|
|
543
579
|
get getFriendRequestStatus(): ReturnType<typeof getFriendRequestStatusFactory>;
|
|
580
|
+
get getFriendsActivePCWeb(): ReturnType<typeof getFriendsActivePCWebFactory>;
|
|
544
581
|
get getFriendsEmojiStatus(): ReturnType<typeof getFriendsEmojiStatusFactory>;
|
|
545
582
|
get getFullAvatar(): ReturnType<typeof getFullAvatarFactory>;
|
|
546
583
|
get getGroupBlockedMember(): ReturnType<typeof getGroupBlockedMemberFactory>;
|
|
547
584
|
get getGroupChatHistory(): ReturnType<typeof getGroupChatHistoryFactory>;
|
|
548
585
|
get getGroupCloudMessageJump(): ReturnType<typeof getGroupCloudMessageJumpFactory>;
|
|
586
|
+
get getGroupCloudMessagePath(): ReturnType<typeof getGroupCloudMessagePathFactory>;
|
|
549
587
|
get getGroupHistoryLegacy(): ReturnType<typeof getGroupHistoryLegacyFactory>;
|
|
550
588
|
get getGroupInfo(): ReturnType<typeof getGroupInfoFactory>;
|
|
551
589
|
get getGroupInfoV2(): ReturnType<typeof getGroupInfoV2Factory>;
|
|
@@ -569,12 +607,15 @@ export declare class API {
|
|
|
569
607
|
get getListReminder(): ReturnType<typeof getListReminderFactory>;
|
|
570
608
|
get getMediaStorePreview(): ReturnType<typeof getMediaStorePreviewFactory>;
|
|
571
609
|
get getMiniProfile(): ReturnType<typeof getMiniProfileFactory>;
|
|
610
|
+
get getMultiGroupCloudMessages(): ReturnType<typeof getMultiGroupCloudMessagesFactory>;
|
|
572
611
|
get getMultiUsersByPhones(): ReturnType<typeof getMultiUsersByPhonesFactory>;
|
|
573
612
|
get getMute(): ReturnType<typeof getMuteFactory>;
|
|
574
613
|
get getNoisedIds(): ReturnType<typeof getNoisedIdsFactory>;
|
|
575
614
|
get getOwnId(): ReturnType<typeof getOwnIdFactory>;
|
|
576
615
|
get getPendingGroupMembers(): ReturnType<typeof getPendingGroupMembersFactory>;
|
|
577
616
|
get getPersonalizedStickerList(): ReturnType<typeof getPersonalizedStickerListFactory>;
|
|
617
|
+
get getPersonalMedia(): ReturnType<typeof getPersonalMediaFactory>;
|
|
618
|
+
get getPersonalMediaPreview(): ReturnType<typeof getPersonalMediaPreviewFactory>;
|
|
578
619
|
get getPhonebookV2(): ReturnType<typeof getPhonebookV2Factory>;
|
|
579
620
|
get getPinConversations(): ReturnType<typeof getPinConversationsFactory>;
|
|
580
621
|
get getPollDetail(): ReturnType<typeof getPollDetailFactory>;
|
|
@@ -598,6 +639,7 @@ export declare class API {
|
|
|
598
639
|
get getStickersDetail(): ReturnType<typeof getStickersDetailFactory>;
|
|
599
640
|
get getStickerSuggestion(): ReturnType<typeof getStickerSuggestionFactory>;
|
|
600
641
|
get getStickerSuggestKeywords(): ReturnType<typeof getStickerSuggestKeywordsFactory>;
|
|
642
|
+
get getSuggestedConversations(): ReturnType<typeof getSuggestedConversationsFactory>;
|
|
601
643
|
get getSyncData(): ReturnType<typeof getSyncDataFactory>;
|
|
602
644
|
get getUnreadMark(): ReturnType<typeof getUnreadMarkFactory>;
|
|
603
645
|
get getUsageMyCloud(): ReturnType<typeof getUsageMyCloudFactory>;
|
|
@@ -622,6 +664,7 @@ export declare class API {
|
|
|
622
664
|
get removeFriendAlias(): ReturnType<typeof removeFriendAliasFactory>;
|
|
623
665
|
get removeGroupBlockedMember(): ReturnType<typeof removeGroupBlockedMemberFactory>;
|
|
624
666
|
get removeGroupDeputy(): ReturnType<typeof removeGroupDeputyFactory>;
|
|
667
|
+
get removePersonalMedia(): ReturnType<typeof removePersonalMediaFactory>;
|
|
625
668
|
get removeQuickMessage(): ReturnType<typeof removeQuickMessageFactory>;
|
|
626
669
|
get removeReminder(): ReturnType<typeof removeReminderFactory>;
|
|
627
670
|
get removeUnreadMark(): ReturnType<typeof removeUnreadMarkFactory>;
|
|
@@ -663,6 +706,7 @@ export declare class API {
|
|
|
663
706
|
get updateHiddenConversPin(): ReturnType<typeof updateHiddenConversPinFactory>;
|
|
664
707
|
get updateLabels(): ReturnType<typeof updateLabelsFactory>;
|
|
665
708
|
get updateLang(): ReturnType<typeof updateLangFactory>;
|
|
709
|
+
get updatePinConversations(): ReturnType<typeof updatePinConversationsFactory>;
|
|
666
710
|
get updateProductCatalog(): ReturnType<typeof updateProductCatalogFactory>;
|
|
667
711
|
get updateProfile(): ReturnType<typeof updateProfileFactory>;
|
|
668
712
|
get updateProfileBio(): ReturnType<typeof updateProfileBioFactory>;
|
|
@@ -673,6 +717,7 @@ export declare class API {
|
|
|
673
717
|
get uploadAttachment(): ReturnType<typeof uploadAttachmentFactory>;
|
|
674
718
|
get uploadProductPhoto(): ReturnType<typeof uploadProductPhotoFactory>;
|
|
675
719
|
get verifyCloudMedia(): ReturnType<typeof verifyCloudMediaFactory>;
|
|
720
|
+
get verifyFriend(): ReturnType<typeof verifyFriendFactory>;
|
|
676
721
|
get voiceToText(): ReturnType<typeof voiceToTextFactory>;
|
|
677
722
|
get votePoll(): ReturnType<typeof votePollFactory>;
|
|
678
723
|
}
|