bibot 1.0.45 → 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 +6 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +229 -188
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +230 -189
- package/dist/index.modern.js.map +1 -1
- package/dist/services/plugin-api.d.ts +4 -4
- package/dist/types/coreInterfaces.d.ts +23 -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 };
|
@@ -12,31 +12,32 @@ interface Q_DATA_TYPE {
|
|
12
12
|
tries?: number;
|
13
13
|
chat_history?: MESSAGES;
|
14
14
|
}
|
15
|
-
interface
|
16
|
-
|
17
|
-
|
18
|
-
title: string;
|
19
|
-
userImage: string;
|
15
|
+
interface BIBOT_INFERENCE_TYPE {
|
16
|
+
message: string;
|
17
|
+
aiFollowUp?: PredefinedQuestionsType[];
|
20
18
|
}
|
21
19
|
interface BiBotProps {
|
22
20
|
clientId: string;
|
23
21
|
client_session_id?: string;
|
24
22
|
redirect_notice?: boolean;
|
25
23
|
test?: boolean;
|
24
|
+
jwt?: string;
|
26
25
|
}
|
27
26
|
interface AppStates {
|
28
|
-
|
29
|
-
|
30
|
-
chatIsOpen: boolean;
|
27
|
+
aiFollowUpQs: PredefinedQuestionsType[] | [];
|
28
|
+
pQuestions: PredefinedQuestionsType[] | [];
|
31
29
|
sessionId: string;
|
30
|
+
chatBubbleConfig: ChatBubbleConfigProps;
|
32
31
|
}
|
33
32
|
interface AppContextProps {
|
34
33
|
state: AppStates;
|
35
34
|
dispatch: React.Dispatch<any>;
|
36
35
|
}
|
37
36
|
interface AppAction {
|
37
|
+
aiFollowUp: PredefinedQuestionsType[] | [];
|
38
|
+
pQuestions: PredefinedQuestionsType[] | [];
|
38
39
|
type: appStateEnums;
|
39
|
-
|
40
|
+
chatBubbleConfig: ChatBubbleConfigProps;
|
40
41
|
}
|
41
42
|
declare type NotificationType = 'info' | 'warning' | 'success' | 'error';
|
42
43
|
interface NOTIFICATION_DT {
|
@@ -68,27 +69,34 @@ interface docInfoType {
|
|
68
69
|
size: number;
|
69
70
|
type: string;
|
70
71
|
}
|
72
|
+
interface RemoteChatBubbleConfigProps {
|
73
|
+
bgColor?: string;
|
74
|
+
color?: string;
|
75
|
+
title?: string;
|
76
|
+
logo_url?: string;
|
77
|
+
knownUser?: string;
|
78
|
+
}
|
71
79
|
interface ChatBubbleConfigProps {
|
72
80
|
bgColor?: string;
|
73
81
|
color?: string;
|
74
82
|
title?: string;
|
75
83
|
logo_url?: string;
|
84
|
+
knownUser?: string;
|
76
85
|
}
|
77
86
|
interface recordPredefinedQProps {
|
78
87
|
question: string;
|
79
88
|
client_id: string;
|
80
89
|
q_n_a_id: string;
|
81
90
|
}
|
82
|
-
interface
|
91
|
+
interface PredefinedQuestionsType {
|
83
92
|
question: string;
|
84
93
|
answer: string;
|
85
94
|
q_n_a_id: string;
|
86
95
|
}
|
87
96
|
interface PredefinedQuestionsProps {
|
88
|
-
onSelect: (question:
|
89
|
-
questions:
|
90
|
-
|
91
|
-
test?: boolean;
|
97
|
+
onSelect: (question: PredefinedQuestionsType) => void;
|
98
|
+
questions: PredefinedQuestionsType[];
|
99
|
+
chatBubbleConfig?: ChatBubbleConfigProps;
|
92
100
|
}
|
93
101
|
interface AvatarProps {
|
94
102
|
source: string | undefined;
|
@@ -105,4 +113,4 @@ interface MESSAGES extends Array<{
|
|
105
113
|
text: string;
|
106
114
|
}> {
|
107
115
|
}
|
108
|
-
export type { AppStates, AppAction, AppContextProps, NOTIFICATION_DT, NotificationType, Plan, SUBSCRIPTION, AppconfigType, docInfoType, BiBotProps, PredefinedQuestionsProps, Q_DATA_TYPE, RemoteChatBubbleConfigProps, recordPredefinedQProps, AvatarProps,
|
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 };
|