feat(task-023): bind workflow templates into demo flow
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+138
-116
@@ -62,6 +62,7 @@ export type ArticleCreateRequest = {
|
||||
language?: string;
|
||||
primary_keyword?: string | null;
|
||||
target_site_id: string;
|
||||
workflow_template_id?: string | null;
|
||||
working_title?: string | null;
|
||||
};
|
||||
|
||||
@@ -84,6 +85,7 @@ export type ArticleDetailResponse = {
|
||||
target_site?: TargetSiteConfig | null;
|
||||
timeline?: ObservabilityTimelineEventSummary[];
|
||||
workflow_events?: WorkflowEventSummary[];
|
||||
workflow_template_snapshot?: WorkflowTemplateSnapshot | null;
|
||||
};
|
||||
|
||||
export type ArticleListResponse = {
|
||||
@@ -102,6 +104,8 @@ export type ArticleSummary = {
|
||||
status: ArticleWorkflowStatus;
|
||||
target_site_id: string;
|
||||
updated_at: string;
|
||||
workflow_template_id?: string | null;
|
||||
workflow_template_version?: number | null;
|
||||
working_title?: string | null;
|
||||
};
|
||||
|
||||
@@ -629,122 +633,6 @@ 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;
|
||||
@@ -879,3 +767,137 @@ export type WorkflowEventSummary = {
|
||||
payload?: Record<string, unknown>;
|
||||
to_status?: ArticleWorkflowStatus | 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 WorkflowStagePart = {
|
||||
acceptance_criteria?: string[];
|
||||
key: string;
|
||||
payload?: Record<string, unknown>;
|
||||
title: string;
|
||||
type: string;
|
||||
};
|
||||
|
||||
export type WorkflowStageReorderRequest = {
|
||||
stage_ids: string[];
|
||||
};
|
||||
|
||||
export type WorkflowStageResponse = {
|
||||
stage: WorkflowStageSummary;
|
||||
};
|
||||
|
||||
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 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 WorkflowTemplateAuditEventListResponse = {
|
||||
events?: WorkflowTemplateAuditEventSummary[];
|
||||
};
|
||||
|
||||
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 WorkflowTemplateCreateRequest = {
|
||||
description: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateListResponse = {
|
||||
workflows?: WorkflowTemplateSummary[];
|
||||
};
|
||||
|
||||
export type WorkflowTemplateResponse = {
|
||||
workflow: WorkflowTemplateSummary;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateSnapshot = {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
stage_summary?: WorkflowTemplateStageSnapshot[];
|
||||
version: number;
|
||||
};
|
||||
|
||||
export type WorkflowTemplateStageSnapshot = {
|
||||
display_name: string;
|
||||
id: string;
|
||||
owner_role: Role;
|
||||
position: number;
|
||||
requires_human_approval?: boolean;
|
||||
runner_profile_key: string;
|
||||
stable_key: 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 WorkflowTemplateUpdateRequest = {
|
||||
description?: string | null;
|
||||
name?: string | null;
|
||||
slug?: string | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user