@sapia-ai/chatbot-v3 1.4.2 → 1.6.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.
Files changed (53) hide show
  1. package/dist/{EmbeddedVideoPlayer-G554aRrZ.js → EmbeddedVideoPlayer-Bhz8DKO8.js} +14 -14
  2. package/dist/{Preview-CSE0hI6e.js → Preview-B1ZmYM9V.js} +3 -3
  3. package/dist/api/client.d.ts +9 -1
  4. package/dist/api/types/messages.d.ts +8 -1
  5. package/dist/api/types/responses.d.ts +69 -12
  6. package/dist/api.js +2 -2
  7. package/dist/{client-DG-5x86F.js → client-C2MWNOYf.js} +559 -546
  8. package/dist/core/bubbles/cards.d.ts +3 -1
  9. package/dist/core/bubbles/demographicRun.d.ts +57 -0
  10. package/dist/core/bubbles/selection.d.ts +3 -1
  11. package/dist/core/bubbles/types.d.ts +11 -0
  12. package/dist/core/interview/engine.d.ts +45 -5
  13. package/dist/core/interview/reveal.d.ts +5 -2
  14. package/dist/core/persistence.d.ts +4 -0
  15. package/dist/core/store.d.ts +15 -2
  16. package/dist/core/theme/branding.d.ts +5 -2
  17. package/dist/{dist-DsGdVwdi.js → dist-CoO0i-y0.js} +3 -3
  18. package/dist/embed/createChatbot.d.ts +0 -2
  19. package/dist/{fix-webm-duration-Bie2OG-n.js → fix-webm-duration-CXijcUXq.js} +2 -2
  20. package/dist/index.js +6292 -5783
  21. package/dist/{jsx-runtime-B5vw3nIj.js → jsx-runtime-BcXxfixh.js} +2 -2
  22. package/dist/react/AnswerInput.d.ts +6 -1
  23. package/dist/react/SapiaChatbot.d.ts +1 -3
  24. package/dist/react/bubbleViewModel.d.ts +21 -1
  25. package/dist/react/strings.d.ts +9 -4
  26. package/dist/react/useDemographicForm.d.ts +14 -0
  27. package/dist/react/useVideoRecorder.d.ts +25 -4
  28. package/dist/{react-CN-F_7qV.js → react-Cp-K_L89.js} +3 -3
  29. package/dist/{react-_TUsDaHa.js → react-D3tMg8u4.js} +3 -3
  30. package/dist/{react-T5LsuM9r.js → react-D8jZKei2.js} +3 -3
  31. package/dist/{react-B46N_vb_.js → react-DtGzNzM1.js} +3 -3
  32. package/dist/{react-SKFkpgRr.js → react-LDcTld2q.js} +3 -3
  33. package/dist/{react-Dd6J2Pyv.js → react-g5b2mM7w.js} +3 -3
  34. package/dist/{react-abEVBgXB.js → react-hklchtwF.js} +3 -3
  35. package/dist/{react-CpnhkRge.js → react-vc8uDric.js} +3 -3
  36. package/dist/{react-DHdgNnK2.js → react-wrZMUHWq.js} +2 -2
  37. package/dist/ui/chat/ActionDock/ActionDock.d.ts +5 -0
  38. package/dist/ui/chat/ChatLog/ChatLog.d.ts +3 -7
  39. package/dist/ui/chat/DemographicDetailsCard/DemographicDetailsCard.d.ts +14 -0
  40. package/dist/ui/chat/TypingIndicator/TypingIndicator.d.ts +9 -25
  41. package/dist/ui/chat/types.d.ts +13 -1
  42. package/dist/ui/inputs/DemographicForm/DemographicForm.d.ts +35 -0
  43. package/dist/ui/inputs/LocationAnswerInput/LocationCombobox.d.ts +4 -2
  44. package/dist/ui/inputs/OptionList/OptionList.d.ts +4 -0
  45. package/dist/ui/inputs/VideoRecorder/VideoRecorder.d.ts +10 -1
  46. package/dist/ui/inputs/formCard.d.ts +13 -0
  47. package/dist/ui/media/VideoPlayer/VideoPlayer.d.ts +8 -4
  48. package/dist/ui/primitives/Dialog/Dialog.d.ts +2 -0
  49. package/dist/ui/shell/AgcGuidanceDialog/AgcGuidanceDialog.d.ts +13 -0
  50. package/dist/ui/shell/DoneScreen/DoneScreen.d.ts +3 -1
  51. package/dist/ui/shell/LogoTile/LogoTile.d.ts +15 -0
  52. package/dist-umd/sapia-chatbot.umd.js +295 -295
  53. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { z as e } from "./client-DG-5x86F.js";
2
- import { t } from "./react-DHdgNnK2.js";
3
- import { t as n } from "./jsx-runtime-B5vw3nIj.js";
1
+ import { H as e } from "./client-C2MWNOYf.js";
2
+ import { t } from "./react-wrZMUHWq.js";
3
+ import { t as n } from "./jsx-runtime-BcXxfixh.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-T5LsuM9r.js"
37
+ "./react-D8jZKei2.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-_TUsDaHa.js"
47
+ "./react-D3tMg8u4.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-DsGdVwdi.js"
57
+ "./dist-CoO0i-y0.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-B46N_vb_.js"
66
+ "./react-DtGzNzM1.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-SKFkpgRr.js"
75
+ "./react-LDcTld2q.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-Dd6J2Pyv.js"
85
+ "./react-g5b2mM7w.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-CN-F_7qV.js"
95
+ "./react-Cp-K_L89.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-CpnhkRge.js"
105
+ "./react-vc8uDric.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-abEVBgXB.js"
115
+ "./react-hklchtwF.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-CSE0hI6e.js"
184
+ "./Preview-B1ZmYM9V.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-G554aRrZ.js.map
1300
+ //# sourceMappingURL=EmbeddedVideoPlayer-Bhz8DKO8.js.map
@@ -1,5 +1,5 @@
1
- import { z as e } from "./client-DG-5x86F.js";
2
- import { t } from "./react-DHdgNnK2.js";
1
+ import { H as e } from "./client-C2MWNOYf.js";
2
+ import { t } from "./react-wrZMUHWq.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-CSE0hI6e.js.map
84
+ //# sourceMappingURL=Preview-B1ZmYM9V.js.map
@@ -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, DemographicFormField, 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;
@@ -34,8 +34,15 @@ export type NextStreamHandlers = {
34
34
  onPiiForm?: (fields: PiiFormField[]) => void;
35
35
  /** The rating and comment asked after the interview, emitted in place of their prompts. */
36
36
  onCustomerSatisfactionForm?: (fields: CustomerSatisfactionFormField[]) => void;
37
+ /** Every diversity question, emitted in place of their prompts. */
38
+ onDemographicForm?: (fields: DemographicFormField[]) => void;
37
39
  /** Aborts the in-flight stream (new request / unmount). */
38
40
  signal?: AbortSignal;
41
+ /**
42
+ * false asks the backend to send each message whole instead of pacing it word by word. Left
43
+ * out, the backend keeps pacing.
44
+ */
45
+ streamText?: boolean;
39
46
  };
40
47
  export declare class ChatbotApiClient {
41
48
  private readonly http;
@@ -91,6 +98,7 @@ export declare class ChatbotApiClient {
91
98
  uploadVideo(signedUrl: string, blob: Blob, extension: string, onProgress?: (fraction: number) => void): Promise<void>;
92
99
  getVideoAccessUrl(assessmentId: string, questionId: string, extension: string): Promise<VideoSignedUrlResponse>;
93
100
  detectAgc(assessmentId: string): Promise<DetectAgcResponse>;
101
+ resolveFeatureFlags(assessmentId: string): Promise<ResolvedFeatureFlags>;
94
102
  getAccessManagement(assessmentId: string): Promise<AccessManagementResponse>;
95
103
  verifyAccess(assessmentId: string, candidateEmail: string): Promise<VerifyAccessResponse>;
96
104
  getTranslation(language: string): Promise<TranslationResponse>;
@@ -175,7 +175,14 @@ export declare enum ContentComponent {
175
175
  * The interviewer's one line above the feedback card. The run may open on either prompt, so
176
176
  * neither prompt's own text can stand in for it.
177
177
  */
178
- CUSTOMER_SATISFACTION_INTRO = "CustomerSatisfactionIntro"
178
+ CUSTOMER_SATISFACTION_INTRO = "CustomerSatisfactionIntro",
179
+ /**
180
+ * The bubble is a placeholder for the diversity card. Synthesised by the widget: the backend
181
+ * describes the run in a DEMOGRAPHIC_FORM event.
182
+ */
183
+ DEMOGRAPHIC_FORM = "DemographicForm",
184
+ /** The bubble is a placeholder for the answered diversity questions, standing in for the run. */
185
+ DEMOGRAPHIC_DETAILS = "DemographicDetails"
179
186
  }
180
187
  /**
181
188
  * Whole-bubble values the backend uses to mark a content bubble as a card placeholder. The stream
@@ -22,8 +22,8 @@ export type StartAtsResponse = {
22
22
  isTermsAndConditionsAccepted: boolean;
23
23
  candidateCountryCode?: string;
24
24
  assessmentIsReusedMessage?: AgentResponse;
25
- /** Candidate display name for the pre-interview welcome (optional; absent → generic greeting). */
26
- candidateName?: string;
25
+ /** Absent until the candidate has given their name, e.g. the first load of a PII assessment. */
26
+ candidateFirstName?: string;
27
27
  /**
28
28
  * The cohort title, shown as the role in the header and welcome. Read this rather than
29
29
  * `branding.title`, which the BE has already interpolated into customer-authored copy.
@@ -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",
@@ -102,6 +117,7 @@ export declare enum AgUiEventType {
102
117
  AGC_GUIDANCE = "AGC_GUIDANCE",
103
118
  PII_FORM = "PII_FORM",
104
119
  CUSTOMER_SATISFACTION_FORM = "CUSTOMER_SATISFACTION_FORM",
120
+ DEMOGRAPHIC_FORM = "DEMOGRAPHIC_FORM",
105
121
  TEXT_MESSAGE_START = "TEXT_MESSAGE_START",
106
122
  TEXT_MESSAGE_CONTENT = "TEXT_MESSAGE_CONTENT",
107
123
  TEXT_MESSAGE_END = "TEXT_MESSAGE_END",
@@ -206,12 +222,13 @@ export type PiiResponsesMessage = Message<{
206
222
  responses: PiiFormField[];
207
223
  }>;
208
224
  /**
209
- * Which family a folded form belongs to. Only the feedback payload carries it: the PII payload
210
- * shipped first with the same shape and no marker, so an absent formType means PII.
225
+ * Which family a folded form belongs to. Every family but PII carries it: the PII payload shipped
226
+ * first with the same shape and no marker, so an absent formType means PII.
211
227
  */
212
228
  export declare enum FormType {
213
229
  PII = "PII",
214
- CUSTOMER_SATISFACTION = "CUSTOMER_SATISFACTION"
230
+ CUSTOMER_SATISFACTION = "CUSTOMER_SATISFACTION",
231
+ DEMOGRAPHIC = "DEMOGRAPHIC"
215
232
  }
216
233
  /** Whether a feedback field collects the rating or the free-text comment. */
217
234
  export declare enum CustomerSatisfactionFieldType {
@@ -251,13 +268,49 @@ export type CustomerSatisfactionFormMessage = Message<CustomerSatisfactionPayloa
251
268
  export type CustomerSatisfactionResponsesMessage = Message<CustomerSatisfactionPayload & {
252
269
  responses: CustomerSatisfactionFormField[];
253
270
  }>;
271
+ /**
272
+ * One diversity question of the run (AG-UI DEMOGRAPHIC_FORM). The backend sends the fields in
273
+ * dialogue order, which is the order answers must be posted in. Unlike the other two families the
274
+ * widget has no copy of its own for these: `prompt` is the template's wording and is the field's
275
+ * label.
276
+ */
277
+ export type DemographicFormField = {
278
+ questionId: string;
279
+ masterId?: string;
280
+ /** The DEMOGRAPHIC_TYPE tag's value (gender, ethnicity, …). Carried by the backend, not read. */
281
+ deiType?: string;
282
+ component?: string | null;
283
+ questionTypes: QuestionType[];
284
+ prompt: string;
285
+ options?: MCQQuestionOption[];
286
+ rules?: QuestionRule[];
287
+ /** Set only on a reloaded run's responses: what the candidate gave, ready to display. */
288
+ answer?: string;
289
+ /** That answer's underlying value — the option value(s) rather than the labels shown. */
290
+ value?: string;
291
+ };
292
+ type DemographicPayload = {
293
+ _id: string;
294
+ formType: FormType.DEMOGRAPHIC;
295
+ };
296
+ /**
297
+ * A diversity run as a reloaded transcript carries it, folded the way the other two families are:
298
+ * the form, and — once posted — the responses, which leave out any question posted blank.
299
+ */
300
+ export type DemographicFormMessage = Message<DemographicPayload & {
301
+ fields: DemographicFormField[];
302
+ }>;
303
+ /** @see DemographicFormMessage */
304
+ export type DemographicResponsesMessage = Message<DemographicPayload & {
305
+ responses: DemographicFormField[];
306
+ }>;
254
307
  /** Anything /start can put in `chatLogs`: a stored turn, or a form run folded into two messages. */
255
- export type ChatLog = CandidateResponse | AgentResponse | PiiFormMessage | PiiResponsesMessage | CustomerSatisfactionFormMessage | CustomerSatisfactionResponsesMessage;
308
+ export type ChatLog = CandidateResponse | AgentResponse | PiiFormMessage | PiiResponsesMessage | CustomerSatisfactionFormMessage | CustomerSatisfactionResponsesMessage | DemographicFormMessage | DemographicResponsesMessage;
256
309
  /**
257
- * The folded halves of a PII run are told apart by their payload key alone: neither carries the
310
+ * The folded halves of a form run are told apart by their payload key alone: neither carries the
258
311
  * `question` an answer has or the `types`/`contents` a prompt has, so a reader that goes by those
259
- * would take them for an empty question and draw nothing. A feedback run folds into the same keys,
260
- * so its marker is what turns it away here.
312
+ * would take them for an empty question and draw nothing. Every family folds into the same keys,
313
+ * so the formType marker is what sorts them — and an unmarked one is PII.
261
314
  */
262
315
  export declare const isPiiFormMessage: (chatLog: ChatLog) => chatLog is PiiFormMessage;
263
316
  /** @see isPiiFormMessage */
@@ -266,6 +319,10 @@ export declare const isPiiResponsesMessage: (chatLog: ChatLog) => chatLog is Pii
266
319
  export declare const isCustomerSatisfactionFormMessage: (chatLog: ChatLog) => chatLog is CustomerSatisfactionFormMessage;
267
320
  /** @see CustomerSatisfactionFormMessage */
268
321
  export declare const isCustomerSatisfactionResponsesMessage: (chatLog: ChatLog) => chatLog is CustomerSatisfactionResponsesMessage;
322
+ /** @see DemographicFormMessage */
323
+ export declare const isDemographicFormMessage: (chatLog: ChatLog) => chatLog is DemographicFormMessage;
324
+ /** @see DemographicFormMessage */
325
+ export declare const isDemographicResponsesMessage: (chatLog: ChatLog) => chatLog is DemographicResponsesMessage;
269
326
  /** STATE_SNAPSHOT.snapshot.question — same data as our Question, but `types` is `questionTypes`. */
270
327
  export type SnapshotQuestion = {
271
328
  _id: string;
@@ -300,10 +357,10 @@ export type AgUiFrame = {
300
357
  /** ASSESSMENT_LINK payload — the assessment's resume link (present only on that frame). */
301
358
  url?: string;
302
359
  /**
303
- * PII_FORM / CUSTOMER_SATISFACTION_FORM payload — every field of the run, in dialogue order, in
304
- * the backend's spelling. Which of the two it is follows from `type`.
360
+ * PII_FORM / CUSTOMER_SATISFACTION_FORM / DEMOGRAPHIC_FORM payload — every field of the run, in
361
+ * dialogue order, in the backend's spelling. Which family it is follows from `type`.
305
362
  */
306
- fields?: PiiFormFieldWire[] | CustomerSatisfactionFormField[];
363
+ fields?: PiiFormFieldWire[] | CustomerSatisfactionFormField[] | DemographicFormField[];
307
364
  /** TEXT_MESSAGE_* message id, shape "<baseId>:<contentIndex>"; segments bundled messages. */
308
365
  messageId?: string;
309
366
  delta?: string;
package/dist/api.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as e, C as t, D as n, E as r, F as i, I as a, M as o, N as s, O as c, P as l, S as u, _ as d, a as f, b as p, c as m, d as h, f as g, g as _, h as v, i as y, j as b, k as x, l as S, m as C, n as w, o as T, p as E, r as D, s as O, t as k, u as A, v as j, w as M, x as N, y as P } from "./client-DG-5x86F.js";
2
- export { e as API_ORIGIN_BY_ENV, w as AgUiEventType, g as AssessmentStatus, D as AssessmentSummaryCategory, E as ButtonType, b as CHATBOT_API_PATH, k as ChatbotApiClient, C as ContentComponent, v as ContentMarker, _ as ContentType, y as CustomerSatisfactionFieldType, o as DEFAULT_LOCAL_API_ORIGIN, s as ENVIRONMENTS, f as FormType, d as MessageIdentifier, j as MessageKind, P as MessageSender, p as PHService, T as PiiFormFieldKind, O as PiiFormWireType, N as PiiQuestionType, u as QuestionType, l as REGIONS, t as RuleName, r as SessionLapsedError, n as UnauthorizedError, M as VideoQuestionType, i as buildChatbotBaseUrl, m as isCustomerSatisfactionFormMessage, S as isCustomerSatisfactionResponsesMessage, c as isNotFound, A as isPiiFormMessage, h as isPiiResponsesMessage, x as isUnauthorized, a as resolveApiOrigin };
1
+ import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, P as l, R as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I, z as L } from "./client-C2MWNOYf.js";
2
+ export { c as API_ORIGIN_BY_ENV, E as AgUiEventType, b as AssessmentStatus, k as AssessmentSummaryCategory, y as ButtonType, l as CHATBOT_API_PATH, j as ChatbotApiClient, p as ContentComponent, N as ContentMarker, I as ContentType, x as CustomerSatisfactionFieldType, i as DEFAULT_LOCAL_API_ORIGIN, a as ENVIRONMENTS, m as FeatureFlagKey, D as FormType, h as MessageIdentifier, F as MessageKind, d as MessageSender, t as PHService, A as PiiFormFieldKind, g as PiiFormWireType, P as PiiQuestionType, f as QuestionType, o as REGIONS, r as RuleName, C as SessionLapsedError, e as UnauthorizedError, n as VideoQuestionType, u as buildChatbotBaseUrl, w as isCustomerSatisfactionFormMessage, M as isCustomerSatisfactionResponsesMessage, _ as isDemographicFormMessage, v as isDemographicResponsesMessage, S as isNotFound, O as isPiiFormMessage, T as isPiiResponsesMessage, s as isUnauthorized, L as resolveApiOrigin };