feat(web): 增加计费结算异常管理界面
管理端支持按状态查看结算与释放记录,展示精确到九位的小数金额、错误分类和重试次数,并使用一次性 Idempotency-Key 发起审计化重试。
This commit is contained in:
@@ -1156,6 +1156,15 @@ export interface GatewayTask {
|
||||
metrics?: Record<string, unknown>;
|
||||
billingSummary?: Record<string, unknown>;
|
||||
finalChargeAmount?: number;
|
||||
billingVersion?: string;
|
||||
billingStatus?: 'not_started' | 'pending' | 'processing' | 'settled' | 'released' | 'retryable_failed' | 'manual_review' | 'not_required' | string;
|
||||
billingCurrency?: string;
|
||||
pricingSnapshot?: Record<string, unknown>;
|
||||
requestFingerprint?: string;
|
||||
reservationAmount?: number;
|
||||
executionLeaseExpiresAt?: string;
|
||||
billingUpdatedAt?: string;
|
||||
billingSettledAt?: string;
|
||||
responseStartedAt?: string;
|
||||
responseFinishedAt?: string;
|
||||
responseDurationMs?: number;
|
||||
@@ -1212,12 +1221,49 @@ export interface GatewayTaskAttempt {
|
||||
responseStartedAt?: string;
|
||||
responseFinishedAt?: string;
|
||||
responseDurationMs?: number;
|
||||
pricingSnapshot?: Record<string, unknown>;
|
||||
requestFingerprint?: string;
|
||||
upstreamSubmissionStatus?: 'not_submitted' | 'submitting' | 'response_received' | string;
|
||||
upstreamSubmissionUpdatedAt?: string;
|
||||
errorCode?: string;
|
||||
errorMessage?: string;
|
||||
startedAt: string;
|
||||
finishedAt?: string;
|
||||
}
|
||||
|
||||
export interface BillingSettlement {
|
||||
id: string;
|
||||
taskId: string;
|
||||
action: 'settle' | 'release' | string;
|
||||
amount: number;
|
||||
currency: string;
|
||||
status: 'pending' | 'processing' | 'retryable_failed' | 'completed' | 'manual_review' | string;
|
||||
attempts: number;
|
||||
nextAttemptAt: string;
|
||||
lockedBy?: string;
|
||||
lockedAt?: string;
|
||||
lastErrorCode?: string;
|
||||
lastErrorMessage?: string;
|
||||
manualReviewReason?: string;
|
||||
pricingSnapshot?: Record<string, unknown>;
|
||||
payload?: Record<string, unknown>;
|
||||
completedAt?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface BillingSettlementListResponse {
|
||||
items: BillingSettlement[];
|
||||
total: number;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
export interface BillingSettlementRetryResponse {
|
||||
settlement: BillingSettlement;
|
||||
auditLog?: GatewayAuditLog;
|
||||
}
|
||||
|
||||
export interface GatewayTaskEvent {
|
||||
id: string;
|
||||
taskId: string;
|
||||
|
||||
Reference in New Issue
Block a user