@encatch/schema 0.1.10 → 0.1.12
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 +166 -36
- package/dist/esm/index.js.map +2 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/schemas/fields/field-schema.d.ts +89 -0
- package/dist/types/schemas/fields/form-properties-schema.d.ts +30 -30
- package/dist/types/schemas/fields/form-schema.d.ts +21 -0
- package/dist/types/schemas/fields/other-screen-schema.d.ts +8 -0
- package/dist/types/schemas/fields/theme-schema.d.ts +15 -0
- package/package.json +1 -1
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:
|
|
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:
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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:
|
|
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"),
|
|
@@ -759,13 +870,13 @@ var otherConfigurationPropertiesSchema = z8.discriminatedUnion("isEnabled", [
|
|
|
759
870
|
z8.object({
|
|
760
871
|
isEnabled: z8.literal(false).describe("Whether other configuration properties are enabled"),
|
|
761
872
|
otherFields: OtherFieldsSchema.optional().describe("Other form configuration fields including pagination, buttons, and display options"),
|
|
762
|
-
translations: OtherFieldsTranslationSchema.optional().describe("Translations for other configuration field labels and buttons")
|
|
873
|
+
translations: z8.record(z8.string(), OtherFieldsTranslationSchema).optional().describe("Translations for other configuration field labels and buttons keyed by language code")
|
|
763
874
|
}),
|
|
764
875
|
// When other configuration is enabled
|
|
765
876
|
z8.object({
|
|
766
877
|
isEnabled: z8.literal(true).describe("Whether other configuration properties are enabled"),
|
|
767
878
|
otherFields: OtherFieldsSchema.describe("Other form configuration fields including pagination, buttons, and display options"),
|
|
768
|
-
translations: OtherFieldsTranslationSchema.describe("Translations for other configuration field labels and buttons")
|
|
879
|
+
translations: z8.record(z8.string(), OtherFieldsTranslationSchema).describe("Translations for other configuration field labels and buttons keyed by language code")
|
|
769
880
|
})
|
|
770
881
|
]).describe("Schema for other configuration properties including fields and translations");
|
|
771
882
|
var welcomeScreenPropertiesSchema = z8.discriminatedUnion("isEnabled", [
|
|
@@ -773,13 +884,13 @@ var welcomeScreenPropertiesSchema = z8.discriminatedUnion("isEnabled", [
|
|
|
773
884
|
z8.object({
|
|
774
885
|
isEnabled: z8.literal(false).describe("Whether welcome screen is enabled"),
|
|
775
886
|
welcomeFields: WelcomeScreenFieldsSchema.optional().describe("Welcome screen configuration fields including title, description, and button label"),
|
|
776
|
-
translations: WelcomeFieldsTranslationSchema.optional().describe("Translations for welcome screen content")
|
|
887
|
+
translations: z8.record(z8.string(), WelcomeFieldsTranslationSchema).optional().describe("Translations for welcome screen content keyed by language code")
|
|
777
888
|
}),
|
|
778
889
|
// When welcome screen is enabled
|
|
779
890
|
z8.object({
|
|
780
891
|
isEnabled: z8.literal(true).describe("Whether welcome screen is enabled"),
|
|
781
892
|
welcomeFields: WelcomeScreenFieldsSchema.describe("Welcome screen configuration fields including title, description, and button label"),
|
|
782
|
-
translations: WelcomeFieldsTranslationSchema.describe("Translations for welcome screen content")
|
|
893
|
+
translations: z8.record(z8.string(), WelcomeFieldsTranslationSchema).describe("Translations for welcome screen content keyed by language code")
|
|
783
894
|
})
|
|
784
895
|
]).describe("Schema for welcome screen properties including fields and translations");
|
|
785
896
|
var endScreenPropertiesSchema = z8.discriminatedUnion("isEnabled", [
|
|
@@ -787,13 +898,13 @@ var endScreenPropertiesSchema = z8.discriminatedUnion("isEnabled", [
|
|
|
787
898
|
z8.object({
|
|
788
899
|
isEnabled: z8.literal(false).describe("Whether end screen is enabled"),
|
|
789
900
|
endFields: EndScreenFieldsSchema.optional().describe("End screen configuration fields including title, message, button label, and dismissal behavior"),
|
|
790
|
-
translations: EndFieldsTranslationSchema.optional().describe("Translations for end screen content")
|
|
901
|
+
translations: z8.record(z8.string(), EndFieldsTranslationSchema).optional().describe("Translations for end screen content keyed by language code")
|
|
791
902
|
}),
|
|
792
903
|
// When end screen is enabled
|
|
793
904
|
z8.object({
|
|
794
905
|
isEnabled: z8.literal(true).describe("Whether end screen is enabled"),
|
|
795
906
|
endFields: EndScreenFieldsSchema.describe("End screen configuration fields including title, message, button label, and dismissal behavior"),
|
|
796
|
-
translations: EndFieldsTranslationSchema.describe("Translations for end screen content")
|
|
907
|
+
translations: z8.record(z8.string(), EndFieldsTranslationSchema).describe("Translations for end screen content keyed by language code")
|
|
797
908
|
})
|
|
798
909
|
]).describe("Schema for end screen properties including fields and translations");
|
|
799
910
|
var appearancePropertiesSchema = z8.object({
|
|
@@ -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,
|