From 0481e766ae420bbab3ed86b106448d3338952277 Mon Sep 17 00:00:00 2001 From: utin-francis-peter Date: Mon, 14 Oct 2024 12:30:57 +0100 Subject: [PATCH] chore: updated Query and WidgetProps interface with source property --- extensions/react-widget/src/types/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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