@cimulate/copilot-widget 1.63.0 → 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.
@@ -948,6 +948,12 @@ export declare interface MessagingModeConfig {
948
948
  * configured for file uploads, otherwise uploads are rejected downstream.
949
949
  */
950
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;
951
957
  showProductCaptions?: boolean;
952
958
  /**
953
959
  * Max number of progress steps to display in chat window.
@@ -1106,6 +1112,85 @@ declare type OrderDetails = {
1106
1112
  footerMessage: string | null;
1107
1113
  };
1108
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
+
1109
1194
  /**
1110
1195
  * Widget capabilities handed to every override so it can be interactive — e.g. a
1111
1196
  * product card, option picker, or warranty form that posts a message back to the
@@ -1527,7 +1612,7 @@ declare interface ResolvedTheme {
1527
1612
 
1528
1613
  export declare const resolveTheme: (theme?: ThemeInput) => ResolvedTheme;
1529
1614
 
1530
- 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;
1531
1616
 
1532
1617
  declare type SearchEntryParams = SearchPayload["searchParams"];
1533
1618