@burdenoff/website-sdk 2026.829.1 → 2026.829.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.
@@ -242,6 +242,7 @@ var EXPLORE_MESSAGE_FIELDS = (
242
242
  description
243
243
  product
244
244
  imageUrl
245
+ index
245
246
  }
246
247
  ctas {
247
248
  kind
@@ -249,6 +250,8 @@ var EXPLORE_MESSAGE_FIELDS = (
249
250
  url
250
251
  product
251
252
  }
253
+ followUps
254
+ answered
252
255
  errorCode
253
256
  createdAt
254
257
  completedAt
@@ -314,6 +317,16 @@ var SEND_EXPLORE_MESSAGE_MUTATION = (
314
317
  }
315
318
  `
316
319
  );
320
+ var RECORD_EXPLORE_CLICK_MUTATION = (
321
+ /* GraphQL */
322
+ `
323
+ mutation RecordExploreClick($input: RecordExploreClickInput!) {
324
+ recordExploreClick(input: $input) {
325
+ recorded
326
+ }
327
+ }
328
+ `
329
+ );
317
330
 
318
331
  // src/data/products.ts
319
332
  var ECOSYSTEM_PRODUCTS = [
@@ -1246,6 +1259,20 @@ function useExploreChat(options = {}) {
1246
1259
  return null;
1247
1260
  }, [messages]);
1248
1261
  const canSend = (phase === "ready" || phase === "error") && catalog.enabled && turnCount < catalog.limits.maxTurnsPerConversation;
1262
+ const recordClick = useCallback(
1263
+ (messageId, kind, url) => {
1264
+ const token = conversationTokenRef.current;
1265
+ if (!token) return;
1266
+ try {
1267
+ void client.mutate(RECORD_EXPLORE_CLICK_MUTATION, {
1268
+ input: { conversationToken: token, messageId, kind, url }
1269
+ }).catch(() => {
1270
+ });
1271
+ } catch {
1272
+ }
1273
+ },
1274
+ [client]
1275
+ );
1249
1276
  return {
1250
1277
  phase,
1251
1278
  catalog,
@@ -1263,7 +1290,8 @@ function useExploreChat(options = {}) {
1263
1290
  history: archive,
1264
1291
  openConversation,
1265
1292
  deleteConversation,
1266
- clearHistory
1293
+ clearHistory,
1294
+ recordClick
1267
1295
  };
1268
1296
  }
1269
1297
  var optimisticCounter = 0;