@encatch/schema 1.3.0-beta.1 → 1.3.0-beta.2

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/dist/esm/index.js CHANGED
@@ -168,8 +168,8 @@ var thankYouQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.exte
168
168
  completionCta: z.object({
169
169
  label: translationEntrySchema.optional().describe("Translated label for the primary CTA button"),
170
170
  secondary: z.object({
171
- label: translationEntrySchema.optional().describe("Translated label for the secondary dismiss button")
172
- }).optional().describe("Translated labels for the secondary dismiss button")
171
+ label: translationEntrySchema.optional().describe("Translated label for the secondary CTA button")
172
+ }).optional().describe("Translated labels for the secondary CTA button")
173
173
  }).optional().describe(
174
174
  "Translations for completionCta button labels; only label fields are translatable \u2014 platform action configs (url, route, action) are locale-agnostic"
175
175
  )
@@ -407,10 +407,16 @@ var platformCompletionCtaSchema = z2.discriminatedUnion("action", [
407
407
  );
408
408
  var completionCtaSecondarySchema = z2.object({
409
409
  label: z2.string().min(1).max(100).describe(
410
- "Label for the secondary dismiss button (e.g. 'Not right now'); always triggers dismiss"
410
+ "Label for the secondary button (e.g. 'Not right now', 'Learn more')"
411
+ ),
412
+ inApp: platformCompletionCtaSchema.optional().describe(
413
+ "Secondary button action when the form runs inside a host app; when this surface block is absent the engine defaults to dismiss (backward compatible with label-only secondary configs)"
414
+ ),
415
+ link: platformCompletionCtaSchema.optional().describe(
416
+ "Secondary button action when the form runs as a shareable link; when this surface block is absent the engine defaults to dismiss (backward compatible with label-only secondary configs)"
411
417
  )
412
418
  }).describe(
413
- "Optional secondary button on thank_you screens; action is always dismiss \u2014 use to give respondents a soft exit alongside the primary CTA"
419
+ "Optional secondary button on thank_you screens; supports the same per-surface actions as the primary CTA (dismiss, app_navigate, redirect_internal, redirect_external); label-only configs default to dismiss on each surface"
414
420
  );
415
421
  var completionCtaSchema = z2.object({
416
422
  label: z2.string().min(1).max(100).optional().describe(
@@ -426,7 +432,7 @@ var completionCtaSchema = z2.object({
426
432
  "CTA action used when the form is rendered as a standalone shareable URL (browser tab or full-page embed)"
427
433
  ),
428
434
  secondary: completionCtaSecondarySchema.optional().describe(
429
- "Optional secondary dismiss button shown on thank_you screens alongside a non-dismiss primary CTA; not shown when the primary action is already dismiss or when completionCta falls back to nextButtonLabel"
435
+ "Optional secondary button on thank_you screens with its own per-surface action routing (inApp / link); label-only configs default to dismiss; not used on exit_form (no UI)"
430
436
  )
431
437
  }).describe(
432
438
  "Optional completion CTA configuration for thank_you and exit_form questions; controls what happens after form submission \u2014 redirect, in-app navigation, or dismiss \u2014 with separate settings per rendering surface (inApp / link)"
@@ -728,7 +734,7 @@ var thankYouQuestionSchema = questionSchema.extend({
728
734
  ),
729
735
  imageUrl: z3.string().url().optional().describe("Optional image URL displayed on the thank you screen"),
730
736
  completionCta: completionCtaSchema.optional().describe(
731
- "Optional CTA shown after submission; supports primary + optional secondary (dismiss) buttons, per-surface action routing (inApp / link), and optional auto-trigger timer; when absent the engine falls back to nextButtonLabel as a single dismiss button"
737
+ "Optional CTA shown after submission; supports primary + optional secondary buttons with per-surface action routing (inApp / link), and optional auto-trigger timer; when absent the engine falls back to nextButtonLabel as a single dismiss button"
732
738
  )
733
739
  }).describe(
734
740
  "Schema for a thank you screen shown at the end or inline within a form"