@encatch/schema 1.2.0-beta.0 → 1.2.0-beta.10

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
@@ -70,6 +70,51 @@ var longAnswerQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.ex
70
70
  type: z.literal("long_text").describe("Question type identifier"),
71
71
  placeholder: translationEntrySchema.optional().describe("Textarea placeholder translation")
72
72
  }).describe("Translation schema for long answer questions");
73
+ var videoAudioQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
74
+ type: z.literal("video_audio").describe("Question type identifier"),
75
+ placeholder: translationEntrySchema.optional().describe("Placeholder for text/photo hints"),
76
+ modeTabLabelVideo: z.string().max(80).optional().describe("Translated tab label for video mode"),
77
+ modeTabLabelAudio: z.string().max(80).optional().describe("Translated tab label for audio mode"),
78
+ modeTabLabelPhoto: z.string().max(80).optional().describe("Translated tab label for photo mode"),
79
+ modeTabLabelText: z.string().max(80).optional().describe("Translated tab label for text mode"),
80
+ recordButtonLabel: z.string().max(80).optional().describe("Translated Record button label"),
81
+ uploadMediaButtonLabel: z.string().max(80).optional().describe("Translated upload button (video/audio)"),
82
+ videoIdleHint: z.string().max(200).optional().describe("Translated video idle overlay hint"),
83
+ photoEmptyHint: z.string().max(200).optional().describe("Translated empty photo area hint"),
84
+ photoUseCameraButtonLabel: z.string().max(80).optional().describe("Translated Use camera button"),
85
+ photoUploadImageButtonLabel: z.string().max(80).optional().describe("Translated Upload image button")
86
+ }).describe("Translation schema for video/audio/photo/text questions");
87
+ var dateQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
88
+ type: z.literal("date").describe("Question type identifier"),
89
+ placeholder: translationEntrySchema.optional().describe("Placeholder for the date field"),
90
+ segmentLabelDD: z.string().max(40).optional().describe("Label above the day digits"),
91
+ segmentLabelMM: z.string().max(40).optional().describe("Label above the month digits"),
92
+ segmentLabelYYYY: z.string().max(40).optional().describe("Label above the year digits")
93
+ }).describe("Translation schema for date questions");
94
+ var signatureQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
95
+ type: z.literal("signature").describe("Question type identifier"),
96
+ clearButtonLabel: z.string().max(50).optional().describe("Translated clear button in draw mode"),
97
+ placeholder: z.string().max(200).optional().describe("Shared fallback for draw/upload hints"),
98
+ modeTabLabelType: z.string().max(80).optional().describe("Translated Type tab label"),
99
+ modeTabLabelDraw: z.string().max(80).optional().describe("Translated Draw tab label"),
100
+ modeTabLabelUpload: z.string().max(80).optional().describe("Translated Upload tab label"),
101
+ drawCanvasHint: z.string().max(200).optional().describe("Translated empty-canvas hint"),
102
+ uploadZonePrimary: z.string().max(200).optional().describe("Translated idle upload prompt"),
103
+ uploadZoneDrag: z.string().max(120).optional().describe("Translated drag-over upload prompt")
104
+ }).describe("Translation schema for signature questions");
105
+ var schedulerQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
106
+ type: z.literal("scheduler").describe("Question type identifier"),
107
+ placeholder: z.string().max(200).optional().describe("Fallback for meeting CTA when scheduleMeetingLabel is unset"),
108
+ scheduleMeetingLabel: z.string().max(200).optional().describe("Book-a-meeting button and modal label")
109
+ }).describe("Translation schema for scheduler questions");
110
+ var qnaWithAiQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
111
+ type: z.literal("qna_with_ai").describe("Question type identifier"),
112
+ placeholder: z.string().max(200).optional().describe("Input placeholder for the question field"),
113
+ askButtonLabel: z.string().max(50).optional().describe("Ask / submit control label"),
114
+ emptyStateHint: z.string().max(200).optional().describe("Empty chat area hint"),
115
+ pairsRemainingTemplate: z.string().max(160).optional().describe("Under-limit counter; tokens {remaining} and {max}"),
116
+ pairsLimitReachedTemplate: z.string().max(160).optional().describe("At-limit message; token {max}")
117
+ }).describe("Translation schema for Q&A with AI questions");
73
118
  var nestedSelectionQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
74
119
  type: z.literal("nested_selection").describe("Question type identifier"),
75
120
  placeholder: translationEntrySchema.optional().describe("Dropdown placeholder translation")
@@ -164,6 +209,11 @@ var questionTranslationSchema = z.union([
164
209
  npsQuestionTranslationSchema,
165
210
  shortAnswerQuestionTranslationSchema,
166
211
  longAnswerQuestionTranslationSchema,
212
+ videoAudioQuestionTranslationSchema,
213
+ dateQuestionTranslationSchema,
214
+ signatureQuestionTranslationSchema,
215
+ schedulerQuestionTranslationSchema,
216
+ qnaWithAiQuestionTranslationSchema,
167
217
  nestedSelectionQuestionTranslationSchema,
168
218
  annotationQuestionTranslationSchema,
169
219
  welcomeQuestionTranslationSchema,
@@ -525,7 +575,9 @@ var questionSchema = z2.object({
525
575
  nextButtonLabel: z2.string().min(1).max(50).default("Next").describe(
526
576
  "Label for the next button when advancing past this question (overrides section or form defaults when set)"
527
577
  ),
528
- showQuestionTitle: z2.boolean().default(true).describe("Whether to display the question title; defaults to true")
578
+ showQuestionTitle: z2.boolean().default(true).describe("Whether to display the question title; defaults to true"),
579
+ questionMediaUrl: z2.string().url().optional().describe("Optional URL for media (image or video) displayed alongside the question"),
580
+ questionMediaType: z2.enum(["image", "video", "youtube", "vimeo"]).optional().describe("Type of media referenced by questionMediaUrl; one of 'image', 'video', 'youtube', or 'vimeo'")
529
581
  }).describe("Base schema for all question types with common properties");
530
582
  var ratingQuestionSchema = questionSchema.extend({
531
583
  type: z2.literal("rating").describe("Must be exactly 'rating'"),
@@ -906,6 +958,9 @@ var dateQuestionSchema = questionSchema.extend({
906
958
  minDate: z2.string().optional().describe("Earliest allowed date in ISO 8601 format (YYYY-MM-DD); when absent no lower bound is enforced"),
907
959
  maxDate: z2.string().optional().describe("Latest allowed date in ISO 8601 format (YYYY-MM-DD); when absent no upper bound is enforced"),
908
960
  placeholder: z2.string().max(50).optional().describe("Placeholder text shown in the date input"),
961
+ segmentLabelDD: z2.string().max(40).optional().describe("Visible label above the day segment; when absent a locale default is used"),
962
+ segmentLabelMM: z2.string().max(40).optional().describe("Visible label above the month segment"),
963
+ segmentLabelYYYY: z2.string().max(40).optional().describe("Visible label above the year segment"),
909
964
  prepopulatedValue: z2.string().optional().describe("Default date value in ISO 8601 format (YYYY-MM-DD) to pre-fill the input")
910
965
  }).describe("Schema for a date question that collects a structured date (and optionally time) from the respondent");
911
966
  var csatScaleSchema = z2.union([
@@ -930,12 +985,12 @@ var csatQuestionSchema = questionSchema.extend({
930
985
  scale: csatScaleSchema.optional().default(5).describe("Number of response points (2\u20135); 2 and 4 have no neutral option, default is 5"),
931
986
  displayStyle: csatDisplayStyleSchema.optional().default("emoji").describe("How response options are rendered \u2014 emoji faces (default) or text buttons"),
932
987
  multicolor: z2.boolean().optional().default(false).describe("Whether to apply distinct colors to negative, neutral, and positive segments"),
933
- negativeColor: z2.string().max(50).optional().describe("Color for negative response options (semantic values -2, -1); any valid CSS color; used when multicolor is true"),
934
- neutralColor: z2.string().max(50).optional().describe("Color for the neutral response option (semantic value 0); any valid CSS color; used when multicolor is true"),
935
- positiveColor: z2.string().max(50).optional().describe("Color for positive response options (semantic values 1, 2); any valid CSS color; used when multicolor is true"),
988
+ negativeColor: z2.string().max(50).optional().describe("Color for negative response options (lower half of scale); any valid CSS color; used when multicolor is true"),
989
+ neutralColor: z2.string().max(50).optional().describe("Color for the neutral midpoint option (odd scales only: scale 3 = value 2, scale 5 = value 3); any valid CSS color; used when multicolor is true"),
990
+ positiveColor: z2.string().max(50).optional().describe("Color for positive response options (upper half of scale); any valid CSS color; used when multicolor is true"),
936
991
  showLabels: z2.boolean().optional().default(false).describe("Whether to render per-point labels below each response option"),
937
- scaleLabels: z2.record(z2.string(), z2.string().max(100)).optional().describe("Per-point label text keyed by semantic value string ('-2', '-1', '0', '1', '2')")
938
- }).describe("Schema for a CSAT (Customer Satisfaction Score) question using a 2\u20135 point semantic scale");
992
+ scaleLabels: z2.record(z2.string(), z2.string().max(100)).optional().describe("Per-point label text keyed by value string ('1'\u2013'5'); keys must match the chosen scale size")
993
+ }).describe("Schema for a CSAT (Customer Satisfaction Score) question using an industry-standard 1-to-N positive scale (N = 2\u20135)");
939
994
  var opinionScaleQuestionSchema = questionSchema.extend({
940
995
  type: z2.literal("opinion_scale").describe("Must be exactly 'opinion_scale'"),
941
996
  startValue: z2.union([z2.literal(0), z2.literal(1)]).optional().default(0).describe("Starting value of the scale \u2014 0 (default) or 1"),
@@ -1006,7 +1061,16 @@ var signatureQuestionSchema = questionSchema.extend({
1006
1061
  penWidth: z2.number().int().min(1).max(20).optional().describe("Pen stroke thickness in pixels for the draw canvas (1\u201320); when absent the renderer default (typically 2) is used"),
1007
1062
  backgroundColor: z2.string().max(50).optional().describe("Background color of the draw canvas; any valid CSS color; when absent the canvas is transparent and inherits the form background"),
1008
1063
  canvasHeight: z2.number().int().min(60).max(600).optional().describe("Draw canvas height in logical pixels (60\u2013600); width always fills the container; when absent the renderer chooses a sensible default (typically 200)"),
1009
- clearButtonLabel: z2.string().max(50).optional().describe("Label for the clear/redo button in draw mode; when absent the platform default label or icon is shown")
1064
+ clearButtonLabel: z2.string().max(50).optional().describe("Label for the clear/redo button in draw mode; when absent the platform default label or icon is shown"),
1065
+ placeholder: z2.string().max(200).optional().describe(
1066
+ "Optional shared fallback copy for draw-canvas and upload-zone hints when their dedicated fields are unset"
1067
+ ),
1068
+ modeTabLabelType: z2.string().max(80).optional().describe("Custom visible label for the Type tab; when absent only the tab icon is shown (use aria-label on the client)"),
1069
+ modeTabLabelDraw: z2.string().max(80).optional().describe("Custom visible label for the Draw tab; when absent only the tab icon is shown"),
1070
+ modeTabLabelUpload: z2.string().max(80).optional().describe("Custom visible label for the Upload tab; when absent only the tab icon is shown"),
1071
+ drawCanvasHint: z2.string().max(200).optional().describe("Hint shown on the empty draw canvas (e.g. 'Draw your signature here'); falls back to placeholder then platform default"),
1072
+ uploadZonePrimary: z2.string().max(200).optional().describe("Main prompt on the upload drop zone when idle (e.g. click to upload); falls back to placeholder then default"),
1073
+ uploadZoneDrag: z2.string().max(120).optional().describe("Short prompt when dragging a file over the upload zone; falls back to platform default")
1010
1074
  }).describe("Schema for a signature question where respondents can type, draw, or upload their electronic signature");
1011
1075
  var fileUploadQuestionSchema = questionSchema.extend({
1012
1076
  type: z2.literal("file_upload").describe("Must be exactly 'file_upload'"),
@@ -1029,7 +1093,7 @@ var numberQuestionSchema = questionSchema.extend({
1029
1093
  allowNegative: z2.boolean().optional().default(false).describe("Whether negative values are accepted; Typeform restricts to positive numbers only, making this a differentiator"),
1030
1094
  placeholder: z2.string().max(200).optional().describe("Placeholder text shown inside the number input"),
1031
1095
  prepopulatedValue: z2.number().optional().describe("Default numeric value to pre-fill the input"),
1032
- unit: z2.string().max(20).optional().describe("Unit label displayed beside the input (e.g. 'kg', '$', 'years')")
1096
+ unit: z2.string().max(10).optional().describe("Unit label displayed beside the input (e.g. 'kg', '$', 'years')")
1033
1097
  }).refine(
1034
1098
  (data) => data.min === void 0 || data.max === void 0 || data.min <= data.max,
1035
1099
  {
@@ -1052,7 +1116,8 @@ var phoneNumberQuestionSchema = questionSchema.extend({
1052
1116
  var addressSubFieldConfigSchema = z2.object({
1053
1117
  enabled: z2.boolean().default(true).describe("Whether this sub-field is shown in the question"),
1054
1118
  required: z2.boolean().default(false).describe("Whether the respondent must fill in this sub-field"),
1055
- placeholder: z2.string().max(200).optional().describe("Placeholder text for this sub-field input")
1119
+ placeholder: z2.string().max(200).optional().describe("Placeholder text for this sub-field input"),
1120
+ label: z2.string().max(120).optional().describe("Visible caption above this sub-field; defaults to built-in copy when omitted")
1056
1121
  }).describe("Configuration for an individual address sub-field");
1057
1122
  var addressQuestionSchema = questionSchema.extend({
1058
1123
  type: z2.literal("address").describe("Must be exactly 'address'"),
@@ -1064,21 +1129,32 @@ var addressQuestionSchema = questionSchema.extend({
1064
1129
  country: addressSubFieldConfigSchema.optional().describe("Configuration for the country sub-field"),
1065
1130
  defaultCountry: z2.string().max(2).optional().describe("ISO 3166-1 alpha-2 country code to pre-select in the country dropdown (e.g. 'US', 'GB')")
1066
1131
  }).describe("Schema for an address question that collects a full structured address on a single screen");
1067
- var videoAudioModeSchema = z2.enum(["video", "audio", "text"]);
1132
+ var videoAudioModeSchema = z2.enum(["video", "audio", "photo", "text"]);
1068
1133
  var VideoAudioModes = {
1069
1134
  VIDEO: "video",
1070
1135
  AUDIO: "audio",
1136
+ PHOTO: "photo",
1071
1137
  TEXT: "text"
1072
1138
  };
1073
1139
  var videoAudioQuestionSchema = questionSchema.extend({
1074
1140
  type: z2.literal("video_audio").describe("Must be exactly 'video_audio'"),
1075
- allowedModes: z2.array(videoAudioModeSchema).min(1).optional().describe("Which answer types the respondent can choose from (video, audio, text); when absent all three are enabled"),
1141
+ allowedModes: z2.array(videoAudioModeSchema).min(1).optional().describe("Which answer types the respondent can choose from (video, audio, photo, text); when absent all four are enabled"),
1076
1142
  defaultMode: videoAudioModeSchema.optional().describe("Which mode tab is pre-selected when the question opens; when absent the platform chooses"),
1077
1143
  maxDurationSeconds: z2.number().int().min(5).max(600).optional().describe("Maximum recording length in seconds (5\u2013600); Typeform hardcodes 120s with no config, making this a differentiator; when absent the platform default applies"),
1078
1144
  maxFileSizeMb: z2.number().int().min(1).max(500).optional().describe("Maximum size in megabytes for uploaded pre-recorded files (1\u2013500); when absent the platform ceiling applies"),
1079
- allowUpload: z2.boolean().optional().default(true).describe("Whether the respondent can upload a pre-recorded file in addition to recording live"),
1080
- placeholder: z2.string().max(200).optional().describe("Instructional text shown to the respondent before they begin recording")
1081
- }).describe("Schema for a video and audio question where respondents can record or upload a video, audio clip, or text answer");
1145
+ allowUpload: z2.boolean().optional().default(true).describe("Whether the respondent can upload a file in addition to recording or capturing live (video, audio, or photo)"),
1146
+ placeholder: z2.string().max(200).optional().describe("Instructional text shown to the respondent before they begin recording or capturing"),
1147
+ modeTabLabelVideo: z2.string().max(80).optional().describe("Custom tab label for video mode in the respondent UI; when absent defaults to 'Video'"),
1148
+ modeTabLabelAudio: z2.string().max(80).optional().describe("Custom tab label for audio mode; when absent defaults to 'Audio'"),
1149
+ modeTabLabelPhoto: z2.string().max(80).optional().describe("Custom tab label for photo mode; when absent defaults to 'Photo'"),
1150
+ modeTabLabelText: z2.string().max(80).optional().describe("Custom tab label for text mode; when absent defaults to 'Text'"),
1151
+ recordButtonLabel: z2.string().max(80).optional().describe("Label for the Record button in video/audio modes"),
1152
+ uploadMediaButtonLabel: z2.string().max(80).optional().describe("Label for the upload control in video/audio modes when uploads are allowed"),
1153
+ videoIdleHint: z2.string().max(200).optional().describe("Hint shown over the video preview when idle; falls back to placeholder then built-in copy"),
1154
+ photoEmptyHint: z2.string().max(200).optional().describe("Hint in the empty photo preview area; falls back to placeholder then built-in copy"),
1155
+ photoUseCameraButtonLabel: z2.string().max(80).optional().describe("Label for the Use camera button in photo mode"),
1156
+ photoUploadImageButtonLabel: z2.string().max(80).optional().describe("Label for the upload image button in photo mode")
1157
+ }).describe("Schema for a video, audio, and photo question where respondents can record or upload media or enter a text answer");
1082
1158
  var schedulerProviderSchema = z2.enum(["google_calendar", "calendly"]);
1083
1159
  var SchedulerProviders = {
1084
1160
  GOOGLE_CALENDAR: "google_calendar",
@@ -1091,7 +1167,12 @@ var schedulerQuestionSchema = questionSchema.extend({
1091
1167
  showIntroScreen: z2.boolean().optional().default(true).describe("Whether to show the Calendly event intro screen (account name, event name, duration) before the time picker; only applies when provider is 'calendly'"),
1092
1168
  autofillNameFieldId: z2.string().optional().describe("ID of a prior Short Text or Name question whose answer is pre-filled into the Calendly booking name field; only applies when provider is 'calendly'"),
1093
1169
  autofillEmailFieldId: z2.string().optional().describe("ID of a prior Email question whose answer is pre-filled into the Calendly booking email field; only applies when provider is 'calendly'"),
1094
- placeholder: z2.string().max(200).optional().describe("Instructional text shown above the calendar picker to guide the respondent")
1170
+ placeholder: z2.string().max(200).optional().describe(
1171
+ "Fallback text for the book-a-meeting button when scheduleMeetingLabel is unset; also used as a secondary fallback in the CTA copy chain"
1172
+ ),
1173
+ scheduleMeetingLabel: z2.string().max(200).optional().describe(
1174
+ "Primary label on the book-a-meeting button and modal; when absent uses placeholder then the built-in default (e.g. 'Schedule a meeting')"
1175
+ )
1095
1176
  }).describe("Schema for a scheduler question where respondents book a time slot directly within the form via Google Calendar or Calendly");
1096
1177
  var qnaWithAiQuestionSchema = questionSchema.extend({
1097
1178
  type: z2.literal("qna_with_ai").describe("Must be exactly 'qna_with_ai'"),
@@ -1099,7 +1180,16 @@ var qnaWithAiQuestionSchema = questionSchema.extend({
1099
1180
  maxResponseLength: z2.number().int().min(50).max(2e3).optional().describe("Maximum number of characters per AI-generated response (50\u20132000); Typeform hardcodes 300, making this configurable a differentiator; when absent the platform default (300) applies"),
1100
1181
  maxQaPairs: z2.number().int().min(1).max(100).optional().describe("Maximum number of Q&A exchanges allowed per submission (1\u2013100); Typeform hardcodes 20, making this configurable a differentiator; when absent the platform default (20) applies"),
1101
1182
  placeholder: z2.string().max(200).optional().describe("Hint text shown in the respondent's question input field (e.g. 'Ask me anything about this event...')"),
1102
- askButtonLabel: z2.string().max(50).optional().describe("Label for the submit/ask button; when absent the platform default (e.g. 'Ask AI') is shown")
1183
+ askButtonLabel: z2.string().max(50).optional().describe("Label for the submit/ask button; when absent the platform default (e.g. 'Ask AI') is shown"),
1184
+ emptyStateHint: z2.string().max(200).optional().describe(
1185
+ "Message in the empty chat area (e.g. 'Ask the AI a question to get started.'); when absent uses placeholder then a built-in default"
1186
+ ),
1187
+ pairsRemainingTemplate: z2.string().max(160).optional().describe(
1188
+ "Counter when under the limit; use tokens {remaining} and {max} (e.g. '{remaining} of {max} questions remaining'); when absent the client uses built-in English with pluralization"
1189
+ ),
1190
+ pairsLimitReachedTemplate: z2.string().max(160).optional().describe(
1191
+ "Counter when the exchange limit is reached; use token {max}; when absent the client uses built-in English with pluralization"
1192
+ )
1103
1193
  }).describe("Schema for a Q&A with AI question where respondents ask questions and receive AI-generated answers drawn from a configurable knowledge base");
1104
1194
  var combinedQuestionSchema = z2.discriminatedUnion("type", [
1105
1195
  ratingQuestionSchema,
@@ -1174,10 +1264,10 @@ var AddressAnswerSchema = z3.object({
1174
1264
  country: z3.string().optional().describe("Country name or ISO 3166-1 alpha-2 code")
1175
1265
  }).describe("Answer for an address question");
1176
1266
  var VideoAudioAnswerSchema = z3.object({
1177
- mode: z3.enum(["video", "audio", "text"]).describe("The answer mode the respondent chose"),
1178
- fileUrl: z3.string().optional().describe("Secure URL to the recorded or uploaded video/audio file"),
1267
+ mode: z3.enum(["video", "audio", "photo", "text"]).describe("The answer mode the respondent chose"),
1268
+ fileUrl: z3.string().optional().describe("Secure URL or temporary data URL to the recorded, captured, or uploaded video, audio, or image file"),
1179
1269
  text: z3.string().optional().describe("Written answer for text mode"),
1180
- durationSeconds: z3.number().optional().describe("Actual recording length in seconds for video and audio modes"),
1270
+ durationSeconds: z3.number().optional().describe("Actual recording length in seconds for video and audio modes (not used for photo)"),
1181
1271
  transcriptText: z3.string().optional().describe("Auto-generated transcript for video and audio recordings")
1182
1272
  }).describe("Answer for a video and audio question");
1183
1273
  var QnaWithAiPairSchema = z3.object({
@@ -1185,23 +1275,29 @@ var QnaWithAiPairSchema = z3.object({
1185
1275
  answer: z3.string().describe("The AI-generated answer based on the knowledge base")
1186
1276
  }).describe("A single Q&A exchange between the respondent and the AI");
1187
1277
  var QnaWithAiAnswerSchema = z3.array(QnaWithAiPairSchema).describe("Answer for a qna_with_ai question; ordered transcript of Q&A pairs from the session");
1188
- var SchedulerAnswerSchema = z3.object({
1189
- provider: z3.enum(["google_calendar", "calendly"]).describe("The calendar integration used to make the booking"),
1190
- slotStart: z3.string().describe("ISO 8601 datetime of the booked slot start (e.g. '2026-05-15T14:00:00Z')"),
1191
- slotEnd: z3.string().describe("ISO 8601 datetime of the booked slot end (e.g. '2026-05-15T14:30:00Z')"),
1192
- eventId: z3.string().optional().describe("Calendar event ID (Google Calendar) or Calendly event UUID"),
1193
- bookedAt: z3.string().describe("ISO 8601 datetime when the respondent completed the booking")
1194
- }).describe("Answer for a scheduler question");
1278
+ var SchedulerAnswerSchema = z3.discriminatedUnion("provider", [
1279
+ z3.object({
1280
+ provider: z3.literal("google_calendar").describe("The calendar integration used to make the booking"),
1281
+ bookedAt: z3.string().describe("Unix timestamp in seconds as a string when the respondent confirmed the booking")
1282
+ }),
1283
+ z3.object({
1284
+ provider: z3.literal("calendly").describe("The calendar integration used to make the booking"),
1285
+ slotStart: z3.string().describe("ISO 8601 datetime of the booked slot start (e.g. '2026-05-15T14:00:00Z')"),
1286
+ slotEnd: z3.string().describe("ISO 8601 datetime of the booked slot end (e.g. '2026-05-15T14:30:00Z')"),
1287
+ eventId: z3.string().optional().describe("Calendly event UUID"),
1288
+ bookedAt: z3.string().describe("Unix timestamp in seconds as a string when the respondent completed the booking")
1289
+ })
1290
+ ]).describe("Answer for a scheduler question");
1195
1291
  var AnswerItemSchema = z3.object({
1196
1292
  nps: z3.number().optional().describe("Net Promoter Score value (e.g., 0-10)"),
1197
1293
  nestedSelection: z3.array(z3.string()).optional().describe("Array of selected nested option IDs"),
1198
1294
  longText: z3.string().optional().describe("Long text answer, e.g., paragraph or essay"),
1199
1295
  shortAnswer: z3.string().optional().describe("Short text answer, e.g., single sentence or word"),
1200
- singleChoice: z3.string().optional().describe("single selected option ID (for single choice questions)"),
1296
+ singleChoice: z3.string().optional().describe("Single selected option value for single choice questions"),
1201
1297
  rating: z3.number().optional().describe("Star rating value (e.g., 1-5)"),
1202
1298
  yesNo: z3.boolean().optional().describe("Yes/no answer for yes_no questions (true = Yes, false = No)"),
1203
1299
  consent: z3.boolean().optional().describe("Consent answer for consent questions (true = checked/agreed, false = unchecked)"),
1204
- multipleChoiceMultiple: z3.array(z3.string()).optional().describe("Array of selected option IDs for multiple choice questions"),
1300
+ multipleChoiceMultiple: z3.array(z3.string()).optional().describe("Array of selected option values for multiple choice questions"),
1205
1301
  singleChoiceOther: z3.string().optional().describe('Free-text "other" answer for single choice questions when allowOther is enabled'),
1206
1302
  multipleChoiceOther: z3.string().optional().describe('Free-text "other" answer for multiple choice questions when allowOther is enabled'),
1207
1303
  annotation: AnnotationSchema.optional().describe(
@@ -1222,15 +1318,14 @@ var AnswerItemSchema = z3.object({
1222
1318
  // Date question
1223
1319
  date: z3.string().optional().describe("Answer for a date question; ISO 8601 format (YYYY-MM-DD or YYYY-MM-DDTHH:MM)"),
1224
1320
  // CSAT question
1225
- csat: z3.number().optional().describe("Answer for a CSAT question; semantic value: -2, -1, 0, 1, or 2"),
1321
+ csat: z3.number().optional().describe("Answer for a CSAT question; industry-standard value: 1 (lowest/worst) to N (highest/best) where N is the scale size (2\u20135)"),
1226
1322
  // Opinion scale question
1227
1323
  opinionScale: z3.number().optional().describe("Answer for an opinion scale question; the selected numeric value on the scale"),
1228
- // Ranking question — ordered array of option IDs; index 0 = rank 1
1229
- ranking: z3.array(z3.string()).optional().describe("Answer for a ranking question; ordered array of option IDs where index 0 is rank 1"),
1230
- // Picture choice — single selection
1231
- pictureChoice: z3.string().optional().describe("Answer for a picture choice question (single selection); the selected option ID"),
1232
- // Picture choice multiple selection
1233
- pictureChoiceMultiple: z3.array(z3.string()).optional().describe("Answer for a picture choice question (multiple selection); array of selected option IDs"),
1324
+ // Ranking question — ordered array of option values; index 0 = rank 1
1325
+ ranking: z3.array(z3.string()).optional().describe("Answer for a ranking question; ordered array of option values where index 0 is rank 1"),
1326
+ // Picture choice — always an array of selected option values (single selection = one-element array)
1327
+ pictureChoice: z3.array(z3.string()).optional().describe("Answer for a picture choice question; array of selected option values (single selection produces a one-element array)"),
1328
+ pictureChoiceOther: z3.string().optional().describe('Free-text "other" answer for picture choice questions when allowOther is enabled'),
1234
1329
  // Signature question
1235
1330
  signature: SignatureAnswerSchema.optional().describe("Answer for a signature question"),
1236
1331
  // File upload question
@@ -1238,7 +1333,7 @@ var AnswerItemSchema = z3.object({
1238
1333
  // Email question
1239
1334
  email: z3.string().optional().describe("Answer for an email question; the submitted email address"),
1240
1335
  // Number question
1241
- number: z3.number().optional().describe("Answer for a number question; the submitted numeric value"),
1336
+ number: z3.string().optional().describe("Answer for a number question; the submitted numeric value as a string"),
1242
1337
  // Website question
1243
1338
  website: z3.string().optional().describe("Answer for a website question; the submitted URL"),
1244
1339
  // Phone number question
@@ -1289,7 +1384,9 @@ var OtherFieldsSchema = z5.object({
1289
1384
  aiEnhancementMaxReachedErrorMessage: z5.string().min(1).max(100).describe("Message shown when maximum AI enhancements reached (max 100 characters)"),
1290
1385
  remindMeLaterButtonLabel: z5.string().max(50).optional().describe("Label for the remind me later button; when absent or blank the button is not shown"),
1291
1386
  estimatedCompletionLabel: z5.string().max(100).optional().describe("Estimated completion time label shown on the welcome or first screen (e.g. 'Takes about 2 minutes'); when absent the label is not shown"),
1292
- respondentsShowMinThreshold: z5.number().int().min(1).optional().describe("Minimum number of respondents required before the respondents badge is shown; when absent the badge is never shown")
1387
+ respondentsShowMinThreshold: z5.number().int().min(1).optional().describe("Minimum number of respondents required before the respondents badge is shown; when absent the badge is never shown"),
1388
+ respondentsLabel: z5.string().max(100).optional().describe("Label template for the respondents badge (e.g. '{count} people have already responded'); client interpolates {count} at render time"),
1389
+ windowTitle: z5.string().max(100).optional().describe("Custom browser window/tab title for the form; when absent the platform uses a default (e.g. the form title or app name)")
1293
1390
  }).describe("Schema for other form configuration fields");
1294
1391
  var LanguageFieldSchema = z5.object({
1295
1392
  value: z5.string().min(1).max(10).describe("Language code (e.g., 'en', 'es', 'fr')"),
@@ -1304,7 +1401,8 @@ var OtherFieldsTranslationSchema = z5.object({
1304
1401
  aiEnhancementMaxReachedErrorMessage: z5.string().min(1).max(100).describe("Translated message shown when maximum AI enhancements reached (max 100 characters)"),
1305
1402
  remindMeLaterButtonLabel: z5.string().max(50).optional().describe("Translated label for the remind me later button"),
1306
1403
  estimatedCompletionLabel: z5.string().max(100).optional().describe("Translated estimated completion time label"),
1307
- respondentsLabel: z5.string().max(100).optional().describe("Translated label template for the respondents badge (e.g. '{count} people have already responded'); client interpolates {count} at render time")
1404
+ respondentsLabel: z5.string().max(100).optional().describe("Translated label template for the respondents badge (e.g. '{count} people have already responded'); client interpolates {count} at render time"),
1405
+ windowTitle: z5.string().max(100).optional().describe("Translated browser window/tab title for the form")
1308
1406
  }).describe("Schema for other form configuration field translations");
1309
1407
 
1310
1408
  // src/schemas/fields/theme-schema.ts
@@ -1368,7 +1466,8 @@ var featureSettingsSchema = z6.object({
1368
1466
  ),
1369
1467
  rtl: z6.boolean().default(false).describe("Whether right-to-left text direction is enabled"),
1370
1468
  previousButton: previousButtonModeSchema.default(PreviousButtonModes.ALWAYS).describe("Previous button: never (hidden) or always (shown)"),
1371
- maxDialogHeightPercentInApp: z6.number().int().min(10).max(100).optional().describe("Maximum height of the in-app dialog as a percentage of the viewport height (10\u2013100); when absent the dialog uses its default height")
1469
+ maxDialogHeightPercentInApp: z6.number().int().min(10).max(100).optional().describe("Maximum height of the in-app dialog as a percentage of the viewport height (10\u2013100); when absent the dialog uses its default height"),
1470
+ faviconUrl: z6.string().optional().describe("URL of a custom favicon image to display in the browser tab; when absent the platform default favicon is used")
1372
1471
  }).describe("Feature settings controlling widget UI behavior and appearance");
1373
1472
  var themeColorsSchema = z6.object({
1374
1473
  theme: z6.string().optional().describe("Theme for a single mode (shadcn variables JSON)")
@@ -1795,8 +1894,11 @@ var fetchFeedbackDetailsSchema = z13.object({
1795
1894
  }).strict().describe("Request schema for fetching specific feedback form details");
1796
1895
  var formConfigurationResponseSchema = z13.object({
1797
1896
  formTitle: z13.string().describe("Title of the feedback form"),
1798
- formDescription: z13.string().describe("Description of the feedback form")
1799
- }).describe("Form configuration response with title and description");
1897
+ formDescription: z13.string().describe("Description of the feedback form"),
1898
+ respondentsCount: z13.number().int().min(0).optional().describe(
1899
+ "Total number of respondents enriched by the server at fetch time; used alongside respondentsShowMinThreshold to decide whether to display the welcome badge"
1900
+ )
1901
+ }).describe("Form configuration response with title, description, and optional respondent count");
1800
1902
  var logicJumpRuleSchema = z13.object({
1801
1903
  jsonLogic: z13.record(z13.string(), z13.unknown()).describe("JSON Logic expression to evaluate"),
1802
1904
  targetQuestionId: z13.string().describe("Question ID to navigate to when this rule matches")
@@ -1828,7 +1930,7 @@ var fetchFeedbackDetailsResponseSchema = z13.object({
1828
1930
  feedbackConfigurationId: z13.string().uuid().describe("Unique identifier for the feedback configuration"),
1829
1931
  feedbackIdentifier: z13.string().uuid().describe("Unique identifier for this specific feedback instance"),
1830
1932
  formConfiguration: formConfigurationResponseSchema.describe(
1831
- "Form configuration with title and description"
1933
+ "Form configuration including title, description, and optional respondent count for the welcome badge"
1832
1934
  ),
1833
1935
  questionnaireFields: questionnaireFieldsResponseSchema.describe(
1834
1936
  "Questionnaire structure including questions, sections, translations, and languages"
@@ -1838,8 +1940,7 @@ var fetchFeedbackDetailsResponseSchema = z13.object({
1838
1940
  ),
1839
1941
  appearanceProperties: appearancePropertiesSchema.describe(
1840
1942
  "Appearance properties including theme configuration"
1841
- ),
1842
- respondentsCount: z13.number().int().min(0).optional().describe("Total number of respondents enriched by the server at fetch time; used alongside respondentsShowMinThreshold to decide whether to display the badge")
1943
+ )
1843
1944
  }).strict().describe(
1844
1945
  "Complete response schema for fetchFeedbackDetails API using existing field schemas"
1845
1946
  );
@@ -2052,6 +2153,7 @@ export {
2052
2153
  customEventFieldSchema,
2053
2154
  dateFormatSchema,
2054
2155
  dateQuestionSchema,
2156
+ dateQuestionTranslationSchema,
2055
2157
  dateSeparatorSchema,
2056
2158
  deviceInfoSchema,
2057
2159
  deviceSessionInfoSchema,
@@ -2116,6 +2218,7 @@ export {
2116
2218
  previousButtonModeSchema,
2117
2219
  publicationStatusSchema,
2118
2220
  qnaWithAiQuestionSchema,
2221
+ qnaWithAiQuestionTranslationSchema,
2119
2222
  queryOutputSchema,
2120
2223
  questionCentricTranslationsSchema,
2121
2224
  questionOptionSchema,
@@ -2143,6 +2246,7 @@ export {
2143
2246
  responseSchema,
2144
2247
  schedulerProviderSchema,
2145
2248
  schedulerQuestionSchema,
2249
+ schedulerQuestionTranslationSchema,
2146
2250
  sectionLayoutSchema,
2147
2251
  sectionLayoutVariantSchema,
2148
2252
  sectionSchema,
@@ -2154,6 +2258,7 @@ export {
2154
2258
  shortAnswerQuestionTranslationSchema,
2155
2259
  signatureModeSchema,
2156
2260
  signatureQuestionSchema,
2261
+ signatureQuestionTranslationSchema,
2157
2262
  singleChoiceQuestionTranslationSchema,
2158
2263
  splitLayoutSchema,
2159
2264
  stackLayoutSchema,
@@ -2177,6 +2282,7 @@ export {
2177
2282
  videoAttachmentSchema,
2178
2283
  videoAudioModeSchema,
2179
2284
  videoAudioQuestionSchema,
2285
+ videoAudioQuestionTranslationSchema,
2180
2286
  visibilityConditionSchema,
2181
2287
  wallpaperLayoutSchema,
2182
2288
  websiteQuestionSchema,