@encatch/schema 0.1.22 → 0.1.24

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.
@@ -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/schemas/fields/other-properties-schema.ts", "../../src/schemas/api/other-schema.ts", "../../src/schemas/api/submit-feedback-schema.ts", "../../src/schemas/api/fetch-feedback-schema.ts", "../../src/index.ts"],
4
- "sourcesContent": ["import { z } from \"zod\";\n\n// Question type enum for different form field types\nexport const questionTypeSchema = z\n .enum([\n \"rating\",\n \"single_choice\",\n \"nps\",\n \"nested_selection\",\n \"multiple_choice_multiple\",\n \"short_answer\",\n \"long_text\",\n \"annotation\",\n ])\n .describe(\"Enumeration of all supported question types for form fields\");\n\n// Constants for question types (explicit literal values for proper type inference)\nexport const QuestionTypes = {\n RATING: \"rating\" as const,\n SINGLE_CHOICE: \"single_choice\" as const,\n NPS: \"nps\" as const,\n NESTED_SELECTION: \"nested_selection\" as const,\n MULTIPLE_CHOICE_MULTIPLE: \"multiple_choice_multiple\" as const,\n SHORT_ANSWER: \"short_answer\" as const,\n LONG_TEXT: \"long_text\" as const,\n ANNOTATION: \"annotation\" as const,\n} as const;\n\n// Validation rule type enum\nexport const validationRuleTypeSchema = z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .describe(\"Enumeration of all supported validation rule types\");\n\n// Constants for validation rule types (explicit literal values for proper type inference)\nexport const ValidationRuleTypes = {\n REQUIRED: \"required\" as const,\n MIN: \"min\" as const,\n MAX: \"max\" as const,\n MIN_LENGTH: \"minLength\" as const,\n MAX_LENGTH: \"maxLength\" as const,\n PATTERN: \"pattern\" as const,\n EMAIL: \"email\" as const,\n URL: \"url\" as const,\n CUSTOM: \"custom\" as const,\n} as const;\n\n// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: validationRuleTypeSchema.describe(\"Type of validation rule to apply\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value for the validation rule (string, number, or boolean)\"),\n message: z\n .string()\n .optional()\n .describe(\"Custom error message when validation fails\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this validation rule\"),\n })\n .describe(\"Schema defining validation rules for question responses\");\n\n// Visibility condition operator enum\nexport const visibilityConditionOperatorSchema = z\n .enum([\n \"equals\",\n \"not_equals\",\n \"contains\",\n \"not_contains\",\n \"greater_than\",\n \"less_than\",\n \"is_empty\",\n \"is_not_empty\",\n ])\n .describe(\"Enumeration of all supported visibility condition operators\");\n\n// Constants for visibility condition operators (explicit literal values for proper type inference)\nexport const VisibilityConditionOperators = {\n EQUALS: \"equals\" as const,\n NOT_EQUALS: \"not_equals\" as const,\n CONTAINS: \"contains\" as const,\n NOT_CONTAINS: \"not_contains\" as const,\n GREATER_THAN: \"greater_than\" as const,\n LESS_THAN: \"less_than\" as const,\n IS_EMPTY: \"is_empty\" as const,\n IS_NOT_EMPTY: \"is_not_empty\" as const,\n} as const;\n\n// Visibility condition schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: visibilityConditionOperatorSchema.describe(\"Comparison operator for the condition\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value to compare against (string, number, or boolean)\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this visibility condition\"),\n })\n .describe(\n \"Schema defining conditions that control when questions are visible\"\n );\n\n// Section schema for organizing questions\nexport const sectionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the section\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display title for the section\"),\n question_ids: z\n .array(z.string())\n .min(1)\n .describe(\"Array of question IDs that belong to this section\"),\n })\n .describe(\"Schema defining sections that organize questions into logical groups\");\n\n// Question status enum\nexport const questionStatusSchema = z.enum([\"D\", \"P\", \"A\", \"S\"]); // Draft, Published, Archived, Suspended\n\n// Constants for question status (explicit literal values for proper type inference)\nexport const QuestionStatuses = {\n DRAFT: \"D\" as const,\n PUBLISHED: \"P\" as const,\n ARCHIVED: \"A\" as const,\n SUSPENDED: \"S\" as const,\n} as const;\n\n// Display style enum for rating questions\nexport const ratingDisplayStyleSchema = z.enum([\n \"star\",\n \"heart\",\n \"thumbs-up\",\n \"diamond\",\n \"emoji\",\n \"emoji-exp\",\n]);\n\n// Constants for rating display styles (explicit literal values for proper type inference)\nexport const RatingDisplayStyles = {\n STAR: \"star\" as const,\n HEART: \"heart\" as const,\n THUMBS_UP: \"thumbs_up\" as const,\n DIAMOND: \"diamond\" as const,\n EMOJI: \"emoji\" as const,\n EMOJI_EXP: \"emoji_exp\" as const,\n} as const;\n\n// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\n\n// Constants for rating representation sizes (explicit literal values for proper type inference)\nexport const RatingRepresentationSizes = {\n SMALL: \"small\" as const,\n MEDIUM: \"medium\" as const,\n LARGE: \"large\" as const,\n} as const;\n\n// Display style enum for multiple choice questions\nexport const multipleChoiceDisplayStyleSchema = z.enum([\n \"radio\",\n \"list\",\n \"chip\",\n \"dropdown\",\n]);\n\n// Constants for multiple choice display styles (explicit literal values for proper type inference)\nexport const MultipleChoiceDisplayStyles = {\n RADIO: \"radio\" as const,\n LIST: \"list\" as const,\n CHIP: \"chip\" as const,\n DROPDOWN: \"dropdown\" as const,\n} as const;\n\n// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\n\n// Constants for multiple choice multiple display styles (explicit literal values for proper type inference)\nexport const MultipleChoiceMultipleDisplayStyles = {\n CHECKBOX: \"checkbox\" as const,\n LIST: \"list\" as const,\n CHIP: \"chip\" as const,\n} as const;\n\n// Choice order options for nested selection questions\nexport const choiceOrderOptionSchema = z.enum([\n \"randomize\",\n \"flip\",\n \"rotate\",\n \"ascending\",\n \"none\",\n]);\n\n// Constants for choice order options (explicit literal values for proper type inference)\nexport const ChoiceOrderOptions = {\n RANDOMIZE: \"randomize\" as const,\n FLIP: \"flip\" as const,\n ROTATE: \"rotate\" as const,\n ASCENDING: \"ascending\" as const,\n NONE: \"none\" as const,\n} as const;\n\n// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for the question\"),\n type: questionTypeSchema.describe(\n \"The type of question (rating, single_choice, etc.)\"\n ),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title/question text displayed to users\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text\"),\n describe: z\n .string()\n .max(2000)\n .optional()\n .describe(\n \"LLM tool call description for better AI understanding and context\"\n ),\n required: z\n .boolean()\n .default(false)\n .describe(\"Whether this question must be answered\"),\n errorMessage: z\n .string()\n .max(500)\n .optional()\n .describe(\"Custom error message when validation fails\"),\n validations: z\n .array(validationRuleSchema)\n .optional()\n .default([])\n .describe(\"Array of validation rules to apply\"),\n visibility: z\n .array(visibilityConditionSchema)\n .optional()\n .default([])\n .describe(\"Conditions that control when this question is shown\"),\n isFixed: z\n .boolean()\n .describe(\"Whether this question position is fixed or can be reordered\"),\n sectionId: z\n .string()\n .optional()\n .describe(\"ID of the section this question belongs to\"),\n status: questionStatusSchema.describe(\n \"Current status of the question (Draft, Published, etc.)\"\n ),\n })\n .describe(\"Base schema for all question types with common properties\");\n\n// Rating question schema (extends base question with specific rating properties)\nexport const ratingQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating\")\n .describe(\"Must be exactly 'rating'\"),\n showLabels: z\n .boolean()\n .optional()\n .describe(\"Whether to show min/max labels\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum rating value\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum rating value\"),\n displayStyle: ratingDisplayStyleSchema\n .optional()\n .describe(\"Visual style for rating display\"),\n numberOfRatings: z\n .number()\n .int()\n .min(1)\n .max(10)\n .describe(\"Number of rating options (1-10)\"),\n representationSize: ratingRepresentationSizeSchema\n .optional()\n .describe(\"Size of rating visual elements\"),\n color: z\n .string()\n .regex(/^#[0-9A-F]{6}$/i, \"Must be a valid hex color\")\n .optional()\n .describe(\"Hex color for rating elements\"),\n })\n .describe(\"Schema for rating questions with customizable display options\");\n\n// Annotation question schema (extends base question with annotation properties)\nexport const annotationQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"annotation\")\n .describe(\"Must be exactly 'annotation'\"),\n annotationText: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Text to display when annotation is provided\"),\n noAnnotationText: z\n .string()\n .max(500)\n .optional()\n .describe(\"Text to display when no annotation is provided\"),\n })\n .describe(\n \"Schema for annotation questions that provide additional context or instructions\"\n );\n\n// Question option schema for choice-based questions\nexport const questionOptionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown to users for this option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"LLM tool call description providing context about this option\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL to display with this option\"),\n })\n .describe(\"Schema for individual options in choice-based questions\");\n\n// Nested option schema for hierarchical choice structures (recursive)\nexport const nestedOptionSchema: z.ZodType<any> = z.lazy(() =>\n z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this nested option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this nested option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown for this nested option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this nested option context\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL for this nested option\"),\n hint: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"Optional hint text to help users understand this nested option\"\n ),\n children: z\n .array(nestedOptionSchema)\n .optional()\n .default([])\n .describe(\"Array of child options for hierarchical structure\"),\n })\n .describe(\"Schema for nested options with hierarchical structure support\")\n);\n\n// Multiple choice single question schema (extends base question with choice-specific properties)\nexport const multipleChoiceSingleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"single_choice\")\n .describe(\"Must be exactly 'single_choice'\"),\n displayStyle: multipleChoiceDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying options\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .describe(\"Schema for single-choice multiple selection questions\");\n\n// Multiple choice multiple question schema (extends base question with multiple choice properties)\nexport const multipleChoiceMultipleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"multiple_choice_multiple\")\n .describe(\"Must be exactly 'multiple_choice_multiple'\"),\n displayStyle: multipleChoiceMultipleDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying multiple options\"),\n minSelections: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of options that must be selected\"),\n maxSelections: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of options that can be selected\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .refine(\n (data) => {\n // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections\n if (\n data.minSelections !== undefined &&\n data.maxSelections !== undefined\n ) {\n return data.minSelections <= data.maxSelections;\n }\n return true;\n },\n {\n message: \"minSelections cannot be greater than maxSelections\",\n path: [\"minSelections\"], // Point to minSelections field for the error\n }\n )\n .describe(\n \"Schema for multiple-choice questions allowing multiple selections\"\n );\n\n// NPS question schema (extends base question with NPS-specific properties)\nexport const npsQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nps\")\n .describe(\"Must be exactly 'nps'\"),\n min: z.literal(0).describe(\"NPS always starts at 0\"),\n max: z.literal(10).describe(\"NPS always ends at 10\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum NPS value (0)\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum NPS value (10)\"),\n scaleLabels: z\n .record(z.string().regex(/^\\d+$/), z.string().max(50))\n .optional()\n .describe(\"Custom labels for specific NPS values (0-10)\"),\n prepopulatedValue: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Default value to pre-select (0-10)\"),\n })\n .refine(\n (data) => {\n // If scaleLabels is provided, validate that all keys are within the 0-10 range\n if (data.scaleLabels) {\n const keys = Object.keys(data.scaleLabels);\n return keys.every((key) => {\n const numKey = Number(key);\n return !isNaN(numKey) && numKey >= 0 && numKey <= 10;\n });\n }\n return true;\n },\n {\n message: \"scaleLabels keys must be between 0 and 10 (inclusive)\",\n path: [\"scaleLabels\"],\n }\n )\n .describe(\"Schema for Net Promoter Score questions with 0-10 scale\");\n\n// Short answer question schema (extends base question with text input properties)\nexport const shortAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"short_answer\")\n .describe(\"Must be exactly 'short_answer'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum number of characters allowed\"),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text shown in the input field\"),\n enableRegexValidation: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable regex pattern validation\"),\n regexPattern: z\n .string()\n .optional()\n .describe(\"Regular expression pattern for validation\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum tokens allowed for AI processing\"),\n minCharactersToEnhance: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Minimum characters needed to trigger AI enhancement\"),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableRegexValidation is true, regexPattern should be provided\n if (data.enableRegexValidation && !data.regexPattern) {\n return false;\n }\n return true;\n },\n {\n message: \"regexPattern is required when enableRegexValidation is true\",\n path: [\"regexPattern\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\"Schema for short answer questions with optional AI enhancement\");\n\n// Long answer question schema (extends base question with rich text input properties)\nexport const longAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"long_text\")\n .describe(\"Must be exactly 'long_text'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(50000)\n .optional()\n .describe(\n \"Maximum number of characters allowed (higher limit for long text)\"\n ),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n rows: z\n .number()\n .int()\n .min(1)\n .max(20)\n .optional()\n .describe(\"Number of textarea rows to display (1-20)\"),\n placeholder: z\n .string()\n .max(500)\n .optional()\n .describe(\"Placeholder text for the textarea (longer for long text)\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(25000)\n .optional()\n .describe(\n \"Maximum tokens allowed for AI processing (higher for long text)\"\n ),\n 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 enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\n \"Schema for long answer questions with rich text support and AI enhancement\"\n );\n\n// Nested dropdown question schema (extends base question with hierarchical selection properties)\nexport const nestedDropdownQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nested_selection\")\n .describe(\"Must be exactly 'nested_selection'\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the nested dropdown\"),\n options: z\n .array(nestedOptionSchema)\n .min(1)\n .max(100)\n .describe(\n \"Array of nested options for hierarchical selection (1-100 options)\"\n ),\n displayStyle: z\n .literal(\"list\")\n .describe(\"Fixed display style for nested dropdowns\"),\n choiceOrderOption: choiceOrderOptionSchema\n .optional()\n .default(\"none\")\n .describe(\"How to order the nested choices\"),\n preserveLastChoices: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Number of choice levels to preserve (0-10)\"),\n prepopulatedValue: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Default value to pre-populate\"),\n allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow custom \"other\" options'),\n otherColumnName: z\n .string()\n .max(100)\n .optional()\n .describe('Column name for storing custom \"other\" values'),\n maxDepth: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum nesting depth allowed (1-10)\"),\n cascadeLabels: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to cascade labels from parent options\"),\n })\n .refine(\n (data) => {\n // If allowOther is true, otherColumnName should be provided\n if (data.allowOther && !data.otherColumnName) {\n return false;\n }\n return true;\n },\n {\n message: \"otherColumnName is required when allowOther is true\",\n path: [\"otherColumnName\"],\n }\n )\n .describe(\n \"Schema for nested dropdown questions with hierarchical option structure\"\n );\n\n// Export inferred types\nexport type QuestionType = z.infer<typeof questionTypeSchema>;\nexport type ValidationRule = z.infer<typeof validationRuleSchema>;\nexport type VisibilityCondition = z.infer<typeof visibilityConditionSchema>;\nexport type QuestionStatus = z.infer<typeof questionStatusSchema>;\nexport type Question = z.infer<typeof questionSchema>;\nexport type RatingDisplayStyle = z.infer<typeof ratingDisplayStyleSchema>;\nexport type RatingRepresentationSize = z.infer<\n typeof ratingRepresentationSizeSchema\n>;\nexport type RatingQuestion = z.infer<typeof ratingQuestionSchema>;\nexport type AnnotationQuestion = z.infer<typeof annotationQuestionSchema>;\nexport type QuestionOption = z.infer<typeof questionOptionSchema>;\nexport type NestedOption = z.infer<typeof nestedOptionSchema>;\nexport type MultipleChoiceDisplayStyle = z.infer<\n typeof multipleChoiceDisplayStyleSchema\n>;\nexport type MultipleChoiceSingleQuestion = z.infer<\n typeof multipleChoiceSingleQuestionSchema\n>;\nexport type MultipleChoiceMultipleDisplayStyle = z.infer<\n typeof multipleChoiceMultipleDisplayStyleSchema\n>;\nexport type MultipleChoiceMultipleQuestion = z.infer<\n typeof multipleChoiceMultipleQuestionSchema\n>;\nexport type NpsQuestion = z.infer<typeof npsQuestionSchema>;\nexport type ShortAnswerQuestion = z.infer<typeof shortAnswerQuestionSchema>;\nexport type LongAnswerQuestion = z.infer<typeof longAnswerQuestionSchema>;\nexport type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;\nexport type NestedDropdownQuestion = z.infer<\n typeof nestedDropdownQuestionSchema\n>;\nexport type Section = z.infer<typeof sectionSchema>;\n\n// Combined question schema using discriminated union for proper type safety\nexport const combinedQuestionSchema = z.discriminatedUnion(\"type\", [\n ratingQuestionSchema,\n annotationQuestionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n]);\n\n// Explicit type definition for better inference\nexport type CombinedQuestion = \n | z.infer<typeof ratingQuestionSchema>\n | z.infer<typeof annotationQuestionSchema>\n | z.infer<typeof multipleChoiceSingleQuestionSchema>\n | z.infer<typeof multipleChoiceMultipleQuestionSchema>\n | z.infer<typeof npsQuestionSchema>\n | z.infer<typeof shortAnswerQuestionSchema>\n | z.infer<typeof longAnswerQuestionSchema>\n | z.infer<typeof nestedDropdownQuestionSchema>;\n", "import { z } from \"zod\";\n\n// Simple answer schema\nexport const SimpleAnswerSchema = z\n .object({\n type: z\n .literal(\"simple\")\n .describe(\"Indicates this is a simple answer with a single value\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .describe(\"The answer value - can be text, number, or boolean\"),\n })\n .describe(\n \"A simple answer containing a single value like text, number, or boolean\"\n );\n\n// Choice answer schema\nexport const ChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"choice\")\n .describe(\"Indicates this is a single-choice answer\"),\n selectedOptionId: z\n .string()\n .describe(\"The ID of the selected option from the available choices\"),\n })\n .describe(\n \"A single-choice answer where the user selects one option from a list\"\n );\n\n// Multiple choice answer schema\nexport const MultipleChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"multiple_choice\")\n .describe(\"Indicates this is a multiple-choice answer\"),\n selectedOptionIds: z\n .array(z.string())\n .describe(\n \"Array of IDs for all selected options from the available choices\"\n ),\n })\n .describe(\n \"A multiple-choice answer where the user can select multiple options from a list\"\n );\n\n// Scale answer schema\nexport const ScaleAnswerSchema = z\n .object({\n type: z\n .literal(\"scale\")\n .describe(\"Indicates this is a scale/rating answer\"),\n value: z\n .number()\n .describe(\n \"The numerical value representing the position on the scale (e.g., 1-5, 1-10)\"\n ),\n })\n .describe(\n \"A scale answer where the user selects a numerical value on a scale\"\n );\n\n// Continuous sum answer schema\nexport const ContinuousSumAnswerSchema = z\n .object({\n type: z\n .literal(\"continuous_sum\")\n .describe(\"Indicates this is a continuous sum answer\"),\n values: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being rated\"),\n value: z\n .number()\n .describe(\"The numerical value assigned to this option\"),\n })\n )\n .describe(\n \"Array of option-value pairs where the sum of all values represents a total allocation\"\n ),\n })\n .describe(\n \"A continuous sum answer where users distribute values across multiple options that add up to a total\"\n );\n\n// Ranking answer schema\nexport const RankingAnswerSchema = z\n .object({\n type: z.literal(\"ranking\").describe(\"Indicates this is a ranking answer\"),\n ranks: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being ranked\"),\n rank: z\n .number()\n .describe(\n \"The rank position of this option (lower numbers indicate higher preference)\"\n ),\n })\n )\n .describe(\n \"Array of option-rank pairs showing the user's preference ordering\"\n ),\n })\n .describe(\n \"A ranking answer where users order options by preference or priority\"\n );\n\n// Text answer schema\nexport const TextAnswerSchema = z\n .object({\n type: z.literal(\"text\").describe(\"Indicates this is a text-based answer\"),\n values: z\n .array(\n z.object({\n fieldId: z.string().describe(\"The ID of the text field\"),\n text: z.string().describe(\"The text content entered by the user\"),\n })\n )\n .describe(\"Array of field-text pairs for multiple text input fields\"),\n })\n .describe(\n \"A text answer containing responses to one or more text input fields\"\n );\n\n// Union schema for all answer types\nexport const AnswerSchema = z\n .discriminatedUnion(\"type\", [\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n ])\n .describe(\n \"A union of all possible answer types discriminated by the 'type' field\"\n );\n\n// Type inference from schemas (for type safety)\nexport type SimpleAnswer = z.infer<typeof SimpleAnswerSchema>;\nexport type ChoiceAnswer = z.infer<typeof ChoiceAnswerSchema>;\nexport type MultipleChoiceAnswer = z.infer<typeof MultipleChoiceAnswerSchema>;\nexport type ScaleAnswer = z.infer<typeof ScaleAnswerSchema>;\nexport type ContinuousSumAnswer = z.infer<typeof ContinuousSumAnswerSchema>;\nexport type RankingAnswer = z.infer<typeof RankingAnswerSchema>;\nexport type TextAnswer = z.infer<typeof TextAnswerSchema>;\n// Explicit type definition for better inference\nexport type Answer = \n | z.infer<typeof SimpleAnswerSchema>\n | z.infer<typeof ChoiceAnswerSchema>\n | z.infer<typeof MultipleChoiceAnswerSchema>\n | z.infer<typeof ScaleAnswerSchema>\n | z.infer<typeof ContinuousSumAnswerSchema>\n | z.infer<typeof RankingAnswerSchema>\n | z.infer<typeof TextAnswerSchema>;\n", "import { z } from \"zod\";\n\n// Feedback type enum for different feedback frequency types\nexport const surveyTypeSchema = z\n .enum([\"R\", \"S\"])\n .describe(\"Enumeration of feedback types: R=Recurring, O=One-time\");\n\n// Constants for survey types (explicit literal values for proper type inference)\nexport const SurveyTypes = {\n RECURRING: \"R\" as const,\n ONE_TIME: \"S\" as const,\n} as const;\n\n// Yes/No enum for boolean-like string fields\nexport const yesNoSchema = z\n .enum([\"Y\", \"N\"])\n .describe(\"Yes/No enumeration using Y/N values\");\n\n// Constants for yes/no values (explicit literal values for proper type inference)\nexport const YesNoValues = {\n YES: \"Y\" as const,\n NO: \"N\" as const,\n} as const;\n\n// Time unit enum for recurring schedules\nexport const recurringUnitSchema = z\n .enum([\"minutes\", \"hours\", \"days\", \"weeks\", \"months\", \"years\"])\n .describe(\"Time units for recurring feedback schedules\");\n\n// Constants for recurring units (explicit literal values for proper type inference)\nexport const RecurringUnits = {\n MINUTES: \"minutes\" as const,\n HOURS: \"hours\" as const,\n DAYS: \"days\" as const,\n WEEKS: \"weeks\" as const,\n MONTHS: \"months\" as const,\n YEARS: \"years\" as const,\n} as const;\n\n// Frequency and scheduling properties schema\nexport const frequencyAndSchedulingPropertiesSchema = z\n .object({\n surveyType: surveyTypeSchema\n .describe(\"Type of feedback: R for recurring, O for one-time\"),\n showOnce: yesNoSchema\n .describe(\"Whether the feedback should be shown only once per user\"),\n stopWhenResponsesCount: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Stop feedback when this number of responses is reached (as string)\"),\n recurringValue: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Value for recurring schedule (e.g., every 15 days)\"),\n recurringUnit: recurringUnitSchema\n .describe(\"Time unit for recurring schedule\"),\n startDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback in ISO format\"),\n stopDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Stop date and time for the feedback in ISO format\"),\n })\n .refine(\n (data) => {\n // If surveyType is \"O\" (one-time), showOnce should be \"Y\"\n if (data.surveyType === \"S\" && 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\", \"S\"])\n .describe(\"Publication status: P=Published, D=Draft, A=Archived, S=Stopped\");\n\n// Constants for publication status (explicit literal values for proper type inference)\nexport const PublicationStatuses = {\n PUBLISHED: \"P\" as const,\n DRAFT: \"D\" as const,\n ARCHIVED: \"A\" as const,\n STOPPED: \"S\" as const,\n} as const;\n\n// Duration schema for date range\n// export const durationSchema = z\n// .object({\n// from: z\n// .string()\n// .describe(\"Start date and time for the duration (ISO format or custom format)\"),\n// to: z\n// .string()\n// .describe(\"End date and time for the duration (ISO format or custom format)\"),\n// })\n// .describe(\"Duration range for when something is active\");\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: durationSchema\n // .refine(\n // (data) => {\n // // Validate ISO format for this specific use case\n // const isoRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/;\n // return isoRegex.test(data.from) && isoRegex.test(data.to);\n // },\n // {\n // message: \"Duration dates must be in valid ISO format with timezone\",\n // path: [\"from\"],\n // }\n // )\n // .refine(\n // (data) => {\n // // End date should be after start date\n // const start = new Date(data.from);\n // const end = new Date(data.to);\n // return end > start;\n // },\n // {\n // message: \"End date must be after start date\",\n // path: [\"to\"],\n // }\n // )\n // .describe(\"Duration period for the feedback\"),\n is_published: publicationStatusSchema\n .describe(\"Publication status of the feedback form\"),\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>;\n// export type Duration = z.infer<typeof durationSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport { feedbackConfigurationSchema } from \"./form-schema\";\nimport { frequencyAndSchedulingPropertiesSchema } from \"./form-schema\";\nimport { externalPublishingPropertiesSchema } from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema, WelcomeScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndScreenFieldsSchema, EndFieldsTranslationSchema } from \"./other-screen-schema\";\nimport { themeConfigurationSchema } from \"./theme-schema\";\nimport { audienceTriggerPropertiesSchema } from \"./auto-trigger-schema\";\n\n// Other configuration properties schema using discriminated union for JSON schema compatibility\nexport const otherConfigurationPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When other configuration is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .optional()\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n // When other configuration is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n ])\n .describe(\"Schema for other configuration properties including fields and translations\");\n\n// Welcome screen properties schema using discriminated union for JSON schema compatibility\nexport const welcomeScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When welcome screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .optional()\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n // When welcome screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for welcome screen properties including fields and translations\");\n\n// End screen properties schema using discriminated union for JSON schema compatibility\nexport const endScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When end screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .optional()\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n // When end screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for end screen properties including fields and translations\");\n\n// Appearance properties schema\nexport const appearancePropertiesSchema = z\n .object({\n themeConfiguration: themeConfigurationSchema\n .describe(\"Theme configuration including colors, features, and positioning\"),\n })\n .describe(\"Schema for appearance properties including theme configuration\");\n\n// Combined form properties schema (if needed for complete form configuration)\nexport const formPropertiesSchema = z\n .object({\n feedback_configuration_id: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedback_configuration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaire_fields: z\n .object({\n questions: z.record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z.array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n selected_languages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n translations: translationsSchema\n .describe(\"Multi-language translations for questions and form content\"),\n })\n .describe(\"Fields defining the questionnaire structure, questions, sections, selected languages, and translations\"),\n frequency_and_scheduling_properties: frequencyAndSchedulingPropertiesSchema\n .describe(\"Properties controlling when and how often the feedback is shown\"),\n external_publishing_properties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audience_trigger_properties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n other_configuration_properties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n welcome_screen_properties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen configuration including content and translations\"),\n end_screen_properties: endScreenPropertiesSchema\n .describe(\"End screen configuration including content, dismissal behavior, and translations\"),\n appearance_properties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance\");\n\n// Type inference from schema (for type safety)\nexport type FormProperties = z.infer<typeof formPropertiesSchema>;\n\n// Explicit type definition for better inference\nexport type OtherConfigurationProperties = \n | {\n isEnabled: false;\n otherFields?: z.infer<typeof OtherFieldsSchema>;\n translations?: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n otherFields: z.infer<typeof OtherFieldsSchema>;\n translations: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type WelcomeScreenProperties = \n | {\n isEnabled: false;\n welcomeFields?: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n welcomeFields: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type EndScreenProperties = \n | {\n isEnabled: false;\n endFields?: z.infer<typeof EndScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n endFields: z.infer<typeof EndScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n };\n\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\n\n// Base translation entry - simplified to just string values for the new structure\nexport const translationEntrySchema = z\n .string()\n .min(1)\n .describe(\"Translated text content\");\n\n// Rating question translation schema with type field\nexport const ratingQuestionTranslationSchema = z\n .object({\n type: z.literal(\"rating\").describe(\"Question type identifier\"),\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 translation schema with type field\nexport const singleChoiceQuestionTranslationSchema = z\n .object({\n type: z.literal(\"single_choice\").describe(\"Question type identifier\"),\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 .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the option pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'placeholder'].includes(key)\n );\n return additionalKeys.every(key => /^option\\..+\\.(label|value)$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'option.{id}.{label|value}'\"\n })\n .describe(\"Translation schema for single choice questions\");\n\n// Multiple choice question translation schema with type field\nexport const multipleChoiceQuestionTranslationSchema = z\n .object({\n type: z.literal(\"multiple_choice_multiple\").describe(\"Question type identifier\"),\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 .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the option pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'placeholder'].includes(key)\n );\n return additionalKeys.every(key => /^option\\..+\\.(label|value)$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'option.{id}.{label|value}'\"\n })\n .describe(\"Translation schema for multiple choice questions\");\n\n// NPS question translation schema with type field\nexport const npsQuestionTranslationSchema = z\n .object({\n type: z.literal(\"nps\").describe(\"Question type identifier\"),\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 })\n .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the scale label pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'minLabel', 'maxLabel'].includes(key)\n );\n return additionalKeys.every(key => /^scaleLabel\\.\\d+$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'scaleLabel.{number}'\"\n })\n .describe(\"Translation schema for NPS questions\");\n\n// Short answer question translation schema with type field\nexport const shortAnswerQuestionTranslationSchema = z\n .object({\n type: z.literal(\"short_answer\").describe(\"Question type identifier\"),\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 translation schema with type field\nexport const longAnswerQuestionTranslationSchema = z\n .object({\n type: z.literal(\"long_text\").describe(\"Question type identifier\"),\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 translation schema with type field\nexport const nestedSelectionQuestionTranslationSchema = z\n .object({\n type: z.literal(\"nested_selection\").describe(\"Question type identifier\"),\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 })\n .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the nested option pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'placeholder'].includes(key)\n );\n return additionalKeys.every(key => /^nestedOption\\..+\\.(label|hint)$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'nestedOption.{id}.{label|hint}'\"\n })\n .describe(\"Translation schema for nested selection questions\");\n\n// Annotation question translation schema with type field\nexport const annotationQuestionTranslationSchema = z\n .object({\n type: z.literal(\"annotation\").describe(\"Question type identifier\"),\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// Union of all question translation types\nexport const questionTranslationSchema = z\n .union([\n ratingQuestionTranslationSchema,\n singleChoiceQuestionTranslationSchema,\n multipleChoiceQuestionTranslationSchema,\n npsQuestionTranslationSchema,\n shortAnswerQuestionTranslationSchema,\n longAnswerQuestionTranslationSchema,\n nestedSelectionQuestionTranslationSchema,\n annotationQuestionTranslationSchema,\n ])\n .describe(\"Union of all question type translation schemas\");\n\n// Language code schema for validation\nexport const languageCodeSchema = z\n .string()\n .min(2)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'hi')\");\n\n// Question translations keyed by language code\nexport const questionTranslationsByLanguageSchema = z\n .record(languageCodeSchema, questionTranslationSchema)\n .describe(\"Question translations keyed by language code\");\n\n// Main question-centric translation schema\nexport const questionCentricTranslationsSchema = z\n .record(z.string().uuid(), questionTranslationsByLanguageSchema)\n .describe(\"Question-centric translations keyed by question ID, then by language code\");\n\n// Complete translation schema - questions directly at root level\nexport const translationsSchema = questionCentricTranslationsSchema\n .describe(\"Question-centric translations at root level\");\n\n// Type exports\nexport type TranslationEntry = z.infer<typeof translationEntrySchema>;\nexport type RatingQuestionTranslation = z.infer<typeof ratingQuestionTranslationSchema>;\nexport type SingleChoiceQuestionTranslation = z.infer<typeof singleChoiceQuestionTranslationSchema>;\nexport type MultipleChoiceQuestionTranslation = z.infer<typeof multipleChoiceQuestionTranslationSchema>;\nexport type NpsQuestionTranslation = z.infer<typeof npsQuestionTranslationSchema>;\nexport type ShortAnswerQuestionTranslation = z.infer<typeof shortAnswerQuestionTranslationSchema>;\nexport type LongAnswerQuestionTranslation = z.infer<typeof longAnswerQuestionTranslationSchema>;\nexport type NestedSelectionQuestionTranslation = z.infer<typeof nestedSelectionQuestionTranslationSchema>;\nexport type AnnotationQuestionTranslation = z.infer<typeof annotationQuestionTranslationSchema>;\n\n// Union type for all question translations\nexport type QuestionTranslation = z.infer<typeof questionTranslationSchema>;\n\n// Schema types\nexport type LanguageCode = z.infer<typeof languageCodeSchema>;\nexport type QuestionTranslationsByLanguage = z.infer<typeof questionTranslationsByLanguageSchema>;\nexport type QuestionCentricTranslations = z.infer<typeof questionCentricTranslationsSchema>;\nexport type Translations = z.infer<typeof translationsSchema>;\n\n// Translation helper class\nexport class TranslationProvider {\n private translations: Translations;\n private defaultLanguage: string;\n\n constructor(translations: Translations, defaultLanguage: string = \"en\") {\n this.translations = translations;\n this.defaultLanguage = defaultLanguage;\n }\n\n /**\n * Get translations for a specific question in a specific language\n */\n getQuestionTranslations(\n questionId: string,\n languageCode: string\n ): QuestionTranslation | null {\n const questionTranslations = this.translations[questionId];\n if (!questionTranslations) return null;\n\n // Try to get the requested language\n let translation = questionTranslations[languageCode];\n \n // Fallback to default language if requested language not found\n if (!translation) {\n translation = questionTranslations[this.defaultLanguage];\n }\n\n return translation || null;\n }\n\n /**\n * Get a specific translation text by field path\n */\n getTranslationText(\n questionId: string,\n languageCode: string,\n fieldPath: string\n ): string | null {\n const questionTranslation = this.getQuestionTranslations(questionId, languageCode);\n if (!questionTranslation) return null;\n\n // Direct field access (e.g., \"title\", \"errorMessage\")\n if (fieldPath in questionTranslation) {\n const value = questionTranslation[fieldPath as keyof typeof questionTranslation];\n return typeof value === 'string' ? value : null;\n }\n\n return null;\n }\n\n /**\n * Get all available languages for a specific question\n */\n getQuestionLanguages(questionId: string): string[] {\n const questionTranslations = this.translations[questionId];\n if (!questionTranslations) return [];\n \n return Object.keys(questionTranslations);\n }\n\n /**\n * Get all available languages across all questions\n */\n getAvailableLanguages(): string[] {\n const allLanguages = new Set<string>();\n \n Object.values(this.translations).forEach(questionTranslations => {\n Object.keys(questionTranslations).forEach(langCode => {\n allLanguages.add(langCode);\n });\n });\n \n return Array.from(allLanguages);\n }\n\n /**\n * Check if a language is supported for a specific question\n */\n isLanguageSupportedForQuestion(questionId: string, languageCode: string): boolean {\n const questionTranslations = this.translations[questionId];\n if (!questionTranslations) return false;\n \n return languageCode in questionTranslations;\n }\n\n /**\n * Check if a language is supported across all questions\n */\n isLanguageSupported(languageCode: string): boolean {\n return this.getAvailableLanguages().includes(languageCode);\n }\n\n /**\n * Get the default language\n */\n getDefaultLanguage(): string {\n return this.defaultLanguage;\n }\n\n /**\n * Get all questions that have translations\n */\n getQuestionIds(): string[] {\n return Object.keys(this.translations);\n }\n\n /**\n * Get question type for a specific question\n */\n getQuestionType(questionId: string, languageCode?: string): string | null {\n const langCode = languageCode || this.defaultLanguage;\n const translation = this.getQuestionTranslations(questionId, langCode);\n \n return translation?.type || null;\n }\n}\n\n// Factory function to create translation provider\nexport function createTranslationProvider(translations: Translations, defaultLanguage: string = \"en\"): TranslationProvider {\n return new TranslationProvider(translations, defaultLanguage);\n}\n", "import { z } from \"zod\";\n\n// Dismiss behavior enum for end screen\nexport const dismissBehaviorSchema = z\n .enum([\"fade\", \"manual\"])\n .describe(\"How the end screen should be dismissed (fade out or manual dismissal)\");\n\n// Constants for dismiss behaviors (explicit literal values for proper type inference)\nexport const DismissBehaviors = {\n FADE: \"fade\" as const,\n MANUAL: \"manual\" as const,\n} as const;\n\n// Welcome screen configuration schema\nexport const WelcomeScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Description text shown on the welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the welcome screen button\"),\n })\n .describe(\"Schema for welcome screen configuration fields\");\n\n// End screen configuration schema\nexport const EndScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Message text shown on the end screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the end screen button\"),\n dismissBehavior: dismissBehaviorSchema.describe(\"How the end screen should be dismissed (fade out or manual dismissal)\"),\n fadeDuration: z\n .number()\n .int()\n .min(0)\n .max(10000)\n .describe(\"Duration in milliseconds for fade dismissal (0-10000)\"),\n })\n .describe(\"Schema for end screen configuration fields\");\n\n// Welcome translations configuration schema\nexport const WelcomeFieldsTranslationSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated description text for welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the welcome button label\"),\n })\n .describe(\"Schema for welcome screen translation fields\");\n\n// End translations configuration schema\nexport const EndFieldsTranslationSchema = z\n .object({\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the end button label\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated message text for end screen\"),\n })\n .describe(\"Schema for end screen translation fields\");\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n pagination: z\n .boolean()\n .describe(\"Whether to show pagination for multi-page forms\"),\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\n pageTitle: z\n .boolean()\n .describe(\"Whether to show page titles in multi-page forms\"),\n blockerFeedback: z\n .boolean()\n .describe(\"Whether to show blocker feedback for validation errors\"),\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration fields\");\n\n// Language field schema\nexport const LanguageFieldSchema = z\n .object({\n value: z\n .string()\n .min(1)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'fr')\"),\n label: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Display name for the language (e.g., 'English', 'Spanish', 'French')\"),\n isFixed: z\n .boolean()\n .default(false)\n .describe(\"Whether this language is fixed and cannot be deleted by users\"),\n })\n .describe(\"Schema for individual language field with value, label, and fixed status\");\n\n// Languages configuration schema\nexport const LanguagesSchema = z\n .array(LanguageFieldSchema)\n .describe(\"Schema for array of available languages\");\n\n// Other fields translation schema\nexport const OtherFieldsTranslationSchema = z\n .object({\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\nexport type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;\nexport type EndFields = z.infer<typeof EndScreenFieldsSchema>;\nexport type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;\nexport type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;\nexport type OtherFields = z.infer<typeof OtherFieldsSchema>;\nexport type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;\nexport type LanguageField = z.infer<typeof LanguageFieldSchema>;\nexport type Languages = z.infer<typeof LanguagesSchema>;\n", "import { z } from \"zod\";\n\n// Position enum for widget positioning\nexport const positionSchema = z\n .enum([\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"middle-left\",\n \"middle-center\",\n \"middle-right\",\n \"bottom-left\",\n \"bottom-center\",\n \"bottom-right\"\n ])\n .describe(\"Available positions for widget placement\");\n\n// Constants for positions (explicit literal values for proper type inference)\nexport const Positions = {\n TOP_LEFT: \"top-left\" as const,\n TOP_CENTER: \"top-center\" as const,\n TOP_RIGHT: \"top-right\" as const,\n MIDDLE_LEFT: \"middle-left\" as const,\n MIDDLE_CENTER: \"middle-center\" as const,\n MIDDLE_RIGHT: \"middle-right\" as const,\n BOTTOM_LEFT: \"bottom-left\" as const,\n BOTTOM_CENTER: \"bottom-center\" as const,\n BOTTOM_RIGHT: \"bottom-right\" as const,\n} as const;\n\n// Theme mode enum for light and dark themes\nexport const themeModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Available theme modes for the widget\");\n\n// Constants for theme modes (explicit literal values for proper type inference)\nexport const ThemeModes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n} as const;\n\n// Schema for feature settings controlling UI behavior\nexport const featureSettingsSchema = z\n .object({\n darkOverlay: z\n .boolean()\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\")\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme colors\nexport const themeColorsSchema = z\n .object({\n brandColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #3366CC)\")\n .describe(\"Primary brand color in hex format\"),\n overlayColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #FFFFFF)\")\n .describe(\"Overlay background color in hex format\"),\n textColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #333333)\")\n .describe(\"Primary text color in hex format\"),\n backgroundColor: z\n .union([\n z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i),\n z.string().regex(/^rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*(?:,\\s*[01](?:\\.\\d+)?)?\\s*\\)$/i)\n ])\n .describe(\"Background color in hex format or rgba format (e.g., #1A1A1A or rgba(255,255,255, 1))\")\n })\n .describe(\"Color scheme for a single theme\");\n\n// Schema for the complete themes object\nexport const themesSchema = z\n .object({\n light: themeColorsSchema,\n dark: themeColorsSchema\n })\n .describe(\"Complete theme configuration with light and dark variants\");\n\n// Schema for the complete theme configuration\nexport const themeConfigurationSchema = z\n .object({\n themes: themesSchema\n .describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema\n .describe(\"UI feature settings controlling widget behavior\"),\n selectedPosition: positionSchema\n .describe(\"Selected position for the main widget\"),\n selectedIconPosition: positionSchema\n .describe(\"Selected position for the widget icon\")\n })\n .describe(\"Complete theme and UI configuration including colors, features, and positioning\");\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type FeatureSettings = z.infer<typeof featureSettingsSchema>;\nexport type ThemeColors = z.infer<typeof themeColorsSchema>;\nexport type Themes = z.infer<typeof themesSchema>;\nexport type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;\n", "import { z } from \"zod\";\n\n// Custom event field operator schema\nexport const customEventFieldOperatorSchema = z\n .object({\n name: z\n .string()\n .describe(\"The operator name (e.g., '=', '!=', 'contains', 'beginsWith', 'matches')\"),\n label: z\n .string()\n .describe(\"Human-readable label for the operator (e.g., 'equals', 'not equals', 'contains')\"),\n })\n .describe(\"Schema defining an operator for custom event fields\");\n\n// Custom event field schema\nexport const customEventFieldSchema = z\n .object({\n name: z\n .string()\n .describe(\"The field name (e.g., 'event_name', 'add_to_cart', 'cart_item_number')\"),\n label: z\n .string()\n .describe(\"Human-readable label for the field\"),\n placeholder: z\n .string()\n .describe(\"Placeholder text for input fields\"),\n operators: z\n .array(customEventFieldOperatorSchema)\n .min(1)\n .describe(\"Array of available operators for this field\"),\n })\n .describe(\"Schema defining a custom event field with its operators\");\n\n// Metadata schema for conditional if\nexport const conditionalIfMetadataSchema = z\n .object({\n customEventFields: z\n .array(customEventFieldSchema)\n .optional()\n .describe(\"Array of custom event fields with their operators and labels\"),\n })\n .describe(\"Schema defining metadata for conditional if clauses\");\n\n// Query output schema with defined structure but all fields as strings\nexport const queryOutputSchema = z\n .object({\n query: z\n .string()\n .describe(\"The structured query definition as a JSON string\"),\n naturalLanguage: z\n .string()\n .describe(\"Human-readable description of the query conditions\"),\n jsonLogic: z\n .string()\n .describe(\"JSON Logic representation of the query as a JSON string\"),\n sqlQuery: z\n .string()\n .describe(\"SQL representation of the query for database operations\"),\n })\n .describe(\"Schema defining query output structure with all fields as strings\");\n\n// Conditional if clause schema\nexport const conditionalIfSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this condition\"),\n event: z\n .string()\n .describe(\"The event that triggers evaluation of this condition (e.g., 'pageLoad', 'pageView', 'scroll', 'custom')\"),\n queryOutput: queryOutputSchema.describe(\"The query conditions to evaluate when the event occurs\"),\n metadata: conditionalIfMetadataSchema\n .optional()\n .describe(\"Optional metadata containing custom event fields and their configurations\"),\n })\n .describe(\"Schema defining the 'if' condition for auto-trigger logic\");\n\n// Trigger action schema for the 'then' clause\nexport const triggerActionSchema = z\n .object({\n triggerType: z\n .string()\n .describe(\"The type of action to perform (e.g., 'delay', 'scroll', 'immediately')\"),\n delay: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Delay in seconds before performing the action\"),\n scroll: z\n .union([z.string(), z.number()])\n .optional()\n .describe(\"Scroll position (percentage as string like '75%' or pixel value as number)\"),\n })\n .describe(\"Schema defining the action to perform when conditions are met\");\n\n// Conditional when clause schema (if-then structure)\nexport const conditionalWhenSchema = z\n .object({\n if: conditionalIfSchema.describe(\"The condition that must be met\"),\n then: triggerActionSchema.describe(\"The action to perform when the condition is met\"),\n })\n .describe(\"Schema defining a conditional when clause with if-then logic\");\n\n// Filter condition schema for category-specific filters\nexport const filterConditionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this filter condition\"),\n category: z\n .string()\n .describe(\"The category this filter belongs to (e.g., 'device', 'user', 'geo_location')\"),\n property: z\n .string()\n .describe(\"The property to filter on (e.g., 'device_type', 'age', 'country')\"),\n operator: z\n .string()\n .describe(\"The comparison operator (e.g., 'equals', 'greaterThan', 'lessThan')\"),\n values: z\n .array(z.string())\n .min(1)\n .describe(\"Array of values to compare against\"),\n tbl_key: z\n .string()\n .describe(\"The database table key for this property\"),\n })\n .describe(\"Schema defining a single filter condition within a category\");\n\n// Category-specific filters schema\nexport const categorySpecificFiltersSchema = z\n .object({\n device: z\n .array(filterConditionSchema)\n .optional()\n .describe(\"Array of device-specific filter conditions\"),\n user: z\n .array(filterConditionSchema)\n .optional()\n .describe(\"Array of user-specific filter conditions\"),\n geo_location: z\n .array(filterConditionSchema)\n .optional()\n .describe(\"Array of geo-location specific filter conditions\"),\n })\n .describe(\"Schema defining category-specific filters for audience targeting\");\n\n// Who schema for audience targeting\nexport const whoSchema = z\n .object({\n applications: z\n .array(z.string())\n .min(1)\n .describe(\"Array of application names this targeting applies to\"),\n userType: z\n .string()\n .describe(\"The type of user this targeting applies to (e.g., 'both', 'new', 'returning')\"),\n categorySpecificFilters: categorySpecificFiltersSchema\n .optional()\n .describe(\"Optional category-specific filters for more granular targeting\"),\n })\n .describe(\"Schema defining who the audience targeting applies to\");\n\n// Enhanced audience segment schema with conditional when logic\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 .array(conditionalWhenSchema)\n .min(1)\n .describe(\"Array of conditional when clauses with if-then logic\"),\n who: whoSchema\n .describe(\"User criteria and conditions defining who belongs to this segment\"),\n })\n .describe(\"Schema defining an audience segment for targeting with conditional logic\");\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 CustomEventFieldOperator = z.infer<typeof customEventFieldOperatorSchema>;\nexport type CustomEventField = z.infer<typeof customEventFieldSchema>;\nexport type ConditionalIfMetadata = z.infer<typeof conditionalIfMetadataSchema>;\nexport type QueryOutput = z.infer<typeof queryOutputSchema>;\nexport type ConditionalIf = z.infer<typeof conditionalIfSchema>;\nexport type TriggerAction = z.infer<typeof triggerActionSchema>;\nexport type ConditionalWhen = z.infer<typeof conditionalWhenSchema>;\nexport type FilterCondition = z.infer<typeof filterConditionSchema>;\nexport type CategorySpecificFilters = z.infer<typeof categorySpecificFiltersSchema>;\nexport type Who = z.infer<typeof whoSchema>;\nexport type AudienceSegment = z.infer<typeof audienceSegmentSchema>;\nexport type AudienceTriggerProperties = z.infer<typeof audienceTriggerPropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Master properties schema\nexport const masterPropertiesSchema = z\n .object({\n mandatory_fetch_config_at_paths: z\n .array(z.string())\n .describe(\"Array of paths where configuration must be fetched from server when navigated by user\"),\n config_sync_interval_seconds: z\n .number()\n .int()\n .positive()\n .describe(\"Interval in seconds for configuration synchronization between client and server\"),\n disable_all_survey: z\n .boolean()\n .describe(\"Flag to disable all surveys globally\"),\n feedback_interval_duration: z\n .number()\n .int()\n .positive()\n .describe(\"Duration in seconds for feedback interval between two auto triggered feedbacks\"),\n })\n .describe(\"Master properties configuration for global survey settings\");\n\n// Type inference from schema\nexport type MasterProperties = z.infer<typeof masterPropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Theme mode enum for device themes\nexport const deviceThemeSchema = z\n .enum([\"light\", \"dark\", \"system\"])\n .describe(\"Enumeration of supported theme modes\");\n\n// Constants for device themes (explicit literal values for proper type inference)\nexport const DeviceThemes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n SYSTEM: \"system\" as const,\n} as const;\n\n// Device info schema\nexport const deviceInfoSchema = z\n .object({\n deviceType: z.string().describe(\"Type of device being used\"),\n timezone: z.string().describe(\"Device timezone (e.g., 'Asia/Calcutta')\"),\n theme: deviceThemeSchema.describe(\"Current theme mode preference\"),\n os: z.string().describe(\"Operating system running on the device\"),\n osVersion: z.string().describe(\"Version of the operating system\"),\n appVersion: z.string().describe(\"Version of the application\"),\n app: z.string().describe(\"Browser or application being used\"),\n language: z.string().describe(\"Language preference (e.g., 'en-GB')\"),\n })\n .describe(\"Device information collected from the client\");\n\n// Session info schema\nexport const sessionInfoSchema = z\n .object({\n sessionId: z.string().uuid().describe(\"Unique session identifier\"),\n })\n .describe(\"Session information for tracking user sessions\");\n\n// Combined device and session info schema\nexport const deviceSessionInfoSchema = z\n .object({\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n })\n .describe(\"Combined device and session information\");\n\n// User properties schema for counter and other dynamic properties\nexport const userPropertiesSchema = z\n .object({\n $counter: z\n .record(z.string(), z.number().int())\n .describe(\"Counter properties for user tracking (can be positive or negative)\")\n .optional(),\n $set: z\n .record(z.string(), z.any())\n .describe(\"Properties to set for the user\")\n .optional(),\n $setOnce: z\n .record(z.string(), z.any())\n .describe(\"Properties to set once for the user (won't overwrite existing values)\")\n .optional(),\n $unset: z\n .array(z.string())\n .describe(\"Array of property names to unset/remove from the user\")\n .optional(),\n })\n .passthrough() // Allow additional user properties\n .describe(\"User properties including counters, set operations, and other dynamic data\");\n\n// User info schema\nexport const userInfoSchema = z\n .object({\n userName: z\n .string()\n .email()\n .describe(\"User's email address as username\"),\n properties: userPropertiesSchema.describe(\"User properties and counters\"),\n })\n .describe(\"User information including identification and properties\");\n\n// Type exports\nexport type DeviceTheme = z.infer<typeof deviceThemeSchema>;\nexport type DeviceInfo = z.infer<typeof deviceInfoSchema>;\nexport type SessionInfo = z.infer<typeof sessionInfoSchema>;\nexport type DeviceSessionInfo = z.infer<typeof deviceSessionInfoSchema>;\nexport type UserProperties = z.infer<typeof userPropertiesSchema>;\nexport type UserInfo = z.infer<typeof userInfoSchema>;\n", "import { z } from \"zod\";\nimport { deviceInfoSchema, sessionInfoSchema, userInfoSchema } from \"./other-schema\";\nimport { AnswerSchema } from \"../fields/answer-schema\";\n\n// User action enum for feedback submission\nexport const userActionSchema = z\n .enum([\"V\", \"S\"])\n .describe(\"User action: V for view, S for submit\");\n\n// Constants for user actions\nexport const UserActions = {\n VIEW: \"V\" as const,\n SUBMIT: \"S\" as const,\n} as const;\n\n// Form configuration schema\nexport const formConfigSchema = z\n .object({\n feedbackIdentifier: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback instance\"),\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n completionTimeInSeconds: z\n .number()\n .int()\n .min(0)\n .describe(\"Time taken to complete the feedback in seconds\"),\n userAction: userActionSchema.describe(\"Action performed by the user\"),\n responseLanguageCode: z\n .string()\n .length(2)\n .describe(\"Language code for the response (e.g., 'en', 'es')\"),\n })\n .describe(\"Configuration information for the feedback form\");\n\n// Question response schema\nexport const questionResponseSchema = z\n .object({\n questionId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the question\"),\n answer: AnswerSchema.describe(\"The answer provided for this question\"),\n type: z\n .string()\n .describe(\"Type of the question (e.g., 'rating', 'single_choice')\"),\n })\n .describe(\"Response to a specific question in the feedback form\");\n\n// Response schema (only present when user_action is 'S')\nexport const responseSchema = z\n .object({\n questions: z\n .array(questionResponseSchema)\n .min(1)\n .describe(\"Array of question responses\"),\n })\n .describe(\"User responses to feedback questions\");\n\n// Matched trigger properties schema (flexible object since definition is unknown)\nexport const matchedTriggerPropertiesSchema = z\n .object({\n customEventName: z\n .string()\n .nullable()\n .describe(\"Custom event name that triggered the feedback\"),\n currentPath: z\n .string()\n .describe(\"Current page path where feedback was triggered\"),\n eventType: z\n .string()\n .describe(\"Type of event that triggered the feedback\"),\n })\n .passthrough()\n .describe(\"Properties of the trigger that matched for this feedback\");\n\n// Base submit feedback schema (without conditional response)\nexport const baseSubmitFeedbackSchema = z\n .object({\n formConfig: formConfigSchema.describe(\"Form configuration information\"),\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n matchedTriggerProperties: matchedTriggerPropertiesSchema.describe(\n \"Properties of the matched trigger\"\n ),\n })\n .describe(\"Base submit feedback request schema\");\n\n// View feedback schema (userAction: \"V\", no response required)\nexport const viewFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n userAction: z.literal(\"V\").describe(\"Action performed by the user (view)\"),\n }),\n })\n .strict()\n .describe(\"View feedback request schema (no response required)\");\n\n// Submit feedback schema (userAction: \"S\", response required)\nexport const submitFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n userAction: z.literal(\"S\").describe(\"Action performed by the user (submit)\"),\n }),\n response: responseSchema.describe(\"User responses (required for submit)\"),\n })\n .strict()\n .describe(\"Submit feedback request schema (response required)\");\n\n// Union schema for both cases (using regular union instead of discriminated union)\nexport const feedbackRequestSchema = z.union([\n viewFeedbackSchema,\n submitFeedbackSchema,\n]).describe(\"Union schema for both view and submit feedback requests\");\n\n// Type exports\nexport type UserAction = z.infer<typeof userActionSchema>;\nexport type FormConfig = z.infer<typeof formConfigSchema>;\nexport type QuestionResponse = z.infer<typeof questionResponseSchema>;\nexport type Response = z.infer<typeof responseSchema>;\nexport type MatchedTriggerProperties = z.infer<typeof matchedTriggerPropertiesSchema>;\nexport type BaseSubmitFeedback = z.infer<typeof baseSubmitFeedbackSchema>;\nexport type ViewFeedback = z.infer<typeof viewFeedbackSchema>;\nexport type SubmitFeedback = z.infer<typeof submitFeedbackSchema>;\nexport type FeedbackRequest = z.infer<typeof feedbackRequestSchema>;\n", "import { z } from \"zod\";\nimport { deviceInfoSchema, sessionInfoSchema, userInfoSchema } from \"./other-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"../fields/field-schema\";\nimport { LanguagesSchema } from \"../fields/other-screen-schema\";\nimport { otherConfigurationPropertiesSchema, welcomeScreenPropertiesSchema, endScreenPropertiesSchema } from \"../fields/form-properties-schema\";\nimport { masterPropertiesSchema } from \"../fields/other-properties-schema\";\nimport { audienceTriggerPropertiesSchema } from \"../fields/auto-trigger-schema\";\nimport { themeConfigurationSchema } from \"../fields/theme-schema\";\n// import { durationSchema } from \"../fields/form-schema\";\n\n// Individual feedback configuration item schema\nexport const feedbackConfigurationItemSchema = z\n .object({\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedbackTitle: z\n .string()\n .describe(\"Title of the feedback configuration\"),\n // duration: durationSchema\n // .describe(\"Active duration for this feedback configuration\"),\n triggerProperties: audienceTriggerPropertiesSchema\n .describe(\"Trigger properties including auto/manual settings and audience segments\"),\n appearanceProperties: z\n .object({\n themes: z\n .object({\n light: z\n .object({\n brandColor: z.string().describe(\"Brand color for light theme\"),\n overlayColor: z.string().describe(\"Overlay color for light theme\"),\n textColor: z.string().describe(\"Text color for light theme\"),\n backgroundColor: z.string().describe(\"Background color for light theme\"),\n })\n .describe(\"Light theme colors\"),\n dark: z\n .object({\n brandColor: z.string().describe(\"Brand color for dark theme\"),\n overlayColor: z.string().describe(\"Overlay color for dark theme\"),\n textColor: z.string().describe(\"Text color for dark theme\"),\n backgroundColor: z.string().describe(\"Background color for dark theme\"),\n })\n .describe(\"Dark theme colors\"),\n })\n .nullable()\n .optional()\n .describe(\"Theme configuration (optional)\"),\n featureSettings: z\n .object({\n darkOverlay: z.boolean().describe(\"Whether to show dark overlay\"),\n closeButton: z.boolean().describe(\"Whether to show close button\"),\n progressBar: z.boolean().describe(\"Whether to show progress bar\"),\n showBranding: z.boolean().describe(\"Whether to show branding\"),\n customPosition: z.boolean().describe(\"Whether custom position is enabled\"),\n customIconPosition: z.boolean().describe(\"Whether custom icon position is enabled\"),\n customCss: z\n .string()\n .nullable()\n .optional()\n .describe(\"Custom CSS link (optional)\"),\n })\n .describe(\"Feature settings for the feedback form\"),\n selectedIconPosition: z\n .string()\n .describe(\"Selected position for the feedback icon\"),\n selectedPosition: z\n .string()\n .describe(\"Selected position for the feedback form\"),\n })\n .describe(\"Appearance properties for the feedback form\"),\n })\n .describe(\"Individual feedback configuration item in the list\");\n\n// Form configuration schema for fetch operations\nexport const fetchFormConfigSchema = z\n .object({\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n responseLanguageCode: z\n .string()\n .length(2)\n .describe(\"Language code for the response (e.g., 'en', 'es')\"),\n })\n .describe(\"Form configuration for fetching feedback details\");\n\n// Fetch configuration list request schema\nexport const fetchConfigurationListSchema = z\n .object({\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n })\n .strict()\n .describe(\"Request schema for fetching available feedback configurations\");\n\n// Fetch feedback details request schema\nexport const fetchFeedbackDetailsSchema = z\n .object({\n formConfig: fetchFormConfigSchema.describe(\"Form configuration for the specific feedback\"),\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n })\n .strict()\n .describe(\"Request schema for fetching specific feedback form details\");\n\n// Form configuration response schema (simple title/description)\nexport const formConfigurationResponseSchema = z\n .object({\n formTitle: z\n .string()\n .describe(\"Title of the feedback form\"),\n formDescription: z\n .string()\n .describe(\"Description of the feedback form\"),\n })\n .describe(\"Form configuration response with title and description\");\n\n// Questionnaire fields response schema (matches actual API response structure)\nexport const questionnaireFieldsResponseSchema = z\n .object({\n questions: z\n .record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z\n .array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n translations: z\n .record(z.string(), z.any())\n .describe(\"Translations object (can be empty or contain language-specific translations)\"),\n selectedLanguages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n })\n .describe(\"Questionnaire fields response including questions, sections, translations, and selected languages\");\n\n// Fetch feedback details response schema using existing schemas\nexport const fetchFeedbackDetailsResponseSchema = z\n .object({\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedbackIdentifier: z\n .string()\n .uuid()\n .describe(\"Unique identifier for this specific feedback instance\"),\n formConfiguration: formConfigurationResponseSchema\n .describe(\"Form configuration with title and description\"),\n questionnaireFields: questionnaireFieldsResponseSchema\n .describe(\"Questionnaire structure including questions, sections, translations, and languages\"),\n otherConfigurationProperties: otherConfigurationPropertiesSchema\n .describe(\"Other configuration properties using existing schema\"),\n welcomeScreenProperties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen properties using existing schema\"),\n endScreenProperties: endScreenPropertiesSchema\n .describe(\"End screen properties using existing schema\"),\n })\n .strict()\n .describe(\"Complete response schema for fetchFeedbackDetails API using existing field schemas\");\n\n// Fetch configuration list response schema\nexport const fetchConfigurationListResponseSchema = z\n .object({\n masterProperties: masterPropertiesSchema\n .describe(\"Master properties for global survey settings\"),\n feedbackConfiguration: z\n .array(feedbackConfigurationItemSchema)\n .describe(\"Array of available feedback configurations\"),\n })\n .strict()\n .describe(\"Response schema for fetchConfigurationList API\");\n\n// Type exports\nexport type FeedbackConfigurationItem = z.infer<typeof feedbackConfigurationItemSchema>;\nexport type FetchFormConfig = z.infer<typeof fetchFormConfigSchema>;\nexport type FetchConfigurationListRequest = z.infer<typeof fetchConfigurationListSchema>;\nexport type FetchFeedbackDetailsRequest = z.infer<typeof fetchFeedbackDetailsSchema>;\nexport type FormConfigurationResponse = z.infer<typeof formConfigurationResponseSchema>;\nexport type QuestionnaireFieldsResponse = z.infer<typeof questionnaireFieldsResponseSchema>;\nexport type FetchFeedbackDetailsResponse = z.infer<typeof fetchFeedbackDetailsResponseSchema>;\nexport type FetchConfigurationListResponse = z.infer<typeof fetchConfigurationListResponseSchema>;\n", "// Main entry point for encatch-typescript schemas\n\n// Field schema exports\nexport {\n questionTypeSchema,\n validationRuleTypeSchema,\n validationRuleSchema,\n visibilityConditionSchema,\n sectionSchema,\n questionStatusSchema,\n ratingDisplayStyleSchema,\n ratingRepresentationSizeSchema,\n multipleChoiceDisplayStyleSchema,\n multipleChoiceMultipleDisplayStyleSchema,\n choiceOrderOptionSchema,\n questionSchema,\n ratingQuestionSchema,\n annotationQuestionSchema,\n questionOptionSchema,\n nestedOptionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n combinedQuestionSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n ChoiceOrderOptions,\n // Types\n type QuestionType,\n type ValidationRule,\n type VisibilityCondition,\n type QuestionStatus,\n type Question,\n type RatingDisplayStyle,\n type RatingRepresentationSize,\n type RatingQuestion,\n type AnnotationQuestion,\n type QuestionOption,\n type NestedOption,\n type MultipleChoiceDisplayStyle,\n type MultipleChoiceSingleQuestion,\n type MultipleChoiceMultipleDisplayStyle,\n type MultipleChoiceMultipleQuestion,\n type NpsQuestion,\n type ShortAnswerQuestion,\n type LongAnswerQuestion,\n type ChoiceOrderOption,\n type NestedDropdownQuestion,\n type Section,\n type CombinedQuestion,\n} from \"./schemas/fields/field-schema\";\n\n// Answer schema exports\nexport {\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n AnswerSchema,\n type SimpleAnswer,\n type ChoiceAnswer,\n type MultipleChoiceAnswer,\n type ScaleAnswer,\n type ContinuousSumAnswer,\n type RankingAnswer,\n type TextAnswer,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n surveyTypeSchema,\n yesNoSchema,\n recurringUnitSchema,\n frequencyAndSchedulingPropertiesSchema,\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n SurveyTypes,\n YesNoValues,\n RecurringUnits,\n PublicationStatuses,\n // Schemas\n// durationSchema,\n // Types\n type SurveyType,\n type YesNo,\n type RecurringUnit,\n type PublicationStatus,\n// type Duration,\n type FeedbackConfiguration,\n type FrequencyAndSchedulingProperties,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n welcomeScreenPropertiesSchema,\n endScreenPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type WelcomeScreenProperties,\n type EndScreenProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n dismissBehaviorSchema,\n WelcomeScreenFieldsSchema,\n EndScreenFieldsSchema,\n WelcomeFieldsTranslationSchema,\n EndFieldsTranslationSchema,\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Enum constants\n DismissBehaviors,\n // Types\n type WelcomeFields,\n type EndFields,\n type WelcomeFieldsTranslation,\n type EndFieldsTranslation,\n type OtherFields,\n type OtherFieldsTranslation,\n type LanguageField,\n type Languages,\n} from \"./schemas/fields/other-screen-schema\";\n\n// Theme schema exports\nexport {\n positionSchema,\n themeModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ThemeConfiguration,\n} from \"./schemas/fields/theme-schema\";\n\n// Translations schema exports\nexport {\n translationEntrySchema,\n ratingQuestionTranslationSchema,\n singleChoiceQuestionTranslationSchema,\n multipleChoiceQuestionTranslationSchema,\n npsQuestionTranslationSchema,\n shortAnswerQuestionTranslationSchema,\n longAnswerQuestionTranslationSchema,\n nestedSelectionQuestionTranslationSchema,\n annotationQuestionTranslationSchema,\n questionTranslationSchema,\n questionCentricTranslationsSchema,\n translationsSchema,\n TranslationProvider,\n createTranslationProvider,\n type TranslationEntry,\n type RatingQuestionTranslation,\n type SingleChoiceQuestionTranslation,\n type MultipleChoiceQuestionTranslation,\n type NpsQuestionTranslation,\n type ShortAnswerQuestionTranslation,\n type LongAnswerQuestionTranslation,\n type NestedSelectionQuestionTranslation,\n type AnnotationQuestionTranslation,\n type QuestionTranslation,\n type QuestionCentricTranslations,\n type Translations,\n} from \"./schemas/fields/translations-schema\";\n\n// Auto trigger schema exports\nexport {\n customEventFieldOperatorSchema,\n customEventFieldSchema,\n conditionalIfMetadataSchema,\n queryOutputSchema,\n conditionalIfSchema,\n triggerActionSchema,\n conditionalWhenSchema,\n filterConditionSchema,\n categorySpecificFiltersSchema,\n whoSchema,\n audienceSegmentSchema,\n audienceTriggerPropertiesSchema,\n type CustomEventFieldOperator,\n type CustomEventField,\n type ConditionalIfMetadata,\n type QueryOutput,\n type ConditionalIf,\n type TriggerAction,\n type ConditionalWhen,\n type FilterCondition,\n type CategorySpecificFilters,\n type Who,\n type AudienceSegment,\n type AudienceTriggerProperties,\n} from \"./schemas/fields/auto-trigger-schema\";\n\n// Master properties schema exports\nexport {\n masterPropertiesSchema,\n type MasterProperties,\n} from \"./schemas/fields/other-properties-schema\";\n\n// Device and session info schema exports\nexport {\n deviceThemeSchema,\n deviceInfoSchema,\n sessionInfoSchema,\n deviceSessionInfoSchema,\n userPropertiesSchema,\n userInfoSchema,\n // Enum constants\n DeviceThemes,\n // Types\n type DeviceTheme,\n type DeviceInfo,\n type SessionInfo,\n type DeviceSessionInfo,\n type UserProperties,\n type UserInfo,\n} from \"./schemas/api/other-schema\";\n\n// Submit feedback schema exports\nexport {\n userActionSchema,\n formConfigSchema,\n questionResponseSchema,\n responseSchema,\n matchedTriggerPropertiesSchema,\n baseSubmitFeedbackSchema,\n viewFeedbackSchema,\n submitFeedbackSchema,\n feedbackRequestSchema,\n // Enum constants\n UserActions,\n // Types\n type UserAction,\n type FormConfig,\n type QuestionResponse,\n type Response,\n type MatchedTriggerProperties,\n type BaseSubmitFeedback,\n type ViewFeedback,\n type SubmitFeedback,\n type FeedbackRequest,\n} from \"./schemas/api/submit-feedback-schema\";\n\n// Fetch feedback schema exports\nexport {\n feedbackConfigurationItemSchema,\n fetchFormConfigSchema,\n fetchConfigurationListSchema,\n fetchFeedbackDetailsSchema,\n formConfigurationResponseSchema,\n questionnaireFieldsResponseSchema,\n fetchFeedbackDetailsResponseSchema,\n fetchConfigurationListResponseSchema,\n // Types\n type FeedbackConfigurationItem,\n type FetchFormConfig,\n type FetchConfigurationListRequest,\n type FetchFeedbackDetailsRequest,\n type FormConfigurationResponse,\n type QuestionnaireFieldsResponse,\n type FetchFeedbackDetailsResponse,\n type FetchConfigurationListResponse,\n} from \"./schemas/api/fetch-feedback-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
5
- "mappings": ";;;;AAAA,SAAS,SAAS;AAGX,IAAM,qBAAqB,EAC/B,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS,6DAA6D;AAGlE,IAAM,gBAAgB;AAAA,EAC3B,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,KAAK;AAAA,EACL,kBAAkB;AAAA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,CAAC,EACA,OAAO,EACP,SAAS,4DAA4D;AAGjE,IAAM,kCAAkCA,IAC5C,OAAO;AAAA,EACN,WAAWA,IACR,OAAO,EACP,SAAS,4BAA4B;AAAA,EACxC,iBAAiBA,IACd,OAAO,EACP,SAAS,kCAAkC;AAChD,CAAC,EACA,SAAS,wDAAwD;AAG7D,IAAM,oCAAoCA,IAC9C,OAAO;AAAA,EACN,WAAWA,IACR,OAAOA,IAAE,OAAO,GAAG,sBAAsB,EACzC,SAAS,2DAA2D;AAAA,EACvE,UAAUA,IACP,MAAM,aAAa,EACnB,SAAS,+DAA+D;AAAA,EAC3E,cAAcA,IACX,OAAOA,IAAE,OAAO,GAAGA,IAAE,IAAI,CAAC,EAC1B,SAAS,8EAA8E;AAAA,EAC1F,mBAAmB,gBAChB,SAAS,oDAAoD;AAClE,CAAC,EACA,SAAS,mGAAmG;AAGxG,IAAM,qCAAqCA,IAC/C,OAAO;AAAA,EACN,yBAAyBA,IACtB,OAAO,EACP,KAAK,EACL,SAAS,kDAAkD;AAAA,EAC9D,oBAAoBA,IACjB,OAAO,EACP,KAAK,EACL,SAAS,uDAAuD;AAAA,EACnE,mBAAmB,gCAChB,SAAS,+CAA+C;AAAA,EAC3D,qBAAqB,kCAClB,SAAS,oFAAoF;AAAA,EAChG,8BAA8B,mCAC3B,SAAS,sDAAsD;AAAA,EAClE,yBAAyB,8BACtB,SAAS,iDAAiD;AAAA,EAC7D,qBAAqB,0BAClB,SAAS,6CAA6C;AAC3D,CAAC,EACA,OAAO,EACP,SAAS,oFAAoF;AAGzF,IAAM,uCAAuCA,IACjD,OAAO;AAAA,EACN,kBAAkB,uBACf,SAAS,8CAA8C;AAAA,EAC1D,uBAAuBA,IACpB,MAAM,+BAA+B,EACrC,SAAS,4CAA4C;AAC1D,CAAC,EACA,OAAO,EACP,SAAS,gDAAgD;;;AC4H5D,SAAS,KAAAC,WAAS;",
4
+ "sourcesContent": ["import { z } from \"zod\";\n\n// Question type enum for different form field types\nexport const questionTypeSchema = z\n .enum([\n \"rating\",\n \"single_choice\",\n \"nps\",\n \"nested_selection\",\n \"multiple_choice_multiple\",\n \"short_answer\",\n \"long_text\",\n \"annotation\",\n ])\n .describe(\"Enumeration of all supported question types for form fields\");\n\n// Constants for question types (explicit literal values for proper type inference)\nexport const QuestionTypes = {\n RATING: \"rating\" as const,\n SINGLE_CHOICE: \"single_choice\" as const,\n NPS: \"nps\" as const,\n NESTED_SELECTION: \"nested_selection\" as const,\n MULTIPLE_CHOICE_MULTIPLE: \"multiple_choice_multiple\" as const,\n SHORT_ANSWER: \"short_answer\" as const,\n LONG_TEXT: \"long_text\" as const,\n ANNOTATION: \"annotation\" as const,\n} as const;\n\n// Validation rule type enum\nexport const validationRuleTypeSchema = z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .describe(\"Enumeration of all supported validation rule types\");\n\n// Constants for validation rule types (explicit literal values for proper type inference)\nexport const ValidationRuleTypes = {\n REQUIRED: \"required\" as const,\n MIN: \"min\" as const,\n MAX: \"max\" as const,\n MIN_LENGTH: \"minLength\" as const,\n MAX_LENGTH: \"maxLength\" as const,\n PATTERN: \"pattern\" as const,\n EMAIL: \"email\" as const,\n URL: \"url\" as const,\n CUSTOM: \"custom\" as const,\n} as const;\n\n// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: validationRuleTypeSchema.describe(\"Type of validation rule to apply\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value for the validation rule (string, number, or boolean)\"),\n message: z\n .string()\n .optional()\n .describe(\"Custom error message when validation fails\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this validation rule\"),\n })\n .describe(\"Schema defining validation rules for question responses\");\n\n// Visibility condition operator enum\nexport const visibilityConditionOperatorSchema = z\n .enum([\n \"equals\",\n \"not_equals\",\n \"contains\",\n \"not_contains\",\n \"greater_than\",\n \"less_than\",\n \"is_empty\",\n \"is_not_empty\",\n ])\n .describe(\"Enumeration of all supported visibility condition operators\");\n\n// Constants for visibility condition operators (explicit literal values for proper type inference)\nexport const VisibilityConditionOperators = {\n EQUALS: \"equals\" as const,\n NOT_EQUALS: \"not_equals\" as const,\n CONTAINS: \"contains\" as const,\n NOT_CONTAINS: \"not_contains\" as const,\n GREATER_THAN: \"greater_than\" as const,\n LESS_THAN: \"less_than\" as const,\n IS_EMPTY: \"is_empty\" as const,\n IS_NOT_EMPTY: \"is_not_empty\" as const,\n} as const;\n\n// Visibility condition schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: visibilityConditionOperatorSchema.describe(\"Comparison operator for the condition\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value to compare against (string, number, or boolean)\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this visibility condition\"),\n })\n .describe(\n \"Schema defining conditions that control when questions are visible\"\n );\n\n// Section schema for organizing questions\nexport const sectionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the section\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display title for the section\"),\n question_ids: z\n .array(z.string())\n .min(1)\n .describe(\"Array of question IDs that belong to this section\"),\n })\n .describe(\"Schema defining sections that organize questions into logical groups\");\n\n// Question status enum\nexport const questionStatusSchema = z.enum([\"D\", \"P\", \"A\", \"S\"]); // Draft, Published, Archived, Suspended\n\n// Constants for question status (explicit literal values for proper type inference)\nexport const QuestionStatuses = {\n DRAFT: \"D\" as const,\n PUBLISHED: \"P\" as const,\n ARCHIVED: \"A\" as const,\n SUSPENDED: \"S\" as const,\n} as const;\n\n// Display style enum for rating questions\nexport const ratingDisplayStyleSchema = z.enum([\n \"star\",\n \"heart\",\n \"thumbs-up\",\n \"diamond\",\n \"emoji\",\n \"emoji-exp\",\n]);\n\n// Constants for rating display styles (explicit literal values for proper type inference)\nexport const RatingDisplayStyles = {\n STAR: \"star\" as const,\n HEART: \"heart\" as const,\n THUMBS_UP: \"thumbs_up\" as const,\n DIAMOND: \"diamond\" as const,\n EMOJI: \"emoji\" as const,\n EMOJI_EXP: \"emoji_exp\" as const,\n} as const;\n\n// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\n\n// Constants for rating representation sizes (explicit literal values for proper type inference)\nexport const RatingRepresentationSizes = {\n SMALL: \"small\" as const,\n MEDIUM: \"medium\" as const,\n LARGE: \"large\" as const,\n} as const;\n\n// Display style enum for multiple choice questions\nexport const multipleChoiceDisplayStyleSchema = z.enum([\n \"radio\",\n \"list\",\n \"chip\",\n \"dropdown\",\n]);\n\n// Constants for multiple choice display styles (explicit literal values for proper type inference)\nexport const MultipleChoiceDisplayStyles = {\n RADIO: \"radio\" as const,\n LIST: \"list\" as const,\n CHIP: \"chip\" as const,\n DROPDOWN: \"dropdown\" as const,\n} as const;\n\n// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\n\n// Constants for multiple choice multiple display styles (explicit literal values for proper type inference)\nexport const MultipleChoiceMultipleDisplayStyles = {\n CHECKBOX: \"checkbox\" as const,\n LIST: \"list\" as const,\n CHIP: \"chip\" as const,\n} as const;\n\n// Choice order options for nested selection questions\nexport const choiceOrderOptionSchema = z.enum([\n \"randomize\",\n \"flip\",\n \"rotate\",\n \"ascending\",\n \"none\",\n]);\n\n// Constants for choice order options (explicit literal values for proper type inference)\nexport const ChoiceOrderOptions = {\n RANDOMIZE: \"randomize\" as const,\n FLIP: \"flip\" as const,\n ROTATE: \"rotate\" as const,\n ASCENDING: \"ascending\" as const,\n NONE: \"none\" as const,\n} as const;\n\n// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for the question\"),\n type: questionTypeSchema.describe(\n \"The type of question (rating, single_choice, etc.)\"\n ),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title/question text displayed to users\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text\"),\n describe: z\n .string()\n .max(2000)\n .optional()\n .describe(\n \"LLM tool call description for better AI understanding and context\"\n ),\n required: z\n .boolean()\n .default(false)\n .describe(\"Whether this question must be answered\"),\n errorMessage: z\n .string()\n .max(500)\n .optional()\n .describe(\"Custom error message when validation fails\"),\n validations: z\n .array(validationRuleSchema)\n .optional()\n .default([])\n .describe(\"Array of validation rules to apply\"),\n visibility: z\n .array(visibilityConditionSchema)\n .optional()\n .default([])\n .describe(\"Conditions that control when this question is shown\"),\n isFixed: z\n .boolean()\n .describe(\"Whether this question position is fixed or can be reordered\"),\n sectionId: z\n .string()\n .optional()\n .describe(\"ID of the section this question belongs to\"),\n status: questionStatusSchema.describe(\n \"Current status of the question (Draft, Published, etc.)\"\n ),\n })\n .describe(\"Base schema for all question types with common properties\");\n\n// Rating question schema (extends base question with specific rating properties)\nexport const ratingQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating\")\n .describe(\"Must be exactly 'rating'\"),\n showLabels: z\n .boolean()\n .optional()\n .describe(\"Whether to show min/max labels\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum rating value\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum rating value\"),\n displayStyle: ratingDisplayStyleSchema\n .optional()\n .describe(\"Visual style for rating display\"),\n numberOfRatings: z\n .number()\n .int()\n .min(1)\n .max(10)\n .describe(\"Number of rating options (1-10)\"),\n representationSize: ratingRepresentationSizeSchema\n .optional()\n .describe(\"Size of rating visual elements\"),\n color: z\n .string()\n .regex(/^#[0-9A-F]{6}$/i, \"Must be a valid hex color\")\n .optional()\n .describe(\"Hex color for rating elements\"),\n })\n .describe(\"Schema for rating questions with customizable display options\");\n\n// Annotation question schema (extends base question with annotation properties)\nexport const annotationQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"annotation\")\n .describe(\"Must be exactly 'annotation'\"),\n annotationText: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Text to display when annotation is provided\"),\n noAnnotationText: z\n .string()\n .max(500)\n .optional()\n .describe(\"Text to display when no annotation is provided\"),\n })\n .describe(\n \"Schema for annotation questions that provide additional context or instructions\"\n );\n\n// Question option schema for choice-based questions\nexport const questionOptionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown to users for this option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"LLM tool call description providing context about this option\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL to display with this option\"),\n })\n .describe(\"Schema for individual options in choice-based questions\");\n\n// Nested option schema for hierarchical choice structures (recursive)\nexport const nestedOptionSchema: z.ZodType<any> = z.lazy(() =>\n z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this nested option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this nested option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown for this nested option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this nested option context\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL for this nested option\"),\n hint: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"Optional hint text to help users understand this nested option\"\n ),\n children: z\n .array(nestedOptionSchema)\n .optional()\n .default([])\n .describe(\"Array of child options for hierarchical structure\"),\n })\n .describe(\"Schema for nested options with hierarchical structure support\")\n);\n\n// Multiple choice single question schema (extends base question with choice-specific properties)\nexport const multipleChoiceSingleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"single_choice\")\n .describe(\"Must be exactly 'single_choice'\"),\n displayStyle: multipleChoiceDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying options\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .describe(\"Schema for single-choice multiple selection questions\");\n\n// Multiple choice multiple question schema (extends base question with multiple choice properties)\nexport const multipleChoiceMultipleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"multiple_choice_multiple\")\n .describe(\"Must be exactly 'multiple_choice_multiple'\"),\n displayStyle: multipleChoiceMultipleDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying multiple options\"),\n minSelections: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of options that must be selected\"),\n maxSelections: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of options that can be selected\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .refine(\n (data) => {\n // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections\n if (\n data.minSelections !== undefined &&\n data.maxSelections !== undefined\n ) {\n return data.minSelections <= data.maxSelections;\n }\n return true;\n },\n {\n message: \"minSelections cannot be greater than maxSelections\",\n path: [\"minSelections\"], // Point to minSelections field for the error\n }\n )\n .describe(\n \"Schema for multiple-choice questions allowing multiple selections\"\n );\n\n// NPS question schema (extends base question with NPS-specific properties)\nexport const npsQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nps\")\n .describe(\"Must be exactly 'nps'\"),\n min: z.literal(0).describe(\"NPS always starts at 0\"),\n max: z.literal(10).describe(\"NPS always ends at 10\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum NPS value (0)\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum NPS value (10)\"),\n scaleLabels: z\n .record(z.string().regex(/^\\d+$/), z.string().max(50))\n .optional()\n .describe(\"Custom labels for specific NPS values (0-10)\"),\n prepopulatedValue: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Default value to pre-select (0-10)\"),\n })\n .refine(\n (data) => {\n // If scaleLabels is provided, validate that all keys are within the 0-10 range\n if (data.scaleLabels) {\n const keys = Object.keys(data.scaleLabels);\n return keys.every((key) => {\n const numKey = Number(key);\n return !isNaN(numKey) && numKey >= 0 && numKey <= 10;\n });\n }\n return true;\n },\n {\n message: \"scaleLabels keys must be between 0 and 10 (inclusive)\",\n path: [\"scaleLabels\"],\n }\n )\n .describe(\"Schema for Net Promoter Score questions with 0-10 scale\");\n\n// Short answer question schema (extends base question with text input properties)\nexport const shortAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"short_answer\")\n .describe(\"Must be exactly 'short_answer'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum number of characters allowed\"),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text shown in the input field\"),\n enableRegexValidation: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable regex pattern validation\"),\n regexPattern: z\n .string()\n .optional()\n .describe(\"Regular expression pattern for validation\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum tokens allowed for AI processing\"),\n minCharactersToEnhance: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Minimum characters needed to trigger AI enhancement\"),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableRegexValidation is true, regexPattern should be provided\n if (data.enableRegexValidation && !data.regexPattern) {\n return false;\n }\n return true;\n },\n {\n message: \"regexPattern is required when enableRegexValidation is true\",\n path: [\"regexPattern\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\"Schema for short answer questions with optional AI enhancement\");\n\n// Long answer question schema (extends base question with rich text input properties)\nexport const longAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"long_text\")\n .describe(\"Must be exactly 'long_text'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(50000)\n .optional()\n .describe(\n \"Maximum number of characters allowed (higher limit for long text)\"\n ),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n rows: z\n .number()\n .int()\n .min(1)\n .max(20)\n .optional()\n .describe(\"Number of textarea rows to display (1-20)\"),\n placeholder: z\n .string()\n .max(500)\n .optional()\n .describe(\"Placeholder text for the textarea (longer for long text)\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(25000)\n .optional()\n .describe(\n \"Maximum tokens allowed for AI processing (higher for long text)\"\n ),\n 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 enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\n \"Schema for long answer questions with rich text support and AI enhancement\"\n );\n\n// Nested dropdown question schema (extends base question with hierarchical selection properties)\nexport const nestedDropdownQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nested_selection\")\n .describe(\"Must be exactly 'nested_selection'\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the nested dropdown\"),\n options: z\n .array(nestedOptionSchema)\n .min(1)\n .max(100)\n .describe(\n \"Array of nested options for hierarchical selection (1-100 options)\"\n ),\n displayStyle: z\n .literal(\"list\")\n .describe(\"Fixed display style for nested dropdowns\"),\n choiceOrderOption: choiceOrderOptionSchema\n .optional()\n .default(\"none\")\n .describe(\"How to order the nested choices\"),\n preserveLastChoices: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Number of choice levels to preserve (0-10)\"),\n prepopulatedValue: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Default value to pre-populate\"),\n allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow custom \"other\" options'),\n otherColumnName: z\n .string()\n .max(100)\n .optional()\n .describe('Column name for storing custom \"other\" values'),\n maxDepth: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum nesting depth allowed (1-10)\"),\n cascadeLabels: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to cascade labels from parent options\"),\n })\n .refine(\n (data) => {\n // If allowOther is true, otherColumnName should be provided\n if (data.allowOther && !data.otherColumnName) {\n return false;\n }\n return true;\n },\n {\n message: \"otherColumnName is required when allowOther is true\",\n path: [\"otherColumnName\"],\n }\n )\n .describe(\n \"Schema for nested dropdown questions with hierarchical option structure\"\n );\n\n// Export inferred types\nexport type QuestionType = z.infer<typeof questionTypeSchema>;\nexport type ValidationRule = z.infer<typeof validationRuleSchema>;\nexport type VisibilityCondition = z.infer<typeof visibilityConditionSchema>;\nexport type QuestionStatus = z.infer<typeof questionStatusSchema>;\nexport type Question = z.infer<typeof questionSchema>;\nexport type RatingDisplayStyle = z.infer<typeof ratingDisplayStyleSchema>;\nexport type RatingRepresentationSize = z.infer<\n typeof ratingRepresentationSizeSchema\n>;\nexport type RatingQuestion = z.infer<typeof ratingQuestionSchema>;\nexport type AnnotationQuestion = z.infer<typeof annotationQuestionSchema>;\nexport type QuestionOption = z.infer<typeof questionOptionSchema>;\nexport type NestedOption = z.infer<typeof nestedOptionSchema>;\nexport type MultipleChoiceDisplayStyle = z.infer<\n typeof multipleChoiceDisplayStyleSchema\n>;\nexport type MultipleChoiceSingleQuestion = z.infer<\n typeof multipleChoiceSingleQuestionSchema\n>;\nexport type MultipleChoiceMultipleDisplayStyle = z.infer<\n typeof multipleChoiceMultipleDisplayStyleSchema\n>;\nexport type MultipleChoiceMultipleQuestion = z.infer<\n typeof multipleChoiceMultipleQuestionSchema\n>;\nexport type NpsQuestion = z.infer<typeof npsQuestionSchema>;\nexport type ShortAnswerQuestion = z.infer<typeof shortAnswerQuestionSchema>;\nexport type LongAnswerQuestion = z.infer<typeof longAnswerQuestionSchema>;\nexport type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;\nexport type NestedDropdownQuestion = z.infer<\n typeof nestedDropdownQuestionSchema\n>;\nexport type Section = z.infer<typeof sectionSchema>;\n\n// Combined question schema using discriminated union for proper type safety\nexport const combinedQuestionSchema = z.discriminatedUnion(\"type\", [\n ratingQuestionSchema,\n annotationQuestionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n]);\n\n// Explicit type definition for better inference\nexport type CombinedQuestion = \n | z.infer<typeof ratingQuestionSchema>\n | z.infer<typeof annotationQuestionSchema>\n | z.infer<typeof multipleChoiceSingleQuestionSchema>\n | z.infer<typeof multipleChoiceMultipleQuestionSchema>\n | z.infer<typeof npsQuestionSchema>\n | z.infer<typeof shortAnswerQuestionSchema>\n | z.infer<typeof longAnswerQuestionSchema>\n | z.infer<typeof nestedDropdownQuestionSchema>;\n", "import { z } from \"zod\";\n\n// Annotation marker schema\nexport const AnnotationMarkerSchema = z.object({\n marker_no: z.string(),\n timeline: z.string(),\n comment: z.string(),\n});\n\n// Annotation schema\nexport const AnnotationSchema = z.object({\n file_type: z.string(),\n file_name: z.string(),\n markers: z.array(AnnotationMarkerSchema),\n});\n\n// AnswerItem schema\nexport const AnswerItemSchema = z\n .object({\n nps: z\n .number()\n .optional()\n .describe(\"Net Promoter Score value (e.g., 0-10)\"),\n nested_selection: z\n .array(z.string())\n .optional()\n .describe(\"Array of selected nested option IDs\"),\n long_text: z\n .string()\n .optional()\n .describe(\"Long text answer, e.g., paragraph or essay\"),\n short_answer: z\n .string()\n .optional()\n .describe(\"Short text answer, e.g., single sentence or word\"),\n single_choice: z\n .string()\n .optional()\n .describe(\n \"single selected option ID (for single choice questions)\"\n ),\n rating: z\n .number()\n .optional()\n .describe(\"Star rating value (e.g., 1-5)\"),\n multiple_choice_multiple: z\n .array(z.string())\n .optional()\n .describe(\"Array of selected option IDs for multiple choice questions\"),\n annotation: AnnotationSchema.optional().describe(\n \"Annotation object containing file and marker details\"\n ),\n others: z\n .string()\n .optional()\n .describe(\n \"For multiple choice questions and single choice questions, this is the value of the other option\"\n ),\n })\n .describe(\n \"Flexible answer item supporting various question types and custom fields\"\n );\n\n// QuestionsResponse schema\nexport const QuestionsResponseSchema = z.object({\n question_id: z.string(),\n error: z.string().optional(),\n answer: AnswerItemSchema,\n type: z.string(),\n});\n\n// Legacy AnswerSchema for backward compatibility\nexport const AnswerSchema = AnswerItemSchema;\n\n// Type inference from schemas (for type safety)\nexport type AnnotationMarker = z.infer<typeof AnnotationMarkerSchema>;\nexport type Annotation = z.infer<typeof AnnotationSchema>;\nexport type AnswerItem = z.infer<typeof AnswerItemSchema>;\nexport type QuestionsResponse = z.infer<typeof QuestionsResponseSchema>;\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\", \"S\"])\n .describe(\"Enumeration of feedback types: R=Recurring, O=One-time\");\n\n// Constants for survey types (explicit literal values for proper type inference)\nexport const SurveyTypes = {\n RECURRING: \"R\" as const,\n ONE_TIME: \"S\" as const,\n} as const;\n\n// Yes/No enum for boolean-like string fields\nexport const yesNoSchema = z\n .enum([\"Y\", \"N\"])\n .describe(\"Yes/No enumeration using Y/N values\");\n\n// Constants for yes/no values (explicit literal values for proper type inference)\nexport const YesNoValues = {\n YES: \"Y\" as const,\n NO: \"N\" as const,\n} as const;\n\n// Time unit enum for recurring schedules\nexport const recurringUnitSchema = z\n .enum([\"minutes\", \"hours\", \"days\", \"weeks\", \"months\", \"years\"])\n .describe(\"Time units for recurring feedback schedules\");\n\n// Constants for recurring units (explicit literal values for proper type inference)\nexport const RecurringUnits = {\n MINUTES: \"minutes\" as const,\n HOURS: \"hours\" as const,\n DAYS: \"days\" as const,\n WEEKS: \"weeks\" as const,\n MONTHS: \"months\" as const,\n YEARS: \"years\" as const,\n} as const;\n\n// Frequency and scheduling properties schema\nexport const frequencyAndSchedulingPropertiesSchema = z\n .object({\n surveyType: surveyTypeSchema\n .describe(\"Type of feedback: R for recurring, O for one-time\"),\n showOnce: yesNoSchema\n .describe(\"Whether the feedback should be shown only once per user\"),\n stopWhenResponsesCount: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Stop feedback when this number of responses is reached (as string)\"),\n recurringValue: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Value for recurring schedule (e.g., every 15 days)\"),\n recurringUnit: recurringUnitSchema\n .describe(\"Time unit for recurring schedule\"),\n startDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback in ISO format\"),\n stopDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Stop date and time for the feedback in ISO format\"),\n })\n .refine(\n (data) => {\n // If surveyType is \"O\" (one-time), showOnce should be \"Y\"\n if (data.surveyType === \"S\" && 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\", \"S\"])\n .describe(\"Publication status: P=Published, D=Draft, A=Archived, S=Stopped\");\n\n// Constants for publication status (explicit literal values for proper type inference)\nexport const PublicationStatuses = {\n PUBLISHED: \"P\" as const,\n DRAFT: \"D\" as const,\n ARCHIVED: \"A\" as const,\n STOPPED: \"S\" as const,\n} as const;\n\n// Duration schema for date range\n// export const durationSchema = z\n// .object({\n// from: z\n// .string()\n// .describe(\"Start date and time for the duration (ISO format or custom format)\"),\n// to: z\n// .string()\n// .describe(\"End date and time for the duration (ISO format or custom format)\"),\n// })\n// .describe(\"Duration range for when something is active\");\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: durationSchema\n // .refine(\n // (data) => {\n // // Validate ISO format for this specific use case\n // const isoRegex = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/;\n // return isoRegex.test(data.from) && isoRegex.test(data.to);\n // },\n // {\n // message: \"Duration dates must be in valid ISO format with timezone\",\n // path: [\"from\"],\n // }\n // )\n // .refine(\n // (data) => {\n // // End date should be after start date\n // const start = new Date(data.from);\n // const end = new Date(data.to);\n // return end > start;\n // },\n // {\n // message: \"End date must be after start date\",\n // path: [\"to\"],\n // }\n // )\n // .describe(\"Duration period for the feedback\"),\n is_published: publicationStatusSchema\n .describe(\"Publication status of the feedback form\"),\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>;\n// export type Duration = z.infer<typeof durationSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport { feedbackConfigurationSchema } from \"./form-schema\";\nimport { frequencyAndSchedulingPropertiesSchema } from \"./form-schema\";\nimport { externalPublishingPropertiesSchema } from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema, WelcomeScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndScreenFieldsSchema, EndFieldsTranslationSchema } from \"./other-screen-schema\";\nimport { themeConfigurationSchema } from \"./theme-schema\";\nimport { audienceTriggerPropertiesSchema } from \"./auto-trigger-schema\";\n\n// Other configuration properties schema using discriminated union for JSON schema compatibility\nexport const otherConfigurationPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When other configuration is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .optional()\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n // When other configuration is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: z.record(z.string(), OtherFieldsTranslationSchema)\n .describe(\"Translations for other configuration field labels and buttons keyed by language code\"),\n }),\n ])\n .describe(\"Schema for other configuration properties including fields and translations\");\n\n// Welcome screen properties schema using discriminated union for JSON schema compatibility\nexport const welcomeScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When welcome screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .optional()\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n // When welcome screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: z.record(z.string(), WelcomeFieldsTranslationSchema)\n .describe(\"Translations for welcome screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for welcome screen properties including fields and translations\");\n\n// End screen properties schema using discriminated union for JSON schema compatibility\nexport const endScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When end screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .optional()\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .optional()\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n // When end screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: z.record(z.string(), EndFieldsTranslationSchema)\n .describe(\"Translations for end screen content keyed by language code\"),\n }),\n ])\n .describe(\"Schema for end screen properties including fields and translations\");\n\n// Appearance properties schema\nexport const appearancePropertiesSchema = z\n .object({\n themeConfiguration: themeConfigurationSchema\n .describe(\"Theme configuration including colors, features, and positioning\"),\n })\n .describe(\"Schema for appearance properties including theme configuration\");\n\n// Combined form properties schema (if needed for complete form configuration)\nexport const formPropertiesSchema = z\n .object({\n feedback_configuration_id: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedback_configuration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaire_fields: z\n .object({\n questions: z.record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z.array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n selected_languages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n translations: translationsSchema\n .describe(\"Multi-language translations for questions and form content\"),\n })\n .describe(\"Fields defining the questionnaire structure, questions, sections, selected languages, and translations\"),\n frequency_and_scheduling_properties: frequencyAndSchedulingPropertiesSchema\n .describe(\"Properties controlling when and how often the feedback is shown\"),\n external_publishing_properties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audience_trigger_properties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n other_configuration_properties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n welcome_screen_properties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen configuration including content and translations\"),\n end_screen_properties: endScreenPropertiesSchema\n .describe(\"End screen configuration including content, dismissal behavior, and translations\"),\n appearance_properties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance\");\n\n// Type inference from schema (for type safety)\nexport type FormProperties = z.infer<typeof formPropertiesSchema>;\n\n// Explicit type definition for better inference\nexport type OtherConfigurationProperties = \n | {\n isEnabled: false;\n otherFields?: z.infer<typeof OtherFieldsSchema>;\n translations?: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n otherFields: z.infer<typeof OtherFieldsSchema>;\n translations: Record<string, z.infer<typeof OtherFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type WelcomeScreenProperties = \n | {\n isEnabled: false;\n welcomeFields?: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n welcomeFields: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof WelcomeFieldsTranslationSchema>>;\n };\n\n// Explicit type definition for better inference\nexport type EndScreenProperties = \n | {\n isEnabled: false;\n endFields?: z.infer<typeof EndScreenFieldsSchema>;\n translations?: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n }\n | {\n isEnabled: true;\n endFields: z.infer<typeof EndScreenFieldsSchema>;\n translations: Record<string, z.infer<typeof EndFieldsTranslationSchema>>;\n };\n\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\n\n// Base translation entry - simplified to just string values for the new structure\nexport const translationEntrySchema = z\n .string()\n .min(1)\n .describe(\"Translated text content\");\n\n// Rating question translation schema with type field\nexport const ratingQuestionTranslationSchema = z\n .object({\n type: z.literal(\"rating\").describe(\"Question type identifier\"),\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 translation schema with type field\nexport const singleChoiceQuestionTranslationSchema = z\n .object({\n type: z.literal(\"single_choice\").describe(\"Question type identifier\"),\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 .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the option pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'placeholder'].includes(key)\n );\n return additionalKeys.every(key => /^option\\..+\\.(label|value)$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'option.{id}.{label|value}'\"\n })\n .describe(\"Translation schema for single choice questions\");\n\n// Multiple choice question translation schema with type field\nexport const multipleChoiceQuestionTranslationSchema = z\n .object({\n type: z.literal(\"multiple_choice_multiple\").describe(\"Question type identifier\"),\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 .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the option pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'placeholder'].includes(key)\n );\n return additionalKeys.every(key => /^option\\..+\\.(label|value)$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'option.{id}.{label|value}'\"\n })\n .describe(\"Translation schema for multiple choice questions\");\n\n// NPS question translation schema with type field\nexport const npsQuestionTranslationSchema = z\n .object({\n type: z.literal(\"nps\").describe(\"Question type identifier\"),\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 })\n .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the scale label pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'minLabel', 'maxLabel'].includes(key)\n );\n return additionalKeys.every(key => /^scaleLabel\\.\\d+$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'scaleLabel.{number}'\"\n })\n .describe(\"Translation schema for NPS questions\");\n\n// Short answer question translation schema with type field\nexport const shortAnswerQuestionTranslationSchema = z\n .object({\n type: z.literal(\"short_answer\").describe(\"Question type identifier\"),\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 translation schema with type field\nexport const longAnswerQuestionTranslationSchema = z\n .object({\n type: z.literal(\"long_text\").describe(\"Question type identifier\"),\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 translation schema with type field\nexport const nestedSelectionQuestionTranslationSchema = z\n .object({\n type: z.literal(\"nested_selection\").describe(\"Question type identifier\"),\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 })\n .catchall(translationEntrySchema)\n .refine((data) => {\n // Validate that any additional keys follow the nested option pattern\n const additionalKeys = Object.keys(data).filter(key => \n !['type', 'title', 'description', 'errorMessage', 'placeholder'].includes(key)\n );\n return additionalKeys.every(key => /^nestedOption\\..+\\.(label|hint)$/.test(key));\n }, {\n message: \"Additional keys must follow the pattern 'nestedOption.{id}.{label|hint}'\"\n })\n .describe(\"Translation schema for nested selection questions\");\n\n// Annotation question translation schema with type field\nexport const annotationQuestionTranslationSchema = z\n .object({\n type: z.literal(\"annotation\").describe(\"Question type identifier\"),\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// Union of all question translation types\nexport const questionTranslationSchema = z\n .union([\n ratingQuestionTranslationSchema,\n singleChoiceQuestionTranslationSchema,\n multipleChoiceQuestionTranslationSchema,\n npsQuestionTranslationSchema,\n shortAnswerQuestionTranslationSchema,\n longAnswerQuestionTranslationSchema,\n nestedSelectionQuestionTranslationSchema,\n annotationQuestionTranslationSchema,\n ])\n .describe(\"Union of all question type translation schemas\");\n\n// Language code schema for validation\nexport const languageCodeSchema = z\n .string()\n .min(2)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'hi')\");\n\n// Question translations keyed by language code\nexport const questionTranslationsByLanguageSchema = z\n .record(languageCodeSchema, questionTranslationSchema)\n .describe(\"Question translations keyed by language code\");\n\n// Main question-centric translation schema\nexport const questionCentricTranslationsSchema = z\n .record(z.string().uuid(), questionTranslationsByLanguageSchema)\n .describe(\"Question-centric translations keyed by question ID, then by language code\");\n\n// Complete translation schema - questions directly at root level\nexport const translationsSchema = questionCentricTranslationsSchema\n .describe(\"Question-centric translations at root level\");\n\n// Type exports\nexport type TranslationEntry = z.infer<typeof translationEntrySchema>;\nexport type RatingQuestionTranslation = z.infer<typeof ratingQuestionTranslationSchema>;\nexport type SingleChoiceQuestionTranslation = z.infer<typeof singleChoiceQuestionTranslationSchema>;\nexport type MultipleChoiceQuestionTranslation = z.infer<typeof multipleChoiceQuestionTranslationSchema>;\nexport type NpsQuestionTranslation = z.infer<typeof npsQuestionTranslationSchema>;\nexport type ShortAnswerQuestionTranslation = z.infer<typeof shortAnswerQuestionTranslationSchema>;\nexport type LongAnswerQuestionTranslation = z.infer<typeof longAnswerQuestionTranslationSchema>;\nexport type NestedSelectionQuestionTranslation = z.infer<typeof nestedSelectionQuestionTranslationSchema>;\nexport type AnnotationQuestionTranslation = z.infer<typeof annotationQuestionTranslationSchema>;\n\n// Union type for all question translations\nexport type QuestionTranslation = z.infer<typeof questionTranslationSchema>;\n\n// Schema types\nexport type LanguageCode = z.infer<typeof languageCodeSchema>;\nexport type QuestionTranslationsByLanguage = z.infer<typeof questionTranslationsByLanguageSchema>;\nexport type QuestionCentricTranslations = z.infer<typeof questionCentricTranslationsSchema>;\nexport type Translations = z.infer<typeof translationsSchema>;\n\n// Translation helper class\nexport class TranslationProvider {\n private translations: Translations;\n private defaultLanguage: string;\n\n constructor(translations: Translations, defaultLanguage: string = \"en\") {\n this.translations = translations;\n this.defaultLanguage = defaultLanguage;\n }\n\n /**\n * Get translations for a specific question in a specific language\n */\n getQuestionTranslations(\n questionId: string,\n languageCode: string\n ): QuestionTranslation | null {\n const questionTranslations = this.translations[questionId];\n if (!questionTranslations) return null;\n\n // Try to get the requested language\n let translation = questionTranslations[languageCode];\n \n // Fallback to default language if requested language not found\n if (!translation) {\n translation = questionTranslations[this.defaultLanguage];\n }\n\n return translation || null;\n }\n\n /**\n * Get a specific translation text by field path\n */\n getTranslationText(\n questionId: string,\n languageCode: string,\n fieldPath: string\n ): string | null {\n const questionTranslation = this.getQuestionTranslations(questionId, languageCode);\n if (!questionTranslation) return null;\n\n // Direct field access (e.g., \"title\", \"errorMessage\")\n if (fieldPath in questionTranslation) {\n const value = questionTranslation[fieldPath as keyof typeof questionTranslation];\n return typeof value === 'string' ? value : null;\n }\n\n return null;\n }\n\n /**\n * Get all available languages for a specific question\n */\n getQuestionLanguages(questionId: string): string[] {\n const questionTranslations = this.translations[questionId];\n if (!questionTranslations) return [];\n \n return Object.keys(questionTranslations);\n }\n\n /**\n * Get all available languages across all questions\n */\n getAvailableLanguages(): string[] {\n const allLanguages = new Set<string>();\n \n Object.values(this.translations).forEach(questionTranslations => {\n Object.keys(questionTranslations).forEach(langCode => {\n allLanguages.add(langCode);\n });\n });\n \n return Array.from(allLanguages);\n }\n\n /**\n * Check if a language is supported for a specific question\n */\n isLanguageSupportedForQuestion(questionId: string, languageCode: string): boolean {\n const questionTranslations = this.translations[questionId];\n if (!questionTranslations) return false;\n \n return languageCode in questionTranslations;\n }\n\n /**\n * Check if a language is supported across all questions\n */\n isLanguageSupported(languageCode: string): boolean {\n return this.getAvailableLanguages().includes(languageCode);\n }\n\n /**\n * Get the default language\n */\n getDefaultLanguage(): string {\n return this.defaultLanguage;\n }\n\n /**\n * Get all questions that have translations\n */\n getQuestionIds(): string[] {\n return Object.keys(this.translations);\n }\n\n /**\n * Get question type for a specific question\n */\n getQuestionType(questionId: string, languageCode?: string): string | null {\n const langCode = languageCode || this.defaultLanguage;\n const translation = this.getQuestionTranslations(questionId, langCode);\n \n return translation?.type || null;\n }\n}\n\n// Factory function to create translation provider\nexport function createTranslationProvider(translations: Translations, defaultLanguage: string = \"en\"): TranslationProvider {\n return new TranslationProvider(translations, defaultLanguage);\n}\n", "import { z } from \"zod\";\n\n// Dismiss behavior enum for end screen\nexport const dismissBehaviorSchema = z\n .enum([\"fade\", \"manual\"])\n .describe(\"How the end screen should be dismissed (fade out or manual dismissal)\");\n\n// Constants for dismiss behaviors (explicit literal values for proper type inference)\nexport const DismissBehaviors = {\n FADE: \"fade\" as const,\n MANUAL: \"manual\" as const,\n} as const;\n\n// Welcome screen configuration schema\nexport const WelcomeScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Description text shown on the welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the welcome screen button\"),\n })\n .describe(\"Schema for welcome screen configuration fields\");\n\n// End screen configuration schema\nexport const EndScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Message text shown on the end screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the end screen button\"),\n dismissBehavior: dismissBehaviorSchema.describe(\"How the end screen should be dismissed (fade out or manual dismissal)\"),\n fadeDuration: z\n .number()\n .int()\n .min(0)\n .max(10000)\n .describe(\"Duration in milliseconds for fade dismissal (0-10000)\"),\n })\n .describe(\"Schema for end screen configuration fields\");\n\n// Welcome translations configuration schema\nexport const WelcomeFieldsTranslationSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated description text for welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the welcome button label\"),\n })\n .describe(\"Schema for welcome screen translation fields\");\n\n// End translations configuration schema\nexport const EndFieldsTranslationSchema = z\n .object({\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the end button label\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated message text for end screen\"),\n })\n .describe(\"Schema for end screen translation fields\");\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n pagination: z\n .boolean()\n .describe(\"Whether to show pagination for multi-page forms\"),\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\n pageTitle: z\n .boolean()\n .describe(\"Whether to show page titles in multi-page forms\"),\n blockerFeedback: z\n .boolean()\n .describe(\"Whether to show blocker feedback for validation errors\"),\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration fields\");\n\n// Language field schema\nexport const LanguageFieldSchema = z\n .object({\n value: z\n .string()\n .min(1)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'fr')\"),\n label: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Display name for the language (e.g., 'English', 'Spanish', 'French')\"),\n isFixed: z\n .boolean()\n .default(false)\n .describe(\"Whether this language is fixed and cannot be deleted by users\"),\n })\n .describe(\"Schema for individual language field with value, label, and fixed status\");\n\n// Languages configuration schema\nexport const LanguagesSchema = z\n .array(LanguageFieldSchema)\n .describe(\"Schema for array of available languages\");\n\n// Other fields translation schema\nexport const OtherFieldsTranslationSchema = z\n .object({\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\nexport type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;\nexport type EndFields = z.infer<typeof EndScreenFieldsSchema>;\nexport type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;\nexport type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;\nexport type OtherFields = z.infer<typeof OtherFieldsSchema>;\nexport type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;\nexport type LanguageField = z.infer<typeof LanguageFieldSchema>;\nexport type Languages = z.infer<typeof LanguagesSchema>;\n", "import { z } from \"zod\";\n\n// Position enum for widget positioning\nexport const positionSchema = z\n .enum([\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"middle-left\",\n \"middle-center\",\n \"middle-right\",\n \"bottom-left\",\n \"bottom-center\",\n \"bottom-right\"\n ])\n .describe(\"Available positions for widget placement\");\n\n// Constants for positions (explicit literal values for proper type inference)\nexport const Positions = {\n TOP_LEFT: \"top-left\" as const,\n TOP_CENTER: \"top-center\" as const,\n TOP_RIGHT: \"top-right\" as const,\n MIDDLE_LEFT: \"middle-left\" as const,\n MIDDLE_CENTER: \"middle-center\" as const,\n MIDDLE_RIGHT: \"middle-right\" as const,\n BOTTOM_LEFT: \"bottom-left\" as const,\n BOTTOM_CENTER: \"bottom-center\" as const,\n BOTTOM_RIGHT: \"bottom-right\" as const,\n} as const;\n\n// Theme mode enum for light and dark themes\nexport const themeModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Available theme modes for the widget\");\n\n// Constants for theme modes (explicit literal values for proper type inference)\nexport const ThemeModes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n} as const;\n\n// Schema for feature settings controlling UI behavior\nexport const featureSettingsSchema = z\n .object({\n darkOverlay: z\n .boolean()\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\")\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme colors\nexport const themeColorsSchema = z\n .object({\n brandColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #3366CC)\")\n .describe(\"Primary brand color in hex format\"),\n overlayColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #FFFFFF)\")\n .describe(\"Overlay background color in hex format\"),\n textColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #333333)\")\n .describe(\"Primary text color in hex format\"),\n backgroundColor: z\n .union([\n z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i),\n z.string().regex(/^rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*(?:,\\s*[01](?:\\.\\d+)?)?\\s*\\)$/i)\n ])\n .describe(\"Background color in hex format or rgba format (e.g., #1A1A1A or rgba(255,255,255, 1))\")\n })\n .describe(\"Color scheme for a single theme\");\n\n// Schema for the complete themes object\nexport const themesSchema = z\n .object({\n light: themeColorsSchema,\n dark: themeColorsSchema\n })\n .describe(\"Complete theme configuration with light and dark variants\");\n\n// Schema for the complete theme configuration\nexport const themeConfigurationSchema = z\n .object({\n themes: themesSchema\n .describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema\n .describe(\"UI feature settings controlling widget behavior\"),\n selectedPosition: positionSchema\n .describe(\"Selected position for the main widget\"),\n selectedIconPosition: positionSchema\n .describe(\"Selected position for the widget icon\")\n })\n .describe(\"Complete theme and UI configuration including colors, features, and positioning\");\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type FeatureSettings = z.infer<typeof featureSettingsSchema>;\nexport type ThemeColors = z.infer<typeof themeColorsSchema>;\nexport type Themes = z.infer<typeof themesSchema>;\nexport type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;\n", "import { z } from \"zod\";\n\n// Custom event field operator schema\nexport const customEventFieldOperatorSchema = z\n .object({\n name: z\n .string()\n .describe(\"The operator name (e.g., '=', '!=', 'contains', 'beginsWith', 'matches')\"),\n label: z\n .string()\n .describe(\"Human-readable label for the operator (e.g., 'equals', 'not equals', 'contains')\"),\n })\n .describe(\"Schema defining an operator for custom event fields\");\n\n// Custom event field schema\nexport const customEventFieldSchema = z\n .object({\n name: z\n .string()\n .describe(\"The field name (e.g., 'event_name', 'add_to_cart', 'cart_item_number')\"),\n label: z\n .string()\n .describe(\"Human-readable label for the field\"),\n placeholder: z\n .string()\n .describe(\"Placeholder text for input fields\"),\n operators: z\n .array(customEventFieldOperatorSchema)\n .min(1)\n .describe(\"Array of available operators for this field\"),\n })\n .describe(\"Schema defining a custom event field with its operators\");\n\n// Metadata schema for conditional if\nexport const conditionalIfMetadataSchema = z\n .object({\n customEventFields: z\n .array(customEventFieldSchema)\n .optional()\n .describe(\"Array of custom event fields with their operators and labels\"),\n })\n .describe(\"Schema defining metadata for conditional if clauses\");\n\n// Query output schema with defined structure but all fields as strings\nexport const queryOutputSchema = z\n .object({\n query: z\n .string()\n .describe(\"The structured query definition as a JSON string\"),\n naturalLanguage: z\n .string()\n .describe(\"Human-readable description of the query conditions\"),\n jsonLogic: z\n .string()\n .describe(\"JSON Logic representation of the query as a JSON string\"),\n sqlQuery: z\n .string()\n .describe(\"SQL representation of the query for database operations\"),\n })\n .describe(\"Schema defining query output structure with all fields as strings\");\n\n// Conditional if clause schema\nexport const conditionalIfSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this condition\"),\n event: z\n .string()\n .describe(\"The event that triggers evaluation of this condition (e.g., 'pageLoad', 'pageView', 'scroll', 'custom')\"),\n queryOutput: queryOutputSchema.describe(\"The query conditions to evaluate when the event occurs\"),\n metadata: conditionalIfMetadataSchema\n .optional()\n .describe(\"Optional metadata containing custom event fields and their configurations\"),\n })\n .describe(\"Schema defining the 'if' condition for auto-trigger logic\");\n\n// Trigger action schema for the 'then' clause\nexport const triggerActionSchema = z\n .object({\n triggerType: z\n .string()\n .describe(\"The type of action to perform (e.g., 'delay', 'scroll', 'immediately')\"),\n delay: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Delay in seconds before performing the action\"),\n scroll: z\n .union([z.string(), z.number()])\n .optional()\n .describe(\"Scroll position (percentage as string like '75%' or pixel value as number)\"),\n })\n .describe(\"Schema defining the action to perform when conditions are met\");\n\n// Conditional when clause schema (if-then structure)\nexport const conditionalWhenSchema = z\n .object({\n if: conditionalIfSchema.describe(\"The condition that must be met\"),\n then: triggerActionSchema.describe(\"The action to perform when the condition is met\"),\n })\n .describe(\"Schema defining a conditional when clause with if-then logic\");\n\n// Filter condition schema for category-specific filters\nexport const filterConditionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this filter condition\"),\n category: z\n .string()\n .describe(\"The category this filter belongs to (e.g., 'device', 'user', 'geo_location')\"),\n property: z\n .string()\n .describe(\"The property to filter on (e.g., 'device_type', 'age', 'country')\"),\n operator: z\n .string()\n .describe(\"The comparison operator (e.g., 'equals', 'greaterThan', 'lessThan')\"),\n values: z\n .array(z.string())\n .min(1)\n .describe(\"Array of values to compare against\"),\n tbl_key: z\n .string()\n .describe(\"The database table key for this property\"),\n })\n .describe(\"Schema defining a single filter condition within a category\");\n\n// Category-specific filters schema\nexport const categorySpecificFiltersSchema = z\n .object({\n device: z\n .array(filterConditionSchema)\n .optional()\n .describe(\"Array of device-specific filter conditions\"),\n user: z\n .array(filterConditionSchema)\n .optional()\n .describe(\"Array of user-specific filter conditions\"),\n geo_location: z\n .array(filterConditionSchema)\n .optional()\n .describe(\"Array of geo-location specific filter conditions\"),\n })\n .describe(\"Schema defining category-specific filters for audience targeting\");\n\n// Who schema for audience targeting\nexport const whoSchema = z\n .object({\n applications: z\n .array(z.string())\n .min(1)\n .describe(\"Array of application names this targeting applies to\"),\n userType: z\n .string()\n .describe(\"The type of user this targeting applies to (e.g., 'both', 'new', 'returning')\"),\n categorySpecificFilters: categorySpecificFiltersSchema\n .optional()\n .describe(\"Optional category-specific filters for more granular targeting\"),\n })\n .describe(\"Schema defining who the audience targeting applies to\");\n\n// Enhanced audience segment schema with conditional when logic\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 .array(conditionalWhenSchema)\n .min(1)\n .describe(\"Array of conditional when clauses with if-then logic\"),\n who: whoSchema\n .describe(\"User criteria and conditions defining who belongs to this segment\"),\n })\n .describe(\"Schema defining an audience segment for targeting with conditional logic\");\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 CustomEventFieldOperator = z.infer<typeof customEventFieldOperatorSchema>;\nexport type CustomEventField = z.infer<typeof customEventFieldSchema>;\nexport type ConditionalIfMetadata = z.infer<typeof conditionalIfMetadataSchema>;\nexport type QueryOutput = z.infer<typeof queryOutputSchema>;\nexport type ConditionalIf = z.infer<typeof conditionalIfSchema>;\nexport type TriggerAction = z.infer<typeof triggerActionSchema>;\nexport type ConditionalWhen = z.infer<typeof conditionalWhenSchema>;\nexport type FilterCondition = z.infer<typeof filterConditionSchema>;\nexport type CategorySpecificFilters = z.infer<typeof categorySpecificFiltersSchema>;\nexport type Who = z.infer<typeof whoSchema>;\nexport type AudienceSegment = z.infer<typeof audienceSegmentSchema>;\nexport type AudienceTriggerProperties = z.infer<typeof audienceTriggerPropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Master properties schema\nexport const masterPropertiesSchema = z\n .object({\n mandatory_fetch_config_at_paths: z\n .array(z.string())\n .describe(\"Array of paths where configuration must be fetched from server when navigated by user\"),\n config_sync_interval_seconds: z\n .number()\n .int()\n .positive()\n .describe(\"Interval in seconds for configuration synchronization between client and server\"),\n disable_all_survey: z\n .boolean()\n .describe(\"Flag to disable all surveys globally\"),\n feedback_interval_duration: z\n .number()\n .int()\n .positive()\n .describe(\"Duration in seconds for feedback interval between two auto triggered feedbacks\"),\n })\n .describe(\"Master properties configuration for global survey settings\");\n\n// Type inference from schema\nexport type MasterProperties = z.infer<typeof masterPropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Theme mode enum for device themes\nexport const deviceThemeSchema = z\n .enum([\"light\", \"dark\", \"system\"])\n .describe(\"Enumeration of supported theme modes\");\n\n// Constants for device themes (explicit literal values for proper type inference)\nexport const DeviceThemes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n SYSTEM: \"system\" as const,\n} as const;\n\n// Device info schema\nexport const deviceInfoSchema = z\n .object({\n deviceType: z.string().describe(\"Type of device being used\"),\n timezone: z.string().describe(\"Device timezone (e.g., 'Asia/Calcutta')\"),\n theme: deviceThemeSchema.describe(\"Current theme mode preference\"),\n os: z.string().describe(\"Operating system running on the device\"),\n osVersion: z.string().describe(\"Version of the operating system\"),\n appVersion: z.string().describe(\"Version of the application\"),\n app: z.string().describe(\"Browser or application being used\"),\n language: z.string().describe(\"Language preference (e.g., 'en-GB')\"),\n })\n .describe(\"Device information collected from the client\");\n\n// Session info schema\nexport const sessionInfoSchema = z\n .object({\n sessionId: z.string().uuid().describe(\"Unique session identifier\"),\n })\n .describe(\"Session information for tracking user sessions\");\n\n// Combined device and session info schema\nexport const deviceSessionInfoSchema = z\n .object({\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n })\n .describe(\"Combined device and session information\");\n\n// User properties schema for counter and other dynamic properties\nexport const userPropertiesSchema = z\n .object({\n $counter: z\n .record(z.string(), z.number().int())\n .describe(\"Counter properties for user tracking (can be positive or negative)\")\n .optional(),\n $set: z\n .record(z.string(), z.any())\n .describe(\"Properties to set for the user\")\n .optional(),\n $setOnce: z\n .record(z.string(), z.any())\n .describe(\"Properties to set once for the user (won't overwrite existing values)\")\n .optional(),\n $unset: z\n .array(z.string())\n .describe(\"Array of property names to unset/remove from the user\")\n .optional(),\n })\n .passthrough() // Allow additional user properties\n .describe(\"User properties including counters, set operations, and other dynamic data\");\n\n// User info schema\nexport const userInfoSchema = z\n .object({\n userName: z\n .string()\n .email()\n .describe(\"User's email address as username\"),\n properties: userPropertiesSchema.describe(\"User properties and counters\"),\n })\n .describe(\"User information including identification and properties\");\n\n// Type exports\nexport type DeviceTheme = z.infer<typeof deviceThemeSchema>;\nexport type DeviceInfo = z.infer<typeof deviceInfoSchema>;\nexport type SessionInfo = z.infer<typeof sessionInfoSchema>;\nexport type DeviceSessionInfo = z.infer<typeof deviceSessionInfoSchema>;\nexport type UserProperties = z.infer<typeof userPropertiesSchema>;\nexport type UserInfo = z.infer<typeof userInfoSchema>;\n", "import { z } from \"zod\";\nimport { deviceInfoSchema, sessionInfoSchema, userInfoSchema } from \"./other-schema\";\nimport { AnswerSchema } from \"../fields/answer-schema\";\n\n// User action enum for feedback submission\nexport const userActionSchema = z\n .enum([\"V\", \"S\"])\n .describe(\"User action: V for view, S for submit\");\n\n// Constants for user actions\nexport const UserActions = {\n VIEW: \"V\" as const,\n SUBMIT: \"S\" as const,\n} as const;\n\n// Form configuration schema\nexport const formConfigSchema = z\n .object({\n feedbackIdentifier: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback instance\"),\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n completionTimeInSeconds: z\n .number()\n .int()\n .min(0)\n .describe(\"Time taken to complete the feedback in seconds\"),\n userAction: userActionSchema.describe(\"Action performed by the user\"),\n responseLanguageCode: z\n .string()\n .length(2)\n .describe(\"Language code for the response (e.g., 'en', 'es')\"),\n })\n .describe(\"Configuration information for the feedback form\");\n\n// Question response schema\nexport const questionResponseSchema = z\n .object({\n questionId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the question\"),\n answer: AnswerSchema.describe(\"The answer provided for this question\"),\n type: z\n .string()\n .describe(\"Type of the question (e.g., 'rating', 'single_choice')\"),\n })\n .describe(\"Response to a specific question in the feedback form\");\n\n// Response schema (only present when user_action is 'S')\nexport const responseSchema = z\n .object({\n questions: z\n .array(questionResponseSchema)\n .min(1)\n .describe(\"Array of question responses\"),\n })\n .describe(\"User responses to feedback questions\");\n\n// Matched trigger properties schema (flexible object since definition is unknown)\nexport const matchedTriggerPropertiesSchema = z\n .object({\n customEventName: z\n .string()\n .nullable()\n .describe(\"Custom event name that triggered the feedback\"),\n currentPath: z\n .string()\n .describe(\"Current page path where feedback was triggered\"),\n eventType: z\n .string()\n .describe(\"Type of event that triggered the feedback\"),\n })\n .passthrough()\n .describe(\"Properties of the trigger that matched for this feedback\");\n\n// Base submit feedback schema (without conditional response)\nexport const baseSubmitFeedbackSchema = z\n .object({\n formConfig: formConfigSchema.describe(\"Form configuration information\"),\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n matchedTriggerProperties: matchedTriggerPropertiesSchema.describe(\n \"Properties of the matched trigger\"\n ),\n })\n .describe(\"Base submit feedback request schema\");\n\n// View feedback schema (userAction: \"V\", no response required)\nexport const viewFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n userAction: z.literal(\"V\").describe(\"Action performed by the user (view)\"),\n }),\n })\n .strict()\n .describe(\"View feedback request schema (no response required)\");\n\n// Submit feedback schema (userAction: \"S\", response required)\nexport const submitFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n userAction: z.literal(\"S\").describe(\"Action performed by the user (submit)\"),\n }),\n response: responseSchema.describe(\"User responses (required for submit)\"),\n })\n .strict()\n .describe(\"Submit feedback request schema (response required)\");\n\n// Union schema for both cases (using regular union instead of discriminated union)\nexport const feedbackRequestSchema = z.union([\n viewFeedbackSchema,\n submitFeedbackSchema,\n]).describe(\"Union schema for both view and submit feedback requests\");\n\n// Type exports\nexport type UserAction = z.infer<typeof userActionSchema>;\nexport type FormConfig = z.infer<typeof formConfigSchema>;\nexport type QuestionResponse = z.infer<typeof questionResponseSchema>;\nexport type Response = z.infer<typeof responseSchema>;\nexport type MatchedTriggerProperties = z.infer<typeof matchedTriggerPropertiesSchema>;\nexport type BaseSubmitFeedback = z.infer<typeof baseSubmitFeedbackSchema>;\nexport type ViewFeedback = z.infer<typeof viewFeedbackSchema>;\nexport type SubmitFeedback = z.infer<typeof submitFeedbackSchema>;\nexport type FeedbackRequest = z.infer<typeof feedbackRequestSchema>;\n", "import { z } from \"zod\";\nimport { deviceInfoSchema, sessionInfoSchema, userInfoSchema } from \"./other-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"../fields/field-schema\";\nimport { LanguagesSchema } from \"../fields/other-screen-schema\";\nimport { otherConfigurationPropertiesSchema, welcomeScreenPropertiesSchema, endScreenPropertiesSchema } from \"../fields/form-properties-schema\";\nimport { masterPropertiesSchema } from \"../fields/other-properties-schema\";\nimport { audienceTriggerPropertiesSchema } from \"../fields/auto-trigger-schema\";\nimport { themeConfigurationSchema } from \"../fields/theme-schema\";\n// import { durationSchema } from \"../fields/form-schema\";\n\n// Individual feedback configuration item schema\nexport const feedbackConfigurationItemSchema = z\n .object({\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedbackTitle: z\n .string()\n .describe(\"Title of the feedback configuration\"),\n // duration: durationSchema\n // .describe(\"Active duration for this feedback configuration\"),\n triggerProperties: audienceTriggerPropertiesSchema\n .describe(\"Trigger properties including auto/manual settings and audience segments\"),\n appearanceProperties: z\n .object({\n themes: z\n .object({\n light: z\n .object({\n brandColor: z.string().describe(\"Brand color for light theme\"),\n overlayColor: z.string().describe(\"Overlay color for light theme\"),\n textColor: z.string().describe(\"Text color for light theme\"),\n backgroundColor: z.string().describe(\"Background color for light theme\"),\n })\n .describe(\"Light theme colors\"),\n dark: z\n .object({\n brandColor: z.string().describe(\"Brand color for dark theme\"),\n overlayColor: z.string().describe(\"Overlay color for dark theme\"),\n textColor: z.string().describe(\"Text color for dark theme\"),\n backgroundColor: z.string().describe(\"Background color for dark theme\"),\n })\n .describe(\"Dark theme colors\"),\n })\n .nullable()\n .optional()\n .describe(\"Theme configuration (optional)\"),\n featureSettings: z\n .object({\n darkOverlay: z.boolean().describe(\"Whether to show dark overlay\"),\n closeButton: z.boolean().describe(\"Whether to show close button\"),\n progressBar: z.boolean().describe(\"Whether to show progress bar\"),\n showBranding: z.boolean().describe(\"Whether to show branding\"),\n customPosition: z.boolean().describe(\"Whether custom position is enabled\"),\n customIconPosition: z.boolean().describe(\"Whether custom icon position is enabled\"),\n customCss: z\n .string()\n .nullable()\n .optional()\n .describe(\"Custom CSS link (optional)\"),\n })\n .describe(\"Feature settings for the feedback form\"),\n selectedIconPosition: z\n .string()\n .describe(\"Selected position for the feedback icon\"),\n selectedPosition: z\n .string()\n .describe(\"Selected position for the feedback form\"),\n })\n .describe(\"Appearance properties for the feedback form\"),\n })\n .describe(\"Individual feedback configuration item in the list\");\n\n// Form configuration schema for fetch operations\nexport const fetchFormConfigSchema = z\n .object({\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n responseLanguageCode: z\n .string()\n .length(2)\n .describe(\"Language code for the response (e.g., 'en', 'es')\"),\n })\n .describe(\"Form configuration for fetching feedback details\");\n\n// Fetch configuration list request schema\nexport const fetchConfigurationListSchema = z\n .object({\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n })\n .strict()\n .describe(\"Request schema for fetching available feedback configurations\");\n\n// Fetch feedback details request schema\nexport const fetchFeedbackDetailsSchema = z\n .object({\n formConfig: fetchFormConfigSchema.describe(\"Form configuration for the specific feedback\"),\n deviceInfo: deviceInfoSchema.describe(\"Device information\"),\n sessionInfo: sessionInfoSchema.describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n })\n .strict()\n .describe(\"Request schema for fetching specific feedback form details\");\n\n// Form configuration response schema (simple title/description)\nexport const formConfigurationResponseSchema = z\n .object({\n formTitle: z\n .string()\n .describe(\"Title of the feedback form\"),\n formDescription: z\n .string()\n .describe(\"Description of the feedback form\"),\n })\n .describe(\"Form configuration response with title and description\");\n\n// Questionnaire fields response schema (matches actual API response structure)\nexport const questionnaireFieldsResponseSchema = z\n .object({\n questions: z\n .record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z\n .array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n translations: z\n .record(z.string(), z.any())\n .describe(\"Translations object (can be empty or contain language-specific translations)\"),\n selectedLanguages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n })\n .describe(\"Questionnaire fields response including questions, sections, translations, and selected languages\");\n\n// Fetch feedback details response schema using existing schemas\nexport const fetchFeedbackDetailsResponseSchema = z\n .object({\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedbackIdentifier: z\n .string()\n .uuid()\n .describe(\"Unique identifier for this specific feedback instance\"),\n formConfiguration: formConfigurationResponseSchema\n .describe(\"Form configuration with title and description\"),\n questionnaireFields: questionnaireFieldsResponseSchema\n .describe(\"Questionnaire structure including questions, sections, translations, and languages\"),\n otherConfigurationProperties: otherConfigurationPropertiesSchema\n .describe(\"Other configuration properties using existing schema\"),\n welcomeScreenProperties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen properties using existing schema\"),\n endScreenProperties: endScreenPropertiesSchema\n .describe(\"End screen properties using existing schema\"),\n })\n .strict()\n .describe(\"Complete response schema for fetchFeedbackDetails API using existing field schemas\");\n\n// Fetch configuration list response schema\nexport const fetchConfigurationListResponseSchema = z\n .object({\n masterProperties: masterPropertiesSchema\n .describe(\"Master properties for global survey settings\"),\n feedbackConfiguration: z\n .array(feedbackConfigurationItemSchema)\n .describe(\"Array of available feedback configurations\"),\n })\n .strict()\n .describe(\"Response schema for fetchConfigurationList API\");\n\n// Type exports\nexport type FeedbackConfigurationItem = z.infer<typeof feedbackConfigurationItemSchema>;\nexport type FetchFormConfig = z.infer<typeof fetchFormConfigSchema>;\nexport type FetchConfigurationListRequest = z.infer<typeof fetchConfigurationListSchema>;\nexport type FetchFeedbackDetailsRequest = z.infer<typeof fetchFeedbackDetailsSchema>;\nexport type FormConfigurationResponse = z.infer<typeof formConfigurationResponseSchema>;\nexport type QuestionnaireFieldsResponse = z.infer<typeof questionnaireFieldsResponseSchema>;\nexport type FetchFeedbackDetailsResponse = z.infer<typeof fetchFeedbackDetailsResponseSchema>;\nexport type FetchConfigurationListResponse = z.infer<typeof fetchConfigurationListResponseSchema>;\n", "// Main entry point for encatch-typescript schemas\n\n// Field schema exports\nexport {\n questionTypeSchema,\n validationRuleTypeSchema,\n validationRuleSchema,\n visibilityConditionSchema,\n sectionSchema,\n questionStatusSchema,\n ratingDisplayStyleSchema,\n ratingRepresentationSizeSchema,\n multipleChoiceDisplayStyleSchema,\n multipleChoiceMultipleDisplayStyleSchema,\n choiceOrderOptionSchema,\n questionSchema,\n ratingQuestionSchema,\n annotationQuestionSchema,\n questionOptionSchema,\n nestedOptionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n combinedQuestionSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n ChoiceOrderOptions,\n // Types\n type QuestionType,\n type ValidationRule,\n type VisibilityCondition,\n type QuestionStatus,\n type Question,\n type RatingDisplayStyle,\n type RatingRepresentationSize,\n type RatingQuestion,\n type AnnotationQuestion,\n type QuestionOption,\n type NestedOption,\n type MultipleChoiceDisplayStyle,\n type MultipleChoiceSingleQuestion,\n type MultipleChoiceMultipleDisplayStyle,\n type MultipleChoiceMultipleQuestion,\n type NpsQuestion,\n type ShortAnswerQuestion,\n type LongAnswerQuestion,\n type ChoiceOrderOption,\n type NestedDropdownQuestion,\n type Section,\n type CombinedQuestion,\n} from \"./schemas/fields/field-schema\";\n\n// Answer schema exports\nexport {\n AnnotationMarkerSchema,\n AnnotationSchema,\n AnswerItemSchema,\n QuestionsResponseSchema,\n AnswerSchema,\n type AnnotationMarker,\n type Annotation,\n type AnswerItem,\n type QuestionsResponse,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n surveyTypeSchema,\n yesNoSchema,\n recurringUnitSchema,\n frequencyAndSchedulingPropertiesSchema,\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n SurveyTypes,\n YesNoValues,\n RecurringUnits,\n PublicationStatuses,\n // Schemas\n// durationSchema,\n // Types\n type SurveyType,\n type YesNo,\n type RecurringUnit,\n type PublicationStatus,\n// type Duration,\n type FeedbackConfiguration,\n type FrequencyAndSchedulingProperties,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n welcomeScreenPropertiesSchema,\n endScreenPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type WelcomeScreenProperties,\n type EndScreenProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n dismissBehaviorSchema,\n WelcomeScreenFieldsSchema,\n EndScreenFieldsSchema,\n WelcomeFieldsTranslationSchema,\n EndFieldsTranslationSchema,\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Enum constants\n DismissBehaviors,\n // Types\n type WelcomeFields,\n type EndFields,\n type WelcomeFieldsTranslation,\n type EndFieldsTranslation,\n type OtherFields,\n type OtherFieldsTranslation,\n type LanguageField,\n type Languages,\n} from \"./schemas/fields/other-screen-schema\";\n\n// Theme schema exports\nexport {\n positionSchema,\n themeModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ThemeConfiguration,\n} from \"./schemas/fields/theme-schema\";\n\n// Translations schema exports\nexport {\n translationEntrySchema,\n ratingQuestionTranslationSchema,\n singleChoiceQuestionTranslationSchema,\n multipleChoiceQuestionTranslationSchema,\n npsQuestionTranslationSchema,\n shortAnswerQuestionTranslationSchema,\n longAnswerQuestionTranslationSchema,\n nestedSelectionQuestionTranslationSchema,\n annotationQuestionTranslationSchema,\n questionTranslationSchema,\n questionCentricTranslationsSchema,\n translationsSchema,\n TranslationProvider,\n createTranslationProvider,\n type TranslationEntry,\n type RatingQuestionTranslation,\n type SingleChoiceQuestionTranslation,\n type MultipleChoiceQuestionTranslation,\n type NpsQuestionTranslation,\n type ShortAnswerQuestionTranslation,\n type LongAnswerQuestionTranslation,\n type NestedSelectionQuestionTranslation,\n type AnnotationQuestionTranslation,\n type QuestionTranslation,\n type QuestionCentricTranslations,\n type Translations,\n} from \"./schemas/fields/translations-schema\";\n\n// Auto trigger schema exports\nexport {\n customEventFieldOperatorSchema,\n customEventFieldSchema,\n conditionalIfMetadataSchema,\n queryOutputSchema,\n conditionalIfSchema,\n triggerActionSchema,\n conditionalWhenSchema,\n filterConditionSchema,\n categorySpecificFiltersSchema,\n whoSchema,\n audienceSegmentSchema,\n audienceTriggerPropertiesSchema,\n type CustomEventFieldOperator,\n type CustomEventField,\n type ConditionalIfMetadata,\n type QueryOutput,\n type ConditionalIf,\n type TriggerAction,\n type ConditionalWhen,\n type FilterCondition,\n type CategorySpecificFilters,\n type Who,\n type AudienceSegment,\n type AudienceTriggerProperties,\n} from \"./schemas/fields/auto-trigger-schema\";\n\n// Master properties schema exports\nexport {\n masterPropertiesSchema,\n type MasterProperties,\n} from \"./schemas/fields/other-properties-schema\";\n\n// Device and session info schema exports\nexport {\n deviceThemeSchema,\n deviceInfoSchema,\n sessionInfoSchema,\n deviceSessionInfoSchema,\n userPropertiesSchema,\n userInfoSchema,\n // Enum constants\n DeviceThemes,\n // Types\n type DeviceTheme,\n type DeviceInfo,\n type SessionInfo,\n type DeviceSessionInfo,\n type UserProperties,\n type UserInfo,\n} from \"./schemas/api/other-schema\";\n\n// Submit feedback schema exports\nexport {\n userActionSchema,\n formConfigSchema,\n questionResponseSchema,\n responseSchema,\n matchedTriggerPropertiesSchema,\n baseSubmitFeedbackSchema,\n viewFeedbackSchema,\n submitFeedbackSchema,\n feedbackRequestSchema,\n // Enum constants\n UserActions,\n // Types\n type UserAction,\n type FormConfig,\n type QuestionResponse,\n type Response,\n type MatchedTriggerProperties,\n type BaseSubmitFeedback,\n type ViewFeedback,\n type SubmitFeedback,\n type FeedbackRequest,\n} from \"./schemas/api/submit-feedback-schema\";\n\n// Fetch feedback schema exports\nexport {\n feedbackConfigurationItemSchema,\n fetchFormConfigSchema,\n fetchConfigurationListSchema,\n fetchFeedbackDetailsSchema,\n formConfigurationResponseSchema,\n questionnaireFieldsResponseSchema,\n fetchFeedbackDetailsResponseSchema,\n fetchConfigurationListResponseSchema,\n // Types\n type FeedbackConfigurationItem,\n type FetchFormConfig,\n type FetchConfigurationListRequest,\n type FetchFeedbackDetailsRequest,\n type FormConfigurationResponse,\n type QuestionnaireFieldsResponse,\n type FetchFeedbackDetailsResponse,\n type FetchConfigurationListResponse,\n} from \"./schemas/api/fetch-feedback-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
5
+ "mappings": ";;;;AAAA,SAAS,SAAS;AAGX,IAAM,qBAAqB,EAC/B,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS,6DAA6D;AAGlE,IAAM,gBAAgB;AAAA,EAC3B,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,KAAK;AAAA,EACL,kBAAkB;AAAA,EAClB,0BAA0B;AAAA,EAC1B,cAAc;AAAA,EACd,WAAW;AAAA,EACX,YAAY;AACd;AAGO,IAAM,2BAA2B,EACrC,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS,oDAAoD;AAGzD,IAAM,sBAAsB;AAAA,EACjC,UAAU;AAAA,EACV,KAAK;AAAA,EACL,KAAK;AAAA,EACL,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AAAA,EACL,QAAQ;AACV;AAGO,IAAM,uBAAuB,EACjC,OAAO;AAAA,EACN,MAAM,yBAAyB,SAAS,kCAAkC;AAAA,EAC1E,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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