@helpai/elements 0.27.0 → 0.28.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/configurator.mjs +6 -6
- package/elements-web-component.esm.js +3 -3
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +22 -22
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +23 -23
- package/elements.esm.js.map +3 -3
- package/elements.js +4 -4
- package/elements.js.map +3 -3
- package/index.d.ts +12 -12
- package/index.mjs +18 -17
- package/package.json +1 -1
- package/schema.d.ts +1 -1
- package/schema.json +7 -7
- package/schema.mjs +6 -6
- package/web-component.mjs +18 -17
package/configurator.mjs
CHANGED
|
@@ -576,7 +576,7 @@ var trackingSchema = z15.object({
|
|
|
576
576
|
"Master switch. Default `true` \u2014 the widget always fires; the data module gates ingestion per deployment server-side. Set `false` to silence the client entirely."
|
|
577
577
|
),
|
|
578
578
|
endpoint: z15.url().max(2048).optional().describe(
|
|
579
|
-
"Pixel collector URL. Default: `${
|
|
579
|
+
"Pixel collector URL. Default: `${dataApiBaseUrl}/pai/elements-px.gif` (e.g. `https://help.ai/api/data/pai/elements-px.gif`). Must be a full URL."
|
|
580
580
|
),
|
|
581
581
|
sampleRate: z15.number().min(0).max(1).optional().describe("Per-visitor sampling 0..1 (decided once per page load, keeping funnels intact). Default `1`."),
|
|
582
582
|
token: z15.string().max(512).optional().describe(
|
|
@@ -596,7 +596,7 @@ var endpointsSchema = z16.object({
|
|
|
596
596
|
"Form submission endpoint. The widget POSTs each completed form's values here (fire-and-forget), keyed by the same visitorId + conversationId as the conversation; the payload carries `formId` + `trigger` so the backend can route. Optional \u2014 a 404 is ignored."
|
|
597
597
|
)
|
|
598
598
|
}).loose().describe(
|
|
599
|
-
"HTTP endpoint overrides. `upload` / `transcribe` paths are appended to the agent base (`${baseUrl}/api/agent`), `submitForm` to the data base (`
|
|
599
|
+
"HTTP endpoint overrides. `upload` / `transcribe` paths are appended to the agent base (`${baseUrl}/api/agent`), `submitForm` to the data base (`dataApiBaseUrl`); absolute URLs are accepted too."
|
|
600
600
|
).meta({
|
|
601
601
|
examples: [
|
|
602
602
|
{ upload: "/pai/upload-file", transcribe: "/pai/transcribe-audio" },
|
|
@@ -648,11 +648,11 @@ var connectionConfigSchema = z16.object({
|
|
|
648
648
|
baseUrl: z16.string().min(1).max(2048).optional().describe(
|
|
649
649
|
"MAIN site origin (e.g. `https://help.ai`) \u2014 the API modules derive from it: agent API at `${baseUrl}/api/agent`, data API at `${baseUrl}/api/data`. Set this to point at your staging / self-hosted / custom backend. Default: the brand's `defaultBaseUrl` baked at build time."
|
|
650
650
|
),
|
|
651
|
-
|
|
651
|
+
agentApiBaseUrl: z16.string().min(1).max(2048).optional().describe(
|
|
652
652
|
"Full agent-API base \u2014 set it to reach a STANDALONE `module-help-ai-agent-api` directly (local module on its own port, e.g. `http://localhost:3087`; routes attach as-is: `/pai/handshake`). Precedence: this option > derived from the main origin (`${baseUrl}/api/agent`). Not server-pushable."
|
|
653
653
|
),
|
|
654
|
-
|
|
655
|
-
"Full data-API base (e.g. `https://help.ai/api/data`, or a standalone local module like `http://localhost:3106`) \u2014 the service serving content, form definitions (`GET /forms`), and form submissions at root-level paths. Precedence: this option > server-pushed `config.
|
|
654
|
+
dataApiBaseUrl: z16.string().min(1).max(2048).optional().describe(
|
|
655
|
+
"Full data-API base (e.g. `https://help.ai/api/data`, or a standalone local module like `http://localhost:3106`) \u2014 the service serving content, form definitions (`GET /forms`), and form submissions at root-level paths. Precedence: this option > server-pushed `config.dataApiBaseUrl` > derived from the main origin (`${baseUrl}/api/data`)."
|
|
656
656
|
),
|
|
657
657
|
userContext: userContextSchema.optional(),
|
|
658
658
|
pageContext: pageContextSchema.optional(),
|
|
@@ -736,7 +736,7 @@ var connectionConfigPartialSchema = connectionConfigSchema.partial();
|
|
|
736
736
|
// src/schema/deployment.ts
|
|
737
737
|
import { z as z17 } from "zod";
|
|
738
738
|
var serverConfigSchema = widgetSettingsSchema.partial().omit({ forms: true }).extend({
|
|
739
|
-
|
|
739
|
+
dataApiBaseUrl: z17.string().min(1).max(2048).optional()
|
|
740
740
|
});
|
|
741
741
|
var siteConfigSchema = z17.object({
|
|
742
742
|
title: z17.string().min(1).max(120).optional().describe("Brand / site name. Used as the logo's alt-text fallback."),
|