@dmptool/types 2.1.0 → 2.2.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/README.md +70 -1
- package/dist/answers/__tests__/defaults.spec.js +80 -21
- package/dist/answers/answer.d.ts +2 -0
- package/dist/answers/answer.js +4 -2
- package/dist/answers/dateAnswers.d.ts +4 -0
- package/dist/answers/graphQLAnswers.d.ts +8 -0
- package/dist/answers/index.d.ts +37 -0
- package/dist/answers/numberAnswers.d.ts +8 -0
- package/dist/answers/optionBasedAnswers.d.ts +10 -0
- package/dist/answers/tableAnswers.d.ts +94 -0
- package/dist/answers/textAnswers.d.ts +8 -0
- package/dist/dmp/extension.d.ts +111 -0
- package/dist/dmp/index.js +48 -2
- package/dist/questions/__tests__/defaults.spec.js +12 -12
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +25 -16
- package/dist/questions/dateQuestions.d.ts +4 -0
- package/dist/questions/dateQuestions.js +2 -2
- package/dist/questions/index.d.ts +38 -7
- package/dist/questions/numberQuestions.d.ts +8 -0
- package/dist/questions/numberQuestions.js +4 -4
- package/dist/questions/optionBasedQuestions.d.ts +18 -6
- package/dist/questions/optionBasedQuestions.js +23 -10
- package/dist/questions/tableQuestions.d.ts +94 -16
- package/dist/questions/tableQuestions.js +9 -9
- package/dist/questions/textQuestions.d.ts +4 -0
- package/dist/questions/textQuestions.js +2 -2
- package/dist/schemas/affiliationSearchAnswer.schema.json +3 -0
- package/dist/schemas/anyAnswer.schema.json +111 -0
- package/dist/schemas/anyQuestion.schema.json +114 -35
- package/dist/schemas/anyTableColumnAnswer.schema.json +54 -0
- package/dist/schemas/anyTableColumnQuestion.schema.json +42 -10
- package/dist/schemas/booleanAnswer.schema.json +3 -0
- package/dist/schemas/booleanQuestion.schema.json +3 -0
- package/dist/schemas/checkboxesAnswer.schema.json +3 -0
- package/dist/schemas/checkboxesQuestion.schema.json +6 -0
- package/dist/schemas/currencyAnswer.schema.json +3 -0
- package/dist/schemas/currencyQuestion.schema.json +3 -0
- package/dist/schemas/dateAnswer.schema.json +3 -0
- package/dist/schemas/dateQuestion.schema.json +3 -0
- package/dist/schemas/dateRangeAnswer.schema.json +3 -0
- package/dist/schemas/dateRangeQuestion.schema.json +3 -0
- package/dist/schemas/dmpExtension.schema.json +111 -0
- package/dist/schemas/emailAnswer.schema.json +3 -0
- package/dist/schemas/emailQuestion.schema.json +3 -0
- package/dist/schemas/licenseSearchAnswer.schema.json +3 -0
- package/dist/schemas/metadataStandardSearchAnswer.schema.json +3 -0
- package/dist/schemas/multiselectBoxAnswer.schema.json +3 -0
- package/dist/schemas/multiselectBoxQuestion.schema.json +6 -5
- package/dist/schemas/numberAnswer.schema.json +3 -0
- package/dist/schemas/numberQuestion.schema.json +3 -0
- package/dist/schemas/numberRangeAnswer.schema.json +3 -0
- package/dist/schemas/numberRangeQuestion.schema.json +3 -0
- package/dist/schemas/numberWithContextAnswer.schema.json +3 -0
- package/dist/schemas/numberWithContextQuestion.schema.json +3 -0
- package/dist/schemas/radioButtonsAnswer.schema.json +3 -0
- package/dist/schemas/radioButtonsQuestion.schema.json +6 -5
- package/dist/schemas/repositorySearchAnswer.schema.json +3 -0
- package/dist/schemas/researchOutputTableAnswer.schema.json +3344 -9
- package/dist/schemas/selectBoxAnswer.schema.json +3 -0
- package/dist/schemas/selectBoxQuestion.schema.json +6 -5
- package/dist/schemas/tableAnswer.schema.json +57 -0
- package/dist/schemas/tableQuestion.schema.json +42 -10
- package/dist/schemas/textAnswer.schema.json +3 -0
- package/dist/schemas/textAreaAnswer.schema.json +3 -0
- package/dist/schemas/urlAnswer.schema.json +3 -0
- package/dist/schemas/urlQuestion.schema.json +3 -0
- package/package.json +9 -4
- package/schemas/.placeholder +0 -0
- package/schemas/affiliationSearchAnswer.schema.json +50 -0
- package/schemas/affiliationSearchQuestion.schema.json +142 -0
- package/schemas/anyAnswer.schema.json +1537 -0
- package/schemas/anyQuestion.schema.json +4823 -0
- package/schemas/anyTableColumnAnswer.schema.json +741 -0
- package/schemas/anyTableColumnQuestion.schema.json +1559 -0
- package/schemas/booleanAnswer.schema.json +36 -0
- package/schemas/booleanQuestion.schema.json +55 -0
- package/schemas/checkboxesAnswer.schema.json +41 -0
- package/schemas/checkboxesQuestion.schema.json +83 -0
- package/schemas/currencyAnswer.schema.json +36 -0
- package/schemas/currencyQuestion.schema.json +73 -0
- package/schemas/dateAnswer.schema.json +36 -0
- package/schemas/datePickerAnswer.schema.json +37 -0
- package/schemas/datePickerQuestion.schema.json +52 -0
- package/schemas/dateQuestion.schema.json +66 -0
- package/schemas/dateRangeAnswer.schema.json +50 -0
- package/schemas/dateRangeQuestion.schema.json +124 -0
- package/schemas/dmp.schema.json +2070 -0
- package/schemas/dmpExtension.schema.json +1985 -0
- package/schemas/emailAnswer.schema.json +36 -0
- package/schemas/emailQuestion.schema.json +71 -0
- package/schemas/filteredSearchAnswer.schema.json +40 -0
- package/schemas/filteredSearchQuestion.schema.json +130 -0
- package/schemas/licenseSearchAnswer.schema.json +54 -0
- package/schemas/licenseSearchQuestion.schema.json +140 -0
- package/schemas/metadataStandardSearchAnswer.schema.json +54 -0
- package/schemas/metadataStandardSearchQuestion.schema.json +141 -0
- package/schemas/multiselectBoxAnswer.schema.json +41 -0
- package/schemas/multiselectBoxQuestion.schema.json +85 -0
- package/schemas/numberAnswer.schema.json +36 -0
- package/schemas/numberQuestion.schema.json +68 -0
- package/schemas/numberRangeAnswer.schema.json +50 -0
- package/schemas/numberRangeQuestion.schema.json +128 -0
- package/schemas/numberWithContextAnswer.schema.json +50 -0
- package/schemas/numberWithContextQuestion.schema.json +98 -0
- package/schemas/radioButtonsAnswer.schema.json +36 -0
- package/schemas/radioButtonsQuestion.schema.json +78 -0
- package/schemas/repositorySearchAnswer.schema.json +54 -0
- package/schemas/repositorySearchQuestion.schema.json +140 -0
- package/schemas/researchOutputTableAnswer.schema.json +20065 -0
- package/schemas/researchOutputTableQuestion.schema.json +140 -0
- package/schemas/selectBoxAnswer.schema.json +36 -0
- package/schemas/selectBoxQuestion.schema.json +85 -0
- package/schemas/tableAnswer.schema.json +797 -0
- package/schemas/tableQuestion.schema.json +1661 -0
- package/schemas/textAnswer.schema.json +36 -0
- package/schemas/textAreaAnswer.schema.json +36 -0
- package/schemas/textAreaQuestion.schema.json +78 -0
- package/schemas/textQuestion.schema.json +63 -0
- package/schemas/typeaheadSearchAnswer.schema.json +37 -0
- package/schemas/typeaheadSearchQuestion.schema.json +120 -0
- package/schemas/urlAnswer.schema.json +36 -0
- 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
|
-
|
|
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,
|
|
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",
|
|
@@ -194,7 +194,7 @@ describe('questions return the expected defaults', () => {
|
|
|
194
194
|
type: "multiselectBox",
|
|
195
195
|
attributes: { multiple: true },
|
|
196
196
|
meta: { schemaVersion: "1.0" },
|
|
197
|
-
options: [{ label: 'Option A',
|
|
197
|
+
options: [{ label: 'Option A', value: 'a' }]
|
|
198
198
|
};
|
|
199
199
|
(0, globals_1.expect)(optionBasedQuestions_1.DefaultMultiselectBoxQuestion).toEqual(expected);
|
|
200
200
|
});
|
|
@@ -231,7 +231,7 @@ describe('questions return the expected defaults', () => {
|
|
|
231
231
|
type: "radioButtons",
|
|
232
232
|
attributes: {},
|
|
233
233
|
meta: { schemaVersion: "1.0" },
|
|
234
|
-
options: [{ label: 'Option A',
|
|
234
|
+
options: [{ label: 'Option A', value: 'a' }]
|
|
235
235
|
};
|
|
236
236
|
(0, globals_1.expect)(optionBasedQuestions_1.DefaultRadioButtonsQuestion).toEqual(expected);
|
|
237
237
|
});
|
|
@@ -281,9 +281,9 @@ describe('questions return the expected defaults', () => {
|
|
|
281
281
|
type: "selectBox",
|
|
282
282
|
attributes: { multiple: false },
|
|
283
283
|
options: [
|
|
284
|
-
{ label: 'Dataset', value: 'dataset'
|
|
285
|
-
{ label: 'Software', value: 'software'
|
|
286
|
-
{ label: 'Other', value: 'other'
|
|
284
|
+
{ label: 'Dataset', value: 'dataset' },
|
|
285
|
+
{ label: 'Software', value: 'software' },
|
|
286
|
+
{ label: 'Other', value: 'other' }
|
|
287
287
|
],
|
|
288
288
|
meta: { schemaVersion: "1.0" }
|
|
289
289
|
}
|
|
@@ -321,9 +321,9 @@ describe('questions return the expected defaults', () => {
|
|
|
321
321
|
meta: { schemaVersion: "1.0" },
|
|
322
322
|
attributes: {},
|
|
323
323
|
options: [
|
|
324
|
-
{ label: 'Open Access', value: 'open'
|
|
325
|
-
{ label: 'Restricted Access', value: 'restricted'
|
|
326
|
-
{ label: 'Other', value: 'closed'
|
|
324
|
+
{ label: 'Open Access', value: 'open' },
|
|
325
|
+
{ label: 'Restricted Access', value: 'restricted' },
|
|
326
|
+
{ label: 'Other', value: 'closed' },
|
|
327
327
|
]
|
|
328
328
|
}
|
|
329
329
|
},
|
|
@@ -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
|
{
|
|
@@ -352,7 +352,7 @@ describe('questions return the expected defaults', () => {
|
|
|
352
352
|
step: 1,
|
|
353
353
|
context: [
|
|
354
354
|
{ label: 'bytes', value: 'bytes', selected: false },
|
|
355
|
-
{ label: 'KB (kilobytes)', value: 'kb', selected:
|
|
355
|
+
{ label: 'KB (kilobytes)', value: 'kb', selected: false },
|
|
356
356
|
{ label: 'MB (megabytes)', value: 'mb', selected: false },
|
|
357
357
|
{ label: 'GB (gigabytes)', value: 'gb', selected: false },
|
|
358
358
|
{ label: 'TB (terabytes)', value: 'tb', selected: false },
|
|
@@ -630,7 +630,7 @@ describe('questions return the expected defaults', () => {
|
|
|
630
630
|
type: "selectBox",
|
|
631
631
|
attributes: { multiple: false },
|
|
632
632
|
meta: { schemaVersion: "1.0" },
|
|
633
|
-
options: [{ label: 'Option A',
|
|
633
|
+
options: [{ label: 'Option A', value: 'a' }]
|
|
634
634
|
};
|
|
635
635
|
(0, globals_1.expect)(optionBasedQuestions_1.DefaultSelectBoxQuestion).toEqual(expected);
|
|
636
636
|
});
|
|
@@ -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
|
});
|
|
@@ -100,17 +101,16 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
100
101
|
{
|
|
101
102
|
label: "Male",
|
|
102
103
|
value: "male",
|
|
103
|
-
selected: true,
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
label: "Female",
|
|
107
107
|
value: "female",
|
|
108
|
-
selected: true,
|
|
109
108
|
},
|
|
110
109
|
],
|
|
111
110
|
meta: {
|
|
112
111
|
schemaVersion: "1.0"
|
|
113
|
-
}
|
|
112
|
+
},
|
|
113
|
+
showCommentField: false
|
|
114
114
|
};
|
|
115
115
|
(0, globals_1.expect)(() => optionBasedQuestions_1.RadioButtonsQuestionSchema.parse(validRadioButtonsQuestion)).not.toThrow();
|
|
116
116
|
});
|
|
@@ -120,8 +120,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
120
120
|
options: [
|
|
121
121
|
{
|
|
122
122
|
label: "Male",
|
|
123
|
-
value: "male"
|
|
124
|
-
selected: "true", // Invalid type for selected
|
|
123
|
+
value: "male"
|
|
125
124
|
},
|
|
126
125
|
],
|
|
127
126
|
meta: {
|
|
@@ -144,17 +143,16 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
144
143
|
{
|
|
145
144
|
label: "USA",
|
|
146
145
|
value: "us",
|
|
147
|
-
selected: true,
|
|
148
146
|
},
|
|
149
147
|
{
|
|
150
148
|
label: "Canada",
|
|
151
149
|
value: "ca",
|
|
152
|
-
selected: false,
|
|
153
150
|
},
|
|
154
151
|
],
|
|
155
152
|
meta: {
|
|
156
153
|
schemaVersion: "1.0"
|
|
157
|
-
}
|
|
154
|
+
},
|
|
155
|
+
showCommentField: false
|
|
158
156
|
};
|
|
159
157
|
(0, globals_1.expect)(() => optionBasedQuestions_1.SelectBoxQuestionSchema.parse(validSelectBoxQuestion)).not.toThrow();
|
|
160
158
|
});
|
|
@@ -165,8 +163,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
165
163
|
options: [
|
|
166
164
|
{
|
|
167
165
|
label: "USA",
|
|
168
|
-
value: "us"
|
|
169
|
-
selected: "true", // Invalid type for selected
|
|
166
|
+
value: "us"
|
|
170
167
|
},
|
|
171
168
|
],
|
|
172
169
|
attributes: {
|
|
@@ -192,17 +189,16 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
192
189
|
{
|
|
193
190
|
label: "USA",
|
|
194
191
|
value: "us",
|
|
195
|
-
selected: true,
|
|
196
192
|
},
|
|
197
193
|
{
|
|
198
194
|
label: "Canada",
|
|
199
195
|
value: "ca",
|
|
200
|
-
selected: false,
|
|
201
196
|
},
|
|
202
197
|
],
|
|
203
198
|
meta: {
|
|
204
199
|
schemaVersion: "1.0"
|
|
205
|
-
}
|
|
200
|
+
},
|
|
201
|
+
showCommentField: false
|
|
206
202
|
};
|
|
207
203
|
(0, globals_1.expect)(() => optionBasedQuestions_1.MultiselectBoxQuestionSchema.parse(validSelectBoxQuestion)).not.toThrow();
|
|
208
204
|
});
|
|
@@ -213,8 +209,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
213
209
|
options: [
|
|
214
210
|
{
|
|
215
211
|
label: "USA",
|
|
216
|
-
value: "us"
|
|
217
|
-
selected: "true", // Invalid type for selected
|
|
212
|
+
value: "us"
|
|
218
213
|
},
|
|
219
214
|
],
|
|
220
215
|
attributes: {
|
|
@@ -227,3 +222,17 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
227
222
|
(0, globals_1.expect)(() => optionBasedQuestions_1.MultiselectBoxQuestionSchema.parse(invalidSelectBoxQuestion)).toThrow();
|
|
228
223
|
});
|
|
229
224
|
});
|
|
225
|
+
(0, globals_1.describe)("Option descriptions", () => {
|
|
226
|
+
(0, globals_1.it)("should accept and preserve an optional description on options", () => {
|
|
227
|
+
const selectWithDescription = {
|
|
228
|
+
type: "selectBox",
|
|
229
|
+
attributes: { multiple: false },
|
|
230
|
+
options: [
|
|
231
|
+
{ label: "Data paper", value: "data-paper", description: "A published description of a dataset" },
|
|
232
|
+
],
|
|
233
|
+
meta: { schemaVersion: "1.0" }
|
|
234
|
+
};
|
|
235
|
+
const parsed = optionBasedQuestions_1.SelectBoxQuestionSchema.parse(selectWithDescription);
|
|
236
|
+
(0, globals_1.expect)(parsed.options[0].description).toBe("A published description of a dataset");
|
|
237
|
+
});
|
|
238
|
+
});
|
|
@@ -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>;
|
|
@@ -62,7 +63,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
62
63
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
63
64
|
label: z.ZodDefault<z.ZodString>;
|
|
64
65
|
value: z.ZodDefault<z.ZodString>;
|
|
66
|
+
description: z.ZodOptional<z.ZodString>;
|
|
65
67
|
}, z.core.$strip>>;
|
|
68
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
66
69
|
attributes: z.ZodObject<{
|
|
67
70
|
label: z.ZodOptional<z.ZodString>;
|
|
68
71
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -84,6 +87,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
84
87
|
help: z.ZodOptional<z.ZodString>;
|
|
85
88
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
86
89
|
}, z.core.$strip>;
|
|
90
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
87
91
|
meta: z.ZodObject<{
|
|
88
92
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
89
93
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -99,6 +103,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
99
103
|
help: z.ZodOptional<z.ZodString>;
|
|
100
104
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
101
105
|
}, z.core.$strip>;
|
|
106
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
102
107
|
meta: z.ZodObject<{
|
|
103
108
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
104
109
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -124,6 +129,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
124
129
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
125
130
|
}, z.core.$strip>;
|
|
126
131
|
}, z.core.$strip>;
|
|
132
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
127
133
|
attributes: z.ZodObject<{
|
|
128
134
|
label: z.ZodOptional<z.ZodString>;
|
|
129
135
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -145,6 +151,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
145
151
|
help: z.ZodOptional<z.ZodString>;
|
|
146
152
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
147
153
|
}, z.core.$strip>;
|
|
154
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
148
155
|
meta: z.ZodObject<{
|
|
149
156
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
150
157
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -217,9 +224,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
217
224
|
}, z.core.$strip>, z.ZodObject<{
|
|
218
225
|
type: z.ZodLiteral<"multiselectBox">;
|
|
219
226
|
options: z.ZodArray<z.ZodObject<{
|
|
220
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
221
227
|
label: z.ZodDefault<z.ZodString>;
|
|
222
228
|
value: z.ZodDefault<z.ZodString>;
|
|
229
|
+
description: z.ZodOptional<z.ZodString>;
|
|
223
230
|
}, z.core.$strip>>;
|
|
224
231
|
attributes: z.ZodObject<{
|
|
225
232
|
multiple: z.ZodLiteral<true>;
|
|
@@ -227,6 +234,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
227
234
|
help: z.ZodOptional<z.ZodString>;
|
|
228
235
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
229
236
|
}, z.core.$strip>;
|
|
237
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
230
238
|
meta: z.ZodObject<{
|
|
231
239
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
232
240
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -242,6 +250,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
242
250
|
help: z.ZodOptional<z.ZodString>;
|
|
243
251
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
244
252
|
}, z.core.$strip>;
|
|
253
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
245
254
|
meta: z.ZodObject<{
|
|
246
255
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
247
256
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -267,6 +276,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
267
276
|
help: z.ZodOptional<z.ZodString>;
|
|
268
277
|
}, z.core.$strip>;
|
|
269
278
|
}, z.core.$strip>;
|
|
279
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
270
280
|
attributes: z.ZodObject<{
|
|
271
281
|
label: z.ZodOptional<z.ZodString>;
|
|
272
282
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -280,10 +290,11 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
280
290
|
}, z.core.$strip>, z.ZodObject<{
|
|
281
291
|
type: z.ZodLiteral<"radioButtons">;
|
|
282
292
|
options: z.ZodArray<z.ZodObject<{
|
|
283
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
284
293
|
label: z.ZodDefault<z.ZodString>;
|
|
285
294
|
value: z.ZodDefault<z.ZodString>;
|
|
295
|
+
description: z.ZodOptional<z.ZodString>;
|
|
286
296
|
}, z.core.$strip>>;
|
|
297
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
287
298
|
attributes: z.ZodObject<{
|
|
288
299
|
label: z.ZodOptional<z.ZodString>;
|
|
289
300
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -380,9 +391,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
380
391
|
content: z.ZodObject<{
|
|
381
392
|
type: z.ZodLiteral<"selectBox">;
|
|
382
393
|
options: z.ZodArray<z.ZodObject<{
|
|
383
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
384
394
|
label: z.ZodDefault<z.ZodString>;
|
|
385
395
|
value: z.ZodDefault<z.ZodString>;
|
|
396
|
+
description: z.ZodOptional<z.ZodString>;
|
|
386
397
|
}, z.core.$strip>>;
|
|
387
398
|
attributes: z.ZodObject<{
|
|
388
399
|
multiple: z.ZodLiteral<false>;
|
|
@@ -390,6 +401,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
390
401
|
help: z.ZodOptional<z.ZodString>;
|
|
391
402
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
392
403
|
}, z.core.$strip>;
|
|
404
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
393
405
|
meta: z.ZodObject<{
|
|
394
406
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
395
407
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -407,7 +419,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
407
419
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
408
420
|
label: z.ZodDefault<z.ZodString>;
|
|
409
421
|
value: z.ZodDefault<z.ZodString>;
|
|
422
|
+
description: z.ZodOptional<z.ZodString>;
|
|
410
423
|
}, z.core.$strip>>;
|
|
424
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
411
425
|
attributes: z.ZodObject<{
|
|
412
426
|
label: z.ZodOptional<z.ZodString>;
|
|
413
427
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -427,10 +441,11 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
427
441
|
content: z.ZodObject<{
|
|
428
442
|
type: z.ZodLiteral<"radioButtons">;
|
|
429
443
|
options: z.ZodArray<z.ZodObject<{
|
|
430
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
431
444
|
label: z.ZodDefault<z.ZodString>;
|
|
432
445
|
value: z.ZodDefault<z.ZodString>;
|
|
446
|
+
description: z.ZodOptional<z.ZodString>;
|
|
433
447
|
}, z.core.$strip>>;
|
|
448
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
434
449
|
attributes: z.ZodObject<{
|
|
435
450
|
label: z.ZodOptional<z.ZodString>;
|
|
436
451
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -457,6 +472,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
457
472
|
help: z.ZodOptional<z.ZodString>;
|
|
458
473
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
459
474
|
}, z.core.$strip>;
|
|
475
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
460
476
|
meta: z.ZodObject<{
|
|
461
477
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
462
478
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -484,6 +500,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
484
500
|
help: z.ZodOptional<z.ZodString>;
|
|
485
501
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
486
502
|
}, z.core.$strip>;
|
|
503
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
487
504
|
meta: z.ZodObject<{
|
|
488
505
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
489
506
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -658,9 +675,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
658
675
|
}, z.core.$strip>, z.ZodObject<{
|
|
659
676
|
type: z.ZodLiteral<"selectBox">;
|
|
660
677
|
options: z.ZodArray<z.ZodObject<{
|
|
661
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
662
678
|
label: z.ZodDefault<z.ZodString>;
|
|
663
679
|
value: z.ZodDefault<z.ZodString>;
|
|
680
|
+
description: z.ZodOptional<z.ZodString>;
|
|
664
681
|
}, z.core.$strip>>;
|
|
665
682
|
attributes: z.ZodObject<{
|
|
666
683
|
multiple: z.ZodLiteral<false>;
|
|
@@ -668,6 +685,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
668
685
|
help: z.ZodOptional<z.ZodString>;
|
|
669
686
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
670
687
|
}, z.core.$strip>;
|
|
688
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
671
689
|
meta: z.ZodObject<{
|
|
672
690
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
673
691
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -718,6 +736,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
718
736
|
label: z.ZodString;
|
|
719
737
|
value: z.ZodDefault<z.ZodBoolean>;
|
|
720
738
|
}, z.core.$strip>;
|
|
739
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
721
740
|
meta: z.ZodObject<{
|
|
722
741
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
723
742
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -729,7 +748,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
729
748
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
730
749
|
label: z.ZodDefault<z.ZodString>;
|
|
731
750
|
value: z.ZodDefault<z.ZodString>;
|
|
751
|
+
description: z.ZodOptional<z.ZodString>;
|
|
732
752
|
}, z.core.$strip>>;
|
|
753
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
733
754
|
attributes: z.ZodObject<{
|
|
734
755
|
label: z.ZodOptional<z.ZodString>;
|
|
735
756
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -751,6 +772,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
751
772
|
help: z.ZodOptional<z.ZodString>;
|
|
752
773
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
753
774
|
}, z.core.$strip>;
|
|
775
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
754
776
|
meta: z.ZodObject<{
|
|
755
777
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
756
778
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -766,6 +788,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
766
788
|
help: z.ZodOptional<z.ZodString>;
|
|
767
789
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
768
790
|
}, z.core.$strip>;
|
|
791
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
769
792
|
meta: z.ZodObject<{
|
|
770
793
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
771
794
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -791,6 +814,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
791
814
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
792
815
|
}, z.core.$strip>;
|
|
793
816
|
}, z.core.$strip>;
|
|
817
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
794
818
|
attributes: z.ZodObject<{
|
|
795
819
|
label: z.ZodOptional<z.ZodString>;
|
|
796
820
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -812,6 +836,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
812
836
|
help: z.ZodOptional<z.ZodString>;
|
|
813
837
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
814
838
|
}, z.core.$strip>;
|
|
839
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
815
840
|
meta: z.ZodObject<{
|
|
816
841
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
817
842
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -891,6 +916,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
891
916
|
help: z.ZodOptional<z.ZodString>;
|
|
892
917
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
893
918
|
}, z.core.$strip>;
|
|
919
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
894
920
|
meta: z.ZodObject<{
|
|
895
921
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
896
922
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -912,6 +938,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
912
938
|
help: z.ZodOptional<z.ZodString>;
|
|
913
939
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
914
940
|
}, z.core.$strip>;
|
|
941
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
915
942
|
meta: z.ZodObject<{
|
|
916
943
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
917
944
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -920,10 +947,11 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
920
947
|
}, z.core.$strip>, z.ZodObject<{
|
|
921
948
|
type: z.ZodLiteral<"radioButtons">;
|
|
922
949
|
options: z.ZodArray<z.ZodObject<{
|
|
923
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
924
950
|
label: z.ZodDefault<z.ZodString>;
|
|
925
951
|
value: z.ZodDefault<z.ZodString>;
|
|
952
|
+
description: z.ZodOptional<z.ZodString>;
|
|
926
953
|
}, z.core.$strip>>;
|
|
954
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
927
955
|
attributes: z.ZodObject<{
|
|
928
956
|
label: z.ZodOptional<z.ZodString>;
|
|
929
957
|
help: z.ZodOptional<z.ZodString>;
|
|
@@ -969,9 +997,9 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
969
997
|
}, z.core.$strip>, z.ZodObject<{
|
|
970
998
|
type: z.ZodLiteral<"selectBox">;
|
|
971
999
|
options: z.ZodArray<z.ZodObject<{
|
|
972
|
-
selected: z.ZodDefault<z.ZodBoolean>;
|
|
973
1000
|
label: z.ZodDefault<z.ZodString>;
|
|
974
1001
|
value: z.ZodDefault<z.ZodString>;
|
|
1002
|
+
description: z.ZodOptional<z.ZodString>;
|
|
975
1003
|
}, z.core.$strip>>;
|
|
976
1004
|
attributes: z.ZodObject<{
|
|
977
1005
|
multiple: z.ZodLiteral<false>;
|
|
@@ -979,6 +1007,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
979
1007
|
help: z.ZodOptional<z.ZodString>;
|
|
980
1008
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
981
1009
|
}, z.core.$strip>;
|
|
1010
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
982
1011
|
meta: z.ZodObject<{
|
|
983
1012
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
984
1013
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -1027,6 +1056,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1027
1056
|
help: z.ZodOptional<z.ZodString>;
|
|
1028
1057
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
1029
1058
|
}, z.core.$strip>;
|
|
1059
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
1030
1060
|
meta: z.ZodObject<{
|
|
1031
1061
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
1032
1062
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -1092,6 +1122,7 @@ export declare const AnyQuestionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1092
1122
|
help: z.ZodOptional<z.ZodString>;
|
|
1093
1123
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
1094
1124
|
}, z.core.$strip>;
|
|
1125
|
+
showCommentField: z.ZodOptional<z.ZodBoolean>;
|
|
1095
1126
|
meta: z.ZodObject<{
|
|
1096
1127
|
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
1097
1128
|
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>;
|