@iflyrpa/actions 1.2.16-beta.1 → 1.2.16-beta.3
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/dist/actions/searchAccountInfo/types.d.ts +4 -4
- package/dist/actions/searchPublishInfo/index.d.ts +2 -0
- package/dist/actions/searchPublishInfo/types.d.ts +2 -0
- package/dist/bundle.js +75 -31
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +75 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4,10 +4,10 @@ export interface ttConfigData {
|
|
|
4
4
|
readNum: number;
|
|
5
5
|
incomeNum: number;
|
|
6
6
|
incomeNumYesterday: number | null;
|
|
7
|
-
showNumYesterday: number;
|
|
8
|
-
readNumYesterday: number;
|
|
9
|
-
likeNumYesterday: number;
|
|
10
|
-
commentNumYesterday: number;
|
|
7
|
+
showNumYesterday: number | null;
|
|
8
|
+
readNumYesterday: number | null;
|
|
9
|
+
likeNumYesterday: number | null;
|
|
10
|
+
commentNumYesterday: number | null;
|
|
11
11
|
}
|
|
12
12
|
export interface xhsConfigData {
|
|
13
13
|
fansNum: number;
|
|
@@ -9,5 +9,7 @@ export interface FetchArticlesParams extends ActiomCommonParams {
|
|
|
9
9
|
size?: number;
|
|
10
10
|
onlySuccess?: boolean;
|
|
11
11
|
showOriginalData?: boolean;
|
|
12
|
+
cursor?: number;
|
|
13
|
+
lastPage?: number;
|
|
12
14
|
}
|
|
13
15
|
export declare const FetchArticles: CommonAction<FetchArticlesParams, FetchArticlesData | null>;
|
package/dist/bundle.js
CHANGED
|
@@ -15698,16 +15698,17 @@ var __webpack_exports__ = {};
|
|
|
15698
15698
|
}
|
|
15699
15699
|
})
|
|
15700
15700
|
]);
|
|
15701
|
+
const isReday = void 0 !== totalData.data.statistic.data.yesterday_read_count;
|
|
15701
15702
|
const ttData = {
|
|
15702
15703
|
fansNum: Number(totalData.data.statistic.data.total_subscribe_count),
|
|
15703
15704
|
fansNumYesterday: void 0 !== totalData.data.statistic.data.yesterday_fans ? Number(totalData.data.statistic.data.yesterday_fans) : null,
|
|
15704
15705
|
readNum: Number(totalData.data.statistic.data.total_read_play_count),
|
|
15705
15706
|
incomeNum: totalData.data.statistic.data.total_income,
|
|
15706
15707
|
incomeNumYesterday: totalData.data.statistic.data.is_yesterday_income_ready ? totalData.data.statistic.data.yesterday_income : null,
|
|
15707
|
-
showNumYesterday: contentDataYesterday.author_stat.consume_data.impression_count,
|
|
15708
|
-
readNumYesterday: contentDataYesterday.author_stat.consume_data.go_detail_count,
|
|
15709
|
-
likeNumYesterday: contentDataYesterday.author_stat.interaction_data.digg_count,
|
|
15710
|
-
commentNumYesterday: contentDataYesterday.author_stat.interaction_data.comment_count
|
|
15708
|
+
showNumYesterday: isReday ? contentDataYesterday.author_stat.consume_data.impression_count : null,
|
|
15709
|
+
readNumYesterday: isReday ? contentDataYesterday.author_stat.consume_data.go_detail_count : null,
|
|
15710
|
+
likeNumYesterday: isReday ? contentDataYesterday.author_stat.interaction_data.digg_count : null,
|
|
15711
|
+
commentNumYesterday: isReday ? contentDataYesterday.author_stat.interaction_data.comment_count : null
|
|
15711
15712
|
};
|
|
15712
15713
|
return success(ttData, "头条号粉丝数据获取成功!");
|
|
15713
15714
|
} catch (error) {
|
|
@@ -15905,7 +15906,7 @@ var __webpack_exports__ = {};
|
|
|
15905
15906
|
}
|
|
15906
15907
|
async function handleWeixinData(params) {
|
|
15907
15908
|
try {
|
|
15908
|
-
const { cookies, token, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false } = params;
|
|
15909
|
+
const { cookies, token, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false, cursor, lastPage } = params;
|
|
15909
15910
|
if (!token) return {
|
|
15910
15911
|
code: 200,
|
|
15911
15912
|
message: "缺少token",
|
|
@@ -15984,9 +15985,11 @@ var __webpack_exports__ = {};
|
|
|
15984
15985
|
}
|
|
15985
15986
|
});
|
|
15986
15987
|
}
|
|
15987
|
-
let size = pageSize > 20 ? 20 : pageSize;
|
|
15988
|
-
let
|
|
15988
|
+
let size = onlySuccess ? 10 : pageSize > 20 ? 20 : pageSize;
|
|
15989
|
+
let begin = (lastPage ?? pageNum) - 1;
|
|
15990
|
+
let rawArticlesInfo = await fetchArticles(begin * size, size, token);
|
|
15989
15991
|
let articlesInfo = ParsePublishPage(rawArticlesInfo);
|
|
15992
|
+
let articleCell = [];
|
|
15990
15993
|
if (!onlySuccess && pageSize > 20) {
|
|
15991
15994
|
let totalFetched = articlesInfo.publish_list.length;
|
|
15992
15995
|
let nextPage = pageNum + 1;
|
|
@@ -16000,29 +16003,70 @@ var __webpack_exports__ = {};
|
|
|
16000
16003
|
if (parsed.publish_list.length < currentPageSize) break;
|
|
16001
16004
|
nextPage++;
|
|
16002
16005
|
}
|
|
16006
|
+
articleCell = articlesInfo.publish_list.map((item)=>({
|
|
16007
|
+
title: item.publish_info.appmsg_info[0].title,
|
|
16008
|
+
imageUrl: item.publish_info.appmsg_info[0].cover,
|
|
16009
|
+
createTime: item.publish_info.appmsg_info[0].line_info.send_time,
|
|
16010
|
+
redirectUrl: item.publish_info.appmsg_info[0].content_url,
|
|
16011
|
+
readNum: item.publish_info.appmsg_info[0].read_num,
|
|
16012
|
+
likeNum: item.publish_info.appmsg_info[0].old_like_num,
|
|
16013
|
+
shareNum: item.publish_info.appmsg_info[0].share_num,
|
|
16014
|
+
recommendNum: item.publish_info.appmsg_info[0].like_num,
|
|
16015
|
+
...showOriginalData ? {
|
|
16016
|
+
originalData: item
|
|
16017
|
+
} : {}
|
|
16018
|
+
}));
|
|
16003
16019
|
}
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16007
|
-
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
+
let nextPage = false;
|
|
16021
|
+
if (onlySuccess) {
|
|
16022
|
+
let filteredList = articlesInfo.publish_list.filter((item)=>-1 == item.publish_info.appmsg_info[0].content_url.indexOf("tempkey")).map((item)=>item.publish_info);
|
|
16023
|
+
if (cursor) {
|
|
16024
|
+
const cursorIndex = filteredList.findIndex((item)=>item.msgid === cursor);
|
|
16025
|
+
if (-1 !== cursorIndex) filteredList = filteredList.slice(cursorIndex + 1);
|
|
16026
|
+
}
|
|
16027
|
+
let totalFetched = filteredList.length;
|
|
16028
|
+
while(totalFetched < pageSize && begin * size < articlesInfo.total_count){
|
|
16029
|
+
begin += 1;
|
|
16030
|
+
let nextRawArticlesInfo = await fetchArticles(begin * size, size, token);
|
|
16031
|
+
let nextArticlesInfo = ParsePublishPage(nextRawArticlesInfo);
|
|
16032
|
+
const newFiltered = nextArticlesInfo.publish_list.filter((item)=>-1 == item.publish_info.appmsg_info[0].content_url.indexOf("tempkey")).map((item)=>item.publish_info);
|
|
16033
|
+
filteredList = filteredList.concat(newFiltered);
|
|
16034
|
+
totalFetched = filteredList.length;
|
|
16035
|
+
}
|
|
16036
|
+
filteredList = filteredList.slice(0, pageSize);
|
|
16037
|
+
totalFetched = filteredList.length;
|
|
16038
|
+
if (totalFetched >= pageSize && begin * size < articlesInfo.total_count) {
|
|
16039
|
+
let nextRawArticlesInfo = await fetchArticles((begin + 1) * size, size, token);
|
|
16040
|
+
let nextArticlesInfo = ParsePublishPage(nextRawArticlesInfo);
|
|
16041
|
+
nextPage = nextArticlesInfo.publish_list.length > 0 && nextArticlesInfo.publish_list.some((item)=>-1 == item.publish_info.appmsg_info[0].content_url.indexOf("tempkey"));
|
|
16042
|
+
}
|
|
16043
|
+
const lastMsgId = filteredList.length > 0 ? filteredList[filteredList.length - 1].msgid : void 0;
|
|
16044
|
+
articleCell = filteredList.map((item)=>({
|
|
16045
|
+
title: item.appmsg_info[0].title,
|
|
16046
|
+
imageUrl: item.appmsg_info[0].cover,
|
|
16047
|
+
createTime: item.appmsg_info[0].line_info.send_time,
|
|
16048
|
+
redirectUrl: item.appmsg_info[0].content_url,
|
|
16049
|
+
readNum: item.appmsg_info[0].read_num,
|
|
16050
|
+
likeNum: item.appmsg_info[0].old_like_num,
|
|
16051
|
+
shareNum: item.appmsg_info[0].share_num,
|
|
16052
|
+
recommendNum: item.appmsg_info[0].like_num,
|
|
16053
|
+
...showOriginalData ? {
|
|
16054
|
+
originalData: item
|
|
16055
|
+
} : {}
|
|
16056
|
+
}));
|
|
16057
|
+
return success({
|
|
16058
|
+
articleCell,
|
|
16020
16059
|
pagination: {
|
|
16021
|
-
|
|
16060
|
+
nextPage,
|
|
16022
16061
|
pageNum,
|
|
16023
|
-
pageSize
|
|
16062
|
+
pageSize,
|
|
16063
|
+
lastPage: begin + 1,
|
|
16064
|
+
cursor: lastMsgId
|
|
16024
16065
|
}
|
|
16025
|
-
}
|
|
16066
|
+
}, "微信文章文章获取成功");
|
|
16067
|
+
}
|
|
16068
|
+
return success({
|
|
16069
|
+
articleCell
|
|
16026
16070
|
}, "微信文章文章获取成功");
|
|
16027
16071
|
} catch (error) {
|
|
16028
16072
|
return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "微信文章数据获取失败");
|
|
@@ -16079,11 +16123,11 @@ var __webpack_exports__ = {};
|
|
|
16079
16123
|
imageUrl: JSON.parse(item.cover_images)[0].src,
|
|
16080
16124
|
createTime: Math.floor(new Date(item.publish_at.replace(/-/g, "/")).getTime() / 1000),
|
|
16081
16125
|
redirectUrl: item.url,
|
|
16082
|
-
recommendNum: item.rec_amount,
|
|
16126
|
+
recommendNum: item.rec_amount | item.forward_num,
|
|
16083
16127
|
collectNum: item.collection_amount,
|
|
16084
|
-
readNum: item.read_amount,
|
|
16085
|
-
likeNum: item.like_amount,
|
|
16086
|
-
commentNum: item.comment_amount,
|
|
16128
|
+
readNum: item.read_amount | item.read_num,
|
|
16129
|
+
likeNum: item.like_amount | item.praise_num,
|
|
16130
|
+
commentNum: item.comment_amount | item.comment_num,
|
|
16087
16131
|
shareNum: item.share_amount,
|
|
16088
16132
|
...showOriginalData ? {
|
|
16089
16133
|
originalData: item
|
|
@@ -18186,7 +18230,7 @@ var __webpack_exports__ = {};
|
|
|
18186
18230
|
if ("mockApi" === params.actionType) return xiaohongshuPublish_mock_mockAction(task, params);
|
|
18187
18231
|
return executeAction(xiaohongshuPublish_mock_mockAction, xiaohongshuPublish_rpa_rpaAction)(task, params);
|
|
18188
18232
|
};
|
|
18189
|
-
var package_namespaceObject = JSON.parse('{"i8":"1.2.16-beta.
|
|
18233
|
+
var package_namespaceObject = JSON.parse('{"i8":"1.2.16-beta.2"}');
|
|
18190
18234
|
class Action {
|
|
18191
18235
|
constructor(task){
|
|
18192
18236
|
this.task = task;
|