@dmptool/types 2.1.0 → 2.2.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 (121) hide show
  1. package/README.md +70 -1
  2. package/dist/answers/__tests__/defaults.spec.js +80 -21
  3. package/dist/answers/answer.d.ts +2 -0
  4. package/dist/answers/answer.js +4 -2
  5. package/dist/answers/dateAnswers.d.ts +4 -0
  6. package/dist/answers/graphQLAnswers.d.ts +8 -0
  7. package/dist/answers/index.d.ts +37 -0
  8. package/dist/answers/numberAnswers.d.ts +8 -0
  9. package/dist/answers/optionBasedAnswers.d.ts +10 -0
  10. package/dist/answers/tableAnswers.d.ts +94 -0
  11. package/dist/answers/textAnswers.d.ts +8 -0
  12. package/dist/dmp/extension.d.ts +111 -0
  13. package/dist/dmp/index.js +48 -2
  14. package/dist/questions/__tests__/defaults.spec.js +2 -2
  15. package/dist/questions/__tests__/optionBasedQuestions.spec.js +8 -4
  16. package/dist/questions/dateQuestions.d.ts +4 -0
  17. package/dist/questions/dateQuestions.js +2 -2
  18. package/dist/questions/index.d.ts +28 -0
  19. package/dist/questions/numberQuestions.d.ts +8 -0
  20. package/dist/questions/numberQuestions.js +4 -4
  21. package/dist/questions/optionBasedQuestions.d.ts +10 -0
  22. package/dist/questions/optionBasedQuestions.js +5 -5
  23. package/dist/questions/tableQuestions.d.ts +70 -0
  24. package/dist/questions/textQuestions.d.ts +4 -0
  25. package/dist/questions/textQuestions.js +2 -2
  26. package/dist/schemas/affiliationSearchAnswer.schema.json +3 -0
  27. package/dist/schemas/anyAnswer.schema.json +111 -0
  28. package/dist/schemas/anyQuestion.schema.json +84 -0
  29. package/dist/schemas/anyTableColumnAnswer.schema.json +54 -0
  30. package/dist/schemas/anyTableColumnQuestion.schema.json +33 -0
  31. package/dist/schemas/booleanAnswer.schema.json +3 -0
  32. package/dist/schemas/booleanQuestion.schema.json +3 -0
  33. package/dist/schemas/checkboxesAnswer.schema.json +3 -0
  34. package/dist/schemas/checkboxesQuestion.schema.json +3 -0
  35. package/dist/schemas/currencyAnswer.schema.json +3 -0
  36. package/dist/schemas/currencyQuestion.schema.json +3 -0
  37. package/dist/schemas/dateAnswer.schema.json +3 -0
  38. package/dist/schemas/dateQuestion.schema.json +3 -0
  39. package/dist/schemas/dateRangeAnswer.schema.json +3 -0
  40. package/dist/schemas/dateRangeQuestion.schema.json +3 -0
  41. package/dist/schemas/dmpExtension.schema.json +111 -0
  42. package/dist/schemas/emailAnswer.schema.json +3 -0
  43. package/dist/schemas/emailQuestion.schema.json +3 -0
  44. package/dist/schemas/licenseSearchAnswer.schema.json +3 -0
  45. package/dist/schemas/metadataStandardSearchAnswer.schema.json +3 -0
  46. package/dist/schemas/multiselectBoxAnswer.schema.json +3 -0
  47. package/dist/schemas/multiselectBoxQuestion.schema.json +3 -0
  48. package/dist/schemas/numberAnswer.schema.json +3 -0
  49. package/dist/schemas/numberQuestion.schema.json +3 -0
  50. package/dist/schemas/numberRangeAnswer.schema.json +3 -0
  51. package/dist/schemas/numberRangeQuestion.schema.json +3 -0
  52. package/dist/schemas/numberWithContextAnswer.schema.json +3 -0
  53. package/dist/schemas/numberWithContextQuestion.schema.json +3 -0
  54. package/dist/schemas/radioButtonsAnswer.schema.json +3 -0
  55. package/dist/schemas/radioButtonsQuestion.schema.json +3 -0
  56. package/dist/schemas/repositorySearchAnswer.schema.json +3 -0
  57. package/dist/schemas/researchOutputTableAnswer.schema.json +3344 -9
  58. package/dist/schemas/selectBoxAnswer.schema.json +3 -0
  59. package/dist/schemas/selectBoxQuestion.schema.json +3 -0
  60. package/dist/schemas/tableAnswer.schema.json +57 -0
  61. package/dist/schemas/tableQuestion.schema.json +33 -0
  62. package/dist/schemas/textAnswer.schema.json +3 -0
  63. package/dist/schemas/textAreaAnswer.schema.json +3 -0
  64. package/dist/schemas/urlAnswer.schema.json +3 -0
  65. package/dist/schemas/urlQuestion.schema.json +3 -0
  66. package/package.json +9 -4
  67. package/schemas/.placeholder +0 -0
  68. package/schemas/affiliationSearchAnswer.schema.json +50 -0
  69. package/schemas/affiliationSearchQuestion.schema.json +142 -0
  70. package/schemas/anyAnswer.schema.json +1537 -0
  71. package/schemas/anyQuestion.schema.json +4828 -0
  72. package/schemas/anyTableColumnAnswer.schema.json +741 -0
  73. package/schemas/anyTableColumnQuestion.schema.json +1560 -0
  74. package/schemas/booleanAnswer.schema.json +36 -0
  75. package/schemas/booleanQuestion.schema.json +55 -0
  76. package/schemas/checkboxesAnswer.schema.json +41 -0
  77. package/schemas/checkboxesQuestion.schema.json +80 -0
  78. package/schemas/currencyAnswer.schema.json +36 -0
  79. package/schemas/currencyQuestion.schema.json +73 -0
  80. package/schemas/dateAnswer.schema.json +36 -0
  81. package/schemas/datePickerAnswer.schema.json +37 -0
  82. package/schemas/datePickerQuestion.schema.json +52 -0
  83. package/schemas/dateQuestion.schema.json +66 -0
  84. package/schemas/dateRangeAnswer.schema.json +50 -0
  85. package/schemas/dateRangeQuestion.schema.json +124 -0
  86. package/schemas/dmp.schema.json +2070 -0
  87. package/schemas/dmpExtension.schema.json +1985 -0
  88. package/schemas/emailAnswer.schema.json +36 -0
  89. package/schemas/emailQuestion.schema.json +71 -0
  90. package/schemas/filteredSearchAnswer.schema.json +40 -0
  91. package/schemas/filteredSearchQuestion.schema.json +130 -0
  92. package/schemas/licenseSearchAnswer.schema.json +54 -0
  93. package/schemas/licenseSearchQuestion.schema.json +140 -0
  94. package/schemas/metadataStandardSearchAnswer.schema.json +54 -0
  95. package/schemas/metadataStandardSearchQuestion.schema.json +141 -0
  96. package/schemas/multiselectBoxAnswer.schema.json +41 -0
  97. package/schemas/multiselectBoxQuestion.schema.json +87 -0
  98. package/schemas/numberAnswer.schema.json +36 -0
  99. package/schemas/numberQuestion.schema.json +68 -0
  100. package/schemas/numberRangeAnswer.schema.json +50 -0
  101. package/schemas/numberRangeQuestion.schema.json +128 -0
  102. package/schemas/numberWithContextAnswer.schema.json +50 -0
  103. package/schemas/numberWithContextQuestion.schema.json +98 -0
  104. package/schemas/radioButtonsAnswer.schema.json +36 -0
  105. package/schemas/radioButtonsQuestion.schema.json +80 -0
  106. package/schemas/repositorySearchAnswer.schema.json +54 -0
  107. package/schemas/repositorySearchQuestion.schema.json +140 -0
  108. package/schemas/researchOutputTableAnswer.schema.json +20065 -0
  109. package/schemas/researchOutputTableQuestion.schema.json +140 -0
  110. package/schemas/selectBoxAnswer.schema.json +36 -0
  111. package/schemas/selectBoxQuestion.schema.json +87 -0
  112. package/schemas/tableAnswer.schema.json +797 -0
  113. package/schemas/tableQuestion.schema.json +1662 -0
  114. package/schemas/textAnswer.schema.json +36 -0
  115. package/schemas/textAreaAnswer.schema.json +36 -0
  116. package/schemas/textAreaQuestion.schema.json +78 -0
  117. package/schemas/textQuestion.schema.json +63 -0
  118. package/schemas/typeaheadSearchAnswer.schema.json +37 -0
  119. package/schemas/typeaheadSearchQuestion.schema.json +120 -0
  120. package/schemas/urlAnswer.schema.json +36 -0
  121. package/schemas/urlQuestion.schema.json +66 -0
package/dist/dmp/index.js CHANGED
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ExtensionJSONSchema = exports.RDACommonStandardDMPJSONSchema = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
8
9
  const zod_1 = require("zod");
9
10
  const extension_1 = require("./extension");
10
11
  // The RDA Common Standard for DMPs JSON schema is automatically downloaded by
@@ -15,9 +16,54 @@ const extension_1 = require("./extension");
15
16
  // a Zod schema, but it is not there yet.
16
17
  //
17
18
  // Convert the downloaded JSON schema into types
18
- const RDA_COMMON_STANDARD_JSON_FILE = './schemas/dmp.schema.json';
19
+ // First try resolving via the package export (works when installed from GitHub branch or npm)
20
+ function resolveSchemaPath() {
21
+ // Try using Node's module resolution against the package export
22
+ try {
23
+ // require.resolve respects the "exports" map in package.json
24
+ const resolved = require.resolve("@dmptool/types/schemas/dmp.schema.json");
25
+ if (resolved && fs_1.default.existsSync(resolved)) {
26
+ return resolved;
27
+ }
28
+ // If require.resolve found a path but it doesn't exist, log it for debugging
29
+ console.warn(`[dmptool-types] require.resolve found path but it doesn't exist: ${resolved}`);
30
+ }
31
+ catch (_a) {
32
+ // ignore and fall back to local paths below
33
+ }
34
+ // Fallbacks based on local file structure when running from source or built dist
35
+ // This handles multiple installation scenarios:
36
+ // 1. npm/published package with dist/schemas
37
+ // 2. Source code with ts-node/ts-node-dev
38
+ // 3. GitHub branch installation where dist is gitignored but schemas/ is committed
39
+ const schemaCandidatePaths = [
40
+ // When running compiled code from dist: dist/dmp/index.js -> dist/schemas/dmp.schema.json
41
+ path_1.default.resolve(__dirname, "..", "schemas", "dmp.schema.json"),
42
+ // When running from source with ts-node: src/dmp/index.ts -> compiled as dist/dmp/index.js -> schemas/dmp.schema.json at repo root
43
+ path_1.default.resolve(__dirname, "..", "..", "schemas", "dmp.schema.json"),
44
+ // When installed as node_module from GitHub: node_modules/@dmptool/types/dist/dmp/index.js
45
+ // Go up to package root, then into schemas: dist/dmp -> dist -> package_root -> schemas
46
+ path_1.default.resolve(__dirname, "..", "..", "..", "schemas", "dmp.schema.json"),
47
+ ];
48
+ // Remove duplicates while preserving order
49
+ const uniquePaths = Array.from(new Set(schemaCandidatePaths));
50
+ return uniquePaths.find((candidate) => fs_1.default.existsSync(candidate));
51
+ }
52
+ const RDA_COMMON_STANDARD_JSON_FILE = resolveSchemaPath();
53
+ if (!RDA_COMMON_STANDARD_JSON_FILE) {
54
+ const attemptedPaths = [
55
+ path_1.default.resolve(__dirname, "..", "schemas", "dmp.schema.json"),
56
+ path_1.default.resolve(__dirname, "..", "..", "schemas", "dmp.schema.json"),
57
+ path_1.default.resolve(__dirname, "..", "..", "..", "schemas", "dmp.schema.json"),
58
+ ];
59
+ throw new Error(`Unable to locate dmp.schema.json. Current __dirname: ${__dirname}. Attempted paths: ${attemptedPaths.join(", ")}`);
60
+ }
61
+ // Double-check the file exists before trying to read it
62
+ if (!fs_1.default.existsSync(RDA_COMMON_STANDARD_JSON_FILE)) {
63
+ throw new Error(`Schema file path was resolved to ${RDA_COMMON_STANDARD_JSON_FILE} but the file does not exist. This may indicate an issue with the package installation or build process.`);
64
+ }
19
65
  // Ignoring ESLint here because it doesn't like that we're only using jsonSchema as a Type
20
66
  // but that's exactly what we want to do.
21
- const jsonSchema = JSON.parse(fs_1.default.readFileSync(RDA_COMMON_STANDARD_JSON_FILE, 'utf8'));
67
+ const jsonSchema = JSON.parse(fs_1.default.readFileSync(RDA_COMMON_STANDARD_JSON_FILE, "utf8"));
22
68
  exports.RDACommonStandardDMPJSONSchema = jsonSchema;
23
69
  exports.ExtensionJSONSchema = zod_1.z.toJSONSchema(extension_1.ExtensionSchema);
@@ -158,7 +158,7 @@ describe('questions return the expected defaults', () => {
158
158
  type: "OFFSET",
159
159
  name: "paginationOptions",
160
160
  label: "Pagination Options",
161
- labelTranslationKey: "PaginationOptions.label",
161
+ labelTranslationKey: "PaginationOptions.label"
162
162
  }
163
163
  ],
164
164
  responseField: "metadataStandards.items",
@@ -337,7 +337,7 @@ describe('questions return the expected defaults', () => {
337
337
  attributes: {
338
338
  step: 1
339
339
  },
340
- meta: { schemaVersion: "1.0" },
340
+ meta: { schemaVersion: "1.0" }
341
341
  }
342
342
  },
343
343
  {
@@ -63,7 +63,8 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
63
63
  ],
64
64
  meta: {
65
65
  schemaVersion: "1.0"
66
- }
66
+ },
67
+ showCommentField: false
67
68
  };
68
69
  (0, globals_1.expect)(() => optionBasedQuestions_1.CheckboxesQuestionSchema.parse(validCheckboxesQuestion)).not.toThrow();
69
70
  });
@@ -110,7 +111,8 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
110
111
  ],
111
112
  meta: {
112
113
  schemaVersion: "1.0"
113
- }
114
+ },
115
+ showCommentField: false
114
116
  };
115
117
  (0, globals_1.expect)(() => optionBasedQuestions_1.RadioButtonsQuestionSchema.parse(validRadioButtonsQuestion)).not.toThrow();
116
118
  });
@@ -154,7 +156,8 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
154
156
  ],
155
157
  meta: {
156
158
  schemaVersion: "1.0"
157
- }
159
+ },
160
+ showCommentField: false
158
161
  };
159
162
  (0, globals_1.expect)(() => optionBasedQuestions_1.SelectBoxQuestionSchema.parse(validSelectBoxQuestion)).not.toThrow();
160
163
  });
@@ -202,7 +205,8 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
202
205
  ],
203
206
  meta: {
204
207
  schemaVersion: "1.0"
205
- }
208
+ },
209
+ showCommentField: false
206
210
  };
207
211
  (0, globals_1.expect)(() => optionBasedQuestions_1.MultiselectBoxQuestionSchema.parse(validSelectBoxQuestion)).not.toThrow();
208
212
  });
@@ -9,6 +9,7 @@ export declare const DateQuestionSchema: z.ZodObject<{
9
9
  help: z.ZodOptional<z.ZodString>;
10
10
  labelTranslationKey: z.ZodOptional<z.ZodString>;
11
11
  }, z.core.$strip>;
12
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
12
13
  meta: z.ZodObject<{
13
14
  schemaVersion: z.ZodDefault<z.ZodString>;
14
15
  title: z.ZodOptional<z.ZodString>;
@@ -30,6 +31,7 @@ export declare const DefaultDateQuestion: {
30
31
  title?: string | undefined;
31
32
  usageDescription?: string | undefined;
32
33
  };
34
+ showCommentField?: boolean | undefined;
33
35
  };
34
36
  export declare const DateRangeQuestionSchema: z.ZodObject<{
35
37
  type: z.ZodLiteral<"dateRange">;
@@ -51,6 +53,7 @@ export declare const DateRangeQuestionSchema: z.ZodObject<{
51
53
  labelTranslationKey: z.ZodOptional<z.ZodString>;
52
54
  }, z.core.$strip>;
53
55
  }, z.core.$strip>;
56
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
54
57
  attributes: z.ZodObject<{
55
58
  label: z.ZodOptional<z.ZodString>;
56
59
  help: z.ZodOptional<z.ZodString>;
@@ -92,6 +95,7 @@ export declare const DefaultDateRangeQuestion: {
92
95
  title?: string | undefined;
93
96
  usageDescription?: string | undefined;
94
97
  };
98
+ showCommentField?: boolean | undefined;
95
99
  };
96
100
  export type DateQuestionType = z.infer<typeof DateQuestionSchema>;
97
101
  export type DateRangeQuestionType = z.infer<typeof DateRangeQuestionSchema>;
@@ -6,7 +6,7 @@ const question_1 = require("./question");
6
6
  const DateAttributesSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.BaseAttributesSchema.shape), { max: zod_1.z.string().optional(), min: zod_1.z.string().optional(), step: zod_1.z.number().default(1) }));
7
7
  const DefaultDateAttributes = DateAttributesSchema.parse({});
8
8
  // Date question and answer
9
- exports.DateQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('date'), attributes: DateAttributesSchema }));
9
+ exports.DateQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('date'), attributes: DateAttributesSchema, showCommentField: zod_1.z.boolean().optional() }));
10
10
  exports.DefaultDateQuestion = exports.DateQuestionSchema.parse({
11
11
  type: 'date',
12
12
  attributes: DefaultDateAttributes,
@@ -18,7 +18,7 @@ const DateRangeEndColumnSchema = zod_1.z.object(Object.assign(Object.assign({},
18
18
  exports.DateRangeQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('dateRange'), columns: zod_1.z.object({
19
19
  start: DateRangeStartColumnSchema,
20
20
  end: DateRangeEndColumnSchema,
21
- }) }));
21
+ }), showCommentField: zod_1.z.boolean().optional() }));
22
22
  exports.DefaultDateRangeQuestion = exports.DateRangeQuestionSchema.parse({
23
23
  type: 'dateRange',
24
24
  attributes: question_1.BaseAttributesSchema.parse({}),
@@ -51,6 +51,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
51
51
  label: z.ZodString;
52
52
  value: z.ZodDefault<z.ZodBoolean>;
53
53
  }, z.core.$strip>;
54
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
54
55
  meta: z.ZodObject<{
55
56
  schemaVersion: z.ZodDefault<z.ZodString>;
56
57
  title: z.ZodOptional<z.ZodString>;
@@ -63,6 +64,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
63
64
  label: z.ZodDefault<z.ZodString>;
64
65
  value: z.ZodDefault<z.ZodString>;
65
66
  }, z.core.$strip>>;
67
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
66
68
  attributes: z.ZodObject<{
67
69
  label: z.ZodOptional<z.ZodString>;
68
70
  help: z.ZodOptional<z.ZodString>;
@@ -84,6 +86,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
84
86
  help: z.ZodOptional<z.ZodString>;
85
87
  labelTranslationKey: z.ZodOptional<z.ZodString>;
86
88
  }, z.core.$strip>;
89
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
87
90
  meta: z.ZodObject<{
88
91
  schemaVersion: z.ZodDefault<z.ZodString>;
89
92
  title: z.ZodOptional<z.ZodString>;
@@ -99,6 +102,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
99
102
  help: z.ZodOptional<z.ZodString>;
100
103
  labelTranslationKey: z.ZodOptional<z.ZodString>;
101
104
  }, z.core.$strip>;
105
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
102
106
  meta: z.ZodObject<{
103
107
  schemaVersion: z.ZodDefault<z.ZodString>;
104
108
  title: z.ZodOptional<z.ZodString>;
@@ -124,6 +128,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
124
128
  labelTranslationKey: z.ZodOptional<z.ZodString>;
125
129
  }, z.core.$strip>;
126
130
  }, z.core.$strip>;
131
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
127
132
  attributes: z.ZodObject<{
128
133
  label: z.ZodOptional<z.ZodString>;
129
134
  help: z.ZodOptional<z.ZodString>;
@@ -145,6 +150,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
145
150
  help: z.ZodOptional<z.ZodString>;
146
151
  labelTranslationKey: z.ZodOptional<z.ZodString>;
147
152
  }, z.core.$strip>;
153
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
148
154
  meta: z.ZodObject<{
149
155
  schemaVersion: z.ZodDefault<z.ZodString>;
150
156
  title: z.ZodOptional<z.ZodString>;
@@ -227,6 +233,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
227
233
  help: z.ZodOptional<z.ZodString>;
228
234
  labelTranslationKey: z.ZodOptional<z.ZodString>;
229
235
  }, z.core.$strip>;
236
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
230
237
  meta: z.ZodObject<{
231
238
  schemaVersion: z.ZodDefault<z.ZodString>;
232
239
  title: z.ZodOptional<z.ZodString>;
@@ -242,6 +249,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
242
249
  help: z.ZodOptional<z.ZodString>;
243
250
  labelTranslationKey: z.ZodOptional<z.ZodString>;
244
251
  }, z.core.$strip>;
252
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
245
253
  meta: z.ZodObject<{
246
254
  schemaVersion: z.ZodDefault<z.ZodString>;
247
255
  title: z.ZodOptional<z.ZodString>;
@@ -267,6 +275,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
267
275
  help: z.ZodOptional<z.ZodString>;
268
276
  }, z.core.$strip>;
269
277
  }, z.core.$strip>;
278
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
270
279
  attributes: z.ZodObject<{
271
280
  label: z.ZodOptional<z.ZodString>;
272
281
  help: z.ZodOptional<z.ZodString>;
@@ -284,6 +293,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
284
293
  label: z.ZodDefault<z.ZodString>;
285
294
  value: z.ZodDefault<z.ZodString>;
286
295
  }, z.core.$strip>>;
296
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
287
297
  attributes: z.ZodObject<{
288
298
  label: z.ZodOptional<z.ZodString>;
289
299
  help: z.ZodOptional<z.ZodString>;
@@ -390,6 +400,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
390
400
  help: z.ZodOptional<z.ZodString>;
391
401
  labelTranslationKey: z.ZodOptional<z.ZodString>;
392
402
  }, z.core.$strip>;
403
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
393
404
  meta: z.ZodObject<{
394
405
  schemaVersion: z.ZodDefault<z.ZodString>;
395
406
  title: z.ZodOptional<z.ZodString>;
@@ -408,6 +419,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
408
419
  label: z.ZodDefault<z.ZodString>;
409
420
  value: z.ZodDefault<z.ZodString>;
410
421
  }, z.core.$strip>>;
422
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
411
423
  attributes: z.ZodObject<{
412
424
  label: z.ZodOptional<z.ZodString>;
413
425
  help: z.ZodOptional<z.ZodString>;
@@ -431,6 +443,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
431
443
  label: z.ZodDefault<z.ZodString>;
432
444
  value: z.ZodDefault<z.ZodString>;
433
445
  }, z.core.$strip>>;
446
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
434
447
  attributes: z.ZodObject<{
435
448
  label: z.ZodOptional<z.ZodString>;
436
449
  help: z.ZodOptional<z.ZodString>;
@@ -457,6 +470,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
457
470
  help: z.ZodOptional<z.ZodString>;
458
471
  labelTranslationKey: z.ZodOptional<z.ZodString>;
459
472
  }, z.core.$strip>;
473
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
460
474
  meta: z.ZodObject<{
461
475
  schemaVersion: z.ZodDefault<z.ZodString>;
462
476
  title: z.ZodOptional<z.ZodString>;
@@ -484,6 +498,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
484
498
  help: z.ZodOptional<z.ZodString>;
485
499
  labelTranslationKey: z.ZodOptional<z.ZodString>;
486
500
  }, z.core.$strip>;
501
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
487
502
  meta: z.ZodObject<{
488
503
  schemaVersion: z.ZodDefault<z.ZodString>;
489
504
  title: z.ZodOptional<z.ZodString>;
@@ -668,6 +683,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
668
683
  help: z.ZodOptional<z.ZodString>;
669
684
  labelTranslationKey: z.ZodOptional<z.ZodString>;
670
685
  }, z.core.$strip>;
686
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
671
687
  meta: z.ZodObject<{
672
688
  schemaVersion: z.ZodDefault<z.ZodString>;
673
689
  title: z.ZodOptional<z.ZodString>;
@@ -718,6 +734,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
718
734
  label: z.ZodString;
719
735
  value: z.ZodDefault<z.ZodBoolean>;
720
736
  }, z.core.$strip>;
737
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
721
738
  meta: z.ZodObject<{
722
739
  schemaVersion: z.ZodDefault<z.ZodString>;
723
740
  title: z.ZodOptional<z.ZodString>;
@@ -730,6 +747,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
730
747
  label: z.ZodDefault<z.ZodString>;
731
748
  value: z.ZodDefault<z.ZodString>;
732
749
  }, z.core.$strip>>;
750
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
733
751
  attributes: z.ZodObject<{
734
752
  label: z.ZodOptional<z.ZodString>;
735
753
  help: z.ZodOptional<z.ZodString>;
@@ -751,6 +769,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
751
769
  help: z.ZodOptional<z.ZodString>;
752
770
  labelTranslationKey: z.ZodOptional<z.ZodString>;
753
771
  }, z.core.$strip>;
772
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
754
773
  meta: z.ZodObject<{
755
774
  schemaVersion: z.ZodDefault<z.ZodString>;
756
775
  title: z.ZodOptional<z.ZodString>;
@@ -766,6 +785,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
766
785
  help: z.ZodOptional<z.ZodString>;
767
786
  labelTranslationKey: z.ZodOptional<z.ZodString>;
768
787
  }, z.core.$strip>;
788
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
769
789
  meta: z.ZodObject<{
770
790
  schemaVersion: z.ZodDefault<z.ZodString>;
771
791
  title: z.ZodOptional<z.ZodString>;
@@ -791,6 +811,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
791
811
  labelTranslationKey: z.ZodOptional<z.ZodString>;
792
812
  }, z.core.$strip>;
793
813
  }, z.core.$strip>;
814
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
794
815
  attributes: z.ZodObject<{
795
816
  label: z.ZodOptional<z.ZodString>;
796
817
  help: z.ZodOptional<z.ZodString>;
@@ -812,6 +833,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
812
833
  help: z.ZodOptional<z.ZodString>;
813
834
  labelTranslationKey: z.ZodOptional<z.ZodString>;
814
835
  }, z.core.$strip>;
836
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
815
837
  meta: z.ZodObject<{
816
838
  schemaVersion: z.ZodDefault<z.ZodString>;
817
839
  title: z.ZodOptional<z.ZodString>;
@@ -891,6 +913,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
891
913
  help: z.ZodOptional<z.ZodString>;
892
914
  labelTranslationKey: z.ZodOptional<z.ZodString>;
893
915
  }, z.core.$strip>;
916
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
894
917
  meta: z.ZodObject<{
895
918
  schemaVersion: z.ZodDefault<z.ZodString>;
896
919
  title: z.ZodOptional<z.ZodString>;
@@ -912,6 +935,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
912
935
  help: z.ZodOptional<z.ZodString>;
913
936
  labelTranslationKey: z.ZodOptional<z.ZodString>;
914
937
  }, z.core.$strip>;
938
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
915
939
  meta: z.ZodObject<{
916
940
  schemaVersion: z.ZodDefault<z.ZodString>;
917
941
  title: z.ZodOptional<z.ZodString>;
@@ -924,6 +948,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
924
948
  label: z.ZodDefault<z.ZodString>;
925
949
  value: z.ZodDefault<z.ZodString>;
926
950
  }, z.core.$strip>>;
951
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
927
952
  attributes: z.ZodObject<{
928
953
  label: z.ZodOptional<z.ZodString>;
929
954
  help: z.ZodOptional<z.ZodString>;
@@ -979,6 +1004,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
979
1004
  help: z.ZodOptional<z.ZodString>;
980
1005
  labelTranslationKey: z.ZodOptional<z.ZodString>;
981
1006
  }, z.core.$strip>;
1007
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
982
1008
  meta: z.ZodObject<{
983
1009
  schemaVersion: z.ZodDefault<z.ZodString>;
984
1010
  title: z.ZodOptional<z.ZodString>;
@@ -1027,6 +1053,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1027
1053
  help: z.ZodOptional<z.ZodString>;
1028
1054
  labelTranslationKey: z.ZodOptional<z.ZodString>;
1029
1055
  }, z.core.$strip>;
1056
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
1030
1057
  meta: z.ZodObject<{
1031
1058
  schemaVersion: z.ZodDefault<z.ZodString>;
1032
1059
  title: z.ZodOptional<z.ZodString>;
@@ -1092,6 +1119,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1092
1119
  help: z.ZodOptional<z.ZodString>;
1093
1120
  labelTranslationKey: z.ZodOptional<z.ZodString>;
1094
1121
  }, z.core.$strip>;
1122
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
1095
1123
  meta: z.ZodObject<{
1096
1124
  schemaVersion: z.ZodDefault<z.ZodString>;
1097
1125
  title: z.ZodOptional<z.ZodString>;
@@ -10,6 +10,7 @@ export declare const CurrencyQuestionSchema: z.ZodObject<{
10
10
  help: z.ZodOptional<z.ZodString>;
11
11
  labelTranslationKey: z.ZodOptional<z.ZodString>;
12
12
  }, z.core.$strip>;
13
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
13
14
  meta: z.ZodObject<{
14
15
  schemaVersion: z.ZodDefault<z.ZodString>;
15
16
  title: z.ZodOptional<z.ZodString>;
@@ -32,6 +33,7 @@ export declare const DefaultCurrencyQuestion: {
32
33
  title?: string | undefined;
33
34
  usageDescription?: string | undefined;
34
35
  };
36
+ showCommentField?: boolean | undefined;
35
37
  };
36
38
  export declare const NumberQuestionSchema: z.ZodObject<{
37
39
  type: z.ZodLiteral<"number">;
@@ -43,6 +45,7 @@ export declare const NumberQuestionSchema: z.ZodObject<{
43
45
  help: z.ZodOptional<z.ZodString>;
44
46
  labelTranslationKey: z.ZodOptional<z.ZodString>;
45
47
  }, z.core.$strip>;
48
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
46
49
  meta: z.ZodObject<{
47
50
  schemaVersion: z.ZodDefault<z.ZodString>;
48
51
  title: z.ZodOptional<z.ZodString>;
@@ -64,6 +67,7 @@ export declare const DefaultNumberQuestion: {
64
67
  title?: string | undefined;
65
68
  usageDescription?: string | undefined;
66
69
  };
70
+ showCommentField?: boolean | undefined;
67
71
  };
68
72
  export declare const NumberRangeQuestionSchema: z.ZodObject<{
69
73
  type: z.ZodLiteral<"numberRange">;
@@ -85,6 +89,7 @@ export declare const NumberRangeQuestionSchema: z.ZodObject<{
85
89
  help: z.ZodOptional<z.ZodString>;
86
90
  }, z.core.$strip>;
87
91
  }, z.core.$strip>;
92
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
88
93
  attributes: z.ZodObject<{
89
94
  label: z.ZodOptional<z.ZodString>;
90
95
  help: z.ZodOptional<z.ZodString>;
@@ -126,6 +131,7 @@ export declare const DefaultNumberRangeQuestion: {
126
131
  title?: string | undefined;
127
132
  usageDescription?: string | undefined;
128
133
  };
134
+ showCommentField?: boolean | undefined;
129
135
  };
130
136
  export declare const NumberWithContextQuestionSchema: z.ZodObject<{
131
137
  type: z.ZodLiteral<"numberWithContext">;
@@ -143,6 +149,7 @@ export declare const NumberWithContextQuestionSchema: z.ZodObject<{
143
149
  help: z.ZodOptional<z.ZodString>;
144
150
  labelTranslationKey: z.ZodOptional<z.ZodString>;
145
151
  }, z.core.$strip>;
152
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
146
153
  meta: z.ZodObject<{
147
154
  schemaVersion: z.ZodDefault<z.ZodString>;
148
155
  title: z.ZodOptional<z.ZodString>;
@@ -170,6 +177,7 @@ export declare const DefaultNumberWithContextQuestion: {
170
177
  title?: string | undefined;
171
178
  usageDescription?: string | undefined;
172
179
  };
180
+ showCommentField?: boolean | undefined;
173
181
  };
174
182
  export type CurrencyQuestionType = z.infer<typeof CurrencyQuestionSchema>;
175
183
  export type NumberQuestionType = z.infer<typeof NumberQuestionSchema>;
@@ -6,13 +6,13 @@ const question_1 = require("./question");
6
6
  const NumberAttributesSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.BaseAttributesSchema.shape), { max: zod_1.z.number().optional(), min: zod_1.z.number().default(0), step: zod_1.z.number().default(1) // For floats, use a decimal with the level of precision: 0.01
7
7
  }));
8
8
  const DefaultNumberAttributes = NumberAttributesSchema.parse({});
9
- exports.CurrencyQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('currency'), attributes: zod_1.z.object(Object.assign(Object.assign({}, NumberAttributesSchema.shape), { denomination: zod_1.z.string().default('USD') })) }));
9
+ exports.CurrencyQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('currency'), attributes: zod_1.z.object(Object.assign(Object.assign({}, NumberAttributesSchema.shape), { denomination: zod_1.z.string().default('USD') })), showCommentField: zod_1.z.boolean().optional() }));
10
10
  exports.DefaultCurrencyQuestion = exports.CurrencyQuestionSchema.parse({
11
11
  type: 'currency',
12
12
  attributes: DefaultNumberAttributes,
13
13
  meta: question_1.DefaultMeta
14
14
  });
15
- exports.NumberQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('number'), attributes: NumberAttributesSchema }));
15
+ exports.NumberQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('number'), attributes: NumberAttributesSchema, showCommentField: zod_1.z.boolean().optional() }));
16
16
  exports.DefaultNumberQuestion = exports.NumberQuestionSchema.parse({
17
17
  type: 'number',
18
18
  attributes: DefaultNumberAttributes,
@@ -23,7 +23,7 @@ const NumberRangeEndColumnSchema = zod_1.z.object(Object.assign(Object.assign({}
23
23
  exports.NumberRangeQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('numberRange'), columns: zod_1.z.object({
24
24
  start: NumberRangeStartColumnSchema,
25
25
  end: NumberRangeEndColumnSchema
26
- }) }));
26
+ }), showCommentField: zod_1.z.boolean().optional() }));
27
27
  exports.DefaultNumberRangeQuestion = exports.NumberRangeQuestionSchema.parse({
28
28
  type: 'numberRange',
29
29
  attributes: question_1.BaseAttributesSchema.parse({}),
@@ -42,7 +42,7 @@ const NumberWithContextAttributesSchema = zod_1.z.object(Object.assign(Object.as
42
42
  selected: zod_1.z.boolean().default(false)
43
43
  })) }));
44
44
  const DefaultNumberWithContextAttributes = NumberWithContextAttributesSchema.parse(Object.assign(Object.assign({}, exports.DefaultNumberQuestion.attributes), { context: [] }));
45
- exports.NumberWithContextQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('numberWithContext'), attributes: NumberWithContextAttributesSchema }));
45
+ exports.NumberWithContextQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('numberWithContext'), attributes: NumberWithContextAttributesSchema, showCommentField: zod_1.z.boolean().optional() }));
46
46
  exports.DefaultNumberWithContextQuestion = exports.NumberWithContextQuestionSchema.parse({
47
47
  type: 'numberWithContext',
48
48
  attributes: DefaultNumberWithContextAttributes,
@@ -5,6 +5,7 @@ export declare const BooleanQuestionSchema: z.ZodObject<{
5
5
  label: z.ZodString;
6
6
  value: z.ZodDefault<z.ZodBoolean>;
7
7
  }, z.core.$strip>;
8
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
8
9
  meta: z.ZodObject<{
9
10
  schemaVersion: z.ZodDefault<z.ZodString>;
10
11
  title: z.ZodOptional<z.ZodString>;
@@ -22,6 +23,7 @@ export declare const DefaultBooleanQuestion: {
22
23
  title?: string | undefined;
23
24
  usageDescription?: string | undefined;
24
25
  };
26
+ showCommentField?: boolean | undefined;
25
27
  };
26
28
  export declare const CheckboxesQuestionSchema: z.ZodObject<{
27
29
  type: z.ZodLiteral<"checkBoxes">;
@@ -30,6 +32,7 @@ export declare const CheckboxesQuestionSchema: z.ZodObject<{
30
32
  label: z.ZodDefault<z.ZodString>;
31
33
  value: z.ZodDefault<z.ZodString>;
32
34
  }, z.core.$strip>>;
35
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
33
36
  attributes: z.ZodObject<{
34
37
  label: z.ZodOptional<z.ZodString>;
35
38
  help: z.ZodOptional<z.ZodString>;
@@ -58,6 +61,7 @@ export declare const DefaultCheckboxesQuestion: {
58
61
  title?: string | undefined;
59
62
  usageDescription?: string | undefined;
60
63
  };
64
+ showCommentField?: boolean | undefined;
61
65
  };
62
66
  export declare const RadioButtonsQuestionSchema: z.ZodObject<{
63
67
  type: z.ZodLiteral<"radioButtons">;
@@ -66,6 +70,7 @@ export declare const RadioButtonsQuestionSchema: z.ZodObject<{
66
70
  label: z.ZodDefault<z.ZodString>;
67
71
  value: z.ZodDefault<z.ZodString>;
68
72
  }, z.core.$strip>>;
73
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
69
74
  attributes: z.ZodObject<{
70
75
  label: z.ZodOptional<z.ZodString>;
71
76
  help: z.ZodOptional<z.ZodString>;
@@ -94,6 +99,7 @@ export declare const DefaultRadioButtonsQuestion: {
94
99
  title?: string | undefined;
95
100
  usageDescription?: string | undefined;
96
101
  };
102
+ showCommentField?: boolean | undefined;
97
103
  };
98
104
  export declare const SelectBoxQuestionSchema: z.ZodObject<{
99
105
  type: z.ZodLiteral<"selectBox">;
@@ -108,6 +114,7 @@ export declare const SelectBoxQuestionSchema: z.ZodObject<{
108
114
  help: z.ZodOptional<z.ZodString>;
109
115
  labelTranslationKey: z.ZodOptional<z.ZodString>;
110
116
  }, z.core.$strip>;
117
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
111
118
  meta: z.ZodObject<{
112
119
  schemaVersion: z.ZodDefault<z.ZodString>;
113
120
  title: z.ZodOptional<z.ZodString>;
@@ -132,6 +139,7 @@ export declare const DefaultSelectBoxQuestion: {
132
139
  title?: string | undefined;
133
140
  usageDescription?: string | undefined;
134
141
  };
142
+ showCommentField?: boolean | undefined;
135
143
  };
136
144
  export declare const MultiselectBoxQuestionSchema: z.ZodObject<{
137
145
  type: z.ZodLiteral<"multiselectBox">;
@@ -146,6 +154,7 @@ export declare const MultiselectBoxQuestionSchema: z.ZodObject<{
146
154
  help: z.ZodOptional<z.ZodString>;
147
155
  labelTranslationKey: z.ZodOptional<z.ZodString>;
148
156
  }, z.core.$strip>;
157
+ showCommentField: z.ZodOptional<z.ZodBoolean>;
149
158
  meta: z.ZodObject<{
150
159
  schemaVersion: z.ZodDefault<z.ZodString>;
151
160
  title: z.ZodOptional<z.ZodString>;
@@ -170,6 +179,7 @@ export declare const DefaultMultiselectBoxQuestion: {
170
179
  title?: string | undefined;
171
180
  usageDescription?: string | undefined;
172
181
  };
182
+ showCommentField?: boolean | undefined;
173
183
  };
174
184
  export type BooleanQuestionType = z.infer<typeof BooleanQuestionSchema>;
175
185
  export type CheckboxesQuestionType = z.infer<typeof CheckboxesQuestionSchema>;
@@ -20,7 +20,7 @@ const DefaultSelectBoxAttributes = selectBoxAttributes.parse({
20
20
  exports.BooleanQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('boolean'), attributes: zod_1.z.object({
21
21
  label: zod_1.z.string(),
22
22
  value: zod_1.z.boolean().default(false),
23
- }) }));
23
+ }), showCommentField: zod_1.z.boolean().optional() }));
24
24
  exports.DefaultBooleanQuestion = exports.BooleanQuestionSchema.parse({
25
25
  type: 'boolean',
26
26
  attributes: {
@@ -30,7 +30,7 @@ exports.DefaultBooleanQuestion = exports.BooleanQuestionSchema.parse({
30
30
  meta: question_1.DefaultMeta
31
31
  });
32
32
  // Check boxes question and answer
33
- exports.CheckboxesQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('checkBoxes'), options: zod_1.z.array(CheckedOptionSchema) }));
33
+ exports.CheckboxesQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('checkBoxes'), options: zod_1.z.array(CheckedOptionSchema), showCommentField: zod_1.z.boolean().optional() }));
34
34
  exports.DefaultCheckboxesQuestion = exports.CheckboxesQuestionSchema.parse({
35
35
  type: 'checkBoxes',
36
36
  attributes: CheckedOptionSchema,
@@ -38,7 +38,7 @@ exports.DefaultCheckboxesQuestion = exports.CheckboxesQuestionSchema.parse({
38
38
  options: [DefaultCheckedOption]
39
39
  });
40
40
  // Radio buttons question and answer
41
- exports.RadioButtonsQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('radioButtons'), options: zod_1.z.array(SelectedOptionSchema) }));
41
+ exports.RadioButtonsQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('radioButtons'), options: zod_1.z.array(SelectedOptionSchema), showCommentField: zod_1.z.boolean().optional() }));
42
42
  exports.DefaultRadioButtonsQuestion = exports.RadioButtonsQuestionSchema.parse({
43
43
  type: 'radioButtons',
44
44
  attributes: DefaultSelectBoxAttributes,
@@ -46,7 +46,7 @@ exports.DefaultRadioButtonsQuestion = exports.RadioButtonsQuestionSchema.parse({
46
46
  options: [DefaultSelectedOption]
47
47
  });
48
48
  // Select box question and answer
49
- exports.SelectBoxQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('selectBox'), options: zod_1.z.array(SelectedOptionSchema), attributes: selectBoxAttributes }));
49
+ exports.SelectBoxQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, question_1.QuestionSchema.shape), { type: zod_1.z.literal('selectBox'), options: zod_1.z.array(SelectedOptionSchema), attributes: selectBoxAttributes, showCommentField: zod_1.z.boolean().optional() }));
50
50
  exports.DefaultSelectBoxQuestion = exports.SelectBoxQuestionSchema.parse({
51
51
  type: 'selectBox',
52
52
  attributes: DefaultSelectBoxAttributes,
@@ -58,7 +58,7 @@ const DefaultMultiselectBoxAttributes = multiselectBoxAttributes.parse({
58
58
  multiple: true
59
59
  });
60
60
  // Multi-select box question and answer
61
- exports.MultiselectBoxQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, exports.SelectBoxQuestionSchema.shape), { type: zod_1.z.literal('multiselectBox'), options: zod_1.z.array(SelectedOptionSchema), attributes: multiselectBoxAttributes }));
61
+ exports.MultiselectBoxQuestionSchema = zod_1.z.object(Object.assign(Object.assign({}, exports.SelectBoxQuestionSchema.shape), { type: zod_1.z.literal('multiselectBox'), options: zod_1.z.array(SelectedOptionSchema), attributes: multiselectBoxAttributes, showCommentField: zod_1.z.boolean().optional() }));
62
62
  exports.DefaultMultiselectBoxQuestion = exports.MultiselectBoxQuestionSchema.parse({
63
63
  type: 'multiselectBox',
64
64
  attributes: DefaultMultiselectBoxAttributes,