@snf/qa-bot-core 0.2.33 → 0.2.35

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.
@@ -19,6 +19,8 @@ export interface UseTurnstileResult {
19
19
  token: string | null;
20
20
  /** Lifecycle status of the silent verification. */
21
21
  status: TurnstileStatus;
22
+ /** Reset the widget to generate a fresh token (call after each successful use). */
23
+ reset: () => void;
22
24
  }
23
25
  /**
24
26
  * @param siteKey Cloudflare Turnstile site key. Pass `undefined` or empty
@@ -37,6 +37,8 @@ export interface CreateQAFlowParams {
37
37
  * applies, and the visible challenge is the fallback.
38
38
  */
39
39
  getTurnstileToken?: () => string | null;
40
+ /** Reset the Turnstile widget to generate a fresh token after each use. */
41
+ resetTurnstileToken?: () => void;
40
42
  /** Backend ID — included as _backend in request body for proxy routing. */
41
43
  backendId?: string;
42
44
  /** RP slug for resource-scoped queries (e.g. 'delta'). */
@@ -46,7 +48,7 @@ export interface CreateQAFlowParams {
46
48
  * Creates the basic Q&A conversation flow
47
49
  * Handles questions, responses, and optional ratings
48
50
  */
49
- export declare const createQAFlow: ({ endpoint, ratingEndpoint, agentRatingEndpoint, apiKey, sessionId: getSessionId, isResetting, isLoggedIn, allowAnonAccess, loginUrl, actingUser, trackEvent, getTurnstileToken, backendId, resourceContext, }: CreateQAFlowParams) => {
51
+ export declare const createQAFlow: ({ endpoint, ratingEndpoint, agentRatingEndpoint, apiKey, sessionId: getSessionId, isResetting, isLoggedIn, allowAnonAccess, loginUrl, actingUser, trackEvent, getTurnstileToken, resetTurnstileToken, backendId, resourceContext, }: CreateQAFlowParams) => {
50
52
  qa_loop: {
51
53
  message: string;
52
54
  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.33";
10
+ export declare const LIB_VERSION = "0.2.35";
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.33",
3
+ "version": "0.2.35",
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",