73a17193d4
将 external_generation_job 扩展为含价格、确认时间、退款流水和事件审计的正式生成任务事实源 新增外部生成任务列表与确认 BFF,并让平台入口按后端任务补弹完成或失败提示 保护画布生成队列超时、快照回写和自动保存覆盖场景 将 worker 计费退款流水写入 externalGenerationJobId,并补充冷备份后 worker/controller 恢复守护
65 lines
1.5 KiB
TypeScript
65 lines
1.5 KiB
TypeScript
export type ExternalGenerationJobStatus =
|
|
| 'queued'
|
|
| 'running'
|
|
| 'completed'
|
|
| 'failed';
|
|
|
|
export interface ExternalGenerationQueueOverview {
|
|
pendingCount: number;
|
|
runningCount: number;
|
|
unacknowledgedTerminalCount: number;
|
|
updatedAtMicros: number;
|
|
}
|
|
|
|
export interface ExternalGenerationQueueOverviewResponse {
|
|
overview: ExternalGenerationQueueOverview;
|
|
}
|
|
|
|
export interface ExternalGenerationJobStatusRecord {
|
|
operationId: string;
|
|
status: ExternalGenerationJobStatus;
|
|
phaseLabel: string;
|
|
phaseDetail: string;
|
|
progress: number;
|
|
error?: string | null;
|
|
updatedAtMicros: number;
|
|
}
|
|
|
|
export interface ExternalGenerationJobStatusResponse {
|
|
job: ExternalGenerationJobStatusRecord;
|
|
}
|
|
|
|
export interface ExternalGenerationTaskRecord {
|
|
jobId: string;
|
|
jobKind: string;
|
|
sourceModule: string;
|
|
sourceEntityId: string;
|
|
requestLabel: string;
|
|
status: ExternalGenerationJobStatus;
|
|
phaseLabel: string;
|
|
phaseDetail: string;
|
|
progress: number;
|
|
error?: string | null;
|
|
priceMudPoints: number;
|
|
refundLedgerId?: string | null;
|
|
notificationAcknowledgedAt?: string | null;
|
|
createdAt: string;
|
|
startedAt?: string | null;
|
|
completedAt?: string | null;
|
|
updatedAt: string;
|
|
updatedAtMicros: number;
|
|
}
|
|
|
|
export interface ExternalGenerationTaskListResponse {
|
|
tasks: ExternalGenerationTaskRecord[];
|
|
overview: ExternalGenerationQueueOverview;
|
|
}
|
|
|
|
export interface ExternalGenerationTaskAcknowledgeRequest {
|
|
jobIds: string[];
|
|
}
|
|
|
|
export interface ExternalGenerationTaskAcknowledgeResponse {
|
|
acknowledgedTasks: ExternalGenerationTaskRecord[];
|
|
}
|