@encatch/schema 1.1.0-beta.12 → 1.1.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/schemas/fields/field-schema.ts", "../../src/schemas/fields/translations-schema.ts", "../../src/schemas/fields/answer-schema.ts", "../../src/schemas/fields/form-schema.ts", "../../src/schemas/fields/form-properties-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/schemas/api/refine-text-schema.ts", "../../src/helpers/case-convert-helper.ts", "../../src/schemas/fields/app-props-schema.ts", "../../src/index.ts"],
4
- "sourcesContent": ["import { z } from \"zod\";\nimport { sectionTranslationsByLanguageSchema } from \"./translations-schema\";\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 \"welcome\",\n \"thank_you\",\n \"message_panel\",\n \"yes_no\",\n \"rating_matrix\",\n \"matrix_single_choice\",\n \"matrix_multiple_choice\",\n \"exit_form\",\n \"consent\",\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 WELCOME: \"welcome\" as const,\n THANK_YOU: \"thank_you\" as const,\n MESSAGE_PANEL: \"message_panel\" as const,\n YES_NO: \"yes_no\" as const,\n RATING_MATRIX: \"rating_matrix\" as const,\n MATRIX_SINGLE_CHOICE: \"matrix_single_choice\" as const,\n MATRIX_MULTIPLE_CHOICE: \"matrix_multiple_choice\" as const,\n EXIT_FORM: \"exit_form\" as const,\n CONSENT: \"consent\" 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 description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text for the section\"),\n showTitle: z\n .boolean()\n .default(true)\n .describe(\"Whether to show the section title in the UI\"),\n showDescription: z\n .boolean()\n .default(true)\n .describe(\"Whether to show the section description in the UI\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\"Label for the next button when navigating from this section\"),\n translations: sectionTranslationsByLanguageSchema\n .optional()\n .describe(\n \"Per-language section copy (title, optional description and nextButtonLabel), keyed by language code\"\n ),\n inAppSingleQuestion: z\n .boolean()\n .default(false)\n .describe(\n \"When true, the native app shows one question at a time within this section\"\n ),\n isPreviousAllowed: z\n .boolean()\n .default(false)\n .optional()\n .describe(\n \"When the global previousButton mode is 'auto', controls whether the Previous button is shown for this section. Defaults to false (hidden).\"\n ),\n questionIds: 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// Display layout for yes/no questions (side-by-side vs stacked)\nexport const yesNoDisplayStyleSchema = z.enum([\"horizontal\", \"vertical\"]);\n\n// Constants for yes/no display styles (explicit literal values for proper type inference)\nexport const YesNoDisplayStyles = {\n HORIZONTAL: \"horizontal\" as const,\n VERTICAL: \"vertical\" 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 slug: z\n .string()\n .min(1)\n .max(128)\n .optional()\n .describe(\n \"Optional stable identifier for the question (e.g. URLs, analytics, or integrations)\"\n ),\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 isHidden: z\n .boolean()\n .default(false)\n .describe(\"When true, the question is hidden from the form UI\"),\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 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 textAlign: z\n .enum([\"left\", \"center\", \"justify\"])\n .optional()\n .default(\"left\")\n .describe(\n \"Text alignment for the question title and description; `justify` is intended for consent questions (full-width justified consent body markdown)\"\n ),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\n \"Label for the next button when advancing past this question (overrides section or form defaults when set)\"\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// Welcome question schema (display-only screen, no answer captured)\nexport const welcomeQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"welcome\")\n .describe(\"Must be exactly 'welcome'\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main heading displayed on the welcome screen\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional sub-text body shown below the heading\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL displayed on the welcome screen\"),\n })\n .describe(\"Schema for a welcome screen displayed at the start or inline within a form\");\n\n// Thank you question schema (display-only screen, no answer captured)\nexport const thankYouQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"thank_you\")\n .describe(\"Must be exactly 'thank_you'\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main heading displayed on the thank you screen\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\n \"Optional thank you body text; rendered as Markdown where the form supports it\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL displayed on the thank you screen\"),\n })\n .describe(\n \"Schema for a thank you screen shown at the end or inline within a form\"\n );\n\n// Message panel question schema (display-only informational panel, same shape as welcome; no answer captured)\nexport const messagePanelQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"message_panel\")\n .describe(\"Must be exactly 'message_panel'\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main heading displayed on the message panel\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional body text shown below the heading\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL displayed on the message panel\"),\n })\n .describe(\n \"Schema for an inline message panel (informational); distinct from welcome for UI semantics and analytics\"\n );\n\n// Exit form question schema (no UI \u2014 signals end of survey; used in branch logic to terminate a path without a thank-you screen)\nexport const exitFormQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"exit_form\")\n .describe(\"Must be exactly 'exit_form'\"),\n })\n .describe(\n \"Schema for an exit marker that silently ends the survey; carries no UI and captures no answer \u2014 intended for branch logic paths that should terminate without showing a thank-you screen\"\n );\n\n// Yes/no question schema (binary answer stored as boolean in responses)\nexport const yesNoQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"yes_no\")\n .describe(\"Must be exactly 'yes_no'\"),\n yesLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\"Label for the Yes option (defaults to 'Yes' in the UI if omitted)\"),\n noLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\"Label for the No option (defaults to 'No' in the UI if omitted)\"),\n displayStyle: yesNoDisplayStyleSchema\n .optional()\n .describe(\"Layout for the Yes/No controls (horizontal row or vertical stack)\"),\n })\n .describe(\"Schema for yes/no questions with optional custom labels and layout\");\n\n// Consent question schema (single checkbox \u2014 answer is boolean true/false)\nexport const consentQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"consent\")\n .describe(\"Must be exactly 'consent'\"),\n })\n .describe(\n \"Schema for a single-checkbox consent question; use description (rendered as markdown) for the checkbox label text and any policy/terms links; answer is boolean (true = checked)\"\n );\n\n// \u2500\u2500\u2500 Rating Matrix \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Display style enum for rating matrix scale points (how each scale choice looks per row)\nexport const ratingMatrixDisplayStyleSchema = z.enum([\n \"radio\",\n \"star\",\n \"emoji\",\n \"button\",\n]);\n\n// Constants for rating matrix display styles (explicit literal values for proper type inference)\nexport const RatingMatrixDisplayStyles = {\n RADIO: \"radio\" as const,\n STAR: \"star\" as const,\n EMOJI: \"emoji\" as const,\n BUTTON: \"button\" as const,\n} as const;\n\n// Individual statement (row) for rating matrix questions\nexport const ratingMatrixStatementSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this statement (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Internal value / export key for this statement\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display text shown to users for this statement\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this statement\"),\n })\n .describe(\"Schema for an individual statement (row) in a rating matrix\");\n\n// A single point on a custom rating scale\nexport const ratingMatrixScalePointSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this scale point\"),\n value: z\n .union([z.number(), z.string()])\n .describe(\"Stored response value for this scale point (number or string)\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display label shown for this scale point\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this scale point\"),\n })\n .describe(\"Schema for a single point on a custom rating scale\");\n\n// Scale configuration \u2013 discriminated on kind\nexport const ratingMatrixScaleSchema = z\n .discriminatedUnion(\"kind\", [\n // Likert: symmetric ordinal scale -2\u2026+2, explicit scale points with labels\n z.object({\n kind: z.literal(\"likert\").describe(\"Symmetric ordinal scale (-2 to +2)\"),\n scalePoints: z\n .array(ratingMatrixScalePointSchema)\n .min(2)\n .max(10)\n .describe(\"Scale points with display labels for each column\"),\n }),\n // Numerical: 1\u2026N points where N is 2, 3, 4, or 5, explicit scale points with labels\n z.object({\n kind: z.literal(\"numerical\").describe(\"Numerical scale from 1 to N\"),\n scalePoints: z\n .array(ratingMatrixScalePointSchema)\n .min(2)\n .max(10)\n .describe(\"Scale points with display labels for each column\"),\n pointCount: z\n .union([z.literal(2), z.literal(3), z.literal(4), z.literal(5)])\n .describe(\"Number of scale points (2, 3, 4, or 5)\"),\n }),\n // Custom: consumer defines each point's value and label\n z.object({\n kind: z.literal(\"custom\").describe(\"Custom scale with user-defined points and values\"),\n scalePoints: z\n .array(ratingMatrixScalePointSchema)\n .min(2)\n .max(10)\n .describe(\"Scale points with display labels for each column\"),\n }),\n ])\n .describe(\"Scale configuration for rating matrix questions\");\n\n// Rating matrix question schema\nexport const ratingMatrixQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating_matrix\")\n .describe(\"Must be exactly 'rating_matrix'\"),\n statements: z\n .array(ratingMatrixStatementSchema)\n .min(1)\n .max(10)\n .describe(\"Statements (rows) users will rate on the shared scale (1-10)\"),\n scale: ratingMatrixScaleSchema\n .describe(\"Scale configuration shared across all statement rows\"),\n displayStyle: ratingMatrixDisplayStyleSchema\n .optional()\n .describe(\n \"Visual representation of scale points per row (radio buttons, stars, emoji, or buttons)\"\n ),\n randomizeStatements: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of statements\"),\n })\n .describe(\"Schema for rating matrix questions with multiple statements on a shared scale\");\n\n// \u2500\u2500\u2500 Matrix Single Choice \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Shared row schema for matrix choice questions\nexport const matrixRowSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this row (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Internal value / export key for this row\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display text shown to users for this row\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this row\"),\n })\n .describe(\"Schema for an individual row in a matrix choice question\");\n\n// Slim column schema for matrix choice questions (no imageUrl unlike questionOptionSchema)\nexport const matrixColumnSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this column (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Internal value / export key for this column\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display label shown for this column\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this column\"),\n })\n .describe(\"Schema for an individual column in a matrix choice question\");\n\n// Matrix single choice question schema (one column selected per row)\nexport const matrixSingleChoiceQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"matrix_single_choice\")\n .describe(\"Must be exactly 'matrix_single_choice'\"),\n rows: z\n .array(matrixRowSchema)\n .min(1)\n .max(20)\n .describe(\"Row items (1-20 rows)\"),\n columns: z\n .array(matrixColumnSchema)\n .min(2)\n .max(10)\n .describe(\"Column options shared across all rows (2-10 columns)\"),\n randomizeRows: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of rows\"),\n randomizeColumns: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of columns\"),\n })\n .describe(\"Schema for matrix single-choice questions where one column is selected per row\");\n\n// \u2500\u2500\u2500 Matrix Multiple Choice \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Matrix multiple choice question schema (one or more columns selected per row)\nexport const matrixMultipleChoiceQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"matrix_multiple_choice\")\n .describe(\"Must be exactly 'matrix_multiple_choice'\"),\n rows: z\n .array(matrixRowSchema)\n .min(1)\n .max(20)\n .describe(\"Row items (1-20 rows)\"),\n columns: z\n .array(matrixColumnSchema)\n .min(2)\n .max(10)\n .describe(\"Column options shared across all rows (2-10 columns)\"),\n minSelectionsPerRow: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of columns a user must select per row\"),\n maxSelectionsPerRow: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of columns a user can select per row\"),\n randomizeRows: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of rows\"),\n randomizeColumns: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of columns\"),\n })\n .refine(\n (data) => {\n if (\n data.minSelectionsPerRow !== undefined &&\n data.maxSelectionsPerRow !== undefined\n ) {\n return data.minSelectionsPerRow <= data.maxSelectionsPerRow;\n }\n return true;\n },\n {\n message: \"minSelectionsPerRow cannot be greater than maxSelectionsPerRow\",\n path: [\"minSelectionsPerRow\"],\n }\n )\n .describe(\n \"Schema for matrix multiple-choice questions where one or more columns can be selected per row\"\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 allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow a custom \"other\" option'),\n otherTextConfig: z\n .object({\n minChars: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required for the other text\"),\n maxChars: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of characters allowed for the other text\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the other text input\"),\n })\n .optional()\n .describe('Configuration for the custom \"other\" text input'),\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 allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow a custom \"other\" option'),\n otherTextConfig: z\n .object({\n minChars: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required for the other text\"),\n maxChars: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of characters allowed for the other text\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the other text input\"),\n })\n .optional()\n .describe('Configuration for the custom \"other\" text input'),\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 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 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 QuestionTextAlign = \"left\" | \"center\";\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 WelcomeQuestion = z.infer<typeof welcomeQuestionSchema>;\nexport type ThankYouQuestion = z.infer<typeof thankYouQuestionSchema>;\nexport type MessagePanelQuestion = z.infer<typeof messagePanelQuestionSchema>;\nexport type ExitFormQuestion = z.infer<typeof exitFormQuestionSchema>;\nexport type YesNoDisplayStyle = z.infer<typeof yesNoDisplayStyleSchema>;\nexport type YesNoQuestion = z.infer<typeof yesNoQuestionSchema>;\nexport type ConsentQuestion = z.infer<typeof consentQuestionSchema>;\nexport type RatingMatrixStatement = z.infer<typeof ratingMatrixStatementSchema>;\nexport type RatingMatrixScalePoint = z.infer<typeof ratingMatrixScalePointSchema>;\nexport type RatingMatrixScale = z.infer<typeof ratingMatrixScaleSchema>;\nexport type RatingMatrixDisplayStyle = z.infer<typeof ratingMatrixDisplayStyleSchema>;\nexport type RatingMatrixQuestion = z.infer<typeof ratingMatrixQuestionSchema>;\nexport type MatrixRow = z.infer<typeof matrixRowSchema>;\nexport type MatrixColumn = z.infer<typeof matrixColumnSchema>;\nexport type MatrixSingleChoiceQuestion = z.infer<typeof matrixSingleChoiceQuestionSchema>;\nexport type MatrixMultipleChoiceQuestion = z.infer<typeof matrixMultipleChoiceQuestionSchema>;\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 welcomeQuestionSchema,\n thankYouQuestionSchema,\n messagePanelQuestionSchema,\n exitFormQuestionSchema,\n yesNoQuestionSchema,\n consentQuestionSchema,\n ratingMatrixQuestionSchema,\n matrixSingleChoiceQuestionSchema,\n matrixMultipleChoiceQuestionSchema,\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 welcomeQuestionSchema>\n | z.infer<typeof thankYouQuestionSchema>\n | z.infer<typeof messagePanelQuestionSchema>\n | z.infer<typeof exitFormQuestionSchema>\n | z.infer<typeof yesNoQuestionSchema>\n | z.infer<typeof consentQuestionSchema>\n | z.infer<typeof ratingMatrixQuestionSchema>\n | z.infer<typeof matrixSingleChoiceQuestionSchema>\n | z.infer<typeof matrixMultipleChoiceQuestionSchema>\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\";\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// Base fields shared by all question translation schemas\nexport const baseQuestionTranslationFieldsSchema = z.object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n nextButtonLabel: translationEntrySchema\n .max(50)\n .optional()\n .describe(\"Next button label translation when advancing past this question\"),\n});\n\n// Keys present on every question translation (used in refine allowlists)\nexport const BASE_QUESTION_TRANSLATION_KEYS = [\n \"type\",\n \"title\",\n \"description\",\n \"errorMessage\",\n \"nextButtonLabel\",\n] as const;\n\n// Rating question translation schema with type field\nexport const ratingQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"rating\").describe(\"Question type identifier\"),\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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"single_choice\").describe(\"Question type identifier\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"multiple_choice_multiple\").describe(\"Question type identifier\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"nps\").describe(\"Question type identifier\"),\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(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) =>\n ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"short_answer\").describe(\"Question type identifier\"),\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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"long_text\").describe(\"Question type identifier\"),\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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"nested_selection\").describe(\"Question type identifier\"),\n placeholder: translationEntrySchema.optional().describe(\"Dropdown placeholder translation\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"annotation\").describe(\"Question type identifier\"),\n annotationText: translationEntrySchema.optional().describe(\"Annotation display text translation\"),\n noAnnotationText: translationEntrySchema\n .optional()\n .describe(\"No annotation display text translation\"),\n })\n .describe(\"Translation schema for annotation questions\");\n\n// Welcome question translation schema with type field\nexport const welcomeQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"welcome\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for welcome screen questions\");\n\n// Thank you question translation schema with type field\nexport const thankYouQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"thank_you\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for thank you screen questions\");\n\n// Message panel question translation schema with type field (same shape as welcome)\nexport const messagePanelQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"message_panel\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for message panel questions\");\n\n// Consent question translation schema with type field\nexport const consentQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"consent\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for consent questions; description carries the translated checkbox label (markdown supported)\");\n\n// Yes/no question translation schema with type field\nexport const yesNoQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"yes_no\").describe(\"Question type identifier\"),\n yesLabel: translationEntrySchema.optional().describe(\"Translated Yes label\"),\n noLabel: translationEntrySchema.optional().describe(\"Translated No label\"),\n })\n .describe(\"Translation schema for yes/no questions\");\n\n// Rating matrix question translation schema with type field\nexport const ratingMatrixQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"rating_matrix\").describe(\"Question type identifier\"),\n minLabel: translationEntrySchema.optional().describe(\n \"Translated scale minimum end label (for likert and numerical kinds)\"\n ),\n maxLabel: translationEntrySchema.optional().describe(\n \"Translated scale maximum end label (for likert and numerical kinds)\"\n ),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) =>\n ![...BASE_QUESTION_TRANSLATION_KEYS, \"minLabel\", \"maxLabel\"].includes(\n key as any\n )\n );\n return additionalKeys.every(\n (key) =>\n /^statement\\..+\\.label$/.test(key) ||\n /^scalePoint\\..+\\.label$/.test(key)\n );\n },\n {\n message:\n \"Additional keys must follow 'statement.{id}.label' or 'scalePoint.{id}.label'\",\n }\n )\n .describe(\"Translation schema for rating matrix questions\");\n\n// Matrix single-choice question translation schema with type field\nexport const matrixSingleChoiceQuestionTranslationSchema =\n baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"matrix_single_choice\").describe(\"Question type identifier\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => !BASE_QUESTION_TRANSLATION_KEYS.includes(key as any)\n );\n return additionalKeys.every(\n (key) =>\n /^row\\..+\\.label$/.test(key) || /^column\\..+\\.label$/.test(key)\n );\n },\n {\n message:\n \"Additional keys must follow 'row.{id}.label' or 'column.{id}.label'\",\n }\n )\n .describe(\"Translation schema for matrix single-choice questions\");\n\n// Matrix multiple-choice question translation schema with type field\nexport const matrixMultipleChoiceQuestionTranslationSchema =\n baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"matrix_multiple_choice\").describe(\"Question type identifier\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => !BASE_QUESTION_TRANSLATION_KEYS.includes(key as any)\n );\n return additionalKeys.every(\n (key) =>\n /^row\\..+\\.label$/.test(key) || /^column\\..+\\.label$/.test(key)\n );\n },\n {\n message:\n \"Additional keys must follow 'row.{id}.label' or 'column.{id}.label'\",\n }\n )\n .describe(\"Translation schema for matrix multiple-choice 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 welcomeQuestionTranslationSchema,\n thankYouQuestionTranslationSchema,\n messagePanelQuestionTranslationSchema,\n yesNoQuestionTranslationSchema,\n consentQuestionTranslationSchema,\n ratingMatrixQuestionTranslationSchema,\n matrixSingleChoiceQuestionTranslationSchema,\n matrixMultipleChoiceQuestionTranslationSchema,\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// Section translation schema (one object per language, same pattern as question translations)\nexport const sectionTranslationSchema = z\n .object({\n title: translationEntrySchema\n .max(200)\n .describe(\"Section title translation\"),\n description: translationEntrySchema\n .max(1000)\n .optional()\n .describe(\"Section description translation\"),\n nextButtonLabel: translationEntrySchema\n .max(50)\n .optional()\n .describe(\"Next button label translation for this section\"),\n })\n .describe(\"Translation payload for a section in a single language\");\n\n// Section translations keyed by language code\nexport const sectionTranslationsByLanguageSchema = z\n .record(languageCodeSchema, sectionTranslationSchema)\n .describe(\"Section translations keyed by language code\");\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>;\nexport type WelcomeQuestionTranslation = z.infer<typeof welcomeQuestionTranslationSchema>;\nexport type ThankYouQuestionTranslation = z.infer<typeof thankYouQuestionTranslationSchema>;\nexport type MessagePanelQuestionTranslation = z.infer<typeof messagePanelQuestionTranslationSchema>;\nexport type YesNoQuestionTranslation = z.infer<typeof yesNoQuestionTranslationSchema>;\nexport type ConsentQuestionTranslation = z.infer<typeof consentQuestionTranslationSchema>;\nexport type RatingMatrixQuestionTranslation = z.infer<typeof ratingMatrixQuestionTranslationSchema>;\nexport type MatrixSingleChoiceQuestionTranslation = z.infer<typeof matrixSingleChoiceQuestionTranslationSchema>;\nexport type MatrixMultipleChoiceQuestionTranslation = z.infer<typeof matrixMultipleChoiceQuestionTranslationSchema>;\n\n// Union type for all question translations\nexport type QuestionTranslation = z.infer<typeof questionTranslationSchema>;\n\nexport type SectionTranslation = z.infer<typeof sectionTranslationSchema>;\nexport type SectionTranslationsByLanguage = z.infer<\n typeof sectionTranslationsByLanguageSchema\n>;\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// Annotation marker schema\nexport const AnnotationMarkerSchema = z.object({\n markerNo: z.string(),\n timeline: z.string(),\n comment: z.string(),\n});\n\n// Annotation schema\nexport const AnnotationSchema = z.object({\n fileType: z.string(),\n fileName: 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 nestedSelection: z\n .array(z.string())\n .optional()\n .describe(\"Array of selected nested option IDs\"),\n longText: z\n .string()\n .optional()\n .describe(\"Long text answer, e.g., paragraph or essay\"),\n shortAnswer: z\n .string()\n .optional()\n .describe(\"Short text answer, e.g., single sentence or word\"),\n singleChoice: z\n .string()\n .optional()\n .describe(\n \"single selected option ID (for single choice questions)\"\n ),\n rating: z.number().optional().describe(\"Star rating value (e.g., 1-5)\"),\n yesNo: z\n .boolean()\n .optional()\n .describe(\"Yes/no answer for yes_no questions (true = Yes, false = No)\"),\n consent: z\n .boolean()\n .optional()\n .describe(\"Consent answer for consent questions (true = checked/agreed, false = unchecked)\"),\n multipleChoiceMultiple: z\n .array(z.string())\n .optional()\n .describe(\"Array of selected option IDs for multiple choice questions\"),\n singleChoiceOther: z\n .string()\n .optional()\n .describe(\n 'Free-text \"other\" answer for single choice questions when allowOther is enabled'\n ),\n multipleChoiceOther: z\n .string()\n .optional()\n .describe(\n 'Free-text \"other\" answer for multiple choice questions when allowOther is enabled'\n ),\n annotation: AnnotationSchema.optional().describe(\n \"Annotation object containing file and marker details\"\n ),\n ratingMatrix: z\n .record(z.string(), z.union([z.number(), z.string()]))\n .optional()\n .describe(\n \"Rating matrix answers keyed by statement value (export key), value is the selected scale value (number for likert/numerical, string for custom)\"\n ),\n matrixSingleChoice: z\n .record(z.string(), z.string())\n .optional()\n .describe(\n \"Matrix single-choice answers keyed by row value (export key), map value is the selected column option value\"\n ),\n matrixMultipleChoice: z\n .record(z.string(), z.array(z.string()))\n .optional()\n .describe(\n \"Matrix multiple-choice answers keyed by row value (export key), map value is array of selected column option values\"\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// 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 Answer = z.infer<typeof AnswerSchema>;\n", "import { z } from \"zod\";\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// Feedback configuration schema\nexport const feedbackConfigurationSchema = 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 isPublished: 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 PublicationStatus = z.infer<typeof publicationStatusSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport {\n feedbackConfigurationSchema,\n externalPublishingPropertiesSchema,\n} from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema } 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 .describe(\"Other form configuration fields including 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 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// 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 feedbackConfigurationId: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedbackConfiguration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaireFields: 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 selectedLanguages: 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 externalPublishingProperties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audienceTriggerProperties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n otherConfigurationProperties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n appearanceProperties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including publishing, audience targeting, configuration, 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\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\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 aiEnhancementSuccessMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Message shown when AI enhancement is successful (max 100 characters)\"),\n aiEnhancementCooldownErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Message shown when AI enhancement is on cooldown (max 100 characters)\"),\n aiEnhancementMaxReachedErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Message shown when maximum AI enhancements reached (max 100 characters)\"),\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 })\n .describe(\"Schema for individual language field with value and label\");\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 aiEnhancementSuccessMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Translated message shown when AI enhancement is successful (max 100 characters)\"),\n aiEnhancementCooldownErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Translated message shown when AI enhancement is on cooldown (max 100 characters)\"),\n aiEnhancementMaxReachedErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Translated message shown when maximum AI enhancements reached (max 100 characters)\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\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// Shareable mode: light, dark, or follow system preference\nexport const shareableModeSchema = z\n .enum([\"light\", \"dark\", \"system\"])\n .describe(\n \"Display mode for the shareable widget: light, dark, or system preference\"\n );\n\nexport const ShareableModes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n SYSTEM: \"system\" as const,\n} as const;\n\n// Previous button visibility mode enum\nexport const previousButtonModeSchema = z\n .enum([\"never\", \"always\", \"auto\"])\n .describe(\n \"Previous button visibility: never (always hidden), always (always shown), or auto (per-section via isPreviousAllowed)\"\n );\n\nexport const PreviousButtonModes = {\n NEVER: \"never\" as const,\n ALWAYS: \"always\" as const,\n AUTO: \"auto\" 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 .default(false)\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .default(true)\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .default(true)\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .default(true)\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\"),\n fontFamily: z\n .string()\n .optional()\n .default(\"default\")\n .describe(\"Font family to use for the widget\"),\n shareableMode: shareableModeSchema\n .optional()\n .default(ShareableModes.LIGHT)\n .describe(\n \"Display mode for the shareable: light, dark, or system preference\"\n ),\n enableShareableKeyboardNavigation: z\n .boolean()\n .default(false)\n .describe(\n \"Whether keyboard navigation is enabled for the shareable widget experience\"\n ),\n rtl: z\n .boolean()\n .default(false)\n .describe(\"Whether right-to-left text direction is enabled\"),\n previousButton: previousButtonModeSchema\n .default(PreviousButtonModes.ALWAYS)\n .describe(\"Previous button: never (hidden) or always (shown)\"),\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme (shadcn variables per mode)\nexport const themeColorsSchema = z\n .object({\n theme: z\n .string()\n .optional()\n .describe(\"Theme for a single mode (shadcn variables JSON)\"),\n })\n .describe(\"Theme for a single mode (shadcn variables)\");\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.describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema.describe(\n \"UI feature settings controlling widget behavior\"\n ),\n selectedPosition: positionSchema.describe(\n \"Selected position for the main widget\"\n ),\n selectedIconPosition: positionSchema.describe(\n \"Selected position for the widget icon\"\n ),\n })\n .describe(\n \"Complete theme and UI configuration including colors, features, and positioning\"\n );\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type ShareableMode = z.infer<typeof shareableModeSchema>;\nexport type PreviousButtonMode = z.infer<typeof previousButtonModeSchema>;\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 mandatoryFetchConfigAtPaths: z\n .array(z.string())\n .describe(\"Array of paths where configuration must be fetched from server when navigated by user\"),\n configSyncIntervalSeconds: z\n .number()\n .int()\n .positive()\n .describe(\"Interval in seconds for configuration synchronization between client and server\"),\n disableAllSurvey: z\n .boolean()\n .describe(\"Flag to disable all surveys globally\"),\n feedbackIntervalDuration: 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 $deviceId: z.string().describe(\"Unique device identifier\"),\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 $timestamp: z.string().optional().describe(\"ISO timestamp of the session\"),\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(\n \"Counter properties for user tracking (can be positive or negative)\"\n )\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(\n \"Properties to set once for the user (won't overwrite existing values)\"\n )\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 .loose() // Allow additional user properties\n .describe(\n \"User properties including counters, set operations, and other dynamic data\"\n );\n\n// User info schema\nexport const userInfoSchema = z\n .object({\n userName: z.string().email().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 {\n deviceInfoSchema,\n sessionInfoSchema,\n userInfoSchema,\n} from \"./other-schema\";\nimport { AnswerSchema } from \"../fields/answer-schema\";\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 isPartialSubmit: z\n .boolean()\n .describe(\"Whether this is a partial submission (true) or full submission (false)\"),\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 error: z.string().optional().describe(\"Error message if any validation failed\"),\n isOnPath: z\n .boolean()\n .optional()\n .describe(\n \"When present, whether this question was on the respondent's navigation path (e.g. logic jumps); false for questions not reached\"\n ),\n timeSpentMs: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\n \"Milliseconds the respondent spent on this question (even split across all visible questions in the section)\"\n ),\n isPathTraversed: z\n .boolean()\n .optional()\n .describe(\n \"Whether this question was on the logical traversal path \u2014 true for visible questions and hidden questions whose rules were evaluated, false for questions never reached\"\n ),\n })\n .describe(\"Response to a specific question in the feedback form\");\n\n// Response schema (contains question responses)\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.string().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.optional().describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n matchedTriggerProperties: matchedTriggerPropertiesSchema.optional().describe(\n \"Properties of the matched trigger\"\n ),\n customProperties: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"Custom properties for advanced use cases\"),\n })\n .describe(\"Base submit feedback request schema\");\n\n// Partial feedback schema (isPartialSubmit: true, response optional)\nexport const partialFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n isPartialSubmit: z\n .literal(true)\n .describe(\"Indicates this is a partial submission\"),\n }),\n response: responseSchema.optional().describe(\"User responses (optional for partial submit)\"),\n })\n .describe(\"Partial feedback request schema (response optional)\");\n\n// Full submit feedback schema (isPartialSubmit: false, response required)\nexport const submitFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n isPartialSubmit: z\n .literal(false)\n .describe(\"Indicates this is a full submission\"),\n }),\n response: responseSchema.describe(\"User responses (required for full submit)\"),\n })\n .describe(\"Full submit feedback request schema (response required)\");\n\n// Union schema for both cases (using regular union instead of discriminated union)\nexport const feedbackRequestSchema = z\n .union([partialFeedbackSchema, submitFeedbackSchema])\n .describe(\"Union schema for both partial and full feedback submissions\");\n\n// Type exports\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<\n typeof matchedTriggerPropertiesSchema\n>;\nexport type BaseSubmitFeedback = z.infer<typeof baseSubmitFeedbackSchema>;\nexport type PartialFeedback = z.infer<typeof partialFeedbackSchema>;\nexport type SubmitFeedback = z.infer<typeof submitFeedbackSchema>;\nexport type FeedbackRequest = z.infer<typeof feedbackRequestSchema>;\n", "import { z } from \"zod\";\nimport {\n deviceInfoSchema,\n sessionInfoSchema,\n userInfoSchema,\n} from \"./other-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"../fields/field-schema\";\nimport { LanguagesSchema } from \"../fields/other-screen-schema\";\nimport {\n otherConfigurationPropertiesSchema,\n appearancePropertiesSchema,\n} from \"../fields/form-properties-schema\";\nimport { masterPropertiesSchema } from \"../fields/other-properties-schema\";\nimport { audienceTriggerPropertiesSchema } from \"../fields/auto-trigger-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.string().describe(\"Title of the feedback configuration\"),\n // duration: durationSchema\n // .describe(\"Active duration for this feedback configuration\"),\n triggerProperties: audienceTriggerPropertiesSchema.describe(\n \"Trigger properties including auto/manual settings and audience segments\"\n ),\n appearanceProperties: z\n .object({\n themes: z\n .object({\n light: z\n .object({\n theme: z\n .string()\n .optional()\n .describe(\"Theme for light mode (shadcn variables JSON)\"),\n })\n .describe(\"Light theme\"),\n dark: z\n .object({\n theme: z\n .string()\n .optional()\n .describe(\"Theme for dark mode (shadcn variables JSON)\"),\n })\n .describe(\"Dark theme\"),\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\n .boolean()\n .describe(\"Whether custom position is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon position is enabled\"),\n customCss: z\n .string()\n .nullable()\n .optional()\n .describe(\"Custom CSS link (optional)\"),\n enableShareableKeyboardNavigation: z\n .boolean()\n .default(false)\n .describe(\n \"Whether keyboard navigation is enabled for the shareable widget experience\"\n ),\n rtl: z\n .boolean()\n .describe(\"Whether right-to-left text direction is enabled\"),\n previousButton: z\n .enum([\"never\", \"always\"])\n .describe(\"Previous button: never (hidden) or always (shown)\"),\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 force: z\n .boolean()\n .optional()\n .describe(\"Forcefully fetch eligible feedback list (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(\n \"Form configuration for the specific feedback\"\n ),\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.string().describe(\"Title of the feedback form\"),\n formDescription: z.string().describe(\"Description of the feedback form\"),\n })\n .describe(\"Form configuration response with title and description\");\n\n// Logic jump rule schema \u2014 a single conditional branch with a JSON Logic expression and target question\nexport const logicJumpRuleSchema = z\n .object({\n jsonLogic: z\n .record(z.string(), z.unknown())\n .describe(\"JSON Logic expression to evaluate\"),\n targetQuestionId: z\n .string()\n .describe(\"Question ID to navigate to when this rule matches\"),\n })\n .describe(\"A single logic jump rule mapping a condition to a target question\");\n\n// Logic jump rules schema \u2014 keyed by questionId or the special key '__workflow_start__'\nexport const logicJumpRulesSchema = z\n .record(\n z.string(),\n z.array(logicJumpRuleSchema)\n )\n .describe(\n \"Logic jump rules keyed by question ID (or '__workflow_start__'). Each entry is an ordered array of rules evaluated top-down; the first matching rule wins.\"\n );\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(\n \"Array of sections that organize questions into logical groups\"\n ),\n translations: z\n .record(z.string(), z.any())\n .describe(\n \"Translations object (can be empty or contain language-specific translations)\"\n ),\n selectedLanguages: LanguagesSchema.describe(\n \"Array of languages selected for this questionnaire\"\n ),\n isLogicJumpsEnabled: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"When true, form navigation follows logicJumpRules instead of linear section order\"),\n logicJumpRules: logicJumpRulesSchema\n .optional()\n .describe(\"Conditional navigation rules evaluated per question to determine the next question to show\"),\n contextVariables: z\n .array(z.string())\n .optional()\n .describe(\"List of context variable keys expected by the form (informational)\"),\n })\n .describe(\n \"Questionnaire fields response including questions, sections, translations, selected languages, and optional logic jump configuration\"\n );\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.describe(\n \"Form configuration with title and description\"\n ),\n questionnaireFields: questionnaireFieldsResponseSchema.describe(\n \"Questionnaire structure including questions, sections, translations, and languages\"\n ),\n otherConfigurationProperties: otherConfigurationPropertiesSchema.describe(\n \"Other configuration properties using existing schema\"\n ),\n appearanceProperties: appearancePropertiesSchema.describe(\n \"Appearance properties including theme configuration\"\n ),\n })\n .strict()\n .describe(\n \"Complete response schema for fetchFeedbackDetails API using existing field schemas\"\n );\n\n// Fetch configuration list response schema\nexport const fetchConfigurationListResponseSchema = z\n .object({\n masterProperties: masterPropertiesSchema.describe(\n \"Master properties for global survey settings\"\n ),\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<\n typeof feedbackConfigurationItemSchema\n>;\nexport type FetchFormConfig = z.infer<typeof fetchFormConfigSchema>;\nexport type FetchConfigurationListRequest = z.infer<\n typeof fetchConfigurationListSchema\n>;\nexport type FetchFeedbackDetailsRequest = z.infer<\n typeof fetchFeedbackDetailsSchema\n>;\nexport type FormConfigurationResponse = z.infer<\n typeof formConfigurationResponseSchema\n>;\nexport type QuestionnaireFieldsResponse = z.infer<\n typeof questionnaireFieldsResponseSchema\n>;\nexport type FetchFeedbackDetailsResponse = z.infer<\n typeof fetchFeedbackDetailsResponseSchema\n>;\nexport type FetchConfigurationListResponse = z.infer<\n typeof fetchConfigurationListResponseSchema\n>;\nexport type LogicJumpRule = z.infer<typeof logicJumpRuleSchema>;\nexport type LogicJumpRules = z.infer<typeof logicJumpRulesSchema>;\n", "import { z } from \"zod\";\n\n// Refine text request schema\nexport const refineTextParamsSchema = z\n .object({\n questionId: z\n .string()\n .describe(\"Unique identifier for the question\"),\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n userText: z\n .string()\n .describe(\"Original text input from the user\"),\n })\n .strict()\n .describe(\"Request schema for refining user text input\");\n\n// Refine text response schema (flat format)\n// Success: { message: \"ok\", refinedText: \"...\" }\n// Error: { status?: number, error?: string, message: \"...\" }\nexport const refineTextResponseSchema = z\n .object({\n message: z.string().optional().describe(\"Human-readable message\"),\n refinedText: z\n .string()\n .optional()\n .describe(\"Refined/improved version of the user text (success only)\"),\n status: z\n .number()\n .optional()\n .describe(\"HTTP status code (error responses)\"),\n error: z.string().optional().describe(\"Error type (error responses)\"),\n code: z.string().optional().describe(\"Error code for display mapping\"),\n })\n .describe(\"Response schema for refine text API operation\");\n\n// Legacy data schema - kept for backwards compatibility if needed\nexport const refineTextDataSchema = z\n .object({\n userText: z.string().describe(\"Original text input from the user\"),\n refinedText: z.string().describe(\"Refined/improved version of the user text\"),\n })\n .describe(\"Data containing original and refined text (legacy nested format)\");\n\n// Type exports\nexport type RefineTextParams = z.infer<typeof refineTextParamsSchema>;\nexport type RefineTextData = z.infer<typeof refineTextDataSchema>;\nexport type RefineTextResponse = z.infer<typeof refineTextResponseSchema>;", "export function convertObject<\n TInput extends object,\n TResult extends\n | ObjectToCamel<TInput>\n | ObjectToSnake<TInput>\n | ObjectToPascal<TInput>,\n>(obj: TInput, keyConverter: (arg: string) => string): TResult {\n if (obj === null || typeof obj === 'undefined' || typeof obj !== 'object') {\n return obj;\n }\n\n const out = (Array.isArray(obj) ? [] : {}) as TResult;\n for (const [k, v] of Object.entries(obj)) {\n let newKey = k;\n if (typeof k === 'string' && !k.includes('-')) {\n newKey = keyConverter(k);\n }\n\n // eslint-disable-next-line\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n out[newKey] = Array.isArray(v)\n ? (v.map(<ArrayItem extends object>(item: ArrayItem) =>\n typeof item === 'object' &&\n !(item instanceof Uint8Array) &&\n !(item instanceof Date)\n ? convertObject<\n ArrayItem,\n TResult extends ObjectToCamel<TInput>\n ? ObjectToCamel<ArrayItem>\n : TResult extends ObjectToPascal<TInput>\n ? ObjectToPascal<ArrayItem>\n : ObjectToSnake<ArrayItem>\n >(item, keyConverter)\n : item,\n ) as unknown[])\n : v instanceof Uint8Array || v instanceof Date\n ? v\n : typeof v === 'object'\n ? convertObject<\n typeof v,\n TResult extends ObjectToCamel<TInput>\n ? ObjectToCamel<typeof v>\n : TResult extends ObjectToPascal<TInput>\n ? ObjectToPascal<typeof v>\n : ObjectToSnake<typeof v>\n >(v, keyConverter)\n : (v as unknown);\n }\n return out;\n}\n\nexport function toCamel<T extends string>(term: T): ToCamel<T> {\n return (\n term.length === 1\n ? term.toLowerCase()\n : term\n .replace(/^([A-Z])/, (m) => m[0].toLowerCase())\n .replace(/[_-]([a-z0-9])/g, (m) => m[1].toUpperCase())\n ) as ToCamel<T>;\n}\n\nexport function objectToCamel<T extends object>(obj: T): ObjectToCamel<T> {\n return convertObject(obj, toCamel);\n}\n\nexport function toSnake<T extends string>(term: T): ToSnake<T> {\n let result: string = term;\n let circuitBreaker = 0;\n\n while (\n (/([a-z])([0-9])/.exec(result)?.length || 0) > 2 &&\n circuitBreaker < 10\n ) {\n result = result.replace(\n /([a-z])([0-9])/,\n (_all, $1: string, $2: string) =>\n `${$1.toLowerCase()}_${$2.toLowerCase()}`,\n );\n\n circuitBreaker += 1;\n }\n\n while (\n (/(.+?)([A-Z])/.exec(result)?.length || 0) > 2 &&\n circuitBreaker < 10\n ) {\n result = result.replace(\n /(.+?)([A-Z])/,\n (_all, $1: string, $2: string) =>\n `${$1.toLowerCase()}_${$2.toLowerCase()}`,\n );\n circuitBreaker += 1;\n }\n\n return result.toLowerCase() as ToSnake<T>;\n}\n\nexport function objectToSnake<T extends object>(obj: T): ObjectToSnake<T> {\n return convertObject(obj, toSnake);\n}\n\nexport function toPascal<T extends string>(term: T): ToPascal<T> {\n return toCamel(term).replace(/^([a-z])/, (m) =>\n m[0].toUpperCase(),\n ) as ToPascal<T>;\n}\n\nexport function objectToPascal<T extends object>(obj: T): ObjectToPascal<T> {\n return convertObject(obj, toPascal);\n}\n\nexport type ToCamel<S extends string | number | symbol> = S extends string\n ? S extends `${infer Head}_${infer Tail}`\n ? `${ToCamel<Uncapitalize<Head>>}${Capitalize<ToCamel<Tail>>}`\n : S extends `${infer Head}-${infer Tail}`\n ? `${ToCamel<Uncapitalize<Head>>}${Capitalize<ToCamel<Tail>>}`\n : Uncapitalize<S>\n : never;\n\nexport type ObjectToCamel<T extends object | undefined | null> =\n T extends undefined\n ? undefined\n : T extends null\n ? null\n : T extends Array<infer ArrayType>\n ? ArrayType extends object\n ? Array<ObjectToCamel<ArrayType>>\n : Array<ArrayType>\n : T extends Uint8Array\n ? Uint8Array\n : T extends Date\n ? Date\n : {\n [K in keyof T as K extends `${string}-${string}` ? K : ToCamel<K>]: T[K] extends\n | Array<infer ArrayType>\n | undefined\n | null\n ? ArrayType extends object\n ? Array<ObjectToCamel<ArrayType>>\n : Array<ArrayType>\n : T[K] extends object | undefined | null\n ? ObjectToCamel<T[K]>\n : T[K];\n };\n\nexport type ToPascal<S extends string | number | symbol> = S extends string\n ? S extends `${infer Head}_${infer Tail}`\n ? `${Capitalize<ToCamel<Head>>}${Capitalize<ToCamel<Tail>>}`\n : S extends `${infer Head}-${infer Tail}`\n ? `${Capitalize<ToCamel<Head>>}${Capitalize<ToCamel<Tail>>}`\n : Capitalize<S>\n : never;\n\nexport type ObjectToPascal<T extends object | undefined | null> =\n T extends undefined\n ? undefined\n : T extends null\n ? null\n : T extends Array<infer ArrayType>\n ? ArrayType extends object\n ? Array<ObjectToPascal<ArrayType>>\n : Array<ArrayType>\n : T extends Uint8Array\n ? Uint8Array\n : T extends Date\n ? Date\n : {\n [K in keyof T as K extends `${string}-${string}` ? K : ToPascal<K>]: T[K] extends\n | Array<infer ArrayType>\n | undefined\n | null\n ? ArrayType extends object\n ? Array<ObjectToPascal<ArrayType>>\n : Array<ArrayType>\n : T[K] extends object | undefined | null\n ? ObjectToPascal<T[K]>\n : T[K];\n };\n\nexport type ToSnake<S extends string | number | symbol> = S extends string\n ? S extends `${infer Head}${CapitalChars}${infer Tail}` // string has a capital char somewhere\n ? Head extends '' // there is a capital char in the first position\n ? Tail extends ''\n ? Lowercase<S> /* 'A' */\n : S extends `${infer Caps}${Tail}` // tail exists, has capital characters\n ? Caps extends CapitalChars\n ? Tail extends CapitalLetters\n ? `${Lowercase<Caps>}_${Lowercase<Tail>}` /* 'AB' */\n : Tail extends `${CapitalLetters}${string}`\n ? `${ToSnake<Caps>}_${ToSnake<Tail>}` /* first tail char is upper? 'ABcd' */\n : `${ToSnake<Caps>}${ToSnake<Tail>}` /* 'AbCD','AbcD', */ /* TODO: if tail is only numbers, append without underscore */\n : never /* never reached, used for inference of caps */\n : never\n : Tail extends '' /* 'aB' 'abCD' 'ABCD' 'AB' */\n ? S extends `${Head}${infer Caps}`\n ? Caps extends CapitalChars\n ? Head extends Lowercase<Head> /* 'abcD' */\n ? Caps extends Numbers\n ? // Head exists and is lowercase, tail does not, Caps is a number, we may be in a sub-select\n // if head ends with number, don't split head an Caps, keep contiguous numbers together\n Head extends `${string}${Numbers}`\n ? never\n : // head does not end in number, safe to split. 'abc2' -> 'abc_2'\n `${ToSnake<Head>}_${Caps}`\n : `${ToSnake<Head>}_${ToSnake<Caps>}` /* 'abcD' 'abc25' */\n : never /* stop union type forming */\n : never\n : never /* never reached, used for inference of caps */\n : S extends `${Head}${infer Caps}${Tail}` /* 'abCd' 'ABCD' 'AbCd' 'ABcD' */\n ? Caps extends CapitalChars\n ? Head extends Lowercase<Head> /* is 'abCd' 'abCD' ? */\n ? Tail extends CapitalLetters /* is 'abCD' where Caps = 'C' */\n ? `${ToSnake<Head>}_${ToSnake<Caps>}_${Lowercase<Tail>}` /* aBCD Tail = 'D', Head = 'aB' */\n : Tail extends `${CapitalLetters}${string}` /* is 'aBCd' where Caps = 'B' */\n ? Head extends Numbers\n ? never /* stop union type forming */\n : Head extends `${string}${Numbers}`\n ? never /* stop union type forming */\n : `${Head}_${ToSnake<Caps>}_${ToSnake<Tail>}` /* 'aBCd' => `${'a'}_${Lowercase<'B'>}_${ToSnake<'Cd'>}` */\n : `${ToSnake<Head>}_${Lowercase<Caps>}${ToSnake<Tail>}` /* 'aBcD' where Caps = 'B' tail starts as lowercase */\n : never\n : never\n : never\n : S /* 'abc' */\n : never;\n\nexport type ObjectToSnake<T extends object | undefined | null> =\n T extends undefined\n ? undefined\n : T extends null\n ? null\n : T extends Array<infer ArrayType>\n ? ArrayType extends object\n ? Array<ObjectToSnake<ArrayType>>\n : Array<ArrayType>\n : T extends Uint8Array\n ? Uint8Array\n : T extends Date\n ? Date\n : {\n [K in keyof T as K extends `${string}-${string}` ? K : ToSnake<K>]: T[K] extends\n | Array<infer ArrayType>\n | undefined\n | null\n ? ArrayType extends object\n ? Array<ObjectToSnake<ArrayType>>\n : Array<ArrayType>\n : T[K] extends object | undefined | null\n ? ObjectToSnake<T[K]>\n : T[K];\n };\n\ntype CapitalLetters =\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'E'\n | 'F'\n | 'G'\n | 'H'\n | 'I'\n | 'J'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'O'\n | 'P'\n | 'Q'\n | 'R'\n | 'S'\n | 'T'\n | 'U'\n | 'V'\n | 'W'\n | 'X'\n | 'Y'\n | 'Z';\n\ntype Numbers = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';\n\ntype CapitalChars = CapitalLetters | Numbers;", "import { z } from \"zod\";\nimport { themesSchema, themeConfigurationSchema } from \"./theme-schema\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport {\n otherConfigurationPropertiesSchema,\n} from \"./form-properties-schema\";\nimport { translationsSchema } from \"./translations-schema\";\n\n// Theme mode schema for current app mode\nexport const currentModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Current theme mode of the application\");\n\n// Constants for current modes (explicit literal values for proper type inference)\nexport const CurrentModes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n} as const;\n\n// App props schema\nexport const appPropsSchema = z\n .object({\n theme: themesSchema.describe(\n \"Theme configuration including light and dark theme colors\"\n ),\n currentMode: currentModeSchema.describe(\n \"Current theme mode (light or dark)\"\n ),\n currentLanguage: LanguageFieldSchema.describe(\n \"Currently selected language configuration\"\n ),\n questions: z\n .record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n questionLanguages: LanguagesSchema.describe(\n \"Available languages for questions\"\n ),\n otherConfigurationProperties: otherConfigurationPropertiesSchema.describe(\n \"Other configuration properties including form display options and translations\"\n ),\n translations: translationsSchema\n .optional()\n .describe(\n \"Multi-language translations for questions and form content (optional)\"\n ),\n onSectionChange: z\n .function({\n input: [z.number()],\n output: z.void(),\n })\n .optional()\n .describe(\"Optional callback function triggered when section changes\"),\n onClose: z\n .function({\n input: [],\n output: z.void(),\n })\n .optional()\n .describe(\"Optional callback function triggered when the form is closed\"),\n sections: z\n .array(sectionSchema)\n .describe(\n \"Array of sections that organize questions into logical groups\"\n ),\n themeSettings: themeConfigurationSchema.describe(\n \"Complete theme configuration including colors, features, and positioning\"\n ),\n })\n .describe(\n \"Schema for application props interface containing all form configuration and state\"\n );\n\n// Type exports for TypeScript\nexport type CurrentMode = z.infer<typeof currentModeSchema>;\nexport type AppProps = z.infer<typeof appPropsSchema>;\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 yesNoDisplayStyleSchema,\n ratingMatrixDisplayStyleSchema,\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 welcomeQuestionSchema,\n thankYouQuestionSchema,\n messagePanelQuestionSchema,\n exitFormQuestionSchema,\n yesNoQuestionSchema,\n consentQuestionSchema,\n ratingMatrixQuestionSchema,\n matrixSingleChoiceQuestionSchema,\n matrixMultipleChoiceQuestionSchema,\n // building blocks\n ratingMatrixStatementSchema,\n ratingMatrixScalePointSchema,\n ratingMatrixScaleSchema,\n matrixRowSchema,\n matrixColumnSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n YesNoDisplayStyles,\n RatingMatrixDisplayStyles,\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 WelcomeQuestion,\n type ThankYouQuestion,\n type MessagePanelQuestion,\n type ExitFormQuestion,\n type YesNoDisplayStyle,\n type YesNoQuestion,\n type ConsentQuestion,\n type RatingMatrixStatement,\n type RatingMatrixScalePoint,\n type RatingMatrixScale,\n type RatingMatrixDisplayStyle,\n type RatingMatrixQuestion,\n type MatrixRow,\n type MatrixColumn,\n type MatrixSingleChoiceQuestion,\n type MatrixMultipleChoiceQuestion,\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 AnswerSchema,\n type AnnotationMarker,\n type Annotation,\n type AnswerItem,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n PublicationStatuses,\n // Types\n type PublicationStatus,\n type FeedbackConfiguration,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Types\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 shareableModeSchema,\n previousButtonModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n ShareableModes,\n PreviousButtonModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ShareableMode,\n type PreviousButtonMode,\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 welcomeQuestionTranslationSchema,\n thankYouQuestionTranslationSchema,\n messagePanelQuestionTranslationSchema,\n yesNoQuestionTranslationSchema,\n consentQuestionTranslationSchema,\n ratingMatrixQuestionTranslationSchema,\n matrixSingleChoiceQuestionTranslationSchema,\n matrixMultipleChoiceQuestionTranslationSchema,\n questionTranslationSchema,\n sectionTranslationSchema,\n sectionTranslationsByLanguageSchema,\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 WelcomeQuestionTranslation,\n type ThankYouQuestionTranslation,\n type MessagePanelQuestionTranslation,\n type YesNoQuestionTranslation,\n type ConsentQuestionTranslation,\n type RatingMatrixQuestionTranslation,\n type MatrixSingleChoiceQuestionTranslation,\n type MatrixMultipleChoiceQuestionTranslation,\n type QuestionTranslation,\n type SectionTranslation,\n type SectionTranslationsByLanguage,\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 formConfigSchema,\n questionResponseSchema,\n responseSchema,\n matchedTriggerPropertiesSchema,\n baseSubmitFeedbackSchema,\n partialFeedbackSchema,\n submitFeedbackSchema,\n feedbackRequestSchema,\n // Types\n type FormConfig,\n type QuestionResponse,\n type Response,\n type MatchedTriggerProperties,\n type BaseSubmitFeedback,\n type PartialFeedback,\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 logicJumpRuleSchema,\n logicJumpRulesSchema,\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 type LogicJumpRule,\n type LogicJumpRules,\n} from \"./schemas/api/fetch-feedback-schema\";\n\nexport {\n RefineTextParams,\n RefineTextResponse,\n RefineTextData,\n //Types\n refineTextDataSchema,\n refineTextParamsSchema,\n refineTextResponseSchema,\n} from \"./schemas/api/refine-text-schema\";\n\n// Case conversion utility exports\nexport {\n objectToCamel,\n objectToSnake,\n toSnake,\n toCamel,\n toPascal,\n objectToPascal,\n} from './helpers/case-convert-helper';\n\nexport type {\n ObjectToCamel,\n ObjectToSnake,\n ToSnake,\n ToCamel,\n ToPascal,\n ObjectToPascal,\n} from \"./helpers/case-convert-helper\";\n\n// App props schema exports\nexport {\n currentModeSchema,\n appPropsSchema,\n // Enum constants\n CurrentModes,\n // Types\n type CurrentMode,\n type AppProps,\n} from \"./schemas/fields/app-props-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
5
- "mappings": ";;;;AAAA,SAAS,KAAAA,UAAS;;;ACAlB,SAAS,SAAS;AAIX,IAAM,yBAAyB,EACnC,OAAO,EACP,IAAI,CAAC,EACL,SAAS,yBAAyB;AAG9B,IAAM,sCAAsC,EAAE,OAAO;AAAA,EAC1D,OAAO,uBAAuB,SAAS,4BAA4B;AAAA,EACnE,aAAa,uBAAuB,SAAS,EAAE,SAAS,kCAAkC;AAAA,EAC1F,cAAc,uBAAuB,SAAS,EAAE,SAAS,2BAA2B;AAAA,EACpF,iBAAiB,uBACd,IAAI,EAAE,EACN,SAAS,EACT,SAAS,iEAAiE;AAC/E,CAAC;AAGM,IAAM,iCAAiC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,kCAAkC,oCAC5C,OAAO;AAAA,EACN,MAAM,EAAE,QAAQ,QAAQ,EAAE,SAAS,0BAA0B;AAAA,EAC7D,UAAU,uBAAuB,SAAS,EAAE,SAAS,kCAAkC;AAAA,EACvF,UAAU,uBAAuB,SAAS,EAAE,SAAS,kCAAkC;AACzF,CAAC,EACA,SAAS,yCA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oB;AAAA,IACnC;AAAA,EACF;AAAA,EACA,WAAWA,IACR,OAAOA,IAAE,OAAO,GAAG,sBAAsB,EACzC,SAAS,2DAA2D;AAAA,EACvE,mBAAmB,gBAAgB;AAAA,IACjC;AAAA,EACF;AAAA,EACA,8BAA8B,mCAAmC;AAAA,IAC/D;AAAA,EACF;AAAA,EACA,cAAc,mBACX,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,iBAAiBA,IACd,SAAS;AAAA,IACR,OAAO,CAACA,IAAE,OAAO,CAAC;AAAA,IAClB,QAAQA,IAAE,KAAK;AAAA,EACjB,CAAC,EACA,SAAS,EACT,SAAS,2DAA2D;AAAA,EACvE,SAASA,IACN,SAAS;AAAA,IACR,OAAO,CAAC;AAAA,IACR,QAAQA,IAAE,KAAK;AAAA,EACjB,CAAC,EACA,SAAS,EACT,SAAS,8DAA8D;AAAA,EAC1E,UAAUA,IACP,MAAM,aAAa,EACnB;AAAA,IACC;AAAA,EACF;AAAA,EACF,eAAe,yBAAyB;AAAA,IACtC;AAAA,EACF;AACF,CAAC,EACA;AAAA,EACC;AACF;;;ACkSF,SAAS,KAAAC,WAAS;",
4
+ "sourcesContent": ["import { z } from \"zod\";\nimport { sectionTranslationsByLanguageSchema } from \"./translations-schema\";\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 \"welcome\",\n \"thank_you\",\n \"message_panel\",\n \"yes_no\",\n \"rating_matrix\",\n \"matrix_single_choice\",\n \"matrix_multiple_choice\",\n \"exit_form\",\n \"consent\",\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 WELCOME: \"welcome\" as const,\n THANK_YOU: \"thank_you\" as const,\n MESSAGE_PANEL: \"message_panel\" as const,\n YES_NO: \"yes_no\" as const,\n RATING_MATRIX: \"rating_matrix\" as const,\n MATRIX_SINGLE_CHOICE: \"matrix_single_choice\" as const,\n MATRIX_MULTIPLE_CHOICE: \"matrix_multiple_choice\" as const,\n EXIT_FORM: \"exit_form\" as const,\n CONSENT: \"consent\" 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 description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text for the section\"),\n showTitle: z\n .boolean()\n .default(true)\n .describe(\"Whether to show the section title in the UI\"),\n showDescription: z\n .boolean()\n .default(true)\n .describe(\"Whether to show the section description in the UI\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\"Label for the next button when navigating from this section\"),\n translations: sectionTranslationsByLanguageSchema\n .optional()\n .describe(\n \"Per-language section copy (title, optional description and nextButtonLabel), keyed by language code\"\n ),\n inAppSingleQuestion: z\n .boolean()\n .default(false)\n .describe(\n \"When true, the native app shows one question at a time within this section\"\n ),\n isPreviousAllowed: z\n .boolean()\n .default(false)\n .optional()\n .describe(\n \"When the global previousButton mode is 'auto', controls whether the Previous button is shown for this section. Defaults to false (hidden).\"\n ),\n questionIds: 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// Display layout for yes/no questions (side-by-side vs stacked)\nexport const yesNoDisplayStyleSchema = z.enum([\"horizontal\", \"vertical\"]);\n\n// Constants for yes/no display styles (explicit literal values for proper type inference)\nexport const YesNoDisplayStyles = {\n HORIZONTAL: \"horizontal\" as const,\n VERTICAL: \"vertical\" 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 slug: z\n .string()\n .min(1)\n .max(128)\n .optional()\n .describe(\n \"Optional stable identifier for the question (e.g. URLs, analytics, or integrations)\"\n ),\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 isHidden: z\n .boolean()\n .default(false)\n .describe(\"When true, the question is hidden from the form UI\"),\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 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 textAlign: z\n .enum([\"left\", \"center\", \"justify\"])\n .optional()\n .default(\"left\")\n .describe(\n \"Text alignment for the question title and description; `justify` is intended for consent questions (full-width justified consent body markdown)\"\n ),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .default(\"Next\")\n .describe(\n \"Label for the next button when advancing past this question (overrides section or form defaults when set)\"\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// Welcome question schema (display-only screen, no answer captured)\nexport const welcomeQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"welcome\")\n .describe(\"Must be exactly 'welcome'\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main heading displayed on the welcome screen\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional sub-text body shown below the heading\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL displayed on the welcome screen\"),\n })\n .describe(\"Schema for a welcome screen displayed at the start or inline within a form\");\n\n// Thank you question schema (display-only screen, no answer captured)\nexport const thankYouQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"thank_you\")\n .describe(\"Must be exactly 'thank_you'\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main heading displayed on the thank you screen\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\n \"Optional thank you body text; rendered as Markdown where the form supports it\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL displayed on the thank you screen\"),\n })\n .describe(\n \"Schema for a thank you screen shown at the end or inline within a form\"\n );\n\n// Message panel question schema (display-only informational panel, same shape as welcome; no answer captured)\nexport const messagePanelQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"message_panel\")\n .describe(\"Must be exactly 'message_panel'\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main heading displayed on the message panel\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional body text shown below the heading\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL displayed on the message panel\"),\n })\n .describe(\n \"Schema for an inline message panel (informational); distinct from welcome for UI semantics and analytics\"\n );\n\n// Exit form question schema (no UI \u2014 signals end of survey; used in branch logic to terminate a path without a thank-you screen)\nexport const exitFormQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"exit_form\")\n .describe(\"Must be exactly 'exit_form'\"),\n })\n .describe(\n \"Schema for an exit marker that silently ends the survey; carries no UI and captures no answer \u2014 intended for branch logic paths that should terminate without showing a thank-you screen\"\n );\n\n// Yes/no question schema (binary answer stored as boolean in responses)\nexport const yesNoQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"yes_no\")\n .describe(\"Must be exactly 'yes_no'\"),\n yesLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\"Label for the Yes option (defaults to 'Yes' in the UI if omitted)\"),\n noLabel: z\n .string()\n .min(1)\n .max(50)\n .optional()\n .describe(\"Label for the No option (defaults to 'No' in the UI if omitted)\"),\n displayStyle: yesNoDisplayStyleSchema\n .optional()\n .describe(\"Layout for the Yes/No controls (horizontal row or vertical stack)\"),\n })\n .describe(\"Schema for yes/no questions with optional custom labels and layout\");\n\n// Consent question schema (single checkbox \u2014 answer is boolean true/false)\nexport const consentQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"consent\")\n .describe(\"Must be exactly 'consent'\"),\n })\n .describe(\n \"Schema for a single-checkbox consent question; use description (rendered as markdown) for the checkbox label text and any policy/terms links; answer is boolean (true = checked)\"\n );\n\n// \u2500\u2500\u2500 Rating Matrix \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Display style enum for rating matrix scale points (how each scale choice looks per row)\nexport const ratingMatrixDisplayStyleSchema = z.enum([\n \"radio\",\n \"star\",\n \"emoji\",\n \"button\",\n]);\n\n// Constants for rating matrix display styles (explicit literal values for proper type inference)\nexport const RatingMatrixDisplayStyles = {\n RADIO: \"radio\" as const,\n STAR: \"star\" as const,\n EMOJI: \"emoji\" as const,\n BUTTON: \"button\" as const,\n} as const;\n\n// Individual statement (row) for rating matrix questions\nexport const ratingMatrixStatementSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this statement (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Internal value / export key for this statement\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display text shown to users for this statement\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this statement\"),\n })\n .describe(\"Schema for an individual statement (row) in a rating matrix\");\n\n// A single point on a custom rating scale\nexport const ratingMatrixScalePointSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this scale point\"),\n value: z\n .union([z.number(), z.string()])\n .describe(\"Stored response value for this scale point (number or string)\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display label shown for this scale point\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this scale point\"),\n })\n .describe(\"Schema for a single point on a custom rating scale\");\n\n// Scale configuration \u2013 discriminated on kind\nexport const ratingMatrixScaleSchema = z\n .discriminatedUnion(\"kind\", [\n // Likert: symmetric ordinal scale -2\u2026+2, explicit scale points with labels\n z.object({\n kind: z.literal(\"likert\").describe(\"Symmetric ordinal scale (-2 to +2)\"),\n scalePoints: z\n .array(ratingMatrixScalePointSchema)\n .min(2)\n .max(10)\n .describe(\"Scale points with display labels for each column\"),\n }),\n // Numerical: 1\u2026N points where N is 2, 3, 4, or 5, explicit scale points with labels\n z.object({\n kind: z.literal(\"numerical\").describe(\"Numerical scale from 1 to N\"),\n scalePoints: z\n .array(ratingMatrixScalePointSchema)\n .min(2)\n .max(10)\n .describe(\"Scale points with display labels for each column\"),\n pointCount: z\n .union([z.literal(2), z.literal(3), z.literal(4), z.literal(5)])\n .describe(\"Number of scale points (2, 3, 4, or 5)\"),\n }),\n // Custom: consumer defines each point's value and label\n z.object({\n kind: z.literal(\"custom\").describe(\"Custom scale with user-defined points and values\"),\n scalePoints: z\n .array(ratingMatrixScalePointSchema)\n .min(2)\n .max(10)\n .describe(\"Scale points with display labels for each column\"),\n }),\n ])\n .describe(\"Scale configuration for rating matrix questions\");\n\n// Rating matrix question schema\nexport const ratingMatrixQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating_matrix\")\n .describe(\"Must be exactly 'rating_matrix'\"),\n statements: z\n .array(ratingMatrixStatementSchema)\n .min(1)\n .max(10)\n .describe(\"Statements (rows) users will rate on the shared scale (1-10)\"),\n scale: ratingMatrixScaleSchema\n .describe(\"Scale configuration shared across all statement rows\"),\n displayStyle: ratingMatrixDisplayStyleSchema\n .optional()\n .describe(\n \"Visual representation of scale points per row (radio buttons, stars, emoji, or buttons)\"\n ),\n randomizeStatements: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of statements\"),\n })\n .describe(\"Schema for rating matrix questions with multiple statements on a shared scale\");\n\n// \u2500\u2500\u2500 Matrix Single Choice \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Shared row schema for matrix choice questions\nexport const matrixRowSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this row (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Internal value / export key for this row\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display text shown to users for this row\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this row\"),\n })\n .describe(\"Schema for an individual row in a matrix choice question\");\n\n// Slim column schema for matrix choice questions (no imageUrl unlike questionOptionSchema)\nexport const matrixColumnSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this column (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Internal value / export key for this column\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display label shown for this column\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this column\"),\n })\n .describe(\"Schema for an individual column in a matrix choice question\");\n\n// Matrix single choice question schema (one column selected per row)\nexport const matrixSingleChoiceQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"matrix_single_choice\")\n .describe(\"Must be exactly 'matrix_single_choice'\"),\n rows: z\n .array(matrixRowSchema)\n .min(1)\n .max(20)\n .describe(\"Row items (1-20 rows)\"),\n columns: z\n .array(matrixColumnSchema)\n .min(2)\n .max(10)\n .describe(\"Column options shared across all rows (2-10 columns)\"),\n randomizeRows: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of rows\"),\n randomizeColumns: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of columns\"),\n })\n .describe(\"Schema for matrix single-choice questions where one column is selected per row\");\n\n// \u2500\u2500\u2500 Matrix Multiple Choice \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n// Matrix multiple choice question schema (one or more columns selected per row)\nexport const matrixMultipleChoiceQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"matrix_multiple_choice\")\n .describe(\"Must be exactly 'matrix_multiple_choice'\"),\n rows: z\n .array(matrixRowSchema)\n .min(1)\n .max(20)\n .describe(\"Row items (1-20 rows)\"),\n columns: z\n .array(matrixColumnSchema)\n .min(2)\n .max(10)\n .describe(\"Column options shared across all rows (2-10 columns)\"),\n minSelectionsPerRow: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of columns a user must select per row\"),\n maxSelectionsPerRow: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of columns a user can select per row\"),\n randomizeRows: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of rows\"),\n randomizeColumns: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of columns\"),\n })\n .refine(\n (data) => {\n if (\n data.minSelectionsPerRow !== undefined &&\n data.maxSelectionsPerRow !== undefined\n ) {\n return data.minSelectionsPerRow <= data.maxSelectionsPerRow;\n }\n return true;\n },\n {\n message: \"minSelectionsPerRow cannot be greater than maxSelectionsPerRow\",\n path: [\"minSelectionsPerRow\"],\n }\n )\n .describe(\n \"Schema for matrix multiple-choice questions where one or more columns can be selected per row\"\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 allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow a custom \"other\" option'),\n otherTextConfig: z\n .object({\n minChars: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required for the other text\"),\n maxChars: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of characters allowed for the other text\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the other text input\"),\n })\n .optional()\n .describe('Configuration for the custom \"other\" text input'),\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 allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow a custom \"other\" option'),\n otherTextConfig: z\n .object({\n minChars: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required for the other text\"),\n maxChars: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of characters allowed for the other text\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the other text input\"),\n })\n .optional()\n .describe('Configuration for the custom \"other\" text input'),\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 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 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 QuestionTextAlign = \"left\" | \"center\";\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 WelcomeQuestion = z.infer<typeof welcomeQuestionSchema>;\nexport type ThankYouQuestion = z.infer<typeof thankYouQuestionSchema>;\nexport type MessagePanelQuestion = z.infer<typeof messagePanelQuestionSchema>;\nexport type ExitFormQuestion = z.infer<typeof exitFormQuestionSchema>;\nexport type YesNoDisplayStyle = z.infer<typeof yesNoDisplayStyleSchema>;\nexport type YesNoQuestion = z.infer<typeof yesNoQuestionSchema>;\nexport type ConsentQuestion = z.infer<typeof consentQuestionSchema>;\nexport type RatingMatrixStatement = z.infer<typeof ratingMatrixStatementSchema>;\nexport type RatingMatrixScalePoint = z.infer<typeof ratingMatrixScalePointSchema>;\nexport type RatingMatrixScale = z.infer<typeof ratingMatrixScaleSchema>;\nexport type RatingMatrixDisplayStyle = z.infer<typeof ratingMatrixDisplayStyleSchema>;\nexport type RatingMatrixQuestion = z.infer<typeof ratingMatrixQuestionSchema>;\nexport type MatrixRow = z.infer<typeof matrixRowSchema>;\nexport type MatrixColumn = z.infer<typeof matrixColumnSchema>;\nexport type MatrixSingleChoiceQuestion = z.infer<typeof matrixSingleChoiceQuestionSchema>;\nexport type MatrixMultipleChoiceQuestion = z.infer<typeof matrixMultipleChoiceQuestionSchema>;\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 welcomeQuestionSchema,\n thankYouQuestionSchema,\n messagePanelQuestionSchema,\n exitFormQuestionSchema,\n yesNoQuestionSchema,\n consentQuestionSchema,\n ratingMatrixQuestionSchema,\n matrixSingleChoiceQuestionSchema,\n matrixMultipleChoiceQuestionSchema,\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 welcomeQuestionSchema>\n | z.infer<typeof thankYouQuestionSchema>\n | z.infer<typeof messagePanelQuestionSchema>\n | z.infer<typeof exitFormQuestionSchema>\n | z.infer<typeof yesNoQuestionSchema>\n | z.infer<typeof consentQuestionSchema>\n | z.infer<typeof ratingMatrixQuestionSchema>\n | z.infer<typeof matrixSingleChoiceQuestionSchema>\n | z.infer<typeof matrixMultipleChoiceQuestionSchema>\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\";\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// Base fields shared by all question translation schemas\nexport const baseQuestionTranslationFieldsSchema = z.object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n nextButtonLabel: translationEntrySchema\n .max(50)\n .optional()\n .describe(\"Next button label translation when advancing past this question\"),\n});\n\n// Keys present on every question translation (used in refine allowlists)\nexport const BASE_QUESTION_TRANSLATION_KEYS = [\n \"type\",\n \"title\",\n \"description\",\n \"errorMessage\",\n \"nextButtonLabel\",\n] as const;\n\n// Rating question translation schema with type field\nexport const ratingQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"rating\").describe(\"Question type identifier\"),\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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"single_choice\").describe(\"Question type identifier\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"multiple_choice_multiple\").describe(\"Question type identifier\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"nps\").describe(\"Question type identifier\"),\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(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) =>\n ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"short_answer\").describe(\"Question type identifier\"),\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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"long_text\").describe(\"Question type identifier\"),\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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"nested_selection\").describe(\"Question type identifier\"),\n placeholder: translationEntrySchema.optional().describe(\"Dropdown placeholder translation\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => ![...BASE_QUESTION_TRANSLATION_KEYS, \"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 = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"annotation\").describe(\"Question type identifier\"),\n annotationText: translationEntrySchema.optional().describe(\"Annotation display text translation\"),\n noAnnotationText: translationEntrySchema\n .optional()\n .describe(\"No annotation display text translation\"),\n })\n .describe(\"Translation schema for annotation questions\");\n\n// Welcome question translation schema with type field\nexport const welcomeQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"welcome\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for welcome screen questions\");\n\n// Thank you question translation schema with type field\nexport const thankYouQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"thank_you\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for thank you screen questions\");\n\n// Message panel question translation schema with type field (same shape as welcome)\nexport const messagePanelQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"message_panel\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for message panel questions\");\n\n// Consent question translation schema with type field\nexport const consentQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"consent\").describe(\"Question type identifier\"),\n })\n .describe(\"Translation schema for consent questions; description carries the translated checkbox label (markdown supported)\");\n\n// Yes/no question translation schema with type field\nexport const yesNoQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"yes_no\").describe(\"Question type identifier\"),\n yesLabel: translationEntrySchema.optional().describe(\"Translated Yes label\"),\n noLabel: translationEntrySchema.optional().describe(\"Translated No label\"),\n })\n .describe(\"Translation schema for yes/no questions\");\n\n// Rating matrix question translation schema with type field\nexport const ratingMatrixQuestionTranslationSchema = baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"rating_matrix\").describe(\"Question type identifier\"),\n minLabel: translationEntrySchema.optional().describe(\n \"Translated scale minimum end label (for likert and numerical kinds)\"\n ),\n maxLabel: translationEntrySchema.optional().describe(\n \"Translated scale maximum end label (for likert and numerical kinds)\"\n ),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) =>\n ![...BASE_QUESTION_TRANSLATION_KEYS, \"minLabel\", \"maxLabel\"].includes(\n key as any\n )\n );\n return additionalKeys.every(\n (key) =>\n /^statement\\..+\\.label$/.test(key) ||\n /^scalePoint\\..+\\.label$/.test(key)\n );\n },\n {\n message:\n \"Additional keys must follow 'statement.{id}.label' or 'scalePoint.{id}.label'\",\n }\n )\n .describe(\"Translation schema for rating matrix questions\");\n\n// Matrix single-choice question translation schema with type field\nexport const matrixSingleChoiceQuestionTranslationSchema =\n baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"matrix_single_choice\").describe(\"Question type identifier\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => !BASE_QUESTION_TRANSLATION_KEYS.includes(key as any)\n );\n return additionalKeys.every(\n (key) =>\n /^row\\..+\\.label$/.test(key) || /^column\\..+\\.label$/.test(key)\n );\n },\n {\n message:\n \"Additional keys must follow 'row.{id}.label' or 'column.{id}.label'\",\n }\n )\n .describe(\"Translation schema for matrix single-choice questions\");\n\n// Matrix multiple-choice question translation schema with type field\nexport const matrixMultipleChoiceQuestionTranslationSchema =\n baseQuestionTranslationFieldsSchema\n .extend({\n type: z.literal(\"matrix_multiple_choice\").describe(\"Question type identifier\"),\n })\n .catchall(translationEntrySchema)\n .refine(\n (data) => {\n const additionalKeys = Object.keys(data).filter(\n (key) => !BASE_QUESTION_TRANSLATION_KEYS.includes(key as any)\n );\n return additionalKeys.every(\n (key) =>\n /^row\\..+\\.label$/.test(key) || /^column\\..+\\.label$/.test(key)\n );\n },\n {\n message:\n \"Additional keys must follow 'row.{id}.label' or 'column.{id}.label'\",\n }\n )\n .describe(\"Translation schema for matrix multiple-choice 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 welcomeQuestionTranslationSchema,\n thankYouQuestionTranslationSchema,\n messagePanelQuestionTranslationSchema,\n yesNoQuestionTranslationSchema,\n consentQuestionTranslationSchema,\n ratingMatrixQuestionTranslationSchema,\n matrixSingleChoiceQuestionTranslationSchema,\n matrixMultipleChoiceQuestionTranslationSchema,\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// Section translation schema (one object per language, same pattern as question translations)\nexport const sectionTranslationSchema = z\n .object({\n title: translationEntrySchema\n .max(200)\n .describe(\"Section title translation\"),\n description: translationEntrySchema\n .max(1000)\n .optional()\n .describe(\"Section description translation\"),\n nextButtonLabel: translationEntrySchema\n .max(50)\n .optional()\n .describe(\"Next button label translation for this section\"),\n })\n .describe(\"Translation payload for a section in a single language\");\n\n// Section translations keyed by language code\nexport const sectionTranslationsByLanguageSchema = z\n .record(languageCodeSchema, sectionTranslationSchema)\n .describe(\"Section translations keyed by language code\");\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>;\nexport type WelcomeQuestionTranslation = z.infer<typeof welcomeQuestionTranslationSchema>;\nexport type ThankYouQuestionTranslation = z.infer<typeof thankYouQuestionTranslationSchema>;\nexport type MessagePanelQuestionTranslation = z.infer<typeof messagePanelQuestionTranslationSchema>;\nexport type YesNoQuestionTranslation = z.infer<typeof yesNoQuestionTranslationSchema>;\nexport type ConsentQuestionTranslation = z.infer<typeof consentQuestionTranslationSchema>;\nexport type RatingMatrixQuestionTranslation = z.infer<typeof ratingMatrixQuestionTranslationSchema>;\nexport type MatrixSingleChoiceQuestionTranslation = z.infer<typeof matrixSingleChoiceQuestionTranslationSchema>;\nexport type MatrixMultipleChoiceQuestionTranslation = z.infer<typeof matrixMultipleChoiceQuestionTranslationSchema>;\n\n// Union type for all question translations\nexport type QuestionTranslation = z.infer<typeof questionTranslationSchema>;\n\nexport type SectionTranslation = z.infer<typeof sectionTranslationSchema>;\nexport type SectionTranslationsByLanguage = z.infer<\n typeof sectionTranslationsByLanguageSchema\n>;\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// Annotation marker schema\nexport const AnnotationMarkerSchema = z.object({\n markerNo: z.string(),\n timeline: z.string(),\n comment: z.string(),\n});\n\n// Annotation schema\nexport const AnnotationSchema = z.object({\n fileType: z.string(),\n fileName: 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 nestedSelection: z\n .array(z.string())\n .optional()\n .describe(\"Array of selected nested option IDs\"),\n longText: z\n .string()\n .optional()\n .describe(\"Long text answer, e.g., paragraph or essay\"),\n shortAnswer: z\n .string()\n .optional()\n .describe(\"Short text answer, e.g., single sentence or word\"),\n singleChoice: z\n .string()\n .optional()\n .describe(\n \"single selected option ID (for single choice questions)\"\n ),\n rating: z.number().optional().describe(\"Star rating value (e.g., 1-5)\"),\n yesNo: z\n .boolean()\n .optional()\n .describe(\"Yes/no answer for yes_no questions (true = Yes, false = No)\"),\n consent: z\n .boolean()\n .optional()\n .describe(\"Consent answer for consent questions (true = checked/agreed, false = unchecked)\"),\n multipleChoiceMultiple: z\n .array(z.string())\n .optional()\n .describe(\"Array of selected option IDs for multiple choice questions\"),\n singleChoiceOther: z\n .string()\n .optional()\n .describe(\n 'Free-text \"other\" answer for single choice questions when allowOther is enabled'\n ),\n multipleChoiceOther: z\n .string()\n .optional()\n .describe(\n 'Free-text \"other\" answer for multiple choice questions when allowOther is enabled'\n ),\n annotation: AnnotationSchema.optional().describe(\n \"Annotation object containing file and marker details\"\n ),\n ratingMatrix: z\n .record(z.string(), z.union([z.number(), z.string()]))\n .optional()\n .describe(\n \"Rating matrix answers keyed by statement value (export key), value is the selected scale value (number for likert/numerical, string for custom)\"\n ),\n matrixSingleChoice: z\n .record(z.string(), z.string())\n .optional()\n .describe(\n \"Matrix single-choice answers keyed by row value (export key), map value is the selected column option value\"\n ),\n matrixMultipleChoice: z\n .record(z.string(), z.array(z.string()))\n .optional()\n .describe(\n \"Matrix multiple-choice answers keyed by row value (export key), map value is array of selected column option values\"\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// 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 Answer = z.infer<typeof AnswerSchema>;\n", "import { z } from \"zod\";\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// Feedback configuration schema\nexport const feedbackConfigurationSchema = 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 isPublished: 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 PublicationStatus = z.infer<typeof publicationStatusSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport {\n feedbackConfigurationSchema,\n externalPublishingPropertiesSchema,\n} from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema } 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 .describe(\"Other form configuration fields including 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 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// 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 feedbackConfigurationId: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedbackConfiguration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaireFields: 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 selectedLanguages: 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 externalPublishingProperties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audienceTriggerProperties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n otherConfigurationProperties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n appearanceProperties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including publishing, audience targeting, configuration, 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\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\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 aiEnhancementSuccessMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Message shown when AI enhancement is successful (max 100 characters)\"),\n aiEnhancementCooldownErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Message shown when AI enhancement is on cooldown (max 100 characters)\"),\n aiEnhancementMaxReachedErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Message shown when maximum AI enhancements reached (max 100 characters)\"),\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 })\n .describe(\"Schema for individual language field with value and label\");\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 aiEnhancementSuccessMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Translated message shown when AI enhancement is successful (max 100 characters)\"),\n aiEnhancementCooldownErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Translated message shown when AI enhancement is on cooldown (max 100 characters)\"),\n aiEnhancementMaxReachedErrorMessage: z\n .string()\n .min(1)\n .max(100)\n .describe(\"Translated message shown when maximum AI enhancements reached (max 100 characters)\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\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// Shareable mode: light, dark, or follow system preference\nexport const shareableModeSchema = z\n .enum([\"light\", \"dark\", \"system\"])\n .describe(\n \"Display mode for the shareable widget: light, dark, or system preference\"\n );\n\nexport const ShareableModes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n SYSTEM: \"system\" as const,\n} as const;\n\n// Previous button visibility mode enum\nexport const previousButtonModeSchema = z\n .enum([\"never\", \"always\", \"auto\"])\n .describe(\n \"Previous button visibility: never (always hidden), always (always shown), or auto (per-section via isPreviousAllowed)\"\n );\n\nexport const PreviousButtonModes = {\n NEVER: \"never\" as const,\n ALWAYS: \"always\" as const,\n AUTO: \"auto\" 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 .default(false)\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .default(true)\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .default(true)\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .default(true)\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\"),\n fontFamily: z\n .string()\n .optional()\n .default(\"default\")\n .describe(\"Font family to use for the widget\"),\n shareableMode: shareableModeSchema\n .optional()\n .default(ShareableModes.LIGHT)\n .describe(\n \"Display mode for the shareable: light, dark, or system preference\"\n ),\n enableShareableKeyboardNavigation: z\n .boolean()\n .default(false)\n .describe(\n \"Whether keyboard navigation is enabled for the shareable widget experience\"\n ),\n rtl: z\n .boolean()\n .default(false)\n .describe(\"Whether right-to-left text direction is enabled\"),\n previousButton: previousButtonModeSchema\n .default(PreviousButtonModes.ALWAYS)\n .describe(\"Previous button: never (hidden) or always (shown)\"),\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme (shadcn variables per mode)\nexport const themeColorsSchema = z\n .object({\n theme: z\n .string()\n .optional()\n .describe(\"Theme for a single mode (shadcn variables JSON)\"),\n })\n .describe(\"Theme for a single mode (shadcn variables)\");\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.describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema.describe(\n \"UI feature settings controlling widget behavior\"\n ),\n selectedPosition: positionSchema.describe(\n \"Selected position for the main widget\"\n ),\n selectedIconPosition: positionSchema.describe(\n \"Selected position for the widget icon\"\n ),\n })\n .describe(\n \"Complete theme and UI configuration including colors, features, and positioning\"\n );\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type ShareableMode = z.infer<typeof shareableModeSchema>;\nexport type PreviousButtonMode = z.infer<typeof previousButtonModeSchema>;\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 mandatoryFetchConfigAtPaths: z\n .array(z.string())\n .describe(\"Array of paths where configuration must be fetched from server when navigated by user\"),\n configSyncIntervalSeconds: z\n .number()\n .int()\n .positive()\n .describe(\"Interval in seconds for configuration synchronization between client and server\"),\n disableAllSurvey: z\n .boolean()\n .describe(\"Flag to disable all surveys globally\"),\n feedbackIntervalDuration: 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 $deviceId: z.string().describe(\"Unique device identifier\"),\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 $timestamp: z.string().optional().describe(\"ISO timestamp of the session\"),\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(\n \"Counter properties for user tracking (can be positive or negative)\"\n )\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(\n \"Properties to set once for the user (won't overwrite existing values)\"\n )\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 .loose() // Allow additional user properties\n .describe(\n \"User properties including counters, set operations, and other dynamic data\"\n );\n\n// User info schema\nexport const userInfoSchema = z\n .object({\n userName: z.string().email().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 {\n deviceInfoSchema,\n sessionInfoSchema,\n userInfoSchema,\n} from \"./other-schema\";\nimport { AnswerSchema } from \"../fields/answer-schema\";\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 isPartialSubmit: z\n .boolean()\n .describe(\"Whether this is a partial submission (true) or full submission (false)\"),\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 error: z.string().optional().describe(\"Error message if any validation failed\"),\n isOnPath: z\n .boolean()\n .optional()\n .describe(\n \"When present, whether this question was on the respondent's navigation path (e.g. logic jumps); false for questions not reached\"\n ),\n timeSpentMs: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\n \"Milliseconds the respondent spent on this question (even split across all visible questions in the section)\"\n ),\n isPathTraversed: z\n .boolean()\n .optional()\n .describe(\n \"Whether this question was on the logical traversal path \u2014 true for visible questions and hidden questions whose rules were evaluated, false for questions never reached\"\n ),\n })\n .describe(\"Response to a specific question in the feedback form\");\n\n// Response schema (contains question responses)\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.string().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.optional().describe(\"Session information\"),\n userInfo: userInfoSchema.optional().describe(\"User information (optional)\"),\n matchedTriggerProperties: matchedTriggerPropertiesSchema.optional().describe(\n \"Properties of the matched trigger\"\n ),\n customProperties: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"Custom properties for advanced use cases\"),\n })\n .describe(\"Base submit feedback request schema\");\n\n// Partial feedback schema (isPartialSubmit: true, response optional)\nexport const partialFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n isPartialSubmit: z\n .literal(true)\n .describe(\"Indicates this is a partial submission\"),\n }),\n response: responseSchema.optional().describe(\"User responses (optional for partial submit)\"),\n })\n .describe(\"Partial feedback request schema (response optional)\");\n\n// Full submit feedback schema (isPartialSubmit: false, response required)\nexport const submitFeedbackSchema = baseSubmitFeedbackSchema\n .extend({\n formConfig: formConfigSchema.extend({\n isPartialSubmit: z\n .literal(false)\n .describe(\"Indicates this is a full submission\"),\n }),\n response: responseSchema.describe(\"User responses (required for full submit)\"),\n })\n .describe(\"Full submit feedback request schema (response required)\");\n\n// Union schema for both cases (using regular union instead of discriminated union)\nexport const feedbackRequestSchema = z\n .union([partialFeedbackSchema, submitFeedbackSchema])\n .describe(\"Union schema for both partial and full feedback submissions\");\n\n// Type exports\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<\n typeof matchedTriggerPropertiesSchema\n>;\nexport type BaseSubmitFeedback = z.infer<typeof baseSubmitFeedbackSchema>;\nexport type PartialFeedback = z.infer<typeof partialFeedbackSchema>;\nexport type SubmitFeedback = z.infer<typeof submitFeedbackSchema>;\nexport type FeedbackRequest = z.infer<typeof feedbackRequestSchema>;\n", "import { z } from \"zod\";\nimport {\n deviceInfoSchema,\n sessionInfoSchema,\n userInfoSchema,\n} from \"./other-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"../fields/field-schema\";\nimport { LanguagesSchema } from \"../fields/other-screen-schema\";\nimport {\n otherConfigurationPropertiesSchema,\n appearancePropertiesSchema,\n} from \"../fields/form-properties-schema\";\nimport { masterPropertiesSchema } from \"../fields/other-properties-schema\";\nimport { audienceTriggerPropertiesSchema } from \"../fields/auto-trigger-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.string().describe(\"Title of the feedback configuration\"),\n // duration: durationSchema\n // .describe(\"Active duration for this feedback configuration\"),\n triggerProperties: audienceTriggerPropertiesSchema.describe(\n \"Trigger properties including auto/manual settings and audience segments\"\n ),\n appearanceProperties: z\n .object({\n themes: z\n .object({\n light: z\n .object({\n theme: z\n .string()\n .optional()\n .describe(\"Theme for light mode (shadcn variables JSON)\"),\n })\n .describe(\"Light theme\"),\n dark: z\n .object({\n theme: z\n .string()\n .optional()\n .describe(\"Theme for dark mode (shadcn variables JSON)\"),\n })\n .describe(\"Dark theme\"),\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\n .boolean()\n .describe(\"Whether custom position is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon position is enabled\"),\n customCss: z\n .string()\n .nullable()\n .optional()\n .describe(\"Custom CSS link (optional)\"),\n enableShareableKeyboardNavigation: z\n .boolean()\n .default(false)\n .describe(\n \"Whether keyboard navigation is enabled for the shareable widget experience\"\n ),\n rtl: z\n .boolean()\n .describe(\"Whether right-to-left text direction is enabled\"),\n previousButton: z\n .enum([\"never\", \"always\"])\n .describe(\"Previous button: never (hidden) or always (shown)\"),\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 force: z\n .boolean()\n .optional()\n .describe(\"Forcefully fetch eligible feedback list (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(\n \"Form configuration for the specific feedback\"\n ),\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.string().describe(\"Title of the feedback form\"),\n formDescription: z.string().describe(\"Description of the feedback form\"),\n })\n .describe(\"Form configuration response with title and description\");\n\n// Logic jump rule schema \u2014 a single conditional branch with a JSON Logic expression and target question\nexport const logicJumpRuleSchema = z\n .object({\n jsonLogic: z\n .record(z.string(), z.unknown())\n .describe(\"JSON Logic expression to evaluate\"),\n targetQuestionId: z\n .string()\n .describe(\"Question ID to navigate to when this rule matches\"),\n })\n .describe(\"A single logic jump rule mapping a condition to a target question\");\n\n// Logic jump rules schema \u2014 keyed by questionId or the special key '__workflow_start__'\nexport const logicJumpRulesSchema = z\n .record(\n z.string(),\n z.array(logicJumpRuleSchema)\n )\n .describe(\n \"Logic jump rules keyed by question ID (or '__workflow_start__'). Each entry is an ordered array of rules evaluated top-down; the first matching rule wins.\"\n );\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(\n \"Array of sections that organize questions into logical groups\"\n ),\n translations: z\n .record(z.string(), z.any())\n .describe(\n \"Translations object (can be empty or contain language-specific translations)\"\n ),\n selectedLanguages: LanguagesSchema.describe(\n \"Array of languages selected for this questionnaire\"\n ),\n isLogicJumpsEnabled: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"When true, form navigation follows logicJumpRules instead of linear section order\"),\n logicJumpRules: logicJumpRulesSchema\n .optional()\n .describe(\"Conditional navigation rules evaluated per question to determine the next question to show\"),\n contextVariables: z\n .array(z.string())\n .optional()\n .describe(\"List of context variable keys expected by the form (informational)\"),\n })\n .describe(\n \"Questionnaire fields response including questions, sections, translations, selected languages, and optional logic jump configuration\"\n );\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.describe(\n \"Form configuration with title and description\"\n ),\n questionnaireFields: questionnaireFieldsResponseSchema.describe(\n \"Questionnaire structure including questions, sections, translations, and languages\"\n ),\n otherConfigurationProperties: otherConfigurationPropertiesSchema.describe(\n \"Other configuration properties using existing schema\"\n ),\n appearanceProperties: appearancePropertiesSchema.describe(\n \"Appearance properties including theme configuration\"\n ),\n })\n .strict()\n .describe(\n \"Complete response schema for fetchFeedbackDetails API using existing field schemas\"\n );\n\n// Fetch configuration list response schema\nexport const fetchConfigurationListResponseSchema = z\n .object({\n masterProperties: masterPropertiesSchema.describe(\n \"Master properties for global survey settings\"\n ),\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<\n typeof feedbackConfigurationItemSchema\n>;\nexport type FetchFormConfig = z.infer<typeof fetchFormConfigSchema>;\nexport type FetchConfigurationListRequest = z.infer<\n typeof fetchConfigurationListSchema\n>;\nexport type FetchFeedbackDetailsRequest = z.infer<\n typeof fetchFeedbackDetailsSchema\n>;\nexport type FormConfigurationResponse = z.infer<\n typeof formConfigurationResponseSchema\n>;\nexport type QuestionnaireFieldsResponse = z.infer<\n typeof questionnaireFieldsResponseSchema\n>;\nexport type FetchFeedbackDetailsResponse = z.infer<\n typeof fetchFeedbackDetailsResponseSchema\n>;\nexport type FetchConfigurationListResponse = z.infer<\n typeof fetchConfigurationListResponseSchema\n>;\nexport type LogicJumpRule = z.infer<typeof logicJumpRuleSchema>;\nexport type LogicJumpRules = z.infer<typeof logicJumpRulesSchema>;\n", "import { z } from \"zod\";\n\n// Refine text request schema\nexport const refineTextParamsSchema = z\n .object({\n questionId: z\n .string()\n .describe(\"Unique identifier for the question\"),\n feedbackConfigurationId: z\n .string()\n .uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n userText: z\n .string()\n .describe(\"Original text input from the user\"),\n })\n .strict()\n .describe(\"Request schema for refining user text input\");\n\n// Refine text response schema (flat format)\n// Success: { message: \"ok\", refinedText: \"...\" }\n// Error: { status?: number, error?: string, message: \"...\" }\nexport const refineTextResponseSchema = z\n .object({\n message: z.string().optional().describe(\"Human-readable message\"),\n refinedText: z\n .string()\n .optional()\n .describe(\"Refined/improved version of the user text (success only)\"),\n status: z\n .number()\n .optional()\n .describe(\"HTTP status code (error responses)\"),\n error: z.string().optional().describe(\"Error type (error responses)\"),\n code: z.string().optional().describe(\"Error code for display mapping\"),\n })\n .describe(\"Response schema for refine text API operation\");\n\n// Legacy data schema - kept for backwards compatibility if needed\nexport const refineTextDataSchema = z\n .object({\n userText: z.string().describe(\"Original text input from the user\"),\n refinedText: z.string().describe(\"Refined/improved version of the user text\"),\n })\n .describe(\"Data containing original and refined text (legacy nested format)\");\n\n// Type exports\nexport type RefineTextParams = z.infer<typeof refineTextParamsSchema>;\nexport type RefineTextData = z.infer<typeof refineTextDataSchema>;\nexport type RefineTextResponse = z.infer<typeof refineTextResponseSchema>;", "export function convertObject<\n TInput extends object,\n TResult extends\n | ObjectToCamel<TInput>\n | ObjectToSnake<TInput>\n | ObjectToPascal<TInput>,\n>(obj: TInput, keyConverter: (arg: string) => string): TResult {\n if (obj === null || typeof obj === 'undefined' || typeof obj !== 'object') {\n return obj;\n }\n\n const out = (Array.isArray(obj) ? [] : {}) as TResult;\n for (const [k, v] of Object.entries(obj)) {\n let newKey = k;\n if (typeof k === 'string' && !k.includes('-')) {\n newKey = keyConverter(k);\n }\n\n // eslint-disable-next-line\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n out[newKey] = Array.isArray(v)\n ? (v.map(<ArrayItem extends object>(item: ArrayItem) =>\n typeof item === 'object' &&\n !(item instanceof Uint8Array) &&\n !(item instanceof Date)\n ? convertObject<\n ArrayItem,\n TResult extends ObjectToCamel<TInput>\n ? ObjectToCamel<ArrayItem>\n : TResult extends ObjectToPascal<TInput>\n ? ObjectToPascal<ArrayItem>\n : ObjectToSnake<ArrayItem>\n >(item, keyConverter)\n : item,\n ) as unknown[])\n : v instanceof Uint8Array || v instanceof Date\n ? v\n : typeof v === 'object'\n ? convertObject<\n typeof v,\n TResult extends ObjectToCamel<TInput>\n ? ObjectToCamel<typeof v>\n : TResult extends ObjectToPascal<TInput>\n ? ObjectToPascal<typeof v>\n : ObjectToSnake<typeof v>\n >(v, keyConverter)\n : (v as unknown);\n }\n return out;\n}\n\nexport function toCamel<T extends string>(term: T): ToCamel<T> {\n return (\n term.length === 1\n ? term.toLowerCase()\n : term\n .replace(/^([A-Z])/, (m) => m[0].toLowerCase())\n .replace(/[_-]([a-z0-9])/g, (m) => m[1].toUpperCase())\n ) as ToCamel<T>;\n}\n\nexport function objectToCamel<T extends object>(obj: T): ObjectToCamel<T> {\n return convertObject(obj, toCamel);\n}\n\nexport function toSnake<T extends string>(term: T): ToSnake<T> {\n let result: string = term;\n let circuitBreaker = 0;\n\n while (\n (/([a-z])([0-9])/.exec(result)?.length || 0) > 2 &&\n circuitBreaker < 10\n ) {\n result = result.replace(\n /([a-z])([0-9])/,\n (_all, $1: string, $2: string) =>\n `${$1.toLowerCase()}_${$2.toLowerCase()}`,\n );\n\n circuitBreaker += 1;\n }\n\n while (\n (/(.+?)([A-Z])/.exec(result)?.length || 0) > 2 &&\n circuitBreaker < 10\n ) {\n result = result.replace(\n /(.+?)([A-Z])/,\n (_all, $1: string, $2: string) =>\n `${$1.toLowerCase()}_${$2.toLowerCase()}`,\n );\n circuitBreaker += 1;\n }\n\n return result.toLowerCase() as ToSnake<T>;\n}\n\nexport function objectToSnake<T extends object>(obj: T): ObjectToSnake<T> {\n return convertObject(obj, toSnake);\n}\n\nexport function toPascal<T extends string>(term: T): ToPascal<T> {\n return toCamel(term).replace(/^([a-z])/, (m) =>\n m[0].toUpperCase(),\n ) as ToPascal<T>;\n}\n\nexport function objectToPascal<T extends object>(obj: T): ObjectToPascal<T> {\n return convertObject(obj, toPascal);\n}\n\nexport type ToCamel<S extends string | number | symbol> = S extends string\n ? S extends `${infer Head}_${infer Tail}`\n ? `${ToCamel<Uncapitalize<Head>>}${Capitalize<ToCamel<Tail>>}`\n : S extends `${infer Head}-${infer Tail}`\n ? `${ToCamel<Uncapitalize<Head>>}${Capitalize<ToCamel<Tail>>}`\n : Uncapitalize<S>\n : never;\n\nexport type ObjectToCamel<T extends object | undefined | null> =\n T extends undefined\n ? undefined\n : T extends null\n ? null\n : T extends Array<infer ArrayType>\n ? ArrayType extends object\n ? Array<ObjectToCamel<ArrayType>>\n : Array<ArrayType>\n : T extends Uint8Array\n ? Uint8Array\n : T extends Date\n ? Date\n : {\n [K in keyof T as K extends `${string}-${string}` ? K : ToCamel<K>]: T[K] extends\n | Array<infer ArrayType>\n | undefined\n | null\n ? ArrayType extends object\n ? Array<ObjectToCamel<ArrayType>>\n : Array<ArrayType>\n : T[K] extends object | undefined | null\n ? ObjectToCamel<T[K]>\n : T[K];\n };\n\nexport type ToPascal<S extends string | number | symbol> = S extends string\n ? S extends `${infer Head}_${infer Tail}`\n ? `${Capitalize<ToCamel<Head>>}${Capitalize<ToCamel<Tail>>}`\n : S extends `${infer Head}-${infer Tail}`\n ? `${Capitalize<ToCamel<Head>>}${Capitalize<ToCamel<Tail>>}`\n : Capitalize<S>\n : never;\n\nexport type ObjectToPascal<T extends object | undefined | null> =\n T extends undefined\n ? undefined\n : T extends null\n ? null\n : T extends Array<infer ArrayType>\n ? ArrayType extends object\n ? Array<ObjectToPascal<ArrayType>>\n : Array<ArrayType>\n : T extends Uint8Array\n ? Uint8Array\n : T extends Date\n ? Date\n : {\n [K in keyof T as K extends `${string}-${string}` ? K : ToPascal<K>]: T[K] extends\n | Array<infer ArrayType>\n | undefined\n | null\n ? ArrayType extends object\n ? Array<ObjectToPascal<ArrayType>>\n : Array<ArrayType>\n : T[K] extends object | undefined | null\n ? ObjectToPascal<T[K]>\n : T[K];\n };\n\nexport type ToSnake<S extends string | number | symbol> = S extends string\n ? S extends `${infer Head}${CapitalChars}${infer Tail}` // string has a capital char somewhere\n ? Head extends '' // there is a capital char in the first position\n ? Tail extends ''\n ? Lowercase<S> /* 'A' */\n : S extends `${infer Caps}${Tail}` // tail exists, has capital characters\n ? Caps extends CapitalChars\n ? Tail extends CapitalLetters\n ? `${Lowercase<Caps>}_${Lowercase<Tail>}` /* 'AB' */\n : Tail extends `${CapitalLetters}${string}`\n ? `${ToSnake<Caps>}_${ToSnake<Tail>}` /* first tail char is upper? 'ABcd' */\n : `${ToSnake<Caps>}${ToSnake<Tail>}` /* 'AbCD','AbcD', */ /* TODO: if tail is only numbers, append without underscore */\n : never /* never reached, used for inference of caps */\n : never\n : Tail extends '' /* 'aB' 'abCD' 'ABCD' 'AB' */\n ? S extends `${Head}${infer Caps}`\n ? Caps extends CapitalChars\n ? Head extends Lowercase<Head> /* 'abcD' */\n ? Caps extends Numbers\n ? // Head exists and is lowercase, tail does not, Caps is a number, we may be in a sub-select\n // if head ends with number, don't split head an Caps, keep contiguous numbers together\n Head extends `${string}${Numbers}`\n ? never\n : // head does not end in number, safe to split. 'abc2' -> 'abc_2'\n `${ToSnake<Head>}_${Caps}`\n : `${ToSnake<Head>}_${ToSnake<Caps>}` /* 'abcD' 'abc25' */\n : never /* stop union type forming */\n : never\n : never /* never reached, used for inference of caps */\n : S extends `${Head}${infer Caps}${Tail}` /* 'abCd' 'ABCD' 'AbCd' 'ABcD' */\n ? Caps extends CapitalChars\n ? Head extends Lowercase<Head> /* is 'abCd' 'abCD' ? */\n ? Tail extends CapitalLetters /* is 'abCD' where Caps = 'C' */\n ? `${ToSnake<Head>}_${ToSnake<Caps>}_${Lowercase<Tail>}` /* aBCD Tail = 'D', Head = 'aB' */\n : Tail extends `${CapitalLetters}${string}` /* is 'aBCd' where Caps = 'B' */\n ? Head extends Numbers\n ? never /* stop union type forming */\n : Head extends `${string}${Numbers}`\n ? never /* stop union type forming */\n : `${Head}_${ToSnake<Caps>}_${ToSnake<Tail>}` /* 'aBCd' => `${'a'}_${Lowercase<'B'>}_${ToSnake<'Cd'>}` */\n : `${ToSnake<Head>}_${Lowercase<Caps>}${ToSnake<Tail>}` /* 'aBcD' where Caps = 'B' tail starts as lowercase */\n : never\n : never\n : never\n : S /* 'abc' */\n : never;\n\nexport type ObjectToSnake<T extends object | undefined | null> =\n T extends undefined\n ? undefined\n : T extends null\n ? null\n : T extends Array<infer ArrayType>\n ? ArrayType extends object\n ? Array<ObjectToSnake<ArrayType>>\n : Array<ArrayType>\n : T extends Uint8Array\n ? Uint8Array\n : T extends Date\n ? Date\n : {\n [K in keyof T as K extends `${string}-${string}` ? K : ToSnake<K>]: T[K] extends\n | Array<infer ArrayType>\n | undefined\n | null\n ? ArrayType extends object\n ? Array<ObjectToSnake<ArrayType>>\n : Array<ArrayType>\n : T[K] extends object | undefined | null\n ? ObjectToSnake<T[K]>\n : T[K];\n };\n\ntype CapitalLetters =\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'E'\n | 'F'\n | 'G'\n | 'H'\n | 'I'\n | 'J'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'O'\n | 'P'\n | 'Q'\n | 'R'\n | 'S'\n | 'T'\n | 'U'\n | 'V'\n | 'W'\n | 'X'\n | 'Y'\n | 'Z';\n\ntype Numbers = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';\n\ntype CapitalChars = CapitalLetters | Numbers;", "import { z } from \"zod\";\nimport { themesSchema, themeConfigurationSchema } from \"./theme-schema\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport {\n otherConfigurationPropertiesSchema,\n} from \"./form-properties-schema\";\nimport { translationsSchema } from \"./translations-schema\";\n\n// Theme mode schema for current app mode\nexport const currentModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Current theme mode of the application\");\n\n// Constants for current modes (explicit literal values for proper type inference)\nexport const CurrentModes = {\n LIGHT: \"light\" as const,\n DARK: \"dark\" as const,\n} as const;\n\n// App props schema\nexport const appPropsSchema = z\n .object({\n theme: themesSchema.describe(\n \"Theme configuration including light and dark theme colors\"\n ),\n currentMode: currentModeSchema.describe(\n \"Current theme mode (light or dark)\"\n ),\n currentLanguage: LanguageFieldSchema.describe(\n \"Currently selected language configuration\"\n ),\n questions: z\n .record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n questionLanguages: LanguagesSchema.describe(\n \"Available languages for questions\"\n ),\n otherConfigurationProperties: otherConfigurationPropertiesSchema.describe(\n \"Other configuration properties including form display options and translations\"\n ),\n translations: translationsSchema\n .optional()\n .describe(\n \"Multi-language translations for questions and form content (optional)\"\n ),\n onSectionChange: z\n .function({\n input: [z.number()],\n output: z.void(),\n })\n .optional()\n .describe(\"Optional callback function triggered when section changes\"),\n onClose: z\n .function({\n input: [],\n output: z.void(),\n })\n .optional()\n .describe(\"Optional callback function triggered when the form is closed\"),\n sections: z\n .array(sectionSchema)\n .describe(\n \"Array of sections that organize questions into logical groups\"\n ),\n themeSettings: themeConfigurationSchema.describe(\n \"Complete theme configuration including colors, features, and positioning\"\n ),\n })\n .describe(\n \"Schema for application props interface containing all form configuration and state\"\n );\n\n// Type exports for TypeScript\nexport type CurrentMode = z.infer<typeof currentModeSchema>;\nexport type AppProps = z.infer<typeof appPropsSchema>;\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 yesNoDisplayStyleSchema,\n ratingMatrixDisplayStyleSchema,\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 welcomeQuestionSchema,\n thankYouQuestionSchema,\n messagePanelQuestionSchema,\n exitFormQuestionSchema,\n yesNoQuestionSchema,\n consentQuestionSchema,\n ratingMatrixQuestionSchema,\n matrixSingleChoiceQuestionSchema,\n matrixMultipleChoiceQuestionSchema,\n // building blocks\n ratingMatrixStatementSchema,\n ratingMatrixScalePointSchema,\n ratingMatrixScaleSchema,\n matrixRowSchema,\n matrixColumnSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n YesNoDisplayStyles,\n RatingMatrixDisplayStyles,\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 WelcomeQuestion,\n type ThankYouQuestion,\n type MessagePanelQuestion,\n type ExitFormQuestion,\n type YesNoDisplayStyle,\n type YesNoQuestion,\n type ConsentQuestion,\n type RatingMatrixStatement,\n type RatingMatrixScalePoint,\n type RatingMatrixScale,\n type RatingMatrixDisplayStyle,\n type RatingMatrixQuestion,\n type MatrixRow,\n type MatrixColumn,\n type MatrixSingleChoiceQuestion,\n type MatrixMultipleChoiceQuestion,\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 AnswerSchema,\n type AnnotationMarker,\n type Annotation,\n type AnswerItem,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n PublicationStatuses,\n // Types\n type PublicationStatus,\n type FeedbackConfiguration,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Types\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 shareableModeSchema,\n previousButtonModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n ShareableModes,\n PreviousButtonModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ShareableMode,\n type PreviousButtonMode,\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 welcomeQuestionTranslationSchema,\n thankYouQuestionTranslationSchema,\n messagePanelQuestionTranslationSchema,\n yesNoQuestionTranslationSchema,\n consentQuestionTranslationSchema,\n ratingMatrixQuestionTranslationSchema,\n matrixSingleChoiceQuestionTranslationSchema,\n matrixMultipleChoiceQuestionTranslationSchema,\n questionTranslationSchema,\n sectionTranslationSchema,\n sectionTranslationsByLanguageSchema,\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 WelcomeQuestionTranslation,\n type ThankYouQuestionTranslation,\n type MessagePanelQuestionTranslation,\n type YesNoQuestionTranslation,\n type ConsentQuestionTranslation,\n type RatingMatrixQuestionTranslation,\n type MatrixSingleChoiceQuestionTranslation,\n type MatrixMultipleChoiceQuestionTranslation,\n type QuestionTranslation,\n type SectionTranslation,\n type SectionTranslationsByLanguage,\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 formConfigSchema,\n questionResponseSchema,\n responseSchema,\n matchedTriggerPropertiesSchema,\n baseSubmitFeedbackSchema,\n partialFeedbackSchema,\n submitFeedbackSchema,\n feedbackRequestSchema,\n // Types\n type FormConfig,\n type QuestionResponse,\n type Response,\n type MatchedTriggerProperties,\n type BaseSubmitFeedback,\n type PartialFeedback,\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 logicJumpRuleSchema,\n logicJumpRulesSchema,\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 type LogicJumpRule,\n type LogicJumpRules,\n} from \"./schemas/api/fetch-feedback-schema\";\n\nexport {\n RefineTextParams,\n RefineTextResponse,\n RefineTextData,\n //Types\n refineTextDataSchema,\n refineTextParamsSchema,\n refineTextResponseSchema,\n} from \"./schemas/api/refine-text-schema\";\n\n// Case conversion utility exports\nexport {\n objectToCamel,\n objectToSnake,\n toSnake,\n toCamel,\n toPascal,\n objectToPascal,\n} from './helpers/case-convert-helper';\n\nexport type {\n ObjectToCamel,\n ObjectToSnake,\n ToSnake,\n ToCamel,\n ToPascal,\n ObjectToPascal,\n} from \"./helpers/case-convert-helper\";\n\n// App props schema exports\nexport {\n currentModeSchema,\n appPropsSchema,\n // Enum constants\n CurrentModes,\n // Types\n type CurrentMode,\n type AppProps,\n} from \"./schemas/fields/app-props-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
5
+ "mappings": ";;;;AAAA,SAAS,KAAAA,UAAS;;;ACAlB,SAAS,SAAS;AAIX,IAAM,yBAAyB,EACnC,OAAO,EACP,IAAI,CAAC,EACL,SAAS,yBAAyB;AAG9B,IAAM,sCAAsC,EAAE,OAAO;AAAA,EAC1D,OAAO,uBAAuB,SAAS,4BAA4B;AAAA,EACnE,aAAa,uBAAuB,SAAS,EAAE,SAAS,kCAAkC;AAAA,EAC1F,cAAc,uBAAuB,SAAS,EAAE,SAAS,2BAA2B;AAAA,EACpF,iBAAiB,uBACd,IAAI,EAAE,EACN,SAAS,EACT,SAAS,iEAAiE;AAC/E,CAAC;AAGM,IAAM,iCAAiC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,kCAAkC,oCAC5C,OAAO;AAAA,EACN,MAAM,EAAE,QAAQ,QAAQ,EAAE,SAAS,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