@encatch/schema 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -13,34 +13,67 @@ var questionTypeSchema = z.enum([
13
13
  "long_text",
14
14
  "annotation"
15
15
  ]).describe("Enumeration of all supported question types for form fields");
16
+ var QuestionTypes = {
17
+ RATING: questionTypeSchema.options[0],
18
+ SINGLE_CHOICE: questionTypeSchema.options[1],
19
+ NPS: questionTypeSchema.options[2],
20
+ NESTED_SELECTION: questionTypeSchema.options[3],
21
+ MULTIPLE_CHOICE_MULTIPLE: questionTypeSchema.options[4],
22
+ SHORT_ANSWER: questionTypeSchema.options[5],
23
+ LONG_TEXT: questionTypeSchema.options[6],
24
+ ANNOTATION: questionTypeSchema.options[7]
25
+ };
26
+ var validationRuleTypeSchema = z.enum([
27
+ "required",
28
+ "min",
29
+ "max",
30
+ "minLength",
31
+ "maxLength",
32
+ "pattern",
33
+ "email",
34
+ "url",
35
+ "custom"
36
+ ]).describe("Enumeration of all supported validation rule types");
37
+ var ValidationRuleTypes = {
38
+ REQUIRED: validationRuleTypeSchema.options[0],
39
+ MIN: validationRuleTypeSchema.options[1],
40
+ MAX: validationRuleTypeSchema.options[2],
41
+ MIN_LENGTH: validationRuleTypeSchema.options[3],
42
+ MAX_LENGTH: validationRuleTypeSchema.options[4],
43
+ PATTERN: validationRuleTypeSchema.options[5],
44
+ EMAIL: validationRuleTypeSchema.options[6],
45
+ URL: validationRuleTypeSchema.options[7],
46
+ CUSTOM: validationRuleTypeSchema.options[8]
47
+ };
16
48
  var validationRuleSchema = z.object({
17
- type: z.enum([
18
- "required",
19
- "min",
20
- "max",
21
- "minLength",
22
- "maxLength",
23
- "pattern",
24
- "email",
25
- "url",
26
- "custom"
27
- ]).describe("Type of validation rule to apply"),
49
+ type: validationRuleTypeSchema.describe("Type of validation rule to apply"),
28
50
  value: z.union([z.string(), z.number(), z.boolean()]).optional().describe("Value for the validation rule (string, number, or boolean)"),
29
51
  message: z.string().optional().describe("Custom error message when validation fails"),
30
52
  describe: z.string().max(500).optional().describe("LLM tool call description for this validation rule")
31
53
  }).describe("Schema defining validation rules for question responses");
54
+ var visibilityConditionOperatorSchema = z.enum([
55
+ "equals",
56
+ "not_equals",
57
+ "contains",
58
+ "not_contains",
59
+ "greater_than",
60
+ "less_than",
61
+ "is_empty",
62
+ "is_not_empty"
63
+ ]).describe("Enumeration of all supported visibility condition operators");
64
+ var VisibilityConditionOperators = {
65
+ EQUALS: visibilityConditionOperatorSchema.options[0],
66
+ NOT_EQUALS: visibilityConditionOperatorSchema.options[1],
67
+ CONTAINS: visibilityConditionOperatorSchema.options[2],
68
+ NOT_CONTAINS: visibilityConditionOperatorSchema.options[3],
69
+ GREATER_THAN: visibilityConditionOperatorSchema.options[4],
70
+ LESS_THAN: visibilityConditionOperatorSchema.options[5],
71
+ IS_EMPTY: visibilityConditionOperatorSchema.options[6],
72
+ IS_NOT_EMPTY: visibilityConditionOperatorSchema.options[7]
73
+ };
32
74
  var visibilityConditionSchema = z.object({
33
75
  field: z.string().describe("ID of the field to check against"),
34
- operator: z.enum([
35
- "equals",
36
- "not_equals",
37
- "contains",
38
- "not_contains",
39
- "greater_than",
40
- "less_than",
41
- "is_empty",
42
- "is_not_empty"
43
- ]).describe("Comparison operator for the condition"),
76
+ operator: visibilityConditionOperatorSchema.describe("Comparison operator for the condition"),
44
77
  value: z.union([z.string(), z.number(), z.boolean()]).optional().describe("Value to compare against (string, number, or boolean)"),
45
78
  describe: z.string().max(500).optional().describe("LLM tool call description for this visibility condition")
46
79
  }).describe(
@@ -52,6 +85,12 @@ var sectionSchema = z.object({
52
85
  question_ids: z.array(z.string()).min(1).describe("Array of question IDs that belong to this section")
53
86
  }).describe("Schema defining sections that organize questions into logical groups");
54
87
  var questionStatusSchema = z.enum(["D", "P", "A", "S"]);
88
+ var QuestionStatuses = {
89
+ DRAFT: questionStatusSchema.options[0],
90
+ PUBLISHED: questionStatusSchema.options[1],
91
+ ARCHIVED: questionStatusSchema.options[2],
92
+ SUSPENDED: questionStatusSchema.options[3]
93
+ };
55
94
  var ratingDisplayStyleSchema = z.enum([
56
95
  "star",
57
96
  "heart",
@@ -60,22 +99,46 @@ var ratingDisplayStyleSchema = z.enum([
60
99
  "emoji",
61
100
  "emoji-exp"
62
101
  ]);
102
+ var RatingDisplayStyles = {
103
+ STAR: ratingDisplayStyleSchema.options[0],
104
+ HEART: ratingDisplayStyleSchema.options[1],
105
+ THUMBS_UP: ratingDisplayStyleSchema.options[2],
106
+ DIAMOND: ratingDisplayStyleSchema.options[3],
107
+ EMOJI: ratingDisplayStyleSchema.options[4],
108
+ EMOJI_EXP: ratingDisplayStyleSchema.options[5]
109
+ };
63
110
  var ratingRepresentationSizeSchema = z.enum([
64
111
  "small",
65
112
  "medium",
66
113
  "large"
67
114
  ]);
115
+ var RatingRepresentationSizes = {
116
+ SMALL: ratingRepresentationSizeSchema.options[0],
117
+ MEDIUM: ratingRepresentationSizeSchema.options[1],
118
+ LARGE: ratingRepresentationSizeSchema.options[2]
119
+ };
68
120
  var multipleChoiceDisplayStyleSchema = z.enum([
69
121
  "radio",
70
122
  "list",
71
123
  "chip",
72
124
  "dropdown"
73
125
  ]);
126
+ var MultipleChoiceDisplayStyles = {
127
+ RADIO: multipleChoiceDisplayStyleSchema.options[0],
128
+ LIST: multipleChoiceDisplayStyleSchema.options[1],
129
+ CHIP: multipleChoiceDisplayStyleSchema.options[2],
130
+ DROPDOWN: multipleChoiceDisplayStyleSchema.options[3]
131
+ };
74
132
  var multipleChoiceMultipleDisplayStyleSchema = z.enum([
75
133
  "checkbox",
76
134
  "list",
77
135
  "chip"
78
136
  ]);
137
+ var MultipleChoiceMultipleDisplayStyles = {
138
+ CHECKBOX: multipleChoiceMultipleDisplayStyleSchema.options[0],
139
+ LIST: multipleChoiceMultipleDisplayStyleSchema.options[1],
140
+ CHIP: multipleChoiceMultipleDisplayStyleSchema.options[2]
141
+ };
79
142
  var choiceOrderOptionSchema = z.enum([
80
143
  "randomize",
81
144
  "flip",
@@ -83,6 +146,13 @@ var choiceOrderOptionSchema = z.enum([
83
146
  "ascending",
84
147
  "none"
85
148
  ]);
149
+ var ChoiceOrderOptions = {
150
+ RANDOMIZE: choiceOrderOptionSchema.options[0],
151
+ FLIP: choiceOrderOptionSchema.options[1],
152
+ ROTATE: choiceOrderOptionSchema.options[2],
153
+ ASCENDING: choiceOrderOptionSchema.options[3],
154
+ NONE: choiceOrderOptionSchema.options[4]
155
+ };
86
156
  var questionSchema = z.object({
87
157
  id: z.string().describe("Unique identifier for the question"),
88
158
  type: questionTypeSchema.describe(
@@ -104,7 +174,7 @@ var questionSchema = z.object({
104
174
  )
105
175
  }).describe("Base schema for all question types with common properties");
106
176
  var ratingQuestionSchema = questionSchema.extend({
107
- type: z.literal(questionTypeSchema.enum.rating).describe("Must be exactly 'rating'"),
177
+ type: z.literal("rating").describe("Must be exactly 'rating'"),
108
178
  showLabels: z.boolean().optional().describe("Whether to show min/max labels"),
109
179
  minLabel: z.string().max(100).optional().describe("Label for the minimum rating value"),
110
180
  maxLabel: z.string().max(100).optional().describe("Label for the maximum rating value"),
@@ -114,7 +184,7 @@ var ratingQuestionSchema = questionSchema.extend({
114
184
  color: z.string().regex(/^#[0-9A-F]{6}$/i, "Must be a valid hex color").optional().describe("Hex color for rating elements")
115
185
  }).describe("Schema for rating questions with customizable display options");
116
186
  var annotationQuestionSchema = questionSchema.extend({
117
- type: z.literal(questionTypeSchema.enum.annotation).describe("Must be exactly 'annotation'"),
187
+ type: z.literal("annotation").describe("Must be exactly 'annotation'"),
118
188
  annotationText: z.string().max(1e3).optional().describe("Text to display when annotation is provided"),
119
189
  noAnnotationText: z.string().max(500).optional().describe("Text to display when no annotation is provided")
120
190
  }).describe(
@@ -143,13 +213,13 @@ var nestedOptionSchema = z.lazy(
143
213
  }).describe("Schema for nested options with hierarchical structure support")
144
214
  );
145
215
  var multipleChoiceSingleQuestionSchema = questionSchema.extend({
146
- type: z.literal(questionTypeSchema.enum.single_choice).describe("Must be exactly 'single_choice'"),
216
+ type: z.literal("single_choice").describe("Must be exactly 'single_choice'"),
147
217
  displayStyle: multipleChoiceDisplayStyleSchema.optional().describe("Visual style for displaying options"),
148
218
  randomizeOptions: z.boolean().optional().default(false).describe("Whether to randomize the order of options"),
149
219
  options: z.array(questionOptionSchema).min(1).max(50).describe("Array of options for user selection (1-50 options)")
150
220
  }).describe("Schema for single-choice multiple selection questions");
151
221
  var multipleChoiceMultipleQuestionSchema = questionSchema.extend({
152
- type: z.literal(questionTypeSchema.enum.multiple_choice_multiple).describe("Must be exactly 'multiple_choice_multiple'"),
222
+ type: z.literal("multiple_choice_multiple").describe("Must be exactly 'multiple_choice_multiple'"),
153
223
  displayStyle: multipleChoiceMultipleDisplayStyleSchema.optional().describe("Visual style for displaying multiple options"),
154
224
  minSelections: z.number().int().min(0).optional().describe("Minimum number of options that must be selected"),
155
225
  maxSelections: z.number().int().min(1).optional().describe("Maximum number of options that can be selected"),
@@ -171,7 +241,7 @@ var multipleChoiceMultipleQuestionSchema = questionSchema.extend({
171
241
  "Schema for multiple-choice questions allowing multiple selections"
172
242
  );
173
243
  var npsQuestionSchema = questionSchema.extend({
174
- type: z.literal(questionTypeSchema.enum.nps).describe("Must be exactly 'nps'"),
244
+ type: z.literal("nps").describe("Must be exactly 'nps'"),
175
245
  min: z.literal(0).describe("NPS always starts at 0"),
176
246
  max: z.literal(10).describe("NPS always ends at 10"),
177
247
  minLabel: z.string().max(100).optional().describe("Label for the minimum NPS value (0)"),
@@ -195,7 +265,7 @@ var npsQuestionSchema = questionSchema.extend({
195
265
  }
196
266
  ).describe("Schema for Net Promoter Score questions with 0-10 scale");
197
267
  var shortAnswerQuestionSchema = questionSchema.extend({
198
- type: z.literal(questionTypeSchema.enum.short_answer).describe("Must be exactly 'short_answer'"),
268
+ type: z.literal("short_answer").describe("Must be exactly 'short_answer'"),
199
269
  maxCharacters: z.number().int().min(1).max(1e4).optional().describe("Maximum number of characters allowed"),
200
270
  minCharacters: z.number().int().min(0).optional().describe("Minimum number of characters required"),
201
271
  placeholder: z.string().max(200).optional().describe("Placeholder text shown in the input field"),
@@ -242,7 +312,7 @@ var shortAnswerQuestionSchema = questionSchema.extend({
242
312
  }
243
313
  ).describe("Schema for short answer questions with optional AI enhancement");
244
314
  var longAnswerQuestionSchema = questionSchema.extend({
245
- type: z.literal(questionTypeSchema.enum.long_text).describe("Must be exactly 'long_text'"),
315
+ type: z.literal("long_text").describe("Must be exactly 'long_text'"),
246
316
  maxCharacters: z.number().int().min(1).max(5e4).optional().describe(
247
317
  "Maximum number of characters allowed (higher limit for long text)"
248
318
  ),
@@ -282,7 +352,7 @@ var longAnswerQuestionSchema = questionSchema.extend({
282
352
  "Schema for long answer questions with rich text support and AI enhancement"
283
353
  );
284
354
  var nestedDropdownQuestionSchema = questionSchema.extend({
285
- type: z.literal(questionTypeSchema.enum.nested_selection).describe("Must be exactly 'nested_selection'"),
355
+ type: z.literal("nested_selection").describe("Must be exactly 'nested_selection'"),
286
356
  placeholder: z.string().max(200).optional().describe("Placeholder text for the nested dropdown"),
287
357
  options: z.array(nestedOptionSchema).min(1).max(100).describe(
288
358
  "Array of nested options for hierarchical selection (1-100 options)"
@@ -404,8 +474,24 @@ var AnswerSchema = z2.discriminatedUnion("type", [
404
474
  // src/schemas/fields/form-schema.ts
405
475
  import { z as z3 } from "zod";
406
476
  var surveyTypeSchema = z3.enum(["R", "O"]).describe("Enumeration of feedback types: R=Recurring, O=One-time");
477
+ var SurveyTypes = {
478
+ RECURRING: surveyTypeSchema.options[0],
479
+ ONE_TIME: surveyTypeSchema.options[1]
480
+ };
407
481
  var yesNoSchema = z3.enum(["Y", "N"]).describe("Yes/No enumeration using Y/N values");
482
+ var YesNoValues = {
483
+ YES: yesNoSchema.options[0],
484
+ NO: yesNoSchema.options[1]
485
+ };
408
486
  var recurringUnitSchema = z3.enum(["minutes", "hours", "days", "weeks", "months", "years"]).describe("Time units for recurring feedback schedules");
487
+ var RecurringUnits = {
488
+ MINUTES: recurringUnitSchema.options[0],
489
+ HOURS: recurringUnitSchema.options[1],
490
+ DAYS: recurringUnitSchema.options[2],
491
+ WEEKS: recurringUnitSchema.options[3],
492
+ MONTHS: recurringUnitSchema.options[4],
493
+ YEARS: recurringUnitSchema.options[5]
494
+ };
409
495
  var frequencyAndSchedulingPropertiesSchema = z3.object({
410
496
  surveyType: surveyTypeSchema.describe("Type of feedback: R for recurring, O for one-time"),
411
497
  showOnce: yesNoSchema.describe("Whether the feedback should be shown only once per user"),
@@ -459,6 +545,11 @@ var externalPublishingPropertiesSchema = z3.object({
459
545
  isEmailShareable: z3.boolean().describe("Whether the feedback can be shared via email")
460
546
  }).describe("Schema defining external publishing and sharing properties for feedback");
461
547
  var publicationStatusSchema = z3.enum(["P", "D", "A"]).describe("Publication status: P=Published, D=Draft, A=Archived");
548
+ var PublicationStatuses = {
549
+ PUBLISHED: publicationStatusSchema.options[0],
550
+ DRAFT: publicationStatusSchema.options[1],
551
+ ARCHIVED: publicationStatusSchema.options[2]
552
+ };
462
553
  var feedbackConfigurationSchema = z3.object({
463
554
  form_title: z3.string().describe("Title of the feedback form"),
464
555
  form_description: z3.string().describe("Description of the feedback form"),
@@ -644,6 +735,11 @@ __name(createTranslationProvider, "createTranslationProvider");
644
735
 
645
736
  // src/schemas/fields/other-screen-schema.ts
646
737
  import { z as z5 } from "zod";
738
+ var dismissBehaviorSchema = z5.enum(["fade", "manual"]).describe("How the end screen should be dismissed (fade out or manual dismissal)");
739
+ var DismissBehaviors = {
740
+ FADE: dismissBehaviorSchema.options[0],
741
+ MANUAL: dismissBehaviorSchema.options[1]
742
+ };
647
743
  var WelcomeScreenFieldsSchema = z5.object({
648
744
  title: z5.string().min(1).max(200).describe("The main title displayed on the welcome screen"),
649
745
  description: z5.string().min(1).max(1e3).describe("Description text shown on the welcome screen"),
@@ -653,7 +749,7 @@ var EndScreenFieldsSchema = z5.object({
653
749
  title: z5.string().min(1).max(200).describe("The main title displayed on the end screen"),
654
750
  message: z5.string().min(1).max(1e3).describe("Message text shown on the end screen"),
655
751
  buttonLabel: z5.string().min(1).max(50).describe("Text displayed on the end screen button"),
656
- dismissBehavior: z5.enum(["fade", "manual"]).describe("How the end screen should be dismissed (fade out or manual dismissal)"),
752
+ dismissBehavior: dismissBehaviorSchema.describe("How the end screen should be dismissed (fade out or manual dismissal)"),
657
753
  fadeDuration: z5.number().int().min(0).max(1e4).describe("Duration in milliseconds for fade dismissal (0-10000)")
658
754
  }).describe("Schema for end screen configuration fields");
659
755
  var WelcomeFieldsTranslationSchema = z5.object({
@@ -700,7 +796,22 @@ var positionSchema = z6.enum([
700
796
  "bottom-center",
701
797
  "bottom-right"
702
798
  ]).describe("Available positions for widget placement");
799
+ var Positions = {
800
+ TOP_LEFT: positionSchema.options[0],
801
+ TOP_CENTER: positionSchema.options[1],
802
+ TOP_RIGHT: positionSchema.options[2],
803
+ MIDDLE_LEFT: positionSchema.options[3],
804
+ MIDDLE_CENTER: positionSchema.options[4],
805
+ MIDDLE_RIGHT: positionSchema.options[5],
806
+ BOTTOM_LEFT: positionSchema.options[6],
807
+ BOTTOM_CENTER: positionSchema.options[7],
808
+ BOTTOM_RIGHT: positionSchema.options[8]
809
+ };
703
810
  var themeModeSchema = z6.enum(["light", "dark"]).describe("Available theme modes for the widget");
811
+ var ThemeModes = {
812
+ LIGHT: themeModeSchema.options[0],
813
+ DARK: themeModeSchema.options[1]
814
+ };
704
815
  var featureSettingsSchema = z6.object({
705
816
  darkOverlay: z6.boolean().describe("Whether to show a dark overlay behind the widget"),
706
817
  closeButton: z6.boolean().describe("Whether to display a close button on the widget"),
@@ -822,21 +933,37 @@ import { z as z9 } from "zod";
822
933
  export {
823
934
  AnswerSchema,
824
935
  ChoiceAnswerSchema,
936
+ ChoiceOrderOptions,
825
937
  ContinuousSumAnswerSchema,
938
+ DismissBehaviors,
826
939
  EndFieldsTranslationSchema,
827
940
  EndScreenFieldsSchema,
828
941
  LanguageFieldSchema,
829
942
  LanguagesSchema,
830
943
  MultipleChoiceAnswerSchema,
944
+ MultipleChoiceDisplayStyles,
945
+ MultipleChoiceMultipleDisplayStyles,
831
946
  OtherFieldsSchema,
832
947
  OtherFieldsTranslationSchema,
948
+ Positions,
949
+ PublicationStatuses,
950
+ QuestionStatuses,
951
+ QuestionTypes,
833
952
  RankingAnswerSchema,
953
+ RatingDisplayStyles,
954
+ RatingRepresentationSizes,
955
+ RecurringUnits,
834
956
  ScaleAnswerSchema,
835
957
  SimpleAnswerSchema,
958
+ SurveyTypes,
836
959
  TextAnswerSchema,
960
+ ThemeModes,
837
961
  TranslationProvider,
962
+ ValidationRuleTypes,
963
+ VisibilityConditionOperators,
838
964
  WelcomeFieldsTranslationSchema,
839
965
  WelcomeScreenFieldsSchema,
966
+ YesNoValues,
840
967
  annotationQuestionSchema,
841
968
  annotationTranslationsSchema,
842
969
  appearancePropertiesSchema,
@@ -845,6 +972,7 @@ export {
845
972
  choiceOrderOptionSchema,
846
973
  combinedQuestionSchema,
847
974
  createTranslationProvider,
975
+ dismissBehaviorSchema,
848
976
  endScreenPropertiesSchema,
849
977
  externalPublishingPropertiesSchema,
850
978
  featureSettingsSchema,
@@ -884,10 +1012,12 @@ export {
884
1012
  surveyTypeSchema,
885
1013
  themeColorsSchema,
886
1014
  themeConfigurationSchema,
1015
+ themeModeSchema,
887
1016
  themesSchema,
888
1017
  translationEntrySchema,
889
1018
  translationsSchema,
890
1019
  validationRuleSchema,
1020
+ validationRuleTypeSchema,
891
1021
  visibilityConditionSchema,
892
1022
  welcomeScreenPropertiesSchema,
893
1023
  yesNoSchema,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/schemas/fields/field-schema.ts", "../../src/schemas/fields/answer-schema.ts", "../../src/schemas/fields/form-schema.ts", "../../src/schemas/fields/form-properties-schema.ts", "../../src/schemas/fields/translations-schema.ts", "../../src/schemas/fields/other-screen-schema.ts", "../../src/schemas/fields/theme-schema.ts", "../../src/schemas/fields/auto-trigger-schema.ts", "../../src/index.ts"],
4
- "sourcesContent": ["import { z } from \"zod\";\n\n// Question type enum for different form field types\nexport const questionTypeSchema = z\n .enum([\n \"rating\",\n \"single_choice\",\n \"nps\",\n \"nested_selection\",\n \"multiple_choice_multiple\",\n \"short_answer\",\n \"long_text\",\n \"annotation\",\n ])\n .describe(\"Enumeration of all supported question types for form fields\");\n\n// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .describe(\"Type of validation rule to apply\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value for the validation rule (string, number, or boolean)\"),\n message: z\n .string()\n .optional()\n .describe(\"Custom error message when validation fails\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this validation rule\"),\n })\n .describe(\"Schema defining validation rules for question responses\");\n\n// Visibility condition schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: z\n .enum([\n \"equals\",\n \"not_equals\",\n \"contains\",\n \"not_contains\",\n \"greater_than\",\n \"less_than\",\n \"is_empty\",\n \"is_not_empty\",\n ])\n .describe(\"Comparison operator for the condition\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value to compare against (string, number, or boolean)\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this visibility condition\"),\n })\n .describe(\n \"Schema defining conditions that control when questions are visible\"\n );\n\n// Section schema for organizing questions\nexport const sectionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the section\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display title for the section\"),\n question_ids: z\n .array(z.string())\n .min(1)\n .describe(\"Array of question IDs that belong to this section\"),\n })\n .describe(\"Schema defining sections that organize questions into logical groups\");\n\n// Question status enum\nexport const questionStatusSchema = z.enum([\"D\", \"P\", \"A\", \"S\"]); // Draft, Published, Archived, Suspended\n\n// Display style enum for rating questions\nexport const ratingDisplayStyleSchema = z.enum([\n \"star\",\n \"heart\",\n \"thumbs-up\",\n \"diamond\",\n \"emoji\",\n \"emoji-exp\",\n]);\n\n// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\n\n// Display style enum for multiple choice questions\nexport const multipleChoiceDisplayStyleSchema = z.enum([\n \"radio\",\n \"list\",\n \"chip\",\n \"dropdown\",\n]);\n\n// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\n\n// Choice order options for nested selection questions\nexport const choiceOrderOptionSchema = z.enum([\n \"randomize\",\n \"flip\",\n \"rotate\",\n \"ascending\",\n \"none\",\n]);\n\n// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for the question\"),\n type: questionTypeSchema.describe(\n \"The type of question (rating, single_choice, etc.)\"\n ),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title/question text displayed to users\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text\"),\n describe: z\n .string()\n .max(2000)\n .optional()\n .describe(\n \"LLM tool call description for better AI understanding and context\"\n ),\n required: z\n .boolean()\n .default(false)\n .describe(\"Whether this question must be answered\"),\n errorMessage: z\n .string()\n .max(500)\n .optional()\n .describe(\"Custom error message when validation fails\"),\n validations: z\n .array(validationRuleSchema)\n .optional()\n .default([])\n .describe(\"Array of validation rules to apply\"),\n visibility: z\n .array(visibilityConditionSchema)\n .optional()\n .default([])\n .describe(\"Conditions that control when this question is shown\"),\n isFixed: z\n .boolean()\n .describe(\"Whether this question position is fixed or can be reordered\"),\n sectionId: z\n .string()\n .optional()\n .describe(\"ID of the section this question belongs to\"),\n status: questionStatusSchema.describe(\n \"Current status of the question (Draft, Published, etc.)\"\n ),\n })\n .describe(\"Base schema for all question types with common properties\");\n\n// Rating question schema (extends base question with specific rating properties)\nexport const ratingQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.rating)\n .describe(\"Must be exactly 'rating'\"),\n showLabels: z\n .boolean()\n .optional()\n .describe(\"Whether to show min/max labels\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum rating value\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum rating value\"),\n displayStyle: ratingDisplayStyleSchema\n .optional()\n .describe(\"Visual style for rating display\"),\n numberOfRatings: z\n .number()\n .int()\n .min(1)\n .max(10)\n .describe(\"Number of rating options (1-10)\"),\n representationSize: ratingRepresentationSizeSchema\n .optional()\n .describe(\"Size of rating visual elements\"),\n color: z\n .string()\n .regex(/^#[0-9A-F]{6}$/i, \"Must be a valid hex color\")\n .optional()\n .describe(\"Hex color for rating elements\"),\n })\n .describe(\"Schema for rating questions with customizable display options\");\n\n// Annotation question schema (extends base question with annotation properties)\nexport const annotationQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.annotation)\n .describe(\"Must be exactly 'annotation'\"),\n annotationText: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Text to display when annotation is provided\"),\n noAnnotationText: z\n .string()\n .max(500)\n .optional()\n .describe(\"Text to display when no annotation is provided\"),\n })\n .describe(\n \"Schema for annotation questions that provide additional context or instructions\"\n );\n\n// Question option schema for choice-based questions\nexport const questionOptionSchema = z\n .object({\n id: z.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(questionTypeSchema.enum.single_choice)\n .describe(\"Must be exactly 'single_choice'\"),\n displayStyle: multipleChoiceDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying options\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .describe(\"Schema for single-choice multiple selection questions\");\n\n// Multiple choice multiple question schema (extends base question with multiple choice properties)\nexport const multipleChoiceMultipleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.multiple_choice_multiple)\n .describe(\"Must be exactly 'multiple_choice_multiple'\"),\n displayStyle: multipleChoiceMultipleDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying multiple options\"),\n minSelections: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of options that must be selected\"),\n maxSelections: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of options that can be selected\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .refine(\n (data) => {\n // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections\n if (\n data.minSelections !== undefined &&\n data.maxSelections !== undefined\n ) {\n return data.minSelections <= data.maxSelections;\n }\n return true;\n },\n {\n message: \"minSelections cannot be greater than maxSelections\",\n path: [\"minSelections\"], // Point to minSelections field for the error\n }\n )\n .describe(\n \"Schema for multiple-choice questions allowing multiple selections\"\n );\n\n// NPS question schema (extends base question with NPS-specific properties)\nexport const npsQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.nps)\n .describe(\"Must be exactly 'nps'\"),\n min: z.literal(0).describe(\"NPS always starts at 0\"),\n max: z.literal(10).describe(\"NPS always ends at 10\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum NPS value (0)\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum NPS value (10)\"),\n scaleLabels: z\n .record(z.string().regex(/^\\d+$/), z.string().max(50))\n .optional()\n .describe(\"Custom labels for specific NPS values (0-10)\"),\n prepopulatedValue: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Default value to pre-select (0-10)\"),\n })\n .refine(\n (data) => {\n // If scaleLabels is provided, validate that all keys are within the 0-10 range\n if (data.scaleLabels) {\n const keys = Object.keys(data.scaleLabels);\n return keys.every((key) => {\n const numKey = Number(key);\n return !isNaN(numKey) && numKey >= 0 && numKey <= 10;\n });\n }\n return true;\n },\n {\n message: \"scaleLabels keys must be between 0 and 10 (inclusive)\",\n path: [\"scaleLabels\"],\n }\n )\n .describe(\"Schema for Net Promoter Score questions with 0-10 scale\");\n\n// Short answer question schema (extends base question with text input properties)\nexport const shortAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.short_answer)\n .describe(\"Must be exactly 'short_answer'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum number of characters allowed\"),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text shown in the input field\"),\n enableRegexValidation: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable regex pattern validation\"),\n regexPattern: z\n .string()\n .optional()\n .describe(\"Regular expression pattern for validation\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum tokens allowed for AI processing\"),\n minCharactersToEnhance: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Minimum characters needed to trigger AI enhancement\"),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableRegexValidation is true, regexPattern should be provided\n if (data.enableRegexValidation && !data.regexPattern) {\n return false;\n }\n return true;\n },\n {\n message: \"regexPattern is required when enableRegexValidation is true\",\n path: [\"regexPattern\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\"Schema for short answer questions with optional AI enhancement\");\n\n// Long answer question schema (extends base question with rich text input properties)\nexport const longAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.long_text)\n .describe(\"Must be exactly 'long_text'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(50000)\n .optional()\n .describe(\n \"Maximum number of characters allowed (higher limit for long text)\"\n ),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n rows: z\n .number()\n .int()\n .min(1)\n .max(20)\n .optional()\n .describe(\"Number of textarea rows to display (1-20)\"),\n placeholder: z\n .string()\n .max(500)\n .optional()\n .describe(\"Placeholder text for the textarea (longer for long text)\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(25000)\n .optional()\n .describe(\n \"Maximum tokens allowed for AI processing (higher for long text)\"\n ),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\n \"Schema for long answer questions with rich text support and AI enhancement\"\n );\n\n// Nested dropdown question schema (extends base question with hierarchical selection properties)\nexport const nestedDropdownQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(questionTypeSchema.enum.nested_selection)\n .describe(\"Must be exactly 'nested_selection'\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the nested dropdown\"),\n options: z\n .array(nestedOptionSchema)\n .min(1)\n .max(100)\n .describe(\n \"Array of nested options for hierarchical selection (1-100 options)\"\n ),\n displayStyle: z\n .literal(\"list\")\n .describe(\"Fixed display style for nested dropdowns\"),\n choiceOrderOption: choiceOrderOptionSchema\n .optional()\n .default(\"none\")\n .describe(\"How to order the nested choices\"),\n preserveLastChoices: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Number of choice levels to preserve (0-10)\"),\n prepopulatedValue: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Default value to pre-populate\"),\n allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow custom \"other\" options'),\n otherColumnName: z\n .string()\n .max(100)\n .optional()\n .describe('Column name for storing custom \"other\" values'),\n maxDepth: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum nesting depth allowed (1-10)\"),\n cascadeLabels: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to cascade labels from parent options\"),\n })\n .refine(\n (data) => {\n // If allowOther is true, otherColumnName should be provided\n if (data.allowOther && !data.otherColumnName) {\n return false;\n }\n return true;\n },\n {\n message: \"otherColumnName is required when allowOther is true\",\n path: [\"otherColumnName\"],\n }\n )\n .describe(\n \"Schema for nested dropdown questions with hierarchical option structure\"\n );\n\n// Export inferred types\nexport type QuestionType = z.infer<typeof questionTypeSchema>;\nexport type ValidationRule = z.infer<typeof validationRuleSchema>;\nexport type VisibilityCondition = z.infer<typeof visibilityConditionSchema>;\nexport type QuestionStatus = z.infer<typeof questionStatusSchema>;\nexport type Question = z.infer<typeof questionSchema>;\nexport type RatingDisplayStyle = z.infer<typeof ratingDisplayStyleSchema>;\nexport type RatingRepresentationSize = z.infer<\n typeof ratingRepresentationSizeSchema\n>;\nexport type RatingQuestion = z.infer<typeof ratingQuestionSchema>;\nexport type AnnotationQuestion = z.infer<typeof annotationQuestionSchema>;\nexport type QuestionOption = z.infer<typeof questionOptionSchema>;\nexport type NestedOption = z.infer<typeof nestedOptionSchema>;\nexport type MultipleChoiceDisplayStyle = z.infer<\n typeof multipleChoiceDisplayStyleSchema\n>;\nexport type MultipleChoiceSingleQuestion = z.infer<\n typeof multipleChoiceSingleQuestionSchema\n>;\nexport type MultipleChoiceMultipleDisplayStyle = z.infer<\n typeof multipleChoiceMultipleDisplayStyleSchema\n>;\nexport type MultipleChoiceMultipleQuestion = z.infer<\n typeof multipleChoiceMultipleQuestionSchema\n>;\nexport type NpsQuestion = z.infer<typeof npsQuestionSchema>;\nexport type ShortAnswerQuestion = z.infer<typeof shortAnswerQuestionSchema>;\nexport type LongAnswerQuestion = z.infer<typeof longAnswerQuestionSchema>;\nexport type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;\nexport type NestedDropdownQuestion = z.infer<\n typeof nestedDropdownQuestionSchema\n>;\nexport type Section = z.infer<typeof sectionSchema>;\n\n// Combined question schema using discriminated union for proper type safety\nexport const combinedQuestionSchema = z.discriminatedUnion(\"type\", [\n ratingQuestionSchema,\n annotationQuestionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n]);\n\n// Explicit type definition for better inference\nexport type CombinedQuestion = \n | z.infer<typeof ratingQuestionSchema>\n | z.infer<typeof annotationQuestionSchema>\n | z.infer<typeof multipleChoiceSingleQuestionSchema>\n | z.infer<typeof multipleChoiceMultipleQuestionSchema>\n | z.infer<typeof npsQuestionSchema>\n | z.infer<typeof shortAnswerQuestionSchema>\n | z.infer<typeof longAnswerQuestionSchema>\n | z.infer<typeof nestedDropdownQuestionSchema>;\n", "import { z } from \"zod\";\n\n// Simple answer schema\nexport const SimpleAnswerSchema = z\n .object({\n type: z\n .literal(\"simple\")\n .describe(\"Indicates this is a simple answer with a single value\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .describe(\"The answer value - can be text, number, or boolean\"),\n })\n .describe(\n \"A simple answer containing a single value like text, number, or boolean\"\n );\n\n// Choice answer schema\nexport const ChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"choice\")\n .describe(\"Indicates this is a single-choice answer\"),\n selectedOptionId: z\n .string()\n .describe(\"The ID of the selected option from the available choices\"),\n })\n .describe(\n \"A single-choice answer where the user selects one option from a list\"\n );\n\n// Multiple choice answer schema\nexport const MultipleChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"multiple_choice\")\n .describe(\"Indicates this is a multiple-choice answer\"),\n selectedOptionIds: z\n .array(z.string())\n .describe(\n \"Array of IDs for all selected options from the available choices\"\n ),\n })\n .describe(\n \"A multiple-choice answer where the user can select multiple options from a list\"\n );\n\n// Scale answer schema\nexport const ScaleAnswerSchema = z\n .object({\n type: z\n .literal(\"scale\")\n .describe(\"Indicates this is a scale/rating answer\"),\n value: z\n .number()\n .describe(\n \"The numerical value representing the position on the scale (e.g., 1-5, 1-10)\"\n ),\n })\n .describe(\n \"A scale answer where the user selects a numerical value on a scale\"\n );\n\n// Continuous sum answer schema\nexport const ContinuousSumAnswerSchema = z\n .object({\n type: z\n .literal(\"continuous_sum\")\n .describe(\"Indicates this is a continuous sum answer\"),\n values: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being rated\"),\n value: z\n .number()\n .describe(\"The numerical value assigned to this option\"),\n })\n )\n .describe(\n \"Array of option-value pairs where the sum of all values represents a total allocation\"\n ),\n })\n .describe(\n \"A continuous sum answer where users distribute values across multiple options that add up to a total\"\n );\n\n// Ranking answer schema\nexport const RankingAnswerSchema = z\n .object({\n type: z.literal(\"ranking\").describe(\"Indicates this is a ranking answer\"),\n ranks: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being ranked\"),\n rank: z\n .number()\n .describe(\n \"The rank position of this option (lower numbers indicate higher preference)\"\n ),\n })\n )\n .describe(\n \"Array of option-rank pairs showing the user's preference ordering\"\n ),\n })\n .describe(\n \"A ranking answer where users order options by preference or priority\"\n );\n\n// Text answer schema\nexport const TextAnswerSchema = z\n .object({\n type: z.literal(\"text\").describe(\"Indicates this is a text-based answer\"),\n values: z\n .array(\n z.object({\n fieldId: z.string().describe(\"The ID of the text field\"),\n text: z.string().describe(\"The text content entered by the user\"),\n })\n )\n .describe(\"Array of field-text pairs for multiple text input fields\"),\n })\n .describe(\n \"A text answer containing responses to one or more text input fields\"\n );\n\n// Union schema for all answer types\nexport const AnswerSchema = z\n .discriminatedUnion(\"type\", [\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n ])\n .describe(\n \"A union of all possible answer types discriminated by the 'type' field\"\n );\n\n// Type inference from schemas (for type safety)\nexport type SimpleAnswer = z.infer<typeof SimpleAnswerSchema>;\nexport type ChoiceAnswer = z.infer<typeof ChoiceAnswerSchema>;\nexport type MultipleChoiceAnswer = z.infer<typeof MultipleChoiceAnswerSchema>;\nexport type ScaleAnswer = z.infer<typeof ScaleAnswerSchema>;\nexport type ContinuousSumAnswer = z.infer<typeof ContinuousSumAnswerSchema>;\nexport type RankingAnswer = z.infer<typeof RankingAnswerSchema>;\nexport type TextAnswer = z.infer<typeof TextAnswerSchema>;\n// Explicit type definition for better inference\nexport type Answer = \n | z.infer<typeof SimpleAnswerSchema>\n | z.infer<typeof ChoiceAnswerSchema>\n | z.infer<typeof MultipleChoiceAnswerSchema>\n | z.infer<typeof ScaleAnswerSchema>\n | z.infer<typeof ContinuousSumAnswerSchema>\n | z.infer<typeof RankingAnswerSchema>\n | z.infer<typeof TextAnswerSchema>;\n", "import { z } from \"zod\";\n\n// Feedback type enum for different feedback frequency types\nexport const surveyTypeSchema = z\n .enum([\"R\", \"O\"])\n .describe(\"Enumeration of feedback types: R=Recurring, O=One-time\");\n\n// Yes/No enum for boolean-like string fields\nexport const yesNoSchema = z\n .enum([\"Y\", \"N\"])\n .describe(\"Yes/No enumeration using Y/N values\");\n\n// Time unit enum for recurring schedules\nexport const recurringUnitSchema = z\n .enum([\"minutes\", \"hours\", \"days\", \"weeks\", \"months\", \"years\"])\n .describe(\"Time units for recurring feedback schedules\");\n\n// Frequency and scheduling properties schema\nexport const frequencyAndSchedulingPropertiesSchema = z\n .object({\n surveyType: surveyTypeSchema\n .describe(\"Type of feedback: R for recurring, O for one-time\"),\n showOnce: yesNoSchema\n .describe(\"Whether the feedback should be shown only once per user\"),\n stopWhenResponsesCount: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Stop feedback when this number of responses is reached (as string)\"),\n recurringValue: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Value for recurring schedule (e.g., every 15 days)\"),\n recurringUnit: recurringUnitSchema\n .describe(\"Time unit for recurring schedule\"),\n startDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback in ISO format\"),\n stopDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Stop date and time for the feedback in ISO format\"),\n })\n .refine(\n (data) => {\n // If surveyType is \"O\" (one-time), showOnce should be \"Y\"\n if (data.surveyType === \"O\" && data.showOnce === \"N\") {\n return false;\n }\n return true;\n },\n {\n message: \"One-time feedback must have showOnce set to 'Y'\",\n path: [\"showOnce\"],\n }\n )\n .refine(\n (data) => {\n // If surveyType is \"R\" (recurring), recurringValue and recurringUnit should be meaningful\n if (data.surveyType === \"R\") {\n const value = parseInt(data.recurringValue);\n return value > 0;\n }\n return true;\n },\n {\n message: \"Recurring feedback must have a positive recurring value\",\n path: [\"recurringValue\"],\n }\n )\n .refine(\n (data) => {\n // stopDate should be after startDate\n const start = new Date(data.startDate);\n const stop = new Date(data.stopDate);\n return stop > start;\n },\n {\n message: \"Stop date must be after start date\",\n path: [\"stopDate\"],\n }\n )\n .describe(\"Schema defining frequency and scheduling properties for feedback\");\n\n// External publishing properties schema\nexport const externalPublishingPropertiesSchema = z\n .object({\n isShareable: z\n .boolean()\n .describe(\"Whether the feedback results can be shared externally\"),\n isEmailShareable: z\n .boolean()\n .describe(\"Whether the feedback can be shared via email\"),\n })\n .describe(\"Schema defining external publishing and sharing properties for feedback\");\n\n// Publication status enum\nexport const publicationStatusSchema = z\n .enum([\"P\", \"D\",\"A\"])\n .describe(\"Publication status: P=Published, D=Draft, A=Archived\");\n\n// Feedback configuration schema\nexport const feedbackConfigurationSchema = z\n .object({\n form_title: z\n .string()\n .describe(\"Title of the feedback form\"),\n form_description: z\n .string()\n .describe(\"Description of the feedback form\"),\n duration: z\n .object({\n from: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback duration\"),\n to: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"End date and time for the feedback duration\"),\n })\n .describe(\"Duration period for the feedback\"),\n is_published: publicationStatusSchema\n .describe(\"Publication status of the feedback form\"),\n })\n .refine(\n (data) => {\n // End date should be after start date\n const start = new Date(data.duration.from);\n const end = new Date(data.duration.to);\n return end > start;\n },\n {\n message: \"End date must be after start date\",\n path: [\"duration\", \"to\"],\n }\n )\n .describe(\"Schema defining feedback configuration properties\");\n\n// Type inference from schemas (for type safety)\nexport type SurveyType = z.infer<typeof surveyTypeSchema>;\nexport type YesNo = z.infer<typeof yesNoSchema>;\nexport type RecurringUnit = z.infer<typeof recurringUnitSchema>;\nexport type PublicationStatus = z.infer<typeof publicationStatusSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport { feedbackConfigurationSchema } from \"./form-schema\";\nimport { frequencyAndSchedulingPropertiesSchema } from \"./form-schema\";\nimport { externalPublishingPropertiesSchema } from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema, WelcomeScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndScreenFieldsSchema, EndFieldsTranslationSchema } from \"./other-screen-schema\";\nimport { themeConfigurationSchema } from \"./theme-schema\";\nimport { audienceTriggerPropertiesSchema } from \"./auto-trigger-schema\";\n\n// Other configuration properties schema using discriminated union for JSON schema compatibility\nexport const otherConfigurationPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When other configuration is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .optional()\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: OtherFieldsTranslationSchema\n .optional()\n .describe(\"Translations for other configuration field labels and buttons\"),\n }),\n // When other configuration is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: OtherFieldsTranslationSchema\n .describe(\"Translations for other configuration field labels and buttons\"),\n }),\n ])\n .describe(\"Schema for other configuration properties including fields and translations\");\n\n// Welcome screen properties schema using discriminated union for JSON schema compatibility\nexport const welcomeScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When welcome screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .optional()\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: WelcomeFieldsTranslationSchema\n .optional()\n .describe(\"Translations for welcome screen content\"),\n }),\n // When welcome screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: WelcomeFieldsTranslationSchema\n .describe(\"Translations for welcome screen content\"),\n }),\n ])\n .describe(\"Schema for welcome screen properties including fields and translations\");\n\n// End screen properties schema using discriminated union for JSON schema compatibility\nexport const endScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When end screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .optional()\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: EndFieldsTranslationSchema\n .optional()\n .describe(\"Translations for end screen content\"),\n }),\n // When end screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: EndFieldsTranslationSchema\n .describe(\"Translations for end screen content\"),\n }),\n ])\n .describe(\"Schema for end screen properties including fields and translations\");\n\n// Appearance properties schema\nexport const appearancePropertiesSchema = z\n .object({\n themeConfiguration: themeConfigurationSchema\n .describe(\"Theme configuration including colors, features, and positioning\"),\n })\n .describe(\"Schema for appearance properties including theme configuration\");\n\n// Combined form properties schema (if needed for complete form configuration)\nexport const formPropertiesSchema = z\n .object({\n feedback_configuration_id: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedback_configuration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaire_fields: z\n .object({\n questions: z.record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z.array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n selected_languages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n translations: translationsSchema\n .describe(\"Multi-language translations for questions and form content\"),\n })\n .describe(\"Fields defining the questionnaire structure, questions, sections, selected languages, and translations\"),\n frequency_and_scheduling_properties: frequencyAndSchedulingPropertiesSchema\n .describe(\"Properties controlling when and how often the feedback is shown\"),\n external_publishing_properties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audience_trigger_properties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n other_configuration_properties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n welcome_screen_properties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen configuration including content and translations\"),\n end_screen_properties: endScreenPropertiesSchema\n .describe(\"End screen configuration including content, dismissal behavior, and translations\"),\n appearance_properties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance\");\n\n// Type inference from schema (for type safety)\nexport type FormProperties = z.infer<typeof formPropertiesSchema>;\n\n// Explicit type definition for better inference\nexport type OtherConfigurationProperties = \n | {\n isEnabled: false;\n otherFields?: z.infer<typeof OtherFieldsSchema>;\n translations?: z.infer<typeof OtherFieldsTranslationSchema>;\n }\n | {\n isEnabled: true;\n otherFields: z.infer<typeof OtherFieldsSchema>;\n translations: z.infer<typeof OtherFieldsTranslationSchema>;\n };\n\n// Explicit type definition for better inference\nexport type WelcomeScreenProperties = \n | {\n isEnabled: false;\n welcomeFields?: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations?: z.infer<typeof WelcomeFieldsTranslationSchema>;\n }\n | {\n isEnabled: true;\n welcomeFields: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations: z.infer<typeof WelcomeFieldsTranslationSchema>;\n };\n\n// Explicit type definition for better inference\nexport type EndScreenProperties = \n | {\n isEnabled: false;\n endFields?: z.infer<typeof EndScreenFieldsSchema>;\n translations?: z.infer<typeof EndFieldsTranslationSchema>;\n }\n | {\n isEnabled: true;\n endFields: z.infer<typeof EndScreenFieldsSchema>;\n translations: z.infer<typeof EndFieldsTranslationSchema>;\n };\n\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\n\n// Base translation entry\nexport const translationEntrySchema = z\n .object({\n text: z.string().min(1).describe(\"Translated text content\"),\n context: z.string().optional().describe(\"Optional context for translators\"),\n })\n .describe(\"Translation entry with translated text\");\n\n// Rating question translations\nexport const ratingTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum rating label translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum rating label translation\"),\n })\n .describe(\"Translation schema for rating questions\");\n\n// Single choice question translations\nexport const singleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for single choice questions\");\n\n// Multiple choice question translations\nexport const multipleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for multiple choice questions\");\n\n// NPS question translations\nexport const npsTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum NPS label (0) translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum NPS label (10) translation\"),\n scaleLabels: z.record(z.number().int().min(0).max(10), translationEntrySchema)\n .optional()\n .describe(\"Scale label translations for specific NPS values (0-10)\"),\n })\n .describe(\"Translation schema for NPS questions\");\n\n// Short answer question translations\nexport const shortAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .describe(\"Translation schema for short answer questions\");\n\n// Long answer question translations\nexport const longAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Textarea placeholder translation\"),\n })\n .describe(\"Translation schema for long answer questions\");\n\n// Nested selection question translations\nexport const nestedSelectionTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Dropdown placeholder translation\"),\n nestedOptions: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Nested option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Nested option hint translation\"),\n })).describe(\"Nested option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for nested selection questions\");\n\n// Annotation question translations\nexport const annotationTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n annotationText: translationEntrySchema.optional().describe(\"Annotation display text translation\"),\n noAnnotationText: translationEntrySchema.optional().describe(\"No annotation display text translation\"),\n })\n .describe(\"Translation schema for annotation questions\");\n\n// Discriminated union of all translation types\nexport const questionTranslationsSchema = z\n .discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"rating\"), translations: ratingTranslationsSchema }),\n z.object({ type: z.literal(\"single_choice\"), translations: singleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"multiple_choice_multiple\"), translations: multipleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"nps\"), translations: npsTranslationsSchema }),\n z.object({ type: z.literal(\"short_answer\"), translations: shortAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"long_text\"), translations: longAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"nested_selection\"), translations: nestedSelectionTranslationsSchema }),\n z.object({ type: z.literal(\"annotation\"), translations: annotationTranslationsSchema }),\n ])\n .describe(\"Discriminated union of all question type translation schemas\");\n\n// Language-specific translations keyed by question ID\nexport const languageTranslationsSchema = z\n .object({\n languageCode: z.string().describe(\"Language code matching LanguagesSchema values\"),\n questions: z.record(z.string(), questionTranslationsSchema)\n .describe(\"Question translations keyed by question ID\"),\n })\n .describe(\"Language-specific translation set keyed by question IDs\");\n\n// Complete translation schema\nexport const translationsSchema = z\n .object({\n defaultLanguage: z.string().describe(\"Default/fallback language code\"),\n languages: z.array(languageTranslationsSchema).min(1)\n .describe(\"Available language translations\"),\n version: z.string().optional().describe(\"Translation version for cache management\"),\n })\n .describe(\"Complete translation schema keyed by question IDs\");\n\n// Type exports\nexport type TranslationEntry = z.infer<typeof translationEntrySchema>;\nexport type RatingTranslations = z.infer<typeof ratingTranslationsSchema>;\nexport type SingleChoiceTranslations = z.infer<typeof singleChoiceTranslationsSchema>;\nexport type MultipleChoiceTranslations = z.infer<typeof multipleChoiceTranslationsSchema>;\nexport type NpsTranslations = z.infer<typeof npsTranslationsSchema>;\nexport type ShortAnswerTranslations = z.infer<typeof shortAnswerTranslationsSchema>;\nexport type LongAnswerTranslations = z.infer<typeof longAnswerTranslationsSchema>;\nexport type NestedSelectionTranslations = z.infer<typeof nestedSelectionTranslationsSchema>;\nexport type AnnotationTranslations = z.infer<typeof annotationTranslationsSchema>;\n// Explicit type definition for better inference\nexport type QuestionTranslations = \n | { type: \"rating\"; translations: z.infer<typeof ratingTranslationsSchema> }\n | { type: \"single_choice\"; translations: z.infer<typeof singleChoiceTranslationsSchema> }\n | { type: \"multiple_choice_multiple\"; translations: z.infer<typeof multipleChoiceTranslationsSchema> }\n | { type: \"nps\"; translations: z.infer<typeof npsTranslationsSchema> }\n | { type: \"short_answer\"; translations: z.infer<typeof shortAnswerTranslationsSchema> }\n | { type: \"long_text\"; translations: z.infer<typeof longAnswerTranslationsSchema> }\n | { type: \"nested_selection\"; translations: z.infer<typeof nestedSelectionTranslationsSchema> }\n | { type: \"annotation\"; translations: z.infer<typeof annotationTranslationsSchema> };\nexport type LanguageTranslations = z.infer<typeof languageTranslationsSchema>;\nexport type Translations = z.infer<typeof translationsSchema>;\n\n// Translation helper class\nexport class TranslationProvider {\n private translations: Translations;\n\n constructor(translations: Translations) {\n this.translations = translations;\n }\n\n /**\n * Get translations for a specific question in a specific language\n */\n getQuestionTranslations(\n questionId: string,\n languageCode: string\n ): QuestionTranslations | null {\n const languageData = this.translations.languages.find(\n lang => lang.languageCode === languageCode\n );\n\n if (!languageData) {\n // Fallback to default language\n const defaultLang = this.translations.languages.find(\n lang => lang.languageCode === this.translations.defaultLanguage\n );\n if (!defaultLang) return null;\n\n return defaultLang.questions[questionId] || null;\n }\n\n return languageData.questions[questionId] || null;\n }\n\n /**\n * Get a specific translation text\n */\n getTranslationText(\n questionId: string,\n languageCode: string,\n path: string[]\n ): string | null {\n const questionTranslations = this.getQuestionTranslations(questionId, languageCode);\n if (!questionTranslations) return null;\n\n let current: any = questionTranslations.translations;\n\n for (const key of path) {\n if (current && typeof current === 'object' && key in current) {\n current = current[key];\n } else {\n return null;\n }\n }\n\n // Handle nested structures like options\n if (current && typeof current === 'object' && 'text' in current) {\n return current.text;\n }\n\n return null;\n }\n\n /**\n * Get all available languages\n */\n getAvailableLanguages(): string[] {\n return this.translations.languages.map(lang => lang.languageCode);\n }\n\n /**\n * Check if a language is supported\n */\n isLanguageSupported(languageCode: string): boolean {\n return this.translations.languages.some(lang => lang.languageCode === languageCode);\n }\n\n /**\n * Get the default language\n */\n getDefaultLanguage(): string {\n return this.translations.defaultLanguage;\n }\n}\n\n// Factory function to create translation provider\nexport function createTranslationProvider(translations: Translations): TranslationProvider {\n return new TranslationProvider(translations);\n}\n", "import { z } from \"zod\";\n\n// Welcome screen configuration schema\nexport const WelcomeScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Description text shown on the welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the welcome screen button\"),\n })\n .describe(\"Schema for welcome screen configuration fields\");\n\n// End screen configuration schema\nexport const EndScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Message text shown on the end screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the end screen button\"),\n dismissBehavior: z\n .enum([\"fade\", \"manual\"])\n .describe(\"How the end screen should be dismissed (fade out or manual dismissal)\"),\n fadeDuration: z\n .number()\n .int()\n .min(0)\n .max(10000)\n .describe(\"Duration in milliseconds for fade dismissal (0-10000)\"),\n })\n .describe(\"Schema for end screen configuration fields\");\n\n// Welcome translations configuration schema\nexport const WelcomeFieldsTranslationSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated description text for welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the welcome button label\"),\n })\n .describe(\"Schema for welcome screen translation fields\");\n\n// End translations configuration schema\nexport const EndFieldsTranslationSchema = z\n .object({\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the end button label\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated message text for end screen\"),\n })\n .describe(\"Schema for end screen translation fields\");\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n pagination: z\n .boolean()\n .describe(\"Whether to show pagination for multi-page forms\"),\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\n pageTitle: z\n .boolean()\n .describe(\"Whether to show page titles in multi-page forms\"),\n blockerFeedback: z\n .boolean()\n .describe(\"Whether to show blocker feedback for validation errors\"),\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration fields\");\n\n// Language field schema\nexport const LanguageFieldSchema = z\n .object({\n value: z\n .string()\n .min(1)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'fr')\"),\n label: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Display name for the language (e.g., 'English', 'Spanish', 'French')\"),\n isFixed: z\n .boolean()\n .default(false)\n .describe(\"Whether this language is fixed and cannot be deleted by users\"),\n })\n .describe(\"Schema for individual language field with value, label, and fixed status\");\n\n// Languages configuration schema\nexport const LanguagesSchema = z\n .array(LanguageFieldSchema)\n .describe(\"Schema for array of available languages\");\n\n// Other fields translation schema\nexport const OtherFieldsTranslationSchema = z\n .object({\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\nexport type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;\nexport type EndFields = z.infer<typeof EndScreenFieldsSchema>;\nexport type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;\nexport type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;\nexport type OtherFields = z.infer<typeof OtherFieldsSchema>;\nexport type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;\nexport type LanguageField = z.infer<typeof LanguageFieldSchema>;\nexport type Languages = z.infer<typeof LanguagesSchema>;\n", "import { z } from \"zod\";\n\n// Position enum for widget positioning\nexport const positionSchema = z\n .enum([\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"middle-left\",\n \"middle-center\",\n \"middle-right\",\n \"bottom-left\",\n \"bottom-center\",\n \"bottom-right\"\n ])\n .describe(\"Available positions for widget placement\");\n\n// 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// Schema for feature settings controlling UI behavior\nexport const featureSettingsSchema = z\n .object({\n darkOverlay: z\n .boolean()\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\")\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme colors\nexport const themeColorsSchema = z\n .object({\n brandColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #3366CC)\")\n .describe(\"Primary brand color in hex format\"),\n overlayColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #FFFFFF)\")\n .describe(\"Overlay background color in hex format\"),\n textColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #333333)\")\n .describe(\"Primary text color in hex format\"),\n backgroundColor: z\n .union([\n z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i),\n z.string().regex(/^rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*(?:,\\s*[01](?:\\.\\d+)?)?\\s*\\)$/i)\n ])\n .describe(\"Background color in hex format or rgba format (e.g., #1A1A1A or rgba(255,255,255, 1))\")\n })\n .describe(\"Color scheme for a single theme\");\n\n// Schema for the complete themes object\nexport const themesSchema = z\n .object({\n light: themeColorsSchema,\n dark: themeColorsSchema\n })\n .describe(\"Complete theme configuration with light and dark variants\");\n\n// Schema for the complete theme configuration\nexport const themeConfigurationSchema = z\n .object({\n themes: themesSchema\n .describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema\n .describe(\"UI feature settings controlling widget behavior\"),\n selectedPosition: positionSchema\n .describe(\"Selected position for the main widget\"),\n selectedIconPosition: positionSchema\n .describe(\"Selected position for the widget icon\")\n })\n .describe(\"Complete theme and UI configuration including colors, features, and positioning\");\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type FeatureSettings = z.infer<typeof featureSettingsSchema>;\nexport type ThemeColors = z.infer<typeof themeColorsSchema>;\nexport type Themes = z.infer<typeof themesSchema>;\nexport type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;\n", "import { z } from \"zod\";\n\n// Audience segment schema for targeting specific user groups\nexport const audienceSegmentSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the audience segment\"),\n name: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display name for the audience segment\"),\n isImportant: z\n .boolean()\n .describe(\"Whether this segment is marked as important for targeting\"),\n when: z\n .string()\n .describe(\"Timing condition for when to trigger the audience segment\"),\n who: z\n .string()\n .describe(\"User criteria or conditions defining who belongs to this segment\"),\n })\n .describe(\"Schema defining an audience segment for targeting\");\n\n// Audience trigger properties schema\nexport const audienceTriggerPropertiesSchema = z\n .object({\n isAuto: z\n .boolean()\n .describe(\"Whether automatic triggering is enabled for this audience\"),\n isManual: z\n .boolean()\n .describe(\"Whether manual triggering is enabled for this audience\"),\n segments: z\n .array(audienceSegmentSchema)\n .min(0)\n .describe(\"Array of audience segments for targeting conditions\"),\n })\n .refine(\n (data) => {\n // Ensure at least one of isAuto or isManual is true\n return data.isAuto || data.isManual;\n },\n {\n message: \"At least one of isAuto or isManual must be true\",\n path: [\"isAuto\"],\n }\n )\n .describe(\"Schema defining audience trigger properties for form targeting\");\n\n// Type inference from schemas\nexport type AudienceSegment = z.infer<typeof audienceSegmentSchema>;\nexport type AudienceTriggerProperties = z.infer<typeof audienceTriggerPropertiesSchema>;\n", "// Main entry point for encatch-typescript schemas\n\n// Field schema exports\nexport {\n questionTypeSchema,\n validationRuleSchema,\n visibilityConditionSchema,\n sectionSchema,\n questionStatusSchema,\n ratingDisplayStyleSchema,\n ratingRepresentationSizeSchema,\n multipleChoiceDisplayStyleSchema,\n multipleChoiceMultipleDisplayStyleSchema,\n choiceOrderOptionSchema,\n questionSchema,\n ratingQuestionSchema,\n annotationQuestionSchema,\n questionOptionSchema,\n nestedOptionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n combinedQuestionSchema,\n type QuestionType,\n type ValidationRule,\n type VisibilityCondition,\n type QuestionStatus,\n type Question,\n type RatingDisplayStyle,\n type RatingRepresentationSize,\n type RatingQuestion,\n type AnnotationQuestion,\n type QuestionOption,\n type NestedOption,\n type MultipleChoiceDisplayStyle,\n type MultipleChoiceSingleQuestion,\n type MultipleChoiceMultipleDisplayStyle,\n type MultipleChoiceMultipleQuestion,\n type NpsQuestion,\n type ShortAnswerQuestion,\n type LongAnswerQuestion,\n type ChoiceOrderOption,\n type NestedDropdownQuestion,\n type Section,\n type CombinedQuestion,\n} from \"./schemas/fields/field-schema\";\n\n// Answer schema exports\nexport {\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n AnswerSchema,\n type SimpleAnswer,\n type ChoiceAnswer,\n type MultipleChoiceAnswer,\n type ScaleAnswer,\n type ContinuousSumAnswer,\n type RankingAnswer,\n type TextAnswer,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n surveyTypeSchema,\n yesNoSchema,\n recurringUnitSchema,\n frequencyAndSchedulingPropertiesSchema,\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n type SurveyType,\n type YesNo,\n type RecurringUnit,\n type PublicationStatus,\n type FeedbackConfiguration,\n type FrequencyAndSchedulingProperties,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n welcomeScreenPropertiesSchema,\n endScreenPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type WelcomeScreenProperties,\n type EndScreenProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n WelcomeScreenFieldsSchema,\n EndScreenFieldsSchema,\n WelcomeFieldsTranslationSchema,\n EndFieldsTranslationSchema,\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n type WelcomeFields,\n type EndFields,\n type WelcomeFieldsTranslation,\n type EndFieldsTranslation,\n type OtherFields,\n type OtherFieldsTranslation,\n type LanguageField,\n type Languages,\n} from \"./schemas/fields/other-screen-schema\";\n\n// Theme schema exports\nexport {\n positionSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ThemeConfiguration,\n} from \"./schemas/fields/theme-schema\";\n\n// Translations schema exports\nexport {\n translationEntrySchema,\n ratingTranslationsSchema,\n singleChoiceTranslationsSchema,\n multipleChoiceTranslationsSchema,\n npsTranslationsSchema,\n shortAnswerTranslationsSchema,\n longAnswerTranslationsSchema,\n nestedSelectionTranslationsSchema,\n annotationTranslationsSchema,\n questionTranslationsSchema,\n languageTranslationsSchema,\n translationsSchema,\n TranslationProvider,\n createTranslationProvider,\n type TranslationEntry,\n type RatingTranslations,\n type SingleChoiceTranslations,\n type MultipleChoiceTranslations,\n type NpsTranslations,\n type ShortAnswerTranslations,\n type LongAnswerTranslations,\n type NestedSelectionTranslations,\n type AnnotationTranslations,\n type QuestionTranslations,\n type LanguageTranslations,\n type Translations,\n} from \"./schemas/fields/translations-schema\";\n\n// Auto trigger schema exports\nexport {\n audienceSegmentSchema,\n audienceTriggerPropertiesSchema,\n type AudienceSegment,\n type AudienceTriggerProperties,\n} from \"./schemas/fields/auto-trigger-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
5
- "mappings": ";;;;AAAA,SAAS,SAAS;AAGX,IAAM,qBAAqB,EAC/B,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS,6DAA6D;AAGlE,IAAM,uBAAuB,EACjC,OAAO;AAAA,EACN,MAAM,EACH,KAAK;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC,EACA,SAAS,kCAAkC;AAAA,EAC9C,OAAO,EACJ,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,EAC3C,SAAS,EACT,SAAS,4DAA4D;AAAA,EACxE,SAAS,EACN,OAAO,EACP,SAAS,EACT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field types\nexport const questionTypeSchema = z\n .enum([\n \"rating\",\n \"single_choice\",\n \"nps\",\n \"nested_selection\",\n \"multiple_choice_multiple\",\n \"short_answer\",\n \"long_text\",\n \"annotation\",\n ])\n .describe(\"Enumeration of all supported question types for form fields\");\n\n// Constants for question types (derived from the enum schema)\nexport const QuestionTypes = {\n RATING: questionTypeSchema.options[0],\n SINGLE_CHOICE: questionTypeSchema.options[1],\n NPS: questionTypeSchema.options[2],\n NESTED_SELECTION: questionTypeSchema.options[3],\n MULTIPLE_CHOICE_MULTIPLE: questionTypeSchema.options[4],\n SHORT_ANSWER: questionTypeSchema.options[5],\n LONG_TEXT: questionTypeSchema.options[6],\n ANNOTATION: questionTypeSchema.options[7],\n} as const;\n\n// Validation rule type enum\nexport const validationRuleTypeSchema = z\n .enum([\n \"required\",\n \"min\",\n \"max\",\n \"minLength\",\n \"maxLength\",\n \"pattern\",\n \"email\",\n \"url\",\n \"custom\",\n ])\n .describe(\"Enumeration of all supported validation rule types\");\n\n// Constants for validation rule types (derived from the enum schema)\nexport const ValidationRuleTypes = {\n REQUIRED: validationRuleTypeSchema.options[0],\n MIN: validationRuleTypeSchema.options[1],\n MAX: validationRuleTypeSchema.options[2],\n MIN_LENGTH: validationRuleTypeSchema.options[3],\n MAX_LENGTH: validationRuleTypeSchema.options[4],\n PATTERN: validationRuleTypeSchema.options[5],\n EMAIL: validationRuleTypeSchema.options[6],\n URL: validationRuleTypeSchema.options[7],\n CUSTOM: validationRuleTypeSchema.options[8],\n} as const;\n\n// Validation rule schema for question validations\nexport const validationRuleSchema = z\n .object({\n type: validationRuleTypeSchema.describe(\"Type of validation rule to apply\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value for the validation rule (string, number, or boolean)\"),\n message: z\n .string()\n .optional()\n .describe(\"Custom error message when validation fails\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this validation rule\"),\n })\n .describe(\"Schema defining validation rules for question responses\");\n\n// Visibility condition operator enum\nexport const visibilityConditionOperatorSchema = z\n .enum([\n \"equals\",\n \"not_equals\",\n \"contains\",\n \"not_contains\",\n \"greater_than\",\n \"less_than\",\n \"is_empty\",\n \"is_not_empty\",\n ])\n .describe(\"Enumeration of all supported visibility condition operators\");\n\n// Constants for visibility condition operators (derived from the enum schema)\nexport const VisibilityConditionOperators = {\n EQUALS: visibilityConditionOperatorSchema.options[0],\n NOT_EQUALS: visibilityConditionOperatorSchema.options[1],\n CONTAINS: visibilityConditionOperatorSchema.options[2],\n NOT_CONTAINS: visibilityConditionOperatorSchema.options[3],\n GREATER_THAN: visibilityConditionOperatorSchema.options[4],\n LESS_THAN: visibilityConditionOperatorSchema.options[5],\n IS_EMPTY: visibilityConditionOperatorSchema.options[6],\n IS_NOT_EMPTY: visibilityConditionOperatorSchema.options[7],\n} as const;\n\n// Visibility condition schema for conditional visibility\nexport const visibilityConditionSchema = z\n .object({\n field: z.string().describe(\"ID of the field to check against\"),\n operator: visibilityConditionOperatorSchema.describe(\"Comparison operator for the condition\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .optional()\n .describe(\"Value to compare against (string, number, or boolean)\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this visibility condition\"),\n })\n .describe(\n \"Schema defining conditions that control when questions are visible\"\n );\n\n// Section schema for organizing questions\nexport const sectionSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the section\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display title for the section\"),\n question_ids: z\n .array(z.string())\n .min(1)\n .describe(\"Array of question IDs that belong to this section\"),\n })\n .describe(\"Schema defining sections that organize questions into logical groups\");\n\n// Question status enum\nexport const questionStatusSchema = z.enum([\"D\", \"P\", \"A\", \"S\"]); // Draft, Published, Archived, Suspended\n\n// Constants for question status (derived from the enum schema)\nexport const QuestionStatuses = {\n DRAFT: questionStatusSchema.options[0],\n PUBLISHED: questionStatusSchema.options[1],\n ARCHIVED: questionStatusSchema.options[2],\n SUSPENDED: questionStatusSchema.options[3],\n} as const;\n\n// Display style enum for rating questions\nexport const ratingDisplayStyleSchema = z.enum([\n \"star\",\n \"heart\",\n \"thumbs-up\",\n \"diamond\",\n \"emoji\",\n \"emoji-exp\",\n]);\n\n// Constants for rating display styles (derived from the enum schema)\nexport const RatingDisplayStyles = {\n STAR: ratingDisplayStyleSchema.options[0],\n HEART: ratingDisplayStyleSchema.options[1],\n THUMBS_UP: ratingDisplayStyleSchema.options[2],\n DIAMOND: ratingDisplayStyleSchema.options[3],\n EMOJI: ratingDisplayStyleSchema.options[4],\n EMOJI_EXP: ratingDisplayStyleSchema.options[5],\n} as const;\n\n// Representation size enum for rating questions\nexport const ratingRepresentationSizeSchema = z.enum([\n \"small\",\n \"medium\",\n \"large\",\n]);\n\n// Constants for rating representation sizes (derived from the enum schema)\nexport const RatingRepresentationSizes = {\n SMALL: ratingRepresentationSizeSchema.options[0],\n MEDIUM: ratingRepresentationSizeSchema.options[1],\n LARGE: ratingRepresentationSizeSchema.options[2],\n} as const;\n\n// Display style enum for multiple choice questions\nexport const multipleChoiceDisplayStyleSchema = z.enum([\n \"radio\",\n \"list\",\n \"chip\",\n \"dropdown\",\n]);\n\n// Constants for multiple choice display styles (derived from the enum schema)\nexport const MultipleChoiceDisplayStyles = {\n RADIO: multipleChoiceDisplayStyleSchema.options[0],\n LIST: multipleChoiceDisplayStyleSchema.options[1],\n CHIP: multipleChoiceDisplayStyleSchema.options[2],\n DROPDOWN: multipleChoiceDisplayStyleSchema.options[3],\n} as const;\n\n// Display style enum for multiple choice multiple questions\nexport const multipleChoiceMultipleDisplayStyleSchema = z.enum([\n \"checkbox\",\n \"list\",\n \"chip\",\n]);\n\n// Constants for multiple choice multiple display styles (derived from the enum schema)\nexport const MultipleChoiceMultipleDisplayStyles = {\n CHECKBOX: multipleChoiceMultipleDisplayStyleSchema.options[0],\n LIST: multipleChoiceMultipleDisplayStyleSchema.options[1],\n CHIP: multipleChoiceMultipleDisplayStyleSchema.options[2],\n} as const;\n\n// Choice order options for nested selection questions\nexport const choiceOrderOptionSchema = z.enum([\n \"randomize\",\n \"flip\",\n \"rotate\",\n \"ascending\",\n \"none\",\n]);\n\n// Constants for choice order options (derived from the enum schema)\nexport const ChoiceOrderOptions = {\n RANDOMIZE: choiceOrderOptionSchema.options[0],\n FLIP: choiceOrderOptionSchema.options[1],\n ROTATE: choiceOrderOptionSchema.options[2],\n ASCENDING: choiceOrderOptionSchema.options[3],\n NONE: choiceOrderOptionSchema.options[4],\n} as const;\n\n// Main Question schema\nexport const questionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for the question\"),\n type: questionTypeSchema.describe(\n \"The type of question (rating, single_choice, etc.)\"\n ),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title/question text displayed to users\"),\n description: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Optional detailed description or help text\"),\n describe: z\n .string()\n .max(2000)\n .optional()\n .describe(\n \"LLM tool call description for better AI understanding and context\"\n ),\n required: z\n .boolean()\n .default(false)\n .describe(\"Whether this question must be answered\"),\n errorMessage: z\n .string()\n .max(500)\n .optional()\n .describe(\"Custom error message when validation fails\"),\n validations: z\n .array(validationRuleSchema)\n .optional()\n .default([])\n .describe(\"Array of validation rules to apply\"),\n visibility: z\n .array(visibilityConditionSchema)\n .optional()\n .default([])\n .describe(\"Conditions that control when this question is shown\"),\n isFixed: z\n .boolean()\n .describe(\"Whether this question position is fixed or can be reordered\"),\n sectionId: z\n .string()\n .optional()\n .describe(\"ID of the section this question belongs to\"),\n status: questionStatusSchema.describe(\n \"Current status of the question (Draft, Published, etc.)\"\n ),\n })\n .describe(\"Base schema for all question types with common properties\");\n\n// Rating question schema (extends base question with specific rating properties)\nexport const ratingQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"rating\")\n .describe(\"Must be exactly 'rating'\"),\n showLabels: z\n .boolean()\n .optional()\n .describe(\"Whether to show min/max labels\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum rating value\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum rating value\"),\n displayStyle: ratingDisplayStyleSchema\n .optional()\n .describe(\"Visual style for rating display\"),\n numberOfRatings: z\n .number()\n .int()\n .min(1)\n .max(10)\n .describe(\"Number of rating options (1-10)\"),\n representationSize: ratingRepresentationSizeSchema\n .optional()\n .describe(\"Size of rating visual elements\"),\n color: z\n .string()\n .regex(/^#[0-9A-F]{6}$/i, \"Must be a valid hex color\")\n .optional()\n .describe(\"Hex color for rating elements\"),\n })\n .describe(\"Schema for rating questions with customizable display options\");\n\n// Annotation question schema (extends base question with annotation properties)\nexport const annotationQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"annotation\")\n .describe(\"Must be exactly 'annotation'\"),\n annotationText: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Text to display when annotation is provided\"),\n noAnnotationText: z\n .string()\n .max(500)\n .optional()\n .describe(\"Text to display when no annotation is provided\"),\n })\n .describe(\n \"Schema for annotation questions that provide additional context or instructions\"\n );\n\n// Question option schema for choice-based questions\nexport const questionOptionSchema = z\n .object({\n id: z.string().describe(\"Unique identifier for this option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown to users for this option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"LLM tool call description providing context about this option\"\n ),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL to display with this option\"),\n })\n .describe(\"Schema for individual options in choice-based questions\");\n\n// Nested option schema for hierarchical choice structures (recursive)\nexport const nestedOptionSchema: z.ZodType<any> = z.lazy(() =>\n z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for this nested option (system time milliseconds)\"),\n value: z\n .string()\n .min(1)\n .max(100)\n .describe(\"The internal value used for this nested option\"),\n label: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The display text shown for this nested option\"),\n describe: z\n .string()\n .max(500)\n .optional()\n .describe(\"LLM tool call description for this nested option context\"),\n imageUrl: z\n .string()\n .url()\n .optional()\n .describe(\"Optional image URL for this nested option\"),\n hint: z\n .string()\n .max(500)\n .optional()\n .describe(\n \"Optional hint text to help users understand this nested option\"\n ),\n children: z\n .array(nestedOptionSchema)\n .optional()\n .default([])\n .describe(\"Array of child options for hierarchical structure\"),\n })\n .describe(\"Schema for nested options with hierarchical structure support\")\n);\n\n// Multiple choice single question schema (extends base question with choice-specific properties)\nexport const multipleChoiceSingleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"single_choice\")\n .describe(\"Must be exactly 'single_choice'\"),\n displayStyle: multipleChoiceDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying options\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .describe(\"Schema for single-choice multiple selection questions\");\n\n// Multiple choice multiple question schema (extends base question with multiple choice properties)\nexport const multipleChoiceMultipleQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"multiple_choice_multiple\")\n .describe(\"Must be exactly 'multiple_choice_multiple'\"),\n displayStyle: multipleChoiceMultipleDisplayStyleSchema\n .optional()\n .describe(\"Visual style for displaying multiple options\"),\n minSelections: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of options that must be selected\"),\n maxSelections: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Maximum number of options that can be selected\"),\n randomizeOptions: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to randomize the order of options\"),\n options: z\n .array(questionOptionSchema)\n .min(1)\n .max(50)\n .describe(\"Array of options for user selection (1-50 options)\"),\n })\n .refine(\n (data) => {\n // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections\n if (\n data.minSelections !== undefined &&\n data.maxSelections !== undefined\n ) {\n return data.minSelections <= data.maxSelections;\n }\n return true;\n },\n {\n message: \"minSelections cannot be greater than maxSelections\",\n path: [\"minSelections\"], // Point to minSelections field for the error\n }\n )\n .describe(\n \"Schema for multiple-choice questions allowing multiple selections\"\n );\n\n// NPS question schema (extends base question with NPS-specific properties)\nexport const npsQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nps\")\n .describe(\"Must be exactly 'nps'\"),\n min: z.literal(0).describe(\"NPS always starts at 0\"),\n max: z.literal(10).describe(\"NPS always ends at 10\"),\n minLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the minimum NPS value (0)\"),\n maxLabel: z\n .string()\n .max(100)\n .optional()\n .describe(\"Label for the maximum NPS value (10)\"),\n scaleLabels: z\n .record(z.string().regex(/^\\d+$/), z.string().max(50))\n .optional()\n .describe(\"Custom labels for specific NPS values (0-10)\"),\n prepopulatedValue: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Default value to pre-select (0-10)\"),\n })\n .refine(\n (data) => {\n // If scaleLabels is provided, validate that all keys are within the 0-10 range\n if (data.scaleLabels) {\n const keys = Object.keys(data.scaleLabels);\n return keys.every((key) => {\n const numKey = Number(key);\n return !isNaN(numKey) && numKey >= 0 && numKey <= 10;\n });\n }\n return true;\n },\n {\n message: \"scaleLabels keys must be between 0 and 10 (inclusive)\",\n path: [\"scaleLabels\"],\n }\n )\n .describe(\"Schema for Net Promoter Score questions with 0-10 scale\");\n\n// Short answer question schema (extends base question with text input properties)\nexport const shortAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"short_answer\")\n .describe(\"Must be exactly 'short_answer'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum number of characters allowed\"),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text shown in the input field\"),\n enableRegexValidation: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable regex pattern validation\"),\n regexPattern: z\n .string()\n .optional()\n .describe(\"Regular expression pattern for validation\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(10000)\n .optional()\n .describe(\"Maximum tokens allowed for AI processing\"),\n minCharactersToEnhance: z\n .number()\n .int()\n .min(1)\n .optional()\n .describe(\"Minimum characters needed to trigger AI enhancement\"),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableRegexValidation is true, regexPattern should be provided\n if (data.enableRegexValidation && !data.regexPattern) {\n return false;\n }\n return true;\n },\n {\n message: \"regexPattern is required when enableRegexValidation is true\",\n path: [\"regexPattern\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\"Schema for short answer questions with optional AI enhancement\");\n\n// Long answer question schema (extends base question with rich text input properties)\nexport const longAnswerQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"long_text\")\n .describe(\"Must be exactly 'long_text'\"),\n maxCharacters: z\n .number()\n .int()\n .min(1)\n .max(50000)\n .optional()\n .describe(\n \"Maximum number of characters allowed (higher limit for long text)\"\n ),\n minCharacters: z\n .number()\n .int()\n .min(0)\n .optional()\n .describe(\"Minimum number of characters required\"),\n rows: z\n .number()\n .int()\n .min(1)\n .max(20)\n .optional()\n .describe(\"Number of textarea rows to display (1-20)\"),\n placeholder: z\n .string()\n .max(500)\n .optional()\n .describe(\"Placeholder text for the textarea (longer for long text)\"),\n enableEnhanceWithAi: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to enable AI enhancement features\"),\n promptTemplate: z\n .string()\n .max(2000)\n .optional()\n .describe(\"Template for AI enhancement prompts\"),\n cooldownSeconds: z\n .number()\n .int()\n .min(0)\n .max(3600)\n .optional()\n .describe(\"Cooldown period between AI enhancements (0-3600 seconds)\"),\n maxEnhancements: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum number of AI enhancements allowed\"),\n maxTokenAllowed: z\n .number()\n .int()\n .min(1)\n .max(25000)\n .optional()\n .describe(\n \"Maximum tokens allowed for AI processing (higher for long text)\"\n ),\n })\n .refine(\n (data) => {\n // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters\n if (\n data.minCharacters !== undefined &&\n data.maxCharacters !== undefined\n ) {\n return data.minCharacters <= data.maxCharacters;\n }\n return true;\n },\n {\n message: \"minCharacters cannot be greater than maxCharacters\",\n path: [\"minCharacters\"],\n }\n )\n .refine(\n (data) => {\n // If enableEnhanceWithAi is true, promptTemplate should be provided\n if (data.enableEnhanceWithAi && !data.promptTemplate) {\n return false;\n }\n return true;\n },\n {\n message: \"promptTemplate is required when enableEnhanceWithAi is true\",\n path: [\"promptTemplate\"],\n }\n )\n .describe(\n \"Schema for long answer questions with rich text support and AI enhancement\"\n );\n\n// Nested dropdown question schema (extends base question with hierarchical selection properties)\nexport const nestedDropdownQuestionSchema = questionSchema\n .extend({\n type: z\n .literal(\"nested_selection\")\n .describe(\"Must be exactly 'nested_selection'\"),\n placeholder: z\n .string()\n .max(200)\n .optional()\n .describe(\"Placeholder text for the nested dropdown\"),\n options: z\n .array(nestedOptionSchema)\n .min(1)\n .max(100)\n .describe(\n \"Array of nested options for hierarchical selection (1-100 options)\"\n ),\n displayStyle: z\n .literal(\"list\")\n .describe(\"Fixed display style for nested dropdowns\"),\n choiceOrderOption: choiceOrderOptionSchema\n .optional()\n .default(\"none\")\n .describe(\"How to order the nested choices\"),\n preserveLastChoices: z\n .number()\n .int()\n .min(0)\n .max(10)\n .optional()\n .describe(\"Number of choice levels to preserve (0-10)\"),\n prepopulatedValue: z\n .string()\n .max(1000)\n .optional()\n .describe(\"Default value to pre-populate\"),\n allowOther: z\n .boolean()\n .optional()\n .default(false)\n .describe('Whether to allow custom \"other\" options'),\n otherColumnName: z\n .string()\n .max(100)\n .optional()\n .describe('Column name for storing custom \"other\" values'),\n maxDepth: z\n .number()\n .int()\n .min(1)\n .max(10)\n .optional()\n .describe(\"Maximum nesting depth allowed (1-10)\"),\n cascadeLabels: z\n .boolean()\n .optional()\n .default(false)\n .describe(\"Whether to cascade labels from parent options\"),\n })\n .refine(\n (data) => {\n // If allowOther is true, otherColumnName should be provided\n if (data.allowOther && !data.otherColumnName) {\n return false;\n }\n return true;\n },\n {\n message: \"otherColumnName is required when allowOther is true\",\n path: [\"otherColumnName\"],\n }\n )\n .describe(\n \"Schema for nested dropdown questions with hierarchical option structure\"\n );\n\n// Export inferred types\nexport type QuestionType = z.infer<typeof questionTypeSchema>;\nexport type ValidationRule = z.infer<typeof validationRuleSchema>;\nexport type VisibilityCondition = z.infer<typeof visibilityConditionSchema>;\nexport type QuestionStatus = z.infer<typeof questionStatusSchema>;\nexport type Question = z.infer<typeof questionSchema>;\nexport type RatingDisplayStyle = z.infer<typeof ratingDisplayStyleSchema>;\nexport type RatingRepresentationSize = z.infer<\n typeof ratingRepresentationSizeSchema\n>;\nexport type RatingQuestion = z.infer<typeof ratingQuestionSchema>;\nexport type AnnotationQuestion = z.infer<typeof annotationQuestionSchema>;\nexport type QuestionOption = z.infer<typeof questionOptionSchema>;\nexport type NestedOption = z.infer<typeof nestedOptionSchema>;\nexport type MultipleChoiceDisplayStyle = z.infer<\n typeof multipleChoiceDisplayStyleSchema\n>;\nexport type MultipleChoiceSingleQuestion = z.infer<\n typeof multipleChoiceSingleQuestionSchema\n>;\nexport type MultipleChoiceMultipleDisplayStyle = z.infer<\n typeof multipleChoiceMultipleDisplayStyleSchema\n>;\nexport type MultipleChoiceMultipleQuestion = z.infer<\n typeof multipleChoiceMultipleQuestionSchema\n>;\nexport type NpsQuestion = z.infer<typeof npsQuestionSchema>;\nexport type ShortAnswerQuestion = z.infer<typeof shortAnswerQuestionSchema>;\nexport type LongAnswerQuestion = z.infer<typeof longAnswerQuestionSchema>;\nexport type ChoiceOrderOption = z.infer<typeof choiceOrderOptionSchema>;\nexport type NestedDropdownQuestion = z.infer<\n typeof nestedDropdownQuestionSchema\n>;\nexport type Section = z.infer<typeof sectionSchema>;\n\n// Combined question schema using discriminated union for proper type safety\nexport const combinedQuestionSchema = z.discriminatedUnion(\"type\", [\n ratingQuestionSchema,\n annotationQuestionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n]);\n\n// Explicit type definition for better inference\nexport type CombinedQuestion = \n | z.infer<typeof ratingQuestionSchema>\n | z.infer<typeof annotationQuestionSchema>\n | z.infer<typeof multipleChoiceSingleQuestionSchema>\n | z.infer<typeof multipleChoiceMultipleQuestionSchema>\n | z.infer<typeof npsQuestionSchema>\n | z.infer<typeof shortAnswerQuestionSchema>\n | z.infer<typeof longAnswerQuestionSchema>\n | z.infer<typeof nestedDropdownQuestionSchema>;\n", "import { z } from \"zod\";\n\n// Simple answer schema\nexport const SimpleAnswerSchema = z\n .object({\n type: z\n .literal(\"simple\")\n .describe(\"Indicates this is a simple answer with a single value\"),\n value: z\n .union([z.string(), z.number(), z.boolean()])\n .describe(\"The answer value - can be text, number, or boolean\"),\n })\n .describe(\n \"A simple answer containing a single value like text, number, or boolean\"\n );\n\n// Choice answer schema\nexport const ChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"choice\")\n .describe(\"Indicates this is a single-choice answer\"),\n selectedOptionId: z\n .string()\n .describe(\"The ID of the selected option from the available choices\"),\n })\n .describe(\n \"A single-choice answer where the user selects one option from a list\"\n );\n\n// Multiple choice answer schema\nexport const MultipleChoiceAnswerSchema = z\n .object({\n type: z\n .literal(\"multiple_choice\")\n .describe(\"Indicates this is a multiple-choice answer\"),\n selectedOptionIds: z\n .array(z.string())\n .describe(\n \"Array of IDs for all selected options from the available choices\"\n ),\n })\n .describe(\n \"A multiple-choice answer where the user can select multiple options from a list\"\n );\n\n// Scale answer schema\nexport const ScaleAnswerSchema = z\n .object({\n type: z\n .literal(\"scale\")\n .describe(\"Indicates this is a scale/rating answer\"),\n value: z\n .number()\n .describe(\n \"The numerical value representing the position on the scale (e.g., 1-5, 1-10)\"\n ),\n })\n .describe(\n \"A scale answer where the user selects a numerical value on a scale\"\n );\n\n// Continuous sum answer schema\nexport const ContinuousSumAnswerSchema = z\n .object({\n type: z\n .literal(\"continuous_sum\")\n .describe(\"Indicates this is a continuous sum answer\"),\n values: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being rated\"),\n value: z\n .number()\n .describe(\"The numerical value assigned to this option\"),\n })\n )\n .describe(\n \"Array of option-value pairs where the sum of all values represents a total allocation\"\n ),\n })\n .describe(\n \"A continuous sum answer where users distribute values across multiple options that add up to a total\"\n );\n\n// Ranking answer schema\nexport const RankingAnswerSchema = z\n .object({\n type: z.literal(\"ranking\").describe(\"Indicates this is a ranking answer\"),\n ranks: z\n .array(\n z.object({\n optionId: z.string().describe(\"The ID of the option being ranked\"),\n rank: z\n .number()\n .describe(\n \"The rank position of this option (lower numbers indicate higher preference)\"\n ),\n })\n )\n .describe(\n \"Array of option-rank pairs showing the user's preference ordering\"\n ),\n })\n .describe(\n \"A ranking answer where users order options by preference or priority\"\n );\n\n// Text answer schema\nexport const TextAnswerSchema = z\n .object({\n type: z.literal(\"text\").describe(\"Indicates this is a text-based answer\"),\n values: z\n .array(\n z.object({\n fieldId: z.string().describe(\"The ID of the text field\"),\n text: z.string().describe(\"The text content entered by the user\"),\n })\n )\n .describe(\"Array of field-text pairs for multiple text input fields\"),\n })\n .describe(\n \"A text answer containing responses to one or more text input fields\"\n );\n\n// Union schema for all answer types\nexport const AnswerSchema = z\n .discriminatedUnion(\"type\", [\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n ])\n .describe(\n \"A union of all possible answer types discriminated by the 'type' field\"\n );\n\n// Type inference from schemas (for type safety)\nexport type SimpleAnswer = z.infer<typeof SimpleAnswerSchema>;\nexport type ChoiceAnswer = z.infer<typeof ChoiceAnswerSchema>;\nexport type MultipleChoiceAnswer = z.infer<typeof MultipleChoiceAnswerSchema>;\nexport type ScaleAnswer = z.infer<typeof ScaleAnswerSchema>;\nexport type ContinuousSumAnswer = z.infer<typeof ContinuousSumAnswerSchema>;\nexport type RankingAnswer = z.infer<typeof RankingAnswerSchema>;\nexport type TextAnswer = z.infer<typeof TextAnswerSchema>;\n// Explicit type definition for better inference\nexport type Answer = \n | z.infer<typeof SimpleAnswerSchema>\n | z.infer<typeof ChoiceAnswerSchema>\n | z.infer<typeof MultipleChoiceAnswerSchema>\n | z.infer<typeof ScaleAnswerSchema>\n | z.infer<typeof ContinuousSumAnswerSchema>\n | z.infer<typeof RankingAnswerSchema>\n | z.infer<typeof TextAnswerSchema>;\n", "import { z } from \"zod\";\n\n// Feedback type enum for different feedback frequency types\nexport const surveyTypeSchema = z\n .enum([\"R\", \"O\"])\n .describe(\"Enumeration of feedback types: R=Recurring, O=One-time\");\n\n// Constants for survey types (derived from the enum schema)\nexport const SurveyTypes = {\n RECURRING: surveyTypeSchema.options[0],\n ONE_TIME: surveyTypeSchema.options[1],\n} as const;\n\n// Yes/No enum for boolean-like string fields\nexport const yesNoSchema = z\n .enum([\"Y\", \"N\"])\n .describe(\"Yes/No enumeration using Y/N values\");\n\n// Constants for yes/no values (derived from the enum schema)\nexport const YesNoValues = {\n YES: yesNoSchema.options[0],\n NO: yesNoSchema.options[1],\n} as const;\n\n// Time unit enum for recurring schedules\nexport const recurringUnitSchema = z\n .enum([\"minutes\", \"hours\", \"days\", \"weeks\", \"months\", \"years\"])\n .describe(\"Time units for recurring feedback schedules\");\n\n// Constants for recurring units (derived from the enum schema)\nexport const RecurringUnits = {\n MINUTES: recurringUnitSchema.options[0],\n HOURS: recurringUnitSchema.options[1],\n DAYS: recurringUnitSchema.options[2],\n WEEKS: recurringUnitSchema.options[3],\n MONTHS: recurringUnitSchema.options[4],\n YEARS: recurringUnitSchema.options[5],\n} as const;\n\n// Frequency and scheduling properties schema\nexport const frequencyAndSchedulingPropertiesSchema = z\n .object({\n surveyType: surveyTypeSchema\n .describe(\"Type of feedback: R for recurring, O for one-time\"),\n showOnce: yesNoSchema\n .describe(\"Whether the feedback should be shown only once per user\"),\n stopWhenResponsesCount: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Stop feedback when this number of responses is reached (as string)\"),\n recurringValue: z\n .string()\n .regex(/^\\d+$/, \"Must be a valid number string\")\n .describe(\"Value for recurring schedule (e.g., every 15 days)\"),\n recurringUnit: recurringUnitSchema\n .describe(\"Time unit for recurring schedule\"),\n startDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback in ISO format\"),\n stopDate: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Stop date and time for the feedback in ISO format\"),\n })\n .refine(\n (data) => {\n // If surveyType is \"O\" (one-time), showOnce should be \"Y\"\n if (data.surveyType === \"O\" && data.showOnce === \"N\") {\n return false;\n }\n return true;\n },\n {\n message: \"One-time feedback must have showOnce set to 'Y'\",\n path: [\"showOnce\"],\n }\n )\n .refine(\n (data) => {\n // If surveyType is \"R\" (recurring), recurringValue and recurringUnit should be meaningful\n if (data.surveyType === \"R\") {\n const value = parseInt(data.recurringValue);\n return value > 0;\n }\n return true;\n },\n {\n message: \"Recurring feedback must have a positive recurring value\",\n path: [\"recurringValue\"],\n }\n )\n .refine(\n (data) => {\n // stopDate should be after startDate\n const start = new Date(data.startDate);\n const stop = new Date(data.stopDate);\n return stop > start;\n },\n {\n message: \"Stop date must be after start date\",\n path: [\"stopDate\"],\n }\n )\n .describe(\"Schema defining frequency and scheduling properties for feedback\");\n\n// External publishing properties schema\nexport const externalPublishingPropertiesSchema = z\n .object({\n isShareable: z\n .boolean()\n .describe(\"Whether the feedback results can be shared externally\"),\n isEmailShareable: z\n .boolean()\n .describe(\"Whether the feedback can be shared via email\"),\n })\n .describe(\"Schema defining external publishing and sharing properties for feedback\");\n\n// Publication status enum\nexport const publicationStatusSchema = z\n .enum([\"P\", \"D\",\"A\"])\n .describe(\"Publication status: P=Published, D=Draft, A=Archived\");\n\n// Constants for publication status (derived from the enum schema)\nexport const PublicationStatuses = {\n PUBLISHED: publicationStatusSchema.options[0],\n DRAFT: publicationStatusSchema.options[1],\n ARCHIVED: publicationStatusSchema.options[2],\n} as const;\n\n// Feedback configuration schema\nexport const feedbackConfigurationSchema = z\n .object({\n form_title: z\n .string()\n .describe(\"Title of the feedback form\"),\n form_description: z\n .string()\n .describe(\"Description of the feedback form\"),\n duration: z\n .object({\n from: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"Start date and time for the feedback duration\"),\n to: z\n .string()\n .regex(\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(\\+|\\-)\\d{2}:\\d{2}$/,\n \"Must be a valid ISO date string with timezone\"\n )\n .describe(\"End date and time for the feedback duration\"),\n })\n .describe(\"Duration period for the feedback\"),\n is_published: publicationStatusSchema\n .describe(\"Publication status of the feedback form\"),\n })\n .refine(\n (data) => {\n // End date should be after start date\n const start = new Date(data.duration.from);\n const end = new Date(data.duration.to);\n return end > start;\n },\n {\n message: \"End date must be after start date\",\n path: [\"duration\", \"to\"],\n }\n )\n .describe(\"Schema defining feedback configuration properties\");\n\n// Type inference from schemas (for type safety)\nexport type SurveyType = z.infer<typeof surveyTypeSchema>;\nexport type YesNo = z.infer<typeof yesNoSchema>;\nexport type RecurringUnit = z.infer<typeof recurringUnitSchema>;\nexport type PublicationStatus = z.infer<typeof publicationStatusSchema>;\nexport type FeedbackConfiguration = z.infer<typeof feedbackConfigurationSchema>;\nexport type FrequencyAndSchedulingProperties = z.infer<typeof frequencyAndSchedulingPropertiesSchema>;\nexport type ExternalPublishingProperties = z.infer<typeof externalPublishingPropertiesSchema>;\n", "import { z } from \"zod\";\nimport { feedbackConfigurationSchema } from \"./form-schema\";\nimport { frequencyAndSchedulingPropertiesSchema } from \"./form-schema\";\nimport { externalPublishingPropertiesSchema } from \"./form-schema\";\nimport { combinedQuestionSchema, sectionSchema } from \"./field-schema\";\nimport { translationsSchema } from \"./translations-schema\";\nimport { LanguagesSchema, OtherFieldsSchema, OtherFieldsTranslationSchema, WelcomeScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndScreenFieldsSchema, EndFieldsTranslationSchema } from \"./other-screen-schema\";\nimport { themeConfigurationSchema } from \"./theme-schema\";\nimport { audienceTriggerPropertiesSchema } from \"./auto-trigger-schema\";\n\n// Other configuration properties schema using discriminated union for JSON schema compatibility\nexport const otherConfigurationPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When other configuration is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .optional()\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: OtherFieldsTranslationSchema\n .optional()\n .describe(\"Translations for other configuration field labels and buttons\"),\n }),\n // When other configuration is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether other configuration properties are enabled\"),\n otherFields: OtherFieldsSchema\n .describe(\"Other form configuration fields including pagination, buttons, and display options\"),\n translations: OtherFieldsTranslationSchema\n .describe(\"Translations for other configuration field labels and buttons\"),\n }),\n ])\n .describe(\"Schema for other configuration properties including fields and translations\");\n\n// Welcome screen properties schema using discriminated union for JSON schema compatibility\nexport const welcomeScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When welcome screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .optional()\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: WelcomeFieldsTranslationSchema\n .optional()\n .describe(\"Translations for welcome screen content\"),\n }),\n // When welcome screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether welcome screen is enabled\"),\n welcomeFields: WelcomeScreenFieldsSchema\n .describe(\"Welcome screen configuration fields including title, description, and button label\"),\n translations: WelcomeFieldsTranslationSchema\n .describe(\"Translations for welcome screen content\"),\n }),\n ])\n .describe(\"Schema for welcome screen properties including fields and translations\");\n\n// End screen properties schema using discriminated union for JSON schema compatibility\nexport const endScreenPropertiesSchema = z\n .discriminatedUnion(\"isEnabled\", [\n // When end screen is disabled\n z.object({\n isEnabled: z\n .literal(false)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .optional()\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: EndFieldsTranslationSchema\n .optional()\n .describe(\"Translations for end screen content\"),\n }),\n // When end screen is enabled\n z.object({\n isEnabled: z\n .literal(true)\n .describe(\"Whether end screen is enabled\"),\n endFields: EndScreenFieldsSchema\n .describe(\"End screen configuration fields including title, message, button label, and dismissal behavior\"),\n translations: EndFieldsTranslationSchema\n .describe(\"Translations for end screen content\"),\n }),\n ])\n .describe(\"Schema for end screen properties including fields and translations\");\n\n// Appearance properties schema\nexport const appearancePropertiesSchema = z\n .object({\n themeConfiguration: themeConfigurationSchema\n .describe(\"Theme configuration including colors, features, and positioning\"),\n })\n .describe(\"Schema for appearance properties including theme configuration\");\n\n// Combined form properties schema (if needed for complete form configuration)\nexport const formPropertiesSchema = z\n .object({\n feedback_configuration_id: z.uuid()\n .describe(\"Unique identifier for the feedback configuration\"),\n feedback_configuration: feedbackConfigurationSchema\n .describe(\"Configuration properties for the feedback form\"),\n questionnaire_fields: z\n .object({\n questions: z.record(z.string(), combinedQuestionSchema)\n .describe(\"Collection of questions keyed by their string identifiers\"),\n sections: z.array(sectionSchema)\n .describe(\"Array of sections that organize questions into logical groups\"),\n selected_languages: LanguagesSchema\n .describe(\"Array of languages selected for this questionnaire\"),\n translations: translationsSchema\n .describe(\"Multi-language translations for questions and form content\"),\n })\n .describe(\"Fields defining the questionnaire structure, questions, sections, selected languages, and translations\"),\n frequency_and_scheduling_properties: frequencyAndSchedulingPropertiesSchema\n .describe(\"Properties controlling when and how often the feedback is shown\"),\n external_publishing_properties: externalPublishingPropertiesSchema\n .describe(\"Properties controlling external sharing and publishing of feedback results\"),\n audience_trigger_properties: audienceTriggerPropertiesSchema\n .describe(\"Properties defining audience targeting and trigger conditions for the feedback form\"),\n other_configuration_properties: otherConfigurationPropertiesSchema\n .describe(\"Additional configuration properties including form display options and translations\"),\n welcome_screen_properties: welcomeScreenPropertiesSchema\n .describe(\"Welcome screen configuration including content and translations\"),\n end_screen_properties: endScreenPropertiesSchema\n .describe(\"End screen configuration including content, dismissal behavior, and translations\"),\n appearance_properties: appearancePropertiesSchema\n .describe(\"Appearance configuration including themes, colors, and UI feature settings\"),\n })\n .describe(\"Complete schema for all feedback-level properties including scheduling, publishing, audience targeting, configuration, screens, and appearance\");\n\n// Type inference from schema (for type safety)\nexport type FormProperties = z.infer<typeof formPropertiesSchema>;\n\n// Explicit type definition for better inference\nexport type OtherConfigurationProperties = \n | {\n isEnabled: false;\n otherFields?: z.infer<typeof OtherFieldsSchema>;\n translations?: z.infer<typeof OtherFieldsTranslationSchema>;\n }\n | {\n isEnabled: true;\n otherFields: z.infer<typeof OtherFieldsSchema>;\n translations: z.infer<typeof OtherFieldsTranslationSchema>;\n };\n\n// Explicit type definition for better inference\nexport type WelcomeScreenProperties = \n | {\n isEnabled: false;\n welcomeFields?: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations?: z.infer<typeof WelcomeFieldsTranslationSchema>;\n }\n | {\n isEnabled: true;\n welcomeFields: z.infer<typeof WelcomeScreenFieldsSchema>;\n translations: z.infer<typeof WelcomeFieldsTranslationSchema>;\n };\n\n// Explicit type definition for better inference\nexport type EndScreenProperties = \n | {\n isEnabled: false;\n endFields?: z.infer<typeof EndScreenFieldsSchema>;\n translations?: z.infer<typeof EndFieldsTranslationSchema>;\n }\n | {\n isEnabled: true;\n endFields: z.infer<typeof EndScreenFieldsSchema>;\n translations: z.infer<typeof EndFieldsTranslationSchema>;\n };\n\nexport type AppearanceProperties = z.infer<typeof appearancePropertiesSchema>;\n", "import { z } from \"zod\";\nimport { LanguageFieldSchema, LanguagesSchema } from \"./other-screen-schema\";\n\n// Base translation entry\nexport const translationEntrySchema = z\n .object({\n text: z.string().min(1).describe(\"Translated text content\"),\n context: z.string().optional().describe(\"Optional context for translators\"),\n })\n .describe(\"Translation entry with translated text\");\n\n// Rating question translations\nexport const ratingTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum rating label translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum rating label translation\"),\n })\n .describe(\"Translation schema for rating questions\");\n\n// Single choice question translations\nexport const singleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for single choice questions\");\n\n// Multiple choice question translations\nexport const multipleChoiceTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n options: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Option hint translation\"),\n })).describe(\"Option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for multiple choice questions\");\n\n// NPS question translations\nexport const npsTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n minLabel: translationEntrySchema.optional().describe(\"Minimum NPS label (0) translation\"),\n maxLabel: translationEntrySchema.optional().describe(\"Maximum NPS label (10) translation\"),\n scaleLabels: z.record(z.number().int().min(0).max(10), translationEntrySchema)\n .optional()\n .describe(\"Scale label translations for specific NPS values (0-10)\"),\n })\n .describe(\"Translation schema for NPS questions\");\n\n// Short answer question translations\nexport const shortAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Input placeholder translation\"),\n })\n .describe(\"Translation schema for short answer questions\");\n\n// Long answer question translations\nexport const longAnswerTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Textarea placeholder translation\"),\n })\n .describe(\"Translation schema for long answer questions\");\n\n// Nested selection question translations\nexport const nestedSelectionTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n placeholder: translationEntrySchema.optional().describe(\"Dropdown placeholder translation\"),\n nestedOptions: z.record(z.string(), z.object({\n label: translationEntrySchema.describe(\"Nested option label translation\"),\n hint: translationEntrySchema.optional().describe(\"Nested option hint translation\"),\n })).describe(\"Nested option translations keyed by option ID\"),\n })\n .describe(\"Translation schema for nested selection questions\");\n\n// Annotation question translations\nexport const annotationTranslationsSchema = z\n .object({\n title: translationEntrySchema.describe(\"Question title translation\"),\n description: translationEntrySchema.optional().describe(\"Question description translation\"),\n errorMessage: translationEntrySchema.optional().describe(\"Error message translation\"),\n annotationText: translationEntrySchema.optional().describe(\"Annotation display text translation\"),\n noAnnotationText: translationEntrySchema.optional().describe(\"No annotation display text translation\"),\n })\n .describe(\"Translation schema for annotation questions\");\n\n// Discriminated union of all translation types\nexport const questionTranslationsSchema = z\n .discriminatedUnion(\"type\", [\n z.object({ type: z.literal(\"rating\"), translations: ratingTranslationsSchema }),\n z.object({ type: z.literal(\"single_choice\"), translations: singleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"multiple_choice_multiple\"), translations: multipleChoiceTranslationsSchema }),\n z.object({ type: z.literal(\"nps\"), translations: npsTranslationsSchema }),\n z.object({ type: z.literal(\"short_answer\"), translations: shortAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"long_text\"), translations: longAnswerTranslationsSchema }),\n z.object({ type: z.literal(\"nested_selection\"), translations: nestedSelectionTranslationsSchema }),\n z.object({ type: z.literal(\"annotation\"), translations: annotationTranslationsSchema }),\n ])\n .describe(\"Discriminated union of all question type translation schemas\");\n\n// Language-specific translations keyed by question ID\nexport const languageTranslationsSchema = z\n .object({\n languageCode: z.string().describe(\"Language code matching LanguagesSchema values\"),\n questions: z.record(z.string(), questionTranslationsSchema)\n .describe(\"Question translations keyed by question ID\"),\n })\n .describe(\"Language-specific translation set keyed by question IDs\");\n\n// Complete translation schema\nexport const translationsSchema = z\n .object({\n defaultLanguage: z.string().describe(\"Default/fallback language code\"),\n languages: z.array(languageTranslationsSchema).min(1)\n .describe(\"Available language translations\"),\n version: z.string().optional().describe(\"Translation version for cache management\"),\n })\n .describe(\"Complete translation schema keyed by question IDs\");\n\n// Type exports\nexport type TranslationEntry = z.infer<typeof translationEntrySchema>;\nexport type RatingTranslations = z.infer<typeof ratingTranslationsSchema>;\nexport type SingleChoiceTranslations = z.infer<typeof singleChoiceTranslationsSchema>;\nexport type MultipleChoiceTranslations = z.infer<typeof multipleChoiceTranslationsSchema>;\nexport type NpsTranslations = z.infer<typeof npsTranslationsSchema>;\nexport type ShortAnswerTranslations = z.infer<typeof shortAnswerTranslationsSchema>;\nexport type LongAnswerTranslations = z.infer<typeof longAnswerTranslationsSchema>;\nexport type NestedSelectionTranslations = z.infer<typeof nestedSelectionTranslationsSchema>;\nexport type AnnotationTranslations = z.infer<typeof annotationTranslationsSchema>;\n// Explicit type definition for better inference\nexport type QuestionTranslations = \n | { type: \"rating\"; translations: z.infer<typeof ratingTranslationsSchema> }\n | { type: \"single_choice\"; translations: z.infer<typeof singleChoiceTranslationsSchema> }\n | { type: \"multiple_choice_multiple\"; translations: z.infer<typeof multipleChoiceTranslationsSchema> }\n | { type: \"nps\"; translations: z.infer<typeof npsTranslationsSchema> }\n | { type: \"short_answer\"; translations: z.infer<typeof shortAnswerTranslationsSchema> }\n | { type: \"long_text\"; translations: z.infer<typeof longAnswerTranslationsSchema> }\n | { type: \"nested_selection\"; translations: z.infer<typeof nestedSelectionTranslationsSchema> }\n | { type: \"annotation\"; translations: z.infer<typeof annotationTranslationsSchema> };\nexport type LanguageTranslations = z.infer<typeof languageTranslationsSchema>;\nexport type Translations = z.infer<typeof translationsSchema>;\n\n// Translation helper class\nexport class TranslationProvider {\n private translations: Translations;\n\n constructor(translations: Translations) {\n this.translations = translations;\n }\n\n /**\n * Get translations for a specific question in a specific language\n */\n getQuestionTranslations(\n questionId: string,\n languageCode: string\n ): QuestionTranslations | null {\n const languageData = this.translations.languages.find(\n lang => lang.languageCode === languageCode\n );\n\n if (!languageData) {\n // Fallback to default language\n const defaultLang = this.translations.languages.find(\n lang => lang.languageCode === this.translations.defaultLanguage\n );\n if (!defaultLang) return null;\n\n return defaultLang.questions[questionId] || null;\n }\n\n return languageData.questions[questionId] || null;\n }\n\n /**\n * Get a specific translation text\n */\n getTranslationText(\n questionId: string,\n languageCode: string,\n path: string[]\n ): string | null {\n const questionTranslations = this.getQuestionTranslations(questionId, languageCode);\n if (!questionTranslations) return null;\n\n let current: any = questionTranslations.translations;\n\n for (const key of path) {\n if (current && typeof current === 'object' && key in current) {\n current = current[key];\n } else {\n return null;\n }\n }\n\n // Handle nested structures like options\n if (current && typeof current === 'object' && 'text' in current) {\n return current.text;\n }\n\n return null;\n }\n\n /**\n * Get all available languages\n */\n getAvailableLanguages(): string[] {\n return this.translations.languages.map(lang => lang.languageCode);\n }\n\n /**\n * Check if a language is supported\n */\n isLanguageSupported(languageCode: string): boolean {\n return this.translations.languages.some(lang => lang.languageCode === languageCode);\n }\n\n /**\n * Get the default language\n */\n getDefaultLanguage(): string {\n return this.translations.defaultLanguage;\n }\n}\n\n// Factory function to create translation provider\nexport function createTranslationProvider(translations: Translations): TranslationProvider {\n return new TranslationProvider(translations);\n}\n", "import { z } from \"zod\";\n\n// Dismiss behavior enum for end screen\nexport const dismissBehaviorSchema = z\n .enum([\"fade\", \"manual\"])\n .describe(\"How the end screen should be dismissed (fade out or manual dismissal)\");\n\n// Constants for dismiss behaviors (derived from the enum schema)\nexport const DismissBehaviors = {\n FADE: dismissBehaviorSchema.options[0],\n MANUAL: dismissBehaviorSchema.options[1],\n} as const;\n\n// Welcome screen configuration schema\nexport const WelcomeScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Description text shown on the welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the welcome screen button\"),\n })\n .describe(\"Schema for welcome screen configuration fields\");\n\n// End screen configuration schema\nexport const EndScreenFieldsSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"The main title displayed on the end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Message text shown on the end screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text displayed on the end screen button\"),\n dismissBehavior: dismissBehaviorSchema.describe(\"How the end screen should be dismissed (fade out or manual dismissal)\"),\n fadeDuration: z\n .number()\n .int()\n .min(0)\n .max(10000)\n .describe(\"Duration in milliseconds for fade dismissal (0-10000)\"),\n })\n .describe(\"Schema for end screen configuration fields\");\n\n// Welcome translations configuration schema\nexport const WelcomeFieldsTranslationSchema = z\n .object({\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for welcome screen\"),\n description: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated description text for welcome screen\"),\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the welcome button label\"),\n })\n .describe(\"Schema for welcome screen translation fields\");\n\n// End translations configuration schema\nexport const EndFieldsTranslationSchema = z\n .object({\n buttonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the end button label\"),\n title: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Translated title text for end screen\"),\n message: z\n .string()\n .min(1)\n .max(1000)\n .describe(\"Translated message text for end screen\"),\n })\n .describe(\"Schema for end screen translation fields\");\n\n// Other configuration fields schema\nexport const OtherFieldsSchema = z\n .object({\n pagination: z\n .boolean()\n .describe(\"Whether to show pagination for multi-page forms\"),\n questionNumber: z\n .boolean()\n .describe(\"Whether to display question numbers\"),\n pageTitle: z\n .boolean()\n .describe(\"Whether to show page titles in multi-page forms\"),\n blockerFeedback: z\n .boolean()\n .describe(\"Whether to show blocker feedback for validation errors\"),\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration fields\");\n\n// Language field schema\nexport const LanguageFieldSchema = z\n .object({\n value: z\n .string()\n .min(1)\n .max(10)\n .describe(\"Language code (e.g., 'en', 'es', 'fr')\"),\n label: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Display name for the language (e.g., 'English', 'Spanish', 'French')\"),\n isFixed: z\n .boolean()\n .default(false)\n .describe(\"Whether this language is fixed and cannot be deleted by users\"),\n })\n .describe(\"Schema for individual language field with value, label, and fixed status\");\n\n// Languages configuration schema\nexport const LanguagesSchema = z\n .array(LanguageFieldSchema)\n .describe(\"Schema for array of available languages\");\n\n// Other fields translation schema\nexport const OtherFieldsTranslationSchema = z\n .object({\n submitButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the submit button\"),\n previousButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the previous button in pagination\"),\n nextButtonLabel: z\n .string()\n .min(1)\n .max(50)\n .describe(\"Translated text for the next button in pagination\"),\n })\n .describe(\"Schema for other form configuration field translations\");\n\n// Export inferred types\nexport type WelcomeFields = z.infer<typeof WelcomeScreenFieldsSchema>;\nexport type EndFields = z.infer<typeof EndScreenFieldsSchema>;\nexport type WelcomeFieldsTranslation = z.infer<typeof WelcomeFieldsTranslationSchema>;\nexport type EndFieldsTranslation = z.infer<typeof EndFieldsTranslationSchema>;\nexport type OtherFields = z.infer<typeof OtherFieldsSchema>;\nexport type OtherFieldsTranslation = z.infer<typeof OtherFieldsTranslationSchema>;\nexport type LanguageField = z.infer<typeof LanguageFieldSchema>;\nexport type Languages = z.infer<typeof LanguagesSchema>;\n", "import { z } from \"zod\";\n\n// Position enum for widget positioning\nexport const positionSchema = z\n .enum([\n \"top-left\",\n \"top-center\",\n \"top-right\",\n \"middle-left\",\n \"middle-center\",\n \"middle-right\",\n \"bottom-left\",\n \"bottom-center\",\n \"bottom-right\"\n ])\n .describe(\"Available positions for widget placement\");\n\n// Constants for positions (derived from the enum schema)\nexport const Positions = {\n TOP_LEFT: positionSchema.options[0],\n TOP_CENTER: positionSchema.options[1],\n TOP_RIGHT: positionSchema.options[2],\n MIDDLE_LEFT: positionSchema.options[3],\n MIDDLE_CENTER: positionSchema.options[4],\n MIDDLE_RIGHT: positionSchema.options[5],\n BOTTOM_LEFT: positionSchema.options[6],\n BOTTOM_CENTER: positionSchema.options[7],\n BOTTOM_RIGHT: positionSchema.options[8],\n} as const;\n\n// Theme mode enum for light and dark themes\nexport const themeModeSchema = z\n .enum([\"light\", \"dark\"])\n .describe(\"Available theme modes for the widget\");\n\n// Constants for theme modes (derived from the enum schema)\nexport const ThemeModes = {\n LIGHT: themeModeSchema.options[0],\n DARK: themeModeSchema.options[1],\n} as const;\n\n// Schema for feature settings controlling UI behavior\nexport const featureSettingsSchema = z\n .object({\n darkOverlay: z\n .boolean()\n .describe(\"Whether to show a dark overlay behind the widget\"),\n closeButton: z\n .boolean()\n .describe(\"Whether to display a close button on the widget\"),\n progressBar: z\n .boolean()\n .describe(\"Whether to show a progress bar indicating completion status\"),\n showBranding: z\n .boolean()\n .describe(\"Whether to display branding elements on the widget\"),\n customPosition: z\n .boolean()\n .describe(\"Whether custom positioning is enabled\"),\n customIconPosition: z\n .boolean()\n .describe(\"Whether custom icon positioning is enabled\"),\n customCss: z\n .string()\n .optional()\n .describe(\"Custom CSS link to apply for the feedback form\")\n })\n .describe(\"Feature settings controlling widget UI behavior and appearance\");\n\n// Schema for individual theme colors\nexport const themeColorsSchema = z\n .object({\n brandColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #3366CC)\")\n .describe(\"Primary brand color in hex format\"),\n overlayColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #FFFFFF)\")\n .describe(\"Overlay background color in hex format\"),\n textColor: z\n .string()\n .regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i, \"Must be a valid hex color (e.g., #333333)\")\n .describe(\"Primary text color in hex format\"),\n backgroundColor: z\n .union([\n z.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i),\n z.string().regex(/^rgba?\\(\\s*\\d+\\s*,\\s*\\d+\\s*,\\s*\\d+\\s*(?:,\\s*[01](?:\\.\\d+)?)?\\s*\\)$/i)\n ])\n .describe(\"Background color in hex format or rgba format (e.g., #1A1A1A or rgba(255,255,255, 1))\")\n })\n .describe(\"Color scheme for a single theme\");\n\n// Schema for the complete themes object\nexport const themesSchema = z\n .object({\n light: themeColorsSchema,\n dark: themeColorsSchema\n })\n .describe(\"Complete theme configuration with light and dark variants\");\n\n// Schema for the complete theme configuration\nexport const themeConfigurationSchema = z\n .object({\n themes: themesSchema\n .describe(\"Color themes for light and dark modes\"),\n featureSettings: featureSettingsSchema\n .describe(\"UI feature settings controlling widget behavior\"),\n selectedPosition: positionSchema\n .describe(\"Selected position for the main widget\"),\n selectedIconPosition: positionSchema\n .describe(\"Selected position for the widget icon\")\n })\n .describe(\"Complete theme and UI configuration including colors, features, and positioning\");\n\n// Type exports for TypeScript\nexport type Position = z.infer<typeof positionSchema>;\nexport type ThemeMode = z.infer<typeof themeModeSchema>;\nexport type FeatureSettings = z.infer<typeof featureSettingsSchema>;\nexport type ThemeColors = z.infer<typeof themeColorsSchema>;\nexport type Themes = z.infer<typeof themesSchema>;\nexport type ThemeConfiguration = z.infer<typeof themeConfigurationSchema>;\n", "import { z } from \"zod\";\n\n// Audience segment schema for targeting specific user groups\nexport const audienceSegmentSchema = z\n .object({\n id: z\n .string()\n .describe(\"Unique identifier for the audience segment\"),\n name: z\n .string()\n .min(1)\n .max(200)\n .describe(\"Display name for the audience segment\"),\n isImportant: z\n .boolean()\n .describe(\"Whether this segment is marked as important for targeting\"),\n when: z\n .string()\n .describe(\"Timing condition for when to trigger the audience segment\"),\n who: z\n .string()\n .describe(\"User criteria or conditions defining who belongs to this segment\"),\n })\n .describe(\"Schema defining an audience segment for targeting\");\n\n// Audience trigger properties schema\nexport const audienceTriggerPropertiesSchema = z\n .object({\n isAuto: z\n .boolean()\n .describe(\"Whether automatic triggering is enabled for this audience\"),\n isManual: z\n .boolean()\n .describe(\"Whether manual triggering is enabled for this audience\"),\n segments: z\n .array(audienceSegmentSchema)\n .min(0)\n .describe(\"Array of audience segments for targeting conditions\"),\n })\n .refine(\n (data) => {\n // Ensure at least one of isAuto or isManual is true\n return data.isAuto || data.isManual;\n },\n {\n message: \"At least one of isAuto or isManual must be true\",\n path: [\"isAuto\"],\n }\n )\n .describe(\"Schema defining audience trigger properties for form targeting\");\n\n// Type inference from schemas\nexport type AudienceSegment = z.infer<typeof audienceSegmentSchema>;\nexport type AudienceTriggerProperties = z.infer<typeof audienceTriggerPropertiesSchema>;\n", "// Main entry point for encatch-typescript schemas\n\n// Field schema exports\nexport {\n questionTypeSchema,\n validationRuleTypeSchema,\n validationRuleSchema,\n visibilityConditionSchema,\n sectionSchema,\n questionStatusSchema,\n ratingDisplayStyleSchema,\n ratingRepresentationSizeSchema,\n multipleChoiceDisplayStyleSchema,\n multipleChoiceMultipleDisplayStyleSchema,\n choiceOrderOptionSchema,\n questionSchema,\n ratingQuestionSchema,\n annotationQuestionSchema,\n questionOptionSchema,\n nestedOptionSchema,\n multipleChoiceSingleQuestionSchema,\n multipleChoiceMultipleQuestionSchema,\n npsQuestionSchema,\n shortAnswerQuestionSchema,\n longAnswerQuestionSchema,\n nestedDropdownQuestionSchema,\n combinedQuestionSchema,\n // Enum constants\n QuestionTypes,\n ValidationRuleTypes,\n VisibilityConditionOperators,\n QuestionStatuses,\n RatingDisplayStyles,\n RatingRepresentationSizes,\n MultipleChoiceDisplayStyles,\n MultipleChoiceMultipleDisplayStyles,\n ChoiceOrderOptions,\n // Types\n type QuestionType,\n type ValidationRule,\n type VisibilityCondition,\n type QuestionStatus,\n type Question,\n type RatingDisplayStyle,\n type RatingRepresentationSize,\n type RatingQuestion,\n type AnnotationQuestion,\n type QuestionOption,\n type NestedOption,\n type MultipleChoiceDisplayStyle,\n type MultipleChoiceSingleQuestion,\n type MultipleChoiceMultipleDisplayStyle,\n type MultipleChoiceMultipleQuestion,\n type NpsQuestion,\n type ShortAnswerQuestion,\n type LongAnswerQuestion,\n type ChoiceOrderOption,\n type NestedDropdownQuestion,\n type Section,\n type CombinedQuestion,\n} from \"./schemas/fields/field-schema\";\n\n// Answer schema exports\nexport {\n SimpleAnswerSchema,\n ChoiceAnswerSchema,\n MultipleChoiceAnswerSchema,\n ScaleAnswerSchema,\n ContinuousSumAnswerSchema,\n RankingAnswerSchema,\n TextAnswerSchema,\n AnswerSchema,\n type SimpleAnswer,\n type ChoiceAnswer,\n type MultipleChoiceAnswer,\n type ScaleAnswer,\n type ContinuousSumAnswer,\n type RankingAnswer,\n type TextAnswer,\n type Answer,\n} from \"./schemas/fields/answer-schema\";\n\n// Form schema exports\nexport {\n surveyTypeSchema,\n yesNoSchema,\n recurringUnitSchema,\n frequencyAndSchedulingPropertiesSchema,\n externalPublishingPropertiesSchema,\n publicationStatusSchema,\n feedbackConfigurationSchema,\n // Enum constants\n SurveyTypes,\n YesNoValues,\n RecurringUnits,\n PublicationStatuses,\n // Types\n type SurveyType,\n type YesNo,\n type RecurringUnit,\n type PublicationStatus,\n type FeedbackConfiguration,\n type FrequencyAndSchedulingProperties,\n type ExternalPublishingProperties,\n} from \"./schemas/fields/form-schema\";\n\n// Form properties schema exports\nexport {\n otherConfigurationPropertiesSchema,\n welcomeScreenPropertiesSchema,\n endScreenPropertiesSchema,\n appearancePropertiesSchema,\n formPropertiesSchema,\n type FormProperties,\n type OtherConfigurationProperties,\n type WelcomeScreenProperties,\n type EndScreenProperties,\n type AppearanceProperties,\n} from \"./schemas/fields/form-properties-schema\";\n\n// Other screen schema exports\nexport {\n dismissBehaviorSchema,\n WelcomeScreenFieldsSchema,\n EndScreenFieldsSchema,\n WelcomeFieldsTranslationSchema,\n EndFieldsTranslationSchema,\n OtherFieldsSchema,\n LanguageFieldSchema,\n LanguagesSchema,\n OtherFieldsTranslationSchema,\n // Enum constants\n DismissBehaviors,\n // Types\n type WelcomeFields,\n type EndFields,\n type WelcomeFieldsTranslation,\n type EndFieldsTranslation,\n type OtherFields,\n type OtherFieldsTranslation,\n type LanguageField,\n type Languages,\n} from \"./schemas/fields/other-screen-schema\";\n\n// Theme schema exports\nexport {\n positionSchema,\n themeModeSchema,\n featureSettingsSchema,\n themeColorsSchema,\n themesSchema,\n themeConfigurationSchema,\n // Enum constants\n Positions,\n ThemeModes,\n // Types\n type Position,\n type FeatureSettings,\n type ThemeColors,\n type Themes,\n type ThemeMode,\n type ThemeConfiguration,\n} from \"./schemas/fields/theme-schema\";\n\n// Translations schema exports\nexport {\n translationEntrySchema,\n ratingTranslationsSchema,\n singleChoiceTranslationsSchema,\n multipleChoiceTranslationsSchema,\n npsTranslationsSchema,\n shortAnswerTranslationsSchema,\n longAnswerTranslationsSchema,\n nestedSelectionTranslationsSchema,\n annotationTranslationsSchema,\n questionTranslationsSchema,\n languageTranslationsSchema,\n translationsSchema,\n TranslationProvider,\n createTranslationProvider,\n type TranslationEntry,\n type RatingTranslations,\n type SingleChoiceTranslations,\n type MultipleChoiceTranslations,\n type NpsTranslations,\n type ShortAnswerTranslations,\n type LongAnswerTranslations,\n type NestedSelectionTranslations,\n type AnnotationTranslations,\n type QuestionTranslations,\n type LanguageTranslations,\n type Translations,\n} from \"./schemas/fields/translations-schema\";\n\n// Auto trigger schema exports\nexport {\n audienceSegmentSchema,\n audienceTriggerPropertiesSchema,\n type AudienceSegment,\n type AudienceTriggerProperties,\n} from \"./schemas/fields/auto-trigger-schema\";\n\n// Re-export Zod for convenience (consumers should add zod to their dependencies)\nexport { z } from \"zod\";\n"],
5
+ "mappings": ";;;;AAAA,SAAS,SAAS;AAGX,IAAM,qBAAqB,EAC/B,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC,EACA,SAAS,6DAA6D;AAGlE,IAAM,gBAAgB;AAAA,EAC3B,QAAQ,mBAAmB,QAAQ,CAAC;AAAA,EACpC,eAAe,mBAAmB,QAAQ,CAAC;AAAA,EAC3C,KAAK,mBAAmB,QAAQ,CAAC;AAAA,EACjC,kBAAkB,mBAAmB,QAAQ,CAAC;AAAA,EAC9C,0BAA0B,mBAAmB,QAAQ,CAAC;AAAA,EACtD,cAAc,mBAAmB,QAAQ,CAAC;AAAA,EAC1C,WAAW,mBAAmB,QAAQ,CAAC;AAAA,EACvC,YAAY,mBAAmB,QAAQ,CAAC;AAC1C;AAGO,IAAM,2BAA2B,EACrC,KAAK;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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S,iEAAiE;AAC/E,CAAC,EACA,SAAS,gEAAgE;AAGrE,IAAM,uBAAuBA,GACjC,OAAO;AAAA,EACN,2BAA2BA,GAAE,KAAK,EAC/B,SAAS,kDAAkD;AAAA,EAC9D,wBAAwB,4BACrB,SAAS,gDAAgD;AAAA,EAC5D,sBAAsBA,GACnB,OAAO;AAAA,IACN,WAAWA,GAAE,OAAOA,GAAE,OAAO,GAAG,sBAAsB,EACnD,SAAS,2DAA2D;AAAA,IACvE,UAAUA,GAAE,MAAM,aAAa,EAC5B,SAAS,+DAA+D;AAAA,IAC3E,oBAAoB,gBACjB,SAAS,oDAAoD;AAAA,IAChE,cAAc,mBACX,SAAS,4DAA4D;AAAA,EAC1E,CAAC,EACA,SAAS,wGAAwG;AAAA,EACpH,qCAAqC,uCAClC,SAAS,iEAAiE;AAAA,EAC7E,gCAAgC,mCAC7B,SAAS,4EAA4E;AAAA,EACxF,6BAA6B,gCAC1B,SAAS,qFAAqF;AAAA,EACjG,gCAAgC,mCAC7B,SAAS,qFAAqF;AAAA,EACjG,2BAA2B,8BACxB,SAAS,iEAAiE;AAAA,EAC7E,uBAAuB,0BACpB,SAAS,kFAAkF;AAAA,EAC9F,uBAAuB,2BACpB,SAAS,4EAA4E;AAC1F,CAAC,EACA,SAAS,gJAAgJ;;;AKmE5J,SAAS,KAAAC,UAAS;",
6
6
  "names": ["z", "z", "z", "z", "z", "z", "z", "z", "z", "z"]
7
7
  }
@@ -1,9 +1,9 @@
1
- export { questionTypeSchema, validationRuleSchema, visibilityConditionSchema, sectionSchema, questionStatusSchema, ratingDisplayStyleSchema, ratingRepresentationSizeSchema, multipleChoiceDisplayStyleSchema, multipleChoiceMultipleDisplayStyleSchema, choiceOrderOptionSchema, questionSchema, ratingQuestionSchema, annotationQuestionSchema, questionOptionSchema, nestedOptionSchema, multipleChoiceSingleQuestionSchema, multipleChoiceMultipleQuestionSchema, npsQuestionSchema, shortAnswerQuestionSchema, longAnswerQuestionSchema, nestedDropdownQuestionSchema, combinedQuestionSchema, type QuestionType, type ValidationRule, type VisibilityCondition, type QuestionStatus, type Question, type RatingDisplayStyle, type RatingRepresentationSize, type RatingQuestion, type AnnotationQuestion, type QuestionOption, type NestedOption, type MultipleChoiceDisplayStyle, type MultipleChoiceSingleQuestion, type MultipleChoiceMultipleDisplayStyle, type MultipleChoiceMultipleQuestion, type NpsQuestion, type ShortAnswerQuestion, type LongAnswerQuestion, type ChoiceOrderOption, type NestedDropdownQuestion, type Section, type CombinedQuestion, } from "./schemas/fields/field-schema";
1
+ export { questionTypeSchema, validationRuleTypeSchema, validationRuleSchema, visibilityConditionSchema, sectionSchema, questionStatusSchema, ratingDisplayStyleSchema, ratingRepresentationSizeSchema, multipleChoiceDisplayStyleSchema, multipleChoiceMultipleDisplayStyleSchema, choiceOrderOptionSchema, questionSchema, ratingQuestionSchema, annotationQuestionSchema, questionOptionSchema, nestedOptionSchema, multipleChoiceSingleQuestionSchema, multipleChoiceMultipleQuestionSchema, npsQuestionSchema, shortAnswerQuestionSchema, longAnswerQuestionSchema, nestedDropdownQuestionSchema, combinedQuestionSchema, QuestionTypes, ValidationRuleTypes, VisibilityConditionOperators, QuestionStatuses, RatingDisplayStyles, RatingRepresentationSizes, MultipleChoiceDisplayStyles, MultipleChoiceMultipleDisplayStyles, ChoiceOrderOptions, type QuestionType, type ValidationRule, type VisibilityCondition, type QuestionStatus, type Question, type RatingDisplayStyle, type RatingRepresentationSize, type RatingQuestion, type AnnotationQuestion, type QuestionOption, type NestedOption, type MultipleChoiceDisplayStyle, type MultipleChoiceSingleQuestion, type MultipleChoiceMultipleDisplayStyle, type MultipleChoiceMultipleQuestion, type NpsQuestion, type ShortAnswerQuestion, type LongAnswerQuestion, type ChoiceOrderOption, type NestedDropdownQuestion, type Section, type CombinedQuestion, } from "./schemas/fields/field-schema";
2
2
  export { SimpleAnswerSchema, ChoiceAnswerSchema, MultipleChoiceAnswerSchema, ScaleAnswerSchema, ContinuousSumAnswerSchema, RankingAnswerSchema, TextAnswerSchema, AnswerSchema, type SimpleAnswer, type ChoiceAnswer, type MultipleChoiceAnswer, type ScaleAnswer, type ContinuousSumAnswer, type RankingAnswer, type TextAnswer, type Answer, } from "./schemas/fields/answer-schema";
3
- export { surveyTypeSchema, yesNoSchema, recurringUnitSchema, frequencyAndSchedulingPropertiesSchema, externalPublishingPropertiesSchema, publicationStatusSchema, feedbackConfigurationSchema, type SurveyType, type YesNo, type RecurringUnit, type PublicationStatus, type FeedbackConfiguration, type FrequencyAndSchedulingProperties, type ExternalPublishingProperties, } from "./schemas/fields/form-schema";
3
+ export { surveyTypeSchema, yesNoSchema, recurringUnitSchema, frequencyAndSchedulingPropertiesSchema, externalPublishingPropertiesSchema, publicationStatusSchema, feedbackConfigurationSchema, SurveyTypes, YesNoValues, RecurringUnits, PublicationStatuses, type SurveyType, type YesNo, type RecurringUnit, type PublicationStatus, type FeedbackConfiguration, type FrequencyAndSchedulingProperties, type ExternalPublishingProperties, } from "./schemas/fields/form-schema";
4
4
  export { otherConfigurationPropertiesSchema, welcomeScreenPropertiesSchema, endScreenPropertiesSchema, appearancePropertiesSchema, formPropertiesSchema, type FormProperties, type OtherConfigurationProperties, type WelcomeScreenProperties, type EndScreenProperties, type AppearanceProperties, } from "./schemas/fields/form-properties-schema";
5
- export { WelcomeScreenFieldsSchema, EndScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndFieldsTranslationSchema, OtherFieldsSchema, LanguageFieldSchema, LanguagesSchema, OtherFieldsTranslationSchema, type WelcomeFields, type EndFields, type WelcomeFieldsTranslation, type EndFieldsTranslation, type OtherFields, type OtherFieldsTranslation, type LanguageField, type Languages, } from "./schemas/fields/other-screen-schema";
6
- export { positionSchema, featureSettingsSchema, themeColorsSchema, themesSchema, themeConfigurationSchema, type Position, type FeatureSettings, type ThemeColors, type Themes, type ThemeMode, type ThemeConfiguration, } from "./schemas/fields/theme-schema";
5
+ export { dismissBehaviorSchema, WelcomeScreenFieldsSchema, EndScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndFieldsTranslationSchema, OtherFieldsSchema, LanguageFieldSchema, LanguagesSchema, OtherFieldsTranslationSchema, DismissBehaviors, type WelcomeFields, type EndFields, type WelcomeFieldsTranslation, type EndFieldsTranslation, type OtherFields, type OtherFieldsTranslation, type LanguageField, type Languages, } from "./schemas/fields/other-screen-schema";
6
+ export { positionSchema, themeModeSchema, featureSettingsSchema, themeColorsSchema, themesSchema, themeConfigurationSchema, Positions, ThemeModes, type Position, type FeatureSettings, type ThemeColors, type Themes, type ThemeMode, type ThemeConfiguration, } from "./schemas/fields/theme-schema";
7
7
  export { translationEntrySchema, ratingTranslationsSchema, singleChoiceTranslationsSchema, multipleChoiceTranslationsSchema, npsTranslationsSchema, shortAnswerTranslationsSchema, longAnswerTranslationsSchema, nestedSelectionTranslationsSchema, annotationTranslationsSchema, questionTranslationsSchema, languageTranslationsSchema, translationsSchema, TranslationProvider, createTranslationProvider, type TranslationEntry, type RatingTranslations, type SingleChoiceTranslations, type MultipleChoiceTranslations, type NpsTranslations, type ShortAnswerTranslations, type LongAnswerTranslations, type NestedSelectionTranslations, type AnnotationTranslations, type QuestionTranslations, type LanguageTranslations, type Translations, } from "./schemas/fields/translations-schema";
8
8
  export { audienceSegmentSchema, audienceTriggerPropertiesSchema, type AudienceSegment, type AudienceTriggerProperties, } from "./schemas/fields/auto-trigger-schema";
9
9
  export { z } from "zod";
@@ -9,6 +9,38 @@ export declare const questionTypeSchema: z.ZodEnum<{
9
9
  long_text: "long_text";
10
10
  annotation: "annotation";
11
11
  }>;
12
+ export declare const QuestionTypes: {
13
+ readonly RATING: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
14
+ readonly SINGLE_CHOICE: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
15
+ readonly NPS: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
16
+ readonly NESTED_SELECTION: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
17
+ readonly MULTIPLE_CHOICE_MULTIPLE: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
18
+ readonly SHORT_ANSWER: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
19
+ readonly LONG_TEXT: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
20
+ readonly ANNOTATION: "rating" | "single_choice" | "nps" | "nested_selection" | "multiple_choice_multiple" | "short_answer" | "long_text" | "annotation";
21
+ };
22
+ export declare const validationRuleTypeSchema: z.ZodEnum<{
23
+ required: "required";
24
+ min: "min";
25
+ max: "max";
26
+ minLength: "minLength";
27
+ maxLength: "maxLength";
28
+ pattern: "pattern";
29
+ email: "email";
30
+ url: "url";
31
+ custom: "custom";
32
+ }>;
33
+ export declare const ValidationRuleTypes: {
34
+ readonly REQUIRED: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
35
+ readonly MIN: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
36
+ readonly MAX: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
37
+ readonly MIN_LENGTH: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
38
+ readonly MAX_LENGTH: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
39
+ readonly PATTERN: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
40
+ readonly EMAIL: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
41
+ readonly URL: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
42
+ readonly CUSTOM: "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "email" | "url" | "custom";
43
+ };
12
44
  export declare const validationRuleSchema: z.ZodObject<{
13
45
  type: z.ZodEnum<{
14
46
  required: "required";
@@ -25,6 +57,26 @@ export declare const validationRuleSchema: z.ZodObject<{
25
57
  message: z.ZodOptional<z.ZodString>;
26
58
  describe: z.ZodOptional<z.ZodString>;
27
59
  }, z.core.$strip>;
60
+ export declare const visibilityConditionOperatorSchema: z.ZodEnum<{
61
+ equals: "equals";
62
+ not_equals: "not_equals";
63
+ contains: "contains";
64
+ not_contains: "not_contains";
65
+ greater_than: "greater_than";
66
+ less_than: "less_than";
67
+ is_empty: "is_empty";
68
+ is_not_empty: "is_not_empty";
69
+ }>;
70
+ export declare const VisibilityConditionOperators: {
71
+ readonly EQUALS: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
72
+ readonly NOT_EQUALS: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
73
+ readonly CONTAINS: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
74
+ readonly NOT_CONTAINS: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
75
+ readonly GREATER_THAN: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
76
+ readonly LESS_THAN: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
77
+ readonly IS_EMPTY: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
78
+ readonly IS_NOT_EMPTY: "equals" | "not_equals" | "contains" | "not_contains" | "greater_than" | "less_than" | "is_empty" | "is_not_empty";
79
+ };
28
80
  export declare const visibilityConditionSchema: z.ZodObject<{
29
81
  field: z.ZodString;
30
82
  operator: z.ZodEnum<{
@@ -51,6 +103,12 @@ export declare const questionStatusSchema: z.ZodEnum<{
51
103
  A: "A";
52
104
  S: "S";
53
105
  }>;
106
+ export declare const QuestionStatuses: {
107
+ readonly DRAFT: "D" | "P" | "A" | "S";
108
+ readonly PUBLISHED: "D" | "P" | "A" | "S";
109
+ readonly ARCHIVED: "D" | "P" | "A" | "S";
110
+ readonly SUSPENDED: "D" | "P" | "A" | "S";
111
+ };
54
112
  export declare const ratingDisplayStyleSchema: z.ZodEnum<{
55
113
  star: "star";
56
114
  heart: "heart";
@@ -59,22 +117,46 @@ export declare const ratingDisplayStyleSchema: z.ZodEnum<{
59
117
  emoji: "emoji";
60
118
  "emoji-exp": "emoji-exp";
61
119
  }>;
120
+ export declare const RatingDisplayStyles: {
121
+ readonly STAR: "star" | "heart" | "thumbs-up" | "diamond" | "emoji" | "emoji-exp";
122
+ readonly HEART: "star" | "heart" | "thumbs-up" | "diamond" | "emoji" | "emoji-exp";
123
+ readonly THUMBS_UP: "star" | "heart" | "thumbs-up" | "diamond" | "emoji" | "emoji-exp";
124
+ readonly DIAMOND: "star" | "heart" | "thumbs-up" | "diamond" | "emoji" | "emoji-exp";
125
+ readonly EMOJI: "star" | "heart" | "thumbs-up" | "diamond" | "emoji" | "emoji-exp";
126
+ readonly EMOJI_EXP: "star" | "heart" | "thumbs-up" | "diamond" | "emoji" | "emoji-exp";
127
+ };
62
128
  export declare const ratingRepresentationSizeSchema: z.ZodEnum<{
63
129
  small: "small";
64
130
  medium: "medium";
65
131
  large: "large";
66
132
  }>;
133
+ export declare const RatingRepresentationSizes: {
134
+ readonly SMALL: "small" | "medium" | "large";
135
+ readonly MEDIUM: "small" | "medium" | "large";
136
+ readonly LARGE: "small" | "medium" | "large";
137
+ };
67
138
  export declare const multipleChoiceDisplayStyleSchema: z.ZodEnum<{
68
139
  radio: "radio";
69
140
  list: "list";
70
141
  chip: "chip";
71
142
  dropdown: "dropdown";
72
143
  }>;
144
+ export declare const MultipleChoiceDisplayStyles: {
145
+ readonly RADIO: "radio" | "list" | "chip" | "dropdown";
146
+ readonly LIST: "radio" | "list" | "chip" | "dropdown";
147
+ readonly CHIP: "radio" | "list" | "chip" | "dropdown";
148
+ readonly DROPDOWN: "radio" | "list" | "chip" | "dropdown";
149
+ };
73
150
  export declare const multipleChoiceMultipleDisplayStyleSchema: z.ZodEnum<{
74
151
  list: "list";
75
152
  chip: "chip";
76
153
  checkbox: "checkbox";
77
154
  }>;
155
+ export declare const MultipleChoiceMultipleDisplayStyles: {
156
+ readonly CHECKBOX: "list" | "chip" | "checkbox";
157
+ readonly LIST: "list" | "chip" | "checkbox";
158
+ readonly CHIP: "list" | "chip" | "checkbox";
159
+ };
78
160
  export declare const choiceOrderOptionSchema: z.ZodEnum<{
79
161
  randomize: "randomize";
80
162
  flip: "flip";
@@ -82,6 +164,13 @@ export declare const choiceOrderOptionSchema: z.ZodEnum<{
82
164
  ascending: "ascending";
83
165
  none: "none";
84
166
  }>;
167
+ export declare const ChoiceOrderOptions: {
168
+ readonly RANDOMIZE: "randomize" | "flip" | "rotate" | "ascending" | "none";
169
+ readonly FLIP: "randomize" | "flip" | "rotate" | "ascending" | "none";
170
+ readonly ROTATE: "randomize" | "flip" | "rotate" | "ascending" | "none";
171
+ readonly ASCENDING: "randomize" | "flip" | "rotate" | "ascending" | "none";
172
+ readonly NONE: "randomize" | "flip" | "rotate" | "ascending" | "none";
173
+ };
85
174
  export declare const questionSchema: z.ZodObject<{
86
175
  id: z.ZodString;
87
176
  type: z.ZodEnum<{
@@ -3,10 +3,18 @@ export declare const surveyTypeSchema: z.ZodEnum<{
3
3
  R: "R";
4
4
  O: "O";
5
5
  }>;
6
+ export declare const SurveyTypes: {
7
+ readonly RECURRING: "R" | "O";
8
+ readonly ONE_TIME: "R" | "O";
9
+ };
6
10
  export declare const yesNoSchema: z.ZodEnum<{
7
11
  Y: "Y";
8
12
  N: "N";
9
13
  }>;
14
+ export declare const YesNoValues: {
15
+ readonly YES: "Y" | "N";
16
+ readonly NO: "Y" | "N";
17
+ };
10
18
  export declare const recurringUnitSchema: z.ZodEnum<{
11
19
  minutes: "minutes";
12
20
  hours: "hours";
@@ -15,6 +23,14 @@ export declare const recurringUnitSchema: z.ZodEnum<{
15
23
  months: "months";
16
24
  years: "years";
17
25
  }>;
26
+ export declare const RecurringUnits: {
27
+ readonly MINUTES: "minutes" | "hours" | "days" | "weeks" | "months" | "years";
28
+ readonly HOURS: "minutes" | "hours" | "days" | "weeks" | "months" | "years";
29
+ readonly DAYS: "minutes" | "hours" | "days" | "weeks" | "months" | "years";
30
+ readonly WEEKS: "minutes" | "hours" | "days" | "weeks" | "months" | "years";
31
+ readonly MONTHS: "minutes" | "hours" | "days" | "weeks" | "months" | "years";
32
+ readonly YEARS: "minutes" | "hours" | "days" | "weeks" | "months" | "years";
33
+ };
18
34
  export declare const frequencyAndSchedulingPropertiesSchema: z.ZodObject<{
19
35
  surveyType: z.ZodEnum<{
20
36
  R: "R";
@@ -46,6 +62,11 @@ export declare const publicationStatusSchema: z.ZodEnum<{
46
62
  P: "P";
47
63
  A: "A";
48
64
  }>;
65
+ export declare const PublicationStatuses: {
66
+ readonly PUBLISHED: "D" | "P" | "A";
67
+ readonly DRAFT: "D" | "P" | "A";
68
+ readonly ARCHIVED: "D" | "P" | "A";
69
+ };
49
70
  export declare const feedbackConfigurationSchema: z.ZodObject<{
50
71
  form_title: z.ZodString;
51
72
  form_description: z.ZodString;
@@ -1,4 +1,12 @@
1
1
  import { z } from "zod";
2
+ export declare const dismissBehaviorSchema: z.ZodEnum<{
3
+ fade: "fade";
4
+ manual: "manual";
5
+ }>;
6
+ export declare const DismissBehaviors: {
7
+ readonly FADE: "fade" | "manual";
8
+ readonly MANUAL: "fade" | "manual";
9
+ };
2
10
  export declare const WelcomeScreenFieldsSchema: z.ZodObject<{
3
11
  title: z.ZodString;
4
12
  description: z.ZodString;
@@ -10,10 +10,25 @@ export declare const positionSchema: z.ZodEnum<{
10
10
  "bottom-center": "bottom-center";
11
11
  "bottom-right": "bottom-right";
12
12
  }>;
13
+ export declare const Positions: {
14
+ readonly TOP_LEFT: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
15
+ readonly TOP_CENTER: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
16
+ readonly TOP_RIGHT: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
17
+ readonly MIDDLE_LEFT: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
18
+ readonly MIDDLE_CENTER: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
19
+ readonly MIDDLE_RIGHT: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
20
+ readonly BOTTOM_LEFT: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
21
+ readonly BOTTOM_CENTER: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
22
+ readonly BOTTOM_RIGHT: "top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right";
23
+ };
13
24
  export declare const themeModeSchema: z.ZodEnum<{
14
25
  light: "light";
15
26
  dark: "dark";
16
27
  }>;
28
+ export declare const ThemeModes: {
29
+ readonly LIGHT: "light" | "dark";
30
+ readonly DARK: "light" | "dark";
31
+ };
17
32
  export declare const featureSettingsSchema: z.ZodObject<{
18
33
  darkOverlay: z.ZodBoolean;
19
34
  closeButton: z.ZodBoolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@encatch/schema",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "TypeScript schema definitions using Zod for validation and type inference of encatch product",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",