@cimulate/copilot-widget 1.46.1 → 1.46.2
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.
- package/CHANGELOG.md +5 -1
- package/dist/cimulate-copilot-widget.d.ts +26 -0
- package/dist/cimulate-copilot-widget.es.js +8424 -8151
- package/dist/cimulate-copilot-widget.umd.js +33 -33
- package/dist/copilot.es.js +8423 -8150
- package/dist/copilot.umd.js +33 -33
- package/dist/messaging.d.ts +31 -1
- package/dist/messaging.es.js +9467 -9142
- package/dist/messaging.umd.js +35 -35
- package/package.json +4 -4
package/dist/messaging.d.ts
CHANGED
|
@@ -681,6 +681,12 @@ export declare interface MessagingModeConfig {
|
|
|
681
681
|
scrt2Url: string;
|
|
682
682
|
orgId: string;
|
|
683
683
|
esDeveloperName: string;
|
|
684
|
+
/**
|
|
685
|
+
* Keys to seed the next conversation injection to resume an existing session.
|
|
686
|
+
*/
|
|
687
|
+
conversationId?: string;
|
|
688
|
+
continuationToken?: string;
|
|
689
|
+
lastEventId?: string;
|
|
684
690
|
routingAttributes?: Record<string, string>;
|
|
685
691
|
/**
|
|
686
692
|
* Invoked whenever a finalized Agentforce message carries a product result
|
|
@@ -695,6 +701,12 @@ export declare interface MessagingModeConfig {
|
|
|
695
701
|
* or times out.
|
|
696
702
|
*/
|
|
697
703
|
onEndConversation?: (conversationId: string | null) => Promise<void> | void;
|
|
704
|
+
/**
|
|
705
|
+
* Invoked when the stored guest session changes (`created`, `resumed`,
|
|
706
|
+
* `refreshed`, `ended`, or `reset`). Persist or drop the snapshot so a
|
|
707
|
+
* destroyed WebView can resume the same conversation on the next inject.
|
|
708
|
+
*/
|
|
709
|
+
onSessionUpdate?: (update: MessagingSessionUpdate) => void;
|
|
698
710
|
/**
|
|
699
711
|
* Capabilities version for the SCRT2 token request. Required (>= "63", i.e.
|
|
700
712
|
* release 254) for action progress indicators (`CONVERSATION_PROGRESS_INDICATOR`)
|
|
@@ -734,13 +746,16 @@ export declare interface MessagingModeConfig {
|
|
|
734
746
|
progressStepsLimit?: number;
|
|
735
747
|
}
|
|
736
748
|
|
|
737
|
-
export declare const MessagingProvider: ({ scrt2Url, orgId, esDeveloperName, routingAttributes, capabilitiesVersion, enablePageContext, enableLogging, onConnect, onMessage, onError, onProductResult, onEndConversation, children, }: MessagingProviderProps) => JSX_2.Element;
|
|
749
|
+
export declare const MessagingProvider: ({ scrt2Url, orgId, esDeveloperName, routingAttributes, conversationId: configConversationId, continuationToken: configContinuationToken, lastEventId: configLastEventId, capabilitiesVersion, enablePageContext, enableLogging, onConnect, onMessage, onError, onProductResult, onEndConversation, onSessionUpdate, children, }: MessagingProviderProps) => JSX_2.Element;
|
|
738
750
|
|
|
739
751
|
declare interface MessagingProviderProps {
|
|
740
752
|
scrt2Url: string;
|
|
741
753
|
orgId: string;
|
|
742
754
|
esDeveloperName: string;
|
|
743
755
|
routingAttributes?: Record<string, string>;
|
|
756
|
+
conversationId?: string;
|
|
757
|
+
continuationToken?: string;
|
|
758
|
+
lastEventId?: string;
|
|
744
759
|
/** Capabilities version for the SCRT2 token request (required for progress indicators) */
|
|
745
760
|
capabilitiesVersion?: string;
|
|
746
761
|
enablePageContext?: boolean;
|
|
@@ -750,6 +765,7 @@ declare interface MessagingProviderProps {
|
|
|
750
765
|
onError?: (error: string) => void;
|
|
751
766
|
onProductResult?: (detail: ProductResultDetail) => void;
|
|
752
767
|
onEndConversation?: (conversationId: string | null) => Promise<void> | void;
|
|
768
|
+
onSessionUpdate?: (update: MessagingSessionUpdate) => void;
|
|
753
769
|
children: ReactNode;
|
|
754
770
|
}
|
|
755
771
|
|
|
@@ -760,6 +776,20 @@ declare type MessagingScrollSnapshot = {
|
|
|
760
776
|
anchorMessageId: string | null;
|
|
761
777
|
};
|
|
762
778
|
|
|
779
|
+
export declare type MessagingSessionReason = "created" | "resumed" | "refreshed" | "ended" | "reset";
|
|
780
|
+
|
|
781
|
+
export declare interface MessagingSessionSnapshot {
|
|
782
|
+
conversationId: string;
|
|
783
|
+
continuationToken: string;
|
|
784
|
+
lastEventId: string;
|
|
785
|
+
storedAt: number;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export declare interface MessagingSessionUpdate {
|
|
789
|
+
reason: MessagingSessionReason;
|
|
790
|
+
snapshot: MessagingSessionSnapshot | null;
|
|
791
|
+
}
|
|
792
|
+
|
|
763
793
|
/**
|
|
764
794
|
* Full state shape for the messaging reducer.
|
|
765
795
|
*/
|