thub-embed 2.0.6 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/components/Bot.d.ts +115 -115
- package/dist/components/bubbles/AgentReasoningBubble.d.ts +15 -15
- package/dist/components/bubbles/BotBubble.d.ts +26 -26
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts +7 -7
- package/dist/components/bubbles/GuestBubble.d.ts +15 -15
- package/dist/components/bubbles/LeadCaptureBubble.d.ts +1 -1
- package/dist/components/bubbles/StarterPromptBubble.d.ts +7 -7
- package/dist/components/buttons/AttachmentUploadButton.d.ts +10 -10
- package/dist/components/icons/AttachmentIcon.d.ts +2 -2
- package/dist/components/icons/SparklesIcon.d.ts +2 -2
- package/dist/components/icons/TickIcon.d.ts +1 -1
- package/dist/components/icons/XIcon.d.ts +4 -4
- package/dist/components/icons/index.d.ts +13 -13
- package/dist/components/inputs/textInput/components/FilePreview.d.ts +11 -11
- package/dist/components/inputs/textInput/components/TextInput.d.ts +27 -27
- package/dist/components/inputs/textInput/index.d.ts +2 -2
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -1
- package/dist/features/bubble/components/BubbleButton.d.ts +15 -15
- package/dist/features/bubble/components/Tooltip.d.ts +14 -14
- package/dist/features/bubble/types.d.ts +100 -100
- package/dist/features/popup/components/DisclaimerPopup.d.ts +8 -8
- package/dist/features/popup/components/index.d.ts +2 -2
- package/dist/queries/sendMessageQuery.d.ts +86 -86
- package/dist/utils/chatInputHistory.d.ts +21 -21
- package/dist/utils/index.d.ts +22 -22
- package/dist/web.d.ts +22 -22
- package/dist/web.js +1 -1
- package/dist/window.d.ts +29 -29
- package/package.json +65 -64
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
type TooltipProps = {
|
|
2
|
-
showTooltip: boolean;
|
|
3
|
-
position: {
|
|
4
|
-
bottom: number;
|
|
5
|
-
right: number;
|
|
6
|
-
};
|
|
7
|
-
buttonSize: number;
|
|
8
|
-
tooltipMessage?: string;
|
|
9
|
-
tooltipBackgroundColor?: string;
|
|
10
|
-
tooltipTextColor?: string;
|
|
11
|
-
tooltipFontSize?: number;
|
|
12
|
-
};
|
|
13
|
-
declare const Tooltip: (props: TooltipProps) => import("solid-js").JSX.Element;
|
|
14
|
-
export default Tooltip;
|
|
1
|
+
type TooltipProps = {
|
|
2
|
+
showTooltip: boolean;
|
|
3
|
+
position: {
|
|
4
|
+
bottom: number;
|
|
5
|
+
right: number;
|
|
6
|
+
};
|
|
7
|
+
buttonSize: number;
|
|
8
|
+
tooltipMessage?: string;
|
|
9
|
+
tooltipBackgroundColor?: string;
|
|
10
|
+
tooltipTextColor?: string;
|
|
11
|
+
tooltipFontSize?: number;
|
|
12
|
+
};
|
|
13
|
+
declare const Tooltip: (props: TooltipProps) => import("solid-js").JSX.Element;
|
|
14
|
+
export default Tooltip;
|
|
15
15
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
export type BubbleParams = {
|
|
2
|
-
theme?: BubbleTheme;
|
|
3
|
-
};
|
|
4
|
-
export type BubbleTheme = {
|
|
5
|
-
chatWindow?: ChatWindowTheme;
|
|
6
|
-
button?: ButtonTheme;
|
|
7
|
-
tooltip?: ToolTipTheme;
|
|
8
|
-
disclaimer?: DisclaimerPopUpTheme;
|
|
9
|
-
};
|
|
10
|
-
export type TextInputTheme = {
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
textColor?: string;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
sendButtonColor?: string;
|
|
15
|
-
maxChars?: number;
|
|
16
|
-
maxCharsWarningMessage?: string;
|
|
17
|
-
autoFocus?: boolean;
|
|
18
|
-
sendMessageSound?: boolean;
|
|
19
|
-
sendSoundLocation?: string;
|
|
20
|
-
receiveMessageSound?: boolean;
|
|
21
|
-
receiveSoundLocation?: string;
|
|
22
|
-
};
|
|
23
|
-
export type UserMessageTheme = {
|
|
24
|
-
backgroundColor?: string;
|
|
25
|
-
textColor?: string;
|
|
26
|
-
showAvatar?: boolean;
|
|
27
|
-
avatarSrc?: string;
|
|
28
|
-
};
|
|
29
|
-
export type BotMessageTheme = {
|
|
30
|
-
backgroundColor?: string;
|
|
31
|
-
textColor?: string;
|
|
32
|
-
showAvatar?: boolean;
|
|
33
|
-
avatarSrc?: string;
|
|
34
|
-
};
|
|
35
|
-
export type FooterTheme = {
|
|
36
|
-
showFooter?: boolean;
|
|
37
|
-
textColor?: string;
|
|
38
|
-
text?: string;
|
|
39
|
-
company?: string;
|
|
40
|
-
companyLink?: string;
|
|
41
|
-
};
|
|
42
|
-
export type FeedbackTheme = {
|
|
43
|
-
color?: string;
|
|
44
|
-
};
|
|
45
|
-
export type ChatWindowTheme = {
|
|
46
|
-
showTitle?: boolean;
|
|
47
|
-
showAgentMessages?: boolean;
|
|
48
|
-
title?: string;
|
|
49
|
-
titleAvatarSrc?: string;
|
|
50
|
-
welcomeMessage?: string;
|
|
51
|
-
errorMessage?: string;
|
|
52
|
-
backgroundColor?: string;
|
|
53
|
-
backgroundImage?: string;
|
|
54
|
-
height?: number;
|
|
55
|
-
width?: number;
|
|
56
|
-
fontSize?: number;
|
|
57
|
-
userMessage?: UserMessageTheme;
|
|
58
|
-
botMessage?: BotMessageTheme;
|
|
59
|
-
textInput?: TextInputTheme;
|
|
60
|
-
feedback?: FeedbackTheme;
|
|
61
|
-
footer?: FooterTheme;
|
|
62
|
-
sourceDocsTitle?: string;
|
|
63
|
-
poweredByTextColor?: string;
|
|
64
|
-
starterPrompts?: string[];
|
|
65
|
-
starterPromptFontSize?: number;
|
|
66
|
-
clearChatOnReload?: boolean;
|
|
67
|
-
dateTimeToggle?: DateTimeToggleTheme;
|
|
68
|
-
renderHTML?: boolean;
|
|
69
|
-
};
|
|
70
|
-
export type ButtonTheme = {
|
|
71
|
-
size?: 'small' | 'medium' | 'large' | number;
|
|
72
|
-
backgroundColor?: string;
|
|
73
|
-
iconColor?: string;
|
|
74
|
-
customIconSrc?: string;
|
|
75
|
-
bottom?: number;
|
|
76
|
-
right?: number;
|
|
77
|
-
dragAndDrop?: boolean;
|
|
78
|
-
autoWindowOpen?: autoWindowOpenTheme;
|
|
79
|
-
};
|
|
80
|
-
export type ToolTipTheme = {
|
|
81
|
-
showTooltip?: boolean;
|
|
82
|
-
tooltipMessage?: string;
|
|
83
|
-
tooltipBackgroundColor?: string;
|
|
84
|
-
tooltipTextColor?: string;
|
|
85
|
-
tooltipFontSize?: number;
|
|
86
|
-
};
|
|
87
|
-
export type autoWindowOpenTheme = {
|
|
88
|
-
autoOpen?: boolean;
|
|
89
|
-
openDelay?: number;
|
|
90
|
-
autoOpenOnMobile?: boolean;
|
|
91
|
-
};
|
|
92
|
-
export type DisclaimerPopUpTheme = {
|
|
93
|
-
title?: string;
|
|
94
|
-
message?: string;
|
|
95
|
-
buttonText?: string;
|
|
96
|
-
};
|
|
97
|
-
export type DateTimeToggleTheme = {
|
|
98
|
-
date?: boolean;
|
|
99
|
-
time?: boolean;
|
|
100
|
-
};
|
|
1
|
+
export type BubbleParams = {
|
|
2
|
+
theme?: BubbleTheme;
|
|
3
|
+
};
|
|
4
|
+
export type BubbleTheme = {
|
|
5
|
+
chatWindow?: ChatWindowTheme;
|
|
6
|
+
button?: ButtonTheme;
|
|
7
|
+
tooltip?: ToolTipTheme;
|
|
8
|
+
disclaimer?: DisclaimerPopUpTheme;
|
|
9
|
+
};
|
|
10
|
+
export type TextInputTheme = {
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
textColor?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
sendButtonColor?: string;
|
|
15
|
+
maxChars?: number;
|
|
16
|
+
maxCharsWarningMessage?: string;
|
|
17
|
+
autoFocus?: boolean;
|
|
18
|
+
sendMessageSound?: boolean;
|
|
19
|
+
sendSoundLocation?: string;
|
|
20
|
+
receiveMessageSound?: boolean;
|
|
21
|
+
receiveSoundLocation?: string;
|
|
22
|
+
};
|
|
23
|
+
export type UserMessageTheme = {
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
textColor?: string;
|
|
26
|
+
showAvatar?: boolean;
|
|
27
|
+
avatarSrc?: string;
|
|
28
|
+
};
|
|
29
|
+
export type BotMessageTheme = {
|
|
30
|
+
backgroundColor?: string;
|
|
31
|
+
textColor?: string;
|
|
32
|
+
showAvatar?: boolean;
|
|
33
|
+
avatarSrc?: string;
|
|
34
|
+
};
|
|
35
|
+
export type FooterTheme = {
|
|
36
|
+
showFooter?: boolean;
|
|
37
|
+
textColor?: string;
|
|
38
|
+
text?: string;
|
|
39
|
+
company?: string;
|
|
40
|
+
companyLink?: string;
|
|
41
|
+
};
|
|
42
|
+
export type FeedbackTheme = {
|
|
43
|
+
color?: string;
|
|
44
|
+
};
|
|
45
|
+
export type ChatWindowTheme = {
|
|
46
|
+
showTitle?: boolean;
|
|
47
|
+
showAgentMessages?: boolean;
|
|
48
|
+
title?: string;
|
|
49
|
+
titleAvatarSrc?: string;
|
|
50
|
+
welcomeMessage?: string;
|
|
51
|
+
errorMessage?: string;
|
|
52
|
+
backgroundColor?: string;
|
|
53
|
+
backgroundImage?: string;
|
|
54
|
+
height?: number;
|
|
55
|
+
width?: number;
|
|
56
|
+
fontSize?: number;
|
|
57
|
+
userMessage?: UserMessageTheme;
|
|
58
|
+
botMessage?: BotMessageTheme;
|
|
59
|
+
textInput?: TextInputTheme;
|
|
60
|
+
feedback?: FeedbackTheme;
|
|
61
|
+
footer?: FooterTheme;
|
|
62
|
+
sourceDocsTitle?: string;
|
|
63
|
+
poweredByTextColor?: string;
|
|
64
|
+
starterPrompts?: string[];
|
|
65
|
+
starterPromptFontSize?: number;
|
|
66
|
+
clearChatOnReload?: boolean;
|
|
67
|
+
dateTimeToggle?: DateTimeToggleTheme;
|
|
68
|
+
renderHTML?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export type ButtonTheme = {
|
|
71
|
+
size?: 'small' | 'medium' | 'large' | number;
|
|
72
|
+
backgroundColor?: string;
|
|
73
|
+
iconColor?: string;
|
|
74
|
+
customIconSrc?: string;
|
|
75
|
+
bottom?: number;
|
|
76
|
+
right?: number;
|
|
77
|
+
dragAndDrop?: boolean;
|
|
78
|
+
autoWindowOpen?: autoWindowOpenTheme;
|
|
79
|
+
};
|
|
80
|
+
export type ToolTipTheme = {
|
|
81
|
+
showTooltip?: boolean;
|
|
82
|
+
tooltipMessage?: string;
|
|
83
|
+
tooltipBackgroundColor?: string;
|
|
84
|
+
tooltipTextColor?: string;
|
|
85
|
+
tooltipFontSize?: number;
|
|
86
|
+
};
|
|
87
|
+
export type autoWindowOpenTheme = {
|
|
88
|
+
autoOpen?: boolean;
|
|
89
|
+
openDelay?: number;
|
|
90
|
+
autoOpenOnMobile?: boolean;
|
|
91
|
+
};
|
|
92
|
+
export type DisclaimerPopUpTheme = {
|
|
93
|
+
title?: string;
|
|
94
|
+
message?: string;
|
|
95
|
+
buttonText?: string;
|
|
96
|
+
};
|
|
97
|
+
export type DateTimeToggleTheme = {
|
|
98
|
+
date?: boolean;
|
|
99
|
+
time?: boolean;
|
|
100
|
+
};
|
|
101
101
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type DisclaimerPopupProps = {
|
|
2
|
-
isOpen?: boolean;
|
|
3
|
-
onAccept?: () => void;
|
|
4
|
-
title?: string;
|
|
5
|
-
message?: string;
|
|
6
|
-
buttonText?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const DisclaimerPopup: (props: DisclaimerPopupProps) => import("solid-js").JSX.Element;
|
|
1
|
+
export type DisclaimerPopupProps = {
|
|
2
|
+
isOpen?: boolean;
|
|
3
|
+
onAccept?: () => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
message?: string;
|
|
6
|
+
buttonText?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const DisclaimerPopup: (props: DisclaimerPopupProps) => import("solid-js").JSX.Element;
|
|
9
9
|
//# sourceMappingURL=DisclaimerPopup.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Popup';
|
|
2
|
-
export * from './DisclaimerPopup';
|
|
1
|
+
export * from './Popup';
|
|
2
|
+
export * from './DisclaimerPopup';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { FileUpload, IAction } from '@/components/Bot';
|
|
2
|
-
export type IncomingInput = {
|
|
3
|
-
question: string;
|
|
4
|
-
uploads?: FileUpload[];
|
|
5
|
-
overrideConfig?: Record<string, unknown>;
|
|
6
|
-
socketIOClientId?: string;
|
|
7
|
-
chatId?: string;
|
|
8
|
-
fileName?: string;
|
|
9
|
-
leadEmail?: string;
|
|
10
|
-
action?: IAction;
|
|
11
|
-
};
|
|
12
|
-
type BaseRequest = {
|
|
13
|
-
apiHost?: string;
|
|
14
|
-
onRequest?: (request: RequestInit) => Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
export type MessageRequest = BaseRequest & {
|
|
17
|
-
|
|
18
|
-
body?: IncomingInput;
|
|
19
|
-
};
|
|
20
|
-
export type FeedbackRatingType = 'THUMBS_UP' | 'THUMBS_DOWN';
|
|
21
|
-
export type FeedbackInput = {
|
|
22
|
-
chatId: string;
|
|
23
|
-
messageId: string;
|
|
24
|
-
rating: FeedbackRatingType;
|
|
25
|
-
content?: string;
|
|
26
|
-
};
|
|
27
|
-
export type CreateFeedbackRequest = BaseRequest & {
|
|
28
|
-
|
|
29
|
-
body?: FeedbackInput;
|
|
30
|
-
};
|
|
31
|
-
export type UpdateFeedbackRequest = BaseRequest & {
|
|
32
|
-
id: string;
|
|
33
|
-
body?: Partial<FeedbackInput>;
|
|
34
|
-
};
|
|
35
|
-
export type UpsertRequest = BaseRequest & {
|
|
36
|
-
|
|
37
|
-
apiHost?: string;
|
|
38
|
-
formData: FormData;
|
|
39
|
-
};
|
|
40
|
-
export type LeadCaptureInput = {
|
|
41
|
-
|
|
42
|
-
chatId: string;
|
|
43
|
-
name?: string;
|
|
44
|
-
email?: string;
|
|
45
|
-
phone?: string;
|
|
46
|
-
};
|
|
47
|
-
export type LeadCaptureRequest = BaseRequest & {
|
|
48
|
-
body: Partial<LeadCaptureInput>;
|
|
49
|
-
};
|
|
50
|
-
export declare const sendFeedbackQuery: ({
|
|
51
|
-
data?: unknown;
|
|
52
|
-
error?: Error | undefined;
|
|
53
|
-
}>;
|
|
54
|
-
export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{
|
|
55
|
-
data?: unknown;
|
|
56
|
-
error?: Error | undefined;
|
|
57
|
-
}>;
|
|
58
|
-
export declare const sendMessageQuery: ({
|
|
59
|
-
data?: any;
|
|
60
|
-
error?: Error | undefined;
|
|
61
|
-
}>;
|
|
62
|
-
export declare const createAttachmentWithFormData: ({
|
|
63
|
-
data?: unknown;
|
|
64
|
-
error?: Error | undefined;
|
|
65
|
-
}>;
|
|
66
|
-
export declare const upsertVectorStoreWithFormData: ({
|
|
67
|
-
data?: unknown;
|
|
68
|
-
error?: Error | undefined;
|
|
69
|
-
}>;
|
|
70
|
-
export declare const getChatbotConfig: ({
|
|
71
|
-
data?: any;
|
|
72
|
-
error?: Error | undefined;
|
|
73
|
-
}>;
|
|
74
|
-
export declare const isStreamAvailableQuery: ({
|
|
75
|
-
data?: any;
|
|
76
|
-
error?: Error | undefined;
|
|
77
|
-
}>;
|
|
78
|
-
export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
79
|
-
data?: any;
|
|
80
|
-
error?: Error | undefined;
|
|
81
|
-
}>;
|
|
82
|
-
export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{
|
|
83
|
-
data?: any;
|
|
84
|
-
error?: Error | undefined;
|
|
85
|
-
}>;
|
|
86
|
-
export {};
|
|
1
|
+
import { FileUpload, IAction } from '@/components/Bot';
|
|
2
|
+
export type IncomingInput = {
|
|
3
|
+
question: string;
|
|
4
|
+
uploads?: FileUpload[];
|
|
5
|
+
overrideConfig?: Record<string, unknown>;
|
|
6
|
+
socketIOClientId?: string;
|
|
7
|
+
chatId?: string;
|
|
8
|
+
fileName?: string;
|
|
9
|
+
leadEmail?: string;
|
|
10
|
+
action?: IAction;
|
|
11
|
+
};
|
|
12
|
+
type BaseRequest = {
|
|
13
|
+
apiHost?: string;
|
|
14
|
+
onRequest?: (request: RequestInit) => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export type MessageRequest = BaseRequest & {
|
|
17
|
+
workflowid?: string;
|
|
18
|
+
body?: IncomingInput;
|
|
19
|
+
};
|
|
20
|
+
export type FeedbackRatingType = 'THUMBS_UP' | 'THUMBS_DOWN';
|
|
21
|
+
export type FeedbackInput = {
|
|
22
|
+
chatId: string;
|
|
23
|
+
messageId: string;
|
|
24
|
+
rating: FeedbackRatingType;
|
|
25
|
+
content?: string;
|
|
26
|
+
};
|
|
27
|
+
export type CreateFeedbackRequest = BaseRequest & {
|
|
28
|
+
workflowid?: string;
|
|
29
|
+
body?: FeedbackInput;
|
|
30
|
+
};
|
|
31
|
+
export type UpdateFeedbackRequest = BaseRequest & {
|
|
32
|
+
id: string;
|
|
33
|
+
body?: Partial<FeedbackInput>;
|
|
34
|
+
};
|
|
35
|
+
export type UpsertRequest = BaseRequest & {
|
|
36
|
+
workflowid: string;
|
|
37
|
+
apiHost?: string;
|
|
38
|
+
formData: FormData;
|
|
39
|
+
};
|
|
40
|
+
export type LeadCaptureInput = {
|
|
41
|
+
workflowid: string;
|
|
42
|
+
chatId: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
email?: string;
|
|
45
|
+
phone?: string;
|
|
46
|
+
};
|
|
47
|
+
export type LeadCaptureRequest = BaseRequest & {
|
|
48
|
+
body: Partial<LeadCaptureInput>;
|
|
49
|
+
};
|
|
50
|
+
export declare const sendFeedbackQuery: ({ workflowid, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{
|
|
51
|
+
data?: unknown;
|
|
52
|
+
error?: Error | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{
|
|
55
|
+
data?: unknown;
|
|
56
|
+
error?: Error | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
export declare const sendMessageQuery: ({ workflowid, apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
59
|
+
data?: any;
|
|
60
|
+
error?: Error | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const createAttachmentWithFormData: ({ workflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
|
|
63
|
+
data?: unknown;
|
|
64
|
+
error?: Error | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const upsertVectorStoreWithFormData: ({ workflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
|
|
67
|
+
data?: unknown;
|
|
68
|
+
error?: Error | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const getChatbotConfig: ({ workflowid, apiHost, onRequest }: MessageRequest) => Promise<{
|
|
71
|
+
data?: any;
|
|
72
|
+
error?: Error | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const isStreamAvailableQuery: ({ workflowid, apiHost, onRequest }: MessageRequest) => Promise<{
|
|
75
|
+
data?: any;
|
|
76
|
+
error?: Error | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
79
|
+
data?: any;
|
|
80
|
+
error?: Error | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{
|
|
83
|
+
data?: any;
|
|
84
|
+
error?: Error | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
export {};
|
|
87
87
|
//# sourceMappingURL=sendMessageQuery.d.ts.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
type ChatHistoryStorage = {
|
|
2
|
-
getItem(key: string): string | null;
|
|
3
|
-
setItem(key: string, value: string): void;
|
|
4
|
-
};
|
|
5
|
-
export declare class ChatInputHistory {
|
|
6
|
-
private getMaxHistory;
|
|
7
|
-
private storage;
|
|
8
|
-
private history;
|
|
9
|
-
private currentIndex;
|
|
10
|
-
private tempInput;
|
|
11
|
-
private maxHistory;
|
|
12
|
-
constructor(getMaxHistory?: () => number, storage?: ChatHistoryStorage);
|
|
13
|
-
getHistory(): string[];
|
|
14
|
-
getCurrentIndex(): number;
|
|
15
|
-
addToHistory(input: string): void;
|
|
16
|
-
getPreviousInput(currentInput: string): string;
|
|
17
|
-
getNextInput(): string;
|
|
18
|
-
private saveHistory;
|
|
19
|
-
private loadHistory;
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
1
|
+
type ChatHistoryStorage = {
|
|
2
|
+
getItem(key: string): string | null;
|
|
3
|
+
setItem(key: string, value: string): void;
|
|
4
|
+
};
|
|
5
|
+
export declare class ChatInputHistory {
|
|
6
|
+
private getMaxHistory;
|
|
7
|
+
private storage;
|
|
8
|
+
private history;
|
|
9
|
+
private currentIndex;
|
|
10
|
+
private tempInput;
|
|
11
|
+
private maxHistory;
|
|
12
|
+
constructor(getMaxHistory?: () => number, storage?: ChatHistoryStorage);
|
|
13
|
+
getHistory(): string[];
|
|
14
|
+
getCurrentIndex(): number;
|
|
15
|
+
addToHistory(input: string): void;
|
|
16
|
+
getPreviousInput(currentInput: string): string;
|
|
17
|
+
getNextInput(): string;
|
|
18
|
+
private saveHistory;
|
|
19
|
+
private loadHistory;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
22
|
//# sourceMappingURL=chatInputHistory.d.ts.map
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export declare const isNotDefined: <T>(value: T | null | undefined) => value is null | undefined;
|
|
2
|
-
export declare const isDefined: <T>(value: T | null | undefined) => value is NonNullable<T>;
|
|
3
|
-
export declare const isEmpty: (value: string | undefined | null) => value is undefined;
|
|
4
|
-
export declare const isNotEmpty: (value: string | undefined | null) => value is string;
|
|
5
|
-
export declare const sendRequest: <ResponseData>(params: string | {
|
|
6
|
-
url: string;
|
|
7
|
-
method: string;
|
|
8
|
-
body?: Record<string, unknown> | FormData | undefined;
|
|
9
|
-
type?: string | undefined;
|
|
10
|
-
headers?: Record<string, any> | undefined;
|
|
11
|
-
formData?: FormData | undefined;
|
|
12
|
-
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
13
|
-
}) => Promise<{
|
|
14
|
-
data?: ResponseData | undefined;
|
|
15
|
-
error?: Error | undefined;
|
|
16
|
-
}>;
|
|
17
|
-
export declare const setLocalStorageChatflow: (
|
|
18
|
-
export declare const getLocalStorageChatflow: (
|
|
19
|
-
export declare const removeLocalStorageChatHistory: (
|
|
20
|
-
export declare const getBubbleButtonSize: (size: 'small' | 'medium' | 'large' | number | undefined) => number;
|
|
21
|
-
export declare const setCookie: (cname: string, cvalue: string, exdays: number) => void;
|
|
22
|
-
export declare const getCookie: (cname: string) => string;
|
|
1
|
+
export declare const isNotDefined: <T>(value: T | null | undefined) => value is null | undefined;
|
|
2
|
+
export declare const isDefined: <T>(value: T | null | undefined) => value is NonNullable<T>;
|
|
3
|
+
export declare const isEmpty: (value: string | undefined | null) => value is undefined;
|
|
4
|
+
export declare const isNotEmpty: (value: string | undefined | null) => value is string;
|
|
5
|
+
export declare const sendRequest: <ResponseData>(params: string | {
|
|
6
|
+
url: string;
|
|
7
|
+
method: string;
|
|
8
|
+
body?: Record<string, unknown> | FormData | undefined;
|
|
9
|
+
type?: string | undefined;
|
|
10
|
+
headers?: Record<string, any> | undefined;
|
|
11
|
+
formData?: FormData | undefined;
|
|
12
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
data?: ResponseData | undefined;
|
|
15
|
+
error?: Error | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const setLocalStorageChatflow: (workflowid: string, chatId: string, saveObj?: Record<string, any>) => void;
|
|
18
|
+
export declare const getLocalStorageChatflow: (workflowid: string) => any;
|
|
19
|
+
export declare const removeLocalStorageChatHistory: (workflowid: string) => void;
|
|
20
|
+
export declare const getBubbleButtonSize: (size: 'small' | 'medium' | 'large' | number | undefined) => number;
|
|
21
|
+
export declare const setCookie: (cname: string, cvalue: string, exdays: number) => void;
|
|
22
|
+
export declare const getCookie: (cname: string) => string;
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/web.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
declare const chatbot: {
|
|
2
|
-
initFull: (props: {
|
|
3
|
-
|
|
4
|
-
apiHost?: string | undefined;
|
|
5
|
-
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
6
|
-
chatflowConfig?: Record<string, unknown> | undefined;
|
|
7
|
-
observersConfig?: import("./components/Bot").observersConfigType | undefined;
|
|
8
|
-
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
id?: string | undefined;
|
|
11
|
-
}) => void;
|
|
12
|
-
init: (props: {
|
|
13
|
-
|
|
14
|
-
apiHost?: string | undefined;
|
|
15
|
-
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
16
|
-
chatflowConfig?: Record<string, unknown> | undefined;
|
|
17
|
-
observersConfig?: import("./components/Bot").observersConfigType | undefined;
|
|
18
|
-
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
19
|
-
}) => void;
|
|
20
|
-
destroy: () => void;
|
|
21
|
-
};
|
|
22
|
-
export default chatbot;
|
|
1
|
+
declare const chatbot: {
|
|
2
|
+
initFull: (props: {
|
|
3
|
+
workflowid: string;
|
|
4
|
+
apiHost?: string | undefined;
|
|
5
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
6
|
+
chatflowConfig?: Record<string, unknown> | undefined;
|
|
7
|
+
observersConfig?: import("./components/Bot").observersConfigType | undefined;
|
|
8
|
+
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
id?: string | undefined;
|
|
11
|
+
}) => void;
|
|
12
|
+
init: (props: {
|
|
13
|
+
workflowid: string;
|
|
14
|
+
apiHost?: string | undefined;
|
|
15
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
16
|
+
chatflowConfig?: Record<string, unknown> | undefined;
|
|
17
|
+
observersConfig?: import("./components/Bot").observersConfigType | undefined;
|
|
18
|
+
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
19
|
+
}) => void;
|
|
20
|
+
destroy: () => void;
|
|
21
|
+
};
|
|
22
|
+
export default chatbot;
|
|
23
23
|
//# sourceMappingURL=web.d.ts.map
|