@dmptool/types 1.0.6 → 1.0.7

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 (43) hide show
  1. package/README.md +5 -4
  2. package/dist/answers/__tests__/answers.spec.js +59 -7
  3. package/dist/answers/answer.d.ts +3 -3
  4. package/dist/answers/dateAnswers.d.ts +5 -5
  5. package/dist/answers/dateAnswers.js +3 -3
  6. package/dist/answers/index.d.ts +892 -513
  7. package/dist/answers/index.js +3 -2
  8. package/dist/answers/primitiveAnswers.d.ts +39 -0
  9. package/dist/answers/primitiveAnswers.js +8 -1
  10. package/dist/answers/tableAnswers.d.ts +1639 -32
  11. package/dist/answers/tableAnswers.js +10 -3
  12. package/dist/questions/__tests__/dateQuestions.spec.js +20 -20
  13. package/dist/questions/__tests__/primitiveQuestions.spec.js +92 -0
  14. package/dist/questions/__tests__/tableQuestion.spec.d.ts +1 -0
  15. package/dist/questions/__tests__/tableQuestion.spec.js +73 -0
  16. package/dist/questions/dateQuestions.d.ts +19 -19
  17. package/dist/questions/dateQuestions.js +8 -8
  18. package/dist/questions/graphQLQuestions.d.ts +20 -20
  19. package/dist/questions/graphQLQuestions.js +1 -1
  20. package/dist/questions/index.d.ts +1856 -1413
  21. package/dist/questions/index.js +3 -2
  22. package/dist/questions/optionBasedQuestions.js +1 -1
  23. package/dist/questions/primitiveQuestions.d.ts +192 -0
  24. package/dist/questions/primitiveQuestions.js +17 -1
  25. package/dist/questions/question.d.ts +4 -4
  26. package/dist/questions/question.js +2 -1
  27. package/dist/questions/tableQuestions.d.ts +2124 -145
  28. package/dist/questions/tableQuestions.js +7 -3
  29. package/dist/schemas/anyAnswer.schema.json +144 -119
  30. package/dist/schemas/anyQuestion.schema.json +148 -137
  31. package/dist/schemas/anyTableColumnAnswer.schema.json +1 -1
  32. package/dist/schemas/anyTableColumnQuestion.schema.json +2 -3
  33. package/dist/schemas/dateAnswer.schema.json +37 -0
  34. package/dist/schemas/datePickerAnswer.schema.json +4 -4
  35. package/dist/schemas/datePickerQuestion.schema.json +6 -5
  36. package/dist/schemas/dateQuestion.schema.json +51 -0
  37. package/dist/schemas/dateRangeQuestion.schema.json +1 -1
  38. package/dist/schemas/filteredSearchQuestion.schema.json +1 -2
  39. package/dist/schemas/numberRangeAnswer.schema.json +50 -0
  40. package/dist/schemas/numberRangeQuestion.schema.json +106 -0
  41. package/dist/schemas/tableAnswer.schema.json +349 -324
  42. package/dist/schemas/tableQuestion.schema.json +491 -480
  43. package/package.json +1 -1
@@ -11,338 +11,363 @@
11
11
  "answer": {
12
12
  "type": "array",
13
13
  "items": {
14
- "anyOf": [
15
- {
16
- "type": "object",
17
- "properties": {
18
- "type": {
19
- "type": "string",
20
- "const": "boolean"
21
- },
22
- "answer": {
23
- "type": "boolean"
24
- },
25
- "meta": {
26
- "type": "object",
27
- "properties": {
28
- "schemaVersion": {
29
- "type": "string",
30
- "const": "1.0"
31
- }
32
- },
33
- "required": [
34
- "schemaVersion"
35
- ],
36
- "additionalProperties": false
37
- }
38
- },
39
- "required": [
40
- "type",
41
- "answer",
42
- "meta"
43
- ],
44
- "additionalProperties": false
45
- },
46
- {
47
- "type": "object",
48
- "properties": {
49
- "type": {
50
- "type": "string",
51
- "const": "checkBoxes"
52
- },
53
- "answer": {
54
- "type": "array",
55
- "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "columns": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "properties": {
21
+ "heading": {
56
22
  "type": "string"
57
- }
58
- },
59
- "meta": {
60
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
61
- }
62
- },
63
- "required": [
64
- "type",
65
- "answer",
66
- "meta"
67
- ],
68
- "additionalProperties": false
69
- },
70
- {
71
- "type": "object",
72
- "properties": {
73
- "type": {
74
- "type": "string",
75
- "const": "currency"
76
- },
77
- "answer": {
78
- "type": "number"
79
- },
80
- "meta": {
81
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
82
- }
83
- },
84
- "required": [
85
- "type",
86
- "answer",
87
- "meta"
88
- ],
89
- "additionalProperties": false
90
- },
91
- {
92
- "type": "object",
93
- "properties": {
94
- "type": {
95
- "type": "string",
96
- "const": "datePicker"
97
- },
98
- "answer": {
99
- "type": "string"
100
- },
101
- "meta": {
102
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
103
- }
104
- },
105
- "required": [
106
- "type",
107
- "answer",
108
- "meta"
109
- ],
110
- "additionalProperties": false
111
- },
112
- {
113
- "type": "object",
114
- "properties": {
115
- "type": {
116
- "type": "string",
117
- "const": "dateRange"
118
- },
119
- "answer": {
120
- "type": "object",
121
- "properties": {
122
- "start": {
123
- "type": "string"
124
- },
125
- "end": {
126
- "type": "string"
127
- }
128
23
  },
129
- "required": [
130
- "start",
131
- "end"
132
- ],
133
- "additionalProperties": false
134
- },
135
- "meta": {
136
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
137
- }
138
- },
139
- "required": [
140
- "type",
141
- "answer",
142
- "meta"
143
- ],
144
- "additionalProperties": false
145
- },
146
- {
147
- "type": "object",
148
- "properties": {
149
- "type": {
150
- "type": "string",
151
- "const": "email"
152
- },
153
- "answer": {
154
- "type": "string"
155
- },
156
- "meta": {
157
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
158
- }
159
- },
160
- "required": [
161
- "type",
162
- "answer",
163
- "meta"
164
- ],
165
- "additionalProperties": false
166
- },
167
- {
168
- "type": "object",
169
- "properties": {
170
- "type": {
171
- "type": "string",
172
- "const": "filteredSearch"
173
- },
174
- "answer": {
175
- "type": "array",
176
- "items": {
177
- "type": "string"
24
+ "content": {
25
+ "anyOf": [
26
+ {
27
+ "type": "object",
28
+ "properties": {
29
+ "type": {
30
+ "type": "string",
31
+ "const": "boolean"
32
+ },
33
+ "answer": {
34
+ "type": "boolean"
35
+ },
36
+ "meta": {
37
+ "type": "object",
38
+ "properties": {
39
+ "schemaVersion": {
40
+ "type": "string",
41
+ "const": "1.0"
42
+ }
43
+ },
44
+ "required": [
45
+ "schemaVersion"
46
+ ],
47
+ "additionalProperties": false
48
+ }
49
+ },
50
+ "required": [
51
+ "type",
52
+ "answer",
53
+ "meta"
54
+ ],
55
+ "additionalProperties": false
56
+ },
57
+ {
58
+ "type": "object",
59
+ "properties": {
60
+ "type": {
61
+ "type": "string",
62
+ "const": "checkBoxes"
63
+ },
64
+ "answer": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "meta": {
71
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
72
+ }
73
+ },
74
+ "required": [
75
+ "type",
76
+ "answer",
77
+ "meta"
78
+ ],
79
+ "additionalProperties": false
80
+ },
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "type": {
85
+ "type": "string",
86
+ "const": "currency"
87
+ },
88
+ "answer": {
89
+ "type": "number"
90
+ },
91
+ "meta": {
92
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
93
+ }
94
+ },
95
+ "required": [
96
+ "type",
97
+ "answer",
98
+ "meta"
99
+ ],
100
+ "additionalProperties": false
101
+ },
102
+ {
103
+ "type": "object",
104
+ "properties": {
105
+ "type": {
106
+ "type": "string",
107
+ "const": "date"
108
+ },
109
+ "answer": {
110
+ "type": "string"
111
+ },
112
+ "meta": {
113
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
114
+ }
115
+ },
116
+ "required": [
117
+ "type",
118
+ "answer",
119
+ "meta"
120
+ ],
121
+ "additionalProperties": false
122
+ },
123
+ {
124
+ "type": "object",
125
+ "properties": {
126
+ "type": {
127
+ "type": "string",
128
+ "const": "dateRange"
129
+ },
130
+ "answer": {
131
+ "type": "object",
132
+ "properties": {
133
+ "start": {
134
+ "type": "string"
135
+ },
136
+ "end": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "required": [
141
+ "start",
142
+ "end"
143
+ ],
144
+ "additionalProperties": false
145
+ },
146
+ "meta": {
147
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
148
+ }
149
+ },
150
+ "required": [
151
+ "type",
152
+ "answer",
153
+ "meta"
154
+ ],
155
+ "additionalProperties": false
156
+ },
157
+ {
158
+ "type": "object",
159
+ "properties": {
160
+ "type": {
161
+ "type": "string",
162
+ "const": "email"
163
+ },
164
+ "answer": {
165
+ "type": "string"
166
+ },
167
+ "meta": {
168
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
169
+ }
170
+ },
171
+ "required": [
172
+ "type",
173
+ "answer",
174
+ "meta"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ {
179
+ "type": "object",
180
+ "properties": {
181
+ "type": {
182
+ "type": "string",
183
+ "const": "filteredSearch"
184
+ },
185
+ "answer": {
186
+ "type": "array",
187
+ "items": {
188
+ "type": "string"
189
+ }
190
+ },
191
+ "meta": {
192
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
193
+ }
194
+ },
195
+ "required": [
196
+ "type",
197
+ "answer",
198
+ "meta"
199
+ ],
200
+ "additionalProperties": false
201
+ },
202
+ {
203
+ "type": "object",
204
+ "properties": {
205
+ "type": {
206
+ "type": "string",
207
+ "const": "number"
208
+ },
209
+ "answer": {
210
+ "type": "number"
211
+ },
212
+ "meta": {
213
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
214
+ }
215
+ },
216
+ "required": [
217
+ "type",
218
+ "answer",
219
+ "meta"
220
+ ],
221
+ "additionalProperties": false
222
+ },
223
+ {
224
+ "type": "object",
225
+ "properties": {
226
+ "type": {
227
+ "type": "string",
228
+ "const": "radioButtons"
229
+ },
230
+ "answer": {
231
+ "type": "string"
232
+ },
233
+ "meta": {
234
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
235
+ }
236
+ },
237
+ "required": [
238
+ "type",
239
+ "answer",
240
+ "meta"
241
+ ],
242
+ "additionalProperties": false
243
+ },
244
+ {
245
+ "type": "object",
246
+ "properties": {
247
+ "type": {
248
+ "type": "string",
249
+ "const": "selectBox"
250
+ },
251
+ "answer": {
252
+ "type": "array",
253
+ "items": {
254
+ "type": "string"
255
+ }
256
+ },
257
+ "meta": {
258
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
259
+ }
260
+ },
261
+ "required": [
262
+ "type",
263
+ "answer",
264
+ "meta"
265
+ ],
266
+ "additionalProperties": false
267
+ },
268
+ {
269
+ "type": "object",
270
+ "properties": {
271
+ "type": {
272
+ "type": "string",
273
+ "const": "text"
274
+ },
275
+ "answer": {
276
+ "type": "string"
277
+ },
278
+ "meta": {
279
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
280
+ }
281
+ },
282
+ "required": [
283
+ "type",
284
+ "answer",
285
+ "meta"
286
+ ],
287
+ "additionalProperties": false
288
+ },
289
+ {
290
+ "type": "object",
291
+ "properties": {
292
+ "type": {
293
+ "type": "string",
294
+ "const": "textArea"
295
+ },
296
+ "answer": {
297
+ "type": "string"
298
+ },
299
+ "meta": {
300
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
301
+ }
302
+ },
303
+ "required": [
304
+ "type",
305
+ "answer",
306
+ "meta"
307
+ ],
308
+ "additionalProperties": false
309
+ },
310
+ {
311
+ "type": "object",
312
+ "properties": {
313
+ "type": {
314
+ "type": "string",
315
+ "const": "typeaheadSearch"
316
+ },
317
+ "answer": {
318
+ "type": "string"
319
+ },
320
+ "meta": {
321
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
322
+ }
323
+ },
324
+ "required": [
325
+ "type",
326
+ "answer",
327
+ "meta"
328
+ ],
329
+ "additionalProperties": false
330
+ },
331
+ {
332
+ "type": "object",
333
+ "properties": {
334
+ "type": {
335
+ "type": "string",
336
+ "const": "url"
337
+ },
338
+ "answer": {
339
+ "type": "string"
340
+ },
341
+ "meta": {
342
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
343
+ }
344
+ },
345
+ "required": [
346
+ "type",
347
+ "answer",
348
+ "meta"
349
+ ],
350
+ "additionalProperties": false
351
+ }
352
+ ]
178
353
  }
179
354
  },
180
- "meta": {
181
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
182
- }
183
- },
184
- "required": [
185
- "type",
186
- "answer",
187
- "meta"
188
- ],
189
- "additionalProperties": false
190
- },
191
- {
192
- "type": "object",
193
- "properties": {
194
- "type": {
195
- "type": "string",
196
- "const": "number"
197
- },
198
- "answer": {
199
- "type": "number"
200
- },
201
- "meta": {
202
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
203
- }
204
- },
205
- "required": [
206
- "type",
207
- "answer",
208
- "meta"
209
- ],
210
- "additionalProperties": false
211
- },
212
- {
213
- "type": "object",
214
- "properties": {
215
- "type": {
216
- "type": "string",
217
- "const": "radioButtons"
218
- },
219
- "answer": {
220
- "type": "string"
221
- },
222
- "meta": {
223
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
224
- }
225
- },
226
- "required": [
227
- "type",
228
- "answer",
229
- "meta"
230
- ],
231
- "additionalProperties": false
232
- },
233
- {
234
- "type": "object",
235
- "properties": {
236
- "type": {
237
- "type": "string",
238
- "const": "selectBox"
239
- },
240
- "answer": {
241
- "type": "array",
242
- "items": {
243
- "type": "string"
244
- }
245
- },
246
- "meta": {
247
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
248
- }
249
- },
250
- "required": [
251
- "type",
252
- "answer",
253
- "meta"
254
- ],
255
- "additionalProperties": false
256
- },
257
- {
258
- "type": "object",
259
- "properties": {
260
- "type": {
261
- "type": "string",
262
- "const": "text"
263
- },
264
- "answer": {
265
- "type": "string"
266
- },
267
- "meta": {
268
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
269
- }
270
- },
271
- "required": [
272
- "type",
273
- "answer",
274
- "meta"
275
- ],
276
- "additionalProperties": false
277
- },
278
- {
279
- "type": "object",
280
- "properties": {
281
- "type": {
282
- "type": "string",
283
- "const": "textArea"
284
- },
285
- "answer": {
286
- "type": "string"
287
- },
288
- "meta": {
289
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
290
- }
291
- },
292
- "required": [
293
- "type",
294
- "answer",
295
- "meta"
296
- ],
297
- "additionalProperties": false
298
- },
299
- {
300
- "type": "object",
301
- "properties": {
302
- "type": {
303
- "type": "string",
304
- "const": "typeaheadSearch"
305
- },
306
- "answer": {
307
- "type": "string"
308
- },
309
- "meta": {
310
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
311
- }
312
- },
313
- "required": [
314
- "type",
315
- "answer",
316
- "meta"
317
- ],
318
- "additionalProperties": false
319
- },
320
- {
321
- "type": "object",
322
- "properties": {
323
- "type": {
324
- "type": "string",
325
- "const": "url"
326
- },
327
- "answer": {
328
- "type": "string"
329
- },
330
- "meta": {
331
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
332
- }
333
- },
334
- "required": [
335
- "type",
336
- "answer",
337
- "meta"
338
- ],
339
- "additionalProperties": false
355
+ "required": [
356
+ "heading",
357
+ "content"
358
+ ],
359
+ "additionalProperties": false
360
+ }
340
361
  }
341
- ]
362
+ },
363
+ "required": [
364
+ "columns"
365
+ ],
366
+ "additionalProperties": false
342
367
  }
343
368
  },
344
369
  "meta": {
345
- "$ref": "#/definitions/TableAnswer/properties/answer/items/anyOf/0/properties/meta"
370
+ "$ref": "#/definitions/TableAnswer/properties/answer/items/properties/columns/items/properties/content/anyOf/0/properties/meta"
346
371
  }
347
372
  },
348
373
  "required": [