@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,66 +0,0 @@
1
- {
2
- "$ref": "#/definitions/EmailQuestion",
3
- "definitions": {
4
- "EmailQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "email"
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
- "maxLength": {
24
- "type": "number",
25
- "default": 255
26
- },
27
- "minLength": {
28
- "type": "number"
29
- },
30
- "pattern": {
31
- "type": "string"
32
- },
33
- "multiple": {
34
- "type": "boolean",
35
- "default": false
36
- }
37
- },
38
- "additionalProperties": false,
39
- "default": {}
40
- },
41
- "meta": {
42
- "type": "object",
43
- "properties": {
44
- "schemaVersion": {
45
- "type": "string",
46
- "default": "1.0"
47
- },
48
- "title": {
49
- "type": "string"
50
- },
51
- "usageDescription": {
52
- "type": "string"
53
- }
54
- },
55
- "additionalProperties": false,
56
- "default": {}
57
- }
58
- },
59
- "required": [
60
- "type"
61
- ],
62
- "additionalProperties": false
63
- }
64
- },
65
- "$schema": "http://json-schema.org/draft-07/schema#"
66
- }
@@ -1,40 +0,0 @@
1
- {
2
- "$ref": "#/definitions/FilteredSearchAnswer",
3
- "definitions": {
4
- "FilteredSearchAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "filteredSearch"
10
- },
11
- "answer": {
12
- "type": "array",
13
- "items": {
14
- "type": "string"
15
- }
16
- },
17
- "meta": {
18
- "type": "object",
19
- "properties": {
20
- "schemaVersion": {
21
- "type": "string",
22
- "const": "1.0"
23
- }
24
- },
25
- "required": [
26
- "schemaVersion"
27
- ],
28
- "additionalProperties": false
29
- }
30
- },
31
- "required": [
32
- "type",
33
- "answer",
34
- "meta"
35
- ],
36
- "additionalProperties": false
37
- }
38
- },
39
- "$schema": "http://json-schema.org/draft-07/schema#"
40
- }
@@ -1,130 +0,0 @@
1
- {
2
- "$ref": "#/definitions/FilteredSearchQuestion",
3
- "definitions": {
4
- "FilteredSearchQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "filteredSearch"
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
- }
26
- },
27
- "additionalProperties": false
28
- },
29
- "meta": {
30
- "type": "object",
31
- "properties": {
32
- "schemaVersion": {
33
- "type": "string",
34
- "const": "1.0"
35
- },
36
- "title": {
37
- "type": "string",
38
- "const": "Not yet implemented"
39
- },
40
- "usageDescription": {
41
- "type": "string"
42
- }
43
- },
44
- "required": [
45
- "schemaVersion"
46
- ],
47
- "additionalProperties": false
48
- },
49
- "graphQL": {
50
- "type": "object",
51
- "properties": {
52
- "displayFields": {
53
- "type": "array",
54
- "items": {
55
- "type": "object",
56
- "properties": {
57
- "propertyName": {
58
- "type": "string"
59
- },
60
- "label": {
61
- "type": "string"
62
- },
63
- "labelTranslationKey": {
64
- "type": "string"
65
- }
66
- },
67
- "required": [
68
- "propertyName",
69
- "label"
70
- ],
71
- "additionalProperties": false
72
- }
73
- },
74
- "localQueryId": {
75
- "type": "string"
76
- },
77
- "query": {
78
- "type": "string"
79
- },
80
- "responseField": {
81
- "type": "string"
82
- },
83
- "variables": {
84
- "type": "array",
85
- "items": {
86
- "type": "object",
87
- "properties": {
88
- "minLength": {
89
- "type": "number"
90
- },
91
- "label": {
92
- "type": "string"
93
- },
94
- "labelTranslationKey": {
95
- "type": "string"
96
- },
97
- "name": {
98
- "type": "string"
99
- },
100
- "type": {
101
- "type": "string"
102
- },
103
- "defaultValue": {
104
- "type": "string"
105
- }
106
- },
107
- "required": [
108
- "name",
109
- "type"
110
- ],
111
- "additionalProperties": false
112
- }
113
- }
114
- },
115
- "required": [
116
- "displayFields",
117
- "responseField"
118
- ],
119
- "additionalProperties": false
120
- }
121
- },
122
- "required": [
123
- "type",
124
- "graphQL"
125
- ],
126
- "additionalProperties": false
127
- }
128
- },
129
- "$schema": "http://json-schema.org/draft-07/schema#"
130
- }
@@ -1,49 +0,0 @@
1
- {
2
- "$ref": "#/definitions/LicenseSearchAnswer",
3
- "definitions": {
4
- "LicenseSearchAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "licenseSearch"
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
- "licenseId": {
28
- "type": "string",
29
- "default": ""
30
- },
31
- "licenseName": {
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
- }
@@ -1,164 +0,0 @@
1
- {
2
- "$ref": "#/definitions/LicenseSearchQuestion",
3
- "definitions": {
4
- "LicenseSearchQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "licenseSearch"
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
- "graphQL": {
45
- "type": "object",
46
- "properties": {
47
- "displayFields": {
48
- "type": "array",
49
- "items": {
50
- "type": "object",
51
- "properties": {
52
- "propertyName": {
53
- "type": "string",
54
- "default": "id"
55
- },
56
- "label": {
57
- "type": "string",
58
- "default": "Id"
59
- },
60
- "labelTranslationKey": {
61
- "type": "string"
62
- }
63
- },
64
- "additionalProperties": false
65
- },
66
- "default": [
67
- {
68
- "propertyName": "name",
69
- "label": "Name"
70
- },
71
- {
72
- "propertyName": "description",
73
- "label": "Description"
74
- },
75
- {
76
- "propertyName": "recommended",
77
- "label": "Recommended"
78
- }
79
- ]
80
- },
81
- "localQueryId": {
82
- "type": "string"
83
- },
84
- "query": {
85
- "type": "string",
86
- "const": "query Licenses($term: String, $paginationOptions: PaginationOptions){ license(term: $term, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description } } }",
87
- "default": "query Licenses($term: String, $paginationOptions: PaginationOptions){ license(term: $term, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description } } }"
88
- },
89
- "responseField": {
90
- "type": "string",
91
- "const": "licenses.items",
92
- "default": "licenses.items"
93
- },
94
- "variables": {
95
- "type": "array",
96
- "items": {
97
- "type": "object",
98
- "properties": {
99
- "minLength": {
100
- "type": "number"
101
- },
102
- "label": {
103
- "type": "string"
104
- },
105
- "labelTranslationKey": {
106
- "type": "string"
107
- },
108
- "name": {
109
- "type": "string",
110
- "default": "search"
111
- },
112
- "type": {
113
- "type": "string",
114
- "default": "string"
115
- },
116
- "defaultValue": {
117
- "type": "string"
118
- }
119
- },
120
- "additionalProperties": false
121
- },
122
- "default": [
123
- {
124
- "minLength": 3,
125
- "label": "Search for a license",
126
- "name": "term",
127
- "type": "string"
128
- },
129
- {
130
- "label": "Pagination Options",
131
- "name": "paginationOptions",
132
- "type": "paginationOptions",
133
- "options": {
134
- "type": "OFFSET",
135
- "limit": 10,
136
- "offset": 0,
137
- "sortField": "name",
138
- "sortOrder": "ASC"
139
- }
140
- }
141
- ]
142
- },
143
- "queryId": {
144
- "type": "string",
145
- "default": "useLicensesQuery"
146
- },
147
- "answerField": {
148
- "type": "string",
149
- "const": "uri",
150
- "default": "uri"
151
- }
152
- },
153
- "additionalProperties": false,
154
- "default": {}
155
- }
156
- },
157
- "required": [
158
- "type"
159
- ],
160
- "additionalProperties": false
161
- }
162
- },
163
- "$schema": "http://json-schema.org/draft-07/schema#"
164
- }
@@ -1,49 +0,0 @@
1
- {
2
- "$ref": "#/definitions/MetadataStandardSearchAnswer",
3
- "definitions": {
4
- "MetadataStandardSearchAnswer": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "metadataStandardSearch"
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
- "metadataStandardId": {
28
- "type": "string",
29
- "default": ""
30
- },
31
- "metadataStandardName": {
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
- }
@@ -1,174 +0,0 @@
1
- {
2
- "$ref": "#/definitions/MetadataStandardSearchQuestion",
3
- "definitions": {
4
- "MetadataStandardSearchQuestion": {
5
- "type": "object",
6
- "properties": {
7
- "type": {
8
- "type": "string",
9
- "const": "metadataStandardSearch"
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
- "graphQL": {
45
- "type": "object",
46
- "properties": {
47
- "displayFields": {
48
- "type": "array",
49
- "items": {
50
- "type": "object",
51
- "properties": {
52
- "propertyName": {
53
- "type": "string",
54
- "default": "id"
55
- },
56
- "label": {
57
- "type": "string",
58
- "default": "Id"
59
- },
60
- "labelTranslationKey": {
61
- "type": "string"
62
- }
63
- },
64
- "additionalProperties": false
65
- },
66
- "default": [
67
- {
68
- "propertyName": "name",
69
- "label": "Name"
70
- },
71
- {
72
- "propertyName": "description",
73
- "label": "Description"
74
- },
75
- {
76
- "propertyName": "website",
77
- "label": "Website"
78
- },
79
- {
80
- "propertyName": "keywords",
81
- "label": "Subject Areas"
82
- }
83
- ]
84
- },
85
- "localQueryId": {
86
- "type": "string"
87
- },
88
- "query": {
89
- "type": "string",
90
- "const": "query MetadataStandards($term: String, $keywords: [String!], $paginationOptions: PaginationOptions){ metadataStandards(term: $term, keywords: $keywords, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description keywords } } }",
91
- "default": "query MetadataStandards($term: String, $keywords: [String!], $paginationOptions: PaginationOptions){ metadataStandards(term: $term, keywords: $keywords, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description keywords } } }"
92
- },
93
- "responseField": {
94
- "type": "string",
95
- "const": "metadataStandards.items",
96
- "default": "metadataStandards.items"
97
- },
98
- "variables": {
99
- "type": "array",
100
- "items": {
101
- "type": "object",
102
- "properties": {
103
- "minLength": {
104
- "type": "number"
105
- },
106
- "label": {
107
- "type": "string"
108
- },
109
- "labelTranslationKey": {
110
- "type": "string"
111
- },
112
- "name": {
113
- "type": "string",
114
- "default": "search"
115
- },
116
- "type": {
117
- "type": "string",
118
- "default": "string"
119
- },
120
- "defaultValue": {
121
- "type": "string"
122
- }
123
- },
124
- "additionalProperties": false
125
- },
126
- "default": [
127
- {
128
- "minLength": 3,
129
- "label": "Search for a metadata standard",
130
- "name": "term",
131
- "type": "string"
132
- },
133
- {
134
- "minLength": 3,
135
- "label": "Subject Areas",
136
- "name": "keywords",
137
- "type": "string"
138
- },
139
- {
140
- "label": "Pagination Options",
141
- "name": "paginationOptions",
142
- "type": "paginationOptions",
143
- "options": {
144
- "type": "OFFSET",
145
- "limit": 10,
146
- "offset": 0,
147
- "sortField": "name",
148
- "sortOrder": "ASC"
149
- }
150
- }
151
- ]
152
- },
153
- "queryId": {
154
- "type": "string",
155
- "default": "useMetadataStandardsQuery"
156
- },
157
- "answerField": {
158
- "type": "string",
159
- "const": "uri",
160
- "default": "uri"
161
- }
162
- },
163
- "additionalProperties": false,
164
- "default": {}
165
- }
166
- },
167
- "required": [
168
- "type"
169
- ],
170
- "additionalProperties": false
171
- }
172
- },
173
- "$schema": "http://json-schema.org/draft-07/schema#"
174
- }