@iflyrpa/actions 1.2.22 → 1.2.24
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/bundle.js +394 -94
- package/dist/bundle.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +394 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +395 -94
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/utils/xhsXsEncrypt.d.ts +19 -35
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,48 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 小红书请求客户端封装
|
|
3
3
|
*/
|
|
4
|
-
export declare class
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
private iv;
|
|
4
|
+
export declare class Xhshow {
|
|
5
|
+
private cryptoProcessor;
|
|
6
|
+
constructor();
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @param {string} url - API的url
|
|
12
|
-
* @returns {string} MD5摘要
|
|
8
|
+
* 构建内容字符串(用于MD5计算和签名生成)
|
|
13
9
|
*/
|
|
14
|
-
|
|
10
|
+
private buildContentString;
|
|
15
11
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @param {string} text - 需要加密的字符串
|
|
19
|
-
* @returns {string} 加密后的base64编码字符串
|
|
12
|
+
* 从内容字符串生成d值(MD5哈希)
|
|
20
13
|
*/
|
|
21
|
-
|
|
14
|
+
private generateDValue;
|
|
22
15
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* @param {string} encodedData - 加密后的payload(Base64编码)
|
|
26
|
-
* @returns {string} 十六进制字符串
|
|
16
|
+
* 构建签名
|
|
27
17
|
*/
|
|
28
|
-
|
|
18
|
+
private buildSignature;
|
|
29
19
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @param {string} payload - 要加密处理的payload内容
|
|
33
|
-
* @param {string} platform - 登录平台
|
|
34
|
-
* @returns {string} 加密后并进行base64编码的字符串
|
|
20
|
+
* 生成请求签名(支持GET和POST)
|
|
35
21
|
*/
|
|
36
|
-
|
|
22
|
+
signXs(method: 'GET' | 'POST', uri: string, a1Value: string, xsecAppid?: string, payload?: Record<string, any> | null): string;
|
|
37
23
|
/**
|
|
38
|
-
*
|
|
39
|
-
* Args: url: API请求的URL
|
|
40
|
-
* a1: 签名参数a1
|
|
41
|
-
* ts: 时间戳
|
|
42
|
-
* platform: 登录平台 默认为xhs-pc-web
|
|
43
|
-
* Returns:
|
|
44
|
-
* 最终的加密签名字符串,前缀为“XYW_”
|
|
24
|
+
* 生成GET请求签名(便捷方法)
|
|
45
25
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
26
|
+
signXsGet(uri: string, a1Value: string, xsecAppid?: string, params?: Record<string, any> | null): string;
|
|
27
|
+
/**
|
|
28
|
+
* 生成POST请求签名(便捷方法)
|
|
29
|
+
*/
|
|
30
|
+
signXsPost(uri: string, a1Value: string, xsecAppid?: string, payload?: Record<string, any> | null): string;
|
|
48
31
|
}
|
|
32
|
+
export default Xhshow;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iflyrpa/actions",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.24",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"form-data": "^4.0.1",
|
|
17
17
|
"htmlparser2": "^9.1.0",
|
|
18
18
|
"mime-types": "^2.1.35",
|
|
19
|
-
"@iflyrpa/share": "0.0.
|
|
19
|
+
"@iflyrpa/share": "0.0.13"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@rslib/core": "^0.4.1",
|