@sapia-ai/chatbot-v3 1.4.1 → 1.5.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-G554aRrZ.js → EmbeddedVideoPlayer-Dn-boxdp.js} +14 -14
- package/dist/{Preview-CSE0hI6e.js → Preview-CtMz5fNh.js} +3 -3
- package/dist/api/client.d.ts +2 -1
- package/dist/api/types/responses.d.ts +15 -0
- package/dist/api.js +2 -2
- package/dist/{client-DG-5x86F.js → client-DfRBtXIE.js} +34 -28
- package/dist/core/interview/engine.d.ts +12 -3
- package/dist/core/persistence.d.ts +4 -0
- package/dist/core/store.d.ts +6 -1
- package/dist/{dist-DsGdVwdi.js → dist-Cl2Oi3Sl.js} +3 -3
- package/dist/{fix-webm-duration-Bie2OG-n.js → fix-webm-duration-CVQSf7rp.js} +2 -2
- package/dist/index.js +5454 -5248
- package/dist/{jsx-runtime-B5vw3nIj.js → jsx-runtime-CdNykazB.js} +2 -2
- package/dist/react/AnswerInput.d.ts +6 -1
- package/dist/react/bubbleViewModel.d.ts +21 -1
- package/dist/react/strings.d.ts +4 -0
- package/dist/react/useVideoRecorder.d.ts +25 -4
- package/dist/{react-Dd6J2Pyv.js → react-78ZA32q8.js} +3 -3
- package/dist/{react-SKFkpgRr.js → react-BC7MhdYE.js} +3 -3
- package/dist/{react-CN-F_7qV.js → react-BIgNJUOD.js} +3 -3
- package/dist/{react-B46N_vb_.js → react-BKViU2cv.js} +3 -3
- package/dist/{react-abEVBgXB.js → react-BSaO3Elx.js} +3 -3
- package/dist/{react-DHdgNnK2.js → react-D4Z0N-x7.js} +2 -2
- package/dist/{react-T5LsuM9r.js → react-DEJ3NRa3.js} +3 -3
- package/dist/{react-_TUsDaHa.js → react-DlJlpUiG.js} +3 -3
- package/dist/{react-CpnhkRge.js → react-eOBKoj54.js} +3 -3
- package/dist/ui/chat/SummaryCard/SummaryCard.d.ts +2 -2
- package/dist/ui/chat/types.d.ts +5 -0
- package/dist/ui/inputs/VideoRecorder/VideoRecorder.d.ts +10 -1
- package/dist/ui/inputs/formCard.d.ts +1 -0
- package/dist/ui/media/VideoPlayer/VideoPlayer.d.ts +8 -4
- package/dist/ui/primitives/Dialog/Dialog.d.ts +2 -0
- package/dist/ui/shell/AgcGuidanceDialog/AgcGuidanceDialog.d.ts +13 -0
- package/dist/ui/shell/DoneScreen/DoneScreen.d.ts +3 -1
- package/dist/ui/shell/LogoTile/LogoTile.d.ts +10 -0
- package/dist-umd/sapia-chatbot.umd.js +264 -264
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./react-
|
|
3
|
-
import { t as n } from "./jsx-runtime-
|
|
1
|
+
import { B as e } from "./client-DfRBtXIE.js";
|
|
2
|
+
import { t } from "./react-D4Z0N-x7.js";
|
|
3
|
+
import { t as n } from "./jsx-runtime-CdNykazB.js";
|
|
4
4
|
import { t as r } from "./defineProperty-DiFpLzd2.js";
|
|
5
5
|
//#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/patterns.js
|
|
6
6
|
var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i, o = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, s = /\.(m3u8)($|\?)/i, c = /\.(mpd)($|\?)/i, l = /stream\.mux\.com\/(?!\w+\.m3u8)(\w+)/, u = /(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//, d = /vimeo\.com\/(?!progressive_redirect).+/, f = /(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/, p = /open\.spotify\.com\/(\w+)\/(\w+)/i, m = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+|(videos?\/|\?video=)\d+)($|\?)/, h = /tiktok\.com\/(?:player\/v1\/|share\/video\/|@[^/]+\/video\/)([0-9]+)/, g = (e, t) => {
|
|
@@ -34,7 +34,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
34
34
|
canEnablePIP: () => !0,
|
|
35
35
|
player: (0, i.lazy)(() => import(
|
|
36
36
|
/* webpackChunkName: 'reactPlayerHls' */
|
|
37
|
-
"./react-
|
|
37
|
+
"./react-DEJ3NRa3.js"
|
|
38
38
|
))
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -44,7 +44,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
44
44
|
canEnablePIP: () => !0,
|
|
45
45
|
player: (0, i.lazy)(() => import(
|
|
46
46
|
/* webpackChunkName: 'reactPlayerDash' */
|
|
47
|
-
"./react-
|
|
47
|
+
"./react-DlJlpUiG.js"
|
|
48
48
|
))
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -54,7 +54,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
54
54
|
canEnablePIP: () => !0,
|
|
55
55
|
player: (0, i.lazy)(() => import(
|
|
56
56
|
/* webpackChunkName: 'reactPlayerMux' */
|
|
57
|
-
"./dist-
|
|
57
|
+
"./dist-Cl2Oi3Sl.js"
|
|
58
58
|
))
|
|
59
59
|
},
|
|
60
60
|
{
|
|
@@ -63,7 +63,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
63
63
|
canPlay: _.youtube,
|
|
64
64
|
player: (0, i.lazy)(() => import(
|
|
65
65
|
/* webpackChunkName: 'reactPlayerYouTube' */
|
|
66
|
-
"./react-
|
|
66
|
+
"./react-BKViU2cv.js"
|
|
67
67
|
))
|
|
68
68
|
},
|
|
69
69
|
{
|
|
@@ -72,7 +72,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
72
72
|
canPlay: _.vimeo,
|
|
73
73
|
player: (0, i.lazy)(() => import(
|
|
74
74
|
/* webpackChunkName: 'reactPlayerVimeo' */
|
|
75
|
-
"./react-
|
|
75
|
+
"./react-BC7MhdYE.js"
|
|
76
76
|
))
|
|
77
77
|
},
|
|
78
78
|
{
|
|
@@ -82,7 +82,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
82
82
|
canEnablePIP: () => !0,
|
|
83
83
|
player: (0, i.lazy)(() => import(
|
|
84
84
|
/* webpackChunkName: 'reactPlayerWistia' */
|
|
85
|
-
"./react-
|
|
85
|
+
"./react-78ZA32q8.js"
|
|
86
86
|
))
|
|
87
87
|
},
|
|
88
88
|
{
|
|
@@ -92,7 +92,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
92
92
|
canEnablePIP: () => !1,
|
|
93
93
|
player: (0, i.lazy)(() => import(
|
|
94
94
|
/* webpackChunkName: 'reactPlayerSpotify' */
|
|
95
|
-
"./react-
|
|
95
|
+
"./react-BIgNJUOD.js"
|
|
96
96
|
))
|
|
97
97
|
},
|
|
98
98
|
{
|
|
@@ -102,7 +102,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
102
102
|
canEnablePIP: () => !1,
|
|
103
103
|
player: (0, i.lazy)(() => import(
|
|
104
104
|
/* webpackChunkName: 'reactPlayerTwitch' */
|
|
105
|
-
"./react-
|
|
105
|
+
"./react-eOBKoj54.js"
|
|
106
106
|
))
|
|
107
107
|
},
|
|
108
108
|
{
|
|
@@ -112,7 +112,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
112
112
|
canEnablePIP: () => !1,
|
|
113
113
|
player: (0, i.lazy)(() => import(
|
|
114
114
|
/* webpackChunkName: 'reactPlayerTiktok' */
|
|
115
|
-
"./react-
|
|
115
|
+
"./react-BSaO3Elx.js"
|
|
116
116
|
))
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -181,7 +181,7 @@ var i = /* @__PURE__ */ e(t(), 1), a = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3
|
|
|
181
181
|
x.displayName = "Player";
|
|
182
182
|
var ee = x, te = (0, i.lazy)(() => import(
|
|
183
183
|
/* webpackChunkName: 'reactPlayerPreview' */
|
|
184
|
-
"./Preview-
|
|
184
|
+
"./Preview-CtMz5fNh.js"
|
|
185
185
|
)), S = [], ne = (e, t) => {
|
|
186
186
|
let n = (n) => {
|
|
187
187
|
for (let t of [...S, ...e]) if (n && t.canPlay(n)) return t;
|
|
@@ -1297,4 +1297,4 @@ var $ = n(), xe = (e) => {
|
|
|
1297
1297
|
//#endregion
|
|
1298
1298
|
export { Me as EmbeddedVideoPlayer };
|
|
1299
1299
|
|
|
1300
|
-
//# sourceMappingURL=EmbeddedVideoPlayer-
|
|
1300
|
+
//# sourceMappingURL=EmbeddedVideoPlayer-Dn-boxdp.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./react-
|
|
1
|
+
import { B as e } from "./client-DfRBtXIE.js";
|
|
2
|
+
import { t } from "./react-D4Z0N-x7.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-CtMz5fNh.js.map
|
package/dist/api/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ChatbotClientConfig } from './config';
|
|
|
3
3
|
import { UnauthorizedError } from './errors';
|
|
4
4
|
import { HeldFiToken } from './fiToken';
|
|
5
5
|
import { CandidateResponseInput, EditCandidateResponseInput, Question } from './types/messages';
|
|
6
|
-
import { AccessManagementResponse, AssessmentSummary, CustomerSatisfactionFormField, DetectAgcResponse, EditAnswerResponse, ExtractHumanNameResponse, ExtractHumanNameType, NextResponse, PiiFormField, StartAtsResponse, TranslationResponse, VerifyAccessResponse, VideoSignedUrlResponse } from './types/responses';
|
|
6
|
+
import { AccessManagementResponse, AssessmentSummary, CustomerSatisfactionFormField, DetectAgcResponse, EditAnswerResponse, ExtractHumanNameResponse, ExtractHumanNameType, NextResponse, PiiFormField, ResolvedFeatureFlags, StartAtsResponse, TranslationResponse, VerifyAccessResponse, VideoSignedUrlResponse } from './types/responses';
|
|
7
7
|
export type ChatbotApiClientOptions = ChatbotClientConfig & {
|
|
8
8
|
/** Injectable for tests / instrumented hosts. */
|
|
9
9
|
httpClient?: AxiosInstance;
|
|
@@ -91,6 +91,7 @@ export declare class ChatbotApiClient {
|
|
|
91
91
|
uploadVideo(signedUrl: string, blob: Blob, extension: string, onProgress?: (fraction: number) => void): Promise<void>;
|
|
92
92
|
getVideoAccessUrl(assessmentId: string, questionId: string, extension: string): Promise<VideoSignedUrlResponse>;
|
|
93
93
|
detectAgc(assessmentId: string): Promise<DetectAgcResponse>;
|
|
94
|
+
resolveFeatureFlags(assessmentId: string): Promise<ResolvedFeatureFlags>;
|
|
94
95
|
getAccessManagement(assessmentId: string): Promise<AccessManagementResponse>;
|
|
95
96
|
verifyAccess(assessmentId: string, candidateEmail: string): Promise<VerifyAccessResponse>;
|
|
96
97
|
getTranslation(language: string): Promise<TranslationResponse>;
|
|
@@ -94,6 +94,21 @@ export type DetectAgcResponse = {
|
|
|
94
94
|
isAgc: boolean;
|
|
95
95
|
allowNextAgcDetection: boolean;
|
|
96
96
|
};
|
|
97
|
+
/** Keys of the `ci` flag row core-fi serves. Each value must match the row key exactly. */
|
|
98
|
+
export declare enum FeatureFlagKey {
|
|
99
|
+
/** Opt-out: on for everyone, off for customers listed in the row's excludeCustomerIds. */
|
|
100
|
+
AGC = "agc"
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* POST feature-flags. A flag core-fi does not serve, or has paused, is absent from the map — each
|
|
104
|
+
* reader decides what absent means for its own feature.
|
|
105
|
+
*/
|
|
106
|
+
export type ResolvedFeatureFlags = Partial<Record<FeatureFlagKey, {
|
|
107
|
+
enabled: boolean;
|
|
108
|
+
}>>;
|
|
109
|
+
export type FeatureFlagsResponse = {
|
|
110
|
+
flags: ResolvedFeatureFlags;
|
|
111
|
+
};
|
|
97
112
|
export declare enum AgUiEventType {
|
|
98
113
|
RUN_STARTED = "RUN_STARTED",
|
|
99
114
|
STATE_SNAPSHOT = "STATE_SNAPSHOT",
|
package/dist/api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n,
|
|
2
|
-
export {
|
|
1
|
+
import { A as e, C as t, D as n, F as r, I as i, L as a, M as o, N as s, O as c, P as l, S as u, T as d, _ as f, a as p, b as m, c as h, d as g, f as _, g as v, h as y, i as b, j as x, k as S, l as C, m as w, n as T, o as E, p as D, r as O, s as k, t as A, u as j, v as M, w as N, x as P, y as F } from "./client-DfRBtXIE.js";
|
|
2
|
+
export { x as API_ORIGIN_BY_ENV, T as AgUiEventType, D as AssessmentStatus, O as AssessmentSummaryCategory, w as ButtonType, o as CHATBOT_API_PATH, A as ChatbotApiClient, y as ContentComponent, v as ContentMarker, f as ContentType, b as CustomerSatisfactionFieldType, s as DEFAULT_LOCAL_API_ORIGIN, l as ENVIRONMENTS, p as FeatureFlagKey, E as FormType, M as MessageIdentifier, F as MessageKind, m as MessageSender, P as PHService, k as PiiFormFieldKind, h as PiiFormWireType, u as PiiQuestionType, t as QuestionType, r as REGIONS, N as RuleName, n as SessionLapsedError, c as UnauthorizedError, d as VideoQuestionType, i as buildChatbotBaseUrl, C as isCustomerSatisfactionFormMessage, j as isCustomerSatisfactionResponsesMessage, S as isNotFound, g as isPiiFormMessage, _ as isPiiResponsesMessage, e as isUnauthorized, a as resolveApiOrigin };
|
|
@@ -1881,40 +1881,42 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
1881
1881
|
return e.ASSESSMENT_SUMMARY = "{assessment.summary}", e.ASSESSMENT_LINK = "{assessment.link}", e.AGC_GUIDANCE = "{assessment.agcGuidance}", e;
|
|
1882
1882
|
}({}), ar = /* @__PURE__ */ function(e) {
|
|
1883
1883
|
return e.HINT = "Hint", e.QUESTION = "Question", e;
|
|
1884
|
+
}({}), or = /* @__PURE__ */ function(e) {
|
|
1885
|
+
return e.AGC = "agc", e;
|
|
1884
1886
|
}({}), Q = /* @__PURE__ */ function(e) {
|
|
1885
1887
|
return e.RUN_STARTED = "RUN_STARTED", e.STATE_SNAPSHOT = "STATE_SNAPSHOT", e.ASSESSMENT_SUMMARY = "ASSESSMENT_SUMMARY", e.ASSESSMENT_LINK = "ASSESSMENT_LINK", e.AGC_GUIDANCE = "AGC_GUIDANCE", e.PII_FORM = "PII_FORM", e.CUSTOMER_SATISFACTION_FORM = "CUSTOMER_SATISFACTION_FORM", e.TEXT_MESSAGE_START = "TEXT_MESSAGE_START", e.TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT", e.TEXT_MESSAGE_END = "TEXT_MESSAGE_END", e.CUSTOM = "CUSTOM", e.RUN_FINISHED = "RUN_FINISHED", e.RUN_ERROR = "RUN_ERROR", e;
|
|
1886
|
-
}({}), or = /* @__PURE__ */ function(e) {
|
|
1887
|
-
return e.INTERVIEW = "INTERVIEW", e.VIDEO = "VIDEO", e.ADDITIONAL = "ADDITIONAL", e.DEI = "DEI", e;
|
|
1888
1888
|
}({}), sr = /* @__PURE__ */ function(e) {
|
|
1889
|
+
return e.INTERVIEW = "INTERVIEW", e.VIDEO = "VIDEO", e.ADDITIONAL = "ADDITIONAL", e.DEI = "DEI", e;
|
|
1890
|
+
}({}), cr = /* @__PURE__ */ function(e) {
|
|
1889
1891
|
return e.PII = "PII", e.SMS_CONSENT = "SMS_CONSENT", e;
|
|
1890
1892
|
}({}), $ = /* @__PURE__ */ function(e) {
|
|
1891
1893
|
return e.FULL_NAME = "FULL_NAME", e.FIRST_NAME = "FIRST_NAME", e.LAST_NAME = "LAST_NAME", e.EMAIL = "EMAIL", e.PHONE_NUMBER = "PHONE_NUMBER", e.LOCATION = "LOCATION", e;
|
|
1892
|
-
}({}), cr = /* @__PURE__ */ function(e) {
|
|
1893
|
-
return e.PII = "PII", e.CUSTOMER_SATISFACTION = "CUSTOMER_SATISFACTION", e;
|
|
1894
1894
|
}({}), lr = /* @__PURE__ */ function(e) {
|
|
1895
|
+
return e.PII = "PII", e.CUSTOMER_SATISFACTION = "CUSTOMER_SATISFACTION", e;
|
|
1896
|
+
}({}), ur = /* @__PURE__ */ function(e) {
|
|
1895
1897
|
return e.RATING = "RATING", e.COMMENT = "COMMENT", e;
|
|
1896
|
-
}({}),
|
|
1898
|
+
}({}), dr = (e) => {
|
|
1897
1899
|
var t;
|
|
1898
1900
|
return (e == null || (t = e.data) == null ? void 0 : t.formType) === "CUSTOMER_SATISFACTION";
|
|
1899
|
-
}, dr = (e) => {
|
|
1900
|
-
var t;
|
|
1901
|
-
return Array.isArray(e == null || (t = e.data) == null ? void 0 : t.fields) && !ur(e);
|
|
1902
1901
|
}, fr = (e) => {
|
|
1903
1902
|
var t;
|
|
1904
|
-
return Array.isArray(e == null || (t = e.data) == null ? void 0 : t.
|
|
1905
|
-
}, pr = (e) =>
|
|
1903
|
+
return Array.isArray(e == null || (t = e.data) == null ? void 0 : t.fields) && !dr(e);
|
|
1904
|
+
}, pr = (e) => {
|
|
1905
|
+
var t;
|
|
1906
|
+
return Array.isArray(e == null || (t = e.data) == null ? void 0 : t.responses) && !dr(e);
|
|
1907
|
+
}, mr = (e) => dr(e) && Array.isArray(e.data.fields), hr = (e) => dr(e) && Array.isArray(e.data.responses), gr = 3e3, _r = "next/stream error", vr = (...e) => globalThis.fetch(...e), yr = (e) => {
|
|
1906
1908
|
var t, n;
|
|
1907
1909
|
if (!(!Y.isAxiosError(e) || !((t = e.config) != null && t.url))) return `${((n = e.config.method) == null ? "get" : n).toUpperCase()} ${e.config.url}`;
|
|
1908
|
-
},
|
|
1910
|
+
}, br = class {
|
|
1909
1911
|
constructor(e) {
|
|
1910
1912
|
var t, n, r, i;
|
|
1911
1913
|
this.baseUrl = Ln(e), this.baseHeaders = {
|
|
1912
1914
|
[Dn]: e.appId,
|
|
1913
1915
|
[On]: kn,
|
|
1914
1916
|
[An]: "1.0"
|
|
1915
|
-
}, this.http = (t = e.httpClient) == null ? Y.create({ headers: this.baseHeaders }) : t, this.putImpl = (n = e.putImpl) == null ? Y.put : n, this.fetchImpl = (r = e.fetchImpl) == null ?
|
|
1917
|
+
}, this.http = (t = e.httpClient) == null ? Y.create({ headers: this.baseHeaders }) : t, this.putImpl = (n = e.putImpl) == null ? Y.put : n, this.fetchImpl = (r = e.fetchImpl) == null ? vr : r, (i = this.http.interceptors) == null || i.response.use(void 0, (e) => {
|
|
1916
1918
|
var t;
|
|
1917
|
-
return Bn(e) && ((t = this.onUnauthorized) == null || t.call(this, new X(
|
|
1919
|
+
return Bn(e) && ((t = this.onUnauthorized) == null || t.call(this, new X(yr(e)))), Promise.reject(e);
|
|
1918
1920
|
});
|
|
1919
1921
|
}
|
|
1920
1922
|
fiTokenHeaders() {
|
|
@@ -1951,7 +1953,7 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
1951
1953
|
});
|
|
1952
1954
|
return this.fiToken = Wn(n.data.fiToken), {
|
|
1953
1955
|
...n.data,
|
|
1954
|
-
chatLogs: ((t = n.data.chatLogs) == null ? [] : t).map(
|
|
1956
|
+
chatLogs: ((t = n.data.chatLogs) == null ? [] : t).map(Cr)
|
|
1955
1957
|
};
|
|
1956
1958
|
}
|
|
1957
1959
|
async nextStream(e, t, n) {
|
|
@@ -1979,13 +1981,13 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
1979
1981
|
switch (t.type) {
|
|
1980
1982
|
case Q.RUN_ERROR:
|
|
1981
1983
|
var c;
|
|
1982
|
-
throw Error((c = t.message) == null ?
|
|
1984
|
+
throw Error((c = t.message) == null ? _r : c);
|
|
1983
1985
|
case Q.STATE_SNAPSHOT:
|
|
1984
1986
|
var l;
|
|
1985
1987
|
if ((l = t.snapshot) != null && l.question) {
|
|
1986
1988
|
var u, d;
|
|
1987
1989
|
let e = t.snapshot.question;
|
|
1988
|
-
(u = n.onMeta) == null || u.call(n,
|
|
1990
|
+
(u = n.onMeta) == null || u.call(n, wr(e), (d = e.messageId) == null ? e._id : d);
|
|
1989
1991
|
}
|
|
1990
1992
|
break;
|
|
1991
1993
|
case Q.ASSESSMENT_SUMMARY:
|
|
@@ -1998,7 +2000,7 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
1998
2000
|
break;
|
|
1999
2001
|
case Q.PII_FORM:
|
|
2000
2002
|
var m, h;
|
|
2001
|
-
(m = t.fields) != null && m.length && ((h = n.onPiiForm) == null || h.call(n, t.fields.map(
|
|
2003
|
+
(m = t.fields) != null && m.length && ((h = n.onPiiForm) == null || h.call(n, t.fields.map(Sr)));
|
|
2002
2004
|
break;
|
|
2003
2005
|
case Q.CUSTOMER_SATISFACTION_FORM:
|
|
2004
2006
|
var g, _;
|
|
@@ -2049,6 +2051,10 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
2049
2051
|
async detectAgc(e) {
|
|
2050
2052
|
return await this.guardLapsedFiToken(), (await this.http.post(`${this.baseUrl}/${e}/detect-agc`, {}, { headers: this.fiTokenHeaders() })).data;
|
|
2051
2053
|
}
|
|
2054
|
+
async resolveFeatureFlags(e) {
|
|
2055
|
+
var t, n;
|
|
2056
|
+
return (t = (n = (await this.http.post(`${this.baseUrl}/feature-flags`, { assessmentId: e }, { timeout: gr })).data) == null ? void 0 : n.flags) == null ? {} : t;
|
|
2057
|
+
}
|
|
2052
2058
|
async getAccessManagement(e) {
|
|
2053
2059
|
return (await this.http.get(`${this.baseUrl}/${e}/access-management`)).data;
|
|
2054
2060
|
}
|
|
@@ -2059,42 +2065,42 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
2059
2065
|
async getTranslation(e) {
|
|
2060
2066
|
return (await this.http.get(`${this.baseUrl}/translation/${e}`)).data;
|
|
2061
2067
|
}
|
|
2062
|
-
},
|
|
2068
|
+
}, xr = {
|
|
2063
2069
|
[$.FULL_NAME]: Z.FULL_NAME,
|
|
2064
2070
|
[$.FIRST_NAME]: Z.FIRST_NAME,
|
|
2065
2071
|
[$.LAST_NAME]: Z.LAST_NAME,
|
|
2066
2072
|
[$.EMAIL]: Z.EMAIL,
|
|
2067
2073
|
[$.PHONE_NUMBER]: Z.PHONE_NUMBER,
|
|
2068
2074
|
[$.LOCATION]: Z.LOCATION
|
|
2069
|
-
},
|
|
2075
|
+
}, Sr = (e) => {
|
|
2070
2076
|
var t;
|
|
2071
2077
|
return {
|
|
2072
2078
|
...e,
|
|
2073
|
-
piiType: (t =
|
|
2079
|
+
piiType: (t = xr[e.piiType]) == null ? null : t
|
|
2074
2080
|
};
|
|
2075
|
-
},
|
|
2076
|
-
if (
|
|
2081
|
+
}, Cr = (e) => {
|
|
2082
|
+
if (fr(e)) {
|
|
2077
2083
|
let { data: t } = e;
|
|
2078
2084
|
return {
|
|
2079
2085
|
...e,
|
|
2080
2086
|
data: {
|
|
2081
2087
|
...t,
|
|
2082
|
-
fields: t.fields.map(
|
|
2088
|
+
fields: t.fields.map(Sr)
|
|
2083
2089
|
}
|
|
2084
2090
|
};
|
|
2085
2091
|
}
|
|
2086
|
-
if (
|
|
2092
|
+
if (pr(e)) {
|
|
2087
2093
|
let { data: t } = e;
|
|
2088
2094
|
return {
|
|
2089
2095
|
...e,
|
|
2090
2096
|
data: {
|
|
2091
2097
|
...t,
|
|
2092
|
-
responses: t.responses.map(
|
|
2098
|
+
responses: t.responses.map(Sr)
|
|
2093
2099
|
}
|
|
2094
2100
|
};
|
|
2095
2101
|
}
|
|
2096
2102
|
return e;
|
|
2097
|
-
},
|
|
2103
|
+
}, wr = (e) => {
|
|
2098
2104
|
var t;
|
|
2099
2105
|
return {
|
|
2100
2106
|
_id: e._id,
|
|
@@ -2113,6 +2119,6 @@ var Jn = /* @__PURE__ */ function(e) {
|
|
|
2113
2119
|
};
|
|
2114
2120
|
};
|
|
2115
2121
|
//#endregion
|
|
2116
|
-
export {
|
|
2122
|
+
export { Bn as A, l as B, Xn as C, zn as D, Gn as E, Mn as F, Ln as I, In as L, Nn as M, Fn as N, X as O, jn as P, o as R, Z as S, $n as T, Zn as _, or as a, Yn as b, $ as c, fr as d, pr as f, ir as g, rr as h, ur as i, Pn as j, Vn as k, mr as l, er as m, Q as n, lr as o, tr as p, sr as r, cr as s, br as t, hr as u, nr as v, Jn as w, Qn as x, ar as y, s as z };
|
|
2117
2123
|
|
|
2118
|
-
//# sourceMappingURL=client-
|
|
2124
|
+
//# sourceMappingURL=client-DfRBtXIE.js.map
|
|
@@ -47,6 +47,8 @@ export declare class InterviewEngine {
|
|
|
47
47
|
constructor(deps: InterviewEngineDeps);
|
|
48
48
|
/** Fetch the translation file; on failure the bundled fallback is used. */
|
|
49
49
|
private loadTranslations;
|
|
50
|
+
/** Flags gate features off, never the interview: a failed lookup leaves every default as is. */
|
|
51
|
+
private loadFeatureFlags;
|
|
50
52
|
/**
|
|
51
53
|
* Entry point: gate the interview on email access verification when the
|
|
52
54
|
* assessment requires it (legacy AccessVerification), else start directly.
|
|
@@ -185,6 +187,12 @@ export declare class InterviewEngine {
|
|
|
185
187
|
* bubble showing upload progress, get the S3 signed URL, PUT the blob, then
|
|
186
188
|
* POST the returned videoFileName to /next. On failure the bubble goes FAILED
|
|
187
189
|
* and the blob is retained for retry.
|
|
190
|
+
*
|
|
191
|
+
* A re-edit uploads onto the answer bubble already on screen and posts to
|
|
192
|
+
* edit-answer instead. Its upload failure restores the previous answer and
|
|
193
|
+
* stays in edit mode, as a failed edit-answer does: a FAILED bubble would
|
|
194
|
+
* offer "Retry upload", which outlives a cancelled edit and would then post
|
|
195
|
+
* the take against whatever question is current.
|
|
188
196
|
*/
|
|
189
197
|
submitVideoAnswer(blob: Blob, extension: string): Promise<void>;
|
|
190
198
|
/** Retry a failed video upload with the retained blob. */
|
|
@@ -192,7 +200,7 @@ export declare class InterviewEngine {
|
|
|
192
200
|
/** Fetch a signed playback URL for a recorded video answer (legacy getVideoAccessUrl). */
|
|
193
201
|
getVideoPlaybackUrl(questionId: string, extension: string): Promise<string>;
|
|
194
202
|
private upsertVideoBubble;
|
|
195
|
-
private
|
|
203
|
+
private candidateBubbleFor;
|
|
196
204
|
private submitFreeText;
|
|
197
205
|
/** Routes an answer to edit-answer when re-editing, else to the next-question flow. */
|
|
198
206
|
private dispatchFreshOrEdit;
|
|
@@ -226,8 +234,9 @@ export declare class InterviewEngine {
|
|
|
226
234
|
/** The ticked options for a question, or none when the draft belongs to a different one. */
|
|
227
235
|
private selectedOptionIds;
|
|
228
236
|
/**
|
|
229
|
-
* Calls detect-agc when submitting the SUBMIT_QUESTION_MESSAGE
|
|
230
|
-
*
|
|
237
|
+
* Calls detect-agc when submitting the SUBMIT_QUESTION_MESSAGE, a check is allowed and the
|
|
238
|
+
* customer has not opted out via the agc flag; returns true (→ show warning) when automated
|
|
239
|
+
* content is suspected.
|
|
231
240
|
*/
|
|
232
241
|
private detectedAgc;
|
|
233
242
|
/** Continue submitting after the AGC warning (legacy "Continue" — skips re-detection). */
|
|
@@ -17,3 +17,7 @@ export declare const getAnswerDraft: (assessmentId: string, questionId: string)
|
|
|
17
17
|
export declare const saveAnswerDraft: (assessmentId: string, questionId: string, text: string) => void;
|
|
18
18
|
/** Drops this assessment's draft — the answer was sent, or the composer was emptied. */
|
|
19
19
|
export declare const clearAnswerDraft: (assessmentId: string) => void;
|
|
20
|
+
/** Takes already recorded for this question; 0 when the browser kept nothing. */
|
|
21
|
+
export declare const getVideoTakesUsed: (assessmentId: string, questionId: string) => number;
|
|
22
|
+
/** Counts one finished take against this question and returns the new total. */
|
|
23
|
+
export declare const recordVideoTake: (assessmentId: string, questionId: string) => number;
|
package/dist/core/store.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoreApi } from 'zustand/vanilla';
|
|
2
2
|
import { AssessmentStatus } from '../api/types/messages';
|
|
3
3
|
import { Branding } from '../api/types/branding';
|
|
4
|
-
import { AssessmentSummary, CustomerSatisfactionFormField, PiiFormField } from '../api/types/responses';
|
|
4
|
+
import { AssessmentSummary, CustomerSatisfactionFormField, PiiFormField, ResolvedFeatureFlags } from '../api/types/responses';
|
|
5
5
|
import { PiiFormAnswer } from './validation/piiForm';
|
|
6
6
|
import { MessageBubble } from './bubbles/types';
|
|
7
7
|
export declare enum InterviewPhase {
|
|
@@ -82,6 +82,11 @@ export type InterviewState = {
|
|
|
82
82
|
/** AGC (automated-content) detection attempt count + whether another check is allowed. */
|
|
83
83
|
agcAttempt?: number;
|
|
84
84
|
allowNextAgcDetection?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Flags core-fi resolved for this assessment. Empty until the lookup lands, and stays empty if it
|
|
87
|
+
* fails — each reader decides what an absent key means for its own feature.
|
|
88
|
+
*/
|
|
89
|
+
featureFlags: ResolvedFeatureFlags;
|
|
85
90
|
/** Terms accepted for this assessment, as the backend reports it on load and on every answer. */
|
|
86
91
|
termsAccepted?: boolean;
|
|
87
92
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "./react-
|
|
1
|
+
import { B as e } from "./client-DfRBtXIE.js";
|
|
2
|
+
import { t } from "./react-D4Z0N-x7.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-Cl2Oi3Sl.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { R as e } from "./client-DfRBtXIE.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-CVQSf7rp.js.map
|