bibot 1.0.41 → 1.0.45
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/dist/component/Avatar.d.ts +1 -8
- package/dist/component/Icons.d.ts +1 -3
- package/dist/component/bibot.d.ts +2 -6
- package/dist/config/endpointEnums.d.ts +1 -1
- package/dist/context/AppContext.d.ts +1 -5
- package/dist/hooks/useBiBotChatBot.d.ts +3 -17
- package/dist/hooks/usePluginFactory.d.ts +1 -1
- package/dist/index.d.ts +2 -7
- package/dist/index.js +63 -48
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +63 -48
- package/dist/index.modern.js.map +1 -1
- package/dist/services/plugin-api.d.ts +6 -28
- package/dist/types/coreInterfaces.d.ts +63 -6
- package/package.json +1 -1
- package/dist/component/SendMessageIcon.d.ts +0 -2
@@ -1,33 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
chat_id: string;
|
7
|
-
tries?: number;
|
8
|
-
}
|
9
|
-
interface RemoteChatBubbleConfigProps {
|
10
|
-
bgColor: string;
|
11
|
-
chatColor: string;
|
12
|
-
title: string;
|
13
|
-
userImage: string;
|
14
|
-
}
|
15
|
-
interface recordPredefinedQProps {
|
16
|
-
question: string;
|
17
|
-
client_id: string;
|
18
|
-
q_n_a_id: string;
|
19
|
-
}
|
20
|
-
declare function recordPredefinedQ(data: recordPredefinedQProps): Promise<string>;
|
21
|
-
declare function askBiBot(data: Q_DATA_TYPE): Promise<string>;
|
22
|
-
declare function getRemoteClientChatBubbleConfig(params: {
|
1
|
+
import { AxiosInstance } from 'axios';
|
2
|
+
import { predefinedQuestionsType, Q_DATA_TYPE, recordPredefinedQProps, RemoteChatBubbleConfigProps } from '../types/coreInterfaces';
|
3
|
+
declare function recordPredefinedQ(pluginAxiosInstance: AxiosInstance, data: recordPredefinedQProps): Promise<string>;
|
4
|
+
declare function askBiBot(pluginAxiosInstance: AxiosInstance, data: Q_DATA_TYPE): Promise<string>;
|
5
|
+
declare function getRemoteClientChatBubbleConfig(pluginAxiosInstance: AxiosInstance, params: {
|
23
6
|
client_id: string;
|
24
7
|
}): Promise<RemoteChatBubbleConfigProps>;
|
25
|
-
|
26
|
-
question: string;
|
27
|
-
answer: string;
|
28
|
-
q_n_a_id: string;
|
29
|
-
}
|
30
|
-
declare function getRemoteClientChatPredefinedQuestions(params: {
|
8
|
+
declare function getRemoteClientChatPredefinedQuestions(pluginAxiosInstance: AxiosInstance, params: {
|
31
9
|
client_id: string;
|
32
10
|
}): Promise<predefinedQuestionsType[]>;
|
33
11
|
export { askBiBot, getRemoteClientChatBubbleConfig, getRemoteClientChatPredefinedQuestions, recordPredefinedQ };
|
@@ -1,6 +1,29 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { MenuTheme } from 'antd/es/menu';
|
3
1
|
import type { appStateEnums } from '../config/appStateEnums';
|
2
|
+
import { ReactNode } from 'react';
|
3
|
+
interface AppProps {
|
4
|
+
children: ReactNode;
|
5
|
+
}
|
6
|
+
interface Q_DATA_TYPE {
|
7
|
+
client_id: string;
|
8
|
+
q: string;
|
9
|
+
endSession?: boolean;
|
10
|
+
session_id: string;
|
11
|
+
chat_id: string;
|
12
|
+
tries?: number;
|
13
|
+
chat_history?: MESSAGES;
|
14
|
+
}
|
15
|
+
interface RemoteChatBubbleConfigProps {
|
16
|
+
bgColor: string;
|
17
|
+
chatColor: string;
|
18
|
+
title: string;
|
19
|
+
userImage: string;
|
20
|
+
}
|
21
|
+
interface BiBotProps {
|
22
|
+
clientId: string;
|
23
|
+
client_session_id?: string;
|
24
|
+
redirect_notice?: boolean;
|
25
|
+
test?: boolean;
|
26
|
+
}
|
4
27
|
interface AppStates {
|
5
28
|
hideImportantMessages?: boolean;
|
6
29
|
collapsed?: boolean;
|
@@ -13,9 +36,6 @@ interface AppContextProps {
|
|
13
36
|
}
|
14
37
|
interface AppAction {
|
15
38
|
type: appStateEnums;
|
16
|
-
theme: MenuTheme;
|
17
|
-
hideImportantMessages: boolean;
|
18
|
-
collapsed: boolean;
|
19
39
|
chatIsOpen: boolean;
|
20
40
|
}
|
21
41
|
declare type NotificationType = 'info' | 'warning' | 'success' | 'error';
|
@@ -48,4 +68,41 @@ interface docInfoType {
|
|
48
68
|
size: number;
|
49
69
|
type: string;
|
50
70
|
}
|
51
|
-
|
71
|
+
interface ChatBubbleConfigProps {
|
72
|
+
bgColor?: string;
|
73
|
+
color?: string;
|
74
|
+
title?: string;
|
75
|
+
logo_url?: string;
|
76
|
+
}
|
77
|
+
interface recordPredefinedQProps {
|
78
|
+
question: string;
|
79
|
+
client_id: string;
|
80
|
+
q_n_a_id: string;
|
81
|
+
}
|
82
|
+
interface predefinedQuestionsType {
|
83
|
+
question: string;
|
84
|
+
answer: string;
|
85
|
+
q_n_a_id: string;
|
86
|
+
}
|
87
|
+
interface PredefinedQuestionsProps {
|
88
|
+
onSelect: (question: predefinedQuestionsType) => void;
|
89
|
+
questions: predefinedQuestionsType[];
|
90
|
+
clientId: string;
|
91
|
+
test?: boolean;
|
92
|
+
}
|
93
|
+
interface AvatarProps {
|
94
|
+
source: string | undefined;
|
95
|
+
height: string;
|
96
|
+
width: string;
|
97
|
+
indicator?: string;
|
98
|
+
borderColor: string | undefined;
|
99
|
+
}
|
100
|
+
interface iconColor {
|
101
|
+
color: string | undefined;
|
102
|
+
}
|
103
|
+
interface MESSAGES extends Array<{
|
104
|
+
sender: 'user' | 'bot';
|
105
|
+
text: string;
|
106
|
+
}> {
|
107
|
+
}
|
108
|
+
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 };
|
package/package.json
CHANGED