@helpai/elements 0.22.0 → 0.24.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 CHANGED
@@ -432,6 +432,12 @@ var formDefSchema = z12.object({
432
432
  frequency: z12.enum(["once", "conversation", "always"]).default("once").describe("`once` (per device, persisted), `conversation` (re-eligible each new conversation), or `always`."),
433
433
  mirrorToContext: z12.boolean().default(true).describe(
434
434
  "Mirror the answers into `userContext` so they ride every request. Set `false` for PII (DOB, policy #, symptoms) \u2014 those then go only to the submit endpoint."
435
+ ),
436
+ reopenable: z12.boolean().default(true).describe(
437
+ 'Skipped marker offers a "Fill out" button that reopens the form. Set `false` when a skip must be final (e.g. a consent ask that should not be re-surfaced).'
438
+ ),
439
+ reviewable: z12.boolean().default(true).describe(
440
+ "Submitted marker expands in place to a read-only list of the visitor's answers. Set `false` for sensitive answers that shouldn't linger on screen."
435
441
  )
436
442
  }).loose();
437
443
  var formsSchema = z12.array(formDefSchema).max(20).describe(
@@ -568,7 +574,10 @@ import { z as z15 } from "zod";
568
574
  var trackingSchema = z15.object({
569
575
  enabled: z15.boolean().optional().describe("Master switch. Default `false` \u2014 no hits are sent until the deployment turns tracking on."),
570
576
  endpoint: z15.url().max(2048).optional().describe("Pixel collector URL. Default: `https://t.<brand domain>/api/ai-elements/px.gif`. Must be a full URL."),
571
- sampleRate: z15.number().min(0).max(1).optional().describe("Per-visitor sampling 0..1 (decided once per page load, keeping funnels intact). Default `1`.")
577
+ sampleRate: z15.number().min(0).max(1).optional().describe("Per-visitor sampling 0..1 (decided once per page load, keeping funnels intact). Default `1`."),
578
+ token: z15.string().max(512).optional().describe(
579
+ "Anti-forgery token, echoed as `tk=` on every hit. Server-issued in the `/start-conversation` response \u2014 never set by hand (see `docs/api/tracking-collector.md`)."
580
+ )
572
581
  }).loose().describe(
573
582
  "Anonymous usage tracking for the widget owner \u2014 GA-style pixel events (open, send, form submit, \u2026) with page / device / locale dimensions. Never includes message content; visitors are identified only by the widget's anonymous visitorId."
574
583
  ).meta({