@dmptool/types 1.1.0 → 1.1.2
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 +2 -0
- package/dist/answers/__tests__/answers.spec.js +13 -7
- package/dist/answers/answer.d.ts +3 -3
- package/dist/answers/graphQLAnswers.d.ts +2 -2
- package/dist/answers/graphQLAnswers.js +2 -2
- package/dist/answers/index.d.ts +111 -74
- package/dist/answers/index.js +4 -4
- package/dist/answers/numberAnswers.d.ts +0 -25
- package/dist/answers/numberAnswers.js +1 -5
- package/dist/answers/optionBasedAnswers.d.ts +52 -2
- package/dist/answers/optionBasedAnswers.js +9 -1
- package/dist/answers/tableAnswers.d.ts +304 -140
- package/dist/answers/tableAnswers.js +3 -2
- package/dist/questions/__tests__/graphQLQuestions.spec.js +7 -7
- package/dist/questions/__tests__/numberQuestions.spec.js +0 -48
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +98 -1
- package/dist/questions/dateQuestions.d.ts +47 -16
- package/dist/questions/dateQuestions.js +25 -1
- package/dist/questions/graphQLQuestions.d.ts +59 -28
- package/dist/questions/graphQLQuestions.js +40 -3
- package/dist/questions/index.d.ts +1567 -689
- package/dist/questions/index.js +7 -4
- package/dist/questions/numberQuestions.d.ts +71 -76
- package/dist/questions/numberQuestions.js +37 -8
- package/dist/questions/optionBasedQuestions.d.ts +227 -23
- package/dist/questions/optionBasedQuestions.js +89 -5
- package/dist/questions/question.d.ts +51 -4
- package/dist/questions/question.js +14 -2
- package/dist/questions/tableQuestions.d.ts +1965 -1056
- package/dist/questions/tableQuestions.js +14 -2
- package/dist/questions/textQuestions.d.ts +100 -40
- package/dist/questions/textQuestions.js +45 -7
- package/dist/schemas/affiliationSearchAnswer.schema.json +37 -0
- package/dist/schemas/affiliationSearchQuestion.schema.json +133 -0
- package/dist/schemas/anyAnswer.schema.json +41 -23
- package/dist/schemas/anyQuestion.schema.json +563 -146
- package/dist/schemas/anyTableColumnAnswer.schema.json +35 -14
- package/dist/schemas/anyTableColumnQuestion.schema.json +398 -119
- package/dist/schemas/booleanQuestion.schema.json +12 -0
- package/dist/schemas/checkboxesQuestion.schema.json +12 -0
- package/dist/schemas/currencyQuestion.schema.json +12 -0
- package/dist/schemas/dateQuestion.schema.json +12 -0
- package/dist/schemas/dateRangeQuestion.schema.json +12 -0
- package/dist/schemas/emailQuestion.schema.json +12 -0
- package/dist/schemas/filteredSearchQuestion.schema.json +10 -0
- package/dist/schemas/multiselectBoxAnswer.schema.json +40 -0
- package/dist/schemas/multiselectBoxQuestion.schema.json +90 -0
- package/dist/schemas/numberQuestion.schema.json +12 -0
- package/dist/schemas/numberRangeQuestion.schema.json +12 -0
- package/dist/schemas/radioButtonsQuestion.schema.json +12 -0
- package/dist/schemas/selectBoxAnswer.schema.json +1 -4
- package/dist/schemas/selectBoxQuestion.schema.json +18 -1
- package/dist/schemas/tableAnswer.schema.json +35 -14
- package/dist/schemas/tableQuestion.schema.json +420 -120
- package/dist/schemas/textAreaQuestion.schema.json +15 -4
- package/dist/schemas/textQuestion.schema.json +12 -0
- package/dist/schemas/urlQuestion.schema.json +12 -0
- package/package.json +1 -1
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SelectBoxAnswerSchema = exports.RadioButtonsAnswerSchema = exports.CheckboxesAnswerSchema = void 0;
|
|
3
|
+
exports.MultiselectBoxAnswerSchema = exports.SelectBoxAnswerSchema = exports.RadioButtonsAnswerSchema = exports.CheckboxesAnswerSchema = exports.BooleanAnswerSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const answer_1 = require("./answer");
|
|
6
6
|
// Answers to Option Based Question Types
|
|
7
|
+
exports.BooleanAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
8
|
+
type: zod_1.z.literal('boolean'), // The type of answer
|
|
9
|
+
answer: zod_1.z.boolean() // The answer to the question (true/false)
|
|
10
|
+
}));
|
|
7
11
|
exports.CheckboxesAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
8
12
|
type: zod_1.z.literal('checkBoxes'), // The type of answer
|
|
9
13
|
answer: zod_1.z.array(zod_1.z.string()) // The answer to the question (array of strings)
|
|
@@ -14,5 +18,9 @@ exports.RadioButtonsAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
|
14
18
|
}));
|
|
15
19
|
exports.SelectBoxAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
16
20
|
type: zod_1.z.literal('selectBox'), // The type of answer
|
|
21
|
+
answer: zod_1.z.string() // The answer to the question (string)
|
|
22
|
+
}));
|
|
23
|
+
exports.MultiselectBoxAnswerSchema = answer_1.AnswerSchema.merge(zod_1.z.object({
|
|
24
|
+
type: zod_1.z.literal('multiselectBox'), // The type of answer
|
|
17
25
|
answer: zod_1.z.array(zod_1.z.string()) // The answer to the question (array of strings)
|
|
18
26
|
}));
|