feat: bootstrap auto virtual tryon admin frontend
This commit is contained in:
75
src/lib/mock/workflows.ts
Normal file
75
src/lib/mock/workflows.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
import type { WorkflowStatusResponseDto } from "@/lib/types/backend";
|
||||
|
||||
export const WORKFLOW_DETAIL_DTO_FIXTURE: WorkflowStatusResponseDto = {
|
||||
order_id: 4201,
|
||||
workflow_id: "wf-4201",
|
||||
workflow_type: "mid_end",
|
||||
workflow_status: "running",
|
||||
current_step: "review",
|
||||
current_revision_asset_id: null,
|
||||
current_revision_version: null,
|
||||
latest_revision_asset_id: null,
|
||||
latest_revision_version: null,
|
||||
revision_count: 0,
|
||||
review_task_status: null,
|
||||
pending_manual_confirm: false,
|
||||
steps: [
|
||||
{
|
||||
id: 1,
|
||||
workflow_run_id: 88,
|
||||
step_name: "prepare_model",
|
||||
step_status: "succeeded",
|
||||
input_json: null,
|
||||
output_json: {
|
||||
preview_uri: "mock://workflow/4201/prepare-model",
|
||||
},
|
||||
error_message: null,
|
||||
started_at: "2026-03-27T09:00:00Z",
|
||||
ended_at: "2026-03-27T09:01:00Z",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
workflow_run_id: 88,
|
||||
step_name: "review",
|
||||
step_status: "waiting",
|
||||
input_json: {
|
||||
candidate_uri: "mock://workflow/4201/review-candidate",
|
||||
},
|
||||
output_json: null,
|
||||
error_message: null,
|
||||
started_at: "2026-03-27T09:12:00Z",
|
||||
ended_at: null,
|
||||
},
|
||||
],
|
||||
created_at: "2026-03-27T09:00:00Z",
|
||||
updated_at: "2026-03-27T09:15:00Z",
|
||||
};
|
||||
|
||||
export const WORKFLOW_LOOKUP_DTO_FIXTURES: Array<
|
||||
Pick<
|
||||
WorkflowStatusResponseDto,
|
||||
| "order_id"
|
||||
| "workflow_id"
|
||||
| "workflow_type"
|
||||
| "workflow_status"
|
||||
| "current_step"
|
||||
| "updated_at"
|
||||
>
|
||||
> = [
|
||||
{
|
||||
order_id: WORKFLOW_DETAIL_DTO_FIXTURE.order_id,
|
||||
workflow_id: WORKFLOW_DETAIL_DTO_FIXTURE.workflow_id,
|
||||
workflow_type: WORKFLOW_DETAIL_DTO_FIXTURE.workflow_type,
|
||||
workflow_status: WORKFLOW_DETAIL_DTO_FIXTURE.workflow_status,
|
||||
current_step: WORKFLOW_DETAIL_DTO_FIXTURE.current_step,
|
||||
updated_at: WORKFLOW_DETAIL_DTO_FIXTURE.updated_at,
|
||||
},
|
||||
{
|
||||
order_id: 4202,
|
||||
workflow_id: "wf-4202",
|
||||
workflow_type: "mid_end",
|
||||
workflow_status: "failed",
|
||||
current_step: "fusion",
|
||||
updated_at: "2026-03-27T08:40:00Z",
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user