@cimulate/copilot-widget 0.8.0 → 0.9.0
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.
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import { ConnectAck } from '@cimulate/copilot-sdk';
|
|
2
|
+
import { CopilotError } from '@cimulate/copilot-sdk';
|
|
3
|
+
import { CopilotEvent } from '@cimulate/copilot-sdk';
|
|
4
|
+
import { CopilotSearch } from '@cimulate/copilot-sdk';
|
|
5
|
+
import { CopilotSearchSuggestion } from '@cimulate/copilot-sdk';
|
|
2
6
|
import { DialogPosition } from './models';
|
|
7
|
+
import { DisplayProducts } from '@cimulate/copilot-sdk';
|
|
8
|
+
import { FacetedNavigationSuggestion } from '@cimulate/copilot-sdk';
|
|
3
9
|
import { FacetFilters } from './models';
|
|
10
|
+
import { FollowUp } from '@cimulate/copilot-sdk';
|
|
11
|
+
import { Inquiry } from '@cimulate/copilot-sdk';
|
|
4
12
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
13
|
+
import { PartialInquiry } from '@cimulate/copilot-sdk';
|
|
14
|
+
import { Progress } from '@cimulate/copilot-sdk';
|
|
5
15
|
import { ReactNode } from 'react';
|
|
16
|
+
import { RefinedSearch } from '@cimulate/copilot-sdk';
|
|
17
|
+
import { SearchParams } from '@cimulate/copilot-sdk';
|
|
6
18
|
import { SearchPayload as SearchPayload_2 } from './models';
|
|
7
19
|
import { SocketSdkContextType } from './SocketSdkContext';
|
|
8
20
|
|
|
21
|
+
declare type AllCopilotEvents = {
|
|
22
|
+
isUserAction?: boolean;
|
|
23
|
+
isInitialSearch?: boolean;
|
|
24
|
+
message: string;
|
|
25
|
+
request?: CopilotSearch;
|
|
26
|
+
searchParams?: SearchParams;
|
|
27
|
+
suggestions?: Suggestion[];
|
|
28
|
+
toolName?: string;
|
|
29
|
+
thought?: string;
|
|
30
|
+
} & (CopilotEvent | Inquiry | DisplayProducts | FollowUp | PartialInquiry | RefinedSearch | Progress | CopilotError);
|
|
31
|
+
|
|
9
32
|
declare type CimCopilotSdkConfig = {
|
|
10
33
|
apiKey?: string;
|
|
11
34
|
apiToken?: string;
|
|
@@ -47,6 +70,8 @@ export declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
|
|
|
47
70
|
headerText?: string;
|
|
48
71
|
theme?: ThemeConfig;
|
|
49
72
|
onConnect?: (event: ConnectAck) => void;
|
|
73
|
+
onCopilotEvent?: (event: AllCopilotEvents) => void;
|
|
74
|
+
onRefinedSearch?: (event: AllCopilotEvents) => void;
|
|
50
75
|
}
|
|
51
76
|
|
|
52
77
|
export declare const eventHandlers: {
|
|
@@ -106,6 +131,8 @@ declare interface SearchState {
|
|
|
106
131
|
pricebooks?: string[] | null;
|
|
107
132
|
}
|
|
108
133
|
|
|
134
|
+
declare type Suggestion = CopilotSearchSuggestion | FacetedNavigationSuggestion;
|
|
135
|
+
|
|
109
136
|
declare interface ThemeConfig {
|
|
110
137
|
primaryColor?: string;
|
|
111
138
|
secondaryColor?: string;
|
|
@@ -128,7 +155,7 @@ export declare const useCopilot: () => SocketSdkContextType;
|
|
|
128
155
|
* CopilotDispatch (redux dispatch) >
|
|
129
156
|
* SocketSdk (copilot-sdk)
|
|
130
157
|
*/
|
|
131
|
-
export declare const WidgetProvider: ({ apiKey, apiToken, baseUrl, logoUrl, headerText, theme, globalClassName, isDevelopment, onConnect, children, }: CopilotWidgetProps & {
|
|
158
|
+
export declare const WidgetProvider: ({ apiKey, apiToken, baseUrl, logoUrl, headerText, theme, globalClassName, isDevelopment, onConnect, onCopilotEvent, onRefinedSearch, children, }: CopilotWidgetProps & {
|
|
132
159
|
children: ReactNode;
|
|
133
160
|
}) => JSX_2.Element;
|
|
134
161
|
|