@cimulate/copilot-widget 1.28.0 → 1.29.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.
@@ -359,6 +359,11 @@ declare interface MessagingModeConfig {
359
359
  orgId: string;
360
360
  esDeveloperName: string;
361
361
  routingAttributes?: Record<string, string>;
362
+ /**
363
+ * Invoked whenever a finalized Agentforce message carries a product result
364
+ * block (product search or product-details lookup).
365
+ */
366
+ onProductResult?: (detail: ProductResultDetail) => void;
362
367
  /**
363
368
  * Capabilities version for the SCRT2 token request. Required (>= "63", i.e.
364
369
  * release 254) for action progress indicators (`CONVERSATION_PROGRESS_INDICATOR`)
@@ -396,6 +401,12 @@ declare interface MessagingModeConfig {
396
401
  */
397
402
  declare type OverrideTagName = string;
398
403
 
404
+ declare interface ProductResultDetail {
405
+ agentSessionId: string;
406
+ kind: "search" | "detail";
407
+ productIds: string[];
408
+ }
409
+
399
410
  declare type PromptsDisplay = "input" | "buttons" | "both";
400
411
 
401
412
  declare type PromptsExtensionConfig = Omit<PromptsExtensionState, "isInitialized" | "activePromptsId" | "userPrompt" | "promptsMessage" | "responseMessage" | "isResponseLoading" | "placeholder" | "askElseButtonLabel" | "entryType" | "params" | "promptsDisplay" | "staticQuestions" | "staticQuestionsStrategy" | "disableAskElseButton"> & Partial<Pick<PromptsExtensionState, "placeholder" | "askElseButtonLabel" | "entryType" | "params" | "promptsDisplay" | "staticQuestions" | "staticQuestionsStrategy" | "disableAskElseButton">>;
@@ -452,6 +452,11 @@ export declare interface MessagingModeConfig {
452
452
  orgId: string;
453
453
  esDeveloperName: string;
454
454
  routingAttributes?: Record<string, string>;
455
+ /**
456
+ * Invoked whenever a finalized Agentforce message carries a product result
457
+ * block (product search or product-details lookup).
458
+ */
459
+ onProductResult?: (detail: ProductResultDetail) => void;
455
460
  /**
456
461
  * Capabilities version for the SCRT2 token request. Required (>= "63", i.e.
457
462
  * release 254) for action progress indicators (`CONVERSATION_PROGRESS_INDICATOR`)
@@ -476,7 +481,7 @@ export declare interface MessagingModeConfig {
476
481
  progressStepsLimit?: number;
477
482
  }
478
483
 
479
- export declare const MessagingProvider: ({ scrt2Url, orgId, esDeveloperName, routingAttributes, capabilitiesVersion, enableLogging, onConnect, onMessage, onError, children, }: MessagingProviderProps) => JSX_2.Element;
484
+ export declare const MessagingProvider: ({ scrt2Url, orgId, esDeveloperName, routingAttributes, capabilitiesVersion, enableLogging, onConnect, onMessage, onError, onProductResult, children, }: MessagingProviderProps) => JSX_2.Element;
480
485
 
481
486
  declare interface MessagingProviderProps {
482
487
  scrt2Url: string;
@@ -489,6 +494,7 @@ declare interface MessagingProviderProps {
489
494
  onConnect?: () => void;
490
495
  onMessage?: (message: MessagingMessage) => void;
491
496
  onError?: (error: string) => void;
497
+ onProductResult?: (detail: ProductResultDetail) => void;
492
498
  children: ReactNode;
493
499
  }
494
500
 
@@ -747,6 +753,12 @@ declare type ProductComparisonResponse = {
747
753
  };
748
754
  };
749
755
 
756
+ declare interface ProductResultDetail {
757
+ agentSessionId: string;
758
+ kind: "search" | "detail";
759
+ productIds: string[];
760
+ }
761
+
750
762
  declare interface ProductTileData {
751
763
  id?: string;
752
764
  name?: string;