@burdenoff/website-sdk 2026.828.7 → 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.
@@ -39,6 +39,8 @@ interface ExploreReference {
39
39
  description?: string | null;
40
40
  product?: string | null;
41
41
  imageUrl?: string | null;
42
+ /** 1-based citation number; the answer text carries a matching `[n]` marker. */
43
+ index?: number | null;
42
44
  }
43
45
  /**
44
46
  * `type ExploreCta` — a suggested next step attached to an answer.
@@ -68,6 +70,13 @@ interface ExploreMessage {
68
70
  activity: string[];
69
71
  references: ExploreReference[];
70
72
  ctas: ExploreCtaLink[];
73
+ /** Up to three suggested next questions, derived from what the answer covered. */
74
+ followUps?: string[] | null;
75
+ /**
76
+ * False when the corpus could not answer. A grounded answer always cites, so an answer
77
+ * with no source is the honest "we do not have this" signal rather than a hedge.
78
+ */
79
+ answered?: boolean | null;
71
80
  errorCode?: string | null;
72
81
  createdAt: string;
73
82
  completedAt?: string | null;
@@ -140,9 +149,9 @@ declare const EXPLORE_CATALOG_QUERY = "\n query ExploreCatalog($productSlug: St
140
149
  * default 5-minute cache would return the first PENDING snapshot forever and
141
150
  * the answer would never appear.
142
151
  */
143
- declare const EXPLORE_MESSAGE_QUERY = "\n query ExploreMessage($conversationToken: String!, $id: ID!) {\n exploreMessage(conversationToken: $conversationToken, id: $id) {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n }\n ctas {\n kind\n label\n url\n product\n }\n errorCode\n createdAt\n completedAt\n\n }\n }\n";
152
+ declare const EXPLORE_MESSAGE_QUERY = "\n query ExploreMessage($conversationToken: String!, $id: ID!) {\n exploreMessage(conversationToken: $conversationToken, id: $id) {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n errorCode\n createdAt\n completedAt\n\n }\n }\n";
144
153
  /** Submit half of the submit + poll pair. */
145
- declare const SEND_EXPLORE_MESSAGE_MUTATION = "\n mutation SendExploreMessage($input: SendExploreMessageInput!) {\n sendExploreMessage(input: $input) {\n conversation {\n id\n token\n productSlug\n turnCount\n createdAt\n }\n userMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n }\n ctas {\n kind\n label\n url\n product\n }\n errorCode\n createdAt\n completedAt\n\n }\n assistantMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n }\n ctas {\n kind\n label\n url\n product\n }\n errorCode\n createdAt\n completedAt\n\n }\n remainingToday\n }\n }\n";
154
+ declare const SEND_EXPLORE_MESSAGE_MUTATION = "\n mutation SendExploreMessage($input: SendExploreMessageInput!) {\n sendExploreMessage(input: $input) {\n conversation {\n id\n token\n productSlug\n turnCount\n createdAt\n }\n userMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n errorCode\n createdAt\n completedAt\n\n }\n assistantMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n errorCode\n createdAt\n completedAt\n\n }\n remainingToday\n }\n }\n";
146
155
  interface ExploreCatalogQueryData {
147
156
  exploreCatalog: ExploreCatalog;
148
157
  }
@@ -232,6 +241,11 @@ interface UseExploreChatResult {
232
241
  deleteConversation: (token: string) => void;
233
242
  /** Forget every past conversation held in this browser. */
234
243
  clearHistory: () => void;
244
+ /**
245
+ * Record that the visitor followed a link this answer offered. Fire-and-forget — never
246
+ * awaited, never throws, and must never delay the navigation it is reporting on.
247
+ */
248
+ recordClick: (messageId: string, kind: "CTA" | "REFERENCE", url: string) => void;
235
249
  canSend: boolean;
236
250
  }
237
251
  /** Fallback limits, mirroring the server defaults in CONTRACT.md §3. */
@@ -39,6 +39,8 @@ interface ExploreReference {
39
39
  description?: string | null;
40
40
  product?: string | null;
41
41
  imageUrl?: string | null;
42
+ /** 1-based citation number; the answer text carries a matching `[n]` marker. */
43
+ index?: number | null;
42
44
  }
43
45
  /**
44
46
  * `type ExploreCta` — a suggested next step attached to an answer.
@@ -68,6 +70,13 @@ interface ExploreMessage {
68
70
  activity: string[];
69
71
  references: ExploreReference[];
70
72
  ctas: ExploreCtaLink[];
73
+ /** Up to three suggested next questions, derived from what the answer covered. */
74
+ followUps?: string[] | null;
75
+ /**
76
+ * False when the corpus could not answer. A grounded answer always cites, so an answer
77
+ * with no source is the honest "we do not have this" signal rather than a hedge.
78
+ */
79
+ answered?: boolean | null;
71
80
  errorCode?: string | null;
72
81
  createdAt: string;
73
82
  completedAt?: string | null;
@@ -140,9 +149,9 @@ declare const EXPLORE_CATALOG_QUERY = "\n query ExploreCatalog($productSlug: St
140
149
  * default 5-minute cache would return the first PENDING snapshot forever and
141
150
  * the answer would never appear.
142
151
  */
143
- declare const EXPLORE_MESSAGE_QUERY = "\n query ExploreMessage($conversationToken: String!, $id: ID!) {\n exploreMessage(conversationToken: $conversationToken, id: $id) {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n }\n ctas {\n kind\n label\n url\n product\n }\n errorCode\n createdAt\n completedAt\n\n }\n }\n";
152
+ declare const EXPLORE_MESSAGE_QUERY = "\n query ExploreMessage($conversationToken: String!, $id: ID!) {\n exploreMessage(conversationToken: $conversationToken, id: $id) {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n errorCode\n createdAt\n completedAt\n\n }\n }\n";
144
153
  /** Submit half of the submit + poll pair. */
145
- declare const SEND_EXPLORE_MESSAGE_MUTATION = "\n mutation SendExploreMessage($input: SendExploreMessageInput!) {\n sendExploreMessage(input: $input) {\n conversation {\n id\n token\n productSlug\n turnCount\n createdAt\n }\n userMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n }\n ctas {\n kind\n label\n url\n product\n }\n errorCode\n createdAt\n completedAt\n\n }\n assistantMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n }\n ctas {\n kind\n label\n url\n product\n }\n errorCode\n createdAt\n completedAt\n\n }\n remainingToday\n }\n }\n";
154
+ declare const SEND_EXPLORE_MESSAGE_MUTATION = "\n mutation SendExploreMessage($input: SendExploreMessageInput!) {\n sendExploreMessage(input: $input) {\n conversation {\n id\n token\n productSlug\n turnCount\n createdAt\n }\n userMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n errorCode\n createdAt\n completedAt\n\n }\n assistantMessage {\n \n id\n conversationId\n role\n status\n content\n partialContent\n activity\n references {\n url\n title\n description\n product\n imageUrl\n index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n errorCode\n createdAt\n completedAt\n\n }\n remainingToday\n }\n }\n";
146
155
  interface ExploreCatalogQueryData {
147
156
  exploreCatalog: ExploreCatalog;
148
157
  }
@@ -232,6 +241,11 @@ interface UseExploreChatResult {
232
241
  deleteConversation: (token: string) => void;
233
242
  /** Forget every past conversation held in this browser. */
234
243
  clearHistory: () => void;
244
+ /**
245
+ * Record that the visitor followed a link this answer offered. Fire-and-forget — never
246
+ * awaited, never throws, and must never delay the navigation it is reporting on.
247
+ */
248
+ recordClick: (messageId: string, kind: "CTA" | "REFERENCE", url: string) => void;
235
249
  canSend: boolean;
236
250
  }
237
251
  /** Fallback limits, mirroring the server defaults in CONTRACT.md §3. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/website-sdk",
3
- "version": "2026.828.7",
3
+ "version": "2026.829.2",
4
4
  "description": "Shared SDK for Burdenoff product websites - reusable React components, utilities, and configurations",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",