@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.
@@ -1,4 +1,4 @@
1
- export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from '../use-explore-chat-DhvZhH8f.mjs';
1
+ export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from '../use-explore-chat-B-E7jN1H.mjs';
2
2
 
3
3
  interface UseSpeechInputOptions {
4
4
  /** Receives settled text as it is recognised. Append it to the draft. */
@@ -1,4 +1,4 @@
1
- export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from '../use-explore-chat-DhvZhH8f.js';
1
+ export { D as DEFAULT_EXPLORE_EXAMPLE_PROMPTS, E as ExploreChatError, a as ExploreChatErrorKind, b as ExploreChatPhase, F as FALLBACK_EXPLORE_LIMITS, U as UseExploreChatOptions, c as UseExploreChatResult, d as classifyExploreError, u as useExploreChat } from '../use-explore-chat-B-E7jN1H.js';
2
2
 
3
3
  interface UseSpeechInputOptions {
4
4
  /** Receives settled text as it is recognised. Append it to the draft. */
@@ -244,6 +244,7 @@ var EXPLORE_MESSAGE_FIELDS = (
244
244
  description
245
245
  product
246
246
  imageUrl
247
+ index
247
248
  }
248
249
  ctas {
249
250
  kind
@@ -251,6 +252,8 @@ var EXPLORE_MESSAGE_FIELDS = (
251
252
  url
252
253
  product
253
254
  }
255
+ followUps
256
+ answered
254
257
  errorCode
255
258
  createdAt
256
259
  completedAt
@@ -316,6 +319,26 @@ var SEND_EXPLORE_MESSAGE_MUTATION = (
316
319
  }
317
320
  `
318
321
  );
322
+ var RECORD_EXPLORE_CLICK_MUTATION = (
323
+ /* GraphQL */
324
+ `
325
+ mutation RecordExploreClick($input: RecordExploreClickInput!) {
326
+ recordExploreClick(input: $input) {
327
+ recorded
328
+ }
329
+ }
330
+ `
331
+ );
332
+ var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
333
+ /* GraphQL */
334
+ `
335
+ mutation CreateExploreShareLink($conversationToken: String!) {
336
+ createExploreShareLink(conversationToken: $conversationToken) {
337
+ shareToken
338
+ }
339
+ }
340
+ `
341
+ );
319
342
 
320
343
  // src/data/products.ts
321
344
  var ECOSYSTEM_PRODUCTS = [
@@ -1248,6 +1271,30 @@ function useExploreChat(options = {}) {
1248
1271
  return null;
1249
1272
  }, [messages]);
1250
1273
  const canSend = (phase === "ready" || phase === "error") && catalog.enabled && turnCount < catalog.limits.maxTurnsPerConversation;
1274
+ const createShareLink = react.useCallback(async () => {
1275
+ const token = conversationTokenRef.current;
1276
+ if (!token) return null;
1277
+ try {
1278
+ const result = await client.mutate(CREATE_EXPLORE_SHARE_LINK_MUTATION, { conversationToken: token });
1279
+ return result?.data?.createExploreShareLink?.shareToken ?? null;
1280
+ } catch {
1281
+ return null;
1282
+ }
1283
+ }, [client]);
1284
+ const recordClick = react.useCallback(
1285
+ (messageId, kind, url) => {
1286
+ const token = conversationTokenRef.current;
1287
+ if (!token) return;
1288
+ try {
1289
+ void client.mutate(RECORD_EXPLORE_CLICK_MUTATION, {
1290
+ input: { conversationToken: token, messageId, kind, url }
1291
+ }).catch(() => {
1292
+ });
1293
+ } catch {
1294
+ }
1295
+ },
1296
+ [client]
1297
+ );
1251
1298
  return {
1252
1299
  phase,
1253
1300
  catalog,
@@ -1265,7 +1312,9 @@ function useExploreChat(options = {}) {
1265
1312
  history: archive,
1266
1313
  openConversation,
1267
1314
  deleteConversation,
1268
- clearHistory
1315
+ clearHistory,
1316
+ recordClick,
1317
+ createShareLink
1269
1318
  };
1270
1319
  }
1271
1320
  var optimisticCounter = 0;