@encatch/schema 1.2.0-beta.5 → 1.2.0-beta.7

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,14 @@ 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
+ }).describe("Translation schema for video/audio/photo/text questions");
73
81
  var nestedSelectionQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
74
82
  type: z.literal("nested_selection").describe("Question type identifier"),
75
83
  placeholder: translationEntrySchema.optional().describe("Dropdown placeholder translation")
@@ -164,6 +172,7 @@ var questionTranslationSchema = z.union([
164
172
  npsQuestionTranslationSchema,
165
173
  shortAnswerQuestionTranslationSchema,
166
174
  longAnswerQuestionTranslationSchema,
175
+ videoAudioQuestionTranslationSchema,
167
176
  nestedSelectionQuestionTranslationSchema,
168
177
  annotationQuestionTranslationSchema,
169
178
  welcomeQuestionTranslationSchema,
@@ -1065,21 +1074,26 @@ var addressQuestionSchema = questionSchema.extend({
1065
1074
  country: addressSubFieldConfigSchema.optional().describe("Configuration for the country sub-field"),
1066
1075
  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')")
1067
1076
  }).describe("Schema for an address question that collects a full structured address on a single screen");
1068
- var videoAudioModeSchema = z2.enum(["video", "audio", "text"]);
1077
+ var videoAudioModeSchema = z2.enum(["video", "audio", "photo", "text"]);
1069
1078
  var VideoAudioModes = {
1070
1079
  VIDEO: "video",
1071
1080
  AUDIO: "audio",
1081
+ PHOTO: "photo",
1072
1082
  TEXT: "text"
1073
1083
  };
1074
1084
  var videoAudioQuestionSchema = questionSchema.extend({
1075
1085
  type: z2.literal("video_audio").describe("Must be exactly 'video_audio'"),
1076
- 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"),
1086
+ 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"),
1077
1087
  defaultMode: videoAudioModeSchema.optional().describe("Which mode tab is pre-selected when the question opens; when absent the platform chooses"),
1078
1088
  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"),
1079
1089
  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"),
1080
- allowUpload: z2.boolean().optional().default(true).describe("Whether the respondent can upload a pre-recorded file in addition to recording live"),
1081
- placeholder: z2.string().max(200).optional().describe("Instructional text shown to the respondent before they begin recording")
1082
- }).describe("Schema for a video and audio question where respondents can record or upload a video, audio clip, or text answer");
1090
+ 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)"),
1091
+ placeholder: z2.string().max(200).optional().describe("Instructional text shown to the respondent before they begin recording or capturing"),
1092
+ modeTabLabelVideo: z2.string().max(80).optional().describe("Custom tab label for video mode in the respondent UI; when absent defaults to 'Video'"),
1093
+ modeTabLabelAudio: z2.string().max(80).optional().describe("Custom tab label for audio mode; when absent defaults to 'Audio'"),
1094
+ modeTabLabelPhoto: z2.string().max(80).optional().describe("Custom tab label for photo mode; when absent defaults to 'Photo'"),
1095
+ modeTabLabelText: z2.string().max(80).optional().describe("Custom tab label for text mode; when absent defaults to 'Text'")
1096
+ }).describe("Schema for a video, audio, and photo question where respondents can record or upload media or enter a text answer");
1083
1097
  var schedulerProviderSchema = z2.enum(["google_calendar", "calendly"]);
1084
1098
  var SchedulerProviders = {
1085
1099
  GOOGLE_CALENDAR: "google_calendar",
@@ -1175,10 +1189,10 @@ var AddressAnswerSchema = z3.object({
1175
1189
  country: z3.string().optional().describe("Country name or ISO 3166-1 alpha-2 code")
1176
1190
  }).describe("Answer for an address question");
1177
1191
  var VideoAudioAnswerSchema = z3.object({
1178
- mode: z3.enum(["video", "audio", "text"]).describe("The answer mode the respondent chose"),
1179
- fileUrl: z3.string().optional().describe("Secure URL to the recorded or uploaded video/audio file"),
1192
+ mode: z3.enum(["video", "audio", "photo", "text"]).describe("The answer mode the respondent chose"),
1193
+ fileUrl: z3.string().optional().describe("Secure URL or temporary data URL to the recorded, captured, or uploaded video, audio, or image file"),
1180
1194
  text: z3.string().optional().describe("Written answer for text mode"),
1181
- durationSeconds: z3.number().optional().describe("Actual recording length in seconds for video and audio modes"),
1195
+ durationSeconds: z3.number().optional().describe("Actual recording length in seconds for video and audio modes (not used for photo)"),
1182
1196
  transcriptText: z3.string().optional().describe("Auto-generated transcript for video and audio recordings")
1183
1197
  }).describe("Answer for a video and audio question");
1184
1198
  var QnaWithAiPairSchema = z3.object({
@@ -2189,6 +2203,7 @@ export {
2189
2203
  videoAttachmentSchema,
2190
2204
  videoAudioModeSchema,
2191
2205
  videoAudioQuestionSchema,
2206
+ videoAudioQuestionTranslationSchema,
2192
2207
  visibilityConditionSchema,
2193
2208
  wallpaperLayoutSchema,
2194
2209
  websiteQuestionSchema,