@dmptool/types 1.1.3 → 1.2.1

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 (76) hide show
  1. package/README.md +119 -47
  2. package/dist/answers/__tests__/answers.spec.js +27 -28
  3. package/dist/answers/__tests__/usage.spec.d.ts +1 -0
  4. package/dist/answers/__tests__/usage.spec.js +178 -0
  5. package/dist/answers/answer.d.ts +12 -15
  6. package/dist/answers/answer.js +3 -4
  7. package/dist/answers/dateAnswers.d.ts +30 -30
  8. package/dist/answers/dateAnswers.js +6 -5
  9. package/dist/answers/graphQLAnswers.d.ts +41 -26
  10. package/dist/answers/graphQLAnswers.js +7 -4
  11. package/dist/answers/index.d.ts +887 -1088
  12. package/dist/answers/index.js +2 -2
  13. package/dist/answers/numberAnswers.d.ts +41 -41
  14. package/dist/answers/numberAnswers.js +8 -8
  15. package/dist/answers/optionBasedAnswers.d.ts +55 -55
  16. package/dist/answers/optionBasedAnswers.js +10 -10
  17. package/dist/answers/tableAnswers.d.ts +880 -1778
  18. package/dist/answers/tableAnswers.js +12 -8
  19. package/dist/answers/textAnswers.d.ts +44 -44
  20. package/dist/answers/textAnswers.js +8 -8
  21. package/dist/questions/__tests__/graphQLQuestions.spec.js +1 -1
  22. package/dist/questions/__tests__/usage.spec.d.ts +8 -0
  23. package/dist/questions/__tests__/usage.spec.js +312 -0
  24. package/dist/questions/dateQuestions.d.ts +81 -82
  25. package/dist/questions/dateQuestions.js +12 -16
  26. package/dist/questions/graphQLQuestions.d.ts +142 -142
  27. package/dist/questions/graphQLQuestions.js +35 -30
  28. package/dist/questions/index.d.ts +1492 -1672
  29. package/dist/questions/index.js +2 -2
  30. package/dist/questions/numberQuestions.d.ts +97 -98
  31. package/dist/questions/numberQuestions.js +7 -19
  32. package/dist/questions/optionBasedQuestions.d.ts +163 -166
  33. package/dist/questions/optionBasedQuestions.js +20 -36
  34. package/dist/questions/question.d.ts +24 -48
  35. package/dist/questions/question.js +78 -17
  36. package/dist/questions/tableQuestions.d.ts +2215 -2227
  37. package/dist/questions/tableQuestions.js +6 -11
  38. package/dist/questions/textQuestions.d.ts +104 -104
  39. package/dist/questions/textQuestions.js +6 -23
  40. package/dist/schemas/affiliationSearchAnswer.schema.json +20 -12
  41. package/dist/schemas/affiliationSearchQuestion.schema.json +30 -36
  42. package/dist/schemas/anyAnswer.schema.json +235 -233
  43. package/dist/schemas/anyQuestion.schema.json +292 -493
  44. package/dist/schemas/anyTableColumnAnswer.schema.json +104 -106
  45. package/dist/schemas/anyTableColumnQuestion.schema.json +164 -325
  46. package/dist/schemas/booleanAnswer.schema.json +8 -11
  47. package/dist/schemas/booleanQuestion.schema.json +7 -10
  48. package/dist/schemas/checkboxesAnswer.schema.json +13 -14
  49. package/dist/schemas/checkboxesQuestion.schema.json +12 -13
  50. package/dist/schemas/currencyAnswer.schema.json +8 -11
  51. package/dist/schemas/currencyQuestion.schema.json +7 -10
  52. package/dist/schemas/dateAnswer.schema.json +8 -11
  53. package/dist/schemas/dateQuestion.schema.json +7 -10
  54. package/dist/schemas/dateRangeAnswer.schema.json +16 -21
  55. package/dist/schemas/dateRangeQuestion.schema.json +38 -20
  56. package/dist/schemas/emailAnswer.schema.json +8 -11
  57. package/dist/schemas/emailQuestion.schema.json +7 -10
  58. package/dist/schemas/multiselectBoxAnswer.schema.json +13 -14
  59. package/dist/schemas/multiselectBoxQuestion.schema.json +14 -14
  60. package/dist/schemas/numberAnswer.schema.json +8 -11
  61. package/dist/schemas/numberQuestion.schema.json +7 -10
  62. package/dist/schemas/numberRangeAnswer.schema.json +17 -22
  63. package/dist/schemas/numberRangeQuestion.schema.json +18 -19
  64. package/dist/schemas/radioButtonsAnswer.schema.json +8 -11
  65. package/dist/schemas/radioButtonsQuestion.schema.json +12 -13
  66. package/dist/schemas/selectBoxAnswer.schema.json +8 -11
  67. package/dist/schemas/selectBoxQuestion.schema.json +18 -15
  68. package/dist/schemas/tableAnswer.schema.json +343 -338
  69. package/dist/schemas/tableQuestion.schema.json +178 -352
  70. package/dist/schemas/textAnswer.schema.json +8 -11
  71. package/dist/schemas/textAreaAnswer.schema.json +8 -11
  72. package/dist/schemas/textAreaQuestion.schema.json +7 -10
  73. package/dist/schemas/textQuestion.schema.json +7 -10
  74. package/dist/schemas/urlAnswer.schema.json +8 -11
  75. package/dist/schemas/urlQuestion.schema.json +7 -10
  76. package/package.json +1 -1
@@ -39,28 +39,25 @@
39
39
  "type": "number"
40
40
  }
41
41
  },
42
- "additionalProperties": false
42
+ "additionalProperties": false,
43
+ "default": {}
43
44
  },
44
45
  "meta": {
45
46
  "type": "object",
46
47
  "properties": {
47
48
  "schemaVersion": {
48
49
  "type": "string",
49
- "const": "1.0"
50
+ "default": "1.0"
50
51
  },
51
52
  "title": {
52
- "type": "string",
53
- "const": "Table"
53
+ "type": "string"
54
54
  },
55
55
  "usageDescription": {
56
- "type": "string",
57
- "const": "For questions that require a tabular format."
56
+ "type": "string"
58
57
  }
59
58
  },
60
- "required": [
61
- "schemaVersion"
62
- ],
63
- "additionalProperties": false
59
+ "additionalProperties": false,
60
+ "default": {}
64
61
  },
65
62
  "columns": {
66
63
  "type": "array",
@@ -68,7 +65,8 @@
68
65
  "type": "object",
69
66
  "properties": {
70
67
  "heading": {
71
- "type": "string"
68
+ "type": "string",
69
+ "default": "Column A"
72
70
  },
73
71
  "content": {
74
72
  "anyOf": [
@@ -92,27 +90,11 @@
92
90
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
93
91
  }
94
92
  },
95
- "additionalProperties": false
93
+ "additionalProperties": false,
94
+ "default": {}
96
95
  },
97
96
  "meta": {
98
- "type": "object",
99
- "properties": {
100
- "schemaVersion": {
101
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
102
- },
103
- "title": {
104
- "type": "string",
105
- "const": "Affiliation Search"
106
- },
107
- "usageDescription": {
108
- "type": "string",
109
- "const": "For questions that require the user to select from a controlled list of institutions."
110
- }
111
- },
112
- "required": [
113
- "schemaVersion"
114
- ],
115
- "additionalProperties": false
97
+ "$ref": "#/definitions/TableQuestion/properties/meta"
116
98
  },
117
99
  "graphQL": {
118
100
  "type": "object",
@@ -124,7 +106,8 @@
124
106
  "properties": {
125
107
  "propertyName": {
126
108
  "type": "string",
127
- "const": "displayName"
109
+ "const": "displayName",
110
+ "default": "displayName"
128
111
  },
129
112
  "label": {
130
113
  "type": "string",
@@ -135,22 +118,24 @@
135
118
  "default": "SignupPage.institution"
136
119
  }
137
120
  },
138
- "required": [
139
- "propertyName"
140
- ],
141
121
  "additionalProperties": false
142
- }
122
+ },
123
+ "default": [
124
+ {}
125
+ ]
143
126
  },
144
127
  "localQueryId": {
145
128
  "type": "string"
146
129
  },
147
130
  "query": {
148
131
  "type": "string",
149
- "const": "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}"
132
+ "const": "query Affiliations($name: String!){affiliations(name: $name) {totalCountnextCursoritems {iddisplayNameuri}}}",
133
+ "default": "query Affiliations($name: String!){affiliations(name: $name) {totalCountnextCursoritems {iddisplayNameuri}}}"
150
134
  },
151
135
  "responseField": {
152
136
  "type": "string",
153
- "const": "affiliations.items"
137
+ "const": "affiliations.items",
138
+ "default": "affiliations.items"
154
139
  },
155
140
  "variables": {
156
141
  "type": "array",
@@ -159,7 +144,8 @@
159
144
  "properties": {
160
145
  "name": {
161
146
  "type": "string",
162
- "const": "name"
147
+ "const": "name",
148
+ "default": "name"
163
149
  },
164
150
  "type": {
165
151
  "type": "string",
@@ -171,19 +157,19 @@
171
157
  },
172
158
  "minLength": {
173
159
  "type": "number",
174
- "const": 3
160
+ "const": 3,
161
+ "default": 3
175
162
  },
176
163
  "labelTranslationKey": {
177
164
  "type": "string",
178
165
  "default": "SignupPage.institutionHelp"
179
166
  }
180
167
  },
181
- "required": [
182
- "name",
183
- "minLength"
184
- ],
185
168
  "additionalProperties": false
186
- }
169
+ },
170
+ "default": [
171
+ {}
172
+ ]
187
173
  },
188
174
  "queryId": {
189
175
  "type": "string",
@@ -191,23 +177,16 @@
191
177
  },
192
178
  "answerField": {
193
179
  "type": "string",
194
- "const": "uri"
180
+ "const": "uri",
181
+ "default": "uri"
195
182
  }
196
183
  },
197
- "required": [
198
- "displayFields",
199
- "query",
200
- "responseField",
201
- "variables",
202
- "answerField"
203
- ],
204
- "additionalProperties": false
184
+ "additionalProperties": false,
185
+ "default": {}
205
186
  }
206
187
  },
207
188
  "required": [
208
- "type",
209
- "meta",
210
- "graphQL"
189
+ "type"
211
190
  ],
212
191
  "additionalProperties": false
213
192
  },
@@ -235,27 +214,11 @@
235
214
  "default": false
236
215
  }
237
216
  },
238
- "additionalProperties": false
217
+ "additionalProperties": false,
218
+ "default": {}
239
219
  },
240
220
  "meta": {
241
- "type": "object",
242
- "properties": {
243
- "schemaVersion": {
244
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
245
- },
246
- "title": {
247
- "type": "string",
248
- "const": "Yes/No Field"
249
- },
250
- "usageDescription": {
251
- "type": "string",
252
- "const": "For questions that require a simple Yes/No response."
253
- }
254
- },
255
- "required": [
256
- "schemaVersion"
257
- ],
258
- "additionalProperties": false
221
+ "$ref": "#/definitions/TableQuestion/properties/meta"
259
222
  }
260
223
  },
261
224
  "required": [
@@ -271,27 +234,11 @@
271
234
  "const": "checkBoxes"
272
235
  },
273
236
  "attributes": {
274
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes"
237
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes",
238
+ "default": {}
275
239
  },
276
240
  "meta": {
277
- "type": "object",
278
- "properties": {
279
- "schemaVersion": {
280
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
281
- },
282
- "title": {
283
- "type": "string",
284
- "const": "Check Boxes"
285
- },
286
- "usageDescription": {
287
- "type": "string",
288
- "const": "For multiple choice questions where users can select multiple options."
289
- }
290
- },
291
- "required": [
292
- "schemaVersion"
293
- ],
294
- "additionalProperties": false
241
+ "$ref": "#/definitions/TableQuestion/properties/meta"
295
242
  },
296
243
  "options": {
297
244
  "type": "array",
@@ -312,12 +259,14 @@
312
259
  }
313
260
  },
314
261
  "additionalProperties": false
315
- }
262
+ },
263
+ "default": [
264
+ {}
265
+ ]
316
266
  }
317
267
  },
318
268
  "required": [
319
- "type",
320
- "options"
269
+ "type"
321
270
  ],
322
271
  "additionalProperties": false
323
272
  },
@@ -356,27 +305,11 @@
356
305
  "default": "USD"
357
306
  }
358
307
  },
359
- "additionalProperties": false
308
+ "additionalProperties": false,
309
+ "default": {}
360
310
  },
361
311
  "meta": {
362
- "type": "object",
363
- "properties": {
364
- "schemaVersion": {
365
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
366
- },
367
- "title": {
368
- "type": "string",
369
- "const": "Currency Field"
370
- },
371
- "usageDescription": {
372
- "type": "string",
373
- "const": "For questions that require a monetary amount (e.g. Cost or Budget)."
374
- }
375
- },
376
- "required": [
377
- "schemaVersion"
378
- ],
379
- "additionalProperties": false
312
+ "$ref": "#/definitions/TableQuestion/properties/meta"
380
313
  }
381
314
  },
382
315
  "required": [
@@ -414,27 +347,11 @@
414
347
  "default": 1
415
348
  }
416
349
  },
417
- "additionalProperties": false
350
+ "additionalProperties": false,
351
+ "default": {}
418
352
  },
419
353
  "meta": {
420
- "type": "object",
421
- "properties": {
422
- "schemaVersion": {
423
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
424
- },
425
- "title": {
426
- "type": "string",
427
- "const": "Date Field"
428
- },
429
- "usageDescription": {
430
- "type": "string",
431
- "const": "For questions that require a date."
432
- }
433
- },
434
- "required": [
435
- "schemaVersion"
436
- ],
437
- "additionalProperties": false
354
+ "$ref": "#/definitions/TableQuestion/properties/meta"
438
355
  }
439
356
  },
440
357
  "required": [
@@ -450,48 +367,74 @@
450
367
  "const": "dateRange"
451
368
  },
452
369
  "attributes": {
453
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes"
370
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes",
371
+ "default": {}
454
372
  },
455
373
  "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
- },
470
- "required": [
471
- "schemaVersion"
472
- ],
473
- "additionalProperties": false
374
+ "$ref": "#/definitions/TableQuestion/properties/meta"
474
375
  },
475
376
  "columns": {
476
377
  "type": "object",
477
378
  "properties": {
478
379
  "start": {
479
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes"
380
+ "type": "object",
381
+ "properties": {
382
+ "label": {
383
+ "type": "string",
384
+ "default": "From"
385
+ },
386
+ "help": {
387
+ "$ref": "#/definitions/TableQuestion/properties/attributes/properties/help"
388
+ },
389
+ "labelTranslationKey": {
390
+ "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
391
+ },
392
+ "max": {
393
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes/properties/max"
394
+ },
395
+ "min": {
396
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes/properties/min"
397
+ },
398
+ "step": {
399
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes/properties/step"
400
+ }
401
+ },
402
+ "additionalProperties": false,
403
+ "default": {}
480
404
  },
481
405
  "end": {
482
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes"
406
+ "type": "object",
407
+ "properties": {
408
+ "label": {
409
+ "type": "string",
410
+ "default": "To"
411
+ },
412
+ "help": {
413
+ "$ref": "#/definitions/TableQuestion/properties/attributes/properties/help"
414
+ },
415
+ "labelTranslationKey": {
416
+ "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
417
+ },
418
+ "max": {
419
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes/properties/max"
420
+ },
421
+ "min": {
422
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes/properties/min"
423
+ },
424
+ "step": {
425
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/4/properties/attributes/properties/step"
426
+ }
427
+ },
428
+ "additionalProperties": false,
429
+ "default": {}
483
430
  }
484
431
  },
485
- "required": [
486
- "start",
487
- "end"
488
- ],
489
- "additionalProperties": false
432
+ "additionalProperties": false,
433
+ "default": {}
490
434
  }
491
435
  },
492
436
  "required": [
493
- "type",
494
- "columns"
437
+ "type"
495
438
  ],
496
439
  "additionalProperties": false
497
440
  },
@@ -529,27 +472,11 @@
529
472
  "default": false
530
473
  }
531
474
  },
532
- "additionalProperties": false
475
+ "additionalProperties": false,
476
+ "default": {}
533
477
  },
534
478
  "meta": {
535
- "type": "object",
536
- "properties": {
537
- "schemaVersion": {
538
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
539
- },
540
- "title": {
541
- "type": "string",
542
- "const": "Email Field"
543
- },
544
- "usageDescription": {
545
- "type": "string",
546
- "const": "For questions that require require email address(es)."
547
- }
548
- },
549
- "required": [
550
- "schemaVersion"
551
- ],
552
- "additionalProperties": false
479
+ "$ref": "#/definitions/TableQuestion/properties/meta"
553
480
  }
554
481
  },
555
482
  "required": [
@@ -577,29 +504,15 @@
577
504
  "$ref": "#/definitions/TableQuestion/properties/attributes/properties/labelTranslationKey"
578
505
  },
579
506
  "multiple": {
580
- "type": "boolean"
507
+ "type": "boolean",
508
+ "default": true
581
509
  }
582
510
  },
583
- "additionalProperties": false
511
+ "additionalProperties": false,
512
+ "default": {}
584
513
  },
585
514
  "meta": {
586
- "type": "object",
587
- "properties": {
588
- "schemaVersion": {
589
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
590
- },
591
- "title": {
592
- "type": "string",
593
- "const": "Not yet implemented"
594
- },
595
- "usageDescription": {
596
- "type": "string"
597
- }
598
- },
599
- "required": [
600
- "schemaVersion"
601
- ],
602
- "additionalProperties": false
515
+ "$ref": "#/definitions/TableQuestion/properties/meta"
603
516
  },
604
517
  "graphQL": {
605
518
  "type": "object",
@@ -610,21 +523,22 @@
610
523
  "type": "object",
611
524
  "properties": {
612
525
  "propertyName": {
613
- "type": "string"
526
+ "type": "string",
527
+ "default": "id"
614
528
  },
615
529
  "label": {
616
- "type": "string"
530
+ "type": "string",
531
+ "default": "Id"
617
532
  },
618
533
  "labelTranslationKey": {
619
534
  "type": "string"
620
535
  }
621
536
  },
622
- "required": [
623
- "propertyName",
624
- "label"
625
- ],
626
537
  "additionalProperties": false
627
- }
538
+ },
539
+ "default": [
540
+ {}
541
+ ]
628
542
  },
629
543
  "localQueryId": {
630
544
  "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/graphQL/properties/localQueryId"
@@ -633,7 +547,8 @@
633
547
  "type": "string"
634
548
  },
635
549
  "responseField": {
636
- "type": "string"
550
+ "type": "string",
551
+ "default": "query.items"
637
552
  },
638
553
  "variables": {
639
554
  "type": "array",
@@ -650,33 +565,30 @@
650
565
  "type": "string"
651
566
  },
652
567
  "name": {
653
- "type": "string"
568
+ "type": "string",
569
+ "default": "search"
654
570
  },
655
571
  "type": {
656
- "type": "string"
572
+ "type": "string",
573
+ "default": "string"
657
574
  },
658
575
  "defaultValue": {
659
576
  "type": "string"
660
577
  }
661
578
  },
662
- "required": [
663
- "name",
664
- "type"
665
- ],
666
579
  "additionalProperties": false
667
- }
580
+ },
581
+ "default": [
582
+ {}
583
+ ]
668
584
  }
669
585
  },
670
- "required": [
671
- "displayFields",
672
- "responseField"
673
- ],
674
- "additionalProperties": false
586
+ "additionalProperties": false,
587
+ "default": {}
675
588
  }
676
589
  },
677
590
  "required": [
678
- "type",
679
- "graphQL"
591
+ "type"
680
592
  ],
681
593
  "additionalProperties": false
682
594
  },
@@ -709,27 +621,11 @@
709
621
  "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/3/properties/attributes/properties/step"
710
622
  }
711
623
  },
712
- "additionalProperties": false
624
+ "additionalProperties": false,
625
+ "default": {}
713
626
  },
714
627
  "meta": {
715
- "type": "object",
716
- "properties": {
717
- "schemaVersion": {
718
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
719
- },
720
- "title": {
721
- "type": "string",
722
- "const": "Number Field"
723
- },
724
- "usageDescription": {
725
- "type": "string",
726
- "const": "For questions that require a single numeric value."
727
- }
728
- },
729
- "required": [
730
- "schemaVersion"
731
- ],
732
- "additionalProperties": false
628
+ "$ref": "#/definitions/TableQuestion/properties/meta"
733
629
  }
734
630
  },
735
631
  "required": [
@@ -745,27 +641,11 @@
745
641
  "const": "radioButtons"
746
642
  },
747
643
  "attributes": {
748
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes"
644
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/0/properties/attributes",
645
+ "default": {}
749
646
  },
750
647
  "meta": {
751
- "type": "object",
752
- "properties": {
753
- "schemaVersion": {
754
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
755
- },
756
- "title": {
757
- "type": "string",
758
- "const": "Radio Buttons"
759
- },
760
- "usageDescription": {
761
- "type": "string",
762
- "const": "For multiple choice questions where users select just one option."
763
- }
764
- },
765
- "required": [
766
- "schemaVersion"
767
- ],
768
- "additionalProperties": false
648
+ "$ref": "#/definitions/TableQuestion/properties/meta"
769
649
  },
770
650
  "options": {
771
651
  "type": "array",
@@ -784,12 +664,14 @@
784
664
  }
785
665
  },
786
666
  "additionalProperties": false
787
- }
667
+ },
668
+ "default": [
669
+ {}
670
+ ]
788
671
  }
789
672
  },
790
673
  "required": [
791
- "type",
792
- "options"
674
+ "type"
793
675
  ],
794
676
  "additionalProperties": false
795
677
  },
@@ -814,42 +696,32 @@
814
696
  },
815
697
  "multiple": {
816
698
  "type": "boolean",
817
- "default": false
818
- }
819
- },
820
- "additionalProperties": false
821
- },
822
- "meta": {
823
- "type": "object",
824
- "properties": {
825
- "schemaVersion": {
826
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
827
- },
828
- "title": {
829
- "type": "string",
830
- "const": "Select Box"
831
- },
832
- "usageDescription": {
833
- "type": "string",
834
- "const": "For questions where users select one option from a list."
699
+ "const": false
835
700
  }
836
701
  },
837
702
  "required": [
838
- "schemaVersion"
703
+ "multiple"
839
704
  ],
840
- "additionalProperties": false
705
+ "additionalProperties": false,
706
+ "default": {
707
+ "multiple": false
708
+ }
709
+ },
710
+ "meta": {
711
+ "$ref": "#/definitions/TableQuestion/properties/meta"
841
712
  },
842
713
  "options": {
843
714
  "type": "array",
844
715
  "items": {
845
716
  "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/9/properties/options/items"
846
- }
717
+ },
718
+ "default": [
719
+ {}
720
+ ]
847
721
  }
848
722
  },
849
723
  "required": [
850
- "type",
851
- "attributes",
852
- "options"
724
+ "type"
853
725
  ],
854
726
  "additionalProperties": false
855
727
  },
@@ -891,27 +763,11 @@
891
763
  "default": true
892
764
  }
893
765
  },
894
- "additionalProperties": false
766
+ "additionalProperties": false,
767
+ "default": {}
895
768
  },
896
769
  "meta": {
897
- "type": "object",
898
- "properties": {
899
- "schemaVersion": {
900
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
901
- },
902
- "title": {
903
- "type": "string",
904
- "const": "Text Area"
905
- },
906
- "usageDescription": {
907
- "type": "string",
908
- "const": "For questions that require longer answers, you can select formatting options too."
909
- }
910
- },
911
- "required": [
912
- "schemaVersion"
913
- ],
914
- "additionalProperties": false
770
+ "$ref": "#/definitions/TableQuestion/properties/meta"
915
771
  }
916
772
  },
917
773
  "required": [
@@ -948,27 +804,11 @@
948
804
  "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/6/properties/attributes/properties/pattern"
949
805
  }
950
806
  },
951
- "additionalProperties": false
807
+ "additionalProperties": false,
808
+ "default": {}
952
809
  },
953
810
  "meta": {
954
- "type": "object",
955
- "properties": {
956
- "schemaVersion": {
957
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
958
- },
959
- "title": {
960
- "type": "string",
961
- "const": "Text Field"
962
- },
963
- "usageDescription": {
964
- "type": "string",
965
- "const": "For questions that require short, simple answers."
966
- }
967
- },
968
- "required": [
969
- "schemaVersion"
970
- ],
971
- "additionalProperties": false
811
+ "$ref": "#/definitions/TableQuestion/properties/meta"
972
812
  }
973
813
  },
974
814
  "required": [
@@ -984,27 +824,11 @@
984
824
  "const": "url"
985
825
  },
986
826
  "attributes": {
987
- "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/12/properties/attributes"
827
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/properties/content/anyOf/12/properties/attributes",
828
+ "default": {}
988
829
  },
989
830
  "meta": {
990
- "type": "object",
991
- "properties": {
992
- "schemaVersion": {
993
- "$ref": "#/definitions/TableQuestion/properties/meta/properties/schemaVersion"
994
- },
995
- "title": {
996
- "type": "string",
997
- "const": "URL Field"
998
- },
999
- "usageDescription": {
1000
- "type": "string",
1001
- "const": "For questions that require a website, DOI or other URL."
1002
- }
1003
- },
1004
- "required": [
1005
- "schemaVersion"
1006
- ],
1007
- "additionalProperties": false
831
+ "$ref": "#/definitions/TableQuestion/properties/meta"
1008
832
  }
1009
833
  },
1010
834
  "required": [
@@ -1012,19 +836,21 @@
1012
836
  ],
1013
837
  "additionalProperties": false
1014
838
  }
1015
- ]
839
+ ],
840
+ "default": {
841
+ "type": "textArea"
842
+ }
1016
843
  }
1017
844
  },
1018
- "required": [
1019
- "content"
1020
- ],
1021
845
  "additionalProperties": false
1022
- }
846
+ },
847
+ "default": [
848
+ {}
849
+ ]
1023
850
  }
1024
851
  },
1025
852
  "required": [
1026
- "type",
1027
- "columns"
853
+ "type"
1028
854
  ],
1029
855
  "additionalProperties": false
1030
856
  }