feat(short-drama-agent-front): 接入联合修订与图片费用审计
This commit is contained in:
1 parent
87427d9d43
commit
f6edc4eb70
52 files changed
+5060
-516
No files matched your search
+72
@@ -0,0 +1,72 @@
|
||||
import type { BillingFacts } from '../../src/features/billing-audit/types'
|
||||
import type { ImageBillingAuditView } from '../../src/features/image-authorization/billing-audit.types'
|
||||
/**
|
||||
* 仅供Mock的原图片请求视图,不代表真实Provider材料。
|
||||
* @param projectId 隔离项目
|
||||
* @param requestId 隔离原请求
|
||||
* @returns 带完整原版本和空历史的审计视图
|
||||
*/
|
||||
export function imageAuditFixture(projectId = 'audit-project', requestId = 'unknown-image'): ImageBillingAuditView {
|
||||
return {
|
||||
projectId,
|
||||
requestId,
|
||||
identity: {
|
||||
projectId,
|
||||
requestId,
|
||||
authorizationId: 'grant',
|
||||
scope: 'keyframe',
|
||||
targetId: 'audit-shot',
|
||||
candidateId: 'unknown-candidate',
|
||||
provider: 'openai-image',
|
||||
model: 'gpt-image-2.5-flare',
|
||||
sourceFingerprint: 'c'.repeat(64),
|
||||
planFingerprint: 'b'.repeat(64),
|
||||
requestFingerprint: 'd'.repeat(64)
|
||||
},
|
||||
taskFingerprint: 'a'.repeat(64),
|
||||
evidenceSetFingerprint: 'e'.repeat(64),
|
||||
reviewFingerprint: 'f'.repeat(64),
|
||||
originalRequestStatus: 'unknown',
|
||||
reservedMicros: 1_000_000,
|
||||
originalUsageCostMicros: null,
|
||||
originalActualBilledMicros: null,
|
||||
originalProviderRequestId: null,
|
||||
hasOriginalReceipt: false,
|
||||
originalBillingBlocked: true,
|
||||
billingBlocked: true,
|
||||
released: false,
|
||||
status: 'unreviewed',
|
||||
reviewId: null,
|
||||
reviewedAmountMicros: null,
|
||||
releaseIssues: ['缺少当前独立复核的证据'],
|
||||
history: { evidence: [], reviews: [] }
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 只用于隔离验收的合格材料,不能登记到正式项目。
|
||||
* @returns 明确标为测试的Provider原件声明
|
||||
*/
|
||||
export function imageAuditFacts(): BillingFacts {
|
||||
return {
|
||||
correlation: 'unique',
|
||||
providerRequestId: 'test-provider-request',
|
||||
artifacts: [
|
||||
{
|
||||
id: 'exec',
|
||||
kind: 'provider-execution',
|
||||
recordId: 'test-provider-execution',
|
||||
sha256: '1'.repeat(64),
|
||||
reference: '仅供Mock验收的执行原件'
|
||||
},
|
||||
{
|
||||
id: 'bill',
|
||||
kind: 'provider-billing',
|
||||
recordId: 'test-provider-bill',
|
||||
sha256: '2'.repeat(64),
|
||||
reference: '仅供Mock验收的账单原件'
|
||||
}
|
||||
],
|
||||
execution: { outcome: 'failed', evidenceIds: ['exec'] },
|
||||
billing: { finding: 'charged', amount: 0.000001, currency: 'USD', evidenceIds: ['bill'] }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user