@encatch/schema 0.0.1 → 0.1.0

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.
Files changed (42) hide show
  1. package/README.md +6 -0
  2. package/dist/cjs/index.js +910 -28
  3. package/dist/cjs/index.js.map +7 -1
  4. package/dist/esm/index.js +891 -12
  5. package/dist/esm/index.js.map +7 -1
  6. package/package.json +1 -1
  7. package/dist/cjs/schemas/fields/answer-schema.js +0 -103
  8. package/dist/cjs/schemas/fields/answer-schema.js.map +0 -1
  9. package/dist/cjs/schemas/fields/auto-trigger-schema.js +0 -49
  10. package/dist/cjs/schemas/fields/auto-trigger-schema.js.map +0 -1
  11. package/dist/cjs/schemas/fields/field-schema.js +0 -678
  12. package/dist/cjs/schemas/fields/field-schema.js.map +0 -1
  13. package/dist/cjs/schemas/fields/form-properties-schema.js +0 -136
  14. package/dist/cjs/schemas/fields/form-properties-schema.js.map +0 -1
  15. package/dist/cjs/schemas/fields/form-schema.js +0 -123
  16. package/dist/cjs/schemas/fields/form-schema.js.map +0 -1
  17. package/dist/cjs/schemas/fields/other-screen-schema.js +0 -169
  18. package/dist/cjs/schemas/fields/other-screen-schema.js.map +0 -1
  19. package/dist/cjs/schemas/fields/theme-schema.js +0 -85
  20. package/dist/cjs/schemas/fields/theme-schema.js.map +0 -1
  21. package/dist/cjs/schemas/fields/translations-example.js +0 -187
  22. package/dist/cjs/schemas/fields/translations-example.js.map +0 -1
  23. package/dist/cjs/schemas/fields/translations-schema.js +0 -198
  24. package/dist/cjs/schemas/fields/translations-schema.js.map +0 -1
  25. package/dist/esm/schemas/fields/answer-schema.js +0 -100
  26. package/dist/esm/schemas/fields/answer-schema.js.map +0 -1
  27. package/dist/esm/schemas/fields/auto-trigger-schema.js +0 -46
  28. package/dist/esm/schemas/fields/auto-trigger-schema.js.map +0 -1
  29. package/dist/esm/schemas/fields/field-schema.js +0 -675
  30. package/dist/esm/schemas/fields/field-schema.js.map +0 -1
  31. package/dist/esm/schemas/fields/form-properties-schema.js +0 -133
  32. package/dist/esm/schemas/fields/form-properties-schema.js.map +0 -1
  33. package/dist/esm/schemas/fields/form-schema.js +0 -120
  34. package/dist/esm/schemas/fields/form-schema.js.map +0 -1
  35. package/dist/esm/schemas/fields/other-screen-schema.js +0 -166
  36. package/dist/esm/schemas/fields/other-screen-schema.js.map +0 -1
  37. package/dist/esm/schemas/fields/theme-schema.js +0 -82
  38. package/dist/esm/schemas/fields/theme-schema.js.map +0 -1
  39. package/dist/esm/schemas/fields/translations-example.js +0 -181
  40. package/dist/esm/schemas/fields/translations-example.js.map +0 -1
  41. package/dist/esm/schemas/fields/translations-schema.js +0 -193
  42. package/dist/esm/schemas/fields/translations-schema.js.map +0 -1
@@ -1,675 +0,0 @@
1
- import { z } from "zod";
2
- // Question type enum for different form field types
3
- export const questionTypeSchema = z
4
- .enum([
5
- "rating",
6
- "single_choice",
7
- "nps",
8
- "nested_selection",
9
- "multiple_choice_multiple",
10
- "short_answer",
11
- "long_text",
12
- "annotation",
13
- ])
14
- .describe("Enumeration of all supported question types for form fields");
15
- // Validation rule schema for question validations
16
- export const validationRuleSchema = z
17
- .object({
18
- type: z
19
- .enum([
20
- "required",
21
- "min",
22
- "max",
23
- "minLength",
24
- "maxLength",
25
- "pattern",
26
- "email",
27
- "url",
28
- "custom",
29
- ])
30
- .describe("Type of validation rule to apply"),
31
- value: z
32
- .union([z.string(), z.number(), z.boolean()])
33
- .optional()
34
- .describe("Value for the validation rule (string, number, or boolean)"),
35
- message: z
36
- .string()
37
- .optional()
38
- .describe("Custom error message when validation fails"),
39
- describe: z
40
- .string()
41
- .max(500)
42
- .optional()
43
- .describe("LLM tool call description for this validation rule"),
44
- })
45
- .describe("Schema defining validation rules for question responses");
46
- // Visibility condition schema for conditional visibility
47
- export const visibilityConditionSchema = z
48
- .object({
49
- field: z.string().describe("ID of the field to check against"),
50
- operator: z
51
- .enum([
52
- "equals",
53
- "not_equals",
54
- "contains",
55
- "not_contains",
56
- "greater_than",
57
- "less_than",
58
- "is_empty",
59
- "is_not_empty",
60
- ])
61
- .describe("Comparison operator for the condition"),
62
- value: z
63
- .union([z.string(), z.number(), z.boolean()])
64
- .optional()
65
- .describe("Value to compare against (string, number, or boolean)"),
66
- describe: z
67
- .string()
68
- .max(500)
69
- .optional()
70
- .describe("LLM tool call description for this visibility condition"),
71
- })
72
- .describe("Schema defining conditions that control when questions are visible");
73
- // Section schema for organizing questions
74
- export const sectionSchema = z
75
- .object({
76
- id: z
77
- .uuid()
78
- .describe("Unique identifier for the section"),
79
- title: z
80
- .string()
81
- .min(1)
82
- .max(200)
83
- .describe("Display title for the section"),
84
- question_ids: z
85
- .array(z.uuid())
86
- .min(1)
87
- .describe("Array of question IDs that belong to this section"),
88
- })
89
- .describe("Schema defining sections that organize questions into logical groups");
90
- // Question status enum
91
- export const questionStatusSchema = z.enum(["D", "P", "A", "S"]); // Draft, Published, Archived, Suspended
92
- // Display style enum for rating questions
93
- export const ratingDisplayStyleSchema = z.enum([
94
- "star",
95
- "heart",
96
- "thumbs-up",
97
- "diamond",
98
- "emoji",
99
- "emoji-exp",
100
- ]);
101
- // Representation size enum for rating questions
102
- export const ratingRepresentationSizeSchema = z.enum([
103
- "small",
104
- "medium",
105
- "large",
106
- ]);
107
- // Display style enum for multiple choice questions
108
- export const multipleChoiceDisplayStyleSchema = z.enum([
109
- "radio",
110
- "list",
111
- "chip",
112
- "dropdown",
113
- ]);
114
- // Display style enum for multiple choice multiple questions
115
- export const multipleChoiceMultipleDisplayStyleSchema = z.enum([
116
- "checkbox",
117
- "list",
118
- "chip",
119
- ]);
120
- // Choice order options for nested selection questions
121
- export const choiceOrderOptionSchema = z.enum([
122
- "randomize",
123
- "flip",
124
- "rotate",
125
- "ascending",
126
- "none",
127
- ]);
128
- // Main Question schema
129
- export const questionSchema = z
130
- .object({
131
- id: z.uuid().describe("Unique identifier for the question"),
132
- type: questionTypeSchema.describe("The type of question (rating, single_choice, etc.)"),
133
- title: z
134
- .string()
135
- .min(1)
136
- .max(200)
137
- .describe("The main title/question text displayed to users"),
138
- description: z
139
- .string()
140
- .max(1000)
141
- .optional()
142
- .describe("Optional detailed description or help text"),
143
- describe: z
144
- .string()
145
- .max(2000)
146
- .optional()
147
- .describe("LLM tool call description for better AI understanding and context"),
148
- required: z
149
- .boolean()
150
- .default(false)
151
- .describe("Whether this question must be answered"),
152
- errorMessage: z
153
- .string()
154
- .max(500)
155
- .optional()
156
- .describe("Custom error message when validation fails"),
157
- validations: z
158
- .array(validationRuleSchema)
159
- .optional()
160
- .default([])
161
- .describe("Array of validation rules to apply"),
162
- visibility: z
163
- .array(visibilityConditionSchema)
164
- .optional()
165
- .default([])
166
- .describe("Conditions that control when this question is shown"),
167
- isFixed: z
168
- .boolean()
169
- .describe("Whether this question position is fixed or can be reordered"),
170
- sectionId: z
171
- .string()
172
- .uuid()
173
- .optional()
174
- .describe("ID of the section this question belongs to"),
175
- status: questionStatusSchema.describe("Current status of the question (Draft, Published, etc.)"),
176
- })
177
- .describe("Base schema for all question types with common properties");
178
- // Rating question schema (extends base question with specific rating properties)
179
- export const ratingQuestionSchema = questionSchema
180
- .extend({
181
- type: z
182
- .literal(questionTypeSchema.enum.rating)
183
- .describe("Must be exactly 'rating'"),
184
- showLabels: z
185
- .boolean()
186
- .optional()
187
- .describe("Whether to show min/max labels"),
188
- minLabel: z
189
- .string()
190
- .max(100)
191
- .optional()
192
- .describe("Label for the minimum rating value"),
193
- maxLabel: z
194
- .string()
195
- .max(100)
196
- .optional()
197
- .describe("Label for the maximum rating value"),
198
- displayStyle: ratingDisplayStyleSchema
199
- .optional()
200
- .describe("Visual style for rating display"),
201
- numberOfRatings: z
202
- .number()
203
- .int()
204
- .min(1)
205
- .max(10)
206
- .describe("Number of rating options (1-10)"),
207
- representationSize: ratingRepresentationSizeSchema
208
- .optional()
209
- .describe("Size of rating visual elements"),
210
- color: z
211
- .string()
212
- .regex(/^#[0-9A-F]{6}$/i, "Must be a valid hex color")
213
- .optional()
214
- .describe("Hex color for rating elements"),
215
- })
216
- .describe("Schema for rating questions with customizable display options");
217
- // Annotation question schema (extends base question with annotation properties)
218
- export const annotationQuestionSchema = questionSchema
219
- .extend({
220
- type: z
221
- .literal(questionTypeSchema.enum.annotation)
222
- .describe("Must be exactly 'annotation'"),
223
- annotationText: z
224
- .string()
225
- .max(1000)
226
- .optional()
227
- .describe("Text to display when annotation is provided"),
228
- noAnnotationText: z
229
- .string()
230
- .max(500)
231
- .optional()
232
- .describe("Text to display when no annotation is provided"),
233
- })
234
- .describe("Schema for annotation questions that provide additional context or instructions");
235
- // Question option schema for choice-based questions
236
- export const questionOptionSchema = z
237
- .object({
238
- id: z.uuid().describe("Unique identifier for this option"),
239
- value: z
240
- .string()
241
- .min(1)
242
- .max(100)
243
- .describe("The internal value used for this option"),
244
- label: z
245
- .string()
246
- .min(1)
247
- .max(200)
248
- .describe("The display text shown to users for this option"),
249
- describe: z
250
- .string()
251
- .max(500)
252
- .optional()
253
- .describe("LLM tool call description providing context about this option"),
254
- imageUrl: z
255
- .string()
256
- .url()
257
- .optional()
258
- .describe("Optional image URL to display with this option"),
259
- })
260
- .describe("Schema for individual options in choice-based questions");
261
- // Nested option schema for hierarchical choice structures (recursive)
262
- export const nestedOptionSchema = z.lazy(() => z
263
- .object({
264
- id: z
265
- .string()
266
- .uuid()
267
- .describe("Unique identifier for this nested option"),
268
- value: z
269
- .string()
270
- .min(1)
271
- .max(100)
272
- .describe("The internal value used for this nested option"),
273
- label: z
274
- .string()
275
- .min(1)
276
- .max(200)
277
- .describe("The display text shown for this nested option"),
278
- describe: z
279
- .string()
280
- .max(500)
281
- .optional()
282
- .describe("LLM tool call description for this nested option context"),
283
- imageUrl: z
284
- .string()
285
- .url()
286
- .optional()
287
- .describe("Optional image URL for this nested option"),
288
- hint: z
289
- .string()
290
- .max(500)
291
- .optional()
292
- .describe("Optional hint text to help users understand this nested option"),
293
- children: z
294
- .array(nestedOptionSchema)
295
- .optional()
296
- .default([])
297
- .describe("Array of child options for hierarchical structure"),
298
- })
299
- .describe("Schema for nested options with hierarchical structure support"));
300
- // Multiple choice single question schema (extends base question with choice-specific properties)
301
- export const multipleChoiceSingleQuestionSchema = questionSchema
302
- .extend({
303
- type: z
304
- .literal(questionTypeSchema.enum.single_choice)
305
- .describe("Must be exactly 'single_choice'"),
306
- displayStyle: multipleChoiceDisplayStyleSchema
307
- .optional()
308
- .describe("Visual style for displaying options"),
309
- randomizeOptions: z
310
- .boolean()
311
- .optional()
312
- .default(false)
313
- .describe("Whether to randomize the order of options"),
314
- options: z
315
- .array(questionOptionSchema)
316
- .min(1)
317
- .max(50)
318
- .describe("Array of options for user selection (1-50 options)"),
319
- })
320
- .describe("Schema for single-choice multiple selection questions");
321
- // Multiple choice multiple question schema (extends base question with multiple choice properties)
322
- export const multipleChoiceMultipleQuestionSchema = questionSchema
323
- .extend({
324
- type: z
325
- .literal(questionTypeSchema.enum.multiple_choice_multiple)
326
- .describe("Must be exactly 'multiple_choice_multiple'"),
327
- displayStyle: multipleChoiceMultipleDisplayStyleSchema
328
- .optional()
329
- .describe("Visual style for displaying multiple options"),
330
- minSelections: z
331
- .number()
332
- .int()
333
- .min(0)
334
- .optional()
335
- .describe("Minimum number of options that must be selected"),
336
- maxSelections: z
337
- .number()
338
- .int()
339
- .min(1)
340
- .optional()
341
- .describe("Maximum number of options that can be selected"),
342
- randomizeOptions: z
343
- .boolean()
344
- .optional()
345
- .default(false)
346
- .describe("Whether to randomize the order of options"),
347
- options: z
348
- .array(questionOptionSchema)
349
- .min(1)
350
- .max(50)
351
- .describe("Array of options for user selection (1-50 options)"),
352
- })
353
- .refine((data) => {
354
- // If both minSelections and maxSelections are provided, minSelections should be <= maxSelections
355
- if (data.minSelections !== undefined &&
356
- data.maxSelections !== undefined) {
357
- return data.minSelections <= data.maxSelections;
358
- }
359
- return true;
360
- }, {
361
- message: "minSelections cannot be greater than maxSelections",
362
- path: ["minSelections"], // Point to minSelections field for the error
363
- })
364
- .describe("Schema for multiple-choice questions allowing multiple selections");
365
- // NPS question schema (extends base question with NPS-specific properties)
366
- export const npsQuestionSchema = questionSchema
367
- .extend({
368
- type: z
369
- .literal(questionTypeSchema.enum.nps)
370
- .describe("Must be exactly 'nps'"),
371
- min: z.literal(0).describe("NPS always starts at 0"),
372
- max: z.literal(10).describe("NPS always ends at 10"),
373
- minLabel: z
374
- .string()
375
- .max(100)
376
- .optional()
377
- .describe("Label for the minimum NPS value (0)"),
378
- maxLabel: z
379
- .string()
380
- .max(100)
381
- .optional()
382
- .describe("Label for the maximum NPS value (10)"),
383
- scaleLabels: z
384
- .record(z.string().regex(/^\d+$/).transform(Number).refine(val => val >= 0 && val <= 10), z.string().max(50))
385
- .optional()
386
- .describe("Custom labels for specific NPS values (0-10)"),
387
- prepopulatedValue: z
388
- .number()
389
- .int()
390
- .min(0)
391
- .max(10)
392
- .optional()
393
- .describe("Default value to pre-select (0-10)"),
394
- })
395
- .refine((data) => {
396
- // If scaleLabels is provided, validate that all keys are within the 0-10 range
397
- if (data.scaleLabels) {
398
- const keys = Object.keys(data.scaleLabels).map(Number);
399
- return keys.every((key) => key >= 0 && key <= 10);
400
- }
401
- return true;
402
- }, {
403
- message: "scaleLabels keys must be between 0 and 10 (inclusive)",
404
- path: ["scaleLabels"],
405
- })
406
- .describe("Schema for Net Promoter Score questions with 0-10 scale");
407
- // Short answer question schema (extends base question with text input properties)
408
- export const shortAnswerQuestionSchema = questionSchema
409
- .extend({
410
- type: z
411
- .literal(questionTypeSchema.enum.short_answer)
412
- .describe("Must be exactly 'short_answer'"),
413
- maxCharacters: z
414
- .number()
415
- .int()
416
- .min(1)
417
- .max(10000)
418
- .optional()
419
- .describe("Maximum number of characters allowed"),
420
- minCharacters: z
421
- .number()
422
- .int()
423
- .min(0)
424
- .optional()
425
- .describe("Minimum number of characters required"),
426
- placeholder: z
427
- .string()
428
- .max(200)
429
- .optional()
430
- .describe("Placeholder text shown in the input field"),
431
- enableRegexValidation: z
432
- .boolean()
433
- .optional()
434
- .default(false)
435
- .describe("Whether to enable regex pattern validation"),
436
- regexPattern: z
437
- .string()
438
- .optional()
439
- .describe("Regular expression pattern for validation"),
440
- enableEnhanceWithAi: z
441
- .boolean()
442
- .optional()
443
- .default(false)
444
- .describe("Whether to enable AI enhancement features"),
445
- promptTemplate: z
446
- .string()
447
- .max(2000)
448
- .optional()
449
- .describe("Template for AI enhancement prompts"),
450
- cooldownSeconds: z
451
- .number()
452
- .int()
453
- .min(0)
454
- .max(3600)
455
- .optional()
456
- .describe("Cooldown period between AI enhancements (0-3600 seconds)"),
457
- maxEnhancements: z
458
- .number()
459
- .int()
460
- .min(1)
461
- .max(10)
462
- .optional()
463
- .describe("Maximum number of AI enhancements allowed"),
464
- maxTokenAllowed: z
465
- .number()
466
- .int()
467
- .min(1)
468
- .max(10000)
469
- .optional()
470
- .describe("Maximum tokens allowed for AI processing"),
471
- minCharactersToEnhance: z
472
- .number()
473
- .int()
474
- .min(1)
475
- .optional()
476
- .describe("Minimum characters needed to trigger AI enhancement"),
477
- })
478
- .refine((data) => {
479
- // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters
480
- if (data.minCharacters !== undefined &&
481
- data.maxCharacters !== undefined) {
482
- return data.minCharacters <= data.maxCharacters;
483
- }
484
- return true;
485
- }, {
486
- message: "minCharacters cannot be greater than maxCharacters",
487
- path: ["minCharacters"],
488
- })
489
- .refine((data) => {
490
- // If enableRegexValidation is true, regexPattern should be provided
491
- if (data.enableRegexValidation && !data.regexPattern) {
492
- return false;
493
- }
494
- return true;
495
- }, {
496
- message: "regexPattern is required when enableRegexValidation is true",
497
- path: ["regexPattern"],
498
- })
499
- .refine((data) => {
500
- // If enableEnhanceWithAi is true, promptTemplate should be provided
501
- if (data.enableEnhanceWithAi && !data.promptTemplate) {
502
- return false;
503
- }
504
- return true;
505
- }, {
506
- message: "promptTemplate is required when enableEnhanceWithAi is true",
507
- path: ["promptTemplate"],
508
- })
509
- .describe("Schema for short answer questions with optional AI enhancement");
510
- // Long answer question schema (extends base question with rich text input properties)
511
- export const longAnswerQuestionSchema = questionSchema
512
- .extend({
513
- type: z
514
- .literal(questionTypeSchema.enum.long_text)
515
- .describe("Must be exactly 'long_text'"),
516
- maxCharacters: z
517
- .number()
518
- .int()
519
- .min(1)
520
- .max(50000)
521
- .optional()
522
- .describe("Maximum number of characters allowed (higher limit for long text)"),
523
- minCharacters: z
524
- .number()
525
- .int()
526
- .min(0)
527
- .optional()
528
- .describe("Minimum number of characters required"),
529
- rows: z
530
- .number()
531
- .int()
532
- .min(1)
533
- .max(20)
534
- .optional()
535
- .describe("Number of textarea rows to display (1-20)"),
536
- placeholder: z
537
- .string()
538
- .max(500)
539
- .optional()
540
- .describe("Placeholder text for the textarea (longer for long text)"),
541
- enableEnhanceWithAi: z
542
- .boolean()
543
- .optional()
544
- .default(false)
545
- .describe("Whether to enable AI enhancement features"),
546
- promptTemplate: z
547
- .string()
548
- .max(2000)
549
- .optional()
550
- .describe("Template for AI enhancement prompts"),
551
- cooldownSeconds: z
552
- .number()
553
- .int()
554
- .min(0)
555
- .max(3600)
556
- .optional()
557
- .describe("Cooldown period between AI enhancements (0-3600 seconds)"),
558
- maxEnhancements: z
559
- .number()
560
- .int()
561
- .min(1)
562
- .max(10)
563
- .optional()
564
- .describe("Maximum number of AI enhancements allowed"),
565
- maxTokenAllowed: z
566
- .number()
567
- .int()
568
- .min(1)
569
- .max(25000)
570
- .optional()
571
- .describe("Maximum tokens allowed for AI processing (higher for long text)"),
572
- })
573
- .refine((data) => {
574
- // If both minCharacters and maxCharacters are provided, minCharacters should be <= maxCharacters
575
- if (data.minCharacters !== undefined &&
576
- data.maxCharacters !== undefined) {
577
- return data.minCharacters <= data.maxCharacters;
578
- }
579
- return true;
580
- }, {
581
- message: "minCharacters cannot be greater than maxCharacters",
582
- path: ["minCharacters"],
583
- })
584
- .refine((data) => {
585
- // If enableEnhanceWithAi is true, promptTemplate should be provided
586
- if (data.enableEnhanceWithAi && !data.promptTemplate) {
587
- return false;
588
- }
589
- return true;
590
- }, {
591
- message: "promptTemplate is required when enableEnhanceWithAi is true",
592
- path: ["promptTemplate"],
593
- })
594
- .describe("Schema for long answer questions with rich text support and AI enhancement");
595
- // Nested dropdown question schema (extends base question with hierarchical selection properties)
596
- export const nestedDropdownQuestionSchema = questionSchema
597
- .extend({
598
- type: z
599
- .literal(questionTypeSchema.enum.nested_selection)
600
- .describe("Must be exactly 'nested_selection'"),
601
- placeholder: z
602
- .string()
603
- .max(200)
604
- .optional()
605
- .describe("Placeholder text for the nested dropdown"),
606
- options: z
607
- .array(nestedOptionSchema)
608
- .min(1)
609
- .max(100)
610
- .describe("Array of nested options for hierarchical selection (1-100 options)"),
611
- displayStyle: z
612
- .literal("list")
613
- .describe("Fixed display style for nested dropdowns"),
614
- choiceOrderOption: choiceOrderOptionSchema
615
- .optional()
616
- .default("none")
617
- .describe("How to order the nested choices"),
618
- preserveLastChoices: z
619
- .number()
620
- .int()
621
- .min(0)
622
- .max(10)
623
- .optional()
624
- .describe("Number of choice levels to preserve (0-10)"),
625
- prepopulatedValue: z
626
- .string()
627
- .max(1000)
628
- .optional()
629
- .describe("Default value to pre-populate"),
630
- allowOther: z
631
- .boolean()
632
- .optional()
633
- .default(false)
634
- .describe('Whether to allow custom "other" options'),
635
- otherColumnName: z
636
- .string()
637
- .max(100)
638
- .optional()
639
- .describe('Column name for storing custom "other" values'),
640
- maxDepth: z
641
- .number()
642
- .int()
643
- .min(1)
644
- .max(10)
645
- .optional()
646
- .describe("Maximum nesting depth allowed (1-10)"),
647
- cascadeLabels: z
648
- .boolean()
649
- .optional()
650
- .default(false)
651
- .describe("Whether to cascade labels from parent options"),
652
- })
653
- .refine((data) => {
654
- // If allowOther is true, otherColumnName should be provided
655
- if (data.allowOther && !data.otherColumnName) {
656
- return false;
657
- }
658
- return true;
659
- }, {
660
- message: "otherColumnName is required when allowOther is true",
661
- path: ["otherColumnName"],
662
- })
663
- .describe("Schema for nested dropdown questions with hierarchical option structure");
664
- // Combined question schema using discriminated union for proper type safety
665
- export const combinedQuestionSchema = z.discriminatedUnion("type", [
666
- ratingQuestionSchema,
667
- annotationQuestionSchema,
668
- multipleChoiceSingleQuestionSchema,
669
- multipleChoiceMultipleQuestionSchema,
670
- npsQuestionSchema,
671
- shortAnswerQuestionSchema,
672
- longAnswerQuestionSchema,
673
- nestedDropdownQuestionSchema,
674
- ]);
675
- //# sourceMappingURL=field-schema.js.map