feat(task-022): add admin workflow builder ui
This commit is contained in:
@@ -629,6 +629,122 @@ export type ReviewType = "PLAN" | "EVIDENCE" | "ASSET" | "SEO_LANGUAGE" | "FINAL
|
||||
|
||||
export type Role = "ADMIN" | "EDITOR";
|
||||
|
||||
export type WorkflowStagePart = {
|
||||
acceptance_criteria?: string[];
|
||||
key: string;
|
||||
payload?: Record<string, unknown>;
|
||||
title: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type WorkflowStageSummary = {
|
||||
acceptance_criteria?: string[];
|
||||
created_at: string;
|
||||
description: string;
|
||||
display_name: string;
|
||||
expected_outputs?: string[];
|
||||
id: string;
|
||||
owner_role: Role;
|
||||
parts?: WorkflowStagePart[];
|
||||
position: number;
|
||||
required_inputs?: string[];
|
||||
requires_human_approval?: boolean;
|
||||
retry_policy?: Record<string, unknown>;
|
||||
runner_profile_key: string;
|
||||
stable_key: string;
|
||||
updated_at: string;
|
||||
workflow_id: string;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateStatus = "DRAFT" | "ACTIVE" | "ARCHIVED";
|
||||
|
||||
export type WorkflowTemplateSummary = {
|
||||
activated_at?: string | null;
|
||||
archived_at?: string | null;
|
||||
created_at: string;
|
||||
created_by: string;
|
||||
description: string;
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
stages?: WorkflowStageSummary[];
|
||||
status: WorkflowTemplateStatus;
|
||||
updated_at: string;
|
||||
updated_by?: string | null;
|
||||
version: number;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateCreateRequest = {
|
||||
description: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateUpdateRequest = {
|
||||
description?: string | null;
|
||||
name?: string | null;
|
||||
slug?: string | null;
|
||||
};
|
||||
|
||||
export type WorkflowStageCreateRequest = {
|
||||
acceptance_criteria?: string[];
|
||||
description: string;
|
||||
display_name: string;
|
||||
expected_outputs?: string[];
|
||||
owner_role: Role;
|
||||
parts?: WorkflowStagePart[];
|
||||
position?: number | null;
|
||||
required_inputs?: string[];
|
||||
requires_human_approval?: boolean;
|
||||
retry_policy?: Record<string, unknown>;
|
||||
runner_profile_key: string;
|
||||
stable_key: string;
|
||||
};
|
||||
|
||||
export type WorkflowStageUpdateRequest = {
|
||||
acceptance_criteria?: string[] | null;
|
||||
description?: string | null;
|
||||
display_name?: string | null;
|
||||
expected_outputs?: string[] | null;
|
||||
owner_role?: Role | null;
|
||||
parts?: WorkflowStagePart[] | null;
|
||||
position?: number | null;
|
||||
required_inputs?: string[] | null;
|
||||
requires_human_approval?: boolean | null;
|
||||
retry_policy?: Record<string, unknown> | null;
|
||||
runner_profile_key?: string | null;
|
||||
stable_key?: string | null;
|
||||
};
|
||||
|
||||
export type WorkflowStageReorderRequest = {
|
||||
stage_ids: string[];
|
||||
};
|
||||
|
||||
export type WorkflowTemplateResponse = {
|
||||
workflow: WorkflowTemplateSummary;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateListResponse = {
|
||||
workflows: WorkflowTemplateSummary[];
|
||||
};
|
||||
|
||||
export type WorkflowStageResponse = {
|
||||
stage: WorkflowStageSummary;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateAuditEventSummary = {
|
||||
actor_user_id?: string | null;
|
||||
created_at: string;
|
||||
event_type: string;
|
||||
id: string;
|
||||
payload?: Record<string, unknown>;
|
||||
workflow_id: string;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateAuditEventListResponse = {
|
||||
events?: WorkflowTemplateAuditEventSummary[];
|
||||
};
|
||||
|
||||
export type RunnerFileRef = {
|
||||
content_hash?: string | null;
|
||||
path: string;
|
||||
|
||||
Reference in New Issue
Block a user