@qzsy/group-sdk 0.1.3 → 0.1.4
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 +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ await group.createMerchantAccount({
|
|
|
65
65
|
})
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
>
|
|
68
|
+
> 集团 API 目前没有「进件查询」接口:进件进度看商户控制台,或订阅 `com.unifiedpay.onboarding.*` 回调(`submitted` / `needs_verification` / `needs_sign` / `finished` / `rejected` / `canceled`)。
|
|
69
69
|
|
|
70
70
|
### 2. 门店账单(按主体 + 站点)
|
|
71
71
|
|
|
@@ -127,7 +127,7 @@ const { items: payouts, next_cursor } = await group.listGroupPayouts({
|
|
|
127
127
|
| `createApplication(input)` | W-2 `/v1/group/applications` | 首次返回一次性凭据 |
|
|
128
128
|
| `bindApplicationChannel(input)` | W-3 `/v1/group/application-channels` | 复用控制台校验 |
|
|
129
129
|
| `createMerchantAccount(input)` | W-4 `/v1/group/merchant-accounts` | 代门店进件 |
|
|
130
|
-
| `applyEscrowPermission(accountId)` | W-5 `/v1/group/escrow-applications` | 申请担保+分账 |
|
|
130
|
+
| `applyEscrowPermission(accountId, options?)` | W-5 `/v1/group/escrow-applications` | 申请担保+分账 |
|
|
131
131
|
| `getEscrowApplication(id)` | W-6 `/v1/group/escrow-applications/:id` | 查审批进度 |
|
|
132
132
|
|
|
133
133
|
应用维度接口(下单、收银台、退款、付款、对账)由 `UnifiedPay` 提供,与 `@qzsy/unipay-sdk` 完全一致。
|
|
@@ -152,7 +152,7 @@ await group.createEntity(input, { operator: { id: 'manager_2', name: 'Ops' } })
|
|
|
152
152
|
|
|
153
153
|
## 幂等
|
|
154
154
|
|
|
155
|
-
所有写接口自动携带 `Idempotency-Key`(每次调用生成;401 刷新令牌后的自动重试会复用同一把键)。**网络超时后请自行重试并显式传 `{ idempotencyKey }`
|
|
155
|
+
所有写接口自动携带 `Idempotency-Key`(每次调用生成;401 刷新令牌后的自动重试会复用同一把键)。**网络超时后请自行重试并显式传 `{ idempotencyKey }` 复用**,否则会生成新键。注意:网关的集团路由当前**不读取**该头,幂等靠下面的自然键;该头仅用于观测与重试标记。业务侧更应依赖自然幂等键:
|
|
156
156
|
|
|
157
157
|
- W-1 建主体:`license_no` 相同 → 返回已有主体
|
|
158
158
|
- W-2 建应用:`(entity_id, slug, LIVE)` 相同 → 返回已有应用,`credential` 为 `null`
|
|
@@ -173,7 +173,7 @@ try {
|
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
常见错误:`GROUP_CONTEXT_REQUIRED
|
|
176
|
+
常见错误:`GROUP_CONTEXT_REQUIRED`(用了应用凭据调集团接口,403)、`STORE_CODE_REQUIRED`(`scope=STORE` 缺 `store_code`,400);主体/应用/账户不属于本集团统一返回 **404**(不泄露存在性)。
|
|
177
177
|
|
|
178
178
|
## 类型
|
|
179
179
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qzsy/group-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "群兴云集团 SaaS 对接统一支付网关的 TypeScript SDK:集团凭据、多主体/多应用管理、门店账单与佣金付款",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@qzsy/unipay-sdk": "^0.
|
|
34
|
+
"@qzsy/unipay-sdk": "^0.4.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public",
|