@snf/qa-bot-core 0.2.31 → 0.2.32-rc.1

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.
@@ -106,6 +106,12 @@ export interface QABotProps {
106
106
  * Omit or pass empty string to disable Turnstile entirely on the frontend.
107
107
  */
108
108
  turnstileSiteKey?: string;
109
+ /**
110
+ * RP slug for resource-scoped queries (e.g. 'delta').
111
+ * When set, included as resource_context in query POST body
112
+ * and as a query param on capabilities GET.
113
+ */
114
+ resourceContext?: string;
109
115
  /**
110
116
  * Custom flow steps to merge with the built-in Q&A flow.
111
117
  * Use this to add ticket creation flows, feedback flows, etc.
@@ -39,6 +39,7 @@ interface QABotConfig {
39
39
  footerText?: string;
40
40
  footerLink?: string;
41
41
  tooltipText?: string;
42
+ resourceContext?: string;
42
43
  onAnalyticsEvent?: (event: QABotAnalyticsEvent) => void;
43
44
  }
44
45
  interface QABotInstance {
@@ -37,12 +37,14 @@ export interface CreateQAFlowParams {
37
37
  * applies, and the visible challenge is the fallback.
38
38
  */
39
39
  getTurnstileToken?: () => string | null;
40
+ /** RP slug for resource-scoped queries (e.g. 'delta'). */
41
+ resourceContext?: string;
40
42
  }
41
43
  /**
42
44
  * Creates the basic Q&A conversation flow
43
45
  * Handles questions, responses, and optional ratings
44
46
  */
45
- export declare const createQAFlow: ({ endpoint, ratingEndpoint, agentRatingEndpoint, apiKey, sessionId: getSessionId, isResetting, isLoggedIn, allowAnonAccess, loginUrl, actingUser, trackEvent, getTurnstileToken, }: CreateQAFlowParams) => {
47
+ export declare const createQAFlow: ({ endpoint, ratingEndpoint, agentRatingEndpoint, apiKey, sessionId: getSessionId, isResetting, isLoggedIn, allowAnonAccess, loginUrl, actingUser, trackEvent, getTurnstileToken, resourceContext, }: CreateQAFlowParams) => {
46
48
  qa_loop: {
47
49
  message: string;
48
50
  component: React.JSX.Element;
@@ -7,7 +7,7 @@
7
7
  * Usage for consumers:
8
8
  * localStorage.setItem('QA_BOT_DEBUG', 'true'); // Enable debug logs + version
9
9
  */
10
- export declare const LIB_VERSION = "0.2.31";
10
+ export declare const LIB_VERSION = "0.2.32-rc.1";
11
11
  export declare function isDebugEnabled(): boolean;
12
12
  export declare const logger: {
13
13
  version: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snf/qa-bot-core",
3
- "version": "0.2.31",
3
+ "version": "0.2.32-rc.1",
4
4
  "description": "A configurable chatbot setup for quick integration of RAG-powered Q&A and rating system",
5
5
  "main": "./dist/qa-bot-core.umd.cjs",
6
6
  "module": "./dist/qa-bot-core.js",