@dmptool/types 1.2.3 → 1.2.5

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 +188 -3
  26. package/dist/schemas/anyAnswer.schema.json +137 -17
  27. package/dist/schemas/anyQuestion.schema.json +847 -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,180 @@
1
+ {
2
+ "$ref": "#/definitions/RepositorySearchQuestion",
3
+ "definitions": {
4
+ "RepositorySearchQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "repositorySearch"
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 Repositories($term: String, $keywords: [String!], $repositoryType: String, $paginationOptions: PaginationOptions){ repositories(term: $term, keywords: $keywords, repositoryType: $repositoryType, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description website keywords repositoryTypes } } }",
91
+ "default": "query Repositories($term: String, $keywords: [String!], $repositoryType: String, $paginationOptions: PaginationOptions){ repositories(term: $term, keywords: $keywords, repositoryType: $repositoryType, paginationOptions: $paginationOptions) { totalCount currentOffset limit hasNextPage hasPreviousPage availableSortFields items { id name uri description website keywords repositoryTypes } } }"
92
+ },
93
+ "responseField": {
94
+ "type": "string",
95
+ "const": "repositories.items",
96
+ "default": "repositories.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 repository",
130
+ "name": "term",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "minLength": 3,
135
+ "label": "Subject Areas",
136
+ "name": "keywords",
137
+ "type": "string"
138
+ },
139
+ {
140
+ "minLength": 3,
141
+ "label": "Repository type",
142
+ "name": "repositoryType",
143
+ "type": "string"
144
+ },
145
+ {
146
+ "label": "Pagination Options",
147
+ "name": "paginationOptions",
148
+ "type": "paginationOptions",
149
+ "options": {
150
+ "type": "OFFSET",
151
+ "limit": 10,
152
+ "offset": 0,
153
+ "sortField": "name",
154
+ "sortOrder": "ASC"
155
+ }
156
+ }
157
+ ]
158
+ },
159
+ "queryId": {
160
+ "type": "string",
161
+ "default": "useRepositoriesQuery"
162
+ },
163
+ "answerField": {
164
+ "type": "string",
165
+ "const": "uri",
166
+ "default": "uri"
167
+ }
168
+ },
169
+ "additionalProperties": false,
170
+ "default": {}
171
+ }
172
+ },
173
+ "required": [
174
+ "type"
175
+ ],
176
+ "additionalProperties": false
177
+ }
178
+ },
179
+ "$schema": "http://json-schema.org/draft-07/schema#"
180
+ }