@yixiaoermail/cli 3.2.7 → 3.2.8

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 (27) hide show
  1. package/checksums.txt +6 -6
  2. package/package.json +1 -1
  3. package/references/cli/command-reference.md +2 -0
  4. package/references/get-goods.md +14 -0
  5. package/references/platforms/article/jianshu.md +4 -2
  6. package/schemas/platforms/baijiahao.article.schema.json +1 -5
  7. package/schemas/platforms/baijiahao.imageText.schema.json +4 -4
  8. package/schemas/platforms/baijiahao.video.schema.json +4 -4
  9. package/schemas/platforms/dewu.video.schema.json +4 -4
  10. package/schemas/platforms/fengwang.video.schema.json +4 -4
  11. package/schemas/platforms/kuaishou.imageText.schema.json +4 -4
  12. package/schemas/platforms/kuaishou.video.schema.json +4 -4
  13. package/schemas/platforms/meipai.video.schema.json +4 -4
  14. package/schemas/platforms/shipinhao.imageText.schema.json +4 -4
  15. package/schemas/platforms/shipinhao.video.schema.json +4 -4
  16. package/schemas/platforms/souhuhao.video.schema.json +9 -9
  17. package/schemas/platforms/toutiaohao.article.schema.json +4 -4
  18. package/schemas/platforms/xhs.imageText.schema.json +4 -4
  19. package/schemas/platforms/xiaohongshu.video.schema.json +4 -4
  20. package/schemas/platforms/xiaohongshushop.video.schema.json +4 -4
  21. package/schemas/platforms/xinlang.imageText.schema.json +4 -4
  22. package/schemas/platforms/xinlang.video.schema.json +5 -6
  23. package/schemas/platforms/yidianhao.video.schema.json +4 -4
  24. package/skills/yixiaoer/SKILL.md +1 -1
  25. package/skills/yixiaoer/references/cli/command-reference.md +2 -0
  26. package/skills/yixiaoer/references/get-goods.md +14 -0
  27. package/skills/yixiaoer/references/platforms/article/jianshu.md +4 -2
package/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- 79c3eb4d076d3b0e7fb307f74dd5e2a1277777fd7a7d0fb21fe85db0504bd495 yxer-cli-3.2.7-windows-amd64.zip
2
- 612550d100ba1bf2b913057ff5dce69398f5f621521ac0e99a486e68a8b4a217 yxer-cli-3.2.7-windows-arm64.zip
3
- 93ea8664d3b26efc908c033cbaebf52bb170b852c17037c20d5b1098177017f1 yxer-cli-3.2.7-darwin-amd64.tar.gz
4
- df053bb7a8731679777fa7808873f3208d242c3e6efc945dda2a3651d4c3bb42 yxer-cli-3.2.7-darwin-arm64.tar.gz
5
- c347d5c564433d5428703c835e8bc75f0a4bd3be0fab42967e775016d74f9fcf yxer-cli-3.2.7-linux-amd64.tar.gz
6
- 32291846694826d179823e4126fa92c7c4dc75fc78acf97cb477e046c7661cbd yxer-cli-3.2.7-linux-arm64.tar.gz
1
+ fcb9a7ce314f104e476e4e8b3a6f6c042aae37074459d2de139af646796ef5b8 yxer-cli-3.2.8-windows-amd64.zip
2
+ 65194358fd78143062adf7e0338b8f7ba213c9d3563ec818f9fd39212ca2ab38 yxer-cli-3.2.8-windows-arm64.zip
3
+ b0b061b432041425aa5d8b70ecd6e1b991ee921978f846ca5265ae045289fb3c yxer-cli-3.2.8-darwin-amd64.tar.gz
4
+ 71de6594c86ee6bfa313041b22c9c671cfffde09d39d2d2851717585de6a9397 yxer-cli-3.2.8-darwin-arm64.tar.gz
5
+ aa89df1335b649b1b95db5ad591ef08e8a39da8bbe99503ab08cd67f79b595f1 yxer-cli-3.2.8-linux-amd64.tar.gz
6
+ d37d14713ec8bb084ebe0e99c41e79ccee217d01c3eb8da09969440135c9d7d6 yxer-cli-3.2.8-linux-arm64.tar.gz
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yixiaoermail/cli",
3
- "version": "3.2.7",
3
+ "version": "3.2.8",
4
4
  "description": "Yixiaoer CLI packaged for npm global installation",
5
5
  "bin": {
6
6
  "yxer": "bin/yxer.js"
@@ -69,6 +69,8 @@ yxer query categories <account_id> [--type video|article]
69
69
  yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3]
70
70
  yxer query music <account_id> [--query 关键词]
71
71
  yxer query goods <account_id> [--query 关键词]
72
+ yxer query goods-detail <account_id> --url <product_url>
73
+ yxer query entitlements <account_id>
72
74
  yxer query collections <account_id> [--type video|article]
73
75
  yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
74
76
  yxer query challenges <account_id> [--query 关键词] [--type video]
@@ -2,10 +2,13 @@
2
2
 
3
3
  此接口用于获取指定媒体账号在平台上关联的商品、团购或小店商品列表,以便在发布视频时进行商业推广。
4
4
 
5
+ 若需要从一个商品链接生成可挂购物车的完整商品对象,使用 `goods-detail`。它解析单个链接,不查询账号的选品车或商品列表。
6
+
5
7
  ## 1. 调用指令
6
8
 
7
9
  ```bash
8
10
  yxer query goods YOUR_ACCOUNT_ID --query 可选搜索词 --json
11
+ yxer query goods-detail YOUR_ACCOUNT_ID --url "商品链接" --json
9
12
  ```
10
13
 
11
14
  ## 2. 请求参数
@@ -16,10 +19,21 @@ yxer query goods YOUR_ACCOUNT_ID --query 可选搜索词 --json
16
19
  | account_id | string | 是 | 蚁小二系统内的媒体账号 ID |
17
20
  | keyword | string | 否 | 搜索商品的关键词 |
18
21
 
22
+ `goods-detail` 参数:
23
+
24
+ | 参数名 | 类型 | 必填 | 说明 |
25
+ | :--- | :--- | :--- | :--- |
26
+ | account_id | string | 是 | 蚁小二系统内的媒体账号 ID |
27
+ | url | string | 是 | 待解析的商品链接 |
28
+
19
29
  ## 3. 返回数据结构
20
30
 
21
31
  返回一个包含 `ShoppingCartItem` 对象的数组及分页信息。发布时必须使用 `yxer query goods` 返回的完整对象,不能只保留 `data.yixiaoerId`、`data.yixiaoerName` 或局部字段。
22
32
 
33
+ `yxer query goods-detail` 返回相同的完整商品对象结构,可将其结果中的商品对象用于抖音 `shopping_cart`;该命令只解析链接,不执行发布。
34
+
35
+ 发布前可执行 `yxer query entitlements YOUR_ACCOUNT_ID --json` 确认返回的 `shopping_cart` 为 `true`。CLI 在 `shopping_cart` 非空时会在 `validate`、`publish --dry-run` 与正式 `publish` 前执行同一权限检查。
36
+
23
37
  ### ShoppingCartItem 结构说明
24
38
  | 字段名 | 类型 | 说明 |
25
39
  | :--- | :--- | :--- |
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## 执行逻辑 (Logic Flow)
15
15
  1. **内容处理**:确保文章正文符合Jianshu要求的格式。
16
- 2. **参数装配**:提取标题、正文至 `contentPublishForm`;简书文章不需要封面。
16
+ 2. **参数装配**:提取标题、正文及封面信息至 `contentPublishForm`。
17
17
  3. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
18
18
 
19
19
 
@@ -53,4 +53,6 @@
53
53
 
54
54
  ## 相关接口
55
55
 
56
- 简书文章发布不需要上传或传入封面。
56
+ | 目标数据 | 对应 Action | 相关文档 |
57
+ | :--- | :--- | :--- |
58
+ | `covers.key` | `upload` | [资源上传](../../upload-resource.md) |
@@ -76,8 +76,7 @@
76
76
  "type": "object",
77
77
  "required": [
78
78
  "yixiaoerId",
79
- "yixiaoerName",
80
- "raw"
79
+ "yixiaoerName"
81
80
  ],
82
81
  "properties": {
83
82
  "yixiaoerId": {
@@ -85,9 +84,6 @@
85
84
  },
86
85
  "yixiaoerName": {
87
86
  "type": "string"
88
- },
89
- "raw": {
90
- "type": "object"
91
87
  }
92
88
  },
93
89
  "additionalProperties": false
@@ -85,15 +85,15 @@
85
85
  "location": {
86
86
  "type": "object",
87
87
  "required": [
88
- "yixiaoerId",
89
- "yixiaoerName",
88
+ "id",
89
+ "text",
90
90
  "raw"
91
91
  ],
92
92
  "properties": {
93
- "yixiaoerId": {
93
+ "id": {
94
94
  "type": "string"
95
95
  },
96
- "yixiaoerName": {
96
+ "text": {
97
97
  "type": "string"
98
98
  },
99
99
  "raw": {
@@ -68,15 +68,15 @@
68
68
  "location": {
69
69
  "type": "object",
70
70
  "required": [
71
- "yixiaoerId",
72
- "yixiaoerName",
71
+ "id",
72
+ "text",
73
73
  "raw"
74
74
  ],
75
75
  "properties": {
76
- "yixiaoerId": {
76
+ "id": {
77
77
  "type": "string"
78
78
  },
79
- "yixiaoerName": {
79
+ "text": {
80
80
  "type": "string"
81
81
  },
82
82
  "raw": {
@@ -35,15 +35,15 @@
35
35
  "items": {
36
36
  "type": "object",
37
37
  "required": [
38
- "yixiaoerId",
39
- "yixiaoerName",
38
+ "id",
39
+ "text",
40
40
  "raw"
41
41
  ],
42
42
  "properties": {
43
- "yixiaoerId": {
43
+ "id": {
44
44
  "type": "string"
45
45
  },
46
- "yixiaoerName": {
46
+ "text": {
47
47
  "type": "string"
48
48
  },
49
49
  "raw": {
@@ -36,15 +36,15 @@
36
36
  "items": {
37
37
  "type": "object",
38
38
  "required": [
39
- "yixiaoerId",
40
- "yixiaoerName",
39
+ "id",
40
+ "text",
41
41
  "raw"
42
42
  ],
43
43
  "properties": {
44
- "yixiaoerId": {
44
+ "id": {
45
45
  "type": "string"
46
46
  },
47
- "yixiaoerName": {
47
+ "text": {
48
48
  "type": "string"
49
49
  },
50
50
  "raw": {
@@ -98,15 +98,15 @@
98
98
  "location": {
99
99
  "type": "object",
100
100
  "required": [
101
- "yixiaoerId",
102
- "yixiaoerName",
101
+ "id",
102
+ "text",
103
103
  "raw"
104
104
  ],
105
105
  "properties": {
106
- "yixiaoerId": {
106
+ "id": {
107
107
  "type": "string"
108
108
  },
109
- "yixiaoerName": {
109
+ "text": {
110
110
  "type": "string"
111
111
  },
112
112
  "raw": {
@@ -85,15 +85,15 @@
85
85
  "location": {
86
86
  "type": "object",
87
87
  "required": [
88
- "yixiaoerId",
89
- "yixiaoerName",
88
+ "id",
89
+ "text",
90
90
  "raw"
91
91
  ],
92
92
  "properties": {
93
- "yixiaoerId": {
93
+ "id": {
94
94
  "type": "string"
95
95
  },
96
- "yixiaoerName": {
96
+ "text": {
97
97
  "type": "string"
98
98
  },
99
99
  "raw": {
@@ -24,15 +24,15 @@
24
24
  "items": {
25
25
  "type": "object",
26
26
  "required": [
27
- "yixiaoerId",
28
- "yixiaoerName",
27
+ "id",
28
+ "text",
29
29
  "raw"
30
30
  ],
31
31
  "properties": {
32
- "yixiaoerId": {
32
+ "id": {
33
33
  "type": "string"
34
34
  },
35
- "yixiaoerName": {
35
+ "text": {
36
36
  "type": "string"
37
37
  },
38
38
  "raw": {
@@ -61,15 +61,15 @@
61
61
  "location": {
62
62
  "type": "object",
63
63
  "required": [
64
- "yixiaoerId",
65
- "yixiaoerName",
64
+ "id",
65
+ "text",
66
66
  "raw"
67
67
  ],
68
68
  "properties": {
69
- "yixiaoerId": {
69
+ "id": {
70
70
  "type": "string"
71
71
  },
72
- "yixiaoerName": {
72
+ "text": {
73
73
  "type": "string"
74
74
  },
75
75
  "raw": {
@@ -166,15 +166,15 @@
166
166
  "location": {
167
167
  "type": "object",
168
168
  "required": [
169
- "yixiaoerId",
170
- "yixiaoerName",
169
+ "id",
170
+ "text",
171
171
  "raw"
172
172
  ],
173
173
  "properties": {
174
- "yixiaoerId": {
174
+ "id": {
175
175
  "type": "string"
176
176
  },
177
- "yixiaoerName": {
177
+ "text": {
178
178
  "type": "string"
179
179
  },
180
180
  "raw": {
@@ -39,31 +39,31 @@
39
39
  "items": {
40
40
  "type": "object",
41
41
  "required": [
42
- "yixiaoerId",
43
- "yixiaoerName",
42
+ "id",
43
+ "text",
44
44
  "raw"
45
45
  ],
46
46
  "properties": {
47
- "yixiaoerId": {
47
+ "id": {
48
48
  "type": "string"
49
49
  },
50
- "yixiaoerName": {
50
+ "text": {
51
51
  "type": "string"
52
52
  },
53
- "child": {
53
+ "children": {
54
54
  "type": "array",
55
55
  "items": {
56
56
  "type": "object",
57
57
  "required": [
58
- "yixiaoerId",
59
- "yixiaoerName",
58
+ "id",
59
+ "text",
60
60
  "raw"
61
61
  ],
62
62
  "properties": {
63
- "yixiaoerId": {
63
+ "id": {
64
64
  "type": "string"
65
65
  },
66
- "yixiaoerName": {
66
+ "text": {
67
67
  "type": "string"
68
68
  },
69
69
  "raw": {
@@ -109,15 +109,15 @@
109
109
  "location": {
110
110
  "type": "object",
111
111
  "required": [
112
- "yixiaoerId",
113
- "yixiaoerName",
112
+ "id",
113
+ "text",
114
114
  "raw"
115
115
  ],
116
116
  "properties": {
117
- "yixiaoerId": {
117
+ "id": {
118
118
  "type": "string"
119
119
  },
120
- "yixiaoerName": {
120
+ "text": {
121
121
  "type": "string"
122
122
  },
123
123
  "raw": {
@@ -80,15 +80,15 @@
80
80
  "location": {
81
81
  "type": "object",
82
82
  "required": [
83
- "yixiaoerId",
84
- "yixiaoerName",
83
+ "id",
84
+ "text",
85
85
  "raw"
86
86
  ],
87
87
  "properties": {
88
- "yixiaoerId": {
88
+ "id": {
89
89
  "type": "string"
90
90
  },
91
- "yixiaoerName": {
91
+ "text": {
92
92
  "type": "string"
93
93
  },
94
94
  "raw": {
@@ -46,15 +46,15 @@
46
46
  "location": {
47
47
  "type": "object",
48
48
  "required": [
49
- "yixiaoerId",
50
- "yixiaoerName",
49
+ "id",
50
+ "text",
51
51
  "raw"
52
52
  ],
53
53
  "properties": {
54
- "yixiaoerId": {
54
+ "id": {
55
55
  "type": "string"
56
56
  },
57
- "yixiaoerName": {
57
+ "text": {
58
58
  "type": "string"
59
59
  },
60
60
  "raw": {
@@ -23,15 +23,15 @@
23
23
  "location": {
24
24
  "type": "object",
25
25
  "required": [
26
- "yixiaoerId",
27
- "yixiaoerName",
26
+ "id",
27
+ "text",
28
28
  "raw"
29
29
  ],
30
30
  "properties": {
31
- "yixiaoerId": {
31
+ "id": {
32
32
  "type": "string"
33
33
  },
34
- "yixiaoerName": {
34
+ "text": {
35
35
  "type": "string"
36
36
  },
37
37
  "raw": {
@@ -62,15 +62,15 @@
62
62
  "location": {
63
63
  "type": "object",
64
64
  "required": [
65
- "yixiaoerId",
66
- "yixiaoerName",
65
+ "id",
66
+ "text",
67
67
  "raw"
68
68
  ],
69
69
  "properties": {
70
- "yixiaoerId": {
70
+ "id": {
71
71
  "type": "string"
72
72
  },
73
- "yixiaoerName": {
73
+ "text": {
74
74
  "type": "string"
75
75
  },
76
76
  "raw": {
@@ -90,15 +90,15 @@
90
90
  "location": {
91
91
  "type": "object",
92
92
  "required": [
93
- "yixiaoerId",
94
- "yixiaoerName",
93
+ "id",
94
+ "text",
95
95
  "raw"
96
96
  ],
97
97
  "properties": {
98
- "yixiaoerId": {
98
+ "id": {
99
99
  "type": "string"
100
100
  },
101
- "yixiaoerName": {
101
+ "text": {
102
102
  "type": "string"
103
103
  },
104
104
  "raw": {
@@ -113,8 +113,7 @@
113
113
  "type": "object",
114
114
  "required": [
115
115
  "yixiaoerId",
116
- "yixiaoerName",
117
- "raw"
116
+ "yixiaoerName"
118
117
  ],
119
118
  "properties": {
120
119
  "yixiaoerId": {
@@ -37,15 +37,15 @@
37
37
  "items": {
38
38
  "type": "object",
39
39
  "required": [
40
- "yixiaoerId",
41
- "yixiaoerName",
40
+ "id",
41
+ "text",
42
42
  "raw"
43
43
  ],
44
44
  "properties": {
45
- "yixiaoerId": {
45
+ "id": {
46
46
  "type": "string"
47
47
  },
48
- "yixiaoerName": {
48
+ "text": {
49
49
  "type": "string"
50
50
  },
51
51
  "raw": {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yixiaoer
3
- version: 3.2.7
3
+ version: 3.2.8
4
4
  description: "通过 yxer CLI 操作蚁小二多平台内容分发:账号查询、资源上传、发布前准备、payload 校验、云发布/本机发布、草稿保存、素材登记、发布记录排查与技能同步。"
5
5
  metadata:
6
6
  category: "productivity"
@@ -69,6 +69,8 @@ yxer query categories <account_id> [--type video|article]
69
69
  yxer query locations <account_id> [--query 关键词] [--type 0|1|2|3]
70
70
  yxer query music <account_id> [--query 关键词]
71
71
  yxer query goods <account_id> [--query 关键词]
72
+ yxer query goods-detail <account_id> --url <product_url>
73
+ yxer query entitlements <account_id>
72
74
  yxer query collections <account_id> [--type video|article]
73
75
  yxer query members [--page 1] [--size 10] [--status notJoined|pending|joined] [--query 关键词] [--role master|admin|member]
74
76
  yxer query challenges <account_id> [--query 关键词] [--type video]
@@ -2,10 +2,13 @@
2
2
 
3
3
  此接口用于获取指定媒体账号在平台上关联的商品、团购或小店商品列表,以便在发布视频时进行商业推广。
4
4
 
5
+ 若需要从一个商品链接生成可挂购物车的完整商品对象,使用 `goods-detail`。它解析单个链接,不查询账号的选品车或商品列表。
6
+
5
7
  ## 1. 调用指令
6
8
 
7
9
  ```bash
8
10
  yxer query goods YOUR_ACCOUNT_ID --query 可选搜索词 --json
11
+ yxer query goods-detail YOUR_ACCOUNT_ID --url "商品链接" --json
9
12
  ```
10
13
 
11
14
  ## 2. 请求参数
@@ -16,10 +19,21 @@ yxer query goods YOUR_ACCOUNT_ID --query 可选搜索词 --json
16
19
  | account_id | string | 是 | 蚁小二系统内的媒体账号 ID |
17
20
  | keyword | string | 否 | 搜索商品的关键词 |
18
21
 
22
+ `goods-detail` 参数:
23
+
24
+ | 参数名 | 类型 | 必填 | 说明 |
25
+ | :--- | :--- | :--- | :--- |
26
+ | account_id | string | 是 | 蚁小二系统内的媒体账号 ID |
27
+ | url | string | 是 | 待解析的商品链接 |
28
+
19
29
  ## 3. 返回数据结构
20
30
 
21
31
  返回一个包含 `ShoppingCartItem` 对象的数组及分页信息。发布时必须使用 `yxer query goods` 返回的完整对象,不能只保留 `data.yixiaoerId`、`data.yixiaoerName` 或局部字段。
22
32
 
33
+ `yxer query goods-detail` 返回相同的完整商品对象结构,可将其结果中的商品对象用于抖音 `shopping_cart`;该命令只解析链接,不执行发布。
34
+
35
+ 发布前可执行 `yxer query entitlements YOUR_ACCOUNT_ID --json` 确认返回的 `shopping_cart` 为 `true`。CLI 在 `shopping_cart` 非空时会在 `validate`、`publish --dry-run` 与正式 `publish` 前执行同一权限检查。
36
+
23
37
  ### ShoppingCartItem 结构说明
24
38
  | 字段名 | 类型 | 说明 |
25
39
  | :--- | :--- | :--- |
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## 执行逻辑 (Logic Flow)
15
15
  1. **内容处理**:确保文章正文符合Jianshu要求的格式。
16
- 2. **参数装配**:提取标题、正文至 `contentPublishForm`;简书文章不需要封面。
16
+ 2. **参数装配**:提取标题、正文及封面信息至 `contentPublishForm`。
17
17
  3. **指令执行**:先执行 `yxer validate <platform> <type> <payload.json>`,再执行 `yxer publish <type> <platform> <payload.json> [--publish-channel local --client-id <clientId>]`。
18
18
 
19
19
 
@@ -53,4 +53,6 @@
53
53
 
54
54
  ## 相关接口
55
55
 
56
- 简书文章发布不需要上传或传入封面。
56
+ | 目标数据 | 对应 Action | 相关文档 |
57
+ | :--- | :--- | :--- |
58
+ | `covers.key` | `upload` | [资源上传](../../upload-resource.md) |