diff --git a/extensions/react-widget/src/types/index.ts b/extensions/react-widget/src/types/index.ts index a55b6342..bd27910b 100644 --- a/extensions/react-widget/src/types/index.ts +++ b/extensions/react-widget/src/types/index.ts @@ -1,16 +1,21 @@ export type MESSAGE_TYPE = 'QUESTION' | 'ANSWER' | 'ERROR'; + export type Status = 'idle' | 'loading' | 'failed'; + export type FEEDBACK = 'LIKE' | 'DISLIKE'; + export type THEME = 'light' | 'dark'; + export interface Query { prompt: string; response?: string; feedback?: FEEDBACK; error?: string; - sources?: { title: string; text: string }[]; + sources?: { title: string; text: string, source:string }[]; conversationId?: string | null; title?: string | null; } + export interface WidgetProps { apiHost?: string; apiKey?: string; @@ -24,4 +29,5 @@ export interface WidgetProps { buttonIcon?:string; buttonBg?:string; collectFeedback?:boolean + showSources?: boolean } \ No newline at end of file