@cimulate/copilot-widget 0.25.0 → 0.27.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.
@@ -33,7 +33,9 @@ declare type AllCopilotEvents = {
33
33
  isUserAction?: boolean;
34
34
  isInitial?: boolean;
35
35
  message: string;
36
- request?: CopilotSearch | CopilotBrowse;
36
+ request?: (CopilotSearch | CopilotBrowse) & {
37
+ label?: string;
38
+ };
37
39
  searchParams?: SearchParams;
38
40
  browseParams?: BrowseParams;
39
41
  suggestions?: Suggestion[];
@@ -65,6 +67,7 @@ declare interface BrowsePayload {
65
67
 
66
68
  declare interface BrowseState extends CommonParams {
67
69
  categoryId: string;
70
+ categoryName?: string;
68
71
  }
69
72
 
70
73
  declare type CimCopilotSdkConfig = {
@@ -131,7 +134,9 @@ export declare const eventHandlers: {
131
134
  search: typeof search;
132
135
  browse: typeof browse;
133
136
  pdp: {
134
- setPdpContext: (context: ProductView) => void;
137
+ setPdpContext: (context: ProductView & {
138
+ productName?: string;
139
+ }) => void;
135
140
  updatePdpProductId: (pid: string) => void;
136
141
  updatePdpLink: (link: string) => void;
137
142
  };
@@ -214,12 +219,14 @@ declare const setBrowseContext: (context: BrowsePayload["browseParams"]) => void
214
219
  */
215
220
  declare const setSearchContext: (context: SearchPayload["searchParams"]) => void;
216
221
 
217
- export declare const state: {
218
- search: SearchState_2;
219
- browse: BrowseState_2;
220
- pdp: ProductView;
222
+ export declare const state: () => Readonly<{
223
+ search: Readonly<SearchState_2>;
224
+ browse: Readonly<BrowseState_2>;
225
+ pdp: Readonly<ProductView & {
226
+ productName?: string;
227
+ }>;
221
228
  isConnected: boolean;
222
- };
229
+ }>;
223
230
 
224
231
  declare type Suggestion = CopilotSearchSuggestion | FacetedNavigationSuggestion | ProductViewSuggestion | CopilotBrowseSuggestion;
225
232