fix: 修复 packages 接口访问不存在字段导致的运行时错误

- 移除 router 中对 result.region、result.currency、pkg.price 的访问
- 修正 pkg.type.value 为 pkg.type (type 是 Literal 不是 Enum)
- 更新协议文档以反映实际实现
- 新增 Apple IAP 协议文档
- 标记未使用的错误码为 RESERVED
This commit is contained in:
ZL-Q
2026-04-28 17:31:24 +08:00
parent 41ade24bcf
commit 86062d5e78
5 changed files with 155 additions and 8 deletions
@@ -277,7 +277,7 @@ Returns the authenticated user's points ledger in reverse chronological order.
### GET /api/v1/points/packages
Returns available purchase packages for the current user's region, including starter pack eligibility.
Returns available purchase packages for the current user, including starter pack eligibility.
**Request:**
- Auth: Required (JWT)
@@ -345,3 +345,7 @@ product_mappings:
sort_order: 10
enabled: true
```
**Compatibility Note:**
- Previous protocol version documented `region` and `currency` fields that were never implemented. These have been removed from the specification.
- Strategy: `backward-compatible` — clients that expect these fields should handle their absence gracefully.