@sapia-ai/chatbot-v3 1.1.1 → 1.3.0
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/{EmbeddedVideoPlayer-COUZHpPa.js → EmbeddedVideoPlayer-DTzRqNcQ.js} +176 -186
- package/dist/{Preview-wPnYtccF.js → Preview-Dd7KyhMk.js} +3 -3
- package/dist/api/client.d.ts +10 -6
- package/dist/api/places.d.ts +33 -0
- package/dist/api/types/messages.d.ts +35 -4
- package/dist/api/types/responses.d.ts +20 -17
- package/dist/api.js +2 -2
- package/dist/core/bubbles/cards.d.ts +14 -0
- package/dist/core/bubbles/convert.d.ts +24 -2
- package/dist/core/bubbles/counters.d.ts +10 -0
- package/dist/core/bubbles/types.d.ts +21 -1
- package/dist/core/constants.d.ts +31 -0
- package/dist/core/events.d.ts +7 -0
- package/dist/core/internalUser.d.ts +13 -0
- package/dist/core/interview.d.ts +26 -9
- package/dist/core/persistence.d.ts +3 -0
- package/dist/core/redirect.d.ts +2 -0
- package/dist/core/store.d.ts +22 -9
- package/dist/core/validation/wordCount.d.ts +1 -0
- package/dist/{dist-Bwlks_W8.js → dist-waE-4cub.js} +3 -3
- package/dist/embed/compat.d.ts +1 -1
- package/dist/embed/createChatbot.d.ts +6 -0
- package/dist/{fix-webm-duration-QAy9T6AR.js → fix-webm-duration-IniZA6tF.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6218 -5384
- package/dist/{jsx-runtime-24G8w2Bf.js → jsx-runtime-DN_m6Qdv.js} +2 -2
- package/dist/{messages-DCvBcspv.js → messages-C00e82NS.js} +44 -37
- package/dist/places-CT6PNW7B.js +52 -0
- package/dist/react/AnswerInput.d.ts +16 -5
- package/dist/react/SapiaChatbot.d.ts +7 -1
- package/dist/react/bubbleViewModel.d.ts +38 -11
- package/dist/react/strings.d.ts +46 -10
- package/dist/react/usePlacesSuggestions.d.ts +16 -0
- package/dist/{react-Bw5AugJc.js → react-A0_ZwPyM.js} +3 -3
- package/dist/{react-DEF8h8hc.js → react-BDGt_WsZ.js} +3 -3
- package/dist/{react-DDjfkpOE.js → react-B_YNH2g9.js} +3 -3
- package/dist/{react-D8hV9uow.js → react-ByP48xLV.js} +3 -3
- package/dist/{react-DPFikgTM.js → react-C9oBRlX8.js} +3 -3
- package/dist/{react-qa12DkXH.js → react-D5yWOfXN.js} +3 -3
- package/dist/{react-DOgLiyZi.js → react-DkQKleWD.js} +2 -2
- package/dist/{react-y4vaW3OH.js → react-d-THpGrV.js} +3 -3
- package/dist/{react-BjO903pN.js → react-euSb4sIX.js} +3 -3
- package/dist/ui/chat/ActionDock/ActionDock.d.ts +15 -0
- package/dist/ui/chat/ChatBubble/ChatBubble.d.ts +10 -3
- package/dist/ui/chat/ChatLog/ChatLog.d.ts +9 -4
- package/dist/ui/chat/EditBanner/EditBanner.d.ts +9 -3
- package/dist/ui/chat/HintDisclosure/HintDisclosure.d.ts +20 -0
- package/dist/ui/chat/SummaryCard/SummaryCard.d.ts +18 -23
- package/dist/ui/chat/types.d.ts +18 -2
- package/dist/ui/constants.d.ts +5 -0
- package/dist/ui/hooks/usePreventPaste.d.ts +17 -0
- package/dist/ui/inputs/LocationAnswerInput/LocationAnswerInput.d.ts +34 -0
- package/dist/ui/inputs/PhoneAnswerInput/PhoneAnswerInput.d.ts +5 -2
- package/dist/ui/inputs/SliderInput/SliderInput.d.ts +1 -2
- package/dist/ui/inputs/TextAnswerInput/TextAnswerInput.d.ts +38 -11
- package/dist/ui/media/EmbeddedVideo/EmbeddedVideoPlayer.d.ts +1 -1
- package/dist/ui/primitives/MarkdownText/MarkdownText.d.ts +24 -0
- package/dist/ui/shell/CohortClosedScreen/CohortClosedScreen.d.ts +9 -0
- package/dist/ui/shell/CopyLinkButton/CopyLinkButton.d.ts +10 -3
- package/dist/ui/shell/DoneScreen/DoneScreen.d.ts +4 -1
- package/dist/ui/shell/Header/AutoScrollTitle.d.ts +15 -0
- package/dist/ui/shell/Header/Header.d.ts +12 -0
- package/dist/ui/shell/Header/useAutoScrollTitle.d.ts +16 -0
- package/dist/ui/shell/TerminalMessageScreen/TerminalMessageScreen.d.ts +10 -0
- package/dist/ui/shell/WidgetRoot/themeVariables.d.ts +8 -0
- package/dist-umd/sapia-chatbot.umd.js +309 -309
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./react-
|
|
1
|
+
import { T as e } from "./messages-C00e82NS.js";
|
|
2
|
+
import { t } from "./react-DkQKleWD.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/react-player@3.4.0_@svta+cml-cta@1.0.6_@svta+cml-structured-field-values@1.1.3_@svta+cm_a4f64f295cc2a316f39ce360b0a6e480/node_modules/react-player/dist/Preview.js
|
|
4
4
|
var n = /* @__PURE__ */ e(t(), 1), r = "64px", i = {}, a = ({ src: e, light: t, oEmbedUrl: a, onClickPreview: o, playIcon: s, previewTabIndex: c, previewAriaLabel: l }) => {
|
|
5
5
|
let [u, d] = (0, n.useState)(null);
|
|
@@ -81,4 +81,4 @@ var n = /* @__PURE__ */ e(t(), 1), r = "64px", i = {}, a = ({ src: e, light: t,
|
|
|
81
81
|
//#endregion
|
|
82
82
|
export { a as default };
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=Preview-
|
|
84
|
+
//# sourceMappingURL=Preview-Dd7KyhMk.js.map
|
package/dist/api/client.d.ts
CHANGED
|
@@ -18,10 +18,16 @@ export type NextStreamHandlers = {
|
|
|
18
18
|
* bundled message (consecutive hints arrive as separate baseIds in one run).
|
|
19
19
|
*/
|
|
20
20
|
onDelta: (text: string, messageId: string) => void;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Optional leading frame carrying the question structure (types/rules/options) before the text.
|
|
23
|
+
* `messageId` is the baseId the following TEXT_MESSAGE_* frames prefix their ids with, so a
|
|
24
|
+
* caller buffering several bundled messages can pair each one with its own snapshot.
|
|
25
|
+
*/
|
|
26
|
+
onMeta?: (question: Question, messageId: string) => void;
|
|
27
|
+
/** "What to expect" counts, emitted at the position of the summary bubble inside a message. */
|
|
24
28
|
onSummary?: (summary: AssessmentSummary) => void;
|
|
29
|
+
/** The assessment's resume link, emitted at the position of the copy-link bubble. */
|
|
30
|
+
onLink?: (url: string) => void;
|
|
25
31
|
/** Aborts the in-flight stream (new request / unmount). */
|
|
26
32
|
signal?: AbortSignal;
|
|
27
33
|
};
|
|
@@ -45,9 +51,7 @@ export declare class ChatbotApiClient {
|
|
|
45
51
|
* `type`. Fires onMeta from STATE_SNAPSHOT and onDelta per TEXT_MESSAGE_CONTENT,
|
|
46
52
|
* then resolves with the authoritative NextResponse carried by RUN_FINISHED.
|
|
47
53
|
*/
|
|
48
|
-
nextStream(assessmentId: string, candidateResponse: CandidateResponseInput | undefined, handlers: NextStreamHandlers
|
|
49
|
-
summaryContinued?: boolean;
|
|
50
|
-
}): Promise<NextResponse | undefined>;
|
|
54
|
+
nextStream(assessmentId: string, candidateResponse: CandidateResponseInput | undefined, handlers: NextStreamHandlers): Promise<NextResponse | undefined>;
|
|
51
55
|
editAnswer(assessmentId: string, editCandidateResponse: EditCandidateResponseInput): Promise<EditAnswerResponse>;
|
|
52
56
|
extractHumanName(assessmentId: string, input: {
|
|
53
57
|
userText: string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type Coordinate = {
|
|
2
|
+
lat: number;
|
|
3
|
+
lng: number;
|
|
4
|
+
};
|
|
5
|
+
/** The answer value the backend parses for a location PII question. */
|
|
6
|
+
export type LocationAnswer = {
|
|
7
|
+
address: string;
|
|
8
|
+
coordinate: Coordinate | null;
|
|
9
|
+
};
|
|
10
|
+
export type PlaceSuggestion = {
|
|
11
|
+
placeId: string;
|
|
12
|
+
/** Full prediction text, used as the accessible option label. */
|
|
13
|
+
description: string;
|
|
14
|
+
mainText: string;
|
|
15
|
+
secondaryText: string;
|
|
16
|
+
};
|
|
17
|
+
export type PlacesRequest = {
|
|
18
|
+
/** Host override; defaults to the key legacy ships. */
|
|
19
|
+
apiKey?: string;
|
|
20
|
+
signal?: AbortSignal;
|
|
21
|
+
/**
|
|
22
|
+
* Injected transport. Unit tests only — nothing in the app passes it, including the demo's
|
|
23
|
+
* offline mock, so a location question in `?stream=mock` makes real Places requests.
|
|
24
|
+
*/
|
|
25
|
+
fetchImpl?: typeof fetch;
|
|
26
|
+
};
|
|
27
|
+
/** Address predictions for what the candidate has typed so far. */
|
|
28
|
+
export declare const fetchPlaceSuggestions: (input: string, options?: PlacesRequest) => Promise<PlaceSuggestion[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Resolves a chosen prediction to the answer we store. Falls back to the prediction's own text when
|
|
31
|
+
* the details call returns no formatted address, so a selection never submits an empty address.
|
|
32
|
+
*/
|
|
33
|
+
export declare const fetchPlaceAnswer: (suggestion: PlaceSuggestion, options?: PlacesRequest) => Promise<LocationAnswer>;
|
|
@@ -18,7 +18,9 @@ export declare enum QuestionType {
|
|
|
18
18
|
VIDEO = "VIDEO",
|
|
19
19
|
SLIDER = "SLIDER",
|
|
20
20
|
DROPDOWN = "DROPDOWN",
|
|
21
|
-
BGQ = "BUTTON_GROUP_QUESTION"
|
|
21
|
+
BGQ = "BUTTON_GROUP_QUESTION",
|
|
22
|
+
/** Text the candidate acknowledges with a single button; carries no assessed answer. */
|
|
23
|
+
BREAK = "BREAK"
|
|
22
24
|
}
|
|
23
25
|
export declare enum ContentType {
|
|
24
26
|
TEXT = "TEXT",
|
|
@@ -65,7 +67,23 @@ export declare enum AssessmentStatus {
|
|
|
65
67
|
FI_PREDICTION_COMPLETED = "FI_PREDICTION_COMPLETED",
|
|
66
68
|
FI_ASSESSMENT_DUPLICATED = "FI_ASSESSMENT_DUPLICATED"
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Backend message identifiers the widget branches on. The wire carries many more; only the ones
|
|
72
|
+
* with FE behaviour are enumerated, and the bubble field stays widened to `string` so unknown
|
|
73
|
+
* identifiers pass through untouched.
|
|
74
|
+
*/
|
|
75
|
+
export declare enum MessageIdentifier {
|
|
76
|
+
SMS_CONSENT_QUESTION = "SMS_CONSENT_QUESTION_MESSAGE",
|
|
77
|
+
SMS_CONSENT_ANSWER = "SMS_CONSENT_ANSWER_MESSAGE",
|
|
78
|
+
TERMS_CONSENT_QUESTION = "TERMS_AND_CONDITIONS_CONSENT_QUESTION_MESSAGE",
|
|
79
|
+
TERMS_CONSENT_ANSWER = "TERMS_AND_CONDITIONS_CONSENT_ANSWER_MESSAGE",
|
|
80
|
+
SUBMIT_QUESTION = "SUBMIT_QUESTION_MESSAGE",
|
|
81
|
+
SUBMIT_ANSWER = "SUBMIT_ANSWER_MESSAGE",
|
|
82
|
+
RATING_CUSTOMER_SATISFACTION_QUESTION = "RATING_CUSTOMER_SATISFACTION_QUESTION_MESSAGE",
|
|
83
|
+
RATING_CUSTOMER_SATISFACTION_ANSWER = "RATING_CUSTOMER_SATISFACTION_ANSWER_MESSAGE",
|
|
84
|
+
FEEDBACK_CUSTOMER_SATISFACTION_QUESTION = "FEEDBACK_CUSTOMER_SATISFACTION_QUESTION_MESSAGE",
|
|
85
|
+
FEEDBACK_CUSTOMER_SATISFACTION_ANSWER = "FEEDBACK_CUSTOMER_SATISFACTION_ANSWER_MESSAGE"
|
|
86
|
+
}
|
|
69
87
|
export type Trigger = {
|
|
70
88
|
action: string;
|
|
71
89
|
};
|
|
@@ -102,7 +120,20 @@ export declare enum ContentComponent {
|
|
|
102
120
|
TEXT = "Text",
|
|
103
121
|
VOICE_PLAYER = "VoicePlayer",
|
|
104
122
|
VIDEO_PLAYER = "VideoPlayer",
|
|
105
|
-
SLIDER = "Slider"
|
|
123
|
+
SLIDER = "Slider",
|
|
124
|
+
/** The bubble is a placeholder for the "what to expect" card, not text. */
|
|
125
|
+
ASSESSMENT_SUMMARY = "AssessmentSummary",
|
|
126
|
+
/** The bubble is a placeholder for the resume-link control, not text. */
|
|
127
|
+
COPY_LINK = "CopyLink"
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Whole-bubble values the backend uses to mark a content bubble as a card placeholder. The stream
|
|
131
|
+
* never sends them — it emits an event at that bubble's position instead — so these are only
|
|
132
|
+
* reached on a transcript stored before the backend began annotating `component`.
|
|
133
|
+
*/
|
|
134
|
+
export declare enum ContentMarker {
|
|
135
|
+
ASSESSMENT_SUMMARY = "{assessment.summary}",
|
|
136
|
+
ASSESSMENT_LINK = "{assessment.link}"
|
|
106
137
|
}
|
|
107
138
|
/** BE message kind: an unanswerable agent aside vs a real question. */
|
|
108
139
|
export declare enum MessageKind {
|
|
@@ -146,7 +177,7 @@ export type Answer = {
|
|
|
146
177
|
export interface Message<T> {
|
|
147
178
|
id: string;
|
|
148
179
|
sender: MessageSender;
|
|
149
|
-
messageIdentifier?: MessageIdentifier;
|
|
180
|
+
messageIdentifier?: MessageIdentifier | string;
|
|
150
181
|
data: T;
|
|
151
182
|
}
|
|
152
183
|
export type CandidateResponse = Message<Answer>;
|
|
@@ -27,11 +27,16 @@ export type StartAtsResponse = {
|
|
|
27
27
|
/** Role/position title for the welcome + header (optional; falls back to branding.title). */
|
|
28
28
|
roleTitle?: string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
30
|
+
* "What to expect" counts. Returned here too (not just on the stream) so they survive reload —
|
|
31
|
+
* re-hydration goes through /start, which never replays the stream. The store captures whichever
|
|
32
|
+
* source arrives first.
|
|
33
33
|
*/
|
|
34
34
|
summary?: AssessmentSummary;
|
|
35
|
+
/**
|
|
36
|
+
* The assessment's resume link, for the copy-link bubble on a reloaded transcript (the stream's
|
|
37
|
+
* ASSESSMENT_LINK frame is the live source). Absent until the backend ships the field.
|
|
38
|
+
*/
|
|
39
|
+
assessmentLink?: string;
|
|
35
40
|
};
|
|
36
41
|
export type NextResponse = {
|
|
37
42
|
nextResponse: AgentResponse;
|
|
@@ -65,6 +70,7 @@ export type VideoSignedUrlResponse = {
|
|
|
65
70
|
export type AccessManagementResponse = {
|
|
66
71
|
shouldAuthenticate: boolean;
|
|
67
72
|
emailHint?: string;
|
|
73
|
+
/** Assessment language; the gate renders before /start/ats, so this is its only source. */
|
|
68
74
|
language?: string;
|
|
69
75
|
};
|
|
70
76
|
/** POST verify-access — whether the candidate email matches. */
|
|
@@ -81,6 +87,7 @@ export declare enum AgUiEventType {
|
|
|
81
87
|
RUN_STARTED = "RUN_STARTED",
|
|
82
88
|
STATE_SNAPSHOT = "STATE_SNAPSHOT",
|
|
83
89
|
ASSESSMENT_SUMMARY = "ASSESSMENT_SUMMARY",
|
|
90
|
+
ASSESSMENT_LINK = "ASSESSMENT_LINK",
|
|
84
91
|
TEXT_MESSAGE_START = "TEXT_MESSAGE_START",
|
|
85
92
|
TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT",
|
|
86
93
|
TEXT_MESSAGE_END = "TEXT_MESSAGE_END",
|
|
@@ -88,16 +95,10 @@ export declare enum AgUiEventType {
|
|
|
88
95
|
RUN_FINISHED = "RUN_FINISHED",
|
|
89
96
|
RUN_ERROR = "RUN_ERROR"
|
|
90
97
|
}
|
|
91
|
-
/** Lifecycle of the BE-authored Continue action on the pre-interview summary. */
|
|
92
|
-
export declare enum SummaryActionStatus {
|
|
93
|
-
/** The BE stopped at the gate and is waiting for the click. */
|
|
94
|
-
PENDING = "PENDING",
|
|
95
|
-
/** The gate is already past (reload after continuing). */
|
|
96
|
-
CLICKED = "CLICKED"
|
|
97
|
-
}
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
100
|
-
* The backend sends structured counts only; the
|
|
99
|
+
* "What to expect" counts for the card the client draws inside the introduction break (AG-UI
|
|
100
|
+
* ASSESSMENT_SUMMARY). The backend sends structured counts only; the labels come from the
|
|
101
|
+
* translation file.
|
|
101
102
|
*/
|
|
102
103
|
export type AssessmentSummary = {
|
|
103
104
|
title: string;
|
|
@@ -107,15 +108,15 @@ export type AssessmentSummary = {
|
|
|
107
108
|
type: QuestionType;
|
|
108
109
|
count: number;
|
|
109
110
|
}[];
|
|
110
|
-
/** BE-authored Continue action; status PENDING gates the dialogue, CLICKED is past the gate. */
|
|
111
|
-
continueAction: {
|
|
112
|
-
label: string;
|
|
113
|
-
status: SummaryActionStatus;
|
|
114
|
-
};
|
|
115
111
|
};
|
|
116
112
|
/** STATE_SNAPSHOT.snapshot.question — same data as our Question, but `types` is `questionTypes`. */
|
|
117
113
|
export type SnapshotQuestion = {
|
|
118
114
|
_id: string;
|
|
115
|
+
/**
|
|
116
|
+
* Id of the chat-log message this question belongs to — the baseId the TEXT_MESSAGE_* frames
|
|
117
|
+
* prefix their own ids with. Distinct from `_id`, which identifies the question itself.
|
|
118
|
+
*/
|
|
119
|
+
messageId?: string;
|
|
119
120
|
masterId?: string;
|
|
120
121
|
/** Bubble template: Hint (agent context, unanswerable) vs Question. */
|
|
121
122
|
kind?: MessageKind;
|
|
@@ -139,6 +140,8 @@ export type AgUiFrame = {
|
|
|
139
140
|
};
|
|
140
141
|
/** ASSESSMENT_SUMMARY payload (present only on that frame). */
|
|
141
142
|
summary?: AssessmentSummary;
|
|
143
|
+
/** ASSESSMENT_LINK payload — the assessment's resume link (present only on that frame). */
|
|
144
|
+
url?: string;
|
|
142
145
|
/** TEXT_MESSAGE_* message id, shape "<baseId>:<contentIndex>"; segments bundled messages. */
|
|
143
146
|
messageId?: string;
|
|
144
147
|
delta?: string;
|
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { s as API_ORIGIN_BY_ENV,
|
|
1
|
+
import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "./messages-C00e82NS.js";
|
|
2
|
+
export { s as API_ORIGIN_BY_ENV, c as AgUiEventType, _ as AssessmentStatus, f as ButtonType, t as CHATBOT_API_PATH, d as ChatbotApiClient, h as ContentComponent, l as ContentMarker, n as ContentType, y as DEFAULT_LOCAL_API_ORIGIN, x as ENVIRONMENTS, p as MessageIdentifier, g as MessageKind, i as MessageSender, u as PHService, v as PiiQuestionType, a as QuestionType, r as REGIONS, o as RuleName, m as VideoQuestionType, b as buildChatbotBaseUrl, e as resolveApiOrigin };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MessageItem } from './types';
|
|
2
|
+
/** A card a marker content bubble is drawn as, in place of its text. */
|
|
3
|
+
export declare enum BubbleCard {
|
|
4
|
+
ASSESSMENT_SUMMARY = "ASSESSMENT_SUMMARY",
|
|
5
|
+
COPY_LINK = "COPY_LINK"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The card this content bubble stands for, or undefined for ordinary text. The backend's
|
|
9
|
+
* `component` is authoritative; the raw value is matched as a fallback so a transcript stored
|
|
10
|
+
* before the backend annotated components still draws the card instead of printing the marker.
|
|
11
|
+
* Matched on the whole trimmed value — a marker embedded mid-sentence stays text, which is the
|
|
12
|
+
* rule the backend applies too.
|
|
13
|
+
*/
|
|
14
|
+
export declare const resolveBubbleCard: (item: MessageItem) => BubbleCard | undefined;
|
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
import { PiiQuestionType, VideoQuestionType, AgentResponse, CandidateResponse, Tag } from '../../api/types/messages';
|
|
2
|
-
import { MessageBubble } from './types';
|
|
1
|
+
import { MessageIdentifier, PiiQuestionType, VideoQuestionType, AgentResponse, CandidateResponse, Question, Tag } from '../../api/types/messages';
|
|
2
|
+
import { QuestionRole, MessageBubble } from './types';
|
|
3
3
|
export declare const piiQuestionTypeFromQuestionTags: (tags?: Tag[]) => PiiQuestionType | undefined;
|
|
4
4
|
export declare const videoQuestionTypeFromQuestionTags: (tags?: Tag[]) => VideoQuestionType | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Whether this question opts out of the paste block. An absent tag means blocked: the default is
|
|
7
|
+
* the restrictive one, so a question only becomes pasteable when the BE says so explicitly.
|
|
8
|
+
*/
|
|
9
|
+
export declare const questionTagsAllowPaste: (tags?: Tag[]) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Whether this question is the SMS-consent prompt. The BE marks it with a button-type tag rather
|
|
12
|
+
* than a dedicated message identifier, and the tag rides along on the answer bubble too.
|
|
13
|
+
*/
|
|
14
|
+
export declare const questionTagsAreSmsConsent: (tags?: Tag[]) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Classifies a question turn, mirroring the BE's checkIfNormalQuestion: an unanswerable turn is
|
|
17
|
+
* settled first, then a break, then `messageIdentifier` — the BE's own answer — and only then the raw signals
|
|
18
|
+
* the BE itself keys off (masterId, PH_BUTTON_TYPE tag, option triggers, usageWhitelist). The
|
|
19
|
+
* raw fallback exists because the streamed STATE_SNAPSHOT carries no identifier; without it a
|
|
20
|
+
* consent prompt would take an ordinal while it streams and lose it on settle.
|
|
21
|
+
*
|
|
22
|
+
* Submit and feedback are resolved before the consent gates, so a button carrying both markings
|
|
23
|
+
* can never come out as a counted question. SMS consent is resolved before terms consent because
|
|
24
|
+
* both ride the same tag name.
|
|
25
|
+
*/
|
|
26
|
+
export declare const resolveQuestionRole: (question?: Question, messageIdentifier?: MessageIdentifier | string) => QuestionRole;
|
|
5
27
|
export declare const convertRawCandidateResponseToMessageBubble: (response: CandidateResponse) => MessageBubble;
|
|
6
28
|
export declare const convertRawAgentResponseToMessageBubble: (response: AgentResponse, hasNext?: boolean) => MessageBubble;
|
|
7
29
|
export declare const convertRawResponseToMessageBubble: (response: CandidateResponse | AgentResponse, hasNext?: boolean) => MessageBubble | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MessageBubble } from './types';
|
|
2
|
+
/** A turn that counts as an interview question — see QuestionRole. */
|
|
3
|
+
export declare const isNormalQuestionBubble: (bubble: MessageBubble) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* 1-based ordinal for each normal agent question turn, keyed by bubble id. Bubbles absent from
|
|
6
|
+
* the map take no "Question n of N" eyebrow.
|
|
7
|
+
*/
|
|
8
|
+
export declare const normalQuestionOrdinals: (bubbles: MessageBubble[]) => Map<string, number>;
|
|
9
|
+
/** Normal questions the candidate has answered — the progress bar's value. */
|
|
10
|
+
export declare const normalAnswerCount: (bubbles: MessageBubble[]) => number;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import { AnswerContent, ContentComponent, ContentType, MessageKind, MessageIdentifier, MessageSender, PHService, PiiQuestionType, QuestionRule, QuestionType, Style, Tag, Trigger, VideoQuestionType } from '../../api/types/messages';
|
|
2
|
+
/**
|
|
3
|
+
* What a question turn is for. Only NORMAL turns are interview questions: they are the ones the
|
|
4
|
+
* BE counts in `numOfNormalQuestion`, so they are the only ones that may take an ordinal in
|
|
5
|
+
* "Question n of N" or move the progress bar. Every other role is scaffolding around the
|
|
6
|
+
* interview (an aside, an identity field, a consent gate, the submit button, post-submit
|
|
7
|
+
* feedback). Resolved once at conversion — see `resolveQuestionRole`.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum QuestionRole {
|
|
10
|
+
NORMAL = "NORMAL",
|
|
11
|
+
HINT = "HINT",
|
|
12
|
+
PII = "PII",
|
|
13
|
+
TERMS_CONSENT = "TERMS_CONSENT",
|
|
14
|
+
SMS_CONSENT = "SMS_CONSENT",
|
|
15
|
+
SUBMIT = "SUBMIT",
|
|
16
|
+
CUSTOMER_SATISFACTION = "CUSTOMER_SATISFACTION",
|
|
17
|
+
/** An acknowledgement step in the introduction — blocking, but never a counted question. */
|
|
18
|
+
BREAK = "BREAK"
|
|
19
|
+
}
|
|
2
20
|
export declare enum BubbleStatus {
|
|
3
21
|
ANSWERED = "ANSWERED",
|
|
4
22
|
ANSWERING = "ANSWERING",
|
|
@@ -32,7 +50,7 @@ export type MessageBubbleData = {
|
|
|
32
50
|
export type MessageBubble = {
|
|
33
51
|
status: BubbleStatus;
|
|
34
52
|
sender: MessageSender;
|
|
35
|
-
messageIdentifier?: MessageIdentifier;
|
|
53
|
+
messageIdentifier?: MessageIdentifier | string;
|
|
36
54
|
id: string;
|
|
37
55
|
types: QuestionType[];
|
|
38
56
|
usageWhitelist?: PHService[];
|
|
@@ -41,6 +59,8 @@ export type MessageBubble = {
|
|
|
41
59
|
masterId?: string;
|
|
42
60
|
/** BE-provided message kind; falls back to `types` when absent. */
|
|
43
61
|
messageKind?: MessageKind;
|
|
62
|
+
/** What this turn is for; only NORMAL turns are counted questions. */
|
|
63
|
+
questionRole: QuestionRole;
|
|
44
64
|
piiQuestionType?: PiiQuestionType;
|
|
45
65
|
videoQuestionType?: VideoQuestionType;
|
|
46
66
|
/** Video answer in flight: upload progress 0–1 (PENDING video bubbles). */
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AssessmentStatus } from '../api/types/messages';
|
|
1
2
|
/** Streaming reveal cadence: ms per char-step (React passes 0 under prefers-reduced-motion). */
|
|
2
3
|
export declare const STREAM_REVEAL_MS = 12;
|
|
3
4
|
/** Chars revealed per reveal tick — bounds store writes to ~60/s at the default cadence. */
|
|
@@ -6,9 +7,39 @@ export declare const STREAM_CHARS_PER_TICK = 2;
|
|
|
6
7
|
export declare const STREAM_BUBBLE_ID_PREFIX = "stream-live";
|
|
7
8
|
export declare const QUESTION_TAG_PII_TYPE = "PII_TYPE";
|
|
8
9
|
export declare const QUESTION_TAG_VIDEO_TYPE = "VIDEO_TYPE";
|
|
10
|
+
export declare const QUESTION_TAG_PH_BUTTON_TYPE = "PH_BUTTON_TYPE";
|
|
11
|
+
/** Question tag opting a single question out of the paste block. */
|
|
12
|
+
export declare const QUESTION_TAG_ALLOW_PASTE = "ALLOW_PASTE";
|
|
13
|
+
/** PH_BUTTON_TYPE value marking the SMS-consent prompt and its answer. */
|
|
14
|
+
export declare const QUESTION_TAG_VALUE_SMS_CONSENT = "ph_sms_consent";
|
|
15
|
+
/** PH_BUTTON_TYPE value marking the terms-and-conditions consent prompt and its answer. */
|
|
16
|
+
export declare const QUESTION_TAG_VALUE_TERMS_CONSENT = "ph_i_accept";
|
|
17
|
+
/** masterId the BE gives the terms-and-conditions consent prompt. */
|
|
18
|
+
export declare const QUESTION_MASTER_ID_TERMS_CONSENT = "ph_i_accept";
|
|
19
|
+
/** masterId the BE gives the final submit button. */
|
|
20
|
+
export declare const QUESTION_MASTER_ID_SUBMIT = "ph_submit_assessment";
|
|
21
|
+
/** BGQ option trigger actions the BE reads as "this is the consent / submit button". */
|
|
22
|
+
export declare const TRIGGER_ACTION_CONSENT = "continue_assessment_with_consent";
|
|
23
|
+
export declare const TRIGGER_ACTION_SUBMIT = "submit_assessment";
|
|
24
|
+
/** Trigger on a break's single button; the click only advances the dialogue. */
|
|
25
|
+
export declare const TRIGGER_ACTION_BREAK = "continue_dialogue";
|
|
26
|
+
/** Fixed answer value a break acknowledgement stores — nothing reads it back. */
|
|
27
|
+
export declare const ANSWER_VALUE_BREAK_CONTINUE = "ph_continue_dialogue";
|
|
28
|
+
/** Tag values are wire strings, not booleans; only the exact string counts as opt-in. */
|
|
29
|
+
export declare const QUESTION_TAG_VALUE_TRUE = "true";
|
|
30
|
+
/**
|
|
31
|
+
* Statuses the assessment reaches once the candidate has pressed the final submit. Every answer
|
|
32
|
+
* is final from that point, so the chat log drops its Edit affordances.
|
|
33
|
+
*/
|
|
34
|
+
export declare const SUBMITTED_ASSESSMENT_STATUSES: readonly AssessmentStatus[];
|
|
9
35
|
/** Experience-rating slider range and starting position (legacy defaultSliderValue). */
|
|
10
36
|
export declare const SLIDER_MIN = 1;
|
|
11
37
|
export declare const SLIDER_MAX = 10;
|
|
12
38
|
export declare const SLIDER_DEFAULT_VALUE = 8;
|
|
13
39
|
/** Default video answer length when the question carries no max-seconds rule. */
|
|
14
40
|
export declare const MAX_VIDEO_SECONDS_DEFAULT = 60;
|
|
41
|
+
/**
|
|
42
|
+
* Answer text the backend reads as "the candidate skipped the optional feedback comment". Sending
|
|
43
|
+
* nothing is a valid answer there, so an empty composer submits this sentinel rather than ''.
|
|
44
|
+
*/
|
|
45
|
+
export declare const SKIP_FEEDBACK_COMMENT_TEXT = "SAPIA_SKIP_FEEDBACK";
|
package/dist/core/events.d.ts
CHANGED
|
@@ -12,8 +12,15 @@ export type ChatbotEventMap = {
|
|
|
12
12
|
[CHATBOT_EVENTS.ASSESSMENT_STARTED]: {
|
|
13
13
|
assessmentId: string;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* `justCompleted` is true only when the interview finished during this session — the legacy
|
|
17
|
+
* FI_ASSESSMENT_ENDED semantics (fired off a /next with no next question). It is false when the
|
|
18
|
+
* assessment was already over on load, or ended on a terminal message, where legacy stayed
|
|
19
|
+
* silent. A host acting on the end of an interview (an auto-redirect, analytics) must gate on it.
|
|
20
|
+
*/
|
|
15
21
|
[CHATBOT_EVENTS.ASSESSMENT_ENDED]: {
|
|
16
22
|
assessmentId: string;
|
|
23
|
+
justCompleted: boolean;
|
|
17
24
|
};
|
|
18
25
|
[CHATBOT_EVENTS.ASSESSMENT_DUPLICATED]: {
|
|
19
26
|
assessmentId: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Query params the widget honours on the hosting page. Mirrors legacy src/types/UrlParamKey.ts. */
|
|
2
|
+
export declare enum UrlParamKey {
|
|
3
|
+
/** Legacy internal-tester flag; bypasses the paste block. */
|
|
4
|
+
INTERNAL_USER = "internalUser",
|
|
5
|
+
/** Sapia-staff flag; same bypass, kept separate so hosts can tell the two audiences apart. */
|
|
6
|
+
SAPIAN = "sapian"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reads the internal-session flags off the host page URL. Either param unlocks paste, so a tester
|
|
10
|
+
* can re-enable it from the address bar without a host redeploy — the block is an integrity signal
|
|
11
|
+
* aimed at candidates, not a security boundary.
|
|
12
|
+
*/
|
|
13
|
+
export declare const isInternalUserFromUrl: () => boolean;
|
package/dist/core/interview.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChatbotApiClient } from '../api/client';
|
|
2
2
|
import { PiiErrorKey } from './validation/pii';
|
|
3
|
+
import { LocationAnswer } from '../api/places';
|
|
3
4
|
import { ChatbotEventEmitter } from './events';
|
|
4
5
|
import { InterviewStore } from './store';
|
|
5
6
|
export declare const ERROR_TYPE_START_FAILED = "FI_START_ASSESSMENT_FAILED";
|
|
@@ -12,6 +13,7 @@ export declare const ERROR_TYPE_VERIFY_ACCESS_FAILED = "FI_VERIFY_ACCESS_FAILED"
|
|
|
12
13
|
export declare const ERROR_TYPE_DETECT_AGC_FAILED = "FI_DETECT_AGC_FAILED";
|
|
13
14
|
export declare const LOG_TYPE_INVALID_PHONE_NUMBER = "INVALID_PHONE_NUMBER";
|
|
14
15
|
export declare const LOG_TYPE_INVALID_PASTE_ANSWER_ACTION = "INVALID_PASTE_ANSWER_ACTION";
|
|
16
|
+
export declare const LOG_TYPE_INVALID_REDIRECT_URL = "INVALID_REDIRECT_URL";
|
|
15
17
|
/** Outcome of a validated PII submission (drives the UI error/confirm modals). */
|
|
16
18
|
export declare enum PiiSubmitStatus {
|
|
17
19
|
SUBMITTED = "submitted",
|
|
@@ -48,7 +50,8 @@ export declare class InterviewEngine {
|
|
|
48
50
|
private readonly emitter;
|
|
49
51
|
private readonly assessmentId;
|
|
50
52
|
private readonly userAgent;
|
|
51
|
-
|
|
53
|
+
/** Reassigned when /access-management names the assessment language before the gate. */
|
|
54
|
+
private language;
|
|
52
55
|
private readonly welcomeGate;
|
|
53
56
|
private readonly streamRevealMs;
|
|
54
57
|
/** Aborts the in-flight stream when a new load starts. */
|
|
@@ -81,8 +84,6 @@ export declare class InterviewEngine {
|
|
|
81
84
|
* the agent's opening message(s). No-op unless we're holding at the gate.
|
|
82
85
|
*/
|
|
83
86
|
confirmWelcome(): Promise<void>;
|
|
84
|
-
/** Candidate clicked Continue on the summary gate — re-call next/stream to stream the dialogue. */
|
|
85
|
-
continueFromSummary(): Promise<void>;
|
|
86
87
|
/**
|
|
87
88
|
* Ported from legacy firstLoadMessageBasedOnChatLogs: empty history → fetch the
|
|
88
89
|
* first message; history ending in a HINT (either the agent's question or the
|
|
@@ -112,11 +113,12 @@ export declare class InterviewEngine {
|
|
|
112
113
|
submitNameAnswer(text: string): Promise<PiiSubmitOutcome>;
|
|
113
114
|
/** Submit the name value the candidate confirmed in the extraction modal. */
|
|
114
115
|
submitNameConfirmed(text: string): Promise<void>;
|
|
115
|
-
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Submit a location PII answer (legacy handleSelectLocation). The value must be JSON: the backend
|
|
118
|
+
* parses it before reading `address`/`coordinate`, so a bare address string fails the request.
|
|
119
|
+
* A null coordinate is accepted — it stores the answer without a mappable location.
|
|
120
|
+
*/
|
|
121
|
+
submitLocationAnswer(location: LocationAnswer): Promise<void>;
|
|
120
122
|
/**
|
|
121
123
|
* Re-edit a previously answered question (legacy EDIT_MODE_ENTER): mark its
|
|
122
124
|
* candidate bubble EDITING so the input/options re-appear; the next submit
|
|
@@ -146,6 +148,12 @@ export declare class InterviewEngine {
|
|
|
146
148
|
private editExistingAnswer;
|
|
147
149
|
/** Question being answered: the one under edit if editing, else the last agent bubble. */
|
|
148
150
|
private currentEditableQuestionId;
|
|
151
|
+
/**
|
|
152
|
+
* PII subtype of the question the composer targets. Must follow the edit like
|
|
153
|
+
* currentEditableQuestionId does: re-editing an earlier name answer while the interview
|
|
154
|
+
* has moved on would otherwise validate against a later, non-PII question and reject
|
|
155
|
+
* every input.
|
|
156
|
+
*/
|
|
149
157
|
private currentPiiType;
|
|
150
158
|
/**
|
|
151
159
|
* Submit the selected option (MCQ/DROPDOWN/BGQ, incl. the terms-accept MCQ) of the
|
|
@@ -163,7 +171,9 @@ export declare class InterviewEngine {
|
|
|
163
171
|
continueAfterAgcWarning(): Promise<void>;
|
|
164
172
|
/** Dismiss the AGC warning to edit the answer (legacy "Edit"). */
|
|
165
173
|
dismissAgcWarning(): void;
|
|
166
|
-
/**
|
|
174
|
+
/** Dismiss the edit-failure dialog; the composer reopens on the edit, so send retries it. */
|
|
175
|
+
dismissEditFailure(): void;
|
|
176
|
+
/** Emits the legacy INVALID_PASTE_ANSWER_ACTION log; fires only once a paste has been refused. */
|
|
167
177
|
reportPaste(): void;
|
|
168
178
|
/** Submit the experience-rating slider score (legacy handleSubmitRating). */
|
|
169
179
|
submitSliderAnswer(score: number): Promise<void>;
|
|
@@ -174,6 +184,13 @@ export declare class InterviewEngine {
|
|
|
174
184
|
private currentQuestionId;
|
|
175
185
|
/** The synthetic candidate bubble holding the question's selectable options. */
|
|
176
186
|
private inlineCandidateBubble;
|
|
187
|
+
/**
|
|
188
|
+
* The role of the question this answer belongs to, read off its agent bubble. Locally-built
|
|
189
|
+
* answer bubbles must carry it: an optimistic bubble that settles without a server echo keeps
|
|
190
|
+
* the role assigned here, and a PII or consent answer wrongly marked NORMAL would move the
|
|
191
|
+
* progress bar.
|
|
192
|
+
*/
|
|
193
|
+
private questionRoleFor;
|
|
177
194
|
private appendOptimisticCandidateBubble;
|
|
178
195
|
private setPendingBubbleStatus;
|
|
179
196
|
/** Swap the in-flight bubble for the server-confirmed candidate response. */
|
|
@@ -2,3 +2,6 @@
|
|
|
2
2
|
export declare const getVerifiedEmail: (assessmentId: string, now?: number) => string | undefined;
|
|
3
3
|
/** Persist a verified email for the assessment with the 30-minute legacy TTL. */
|
|
4
4
|
export declare const saveVerifiedEmail: (assessmentId: string, candidateEmail: string, now?: number) => void;
|
|
5
|
+
/** Whether the candidate opted out of the below-minimum word-count warning for this assessment. */
|
|
6
|
+
export declare const getSkipShortAnswerWarning: (assessmentId: string) => boolean;
|
|
7
|
+
export declare const setSkipShortAnswerWarning: (assessmentId: string, skip: boolean) => void;
|
package/dist/core/store.d.ts
CHANGED
|
@@ -12,7 +12,15 @@ export declare enum InterviewPhase {
|
|
|
12
12
|
WELCOME = "welcome",
|
|
13
13
|
ACTIVE = "active",
|
|
14
14
|
ENDED = "ended",
|
|
15
|
-
FAILED = "failed"
|
|
15
|
+
FAILED = "failed",
|
|
16
|
+
/** The cohort behind this assessment is closed; the interview can never be taken. */
|
|
17
|
+
COHORT_CLOSED = "cohort-closed",
|
|
18
|
+
/**
|
|
19
|
+
* The backend ended the interview with an explanatory message (archived cohort / reused
|
|
20
|
+
* assessment) rather than a completion. Distinct from ENDED so the shell shows the message
|
|
21
|
+
* instead of the completion screen.
|
|
22
|
+
*/
|
|
23
|
+
TERMINAL_MESSAGE = "terminal-message"
|
|
16
24
|
}
|
|
17
25
|
export type InterviewState = {
|
|
18
26
|
phase: InterviewPhase;
|
|
@@ -26,15 +34,14 @@ export type InterviewState = {
|
|
|
26
34
|
sendingAnswer: boolean;
|
|
27
35
|
numOfNormalQuestion: number;
|
|
28
36
|
numOfNormalAnswer: number;
|
|
29
|
-
/**
|
|
37
|
+
/** "What to expect" counts, drawn by the summary bubble inside the introduction break. */
|
|
30
38
|
assessmentSummary?: AssessmentSummary;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
summaryPinned?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Resume link for the copy-link bubble. From /start on reload and from the ASSESSMENT_LINK frame
|
|
41
|
+
* while streaming; the widget can be embedded on a host page, so the current URL is only a last
|
|
42
|
+
* resort.
|
|
43
|
+
*/
|
|
44
|
+
assessmentLink?: string;
|
|
38
45
|
branding?: Branding;
|
|
39
46
|
/** Candidate display name for the welcome/done screens (optional; from /start/ats). */
|
|
40
47
|
candidateName?: string;
|
|
@@ -53,12 +60,18 @@ export type InterviewState = {
|
|
|
53
60
|
/** AGC (automated-content) detection attempt count + whether another check is allowed. */
|
|
54
61
|
agcAttempt?: number;
|
|
55
62
|
allowNextAgcDetection?: boolean;
|
|
63
|
+
/** Terms accepted for this assessment; locks PII and SMS-consent answers against re-editing. */
|
|
64
|
+
termsAccepted?: boolean;
|
|
56
65
|
/** Show the AGC warning modal (automated content suspected on submit). */
|
|
57
66
|
showAgcWarning?: boolean;
|
|
67
|
+
/** Question whose edited answer failed to save; drives the retry dialog. */
|
|
68
|
+
editFailedQuestionId?: string;
|
|
58
69
|
/** Interview language (resolved); drives translations + text direction. */
|
|
59
70
|
language?: string;
|
|
60
71
|
/** Fetched translation file (flat key/value); undefined → bundled fallback only. */
|
|
61
72
|
translations?: Record<string, string>;
|
|
73
|
+
/** Backend copy for TERMINAL_MESSAGE (archived cohort / reused assessment), as markdown. */
|
|
74
|
+
terminalMessage?: string;
|
|
62
75
|
lastError?: {
|
|
63
76
|
type: string;
|
|
64
77
|
message: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const countWords: (text: string) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./react-
|
|
1
|
+
import { T as e } from "./messages-C00e82NS.js";
|
|
2
|
+
import { t } from "./react-DkQKleWD.js";
|
|
3
3
|
import { t as n } from "./defineProperty-DiFpLzd2.js";
|
|
4
4
|
import { n as r, t as i } from "./hls-mBncGwsE.js";
|
|
5
5
|
import { a, i as o, n as s, r as c, t as l } from "./classPrivateFieldSet2-DtQPURVD.js";
|
|
@@ -14324,4 +14324,4 @@ var Kw = Object.prototype.hasOwnProperty, qw = (e, t) => {
|
|
|
14324
14324
|
//#endregion
|
|
14325
14325
|
export { Or as MaxResolution, C as MediaError, kr as MinResolution, Ar as RenditionOrder, rT as default, ha as generatePlayerInitTime, nT as playerSoftwareName, tT as playerSoftwareVersion };
|
|
14326
14326
|
|
|
14327
|
-
//# sourceMappingURL=dist-
|
|
14327
|
+
//# sourceMappingURL=dist-waE-4cub.js.map
|
package/dist/embed/compat.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export type PHChatBotOptions = {
|
|
|
58
58
|
jobRequisitionShortcode?: string;
|
|
59
59
|
applicationShortcode?: string;
|
|
60
60
|
showHeader?: boolean;
|
|
61
|
-
/**
|
|
61
|
+
/** Internal session (Sapia staff / QA): permits paste on every question. */
|
|
62
62
|
isInternalUser?: boolean;
|
|
63
63
|
apiOrigin?: string;
|
|
64
64
|
};
|
|
@@ -9,8 +9,14 @@ export type CreateChatbotOptions = {
|
|
|
9
9
|
apiOrigin?: string;
|
|
10
10
|
theme?: Theme;
|
|
11
11
|
showHeader?: boolean;
|
|
12
|
+
/** Internal session (Sapia staff / QA): permits paste on every question. */
|
|
13
|
+
isInternalUser?: boolean;
|
|
12
14
|
/** Interview language override (e.g. "fr"); defaults to the browser language. */
|
|
13
15
|
language?: string;
|
|
16
|
+
/** Absolute http(s) URL offered as a "continue" CTA once the interview ends. */
|
|
17
|
+
redirectUrl?: string;
|
|
18
|
+
/** Host's own Google Places key for the location question; defaults to the bundled key. */
|
|
19
|
+
placesApiKey?: string;
|
|
14
20
|
/** Custom fetch (e.g. a mocked SSE stream for demos/tests). */
|
|
15
21
|
fetchImpl?: typeof fetch;
|
|
16
22
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as e } from "./messages-C00e82NS.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/fix-webm-duration@1.0.6/node_modules/fix-webm-duration/fix-webm-duration.js
|
|
3
3
|
var t = /* @__PURE__ */ e(((e, t) => {
|
|
4
4
|
(function(e, n) {
|
|
@@ -1054,4 +1054,4 @@ var t = /* @__PURE__ */ e(((e, t) => {
|
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
export default t();
|
|
1056
1056
|
|
|
1057
|
-
//# sourceMappingURL=fix-webm-duration-
|
|
1057
|
+
//# sourceMappingURL=fix-webm-duration-IniZA6tF.js.map
|