@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.
- package/build/static/js/main.js +1 -1
- package/build/static/js/main.js.map +1 -1
- package/dist/qa-bot-core.js +2 -2
- package/dist/qa-bot-core.js.map +1 -1
- package/dist/qa-bot-core.standalone.js +1 -1
- package/dist/qa-bot-core.standalone.js.map +1 -1
- package/dist/qa-bot-core.umd.cjs +2 -2
- package/dist/qa-bot-core.umd.cjs.map +1 -1
- package/dist/types/hooks/useTurnstile.d.ts +2 -0
- package/dist/types/utils/flows/qa-flow.d.ts +3 -1
- package/dist/types/utils/logger.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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