@snf/qa-bot-core 0.2.30-rc.2 → 0.2.30-rc.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.
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface TurnstileWidgetProps {
3
+ siteKey: string;
4
+ onVerify: (token: string) => void;
5
+ onError?: () => void;
6
+ }
7
+ /**
8
+ * Renders a Cloudflare Turnstile widget inline in the chat.
9
+ * Used as a `component` on a flow step (same pattern as LoginButton).
10
+ */
11
+ declare const TurnstileWidget: React.FC<TurnstileWidgetProps>;
12
+ export default TurnstileWidget;
@@ -42,13 +42,23 @@ export declare const createQAFlow: ({ endpoint, ratingEndpoint, apiKey, sessionI
42
42
  options?: undefined;
43
43
  renderMarkdown?: undefined;
44
44
  };
45
+ turnstile_challenge?: undefined;
45
46
  } | {
46
47
  qa_loop: {
47
- message: (chatState: any) => Promise<"Thanks for the feedback! Feel free to ask another question." | "I wasn't able to verify you're human. Please try your question again." | "I apologize, but I'm having trouble processing your question. Please try again later.">;
48
+ message: (chatState: any) => Promise<"Thanks for the feedback! Feel free to ask another question." | "Verification failed. Please try your question again." | "I had trouble processing your question after verification. Please try again." | "Please verify you're human to continue." | "I apologize, but I'm having trouble processing your question. Please try again later.">;
48
49
  options: (chatState: any) => string[];
49
50
  renderMarkdown: string[];
50
51
  chatDisabled: boolean;
51
- path: string;
52
+ path: () => "qa_loop" | "turnstile_challenge";
52
53
  component?: undefined;
53
54
  };
55
+ turnstile_challenge: {
56
+ message: string;
57
+ component: React.JSX.Element;
58
+ chatDisabled: boolean;
59
+ transition: {
60
+ duration: number;
61
+ };
62
+ path: string;
63
+ };
54
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snf/qa-bot-core",
3
- "version": "0.2.30-rc.2",
3
+ "version": "0.2.30-rc.3",
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",