@dmptool/types 1.2.6 → 2.0.0

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 (97) hide show
  1. package/README.md +1 -1
  2. package/dist/answers/__tests__/defaults.spec.js +216 -0
  3. package/dist/answers/answer.d.ts +29 -14
  4. package/dist/answers/answer.js +11 -5
  5. package/dist/answers/dateAnswers.d.ts +20 -47
  6. package/dist/answers/dateAnswers.js +20 -10
  7. package/dist/answers/graphQLAnswers.d.ts +48 -120
  8. package/dist/answers/graphQLAnswers.js +46 -21
  9. package/dist/answers/index.d.ts +155 -1439
  10. package/dist/answers/index.js +26 -1
  11. package/dist/answers/numberAnswers.d.ts +38 -92
  12. package/dist/answers/numberAnswers.js +38 -19
  13. package/dist/answers/optionBasedAnswers.d.ts +42 -87
  14. package/dist/answers/optionBasedAnswers.js +37 -21
  15. package/dist/answers/tableAnswers.d.ts +348 -3032
  16. package/dist/answers/tableAnswers.js +25 -61
  17. package/dist/answers/textAnswers.d.ts +32 -68
  18. package/dist/answers/textAnswers.js +30 -17
  19. package/dist/questions/__tests__/dateQuestions.spec.js +3 -0
  20. package/dist/questions/__tests__/defaults.spec.d.ts +1 -0
  21. package/dist/questions/__tests__/defaults.spec.js +668 -0
  22. package/dist/questions/__tests__/optionBasedQuestions.spec.js +3 -2
  23. package/dist/questions/__tests__/tableQuestion.spec.js +22 -23
  24. package/dist/questions/__tests__/textQuestions.spec.js +32 -0
  25. package/dist/questions/dateQuestions.d.ts +45 -191
  26. package/dist/questions/dateQuestions.js +26 -23
  27. package/dist/questions/graphQLQuestions.d.ts +262 -556
  28. package/dist/questions/graphQLQuestions.js +225 -223
  29. package/dist/questions/index.d.ts +689 -7440
  30. package/dist/questions/index.js +26 -1
  31. package/dist/questions/numberQuestions.d.ts +85 -331
  32. package/dist/questions/numberQuestions.js +50 -36
  33. package/dist/questions/optionBasedQuestions.d.ts +83 -290
  34. package/dist/questions/optionBasedQuestions.js +58 -41
  35. package/dist/questions/question.d.ts +72 -35
  36. package/dist/questions/question.js +14 -5
  37. package/dist/questions/tableQuestions.d.ts +1977 -9646
  38. package/dist/questions/tableQuestions.js +184 -192
  39. package/dist/questions/textQuestions.d.ts +70 -226
  40. package/dist/questions/textQuestions.js +31 -31
  41. package/package.json +4 -5
  42. package/dist/answers/__tests__/usage.spec.js +0 -178
  43. package/dist/questions/__tests__/usage.spec.d.ts +0 -8
  44. package/dist/questions/__tests__/usage.spec.js +0 -473
  45. package/dist/schemas/affiliationSearchAnswer.schema.json +0 -45
  46. package/dist/schemas/affiliationSearchQuestion.schema.json +0 -140
  47. package/dist/schemas/anyAnswer.schema.json +0 -605
  48. package/dist/schemas/anyQuestion.schema.json +0 -2455
  49. package/dist/schemas/anyTableColumnAnswer.schema.json +0 -466
  50. package/dist/schemas/anyTableColumnQuestion.schema.json +0 -1092
  51. package/dist/schemas/booleanAnswer.schema.json +0 -34
  52. package/dist/schemas/booleanQuestion.schema.json +0 -56
  53. package/dist/schemas/checkboxesAnswer.schema.json +0 -39
  54. package/dist/schemas/checkboxesQuestion.schema.json +0 -76
  55. package/dist/schemas/currencyAnswer.schema.json +0 -34
  56. package/dist/schemas/currencyQuestion.schema.json +0 -67
  57. package/dist/schemas/dateAnswer.schema.json +0 -34
  58. package/dist/schemas/datePickerAnswer.schema.json +0 -37
  59. package/dist/schemas/datePickerQuestion.schema.json +0 -52
  60. package/dist/schemas/dateQuestion.schema.json +0 -62
  61. package/dist/schemas/dateRangeAnswer.schema.json +0 -45
  62. package/dist/schemas/dateRangeQuestion.schema.json +0 -112
  63. package/dist/schemas/emailAnswer.schema.json +0 -34
  64. package/dist/schemas/emailQuestion.schema.json +0 -66
  65. package/dist/schemas/filteredSearchAnswer.schema.json +0 -40
  66. package/dist/schemas/filteredSearchQuestion.schema.json +0 -130
  67. package/dist/schemas/licenseSearchAnswer.schema.json +0 -49
  68. package/dist/schemas/licenseSearchQuestion.schema.json +0 -164
  69. package/dist/schemas/metadataStandardSearchAnswer.schema.json +0 -49
  70. package/dist/schemas/metadataStandardSearchQuestion.schema.json +0 -174
  71. package/dist/schemas/multiselectBoxAnswer.schema.json +0 -39
  72. package/dist/schemas/multiselectBoxQuestion.schema.json +0 -85
  73. package/dist/schemas/numberAnswer.schema.json +0 -34
  74. package/dist/schemas/numberQuestion.schema.json +0 -63
  75. package/dist/schemas/numberRangeAnswer.schema.json +0 -45
  76. package/dist/schemas/numberRangeQuestion.schema.json +0 -94
  77. package/dist/schemas/numberWithContextAnswer.schema.json +0 -45
  78. package/dist/schemas/numberWithContextQuestion.schema.json +0 -84
  79. package/dist/schemas/radioButtonsAnswer.schema.json +0 -34
  80. package/dist/schemas/radioButtonsQuestion.schema.json +0 -76
  81. package/dist/schemas/repositorySearchAnswer.schema.json +0 -49
  82. package/dist/schemas/repositorySearchQuestion.schema.json +0 -180
  83. package/dist/schemas/researchOutputTableAnswer.schema.json +0 -519
  84. package/dist/schemas/researchOutputTableQuestion.schema.json +0 -1183
  85. package/dist/schemas/selectBoxAnswer.schema.json +0 -34
  86. package/dist/schemas/selectBoxQuestion.schema.json +0 -85
  87. package/dist/schemas/tableAnswer.schema.json +0 -519
  88. package/dist/schemas/tableQuestion.schema.json +0 -1183
  89. package/dist/schemas/textAnswer.schema.json +0 -34
  90. package/dist/schemas/textAreaAnswer.schema.json +0 -34
  91. package/dist/schemas/textAreaQuestion.schema.json +0 -70
  92. package/dist/schemas/textQuestion.schema.json +0 -62
  93. package/dist/schemas/typeaheadSearchAnswer.schema.json +0 -37
  94. package/dist/schemas/typeaheadSearchQuestion.schema.json +0 -120
  95. package/dist/schemas/urlAnswer.schema.json +0 -34
  96. package/dist/schemas/urlQuestion.schema.json +0 -62
  97. /package/dist/answers/__tests__/{usage.spec.d.ts → defaults.spec.d.ts} +0 -0
@@ -1,39 +0,0 @@
1
- {
2
- "$ref": "#/definitions/MultiselectBoxAnswer",
3
- "definitions": {
4
- "MultiselectBoxAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "multiselectBox"
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
- "answer": {
23
- "type": "array",
24
- "items": {
25
- "type": "string"
26
- },
27
- "default": [
28
- ""
29
- ]
30
- }
31
- },
32
- "required": [
33
- "type"
34
- ],
35
- "additionalProperties": false
36
- }
37
- },
38
- "$schema": "http://json-schema.org/draft-07/schema#"
39
- }
@@ -1,85 +0,0 @@
1
- {
2
- "$ref": "#/definitions/MultiselectBoxQuestion",
3
- "definitions": {
4
- "MultiselectBoxQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "multiselectBox"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- },
23
- "multiple": {
24
- "type": "boolean",
25
- "const": true
26
- }
27
- },
28
- "required": [
29
- "multiple"
30
- ],
31
- "additionalProperties": false,
32
- "default": {
33
- "multiple": true
34
- }
35
- },
36
- "meta": {
37
- "type": "object",
38
- "properties": {
39
- "schemaVersion": {
40
- "type": "string",
41
- "default": "1.0"
42
- },
43
- "title": {
44
- "type": "string"
45
- },
46
- "usageDescription": {
47
- "type": "string"
48
- }
49
- },
50
- "additionalProperties": false,
51
- "default": {}
52
- },
53
- "options": {
54
- "type": "array",
55
- "items": {
56
- "type": "object",
57
- "properties": {
58
- "label": {
59
- "type": "string",
60
- "default": "Option A"
61
- },
62
- "value": {
63
- "type": "string",
64
- "default": "a"
65
- },
66
- "selected": {
67
- "type": "boolean",
68
- "default": false
69
- }
70
- },
71
- "additionalProperties": false
72
- },
73
- "default": [
74
- {}
75
- ]
76
- }
77
- },
78
- "required": [
79
- "type"
80
- ],
81
- "additionalProperties": false
82
- }
83
- },
84
- "$schema": "http://json-schema.org/draft-07/schema#"
85
- }
@@ -1,34 +0,0 @@
1
- {
2
- "$ref": "#/definitions/NumberAnswer",
3
- "definitions": {
4
- "NumberAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "number"
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
- "answer": {
23
- "type": "number",
24
- "default": 0
25
- }
26
- },
27
- "required": [
28
- "type"
29
- ],
30
- "additionalProperties": false
31
- }
32
- },
33
- "$schema": "http://json-schema.org/draft-07/schema#"
34
- }
@@ -1,63 +0,0 @@
1
- {
2
- "$ref": "#/definitions/NumberQuestion",
3
- "definitions": {
4
- "NumberQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "number"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- },
23
- "max": {
24
- "type": "number"
25
- },
26
- "min": {
27
- "type": "number",
28
- "default": 0
29
- },
30
- "step": {
31
- "type": "number",
32
- "default": 1
33
- }
34
- },
35
- "additionalProperties": false,
36
- "default": {}
37
- },
38
- "meta": {
39
- "type": "object",
40
- "properties": {
41
- "schemaVersion": {
42
- "type": "string",
43
- "default": "1.0"
44
- },
45
- "title": {
46
- "type": "string"
47
- },
48
- "usageDescription": {
49
- "type": "string"
50
- }
51
- },
52
- "additionalProperties": false,
53
- "default": {}
54
- }
55
- },
56
- "required": [
57
- "type"
58
- ],
59
- "additionalProperties": false
60
- }
61
- },
62
- "$schema": "http://json-schema.org/draft-07/schema#"
63
- }
@@ -1,45 +0,0 @@
1
- {
2
- "$ref": "#/definitions/NumberRangeAnswer",
3
- "definitions": {
4
- "NumberRangeAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "numberRange"
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
- "answer": {
23
- "type": "object",
24
- "properties": {
25
- "start": {
26
- "type": "number",
27
- "default": 0
28
- },
29
- "end": {
30
- "type": "number",
31
- "default": 0
32
- }
33
- },
34
- "additionalProperties": false,
35
- "default": {}
36
- }
37
- },
38
- "required": [
39
- "type"
40
- ],
41
- "additionalProperties": false
42
- }
43
- },
44
- "$schema": "http://json-schema.org/draft-07/schema#"
45
- }
@@ -1,94 +0,0 @@
1
- {
2
- "$ref": "#/definitions/NumberRangeQuestion",
3
- "definitions": {
4
- "NumberRangeQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "numberRange"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- }
23
- },
24
- "additionalProperties": false,
25
- "default": {}
26
- },
27
- "meta": {
28
- "type": "object",
29
- "properties": {
30
- "schemaVersion": {
31
- "type": "string",
32
- "default": "1.0"
33
- },
34
- "title": {
35
- "type": "string"
36
- },
37
- "usageDescription": {
38
- "type": "string"
39
- }
40
- },
41
- "additionalProperties": false,
42
- "default": {}
43
- },
44
- "columns": {
45
- "type": "object",
46
- "properties": {
47
- "start": {
48
- "type": "object",
49
- "properties": {
50
- "label": {
51
- "$ref": "#/definitions/NumberRangeQuestion/properties/attributes/properties/label"
52
- },
53
- "help": {
54
- "$ref": "#/definitions/NumberRangeQuestion/properties/attributes/properties/help"
55
- },
56
- "labelTranslationKey": {
57
- "$ref": "#/definitions/NumberRangeQuestion/properties/attributes/properties/labelTranslationKey"
58
- },
59
- "max": {
60
- "type": "number"
61
- },
62
- "min": {
63
- "type": "number",
64
- "default": 0
65
- },
66
- "step": {
67
- "type": "number",
68
- "default": 1
69
- }
70
- },
71
- "additionalProperties": false,
72
- "default": {
73
- "label": "From"
74
- }
75
- },
76
- "end": {
77
- "$ref": "#/definitions/NumberRangeQuestion/properties/columns/properties/start",
78
- "default": {
79
- "label": "To"
80
- }
81
- }
82
- },
83
- "additionalProperties": false,
84
- "default": {}
85
- }
86
- },
87
- "required": [
88
- "type"
89
- ],
90
- "additionalProperties": false
91
- }
92
- },
93
- "$schema": "http://json-schema.org/draft-07/schema#"
94
- }
@@ -1,45 +0,0 @@
1
- {
2
- "$ref": "#/definitions/NumberWithContextAnswer",
3
- "definitions": {
4
- "NumberWithContextAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "numberWithContext"
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
- "answer": {
23
- "type": "object",
24
- "properties": {
25
- "value": {
26
- "type": "number",
27
- "default": 0
28
- },
29
- "context": {
30
- "type": "string",
31
- "default": ""
32
- }
33
- },
34
- "additionalProperties": false
35
- }
36
- },
37
- "required": [
38
- "type",
39
- "answer"
40
- ],
41
- "additionalProperties": false
42
- }
43
- },
44
- "$schema": "http://json-schema.org/draft-07/schema#"
45
- }
@@ -1,84 +0,0 @@
1
- {
2
- "$ref": "#/definitions/NumberWithContextQuestion",
3
- "definitions": {
4
- "NumberWithContextQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "numberWithContext"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- },
23
- "max": {
24
- "type": "number"
25
- },
26
- "min": {
27
- "type": "number",
28
- "default": 0
29
- },
30
- "step": {
31
- "type": "number",
32
- "default": 1
33
- },
34
- "context": {
35
- "type": "array",
36
- "items": {
37
- "type": "object",
38
- "properties": {
39
- "label": {
40
- "type": "string",
41
- "default": ""
42
- },
43
- "labelTranslationKey": {
44
- "type": "string"
45
- },
46
- "value": {
47
- "type": "string",
48
- "default": ""
49
- }
50
- },
51
- "additionalProperties": false
52
- },
53
- "default": []
54
- }
55
- },
56
- "additionalProperties": false,
57
- "default": {}
58
- },
59
- "meta": {
60
- "type": "object",
61
- "properties": {
62
- "schemaVersion": {
63
- "type": "string",
64
- "default": "1.0"
65
- },
66
- "title": {
67
- "type": "string"
68
- },
69
- "usageDescription": {
70
- "type": "string"
71
- }
72
- },
73
- "additionalProperties": false,
74
- "default": {}
75
- }
76
- },
77
- "required": [
78
- "type"
79
- ],
80
- "additionalProperties": false
81
- }
82
- },
83
- "$schema": "http://json-schema.org/draft-07/schema#"
84
- }
@@ -1,34 +0,0 @@
1
- {
2
- "$ref": "#/definitions/RadioButtonsAnswer",
3
- "definitions": {
4
- "RadioButtonsAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "radioButtons"
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
- "answer": {
23
- "type": "string",
24
- "default": ""
25
- }
26
- },
27
- "required": [
28
- "type"
29
- ],
30
- "additionalProperties": false
31
- }
32
- },
33
- "$schema": "http://json-schema.org/draft-07/schema#"
34
- }
@@ -1,76 +0,0 @@
1
- {
2
- "$ref": "#/definitions/RadioButtonsQuestion",
3
- "definitions": {
4
- "RadioButtonsQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "radioButtons"
10
- },
11
- "attributes": {
12
- "type": "object",
13
- "properties": {
14
- "label": {
15
- "type": "string"
16
- },
17
- "help": {
18
- "type": "string"
19
- },
20
- "labelTranslationKey": {
21
- "type": "string"
22
- }
23
- },
24
- "additionalProperties": false,
25
- "default": {}
26
- },
27
- "meta": {
28
- "type": "object",
29
- "properties": {
30
- "schemaVersion": {
31
- "type": "string",
32
- "default": "1.0"
33
- },
34
- "title": {
35
- "type": "string"
36
- },
37
- "usageDescription": {
38
- "type": "string"
39
- }
40
- },
41
- "additionalProperties": false,
42
- "default": {}
43
- },
44
- "options": {
45
- "type": "array",
46
- "items": {
47
- "type": "object",
48
- "properties": {
49
- "label": {
50
- "type": "string",
51
- "default": "Option A"
52
- },
53
- "value": {
54
- "type": "string",
55
- "default": "a"
56
- },
57
- "selected": {
58
- "type": "boolean",
59
- "default": false
60
- }
61
- },
62
- "additionalProperties": false
63
- },
64
- "default": [
65
- {}
66
- ]
67
- }
68
- },
69
- "required": [
70
- "type"
71
- ],
72
- "additionalProperties": false
73
- }
74
- },
75
- "$schema": "http://json-schema.org/draft-07/schema#"
76
- }
@@ -1,49 +0,0 @@
1
- {
2
- "$ref": "#/definitions/RepositorySearchAnswer",
3
- "definitions": {
4
- "RepositorySearchAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "repositorySearch"
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
- "answer": {
23
- "type": "array",
24
- "items": {
25
- "type": "object",
26
- "properties": {
27
- "repositoryId": {
28
- "type": "string",
29
- "default": ""
30
- },
31
- "repositoryName": {
32
- "type": "string",
33
- "default": ""
34
- }
35
- },
36
- "additionalProperties": false,
37
- "default": {}
38
- },
39
- "default": []
40
- }
41
- },
42
- "required": [
43
- "type"
44
- ],
45
- "additionalProperties": false
46
- }
47
- },
48
- "$schema": "http://json-schema.org/draft-07/schema#"
49
- }