export interface PredictionData { chatflowId: string; question: string; overrideConfig?: Record; chatId?: string; streaming?: boolean; history?: IMessage[]; uploads?: IFileUpload[]; leadEmail?: string; action?: IAction; } interface IAction { id?: string; elements?: Array<{ type: string; label: string; }>; mapping?: { approve: string; reject: string; toolCalls: any[]; }; } interface IFileUpload { data?: string; type: string; name: string; mime: string; } interface IMessage { message: string; type: MessageType; role?: MessageType; content?: string; } type MessageType = 'apiMessage' | 'userMessage'; export interface StreamResponse { event: string; data: string; } interface FlowiseClientOptions { baseUrl?: string; apiKey?: string; } type PredictionResponse = T['streaming'] extends true ? AsyncGenerator : Record; export default class FlowiseClient { private baseUrl; private apiKey; constructor(options?: FlowiseClientOptions); createPrediction(data: T): Promise>; } export {};