@burdenoff/website-sdk 2026.829.5 → 2026.829.6
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.
- package/dist/components/explore.js +439 -22
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +440 -23
- package/dist/components/explore.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +80 -7
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +80 -7
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +443 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +444 -27
- package/dist/index.mjs.map +1 -1
- package/dist/{use-explore-chat-B-E7jN1H.d.mts → use-explore-chat-BzXCz2UM.d.mts} +38 -3
- package/dist/{use-explore-chat-B-E7jN1H.d.ts → use-explore-chat-BzXCz2UM.d.ts} +38 -3
- package/package.json +1 -1
|
@@ -77,6 +77,8 @@ interface ExploreMessage {
|
|
|
77
77
|
* with no source is the honest "we do not have this" signal rather than a hedge.
|
|
78
78
|
*/
|
|
79
79
|
answered?: boolean | null;
|
|
80
|
+
/** Files the visitor attached to this turn. Present on USER messages only. */
|
|
81
|
+
attachments?: ExploreAttachment[] | null;
|
|
80
82
|
errorCode?: string | null;
|
|
81
83
|
createdAt: string;
|
|
82
84
|
completedAt?: string | null;
|
|
@@ -130,6 +132,26 @@ interface SendExploreMessageInput {
|
|
|
130
132
|
recaptchaToken?: string;
|
|
131
133
|
locale?: string;
|
|
132
134
|
pageUrl?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Files attached as extra context. At most 5, each at most 10 MB — re-enforced server-side,
|
|
137
|
+
* so these are the limits the composer shows, not the limits that hold.
|
|
138
|
+
*/
|
|
139
|
+
attachments?: ExploreAttachmentInput[];
|
|
140
|
+
}
|
|
141
|
+
/** `input ExploreAttachmentInput`. `textContent` is null for a format the browser cannot read. */
|
|
142
|
+
interface ExploreAttachmentInput {
|
|
143
|
+
name: string;
|
|
144
|
+
mimeType: string;
|
|
145
|
+
size: number;
|
|
146
|
+
textContent: string | null;
|
|
147
|
+
}
|
|
148
|
+
/** `type ExploreAttachment` — what the server accepted, echoed back. */
|
|
149
|
+
interface ExploreAttachment {
|
|
150
|
+
name: string;
|
|
151
|
+
mimeType: string;
|
|
152
|
+
size: number;
|
|
153
|
+
/** False when only the filename and type could be used as context. */
|
|
154
|
+
textExtracted: boolean;
|
|
133
155
|
}
|
|
134
156
|
/**
|
|
135
157
|
* `type SendExploreMessageResult`.
|
|
@@ -149,9 +171,9 @@ declare const EXPLORE_CATALOG_QUERY = "\n query ExploreCatalog($productSlug: St
|
|
|
149
171
|
* default 5-minute cache would return the first PENDING snapshot forever and
|
|
150
172
|
* the answer would never appear.
|
|
151
173
|
*/
|
|
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";
|
|
174
|
+
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 attachments {\n name\n mimeType\n size\n textExtracted\n }\n errorCode\n createdAt\n completedAt\n\n }\n }\n";
|
|
153
175
|
/** Submit half of the submit + poll pair. */
|
|
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";
|
|
176
|
+
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 attachments {\n name\n mimeType\n size\n textExtracted\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 index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n attachments {\n name\n mimeType\n size\n textExtracted\n }\n errorCode\n createdAt\n completedAt\n\n }\n remainingToday\n }\n }\n";
|
|
155
177
|
interface ExploreCatalogQueryData {
|
|
156
178
|
exploreCatalog: ExploreCatalog;
|
|
157
179
|
}
|
|
@@ -162,6 +184,14 @@ interface SendExploreMessageMutationData {
|
|
|
162
184
|
sendExploreMessage: SendExploreMessageResult;
|
|
163
185
|
}
|
|
164
186
|
|
|
187
|
+
/** What travels on the wire — mirrors `ExploreAttachmentInput`. */
|
|
188
|
+
interface ExploreAttachmentPayload {
|
|
189
|
+
name: string;
|
|
190
|
+
mimeType: string;
|
|
191
|
+
size: number;
|
|
192
|
+
textContent: string | null;
|
|
193
|
+
}
|
|
194
|
+
|
|
165
195
|
/**
|
|
166
196
|
* Where the conversation is right now.
|
|
167
197
|
*
|
|
@@ -226,7 +256,7 @@ interface UseExploreChatResult {
|
|
|
226
256
|
/** Product the visitor pinned the conversation to, or null for "all". */
|
|
227
257
|
focusProduct: string | null;
|
|
228
258
|
setFocusProduct: (slug: string | null) => void;
|
|
229
|
-
send: (message: string) => Promise<void>;
|
|
259
|
+
send: (message: string, attachments?: readonly ExploreAttachmentPayload[]) => Promise<void>;
|
|
230
260
|
/** Stop polling and keep whatever text has streamed so far. */
|
|
231
261
|
stop: () => void;
|
|
232
262
|
/** Re-send the last message after a failed turn. */
|
|
@@ -251,6 +281,11 @@ interface UseExploreChatResult {
|
|
|
251
281
|
* The secret returned is not the conversation token and cannot continue the thread.
|
|
252
282
|
*/
|
|
253
283
|
createShareLink: () => Promise<string | null>;
|
|
284
|
+
/**
|
|
285
|
+
* True when the transcript on screen came from a shared link rather than this visitor's own
|
|
286
|
+
* conversation. A shared view is read-only: the share secret cannot continue the thread.
|
|
287
|
+
*/
|
|
288
|
+
isSharedView: boolean;
|
|
254
289
|
canSend: boolean;
|
|
255
290
|
}
|
|
256
291
|
/** Fallback limits, mirroring the server defaults in CONTRACT.md §3. */
|
|
@@ -77,6 +77,8 @@ interface ExploreMessage {
|
|
|
77
77
|
* with no source is the honest "we do not have this" signal rather than a hedge.
|
|
78
78
|
*/
|
|
79
79
|
answered?: boolean | null;
|
|
80
|
+
/** Files the visitor attached to this turn. Present on USER messages only. */
|
|
81
|
+
attachments?: ExploreAttachment[] | null;
|
|
80
82
|
errorCode?: string | null;
|
|
81
83
|
createdAt: string;
|
|
82
84
|
completedAt?: string | null;
|
|
@@ -130,6 +132,26 @@ interface SendExploreMessageInput {
|
|
|
130
132
|
recaptchaToken?: string;
|
|
131
133
|
locale?: string;
|
|
132
134
|
pageUrl?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Files attached as extra context. At most 5, each at most 10 MB — re-enforced server-side,
|
|
137
|
+
* so these are the limits the composer shows, not the limits that hold.
|
|
138
|
+
*/
|
|
139
|
+
attachments?: ExploreAttachmentInput[];
|
|
140
|
+
}
|
|
141
|
+
/** `input ExploreAttachmentInput`. `textContent` is null for a format the browser cannot read. */
|
|
142
|
+
interface ExploreAttachmentInput {
|
|
143
|
+
name: string;
|
|
144
|
+
mimeType: string;
|
|
145
|
+
size: number;
|
|
146
|
+
textContent: string | null;
|
|
147
|
+
}
|
|
148
|
+
/** `type ExploreAttachment` — what the server accepted, echoed back. */
|
|
149
|
+
interface ExploreAttachment {
|
|
150
|
+
name: string;
|
|
151
|
+
mimeType: string;
|
|
152
|
+
size: number;
|
|
153
|
+
/** False when only the filename and type could be used as context. */
|
|
154
|
+
textExtracted: boolean;
|
|
133
155
|
}
|
|
134
156
|
/**
|
|
135
157
|
* `type SendExploreMessageResult`.
|
|
@@ -149,9 +171,9 @@ declare const EXPLORE_CATALOG_QUERY = "\n query ExploreCatalog($productSlug: St
|
|
|
149
171
|
* default 5-minute cache would return the first PENDING snapshot forever and
|
|
150
172
|
* the answer would never appear.
|
|
151
173
|
*/
|
|
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";
|
|
174
|
+
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 attachments {\n name\n mimeType\n size\n textExtracted\n }\n errorCode\n createdAt\n completedAt\n\n }\n }\n";
|
|
153
175
|
/** Submit half of the submit + poll pair. */
|
|
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";
|
|
176
|
+
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 attachments {\n name\n mimeType\n size\n textExtracted\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 index\n }\n ctas {\n kind\n label\n url\n product\n }\n followUps\n answered\n attachments {\n name\n mimeType\n size\n textExtracted\n }\n errorCode\n createdAt\n completedAt\n\n }\n remainingToday\n }\n }\n";
|
|
155
177
|
interface ExploreCatalogQueryData {
|
|
156
178
|
exploreCatalog: ExploreCatalog;
|
|
157
179
|
}
|
|
@@ -162,6 +184,14 @@ interface SendExploreMessageMutationData {
|
|
|
162
184
|
sendExploreMessage: SendExploreMessageResult;
|
|
163
185
|
}
|
|
164
186
|
|
|
187
|
+
/** What travels on the wire — mirrors `ExploreAttachmentInput`. */
|
|
188
|
+
interface ExploreAttachmentPayload {
|
|
189
|
+
name: string;
|
|
190
|
+
mimeType: string;
|
|
191
|
+
size: number;
|
|
192
|
+
textContent: string | null;
|
|
193
|
+
}
|
|
194
|
+
|
|
165
195
|
/**
|
|
166
196
|
* Where the conversation is right now.
|
|
167
197
|
*
|
|
@@ -226,7 +256,7 @@ interface UseExploreChatResult {
|
|
|
226
256
|
/** Product the visitor pinned the conversation to, or null for "all". */
|
|
227
257
|
focusProduct: string | null;
|
|
228
258
|
setFocusProduct: (slug: string | null) => void;
|
|
229
|
-
send: (message: string) => Promise<void>;
|
|
259
|
+
send: (message: string, attachments?: readonly ExploreAttachmentPayload[]) => Promise<void>;
|
|
230
260
|
/** Stop polling and keep whatever text has streamed so far. */
|
|
231
261
|
stop: () => void;
|
|
232
262
|
/** Re-send the last message after a failed turn. */
|
|
@@ -251,6 +281,11 @@ interface UseExploreChatResult {
|
|
|
251
281
|
* The secret returned is not the conversation token and cannot continue the thread.
|
|
252
282
|
*/
|
|
253
283
|
createShareLink: () => Promise<string | null>;
|
|
284
|
+
/**
|
|
285
|
+
* True when the transcript on screen came from a shared link rather than this visitor's own
|
|
286
|
+
* conversation. A shared view is read-only: the share secret cannot continue the thread.
|
|
287
|
+
*/
|
|
288
|
+
isSharedView: boolean;
|
|
254
289
|
canSend: boolean;
|
|
255
290
|
}
|
|
256
291
|
/** 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.829.
|
|
3
|
+
"version": "2026.829.6",
|
|
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",
|