@encatch/schema 1.2.0-beta.4 → 1.2.0-beta.6
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 +12 -10
- package/dist/esm/index.js.map +2 -2
- package/dist/types/schemas/api/fetch-feedback-schema.d.ts +16 -0
- package/dist/types/schemas/api/submit-feedback-schema.d.ts +6 -0
- package/dist/types/schemas/fields/answer-schema.d.ts +3 -0
- package/dist/types/schemas/fields/app-props-schema.d.ts +8 -0
- package/dist/types/schemas/fields/field-schema.d.ts +19 -0
- package/dist/types/schemas/fields/form-properties-schema.d.ts +8 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1029,7 +1029,7 @@ var numberQuestionSchema = questionSchema.extend({
|
|
|
1029
1029
|
allowNegative: z2.boolean().optional().default(false).describe("Whether negative values are accepted; Typeform restricts to positive numbers only, making this a differentiator"),
|
|
1030
1030
|
placeholder: z2.string().max(200).optional().describe("Placeholder text shown inside the number input"),
|
|
1031
1031
|
prepopulatedValue: z2.number().optional().describe("Default numeric value to pre-fill the input"),
|
|
1032
|
-
unit: z2.string().max(
|
|
1032
|
+
unit: z2.string().max(10).optional().describe("Unit label displayed beside the input (e.g. 'kg', '$', 'years')")
|
|
1033
1033
|
}).refine(
|
|
1034
1034
|
(data) => data.min === void 0 || data.max === void 0 || data.min <= data.max,
|
|
1035
1035
|
{
|
|
@@ -1052,7 +1052,8 @@ var phoneNumberQuestionSchema = questionSchema.extend({
|
|
|
1052
1052
|
var addressSubFieldConfigSchema = z2.object({
|
|
1053
1053
|
enabled: z2.boolean().default(true).describe("Whether this sub-field is shown in the question"),
|
|
1054
1054
|
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")
|
|
1055
|
+
placeholder: z2.string().max(200).optional().describe("Placeholder text for this sub-field input"),
|
|
1056
|
+
label: z2.string().max(120).optional().describe("Visible caption above this sub-field; defaults to built-in copy when omitted")
|
|
1056
1057
|
}).describe("Configuration for an individual address sub-field");
|
|
1057
1058
|
var addressQuestionSchema = questionSchema.extend({
|
|
1058
1059
|
type: z2.literal("address").describe("Must be exactly 'address'"),
|
|
@@ -1064,21 +1065,22 @@ var addressQuestionSchema = questionSchema.extend({
|
|
|
1064
1065
|
country: addressSubFieldConfigSchema.optional().describe("Configuration for the country sub-field"),
|
|
1065
1066
|
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
1067
|
}).describe("Schema for an address question that collects a full structured address on a single screen");
|
|
1067
|
-
var videoAudioModeSchema = z2.enum(["video", "audio", "text"]);
|
|
1068
|
+
var videoAudioModeSchema = z2.enum(["video", "audio", "photo", "text"]);
|
|
1068
1069
|
var VideoAudioModes = {
|
|
1069
1070
|
VIDEO: "video",
|
|
1070
1071
|
AUDIO: "audio",
|
|
1072
|
+
PHOTO: "photo",
|
|
1071
1073
|
TEXT: "text"
|
|
1072
1074
|
};
|
|
1073
1075
|
var videoAudioQuestionSchema = questionSchema.extend({
|
|
1074
1076
|
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
|
|
1077
|
+
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
1078
|
defaultMode: videoAudioModeSchema.optional().describe("Which mode tab is pre-selected when the question opens; when absent the platform chooses"),
|
|
1077
1079
|
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
1080
|
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
|
|
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
|
|
1081
|
+
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)"),
|
|
1082
|
+
placeholder: z2.string().max(200).optional().describe("Instructional text shown to the respondent before they begin recording or capturing")
|
|
1083
|
+
}).describe("Schema for a video, audio, and photo question where respondents can record or upload media or enter a text answer");
|
|
1082
1084
|
var schedulerProviderSchema = z2.enum(["google_calendar", "calendly"]);
|
|
1083
1085
|
var SchedulerProviders = {
|
|
1084
1086
|
GOOGLE_CALENDAR: "google_calendar",
|
|
@@ -1174,10 +1176,10 @@ var AddressAnswerSchema = z3.object({
|
|
|
1174
1176
|
country: z3.string().optional().describe("Country name or ISO 3166-1 alpha-2 code")
|
|
1175
1177
|
}).describe("Answer for an address question");
|
|
1176
1178
|
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
|
|
1179
|
+
mode: z3.enum(["video", "audio", "photo", "text"]).describe("The answer mode the respondent chose"),
|
|
1180
|
+
fileUrl: z3.string().optional().describe("Secure URL or temporary data URL to the recorded, captured, or uploaded video, audio, or image file"),
|
|
1179
1181
|
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"),
|
|
1182
|
+
durationSeconds: z3.number().optional().describe("Actual recording length in seconds for video and audio modes (not used for photo)"),
|
|
1181
1183
|
transcriptText: z3.string().optional().describe("Auto-generated transcript for video and audio recordings")
|
|
1182
1184
|
}).describe("Answer for a video and audio question");
|
|
1183
1185
|
var QnaWithAiPairSchema = z3.object({
|