flowise-embed
Advanced tools
Comparing version
import { FeedbackRatingType } from '@/queries/sendMessageQuery'; | ||
import { BotMessageTheme, FooterTheme, TextInputTheme, UserMessageTheme, FeedbackTheme } from '@/features/bubble/types'; | ||
import { FilePreview } from '@/components/inputs/textInput/components/FilePreview'; | ||
export type FileEvent<T = EventTarget> = { | ||
@@ -10,3 +11,3 @@ target: T; | ||
}; | ||
type ImageUploadConstraits = { | ||
type IUploadConstraits = { | ||
fileTypes: string[]; | ||
@@ -16,5 +17,7 @@ maxUploadSize: number; | ||
export type UploadsConfig = { | ||
imgUploadSizeAndTypes: ImageUploadConstraits[]; | ||
imgUploadSizeAndTypes: IUploadConstraits[]; | ||
fileUploadSizeAndTypes: IUploadConstraits[]; | ||
isImageUploadAllowed: boolean; | ||
isSpeechToTextEnabled: boolean; | ||
isFileUploadAllowed: boolean; | ||
}; | ||
@@ -67,2 +70,3 @@ type FilePreviewData = string | ArrayBuffer; | ||
apiHost?: string; | ||
onRequest?: (request: RequestInit) => Promise<void>; | ||
chatflowConfig?: Record<string, unknown>; | ||
@@ -69,0 +73,0 @@ welcomeMessage?: string; |
@@ -7,2 +7,3 @@ import { IAction, MessageType } from '../Bot'; | ||
apiHost?: string; | ||
onRequest?: (request: RequestInit) => Promise<void>; | ||
fileAnnotations?: any; | ||
@@ -9,0 +10,0 @@ showAvatar?: boolean; |
@@ -12,2 +12,3 @@ export * from './ClipboardIcon'; | ||
export * from './TickIcon'; | ||
export * from './AttachmentIcon'; | ||
//# sourceMappingURL=index.d.ts.map |
export { TextInput } from './components/TextInput'; | ||
export { FilePreview } from './components/FilePreview'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -12,5 +12,8 @@ import { FileUpload, IAction } from '@/components/Bot'; | ||
}; | ||
export type MessageRequest = { | ||
type BaseRequest = { | ||
apiHost?: string; | ||
onRequest?: (request: RequestInit) => Promise<void>; | ||
}; | ||
export type MessageRequest = BaseRequest & { | ||
chatflowid?: string; | ||
apiHost?: string; | ||
body?: IncomingInput; | ||
@@ -25,12 +28,15 @@ }; | ||
}; | ||
export type CreateFeedbackRequest = { | ||
export type CreateFeedbackRequest = BaseRequest & { | ||
chatflowid?: string; | ||
apiHost?: string; | ||
body?: FeedbackInput; | ||
}; | ||
export type UpdateFeedbackRequest = { | ||
export type UpdateFeedbackRequest = BaseRequest & { | ||
id: string; | ||
apiHost?: string; | ||
body?: Partial<FeedbackInput>; | ||
}; | ||
export type UpsertRequest = BaseRequest & { | ||
chatflowid: string; | ||
apiHost?: string; | ||
formData: FormData; | ||
}; | ||
export type LeadCaptureInput = { | ||
@@ -43,34 +49,38 @@ chatflowid: string; | ||
}; | ||
export type LeadCaptureRequest = { | ||
apiHost?: string; | ||
export type LeadCaptureRequest = BaseRequest & { | ||
body: Partial<LeadCaptureInput>; | ||
}; | ||
export declare const sendFeedbackQuery: ({ chatflowid, apiHost, body }: CreateFeedbackRequest) => Promise<{ | ||
export declare const sendFeedbackQuery: ({ chatflowid, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{ | ||
data?: unknown; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const updateFeedbackQuery: ({ id, apiHost, body }: UpdateFeedbackRequest) => Promise<{ | ||
export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{ | ||
data?: unknown; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const sendMessageQuery: ({ chatflowid, apiHost, body }: MessageRequest) => Promise<{ | ||
export declare const sendMessageQuery: ({ chatflowid, apiHost, body, onRequest }: MessageRequest) => Promise<{ | ||
data?: any; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const getChatbotConfig: ({ chatflowid, apiHost }: MessageRequest) => Promise<{ | ||
export declare const upsertVectorStoreWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{ | ||
data?: unknown; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const getChatbotConfig: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{ | ||
data?: any; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const isStreamAvailableQuery: ({ chatflowid, apiHost }: MessageRequest) => Promise<{ | ||
export declare const isStreamAvailableQuery: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{ | ||
data?: any; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const sendFileDownloadQuery: ({ apiHost, body }: MessageRequest) => Promise<{ | ||
export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{ | ||
data?: any; | ||
error?: Error | undefined; | ||
}>; | ||
export declare const addLeadQuery: ({ apiHost, body }: LeadCaptureRequest) => Promise<{ | ||
export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{ | ||
data?: any; | ||
error?: Error | undefined; | ||
}>; | ||
export {}; | ||
//# sourceMappingURL=sendMessageQuery.d.ts.map |
@@ -5,8 +5,11 @@ export declare const isNotDefined: <T>(value: T | null | undefined) => value is null | undefined; | ||
export declare const isNotEmpty: (value: string | undefined | null) => value is string; | ||
export declare const sendRequest: <ResponseData>(params: { | ||
export declare const sendRequest: <ResponseData>(params: string | { | ||
url: string; | ||
method: string; | ||
body?: Record<string, unknown> | FormData; | ||
type?: string; | ||
} | string) => Promise<{ | ||
body?: Record<string, unknown> | FormData | undefined; | ||
type?: string | undefined; | ||
headers?: Record<string, any> | undefined; | ||
formData?: FormData | undefined; | ||
onRequest?: ((request: RequestInit) => Promise<void>) | undefined; | ||
}) => Promise<{ | ||
data?: ResponseData | undefined; | ||
@@ -13,0 +16,0 @@ error?: Error | undefined; |
@@ -5,4 +5,6 @@ declare const chatbot: { | ||
apiHost?: string | undefined; | ||
onRequest?: ((request: RequestInit) => Promise<void>) | undefined; | ||
chatflowConfig?: Record<string, unknown> | undefined; | ||
observersConfig?: import("./components/Bot").observersConfigType | undefined; | ||
theme?: import("./features/bubble/types").BubbleTheme | undefined; | ||
} & { | ||
@@ -14,4 +16,6 @@ id?: string | undefined; | ||
apiHost?: string | undefined; | ||
onRequest?: ((request: RequestInit) => Promise<void>) | undefined; | ||
chatflowConfig?: Record<string, unknown> | undefined; | ||
observersConfig?: import("./components/Bot").observersConfigType | undefined; | ||
theme?: import("./features/bubble/types").BubbleTheme | undefined; | ||
}) => void; | ||
@@ -18,0 +22,0 @@ destroy: () => void; |
import { observersConfigType } from './components/Bot'; | ||
import { BubbleTheme } from './features/bubble/types'; | ||
type BotProps = { | ||
chatflowid: string; | ||
apiHost?: string; | ||
onRequest?: (request: RequestInit) => Promise<void>; | ||
chatflowConfig?: Record<string, unknown>; | ||
observersConfig?: observersConfigType; | ||
theme?: BubbleTheme; | ||
}; | ||
@@ -8,0 +11,0 @@ export declare const initFull: (props: BotProps & { |
{ | ||
"name": "flowise-embed", | ||
"version": "1.3.11", | ||
"version": "1.3.12", | ||
"description": "Javascript library to display flowise chatbot on your website", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -0,0 +0,0 @@ <!-- markdownlint-disable MD030 --> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1526586
0.69%137
4.58%4218
1.74%