@cimulate/copilot-widget 1.62.4 → 1.64.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.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/cimulate-copilot-widget.d.ts +11 -1
- package/dist/cimulate-copilot-widget.es.js +5517 -5474
- package/dist/cimulate-copilot-widget.umd.js +28 -28
- package/dist/copilot.es.js +5518 -5475
- package/dist/copilot.umd.js +28 -28
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +93 -3
- package/dist/messaging.es.js +12563 -11436
- package/dist/messaging.umd.js +49 -46
- package/package.json +1 -1
package/dist/messaging.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare const AgentForceWidget: (props: CopilotWidgetProps) => JSX_2.Elem
|
|
|
69
69
|
* UIStateContext >
|
|
70
70
|
* MessagingProvider (Agentforce/SCRT2 SDK)
|
|
71
71
|
*/
|
|
72
|
-
export declare const AgentforceWidgetProvider: ({ mode, apiKey, apiToken, baseUrl, logoUrl, headerText, headerConfig, theme, openLinksInNewTab, onNavigate, globalClassName, isDevelopment, componentType, componentConfig, initialEntry, entryMessage, disclaimerText, disclaimerMarkdown, clientContext, searchPlaceholder, searchButtonLabel, searchConfig, suggestionButtonConfig, messageAlignment, autoScroll, promptsConfig, showProductDescription, resetConversationMessage, conversationHistory, messagingConfig, locale, translations, translationOverrides, overrides, overridesUrl, inlineOverrides, __features, children, }: CopilotWidgetProps & {
|
|
72
|
+
export declare const AgentforceWidgetProvider: ({ mode, apiKey, apiToken, baseUrl, logoUrl, headerText, headerConfig, theme, openLinksInNewTab, onNavigate, globalClassName, isDevelopment, componentType, componentConfig, initialEntry, entryMessage, disclaimerText, disclaimerMarkdown, clientContext, searchPlaceholder, searchButtonLabel, searchConfig, suggestionButtonConfig, messageAlignment, autoScroll, anchorUserMessage, promptsConfig, showProductDescription, resetConversationMessage, conversationHistory, messagingConfig, locale, translations, translationOverrides, overrides, overridesUrl, inlineOverrides, __features, children, }: CopilotWidgetProps & {
|
|
73
73
|
overridesUrl?: string;
|
|
74
74
|
inlineOverrides?: ComponentOverrides;
|
|
75
75
|
children: ReactNode;
|
|
@@ -469,6 +469,10 @@ declare interface CopilotWidgetProps extends CimCopilotSdkConfig {
|
|
|
469
469
|
suggestionButtonConfig?: SuggestionButtonConfig;
|
|
470
470
|
messageAlignment?: MessageAlignment;
|
|
471
471
|
autoScroll?: boolean;
|
|
472
|
+
/**
|
|
473
|
+
* Anchors the latest live shopper message to the top of the transcript. On by default.
|
|
474
|
+
*/
|
|
475
|
+
anchorUserMessage?: boolean;
|
|
472
476
|
showProductDescription?: boolean;
|
|
473
477
|
theme?: ThemeInput;
|
|
474
478
|
openLinksInNewTab?: boolean;
|
|
@@ -944,6 +948,12 @@ export declare interface MessagingModeConfig {
|
|
|
944
948
|
* configured for file uploads, otherwise uploads are rejected downstream.
|
|
945
949
|
*/
|
|
946
950
|
enableImageUpload?: boolean;
|
|
951
|
+
/**
|
|
952
|
+
* Renders `order_status`, `order_history` and `order_lookup_form` UI blocks. When false
|
|
953
|
+
* (default), those blocks are replaced with a not available notice, so the widget stays
|
|
954
|
+
* safe even if agent still emits them. Enable together with order tracking on agent.
|
|
955
|
+
*/
|
|
956
|
+
enableOrderTracking?: boolean;
|
|
947
957
|
showProductCaptions?: boolean;
|
|
948
958
|
/**
|
|
949
959
|
* Max number of progress steps to display in chat window.
|
|
@@ -999,7 +1009,8 @@ declare type MessagingScrollSnapshot = {
|
|
|
999
1009
|
scrollTop: number;
|
|
1000
1010
|
shouldStickToBottom: boolean;
|
|
1001
1011
|
hasSentLiveMessage: boolean;
|
|
1002
|
-
|
|
1012
|
+
lastMessageId: string | null;
|
|
1013
|
+
anchoredMessageId?: string;
|
|
1003
1014
|
};
|
|
1004
1015
|
|
|
1005
1016
|
export declare type MessagingSessionReason = "created" | "resumed" | "refreshed" | "ended" | "reset";
|
|
@@ -1101,6 +1112,85 @@ declare type OrderDetails = {
|
|
|
1101
1112
|
footerMessage: string | null;
|
|
1102
1113
|
};
|
|
1103
1114
|
|
|
1115
|
+
/** `order_history` block: lists a signed-in shopper's recent orders to pick one to track. */
|
|
1116
|
+
declare type OrderHistoryResponse = {
|
|
1117
|
+
type: "order_history";
|
|
1118
|
+
index: number;
|
|
1119
|
+
data: OrderHistoryResponseData;
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
/** Payload of an `order_history` block: the signed-in shopper's recent orders, or an error code. */
|
|
1123
|
+
declare type OrderHistoryResponseData = OrderResponseData & {
|
|
1124
|
+
orders: OrderStatus[] | null;
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
/** Shape the chat UI renders the order lookup form from: the values it shows and prefills. */
|
|
1128
|
+
declare type OrderLookupFormData = OrderResponseData & {
|
|
1129
|
+
orderNumber?: string | null;
|
|
1130
|
+
userEmail?: string | null;
|
|
1131
|
+
postalCode?: string | null;
|
|
1132
|
+
/** Hidden input for the registered-shopper flow; the shopper never edits it. */
|
|
1133
|
+
customerId?: string | null;
|
|
1134
|
+
isGuest?: boolean | null;
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
/** `order_lookup_form` block renders a form in chat that asks the shopper for the details needed to look up an order. */
|
|
1138
|
+
declare type OrderLookupFormResponse = {
|
|
1139
|
+
type: "order_lookup_form";
|
|
1140
|
+
index: number;
|
|
1141
|
+
data: OrderLookupFormData;
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1144
|
+
/** An order line with its per-line fulfillment status, shipped quantity and unit price. An order has many. */
|
|
1145
|
+
declare type OrderProductItem = CartItem & {
|
|
1146
|
+
fulfillmentStatus?: string | null;
|
|
1147
|
+
quantityShipped?: number | null;
|
|
1148
|
+
price?: number | null;
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
/** Fields shared by every order block payload: a class label and an error code. */
|
|
1152
|
+
declare type OrderResponseData = {
|
|
1153
|
+
className?: string | null;
|
|
1154
|
+
errorCode?: string | null;
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
/** One shipment of an order, with carrier, tracking and delivery dates. An order has one or many. */
|
|
1158
|
+
declare type OrderShipment = {
|
|
1159
|
+
status?: string | null;
|
|
1160
|
+
carrier?: string | null;
|
|
1161
|
+
trackingNumber?: string | null;
|
|
1162
|
+
trackingUrl?: string | null;
|
|
1163
|
+
expectedDeliveryDate?: string | null;
|
|
1164
|
+
actualDeliveryDate?: string | null;
|
|
1165
|
+
shippingAddress?: string | null;
|
|
1166
|
+
itemIds?: string[] | null;
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
/** A single order as shown in the order status block. Has 1 to many products and shipments. */
|
|
1170
|
+
declare type OrderStatus = OrderDetails & {
|
|
1171
|
+
channelType?: string | null;
|
|
1172
|
+
products?: OrderProductItem[] | null;
|
|
1173
|
+
shipments?: OrderShipment[] | null;
|
|
1174
|
+
status?: string | null;
|
|
1175
|
+
omsStatus?: string | null;
|
|
1176
|
+
shippingAddress?: string | null;
|
|
1177
|
+
shippingMethod?: string | null;
|
|
1178
|
+
customerEmail?: string | null;
|
|
1179
|
+
postalCode?: string | null;
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
/** `order_status` block: shows the status of one or more orders. */
|
|
1183
|
+
declare type OrderStatusResponse = {
|
|
1184
|
+
type: "order_status";
|
|
1185
|
+
index: number;
|
|
1186
|
+
data: OrderStatusResponseData;
|
|
1187
|
+
};
|
|
1188
|
+
|
|
1189
|
+
/** Payload of an `order_status` block: the matching orders (one or many), or an error code. */
|
|
1190
|
+
declare type OrderStatusResponseData = OrderResponseData & {
|
|
1191
|
+
orders: OrderStatus[] | null;
|
|
1192
|
+
};
|
|
1193
|
+
|
|
1104
1194
|
/**
|
|
1105
1195
|
* Widget capabilities handed to every override so it can be interactive — e.g. a
|
|
1106
1196
|
* product card, option picker, or warranty form that posts a message back to the
|
|
@@ -1522,7 +1612,7 @@ declare interface ResolvedTheme {
|
|
|
1522
1612
|
|
|
1523
1613
|
export declare const resolveTheme: (theme?: ThemeInput) => ResolvedTheme;
|
|
1524
1614
|
|
|
1525
|
-
declare type ResponseItem = MarkdownResponse | ProductCarouselResponse | ProductTileResponse | ProductComparisonResponse | SuggestionsResponse | CartResponse | OrderConfirmationResponse | ToolResultsResponse;
|
|
1615
|
+
declare type ResponseItem = MarkdownResponse | ProductCarouselResponse | ProductTileResponse | ProductComparisonResponse | SuggestionsResponse | CartResponse | OrderConfirmationResponse | OrderStatusResponse | OrderHistoryResponse | OrderLookupFormResponse | ToolResultsResponse;
|
|
1526
1616
|
|
|
1527
1617
|
declare type SearchEntryParams = SearchPayload["searchParams"];
|
|
1528
1618
|
|