新增:半自动履约工作台与虎牙客户授权流程

- 新增 153 半自动履约迁移、后台任务接口与客户履约接口
- 接入虎牙 Connector 登录会话、绑定与一次性 CK 注入票据
- 新增后台半自动履约页面和客户履约入口
- 完善手工履约配置、成本确认事务与运行时连接器配置
- 同步权威文档、环境示例、部署脚本和迁移展示逻辑
This commit is contained in:
yml2213
2026-11-09 15:29:20 +08:00
parent 4159a435d5
commit cb9538a775
38 changed files with 3697 additions and 30 deletions
@@ -0,0 +1,52 @@
import { apiGet, apiPost } from '@/lib/http'
import type {
CustomerBindingInfo,
CustomerLoginInfo,
CustomerSemiAutoTask,
} from '@/types/customer-fulfillment'
export function fetchCustomerFulfillment(orderNo: string) {
return apiGet<CustomerSemiAutoTask[]>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}`,
)
}
export function markCustomerFulfillmentOpened(orderNo: string, taskId: number) {
return apiPost<{ ok: boolean }>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/open`,
{},
)
}
export function startCustomerLogin(orderNo: string, taskId: number) {
return apiPost<{ task: CustomerSemiAutoTask; login: CustomerLoginInfo }>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/login/start`,
{},
)
}
export function pollCustomerLogin(orderNo: string, taskId: number) {
return apiGet<{ task: CustomerSemiAutoTask; login: CustomerLoginInfo | null }>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/login/status`,
)
}
export function startCustomerBinding(orderNo: string, taskId: number) {
return apiPost<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo }>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/start`,
{},
)
}
export function pollCustomerBinding(orderNo: string, taskId: number) {
return apiGet<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo | null }>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/status`,
)
}
export function confirmCustomerBinding(orderNo: string, taskId: number) {
return apiPost<{ task: CustomerSemiAutoTask; binding: CustomerBindingInfo }>(
`/api/v1/customer-fulfillment/${encodeURIComponent(orderNo)}/tasks/${taskId}/binding/confirm`,
{},
)
}