Refactor site building workflow and context handling; update API response structure for improved clarity and consistency. Adjust frontend components to align with new data structure, including error handling and loading states.
This commit is contained in:
@@ -2159,54 +2159,62 @@ export interface PageBlueprint {
|
||||
|
||||
export interface WorkflowState {
|
||||
current_step: string;
|
||||
step_status: Record<string, { status: string; code?: string; message?: string; updated_at?: string }>;
|
||||
blocking_reason?: string;
|
||||
completed: boolean;
|
||||
blocking_reason?: string;
|
||||
steps: Array<{
|
||||
step: string;
|
||||
status: string;
|
||||
code?: string;
|
||||
message?: string;
|
||||
updated_at?: string;
|
||||
}>;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface WizardContext {
|
||||
workflow: WorkflowState;
|
||||
cluster_summary: {
|
||||
total: number;
|
||||
attached: number;
|
||||
coverage_stats: {
|
||||
complete: number;
|
||||
in_progress: number;
|
||||
pending: number;
|
||||
};
|
||||
attached_count: number;
|
||||
coverage_counts: Record<string, number>;
|
||||
clusters: Array<{
|
||||
id: number;
|
||||
name: string;
|
||||
keywords_count: number;
|
||||
keyword_count: number;
|
||||
volume: number;
|
||||
context_type?: string;
|
||||
dimension_meta?: Record<string, any>;
|
||||
coverage_status: string;
|
||||
role: string;
|
||||
metadata?: Record<string, any>;
|
||||
suggested_taxonomies?: string[];
|
||||
attribute_hints?: string[];
|
||||
}>;
|
||||
};
|
||||
taxonomy_summary: {
|
||||
total: number;
|
||||
by_type: Record<string, number>;
|
||||
total_taxonomies: number;
|
||||
counts_by_type: Record<string, number>;
|
||||
taxonomies: Array<{
|
||||
id: number;
|
||||
name: string;
|
||||
slug: string;
|
||||
taxonomy_type: string;
|
||||
cluster_count: number;
|
||||
description?: string;
|
||||
cluster_ids: number[];
|
||||
metadata?: Record<string, any>;
|
||||
external_reference?: string;
|
||||
}>;
|
||||
};
|
||||
sitemap_summary: {
|
||||
total_pages: number;
|
||||
by_type: Record<string, number>;
|
||||
coverage_percentage: number;
|
||||
sitemap_summary?: {
|
||||
pages_total: number;
|
||||
pages_by_status: Record<string, number>;
|
||||
pages_by_type: Record<string, number>;
|
||||
};
|
||||
next_actions?: {
|
||||
step: string | null;
|
||||
status: string;
|
||||
message: string | null;
|
||||
code: string | null;
|
||||
};
|
||||
next_actions: Array<{
|
||||
step: string;
|
||||
action: string;
|
||||
message: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export async function fetchSiteBlueprints(filters?: {
|
||||
|
||||
Reference in New Issue
Block a user