@burdenoff/website-sdk 2026.829.1 → 2026.829.3

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,26 @@ 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
+ );
330
+ var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
331
+ /* GraphQL */
332
+ `
333
+ mutation CreateExploreShareLink($conversationToken: String!) {
334
+ createExploreShareLink(conversationToken: $conversationToken) {
335
+ shareToken
336
+ }
337
+ }
338
+ `
339
+ );
317
340
 
318
341
  // src/data/products.ts
319
342
  var ECOSYSTEM_PRODUCTS = [
@@ -1246,6 +1269,30 @@ function useExploreChat(options = {}) {
1246
1269
  return null;
1247
1270
  }, [messages]);
1248
1271
  const canSend = (phase === "ready" || phase === "error") && catalog.enabled && turnCount < catalog.limits.maxTurnsPerConversation;
1272
+ const createShareLink = useCallback(async () => {
1273
+ const token = conversationTokenRef.current;
1274
+ if (!token) return null;
1275
+ try {
1276
+ const result = await client.mutate(CREATE_EXPLORE_SHARE_LINK_MUTATION, { conversationToken: token });
1277
+ return result?.data?.createExploreShareLink?.shareToken ?? null;
1278
+ } catch {
1279
+ return null;
1280
+ }
1281
+ }, [client]);
1282
+ const recordClick = useCallback(
1283
+ (messageId, kind, url) => {
1284
+ const token = conversationTokenRef.current;
1285
+ if (!token) return;
1286
+ try {
1287
+ void client.mutate(RECORD_EXPLORE_CLICK_MUTATION, {
1288
+ input: { conversationToken: token, messageId, kind, url }
1289
+ }).catch(() => {
1290
+ });
1291
+ } catch {
1292
+ }
1293
+ },
1294
+ [client]
1295
+ );
1249
1296
  return {
1250
1297
  phase,
1251
1298
  catalog,
@@ -1263,7 +1310,9 @@ function useExploreChat(options = {}) {
1263
1310
  history: archive,
1264
1311
  openConversation,
1265
1312
  deleteConversation,
1266
- clearHistory
1313
+ clearHistory,
1314
+ recordClick,
1315
+ createShareLink
1267
1316
  };
1268
1317
  }
1269
1318
  var optimisticCounter = 0;