@llamaindex/ui
Version:
A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications
52 lines (43 loc) • 1.03 kB
text/typescript
// ===== Core Types =====
export type JSONValue =
| null
| string
| number
| boolean
| { [key: string]: JSONValue }
| Array<JSONValue>;
export type RunStatus = "idle" | "running" | "complete" | "failed";
export interface WorkflowHandlerSummary {
handler_id: string;
status: RunStatus;
workflowName?: string;
result?: unknown;
error?: unknown;
}
export interface WorkflowEvent {
type: string;
data?: JSONValue | undefined;
}
export interface WorkflowProgressState {
current: number;
total: number;
status: RunStatus;
}
// Available events map to qualified name
export enum WorkflowEventType {
StopEvent = "workflow.events.StopEvent",
}
export interface StreamingEventCallback<
E extends WorkflowEvent = WorkflowEvent,
> {
onStart?: () => void;
onData?: (event: E) => void;
onError?: (error: Error) => void;
onStopEvent?: (event: E) => void;
onFinish?: (allEvents: E[]) => void;
}
export type RawEvent = {
__is_pydantic: boolean;
value: JSONValue;
qualified_name: string;
};