@dmptool/types 1.2.3 → 1.2.4

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 (42) hide show
  1. package/README.md +8 -0
  2. package/dist/answers/__tests__/answers.spec.js +122 -6
  3. package/dist/answers/answer.d.ts +3 -3
  4. package/dist/answers/graphQLAnswers.d.ts +120 -25
  5. package/dist/answers/graphQLAnswers.js +22 -5
  6. package/dist/answers/index.d.ts +399 -31
  7. package/dist/answers/index.js +8 -2
  8. package/dist/answers/numberAnswers.d.ts +40 -0
  9. package/dist/answers/numberAnswers.js +8 -1
  10. package/dist/answers/tableAnswers.d.ts +1688 -75
  11. package/dist/answers/tableAnswers.js +63 -2
  12. package/dist/questions/__tests__/graphQLQuestions.spec.js +177 -39
  13. package/dist/questions/__tests__/numberQuestions.spec.js +36 -0
  14. package/dist/questions/__tests__/tableQuestion.spec.js +145 -0
  15. package/dist/questions/__tests__/usage.spec.js +162 -1
  16. package/dist/questions/graphQLQuestions.d.ts +420 -60
  17. package/dist/questions/graphQLQuestions.js +257 -11
  18. package/dist/questions/index.d.ts +4849 -189
  19. package/dist/questions/index.js +9 -2
  20. package/dist/questions/numberQuestions.d.ts +105 -0
  21. package/dist/questions/numberQuestions.js +12 -1
  22. package/dist/questions/question.d.ts +4 -4
  23. package/dist/questions/question.js +25 -4
  24. package/dist/questions/tableQuestions.d.ts +5930 -679
  25. package/dist/questions/tableQuestions.js +175 -3
  26. package/dist/schemas/anyAnswer.schema.json +137 -17
  27. package/dist/schemas/anyQuestion.schema.json +829 -101
  28. package/dist/schemas/anyTableColumnAnswer.schema.json +116 -5
  29. package/dist/schemas/anyTableColumnQuestion.schema.json +326 -24
  30. package/dist/schemas/licenseSearchAnswer.schema.json +49 -0
  31. package/dist/schemas/licenseSearchQuestion.schema.json +164 -0
  32. package/dist/schemas/metadataStandardSearchAnswer.schema.json +49 -0
  33. package/dist/schemas/metadataStandardSearchQuestion.schema.json +174 -0
  34. package/dist/schemas/numberWithContextAnswer.schema.json +45 -0
  35. package/dist/schemas/numberWithContextQuestion.schema.json +84 -0
  36. package/dist/schemas/repositorySearchAnswer.schema.json +49 -0
  37. package/dist/schemas/repositorySearchQuestion.schema.json +180 -0
  38. package/dist/schemas/researchOutputTableAnswer.schema.json +519 -0
  39. package/dist/schemas/researchOutputTableQuestion.schema.json +1183 -0
  40. package/dist/schemas/tableAnswer.schema.json +116 -5
  41. package/dist/schemas/tableQuestion.schema.json +348 -24
  42. package/package.json +9 -5
@@ -0,0 +1,519 @@
1
+ {
2
+ "$ref": "#/definitions/ResearchOutputTableAnswer",
3
+ "definitions": {
4
+ "ResearchOutputTableAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "table"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "default": "1.0"
17
+ }
18
+ },
19
+ "additionalProperties": false,
20
+ "default": {}
21
+ },
22
+ "columnHeadings": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string"
26
+ },
27
+ "default": [
28
+ "Column A"
29
+ ]
30
+ },
31
+ "answer": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "properties": {
36
+ "columns": {
37
+ "type": "array",
38
+ "items": {
39
+ "anyOf": [
40
+ {
41
+ "type": "object",
42
+ "properties": {
43
+ "type": {
44
+ "type": "string",
45
+ "const": "affiliationSearch"
46
+ },
47
+ "meta": {
48
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
49
+ },
50
+ "answer": {
51
+ "type": "object",
52
+ "properties": {
53
+ "affiliationId": {
54
+ "type": "string",
55
+ "default": ""
56
+ },
57
+ "affiliationName": {
58
+ "type": "string",
59
+ "default": ""
60
+ }
61
+ },
62
+ "additionalProperties": false,
63
+ "default": {}
64
+ }
65
+ },
66
+ "required": [
67
+ "type"
68
+ ],
69
+ "additionalProperties": false
70
+ },
71
+ {
72
+ "type": "object",
73
+ "properties": {
74
+ "type": {
75
+ "type": "string",
76
+ "const": "boolean"
77
+ },
78
+ "meta": {
79
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
80
+ },
81
+ "answer": {
82
+ "type": "boolean",
83
+ "default": false
84
+ }
85
+ },
86
+ "required": [
87
+ "type"
88
+ ],
89
+ "additionalProperties": false
90
+ },
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "type": {
95
+ "type": "string",
96
+ "const": "checkBoxes"
97
+ },
98
+ "meta": {
99
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
100
+ },
101
+ "answer": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string"
105
+ },
106
+ "default": [
107
+ ""
108
+ ]
109
+ }
110
+ },
111
+ "required": [
112
+ "type"
113
+ ],
114
+ "additionalProperties": false
115
+ },
116
+ {
117
+ "type": "object",
118
+ "properties": {
119
+ "type": {
120
+ "type": "string",
121
+ "const": "currency"
122
+ },
123
+ "meta": {
124
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
125
+ },
126
+ "answer": {
127
+ "type": "number",
128
+ "default": 0
129
+ }
130
+ },
131
+ "required": [
132
+ "type"
133
+ ],
134
+ "additionalProperties": false
135
+ },
136
+ {
137
+ "type": "object",
138
+ "properties": {
139
+ "type": {
140
+ "type": "string",
141
+ "const": "date"
142
+ },
143
+ "meta": {
144
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
145
+ },
146
+ "answer": {
147
+ "type": "string",
148
+ "default": ""
149
+ }
150
+ },
151
+ "required": [
152
+ "type"
153
+ ],
154
+ "additionalProperties": false
155
+ },
156
+ {
157
+ "type": "object",
158
+ "properties": {
159
+ "type": {
160
+ "type": "string",
161
+ "const": "dateRange"
162
+ },
163
+ "meta": {
164
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
165
+ },
166
+ "answer": {
167
+ "type": "object",
168
+ "properties": {
169
+ "start": {
170
+ "type": "string",
171
+ "default": ""
172
+ },
173
+ "end": {
174
+ "type": "string",
175
+ "default": ""
176
+ }
177
+ },
178
+ "additionalProperties": false,
179
+ "default": {}
180
+ }
181
+ },
182
+ "required": [
183
+ "type"
184
+ ],
185
+ "additionalProperties": false
186
+ },
187
+ {
188
+ "type": "object",
189
+ "properties": {
190
+ "type": {
191
+ "type": "string",
192
+ "const": "email"
193
+ },
194
+ "meta": {
195
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
196
+ },
197
+ "answer": {
198
+ "type": "string",
199
+ "default": ""
200
+ }
201
+ },
202
+ "required": [
203
+ "type"
204
+ ],
205
+ "additionalProperties": false
206
+ },
207
+ {
208
+ "type": "object",
209
+ "properties": {
210
+ "type": {
211
+ "type": "string",
212
+ "const": "licenseSearch"
213
+ },
214
+ "meta": {
215
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
216
+ },
217
+ "answer": {
218
+ "type": "array",
219
+ "items": {
220
+ "type": "object",
221
+ "properties": {
222
+ "licenseId": {
223
+ "type": "string",
224
+ "default": ""
225
+ },
226
+ "licenseName": {
227
+ "type": "string",
228
+ "default": ""
229
+ }
230
+ },
231
+ "additionalProperties": false,
232
+ "default": {}
233
+ },
234
+ "default": []
235
+ }
236
+ },
237
+ "required": [
238
+ "type"
239
+ ],
240
+ "additionalProperties": false
241
+ },
242
+ {
243
+ "type": "object",
244
+ "properties": {
245
+ "type": {
246
+ "type": "string",
247
+ "const": "metadataStandardSearch"
248
+ },
249
+ "meta": {
250
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
251
+ },
252
+ "answer": {
253
+ "type": "array",
254
+ "items": {
255
+ "type": "object",
256
+ "properties": {
257
+ "metadataStandardId": {
258
+ "type": "string",
259
+ "default": ""
260
+ },
261
+ "metadataStandardName": {
262
+ "type": "string",
263
+ "default": ""
264
+ }
265
+ },
266
+ "additionalProperties": false,
267
+ "default": {}
268
+ },
269
+ "default": []
270
+ }
271
+ },
272
+ "required": [
273
+ "type"
274
+ ],
275
+ "additionalProperties": false
276
+ },
277
+ {
278
+ "type": "object",
279
+ "properties": {
280
+ "type": {
281
+ "type": "string",
282
+ "const": "multiselectBox"
283
+ },
284
+ "meta": {
285
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
286
+ },
287
+ "answer": {
288
+ "type": "array",
289
+ "items": {
290
+ "type": "string"
291
+ },
292
+ "default": [
293
+ ""
294
+ ]
295
+ }
296
+ },
297
+ "required": [
298
+ "type"
299
+ ],
300
+ "additionalProperties": false
301
+ },
302
+ {
303
+ "type": "object",
304
+ "properties": {
305
+ "type": {
306
+ "type": "string",
307
+ "const": "number"
308
+ },
309
+ "meta": {
310
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
311
+ },
312
+ "answer": {
313
+ "type": "number",
314
+ "default": 0
315
+ }
316
+ },
317
+ "required": [
318
+ "type"
319
+ ],
320
+ "additionalProperties": false
321
+ },
322
+ {
323
+ "type": "object",
324
+ "properties": {
325
+ "type": {
326
+ "type": "string",
327
+ "const": "numberWithContext"
328
+ },
329
+ "meta": {
330
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
331
+ },
332
+ "answer": {
333
+ "type": "object",
334
+ "properties": {
335
+ "value": {
336
+ "type": "number",
337
+ "default": 0
338
+ },
339
+ "context": {
340
+ "type": "string",
341
+ "default": ""
342
+ }
343
+ },
344
+ "additionalProperties": false
345
+ }
346
+ },
347
+ "required": [
348
+ "type",
349
+ "answer"
350
+ ],
351
+ "additionalProperties": false
352
+ },
353
+ {
354
+ "type": "object",
355
+ "properties": {
356
+ "type": {
357
+ "type": "string",
358
+ "const": "radioButtons"
359
+ },
360
+ "meta": {
361
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
362
+ },
363
+ "answer": {
364
+ "type": "string",
365
+ "default": ""
366
+ }
367
+ },
368
+ "required": [
369
+ "type"
370
+ ],
371
+ "additionalProperties": false
372
+ },
373
+ {
374
+ "type": "object",
375
+ "properties": {
376
+ "type": {
377
+ "type": "string",
378
+ "const": "repositorySearch"
379
+ },
380
+ "meta": {
381
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
382
+ },
383
+ "answer": {
384
+ "type": "array",
385
+ "items": {
386
+ "type": "object",
387
+ "properties": {
388
+ "repositoryId": {
389
+ "type": "string",
390
+ "default": ""
391
+ },
392
+ "repositoryName": {
393
+ "type": "string",
394
+ "default": ""
395
+ }
396
+ },
397
+ "additionalProperties": false,
398
+ "default": {}
399
+ },
400
+ "default": []
401
+ }
402
+ },
403
+ "required": [
404
+ "type"
405
+ ],
406
+ "additionalProperties": false
407
+ },
408
+ {
409
+ "type": "object",
410
+ "properties": {
411
+ "type": {
412
+ "type": "string",
413
+ "const": "selectBox"
414
+ },
415
+ "meta": {
416
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
417
+ },
418
+ "answer": {
419
+ "type": "string",
420
+ "default": ""
421
+ }
422
+ },
423
+ "required": [
424
+ "type"
425
+ ],
426
+ "additionalProperties": false
427
+ },
428
+ {
429
+ "type": "object",
430
+ "properties": {
431
+ "type": {
432
+ "type": "string",
433
+ "const": "text"
434
+ },
435
+ "meta": {
436
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
437
+ },
438
+ "answer": {
439
+ "type": "string",
440
+ "default": ""
441
+ }
442
+ },
443
+ "required": [
444
+ "type"
445
+ ],
446
+ "additionalProperties": false
447
+ },
448
+ {
449
+ "type": "object",
450
+ "properties": {
451
+ "type": {
452
+ "type": "string",
453
+ "const": "textArea"
454
+ },
455
+ "meta": {
456
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
457
+ },
458
+ "answer": {
459
+ "type": "string",
460
+ "default": ""
461
+ }
462
+ },
463
+ "required": [
464
+ "type"
465
+ ],
466
+ "additionalProperties": false
467
+ },
468
+ {
469
+ "type": "object",
470
+ "properties": {
471
+ "type": {
472
+ "type": "string",
473
+ "const": "url"
474
+ },
475
+ "meta": {
476
+ "$ref": "#/definitions/ResearchOutputTableAnswer/properties/meta"
477
+ },
478
+ "answer": {
479
+ "type": "string",
480
+ "default": ""
481
+ }
482
+ },
483
+ "required": [
484
+ "type"
485
+ ],
486
+ "additionalProperties": false
487
+ }
488
+ ]
489
+ }
490
+ }
491
+ },
492
+ "required": [
493
+ "columns"
494
+ ],
495
+ "additionalProperties": false
496
+ },
497
+ "default": [
498
+ {
499
+ "columns": [
500
+ {
501
+ "type": "textArea",
502
+ "answer": "",
503
+ "meta": {
504
+ "schemaVersion": "1.0"
505
+ }
506
+ }
507
+ ]
508
+ }
509
+ ]
510
+ }
511
+ },
512
+ "required": [
513
+ "type"
514
+ ],
515
+ "additionalProperties": false
516
+ }
517
+ },
518
+ "$schema": "http://json-schema.org/draft-07/schema#"
519
+ }