@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.
Files changed (62) hide show
  1. package/README.md +127 -29
  2. package/dist/answers/__tests__/answers.spec.d.ts +1 -0
  3. package/dist/answers/__tests__/answers.spec.js +127 -0
  4. package/dist/answers/answer.d.ts +25 -0
  5. package/dist/answers/answer.js +13 -0
  6. package/dist/answers/dateAnswers.d.ts +66 -0
  7. package/dist/answers/dateAnswers.js +16 -0
  8. package/dist/answers/graphQLAnswers.d.ts +51 -0
  9. package/dist/answers/graphQLAnswers.js +14 -0
  10. package/dist/answers/index.d.ts +880 -0
  11. package/dist/answers/index.js +48 -0
  12. package/dist/answers/optionBasedAnswers.d.ts +76 -0
  13. package/dist/answers/optionBasedAnswers.js +18 -0
  14. package/dist/answers/primitiveAnswers.d.ts +176 -0
  15. package/dist/answers/primitiveAnswers.js +34 -0
  16. package/dist/answers/tableAnswers.d.ts +876 -0
  17. package/dist/answers/tableAnswers.js +31 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.js +19 -0
  20. package/dist/questions/__tests__/dateQuestions.spec.d.ts +1 -0
  21. package/dist/questions/__tests__/dateQuestions.spec.js +149 -0
  22. package/dist/questions/__tests__/graphQLQuestions.spec.d.ts +1 -0
  23. package/dist/questions/__tests__/graphQLQuestions.spec.js +87 -0
  24. package/dist/questions/__tests__/optionBasedQuestions.spec.d.ts +1 -0
  25. package/dist/questions/__tests__/optionBasedQuestions.spec.js +152 -0
  26. package/dist/questions/__tests__/primitiveQuestions.spec.d.ts +1 -0
  27. package/dist/questions/__tests__/primitiveQuestions.spec.js +189 -0
  28. package/dist/{dateQuestions.js → questions/dateQuestions.js} +3 -3
  29. package/dist/{graphQLQuestions.js → questions/graphQLQuestions.js} +3 -3
  30. package/dist/{tableQuestions.d.ts → questions/index.d.ts} +97 -1650
  31. package/dist/questions/index.js +48 -0
  32. package/dist/{optionBasedQuestions.js → questions/optionBasedQuestions.js} +4 -4
  33. package/dist/{primitiveQuestions.d.ts → questions/primitiveQuestions.d.ts} +0 -27
  34. package/dist/{primitiveQuestions.js → questions/primitiveQuestions.js} +8 -35
  35. package/dist/questions/question.d.ts +29 -0
  36. package/dist/questions/question.js +32 -0
  37. package/dist/questions/tableQuestions.d.ts +2638 -0
  38. package/dist/{tableQuestions.js → questions/tableQuestions.js} +5 -22
  39. package/dist/schemas/anyAnswer.schema.json +195 -59
  40. package/dist/schemas/anyTableColumnAnswer.schema.json +336 -0
  41. package/dist/schemas/anyTableColumnQuestion.schema.json +637 -0
  42. package/dist/schemas/booleanAnswer.schema.json +15 -1
  43. package/dist/schemas/checkboxesAnswer.schema.json +15 -1
  44. package/dist/schemas/currencyAnswer.schema.json +15 -1
  45. package/dist/schemas/datePickerAnswer.schema.json +15 -1
  46. package/dist/schemas/dateRangeAnswer.schema.json +15 -1
  47. package/dist/schemas/emailAnswer.schema.json +15 -1
  48. package/dist/schemas/filteredSearchAnswer.schema.json +15 -1
  49. package/dist/schemas/numberAnswer.schema.json +15 -1
  50. package/dist/schemas/radioButtonsAnswer.schema.json +15 -1
  51. package/dist/schemas/selectBoxAnswer.schema.json +19 -2
  52. package/dist/schemas/tableAnswer.schema.json +91 -18
  53. package/dist/schemas/textAnswer.schema.json +15 -1
  54. package/dist/schemas/textAreaAnswer.schema.json +15 -1
  55. package/dist/schemas/typeaheadSearchAnswer.schema.json +15 -1
  56. package/dist/schemas/urlAnswer.schema.json +15 -1
  57. package/package.json +8 -1
  58. package/dist/answers.d.ts +0 -558
  59. package/dist/answers.js +0 -87
  60. /package/dist/{dateQuestions.d.ts → questions/dateQuestions.d.ts} +0 -0
  61. /package/dist/{graphQLQuestions.d.ts → questions/graphQLQuestions.d.ts} +0 -0
  62. /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 primitiveQuestions_1 = require("./primitiveQuestions");
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 = primitiveQuestions_1.Question.merge(zod_1.z.object({
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 = primitiveQuestions_1.Question.merge(zod_1.z.object({
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
  }));