forked from FlowiseAI/FlowiseChatEmbed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBot.d.ts
56 lines (56 loc) · 1.74 KB
/
Bot.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { BotMessageTheme, TextInputTheme, UserMessageTheme } from '@/features/bubble/types';
export type FileEvent<T = EventTarget> = {
target: T;
};
type ImageUploadConstraits = {
fileTypes: string[];
maxUploadSize: number;
};
export type UploadsConfig = {
imgUploadSizeAndTypes: ImageUploadConstraits[];
isImageUploadAllowed: boolean;
isSpeechToTextEnabled: boolean;
};
type FilePreviewData = string | ArrayBuffer;
type FilePreview = {
data: FilePreviewData;
mime: string;
name: string;
preview: string;
type: string;
};
type messageType = 'apiMessage' | 'userMessage' | 'usermessagewaiting';
export type FileUpload = Omit<FilePreview, 'preview'>;
export type MessageType = {
message: string;
type: messageType;
sourceDocuments?: any;
fileAnnotations?: any;
fileUploads?: Partial<FileUpload>[];
};
type observerConfigType = (accessor: string | boolean | object | MessageType[]) => void;
export type observersConfigType = Record<'observeUserInput' | 'observeLoading' | 'observeMessages', observerConfigType>;
export type BotProps = {
chatflowid: string;
apiHost?: string;
chatflowConfig?: Record<string, unknown>;
welcomeMessage?: string;
botMessage?: BotMessageTheme;
userMessage?: UserMessageTheme;
textInput?: TextInputTheme;
poweredByTextColor?: string;
badgeBackgroundColor?: string;
bubbleBackgroundColor?: string;
bubbleTextColor?: string;
showTitle?: boolean;
title?: string;
titleAvatarSrc?: string;
fontSize?: number;
isFullPage?: boolean;
observersConfig?: observersConfigType;
};
export declare const Bot: (botProps: BotProps & {
class?: string;
}) => import("solid-js").JSX.Element;
export {};
//# sourceMappingURL=Bot.d.ts.map