@iflyrpa/actions 2.0.1 → 3.0.0-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.
- package/dist/actions/baijiahaoLogin/rpa.d.ts +11 -0
- package/dist/actions/baijiahaoPublish/index.d.ts +5 -0
- package/dist/actions/common/sessionCheck/index.d.ts +5 -0
- package/dist/actions/douyinCheckVerifyQrCode/index.d.ts +84 -0
- package/dist/actions/douyinCreateCommentReply/schema.d.ts +5 -0
- package/dist/actions/douyinGetCollection/schema.d.ts +5 -0
- package/dist/actions/douyinGetCommentList/schema.d.ts +5 -0
- package/dist/actions/douyinGetCommentReplyList/schema.d.ts +5 -0
- package/dist/actions/douyinGetHot/schema.d.ts +5 -0
- package/dist/actions/douyinGetLocation/schema.d.ts +5 -0
- package/dist/actions/douyinGetMusic/schema.d.ts +5 -0
- package/dist/actions/douyinGetMusicByCategory/schema.d.ts +5 -0
- package/dist/actions/douyinGetMusicCategory/index.d.ts +5 -0
- package/dist/actions/douyinGetMusicCategory/schema.d.ts +5 -0
- package/dist/actions/douyinGetTopics/schema.d.ts +5 -0
- package/dist/actions/douyinGetVerifyQrCode/index.d.ts +66 -0
- package/dist/actions/douyinGetWorkList/schema.d.ts +5 -0
- package/dist/actions/douyinLogin/rpa.d.ts +13 -0
- package/dist/actions/douyinPublish/index.d.ts +19 -0
- package/dist/actions/douyinPublish/rpa-server.d.ts +2 -0
- package/dist/actions/getShipinhaoPostList/index.d.ts +1 -0
- package/dist/actions/searchAccountInfo/index.d.ts +6 -1
- package/dist/actions/searchPublishInfo/index.d.ts +5 -0
- package/dist/actions/shipinhaoCheckLinkValidate/schema.d.ts +5 -0
- package/dist/actions/shipinhaoGetLocation/schema.d.ts +5 -0
- package/dist/actions/shipinhaoGetMsg/index.d.ts +65 -0
- package/dist/actions/shipinhaoGetMsg/schema.d.ts +35 -0
- package/dist/actions/shipinhaoGetMsgImage/index.d.ts +25 -0
- package/dist/actions/shipinhaoLogin/rpa.d.ts +11 -0
- package/dist/actions/shipinhaoPublish/index.d.ts +5 -0
- package/dist/actions/shipinhaoPublish/uploader.d.ts +5 -4
- package/dist/actions/shipinhaoSendMsg/index.d.ts +22 -0
- package/dist/actions/shipinhaoSendMsg/schema.d.ts +46 -0
- package/dist/actions/toutiaoLogin/rpa.d.ts +10 -0
- package/dist/actions/toutiaoPublish/index.d.ts +5 -0
- package/dist/actions/weixinLogin/rpa.d.ts +11 -0
- package/dist/actions/weixinPublish/index.d.ts +5 -0
- package/dist/actions/xiaohongshuLogin/rpa.d.ts +29 -0
- package/dist/actions/xiaohongshuPublish/index.d.ts +5 -0
- package/dist/actions/xiaohongshuWebSearch/index.d.ts +5 -0
- package/dist/bundle.js +5608 -3912
- package/dist/bundle.js.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.js +6041 -4361
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6031 -4356
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/utils/douyin/imageUploader.d.ts +3 -3
- package/dist/utils/douyin/verify-parser.d.ts +73 -0
- package/dist/utils/reportLogger.d.ts +14 -0
- package/dist/utils/xhs_ob_feed/index.d.ts +6 -0
- package/dist/utils/xhs_ob_feed/mnsvc2.d.ts +8 -0
- package/package.json +3 -1
- package/dist/utils/douyin/sessionDtrait.d.ts +0 -35
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type CommonAction } from "@iflyrpa/share";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { ShipinhaoGetMsgParamsSchema } from "./schema";
|
|
4
|
+
export type ShipinhaoGetMsgParams = z.infer<typeof ShipinhaoGetMsgParamsSchema>;
|
|
5
|
+
export { ShipinhaoGetMsgParamsSchema } from "./schema";
|
|
6
|
+
export interface RawMessage {
|
|
7
|
+
svrMsgId: string;
|
|
8
|
+
fromUsername: string;
|
|
9
|
+
toUsername: string;
|
|
10
|
+
sessionId: string;
|
|
11
|
+
ts: number;
|
|
12
|
+
textMsg?: {
|
|
13
|
+
content: string;
|
|
14
|
+
};
|
|
15
|
+
imgMsg?: any;
|
|
16
|
+
}
|
|
17
|
+
export interface SessionInfo {
|
|
18
|
+
username: string;
|
|
19
|
+
nickname: string;
|
|
20
|
+
headImgUrl: string;
|
|
21
|
+
sessionId: string;
|
|
22
|
+
sessionType?: number;
|
|
23
|
+
rejectMsg?: number;
|
|
24
|
+
extInfo?: any;
|
|
25
|
+
fromUserType?: number;
|
|
26
|
+
msgList?: RawMessage[];
|
|
27
|
+
}
|
|
28
|
+
export interface MessageListResponse {
|
|
29
|
+
errCode: number;
|
|
30
|
+
errMsg: string;
|
|
31
|
+
data?: {
|
|
32
|
+
msg?: RawMessage[];
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface SessionDetailResponse {
|
|
36
|
+
errCode: number;
|
|
37
|
+
errMsg: string;
|
|
38
|
+
data?: {
|
|
39
|
+
sessionInfo?: SessionInfo[];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface ProcessedMessage {
|
|
43
|
+
platform: string;
|
|
44
|
+
accountId: string;
|
|
45
|
+
messageId: string;
|
|
46
|
+
content: string;
|
|
47
|
+
timestamp: number;
|
|
48
|
+
messageUserId: string;
|
|
49
|
+
messageOwnerUserId: string;
|
|
50
|
+
raw: RawMessage;
|
|
51
|
+
}
|
|
52
|
+
export interface ProcessedMessageUser {
|
|
53
|
+
platform: string;
|
|
54
|
+
accountId: string;
|
|
55
|
+
messageUserId: string;
|
|
56
|
+
messageUserName: string;
|
|
57
|
+
messageUserAvatar: string;
|
|
58
|
+
messageOwnerId: string;
|
|
59
|
+
sessionId: string;
|
|
60
|
+
raw: SessionInfo;
|
|
61
|
+
}
|
|
62
|
+
export type ShipinhaoGetMsgAction = CommonAction<ShipinhaoGetMsgParams, {
|
|
63
|
+
sessionInfo: SessionInfo[];
|
|
64
|
+
}>;
|
|
65
|
+
export declare const shipinhaoGetMsg: ShipinhaoGetMsgAction;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const ShipinhaoGetMsgParamsSchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
3
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4
|
+
viewport: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodObject<{
|
|
5
|
+
width: import("zod").ZodNumber;
|
|
6
|
+
height: import("zod").ZodNumber;
|
|
7
|
+
}, import("zod/v4/core").$strip>>>;
|
|
8
|
+
url: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
cookies: import("zod").ZodArray<import("zod").ZodObject<{
|
|
10
|
+
name: import("zod").ZodString;
|
|
11
|
+
value: import("zod").ZodString;
|
|
12
|
+
domain: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
expires: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
15
|
+
httpOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
16
|
+
secure: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
17
|
+
}, import("zod/v4/core").$catchall<import("zod").ZodUnknown>>>;
|
|
18
|
+
localStorage: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
19
|
+
key: import("zod").ZodString;
|
|
20
|
+
value: import("zod").ZodString;
|
|
21
|
+
}, import("zod/v4/core").$catchall<import("zod").ZodUnknown>>>>;
|
|
22
|
+
extraParam: import("zod").ZodOptional<import("zod").ZodAny>;
|
|
23
|
+
actionType: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
24
|
+
mockApi: "mockApi";
|
|
25
|
+
rpa: "rpa";
|
|
26
|
+
server: "server";
|
|
27
|
+
}>>;
|
|
28
|
+
accountId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
29
|
+
proxyLoc: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
30
|
+
localIP: import("zod").ZodOptional<import("zod").ZodString>;
|
|
31
|
+
huiwenToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
+
articleId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
saveType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
34
|
+
uid: import("zod").ZodOptional<import("zod").ZodString>;
|
|
35
|
+
}, import("zod/v4/core").$strip>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type CommonAction } from "@iflyrpa/share";
|
|
2
|
+
import { ActiomCommonParams } from "../../types";
|
|
3
|
+
export interface ShipinhaoGetMsgImageParams extends ActiomCommonParams {
|
|
4
|
+
imgMsg: {
|
|
5
|
+
aeskey: string;
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
rawContent: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MediaInfoResponse {
|
|
11
|
+
errCode: number;
|
|
12
|
+
errMsg: string;
|
|
13
|
+
data?: {
|
|
14
|
+
baseResp?: {
|
|
15
|
+
errcode: number;
|
|
16
|
+
};
|
|
17
|
+
imgContent?: string;
|
|
18
|
+
length?: string;
|
|
19
|
+
ext?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export type ShipinhaoGetMediaInfoAction = CommonAction<ShipinhaoGetMsgImageParams, {
|
|
23
|
+
base64Img: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const shipinhaoGetMsgImage: ShipinhaoGetMediaInfoAction;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { SteelAction } from "./index";
|
|
2
|
+
/**
|
|
3
|
+
* 视频号登录 RPA
|
|
4
|
+
*
|
|
5
|
+
* 流程:
|
|
6
|
+
* 1. 打开视频号助手登录页,生成远程调试地址
|
|
7
|
+
* 2. 拦截不必要资源(mp4/ttf),提升加载速度
|
|
8
|
+
* 3. 监听 auth_login_status 接口判断扫码状态
|
|
9
|
+
* 4. 扫码确认后切换监听 auth_data 获取用户信息和 finder 列表
|
|
10
|
+
* 5. 提取 localStorage 中的 fingerPrintDeviceId 和 aId
|
|
11
|
+
* 6. 收集 cookie 并返回结果
|
|
12
|
+
*/
|
|
2
13
|
export declare const rpaAction: SteelAction;
|
|
@@ -17,6 +17,10 @@ export declare const ShipinhaoPublishParamsSchema: z.ZodObject<{
|
|
|
17
17
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
20
|
+
localStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
key: z.ZodString;
|
|
22
|
+
value: z.ZodString;
|
|
23
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
20
24
|
extraParam: z.ZodOptional<z.ZodAny>;
|
|
21
25
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
22
26
|
mockApi: "mockApi";
|
|
@@ -27,6 +31,7 @@ export declare const ShipinhaoPublishParamsSchema: z.ZodObject<{
|
|
|
27
31
|
huiwenToken: z.ZodOptional<z.ZodString>;
|
|
28
32
|
articleId: z.ZodOptional<z.ZodString>;
|
|
29
33
|
saveType: z.ZodOptional<z.ZodString>;
|
|
34
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
30
35
|
title: z.ZodString;
|
|
31
36
|
content: z.ZodString;
|
|
32
37
|
banners: z.ZodArray<z.ZodString>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Http } from "../../utils/http";
|
|
1
2
|
/**
|
|
2
3
|
* 视频号分片上传配置
|
|
3
4
|
*/
|
|
@@ -5,6 +6,7 @@ interface UploadConfig {
|
|
|
5
6
|
chunkSize?: number;
|
|
6
7
|
concurrentLimit?: number;
|
|
7
8
|
singleFileSize?: number;
|
|
9
|
+
http?: Http;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* 上传进度回调
|
|
@@ -23,6 +25,7 @@ export declare class VideoChannelUploader {
|
|
|
23
25
|
private chunkSize;
|
|
24
26
|
private concurrentLimit;
|
|
25
27
|
private singleFileSize;
|
|
28
|
+
private http;
|
|
26
29
|
private uploadTaskId;
|
|
27
30
|
private partInfo;
|
|
28
31
|
private md5;
|
|
@@ -56,12 +59,10 @@ export declare class VideoChannelUploader {
|
|
|
56
59
|
/**
|
|
57
60
|
* 获取上传认证参数(UploadID)
|
|
58
61
|
*/
|
|
59
|
-
private getUploadId;
|
|
60
|
-
/**
|
|
62
|
+
private getUploadId; /**
|
|
61
63
|
* 上传单个分片
|
|
62
64
|
*/
|
|
63
|
-
private uploadChunk;
|
|
64
|
-
/**
|
|
65
|
+
private uploadChunk; /**
|
|
65
66
|
* 确认分片上传(用于断点续传检查)
|
|
66
67
|
*/
|
|
67
68
|
private confirmChunks;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CommonAction } from "@iflyrpa/share";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { ShipinhaoSendMsgParamsSchema } from "./schema";
|
|
4
|
+
export type ShipinhaoSendMsgParams = z.infer<typeof ShipinhaoSendMsgParamsSchema>;
|
|
5
|
+
export { ShipinhaoSendMsgParamsSchema } from "./schema";
|
|
6
|
+
export interface UploadMsgImageResponse {
|
|
7
|
+
errCode: number;
|
|
8
|
+
errMsg: string;
|
|
9
|
+
data?: {
|
|
10
|
+
imgMsg: {
|
|
11
|
+
aesKey: string;
|
|
12
|
+
cdnUrl: string;
|
|
13
|
+
encryptKey: string;
|
|
14
|
+
height: number;
|
|
15
|
+
md5: string;
|
|
16
|
+
size: number;
|
|
17
|
+
width: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export type SendShipinhaoMsgAction = CommonAction<ShipinhaoSendMsgParams, any>;
|
|
22
|
+
export declare const shipinhaoSendMsg: SendShipinhaoMsgAction;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ShipinhaoSendMsgParamsSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
5
|
+
viewport: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
6
|
+
width: z.ZodNumber;
|
|
7
|
+
height: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>>>;
|
|
9
|
+
url: z.ZodOptional<z.ZodString>;
|
|
10
|
+
cookies: z.ZodArray<z.ZodObject<{
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
value: z.ZodString;
|
|
13
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
14
|
+
path: z.ZodOptional<z.ZodString>;
|
|
15
|
+
expires: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
secure: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
19
|
+
localStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
20
|
+
key: z.ZodString;
|
|
21
|
+
value: z.ZodString;
|
|
22
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
23
|
+
extraParam: z.ZodOptional<z.ZodAny>;
|
|
24
|
+
actionType: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
mockApi: "mockApi";
|
|
26
|
+
rpa: "rpa";
|
|
27
|
+
server: "server";
|
|
28
|
+
}>>;
|
|
29
|
+
accountId: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
proxyLoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
localIP: z.ZodOptional<z.ZodString>;
|
|
32
|
+
huiwenToken: z.ZodOptional<z.ZodString>;
|
|
33
|
+
articleId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
saveType: z.ZodOptional<z.ZodString>;
|
|
35
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
36
|
+
toUsername: z.ZodString;
|
|
37
|
+
sessionId: z.ZodString;
|
|
38
|
+
msgType: z.ZodEnum<{
|
|
39
|
+
TEXT: "TEXT";
|
|
40
|
+
IMAGE: "IMAGE";
|
|
41
|
+
}>;
|
|
42
|
+
content: z.ZodOptional<z.ZodString>;
|
|
43
|
+
imageInfo: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
pathOrUrl: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { SteelAction } from "./index";
|
|
2
|
+
/**
|
|
3
|
+
* 头条号登录 RPA
|
|
4
|
+
*
|
|
5
|
+
* 流程:
|
|
6
|
+
* 1. 打开头条号登录页
|
|
7
|
+
* 2. 生成远程调试地址,等待用户扫码
|
|
8
|
+
* 3. 监听 user_info 接口获取用户信息
|
|
9
|
+
* 4. 等待页面跳转到 /profile_v4/index 判断登录成功
|
|
10
|
+
* 5. 收集 cookie 并返回结果
|
|
11
|
+
*/
|
|
2
12
|
export declare const rpaAction: SteelAction;
|
|
@@ -18,6 +18,10 @@ export declare const ToutiaoPublishParamsSchema: z.ZodObject<{
|
|
|
18
18
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
20
20
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
21
|
+
localStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
value: z.ZodString;
|
|
24
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
21
25
|
extraParam: z.ZodOptional<z.ZodAny>;
|
|
22
26
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
23
27
|
mockApi: "mockApi";
|
|
@@ -26,6 +30,7 @@ export declare const ToutiaoPublishParamsSchema: z.ZodObject<{
|
|
|
26
30
|
}>>;
|
|
27
31
|
accountId: z.ZodOptional<z.ZodNumber>;
|
|
28
32
|
articleId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
29
34
|
saveType: z.ZodUnion<readonly [z.ZodLiteral<"draft">, z.ZodLiteral<"publish">]>;
|
|
30
35
|
title: z.ZodString;
|
|
31
36
|
content: z.ZodString;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { SteelAction } from "./index";
|
|
2
|
+
/**
|
|
3
|
+
* 微信公众号登录 RPA
|
|
4
|
+
*
|
|
5
|
+
* 流程:
|
|
6
|
+
* 1. 打开微信公众号登录页
|
|
7
|
+
* 2. 生成远程调试地址,等待用户扫码
|
|
8
|
+
* 3. 监听 scanloginqrcode 接口判断扫码状态(0=未扫码, 4=已扫码未确认, 1=已确认)
|
|
9
|
+
* 4. 扫码确认后监听页面跳转到 /wxamp/home,提取 token
|
|
10
|
+
* 5. 从 __INITIAL_STATE__ 获取用户信息
|
|
11
|
+
* 6. 收集 cookie 并返回结果
|
|
12
|
+
*/
|
|
2
13
|
export declare const rpaAction: SteelAction;
|
|
@@ -47,6 +47,10 @@ export declare const WeixinPublishParamsSchema: z.ZodObject<{
|
|
|
47
47
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
48
48
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
49
49
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
50
|
+
localStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
51
|
+
key: z.ZodString;
|
|
52
|
+
value: z.ZodString;
|
|
53
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
50
54
|
extraParam: z.ZodOptional<z.ZodAny>;
|
|
51
55
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
52
56
|
mockApi: "mockApi";
|
|
@@ -55,6 +59,7 @@ export declare const WeixinPublishParamsSchema: z.ZodObject<{
|
|
|
55
59
|
}>>;
|
|
56
60
|
accountId: z.ZodOptional<z.ZodNumber>;
|
|
57
61
|
articleId: z.ZodOptional<z.ZodString>;
|
|
62
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
58
63
|
saveType: z.ZodEnum<{
|
|
59
64
|
draft: "draft";
|
|
60
65
|
publish: "publish";
|
|
@@ -1,2 +1,31 @@
|
|
|
1
|
+
import { type UserInfo } from "@iflyrpa/share";
|
|
1
2
|
import type { SteelAction } from "./index";
|
|
3
|
+
interface CookieLike {
|
|
4
|
+
domain?: string;
|
|
5
|
+
}
|
|
6
|
+
interface CreatorUserInfoPayload {
|
|
7
|
+
data?: {
|
|
8
|
+
userId?: string;
|
|
9
|
+
userName?: string;
|
|
10
|
+
userAvatar?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare const isCreatorPublishUrl: (url: string) => boolean;
|
|
16
|
+
export declare const isExploreUrl: (url: string) => boolean;
|
|
17
|
+
export declare const filterCreatorCookies: <T extends CookieLike>(cookies: T[]) => T[];
|
|
18
|
+
export declare const mergeUserInfo: (current: UserInfo, next: UserInfo) => UserInfo;
|
|
19
|
+
export declare const extractCreatorUserInfo: (payload: CreatorUserInfoPayload) => UserInfo;
|
|
20
|
+
/**
|
|
21
|
+
* 小红书登录 RPA
|
|
22
|
+
*
|
|
23
|
+
* 流程:
|
|
24
|
+
* 1. 打开小红书登录页,生成远程调试地址
|
|
25
|
+
* 2. 监听二维码扫码状态接口 /login/qrcode/status
|
|
26
|
+
* 3. 扫码成功后,等待页面跳转到 /explore
|
|
27
|
+
* 4. 主动跳转到创作者发布页,确认创作者平台登录态
|
|
28
|
+
* 5. 返回创作者相关 cookie
|
|
29
|
+
*/
|
|
2
30
|
export declare const rpaAction: SteelAction;
|
|
31
|
+
export {};
|
|
@@ -18,6 +18,10 @@ export declare const XiaohongshuPublishParamsSchema: z.ZodObject<{
|
|
|
18
18
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
20
20
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
21
|
+
localStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
|
+
key: z.ZodString;
|
|
23
|
+
value: z.ZodString;
|
|
24
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
21
25
|
extraParam: z.ZodOptional<z.ZodAny>;
|
|
22
26
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
23
27
|
mockApi: "mockApi";
|
|
@@ -27,6 +31,7 @@ export declare const XiaohongshuPublishParamsSchema: z.ZodObject<{
|
|
|
27
31
|
accountId: z.ZodOptional<z.ZodNumber>;
|
|
28
32
|
articleId: z.ZodOptional<z.ZodString>;
|
|
29
33
|
saveType: z.ZodOptional<z.ZodString>;
|
|
34
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
30
35
|
banners: z.ZodArray<z.ZodString>;
|
|
31
36
|
title: z.ZodString;
|
|
32
37
|
content: z.ZodString;
|
|
@@ -17,6 +17,10 @@ export declare const XhsWebSearchParamsSchema: z.ZodObject<{
|
|
|
17
17
|
httpOnly: z.ZodOptional<z.ZodBoolean>;
|
|
18
18
|
secure: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
20
|
+
localStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
key: z.ZodString;
|
|
22
|
+
value: z.ZodString;
|
|
23
|
+
}, z.core.$catchall<z.ZodUnknown>>>>;
|
|
20
24
|
extraParam: z.ZodOptional<z.ZodAny>;
|
|
21
25
|
actionType: z.ZodOptional<z.ZodEnum<{
|
|
22
26
|
mockApi: "mockApi";
|
|
@@ -29,6 +33,7 @@ export declare const XhsWebSearchParamsSchema: z.ZodObject<{
|
|
|
29
33
|
huiwenToken: z.ZodOptional<z.ZodString>;
|
|
30
34
|
articleId: z.ZodOptional<z.ZodString>;
|
|
31
35
|
saveType: z.ZodOptional<z.ZodString>;
|
|
36
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
32
37
|
keyword: z.ZodString;
|
|
33
38
|
page: z.ZodNumber;
|
|
34
39
|
page_size: z.ZodNumber;
|