@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.
Files changed (58) hide show
  1. package/README.md +2 -0
  2. package/dist/answers/__tests__/answers.spec.js +13 -7
  3. package/dist/answers/answer.d.ts +3 -3
  4. package/dist/answers/graphQLAnswers.d.ts +2 -2
  5. package/dist/answers/graphQLAnswers.js +2 -2
  6. package/dist/answers/index.d.ts +111 -74
  7. package/dist/answers/index.js +4 -4
  8. package/dist/answers/numberAnswers.d.ts +0 -25
  9. package/dist/answers/numberAnswers.js +1 -5
  10. package/dist/answers/optionBasedAnswers.d.ts +52 -2
  11. package/dist/answers/optionBasedAnswers.js +9 -1
  12. package/dist/answers/tableAnswers.d.ts +304 -140
  13. package/dist/answers/tableAnswers.js +3 -2
  14. package/dist/questions/__tests__/graphQLQuestions.spec.js +7 -7
  15. package/dist/questions/__tests__/numberQuestions.spec.js +0 -48
  16. package/dist/questions/__tests__/optionBasedQuestions.spec.js +98 -1
  17. package/dist/questions/dateQuestions.d.ts +47 -16
  18. package/dist/questions/dateQuestions.js +25 -1
  19. package/dist/questions/graphQLQuestions.d.ts +59 -28
  20. package/dist/questions/graphQLQuestions.js +40 -3
  21. package/dist/questions/index.d.ts +1567 -689
  22. package/dist/questions/index.js +7 -4
  23. package/dist/questions/numberQuestions.d.ts +71 -76
  24. package/dist/questions/numberQuestions.js +37 -8
  25. package/dist/questions/optionBasedQuestions.d.ts +227 -23
  26. package/dist/questions/optionBasedQuestions.js +89 -5
  27. package/dist/questions/question.d.ts +51 -4
  28. package/dist/questions/question.js +14 -2
  29. package/dist/questions/tableQuestions.d.ts +1965 -1056
  30. package/dist/questions/tableQuestions.js +14 -2
  31. package/dist/questions/textQuestions.d.ts +100 -40
  32. package/dist/questions/textQuestions.js +45 -7
  33. package/dist/schemas/affiliationSearchAnswer.schema.json +37 -0
  34. package/dist/schemas/affiliationSearchQuestion.schema.json +133 -0
  35. package/dist/schemas/anyAnswer.schema.json +41 -23
  36. package/dist/schemas/anyQuestion.schema.json +563 -146
  37. package/dist/schemas/anyTableColumnAnswer.schema.json +35 -14
  38. package/dist/schemas/anyTableColumnQuestion.schema.json +398 -119
  39. package/dist/schemas/booleanQuestion.schema.json +12 -0
  40. package/dist/schemas/checkboxesQuestion.schema.json +12 -0
  41. package/dist/schemas/currencyQuestion.schema.json +12 -0
  42. package/dist/schemas/dateQuestion.schema.json +12 -0
  43. package/dist/schemas/dateRangeQuestion.schema.json +12 -0
  44. package/dist/schemas/emailQuestion.schema.json +12 -0
  45. package/dist/schemas/filteredSearchQuestion.schema.json +10 -0
  46. package/dist/schemas/multiselectBoxAnswer.schema.json +40 -0
  47. package/dist/schemas/multiselectBoxQuestion.schema.json +90 -0
  48. package/dist/schemas/numberQuestion.schema.json +12 -0
  49. package/dist/schemas/numberRangeQuestion.schema.json +12 -0
  50. package/dist/schemas/radioButtonsQuestion.schema.json +12 -0
  51. package/dist/schemas/selectBoxAnswer.schema.json +1 -4
  52. package/dist/schemas/selectBoxQuestion.schema.json +18 -1
  53. package/dist/schemas/tableAnswer.schema.json +35 -14
  54. package/dist/schemas/tableQuestion.schema.json +420 -120
  55. package/dist/schemas/textAreaQuestion.schema.json +15 -4
  56. package/dist/schemas/textQuestion.schema.json +12 -0
  57. package/dist/schemas/urlQuestion.schema.json +12 -0
  58. package/package.json +1 -1
@@ -44,6 +44,18 @@
44
44
  "schemaVersion": {
45
45
  "type": "string",
46
46
  "const": "1.0"
47
+ },
48
+ "title": {
49
+ "type": "string",
50
+ "const": "Table"
51
+ },
52
+ "usageDescription": {
53
+ "type": "string",
54
+ "const": "For questions that require a tabular format."
55
+ },
56
+ "defaultJSON": {
57
+ "type": "string",
58
+ "const": "{\"type\":\"table\",\"columns\":[],\"attributes\":{\"canAddRows\":true,\"canRemoveRows\":true,\"initialRows\":1},\"meta\":{\"schemaVersion\":\"1.0\"}}"
47
59
  }
48
60
  },
49
61
  "required": [
@@ -66,7 +78,7 @@
66
78
  "properties": {
67
79
  "type": {
68
80
  "type": "string",
69
- "const": "boolean"
81
+ "const": "affiliationSearch"
70
82
  },
71
83
  "attributes": {
72
84
  "type": "object",
@@ -79,19 +91,111 @@
79
91
  },
80
92
  "labelTranslationKey": {
81
93
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
82
- },
83
- "checked": {
84
- "type": "boolean"
85
94
  }
86
95
  },
87
96
  "additionalProperties": false
88
97
  },
89
98
  "meta": {
90
- "$ref": "#/definitions/TableQuestion/properties/meta"
99
+ "type": "object",
100
+ "properties": {
101
+ "schemaVersion": {
102
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
103
+ },
104
+ "title": {
105
+ "type": "string",
106
+ "const": "Affiliation Search"
107
+ },
108
+ "usageDescription": {
109
+ "type": "string",
110
+ "const": "For questions that require the user to select from a controlled list of institutions."
111
+ },
112
+ "defaultJSON": {
113
+ "type": "string",
114
+ "const": "{\"type\":\"affiliationSearch\",\"attributes\":{},\"meta\":{\"schemaVersion\":\"1.0\"},\"graphQL\":{\"query\":\"query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}\",\"queryId\":\"useAffiliationsQuery\",\"variables\":[{\"name\":\"term\",\"type\":\"string\",\"label\":\"Search for your institution\",\"minLength\":3,\"labelTranslationKey\":\"SignupPage.institutionHelp\"}],\"answerField\":\"uri\",\"displayFields\":[{\"label\":\"Institution\",\"propertyName\":\"displayName\",\"labelTranslationKey\":\"SignupPage.institution\"}],\"responseField\":\"affiliations.items\"}}"
115
+ }
116
+ },
117
+ "required": [
118
+ "schemaVersion"
119
+ ],
120
+ "additionalProperties": false
121
+ },
122
+ "graphQL": {
123
+ "type": "object",
124
+ "properties": {
125
+ "displayFields": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object",
129
+ "properties": {
130
+ "propertyName": {
131
+ "type": "string"
132
+ },
133
+ "label": {
134
+ "type": "string"
135
+ },
136
+ "labelTranslationKey": {
137
+ "type": "string"
138
+ }
139
+ },
140
+ "required": [
141
+ "propertyName",
142
+ "label"
143
+ ],
144
+ "additionalProperties": false
145
+ }
146
+ },
147
+ "localQueryId": {
148
+ "type": "string"
149
+ },
150
+ "query": {
151
+ "type": "string"
152
+ },
153
+ "responseField": {
154
+ "type": "string"
155
+ },
156
+ "variables": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "object",
160
+ "properties": {
161
+ "minLength": {
162
+ "type": "number"
163
+ },
164
+ "label": {
165
+ "type": "string"
166
+ },
167
+ "labelTranslationKey": {
168
+ "type": "string"
169
+ },
170
+ "name": {
171
+ "type": "string"
172
+ },
173
+ "type": {
174
+ "type": "string"
175
+ },
176
+ "defaultValue": {
177
+ "type": "string"
178
+ }
179
+ },
180
+ "required": [
181
+ "name",
182
+ "type"
183
+ ],
184
+ "additionalProperties": false
185
+ }
186
+ }
187
+ },
188
+ "required": [
189
+ "displayFields",
190
+ "responseField"
191
+ ],
192
+ "additionalProperties": false
91
193
  }
92
194
  },
93
195
  "required": [
94
- "type"
196
+ "type",
197
+ "meta",
198
+ "graphQL"
95
199
  ],
96
200
  "additionalProperties": false
97
201
  },
@@ -100,7 +204,7 @@
100
204
  "properties": {
101
205
  "type": {
102
206
  "type": "string",
103
- "const": "checkBoxes"
207
+ "const": "boolean"
104
208
  },
105
209
  "attributes": {
106
210
  "type": "object",
@@ -113,12 +217,76 @@
113
217
  },
114
218
  "labelTranslationKey": {
115
219
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
220
+ },
221
+ "checked": {
222
+ "type": "boolean"
116
223
  }
117
224
  },
118
225
  "additionalProperties": false
119
226
  },
120
227
  "meta": {
121
- "$ref": "#/definitions/TableQuestion/properties/meta"
228
+ "type": "object",
229
+ "properties": {
230
+ "schemaVersion": {
231
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
232
+ },
233
+ "title": {
234
+ "type": "string",
235
+ "const": "Yes/No Field"
236
+ },
237
+ "usageDescription": {
238
+ "type": "string",
239
+ "const": "For questions that require a simple Yes/No response."
240
+ },
241
+ "defaultJSON": {
242
+ "type": "string",
243
+ "const": "{\n \"attributes\": {\n \"checked\": false\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
244
+ }
245
+ },
246
+ "required": [
247
+ "schemaVersion"
248
+ ],
249
+ "additionalProperties": false
250
+ }
251
+ },
252
+ "required": [
253
+ "type"
254
+ ],
255
+ "additionalProperties": false
256
+ },
257
+ {
258
+ "type": "object",
259
+ "properties": {
260
+ "type": {
261
+ "type": "string",
262
+ "const": "checkBoxes"
263
+ },
264
+ "attributes": {
265
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes"
266
+ },
267
+ "meta": {
268
+ "type": "object",
269
+ "properties": {
270
+ "schemaVersion": {
271
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
272
+ },
273
+ "title": {
274
+ "type": "string",
275
+ "const": "Check Boxes"
276
+ },
277
+ "usageDescription": {
278
+ "type": "string",
279
+ "const": "For multiple choice questions where users can select multiple options."
280
+ },
281
+ "defaultJSON": {
282
+ "type": "string",
283
+ "const": "{\n \"type\": \"checkBoxes\",\n \"attributes\": {},\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"1\",\n \"checked\": false\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
284
+ }
285
+ },
286
+ "required": [
287
+ "schemaVersion"
288
+ ],
289
+ "additionalProperties": false
122
290
  },
123
291
  "options": {
124
292
  "type": "array",
@@ -184,7 +352,28 @@
184
352
  "additionalProperties": false
185
353
  },
186
354
  "meta": {
187
- "$ref": "#/definitions/TableQuestion/properties/meta"
355
+ "type": "object",
356
+ "properties": {
357
+ "schemaVersion": {
358
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
359
+ },
360
+ "title": {
361
+ "type": "string",
362
+ "const": "Currency Field"
363
+ },
364
+ "usageDescription": {
365
+ "type": "string",
366
+ "const": "For questions that require a monetary amount (e.g. Cost or Budget)."
367
+ },
368
+ "defaultJSON": {
369
+ "type": "string",
370
+ "const": "{\n \"type\": \"currency\",\n \"attributes\": {\n \"denomination\": \"USD\",\n \"min\": 0,\n \"step\": 1\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
371
+ }
372
+ },
373
+ "required": [
374
+ "schemaVersion"
375
+ ],
376
+ "additionalProperties": false
188
377
  }
189
378
  },
190
379
  "required": [
@@ -224,7 +413,28 @@
224
413
  "additionalProperties": false
225
414
  },
226
415
  "meta": {
227
- "$ref": "#/definitions/TableQuestion/properties/meta"
416
+ "type": "object",
417
+ "properties": {
418
+ "schemaVersion": {
419
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
420
+ },
421
+ "title": {
422
+ "type": "string",
423
+ "const": "Date Field"
424
+ },
425
+ "usageDescription": {
426
+ "type": "string",
427
+ "const": "For questions that require a date."
428
+ },
429
+ "defaultJSON": {
430
+ "type": "string",
431
+ "const": "{\"type\":\"date\",\"attributes\":{\"step\":1},\"meta\":{\"schemaVersion\":\"1.0\"}}"
432
+ }
433
+ },
434
+ "required": [
435
+ "schemaVersion"
436
+ ],
437
+ "additionalProperties": false
228
438
  }
229
439
  },
230
440
  "required": [
@@ -240,19 +450,40 @@
240
450
  "const": "dateRange"
241
451
  },
242
452
  "attributes": {
243
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/1/properties/attributes"
453
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes"
244
454
  },
245
455
  "meta": {
246
- "$ref": "#/definitions/TableQuestion/properties/meta"
456
+ "type": "object",
457
+ "properties": {
458
+ "schemaVersion": {
459
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
460
+ },
461
+ "title": {
462
+ "type": "string",
463
+ "const": "Date Range"
464
+ },
465
+ "usageDescription": {
466
+ "type": "string",
467
+ "const": "For questions that require a date range (e.g. From/To, Start/End)"
468
+ },
469
+ "defaultJSON": {
470
+ "type": "string",
471
+ "const": "{\"type\":\"dateRange\",\"attributes\":{},\"columns\":{\"start\":{\"label\":\"Start\",\"step\":1},\"end\":{\"label\":\"End\",\"step\":1}}}"
472
+ }
473
+ },
474
+ "required": [
475
+ "schemaVersion"
476
+ ],
477
+ "additionalProperties": false
247
478
  },
248
479
  "columns": {
249
480
  "type": "object",
250
481
  "properties": {
251
482
  "start": {
252
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/3/properties/attributes"
483
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes"
253
484
  },
254
485
  "end": {
255
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/3/properties/attributes"
486
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes"
256
487
  }
257
488
  },
258
489
  "additionalProperties": false
@@ -299,7 +530,28 @@
299
530
  "additionalProperties": false
300
531
  },
301
532
  "meta": {
302
- "$ref": "#/definitions/TableQuestion/properties/meta"
533
+ "type": "object",
534
+ "properties": {
535
+ "schemaVersion": {
536
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
537
+ },
538
+ "title": {
539
+ "type": "string",
540
+ "const": "Email Field"
541
+ },
542
+ "usageDescription": {
543
+ "type": "string",
544
+ "const": "For questions that require require email address(es)."
545
+ },
546
+ "defaultJSON": {
547
+ "type": "string",
548
+ "const": "{\"type\":\"email\",\"attributes\":{\"maxLength\":255,\"minLength\":1,\"multiple\":false},\"meta\":{\"schemaVersion\":\"1.0\"}}"
549
+ }
550
+ },
551
+ "required": [
552
+ "schemaVersion"
553
+ ],
554
+ "additionalProperties": false
303
555
  }
304
556
  },
305
557
  "required": [
@@ -333,79 +585,29 @@
333
585
  "additionalProperties": false
334
586
  },
335
587
  "meta": {
336
- "$ref": "#/definitions/TableQuestion/properties/meta"
337
- },
338
- "graphQL": {
339
588
  "type": "object",
340
589
  "properties": {
341
- "displayFields": {
342
- "type": "array",
343
- "items": {
344
- "type": "object",
345
- "properties": {
346
- "propertyName": {
347
- "type": "string"
348
- },
349
- "label": {
350
- "type": "string"
351
- },
352
- "labelTranslationKey": {
353
- "type": "string"
354
- }
355
- },
356
- "required": [
357
- "propertyName",
358
- "label"
359
- ],
360
- "additionalProperties": false
361
- }
590
+ "schemaVersion": {
591
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
362
592
  },
363
- "localQueryId": {
364
- "type": "string"
593
+ "title": {
594
+ "type": "string",
595
+ "const": "Not yet implemented"
365
596
  },
366
- "query": {
597
+ "usageDescription": {
367
598
  "type": "string"
368
599
  },
369
- "responseField": {
600
+ "defaultJSON": {
370
601
  "type": "string"
371
- },
372
- "variables": {
373
- "type": "array",
374
- "items": {
375
- "type": "object",
376
- "properties": {
377
- "minLength": {
378
- "type": "number"
379
- },
380
- "label": {
381
- "type": "string"
382
- },
383
- "labelTranslationKey": {
384
- "type": "string"
385
- },
386
- "name": {
387
- "type": "string"
388
- },
389
- "type": {
390
- "type": "string"
391
- },
392
- "defaultValue": {
393
- "type": "string"
394
- }
395
- },
396
- "required": [
397
- "name",
398
- "type"
399
- ],
400
- "additionalProperties": false
401
- }
402
602
  }
403
603
  },
404
604
  "required": [
405
- "displayFields",
406
- "responseField"
605
+ "schemaVersion"
407
606
  ],
408
607
  "additionalProperties": false
608
+ },
609
+ "graphQL": {
610
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/graphQL"
409
611
  }
410
612
  },
411
613
  "required": [
@@ -434,19 +636,40 @@
434
636
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
435
637
  },
436
638
  "max": {
437
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/2/properties/attributes/properties/max"
639
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/3/properties/attributes/properties/max"
438
640
  },
439
641
  "min": {
440
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/2/properties/attributes/properties/min"
642
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/3/properties/attributes/properties/min"
441
643
  },
442
644
  "step": {
443
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/2/properties/attributes/properties/step"
645
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/3/properties/attributes/properties/step"
444
646
  }
445
647
  },
446
648
  "additionalProperties": false
447
649
  },
448
650
  "meta": {
449
- "$ref": "#/definitions/TableQuestion/properties/meta"
651
+ "type": "object",
652
+ "properties": {
653
+ "schemaVersion": {
654
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
655
+ },
656
+ "title": {
657
+ "type": "string",
658
+ "const": "Number Field"
659
+ },
660
+ "usageDescription": {
661
+ "type": "string",
662
+ "const": "For questions that require a single numeric value."
663
+ },
664
+ "defaultJSON": {
665
+ "type": "string",
666
+ "const": "{\n \"type\": \"number\",\n \"attributes\": {\n \"min\": 0,\n \"step\": 1\n },\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
667
+ }
668
+ },
669
+ "required": [
670
+ "schemaVersion"
671
+ ],
672
+ "additionalProperties": false
450
673
  }
451
674
  },
452
675
  "required": [
@@ -462,10 +685,31 @@
462
685
  "const": "radioButtons"
463
686
  },
464
687
  "attributes": {
465
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/1/properties/attributes"
688
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes"
466
689
  },
467
690
  "meta": {
468
- "$ref": "#/definitions/TableQuestion/properties/meta"
691
+ "type": "object",
692
+ "properties": {
693
+ "schemaVersion": {
694
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
695
+ },
696
+ "title": {
697
+ "type": "string",
698
+ "const": "Radio Buttons"
699
+ },
700
+ "usageDescription": {
701
+ "type": "string",
702
+ "const": "For multiple choice questions where users select just one option."
703
+ },
704
+ "defaultJSON": {
705
+ "type": "string",
706
+ "const": "{\n \"type\": \"radioButtons\",\n \"attributes\": {},\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"option1\",\n \"selected\": false\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
707
+ }
708
+ },
709
+ "required": [
710
+ "schemaVersion"
711
+ ],
712
+ "additionalProperties": false
469
713
  },
470
714
  "options": {
471
715
  "type": "array",
@@ -473,10 +717,10 @@
473
717
  "type": "object",
474
718
  "properties": {
475
719
  "label": {
476
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/1/properties/options/items/properties/label"
720
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/2/properties/options/items/properties/label"
477
721
  },
478
722
  "value": {
479
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/1/properties/options/items/properties/value"
723
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/2/properties/options/items/properties/value"
480
724
  },
481
725
  "selected": {
482
726
  "type": "boolean"
@@ -516,23 +760,49 @@
516
760
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
517
761
  },
518
762
  "multiple": {
519
- "type": "boolean"
763
+ "type": "boolean",
764
+ "const": false
520
765
  }
521
766
  },
767
+ "required": [
768
+ "multiple"
769
+ ],
522
770
  "additionalProperties": false
523
771
  },
524
772
  "meta": {
525
- "$ref": "#/definitions/TableQuestion/properties/meta"
773
+ "type": "object",
774
+ "properties": {
775
+ "schemaVersion": {
776
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
777
+ },
778
+ "title": {
779
+ "type": "string",
780
+ "const": "Select Box"
781
+ },
782
+ "usageDescription": {
783
+ "type": "string",
784
+ "const": "For questions where users select one option from a list."
785
+ },
786
+ "defaultJSON": {
787
+ "type": "string",
788
+ "const": "{\n \"type\": \"selectBox\",\n \"attributes\": {\n \"multiple\": false\n },\n \"options\": [\n {\n \"label\": \"Option 1\",\n \"value\": \"option1\"\n }\n ],\n \"meta\": {\n \"schemaVersion\": \"1.0\"\n }\n}"
789
+ }
790
+ },
791
+ "required": [
792
+ "schemaVersion"
793
+ ],
794
+ "additionalProperties": false
526
795
  },
527
796
  "options": {
528
797
  "type": "array",
529
798
  "items": {
530
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/8/properties/options/items"
799
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/9/properties/options/items"
531
800
  }
532
801
  }
533
802
  },
534
803
  "required": [
535
804
  "type",
805
+ "attributes",
536
806
  "options"
537
807
  ],
538
808
  "additionalProperties": false
@@ -567,6 +837,9 @@
567
837
  },
568
838
  "rows": {
569
839
  "type": "number"
840
+ },
841
+ "asRichText": {
842
+ "type": "boolean"
570
843
  }
571
844
  },
572
845
  "additionalProperties": false
@@ -577,8 +850,17 @@
577
850
  "schemaVersion": {
578
851
  "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
579
852
  },
580
- "asRichText": {
581
- "type": "boolean"
853
+ "title": {
854
+ "type": "string",
855
+ "const": "Text Area"
856
+ },
857
+ "usageDescription": {
858
+ "type": "string",
859
+ "const": "For questions that require longer answers, you can select formatting options too."
860
+ },
861
+ "defaultJSON": {
862
+ "type": "string",
863
+ "const": "{\"type\":\"textArea\",\"attributes\":{\"cols\":20,\"rows\":2,\"asRichText\":true},\"meta\":{\"schemaVersion\":\"1.0\"}}"
582
864
  }
583
865
  },
584
866
  "required": [
@@ -588,8 +870,7 @@
588
870
  }
589
871
  },
590
872
  "required": [
591
- "type",
592
- "meta"
873
+ "type"
593
874
  ],
594
875
  "additionalProperties": false
595
876
  },
@@ -613,19 +894,40 @@
613
894
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
614
895
  },
615
896
  "maxLength": {
616
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/5/properties/attributes/properties/maxLength"
897
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/6/properties/attributes/properties/maxLength"
617
898
  },
618
899
  "minLength": {
619
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/5/properties/attributes/properties/minLength"
900
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/6/properties/attributes/properties/minLength"
620
901
  },
621
902
  "pattern": {
622
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/5/properties/attributes/properties/pattern"
903
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/6/properties/attributes/properties/pattern"
623
904
  }
624
905
  },
625
906
  "additionalProperties": false
626
907
  },
627
908
  "meta": {
628
- "$ref": "#/definitions/TableQuestion/properties/meta"
909
+ "type": "object",
910
+ "properties": {
911
+ "schemaVersion": {
912
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
913
+ },
914
+ "title": {
915
+ "type": "string",
916
+ "const": "Text Field"
917
+ },
918
+ "usageDescription": {
919
+ "type": "string",
920
+ "const": "For questions that require short, simple answers."
921
+ },
922
+ "defaultJSON": {
923
+ "type": "string",
924
+ "const": "{\"type\":\"text\",\"attributes\":{\"maxLength\":255},\"meta\":{\"schemaVersion\":\"1.0\"}}"
925
+ }
926
+ },
927
+ "required": [
928
+ "schemaVersion"
929
+ ],
930
+ "additionalProperties": false
629
931
  }
630
932
  },
631
933
  "required": [
@@ -633,29 +935,6 @@
633
935
  ],
634
936
  "additionalProperties": false
635
937
  },
636
- {
637
- "type": "object",
638
- "properties": {
639
- "type": {
640
- "type": "string",
641
- "const": "typeaheadSearch"
642
- },
643
- "attributes": {
644
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/1/properties/attributes"
645
- },
646
- "meta": {
647
- "$ref": "#/definitions/TableQuestion/properties/meta"
648
- },
649
- "graphQL": {
650
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/6/properties/graphQL"
651
- }
652
- },
653
- "required": [
654
- "type",
655
- "graphQL"
656
- ],
657
- "additionalProperties": false
658
- },
659
938
  {
660
939
  "type": "object",
661
940
  "properties": {
@@ -664,10 +943,31 @@
664
943
  "const": "url"
665
944
  },
666
945
  "attributes": {
667
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/11/properties/attributes"
946
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/12/properties/attributes"
668
947
  },
669
948
  "meta": {
670
- "$ref": "#/definitions/TableQuestion/properties/meta"
949
+ "type": "object",
950
+ "properties": {
951
+ "schemaVersion": {
952
+ "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
953
+ },
954
+ "title": {
955
+ "type": "string",
956
+ "const": "URL Field"
957
+ },
958
+ "usageDescription": {
959
+ "type": "string",
960
+ "const": "For questions that require a website, DOI or other URL."
961
+ },
962
+ "defaultJSON": {
963
+ "type": "string",
964
+ "const": "{\"type\":\"url\",\"attributes\":{\"maxLength\":255},\"meta\":{\"schemaVersion\":\"1.0\"}}"
965
+ }
966
+ },
967
+ "required": [
968
+ "schemaVersion"
969
+ ],
970
+ "additionalProperties": false
671
971
  }
672
972
  },
673
973
  "required": [