@iflyrpa/actions 4.0.4-beta.4 → 4.0.4-beta.6

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.
@@ -82,6 +82,7 @@ export declare const ShipinhaoArticleSchema: z.ZodObject<{
82
82
  objectId: z.ZodString;
83
83
  postType: z.ZodString;
84
84
  postStatus: z.ZodNumber;
85
+ effectiveTime: z.ZodOptional<z.ZodNumber>;
85
86
  }, z.core.$strip>;
86
87
  export type ShipinhaoArticle = z.infer<typeof ShipinhaoArticleSchema>;
87
88
  export declare const FetchArticlesDataSchema: z.ZodObject<{
@@ -158,6 +159,7 @@ export declare const FetchArticlesDataSchema: z.ZodObject<{
158
159
  objectId: z.ZodString;
159
160
  postType: z.ZodString;
160
161
  postStatus: z.ZodNumber;
162
+ effectiveTime: z.ZodOptional<z.ZodNumber>;
161
163
  }, z.core.$strip>]>>>;
162
164
  timerPublish: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
163
165
  title: z.ZodString;
@@ -232,6 +234,7 @@ export declare const FetchArticlesDataSchema: z.ZodObject<{
232
234
  objectId: z.ZodString;
233
235
  postType: z.ZodString;
234
236
  postStatus: z.ZodNumber;
237
+ effectiveTime: z.ZodOptional<z.ZodNumber>;
235
238
  }, z.core.$strip>]>>>;
236
239
  pagination: z.ZodOptional<z.ZodObject<{
237
240
  total: z.ZodOptional<z.ZodNumber>;
package/dist/bundle.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*! For license information please see bundle.js.LICENSE.txt */
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="23789fb9-5e79-5f5c-bdf9-9ec950534422")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f82b2e89-3bbf-5b48-989f-191986e75094")}catch(e){}}();
4
4
  var __webpack_modules__ = {
5
5
  "../../node_modules/.pnpm/agent-base@7.1.4/node_modules/agent-base/dist/helpers.js": function(__unused_webpack_module, exports1, __webpack_require__) {
6
6
  "use strict";
@@ -12492,7 +12492,7 @@ var __webpack_exports__ = {};
12492
12492
  var package_namespaceObject = {
12493
12493
  i8: "0.1.2"
12494
12494
  };
12495
- var package_namespaceObject_0 = JSON.parse('{"i8":"4.0.4-beta.4"}');
12495
+ var package_namespaceObject_0 = JSON.parse('{"i8":"4.0.4-beta.6"}');
12496
12496
  const external_node_fs_namespaceObject = require("node:fs");
12497
12497
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
12498
12498
  const external_node_http_namespaceObject = require("node:http");
@@ -40527,8 +40527,6 @@ var __webpack_exports__ = {};
40527
40527
  userProfileP,
40528
40528
  overviewP
40529
40529
  ]);
40530
- _task.logger.info(`抖音用户信息响应: ${JSON.stringify(userProfile)}`);
40531
- _task.logger.info(`抖音近7日数据响应: ${JSON.stringify(overview)}`);
40532
40530
  let fansNum = 0;
40533
40531
  let favedNum = 0;
40534
40532
  let followingNum = 0;
@@ -40612,7 +40610,6 @@ var __webpack_exports__ = {};
40612
40610
  retryDelay: 100,
40613
40611
  timeout: 5000
40614
40612
  });
40615
- _task.logger.info(`视频号账号数据响应: ${JSON.stringify(authData)}`);
40616
40613
  const AUTH_ERROR_CODES = [
40617
40614
  300333,
40618
40615
  300334,
@@ -40629,13 +40626,60 @@ var __webpack_exports__ = {};
40629
40626
  return types_errorResponse(`视频号账号信息获取失败:${authData.errMsg || "未知错误"}`, 414);
40630
40627
  }
40631
40628
  const finderUser = authData.data?.finderUser;
40629
+ const now = new Date();
40630
+ const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 2);
40631
+ const startTs = Math.floor(yesterday.getTime() / 1000);
40632
+ const endTs = startTs + 86400;
40633
+ _task.logger.info(`视频号昨日数据范围 start: ${startTs} ~ end: ${endTs}`);
40634
+ let fansNumYesterday = 0;
40635
+ let playNumYesterday = 0;
40636
+ let likeNumYesterday = 0;
40637
+ let commentNumYesterday = 0;
40638
+ try {
40639
+ const statsData = await http.api({
40640
+ method: "post",
40641
+ url: "https://channels.weixin.qq.com/cgi-bin/mmfinderassistant-bin/statistic/new_post_total_data",
40642
+ params: {
40643
+ _aid: aid,
40644
+ _rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
40645
+ _pageUrl: encodeURIComponent("https://channels.weixin.qq.com/platform")
40646
+ },
40647
+ data: {
40648
+ startTs: startTs.toString(),
40649
+ endTs: endTs.toString(),
40650
+ interval: 3,
40651
+ timestamp: Date.now().toString(),
40652
+ _log_finder_uin: "",
40653
+ _log_finder_id: finderId,
40654
+ rawKeyBuff: "",
40655
+ pluginSessionId: null,
40656
+ scene: 7,
40657
+ reqScene: 7
40658
+ }
40659
+ }, {
40660
+ retries: 3,
40661
+ retryDelay: 100,
40662
+ timeout: 5000
40663
+ });
40664
+ if (!statsData.errCode && statsData.data?.totalData) {
40665
+ const data = statsData.data.totalData;
40666
+ fansNumYesterday = Number.parseInt(data.follow?.[1] || "0", 10) || 0;
40667
+ playNumYesterday = Number.parseInt(data.browse?.[1] || "0", 10) || 0;
40668
+ likeNumYesterday = Number.parseInt(data.like?.[1] || "0", 10) || 0;
40669
+ commentNumYesterday = Number.parseInt(data.comment?.[1] || "0", 10) || 0;
40670
+ _task.logger.info(`视频号昨日数据提取成功 - 净增关注:${fansNumYesterday}, 播放:${playNumYesterday}, 喜欢:${likeNumYesterday}, 评论:${commentNumYesterday}`);
40671
+ }
40672
+ } catch (error) {
40673
+ const errMsg = error instanceof Error ? error.message : String(error);
40674
+ _task.logger.warn(`视频号昨日数据获取失败(降级为null): ${errMsg}`);
40675
+ }
40632
40676
  const shipinhaoData = {
40633
40677
  fansNum: finderUser?.fansCount || 0,
40634
40678
  feedsCount: finderUser?.feedsCount || 0,
40635
- fansNumYesterday: null,
40636
- playNumYesterday: null,
40637
- likeNumYesterday: null,
40638
- commentNumYesterday: null
40679
+ fansNumYesterday,
40680
+ playNumYesterday,
40681
+ likeNumYesterday,
40682
+ commentNumYesterday
40639
40683
  };
40640
40684
  return success(shipinhaoData, "视频号平台数据获取成功!");
40641
40685
  } catch (error) {
@@ -40958,7 +41002,8 @@ var __webpack_exports__ = {};
40958
41002
  favNum: classic_schemas_number(),
40959
41003
  objectId: classic_schemas_string(),
40960
41004
  postType: classic_schemas_string(),
40961
- postStatus: classic_schemas_number()
41005
+ postStatus: classic_schemas_number(),
41006
+ effectiveTime: classic_schemas_number().optional()
40962
41007
  });
40963
41008
  const FetchArticlesDataSchema = classic_schemas_object({
40964
41009
  articleCell: classic_schemas_array(schemas_union([
@@ -41092,7 +41137,8 @@ var __webpack_exports__ = {};
41092
41137
  }
41093
41138
  async function handleDouyinData(_task, params) {
41094
41139
  try {
41095
- const { cookies, pageNum = 1, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
41140
+ const { cookies, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
41141
+ const pageNum = params.pageNum || 1;
41096
41142
  const headers = {
41097
41143
  cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
41098
41144
  referer: "https://creator.douyin.com"
@@ -41187,7 +41233,8 @@ var __webpack_exports__ = {};
41187
41233
  }
41188
41234
  async function handleShipinhaoData(_task, params) {
41189
41235
  try {
41190
- const { cookies, postType = "all", pageNum = 1, pageSize = 10, showOriginalData = false } = params;
41236
+ const { cookies, postType = "all", pageSize = 10, showOriginalData = false } = params;
41237
+ const pageNum = params.pageNum || 1;
41191
41238
  const aidCookie = cookies.find((it)=>"_aid" === it.name)?.value;
41192
41239
  const aid = aidCookie || "9d3e0e9f-b842-498d-a273-4285d58df264";
41193
41240
  const uinCookie = cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
@@ -41292,6 +41339,9 @@ var __webpack_exports__ = {};
41292
41339
  objectId: item.exportId || item.objectId || "",
41293
41340
  postType: forcePostType,
41294
41341
  postStatus: item.status || item.post_status || 0,
41342
+ ...item.effectiveTime ? {
41343
+ effectiveTime: item.effectiveTime
41344
+ } : {},
41295
41345
  ...showOriginalData ? {
41296
41346
  originalData: item
41297
41347
  } : {}
@@ -50701,4 +50751,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
50701
50751
  });
50702
50752
 
50703
50753
  //# sourceMappingURL=bundle.js.map
50704
- //# debugId=23789fb9-5e79-5f5c-bdf9-9ec950534422
50754
+ //# debugId=f82b2e89-3bbf-5b48-989f-191986e75094