bibot 1.0.41 → 1.0.42

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,28 @@
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
+ }
14
+ interface RemoteChatBubbleConfigProps {
15
+ bgColor: string;
16
+ chatColor: string;
17
+ title: string;
18
+ userImage: string;
19
+ }
20
+ interface BiBotProps {
21
+ clientId: string;
22
+ client_session_id?: string;
23
+ redirect_notice?: boolean;
24
+ test?: boolean;
25
+ }
4
26
  interface AppStates {
5
27
  hideImportantMessages?: boolean;
6
28
  collapsed?: boolean;
@@ -13,9 +35,6 @@ interface AppContextProps {
13
35
  }
14
36
  interface AppAction {
15
37
  type: appStateEnums;
16
- theme: MenuTheme;
17
- hideImportantMessages: boolean;
18
- collapsed: boolean;
19
38
  chatIsOpen: boolean;
20
39
  }
21
40
  declare type NotificationType = 'info' | 'warning' | 'success' | 'error';
@@ -48,4 +67,36 @@ interface docInfoType {
48
67
  size: number;
49
68
  type: string;
50
69
  }
51
- export type { AppStates, AppAction, AppContextProps, NOTIFICATION_DT, NotificationType, Plan, SUBSCRIPTION, AppconfigType, docInfoType, };
70
+ interface ChatBubbleConfigProps {
71
+ bgColor?: string;
72
+ color?: string;
73
+ title?: string;
74
+ logo_url?: string;
75
+ }
76
+ interface recordPredefinedQProps {
77
+ question: string;
78
+ client_id: string;
79
+ q_n_a_id: string;
80
+ }
81
+ interface predefinedQuestionsType {
82
+ question: string;
83
+ answer: string;
84
+ q_n_a_id: string;
85
+ }
86
+ interface PredefinedQuestionsProps {
87
+ onSelect: (question: predefinedQuestionsType) => void;
88
+ questions: predefinedQuestionsType[];
89
+ clientId: string;
90
+ test?: boolean;
91
+ }
92
+ interface AvatarProps {
93
+ source: string | undefined;
94
+ height: string;
95
+ width: string;
96
+ indicator?: string;
97
+ borderColor: string | undefined;
98
+ }
99
+ interface iconColor {
100
+ color: string | undefined;
101
+ }
102
+ export type { AppStates, AppAction, AppContextProps, NOTIFICATION_DT, NotificationType, Plan, SUBSCRIPTION, AppconfigType, docInfoType, BiBotProps, PredefinedQuestionsProps, Q_DATA_TYPE, RemoteChatBubbleConfigProps, recordPredefinedQProps, AvatarProps, predefinedQuestionsType, iconColor, AppProps, ChatBubbleConfigProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bibot",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
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;