@encatch/schema 1.0.1-beta.0 → 1.0.1-beta.1
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 +279 -5
- package/dist/esm/index.js.map +3 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/schemas/api/fetch-feedback-schema.d.ts +986 -147
- package/dist/types/schemas/api/submit-feedback-schema.d.ts +24 -0
- package/dist/types/schemas/fields/answer-schema.d.ts +8 -0
- package/dist/types/schemas/fields/app-props-schema.d.ts +466 -1
- package/dist/types/schemas/fields/field-schema.d.ts +1074 -152
- package/dist/types/schemas/fields/form-properties-schema.d.ts +473 -1
- package/dist/types/schemas/fields/theme-schema.d.ts +25 -0
- package/dist/types/schemas/fields/translations-schema.d.ts +263 -4
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -11,7 +11,14 @@ var questionTypeSchema = z.enum([
|
|
|
11
11
|
"multiple_choice_multiple",
|
|
12
12
|
"short_answer",
|
|
13
13
|
"long_text",
|
|
14
|
-
"annotation"
|
|
14
|
+
"annotation",
|
|
15
|
+
"welcome",
|
|
16
|
+
"thank_you",
|
|
17
|
+
"message_panel",
|
|
18
|
+
"yes_no",
|
|
19
|
+
"rating_matrix",
|
|
20
|
+
"matrix_single_choice",
|
|
21
|
+
"matrix_multiple_choice"
|
|
15
22
|
]).describe("Enumeration of all supported question types for form fields");
|
|
16
23
|
var QuestionTypes = {
|
|
17
24
|
RATING: "rating",
|
|
@@ -21,7 +28,14 @@ var QuestionTypes = {
|
|
|
21
28
|
MULTIPLE_CHOICE_MULTIPLE: "multiple_choice_multiple",
|
|
22
29
|
SHORT_ANSWER: "short_answer",
|
|
23
30
|
LONG_TEXT: "long_text",
|
|
24
|
-
ANNOTATION: "annotation"
|
|
31
|
+
ANNOTATION: "annotation",
|
|
32
|
+
WELCOME: "welcome",
|
|
33
|
+
THANK_YOU: "thank_you",
|
|
34
|
+
MESSAGE_PANEL: "message_panel",
|
|
35
|
+
YES_NO: "yes_no",
|
|
36
|
+
RATING_MATRIX: "rating_matrix",
|
|
37
|
+
MATRIX_SINGLE_CHOICE: "matrix_single_choice",
|
|
38
|
+
MATRIX_MULTIPLE_CHOICE: "matrix_multiple_choice"
|
|
25
39
|
};
|
|
26
40
|
var validationRuleTypeSchema = z.enum([
|
|
27
41
|
"required",
|
|
@@ -139,6 +153,11 @@ var MultipleChoiceMultipleDisplayStyles = {
|
|
|
139
153
|
LIST: "list",
|
|
140
154
|
CHIP: "chip"
|
|
141
155
|
};
|
|
156
|
+
var yesNoDisplayStyleSchema = z.enum(["horizontal", "vertical"]);
|
|
157
|
+
var YesNoDisplayStyles = {
|
|
158
|
+
HORIZONTAL: "horizontal",
|
|
159
|
+
VERTICAL: "vertical"
|
|
160
|
+
};
|
|
142
161
|
var choiceOrderOptionSchema = z.enum([
|
|
143
162
|
"randomize",
|
|
144
163
|
"flip",
|
|
@@ -191,6 +210,133 @@ var annotationQuestionSchema = questionSchema.extend({
|
|
|
191
210
|
}).describe(
|
|
192
211
|
"Schema for annotation questions that provide additional context or instructions"
|
|
193
212
|
);
|
|
213
|
+
var welcomeQuestionSchema = questionSchema.extend({
|
|
214
|
+
type: z.literal("welcome").describe("Must be exactly 'welcome'"),
|
|
215
|
+
title: z.string().min(1).max(200).describe("The main heading displayed on the welcome screen"),
|
|
216
|
+
description: z.string().max(1e3).optional().describe("Optional sub-text body shown below the heading"),
|
|
217
|
+
buttonLabel: z.string().min(1).max(50).optional().describe("Label for the proceed/start button (e.g. 'Get Started', 'Begin')"),
|
|
218
|
+
imageUrl: z.string().url().optional().describe("Optional image URL displayed on the welcome screen")
|
|
219
|
+
}).describe("Schema for a welcome screen displayed at the start or inline within a form");
|
|
220
|
+
var thankYouQuestionSchema = questionSchema.extend({
|
|
221
|
+
type: z.literal("thank_you").describe("Must be exactly 'thank_you'"),
|
|
222
|
+
title: z.string().min(1).max(200).describe("The main heading displayed on the thank you screen"),
|
|
223
|
+
description: z.string().max(1e3).optional().describe(
|
|
224
|
+
"Optional thank you body text (plain); use descriptionMarkdown for rich content"
|
|
225
|
+
),
|
|
226
|
+
buttonLabel: z.string().min(1).max(50).optional().describe("Label for the dismiss/done button (e.g. 'Done', 'Close')"),
|
|
227
|
+
imageUrl: z.string().url().optional().describe("Optional image URL displayed on the thank you screen")
|
|
228
|
+
}).describe(
|
|
229
|
+
"Schema for a thank you screen shown at the end or inline within a form; use descriptionMarkdown from the base question for rich copy"
|
|
230
|
+
);
|
|
231
|
+
var messagePanelQuestionSchema = questionSchema.extend({
|
|
232
|
+
type: z.literal("message_panel").describe("Must be exactly 'message_panel'"),
|
|
233
|
+
title: z.string().min(1).max(200).describe("The main heading displayed on the message panel"),
|
|
234
|
+
description: z.string().max(1e3).optional().describe("Optional body text shown below the heading"),
|
|
235
|
+
buttonLabel: z.string().min(1).max(50).optional().describe("Label for the continue button (e.g. 'Continue', 'Next')"),
|
|
236
|
+
imageUrl: z.string().url().optional().describe("Optional image URL displayed on the message panel")
|
|
237
|
+
}).describe(
|
|
238
|
+
"Schema for an inline message panel (informational); distinct from welcome for UI semantics and analytics"
|
|
239
|
+
);
|
|
240
|
+
var yesNoQuestionSchema = questionSchema.extend({
|
|
241
|
+
type: z.literal("yes_no").describe("Must be exactly 'yes_no'"),
|
|
242
|
+
yesLabel: z.string().min(1).max(50).optional().describe("Label for the Yes option (defaults to 'Yes' in the UI if omitted)"),
|
|
243
|
+
noLabel: z.string().min(1).max(50).optional().describe("Label for the No option (defaults to 'No' in the UI if omitted)"),
|
|
244
|
+
displayStyle: yesNoDisplayStyleSchema.optional().describe("Layout for the Yes/No controls (horizontal row or vertical stack)")
|
|
245
|
+
}).describe("Schema for yes/no questions with optional custom labels and layout");
|
|
246
|
+
var ratingMatrixDisplayStyleSchema = z.enum([
|
|
247
|
+
"radio",
|
|
248
|
+
"star",
|
|
249
|
+
"emoji",
|
|
250
|
+
"button"
|
|
251
|
+
]);
|
|
252
|
+
var RatingMatrixDisplayStyles = {
|
|
253
|
+
RADIO: "radio",
|
|
254
|
+
STAR: "star",
|
|
255
|
+
EMOJI: "emoji",
|
|
256
|
+
BUTTON: "button"
|
|
257
|
+
};
|
|
258
|
+
var ratingMatrixStatementSchema = z.object({
|
|
259
|
+
id: z.string().describe("Unique identifier for this statement (system time milliseconds)"),
|
|
260
|
+
value: z.string().min(1).max(100).describe("Internal value / export key for this statement"),
|
|
261
|
+
label: z.string().min(1).max(200).describe("Display text shown to users for this statement"),
|
|
262
|
+
describe: z.string().max(500).optional().describe("LLM tool call description for this statement")
|
|
263
|
+
}).describe("Schema for an individual statement (row) in a rating matrix");
|
|
264
|
+
var ratingMatrixScalePointSchema = z.object({
|
|
265
|
+
id: z.string().describe("Unique identifier for this scale point"),
|
|
266
|
+
value: z.union([z.number(), z.string()]).describe("Stored response value for this scale point (number or string)"),
|
|
267
|
+
label: z.string().min(1).max(200).describe("Display label shown for this scale point"),
|
|
268
|
+
describe: z.string().max(500).optional().describe("LLM tool call description for this scale point")
|
|
269
|
+
}).describe("Schema for a single point on a custom rating scale");
|
|
270
|
+
var ratingMatrixScaleSchema = z.discriminatedUnion("kind", [
|
|
271
|
+
// Likert: symmetric ordinal scale -2…+2, implicit 5 points
|
|
272
|
+
z.object({
|
|
273
|
+
kind: z.literal("likert").describe("Symmetric ordinal scale (-2 to +2)"),
|
|
274
|
+
minLabel: z.string().max(100).optional().describe("Optional label for the negative end of the Likert scale"),
|
|
275
|
+
maxLabel: z.string().max(100).optional().describe("Optional label for the positive end of the Likert scale")
|
|
276
|
+
}),
|
|
277
|
+
// Numerical: 1…N points where N is 2, 3, 4, or 5
|
|
278
|
+
z.object({
|
|
279
|
+
kind: z.literal("numerical").describe("Numerical scale from 1 to N (N = 2-5)"),
|
|
280
|
+
pointCount: z.union([z.literal(2), z.literal(3), z.literal(4), z.literal(5)]).describe("Number of scale points (2, 3, 4, or 5)"),
|
|
281
|
+
minLabel: z.string().max(100).optional().describe("Optional label for the lowest numerical value"),
|
|
282
|
+
maxLabel: z.string().max(100).optional().describe("Optional label for the highest numerical value")
|
|
283
|
+
}),
|
|
284
|
+
// Custom: consumer defines each point's value and label
|
|
285
|
+
z.object({
|
|
286
|
+
kind: z.literal("custom").describe("Custom scale with user-defined points and values"),
|
|
287
|
+
scalePoints: z.array(ratingMatrixScalePointSchema).min(2).max(5).describe("User-defined scale points (2-5 points)")
|
|
288
|
+
})
|
|
289
|
+
]).describe("Scale configuration for rating matrix questions");
|
|
290
|
+
var ratingMatrixQuestionSchema = questionSchema.extend({
|
|
291
|
+
type: z.literal("rating_matrix").describe("Must be exactly 'rating_matrix'"),
|
|
292
|
+
statements: z.array(ratingMatrixStatementSchema).min(1).max(10).describe("Statements (rows) users will rate on the shared scale (1-10)"),
|
|
293
|
+
scale: ratingMatrixScaleSchema.describe("Scale configuration shared across all statement rows"),
|
|
294
|
+
displayStyle: ratingMatrixDisplayStyleSchema.optional().describe(
|
|
295
|
+
"Visual representation of scale points per row (radio buttons, stars, emoji, or buttons)"
|
|
296
|
+
),
|
|
297
|
+
randomizeStatements: z.boolean().optional().default(false).describe("Whether to randomize the order of statements")
|
|
298
|
+
}).describe("Schema for rating matrix questions with multiple statements on a shared scale");
|
|
299
|
+
var matrixRowSchema = z.object({
|
|
300
|
+
id: z.string().describe("Unique identifier for this row (system time milliseconds)"),
|
|
301
|
+
value: z.string().min(1).max(100).describe("Internal value / export key for this row"),
|
|
302
|
+
label: z.string().min(1).max(200).describe("Display text shown to users for this row"),
|
|
303
|
+
describe: z.string().max(500).optional().describe("LLM tool call description for this row")
|
|
304
|
+
}).describe("Schema for an individual row in a matrix choice question");
|
|
305
|
+
var matrixColumnSchema = z.object({
|
|
306
|
+
id: z.string().describe("Unique identifier for this column (system time milliseconds)"),
|
|
307
|
+
value: z.string().min(1).max(100).describe("Internal value / export key for this column"),
|
|
308
|
+
label: z.string().min(1).max(200).describe("Display label shown for this column"),
|
|
309
|
+
describe: z.string().max(500).optional().describe("LLM tool call description for this column")
|
|
310
|
+
}).describe("Schema for an individual column in a matrix choice question");
|
|
311
|
+
var matrixSingleChoiceQuestionSchema = questionSchema.extend({
|
|
312
|
+
type: z.literal("matrix_single_choice").describe("Must be exactly 'matrix_single_choice'"),
|
|
313
|
+
rows: z.array(matrixRowSchema).min(1).max(20).describe("Row items (1-20 rows)"),
|
|
314
|
+
columns: z.array(matrixColumnSchema).min(2).max(10).describe("Column options shared across all rows (2-10 columns)"),
|
|
315
|
+
randomizeRows: z.boolean().optional().default(false).describe("Whether to randomize the order of rows"),
|
|
316
|
+
randomizeColumns: z.boolean().optional().default(false).describe("Whether to randomize the order of columns")
|
|
317
|
+
}).describe("Schema for matrix single-choice questions where one column is selected per row");
|
|
318
|
+
var matrixMultipleChoiceQuestionSchema = questionSchema.extend({
|
|
319
|
+
type: z.literal("matrix_multiple_choice").describe("Must be exactly 'matrix_multiple_choice'"),
|
|
320
|
+
rows: z.array(matrixRowSchema).min(1).max(20).describe("Row items (1-20 rows)"),
|
|
321
|
+
columns: z.array(matrixColumnSchema).min(2).max(10).describe("Column options shared across all rows (2-10 columns)"),
|
|
322
|
+
minSelectionsPerRow: z.number().int().min(0).optional().describe("Minimum number of columns a user must select per row"),
|
|
323
|
+
maxSelectionsPerRow: z.number().int().min(1).optional().describe("Maximum number of columns a user can select per row"),
|
|
324
|
+
randomizeRows: z.boolean().optional().default(false).describe("Whether to randomize the order of rows"),
|
|
325
|
+
randomizeColumns: z.boolean().optional().default(false).describe("Whether to randomize the order of columns")
|
|
326
|
+
}).refine(
|
|
327
|
+
(data) => {
|
|
328
|
+
if (data.minSelectionsPerRow !== void 0 && data.maxSelectionsPerRow !== void 0) {
|
|
329
|
+
return data.minSelectionsPerRow <= data.maxSelectionsPerRow;
|
|
330
|
+
}
|
|
331
|
+
return true;
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
message: "minSelectionsPerRow cannot be greater than maxSelectionsPerRow",
|
|
335
|
+
path: ["minSelectionsPerRow"]
|
|
336
|
+
}
|
|
337
|
+
).describe(
|
|
338
|
+
"Schema for matrix multiple-choice questions where one or more columns can be selected per row"
|
|
339
|
+
);
|
|
194
340
|
var questionOptionSchema = z.object({
|
|
195
341
|
id: z.string().describe("Unique identifier for this option (system time milliseconds)"),
|
|
196
342
|
value: z.string().min(1).max(100).describe("The internal value used for this option"),
|
|
@@ -392,6 +538,13 @@ var nestedDropdownQuestionSchema = questionSchema.extend({
|
|
|
392
538
|
var combinedQuestionSchema = z.discriminatedUnion("type", [
|
|
393
539
|
ratingQuestionSchema,
|
|
394
540
|
annotationQuestionSchema,
|
|
541
|
+
welcomeQuestionSchema,
|
|
542
|
+
thankYouQuestionSchema,
|
|
543
|
+
messagePanelQuestionSchema,
|
|
544
|
+
yesNoQuestionSchema,
|
|
545
|
+
ratingMatrixQuestionSchema,
|
|
546
|
+
matrixSingleChoiceQuestionSchema,
|
|
547
|
+
matrixMultipleChoiceQuestionSchema,
|
|
395
548
|
multipleChoiceSingleQuestionSchema,
|
|
396
549
|
multipleChoiceMultipleQuestionSchema,
|
|
397
550
|
npsQuestionSchema,
|
|
@@ -421,6 +574,7 @@ var AnswerItemSchema = z2.object({
|
|
|
421
574
|
"single selected option ID (for single choice questions)"
|
|
422
575
|
),
|
|
423
576
|
rating: z2.number().optional().describe("Star rating value (e.g., 1-5)"),
|
|
577
|
+
yesNo: z2.boolean().optional().describe("Yes/no answer for yes_no questions (true = Yes, false = No)"),
|
|
424
578
|
multipleChoiceMultiple: z2.array(z2.string()).optional().describe("Array of selected option IDs for multiple choice questions"),
|
|
425
579
|
singleChoiceOther: z2.string().optional().describe(
|
|
426
580
|
'Free-text "other" answer for single choice questions when allowOther is enabled'
|
|
@@ -431,6 +585,15 @@ var AnswerItemSchema = z2.object({
|
|
|
431
585
|
annotation: AnnotationSchema.optional().describe(
|
|
432
586
|
"Annotation object containing file and marker details"
|
|
433
587
|
),
|
|
588
|
+
ratingMatrix: z2.record(z2.string(), z2.union([z2.number(), z2.string()])).optional().describe(
|
|
589
|
+
"Rating matrix answers keyed by statement id, value is the selected scale value (number for likert/numerical, string for custom)"
|
|
590
|
+
),
|
|
591
|
+
matrixSingleChoice: z2.record(z2.string(), z2.string()).optional().describe(
|
|
592
|
+
"Matrix single-choice answers keyed by row id, value is the selected column option id"
|
|
593
|
+
),
|
|
594
|
+
matrixMultipleChoice: z2.record(z2.string(), z2.array(z2.string())).optional().describe(
|
|
595
|
+
"Matrix multiple-choice answers keyed by row id, value is array of selected column option ids"
|
|
596
|
+
),
|
|
434
597
|
others: z2.string().optional().describe(
|
|
435
598
|
"For multiple choice questions and single choice questions, this is the value of the other option"
|
|
436
599
|
)
|
|
@@ -636,6 +799,80 @@ var annotationQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.ex
|
|
|
636
799
|
annotationText: translationEntrySchema.optional().describe("Annotation display text translation"),
|
|
637
800
|
noAnnotationText: translationEntrySchema.optional().describe("No annotation display text translation")
|
|
638
801
|
}).describe("Translation schema for annotation questions");
|
|
802
|
+
var welcomeQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
803
|
+
type: z4.literal("welcome").describe("Question type identifier"),
|
|
804
|
+
buttonLabel: translationEntrySchema.optional().describe("Translated proceed/start button label")
|
|
805
|
+
}).describe("Translation schema for welcome screen questions");
|
|
806
|
+
var thankYouQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
807
|
+
type: z4.literal("thank_you").describe("Question type identifier"),
|
|
808
|
+
buttonLabel: translationEntrySchema.optional().describe(
|
|
809
|
+
"Translated dismiss/done button label"
|
|
810
|
+
)
|
|
811
|
+
}).describe("Translation schema for thank you screen questions");
|
|
812
|
+
var messagePanelQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
813
|
+
type: z4.literal("message_panel").describe("Question type identifier"),
|
|
814
|
+
buttonLabel: translationEntrySchema.optional().describe(
|
|
815
|
+
"Translated continue/button label"
|
|
816
|
+
)
|
|
817
|
+
}).describe("Translation schema for message panel questions");
|
|
818
|
+
var yesNoQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
819
|
+
type: z4.literal("yes_no").describe("Question type identifier"),
|
|
820
|
+
yesLabel: translationEntrySchema.optional().describe("Translated Yes label"),
|
|
821
|
+
noLabel: translationEntrySchema.optional().describe("Translated No label")
|
|
822
|
+
}).describe("Translation schema for yes/no questions");
|
|
823
|
+
var ratingMatrixQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
824
|
+
type: z4.literal("rating_matrix").describe("Question type identifier"),
|
|
825
|
+
minLabel: translationEntrySchema.optional().describe(
|
|
826
|
+
"Translated scale minimum end label (for likert and numerical kinds)"
|
|
827
|
+
),
|
|
828
|
+
maxLabel: translationEntrySchema.optional().describe(
|
|
829
|
+
"Translated scale maximum end label (for likert and numerical kinds)"
|
|
830
|
+
)
|
|
831
|
+
}).catchall(translationEntrySchema).refine(
|
|
832
|
+
(data) => {
|
|
833
|
+
const additionalKeys = Object.keys(data).filter(
|
|
834
|
+
(key) => ![...BASE_QUESTION_TRANSLATION_KEYS, "minLabel", "maxLabel"].includes(
|
|
835
|
+
key
|
|
836
|
+
)
|
|
837
|
+
);
|
|
838
|
+
return additionalKeys.every(
|
|
839
|
+
(key) => /^statement\..+\.label$/.test(key) || /^scalePoint\..+\.label$/.test(key)
|
|
840
|
+
);
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
message: "Additional keys must follow 'statement.{id}.label' or 'scalePoint.{id}.label'"
|
|
844
|
+
}
|
|
845
|
+
).describe("Translation schema for rating matrix questions");
|
|
846
|
+
var matrixSingleChoiceQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
847
|
+
type: z4.literal("matrix_single_choice").describe("Question type identifier")
|
|
848
|
+
}).catchall(translationEntrySchema).refine(
|
|
849
|
+
(data) => {
|
|
850
|
+
const additionalKeys = Object.keys(data).filter(
|
|
851
|
+
(key) => !BASE_QUESTION_TRANSLATION_KEYS.includes(key)
|
|
852
|
+
);
|
|
853
|
+
return additionalKeys.every(
|
|
854
|
+
(key) => /^row\..+\.label$/.test(key) || /^column\..+\.label$/.test(key)
|
|
855
|
+
);
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
message: "Additional keys must follow 'row.{id}.label' or 'column.{id}.label'"
|
|
859
|
+
}
|
|
860
|
+
).describe("Translation schema for matrix single-choice questions");
|
|
861
|
+
var matrixMultipleChoiceQuestionTranslationSchema = baseQuestionTranslationFieldsSchema.extend({
|
|
862
|
+
type: z4.literal("matrix_multiple_choice").describe("Question type identifier")
|
|
863
|
+
}).catchall(translationEntrySchema).refine(
|
|
864
|
+
(data) => {
|
|
865
|
+
const additionalKeys = Object.keys(data).filter(
|
|
866
|
+
(key) => !BASE_QUESTION_TRANSLATION_KEYS.includes(key)
|
|
867
|
+
);
|
|
868
|
+
return additionalKeys.every(
|
|
869
|
+
(key) => /^row\..+\.label$/.test(key) || /^column\..+\.label$/.test(key)
|
|
870
|
+
);
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
message: "Additional keys must follow 'row.{id}.label' or 'column.{id}.label'"
|
|
874
|
+
}
|
|
875
|
+
).describe("Translation schema for matrix multiple-choice questions");
|
|
639
876
|
var questionTranslationSchema = z4.union([
|
|
640
877
|
ratingQuestionTranslationSchema,
|
|
641
878
|
singleChoiceQuestionTranslationSchema,
|
|
@@ -644,7 +881,14 @@ var questionTranslationSchema = z4.union([
|
|
|
644
881
|
shortAnswerQuestionTranslationSchema,
|
|
645
882
|
longAnswerQuestionTranslationSchema,
|
|
646
883
|
nestedSelectionQuestionTranslationSchema,
|
|
647
|
-
annotationQuestionTranslationSchema
|
|
884
|
+
annotationQuestionTranslationSchema,
|
|
885
|
+
welcomeQuestionTranslationSchema,
|
|
886
|
+
thankYouQuestionTranslationSchema,
|
|
887
|
+
messagePanelQuestionTranslationSchema,
|
|
888
|
+
yesNoQuestionTranslationSchema,
|
|
889
|
+
ratingMatrixQuestionTranslationSchema,
|
|
890
|
+
matrixSingleChoiceQuestionTranslationSchema,
|
|
891
|
+
matrixMultipleChoiceQuestionTranslationSchema
|
|
648
892
|
]).describe("Union of all question type translation schemas");
|
|
649
893
|
var languageCodeSchema = z4.string().min(2).max(10).describe("Language code (e.g., 'en', 'es', 'hi')");
|
|
650
894
|
var questionTranslationsByLanguageSchema = z4.record(languageCodeSchema, questionTranslationSchema).describe("Question translations keyed by language code");
|
|
@@ -834,6 +1078,7 @@ var ShareableModes = {
|
|
|
834
1078
|
DARK: "dark",
|
|
835
1079
|
SYSTEM: "system"
|
|
836
1080
|
};
|
|
1081
|
+
var previousButtonModeSchema = z6.enum(["never", "always", "auto"]).describe("Previous button visibility mode: never, always, or auto");
|
|
837
1082
|
var featureSettingsSchema = z6.object({
|
|
838
1083
|
darkOverlay: z6.boolean().describe("Whether to show a dark overlay behind the widget"),
|
|
839
1084
|
closeButton: z6.boolean().describe("Whether to display a close button on the widget"),
|
|
@@ -844,7 +1089,10 @@ var featureSettingsSchema = z6.object({
|
|
|
844
1089
|
customCss: z6.string().optional().describe("Custom CSS link to apply for the feedback form"),
|
|
845
1090
|
shareableMode: shareableModeSchema.optional().describe(
|
|
846
1091
|
"Display mode for the shareable: light, dark, or system preference"
|
|
847
|
-
)
|
|
1092
|
+
),
|
|
1093
|
+
allowMultipleQuestionsPerSection: z6.boolean().describe("Whether to allow multiple questions per section"),
|
|
1094
|
+
rtl: z6.boolean().describe("Whether right-to-left text direction is enabled"),
|
|
1095
|
+
previousButton: previousButtonModeSchema.describe("Previous button visibility mode: never, always, or auto")
|
|
848
1096
|
}).describe("Feature settings controlling widget UI behavior and appearance");
|
|
849
1097
|
var themeColorsSchema = z6.object({
|
|
850
1098
|
theme: z6.string().optional().describe("Theme for a single mode (shadcn variables JSON)")
|
|
@@ -1133,7 +1381,10 @@ var feedbackConfigurationItemSchema = z12.object({
|
|
|
1133
1381
|
showBranding: z12.boolean().describe("Whether to show branding"),
|
|
1134
1382
|
customPosition: z12.boolean().describe("Whether custom position is enabled"),
|
|
1135
1383
|
customIconPosition: z12.boolean().describe("Whether custom icon position is enabled"),
|
|
1136
|
-
customCss: z12.string().nullable().optional().describe("Custom CSS link (optional)")
|
|
1384
|
+
customCss: z12.string().nullable().optional().describe("Custom CSS link (optional)"),
|
|
1385
|
+
allowMultipleQuestionsPerSection: z12.boolean().describe("Whether to allow multiple questions per section"),
|
|
1386
|
+
rtl: z12.boolean().describe("Whether right-to-left text direction is enabled"),
|
|
1387
|
+
previousButton: z12.enum(["never", "always", "auto"]).describe("Previous button visibility mode: never, always, or auto")
|
|
1137
1388
|
}).describe("Feature settings for the feedback form"),
|
|
1138
1389
|
selectedIconPosition: z12.string().describe("Selected position for the feedback icon"),
|
|
1139
1390
|
selectedPosition: z12.string().describe("Selected position for the feedback form")
|
|
@@ -1359,6 +1610,7 @@ export {
|
|
|
1359
1610
|
QuestionStatuses,
|
|
1360
1611
|
QuestionTypes,
|
|
1361
1612
|
RatingDisplayStyles,
|
|
1613
|
+
RatingMatrixDisplayStyles,
|
|
1362
1614
|
RatingRepresentationSizes,
|
|
1363
1615
|
RecurringUnits,
|
|
1364
1616
|
ShareableModes,
|
|
@@ -1369,6 +1621,7 @@ export {
|
|
|
1369
1621
|
VisibilityConditionOperators,
|
|
1370
1622
|
WelcomeFieldsTranslationSchema,
|
|
1371
1623
|
WelcomeScreenFieldsSchema,
|
|
1624
|
+
YesNoDisplayStyles,
|
|
1372
1625
|
YesNoValues,
|
|
1373
1626
|
annotationQuestionSchema,
|
|
1374
1627
|
annotationQuestionTranslationSchema,
|
|
@@ -1411,6 +1664,14 @@ export {
|
|
|
1411
1664
|
longAnswerQuestionTranslationSchema,
|
|
1412
1665
|
masterPropertiesSchema,
|
|
1413
1666
|
matchedTriggerPropertiesSchema,
|
|
1667
|
+
matrixColumnSchema,
|
|
1668
|
+
matrixMultipleChoiceQuestionSchema,
|
|
1669
|
+
matrixMultipleChoiceQuestionTranslationSchema,
|
|
1670
|
+
matrixRowSchema,
|
|
1671
|
+
matrixSingleChoiceQuestionSchema,
|
|
1672
|
+
matrixSingleChoiceQuestionTranslationSchema,
|
|
1673
|
+
messagePanelQuestionSchema,
|
|
1674
|
+
messagePanelQuestionTranslationSchema,
|
|
1414
1675
|
multipleChoiceDisplayStyleSchema,
|
|
1415
1676
|
multipleChoiceMultipleDisplayStyleSchema,
|
|
1416
1677
|
multipleChoiceMultipleQuestionSchema,
|
|
@@ -1438,6 +1699,12 @@ export {
|
|
|
1438
1699
|
questionTypeSchema,
|
|
1439
1700
|
questionnaireFieldsResponseSchema,
|
|
1440
1701
|
ratingDisplayStyleSchema,
|
|
1702
|
+
ratingMatrixDisplayStyleSchema,
|
|
1703
|
+
ratingMatrixQuestionSchema,
|
|
1704
|
+
ratingMatrixQuestionTranslationSchema,
|
|
1705
|
+
ratingMatrixScalePointSchema,
|
|
1706
|
+
ratingMatrixScaleSchema,
|
|
1707
|
+
ratingMatrixStatementSchema,
|
|
1441
1708
|
ratingQuestionSchema,
|
|
1442
1709
|
ratingQuestionTranslationSchema,
|
|
1443
1710
|
ratingRepresentationSizeSchema,
|
|
@@ -1454,6 +1721,8 @@ export {
|
|
|
1454
1721
|
singleChoiceQuestionTranslationSchema,
|
|
1455
1722
|
submitFeedbackSchema,
|
|
1456
1723
|
surveyTypeSchema,
|
|
1724
|
+
thankYouQuestionSchema,
|
|
1725
|
+
thankYouQuestionTranslationSchema,
|
|
1457
1726
|
themeColorsSchema,
|
|
1458
1727
|
themeConfigurationSchema,
|
|
1459
1728
|
themeModeSchema,
|
|
@@ -1469,8 +1738,13 @@ export {
|
|
|
1469
1738
|
validationRuleSchema,
|
|
1470
1739
|
validationRuleTypeSchema,
|
|
1471
1740
|
visibilityConditionSchema,
|
|
1741
|
+
welcomeQuestionSchema,
|
|
1742
|
+
welcomeQuestionTranslationSchema,
|
|
1472
1743
|
welcomeScreenPropertiesSchema,
|
|
1473
1744
|
whoSchema,
|
|
1745
|
+
yesNoDisplayStyleSchema,
|
|
1746
|
+
yesNoQuestionSchema,
|
|
1747
|
+
yesNoQuestionTranslationSchema,
|
|
1474
1748
|
yesNoSchema,
|
|
1475
1749
|
z15 as z
|
|
1476
1750
|
};
|