@courseecho/ai-core-sdk 1.0.29 → 1.0.30
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/models.d.ts +13 -0
- package/dist/sdk.js +1 -0
- package/package.json +1 -1
package/dist/models.d.ts
CHANGED
|
@@ -152,6 +152,13 @@ export interface AiContextConfig {
|
|
|
152
152
|
* Example: userId: currentUser.id
|
|
153
153
|
*/
|
|
154
154
|
userId?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Widget config identifier — when a tenant has multiple widget configs (one per website),
|
|
157
|
+
* this tells the backend which website's scraped data to use for AI answers.
|
|
158
|
+
* Matches the configId in the Deploy-tab embed snippet (data-config-id attribute).
|
|
159
|
+
* Defaults to "default" on the backend if omitted.
|
|
160
|
+
*/
|
|
161
|
+
configId?: string;
|
|
155
162
|
/**
|
|
156
163
|
* Client-side abuse prevention settings.
|
|
157
164
|
* These defend against scripted quota-exhaustion attacks on behalf of your
|
|
@@ -221,6 +228,12 @@ export interface AiQueryRequest {
|
|
|
221
228
|
anonymousId?: string;
|
|
222
229
|
/** Customer's own end-user ID — set when the user is logged into the customer's app. */
|
|
223
230
|
endUserId?: string;
|
|
231
|
+
/**
|
|
232
|
+
* Widget config identifier — routes the query to the correct website's scraped data.
|
|
233
|
+
* Sent from the widget SDK; matches the configId in the Deploy-tab embed snippet.
|
|
234
|
+
* Defaults to "default" on the backend if omitted.
|
|
235
|
+
*/
|
|
236
|
+
configId?: string;
|
|
224
237
|
[key: string]: any;
|
|
225
238
|
}
|
|
226
239
|
/** A single message returned by GET /api/chat/history */
|
package/dist/sdk.js
CHANGED
|
@@ -156,6 +156,7 @@ export class AiWidgetSDK {
|
|
|
156
156
|
pageType: this.contextStateManager.getContext().pageType,
|
|
157
157
|
entityId: this.contextStateManager.getContext().entityId,
|
|
158
158
|
contextData: this.contextStateManager.getContext().customData,
|
|
159
|
+
configId: this.config.configId,
|
|
159
160
|
};
|
|
160
161
|
// Send to backend
|
|
161
162
|
const response = await this.communicationService.sendQuery(request);
|