cbs-4px-merchant-cli 0.0.1 → 0.0.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 (58) hide show
  1. package/dist/cli.js +486 -9
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/address.d.ts +2 -0
  4. package/dist/commands/address.js +59 -0
  5. package/dist/commands/address.js.map +1 -0
  6. package/dist/commands/claim.js +8 -2
  7. package/dist/commands/claim.js.map +1 -1
  8. package/dist/commands/config.js +333 -0
  9. package/dist/commands/config.js.map +1 -1
  10. package/dist/commands/country.d.ts +5 -0
  11. package/dist/commands/country.js +50 -0
  12. package/dist/commands/country.js.map +1 -0
  13. package/dist/commands/customs.d.ts +23 -0
  14. package/dist/commands/customs.js +176 -0
  15. package/dist/commands/customs.js.map +1 -0
  16. package/dist/commands/finance.d.ts +62 -0
  17. package/dist/commands/finance.js +509 -0
  18. package/dist/commands/finance.js.map +1 -0
  19. package/dist/commands/label.js +7 -1
  20. package/dist/commands/label.js.map +1 -1
  21. package/dist/commands/notice.d.ts +18 -0
  22. package/dist/commands/notice.js +210 -0
  23. package/dist/commands/notice.js.map +1 -0
  24. package/dist/commands/order.d.ts +12 -0
  25. package/dist/commands/order.js +76 -1
  26. package/dist/commands/order.js.map +1 -1
  27. package/dist/commands/pickup.d.ts +21 -0
  28. package/dist/commands/pickup.js +249 -0
  29. package/dist/commands/pickup.js.map +1 -0
  30. package/dist/commands/problem.d.ts +41 -0
  31. package/dist/commands/problem.js +371 -0
  32. package/dist/commands/problem.js.map +1 -0
  33. package/dist/commands/product.d.ts +28 -0
  34. package/dist/commands/product.js +249 -1
  35. package/dist/commands/product.js.map +1 -1
  36. package/dist/commands/service.d.ts +41 -0
  37. package/dist/commands/service.js +395 -0
  38. package/dist/commands/service.js.map +1 -0
  39. package/dist/commands/track.d.ts +13 -0
  40. package/dist/commands/track.js +92 -1
  41. package/dist/commands/track.js.map +1 -1
  42. package/dist/services/api-client.d.ts +49 -2
  43. package/dist/services/api-client.js +464 -6
  44. package/dist/services/api-client.js.map +1 -1
  45. package/dist/types/index.d.ts +609 -0
  46. package/package.json +2 -2
  47. package/skill/SKILL.md +67 -8
  48. package/skill/reference/customs.md +220 -0
  49. package/skill/reference/finance.md +337 -0
  50. package/skill/reference/index.md +56 -6
  51. package/skill/reference/notice.md +238 -0
  52. package/skill/reference/order.md +172 -0
  53. package/skill/reference/pickup.md +222 -0
  54. package/skill/reference/problem.md +318 -0
  55. package/skill/reference/product.md +203 -0
  56. package/skill/reference/service.md +406 -0
  57. package/skill/reference/track.md +105 -0
  58. package/skill/reference/claim.md +0 -66
@@ -14,10 +14,54 @@ Command **details** are in sibling `<group>.md` files in this directory.
14
14
  | `fmc config list` | 查看当前配置 | [config.md](config.md) |
15
15
  | `fmc config export-schema` | 导出命令的 JSON tool schema | [config.md](config.md) |
16
16
  | `fmc track get` | 查询物流轨迹 | [track.md](track.md) |
17
+ | `fmc track sub order` | 查询轨迹订阅订单 | [track.md](track.md) |
18
+ | `fmc track sub product` | 查询轨迹订阅产品 | [track.md](track.md) |
17
19
  | `fmc label get` | 获取面单打印信息(PDF 链接) | [label.md](label.md) |
18
20
  | `fmc order get` | 获取订单详情 | [order.md](order.md) |
21
+ | `fmc order list` | 查询订单列表 | [order.md](order.md) |
22
+ | `fmc order address-book` | 查询地址簿列表 | [order.md](order.md) |
23
+ | `fmc order country` | 模糊搜索目的国家 | [order.md](order.md) |
19
24
  | `fmc product recommend` | 获取推荐物流产品及报价 | [product.md](product.md) |
20
- | `fmc claim list` | 查询理赔列表 | [claim.md](claim.md) |
25
+ | `fmc product list` | 查询可用产品列表 | [product.md](product.md) |
26
+ | `fmc product detail` | 查询产品详情 | [product.md](product.md) |
27
+ | `fmc product eta` | 查询预估时效 | [product.md](product.md) |
28
+ | `fmc product search` | 搜索产品 | [product.md](product.md) |
29
+ | `fmc problem list` | 查询问题件列表 | [problem.md](problem.md) |
30
+ | `fmc problem suggest` | 获取异常件 AI 处理建议 | [problem.md](problem.md) |
31
+ | `fmc problem notify list` | 查询通知件列表 | [problem.md](problem.md) |
32
+ | `fmc problem notify type` | 查询尾程异常类型枚举 | [problem.md](problem.md) |
33
+ | `fmc problem lastmile list` | 查询尾程异常列表 | [problem.md](problem.md) |
34
+ | `fmc problem arrear list` | 查询欠费件列表 | [problem.md](problem.md) |
35
+ | `fmc problem intercepted list` | 查询拦截件列表 | [problem.md](problem.md) |
36
+ | `fmc service repair list` | 查询售后工单列表 | [service.md](service.md) |
37
+ | `fmc service check list` | 查询查件列表 | [service.md](service.md) |
38
+ | `fmc service complaint list` | 查询投诉列表 | [service.md](service.md) |
39
+ | `fmc service detail` | 查询服务单详情 | [service.md](service.md) |
40
+ | `fmc service record` | 查询服务单处理记录 | [service.md](service.md) |
41
+ | `fmc service claim list` | 查询理赔列表 | [service.md](service.md) |
42
+ | `fmc service claim detail` | 查询理赔详情 | [service.md](service.md) |
43
+ | `fmc service claim reason` | 查询理赔原因列表 | [service.md](service.md) |
44
+ | `fmc finance balance` | 查询账户余额 | [finance.md](finance.md) |
45
+ | `fmc finance bill list` | 查询账单列表 | [finance.md](finance.md) |
46
+ | `fmc finance daily-fee list` | 查询每日费用 | [finance.md](finance.md) |
47
+ | `fmc finance unbilled list` | 查询未出账汇总及明细 | [finance.md](finance.md) |
48
+ | `fmc finance recharge list` | 查询充值记录(在线及线下) | [finance.md](finance.md) |
49
+ | `fmc finance fee detail` | 查询计费明细 | [finance.md](finance.md) |
50
+ | `fmc finance frozen list` | 查询冻结流水 | [finance.md](finance.md) |
51
+ | `fmc pickup material list` | 查询物料申请单列表 | [pickup.md](pickup.md) |
52
+ | `fmc pickup material detail` | 查询物料申请单详情 | [pickup.md](pickup.md) |
53
+ | `fmc pickup material quota` | 查询本月物料申请额度 | [pickup.md](pickup.md) |
54
+ | `fmc pickup address list` | 查询揽收地址列表 | [pickup.md](pickup.md) |
55
+ | `fmc notice list` | 查询系统公告列表 | [notice.md](notice.md) |
56
+ | `fmc notice detail` | 查询公告详情 | [notice.md](notice.md) |
57
+ | `fmc notice message list` | 查询站内消息列表 | [notice.md](notice.md) |
58
+ | `fmc notice message detail` | 查询站内消息详情 | [notice.md](notice.md) |
59
+ | `fmc notice message unread` | 查询未读消息数量 | [notice.md](notice.md) |
60
+ | `fmc customs cargo list` | 查询申报品列表 | [customs.md](customs.md) |
61
+ | `fmc customs commodity list` | 查询商品备案列表 | [customs.md](customs.md) |
62
+ | `fmc customs commodity detail` | 查询商品备案详情 | [customs.md](customs.md) |
63
+ | `fmc customs hscode search` | 查询海关编码 | [customs.md](customs.md) |
64
+ | `fmc customs registration info` | 查询客户备案信息 | [customs.md](customs.md) |
21
65
  | `fmc update` | 升级 CLI 及对应 skill 到最新版本 | [update.md](update.md) |
22
66
 
23
67
  ## By group
@@ -26,11 +70,16 @@ Command **details** are in sibling `<group>.md` files in this directory.
26
70
  | --- | --- | --- |
27
71
  | `auth` | `login`, `status` | [auth.md](auth.md) |
28
72
  | `config` | `set`, `list`, `export-schema` | [config.md](config.md) |
29
- | `track` | `get` | [track.md](track.md) |
73
+ | `track` | `get`, `sub order`, `sub product` | [track.md](track.md) |
30
74
  | `label` | `get` | [label.md](label.md) |
31
- | `order` | `get` | [order.md](order.md) |
32
- | `product` | `recommend` | [product.md](product.md) |
33
- | `claim` | `list` | [claim.md](claim.md) |
75
+ | `order` | `get`, `list`, `address-book`, `country` | [order.md](order.md) |
76
+ | `product` | `recommend`, `list`, `detail`, `eta`, `search` | [product.md](product.md) |
77
+ | `problem` | `list`, `suggest`, `notify list`, `notify type`, `lastmile list`, `arrear list`, `intercepted list` | [problem.md](problem.md) |
78
+ | `service` | `repair list`, `check list`, `complaint list`, `detail`, `record`, `claim list`, `claim detail`, `claim reason` | [service.md](service.md) |
79
+ | `finance` | `balance`, `bill list`, `daily-fee list`, `unbilled list`, `recharge list`, `fee detail`, `frozen list` | [finance.md](finance.md) |
80
+ | `pickup` | `material list`, `material detail`, `material quota`, `address list` | [pickup.md](pickup.md) |
81
+ | `notice` | `list`, `detail`, `message list`, `message detail`, `message unread` | [notice.md](notice.md) |
82
+ | `customs` | `cargo list`, `commodity list`, `commodity detail`, `hscode search`, `registration info` | [customs.md](customs.md) |
34
83
  | `update` | (no subcommand) | [update.md](update.md) |
35
84
 
36
85
  ## Global flags
@@ -46,6 +95,7 @@ Command **details** are in sibling `<group>.md` files in this directory.
46
95
  ## Notes
47
96
 
48
97
  - `track get` 命令无需认证即可使用。
49
- - `label get`、`order get`、`product recommend`、`claim list` 命令需要先配置 API Key:`fmc auth login --api-key <SK_xxx>`。
98
+ - 其余大部分命令需要先配置 API Key:`fmc auth login --api-key <SK_xxx>`。
99
+ - 新增的 `problem`、`service`、`finance`、`pickup`、`notice`、`customs` 模块均需要 API Key 认证。`order` 模块下的 `address-book`、`country` 子命令也需要认证。
50
100
  - 配置文件位于 `~/.bportal/config.json`;升级状态缓存位于 `~/.bportal/update-state.json`。
51
101
  - 当检测到新版本可用时,stderr 会输出 `{"_notice":{"type":"update",...}}`;设置环境变量 `BPORTAL_NO_UPDATE_NOTIFIER=1` 可关闭。
@@ -0,0 +1,238 @@
1
+ # `fmc notice` command
2
+
3
+ ## Command details
4
+
5
+ ### `fmc notice list`
6
+
7
+ | Field | Value |
8
+ | --- | --- |
9
+ | **Name** | `notice list` |
10
+ | **Description** | 查询系统公告列表 |
11
+ | **Usage** | `fmc notice list [flags]` |
12
+
13
+ 需要 API Key 认证。
14
+
15
+ #### Options
16
+
17
+ | Flag | Type | Required | Description |
18
+ | --- | --- | --- | --- |
19
+ | `--category <cat>` | string | no | 公告分类筛选 |
20
+ | `--page <num>` | number | no | 页码,默认 1 |
21
+ | `--size <num>` | number | no | 每页数量,默认 10 |
22
+
23
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
24
+
25
+ #### Examples
26
+
27
+ ```bash
28
+ fmc notice list
29
+ ```
30
+
31
+ ```bash
32
+ fmc notice list --category 系统维护
33
+ ```
34
+
35
+ ```bash
36
+ fmc notice list --page 2 --size 20 --output json
37
+ ```
38
+
39
+ #### Output (text mode)
40
+
41
+ ```
42
+ 公告列表
43
+ ──────────────────────────────────────────────────
44
+
45
+ NTC20240115001
46
+ 公告名称 春节假期运营时间调整通知
47
+ 分类 运营通知
48
+ 发布时间 2024-01-15 10:00:00
49
+
50
+ NTC20240110001
51
+ 公告名称 系统升级维护公告
52
+ 分类 系统维护
53
+ 发布时间 2024-01-10 09:00:00
54
+ ```
55
+
56
+ ---
57
+
58
+ ### `fmc notice detail`
59
+
60
+ | Field | Value |
61
+ | --- | --- |
62
+ | **Name** | `notice detail` |
63
+ | **Description** | 查询公告详情 |
64
+ | **Usage** | `fmc notice detail <code> [flags]` |
65
+
66
+ 需要 API Key 认证。
67
+
68
+ #### Options
69
+
70
+ | Flag | Type | Required | Description |
71
+ | --- | --- | --- | --- |
72
+ | `<code>` | string | yes | 公告编号 |
73
+
74
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
75
+
76
+ #### Examples
77
+
78
+ ```bash
79
+ fmc notice detail NTC20240115001
80
+ ```
81
+
82
+ ```bash
83
+ fmc notice detail NTC20240115001 --output json
84
+ ```
85
+
86
+ #### Output (text mode)
87
+
88
+ ```
89
+ 公告详情
90
+ ──────────────────────────────────────────────────
91
+ 公告编码 NTC20240115001
92
+ 公告名称 春节假期运营时间调整通知
93
+ 分类 运营通知
94
+ 发布时间 2024-01-15 10:00:00
95
+
96
+ 公告内容
97
+ ────────────────────────────────────────
98
+ 尊敬的客户,春节假期期间物流时效可能有所延长,请提前安排发货。
99
+ ```
100
+
101
+ ---
102
+
103
+ ### `fmc notice message list`
104
+
105
+ | Field | Value |
106
+ | --- | --- |
107
+ | **Name** | `notice message list` |
108
+ | **Description** | 查询站内消息列表 |
109
+ | **Usage** | `fmc notice message list [flags]` |
110
+
111
+ 需要 API Key 认证。
112
+
113
+ #### Options
114
+
115
+ | Flag | Type | Required | Description |
116
+ | --- | --- | --- | --- |
117
+ | `--biz-code <code>` | string | no | 业务编码 |
118
+ | `--read <bool>` | string | no | 是否已读:true / false |
119
+ | `--keyword <word>` | string | no | 搜索关键词 |
120
+ | `--page <num>` | number | no | 页码,默认 1 |
121
+ | `--size <num>` | number | no | 每页数量,默认 10 |
122
+
123
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
124
+
125
+ #### Examples
126
+
127
+ ```bash
128
+ fmc notice message list
129
+ ```
130
+
131
+ ```bash
132
+ fmc notice message list --read false
133
+ ```
134
+
135
+ ```bash
136
+ fmc notice message list --keyword 运费 --page 1 --size 20 --output json
137
+ ```
138
+
139
+ #### Output (text mode)
140
+
141
+ ```
142
+ 站内消息列表
143
+ ────────────────────────────────────────────────────────────
144
+ [未读] MSG001
145
+ 标题 您的包裹 FPX12345678 已签收
146
+ 业务类型 轨迹通知
147
+ 分类 物流消息
148
+ 发送时间 2024-01-15 10:30:00
149
+
150
+ [已读] MSG002
151
+ 标题 账单 BILL-202401 已生成
152
+ 业务类型 财务通知
153
+ 分类 账务消息
154
+ 发送时间 2024-01-10 09:00:00
155
+
156
+ 共 2 条
157
+ ```
158
+
159
+ ---
160
+
161
+ ### `fmc notice message detail`
162
+
163
+ | Field | Value |
164
+ | --- | --- |
165
+ | **Name** | `notice message detail` |
166
+ | **Description** | 查询站内消息详情 |
167
+ | **Usage** | `fmc notice message detail <recordId> [flags]` |
168
+
169
+ 需要 API Key 认证。
170
+
171
+ #### Options
172
+
173
+ | Flag | Type | Required | Description |
174
+ | --- | --- | --- | --- |
175
+ | `<recordId>` | string | yes | 消息记录ID |
176
+
177
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
178
+
179
+ #### Examples
180
+
181
+ ```bash
182
+ fmc notice message detail MSG001
183
+ ```
184
+
185
+ ```bash
186
+ fmc notice message detail MSG001 --output json
187
+ ```
188
+
189
+ #### Output (text mode)
190
+
191
+ ```
192
+ 消息详情
193
+ ──────────────────────────────────────────────────
194
+ 记录ID MSG001
195
+ 标题 您的包裹 FPX12345678 已签收
196
+ 业务类型 轨迹通知
197
+ 分类 物流消息
198
+ 发送时间 2024-01-15 10:30:00
199
+ 状态 未读
200
+
201
+ 消息内容
202
+ ────────────────────────────────────────
203
+ 您好,您的包裹 FPX12345678 已于 2024-01-15 10:30 签收。
204
+ ```
205
+
206
+ ---
207
+
208
+ ### `fmc notice message unread`
209
+
210
+ | Field | Value |
211
+ | --- | --- |
212
+ | **Name** | `notice message unread` |
213
+ | **Description** | 查询未读消息数量 |
214
+ | **Usage** | `fmc notice message unread [flags]` |
215
+
216
+ 需要 API Key 认证。
217
+
218
+ #### Options
219
+
220
+ 无额外参数。
221
+
222
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
223
+
224
+ #### Examples
225
+
226
+ ```bash
227
+ fmc notice message unread
228
+ ```
229
+
230
+ ```bash
231
+ fmc notice message unread --output json
232
+ ```
233
+
234
+ #### Output (text mode)
235
+
236
+ ```
237
+ 未读消息数量: 5
238
+ ```
@@ -66,3 +66,175 @@ fmc order get FPX12345678 --verbose
66
66
  ────────────────────────────────────────
67
67
  合计 30.00 USD
68
68
  ```
69
+
70
+ ---
71
+
72
+ ### `fmc order list`
73
+
74
+ | Field | Value |
75
+ | --- | --- |
76
+ | **Name** | `order list` |
77
+ | **Description** | 查询订单列表(支持按状态、单号、时间等筛选) |
78
+ | **Usage** | `fmc order list [flags]` |
79
+
80
+ 需要 API Key 认证。
81
+
82
+ #### Options
83
+
84
+ | Flag | Type | Required | Description |
85
+ | --- | --- | --- | --- |
86
+ | `--status <status>` | string | no | 订单状态筛选,如 IN_TRANSIT、DELIVERED、CREATED 等 |
87
+ | `--customer-order-no <no>` | string | no | 客户订单号 |
88
+ | `--fpx-track-no <no>` | string | no | FPX 运单号 |
89
+ | `--start-date <date>` | string | no | 起始日期,格式 yyyy-MM-dd |
90
+ | `--end-date <date>` | string | no | 结束日期,格式 yyyy-MM-dd |
91
+ | `--product-code <code>` | string | no | 产品代码 |
92
+ | `--destination-country <code>` | string | no | 目的国家二字码 |
93
+ | `--page <num>` | number | no | 页码,默认 1 |
94
+ | `--size <num>` | number | no | 每页数量,默认 10 |
95
+
96
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
97
+
98
+ #### Examples
99
+
100
+ ```bash
101
+ fmc order list
102
+ ```
103
+
104
+ ```bash
105
+ fmc order list --status IN_TRANSIT
106
+ ```
107
+
108
+ ```bash
109
+ fmc order list --destination-country US --start-date 2024-01-01 --end-date 2024-06-30
110
+ ```
111
+
112
+ ```bash
113
+ fmc order list --page 2 --size 20 --output json
114
+ ```
115
+
116
+ #### Output (text mode)
117
+
118
+ ```
119
+ 订单列表
120
+ ──────────────────────────────────────────────────
121
+ 页码 1/5 共 48 条
122
+
123
+ FPX12345678 IN_TRANSIT
124
+ 客户单号 ORD-20240115-001
125
+ 产品代码 STANDARD
126
+ 目的国 US
127
+ 创建时间 2024-01-15 10:30:00
128
+
129
+ FPX12345679 DELIVERED
130
+ 客户单号 ORD-20240114-002
131
+ 产品代码 ECO-PKG
132
+ 目的国 GB
133
+ 创建时间 2024-01-14 08:00:00
134
+ ```
135
+
136
+ ---
137
+
138
+ ### `fmc order address-book`
139
+
140
+ | Field | Value |
141
+ | --- | --- |
142
+ | **Name** | `order address-book` |
143
+ | **Description** | 查询发件地址簿(商家预存的发件/揽收/退件地址) |
144
+ | **Usage** | `fmc order address-book [flags]` |
145
+
146
+ 需要 API Key 认证。
147
+
148
+ #### Options
149
+
150
+ 无额外参数。
151
+
152
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
153
+
154
+ #### Examples
155
+
156
+ ```bash
157
+ fmc order address-book
158
+ ```
159
+
160
+ ```bash
161
+ fmc order address-book --output json
162
+ ```
163
+
164
+ #### Output (text mode)
165
+
166
+ ```
167
+ 地址簿列表
168
+ ──────────────────────────────────────────────────
169
+ 共 3 条
170
+
171
+ 深圳仓库
172
+ 联系人 张三
173
+ 电话 13800138000
174
+ 国家 CN
175
+ 城市 深圳
176
+ 地址 广东省深圳市南山区科技园路1号
177
+ 邮编 518000
178
+
179
+ 广州仓库
180
+ 联系人 李四
181
+ 电话 13900139000
182
+ 国家 CN
183
+ 城市 广州
184
+ 地址 广东省广州市天河区天河路2号
185
+ 邮编 510000
186
+ ```
187
+
188
+ ---
189
+
190
+ ### `fmc order country`
191
+
192
+ | Field | Value |
193
+ | --- | --- |
194
+ | **Name** | `order country` |
195
+ | **Description** | 模糊搜索目的国家 |
196
+ | **Usage** | `fmc order country <keyword> [flags]` |
197
+
198
+ 需要 API Key 认证。
199
+
200
+ #### Options
201
+
202
+ | Flag | Type | Required | Description |
203
+ | --- | --- | --- | --- |
204
+ | `<keyword>` | string | yes | 搜索关键词(国家名称或代码) |
205
+ | `--product-code <code>` | string | no | 按产品代码筛选支持的国家 |
206
+
207
+ 支持全局选项: `--output`, `--verbose`, `--dry-run`
208
+
209
+ #### Examples
210
+
211
+ ```bash
212
+ fmc order country 美国
213
+ ```
214
+
215
+ ```bash
216
+ fmc order country US
217
+ ```
218
+
219
+ ```bash
220
+ fmc order country united --product-code STD-EXP
221
+ ```
222
+
223
+ ```bash
224
+ fmc order country 日本 --output json
225
+ ```
226
+
227
+ #### Output (text mode)
228
+
229
+ ```
230
+ 国家搜索结果
231
+ ──────────────────────────────────────────────────
232
+ 关键词 美国
233
+ 共 1 个匹配结果
234
+
235
+ US
236
+ 中文名称 美国
237
+ 英文名称 United States
238
+ 二字码 US
239
+ 三字码 USA
240
+ ```