bibot 1.0.41 → 1.0.45

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,33 +1,11 @@
1
- interface Q_DATA_TYPE {
2
- client_id: string;
3
- q: string;
4
- endSession?: boolean;
5
- session_id: string;
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
- export interface predefinedQuestionsType {
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
- export type { AppStates, AppAction, AppContextProps, NOTIFICATION_DT, NotificationType, Plan, SUBSCRIPTION, AppconfigType, docInfoType, };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bibot",
3
- "version": "1.0.41",
3
+ "version": "1.0.45",
4
4
  "description": "Made with create-react-library",
5
5
  "author": "chrisdjin",
6
6
  "license": "ISC",
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export default function SendMessageIcon(): React.JSX.Element;