cmcts-c-agent-embedding-react 1.0.3 → 1.0.4-tchckt
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/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/flowise-chatbox.iml +9 -0
- package/.idea/inspectionProfiles/Project_Default.xml +2 -2
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +1 -1
- package/.idea/vcs.xml +5 -5
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Bot.d.ts +127 -0
- package/dist/components/Bot.d.ts.map +1 -0
- package/dist/components/FeedbackContentDialog.d.ts +13 -0
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
- package/dist/components/Toast.d.ts +10 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/TypingBubble.d.ts +2 -0
- package/dist/components/TypingBubble.d.ts.map +1 -0
- package/dist/components/avatars/Avatar.d.ts +4 -0
- package/dist/components/avatars/Avatar.d.ts.map +1 -0
- package/dist/components/avatars/DefaultAvatar.d.ts +2 -0
- package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
- package/dist/components/bubbles/AgentReasoningBubble.d.ts +16 -0
- package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts +35 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts +8 -0
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts +16 -0
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LeadCaptureBubble.d.ts +20 -0
- package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LoadingBubble.d.ts +8 -0
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
- package/dist/components/bubbles/SourceBubble.d.ts +9 -0
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts +8 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
- package/dist/components/buttons/AttachmentUploadButton.d.ts +11 -0
- package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/CancelButton.d.ts +10 -0
- package/dist/components/buttons/CancelButton.d.ts.map +1 -0
- package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts +14 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
- package/dist/components/buttons/ImageUploadButton.d.ts +11 -0
- package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/LeadCaptureButtons.d.ts +11 -0
- package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/RecordAudioButton.d.ts +11 -0
- package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts +13 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts +3 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
- package/dist/components/icons/AttachmentIcon.d.ts +3 -0
- package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CircleDotIcon.d.ts +3 -0
- package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
- package/dist/components/icons/ClipboardIcon.d.ts +3 -0
- package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/DeleteIcon.d.ts +3 -0
- package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts +3 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/RecordIcon.d.ts +3 -0
- package/dist/components/icons/RecordIcon.d.ts.map +1 -0
- package/dist/components/icons/SendIcon.d.ts +3 -0
- package/dist/components/icons/SendIcon.d.ts.map +1 -0
- package/dist/components/icons/SparklesIcon.d.ts +3 -0
- package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts +5 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts +5 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
- package/dist/components/icons/TickIcon.d.ts +2 -0
- package/dist/components/icons/TickIcon.d.ts.map +1 -0
- package/dist/components/icons/TrashIcon.d.ts +3 -0
- package/dist/components/icons/TrashIcon.d.ts.map +1 -0
- package/dist/components/icons/XIcon.d.ts +5 -0
- package/dist/components/icons/XIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts +18 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/image/PreviewImage.d.ts +5 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/FilePreview.d.ts +12 -0
- package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts +13 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts +44 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/index.d.ts +3 -0
- package/dist/components/inputs/textInput/index.d.ts.map +1 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/features/bubble/components/Bubble.d.ts +5 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts +16 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
- package/dist/features/bubble/components/Tooltip.d.ts +17 -0
- package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
- package/dist/features/bubble/components/index.d.ts +2 -0
- package/dist/features/bubble/components/index.d.ts.map +1 -0
- package/dist/features/bubble/index.d.ts +2 -0
- package/dist/features/bubble/index.d.ts.map +1 -0
- package/dist/features/bubble/types.d.ts +108 -0
- package/dist/features/bubble/types.d.ts.map +1 -0
- package/dist/features/full/components/Full.d.ts +7 -0
- package/dist/features/full/components/Full.d.ts.map +1 -0
- package/dist/features/full/components/index.d.ts +2 -0
- package/dist/features/full/components/index.d.ts.map +1 -0
- package/dist/features/full/index.d.ts +2 -0
- package/dist/features/full/index.d.ts.map +1 -0
- package/dist/features/popup/components/DisclaimerPopup.d.ts +14 -0
- package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
- package/dist/features/popup/components/Popup.d.ts +8 -0
- package/dist/features/popup/components/Popup.d.ts.map +1 -0
- package/dist/features/popup/components/index.d.ts +3 -0
- package/dist/features/popup/components/index.d.ts.map +1 -0
- package/dist/features/popup/index.d.ts +2 -0
- package/dist/features/popup/index.d.ts.map +1 -0
- package/dist/features/popup/types.d.ts +8 -0
- package/dist/features/popup/types.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/queries/sendMessageQuery.d.ts +135 -0
- package/dist/queries/sendMessageQuery.d.ts.map +1 -0
- package/dist/register.d.ts +2 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/audioRecording.d.ts +21 -0
- package/dist/utils/audioRecording.d.ts.map +1 -0
- package/dist/utils/chatInputHistory.d.ts +22 -0
- package/dist/utils/chatInputHistory.d.ts.map +1 -0
- package/dist/utils/index.d.ts +27 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/isMobileSignal.d.ts +2 -0
- package/dist/utils/isMobileSignal.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts +2 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/web.d.ts +29 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +1 -0
- package/dist/window.d.ts +33 -0
- package/dist/window.d.ts.map +1 -0
- package/package.json +9 -4
- package/.env +0 -36
- package/.idea/Flowise-share-chatbox.iml +0 -12
- package/a.json +0 -57
- package/bun.lockb +0 -0
- package/test.html +0 -17
|
@@ -0,0 +1,135 @@
|
|
|
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
|
+
stored?: Record<string, any>;
|
|
12
|
+
fetch?: boolean;
|
|
13
|
+
faqId?: string;
|
|
14
|
+
useId?: string;
|
|
15
|
+
};
|
|
16
|
+
type BaseRequest = {
|
|
17
|
+
apiHost?: string;
|
|
18
|
+
onRequest?: (request: RequestInit) => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
export type MessageRequest = BaseRequest & {
|
|
21
|
+
chatflowid?: string;
|
|
22
|
+
body?: IncomingInput;
|
|
23
|
+
};
|
|
24
|
+
export type FeedbackRatingType = 'THUMBS_UP' | 'THUMBS_DOWN';
|
|
25
|
+
export type FeedbackInput = {
|
|
26
|
+
chatId: string;
|
|
27
|
+
messageId: string;
|
|
28
|
+
rating: any;
|
|
29
|
+
content?: string;
|
|
30
|
+
};
|
|
31
|
+
export type CreateFeedbackRequest = BaseRequest & {
|
|
32
|
+
chatflowid?: string;
|
|
33
|
+
body?: FeedbackInput;
|
|
34
|
+
};
|
|
35
|
+
export type UpdateFeedbackRequest = BaseRequest & {
|
|
36
|
+
id: string;
|
|
37
|
+
body?: Partial<FeedbackInput>;
|
|
38
|
+
};
|
|
39
|
+
export type UpsertRequest = BaseRequest & {
|
|
40
|
+
chatflowid: string;
|
|
41
|
+
apiHost?: string;
|
|
42
|
+
formData: FormData;
|
|
43
|
+
};
|
|
44
|
+
export type LeadCaptureInput = {
|
|
45
|
+
chatflowid: string;
|
|
46
|
+
chatId: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
phone?: string;
|
|
50
|
+
};
|
|
51
|
+
export type GetFeedbackByMessageIdRequest = BaseRequest & {
|
|
52
|
+
messageId: string;
|
|
53
|
+
};
|
|
54
|
+
export type LeadCaptureRequest = BaseRequest & {
|
|
55
|
+
body: Partial<LeadCaptureInput>;
|
|
56
|
+
};
|
|
57
|
+
export declare const getUserFromLocalStorage: () => any | null;
|
|
58
|
+
export declare const sendFeedbackQuery: ({ chatflowid, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{
|
|
59
|
+
data?: unknown;
|
|
60
|
+
error?: Error | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const getFeedbackByMessageId: ({ messageId, apiHost, onRequest }: GetFeedbackByMessageIdRequest) => Promise<{
|
|
63
|
+
data?: unknown;
|
|
64
|
+
error?: Error | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{
|
|
67
|
+
data?: unknown;
|
|
68
|
+
error?: Error | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const sendMessageQuery: ({ chatflowid, apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
71
|
+
data?: any;
|
|
72
|
+
error?: Error | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const createAttachmentWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
|
|
75
|
+
data?: unknown;
|
|
76
|
+
error?: Error | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
export declare const upsertVectorStoreWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
|
|
79
|
+
data?: unknown;
|
|
80
|
+
error?: Error | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export declare const getChatbotConfig: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
|
|
83
|
+
data?: any;
|
|
84
|
+
error?: Error | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const getMessageById: ({ chatflowid, apiHost, onRequest, messageId }: BaseRequest & {
|
|
87
|
+
chatflowid?: string | undefined;
|
|
88
|
+
body?: IncomingInput | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
messageId: string;
|
|
91
|
+
}) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
92
|
+
export declare const updateMessage: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
93
|
+
data?: any;
|
|
94
|
+
error?: Error | undefined;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const isStreamAvailableQuery: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
|
|
97
|
+
data?: any;
|
|
98
|
+
error?: Error | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
|
|
101
|
+
data?: any;
|
|
102
|
+
error?: Error | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{
|
|
105
|
+
data?: any;
|
|
106
|
+
error?: Error | undefined;
|
|
107
|
+
}>;
|
|
108
|
+
export declare const searchFaqsQuery: ({ chatflowid, apiHost, query, onRequest, }: {
|
|
109
|
+
chatflowid?: string | undefined;
|
|
110
|
+
apiHost?: string | undefined;
|
|
111
|
+
query: string;
|
|
112
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
113
|
+
}) => Promise<{
|
|
114
|
+
data?: any;
|
|
115
|
+
error?: Error | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
export declare const vectorSearchFaqsQuery: ({ chatflowid, apiHost, query, onRequest, }: {
|
|
118
|
+
chatflowid: string;
|
|
119
|
+
apiHost?: string | undefined;
|
|
120
|
+
query: string;
|
|
121
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
122
|
+
}) => Promise<{
|
|
123
|
+
data?: any;
|
|
124
|
+
error?: Error | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
export declare const getFileContent: ({ apiHost, path, onRequest, }: {
|
|
127
|
+
apiHost?: string | undefined;
|
|
128
|
+
path: string;
|
|
129
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
130
|
+
}) => Promise<{
|
|
131
|
+
data?: any;
|
|
132
|
+
error?: Error | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
export {};
|
|
135
|
+
//# sourceMappingURL=sendMessageQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendMessageQuery.d.ts","sourceRoot":"","sources":["../../src/queries/sendMessageQuery.ts"],"names":[],"mappings":"AAAA,OA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AM,aAAa,iCAA4D,cAAc;;;EAUnG,CAAC;AAEF,eAAO,MAAM,sBAAsB,uCAAkE,cAAc;;;EAQ/G,CAAC;AAEL,eAAO,MAAM,qBAAqB,iCAA4D,cAAc;;;EAUxG,CAAC;AAEL,eAAO,MAAM,YAAY,iCAA4D,kBAAkB;;;EASnG,CAAC;AAEL,eAAO,MAAM,eAAe;;;WAQnB,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,qBAAqB;gBAMpB,MAAM;;WAEX,MAAM;2BACS,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC;AAEF,eAAO,MAAM,cAAc;;UAMnB,MAAM;2BACU,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAUpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,YAKjC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function getElaspedTime(): string;
|
|
2
|
+
/** Starts the audio recording*/
|
|
3
|
+
export declare function startAudioRecording(onRecordingStart: (value: boolean) => void, onUnsupportedBrowser: (value: boolean) => void, setElapsedTime: (value: string) => void): void;
|
|
4
|
+
/** Stop the currently started audio recording & sends it
|
|
5
|
+
*/
|
|
6
|
+
export declare function stopAudioRecording(addRecordingToPreviews: null | ((blob: Blob) => void)): void;
|
|
7
|
+
/** Cancel the currently started audio recording */
|
|
8
|
+
export declare function cancelAudioRecording(): void;
|
|
9
|
+
type AudioRecorder = {
|
|
10
|
+
audioBlobs: Blob[];
|
|
11
|
+
mediaRecorder: MediaRecorder | null;
|
|
12
|
+
streamBeingCaptured: MediaStream | null;
|
|
13
|
+
start: () => Promise<void>;
|
|
14
|
+
stop: () => Promise<unknown>;
|
|
15
|
+
cancel: () => void;
|
|
16
|
+
stopStream: () => void;
|
|
17
|
+
resetRecordingProperties: () => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const audioRecorder: AudioRecorder;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=audioRecording.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audioRecording.d.ts","sourceRoot":"","sources":["../../src/utils/audioRecording.ts"],"names":[],"mappings":"AAmBA,wBAAgB,cAAc,WAE7B;AAED,gCAAgC;AAChC,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAC1C,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,EAC9C,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,QAkExC;AACD;GACG;AACH,wBAAgB,kBAAkB,CAAC,sBAAsB,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,QAuBvF;AAED,mDAAmD;AACnD,wBAAgB,oBAAoB,SAMnC;AA8FD,KAAK,aAAa,GAAG;IACnB,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,mBAAmB,EAAE,WAAW,GAAG,IAAI,CAAC;IACxC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,wBAAwB,EAAE,MAAM,IAAI,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,aA6G3B,CAAC"}
|
|
@@ -0,0 +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 {};
|
|
22
|
+
//# sourceMappingURL=chatInputHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatInputHistory.d.ts","sourceRoot":"","sources":["../../src/utils/chatInputHistory.ts"],"names":[],"mappings":"AACA,KAAK,kBAAkB,GAAG;IACxB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACpC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C,CAAC;AAEF,qBAAa,gBAAgB;IAOzB,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,OAAO;IAPjB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,YAAY,CAAM;IAC1B,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,UAAU,CAAS;gBAGjB,aAAa,GAAE,MAAM,MAAiB,EACtC,OAAO,GAAE,kBAAiC;IAMpD,UAAU,IAAI,MAAM,EAAE;IAItB,eAAe,IAAI,MAAM;IAIzB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAejC,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAY9C,YAAY,IAAI,MAAM;IAWtB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,WAAW;CAWpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* Clears authentication data from localStorage
|
|
7
|
+
* Used when 401 errors are detected or user logs out
|
|
8
|
+
*/
|
|
9
|
+
export declare const sendRequest: <ResponseData>(params: string | {
|
|
10
|
+
url: string;
|
|
11
|
+
method: string;
|
|
12
|
+
body?: Record<string, unknown> | FormData | undefined;
|
|
13
|
+
type?: string | undefined;
|
|
14
|
+
headers?: Record<string, any> | undefined;
|
|
15
|
+
formData?: FormData | undefined;
|
|
16
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
17
|
+
}) => Promise<{
|
|
18
|
+
data?: ResponseData | undefined;
|
|
19
|
+
error?: Error | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const setLocalStorageChatflow: (chatflowid: string, chatId: string, saveObj?: Record<string, any>) => void;
|
|
22
|
+
export declare const getLocalStorageChatflow: (chatflowid: string) => any;
|
|
23
|
+
export declare const removeLocalStorageChatHistory: (chatflowid: string) => void;
|
|
24
|
+
export declare const getBubbleButtonSize: (size: 'small' | 'medium' | 'large' | number | undefined) => number;
|
|
25
|
+
export declare const setCookie: (cname: string, cvalue: string, exdays: number) => void;
|
|
26
|
+
export declare const getCookie: (cname: string) => string;
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EAuD1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMobileSignal.d.ts","sourceRoot":"","sources":["../../src/utils/isMobileSignal.ts"],"names":[],"mappings":"AAEA,eAAO,MAAO,QAAQ,oDAAE,WAAW,gDAA2B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Upload audio blob to server and get transcription
|
|
3
|
+
* @param blob - Audio blob to transcribe
|
|
4
|
+
* @param transcriptApiEndpoint - API endpoint for transcription service
|
|
5
|
+
* @returns Promise<string> - Transcribed text
|
|
6
|
+
*/
|
|
7
|
+
export declare const uploadAndTranscriptAudio: (blob: Blob, transcriptApiEndpoint?: string) => Promise<string>;
|
|
8
|
+
//# sourceMappingURL=transcriptApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAgB,IAAI,0BAA0B,MAAM,KAAG,QAAQ,MAAM,CAoCzG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ultimateJsonParser.d.ts","sourceRoot":"","sources":["../../src/utils/ultimateJsonParser.ts"],"names":[],"mappings":"AAsBA,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAgDzD"}
|
package/dist/web.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const chatbot: {
|
|
2
|
+
initFull: (props: {
|
|
3
|
+
chatflowid: 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
|
+
chatwootUrl?: string | undefined;
|
|
10
|
+
roomIds?: Record<string, string> | undefined;
|
|
11
|
+
isUseFAQ?: boolean | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
}) => void;
|
|
15
|
+
init: (props: {
|
|
16
|
+
chatflowid: string;
|
|
17
|
+
apiHost?: string | undefined;
|
|
18
|
+
onRequest?: ((request: RequestInit) => Promise<void>) | undefined;
|
|
19
|
+
chatflowConfig?: Record<string, unknown> | undefined;
|
|
20
|
+
observersConfig?: import("./components/Bot").observersConfigType | undefined;
|
|
21
|
+
theme?: import("./features/bubble/types").BubbleTheme | undefined;
|
|
22
|
+
chatwootUrl?: string | undefined;
|
|
23
|
+
roomIds?: Record<string, string> | undefined;
|
|
24
|
+
isUseFAQ?: boolean | undefined;
|
|
25
|
+
}) => void;
|
|
26
|
+
destroy: () => void;
|
|
27
|
+
};
|
|
28
|
+
export default chatbot;
|
|
29
|
+
//# sourceMappingURL=web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiB,CAAC;AAI/B,eAAe,OAAO,CAAC"}
|