@iflyrpa/actions 1.2.25-beta.1 → 1.2.25-beta.2

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 (65) hide show
  1. package/dist/actions/baijiahaoLogin/index.d.ts +5 -0
  2. package/dist/actions/baijiahaoLogin/rpa-server.d.ts +2 -0
  3. package/dist/actions/baijiahaoLogin/rpa.d.ts +2 -0
  4. package/dist/actions/baijiahaoPublish/index.d.ts +1 -0
  5. package/dist/actions/common/sessionCheck/index.d.ts +56 -8
  6. package/dist/actions/getXhsCollection/index.d.ts +17 -15
  7. package/dist/actions/getXhsGroup/index.d.ts +9 -7
  8. package/dist/actions/getXhsWebUnreadCount/index.d.ts +12 -0
  9. package/dist/actions/searchAccountInfo/getBjhInfo.d.ts +2 -1
  10. package/dist/actions/searchAccountInfo/getTTInfo.d.ts +2 -1
  11. package/dist/actions/searchAccountInfo/getWxInfo.d.ts +2 -1
  12. package/dist/actions/searchAccountInfo/getXhsInfo.d.ts +4 -3
  13. package/dist/actions/searchAccountInfo/index.d.ts +56 -5
  14. package/dist/actions/searchAccountInfo/types.d.ts +43 -38
  15. package/dist/actions/searchBjhUserArticle/index.d.ts +7 -0
  16. package/dist/actions/searchPublishInfo/handleBjhData.d.ts +4 -3
  17. package/dist/actions/searchPublishInfo/handleTTData.d.ts +2 -1
  18. package/dist/actions/searchPublishInfo/handleWXData.d.ts +4 -3
  19. package/dist/actions/searchPublishInfo/handleXhsData.d.ts +4 -3
  20. package/dist/actions/searchPublishInfo/index.d.ts +61 -14
  21. package/dist/actions/searchPublishInfo/types.d.ts +108 -47
  22. package/dist/actions/searchWeixinAccountCard/index.d.ts +18 -0
  23. package/dist/actions/searchWeixinUserArticle/index.d.ts +8 -0
  24. package/dist/actions/searchXhsWebConnections/index.d.ts +36 -0
  25. package/dist/actions/searchXhsWebLike/index.d.ts +73 -0
  26. package/dist/actions/searchXhsWebMentions/index.d.ts +72 -0
  27. package/dist/actions/searchXiaohongshuUserArticle/index.d.ts +7 -0
  28. package/dist/actions/toutiaoLogin/index.d.ts +5 -0
  29. package/dist/actions/toutiaoLogin/rpa-server.d.ts +2 -0
  30. package/dist/actions/toutiaoLogin/rpa.d.ts +2 -0
  31. package/dist/actions/toutiaoPublish/index.d.ts +1 -0
  32. package/dist/actions/weixinLogin/index.d.ts +5 -0
  33. package/dist/actions/weixinLogin/rpa-server.d.ts +2 -0
  34. package/dist/actions/weixinLogin/rpa.d.ts +2 -0
  35. package/dist/actions/weixinPublish/index.d.ts +2 -1
  36. package/dist/actions/xiaohongshuLogin/index.d.ts +5 -0
  37. package/dist/actions/xiaohongshuLogin/rpa-server.d.ts +2 -0
  38. package/dist/actions/xiaohongshuLogin/rpa.d.ts +2 -0
  39. package/dist/actions/xiaohongshuLogin/utils.d.ts +1 -0
  40. package/dist/actions/xiaohongshuPublish/index.d.ts +129 -35
  41. package/dist/actions/xiaohongshuPublish/mock.d.ts +1 -1
  42. package/dist/actions/xiaohongshuPublish/rpa-server-mock.d.ts +2 -0
  43. package/dist/actions/xiaohongshuPublish/rpa-server.d.ts +2 -0
  44. package/dist/actions/xiaohongshuWebCommentAction/index.d.ts +14 -0
  45. package/dist/actions/xiaohongshuWebIntimacySearch/index.d.ts +13 -0
  46. package/dist/actions/xiaohongshuWebMsgRead/index.d.ts +12 -0
  47. package/dist/actions/xiaohongshuWebMsgReply/index.d.ts +47 -0
  48. package/dist/actions/xiaohongshuWebNoteFeed/index.d.ts +19 -0
  49. package/dist/actions/xiaohongshuWebRelationAction/index.d.ts +17 -0
  50. package/dist/actions/xiaohongshuWebSearch/index.d.ts +62 -0
  51. package/dist/bundle.js +22373 -8763
  52. package/dist/bundle.js.map +1 -1
  53. package/dist/index.d.ts +186 -15
  54. package/dist/index.js +11054 -3305
  55. package/dist/index.js.map +1 -1
  56. package/dist/index.mjs +11000 -3270
  57. package/dist/index.mjs.map +1 -1
  58. package/dist/types.d.ts +80 -15
  59. package/dist/utils/http.d.ts +8 -3
  60. package/dist/utils/index.d.ts +2 -2
  61. package/dist/utils/proxy.d.ts +8 -1
  62. package/dist/utils/xhsXsEncrypt.d.ts +201 -17
  63. package/dist/utils/xhs_ob/index.d.ts +5 -0
  64. package/dist/utils/xhs_ob/mnsvc2.d.ts +7 -0
  65. package/package.json +6 -3
@@ -0,0 +1,5 @@
1
+ import { CommonAction } from "@iflyrpa/share";
2
+ import { ActionParams } from "../../types";
3
+ export type BaijiahaoLoginParams = ActionParams;
4
+ export type SteelAction = CommonAction<ActionParams, Record<string, unknown>>;
5
+ export declare const baijiahaoLogin: SteelAction;
@@ -0,0 +1,2 @@
1
+ import type { SteelAction } from "./index";
2
+ export declare const rpaServer: SteelAction;
@@ -0,0 +1,2 @@
1
+ import type { SteelAction } from "./index";
2
+ export declare const rpaAction: SteelAction;
@@ -11,6 +11,7 @@ export interface BaijiahaoPublishParams extends ActiomCommonParams {
11
11
  title: string;
12
12
  content: string;
13
13
  proxyLoc?: string;
14
+ localIP?: string;
14
15
  huiwenToken?: string;
15
16
  settingInfo: {
16
17
  baijiahaoTitle: string;
@@ -1,15 +1,63 @@
1
1
  import { type CommonAction } from "@iflyrpa/share";
2
2
  import type { ActiomCommonParams } from "../../../types";
3
- export interface sessionCheckResult {
4
- isValidSession: boolean;
5
- }
3
+ import { z } from "zod";
4
+ export declare const SessionCheckResultSchema: z.ZodObject<{
5
+ isValidSession: z.ZodBoolean;
6
+ }, z.core.$strip>;
7
+ export type sessionCheckResult = z.infer<typeof SessionCheckResultSchema>;
8
+ export declare const WxBjhSessionParamsSchema: z.ZodObject<{
9
+ url: z.ZodOptional<z.ZodString>;
10
+ cookies: z.ZodArray<z.ZodObject<{
11
+ domain: z.ZodOptional<z.ZodString>;
12
+ path: z.ZodOptional<z.ZodString>;
13
+ expires: z.ZodOptional<z.ZodNumber>;
14
+ httpOnly: z.ZodOptional<z.ZodBoolean>;
15
+ secure: z.ZodOptional<z.ZodBoolean>;
16
+ session: z.ZodOptional<z.ZodBoolean>;
17
+ name: z.ZodString;
18
+ value: z.ZodString;
19
+ url: z.ZodOptional<z.ZodString>;
20
+ sameSite: z.ZodOptional<z.ZodEnum<{
21
+ Strict: "Strict";
22
+ Lax: "Lax";
23
+ None: "None";
24
+ }>>;
25
+ size: z.ZodOptional<z.ZodNumber>;
26
+ partitionKey: z.ZodOptional<z.ZodObject<{
27
+ topLevelSite: z.ZodString;
28
+ hasCrossSiteAncestor: z.ZodBoolean;
29
+ }, z.core.$strip>>;
30
+ priority: z.ZodOptional<z.ZodEnum<{
31
+ Low: "Low";
32
+ Medium: "Medium";
33
+ High: "High";
34
+ }>>;
35
+ sameParty: z.ZodOptional<z.ZodBoolean>;
36
+ sourceScheme: z.ZodOptional<z.ZodEnum<{
37
+ Unset: "Unset";
38
+ NonSecure: "NonSecure";
39
+ Secure: "Secure";
40
+ }>>;
41
+ sourcePort: z.ZodOptional<z.ZodNumber>;
42
+ }, z.core.$strip>>;
43
+ actionType: z.ZodOptional<z.ZodEnum<{
44
+ mockApi: "mockApi";
45
+ rpa: "rpa";
46
+ server: "server";
47
+ }>>;
48
+ accountId: z.ZodOptional<z.ZodNumber>;
49
+ proxyLoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ localIP: z.ZodOptional<z.ZodString>;
51
+ huiwenToken: z.ZodOptional<z.ZodString>;
52
+ articleId: z.ZodOptional<z.ZodString>;
53
+ saveType: z.ZodOptional<z.ZodString>;
54
+ token: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
55
+ }, z.core.$strip>;
56
+ export type WxBjhSessionParams = z.infer<typeof WxBjhSessionParamsSchema>;
6
57
  export type ttSessionCheck = CommonAction<ActiomCommonParams, sessionCheckResult>;
7
- export interface wxSessionParams extends ActiomCommonParams {
8
- token: string | number;
9
- }
10
- export type wxSessionCheck = CommonAction<wxSessionParams, sessionCheckResult>;
58
+ export type wxSessionCheck = CommonAction<WxBjhSessionParams, sessionCheckResult>;
11
59
  export type xhsSessionCheck = CommonAction<ActiomCommonParams, sessionCheckResult>;
12
- export type bjhSessionCheck = CommonAction<ActiomCommonParams, sessionCheckResult>;
60
+ export type bjhSessionCheck = CommonAction<WxBjhSessionParams, sessionCheckResult>;
13
61
  export declare const TTSessionCheck: ttSessionCheck;
14
62
  export declare const WxSessionCheck: wxSessionCheck;
15
63
  export declare const XhsSessionCheck: xhsSessionCheck;
@@ -1,5 +1,6 @@
1
1
  import { type CommonAction } from "@iflyrpa/share";
2
2
  import type { ActiomCommonParams } from "../../types";
3
+ import { z } from "zod";
3
4
  export interface CollectionResponse {
4
5
  success: boolean;
5
6
  result: number;
@@ -12,20 +13,21 @@ export interface CollectionResponse {
12
13
  collections: CollectionDetail[];
13
14
  };
14
15
  }
15
- export interface CollectionDetail {
16
- id: string;
17
- name: string;
18
- desc: string;
19
- userId: string;
20
- noteNum: number;
21
- viewNum: number;
22
- cursor: string;
23
- enabled: boolean;
24
- status: number;
25
- createTime: number;
26
- unreadCount: number;
27
- coverImage: null;
28
- deeplink: string;
29
- }
16
+ export declare const CollectionDetailSchema: z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ desc: z.ZodString;
20
+ userId: z.ZodString;
21
+ noteNum: z.ZodNumber;
22
+ viewNum: z.ZodNumber;
23
+ cursor: z.ZodString;
24
+ enabled: z.ZodBoolean;
25
+ status: z.ZodNumber;
26
+ createTime: z.ZodNumber;
27
+ unreadCount: z.ZodNumber;
28
+ coverImage: z.ZodNull;
29
+ deeplink: z.ZodString;
30
+ }, z.core.$strip>;
31
+ export type CollectionDetail = z.infer<typeof CollectionDetailSchema>;
30
32
  export type PublishAction = CommonAction<ActiomCommonParams, CollectionDetail[]>;
31
33
  export declare const getXhsCollection: PublishAction;
@@ -1,5 +1,6 @@
1
1
  import { type CommonAction } from "@iflyrpa/share";
2
2
  import type { ActiomCommonParams } from "../../types";
3
+ import { z } from "zod";
3
4
  export interface GroupListResponse {
4
5
  success: boolean;
5
6
  msg: string;
@@ -8,12 +9,13 @@ export interface GroupListResponse {
8
9
  };
9
10
  code: number;
10
11
  }
11
- export interface GroupDetail {
12
- avatar: string;
13
- desc: string;
14
- group_id: string;
15
- group_name: string;
16
- linkable: boolean;
17
- }
12
+ export declare const GroupDetailSchema: z.ZodObject<{
13
+ avatar: z.ZodString;
14
+ desc: z.ZodString;
15
+ group_id: z.ZodString;
16
+ group_name: z.ZodString;
17
+ linkable: z.ZodBoolean;
18
+ }, z.core.$strip>;
19
+ export type GroupDetail = z.infer<typeof GroupDetailSchema>;
18
20
  export type PublishAction = CommonAction<ActiomCommonParams, GroupDetail[]>;
19
21
  export declare const getXhsGroup: PublishAction;
@@ -0,0 +1,12 @@
1
+ import { type CommonAction } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ import { z } from "zod";
4
+ export declare const UnreadCountSchema: z.ZodObject<{
5
+ connections: z.ZodNullable<z.ZodNumber>;
6
+ mentions: z.ZodNullable<z.ZodNumber>;
7
+ unread_count: z.ZodNullable<z.ZodNumber>;
8
+ likes: z.ZodNullable<z.ZodNumber>;
9
+ }, z.core.$strip>;
10
+ export type UnreadCount = z.infer<typeof UnreadCountSchema>;
11
+ export type PublishAction = CommonAction<ActiomCommonParams, UnreadCount>;
12
+ export declare const getXhsUnreadCount: PublishAction;
@@ -1,3 +1,4 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
1
2
  import { SearchAccountInfoResponse } from "./types";
2
3
  import { type SearchAccountInfoParams } from ".";
3
- export declare function getBaijiahaoData(params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
4
+ export declare function getBaijiahaoData(_task: AutomateTask, params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
@@ -1,3 +1,4 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
1
2
  import { SearchAccountInfoResponse } from "./types";
2
3
  import { type SearchAccountInfoParams } from ".";
3
- export declare function getToutiaoData(params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
4
+ export declare function getToutiaoData(_task: AutomateTask, params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
@@ -1,3 +1,4 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
1
2
  import { SearchAccountInfoResponse } from "./types";
2
3
  import { type SearchAccountInfoParams } from ".";
3
- export declare function getWeixinData(params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
4
+ export declare function getWeixinData(_task: AutomateTask, params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
@@ -1,3 +1,4 @@
1
- import { SearchAccountInfoResponse } from "./types";
2
- import { type SearchAccountInfoParams } from ".";
3
- export declare function getXiaohongshuData(params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import { type SearchAccountInfoResponse } from "./types";
3
+ import type { SearchAccountInfoParams } from ".";
4
+ export declare function getXiaohongshuData(_task: AutomateTask, params: SearchAccountInfoParams): Promise<SearchAccountInfoResponse>;
@@ -1,8 +1,59 @@
1
1
  import { type CommonAction } from "@iflyrpa/share";
2
- import type { ActiomCommonParams } from "../../types";
3
2
  import { ttConfigData, xhsConfigData, wxConfigData, bjhConfigData } from "./types";
4
- export interface SearchAccountInfoParams extends ActiomCommonParams {
5
- token?: string | number;
6
- platform: string;
7
- }
3
+ import { z } from "zod";
4
+ export declare const SearchAccountInfoParamsSchema: z.ZodObject<{
5
+ url: z.ZodOptional<z.ZodString>;
6
+ cookies: z.ZodArray<z.ZodObject<{
7
+ domain: z.ZodOptional<z.ZodString>;
8
+ path: z.ZodOptional<z.ZodString>;
9
+ expires: z.ZodOptional<z.ZodNumber>;
10
+ httpOnly: z.ZodOptional<z.ZodBoolean>;
11
+ secure: z.ZodOptional<z.ZodBoolean>;
12
+ session: z.ZodOptional<z.ZodBoolean>;
13
+ name: z.ZodString;
14
+ value: z.ZodString;
15
+ url: z.ZodOptional<z.ZodString>;
16
+ sameSite: z.ZodOptional<z.ZodEnum<{
17
+ Strict: "Strict";
18
+ Lax: "Lax";
19
+ None: "None";
20
+ }>>;
21
+ size: z.ZodOptional<z.ZodNumber>;
22
+ partitionKey: z.ZodOptional<z.ZodObject<{
23
+ topLevelSite: z.ZodString;
24
+ hasCrossSiteAncestor: z.ZodBoolean;
25
+ }, z.core.$strip>>;
26
+ priority: z.ZodOptional<z.ZodEnum<{
27
+ Low: "Low";
28
+ Medium: "Medium";
29
+ High: "High";
30
+ }>>;
31
+ sameParty: z.ZodOptional<z.ZodBoolean>;
32
+ sourceScheme: z.ZodOptional<z.ZodEnum<{
33
+ Unset: "Unset";
34
+ NonSecure: "NonSecure";
35
+ Secure: "Secure";
36
+ }>>;
37
+ sourcePort: z.ZodOptional<z.ZodNumber>;
38
+ }, z.core.$strip>>;
39
+ actionType: z.ZodOptional<z.ZodEnum<{
40
+ mockApi: "mockApi";
41
+ rpa: "rpa";
42
+ server: "server";
43
+ }>>;
44
+ accountId: z.ZodOptional<z.ZodNumber>;
45
+ proxyLoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ localIP: z.ZodOptional<z.ZodString>;
47
+ huiwenToken: z.ZodOptional<z.ZodString>;
48
+ articleId: z.ZodOptional<z.ZodString>;
49
+ saveType: z.ZodOptional<z.ZodString>;
50
+ token: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
51
+ platform: z.ZodEnum<{
52
+ toutiao: "toutiao";
53
+ xiaohongshu: "xiaohongshu";
54
+ weixin: "weixin";
55
+ baijiahao: "baijiahao";
56
+ }>;
57
+ }, z.core.$strip>;
58
+ export type SearchAccountInfoParams = z.infer<typeof SearchAccountInfoParamsSchema>;
8
59
  export declare const SearchAccountInfo: CommonAction<SearchAccountInfoParams, ttConfigData | xhsConfigData | wxConfigData | bjhConfigData | null>;
@@ -1,41 +1,46 @@
1
- export interface ttConfigData {
2
- fansNum: number;
3
- fansNumYesterday: number | null;
4
- readNum: number;
5
- incomeNum: number;
6
- incomeNumYesterday: number | null;
7
- showNumYesterday: number | null;
8
- readNumYesterday: number | null;
9
- likeNumYesterday: number | null;
10
- commentNumYesterday: number | null;
11
- }
12
- export interface xhsConfigData {
13
- fansNum: number;
14
- favedNum: number;
15
- watchNumLastWeek: number;
16
- likeNumLastWeek: number;
17
- collectNumLastWeek: number;
18
- commentNumLastWeek: number;
19
- fansNumLastWeek: number;
20
- fansNumYesterday: number;
21
- }
22
- export interface wxConfigData {
23
- fansNum: number;
24
- fansNumYesterday: number;
25
- readNumYesterday: number;
26
- shareNumYesterday: number;
27
- }
28
- export interface bjhConfigData {
29
- fansNum: number;
30
- fansNumYesterday: number | null;
31
- readNum: number;
32
- incomeNum: number;
33
- incomeNumYesterday: number | null;
34
- recommendNumYesterday: number | null;
35
- readNumYesterday: number | null;
36
- likeNumYesterday: number | null;
37
- commentNumYesterday: number | null;
38
- }
1
+ import { z } from 'zod';
2
+ export declare const ttConfigDataSchema: z.ZodObject<{
3
+ fansNum: z.ZodNumber;
4
+ fansNumYesterday: z.ZodNullable<z.ZodNumber>;
5
+ readNum: z.ZodNumber;
6
+ incomeNum: z.ZodNumber;
7
+ incomeNumYesterday: z.ZodNullable<z.ZodNumber>;
8
+ showNumYesterday: z.ZodNullable<z.ZodNumber>;
9
+ readNumYesterday: z.ZodNullable<z.ZodNumber>;
10
+ likeNumYesterday: z.ZodNullable<z.ZodNumber>;
11
+ commentNumYesterday: z.ZodNullable<z.ZodNumber>;
12
+ }, z.core.$strip>;
13
+ export type ttConfigData = z.infer<typeof ttConfigDataSchema>;
14
+ export declare const xhsConfigDataSchema: z.ZodObject<{
15
+ fansNum: z.ZodNumber;
16
+ favedNum: z.ZodNumber;
17
+ watchNumLastWeek: z.ZodNumber;
18
+ likeNumLastWeek: z.ZodNumber;
19
+ collectNumLastWeek: z.ZodNumber;
20
+ commentNumLastWeek: z.ZodNumber;
21
+ fansNumLastWeek: z.ZodNumber;
22
+ fansNumYesterday: z.ZodNumber;
23
+ }, z.core.$strip>;
24
+ export type xhsConfigData = z.infer<typeof xhsConfigDataSchema>;
25
+ export declare const wxConfigDataSchema: z.ZodObject<{
26
+ fansNum: z.ZodNumber;
27
+ fansNumYesterday: z.ZodNumber;
28
+ readNumYesterday: z.ZodNumber;
29
+ shareNumYesterday: z.ZodNumber;
30
+ }, z.core.$strip>;
31
+ export type wxConfigData = z.infer<typeof wxConfigDataSchema>;
32
+ export declare const bjhConfigDataSchema: z.ZodObject<{
33
+ fansNum: z.ZodNumber;
34
+ fansNumYesterday: z.ZodNullable<z.ZodNumber>;
35
+ readNum: z.ZodNumber;
36
+ incomeNum: z.ZodNumber;
37
+ incomeNumYesterday: z.ZodNullable<z.ZodNumber>;
38
+ recommendNumYesterday: z.ZodNullable<z.ZodNumber>;
39
+ readNumYesterday: z.ZodNullable<z.ZodNumber>;
40
+ likeNumYesterday: z.ZodNullable<z.ZodNumber>;
41
+ commentNumYesterday: z.ZodNullable<z.ZodNumber>;
42
+ }, z.core.$strip>;
43
+ export type bjhConfigData = z.infer<typeof bjhConfigDataSchema>;
39
44
  export interface SearchAccountInfoResponse {
40
45
  code: number;
41
46
  message: string;
@@ -0,0 +1,7 @@
1
+ import { type CommonAction } from "@iflyrpa/share";
2
+ import type { ActiomCommonParams } from "../../types";
3
+ export interface searchBjhUserArticleParams extends ActiomCommonParams {
4
+ searchValue: string;
5
+ }
6
+ export type PublishAction = CommonAction<searchBjhUserArticleParams, Record<string, unknown>[]>;
7
+ export declare const searchBjhUserArticle: PublishAction;
@@ -1,3 +1,4 @@
1
- import { FetchArticlesResponse } from "./types";
2
- import { type FetchArticlesParams } from ".";
3
- export declare function handleBaijiahaoData(params: FetchArticlesParams): Promise<FetchArticlesResponse>;
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import { type FetchArticlesResponse } from "./types";
3
+ import type { FetchArticlesParams } from ".";
4
+ export declare function handleBaijiahaoData(_task: AutomateTask, params: FetchArticlesParams): Promise<FetchArticlesResponse>;
@@ -1,3 +1,4 @@
1
+ import { AutomateTask } from "@iflyrpa/share";
1
2
  import { FetchArticlesResponse } from "./types";
2
3
  import { type FetchArticlesParams } from ".";
3
- export declare function handleToutiaoData(params: FetchArticlesParams): Promise<FetchArticlesResponse>;
4
+ export declare function handleToutiaoData(_task: AutomateTask, params: FetchArticlesParams): Promise<FetchArticlesResponse>;
@@ -1,3 +1,4 @@
1
- import { FetchArticlesResponse } from "./types";
2
- import { type FetchArticlesParams } from ".";
3
- export declare function handleWeixinData(params: FetchArticlesParams): Promise<FetchArticlesResponse>;
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import type { FetchArticlesParams } from ".";
3
+ import { type FetchArticlesResponse } from "./types";
4
+ export declare function handleWeixinData(_task: AutomateTask, params: FetchArticlesParams): Promise<FetchArticlesResponse>;
@@ -1,3 +1,4 @@
1
- import { FetchArticlesResponse } from "./types";
2
- import { type FetchArticlesParams } from ".";
3
- export declare function handleXiaohongshuData(params: FetchArticlesParams): Promise<FetchArticlesResponse>;
1
+ import { AutomateTask } from "@iflyrpa/share";
2
+ import { type FetchArticlesResponse } from "./types";
3
+ import type { FetchArticlesParams } from ".";
4
+ export declare function handleXiaohongshuData(_task: AutomateTask, params: FetchArticlesParams): Promise<FetchArticlesResponse>;
@@ -1,15 +1,62 @@
1
1
  import { type CommonAction } from "@iflyrpa/share";
2
- import { FetchArticlesData } from "./types";
3
- import type { ActiomCommonParams } from "../../types";
4
- export interface FetchArticlesParams extends ActiomCommonParams {
5
- platform: string;
6
- token?: string | number;
7
- pageNum?: number;
8
- pageSize?: number;
9
- size?: number;
10
- onlySuccess?: boolean;
11
- showOriginalData?: boolean;
12
- cursor?: number;
13
- lastPage?: number;
14
- }
15
- export declare const FetchArticles: CommonAction<FetchArticlesParams, FetchArticlesData | null>;
2
+ import type { FetchArticlesData } from "./types";
3
+ import { z } from "zod";
4
+ export declare const FetchArticlesParamsSchema: z.ZodObject<{
5
+ url: z.ZodOptional<z.ZodString>;
6
+ cookies: z.ZodArray<z.ZodObject<{
7
+ domain: z.ZodOptional<z.ZodString>;
8
+ path: z.ZodOptional<z.ZodString>;
9
+ expires: z.ZodOptional<z.ZodNumber>;
10
+ httpOnly: z.ZodOptional<z.ZodBoolean>;
11
+ secure: z.ZodOptional<z.ZodBoolean>;
12
+ session: z.ZodOptional<z.ZodBoolean>;
13
+ name: z.ZodString;
14
+ value: z.ZodString;
15
+ url: z.ZodOptional<z.ZodString>;
16
+ sameSite: z.ZodOptional<z.ZodEnum<{
17
+ Strict: "Strict";
18
+ Lax: "Lax";
19
+ None: "None";
20
+ }>>;
21
+ size: z.ZodOptional<z.ZodNumber>;
22
+ partitionKey: z.ZodOptional<z.ZodObject<{
23
+ topLevelSite: z.ZodString;
24
+ hasCrossSiteAncestor: z.ZodBoolean;
25
+ }, z.core.$strip>>;
26
+ priority: z.ZodOptional<z.ZodEnum<{
27
+ Low: "Low";
28
+ Medium: "Medium";
29
+ High: "High";
30
+ }>>;
31
+ sameParty: z.ZodOptional<z.ZodBoolean>;
32
+ sourceScheme: z.ZodOptional<z.ZodEnum<{
33
+ Unset: "Unset";
34
+ NonSecure: "NonSecure";
35
+ Secure: "Secure";
36
+ }>>;
37
+ sourcePort: z.ZodOptional<z.ZodNumber>;
38
+ }, z.core.$strip>>;
39
+ actionType: z.ZodOptional<z.ZodEnum<{
40
+ mockApi: "mockApi";
41
+ rpa: "rpa";
42
+ server: "server";
43
+ }>>;
44
+ accountId: z.ZodOptional<z.ZodNumber>;
45
+ proxyLoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ localIP: z.ZodOptional<z.ZodString>;
47
+ huiwenToken: z.ZodOptional<z.ZodString>;
48
+ articleId: z.ZodOptional<z.ZodString>;
49
+ saveType: z.ZodOptional<z.ZodString>;
50
+ platform: z.ZodString;
51
+ token: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
52
+ pageNum: z.ZodOptional<z.ZodNumber>;
53
+ pageSize: z.ZodOptional<z.ZodNumber>;
54
+ size: z.ZodOptional<z.ZodNumber>;
55
+ onlySuccess: z.ZodOptional<z.ZodBoolean>;
56
+ showOriginalData: z.ZodOptional<z.ZodBoolean>;
57
+ cursor: z.ZodOptional<z.ZodNumber>;
58
+ lastPage: z.ZodOptional<z.ZodNumber>;
59
+ containsArticle: z.ZodOptional<z.ZodBoolean>;
60
+ }, z.core.$strip>;
61
+ export type FetchArticlesParams = z.infer<typeof FetchArticlesParamsSchema>;
62
+ export declare const FetchArticles: CommonAction<FetchArticlesParams, FetchArticlesData | Record<string, never>>;
@@ -1,52 +1,113 @@
1
- interface BaseArticle {
2
- title: string;
3
- imageUrl: string;
4
- createTime: number;
5
- redirectUrl: string;
6
- originalData?: any;
7
- }
8
- export interface ToutiaoArticle extends BaseArticle {
9
- showNum: number;
10
- readNum: number;
11
- likeNum: number;
12
- commentNum: number;
13
- }
14
- export interface WeixinArticle extends BaseArticle {
15
- readNum: number;
16
- likeNum: number;
17
- shareNum: number;
18
- recommendNum: number;
19
- }
20
- export interface BaijiahaoArticle extends BaseArticle {
21
- recommendNum: number;
22
- collectNum: number;
23
- readNum: number;
24
- likeNum: number;
25
- commentNum: number;
26
- shareNum: number;
27
- }
28
- export interface XiaohongshuArticle extends BaseArticle {
29
- readNum: number;
30
- likeNum: number;
31
- commentNum: number;
32
- collectNum: number;
33
- shareNum: number;
34
- }
35
- export interface FetchArticlesData {
36
- articleCell?: (ToutiaoArticle | WeixinArticle | BaijiahaoArticle | XiaohongshuArticle)[];
37
- pagination?: {
38
- total?: number;
39
- nextPage?: boolean;
40
- lastPage?: number;
41
- cursor?: number;
42
- pageNum: number;
43
- pageSize: number;
44
- };
45
- }
1
+ import { z } from 'zod';
2
+ export declare const ToutiaoArticleSchema: z.ZodObject<{
3
+ title: z.ZodString;
4
+ imageUrl: z.ZodString;
5
+ createTime: z.ZodNumber;
6
+ redirectUrl: z.ZodString;
7
+ originalData: z.ZodOptional<z.ZodUnknown>;
8
+ showNum: z.ZodNumber;
9
+ readNum: z.ZodNumber;
10
+ likeNum: z.ZodNumber;
11
+ commentNum: z.ZodNumber;
12
+ }, z.core.$strip>;
13
+ export type ToutiaoArticle = z.infer<typeof ToutiaoArticleSchema>;
14
+ export declare const WeixinArticleSchema: z.ZodObject<{
15
+ title: z.ZodString;
16
+ imageUrl: z.ZodString;
17
+ createTime: z.ZodNumber;
18
+ redirectUrl: z.ZodString;
19
+ originalData: z.ZodOptional<z.ZodUnknown>;
20
+ readNum: z.ZodNumber;
21
+ likeNum: z.ZodNumber;
22
+ shareNum: z.ZodNumber;
23
+ recommendNum: z.ZodNumber;
24
+ }, z.core.$strip>;
25
+ export type WeixinArticle = z.infer<typeof WeixinArticleSchema>;
26
+ export declare const BaijiahaoArticleSchema: z.ZodObject<{
27
+ title: z.ZodString;
28
+ imageUrl: z.ZodString;
29
+ createTime: z.ZodNumber;
30
+ redirectUrl: z.ZodString;
31
+ originalData: z.ZodOptional<z.ZodUnknown>;
32
+ recommendNum: z.ZodNumber;
33
+ collectNum: z.ZodNumber;
34
+ readNum: z.ZodNumber;
35
+ likeNum: z.ZodNumber;
36
+ commentNum: z.ZodNumber;
37
+ shareNum: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ export type BaijiahaoArticle = z.infer<typeof BaijiahaoArticleSchema>;
40
+ export declare const XiaohongshuArticleSchema: z.ZodObject<{
41
+ title: z.ZodString;
42
+ imageUrl: z.ZodString;
43
+ createTime: z.ZodNumber;
44
+ redirectUrl: z.ZodString;
45
+ originalData: z.ZodOptional<z.ZodUnknown>;
46
+ readNum: z.ZodNumber;
47
+ likeNum: z.ZodNumber;
48
+ commentNum: z.ZodNumber;
49
+ collectNum: z.ZodNumber;
50
+ shareNum: z.ZodNumber;
51
+ }, z.core.$strip>;
52
+ export type XiaohongshuArticle = z.infer<typeof XiaohongshuArticleSchema>;
53
+ export declare const FetchArticlesDataSchema: z.ZodObject<{
54
+ articleCell: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
55
+ title: z.ZodString;
56
+ imageUrl: z.ZodString;
57
+ createTime: z.ZodNumber;
58
+ redirectUrl: z.ZodString;
59
+ originalData: z.ZodOptional<z.ZodUnknown>;
60
+ showNum: z.ZodNumber;
61
+ readNum: z.ZodNumber;
62
+ likeNum: z.ZodNumber;
63
+ commentNum: z.ZodNumber;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ title: z.ZodString;
66
+ imageUrl: z.ZodString;
67
+ createTime: z.ZodNumber;
68
+ redirectUrl: z.ZodString;
69
+ originalData: z.ZodOptional<z.ZodUnknown>;
70
+ readNum: z.ZodNumber;
71
+ likeNum: z.ZodNumber;
72
+ shareNum: z.ZodNumber;
73
+ recommendNum: z.ZodNumber;
74
+ }, z.core.$strip>, z.ZodObject<{
75
+ title: z.ZodString;
76
+ imageUrl: z.ZodString;
77
+ createTime: z.ZodNumber;
78
+ redirectUrl: z.ZodString;
79
+ originalData: z.ZodOptional<z.ZodUnknown>;
80
+ recommendNum: z.ZodNumber;
81
+ collectNum: z.ZodNumber;
82
+ readNum: z.ZodNumber;
83
+ likeNum: z.ZodNumber;
84
+ commentNum: z.ZodNumber;
85
+ shareNum: z.ZodNumber;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ title: z.ZodString;
88
+ imageUrl: z.ZodString;
89
+ createTime: z.ZodNumber;
90
+ redirectUrl: z.ZodString;
91
+ originalData: z.ZodOptional<z.ZodUnknown>;
92
+ readNum: z.ZodNumber;
93
+ likeNum: z.ZodNumber;
94
+ commentNum: z.ZodNumber;
95
+ collectNum: z.ZodNumber;
96
+ shareNum: z.ZodNumber;
97
+ }, z.core.$strip>]>>>;
98
+ pagination: z.ZodOptional<z.ZodObject<{
99
+ total: z.ZodOptional<z.ZodNumber>;
100
+ nextPage: z.ZodOptional<z.ZodBoolean>;
101
+ lastPage: z.ZodOptional<z.ZodNumber>;
102
+ cursor: z.ZodOptional<z.ZodNumber>;
103
+ pageNum: z.ZodNumber;
104
+ pageSize: z.ZodNumber;
105
+ }, z.core.$strip>>;
106
+ }, z.core.$strip>;
107
+ export type FetchArticlesData = z.infer<typeof FetchArticlesDataSchema>;
46
108
  export interface FetchArticlesResponse {
47
109
  code: number;
48
110
  message: string;
49
- data: FetchArticlesData | null;
111
+ data: FetchArticlesData | Record<string, never>;
50
112
  }
51
113
  export declare const errorResponse: (message: string, code?: number) => FetchArticlesResponse;
52
- export {};