@dmptool/types 1.0.0 → 1.0.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 +127 -29
- package/dist/answers/__tests__/answers.spec.d.ts +1 -0
- package/dist/answers/__tests__/answers.spec.js +127 -0
- package/dist/answers/answer.d.ts +25 -0
- package/dist/answers/answer.js +13 -0
- package/dist/answers/dateAnswers.d.ts +66 -0
- package/dist/answers/dateAnswers.js +16 -0
- package/dist/answers/graphQLAnswers.d.ts +51 -0
- package/dist/answers/graphQLAnswers.js +14 -0
- package/dist/answers/index.d.ts +880 -0
- package/dist/answers/index.js +48 -0
- package/dist/answers/optionBasedAnswers.d.ts +76 -0
- package/dist/answers/optionBasedAnswers.js +18 -0
- package/dist/answers/primitiveAnswers.d.ts +176 -0
- package/dist/answers/primitiveAnswers.js +34 -0
- package/dist/answers/tableAnswers.d.ts +876 -0
- package/dist/answers/tableAnswers.js +31 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/questions/__tests__/dateQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/dateQuestions.spec.js +149 -0
- package/dist/questions/__tests__/graphQLQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/graphQLQuestions.spec.js +87 -0
- package/dist/questions/__tests__/optionBasedQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +152 -0
- package/dist/questions/__tests__/primitiveQuestions.spec.d.ts +1 -0
- package/dist/questions/__tests__/primitiveQuestions.spec.js +189 -0
- package/dist/{dateQuestions.js → questions/dateQuestions.js} +3 -3
- package/dist/{graphQLQuestions.js → questions/graphQLQuestions.js} +3 -3
- package/dist/{tableQuestions.d.ts → questions/index.d.ts} +97 -1650
- package/dist/questions/index.js +48 -0
- package/dist/{optionBasedQuestions.js → questions/optionBasedQuestions.js} +4 -4
- package/dist/{primitiveQuestions.d.ts → questions/primitiveQuestions.d.ts} +0 -27
- package/dist/{primitiveQuestions.js → questions/primitiveQuestions.js} +8 -35
- package/dist/questions/question.d.ts +29 -0
- package/dist/questions/question.js +32 -0
- package/dist/questions/tableQuestions.d.ts +2638 -0
- package/dist/{tableQuestions.js → questions/tableQuestions.js} +5 -22
- package/dist/schemas/anyAnswer.schema.json +195 -59
- package/dist/schemas/anyTableColumnAnswer.schema.json +336 -0
- package/dist/schemas/anyTableColumnQuestion.schema.json +637 -0
- package/dist/schemas/booleanAnswer.schema.json +15 -1
- package/dist/schemas/checkboxesAnswer.schema.json +15 -1
- package/dist/schemas/currencyAnswer.schema.json +15 -1
- package/dist/schemas/datePickerAnswer.schema.json +15 -1
- package/dist/schemas/dateRangeAnswer.schema.json +15 -1
- package/dist/schemas/emailAnswer.schema.json +15 -1
- package/dist/schemas/filteredSearchAnswer.schema.json +15 -1
- package/dist/schemas/numberAnswer.schema.json +15 -1
- package/dist/schemas/radioButtonsAnswer.schema.json +15 -1
- package/dist/schemas/selectBoxAnswer.schema.json +19 -2
- package/dist/schemas/tableAnswer.schema.json +91 -18
- package/dist/schemas/textAnswer.schema.json +15 -1
- package/dist/schemas/textAreaAnswer.schema.json +15 -1
- package/dist/schemas/typeaheadSearchAnswer.schema.json +15 -1
- package/dist/schemas/urlAnswer.schema.json +15 -1
- package/package.json +8 -1
- package/dist/answers.d.ts +0 -558
- package/dist/answers.js +0 -87
- /package/dist/{dateQuestions.d.ts → questions/dateQuestions.d.ts} +0 -0
- /package/dist/{graphQLQuestions.d.ts → questions/graphQLQuestions.d.ts} +0 -0
- /package/dist/{optionBasedQuestions.d.ts → questions/optionBasedQuestions.d.ts} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TypeaheadSearchQuestion = exports.FilteredSearchQuestion = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const question_1 = require("./question");
|
|
6
6
|
// An input variable for a GraphQL query
|
|
7
7
|
const GraphQLVariable = zod_1.z.object({
|
|
8
8
|
minLength: zod_1.z.number().optional(), // A min length for the variable before executing the query
|
|
@@ -27,7 +27,7 @@ const GraphQLQuery = zod_1.z.object({
|
|
|
27
27
|
variables: zod_1.z.array(GraphQLVariable) // The variables for the query
|
|
28
28
|
});
|
|
29
29
|
// Filtered search question and answer
|
|
30
|
-
exports.FilteredSearchQuestion =
|
|
30
|
+
exports.FilteredSearchQuestion = question_1.Question.merge(zod_1.z.object({
|
|
31
31
|
type: zod_1.z.literal('filteredSearch'), // The type of question
|
|
32
32
|
graphQL: GraphQLQuery, // The GraphQL query options for the filtered search
|
|
33
33
|
attributes: zod_1.z.object({
|
|
@@ -35,7 +35,7 @@ exports.FilteredSearchQuestion = primitiveQuestions_1.Question.merge(zod_1.z.obj
|
|
|
35
35
|
})
|
|
36
36
|
}));
|
|
37
37
|
// Typeahead search question and answer
|
|
38
|
-
exports.TypeaheadSearchQuestion =
|
|
38
|
+
exports.TypeaheadSearchQuestion = question_1.Question.merge(zod_1.z.object({
|
|
39
39
|
type: zod_1.z.literal('typeaheadSearch'), // The type of question
|
|
40
40
|
graphQL: GraphQLQuery, // The GraphQL query options for the typeahead search
|
|
41
41
|
}));
|