@encatch/schema 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -47,9 +47,9 @@ var visibilityConditionSchema = z.object({
47
47
  "Schema defining conditions that control when questions are visible"
48
48
  );
49
49
  var sectionSchema = z.object({
50
- id: z.uuid().describe("Unique identifier for the section"),
50
+ id: z.string().describe("Unique identifier for the section"),
51
51
  title: z.string().min(1).max(200).describe("Display title for the section"),
52
- question_ids: z.array(z.uuid()).min(1).describe("Array of question IDs that belong to this section")
52
+ question_ids: z.array(z.string()).min(1).describe("Array of question IDs that belong to this section")
53
53
  }).describe("Schema defining sections that organize questions into logical groups");
54
54
  var questionStatusSchema = z.enum(["D", "P", "A", "S"]);
55
55
  var ratingDisplayStyleSchema = z.enum([
@@ -84,7 +84,7 @@ var choiceOrderOptionSchema = z.enum([
84
84
  "none"
85
85
  ]);
86
86
  var questionSchema = z.object({
87
- id: z.uuid().describe("Unique identifier for the question"),
87
+ id: z.string().describe("Unique identifier for the question"),
88
88
  type: questionTypeSchema.describe(
89
89
  "The type of question (rating, single_choice, etc.)"
90
90
  ),
@@ -98,7 +98,7 @@ var questionSchema = z.object({
98
98
  validations: z.array(validationRuleSchema).optional().default([]).describe("Array of validation rules to apply"),
99
99
  visibility: z.array(visibilityConditionSchema).optional().default([]).describe("Conditions that control when this question is shown"),
100
100
  isFixed: z.boolean().describe("Whether this question position is fixed or can be reordered"),
101
- sectionId: z.string().uuid().optional().describe("ID of the section this question belongs to"),
101
+ sectionId: z.string().optional().describe("ID of the section this question belongs to"),
102
102
  status: questionStatusSchema.describe(
103
103
  "Current status of the question (Draft, Published, etc.)"
104
104
  )
@@ -801,7 +801,7 @@ var formPropertiesSchema = z8.object({
801
801
  feedback_configuration_id: z8.uuid().describe("Unique identifier for the feedback configuration"),
802
802
  feedback_configuration: feedbackConfigurationSchema.describe("Configuration properties for the feedback form"),
803
803
  questionnaire_fields: z8.object({
804
- questions: z8.record(z8.uuid(), combinedQuestionSchema).describe("Collection of questions keyed by their UUID identifiers"),
804
+ questions: z8.record(z8.string(), combinedQuestionSchema).describe("Collection of questions keyed by their string identifiers"),
805
805
  sections: z8.array(sectionSchema).describe("Array of sections that organize questions into logical groups"),
806
806
  selected_languages: LanguagesSchema.describe("Array of languages selected for this questionnaire"),
807
807
  translations: translationsSchema.describe("Multi-language translations for questions and form content")
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .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 schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: 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(\"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 .uuid()\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.uuid())\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// 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// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\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// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\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// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.uuid().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 .uuid()\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(questionTypeSchema.enum.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(questionTypeSchema.enum.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.uuid().describe(\"Unique identifier for this option\"),\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 .uuid()\n .describe(\"Unique identifier for this nested option\"),\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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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\nexport type CombinedQuestion = z.infer<typeof combinedQuestionSchema>;\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>;\nexport type Answer = z.infer<typeof AnswerSchema>;\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// 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// 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// 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// 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: OtherFieldsTranslationSchema\n .optional()\n .describe(\"Translations for other configuration field labels and buttons\"),\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: OtherFieldsTranslationSchema\n .describe(\"Translations for other configuration field labels and buttons\"),\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: WelcomeFieldsTranslationSchema\n .optional()\n .describe(\"Translations for welcome screen content\"),\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: WelcomeFieldsTranslationSchema\n .describe(\"Translations for welcome screen content\"),\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: EndFieldsTranslationSchema\n .optional()\n .describe(\"Translations for end screen content\"),\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: EndFieldsTranslationSchema\n .describe(\"Translations for end screen content\"),\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.uuid(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their UUID 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>;\nexport type OtherConfigurationProperties = z.infer<typeof otherConfigurationPropertiesSchema>;\nexport type WelcomeScreenProperties = z.infer<typeof welcomeScreenPropertiesSchema>;\nexport type EndScreenProperties = z.infer<typeof endScreenPropertiesSchema>;\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>;\nexport type QuestionTranslations = z.infer<typeof questionTranslationsSchema>;\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// 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: z\n .enum([\"fade\", \"manual\"])\n .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// 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 })\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 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\nexport * from './schemas/fields/field-schema';\nexport * from './schemas/fields/answer-schema';\nexport * from './schemas/fields/form-schema';\nexport * from './schemas/fields/form-properties-schema';\nexport * from './schemas/fields/other-screen-schema';\nexport * from './schemas/fields/theme-schema';\nexport * from './schemas/fields/translations-schema';\nexport * from './schemas/fields/auto-trigger-schema';\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,uBAAuB,EACjC,OAAO;AAAA,EACN,MAAM,EACH,KAAK;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA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S,4EAA4E;AAC1F,CAAC,EACA,SAAS,gJAAgJ;;;AK9H5J,SAAS,KAAAC,UAAS;",
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// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .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 schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: 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(\"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// 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// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\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// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\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// 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(questionTypeSchema.enum.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(questionTypeSchema.enum.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.uuid().describe(\"Unique identifier for this option\"),\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 .uuid()\n .describe(\"Unique identifier for this nested option\"),\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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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(questionTypeSchema.enum.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\nexport type CombinedQuestion = z.infer<typeof combinedQuestionSchema>;\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>;\nexport type Answer = z.infer<typeof AnswerSchema>;\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// 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// 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// 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// 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: OtherFieldsTranslationSchema\n .optional()\n .describe(\"Translations for other configuration field labels and buttons\"),\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: OtherFieldsTranslationSchema\n .describe(\"Translations for other configuration field labels and buttons\"),\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: WelcomeFieldsTranslationSchema\n .optional()\n .describe(\"Translations for welcome screen content\"),\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: WelcomeFieldsTranslationSchema\n .describe(\"Translations for welcome screen content\"),\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: EndFieldsTranslationSchema\n .optional()\n .describe(\"Translations for end screen content\"),\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: EndFieldsTranslationSchema\n .describe(\"Translations for end screen content\"),\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>;\nexport type OtherConfigurationProperties = z.infer<typeof otherConfigurationPropertiesSchema>;\nexport type WelcomeScreenProperties = z.infer<typeof welcomeScreenPropertiesSchema>;\nexport type EndScreenProperties = z.infer<typeof endScreenPropertiesSchema>;\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>;\nexport type QuestionTranslations = z.infer<typeof questionTranslationsSchema>;\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// 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: z\n .enum([\"fade\", \"manual\"])\n .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// 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 })\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 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\nexport * from './schemas/fields/field-schema';\nexport * from './schemas/fields/answer-schema';\nexport * from './schemas/fields/form-schema';\nexport * from './schemas/fields/form-properties-schema';\nexport * from './schemas/fields/other-screen-schema';\nexport * from './schemas/fields/theme-schema';\nexport * from './schemas/fields/translations-schema';\nexport * from './schemas/fields/auto-trigger-schema';\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,uBAAuB,EACjC,OAAO;AAAA,EACN,MAAM,EACH,KAAK;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACA,SAAS,kCAAkC;AAAA,EAC9C,OAAO,EACJ,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,EAC3C,SAAS,EACT,SAAS,4DAA4D;AAAA,EACxE,SAAS,EACN,OAAO,EACP,SAAS,EACT,SAAS,4CAA4C;AAAA,EACxD,UAAU,EACP,OAAO,EACP,IAAI,GAAG,EACP,SAAS,EACT,SAAS,oDAAoD;AAClE,CAAC,EACA,SAAS,yDAAyD;AAG9D,IAAM,4BAA4B,EACtC,OAAO;AAAA,EACN,OAAO,EAAE,OAAO,EAAE,SAAS,kCAAkC;AAAA,EAC7D,UAAU,EACP,KAAK;AAAA,IACJ;AAAA,I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EAAgE;AAGrE,IAAM,uBAAuBA,GACjC,OAAO;AAAA,EACN,2BAA2BA,GAAE,KAAK,EAC/B,SAAS,kDAAkD;AAAA,EAC9D,wBAAwB,4BACrB,SAAS,gDAAgD;AAAA,EAC5D,sBAAsBA,GACnB,OAAO;AAAA,IACN,WAAWA,GAAE,OAAOA,GAAE,OAAO,GAAG,sBAAsB,EACnD,SAAS,2DAA2D;AAAA,IACvE,UAAUA,GAAE,MAAM,aAAa,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;;;AK9H5J,SAAS,KAAAC,UAAS;",
6
6
  "names": ["z", "z", "z", "z", "z", "z", "z", "z", "z", "z"]
7
7
  }
@@ -41,9 +41,9 @@ export declare const visibilityConditionSchema: z.ZodObject<{
41
41
  describe: z.ZodOptional<z.ZodString>;
42
42
  }, z.core.$strip>;
43
43
  export declare const sectionSchema: z.ZodObject<{
44
- id: z.ZodUUID;
44
+ id: z.ZodString;
45
45
  title: z.ZodString;
46
- question_ids: z.ZodArray<z.ZodUUID>;
46
+ question_ids: z.ZodArray<z.ZodString>;
47
47
  }, z.core.$strip>;
48
48
  export declare const questionStatusSchema: z.ZodEnum<{
49
49
  D: "D";
@@ -83,7 +83,7 @@ export declare const choiceOrderOptionSchema: z.ZodEnum<{
83
83
  none: "none";
84
84
  }>;
85
85
  export declare const questionSchema: z.ZodObject<{
86
- id: z.ZodUUID;
86
+ id: z.ZodString;
87
87
  type: z.ZodEnum<{
88
88
  rating: "rating";
89
89
  single_choice: "single_choice";
@@ -140,7 +140,7 @@ export declare const questionSchema: z.ZodObject<{
140
140
  }>;
141
141
  }, z.core.$strip>;
142
142
  export declare const ratingQuestionSchema: z.ZodObject<{
143
- id: z.ZodUUID;
143
+ id: z.ZodString;
144
144
  title: z.ZodString;
145
145
  description: z.ZodOptional<z.ZodString>;
146
146
  describe: z.ZodOptional<z.ZodString>;
@@ -206,7 +206,7 @@ export declare const ratingQuestionSchema: z.ZodObject<{
206
206
  color: z.ZodOptional<z.ZodString>;
207
207
  }, z.core.$strip>;
208
208
  export declare const annotationQuestionSchema: z.ZodObject<{
209
- id: z.ZodUUID;
209
+ id: z.ZodString;
210
210
  title: z.ZodString;
211
211
  description: z.ZodOptional<z.ZodString>;
212
212
  describe: z.ZodOptional<z.ZodString>;
@@ -264,7 +264,7 @@ export declare const questionOptionSchema: z.ZodObject<{
264
264
  }, z.core.$strip>;
265
265
  export declare const nestedOptionSchema: z.ZodType<any>;
266
266
  export declare const multipleChoiceSingleQuestionSchema: z.ZodObject<{
267
- id: z.ZodUUID;
267
+ id: z.ZodString;
268
268
  title: z.ZodString;
269
269
  description: z.ZodOptional<z.ZodString>;
270
270
  describe: z.ZodOptional<z.ZodString>;
@@ -326,7 +326,7 @@ export declare const multipleChoiceSingleQuestionSchema: z.ZodObject<{
326
326
  }, z.core.$strip>>;
327
327
  }, z.core.$strip>;
328
328
  export declare const multipleChoiceMultipleQuestionSchema: z.ZodObject<{
329
- id: z.ZodUUID;
329
+ id: z.ZodString;
330
330
  title: z.ZodString;
331
331
  description: z.ZodOptional<z.ZodString>;
332
332
  describe: z.ZodOptional<z.ZodString>;
@@ -389,7 +389,7 @@ export declare const multipleChoiceMultipleQuestionSchema: z.ZodObject<{
389
389
  }, z.core.$strip>>;
390
390
  }, z.core.$strip>;
391
391
  export declare const npsQuestionSchema: z.ZodObject<{
392
- id: z.ZodUUID;
392
+ id: z.ZodString;
393
393
  title: z.ZodString;
394
394
  description: z.ZodOptional<z.ZodString>;
395
395
  describe: z.ZodOptional<z.ZodString>;
@@ -443,7 +443,7 @@ export declare const npsQuestionSchema: z.ZodObject<{
443
443
  prepopulatedValue: z.ZodOptional<z.ZodNumber>;
444
444
  }, z.core.$strip>;
445
445
  export declare const shortAnswerQuestionSchema: z.ZodObject<{
446
- id: z.ZodUUID;
446
+ id: z.ZodString;
447
447
  title: z.ZodString;
448
448
  description: z.ZodOptional<z.ZodString>;
449
449
  describe: z.ZodOptional<z.ZodString>;
@@ -502,7 +502,7 @@ export declare const shortAnswerQuestionSchema: z.ZodObject<{
502
502
  minCharactersToEnhance: z.ZodOptional<z.ZodNumber>;
503
503
  }, z.core.$strip>;
504
504
  export declare const longAnswerQuestionSchema: z.ZodObject<{
505
- id: z.ZodUUID;
505
+ id: z.ZodString;
506
506
  title: z.ZodString;
507
507
  description: z.ZodOptional<z.ZodString>;
508
508
  describe: z.ZodOptional<z.ZodString>;
@@ -559,7 +559,7 @@ export declare const longAnswerQuestionSchema: z.ZodObject<{
559
559
  maxTokenAllowed: z.ZodOptional<z.ZodNumber>;
560
560
  }, z.core.$strip>;
561
561
  export declare const nestedDropdownQuestionSchema: z.ZodObject<{
562
- id: z.ZodUUID;
562
+ id: z.ZodString;
563
563
  title: z.ZodString;
564
564
  description: z.ZodOptional<z.ZodString>;
565
565
  describe: z.ZodOptional<z.ZodString>;
@@ -644,7 +644,7 @@ export type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;
644
644
  export type NestedDropdownQuestion = z.infer<typeof nestedDropdownQuestionSchema>;
645
645
  export type Section = z.infer<typeof sectionSchema>;
646
646
  export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
647
- id: z.ZodUUID;
647
+ id: z.ZodString;
648
648
  title: z.ZodString;
649
649
  description: z.ZodOptional<z.ZodString>;
650
650
  describe: z.ZodOptional<z.ZodString>;
@@ -709,7 +709,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
709
709
  }>>;
710
710
  color: z.ZodOptional<z.ZodString>;
711
711
  }, z.core.$strip>, z.ZodObject<{
712
- id: z.ZodUUID;
712
+ id: z.ZodString;
713
713
  title: z.ZodString;
714
714
  description: z.ZodOptional<z.ZodString>;
715
715
  describe: z.ZodOptional<z.ZodString>;
@@ -758,7 +758,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
758
758
  annotationText: z.ZodOptional<z.ZodString>;
759
759
  noAnnotationText: z.ZodOptional<z.ZodString>;
760
760
  }, z.core.$strip>, z.ZodObject<{
761
- id: z.ZodUUID;
761
+ id: z.ZodString;
762
762
  title: z.ZodString;
763
763
  description: z.ZodOptional<z.ZodString>;
764
764
  describe: z.ZodOptional<z.ZodString>;
@@ -819,7 +819,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
819
819
  imageUrl: z.ZodOptional<z.ZodString>;
820
820
  }, z.core.$strip>>;
821
821
  }, z.core.$strip>, z.ZodObject<{
822
- id: z.ZodUUID;
822
+ id: z.ZodString;
823
823
  title: z.ZodString;
824
824
  description: z.ZodOptional<z.ZodString>;
825
825
  describe: z.ZodOptional<z.ZodString>;
@@ -881,7 +881,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
881
881
  imageUrl: z.ZodOptional<z.ZodString>;
882
882
  }, z.core.$strip>>;
883
883
  }, z.core.$strip>, z.ZodObject<{
884
- id: z.ZodUUID;
884
+ id: z.ZodString;
885
885
  title: z.ZodString;
886
886
  description: z.ZodOptional<z.ZodString>;
887
887
  describe: z.ZodOptional<z.ZodString>;
@@ -934,7 +934,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
934
934
  scaleLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
935
935
  prepopulatedValue: z.ZodOptional<z.ZodNumber>;
936
936
  }, z.core.$strip>, z.ZodObject<{
937
- id: z.ZodUUID;
937
+ id: z.ZodString;
938
938
  title: z.ZodString;
939
939
  description: z.ZodOptional<z.ZodString>;
940
940
  describe: z.ZodOptional<z.ZodString>;
@@ -992,7 +992,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
992
992
  maxTokenAllowed: z.ZodOptional<z.ZodNumber>;
993
993
  minCharactersToEnhance: z.ZodOptional<z.ZodNumber>;
994
994
  }, z.core.$strip>, z.ZodObject<{
995
- id: z.ZodUUID;
995
+ id: z.ZodString;
996
996
  title: z.ZodString;
997
997
  description: z.ZodOptional<z.ZodString>;
998
998
  describe: z.ZodOptional<z.ZodString>;
@@ -1048,7 +1048,7 @@ export declare const combinedQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
1048
1048
  maxEnhancements: z.ZodOptional<z.ZodNumber>;
1049
1049
  maxTokenAllowed: z.ZodOptional<z.ZodNumber>;
1050
1050
  }, z.core.$strip>, z.ZodObject<{
1051
- id: z.ZodUUID;
1051
+ id: z.ZodString;
1052
1052
  title: z.ZodString;
1053
1053
  description: z.ZodOptional<z.ZodString>;
1054
1054
  describe: z.ZodOptional<z.ZodString>;
@@ -156,8 +156,8 @@ export declare const formPropertiesSchema: z.ZodObject<{
156
156
  }>;
157
157
  }, z.core.$strip>;
158
158
  questionnaire_fields: z.ZodObject<{
159
- questions: z.ZodRecord<z.ZodUUID, z.ZodDiscriminatedUnion<[z.ZodObject<{
160
- id: z.ZodUUID;
159
+ questions: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
160
+ id: z.ZodString;
161
161
  title: z.ZodString;
162
162
  description: z.ZodOptional<z.ZodString>;
163
163
  describe: z.ZodOptional<z.ZodString>;
@@ -222,7 +222,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
222
222
  }>>;
223
223
  color: z.ZodOptional<z.ZodString>;
224
224
  }, z.core.$strip>, z.ZodObject<{
225
- id: z.ZodUUID;
225
+ id: z.ZodString;
226
226
  title: z.ZodString;
227
227
  description: z.ZodOptional<z.ZodString>;
228
228
  describe: z.ZodOptional<z.ZodString>;
@@ -271,7 +271,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
271
271
  annotationText: z.ZodOptional<z.ZodString>;
272
272
  noAnnotationText: z.ZodOptional<z.ZodString>;
273
273
  }, z.core.$strip>, z.ZodObject<{
274
- id: z.ZodUUID;
274
+ id: z.ZodString;
275
275
  title: z.ZodString;
276
276
  description: z.ZodOptional<z.ZodString>;
277
277
  describe: z.ZodOptional<z.ZodString>;
@@ -332,7 +332,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
332
332
  imageUrl: z.ZodOptional<z.ZodString>;
333
333
  }, z.core.$strip>>;
334
334
  }, z.core.$strip>, z.ZodObject<{
335
- id: z.ZodUUID;
335
+ id: z.ZodString;
336
336
  title: z.ZodString;
337
337
  description: z.ZodOptional<z.ZodString>;
338
338
  describe: z.ZodOptional<z.ZodString>;
@@ -394,7 +394,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
394
394
  imageUrl: z.ZodOptional<z.ZodString>;
395
395
  }, z.core.$strip>>;
396
396
  }, z.core.$strip>, z.ZodObject<{
397
- id: z.ZodUUID;
397
+ id: z.ZodString;
398
398
  title: z.ZodString;
399
399
  description: z.ZodOptional<z.ZodString>;
400
400
  describe: z.ZodOptional<z.ZodString>;
@@ -447,7 +447,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
447
447
  scaleLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
448
448
  prepopulatedValue: z.ZodOptional<z.ZodNumber>;
449
449
  }, z.core.$strip>, z.ZodObject<{
450
- id: z.ZodUUID;
450
+ id: z.ZodString;
451
451
  title: z.ZodString;
452
452
  description: z.ZodOptional<z.ZodString>;
453
453
  describe: z.ZodOptional<z.ZodString>;
@@ -505,7 +505,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
505
505
  maxTokenAllowed: z.ZodOptional<z.ZodNumber>;
506
506
  minCharactersToEnhance: z.ZodOptional<z.ZodNumber>;
507
507
  }, z.core.$strip>, z.ZodObject<{
508
- id: z.ZodUUID;
508
+ id: z.ZodString;
509
509
  title: z.ZodString;
510
510
  description: z.ZodOptional<z.ZodString>;
511
511
  describe: z.ZodOptional<z.ZodString>;
@@ -561,7 +561,7 @@ export declare const formPropertiesSchema: z.ZodObject<{
561
561
  maxEnhancements: z.ZodOptional<z.ZodNumber>;
562
562
  maxTokenAllowed: z.ZodOptional<z.ZodNumber>;
563
563
  }, z.core.$strip>, z.ZodObject<{
564
- id: z.ZodUUID;
564
+ id: z.ZodString;
565
565
  title: z.ZodString;
566
566
  description: z.ZodOptional<z.ZodString>;
567
567
  describe: z.ZodOptional<z.ZodString>;
@@ -625,9 +625,9 @@ export declare const formPropertiesSchema: z.ZodObject<{
625
625
  cascadeLabels: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
626
626
  }, z.core.$strip>], "type">>;
627
627
  sections: z.ZodArray<z.ZodObject<{
628
- id: z.ZodUUID;
628
+ id: z.ZodString;
629
629
  title: z.ZodString;
630
- question_ids: z.ZodArray<z.ZodUUID>;
630
+ question_ids: z.ZodArray<z.ZodString>;
631
631
  }, z.core.$strip>>;
632
632
  selected_languages: z.ZodArray<z.ZodObject<{
633
633
  value: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@encatch/schema",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "TypeScript schema definitions using Zod for validation and type inference of encatch product",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",