@iflyrpa/actions 4.0.5 → 4.0.6-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import type { SearchAccountInfoParams } from ".";
3
+ import { type SearchAccountInfoResponse } from "./types";
4
+ /**
5
+ * 抖音账号数据采集
6
+ *
7
+ * 核心接口:
8
+ * 1. 用户完整信息: GET /aweme/v1/web/user/profile/self/
9
+ * 返回 user.follower_count(粉丝)、user.following_count(关注)、user.total_favorited(获赞)等
10
+ * 2. 近7日数据概览: GET /aweme/janus/creator/data/overview/all/?last_days_type=1
11
+ *
12
+ * 注意: 近7日数据接口需要 msToken / a_bogus 动态参数,
13
+ * 建议通过 Playwright 复用已登录浏览器上下文请求(详见文档 3.2)。
14
+ * 此处直接请求,若被风控拦截会返回对应错误,昨日/近7日数据降级为 0。
15
+ */
16
+ export declare function getDouyinData(_task: AutomateTask, params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
@@ -0,0 +1,14 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import type { SearchAccountInfoParams } from ".";
3
+ import { type SearchAccountInfoResponse } from "./types";
4
+ /**
5
+ * 视频号账号数据采集
6
+ *
7
+ * 参考《API接口文档-抖音和视频号数据采集》 2.1:
8
+ * POST /cgi-bin/mmfinderassistant-bin/auth/auth_data
9
+ *
10
+ * auth_data 返回账号基础信息(粉丝数、作品数)。
11
+ * 昨日数据(净增关注/新增播放/喜欢/评论)需调用专门的统计接口,
12
+ * auth_data 本身不返回,因此这些字段降级为 null。
13
+ */
14
+ export declare function getShipinhaoData(_task: AutomateTask, params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
@@ -1,6 +1,6 @@
1
1
  import { type CommonAction } from "@iflyrpa/share";
2
2
  import { z } from "zod";
3
- import { bjhConfigData, ttConfigData, wxConfigData, xhsConfigData } from "./types";
3
+ import { bjhConfigData, douyinConfigData, shipinhaoConfigData, ttConfigData, wxConfigData, xhsConfigData } from "./types";
4
4
  export declare const SearchAccountInfoParamsSchema: z.ZodObject<{
5
5
  id: z.ZodOptional<z.ZodString>;
6
6
  userAgent: z.ZodOptional<z.ZodString>;
@@ -38,10 +38,12 @@ export declare const SearchAccountInfoParamsSchema: z.ZodObject<{
38
38
  token: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
39
39
  platform: z.ZodEnum<{
40
40
  baijiahao: "baijiahao";
41
+ douyin: "douyin";
41
42
  toutiao: "toutiao";
42
43
  xiaohongshu: "xiaohongshu";
43
44
  weixin: "weixin";
45
+ shipinhao: "shipinhao";
44
46
  }>;
45
47
  }, z.core.$strip>;
46
48
  export type SearchAccountInfoParams = z.infer<typeof SearchAccountInfoParamsSchema>;
47
- export declare const SearchAccountInfo: CommonAction<SearchAccountInfoParams, ttConfigData | xhsConfigData | wxConfigData | bjhConfigData | null>;
49
+ export declare const SearchAccountInfo: CommonAction<SearchAccountInfoParams, ttConfigData | xhsConfigData | wxConfigData | bjhConfigData | douyinConfigData | shipinhaoConfigData | null>;
@@ -41,8 +41,28 @@ export declare const bjhConfigDataSchema: z.ZodObject<{
41
41
  commentNumYesterday: z.ZodNullable<z.ZodNumber>;
42
42
  }, z.core.$strip>;
43
43
  export type bjhConfigData = z.infer<typeof bjhConfigDataSchema>;
44
+ export declare const douyinConfigDataSchema: z.ZodObject<{
45
+ fansNum: z.ZodNumber;
46
+ favedNum: z.ZodNumber;
47
+ fansNumLastWeek: z.ZodNumber;
48
+ watchNumLastWeek: z.ZodNumber;
49
+ likeNumLastWeek: z.ZodNumber;
50
+ commentNumLastWeek: z.ZodNumber;
51
+ shareNumLastWeek: z.ZodNumber;
52
+ visitNumLastWeek: z.ZodNumber;
53
+ }, z.core.$strip>;
54
+ export type douyinConfigData = z.infer<typeof douyinConfigDataSchema>;
55
+ export declare const shipinhaoConfigDataSchema: z.ZodObject<{
56
+ fansNum: z.ZodNumber;
57
+ feedsCount: z.ZodNumber;
58
+ fansNumYesterday: z.ZodNullable<z.ZodNumber>;
59
+ playNumYesterday: z.ZodNullable<z.ZodNumber>;
60
+ likeNumYesterday: z.ZodNullable<z.ZodNumber>;
61
+ commentNumYesterday: z.ZodNullable<z.ZodNumber>;
62
+ }, z.core.$strip>;
63
+ export type shipinhaoConfigData = z.infer<typeof shipinhaoConfigDataSchema>;
44
64
  export interface SearchAccountInfoResponse {
45
65
  code: number;
46
66
  message: string;
47
- data: ttConfigData | xhsConfigData | wxConfigData | bjhConfigData | null;
67
+ data: ttConfigData | xhsConfigData | wxConfigData | bjhConfigData | douyinConfigData | shipinhaoConfigData | null;
48
68
  }
@@ -0,0 +1,17 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import { type FetchArticlesParams } from ".";
3
+ import { FetchArticlesResponse } from "./types";
4
+ /**
5
+ * 抖音作品数据采集
6
+ *
7
+ * 采集内容:
8
+ * 1. 账号维度数据:粉丝、获赞、近7日数据(需开通数据中心)
9
+ * 2. 作品维度数据:封面图、标题、发布时间、统计数据等
10
+ *
11
+ * 参考小红书实现模式:
12
+ * - 内部封装 fetchWorks 函数
13
+ * - 支持自动分页
14
+ * - 支持代理配置
15
+ * - 支持重试机制
16
+ */
17
+ export declare function handleDouyinData(_task: AutomateTask, params: FetchArticlesParams): Promise<FetchArticlesResponse>;
@@ -0,0 +1,17 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import { type FetchArticlesParams } from ".";
3
+ import { FetchArticlesResponse } from "./types";
4
+ /**
5
+ * 视频号作品数据采集
6
+ *
7
+ * 采集内容:
8
+ * 1. 账号维度数据:关注者、昨日净增关注、昨日新增播放、昨日新增喜欢、昨日新增评论
9
+ * 2. 作品维度数据:封面图、标题、发布时间、阅读/喜欢/评论/转发/点赞等
10
+ *
11
+ * 参考小红书实现模式:
12
+ * - 内部封装 fetchPosts 函数
13
+ * - 支持代理配置
14
+ * - 支持重试机制
15
+ * - 视频和图文分别获取后合并
16
+ */
17
+ export declare function handleShipinhaoData(_task: AutomateTask, params: FetchArticlesParams): Promise<FetchArticlesResponse>;
@@ -45,6 +45,13 @@ export declare const FetchArticlesParamsSchema: z.ZodObject<{
45
45
  cursor: z.ZodOptional<z.ZodNumber>;
46
46
  lastPage: z.ZodOptional<z.ZodNumber>;
47
47
  containsArticle: z.ZodOptional<z.ZodBoolean>;
48
+ status: z.ZodOptional<z.ZodNumber>;
49
+ includeAccount: z.ZodOptional<z.ZodBoolean>;
50
+ postType: z.ZodOptional<z.ZodEnum<{
51
+ article: "article";
52
+ video: "video";
53
+ all: "all";
54
+ }>>;
48
55
  }, z.core.$strip>;
49
56
  export type FetchArticlesParams = z.infer<typeof FetchArticlesParamsSchema>;
50
57
  export declare const FetchArticles: CommonAction<FetchArticlesParams, FetchArticlesData | Record<string, never>>;
@@ -50,6 +50,41 @@ export declare const XiaohongshuArticleSchema: z.ZodObject<{
50
50
  shareNum: z.ZodNumber;
51
51
  }, z.core.$strip>;
52
52
  export type XiaohongshuArticle = z.infer<typeof XiaohongshuArticleSchema>;
53
+ export declare const DouyinArticleSchema: z.ZodObject<{
54
+ title: z.ZodString;
55
+ imageUrl: z.ZodString;
56
+ createTime: z.ZodNumber;
57
+ redirectUrl: z.ZodString;
58
+ originalData: z.ZodOptional<z.ZodUnknown>;
59
+ playNum: z.ZodNumber;
60
+ likeNum: z.ZodNumber;
61
+ commentNum: z.ZodNumber;
62
+ shareNum: z.ZodNumber;
63
+ collectNum: z.ZodNumber;
64
+ awemeId: z.ZodString;
65
+ awemeType: z.ZodNumber;
66
+ duration: z.ZodOptional<z.ZodNumber>;
67
+ status: z.ZodString;
68
+ publicUrl: z.ZodString;
69
+ }, z.core.$strip>;
70
+ export type DouyinArticle = z.infer<typeof DouyinArticleSchema>;
71
+ export declare const ShipinhaoArticleSchema: z.ZodObject<{
72
+ title: z.ZodString;
73
+ imageUrl: z.ZodString;
74
+ createTime: z.ZodNumber;
75
+ redirectUrl: z.ZodString;
76
+ originalData: z.ZodOptional<z.ZodUnknown>;
77
+ readNum: z.ZodNumber;
78
+ likeNum: z.ZodNumber;
79
+ commentNum: z.ZodNumber;
80
+ forwardNum: z.ZodNumber;
81
+ favNum: z.ZodNumber;
82
+ objectId: z.ZodString;
83
+ postType: z.ZodString;
84
+ postStatus: z.ZodNumber;
85
+ effectiveTime: z.ZodOptional<z.ZodNumber>;
86
+ }, z.core.$strip>;
87
+ export type ShipinhaoArticle = z.infer<typeof ShipinhaoArticleSchema>;
53
88
  export declare const FetchArticlesDataSchema: z.ZodObject<{
54
89
  articleCell: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
55
90
  title: z.ZodString;
@@ -94,6 +129,37 @@ export declare const FetchArticlesDataSchema: z.ZodObject<{
94
129
  commentNum: z.ZodNumber;
95
130
  collectNum: z.ZodNumber;
96
131
  shareNum: z.ZodNumber;
132
+ }, z.core.$strip>, z.ZodObject<{
133
+ title: z.ZodString;
134
+ imageUrl: z.ZodString;
135
+ createTime: z.ZodNumber;
136
+ redirectUrl: z.ZodString;
137
+ originalData: z.ZodOptional<z.ZodUnknown>;
138
+ playNum: z.ZodNumber;
139
+ likeNum: z.ZodNumber;
140
+ commentNum: z.ZodNumber;
141
+ shareNum: z.ZodNumber;
142
+ collectNum: z.ZodNumber;
143
+ awemeId: z.ZodString;
144
+ awemeType: z.ZodNumber;
145
+ duration: z.ZodOptional<z.ZodNumber>;
146
+ status: z.ZodString;
147
+ publicUrl: z.ZodString;
148
+ }, z.core.$strip>, z.ZodObject<{
149
+ title: z.ZodString;
150
+ imageUrl: z.ZodString;
151
+ createTime: z.ZodNumber;
152
+ redirectUrl: z.ZodString;
153
+ originalData: z.ZodOptional<z.ZodUnknown>;
154
+ readNum: z.ZodNumber;
155
+ likeNum: z.ZodNumber;
156
+ commentNum: z.ZodNumber;
157
+ forwardNum: z.ZodNumber;
158
+ favNum: z.ZodNumber;
159
+ objectId: z.ZodString;
160
+ postType: z.ZodString;
161
+ postStatus: z.ZodNumber;
162
+ effectiveTime: z.ZodOptional<z.ZodNumber>;
97
163
  }, z.core.$strip>]>>>;
98
164
  timerPublish: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
99
165
  title: z.ZodString;
@@ -138,6 +204,37 @@ export declare const FetchArticlesDataSchema: z.ZodObject<{
138
204
  commentNum: z.ZodNumber;
139
205
  collectNum: z.ZodNumber;
140
206
  shareNum: z.ZodNumber;
207
+ }, z.core.$strip>, z.ZodObject<{
208
+ title: z.ZodString;
209
+ imageUrl: z.ZodString;
210
+ createTime: z.ZodNumber;
211
+ redirectUrl: z.ZodString;
212
+ originalData: z.ZodOptional<z.ZodUnknown>;
213
+ playNum: z.ZodNumber;
214
+ likeNum: z.ZodNumber;
215
+ commentNum: z.ZodNumber;
216
+ shareNum: z.ZodNumber;
217
+ collectNum: z.ZodNumber;
218
+ awemeId: z.ZodString;
219
+ awemeType: z.ZodNumber;
220
+ duration: z.ZodOptional<z.ZodNumber>;
221
+ status: z.ZodString;
222
+ publicUrl: z.ZodString;
223
+ }, z.core.$strip>, z.ZodObject<{
224
+ title: z.ZodString;
225
+ imageUrl: z.ZodString;
226
+ createTime: z.ZodNumber;
227
+ redirectUrl: z.ZodString;
228
+ originalData: z.ZodOptional<z.ZodUnknown>;
229
+ readNum: z.ZodNumber;
230
+ likeNum: z.ZodNumber;
231
+ commentNum: z.ZodNumber;
232
+ forwardNum: z.ZodNumber;
233
+ favNum: z.ZodNumber;
234
+ objectId: z.ZodString;
235
+ postType: z.ZodString;
236
+ postStatus: z.ZodNumber;
237
+ effectiveTime: z.ZodOptional<z.ZodNumber>;
141
238
  }, z.core.$strip>]>>>;
142
239
  pagination: z.ZodOptional<z.ZodObject<{
143
240
  total: z.ZodOptional<z.ZodNumber>;
@@ -7,6 +7,9 @@ interface UploadConfig {
7
7
  concurrentLimit?: number;
8
8
  singleFileSize?: number;
9
9
  http?: Http;
10
+ timeout?: number;
11
+ retries?: number;
12
+ retryDelay?: number;
10
13
  }
11
14
  /**
12
15
  * 上传进度回调
@@ -26,6 +29,7 @@ export declare class VideoChannelUploader {
26
29
  private concurrentLimit;
27
30
  private singleFileSize;
28
31
  private http;
32
+ private reqOptions;
29
33
  private uploadTaskId;
30
34
  private partInfo;
31
35
  private md5;
@@ -11,8 +11,8 @@ export interface WxInteraction {
11
11
  import { z } from "zod";
12
12
  export declare const WxInteractionSchema: z.ZodObject<{
13
13
  Type: z.ZodEnum<{
14
- public: "public";
15
14
  private: "private";
15
+ public: "public";
16
16
  off: "off";
17
17
  }>;
18
18
  Option: z.ZodOptional<z.ZodObject<{
@@ -88,8 +88,8 @@ export declare const WeixinPublishParamsSchema: z.ZodObject<{
88
88
  wxCreationSource: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
89
  wxInteraction: z.ZodOptional<z.ZodObject<{
90
90
  Type: z.ZodEnum<{
91
- public: "public";
92
91
  private: "private";
92
+ public: "public";
93
93
  off: "off";
94
94
  }>;
95
95
  Option: z.ZodOptional<z.ZodObject<{
@@ -62,8 +62,8 @@ export declare const XiaohongshuPublishParamsSchema: z.ZodObject<{
62
62
  localIP: z.ZodOptional<z.ZodString>;
63
63
  huiwenToken: z.ZodOptional<z.ZodString>;
64
64
  visibleRange: z.ZodEnum<{
65
- public: "public";
66
65
  private: "private";
66
+ public: "public";
67
67
  friends: "friends";
68
68
  }>;
69
69
  isImmediatelyPublish: z.ZodOptional<z.ZodBoolean>;