@burdenoff/website-sdk 2026.922.1 → 2026.922.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
- import { a as ExploreLimits, b as ExploreCatalog, c as ExploreMessage } from './explore-types-CLw19R76.mjs';
1
+ import { a as ExploreLimits, b as ExploreCatalog, c as ExploreMessage, d as ExploreFeedbackRating, e as ExploreFeedbackReason } from './explore-types-CPF1QoMn.js';
2
2
 
3
3
  /** What travels on the wire — mirrors `ExploreAttachmentInput`. */
4
4
  interface ExploreAttachmentPayload {
@@ -104,6 +104,18 @@ interface UseExploreChatResult {
104
104
  * awaited, never throws, and must never delay the navigation it is reporting on.
105
105
  */
106
106
  recordClick: (messageId: string, kind: "CTA" | "REFERENCE", url: string) => void;
107
+ /**
108
+ * Rate one answer. Resolves `true` only when the server reports `recorded: true`.
109
+ *
110
+ * The opposite posture to {@link recordClick}, and deliberately so: the visitor is still on
111
+ * the page and is watching the control they pressed, so the result has to come back far
112
+ * enough for the UI to tell the truth about it. It still never throws — a transport
113
+ * failure, a GraphQL error and an unattributable message all resolve `false`.
114
+ */
115
+ submitFeedback: (messageId: string, rating: ExploreFeedbackRating, detail?: {
116
+ reason?: ExploreFeedbackReason | null;
117
+ comment?: string | null;
118
+ }) => Promise<boolean>;
107
119
  /**
108
120
  * Mint a read-only link to this conversation, or null when there is nothing to share yet.
109
121
  * The secret returned is not the conversation token and cannot continue the thread.
@@ -121,6 +133,12 @@ declare const FALLBACK_EXPLORE_LIMITS: ExploreLimits;
121
133
  /**
122
134
  * Prompts shown when neither the catalog nor the consumer supplies any.
123
135
  * Deliberately product-agnostic — this SDK renders on 38 different sites.
136
+ *
137
+ * Problem-first, and kept in step with `support.explore.examplePrompts.*` in
138
+ * global-support-svc. These render precisely when the catalog call failed, so
139
+ * if they disagree with the server the page silently reverts to whatever this
140
+ * file last said — which is how the whole surface can go back to being a
141
+ * brochure without a single copy change being reviewed.
124
142
  */
125
143
  declare const DEFAULT_EXPLORE_EXAMPLE_PROMPTS: string[];
126
144
  /**
@@ -1,4 +1,4 @@
1
- import { a as ExploreLimits, b as ExploreCatalog, c as ExploreMessage } from './explore-types-CLw19R76.js';
1
+ import { a as ExploreLimits, b as ExploreCatalog, c as ExploreMessage, d as ExploreFeedbackRating, e as ExploreFeedbackReason } from './explore-types-CPF1QoMn.mjs';
2
2
 
3
3
  /** What travels on the wire — mirrors `ExploreAttachmentInput`. */
4
4
  interface ExploreAttachmentPayload {
@@ -104,6 +104,18 @@ interface UseExploreChatResult {
104
104
  * awaited, never throws, and must never delay the navigation it is reporting on.
105
105
  */
106
106
  recordClick: (messageId: string, kind: "CTA" | "REFERENCE", url: string) => void;
107
+ /**
108
+ * Rate one answer. Resolves `true` only when the server reports `recorded: true`.
109
+ *
110
+ * The opposite posture to {@link recordClick}, and deliberately so: the visitor is still on
111
+ * the page and is watching the control they pressed, so the result has to come back far
112
+ * enough for the UI to tell the truth about it. It still never throws — a transport
113
+ * failure, a GraphQL error and an unattributable message all resolve `false`.
114
+ */
115
+ submitFeedback: (messageId: string, rating: ExploreFeedbackRating, detail?: {
116
+ reason?: ExploreFeedbackReason | null;
117
+ comment?: string | null;
118
+ }) => Promise<boolean>;
107
119
  /**
108
120
  * Mint a read-only link to this conversation, or null when there is nothing to share yet.
109
121
  * The secret returned is not the conversation token and cannot continue the thread.
@@ -121,6 +133,12 @@ declare const FALLBACK_EXPLORE_LIMITS: ExploreLimits;
121
133
  /**
122
134
  * Prompts shown when neither the catalog nor the consumer supplies any.
123
135
  * Deliberately product-agnostic — this SDK renders on 38 different sites.
136
+ *
137
+ * Problem-first, and kept in step with `support.explore.examplePrompts.*` in
138
+ * global-support-svc. These render precisely when the catalog call failed, so
139
+ * if they disagree with the server the page silently reverts to whatever this
140
+ * file last said — which is how the whole surface can go back to being a
141
+ * brochure without a single copy change being reviewed.
124
142
  */
125
143
  declare const DEFAULT_EXPLORE_EXAMPLE_PROMPTS: string[];
126
144
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/website-sdk",
3
- "version": "2026.922.1",
3
+ "version": "2026.922.3",
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",