@helpai/elements 0.14.0 → 0.14.1
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/configurator.mjs +3 -5
- package/elements-web-component.esm.js +25 -25
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +25 -25
- package/elements.js.map +4 -4
- package/index.d.ts +9 -11
- package/index.mjs +448 -499
- package/package.json +1 -1
- package/schema.d.ts +3 -5
- package/schema.json +4 -20
- package/schema.mjs +3 -5
- package/style.css +1 -1
- package/web-component.mjs +448 -499
package/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-
|
|
1
|
+
export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, L as Link, S as ServerConfig, b as SiteConfig, c as StartSessionResponse, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial } from './deployment-DYIboFNT.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -40,7 +40,7 @@ interface ClientStorage {
|
|
|
40
40
|
* populated {@link Strings} map. UI components then read `strings.send` as a
|
|
41
41
|
* normal property access — no per-render lookup, no per-render allocation.
|
|
42
42
|
*/
|
|
43
|
-
type StringKey = "launcherOpen" | "panelTitle" | "composerPlaceholder" | "send" | "stop" | "attach" | "micStart" | "micStop" | "micUnsupported" | "expand" | "collapse" | "fullscreen" | "exitFullscreen" | "resizeHandle" | "scrollToBottom" | "popOut" | "close" | "moreActions" | "soundOn" | "soundOff" | "language" | "theme" | "themeAuto" | "themeLight" | "themeDark" | "history" | "historyTitle" | "historyEmpty" | "historyLoading" | "historyNewChat" | "historyBack" | "messagesLoading" | "chatClosed" | "startNewConversation" | "dateToday" | "dateYesterday" | "dateLastWeek" | "dateOlder" | "newConversation" | "dropZone" | "attachmentTooLarge" | "attachmentTooMany" | "attachmentMimeRejected" | "errorRetry" | "errorGeneric" | "errorRateLimited" | "loading" | "thinking" | "thoughts" | "usedTool" | "collapseSidebar" | "expandSidebar" | "formSubmit" | "formSkip" | "
|
|
43
|
+
type StringKey = "launcherOpen" | "panelTitle" | "composerPlaceholder" | "send" | "stop" | "attach" | "micStart" | "micStop" | "micUnsupported" | "expand" | "collapse" | "fullscreen" | "exitFullscreen" | "resizeHandle" | "scrollToBottom" | "popOut" | "close" | "moreActions" | "soundOn" | "soundOff" | "language" | "theme" | "themeAuto" | "themeLight" | "themeDark" | "history" | "historyTitle" | "historyEmpty" | "historyLoading" | "historyNewChat" | "historyBack" | "messagesLoading" | "chatClosed" | "startNewConversation" | "dateToday" | "dateYesterday" | "dateLastWeek" | "dateOlder" | "newConversation" | "dropZone" | "attachmentTooLarge" | "attachmentTooMany" | "attachmentMimeRejected" | "errorRetry" | "errorGeneric" | "errorRateLimited" | "loading" | "thinking" | "thoughts" | "usedTool" | "collapseSidebar" | "expandSidebar" | "formSubmit" | "formSkip" | "formRequired" | "formInvalidEmail" | "formInvalidTel" | "formInvalidUrl" | "formInvalidNumber" | "formTooShort" | "formTooLong" | "formNumberTooSmall" | "formNumberTooLarge" | "formPatternMismatch" | "formChooseAtLeast" | "formChooseAtMost" | "formOther" | "formOtherPlaceholder" | "inputRequired" | "inputSubmit" | "inputSkip" | "inputSubmitted" | "approvalRequired" | "approve" | "reject" | "approved" | "rejected" | "approvalReason" | "stepNoLongerActive" | "tabHome" | "tabMessages" | "tabHelp" | "tabNews" | "modulesEmpty" | "moduleBack" | "contentLoading" | "homeGreeting" | "homeGreetingNamed" | "homeGreetingLead" | "homeSearchPlaceholder" | "homeContentTitle" | "helpTitle" | "helpSearchPlaceholder" | "helpEmpty" | "helpLoading" | "helpSearchEmpty" | "newsTitle" | "newsEmpty" | "newsLoading" | "newsBack" | "newsPublishedAt";
|
|
44
44
|
/** A partial map for one locale — what overrides look like on the wire. */
|
|
45
45
|
type LocaleStrings = Partial<Record<StringKey, string>>;
|
|
46
46
|
/**
|
|
@@ -459,10 +459,11 @@ interface FeedbackOptions {
|
|
|
459
459
|
* interfaces are what the resolver, controller, and form UI consume.
|
|
460
460
|
*
|
|
461
461
|
* A deployment declares an array of {@link FormDef}s; each is bound to trigger
|
|
462
|
-
* event(s)
|
|
463
|
-
*
|
|
464
|
-
* verticals — there is NO industry logic; a clinic intake, an
|
|
465
|
-
* form, a CSAT survey, and a sales lead capture are all just
|
|
462
|
+
* event(s) and shown as a gate that replaces the composer (locking the chat
|
|
463
|
+
* until submit/skip). Its answers are recorded via one shared submit endpoint.
|
|
464
|
+
* Generic across verticals — there is NO industry logic; a clinic intake, an
|
|
465
|
+
* insurance claim form, a CSAT survey, and a sales lead capture are all just
|
|
466
|
+
* different config.
|
|
466
467
|
*
|
|
467
468
|
* The same {@link FormField} shape powers the AI-driven ask-input tool.
|
|
468
469
|
*/
|
|
@@ -545,8 +546,6 @@ interface FormDef {
|
|
|
545
546
|
description?: string;
|
|
546
547
|
submitLabel?: string;
|
|
547
548
|
skippable?: boolean;
|
|
548
|
-
/** Gate the composer. Honored only for `pre-chat` / `after-messages`. */
|
|
549
|
-
blocking?: boolean;
|
|
550
549
|
/** Default `once`. */
|
|
551
550
|
frequency?: FormFrequency;
|
|
552
551
|
/**
|
|
@@ -569,7 +568,6 @@ interface ResolvedForm {
|
|
|
569
568
|
description?: string;
|
|
570
569
|
submitLabel?: string;
|
|
571
570
|
skippable: boolean;
|
|
572
|
-
blocking: boolean;
|
|
573
571
|
frequency: FormFrequency;
|
|
574
572
|
/** Mirror answers into `userContext` (false → PII, endpoint only). */
|
|
575
573
|
mirrorToContext: boolean;
|
|
@@ -953,8 +951,8 @@ interface Endpoints {
|
|
|
953
951
|
transcribe?: string;
|
|
954
952
|
/**
|
|
955
953
|
* Form submission endpoint. Default: `'/ai/agent/submit-form'`. When any form
|
|
956
|
-
* (a
|
|
957
|
-
* captured values here (fire-and-forget), keyed by the same `visitorId` +
|
|
954
|
+
* (a pre-chat lead capture, a CSAT survey, etc.) is completed, the widget POSTs
|
|
955
|
+
* the captured values here (fire-and-forget), keyed by the same `visitorId` +
|
|
958
956
|
* `sessionId` the conversation uses; the payload carries `formId` + `trigger`
|
|
959
957
|
* so the backend can route. Optional: a backend that doesn't implement it just
|
|
960
958
|
* 404s and the submission is ignored.
|