bibot 1.0.45 → 1.0.50

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,11 @@
1
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>;
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<predefinedQuestionsType[]>;
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 RemoteChatBubbleConfigProps {
16
- bgColor: string;
17
- chatColor: string;
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
- hideImportantMessages?: boolean;
29
- collapsed?: boolean;
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
- chatIsOpen: boolean;
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 predefinedQuestionsType {
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: predefinedQuestionsType) => void;
89
- questions: predefinedQuestionsType[];
90
- clientId: string;
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, predefinedQuestionsType, iconColor, AppProps, ChatBubbleConfigProps, MESSAGES };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bibot",
3
- "version": "1.0.45",
3
+ "version": "1.0.50",
4
4
  "description": "Made with create-react-library",
5
5
  "author": "chrisdjin",
6
6
  "license": "ISC",