taiwan-logistics-skill 1.4.8 → 1.4.10
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/assets/taiwan-logistics/CLAUDE.md +1 -1
- package/assets/taiwan-logistics/references/lalamove-logistics-api.md +2 -0
- package/assets/taiwan-logistics/references/ondemand-delivery.md +4 -0
- package/assets/taiwan-logistics/references/payuni-logistics-api.md +6 -4
- package/assets/taiwan-logistics/references/pchomepay-logistics-api.md +9 -9
- package/assets/templates/platforms/agent.json +2 -2
- package/dist/index.js +4 -7
- package/package.json +1 -1
|
@@ -105,7 +105,7 @@ When modifying files:
|
|
|
105
105
|
| Claude Code | `.claude` | full |
|
|
106
106
|
| Cursor | `.cursor` | full |
|
|
107
107
|
| Windsurf | `.windsurf` | full |
|
|
108
|
-
| Antigravity | `.
|
|
108
|
+
| Antigravity | `.agents` | full |
|
|
109
109
|
| Copilot | `.github` | full |
|
|
110
110
|
| Kiro | `.kiro` | full |
|
|
111
111
|
| Codex | `.agents` | full |
|
|
@@ -104,6 +104,7 @@ def build_headers(method, path, body_dict, key, secret, market="TW"):
|
|
|
104
104
|
| `isRouteOptimized` | `true` 啟用多點路線最佳化 |
|
|
105
105
|
| `isPODEnabled` | `true` 啟用 Proof of Delivery(送達證明) |
|
|
106
106
|
| `metadata` | 自訂 key-value,可掛你自己的訂單編號 |
|
|
107
|
+
| `pricingTierCode` | 報價時選填(字串):`"1"` 一般(預設)、`"2"` Priority Tier(加速媒合、較快送達),回傳價格依所選等級計算。官方文件未列適用市場,台灣是否開放需以報價實測或向 Lalamove 確認 |
|
|
107
108
|
|
|
108
109
|
`metadata` 是把 Lalamove 訂單對回自家系統的建議做法——不要依賴 Lalamove 的 order ID 當主鍵。
|
|
109
110
|
|
|
@@ -128,6 +129,7 @@ v3 支援 14 個市場,**含台灣**:香港、新加坡、泰國、越南、
|
|
|
128
129
|
- 台灣市場實際可用的 `serviceType` 清單與費率結構(需以 `GET /v3/cities` 實測)
|
|
129
130
|
- Webhook 事件型別與 payload 結構
|
|
130
131
|
- 台灣是否需另行申請商業帳號才能取得 production key
|
|
132
|
+
- 台灣是否可用 `pricingTierCode: "2"`(Priority Tier)
|
|
131
133
|
- pandago(foodpanda)見 [ondemand-delivery.md](ondemand-delivery.md)
|
|
132
134
|
|
|
133
135
|
## 9. 來源
|
|
@@ -101,8 +101,12 @@ pandago 屬 Delivery Hero 的 **On Demand Rider(ODR)API**,同一套 API
|
|
|
101
101
|
|
|
102
102
|
回應 `201`:`order_id`、`status`、`delivery_fee`、`distance`(公尺)、`timeline.estimated_pickup_time`/`estimated_delivery_time`、`driver`。`GET /orders/{id}` 另有 `tracking_link`、`status_history`、`proof_of_*_url`,取消時有 `cancellation.source`/`reason`。
|
|
103
103
|
|
|
104
|
+
> 送出時 `handover_confirmation.drop_off` 是字串(`"PIN"`),回應裡則是物件:`201` 為 `{"type": "PIN"}`,`GET /orders/{id}` 另帶 `code`(給收件人的 PIN 碼),解析回應時不要當字串處理。
|
|
105
|
+
|
|
104
106
|
錯誤:`400` 參數錯誤、`401` 未授權、`404` Outlet 不存在、`422` 違反業務規則。
|
|
105
107
|
|
|
108
|
+
> 母帳號(parent vendor)可能關閉以 API 建立門市:此時**建立新 Outlet** 回 `403 Forbidden`(Outlet creation via API is disabled for this vendor),**更新既有 Outlet** 不受影響。
|
|
109
|
+
|
|
106
110
|
### 訂單狀態
|
|
107
111
|
|
|
108
112
|
`NEW` → `RECEIVED` → `WAITING_FOR_TRANSPORT` → `ASSIGNED_TO_TRANSPORT` → `COURIER_ACCEPTED_DELIVERY` → `NEAR_VENDOR` → `PICKED_UP` → `COURIER_LEFT_VENDOR` → `NEAR_CUSTOMER` → `DELIVERED`;另有 `DELAYED`(預計送達時間已更新)、`CANCELLED`、`RETURNED_TO_VENDOR`。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PAYUNi 物流 API
|
|
2
2
|
|
|
3
|
-
統一金流 (PAYUNi) 物流:7-ELEVEN 大宗寄倉 (B2C)/店到店 (C2C)
|
|
3
|
+
統一金流 (PAYUNi) 物流:7-ELEVEN 大宗寄倉 (B2C)/店到店 (C2C)、黑貓宅配 (HOME);退貨便 (C2B) 僅能查詢與接收貨態,要號 API 已移除。
|
|
4
4
|
|
|
5
5
|
來源:PAYUNi 官方文件 <https://docs.payuni.com.tw/web/#/7>(物流工具、Notify、物流貨態狀態碼 120、物流錯誤代碼 119)。
|
|
6
6
|
加解密另以官方外掛 PAYUNi_for_WooCommerce 1.2.8 與官方 PHP SDK 逐位元組比對(`tests/vectors/payuni.json`)。
|
|
@@ -182,7 +182,9 @@ EncryptInfo 加入:
|
|
|
182
182
|
|
|
183
183
|
有物流時 `UsrMail` 必填(視為收件人信箱)。
|
|
184
184
|
|
|
185
|
-
>
|
|
185
|
+
> 官方已於 2026-09-09 移除獨立的「建立超商物流單」「退貨便要號」「店到店物流單轉宅配資料提供」「建立宅配單」「呼叫黑貓」API
|
|
186
|
+
> (修改記錄 page 25),現行只能如上在交易 API 一併建立。第三方外掛 wpbr-payuni-shipping 1.6.4 使用的
|
|
187
|
+
> `/logistics/trade`、`/home_delivery/trade` 屬已移除的流程,不要再用。
|
|
186
188
|
|
|
187
189
|
---
|
|
188
190
|
|
|
@@ -202,7 +204,7 @@ EncryptInfo 加入:
|
|
|
202
204
|
| `Tag` | Y | `2` 回傳門市、`3` 更新商店 C2C 退貨門市、`4` 更新物流單取件門市、`5` 更新單筆 C2C 退貨門市 |
|
|
203
205
|
| `MobileTag` | C | `Y` 手機版、`N` PC 版(預設) |
|
|
204
206
|
|
|
205
|
-
回傳 EncryptInfo 的 `MapJson` 為 JSON:`StoreType
|
|
207
|
+
回傳 EncryptInfo 的 `MapJson` 為 JSON:`StoreType`(超商別,官方說明為 7-ELEVEN,未註明值與長度)、`StoreID`、`StoreName`、`Address`、`InsularArea`(`I` 本島/`O` 離島)。
|
|
206
208
|
|
|
207
209
|
門市關轉(貨態 `81`)後須以 `Tag=4` 重選門市:B2C 期限為通知日 +2 天 23:59,C2C 為 +6 天 23:59。
|
|
208
210
|
|
|
@@ -256,7 +258,7 @@ Notify URL 在 PAYUNi 後台「物流設定」填寫(超商與黑貓各自設
|
|
|
256
258
|
|
|
257
259
|
| 類型 | 解密後欄位 |
|
|
258
260
|
|------|-----------|
|
|
259
|
-
| 超商 B2C/C2C | `Status`、`Message`、`MerID`、`PartnerId`、`ShipTradeNo`、`LgsType`、`GoodsType`、`ShipType`、`ShipStatus`、`PickupStoreType`(僅 81)、`ShipStatusDesc`、`ShipStatusTime`、`ApiType=ShipStatus` |
|
|
261
|
+
| 超商 B2C/C2C | `Status`、`Message`、`MerID`、`PartnerId`、`ShipTradeNo`、`LgsType`、`GoodsType`、`ShipType`、`Odno`(出貨單編號 8 碼;交貨便查詢系統 B2C 11 碼、C2C 12 碼)、`ShipStatus`、`PickupStoreType`(僅 81)、`ShipStatusDesc`、`ShipStatusTime`、`ApiType=ShipStatus` |
|
|
260
262
|
| 退貨便 C2B | 同上,以 `RefundODNO`、`ValidationNo` 取代 `ShipTradeNo` |
|
|
261
263
|
| 黑貓 | `Status`、`Message`、`MerID`、`TradeType`、`ShipTradeNo`、`OBTNumber`、`GoodsType`、`LgsType=HOME`、`ShipType=2`、`FileNo`、`ShipStatus` |
|
|
262
264
|
|
|
@@ -147,7 +147,7 @@ POST https://api.pchomepay.com.tw/v1/token
|
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
149
|
curl --location --request POST 'https://api.pchomepay.com.tw/v1/token' \
|
|
150
|
-
--header 'Authorization: Basic
|
|
150
|
+
--header 'Authorization: Basic <base64(APP_ID:SECRET)>' \
|
|
151
151
|
--header 'Content-Type: application/json'
|
|
152
152
|
```
|
|
153
153
|
|
|
@@ -180,7 +180,7 @@ function getPcpayToken(string $appId, string $secret): array
|
|
|
180
180
|
|
|
181
181
|
// 範例回應
|
|
182
182
|
// {
|
|
183
|
-
// "token": "
|
|
183
|
+
// "token": "YOUR_PCPAY_TOKEN",
|
|
184
184
|
// "expired_in": 28800,
|
|
185
185
|
// "expired_timestamp": 1474470110
|
|
186
186
|
// }
|
|
@@ -314,7 +314,7 @@ POST https://api.pchomepay.com.tw/v1/logistic/batch
|
|
|
314
314
|
```bash
|
|
315
315
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/batch' \
|
|
316
316
|
--header 'Content-Type: application/json' \
|
|
317
|
-
--header 'pcpay-token:
|
|
317
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN' \
|
|
318
318
|
--data '{
|
|
319
319
|
"order_id": ["B2C1702640091"]
|
|
320
320
|
}'
|
|
@@ -437,7 +437,7 @@ GET https://api.pchomepay.com.tw/v1/logistic/query/{order_id}/history
|
|
|
437
437
|
```bash
|
|
438
438
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/query/B2C1723815435/history' \
|
|
439
439
|
--header 'Content-Type: application/json' \
|
|
440
|
-
--header 'pcpay-token:
|
|
440
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN'
|
|
441
441
|
```
|
|
442
442
|
|
|
443
443
|
### 回應欄位
|
|
@@ -535,7 +535,7 @@ GET https://api.pchomepay.com.tw/v1/logistic/query/{order_id}/history-page
|
|
|
535
535
|
```bash
|
|
536
536
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/query/B2C1723815435/history-page' \
|
|
537
537
|
--header 'Content-Type: application/json' \
|
|
538
|
-
--header 'pcpay-token:
|
|
538
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN'
|
|
539
539
|
```
|
|
540
540
|
|
|
541
541
|
### 回應欄位
|
|
@@ -583,7 +583,7 @@ GET https://api.pchomepay.com.tw/v1/logistic/yet
|
|
|
583
583
|
```bash
|
|
584
584
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/yet' \
|
|
585
585
|
--header 'Content-Type: application/json' \
|
|
586
|
-
--header 'pcpay-token:
|
|
586
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN'
|
|
587
587
|
```
|
|
588
588
|
|
|
589
589
|
#### 回應欄位 (Array)
|
|
@@ -642,7 +642,7 @@ GET https://api.pchomepay.com.tw/v1/logistic/store_return/{date}
|
|
|
642
642
|
|
|
643
643
|
```bash
|
|
644
644
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/store_return/20250409' \
|
|
645
|
-
--header 'pcpay-token:
|
|
645
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN'
|
|
646
646
|
```
|
|
647
647
|
|
|
648
648
|
#### 回應欄位 (Array)
|
|
@@ -694,7 +694,7 @@ GET https://api.pchomepay.com.tw/v1/logistic/accounting/{date}
|
|
|
694
694
|
|
|
695
695
|
```bash
|
|
696
696
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/accounting/20240816' \
|
|
697
|
-
--header 'pcpay-token:
|
|
697
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN'
|
|
698
698
|
```
|
|
699
699
|
|
|
700
700
|
### 回應格式
|
|
@@ -778,7 +778,7 @@ GET https://api.pchomepay.com.tw/v1/logistic/compensation/{date}
|
|
|
778
778
|
|
|
779
779
|
```bash
|
|
780
780
|
curl --location 'https://api.pchomepay.com.tw/v1/logistic/compensation/202408' \
|
|
781
|
-
--header 'pcpay-token:
|
|
781
|
+
--header 'pcpay-token: YOUR_PCPAY_TOKEN'
|
|
782
782
|
```
|
|
783
783
|
|
|
784
784
|
### 回應格式
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"displayName": "Antigravity / Generic Agent",
|
|
4
4
|
"installType": "full",
|
|
5
5
|
"folderStructure": {
|
|
6
|
-
"root": ".
|
|
6
|
+
"root": ".agents",
|
|
7
7
|
"skillPath": "skills/taiwan-logistics",
|
|
8
8
|
"filename": "SKILL.md",
|
|
9
|
-
"globalRoot": "~/.gemini/
|
|
9
|
+
"globalRoot": "~/.gemini/config"
|
|
10
10
|
},
|
|
11
11
|
"scriptPath": "skills/taiwan-logistics/scripts",
|
|
12
12
|
"frontmatter": {
|
package/dist/index.js
CHANGED
|
@@ -15934,10 +15934,7 @@ async function generatePlatformFiles(targetDir, aiType, isGlobal = false) {
|
|
|
15934
15934
|
const createdFolders = [];
|
|
15935
15935
|
let skillDir;
|
|
15936
15936
|
if (isGlobal) {
|
|
15937
|
-
|
|
15938
|
-
if (config.folderStructure.globalRoot?.includes("global_skills")) {
|
|
15939
|
-
skillPath = skillPath.replace(/^skills\//, "");
|
|
15940
|
-
}
|
|
15937
|
+
const skillPath = config.folderStructure.skillPath;
|
|
15941
15938
|
skillDir = (0, import_node_path.join)(targetDir, skillPath);
|
|
15942
15939
|
createdFolders.push(targetDir);
|
|
15943
15940
|
} else {
|
|
@@ -16031,7 +16028,7 @@ function getAITypeDescription(aiType) {
|
|
|
16031
16028
|
case "windsurf":
|
|
16032
16029
|
return "Windsurf (.windsurf/skills/)";
|
|
16033
16030
|
case "antigravity":
|
|
16034
|
-
return "Antigravity (.
|
|
16031
|
+
return "Antigravity (.agents/skills/)";
|
|
16035
16032
|
case "copilot":
|
|
16036
16033
|
return "GitHub Copilot (.github/skills/)";
|
|
16037
16034
|
case "kiro":
|
|
@@ -16328,7 +16325,7 @@ async function listCommand() {
|
|
|
16328
16325
|
{ key: "claude", path: ".claude/skills/taiwan-logistics/" },
|
|
16329
16326
|
{ key: "cursor", path: ".cursor/skills/taiwan-logistics/" },
|
|
16330
16327
|
{ key: "windsurf", path: ".windsurf/skills/taiwan-logistics/" },
|
|
16331
|
-
{ key: "antigravity", path: ".
|
|
16328
|
+
{ key: "antigravity", path: ".agents/skills/taiwan-logistics/" },
|
|
16332
16329
|
{ key: "copilot", path: ".github/skills/taiwan-logistics/" },
|
|
16333
16330
|
{ key: "kiro", path: ".kiro/skills/taiwan-logistics/" },
|
|
16334
16331
|
{ key: "codex", path: ".agents/skills/taiwan-logistics/" },
|
|
@@ -16364,7 +16361,7 @@ async function listCommand() {
|
|
|
16364
16361
|
var import_chalk5 = __toESM(require_source());
|
|
16365
16362
|
|
|
16366
16363
|
// src/version.ts
|
|
16367
|
-
var VERSION = "1.4.
|
|
16364
|
+
var VERSION = "1.4.10";
|
|
16368
16365
|
|
|
16369
16366
|
// src/commands/info.ts
|
|
16370
16367
|
async function infoCommand() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taiwan-logistics-skill",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"description": "AI-powered Taiwan Logistics toolkit. Supports 7 aggregators (ECPay, NewebPay, PAYUNi, SmilePay, PChomePay, PayNow, ezShip), HCT direct carrier API, and on-demand delivery (Lalamove, pandago).",
|
|
5
5
|
"bin": {
|
|
6
6
|
"taiwan-logistics": "./dist/index.js"
|