bibot 1.0.42 → 1.0.50
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/component/aiFollowUps.d.ts +4 -0
- package/dist/component/bibot.d.ts +1 -1
- package/dist/component/predefinedQuestions.d.ts +4 -0
- package/dist/config/appStateEnums.d.ts +4 -1
- package/dist/hooks/useBiBotChatBot.d.ts +7 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +231 -189
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +232 -190
- package/dist/index.modern.js.map +1 -1
- package/dist/services/plugin-api.d.ts +4 -4
- package/dist/types/coreInterfaces.d.ts +29 -15
- package/package.json +1 -1
@@ -1,11 +1,11 @@
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
2
|
-
import {
|
3
|
-
declare function recordPredefinedQ(pluginAxiosInstance: AxiosInstance, data: recordPredefinedQProps): Promise<
|
4
|
-
declare function askBiBot(pluginAxiosInstance: AxiosInstance, data: Q_DATA_TYPE): Promise<
|
2
|
+
import { BIBOT_INFERENCE_TYPE, PredefinedQuestionsType, Q_DATA_TYPE, recordPredefinedQProps, RemoteChatBubbleConfigProps } from '../types/coreInterfaces';
|
3
|
+
declare function recordPredefinedQ(pluginAxiosInstance: AxiosInstance, data: recordPredefinedQProps): Promise<BIBOT_INFERENCE_TYPE>;
|
4
|
+
declare function askBiBot(pluginAxiosInstance: AxiosInstance, data: Q_DATA_TYPE): Promise<BIBOT_INFERENCE_TYPE>;
|
5
5
|
declare function getRemoteClientChatBubbleConfig(pluginAxiosInstance: AxiosInstance, params: {
|
6
6
|
client_id: string;
|
7
7
|
}): Promise<RemoteChatBubbleConfigProps>;
|
8
8
|
declare function getRemoteClientChatPredefinedQuestions(pluginAxiosInstance: AxiosInstance, params: {
|
9
9
|
client_id: string;
|
10
|
-
}): Promise<
|
10
|
+
}): Promise<PredefinedQuestionsType[]>;
|
11
11
|
export { askBiBot, getRemoteClientChatBubbleConfig, getRemoteClientChatPredefinedQuestions, recordPredefinedQ };
|
@@ -10,32 +10,34 @@ interface Q_DATA_TYPE {
|
|
10
10
|
session_id: string;
|
11
11
|
chat_id: string;
|
12
12
|
tries?: number;
|
13
|
+
chat_history?: MESSAGES;
|
13
14
|
}
|
14
|
-
interface
|
15
|
-
|
16
|
-
|
17
|
-
title: string;
|
18
|
-
userImage: string;
|
15
|
+
interface BIBOT_INFERENCE_TYPE {
|
16
|
+
message: string;
|
17
|
+
aiFollowUp?: PredefinedQuestionsType[];
|
19
18
|
}
|
20
19
|
interface BiBotProps {
|
21
20
|
clientId: string;
|
22
21
|
client_session_id?: string;
|
23
22
|
redirect_notice?: boolean;
|
24
23
|
test?: boolean;
|
24
|
+
jwt?: string;
|
25
25
|
}
|
26
26
|
interface AppStates {
|
27
|
-
|
28
|
-
|
29
|
-
chatIsOpen: boolean;
|
27
|
+
aiFollowUpQs: PredefinedQuestionsType[] | [];
|
28
|
+
pQuestions: PredefinedQuestionsType[] | [];
|
30
29
|
sessionId: string;
|
30
|
+
chatBubbleConfig: ChatBubbleConfigProps;
|
31
31
|
}
|
32
32
|
interface AppContextProps {
|
33
33
|
state: AppStates;
|
34
34
|
dispatch: React.Dispatch<any>;
|
35
35
|
}
|
36
36
|
interface AppAction {
|
37
|
+
aiFollowUp: PredefinedQuestionsType[] | [];
|
38
|
+
pQuestions: PredefinedQuestionsType[] | [];
|
37
39
|
type: appStateEnums;
|
38
|
-
|
40
|
+
chatBubbleConfig: ChatBubbleConfigProps;
|
39
41
|
}
|
40
42
|
declare type NotificationType = 'info' | 'warning' | 'success' | 'error';
|
41
43
|
interface NOTIFICATION_DT {
|
@@ -67,27 +69,34 @@ interface docInfoType {
|
|
67
69
|
size: number;
|
68
70
|
type: string;
|
69
71
|
}
|
72
|
+
interface RemoteChatBubbleConfigProps {
|
73
|
+
bgColor?: string;
|
74
|
+
color?: string;
|
75
|
+
title?: string;
|
76
|
+
logo_url?: string;
|
77
|
+
knownUser?: string;
|
78
|
+
}
|
70
79
|
interface ChatBubbleConfigProps {
|
71
80
|
bgColor?: string;
|
72
81
|
color?: string;
|
73
82
|
title?: string;
|
74
83
|
logo_url?: string;
|
84
|
+
knownUser?: string;
|
75
85
|
}
|
76
86
|
interface recordPredefinedQProps {
|
77
87
|
question: string;
|
78
88
|
client_id: string;
|
79
89
|
q_n_a_id: string;
|
80
90
|
}
|
81
|
-
interface
|
91
|
+
interface PredefinedQuestionsType {
|
82
92
|
question: string;
|
83
93
|
answer: string;
|
84
94
|
q_n_a_id: string;
|
85
95
|
}
|
86
96
|
interface PredefinedQuestionsProps {
|
87
|
-
onSelect: (question:
|
88
|
-
questions:
|
89
|
-
|
90
|
-
test?: boolean;
|
97
|
+
onSelect: (question: PredefinedQuestionsType) => void;
|
98
|
+
questions: PredefinedQuestionsType[];
|
99
|
+
chatBubbleConfig?: ChatBubbleConfigProps;
|
91
100
|
}
|
92
101
|
interface AvatarProps {
|
93
102
|
source: string | undefined;
|
@@ -99,4 +108,9 @@ interface AvatarProps {
|
|
99
108
|
interface iconColor {
|
100
109
|
color: string | undefined;
|
101
110
|
}
|
102
|
-
|
111
|
+
interface MESSAGES extends Array<{
|
112
|
+
sender: 'user' | 'bot';
|
113
|
+
text: string;
|
114
|
+
}> {
|
115
|
+
}
|
116
|
+
export type { AppStates, AppAction, AppContextProps, NOTIFICATION_DT, NotificationType, Plan, SUBSCRIPTION, AppconfigType, docInfoType, BiBotProps, PredefinedQuestionsProps, Q_DATA_TYPE, RemoteChatBubbleConfigProps, recordPredefinedQProps, AvatarProps, PredefinedQuestionsType, iconColor, AppProps, ChatBubbleConfigProps, MESSAGES, BIBOT_INFERENCE_TYPE };
|