export type StepStatus = "running" | "completed" | "error"; export type TextStatus = "streaming" | "done" | "error"; export type StatusPartStatus = "running" | "completed" | "error"; export interface ProductCard { id: string | number; name: string; price: string; currency?: string; url: string; addToCartUrl?: string; imageUrl?: string; inStock?: boolean; } export type ChatMessagePart = | { type: "step"; id: string; label?: string; status: StepStatus; } | { type: "text"; id: string; text: string; stepId?: string; status: TextStatus; } | { type: "data-products"; id: string; products: ProductCard[]; stepId?: string; } | { type: "source-url"; id: string; title: string; url: string; stepId?: string; } | { type: "source-document"; id: string; title: string; excerpt?: string; url?: string; stepId?: string; }; export type TransientPart = { type: "data-status"; id: string; message: string; status: StatusPartStatus; stepId?: string; }; export interface ChatAssistantMessage { id: string; sender: "bot"; type: "assistant"; parts: ChatMessagePart[]; transientParts?: TransientPart[]; transparent?: boolean; }