@encatch/schema 0.1.12 → 0.1.13
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
|
@@ -928,8 +928,17 @@ var formPropertiesSchema = z8.object({
|
|
|
928
928
|
appearance_properties: appearancePropertiesSchema.describe("Appearance configuration including themes, colors, and UI feature settings")
|
|
929
929
|
}).describe("Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance");
|
|
930
930
|
|
|
931
|
-
// src/
|
|
931
|
+
// src/schemas/fields/other-properties-schema.ts
|
|
932
932
|
import { z as z9 } from "zod";
|
|
933
|
+
var masterPropertiesSchema = z9.object({
|
|
934
|
+
mandatory_fetch_config_at_paths: z9.array(z9.string()).describe("Array of paths where configuration must be fetched from server when navigated by user"),
|
|
935
|
+
config_sync_interval_seconds: z9.number().int().positive().describe("Interval in seconds for configuration synchronization between client and server"),
|
|
936
|
+
disable_all_survey: z9.boolean().describe("Flag to disable all surveys globally"),
|
|
937
|
+
feedback_interval_duration: z9.number().int().positive().describe("Duration in seconds for feedback interval between two auto triggered feedbacks")
|
|
938
|
+
}).describe("Master properties configuration for global survey settings");
|
|
939
|
+
|
|
940
|
+
// src/index.ts
|
|
941
|
+
import { z as z10 } from "zod";
|
|
933
942
|
export {
|
|
934
943
|
AnswerSchema,
|
|
935
944
|
ChoiceAnswerSchema,
|
|
@@ -982,6 +991,7 @@ export {
|
|
|
982
991
|
languageTranslationsSchema,
|
|
983
992
|
longAnswerQuestionSchema,
|
|
984
993
|
longAnswerTranslationsSchema,
|
|
994
|
+
masterPropertiesSchema,
|
|
985
995
|
multipleChoiceDisplayStyleSchema,
|
|
986
996
|
multipleChoiceMultipleDisplayStyleSchema,
|
|
987
997
|
multipleChoiceMultipleQuestionSchema,
|
|
@@ -1021,6 +1031,6 @@ export {
|
|
|
1021
1031
|
visibilityConditionSchema,
|
|
1022
1032
|
welcomeScreenPropertiesSchema,
|
|
1023
1033
|
yesNoSchema,
|
|
1024
|
-
|
|
1034
|
+
z10 as z
|
|
1025
1035
|
};
|
|
1026
1036
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/schemas/fields/field-schema.ts", "../../src/schemas/fields/answer-schema.ts", "../../src/schemas/fields/form-schema.ts", "../../src/schemas/fields/form-properties-schema.ts", "../../src/schemas/fields/translations-schema.ts", "../../src/schemas/fields/other-screen-schema.ts", "../../src/schemas/fields/theme-schema.ts", "../../src/schemas/fields/auto-trigger-schema.ts", "../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from \"zod\";\n\n// Question type enum for different form field types\nexport const questionTypeSchema = z\n .enum([\n \"rating\",\n \"single_choice\",\n \"nps\",\n \"nested_selection\",\n \"multiple_choice_multiple\",\n \"short_answer\",\n \"long_text\",\n \"annotation\",\n ])\n .describe(\"Enumeration of all supported question types for form fields\");\n\n// Constants for question types (derived from the enum schema)\nexport const QuestionTypes = {\n RATING: questionTypeSchema.options[0],\n SINGLE_CHOICE: questionTypeSchema.options[1],\n NPS: questionTypeSchema.options[2],\n NESTED_SELECTION: questionTypeSchema.options[3],\n MULTIPLE_CHOICE_MULTIPLE: questionTypeSchema.options[4],\n SHORT_ANSWER: questionTypeSchema.options[5],\n LONG_TEXT: questionTypeSchema.options[6],\n ANNOTATION: questionTypeSchema.options[7],\n} as const;\n\n// Validation rule type enum\nexport const validationRuleTypeSchema = z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .describe(\"Enumeration of all supported validation rule types\");\n\n// Constants for validation rule types (derived from the enum schema)\nexport const ValidationRuleTypes = {\n REQUIRED: validationRuleTypeSchema.options[0],\n MIN: validationRuleTypeSchema.options[1],\n MAX: validationRuleTypeSchema.options[2],\n MIN_LENGTH: validationRuleTypeSchema.options[3],\n MAX_LENGTH: validationRuleTypeSchema.options[4],\n PATTERN: validationRuleTypeSchema.options[5],\n EMAIL: validationRuleTypeSchema.options[6],\n URL: validationRuleTypeSchema.options[7],\n CUSTOM: validationRuleTypeSchema.options[8],\n} as const;\n\n// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: validationRuleTypeSchema.describe(\"Type of validation rule to apply\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value for the validation rule (string, number, or boolean)\"),\n message: z\n .string()\n .optional()\n .describe(\"Custom error message when validation fails\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this validation rule\"),\n })\n .describe(\"Schema defining validation rules for question responses\");\n\n// Visibility condition operator enum\nexport const visibilityConditionOperatorSchema = z\n .enum([\n \"equals\",\n \"not_equals\",\n \"contains\",\n \"not_contains\",\n \"greater_than\",\n \"less_than\",\n \"is_empty\",\n \"is_not_empty\",\n ])\n .describe(\"Enumeration of all supported visibility condition operators\");\n\n// Constants for visibility condition operators (derived from the enum schema)\nexport const VisibilityConditionOperators = {\n EQUALS: visibilityConditionOperatorSchema.options[0],\n NOT_EQUALS: visibilityConditionOperatorSchema.options[1],\n CONTAINS: visibilityConditionOperatorSchema.options[2],\n NOT_CONTAINS: visibilityConditionOperatorSchema.options[3],\n GREATER_THAN: visibilityConditionOperatorSchema.options[4],\n LESS_THAN: visibilityConditionOperatorSchema.options[5],\n IS_EMPTY: visibilityConditionOperatorSchema.options[6],\n IS_NOT_EMPTY: visibilityConditionOperatorSchema.options[7],\n} as const;\n\n// Visibility condition schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: visibilityConditionOperatorSchema.describe(\"Comparison operator for the condition\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value to compare against (string, number, or boolean)\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this visibility condition\"),\n })\n .describe(\n \"Schema defining conditions that control when questions are visible\"\n );\n\n// Section schema for organizing questions\nexport const sectionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the section\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display title for the section\"),\n question_ids: z\n .array(z.string())\n .min(1)\n .describe(\"Array of question IDs that belong to this section\"),\n })\n .describe(\"Schema defining sections that organize questions into logical groups\");\n\n// Question status enum\nexport const questionStatusSchema = z.enum([\"D\", \"P\", \"A\", \"S\"]); // Draft, Published, Archived, Suspended\n\n// Constants for question status (derived from the enum schema)\nexport const QuestionStatuses = {\n DRAFT: questionStatusSchema.options[0],\n PUBLISHED: questionStatusSchema.options[1],\n ARCHIVED: questionStatusSchema.options[2],\n SUSPENDED: questionStatusSchema.options[3],\n} as const;\n\n// Display style enum for rating questions\nexport const ratingDisplayStyleSchema = z.enum([\n \"star\",\n \"heart\",\n \"thumbs-up\",\n \"diamond\",\n \"emoji\",\n \"emoji-exp\",\n]);\n\n// Constants for rating display styles (derived from the enum schema)\nexport const RatingDisplayStyles = {\n STAR: ratingDisplayStyleSchema.options[0],\n HEART: ratingDisplayStyleSchema.options[1],\n THUMBS_UP: ratingDisplayStyleSchema.options[2],\n DIAMOND: ratingDisplayStyleSchema.options[3],\n EMOJI: ratingDisplayStyleSchema.options[4],\n EMOJI_EXP: ratingDisplayStyleSchema.options[5],\n} as const;\n\n// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\n\n// Constants for rating representation sizes (derived from the enum schema)\nexport const RatingRepresentationSizes = {\n SMALL: ratingRepresentationSizeSchema.options[0],\n MEDIUM: ratingRepresentationSizeSchema.options[1],\n LARGE: ratingRepresentationSizeSchema.options[2],\n} as const;\n\n// Display style enum for multiple choice questions\nexport const multipleChoiceDisplayStyleSchema = z.enum([\n \"radio\",\n \"list\",\n \"chip\",\n \"dropdown\",\n]);\n\n// Constants for multiple choice display styles (derived from the enum schema)\nexport const MultipleChoiceDisplayStyles = {\n RADIO: multipleChoiceDisplayStyleSchema.options[0],\n LIST: multipleChoiceDisplayStyleSchema.options[1],\n CHIP: multipleChoiceDisplayStyleSchema.options[2],\n DROPDOWN: multipleChoiceDisplayStyleSchema.options[3],\n} as const;\n\n// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\n\n// Constants for multiple choice multiple display styles (derived from the enum schema)\nexport const MultipleChoiceMultipleDisplayStyles = {\n CHECKBOX: multipleChoiceMultipleDisplayStyleSchema.options[0],\n LIST: multipleChoiceMultipleDisplayStyleSchema.options[1],\n CHIP: multipleChoiceMultipleDisplayStyleSchema.options[2],\n} as const;\n\n// Choice order options for nested selection questions\nexport const choiceOrderOptionSchema = z.enum([\n \"randomize\",\n \"flip\",\n \"rotate\",\n \"ascending\",\n \"none\",\n]);\n\n// Constants for choice order options (derived from the enum schema)\nexport const ChoiceOrderOptions = {\n RANDOMIZE: choiceOrderOptionSchema.options[0],\n FLIP: choiceOrderOptionSchema.options[1],\n ROTATE: choiceOrderOptionSchema.options[2],\n ASCENDING: choiceOrderOptionSchema.options[3],\n NONE: choiceOrderOptionSchema.options[4],\n} as const;\n\n// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for the question\"),\n type: questionTypeSchema.describe(\n \"The type of question (rating, single_choice, etc.)\"\n ),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title/question text displayed to users\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text\"),\n describe: z\n .string()\n .max(2000)\n .optional()\n .describe(\n \"LLM tool call description for better AI understanding and context\"\n ),\n required: z\n .boolean()\n .default(false)\n .describe(\"Whether this question must be answered\"),\n errorMessage: z\n .string()\n .max(500)\n .optional()\n .describe(\"Custom error message when validation fails\"),\n validations: z\n .array(validationRuleSchema)\n .optional()\n .default([])\n .describe(\"Array of validation rules to apply\"),\n visibility: z\n .array(visibilityConditionSchema)\n .optional()\n .default([])\n .describe(\"Conditions that control when this question is shown\"),\n isFixed: z\n .boolean()\n .describe(\"Whether this question position is fixed or can be reordered\"),\n sectionId: z\n .string()\n .optional()\n .describe(\"ID of the section this question belongs to\"),\n status: questionStatusSchema.describe(\n \"Current status of the question (Draft, Published, etc.)\"\n ),\n })\n .describe(\"Base schema for all question types with common properties\");\n\n// Rating question schema (extends base question with specific rating properties)\nexport const ratingQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating\")\n .describe(\"Must be exactly 'rating'\"),\n showLabels: z\n .boolean()\n .optional()\n .describe(\"Whether to show min/max labels\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum rating value\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum rating value\"),\n displayStyle: ratingDisplayStyleSchema\n .optional()\n .describe(\"Visual style for rating display\"),\n numberOfRatings: z\n .number()\n .int()\n .min(1)\n .max(10)\n .describe(\"Number of rating options (1-10)\"),\n representationSize: ratingRepresentationSizeSchema\n .optional()\n .describe(\"Size of rating visual elements\"),\n color: z\n .string()\n .regex(/^#[0-9A-F]{6}$/i, \"Must be a valid hex color\")\n .optional()\n .describe(\"Hex color for rating elements\"),\n })\n .describe(\"Schema for rating questions with customizable display options\");\n\n// Annotation question schema (extends base question with annotation properties)\nexport const annotationQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"annotation\")\n .describe(\"Must be exactly 'annotation'\"),\n annotationText: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Text to display when annotation is provided\"),\n noAnnotationText: z\n .string()\n .max(500)\n .optional()\n .describe(\"Text to display when no annotation is provided\"),\n })\n .describe(\n \"Schema for annotation questions that provide additional context or instructions\"\n );\n\n// Question option schema for choice-based questions\nexport const questionOptionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown to users for this option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"LLM tool call description providing context about this option\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL to display with this option\"),\n })\n .describe(\"Schema for individual options in choice-based questions\");\n\n// Nested option schema for hierarchical choice structures (recursive)\nexport const nestedOptionSchema: z.ZodType<any> = z.lazy(() =>\n z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this nested option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this nested option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown for this nested option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this nested option context\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL for this nested option\"),\n hint: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"Optional hint text to help users understand this nested option\"\n ),\n children: z\n .array(nestedOptionSchema)\n .optional()\n .default([])\n .describe(\"Array of child options for hierarchical structure\"),\n })\n .describe(\"Schema for nested options with hierarchical structure support\")\n);\n\n// Multiple choice single question schema (extends base question with choice-specific properties)\nexport const multipleChoiceSingleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"single_choice\")\n .describe(\"Must be exactly 'single_choice'\"),\n displayStyle: multipleChoiceDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying options\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .describe(\"Schema for single-choice multiple selection questions\");\n\n// Multiple choice multiple question schema (extends base question with multiple choice properties)\nexport const multipleChoiceMultipleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"multiple_choice_multiple\")\n .describe(\"Must be exactly 'multiple_choice_multiple'\"),\n displayStyle: multipleChoiceMultipleDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying multiple options\"),\n minSelections: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of options that must be selected\"),\n maxSelections: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of options that can be selected\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .refine(\n (data) => {\n // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections\n if (\n data.minSelections !== undefined &&\n data.maxSelections !== undefined\n ) {\n return data.minSelections <= data.maxSelections;\n }\n return true;\n },\n {\n message: \"minSelections cannot be greater than maxSelections\",\n path: [\"minSelections\"], // Point to minSelections field for the error\n }\n )\n .describe(\n \"Schema for multiple-choice questions allowing multiple selections\"\n );\n\n// NPS question schema (extends base question with NPS-specific properties)\nexport const npsQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nps\")\n .describe(\"Must be exactly 'nps'\"),\n min: z.literal(0).describe(\"NPS always starts at 0\"),\n max: z.literal(10).describe(\"NPS always ends at 10\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum NPS value (0)\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum NPS value (10)\"),\n scaleLabels: z\n .record(z.string().regex(/^\\d+$/), z.string().max(50))\n .optional()\n .describe(\"Custom labels for specific NPS values (0-10)\"),\n prepopulatedValue: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Default value to pre-select (0-10)\"),\n })\n .refine(\n (data) => {\n // If scaleLabels is provided, validate that all keys are within the 0-10 range\n if (data.scaleLabels) {\n const keys = Object.keys(data.scaleLabels);\n return keys.every((key) => {\n const numKey = Number(key);\n return !isNaN(numKey) && numKey >= 0 && numKey <= 10;\n });\n }\n return true;\n },\n {\n message: \"scaleLabels keys must be between 0 and 10 (inclusive)\",\n path: [\"scaleLabels\"],\n }\n )\n .describe(\"Schema for Net Promoter Score questions with 0-10 scale\");\n\n// Short answer question schema (extends base question with text input properties)\nexport const shortAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"short_answer\")\n .describe(\"Must be exactly 'short_answer'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum number of characters allowed\"),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text shown in the input field\"),\n enableRegexValidation: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable regex pattern validation\"),\n regexPattern: z\n .string()\n .optional()\n .describe(\"Regular expression pattern for validation\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum tokens allowed for AI processing\"),\n minCharactersToEnhance: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Minimum characters needed to trigger AI enhancement\"),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableRegexValidation is true, regexPattern should be provided\n if (data.enableRegexValidation && !data.regexPattern) {\n return false;\n }\n return true;\n },\n {\n message: \"regexPattern is required when enableRegexValidation is true\",\n path: [\"regexPattern\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\"Schema for short answer questions with optional AI enhancement\");\n\n// Long answer question schema (extends base question with rich text input properties)\nexport const longAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"long_text\")\n .describe(\"Must be exactly 'long_text'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(50000)\n .optional()\n .describe(\n \"Maximum number of characters allowed (higher limit for long text)\"\n ),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n rows: z\n .number()\n .int()\n .min(1)\n .max(20)\n .optional()\n .describe(\"Number of textarea rows to display (1-20)\"),\n placeholder: z\n .string()\n .max(500)\n .optional()\n .describe(\"Placeholder text for the textarea (longer for long text)\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(25000)\n .optional()\n .describe(\n \"Maximum tokens allowed for AI processing (higher for long text)\"\n ),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\n \"Schema for long answer questions with rich text support and AI enhancement\"\n );\n\n// Nested dropdown question schema (extends base question with hierarchical selection properties)\nexport const nestedDropdownQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nested_selection\")\n .describe(\"Must be exactly 'nested_selection'\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the nested dropdown\"),\n options: z\n .array(nestedOptionSchema)\n .min(1)\n .max(100)\n .describe(\n \"Array of nested options for hierarchical selection (1-100 options)\"\n ),\n displayStyle: z\n .literal(\"list\")\n .describe(\"Fixed display style for nested dropdowns\"),\n choiceOrderOption: choiceOrderOptionSchema\n .optional()\n .default(\"none\")\n .describe(\"How to order the nested choices\"),\n preserveLastChoices: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Number of choice levels to preserve (0-10)\"),\n prepopulatedValue: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Default value to pre-populate\"),\n allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow custom \"other\" options'),\n otherColumnName: z\n .string()\n .max(100)\n .optional()\n .describe('Column name for storing custom \"other\" values'),\n maxDepth: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum nesting depth allowed (1-10)\"),\n cascadeLabels: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to cascade labels from parent options\"),\n })\n .refine(\n (data) => {\n // If allowOther is true, otherColumnName should be provided\n if (data.allowOther && !data.otherColumnName) {\n return false;\n }\n return true;\n },\n {\n message: \"otherColumnName is required when allowOther is true\",\n path: [\"otherColumnName\"],\n }\n )\n .describe(\n \"Schema for nested dropdown questions with hierarchical option structure\"\n );\n\n// Export inferred types\nexport type QuestionType = z.infer<typeof questionTypeSchema>;\nexport type ValidationRule = z.infer<typeof validationRuleSchema>;\nexport type VisibilityCondition = z.infer<typeof visibilityConditionSchema>;\nexport type QuestionStatus = z.infer<typeof questionStatusSchema>;\nexport type Question = z.infer<typeof questionSchema>;\nexport type RatingDisplayStyle = z.infer<typeof ratingDisplayStyleSchema>;\nexport type RatingRepresentationSize = z.infer<\n typeof ratingRepresentationSizeSchema\n>;\nexport type RatingQuestion = z.infer<typeof ratingQuestionSchema>;\nexport type AnnotationQuestion = z.infer<typeof annotationQuestionSchema>;\nexport type QuestionOption = z.infer<typeof questionOptionSchema>;\nexport type NestedOption = z.infer<typeof nestedOptionSchema>;\nexport type MultipleChoiceDisplayStyle = z.infer<\n typeof multipleChoiceDisplayStyleSchema\n>;\nexport type MultipleChoiceSingleQuestion = z.infer<\n typeof multipleChoiceSingleQuestionSchema\n>;\nexport type MultipleChoiceMultipleDisplayStyle = z.infer<\n typeof multipleChoiceMultipleDisplayStyleSchema\n>;\nexport type MultipleChoiceMultipleQuestion = z.infer<\n typeof multipleChoiceMultipleQuestionSchema\n>;\nexport type NpsQuestion = z.infer<typeof npsQuestionSchema>;\nexport type ShortAnswerQuestion = z.infer<typeof shortAnswerQuestionSchema>;\nexport type LongAnswerQuestion = z.infer<typeof longAnswerQuestionSchema>;\nexport type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;\nexport type NestedDropdownQuestion = z.infer<\n typeof nestedDropdownQuestionSchema\n>;\nexport type Section = z.infer<typeof sectionSchema>;\n\n// Combined question schema using discriminated union for proper type safety\nexport const combinedQuestionSchema = z.discriminatedUnion(\"type\", [\n ratingQuestionSchema,\n annotationQuestionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n]);\n\n// Explicit type definition for better inference\nexport type CombinedQuestion = \n | z.infer<typeof ratingQuestionSchema>\n | z.infer<typeof annotationQuestionSchema>\n | z.infer<typeof multipleChoiceSingleQuestionSchema>\n | z.infer<typeof multipleChoiceMultipleQuestionSchema>\n | z.infer<typeof npsQuestionSchema>\n | z.infer<typeof shortAnswerQuestionSchema>\n | z.infer<typeof longAnswerQuestionSchema>\n | z.infer<typeof nestedDropdownQuestionSchema>;\n", "import { z } from \"zod\";\n\n// Simple answer schema\nexport const SimpleAnswerSchema = z\n .object({\n type: z\n .literal(\"simple\")\n .describe(\"Indicates this is a simple answer with a single value\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .describe(\"The answer value - can be text, number, or boolean\"),\n })\n .describe(\n \"A simple answer containing a single value like text, number, or boolean\"\n );\n\n// Choice answer schema\nexport const ChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"choice\")\n .describe(\"Indicates this is a single-choice answer\"),\n selectedOptionId: z\n .string()\n .describe(\"The ID of the selected option from the available choices\"),\n })\n .describe(\n \"A single-choice answer where the user selects one option from a list\"\n );\n\n// Multiple choice answer schema\nexport const MultipleChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"multiple_choice\")\n .describe(\"Indicates this is a multiple-choice answer\"),\n selectedOptionIds: z\n .array(z.string())\n .describe(\n \"Array of IDs for all selected options from the available choices\"\n ),\n })\n .describe(\n \"A multiple-choice answer where the user can select multiple options from a list\"\n );\n\n// Scale answer schema\nexport const ScaleAnswerSchema = z\n .object({\n type: z\n .literal(\"scale\")\n .describe(\"Indicates this is a scale/rating answer\"),\n value: z\n .number()\n .describe(\n \"The numerical value representing the position on the scale (e.g., 1-5, 1-10)\"\n ),\n })\n .describe(\n \"A scale answer where the user selects a numerical value on a scale\"\n );\n\n// Continuous sum answer schema\nexport const ContinuousSumAnswerSchema = z\n .object({\n type: z\n .literal(\"continuous_sum\")\n .describe(\"Indicates this is a continuous sum answer\"),\n values: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being rated\"),\n value: z\n .number()\n .describe(\"The numerical value assigned to this option\"),\n })\n )\n .describe(\n \"Array of option-value pairs where the sum of all values represents a total allocation\"\n ),\n })\n .describe(\n \"A continuous sum answer where users distribute values across multiple options that add up to a total\"\n );\n\n// Ranking answer schema\nexport const RankingAnswerSchema = z\n .object({\n type: z.literal(\"ranking\").describe(\"Indicates this is a ranking answer\"),\n ranks: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being ranked\"),\n rank: z\n .number()\n .describe(\n \"The rank position of this option (lower numbers indicate higher preference)\"\n ),\n })\n )\n .describe(\n \"Array of option-rank pairs showing the user's preference ordering\"\n ),\n })\n .describe(\n \"A ranking answer where users order options by preference or priority\"\n );\n\n// Text answer schema\nexport const TextAnswerSchema = z\n .object({\n type: z.literal(\"text\").describe(\"Indicates this is a text-based answer\"),\n values: z\n .array(\n z.object({\n fieldId: z.string().describe(\"The ID of the text field\"),\n text: z.string().describe(\"The text content entered by the user\"),\n })\n )\n .describe(\"Array of field-text pairs for multiple text input fields\"),\n })\n .describe(\n \"A text answer containing responses to one or more text input fields\"\n );\n\n// Union schema for all answer types\nexport const AnswerSchema = z\n .discriminatedUnion(\"type\", [\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n ])\n .describe(\n \"A union of all possible answer types discriminated by the 'type' field\"\n );\n\n// Type inference from schemas (for type safety)\nexport type SimpleAnswer = z.infer<typeof SimpleAnswerSchema>;\nexport type ChoiceAnswer = z.infer<typeof ChoiceAnswerSchema>;\nexport type MultipleChoiceAnswer = z.infer<typeof MultipleChoiceAnswerSchema>;\nexport type ScaleAnswer = z.infer<typeof ScaleAnswerSchema>;\nexport type ContinuousSumAnswer = z.infer<typeof ContinuousSumAnswerSchema>;\nexport type RankingAnswer = z.infer<typeof RankingAnswerSchema>;\nexport type TextAnswer = z.infer<typeof TextAnswerSchema>;\n// Explicit type definition for better inference\nexport type Answer = \n | z.infer<typeof SimpleAnswerSchema>\n | z.infer<typeof ChoiceAnswerSchema>\n | z.infer<typeof MultipleChoiceAnswerSchema>\n | z.infer<typeof ScaleAnswerSchema>\n | z.infer<typeof ContinuousSumAnswerSchema>\n | z.infer<typeof RankingAnswerSchema>\n | z.infer<typeof TextAnswerSchema>;\n", "import { z } from \"zod\";\n\n// Feedback type enum for different feedback frequency types\nexport const surveyTypeSchema = z\n .enum([\"R\", \"O\"])\n .describe(\"Enumeration of feedback types: R=Recurring, O=One-time\");\n\n// Constants for survey types (derived from the enum schema)\nexport const SurveyTypes = {\n RECURRING: surveyTypeSchema.options[0],\n ONE_TIME: surveyTypeSchema.options[1],\n} as const;\n\n// Yes/No enum for boolean-like string fields\nexport const yesNoSchema = z\n .enum([\"Y\", \"N\"])\n .describe(\"Yes/No enumeration using Y/N values\");\n\n// Constants for yes/no values (derived from the enum schema)\nexport const YesNoValues = {\n YES: yesNoSchema.options[0],\n NO: yesNoSchema.options[1],\n} as const;\n\n// Time unit enum for recurring schedules\nexport const recurringUnitSchema = z\n .enum([\"minutes\", \"hours\", \"days\", \"weeks\", \"months\", \"years\"])\n .describe(\"Time units for recurring feedback schedules\");\n\n// Constants for recurring units (derived from the enum schema)\nexport const RecurringUnits = {\n MINUTES: recurringUnitSchema.options[0],\n HOURS: recurringUnitSchema.options[1],\n DAYS: recurringUnitSchema.options[2],\n WEEKS: recurringUnitSchema.options[3],\n MONTHS: recurringUnitSchema.options[4],\n YEARS: recurringUnitSchema.options[5],\n} as const;\n\n// Frequency and scheduling properties schema\nexport const frequencyAndSchedulingPropertiesSchema = z\n .object({\n surveyType: surveyTypeSchema\n .describe(\"Type of feedback: R for recurring, O for one-time\"),\n showOnce: yesNoSchema\n .describe(\"Whether the feedback should be shown only once per user\"),\n stopWhenResponsesCount: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Stop feedback when this number of responses is reached (as string)\"),\n recurringValue: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Value for recurring schedule (e.g., every 15 days)\"),\n recurringUnit: recurringUnitSchema\n .describe(\"Time unit for recurring schedule\"),\n startDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback in ISO format\"),\n stopDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Stop date and time for the feedback in ISO format\"),\n })\n .refine(\n (data) => {\n // If surveyType is \"O\" (one-time), showOnce should be \"Y\"\n if (data.surveyType === \"O\" && data.showOnce === \"N\") {\n return false;\n }\n return true;\n },\n {\n message: \"One-time feedback must have showOnce set to 'Y'\",\n path: [\"showOnce\"],\n }\n )\n .refine(\n (data) => {\n // If surveyType is \"R\" (recurring), recurringValue and recurringUnit should be meaningful\n if (data.surveyType === \"R\") {\n const value = parseInt(data.recurringValue);\n return value > 0;\n }\n return true;\n },\n {\n message: \"Recurring feedback must have a positive recurring value\",\n path: [\"recurringValue\"],\n }\n )\n .refine(\n (data) => {\n // stopDate should be after startDate\n const start = new Date(data.startDate);\n const stop = new Date(data.stopDate);\n return stop > start;\n },\n {\n message: \"Stop date must be after start date\",\n path: [\"stopDate\"],\n }\n )\n .describe(\"Schema defining frequency and scheduling properties for feedback\");\n\n// External publishing properties schema\nexport const externalPublishingPropertiesSchema = z\n .object({\n isShareable: z\n .boolean()\n .describe(\"Whether the feedback results can be shared externally\"),\n isEmailShareable: z\n .boolean()\n .describe(\"Whether the feedback can be shared via email\"),\n })\n .describe(\"Schema defining external publishing and sharing properties for feedback\");\n\n// Publication status enum\nexport const publicationStatusSchema = z\n .enum([\"P\", \"D\",\"A\"])\n .describe(\"Publication status: P=Published, D=Draft, A=Archived\");\n\n// Constants for publication status (derived from the enum schema)\nexport const PublicationStatuses = {\n PUBLISHED: publicationStatusSchema.options[0],\n DRAFT: publicationStatusSchema.options[1],\n ARCHIVED: publicationStatusSchema.options[2],\n} as const;\n\n// Feedback configuration schema\nexport const feedbackConfigurationSchema = z\n .object({\n form_title: z\n .string()\n .describe(\"Title of the feedback form\"),\n form_description: z\n .string()\n .describe(\"Description of the feedback form\"),\n duration: z\n .object({\n from: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback duration\"),\n to: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"End date and time for the feedback duration\"),\n })\n .describe(\"Duration period for the feedback\"),\n is_published: publicationStatusSchema\n .describe(\"Publication status of the feedback form\"),\n })\n .refine(\n (data) => {\n // End date should be after start date\n const start = new Date(data.duration.from);\n const end = new Date(data.duration.to);\n return end > start;\n },\n {\n message: \"End date must be after start date\",\n path: [\"duration\", \"to\"],\n }\n )\n .describe(\"Schema defining feedback configuration properties\");\n\n// Type inference from schemas (for type safety)\nexport type SurveyType = z.infer<typeof surveyTypeSchema>;\nexport type YesNo = z.infer<typeof yesNoSchema>;\nexport type RecurringUnit = z.infer<typeof recurringUnitSchema>;\nexport type PublicationStatus = z.infer<typeof publicationStatusSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport { feedbackConfigurationSchema } from \"./form-schema\";\nimport { frequencyAndSchedulingPropertiesSchema } from \"./form-schema\";\nimport { externalPublishingPropertiesSchema } from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema, WelcomeScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndScreenFieldsSchema, EndFieldsTranslationSchema } from \"./other-screen-schema\";\nimport { themeConfigurationSchema } from \"./theme-schema\";\nimport { audienceTriggerPropertiesSchema } from \"./auto-trigger-schema\";\n\n// Other configuration properties schema using discriminated union for JSON schema compatibility\nexport const otherConfigurationPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When other configuration is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .optional()\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n // When other configuration is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n ])\n .describe(\"Schema for other configuration properties including fields and translations\");\n\n// Welcome screen properties schema using discriminated union for JSON schema compatibility\nexport const welcomeScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When welcome screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .optional()\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n // When welcome screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for welcome screen properties including fields and translations\");\n\n// End screen properties schema using discriminated union for JSON schema compatibility\nexport const endScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When end screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .optional()\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n // When end screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for end screen properties including fields and translations\");\n\n// Appearance properties schema\nexport const appearancePropertiesSchema = z\n .object({\n themeConfiguration: themeConfigurationSchema\n .describe(\"Theme configuration including colors, features, and positioning\"),\n })\n .describe(\"Schema for appearance properties including theme configuration\");\n\n// Combined form properties schema (if needed for complete form configuration)\nexport const formPropertiesSchema = z\n .object({\n feedback_configuration_id: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedback_configuration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaire_fields: z\n .object({\n questions: z.record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z.array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n selected_languages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n translations: translationsSchema\n .describe(\"Multi-language translations for questions and form content\"),\n })\n .describe(\"Fields defining the questionnaire structure, questions, sections, selected languages, and translations\"),\n frequency_and_scheduling_properties: frequencyAndSchedulingPropertiesSchema\n .describe(\"Properties controlling when and how often the feedback is shown\"),\n external_publishing_properties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audience_trigger_properties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n other_configuration_properties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n welcome_screen_properties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen configuration including content and translations\"),\n end_screen_properties: endScreenPropertiesSchema\n .describe(\"End screen configuration including content, dismissal behavior, and translations\"),\n appearance_properties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance\");\n\n// Type inference from schema (for type safety)\nexport type FormProperties = z.infer<typeof formPropertiesSchema>;\n\n// Explicit type definition for better inference\nexport type OtherConfigurationProperties = \n | {\n isEnabled: false;\n otherFields?: z.infer<typeof OtherFieldsSchema>;\n translations?: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n otherFields: z.infer<typeof OtherFieldsSchema>;\n translations: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type WelcomeScreenProperties = \n | {\n isEnabled: false;\n welcomeFields?: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n welcomeFields: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type EndScreenProperties = \n | {\n isEnabled: false;\n endFields?: z.infer<typeof EndScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n endFields: z.infer<typeof EndScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n };\n\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\n\n// Base translation entry\nexport const translationEntrySchema = z\n .object({\n text: z.string().min(1).describe(\"Translated text content\"),\n context: z.string().optional().describe(\"Optional context for translators\"),\n })\n .describe(\"Translation entry with translated text\");\n\n// Rating question translations\nexport const ratingTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum rating label translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum rating label translation\"),\n })\n .describe(\"Translation schema for rating questions\");\n\n// Single choice question translations\nexport const singleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for single choice questions\");\n\n// Multiple choice question translations\nexport const multipleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for multiple choice questions\");\n\n// NPS question translations\nexport const npsTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum NPS label (0) translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum NPS label (10) translation\"),\n scaleLabels: z.record(z.number().int().min(0).max(10), translationEntrySchema)\n .optional()\n .describe(\"Scale label translations for specific NPS values (0-10)\"),\n })\n .describe(\"Translation schema for NPS questions\");\n\n// Short answer question translations\nexport const shortAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .describe(\"Translation schema for short answer questions\");\n\n// Long answer question translations\nexport const longAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Textarea placeholder translation\"),\n })\n .describe(\"Translation schema for long answer questions\");\n\n// Nested selection question translations\nexport const nestedSelectionTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Dropdown placeholder translation\"),\n nestedOptions: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Nested option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Nested option hint translation\"),\n })).describe(\"Nested option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for nested selection questions\");\n\n// Annotation question translations\nexport const annotationTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n annotationText: translationEntrySchema.optional().describe(\"Annotation display text translation\"),\n noAnnotationText: translationEntrySchema.optional().describe(\"No annotation display text translation\"),\n })\n .describe(\"Translation schema for annotation questions\");\n\n// Discriminated union of all translation types\nexport const questionTranslationsSchema = z\n .discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"rating\"), translations: ratingTranslationsSchema }),\n z.object({ type: z.literal(\"single_choice\"), translations: singleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"multiple_choice_multiple\"), translations: multipleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"nps\"), translations: npsTranslationsSchema }),\n z.object({ type: z.literal(\"short_answer\"), translations: shortAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"long_text\"), translations: longAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"nested_selection\"), translations: nestedSelectionTranslationsSchema }),\n z.object({ type: z.literal(\"annotation\"), translations: annotationTranslationsSchema }),\n ])\n .describe(\"Discriminated union of all question type translation schemas\");\n\n// Language-specific translations keyed by question ID\nexport const languageTranslationsSchema = z\n .object({\n languageCode: z.string().describe(\"Language code matching LanguagesSchema values\"),\n questions: z.record(z.string(), questionTranslationsSchema)\n .describe(\"Question translations keyed by question ID\"),\n })\n .describe(\"Language-specific translation set keyed by question IDs\");\n\n// Complete translation schema\nexport const translationsSchema = z\n .object({\n defaultLanguage: z.string().describe(\"Default/fallback language code\"),\n languages: z.array(languageTranslationsSchema).min(1)\n .describe(\"Available language translations\"),\n version: z.string().optional().describe(\"Translation version for cache management\"),\n })\n .describe(\"Complete translation schema keyed by question IDs\");\n\n// Type exports\nexport type TranslationEntry = z.infer<typeof translationEntrySchema>;\nexport type RatingTranslations = z.infer<typeof ratingTranslationsSchema>;\nexport type SingleChoiceTranslations = z.infer<typeof singleChoiceTranslationsSchema>;\nexport type MultipleChoiceTranslations = z.infer<typeof multipleChoiceTranslationsSchema>;\nexport type NpsTranslations = z.infer<typeof npsTranslationsSchema>;\nexport type ShortAnswerTranslations = z.infer<typeof shortAnswerTranslationsSchema>;\nexport type LongAnswerTranslations = z.infer<typeof longAnswerTranslationsSchema>;\nexport type NestedSelectionTranslations = z.infer<typeof nestedSelectionTranslationsSchema>;\nexport type AnnotationTranslations = z.infer<typeof annotationTranslationsSchema>;\n// Explicit type definition for better inference\nexport type QuestionTranslations = \n | { type: \"rating\"; translations: z.infer<typeof ratingTranslationsSchema> }\n | { type: \"single_choice\"; translations: z.infer<typeof singleChoiceTranslationsSchema> }\n | { type: \"multiple_choice_multiple\"; translations: z.infer<typeof multipleChoiceTranslationsSchema> }\n | { type: \"nps\"; translations: z.infer<typeof npsTranslationsSchema> }\n | { type: \"short_answer\"; translations: z.infer<typeof shortAnswerTranslationsSchema> }\n | { type: \"long_text\"; translations: z.infer<typeof longAnswerTranslationsSchema> }\n | { type: \"nested_selection\"; translations: z.infer<typeof nestedSelectionTranslationsSchema> }\n | { type: \"annotation\"; translations: z.infer<typeof annotationTranslationsSchema> };\nexport type LanguageTranslations = z.infer<typeof languageTranslationsSchema>;\nexport type Translations = z.infer<typeof translationsSchema>;\n\n// Translation helper class\nexport class TranslationProvider {\n private translations: Translations;\n\n constructor(translations: Translations) {\n this.translations = translations;\n }\n\n /**\n * Get translations for a specific question in a specific language\n */\n getQuestionTranslations(\n questionId: string,\n languageCode: string\n ): QuestionTranslations | null {\n const languageData = this.translations.languages.find(\n lang => lang.languageCode === languageCode\n );\n\n if (!languageData) {\n // Fallback to default language\n const defaultLang = this.translations.languages.find(\n lang => lang.languageCode === this.translations.defaultLanguage\n );\n if (!defaultLang) return null;\n\n return defaultLang.questions[questionId] || null;\n }\n\n return languageData.questions[questionId] || null;\n }\n\n /**\n * Get a specific translation text\n */\n getTranslationText(\n questionId: string,\n languageCode: string,\n path: string[]\n ): string | null {\n const questionTranslations = this.getQuestionTranslations(questionId, languageCode);\n if (!questionTranslations) return null;\n\n let current: any = questionTranslations.translations;\n\n for (const key of path) {\n if (current && typeof current === 'object' && key in current) {\n current = current[key];\n } else {\n return null;\n }\n }\n\n // Handle nested structures like options\n if (current && typeof current === 'object' && 'text' in current) {\n return current.text;\n }\n\n return null;\n }\n\n /**\n * Get all available languages\n */\n getAvailableLanguages(): string[] {\n return this.translations.languages.map(lang => lang.languageCode);\n }\n\n /**\n * Check if a language is supported\n */\n isLanguageSupported(languageCode: string): boolean {\n return this.translations.languages.some(lang => lang.languageCode === languageCode);\n }\n\n /**\n * Get the default language\n */\n getDefaultLanguage(): string {\n return this.translations.defaultLanguage;\n }\n}\n\n// Factory function to create translation provider\nexport function createTranslationProvider(translations: Translations): TranslationProvider {\n return new TranslationProvider(translations);\n}\n", "import { z } from \"zod\";\n\n// Dismiss behavior enum for end screen\nexport const dismissBehaviorSchema = z\n .enum([\"fade\", \"manual\"])\n .describe(\"How the end screen should be dismissed (fade out or manual dismissal)\");\n\n// Constants for dismiss behaviors (derived from the enum schema)\nexport const DismissBehaviors = {\n FADE: dismissBehaviorSchema.options[0],\n MANUAL: dismissBehaviorSchema.options[1],\n} as const;\n\n// Welcome screen configuration schema\nexport const WelcomeScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Description text shown on the welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the welcome screen button\"),\n })\n .describe(\"Schema for welcome screen configuration fields\");\n\n// End screen configuration schema\nexport const EndScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Message text shown on the end screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the end screen button\"),\n dismissBehavior: dismissBehaviorSchema.describe(\"How the end screen should be dismissed (fade out or manual dismissal)\"),\n fadeDuration: z\n .number()\n .int()\n .min(0)\n .max(10000)\n .describe(\"Duration in milliseconds for fade dismissal (0-10000)\"),\n })\n .describe(\"Schema for end screen configuration fields\");\n\n// Welcome translations configuration schema\nexport const WelcomeFieldsTranslationSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated description text for welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the welcome button label\"),\n })\n .describe(\"Schema for welcome screen translation fields\");\n\n// End translations configuration schema\nexport const EndFieldsTranslationSchema = z\n .object({\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the end button label\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated message text for end screen\"),\n })\n .describe(\"Schema for end screen translation fields\");\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n pagination: z\n .boolean()\n .describe(\"Whether to show pagination for multi-page forms\"),\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\n pageTitle: z\n .boolean()\n .describe(\"Whether to show page titles in multi-page forms\"),\n blockerFeedback: z\n .boolean()\n .describe(\"Whether to show blocker feedback for validation errors\"),\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration fields\");\n\n// Language field schema\nexport const LanguageFieldSchema = z\n .object({\n value: z\n .string()\n .min(1)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'fr')\"),\n label: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Display name for the language (e.g., 'English', 'Spanish', 'French')\"),\n isFixed: z\n .boolean()\n .default(false)\n .describe(\"Whether this language is fixed and cannot be deleted by users\"),\n })\n .describe(\"Schema for individual language field with value, label, and fixed status\");\n\n// Languages configuration schema\nexport const LanguagesSchema = z\n .array(LanguageFieldSchema)\n .describe(\"Schema for array of available languages\");\n\n// Other fields translation schema\nexport const OtherFieldsTranslationSchema = z\n .object({\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\nexport type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;\nexport type EndFields = z.infer<typeof EndScreenFieldsSchema>;\nexport type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;\nexport type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;\nexport type OtherFields = z.infer<typeof OtherFieldsSchema>;\nexport type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;\nexport type LanguageField = z.infer<typeof LanguageFieldSchema>;\nexport type Languages = z.infer<typeof LanguagesSchema>;\n", "import { z } from \"zod\";\n\n// Position enum for widget positioning\nexport const positionSchema = z\n .enum([\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"middle-left\",\n \"middle-center\",\n \"middle-right\",\n \"bottom-left\",\n \"bottom-center\",\n \"bottom-right\"\n ])\n .describe(\"Available positions for widget placement\");\n\n// Constants for positions (derived from the enum schema)\nexport const Positions = {\n TOP_LEFT: positionSchema.options[0],\n TOP_CENTER: positionSchema.options[1],\n TOP_RIGHT: positionSchema.options[2],\n MIDDLE_LEFT: positionSchema.options[3],\n MIDDLE_CENTER: positionSchema.options[4],\n MIDDLE_RIGHT: positionSchema.options[5],\n BOTTOM_LEFT: positionSchema.options[6],\n BOTTOM_CENTER: positionSchema.options[7],\n BOTTOM_RIGHT: positionSchema.options[8],\n} as const;\n\n// Theme mode enum for light and dark themes\nexport const themeModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Available theme modes for the widget\");\n\n// Constants for theme modes (derived from the enum schema)\nexport const ThemeModes = {\n LIGHT: themeModeSchema.options[0],\n DARK: themeModeSchema.options[1],\n} as const;\n\n// Schema for feature settings controlling UI behavior\nexport const featureSettingsSchema = z\n .object({\n darkOverlay: z\n .boolean()\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\")\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme colors\nexport const themeColorsSchema = z\n .object({\n brandColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #3366CC)\")\n .describe(\"Primary brand color in hex format\"),\n overlayColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #FFFFFF)\")\n .describe(\"Overlay background color in hex format\"),\n textColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #333333)\")\n .describe(\"Primary text color in hex format\"),\n backgroundColor: z\n .union([\n z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i),\n z.string().regex(/^rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*(?:,\\s*[01](?:\\.\\d+)?)?\\s*\\)$/i)\n ])\n .describe(\"Background color in hex format or rgba format (e.g., #1A1A1A or rgba(255,255,255, 1))\")\n })\n .describe(\"Color scheme for a single theme\");\n\n// Schema for the complete themes object\nexport const themesSchema = z\n .object({\n light: themeColorsSchema,\n dark: themeColorsSchema\n })\n .describe(\"Complete theme configuration with light and dark variants\");\n\n// Schema for the complete theme configuration\nexport const themeConfigurationSchema = z\n .object({\n themes: themesSchema\n .describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema\n .describe(\"UI feature settings controlling widget behavior\"),\n selectedPosition: positionSchema\n .describe(\"Selected position for the main widget\"),\n selectedIconPosition: positionSchema\n .describe(\"Selected position for the widget icon\")\n })\n .describe(\"Complete theme and UI configuration including colors, features, and positioning\");\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type FeatureSettings = z.infer<typeof featureSettingsSchema>;\nexport type ThemeColors = z.infer<typeof themeColorsSchema>;\nexport type Themes = z.infer<typeof themesSchema>;\nexport type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;\n", "import { z } from \"zod\";\n\n// Audience segment schema for targeting specific user groups\nexport const audienceSegmentSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the audience segment\"),\n name: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display name for the audience segment\"),\n isImportant: z\n .boolean()\n .describe(\"Whether this segment is marked as important for targeting\"),\n when: z\n .string()\n .describe(\"Timing condition for when to trigger the audience segment\"),\n who: z\n .string()\n .describe(\"User criteria or conditions defining who belongs to this segment\"),\n })\n .describe(\"Schema defining an audience segment for targeting\");\n\n// Audience trigger properties schema\nexport const audienceTriggerPropertiesSchema = z\n .object({\n isAuto: z\n .boolean()\n .describe(\"Whether automatic triggering is enabled for this audience\"),\n isManual: z\n .boolean()\n .describe(\"Whether manual triggering is enabled for this audience\"),\n segments: z\n .array(audienceSegmentSchema)\n .min(0)\n .describe(\"Array of audience segments for targeting conditions\"),\n })\n .refine(\n (data) => {\n // Ensure at least one of isAuto or isManual is true\n return data.isAuto || data.isManual;\n },\n {\n message: \"At least one of isAuto or isManual must be true\",\n path: [\"isAuto\"],\n }\n )\n .describe(\"Schema defining audience trigger properties for form targeting\");\n\n// Type inference from schemas\nexport type AudienceSegment = z.infer<typeof audienceSegmentSchema>;\nexport type AudienceTriggerProperties = z.infer<typeof audienceTriggerPropertiesSchema>;\n", "// Main entry point for encatch-typescript schemas\n\n// Field schema exports\nexport {\n questionTypeSchema,\n validationRuleTypeSchema,\n validationRuleSchema,\n visibilityConditionSchema,\n sectionSchema,\n questionStatusSchema,\n ratingDisplayStyleSchema,\n ratingRepresentationSizeSchema,\n multipleChoiceDisplayStyleSchema,\n multipleChoiceMultipleDisplayStyleSchema,\n choiceOrderOptionSchema,\n questionSchema,\n ratingQuestionSchema,\n annotationQuestionSchema,\n questionOptionSchema,\n nestedOptionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n combinedQuestionSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n ChoiceOrderOptions,\n // Types\n type QuestionType,\n type ValidationRule,\n type VisibilityCondition,\n type QuestionStatus,\n type Question,\n type RatingDisplayStyle,\n type RatingRepresentationSize,\n type RatingQuestion,\n type AnnotationQuestion,\n type QuestionOption,\n type NestedOption,\n type MultipleChoiceDisplayStyle,\n type MultipleChoiceSingleQuestion,\n type MultipleChoiceMultipleDisplayStyle,\n type MultipleChoiceMultipleQuestion,\n type NpsQuestion,\n type ShortAnswerQuestion,\n type LongAnswerQuestion,\n type ChoiceOrderOption,\n type NestedDropdownQuestion,\n type Section,\n type CombinedQuestion,\n} from \"./schemas/fields/field-schema\";\n\n// Answer schema exports\nexport {\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n AnswerSchema,\n type SimpleAnswer,\n type ChoiceAnswer,\n type MultipleChoiceAnswer,\n type ScaleAnswer,\n type ContinuousSumAnswer,\n type RankingAnswer,\n type TextAnswer,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n surveyTypeSchema,\n yesNoSchema,\n recurringUnitSchema,\n frequencyAndSchedulingPropertiesSchema,\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n SurveyTypes,\n YesNoValues,\n RecurringUnits,\n PublicationStatuses,\n // Types\n type SurveyType,\n type YesNo,\n type RecurringUnit,\n type PublicationStatus,\n type FeedbackConfiguration,\n type FrequencyAndSchedulingProperties,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n welcomeScreenPropertiesSchema,\n endScreenPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type WelcomeScreenProperties,\n type EndScreenProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n dismissBehaviorSchema,\n WelcomeScreenFieldsSchema,\n EndScreenFieldsSchema,\n WelcomeFieldsTranslationSchema,\n EndFieldsTranslationSchema,\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Enum constants\n DismissBehaviors,\n // Types\n type WelcomeFields,\n type EndFields,\n type WelcomeFieldsTranslation,\n type EndFieldsTranslation,\n type OtherFields,\n type OtherFieldsTranslation,\n type LanguageField,\n type Languages,\n} from \"./schemas/fields/other-screen-schema\";\n\n// Theme schema exports\nexport {\n positionSchema,\n themeModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ThemeConfiguration,\n} from \"./schemas/fields/theme-schema\";\n\n// Translations schema exports\nexport {\n translationEntrySchema,\n ratingTranslationsSchema,\n singleChoiceTranslationsSchema,\n multipleChoiceTranslationsSchema,\n npsTranslationsSchema,\n shortAnswerTranslationsSchema,\n longAnswerTranslationsSchema,\n nestedSelectionTranslationsSchema,\n annotationTranslationsSchema,\n questionTranslationsSchema,\n languageTranslationsSchema,\n translationsSchema,\n TranslationProvider,\n createTranslationProvider,\n type TranslationEntry,\n type RatingTranslations,\n type SingleChoiceTranslations,\n type MultipleChoiceTranslations,\n type NpsTranslations,\n type ShortAnswerTranslations,\n type LongAnswerTranslations,\n type NestedSelectionTranslations,\n type AnnotationTranslations,\n type QuestionTranslations,\n type LanguageTranslations,\n type Translations,\n} from \"./schemas/fields/translations-schema\";\n\n// Auto trigger schema exports\nexport {\n audienceSegmentSchema,\n audienceTriggerPropertiesSchema,\n type AudienceSegment,\n type AudienceTriggerProperties,\n} from \"./schemas/fields/auto-trigger-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
|
|
5
|
-
"mappings": ";;;;AA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EAC5B,SAAS,+DAA+D;AAAA,IAC3E,oBAAoB,gBACjB,SAAS,oDAAoD;AAAA,IAChE,cAAc,mBACX,SAAS,4DAA4D;AAAA,EAC1E,CAAC,EACA,SAAS,wGAAwG;AAAA,EACpH,qCAAqC,uCAClC,SAAS,iEAAiE;AAAA,EAC7E,gCAAgC,mCAC7B,SAAS,4EAA4E;AAAA,EACxF,6BAA6B,gCAC1B,SAAS,qFAAqF;AAAA,EACjG,gCAAgC,mCAC7B,SAAS,qFAAqF;AAAA,EACjG,2BAA2B,8BACxB,SAAS,iEAAiE;AAAA,EAC7E,uBAAuB,0BACpB,SAAS,kFAAkF;AAAA,EAC9F,uBAAuB,2BACpB,SAAS,4EAA4E;AAC1F,CAAC,EACA,SAAS,gJAAgJ;;;AKmE5J,SAAS,KAAAC,UAAS;",
|
|
6
|
-
"names": ["z", "z", "z", "z", "z", "z", "z", "z", "z", "z"]
|
|
3
|
+
"sources": ["../../src/schemas/fields/field-schema.ts", "../../src/schemas/fields/answer-schema.ts", "../../src/schemas/fields/form-schema.ts", "../../src/schemas/fields/form-properties-schema.ts", "../../src/schemas/fields/translations-schema.ts", "../../src/schemas/fields/other-screen-schema.ts", "../../src/schemas/fields/theme-schema.ts", "../../src/schemas/fields/auto-trigger-schema.ts", "../../src/schemas/fields/other-properties-schema.ts", "../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { z } from \"zod\";\n\n// Question type enum for different form field types\nexport const questionTypeSchema = z\n .enum([\n \"rating\",\n \"single_choice\",\n \"nps\",\n \"nested_selection\",\n \"multiple_choice_multiple\",\n \"short_answer\",\n \"long_text\",\n \"annotation\",\n ])\n .describe(\"Enumeration of all supported question types for form fields\");\n\n// Constants for question types (derived from the enum schema)\nexport const QuestionTypes = {\n RATING: questionTypeSchema.options[0],\n SINGLE_CHOICE: questionTypeSchema.options[1],\n NPS: questionTypeSchema.options[2],\n NESTED_SELECTION: questionTypeSchema.options[3],\n MULTIPLE_CHOICE_MULTIPLE: questionTypeSchema.options[4],\n SHORT_ANSWER: questionTypeSchema.options[5],\n LONG_TEXT: questionTypeSchema.options[6],\n ANNOTATION: questionTypeSchema.options[7],\n} as const;\n\n// Validation rule type enum\nexport const validationRuleTypeSchema = z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .describe(\"Enumeration of all supported validation rule types\");\n\n// Constants for validation rule types (derived from the enum schema)\nexport const ValidationRuleTypes = {\n REQUIRED: validationRuleTypeSchema.options[0],\n MIN: validationRuleTypeSchema.options[1],\n MAX: validationRuleTypeSchema.options[2],\n MIN_LENGTH: validationRuleTypeSchema.options[3],\n MAX_LENGTH: validationRuleTypeSchema.options[4],\n PATTERN: validationRuleTypeSchema.options[5],\n EMAIL: validationRuleTypeSchema.options[6],\n URL: validationRuleTypeSchema.options[7],\n CUSTOM: validationRuleTypeSchema.options[8],\n} as const;\n\n// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: validationRuleTypeSchema.describe(\"Type of validation rule to apply\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value for the validation rule (string, number, or boolean)\"),\n message: z\n .string()\n .optional()\n .describe(\"Custom error message when validation fails\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this validation rule\"),\n })\n .describe(\"Schema defining validation rules for question responses\");\n\n// Visibility condition operator enum\nexport const visibilityConditionOperatorSchema = z\n .enum([\n \"equals\",\n \"not_equals\",\n \"contains\",\n \"not_contains\",\n \"greater_than\",\n \"less_than\",\n \"is_empty\",\n \"is_not_empty\",\n ])\n .describe(\"Enumeration of all supported visibility condition operators\");\n\n// Constants for visibility condition operators (derived from the enum schema)\nexport const VisibilityConditionOperators = {\n EQUALS: visibilityConditionOperatorSchema.options[0],\n NOT_EQUALS: visibilityConditionOperatorSchema.options[1],\n CONTAINS: visibilityConditionOperatorSchema.options[2],\n NOT_CONTAINS: visibilityConditionOperatorSchema.options[3],\n GREATER_THAN: visibilityConditionOperatorSchema.options[4],\n LESS_THAN: visibilityConditionOperatorSchema.options[5],\n IS_EMPTY: visibilityConditionOperatorSchema.options[6],\n IS_NOT_EMPTY: visibilityConditionOperatorSchema.options[7],\n} as const;\n\n// Visibility condition schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: visibilityConditionOperatorSchema.describe(\"Comparison operator for the condition\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value to compare against (string, number, or boolean)\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this visibility condition\"),\n })\n .describe(\n \"Schema defining conditions that control when questions are visible\"\n );\n\n// Section schema for organizing questions\nexport const sectionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the section\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display title for the section\"),\n question_ids: z\n .array(z.string())\n .min(1)\n .describe(\"Array of question IDs that belong to this section\"),\n })\n .describe(\"Schema defining sections that organize questions into logical groups\");\n\n// Question status enum\nexport const questionStatusSchema = z.enum([\"D\", \"P\", \"A\", \"S\"]); // Draft, Published, Archived, Suspended\n\n// Constants for question status (derived from the enum schema)\nexport const QuestionStatuses = {\n DRAFT: questionStatusSchema.options[0],\n PUBLISHED: questionStatusSchema.options[1],\n ARCHIVED: questionStatusSchema.options[2],\n SUSPENDED: questionStatusSchema.options[3],\n} as const;\n\n// Display style enum for rating questions\nexport const ratingDisplayStyleSchema = z.enum([\n \"star\",\n \"heart\",\n \"thumbs-up\",\n \"diamond\",\n \"emoji\",\n \"emoji-exp\",\n]);\n\n// Constants for rating display styles (derived from the enum schema)\nexport const RatingDisplayStyles = {\n STAR: ratingDisplayStyleSchema.options[0],\n HEART: ratingDisplayStyleSchema.options[1],\n THUMBS_UP: ratingDisplayStyleSchema.options[2],\n DIAMOND: ratingDisplayStyleSchema.options[3],\n EMOJI: ratingDisplayStyleSchema.options[4],\n EMOJI_EXP: ratingDisplayStyleSchema.options[5],\n} as const;\n\n// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\n\n// Constants for rating representation sizes (derived from the enum schema)\nexport const RatingRepresentationSizes = {\n SMALL: ratingRepresentationSizeSchema.options[0],\n MEDIUM: ratingRepresentationSizeSchema.options[1],\n LARGE: ratingRepresentationSizeSchema.options[2],\n} as const;\n\n// Display style enum for multiple choice questions\nexport const multipleChoiceDisplayStyleSchema = z.enum([\n \"radio\",\n \"list\",\n \"chip\",\n \"dropdown\",\n]);\n\n// Constants for multiple choice display styles (derived from the enum schema)\nexport const MultipleChoiceDisplayStyles = {\n RADIO: multipleChoiceDisplayStyleSchema.options[0],\n LIST: multipleChoiceDisplayStyleSchema.options[1],\n CHIP: multipleChoiceDisplayStyleSchema.options[2],\n DROPDOWN: multipleChoiceDisplayStyleSchema.options[3],\n} as const;\n\n// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\n\n// Constants for multiple choice multiple display styles (derived from the enum schema)\nexport const MultipleChoiceMultipleDisplayStyles = {\n CHECKBOX: multipleChoiceMultipleDisplayStyleSchema.options[0],\n LIST: multipleChoiceMultipleDisplayStyleSchema.options[1],\n CHIP: multipleChoiceMultipleDisplayStyleSchema.options[2],\n} as const;\n\n// Choice order options for nested selection questions\nexport const choiceOrderOptionSchema = z.enum([\n \"randomize\",\n \"flip\",\n \"rotate\",\n \"ascending\",\n \"none\",\n]);\n\n// Constants for choice order options (derived from the enum schema)\nexport const ChoiceOrderOptions = {\n RANDOMIZE: choiceOrderOptionSchema.options[0],\n FLIP: choiceOrderOptionSchema.options[1],\n ROTATE: choiceOrderOptionSchema.options[2],\n ASCENDING: choiceOrderOptionSchema.options[3],\n NONE: choiceOrderOptionSchema.options[4],\n} as const;\n\n// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for the question\"),\n type: questionTypeSchema.describe(\n \"The type of question (rating, single_choice, etc.)\"\n ),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title/question text displayed to users\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text\"),\n describe: z\n .string()\n .max(2000)\n .optional()\n .describe(\n \"LLM tool call description for better AI understanding and context\"\n ),\n required: z\n .boolean()\n .default(false)\n .describe(\"Whether this question must be answered\"),\n errorMessage: z\n .string()\n .max(500)\n .optional()\n .describe(\"Custom error message when validation fails\"),\n validations: z\n .array(validationRuleSchema)\n .optional()\n .default([])\n .describe(\"Array of validation rules to apply\"),\n visibility: z\n .array(visibilityConditionSchema)\n .optional()\n .default([])\n .describe(\"Conditions that control when this question is shown\"),\n isFixed: z\n .boolean()\n .describe(\"Whether this question position is fixed or can be reordered\"),\n sectionId: z\n .string()\n .optional()\n .describe(\"ID of the section this question belongs to\"),\n status: questionStatusSchema.describe(\n \"Current status of the question (Draft, Published, etc.)\"\n ),\n })\n .describe(\"Base schema for all question types with common properties\");\n\n// Rating question schema (extends base question with specific rating properties)\nexport const ratingQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating\")\n .describe(\"Must be exactly 'rating'\"),\n showLabels: z\n .boolean()\n .optional()\n .describe(\"Whether to show min/max labels\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum rating value\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum rating value\"),\n displayStyle: ratingDisplayStyleSchema\n .optional()\n .describe(\"Visual style for rating display\"),\n numberOfRatings: z\n .number()\n .int()\n .min(1)\n .max(10)\n .describe(\"Number of rating options (1-10)\"),\n representationSize: ratingRepresentationSizeSchema\n .optional()\n .describe(\"Size of rating visual elements\"),\n color: z\n .string()\n .regex(/^#[0-9A-F]{6}$/i, \"Must be a valid hex color\")\n .optional()\n .describe(\"Hex color for rating elements\"),\n })\n .describe(\"Schema for rating questions with customizable display options\");\n\n// Annotation question schema (extends base question with annotation properties)\nexport const annotationQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"annotation\")\n .describe(\"Must be exactly 'annotation'\"),\n annotationText: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Text to display when annotation is provided\"),\n noAnnotationText: z\n .string()\n .max(500)\n .optional()\n .describe(\"Text to display when no annotation is provided\"),\n })\n .describe(\n \"Schema for annotation questions that provide additional context or instructions\"\n );\n\n// Question option schema for choice-based questions\nexport const questionOptionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown to users for this option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"LLM tool call description providing context about this option\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL to display with this option\"),\n })\n .describe(\"Schema for individual options in choice-based questions\");\n\n// Nested option schema for hierarchical choice structures (recursive)\nexport const nestedOptionSchema: z.ZodType<any> = z.lazy(() =>\n z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this nested option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this nested option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown for this nested option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this nested option context\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL for this nested option\"),\n hint: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"Optional hint text to help users understand this nested option\"\n ),\n children: z\n .array(nestedOptionSchema)\n .optional()\n .default([])\n .describe(\"Array of child options for hierarchical structure\"),\n })\n .describe(\"Schema for nested options with hierarchical structure support\")\n);\n\n// Multiple choice single question schema (extends base question with choice-specific properties)\nexport const multipleChoiceSingleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"single_choice\")\n .describe(\"Must be exactly 'single_choice'\"),\n displayStyle: multipleChoiceDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying options\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .describe(\"Schema for single-choice multiple selection questions\");\n\n// Multiple choice multiple question schema (extends base question with multiple choice properties)\nexport const multipleChoiceMultipleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"multiple_choice_multiple\")\n .describe(\"Must be exactly 'multiple_choice_multiple'\"),\n displayStyle: multipleChoiceMultipleDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying multiple options\"),\n minSelections: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of options that must be selected\"),\n maxSelections: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of options that can be selected\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .refine(\n (data) => {\n // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections\n if (\n data.minSelections !== undefined &&\n data.maxSelections !== undefined\n ) {\n return data.minSelections <= data.maxSelections;\n }\n return true;\n },\n {\n message: \"minSelections cannot be greater than maxSelections\",\n path: [\"minSelections\"], // Point to minSelections field for the error\n }\n )\n .describe(\n \"Schema for multiple-choice questions allowing multiple selections\"\n );\n\n// NPS question schema (extends base question with NPS-specific properties)\nexport const npsQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nps\")\n .describe(\"Must be exactly 'nps'\"),\n min: z.literal(0).describe(\"NPS always starts at 0\"),\n max: z.literal(10).describe(\"NPS always ends at 10\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum NPS value (0)\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum NPS value (10)\"),\n scaleLabels: z\n .record(z.string().regex(/^\\d+$/), z.string().max(50))\n .optional()\n .describe(\"Custom labels for specific NPS values (0-10)\"),\n prepopulatedValue: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Default value to pre-select (0-10)\"),\n })\n .refine(\n (data) => {\n // If scaleLabels is provided, validate that all keys are within the 0-10 range\n if (data.scaleLabels) {\n const keys = Object.keys(data.scaleLabels);\n return keys.every((key) => {\n const numKey = Number(key);\n return !isNaN(numKey) && numKey >= 0 && numKey <= 10;\n });\n }\n return true;\n },\n {\n message: \"scaleLabels keys must be between 0 and 10 (inclusive)\",\n path: [\"scaleLabels\"],\n }\n )\n .describe(\"Schema for Net Promoter Score questions with 0-10 scale\");\n\n// Short answer question schema (extends base question with text input properties)\nexport const shortAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"short_answer\")\n .describe(\"Must be exactly 'short_answer'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum number of characters allowed\"),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text shown in the input field\"),\n enableRegexValidation: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable regex pattern validation\"),\n regexPattern: z\n .string()\n .optional()\n .describe(\"Regular expression pattern for validation\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum tokens allowed for AI processing\"),\n minCharactersToEnhance: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Minimum characters needed to trigger AI enhancement\"),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableRegexValidation is true, regexPattern should be provided\n if (data.enableRegexValidation && !data.regexPattern) {\n return false;\n }\n return true;\n },\n {\n message: \"regexPattern is required when enableRegexValidation is true\",\n path: [\"regexPattern\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\"Schema for short answer questions with optional AI enhancement\");\n\n// Long answer question schema (extends base question with rich text input properties)\nexport const longAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"long_text\")\n .describe(\"Must be exactly 'long_text'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(50000)\n .optional()\n .describe(\n \"Maximum number of characters allowed (higher limit for long text)\"\n ),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n rows: z\n .number()\n .int()\n .min(1)\n .max(20)\n .optional()\n .describe(\"Number of textarea rows to display (1-20)\"),\n placeholder: z\n .string()\n .max(500)\n .optional()\n .describe(\"Placeholder text for the textarea (longer for long text)\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(25000)\n .optional()\n .describe(\n \"Maximum tokens allowed for AI processing (higher for long text)\"\n ),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\n \"Schema for long answer questions with rich text support and AI enhancement\"\n );\n\n// Nested dropdown question schema (extends base question with hierarchical selection properties)\nexport const nestedDropdownQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nested_selection\")\n .describe(\"Must be exactly 'nested_selection'\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the nested dropdown\"),\n options: z\n .array(nestedOptionSchema)\n .min(1)\n .max(100)\n .describe(\n \"Array of nested options for hierarchical selection (1-100 options)\"\n ),\n displayStyle: z\n .literal(\"list\")\n .describe(\"Fixed display style for nested dropdowns\"),\n choiceOrderOption: choiceOrderOptionSchema\n .optional()\n .default(\"none\")\n .describe(\"How to order the nested choices\"),\n preserveLastChoices: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Number of choice levels to preserve (0-10)\"),\n prepopulatedValue: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Default value to pre-populate\"),\n allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow custom \"other\" options'),\n otherColumnName: z\n .string()\n .max(100)\n .optional()\n .describe('Column name for storing custom \"other\" values'),\n maxDepth: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum nesting depth allowed (1-10)\"),\n cascadeLabels: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to cascade labels from parent options\"),\n })\n .refine(\n (data) => {\n // If allowOther is true, otherColumnName should be provided\n if (data.allowOther && !data.otherColumnName) {\n return false;\n }\n return true;\n },\n {\n message: \"otherColumnName is required when allowOther is true\",\n path: [\"otherColumnName\"],\n }\n )\n .describe(\n \"Schema for nested dropdown questions with hierarchical option structure\"\n );\n\n// Export inferred types\nexport type QuestionType = z.infer<typeof questionTypeSchema>;\nexport type ValidationRule = z.infer<typeof validationRuleSchema>;\nexport type VisibilityCondition = z.infer<typeof visibilityConditionSchema>;\nexport type QuestionStatus = z.infer<typeof questionStatusSchema>;\nexport type Question = z.infer<typeof questionSchema>;\nexport type RatingDisplayStyle = z.infer<typeof ratingDisplayStyleSchema>;\nexport type RatingRepresentationSize = z.infer<\n typeof ratingRepresentationSizeSchema\n>;\nexport type RatingQuestion = z.infer<typeof ratingQuestionSchema>;\nexport type AnnotationQuestion = z.infer<typeof annotationQuestionSchema>;\nexport type QuestionOption = z.infer<typeof questionOptionSchema>;\nexport type NestedOption = z.infer<typeof nestedOptionSchema>;\nexport type MultipleChoiceDisplayStyle = z.infer<\n typeof multipleChoiceDisplayStyleSchema\n>;\nexport type MultipleChoiceSingleQuestion = z.infer<\n typeof multipleChoiceSingleQuestionSchema\n>;\nexport type MultipleChoiceMultipleDisplayStyle = z.infer<\n typeof multipleChoiceMultipleDisplayStyleSchema\n>;\nexport type MultipleChoiceMultipleQuestion = z.infer<\n typeof multipleChoiceMultipleQuestionSchema\n>;\nexport type NpsQuestion = z.infer<typeof npsQuestionSchema>;\nexport type ShortAnswerQuestion = z.infer<typeof shortAnswerQuestionSchema>;\nexport type LongAnswerQuestion = z.infer<typeof longAnswerQuestionSchema>;\nexport type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;\nexport type NestedDropdownQuestion = z.infer<\n typeof nestedDropdownQuestionSchema\n>;\nexport type Section = z.infer<typeof sectionSchema>;\n\n// Combined question schema using discriminated union for proper type safety\nexport const combinedQuestionSchema = z.discriminatedUnion(\"type\", [\n ratingQuestionSchema,\n annotationQuestionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n]);\n\n// Explicit type definition for better inference\nexport type CombinedQuestion = \n | z.infer<typeof ratingQuestionSchema>\n | z.infer<typeof annotationQuestionSchema>\n | z.infer<typeof multipleChoiceSingleQuestionSchema>\n | z.infer<typeof multipleChoiceMultipleQuestionSchema>\n | z.infer<typeof npsQuestionSchema>\n | z.infer<typeof shortAnswerQuestionSchema>\n | z.infer<typeof longAnswerQuestionSchema>\n | z.infer<typeof nestedDropdownQuestionSchema>;\n", "import { z } from \"zod\";\n\n// Simple answer schema\nexport const SimpleAnswerSchema = z\n .object({\n type: z\n .literal(\"simple\")\n .describe(\"Indicates this is a simple answer with a single value\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .describe(\"The answer value - can be text, number, or boolean\"),\n })\n .describe(\n \"A simple answer containing a single value like text, number, or boolean\"\n );\n\n// Choice answer schema\nexport const ChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"choice\")\n .describe(\"Indicates this is a single-choice answer\"),\n selectedOptionId: z\n .string()\n .describe(\"The ID of the selected option from the available choices\"),\n })\n .describe(\n \"A single-choice answer where the user selects one option from a list\"\n );\n\n// Multiple choice answer schema\nexport const MultipleChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"multiple_choice\")\n .describe(\"Indicates this is a multiple-choice answer\"),\n selectedOptionIds: z\n .array(z.string())\n .describe(\n \"Array of IDs for all selected options from the available choices\"\n ),\n })\n .describe(\n \"A multiple-choice answer where the user can select multiple options from a list\"\n );\n\n// Scale answer schema\nexport const ScaleAnswerSchema = z\n .object({\n type: z\n .literal(\"scale\")\n .describe(\"Indicates this is a scale/rating answer\"),\n value: z\n .number()\n .describe(\n \"The numerical value representing the position on the scale (e.g., 1-5, 1-10)\"\n ),\n })\n .describe(\n \"A scale answer where the user selects a numerical value on a scale\"\n );\n\n// Continuous sum answer schema\nexport const ContinuousSumAnswerSchema = z\n .object({\n type: z\n .literal(\"continuous_sum\")\n .describe(\"Indicates this is a continuous sum answer\"),\n values: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being rated\"),\n value: z\n .number()\n .describe(\"The numerical value assigned to this option\"),\n })\n )\n .describe(\n \"Array of option-value pairs where the sum of all values represents a total allocation\"\n ),\n })\n .describe(\n \"A continuous sum answer where users distribute values across multiple options that add up to a total\"\n );\n\n// Ranking answer schema\nexport const RankingAnswerSchema = z\n .object({\n type: z.literal(\"ranking\").describe(\"Indicates this is a ranking answer\"),\n ranks: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being ranked\"),\n rank: z\n .number()\n .describe(\n \"The rank position of this option (lower numbers indicate higher preference)\"\n ),\n })\n )\n .describe(\n \"Array of option-rank pairs showing the user's preference ordering\"\n ),\n })\n .describe(\n \"A ranking answer where users order options by preference or priority\"\n );\n\n// Text answer schema\nexport const TextAnswerSchema = z\n .object({\n type: z.literal(\"text\").describe(\"Indicates this is a text-based answer\"),\n values: z\n .array(\n z.object({\n fieldId: z.string().describe(\"The ID of the text field\"),\n text: z.string().describe(\"The text content entered by the user\"),\n })\n )\n .describe(\"Array of field-text pairs for multiple text input fields\"),\n })\n .describe(\n \"A text answer containing responses to one or more text input fields\"\n );\n\n// Union schema for all answer types\nexport const AnswerSchema = z\n .discriminatedUnion(\"type\", [\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n ])\n .describe(\n \"A union of all possible answer types discriminated by the 'type' field\"\n );\n\n// Type inference from schemas (for type safety)\nexport type SimpleAnswer = z.infer<typeof SimpleAnswerSchema>;\nexport type ChoiceAnswer = z.infer<typeof ChoiceAnswerSchema>;\nexport type MultipleChoiceAnswer = z.infer<typeof MultipleChoiceAnswerSchema>;\nexport type ScaleAnswer = z.infer<typeof ScaleAnswerSchema>;\nexport type ContinuousSumAnswer = z.infer<typeof ContinuousSumAnswerSchema>;\nexport type RankingAnswer = z.infer<typeof RankingAnswerSchema>;\nexport type TextAnswer = z.infer<typeof TextAnswerSchema>;\n// Explicit type definition for better inference\nexport type Answer = \n | z.infer<typeof SimpleAnswerSchema>\n | z.infer<typeof ChoiceAnswerSchema>\n | z.infer<typeof MultipleChoiceAnswerSchema>\n | z.infer<typeof ScaleAnswerSchema>\n | z.infer<typeof ContinuousSumAnswerSchema>\n | z.infer<typeof RankingAnswerSchema>\n | z.infer<typeof TextAnswerSchema>;\n", "import { z } from \"zod\";\n\n// Feedback type enum for different feedback frequency types\nexport const surveyTypeSchema = z\n .enum([\"R\", \"O\"])\n .describe(\"Enumeration of feedback types: R=Recurring, O=One-time\");\n\n// Constants for survey types (derived from the enum schema)\nexport const SurveyTypes = {\n RECURRING: surveyTypeSchema.options[0],\n ONE_TIME: surveyTypeSchema.options[1],\n} as const;\n\n// Yes/No enum for boolean-like string fields\nexport const yesNoSchema = z\n .enum([\"Y\", \"N\"])\n .describe(\"Yes/No enumeration using Y/N values\");\n\n// Constants for yes/no values (derived from the enum schema)\nexport const YesNoValues = {\n YES: yesNoSchema.options[0],\n NO: yesNoSchema.options[1],\n} as const;\n\n// Time unit enum for recurring schedules\nexport const recurringUnitSchema = z\n .enum([\"minutes\", \"hours\", \"days\", \"weeks\", \"months\", \"years\"])\n .describe(\"Time units for recurring feedback schedules\");\n\n// Constants for recurring units (derived from the enum schema)\nexport const RecurringUnits = {\n MINUTES: recurringUnitSchema.options[0],\n HOURS: recurringUnitSchema.options[1],\n DAYS: recurringUnitSchema.options[2],\n WEEKS: recurringUnitSchema.options[3],\n MONTHS: recurringUnitSchema.options[4],\n YEARS: recurringUnitSchema.options[5],\n} as const;\n\n// Frequency and scheduling properties schema\nexport const frequencyAndSchedulingPropertiesSchema = z\n .object({\n surveyType: surveyTypeSchema\n .describe(\"Type of feedback: R for recurring, O for one-time\"),\n showOnce: yesNoSchema\n .describe(\"Whether the feedback should be shown only once per user\"),\n stopWhenResponsesCount: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Stop feedback when this number of responses is reached (as string)\"),\n recurringValue: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Value for recurring schedule (e.g., every 15 days)\"),\n recurringUnit: recurringUnitSchema\n .describe(\"Time unit for recurring schedule\"),\n startDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback in ISO format\"),\n stopDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Stop date and time for the feedback in ISO format\"),\n })\n .refine(\n (data) => {\n // If surveyType is \"O\" (one-time), showOnce should be \"Y\"\n if (data.surveyType === \"O\" && data.showOnce === \"N\") {\n return false;\n }\n return true;\n },\n {\n message: \"One-time feedback must have showOnce set to 'Y'\",\n path: [\"showOnce\"],\n }\n )\n .refine(\n (data) => {\n // If surveyType is \"R\" (recurring), recurringValue and recurringUnit should be meaningful\n if (data.surveyType === \"R\") {\n const value = parseInt(data.recurringValue);\n return value > 0;\n }\n return true;\n },\n {\n message: \"Recurring feedback must have a positive recurring value\",\n path: [\"recurringValue\"],\n }\n )\n .refine(\n (data) => {\n // stopDate should be after startDate\n const start = new Date(data.startDate);\n const stop = new Date(data.stopDate);\n return stop > start;\n },\n {\n message: \"Stop date must be after start date\",\n path: [\"stopDate\"],\n }\n )\n .describe(\"Schema defining frequency and scheduling properties for feedback\");\n\n// External publishing properties schema\nexport const externalPublishingPropertiesSchema = z\n .object({\n isShareable: z\n .boolean()\n .describe(\"Whether the feedback results can be shared externally\"),\n isEmailShareable: z\n .boolean()\n .describe(\"Whether the feedback can be shared via email\"),\n })\n .describe(\"Schema defining external publishing and sharing properties for feedback\");\n\n// Publication status enum\nexport const publicationStatusSchema = z\n .enum([\"P\", \"D\",\"A\"])\n .describe(\"Publication status: P=Published, D=Draft, A=Archived\");\n\n// Constants for publication status (derived from the enum schema)\nexport const PublicationStatuses = {\n PUBLISHED: publicationStatusSchema.options[0],\n DRAFT: publicationStatusSchema.options[1],\n ARCHIVED: publicationStatusSchema.options[2],\n} as const;\n\n// Feedback configuration schema\nexport const feedbackConfigurationSchema = z\n .object({\n form_title: z\n .string()\n .describe(\"Title of the feedback form\"),\n form_description: z\n .string()\n .describe(\"Description of the feedback form\"),\n duration: z\n .object({\n from: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback duration\"),\n to: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"End date and time for the feedback duration\"),\n })\n .describe(\"Duration period for the feedback\"),\n is_published: publicationStatusSchema\n .describe(\"Publication status of the feedback form\"),\n })\n .refine(\n (data) => {\n // End date should be after start date\n const start = new Date(data.duration.from);\n const end = new Date(data.duration.to);\n return end > start;\n },\n {\n message: \"End date must be after start date\",\n path: [\"duration\", \"to\"],\n }\n )\n .describe(\"Schema defining feedback configuration properties\");\n\n// Type inference from schemas (for type safety)\nexport type SurveyType = z.infer<typeof surveyTypeSchema>;\nexport type YesNo = z.infer<typeof yesNoSchema>;\nexport type RecurringUnit = z.infer<typeof recurringUnitSchema>;\nexport type PublicationStatus = z.infer<typeof publicationStatusSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport { feedbackConfigurationSchema } from \"./form-schema\";\nimport { frequencyAndSchedulingPropertiesSchema } from \"./form-schema\";\nimport { externalPublishingPropertiesSchema } from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema, WelcomeScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndScreenFieldsSchema, EndFieldsTranslationSchema } from \"./other-screen-schema\";\nimport { themeConfigurationSchema } from \"./theme-schema\";\nimport { audienceTriggerPropertiesSchema } from \"./auto-trigger-schema\";\n\n// Other configuration properties schema using discriminated union for JSON schema compatibility\nexport const otherConfigurationPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When other configuration is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .optional()\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n // When other configuration is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n ])\n .describe(\"Schema for other configuration properties including fields and translations\");\n\n// Welcome screen properties schema using discriminated union for JSON schema compatibility\nexport const welcomeScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When welcome screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .optional()\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n // When welcome screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for welcome screen properties including fields and translations\");\n\n// End screen properties schema using discriminated union for JSON schema compatibility\nexport const endScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When end screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .optional()\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n // When end screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for end screen properties including fields and translations\");\n\n// Appearance properties schema\nexport const appearancePropertiesSchema = z\n .object({\n themeConfiguration: themeConfigurationSchema\n .describe(\"Theme configuration including colors, features, and positioning\"),\n })\n .describe(\"Schema for appearance properties including theme configuration\");\n\n// Combined form properties schema (if needed for complete form configuration)\nexport const formPropertiesSchema = z\n .object({\n feedback_configuration_id: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedback_configuration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaire_fields: z\n .object({\n questions: z.record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z.array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n selected_languages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n translations: translationsSchema\n .describe(\"Multi-language translations for questions and form content\"),\n })\n .describe(\"Fields defining the questionnaire structure, questions, sections, selected languages, and translations\"),\n frequency_and_scheduling_properties: frequencyAndSchedulingPropertiesSchema\n .describe(\"Properties controlling when and how often the feedback is shown\"),\n external_publishing_properties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audience_trigger_properties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n other_configuration_properties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n welcome_screen_properties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen configuration including content and translations\"),\n end_screen_properties: endScreenPropertiesSchema\n .describe(\"End screen configuration including content, dismissal behavior, and translations\"),\n appearance_properties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance\");\n\n// Type inference from schema (for type safety)\nexport type FormProperties = z.infer<typeof formPropertiesSchema>;\n\n// Explicit type definition for better inference\nexport type OtherConfigurationProperties = \n | {\n isEnabled: false;\n otherFields?: z.infer<typeof OtherFieldsSchema>;\n translations?: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n otherFields: z.infer<typeof OtherFieldsSchema>;\n translations: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type WelcomeScreenProperties = \n | {\n isEnabled: false;\n welcomeFields?: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n welcomeFields: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type EndScreenProperties = \n | {\n isEnabled: false;\n endFields?: z.infer<typeof EndScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n endFields: z.infer<typeof EndScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n };\n\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\n\n// Base translation entry\nexport const translationEntrySchema = z\n .object({\n text: z.string().min(1).describe(\"Translated text content\"),\n context: z.string().optional().describe(\"Optional context for translators\"),\n })\n .describe(\"Translation entry with translated text\");\n\n// Rating question translations\nexport const ratingTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum rating label translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum rating label translation\"),\n })\n .describe(\"Translation schema for rating questions\");\n\n// Single choice question translations\nexport const singleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for single choice questions\");\n\n// Multiple choice question translations\nexport const multipleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for multiple choice questions\");\n\n// NPS question translations\nexport const npsTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum NPS label (0) translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum NPS label (10) translation\"),\n scaleLabels: z.record(z.number().int().min(0).max(10), translationEntrySchema)\n .optional()\n .describe(\"Scale label translations for specific NPS values (0-10)\"),\n })\n .describe(\"Translation schema for NPS questions\");\n\n// Short answer question translations\nexport const shortAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .describe(\"Translation schema for short answer questions\");\n\n// Long answer question translations\nexport const longAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Textarea placeholder translation\"),\n })\n .describe(\"Translation schema for long answer questions\");\n\n// Nested selection question translations\nexport const nestedSelectionTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Dropdown placeholder translation\"),\n nestedOptions: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Nested option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Nested option hint translation\"),\n })).describe(\"Nested option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for nested selection questions\");\n\n// Annotation question translations\nexport const annotationTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n annotationText: translationEntrySchema.optional().describe(\"Annotation display text translation\"),\n noAnnotationText: translationEntrySchema.optional().describe(\"No annotation display text translation\"),\n })\n .describe(\"Translation schema for annotation questions\");\n\n// Discriminated union of all translation types\nexport const questionTranslationsSchema = z\n .discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"rating\"), translations: ratingTranslationsSchema }),\n z.object({ type: z.literal(\"single_choice\"), translations: singleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"multiple_choice_multiple\"), translations: multipleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"nps\"), translations: npsTranslationsSchema }),\n z.object({ type: z.literal(\"short_answer\"), translations: shortAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"long_text\"), translations: longAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"nested_selection\"), translations: nestedSelectionTranslationsSchema }),\n z.object({ type: z.literal(\"annotation\"), translations: annotationTranslationsSchema }),\n ])\n .describe(\"Discriminated union of all question type translation schemas\");\n\n// Language-specific translations keyed by question ID\nexport const languageTranslationsSchema = z\n .object({\n languageCode: z.string().describe(\"Language code matching LanguagesSchema values\"),\n questions: z.record(z.string(), questionTranslationsSchema)\n .describe(\"Question translations keyed by question ID\"),\n })\n .describe(\"Language-specific translation set keyed by question IDs\");\n\n// Complete translation schema\nexport const translationsSchema = z\n .object({\n defaultLanguage: z.string().describe(\"Default/fallback language code\"),\n languages: z.array(languageTranslationsSchema).min(1)\n .describe(\"Available language translations\"),\n version: z.string().optional().describe(\"Translation version for cache management\"),\n })\n .describe(\"Complete translation schema keyed by question IDs\");\n\n// Type exports\nexport type TranslationEntry = z.infer<typeof translationEntrySchema>;\nexport type RatingTranslations = z.infer<typeof ratingTranslationsSchema>;\nexport type SingleChoiceTranslations = z.infer<typeof singleChoiceTranslationsSchema>;\nexport type MultipleChoiceTranslations = z.infer<typeof multipleChoiceTranslationsSchema>;\nexport type NpsTranslations = z.infer<typeof npsTranslationsSchema>;\nexport type ShortAnswerTranslations = z.infer<typeof shortAnswerTranslationsSchema>;\nexport type LongAnswerTranslations = z.infer<typeof longAnswerTranslationsSchema>;\nexport type NestedSelectionTranslations = z.infer<typeof nestedSelectionTranslationsSchema>;\nexport type AnnotationTranslations = z.infer<typeof annotationTranslationsSchema>;\n// Explicit type definition for better inference\nexport type QuestionTranslations = \n | { type: \"rating\"; translations: z.infer<typeof ratingTranslationsSchema> }\n | { type: \"single_choice\"; translations: z.infer<typeof singleChoiceTranslationsSchema> }\n | { type: \"multiple_choice_multiple\"; translations: z.infer<typeof multipleChoiceTranslationsSchema> }\n | { type: \"nps\"; translations: z.infer<typeof npsTranslationsSchema> }\n | { type: \"short_answer\"; translations: z.infer<typeof shortAnswerTranslationsSchema> }\n | { type: \"long_text\"; translations: z.infer<typeof longAnswerTranslationsSchema> }\n | { type: \"nested_selection\"; translations: z.infer<typeof nestedSelectionTranslationsSchema> }\n | { type: \"annotation\"; translations: z.infer<typeof annotationTranslationsSchema> };\nexport type LanguageTranslations = z.infer<typeof languageTranslationsSchema>;\nexport type Translations = z.infer<typeof translationsSchema>;\n\n// Translation helper class\nexport class TranslationProvider {\n private translations: Translations;\n\n constructor(translations: Translations) {\n this.translations = translations;\n }\n\n /**\n * Get translations for a specific question in a specific language\n */\n getQuestionTranslations(\n questionId: string,\n languageCode: string\n ): QuestionTranslations | null {\n const languageData = this.translations.languages.find(\n lang => lang.languageCode === languageCode\n );\n\n if (!languageData) {\n // Fallback to default language\n const defaultLang = this.translations.languages.find(\n lang => lang.languageCode === this.translations.defaultLanguage\n );\n if (!defaultLang) return null;\n\n return defaultLang.questions[questionId] || null;\n }\n\n return languageData.questions[questionId] || null;\n }\n\n /**\n * Get a specific translation text\n */\n getTranslationText(\n questionId: string,\n languageCode: string,\n path: string[]\n ): string | null {\n const questionTranslations = this.getQuestionTranslations(questionId, languageCode);\n if (!questionTranslations) return null;\n\n let current: any = questionTranslations.translations;\n\n for (const key of path) {\n if (current && typeof current === 'object' && key in current) {\n current = current[key];\n } else {\n return null;\n }\n }\n\n // Handle nested structures like options\n if (current && typeof current === 'object' && 'text' in current) {\n return current.text;\n }\n\n return null;\n }\n\n /**\n * Get all available languages\n */\n getAvailableLanguages(): string[] {\n return this.translations.languages.map(lang => lang.languageCode);\n }\n\n /**\n * Check if a language is supported\n */\n isLanguageSupported(languageCode: string): boolean {\n return this.translations.languages.some(lang => lang.languageCode === languageCode);\n }\n\n /**\n * Get the default language\n */\n getDefaultLanguage(): string {\n return this.translations.defaultLanguage;\n }\n}\n\n// Factory function to create translation provider\nexport function createTranslationProvider(translations: Translations): TranslationProvider {\n return new TranslationProvider(translations);\n}\n", "import { z } from \"zod\";\n\n// Dismiss behavior enum for end screen\nexport const dismissBehaviorSchema = z\n .enum([\"fade\", \"manual\"])\n .describe(\"How the end screen should be dismissed (fade out or manual dismissal)\");\n\n// Constants for dismiss behaviors (derived from the enum schema)\nexport const DismissBehaviors = {\n FADE: dismissBehaviorSchema.options[0],\n MANUAL: dismissBehaviorSchema.options[1],\n} as const;\n\n// Welcome screen configuration schema\nexport const WelcomeScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Description text shown on the welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the welcome screen button\"),\n })\n .describe(\"Schema for welcome screen configuration fields\");\n\n// End screen configuration schema\nexport const EndScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Message text shown on the end screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the end screen button\"),\n dismissBehavior: dismissBehaviorSchema.describe(\"How the end screen should be dismissed (fade out or manual dismissal)\"),\n fadeDuration: z\n .number()\n .int()\n .min(0)\n .max(10000)\n .describe(\"Duration in milliseconds for fade dismissal (0-10000)\"),\n })\n .describe(\"Schema for end screen configuration fields\");\n\n// Welcome translations configuration schema\nexport const WelcomeFieldsTranslationSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated description text for welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the welcome button label\"),\n })\n .describe(\"Schema for welcome screen translation fields\");\n\n// End translations configuration schema\nexport const EndFieldsTranslationSchema = z\n .object({\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the end button label\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated message text for end screen\"),\n })\n .describe(\"Schema for end screen translation fields\");\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n pagination: z\n .boolean()\n .describe(\"Whether to show pagination for multi-page forms\"),\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\n pageTitle: z\n .boolean()\n .describe(\"Whether to show page titles in multi-page forms\"),\n blockerFeedback: z\n .boolean()\n .describe(\"Whether to show blocker feedback for validation errors\"),\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration fields\");\n\n// Language field schema\nexport const LanguageFieldSchema = z\n .object({\n value: z\n .string()\n .min(1)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'fr')\"),\n label: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Display name for the language (e.g., 'English', 'Spanish', 'French')\"),\n isFixed: z\n .boolean()\n .default(false)\n .describe(\"Whether this language is fixed and cannot be deleted by users\"),\n })\n .describe(\"Schema for individual language field with value, label, and fixed status\");\n\n// Languages configuration schema\nexport const LanguagesSchema = z\n .array(LanguageFieldSchema)\n .describe(\"Schema for array of available languages\");\n\n// Other fields translation schema\nexport const OtherFieldsTranslationSchema = z\n .object({\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\nexport type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;\nexport type EndFields = z.infer<typeof EndScreenFieldsSchema>;\nexport type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;\nexport type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;\nexport type OtherFields = z.infer<typeof OtherFieldsSchema>;\nexport type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;\nexport type LanguageField = z.infer<typeof LanguageFieldSchema>;\nexport type Languages = z.infer<typeof LanguagesSchema>;\n", "import { z } from \"zod\";\n\n// Position enum for widget positioning\nexport const positionSchema = z\n .enum([\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"middle-left\",\n \"middle-center\",\n \"middle-right\",\n \"bottom-left\",\n \"bottom-center\",\n \"bottom-right\"\n ])\n .describe(\"Available positions for widget placement\");\n\n// Constants for positions (derived from the enum schema)\nexport const Positions = {\n TOP_LEFT: positionSchema.options[0],\n TOP_CENTER: positionSchema.options[1],\n TOP_RIGHT: positionSchema.options[2],\n MIDDLE_LEFT: positionSchema.options[3],\n MIDDLE_CENTER: positionSchema.options[4],\n MIDDLE_RIGHT: positionSchema.options[5],\n BOTTOM_LEFT: positionSchema.options[6],\n BOTTOM_CENTER: positionSchema.options[7],\n BOTTOM_RIGHT: positionSchema.options[8],\n} as const;\n\n// Theme mode enum for light and dark themes\nexport const themeModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Available theme modes for the widget\");\n\n// Constants for theme modes (derived from the enum schema)\nexport const ThemeModes = {\n LIGHT: themeModeSchema.options[0],\n DARK: themeModeSchema.options[1],\n} as const;\n\n// Schema for feature settings controlling UI behavior\nexport const featureSettingsSchema = z\n .object({\n darkOverlay: z\n .boolean()\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\")\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme colors\nexport const themeColorsSchema = z\n .object({\n brandColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #3366CC)\")\n .describe(\"Primary brand color in hex format\"),\n overlayColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #FFFFFF)\")\n .describe(\"Overlay background color in hex format\"),\n textColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #333333)\")\n .describe(\"Primary text color in hex format\"),\n backgroundColor: z\n .union([\n z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i),\n z.string().regex(/^rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*(?:,\\s*[01](?:\\.\\d+)?)?\\s*\\)$/i)\n ])\n .describe(\"Background color in hex format or rgba format (e.g., #1A1A1A or rgba(255,255,255, 1))\")\n })\n .describe(\"Color scheme for a single theme\");\n\n// Schema for the complete themes object\nexport const themesSchema = z\n .object({\n light: themeColorsSchema,\n dark: themeColorsSchema\n })\n .describe(\"Complete theme configuration with light and dark variants\");\n\n// Schema for the complete theme configuration\nexport const themeConfigurationSchema = z\n .object({\n themes: themesSchema\n .describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema\n .describe(\"UI feature settings controlling widget behavior\"),\n selectedPosition: positionSchema\n .describe(\"Selected position for the main widget\"),\n selectedIconPosition: positionSchema\n .describe(\"Selected position for the widget icon\")\n })\n .describe(\"Complete theme and UI configuration including colors, features, and positioning\");\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type FeatureSettings = z.infer<typeof featureSettingsSchema>;\nexport type ThemeColors = z.infer<typeof themeColorsSchema>;\nexport type Themes = z.infer<typeof themesSchema>;\nexport type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;\n", "import { z } from \"zod\";\n\n// Audience segment schema for targeting specific user groups\nexport const audienceSegmentSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the audience segment\"),\n name: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display name for the audience segment\"),\n isImportant: z\n .boolean()\n .describe(\"Whether this segment is marked as important for targeting\"),\n when: z\n .string()\n .describe(\"Timing condition for when to trigger the audience segment\"),\n who: z\n .string()\n .describe(\"User criteria or conditions defining who belongs to this segment\"),\n })\n .describe(\"Schema defining an audience segment for targeting\");\n\n// Audience trigger properties schema\nexport const audienceTriggerPropertiesSchema = z\n .object({\n isAuto: z\n .boolean()\n .describe(\"Whether automatic triggering is enabled for this audience\"),\n isManual: z\n .boolean()\n .describe(\"Whether manual triggering is enabled for this audience\"),\n segments: z\n .array(audienceSegmentSchema)\n .min(0)\n .describe(\"Array of audience segments for targeting conditions\"),\n })\n .refine(\n (data) => {\n // Ensure at least one of isAuto or isManual is true\n return data.isAuto || data.isManual;\n },\n {\n message: \"At least one of isAuto or isManual must be true\",\n path: [\"isAuto\"],\n }\n )\n .describe(\"Schema defining audience trigger properties for form targeting\");\n\n// Type inference from schemas\nexport type AudienceSegment = z.infer<typeof audienceSegmentSchema>;\nexport type AudienceTriggerProperties = z.infer<typeof audienceTriggerPropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Master properties schema\nexport const masterPropertiesSchema = z\n .object({\n mandatory_fetch_config_at_paths: z\n .array(z.string())\n .describe(\"Array of paths where configuration must be fetched from server when navigated by user\"),\n config_sync_interval_seconds: z\n .number()\n .int()\n .positive()\n .describe(\"Interval in seconds for configuration synchronization between client and server\"),\n disable_all_survey: z\n .boolean()\n .describe(\"Flag to disable all surveys globally\"),\n feedback_interval_duration: z\n .number()\n .int()\n .positive()\n .describe(\"Duration in seconds for feedback interval between two auto triggered feedbacks\"),\n })\n .describe(\"Master properties configuration for global survey settings\");\n\n// Type inference from schema\nexport type MasterProperties = z.infer<typeof masterPropertiesSchema>;\n", "// Main entry point for encatch-typescript schemas\n\n// Field schema exports\nexport {\n questionTypeSchema,\n validationRuleTypeSchema,\n validationRuleSchema,\n visibilityConditionSchema,\n sectionSchema,\n questionStatusSchema,\n ratingDisplayStyleSchema,\n ratingRepresentationSizeSchema,\n multipleChoiceDisplayStyleSchema,\n multipleChoiceMultipleDisplayStyleSchema,\n choiceOrderOptionSchema,\n questionSchema,\n ratingQuestionSchema,\n annotationQuestionSchema,\n questionOptionSchema,\n nestedOptionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n combinedQuestionSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n ChoiceOrderOptions,\n // Types\n type QuestionType,\n type ValidationRule,\n type VisibilityCondition,\n type QuestionStatus,\n type Question,\n type RatingDisplayStyle,\n type RatingRepresentationSize,\n type RatingQuestion,\n type AnnotationQuestion,\n type QuestionOption,\n type NestedOption,\n type MultipleChoiceDisplayStyle,\n type MultipleChoiceSingleQuestion,\n type MultipleChoiceMultipleDisplayStyle,\n type MultipleChoiceMultipleQuestion,\n type NpsQuestion,\n type ShortAnswerQuestion,\n type LongAnswerQuestion,\n type ChoiceOrderOption,\n type NestedDropdownQuestion,\n type Section,\n type CombinedQuestion,\n} from \"./schemas/fields/field-schema\";\n\n// Answer schema exports\nexport {\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n AnswerSchema,\n type SimpleAnswer,\n type ChoiceAnswer,\n type MultipleChoiceAnswer,\n type ScaleAnswer,\n type ContinuousSumAnswer,\n type RankingAnswer,\n type TextAnswer,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n surveyTypeSchema,\n yesNoSchema,\n recurringUnitSchema,\n frequencyAndSchedulingPropertiesSchema,\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n SurveyTypes,\n YesNoValues,\n RecurringUnits,\n PublicationStatuses,\n // Types\n type SurveyType,\n type YesNo,\n type RecurringUnit,\n type PublicationStatus,\n type FeedbackConfiguration,\n type FrequencyAndSchedulingProperties,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n welcomeScreenPropertiesSchema,\n endScreenPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type WelcomeScreenProperties,\n type EndScreenProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n dismissBehaviorSchema,\n WelcomeScreenFieldsSchema,\n EndScreenFieldsSchema,\n WelcomeFieldsTranslationSchema,\n EndFieldsTranslationSchema,\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Enum constants\n DismissBehaviors,\n // Types\n type WelcomeFields,\n type EndFields,\n type WelcomeFieldsTranslation,\n type EndFieldsTranslation,\n type OtherFields,\n type OtherFieldsTranslation,\n type LanguageField,\n type Languages,\n} from \"./schemas/fields/other-screen-schema\";\n\n// Theme schema exports\nexport {\n positionSchema,\n themeModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ThemeConfiguration,\n} from \"./schemas/fields/theme-schema\";\n\n// Translations schema exports\nexport {\n translationEntrySchema,\n ratingTranslationsSchema,\n singleChoiceTranslationsSchema,\n multipleChoiceTranslationsSchema,\n npsTranslationsSchema,\n shortAnswerTranslationsSchema,\n longAnswerTranslationsSchema,\n nestedSelectionTranslationsSchema,\n annotationTranslationsSchema,\n questionTranslationsSchema,\n languageTranslationsSchema,\n translationsSchema,\n TranslationProvider,\n createTranslationProvider,\n type TranslationEntry,\n type RatingTranslations,\n type SingleChoiceTranslations,\n type MultipleChoiceTranslations,\n type NpsTranslations,\n type ShortAnswerTranslations,\n type LongAnswerTranslations,\n type NestedSelectionTranslations,\n type AnnotationTranslations,\n type QuestionTranslations,\n type LanguageTranslations,\n type Translations,\n} from \"./schemas/fields/translations-schema\";\n\n// Auto trigger schema exports\nexport {\n audienceSegmentSchema,\n audienceTriggerPropertiesSchema,\n type AudienceSegment,\n type AudienceTriggerProperties,\n} from \"./schemas/fields/auto-trigger-schema\";\n\n// Master properties schema exports\nexport {\n masterPropertiesSchema,\n type MasterProperties,\n} from \"./schemas/fields/other-properties-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
|
|
5
|
+
"mappings": ";;;;AAAA,SAAS,SAAS;AAGX,IAAM,qBAAqB,EAC/B,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS,6DAA6D;AAGlE,IAAM,gBAAgB;AAAA,EAC3B,QAAQ,mBAAmB,QAAQ,CAAC;AAAA,EACpC,eAAe,mBAAmB,QAAQ,CAAC;AAAA,EAC3C,KAAK,mBAAmB,QAAQ,CAAC;AAAA,EACjC,kBAAkB,mBA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8BACxB,SAAS,iEAAiE;AAAA,EAC7E,uBAAuB,0BACpB,SAAS,kFAAkF;AAAA,EAC9F,uBAAuB,2BACpB,SAAS,4EAA4E;AAC1F,CAAC,EACA,SAAS,gJAAgJ;;;AKxI5J,SAAS,KAAAC,UAAS;AAGX,IAAM,yBAAyBA,GACnC,OAAO;AAAA,EACN,iCAAiCA,GAC9B,MAAMA,GAAE,OAAO,CAAC,EAChB,SAAS,uFAAuF;AAAA,EACnG,8BAA8BA,GAC3B,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,iFAAiF;AAAA,EAC7F,oBAAoBA,GACjB,QAAQ,EACR,SAAS,sCAAsC;AAAA,EAClD,4BAA4BA,GACzB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,gFAAgF;AAC9F,CAAC,EACA,SAAS,4DAA4D;;;AC2LxE,SAAS,KAAAC,WAAS;",
|
|
6
|
+
"names": ["z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z"]
|
|
7
7
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export { dismissBehaviorSchema, WelcomeScreenFieldsSchema, EndScreenFieldsSchema
|
|
|
6
6
|
export { positionSchema, themeModeSchema, featureSettingsSchema, themeColorsSchema, themesSchema, themeConfigurationSchema, Positions, ThemeModes, type Position, type FeatureSettings, type ThemeColors, type Themes, type ThemeMode, type ThemeConfiguration, } from "./schemas/fields/theme-schema";
|
|
7
7
|
export { translationEntrySchema, ratingTranslationsSchema, singleChoiceTranslationsSchema, multipleChoiceTranslationsSchema, npsTranslationsSchema, shortAnswerTranslationsSchema, longAnswerTranslationsSchema, nestedSelectionTranslationsSchema, annotationTranslationsSchema, questionTranslationsSchema, languageTranslationsSchema, translationsSchema, TranslationProvider, createTranslationProvider, type TranslationEntry, type RatingTranslations, type SingleChoiceTranslations, type MultipleChoiceTranslations, type NpsTranslations, type ShortAnswerTranslations, type LongAnswerTranslations, type NestedSelectionTranslations, type AnnotationTranslations, type QuestionTranslations, type LanguageTranslations, type Translations, } from "./schemas/fields/translations-schema";
|
|
8
8
|
export { audienceSegmentSchema, audienceTriggerPropertiesSchema, type AudienceSegment, type AudienceTriggerProperties, } from "./schemas/fields/auto-trigger-schema";
|
|
9
|
+
export { masterPropertiesSchema, type MasterProperties, } from "./schemas/fields/other-properties-schema";
|
|
9
10
|
export { z } from "zod";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const masterPropertiesSchema: z.ZodObject<{
|
|
3
|
+
mandatory_fetch_config_at_paths: z.ZodArray<z.ZodString>;
|
|
4
|
+
config_sync_interval_seconds: z.ZodNumber;
|
|
5
|
+
disable_all_survey: z.ZodBoolean;
|
|
6
|
+
feedback_interval_duration: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type MasterProperties = z.infer<typeof masterPropertiesSchema>;
|
package/package.json
CHANGED