cx-amazon-sp-api 0.1.4 → 0.1.6

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/README.md CHANGED
@@ -1 +1,21 @@
1
- Lets cx work in your own Amazon store through Amazon's SP-API, in the marketplaces you authorise. cx can read your orders, listings, inventory and reports, and can make changes within what you authorise. Neither Amazon nor ComChatX charges for it.
1
+ # Amazon SP-API
2
+
3
+ This plugin connects cx to your own Amazon store through Amazon's Selling Partner API (SP-API). Once you connect a store, cx can read your orders, listings, inventory, reports and finances, and make changes in the marketplaces you authorised, such as updating a listing or a price.
4
+
5
+ Some things you can ask:
6
+
7
+ - How many orders came in today, and which are pending or cancelled?
8
+ - Which of my FBA listings will run out of stock in the next two weeks?
9
+ - What is wrong with this listing, and how do I fix it?
10
+
11
+ ## Connecting your store
12
+
13
+ Open the plugin's Settings and connect a store for each region you sell in: North America, Europe or the Far East. Amazon's guide to self-authorisation shows where to find what Settings asks for. Your keys stay on the ComChatX platform and are never given to cx.
14
+
15
+ ## What it costs
16
+
17
+ Nothing. Neither Amazon nor ComChatX charges for SP-API calls.
18
+
19
+ ## What it needs
20
+
21
+ It installs with cx-sources, through which cx reaches every data source.
@@ -0,0 +1,19 @@
1
+ 这个插件通过亚马逊的销售伙伴 API(SP-API)把 cx 连接到你自己的亚马逊店铺。连接店铺后,cx 可以读取你的订单、Listing、库存、报告和财务数据,并在你授权的站点内进行修改,比如更新 Listing 或价格。
2
+
3
+ 你可以这样问:
4
+
5
+ - 今天来了多少订单?哪些还在等待处理或已取消?
6
+ - 我的哪些 FBA Listing 会在两周内断货?
7
+ - 这个 Listing 有什么问题,要怎么修复?
8
+
9
+ ## 连接店铺
10
+
11
+ 打开插件的「设置」,为你开店的每个区域连接一个店铺:北美、欧洲或远东。亚马逊的自授权指南说明了在哪里找到「设置」需要填写的内容。你的密钥保存在 ComChatX 平台上,不会交给 cx。
12
+
13
+ ## 费用
14
+
15
+ 免费。亚马逊和 ComChatX 都不对 SP-API 调用收费。
16
+
17
+ ## 依赖
18
+
19
+ 它会和 cx-sources 一起安装,cx 通过 cx-sources 使用所有数据源。
package/package.json CHANGED
@@ -1,40 +1,60 @@
1
1
  {
2
2
  "name": "cx-amazon-sp-api",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Reads and updates your own Amazon store.",
5
- "author": "ComChatX",
6
5
  "license": "MIT",
6
+ "author": "ComChatX",
7
+ "homepage": "https://github.com/comchatx/cx-amazon-sp-api#readme",
7
8
  "repository": {
8
9
  "type": "git",
9
- "url": "git+https://github.com/HS-Jack-YZY/ComChatX.git",
10
- "directory": "src/source-packages/cx-amazon-sp-api"
10
+ "url": "git+https://github.com/comchatx/cx-amazon-sp-api.git"
11
11
  },
12
+ "bugs": "https://github.com/comchatx/cx-amazon-sp-api/issues",
12
13
  "keywords": [
13
14
  "pi-package"
14
15
  ],
16
+ "type": "module",
15
17
  "pi": {
16
18
  "skills": [
17
19
  "./skills"
20
+ ],
21
+ "prompts": [
22
+ "./prompts"
18
23
  ]
19
24
  },
25
+ "files": [
26
+ "skills",
27
+ "prompts",
28
+ "README.zh-CN.md"
29
+ ],
30
+ "scripts": {
31
+ "typecheck": "tsc --noEmit",
32
+ "test": "vitest run"
33
+ },
20
34
  "comchatx": {
21
35
  "name": "Amazon SP-API",
22
- "about": "读取并更新你自己的亚马逊店铺。",
23
- "description": "授权后,cx 可以通过亚马逊 SP-API 访问你的店铺,范围以你授权的站点为限。cx 可以读取订单、listing、库存和报告,并在授权范围内进行修改。亚马逊和 ComChatX 均不为此收费。",
36
+ "description": {
37
+ "zh": "读取并更新你自己的亚马逊店铺。"
38
+ },
24
39
  "mark": {
25
40
  "line": "layout"
26
41
  },
27
42
  "section": "data",
28
43
  "order": 20,
29
- "builds": [
30
- "cx-sources"
31
- ],
32
44
  "skills": {
33
45
  "amazon-sp-api": {
34
- "about": {
35
- "en": "Connects cx to your orders, listings, inventory, reports and finances.",
36
- "zh": "连接 cx 与你的订单、Listing、库存、报告和财务数据。"
37
- }
46
+ "zh": "通过 SP-API 读取和修改你自己的亚马逊店铺:订单、Listing、库存、报告、Feed 和财务数据,覆盖你授权的每个区域。"
47
+ }
48
+ },
49
+ "prompts": {
50
+ "orders-today": {
51
+ "zh": "按站点查看店铺今天的订单"
52
+ },
53
+ "low-stock": {
54
+ "zh": "找出两周内会断货的 FBA Listing"
55
+ },
56
+ "listing-check": {
57
+ "zh": "检查 Listing 上亚马逊标出的问题,并给出修复方案"
38
58
  }
39
59
  },
40
60
  "source": {
@@ -42,5 +62,14 @@
42
62
  "help": "https://developer-docs.amazon/sp-api/docs/self-authorization",
43
63
  "aspects": {}
44
64
  }
65
+ },
66
+ "dependencies": {
67
+ "cx-sources": "^0.1.3"
68
+ },
69
+ "devDependencies": {
70
+ "@earendil-works/pi-coding-agent": "1.4.0",
71
+ "@types/node": "26.2.0",
72
+ "typescript": "7.0.2",
73
+ "vitest": "4.1.11"
45
74
  }
46
75
  }
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Check a listing for the issues Amazon flags, and propose fixes
3
+ argument-hint: "<sku>"
4
+ ---
5
+ Read my listing for SKU $1 and every issue Amazon reports on it: suppression, missing or invalid attributes, and image or price problems. For each issue, say what it means for the listing and the change that would fix it. Make no change until I confirm which ones to make.
@@ -0,0 +1,4 @@
1
+ ---
2
+ description: Find the FBA listings that will run out of stock within two weeks
3
+ ---
4
+ Which of my FBA listings will run out of stock within ${1:-14} days at the rate they sold over the last 30 days? For each, show the SKU, its title, the units available and inbound, the units sold a day, and the day it runs out, soonest first. Change nothing in my store.
@@ -0,0 +1,4 @@
1
+ ---
2
+ description: See today's orders in your store, marketplace by marketplace
3
+ ---
4
+ List today's orders in my Amazon store, marketplace by marketplace: how many there are, their total in each marketplace's currency, and which are still pending or were cancelled. Use the time zone of each marketplace for "today".