@helpai/elements 0.14.2 → 0.15.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/package.json CHANGED
@@ -80,5 +80,5 @@
80
80
  ],
81
81
  "type": "module",
82
82
  "types": "./index.d.ts",
83
- "version": "0.14.2"
83
+ "version": "0.15.0"
84
84
  }
package/schema.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startConversationResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-CWyouRob.js';
1
+ export { A as Asset, B as BlocksConfig, C as ConnectionConfig, a as ConnectionConfigPartial, E as Endpoints, L as Link, P as PAGE_AREA_SUGGESTIONS, g as PageContext, S as ServerConfig, b as SiteConfig, c as StartConversationResponse, U as UserContext, W as WidgetConfig, d as WidgetConfigPartial, e as WidgetSettings, f as WidgetSettingsPartial, h as assetSchema, i as blocksConfigSchema, j as connectionConfigPartialSchema, k as connectionConfigSchema, l as cssColorSchema, m as cssLengthSchema, n as endpointsSchema, o as linkSchema, p as localeSchema, q as pageContextSchema, s as serverConfigSchema, r as siteConfigSchema, t as startConversationResponseSchema, u as userContextSchema, v as uuid7Schema, w as widgetConfigPartialSchema, x as widgetConfigSchema, y as widgetSettingsPartialSchema, z as widgetSettingsSchema } from './deployment-P3CoZ-BV.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -56,9 +56,9 @@ declare const presentationSchema: z.ZodObject<{
56
56
  inset: z.ZodOptional<z.ZodString>;
57
57
  initialSize: z.ZodDefault<z.ZodEnum<{
58
58
  fullscreen: "fullscreen";
59
- normal: "normal";
60
59
  expanded: "expanded";
61
60
  auto: "auto";
61
+ normal: "normal";
62
62
  }>>;
63
63
  autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
64
64
  }, z.core.$loose>>;
@@ -148,9 +148,9 @@ declare const launcherSizeSchema: z.ZodEnum<{
148
148
  }>;
149
149
  type LauncherSize = z.infer<typeof launcherSizeSchema>;
150
150
  declare const calloutShapeSchema: z.ZodEnum<{
151
+ callout: "callout";
151
152
  pill: "pill";
152
153
  bubble: "bubble";
153
- callout: "callout";
154
154
  }>;
155
155
  type CalloutShape = z.infer<typeof calloutShapeSchema>;
156
156
  declare const calloutPositionSchema: z.ZodEnum<{
@@ -162,9 +162,9 @@ type CalloutPosition = z.infer<typeof calloutPositionSchema>;
162
162
  declare const launcherCalloutSchema: z.ZodObject<{
163
163
  text: z.ZodDefault<z.ZodString>;
164
164
  shape: z.ZodDefault<z.ZodEnum<{
165
+ callout: "callout";
165
166
  pill: "pill";
166
167
  bubble: "bubble";
167
- callout: "callout";
168
168
  }>>;
169
169
  position: z.ZodDefault<z.ZodEnum<{
170
170
  auto: "auto";
@@ -195,9 +195,9 @@ declare const launcherOptionsSchema: z.ZodObject<{
195
195
  callout: z.ZodOptional<z.ZodObject<{
196
196
  text: z.ZodDefault<z.ZodString>;
197
197
  shape: z.ZodDefault<z.ZodEnum<{
198
+ callout: "callout";
198
199
  pill: "pill";
199
200
  bubble: "bubble";
200
- callout: "callout";
201
201
  }>>;
202
202
  position: z.ZodDefault<z.ZodEnum<{
203
203
  auto: "auto";
@@ -240,9 +240,9 @@ type LauncherOptions = z.infer<typeof launcherOptionsSchema>;
240
240
 
241
241
  declare const initialSizeSchema: z.ZodEnum<{
242
242
  fullscreen: "fullscreen";
243
- normal: "normal";
244
243
  expanded: "expanded";
245
244
  auto: "auto";
245
+ normal: "normal";
246
246
  }>;
247
247
  declare const resizeOptionsSchema: z.ZodObject<{
248
248
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -269,9 +269,9 @@ declare const sizeOptionsSchema: z.ZodObject<{
269
269
  inset: z.ZodOptional<z.ZodString>;
270
270
  initialSize: z.ZodDefault<z.ZodEnum<{
271
271
  fullscreen: "fullscreen";
272
- normal: "normal";
273
272
  expanded: "expanded";
274
273
  auto: "auto";
274
+ normal: "normal";
275
275
  }>>;
276
276
  autoSizeBreakpoint: z.ZodDefault<z.ZodNumber>;
277
277
  }, z.core.$loose>;
@@ -323,40 +323,40 @@ type FeatureFlags = z.infer<typeof featureFlagsSchema>;
323
323
  */
324
324
 
325
325
  declare const actionNameSchema: z.ZodEnum<{
326
+ close: "close";
326
327
  expand: "expand";
327
328
  fullscreen: "fullscreen";
328
329
  popOut: "popOut";
329
- close: "close";
330
- language: "language";
330
+ clear: "clear";
331
331
  theme: "theme";
332
+ language: "language";
332
333
  history: "history";
333
- clear: "clear";
334
334
  sound: "sound";
335
335
  }>;
336
336
  type ActionName = z.infer<typeof actionNameSchema>;
337
337
  declare const headerActionsSchema: z.ZodArray<z.ZodEnum<{
338
+ close: "close";
338
339
  expand: "expand";
339
340
  fullscreen: "fullscreen";
340
341
  popOut: "popOut";
341
- close: "close";
342
- language: "language";
342
+ clear: "clear";
343
343
  theme: "theme";
344
+ language: "language";
344
345
  history: "history";
345
- clear: "clear";
346
346
  sound: "sound";
347
347
  }>>;
348
348
  type HeaderActions = z.infer<typeof headerActionsSchema>;
349
349
  /** Section wrapper — `actions` list wrapped under `header` in the dashboard form. */
350
350
  declare const headerSchema: z.ZodObject<{
351
351
  actions: z.ZodOptional<z.ZodArray<z.ZodEnum<{
352
+ close: "close";
352
353
  expand: "expand";
353
354
  fullscreen: "fullscreen";
354
355
  popOut: "popOut";
355
- close: "close";
356
- language: "language";
356
+ clear: "clear";
357
357
  theme: "theme";
358
+ language: "language";
358
359
  history: "history";
359
- clear: "clear";
360
360
  sound: "sound";
361
361
  }>>>;
362
362
  }, z.core.$loose>;
@@ -372,33 +372,33 @@ type HeaderOptions = z.infer<typeof headerSchema>;
372
372
  */
373
373
 
374
374
  declare const feedbackEventSchema: z.ZodEnum<{
375
+ voiceStart: "voiceStart";
376
+ voiceStop: "voiceStop";
375
377
  error: "error";
376
378
  messageReceived: "messageReceived";
377
379
  messageSent: "messageSent";
378
- voiceStart: "voiceStart";
379
- voiceStop: "voiceStop";
380
380
  }>;
381
381
  type FeedbackEvent = z.infer<typeof feedbackEventSchema>;
382
382
  declare const soundOptionsSchema: z.ZodObject<{
383
383
  enabled: z.ZodDefault<z.ZodBoolean>;
384
384
  volume: z.ZodDefault<z.ZodNumber>;
385
385
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
386
+ voiceStart: "voiceStart";
387
+ voiceStop: "voiceStop";
386
388
  error: "error";
387
389
  messageReceived: "messageReceived";
388
390
  messageSent: "messageSent";
389
- voiceStart: "voiceStart";
390
- voiceStop: "voiceStop";
391
391
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
392
392
  }, z.core.$loose>;
393
393
  type SoundOptions = z.infer<typeof soundOptionsSchema>;
394
394
  declare const hapticsOptionsSchema: z.ZodObject<{
395
395
  enabled: z.ZodDefault<z.ZodBoolean>;
396
396
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
397
+ voiceStart: "voiceStart";
398
+ voiceStop: "voiceStop";
397
399
  error: "error";
398
400
  messageReceived: "messageReceived";
399
401
  messageSent: "messageSent";
400
- voiceStart: "voiceStart";
401
- voiceStop: "voiceStop";
402
402
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
403
403
  }, z.core.$loose>;
404
404
  type HapticsOptions = z.infer<typeof hapticsOptionsSchema>;
@@ -407,21 +407,21 @@ declare const feedbackSchema: z.ZodObject<{
407
407
  enabled: z.ZodDefault<z.ZodBoolean>;
408
408
  volume: z.ZodDefault<z.ZodNumber>;
409
409
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
410
+ voiceStart: "voiceStart";
411
+ voiceStop: "voiceStop";
410
412
  error: "error";
411
413
  messageReceived: "messageReceived";
412
414
  messageSent: "messageSent";
413
- voiceStart: "voiceStart";
414
- voiceStop: "voiceStop";
415
415
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>>;
416
416
  }, z.core.$loose>>;
417
417
  haptics: z.ZodOptional<z.ZodObject<{
418
418
  enabled: z.ZodDefault<z.ZodBoolean>;
419
419
  events: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
420
+ voiceStart: "voiceStart";
421
+ voiceStop: "voiceStop";
420
422
  error: "error";
421
423
  messageReceived: "messageReceived";
422
424
  messageSent: "messageSent";
423
- voiceStart: "voiceStart";
424
- voiceStop: "voiceStop";
425
425
  }> & z.core.$partial, z.ZodUnion<readonly [z.ZodBoolean, z.ZodNumber, z.ZodArray<z.ZodNumber>]>>>;
426
426
  }, z.core.$loose>>;
427
427
  }, z.core.$loose>;
@@ -562,16 +562,16 @@ type FooterOptions = z.infer<typeof footerSchema>;
562
562
 
563
563
  declare const fieldTypeSchema: z.ZodEnum<{
564
564
  number: "number";
565
+ select: "select";
566
+ textarea: "textarea";
567
+ time: "time";
565
568
  text: "text";
569
+ checkbox: "checkbox";
570
+ radio: "radio";
566
571
  url: "url";
567
572
  email: "email";
568
573
  tel: "tel";
569
574
  date: "date";
570
- time: "time";
571
- textarea: "textarea";
572
- select: "select";
573
- radio: "radio";
574
- checkbox: "checkbox";
575
575
  multiselect: "multiselect";
576
576
  }>;
577
577
  type FieldType = z.infer<typeof fieldTypeSchema>;
@@ -596,16 +596,16 @@ declare const formFieldSchema: z.ZodObject<{
596
596
  label: z.ZodString;
597
597
  type: z.ZodEnum<{
598
598
  number: "number";
599
+ select: "select";
600
+ textarea: "textarea";
601
+ time: "time";
599
602
  text: "text";
603
+ checkbox: "checkbox";
604
+ radio: "radio";
600
605
  url: "url";
601
606
  email: "email";
602
607
  tel: "tel";
603
608
  date: "date";
604
- time: "time";
605
- textarea: "textarea";
606
- select: "select";
607
- radio: "radio";
608
- checkbox: "checkbox";
609
609
  multiselect: "multiselect";
610
610
  }>;
611
611
  placeholder: z.ZodOptional<z.ZodString>;
@@ -656,16 +656,16 @@ declare const formDefSchema: z.ZodObject<{
656
656
  label: z.ZodString;
657
657
  type: z.ZodEnum<{
658
658
  number: "number";
659
+ select: "select";
660
+ textarea: "textarea";
661
+ time: "time";
659
662
  text: "text";
663
+ checkbox: "checkbox";
664
+ radio: "radio";
660
665
  url: "url";
661
666
  email: "email";
662
667
  tel: "tel";
663
668
  date: "date";
664
- time: "time";
665
- textarea: "textarea";
666
- select: "select";
667
- radio: "radio";
668
- checkbox: "checkbox";
669
669
  multiselect: "multiselect";
670
670
  }>;
671
671
  placeholder: z.ZodOptional<z.ZodString>;
@@ -714,16 +714,16 @@ declare const formsSchema: z.ZodArray<z.ZodObject<{
714
714
  label: z.ZodString;
715
715
  type: z.ZodEnum<{
716
716
  number: "number";
717
+ select: "select";
718
+ textarea: "textarea";
719
+ time: "time";
717
720
  text: "text";
721
+ checkbox: "checkbox";
722
+ radio: "radio";
718
723
  url: "url";
719
724
  email: "email";
720
725
  tel: "tel";
721
726
  date: "date";
722
- time: "time";
723
- textarea: "textarea";
724
- select: "select";
725
- radio: "radio";
726
- checkbox: "checkbox";
727
727
  multiselect: "multiselect";
728
728
  }>;
729
729
  placeholder: z.ZodOptional<z.ZodString>;
@@ -795,18 +795,18 @@ type I18nOptions = z.infer<typeof i18nSchema>;
795
795
  */
796
796
 
797
797
  declare const moduleLayoutSchema: z.ZodEnum<{
798
+ home: "home";
798
799
  chat: "chat";
799
800
  help: "help";
800
- home: "home";
801
801
  news: "news";
802
802
  }>;
803
803
  type ModuleLayout = z.infer<typeof moduleLayoutSchema>;
804
804
  declare const moduleSchema: z.ZodObject<{
805
805
  label: z.ZodString;
806
806
  layout: z.ZodEnum<{
807
+ home: "home";
807
808
  chat: "chat";
808
809
  help: "help";
809
- home: "home";
810
810
  news: "news";
811
811
  }>;
812
812
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -820,7 +820,7 @@ declare const moduleSchema: z.ZodObject<{
820
820
  role: z.ZodOptional<z.ZodString>;
821
821
  }, z.core.$loose>>>;
822
822
  showSearchBar: z.ZodOptional<z.ZodBoolean>;
823
- showRecentMessages: z.ZodOptional<z.ZodBoolean>;
823
+ showRecentConversations: z.ZodOptional<z.ZodBoolean>;
824
824
  status: z.ZodOptional<z.ZodObject<{
825
825
  text: z.ZodString;
826
826
  level: z.ZodOptional<z.ZodString>;
@@ -832,9 +832,9 @@ type ModuleOptions = z.infer<typeof moduleSchema>;
832
832
  declare const modulesSchema: z.ZodArray<z.ZodObject<{
833
833
  label: z.ZodString;
834
834
  layout: z.ZodEnum<{
835
+ home: "home";
835
836
  chat: "chat";
836
837
  help: "help";
837
- home: "home";
838
838
  news: "news";
839
839
  }>;
840
840
  contentTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -848,7 +848,7 @@ declare const modulesSchema: z.ZodArray<z.ZodObject<{
848
848
  role: z.ZodOptional<z.ZodString>;
849
849
  }, z.core.$loose>>>;
850
850
  showSearchBar: z.ZodOptional<z.ZodBoolean>;
851
- showRecentMessages: z.ZodOptional<z.ZodBoolean>;
851
+ showRecentConversations: z.ZodOptional<z.ZodBoolean>;
852
852
  status: z.ZodOptional<z.ZodObject<{
853
853
  text: z.ZodString;
854
854
  level: z.ZodOptional<z.ZodString>;
package/schema.json CHANGED
@@ -469,7 +469,7 @@
469
469
  "type": "boolean"
470
470
  },
471
471
  "popOutUrl": {
472
- "description": "URL the `popOut` action opens in a new tab (carries `?chat=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`.",
472
+ "description": "URL the `popOut` action opens in a new tab (carries `?conversation=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`.",
473
473
  "type": "string",
474
474
  "minLength": 1,
475
475
  "maxLength": 2048
@@ -1786,7 +1786,7 @@
1786
1786
  "description": "`home` — show the 'Search for help' bar (default true).",
1787
1787
  "type": "boolean"
1788
1788
  },
1789
- "showRecentMessages": {
1789
+ "showRecentConversations": {
1790
1790
  "description": "`home` — show the visitor's most recent conversation card (default true).",
1791
1791
  "type": "boolean"
1792
1792
  },
@@ -1836,7 +1836,7 @@
1836
1836
  "examples": [
1837
1837
  [
1838
1838
  {
1839
- "label": "tabMessages",
1839
+ "label": "tabConversations",
1840
1840
  "layout": "chat"
1841
1841
  }
1842
1842
  ],
@@ -1846,14 +1846,14 @@
1846
1846
  "layout": "home",
1847
1847
  "brandName": "Acme",
1848
1848
  "showSearchBar": true,
1849
- "showRecentMessages": true,
1849
+ "showRecentConversations": true,
1850
1850
  "contentBlockTitle": "Popular articles",
1851
1851
  "contentTags": [
1852
1852
  "popular"
1853
1853
  ]
1854
1854
  },
1855
1855
  {
1856
- "label": "tabMessages",
1856
+ "label": "tabConversations",
1857
1857
  "layout": "chat"
1858
1858
  },
1859
1859
  {
@@ -2222,7 +2222,7 @@
2222
2222
  "type": "boolean"
2223
2223
  },
2224
2224
  "popOutUrl": {
2225
- "description": "URL the `popOut` action opens in a new tab (carries `?chat=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`.",
2225
+ "description": "URL the `popOut` action opens in a new tab (carries `?conversation=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`.",
2226
2226
  "type": "string",
2227
2227
  "minLength": 1,
2228
2228
  "maxLength": 2048
@@ -3539,7 +3539,7 @@
3539
3539
  "description": "`home` — show the 'Search for help' bar (default true).",
3540
3540
  "type": "boolean"
3541
3541
  },
3542
- "showRecentMessages": {
3542
+ "showRecentConversations": {
3543
3543
  "description": "`home` — show the visitor's most recent conversation card (default true).",
3544
3544
  "type": "boolean"
3545
3545
  },
@@ -3589,7 +3589,7 @@
3589
3589
  "examples": [
3590
3590
  [
3591
3591
  {
3592
- "label": "tabMessages",
3592
+ "label": "tabConversations",
3593
3593
  "layout": "chat"
3594
3594
  }
3595
3595
  ],
@@ -3599,14 +3599,14 @@
3599
3599
  "layout": "home",
3600
3600
  "brandName": "Acme",
3601
3601
  "showSearchBar": true,
3602
- "showRecentMessages": true,
3602
+ "showRecentConversations": true,
3603
3603
  "contentBlockTitle": "Popular articles",
3604
3604
  "contentTags": [
3605
3605
  "popular"
3606
3606
  ]
3607
3607
  },
3608
3608
  {
3609
- "label": "tabMessages",
3609
+ "label": "tabConversations",
3610
3610
  "layout": "chat"
3611
3611
  },
3612
3612
  {
package/schema.mjs CHANGED
@@ -129,7 +129,7 @@ var behaviorSchema = z4.object({
129
129
  "Show tool/function calls the model makes (e.g. search) as inline chips in the transcript. `false` (default) hides them."
130
130
  ),
131
131
  popOutUrl: z4.string().min(1).max(2048).optional().describe(
132
- "URL the `popOut` action opens in a new tab (carries `?chat=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`."
132
+ "URL the `popOut` action opens in a new tab (carries `?conversation=<id>&widgetId=<id>` query params). Falls back to the brand's build-time default. Set this to point at your own dedicated chat page (e.g. `https://app.acme.com/chat`). Server-pushable on `/start-conversation.widget.behavior.popOutUrl`."
133
133
  )
134
134
  }).loose().describe("Lifecycle + streaming behaviour. Doesn't affect visual presentation.").meta({
135
135
  examples: [
@@ -539,7 +539,7 @@ var moduleSchema = z15.object({
539
539
  }).loose()
540
540
  ).max(10).optional().describe("`home` \u2014 team/agent avatars shown in the hero."),
541
541
  showSearchBar: z15.boolean().optional().describe("`home` \u2014 show the 'Search for help' bar (default true)."),
542
- showRecentMessages: z15.boolean().optional().describe("`home` \u2014 show the visitor's most recent conversation card (default true)."),
542
+ showRecentConversations: z15.boolean().optional().describe("`home` \u2014 show the visitor's most recent conversation card (default true)."),
543
543
  status: z15.object({
544
544
  text: z15.string().min(1).max(120),
545
545
  level: z15.string().max(40).optional().describe(
@@ -553,18 +553,18 @@ var modulesSchema = z15.array(moduleSchema).max(4).describe(
553
553
  "Messenger tabs \u2014 an ordered list of up to 4 tabs, each picking a `layout` + optional content `contentTags` (the content scope) + a translatable `label`. One tab \u2192 no tab bar (just that content); zero \u2192 an empty state. Floating / drawer / modal only."
554
554
  ).meta({
555
555
  examples: [
556
- [{ label: "tabMessages", layout: "chat" }],
556
+ [{ label: "tabConversations", layout: "chat" }],
557
557
  [
558
558
  {
559
559
  label: "tabHome",
560
560
  layout: "home",
561
561
  brandName: "Acme",
562
562
  showSearchBar: true,
563
- showRecentMessages: true,
563
+ showRecentConversations: true,
564
564
  contentBlockTitle: "Popular articles",
565
565
  contentTags: ["popular"]
566
566
  },
567
- { label: "tabMessages", layout: "chat" },
567
+ { label: "tabConversations", layout: "chat" },
568
568
  { label: "tabHelp", layout: "help", contentTags: ["help", "guides"] },
569
569
  { label: "tabNews", layout: "news", contentTags: ["news"] }
570
570
  ]