@dmptool/types 1.1.2 → 1.1.3
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.
- package/dist/questions/__tests__/graphQLQuestions.spec.js +6 -4
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +4 -12
- package/dist/questions/dateQuestions.d.ts +31 -41
- package/dist/questions/dateQuestions.js +5 -20
- package/dist/questions/graphQLQuestions.d.ts +75 -81
- package/dist/questions/graphQLQuestions.js +18 -24
- package/dist/questions/index.d.ts +524 -723
- package/dist/questions/numberQuestions.d.ts +51 -66
- package/dist/questions/numberQuestions.js +6 -28
- package/dist/questions/optionBasedQuestions.d.ts +44 -69
- package/dist/questions/optionBasedQuestions.js +7 -55
- package/dist/questions/question.d.ts +0 -8
- package/dist/questions/question.js +0 -1
- package/dist/questions/tableQuestions.d.ts +717 -998
- package/dist/questions/tableQuestions.js +3 -10
- package/dist/questions/textQuestions.d.ts +21 -41
- package/dist/questions/textQuestions.js +10 -34
- package/dist/schemas/affiliationSearchQuestion.schema.json +39 -26
- package/dist/schemas/anyQuestion.schema.json +152 -119
- package/dist/schemas/anyTableColumnQuestion.schema.json +142 -104
- package/dist/schemas/booleanQuestion.schema.json +2 -5
- package/dist/schemas/checkboxesQuestion.schema.json +6 -11
- package/dist/schemas/currencyQuestion.schema.json +6 -7
- package/dist/schemas/dateQuestion.schema.json +2 -5
- package/dist/schemas/dateRangeQuestion.schema.json +6 -5
- package/dist/schemas/emailQuestion.schema.json +4 -6
- package/dist/schemas/filteredSearchQuestion.schema.json +0 -3
- package/dist/schemas/multiselectBoxQuestion.schema.json +6 -11
- package/dist/schemas/numberQuestion.schema.json +4 -6
- package/dist/schemas/numberRangeQuestion.schema.json +8 -6
- package/dist/schemas/radioButtonsQuestion.schema.json +6 -11
- package/dist/schemas/selectBoxQuestion.schema.json +7 -15
- package/dist/schemas/tableQuestion.schema.json +148 -111
- package/dist/schemas/textAreaQuestion.schema.json +6 -7
- package/dist/schemas/textQuestion.schema.json +2 -5
- package/dist/schemas/urlQuestion.schema.json +2 -5
- package/package.json +1 -1
|
@@ -57,16 +57,18 @@ const graphQLQuestions_1 = require("../graphQLQuestions");
|
|
|
57
57
|
type: "affiliationSearch",
|
|
58
58
|
attributes: {
|
|
59
59
|
label: "Search",
|
|
60
|
-
help: "Search for a
|
|
60
|
+
help: "Search for a institution",
|
|
61
61
|
},
|
|
62
62
|
graphQL: {
|
|
63
|
+
query: "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}",
|
|
63
64
|
displayFields: [
|
|
64
|
-
{ propertyName: "
|
|
65
|
+
{ propertyName: "displayName", label: "Name" },
|
|
65
66
|
],
|
|
66
67
|
localQueryId: "12345",
|
|
67
|
-
|
|
68
|
+
answerField: "uri",
|
|
69
|
+
responseField: "affiliations.items",
|
|
68
70
|
variables: [
|
|
69
|
-
{ name: "
|
|
71
|
+
{ type: "string", name: "name", label: "Term", minLength: 3 },
|
|
70
72
|
],
|
|
71
73
|
},
|
|
72
74
|
meta: {
|
|
@@ -3,18 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const globals_1 = require("@jest/globals");
|
|
4
4
|
const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
5
5
|
(0, globals_1.describe)("BooleanQuestion", () => {
|
|
6
|
-
(0, globals_1.it)('optional fields should not throw an error if the value is undefined', () => {
|
|
7
|
-
const validBooleanQuestion = {
|
|
8
|
-
type: "boolean",
|
|
9
|
-
meta: {
|
|
10
|
-
schemaVersion: "1.0",
|
|
11
|
-
},
|
|
12
|
-
attributes: {
|
|
13
|
-
checked: undefined, // Valid value
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
(0, globals_1.expect)(() => optionBasedQuestions_1.BooleanQuestionSchema.parse(validBooleanQuestion)).not.toThrow();
|
|
17
|
-
});
|
|
18
6
|
(0, globals_1.it)('optional fields should throw an error if the value is null', () => {
|
|
19
7
|
const invalidBooleanQuestion = {
|
|
20
8
|
type: "boolean",
|
|
@@ -69,6 +57,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
69
57
|
{
|
|
70
58
|
label: "Banana",
|
|
71
59
|
value: "banana",
|
|
60
|
+
checked: false,
|
|
72
61
|
},
|
|
73
62
|
],
|
|
74
63
|
meta: {
|
|
@@ -115,6 +104,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
115
104
|
{
|
|
116
105
|
label: "Female",
|
|
117
106
|
value: "female",
|
|
107
|
+
selected: true,
|
|
118
108
|
},
|
|
119
109
|
],
|
|
120
110
|
meta: {
|
|
@@ -158,6 +148,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
158
148
|
{
|
|
159
149
|
label: "Canada",
|
|
160
150
|
value: "ca",
|
|
151
|
+
selected: false,
|
|
161
152
|
},
|
|
162
153
|
],
|
|
163
154
|
meta: {
|
|
@@ -205,6 +196,7 @@ const optionBasedQuestions_1 = require("../optionBasedQuestions");
|
|
|
205
196
|
{
|
|
206
197
|
label: "Canada",
|
|
207
198
|
value: "ca",
|
|
199
|
+
selected: false,
|
|
208
200
|
},
|
|
209
201
|
],
|
|
210
202
|
meta: {
|
|
@@ -8,14 +8,14 @@ export declare const DateQuestionSchema: z.ZodObject<{} & {
|
|
|
8
8
|
} & {
|
|
9
9
|
max: z.ZodOptional<z.ZodString>;
|
|
10
10
|
min: z.ZodOptional<z.ZodString>;
|
|
11
|
-
step: z.
|
|
11
|
+
step: z.ZodDefault<z.ZodNumber>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
step: number;
|
|
13
14
|
label?: string | undefined;
|
|
14
15
|
help?: string | undefined;
|
|
15
16
|
labelTranslationKey?: string | undefined;
|
|
16
17
|
max?: string | undefined;
|
|
17
18
|
min?: string | undefined;
|
|
18
|
-
step?: number | undefined;
|
|
19
19
|
}, {
|
|
20
20
|
label?: string | undefined;
|
|
21
21
|
help?: string | undefined;
|
|
@@ -29,33 +29,29 @@ export declare const DateQuestionSchema: z.ZodObject<{} & {
|
|
|
29
29
|
} & {
|
|
30
30
|
title: z.ZodOptional<z.ZodLiteral<"Date Field">>;
|
|
31
31
|
usageDescription: z.ZodOptional<z.ZodLiteral<"For questions that require a date.">>;
|
|
32
|
-
defaultJSON: z.ZodOptional<z.ZodLiteral<string>>;
|
|
33
32
|
}, "strip", z.ZodTypeAny, {
|
|
34
33
|
schemaVersion: "1.0";
|
|
35
34
|
title?: "Date Field" | undefined;
|
|
36
35
|
usageDescription?: "For questions that require a date." | undefined;
|
|
37
|
-
defaultJSON?: string | undefined;
|
|
38
36
|
}, {
|
|
39
37
|
schemaVersion: "1.0";
|
|
40
38
|
title?: "Date Field" | undefined;
|
|
41
39
|
usageDescription?: "For questions that require a date." | undefined;
|
|
42
|
-
defaultJSON?: string | undefined;
|
|
43
40
|
}>>;
|
|
44
41
|
}, "strip", z.ZodTypeAny, {
|
|
45
42
|
type: "date";
|
|
46
43
|
attributes?: {
|
|
44
|
+
step: number;
|
|
47
45
|
label?: string | undefined;
|
|
48
46
|
help?: string | undefined;
|
|
49
47
|
labelTranslationKey?: string | undefined;
|
|
50
48
|
max?: string | undefined;
|
|
51
49
|
min?: string | undefined;
|
|
52
|
-
step?: number | undefined;
|
|
53
50
|
} | undefined;
|
|
54
51
|
meta?: {
|
|
55
52
|
schemaVersion: "1.0";
|
|
56
53
|
title?: "Date Field" | undefined;
|
|
57
54
|
usageDescription?: "For questions that require a date." | undefined;
|
|
58
|
-
defaultJSON?: string | undefined;
|
|
59
55
|
} | undefined;
|
|
60
56
|
}, {
|
|
61
57
|
type: "date";
|
|
@@ -71,7 +67,6 @@ export declare const DateQuestionSchema: z.ZodObject<{} & {
|
|
|
71
67
|
schemaVersion: "1.0";
|
|
72
68
|
title?: "Date Field" | undefined;
|
|
73
69
|
usageDescription?: "For questions that require a date." | undefined;
|
|
74
|
-
defaultJSON?: string | undefined;
|
|
75
70
|
} | undefined;
|
|
76
71
|
}>;
|
|
77
72
|
export declare const DateRangeQuestionSchema: z.ZodObject<{
|
|
@@ -91,21 +86,21 @@ export declare const DateRangeQuestionSchema: z.ZodObject<{
|
|
|
91
86
|
} & {
|
|
92
87
|
type: z.ZodLiteral<"dateRange">;
|
|
93
88
|
columns: z.ZodObject<{
|
|
94
|
-
start: z.
|
|
89
|
+
start: z.ZodObject<{
|
|
95
90
|
label: z.ZodOptional<z.ZodString>;
|
|
96
91
|
help: z.ZodOptional<z.ZodString>;
|
|
97
92
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
98
93
|
} & {
|
|
99
94
|
max: z.ZodOptional<z.ZodString>;
|
|
100
95
|
min: z.ZodOptional<z.ZodString>;
|
|
101
|
-
step: z.
|
|
96
|
+
step: z.ZodDefault<z.ZodNumber>;
|
|
102
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
step: number;
|
|
103
99
|
label?: string | undefined;
|
|
104
100
|
help?: string | undefined;
|
|
105
101
|
labelTranslationKey?: string | undefined;
|
|
106
102
|
max?: string | undefined;
|
|
107
103
|
min?: string | undefined;
|
|
108
|
-
step?: number | undefined;
|
|
109
104
|
}, {
|
|
110
105
|
label?: string | undefined;
|
|
111
106
|
help?: string | undefined;
|
|
@@ -113,22 +108,22 @@ export declare const DateRangeQuestionSchema: z.ZodObject<{
|
|
|
113
108
|
max?: string | undefined;
|
|
114
109
|
min?: string | undefined;
|
|
115
110
|
step?: number | undefined;
|
|
116
|
-
}
|
|
117
|
-
end: z.
|
|
111
|
+
}>;
|
|
112
|
+
end: z.ZodObject<{
|
|
118
113
|
label: z.ZodOptional<z.ZodString>;
|
|
119
114
|
help: z.ZodOptional<z.ZodString>;
|
|
120
115
|
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
121
116
|
} & {
|
|
122
117
|
max: z.ZodOptional<z.ZodString>;
|
|
123
118
|
min: z.ZodOptional<z.ZodString>;
|
|
124
|
-
step: z.
|
|
119
|
+
step: z.ZodDefault<z.ZodNumber>;
|
|
125
120
|
}, "strip", z.ZodTypeAny, {
|
|
121
|
+
step: number;
|
|
126
122
|
label?: string | undefined;
|
|
127
123
|
help?: string | undefined;
|
|
128
124
|
labelTranslationKey?: string | undefined;
|
|
129
125
|
max?: string | undefined;
|
|
130
126
|
min?: string | undefined;
|
|
131
|
-
step?: number | undefined;
|
|
132
127
|
}, {
|
|
133
128
|
label?: string | undefined;
|
|
134
129
|
help?: string | undefined;
|
|
@@ -136,78 +131,75 @@ export declare const DateRangeQuestionSchema: z.ZodObject<{
|
|
|
136
131
|
max?: string | undefined;
|
|
137
132
|
min?: string | undefined;
|
|
138
133
|
step?: number | undefined;
|
|
139
|
-
}
|
|
134
|
+
}>;
|
|
140
135
|
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
start
|
|
136
|
+
start: {
|
|
137
|
+
step: number;
|
|
142
138
|
label?: string | undefined;
|
|
143
139
|
help?: string | undefined;
|
|
144
140
|
labelTranslationKey?: string | undefined;
|
|
145
141
|
max?: string | undefined;
|
|
146
142
|
min?: string | undefined;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
};
|
|
144
|
+
end: {
|
|
145
|
+
step: number;
|
|
150
146
|
label?: string | undefined;
|
|
151
147
|
help?: string | undefined;
|
|
152
148
|
labelTranslationKey?: string | undefined;
|
|
153
149
|
max?: string | undefined;
|
|
154
150
|
min?: string | undefined;
|
|
155
|
-
|
|
156
|
-
} | undefined;
|
|
151
|
+
};
|
|
157
152
|
}, {
|
|
158
|
-
start
|
|
153
|
+
start: {
|
|
159
154
|
label?: string | undefined;
|
|
160
155
|
help?: string | undefined;
|
|
161
156
|
labelTranslationKey?: string | undefined;
|
|
162
157
|
max?: string | undefined;
|
|
163
158
|
min?: string | undefined;
|
|
164
159
|
step?: number | undefined;
|
|
165
|
-
}
|
|
166
|
-
end
|
|
160
|
+
};
|
|
161
|
+
end: {
|
|
167
162
|
label?: string | undefined;
|
|
168
163
|
help?: string | undefined;
|
|
169
164
|
labelTranslationKey?: string | undefined;
|
|
170
165
|
max?: string | undefined;
|
|
171
166
|
min?: string | undefined;
|
|
172
167
|
step?: number | undefined;
|
|
173
|
-
}
|
|
168
|
+
};
|
|
174
169
|
}>;
|
|
175
170
|
meta: z.ZodOptional<z.ZodObject<{
|
|
176
171
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
177
172
|
} & {
|
|
178
173
|
title: z.ZodOptional<z.ZodLiteral<"Date Range">>;
|
|
179
174
|
usageDescription: z.ZodOptional<z.ZodLiteral<"For questions that require a date range (e.g. From/To, Start/End)">>;
|
|
180
|
-
defaultJSON: z.ZodOptional<z.ZodLiteral<string>>;
|
|
181
175
|
}, "strip", z.ZodTypeAny, {
|
|
182
176
|
schemaVersion: "1.0";
|
|
183
177
|
title?: "Date Range" | undefined;
|
|
184
178
|
usageDescription?: "For questions that require a date range (e.g. From/To, Start/End)" | undefined;
|
|
185
|
-
defaultJSON?: string | undefined;
|
|
186
179
|
}, {
|
|
187
180
|
schemaVersion: "1.0";
|
|
188
181
|
title?: "Date Range" | undefined;
|
|
189
182
|
usageDescription?: "For questions that require a date range (e.g. From/To, Start/End)" | undefined;
|
|
190
|
-
defaultJSON?: string | undefined;
|
|
191
183
|
}>>;
|
|
192
184
|
}, "strip", z.ZodTypeAny, {
|
|
193
185
|
type: "dateRange";
|
|
194
186
|
columns: {
|
|
195
|
-
start
|
|
187
|
+
start: {
|
|
188
|
+
step: number;
|
|
196
189
|
label?: string | undefined;
|
|
197
190
|
help?: string | undefined;
|
|
198
191
|
labelTranslationKey?: string | undefined;
|
|
199
192
|
max?: string | undefined;
|
|
200
193
|
min?: string | undefined;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
194
|
+
};
|
|
195
|
+
end: {
|
|
196
|
+
step: number;
|
|
204
197
|
label?: string | undefined;
|
|
205
198
|
help?: string | undefined;
|
|
206
199
|
labelTranslationKey?: string | undefined;
|
|
207
200
|
max?: string | undefined;
|
|
208
201
|
min?: string | undefined;
|
|
209
|
-
|
|
210
|
-
} | undefined;
|
|
202
|
+
};
|
|
211
203
|
};
|
|
212
204
|
attributes?: {
|
|
213
205
|
label?: string | undefined;
|
|
@@ -218,27 +210,26 @@ export declare const DateRangeQuestionSchema: z.ZodObject<{
|
|
|
218
210
|
schemaVersion: "1.0";
|
|
219
211
|
title?: "Date Range" | undefined;
|
|
220
212
|
usageDescription?: "For questions that require a date range (e.g. From/To, Start/End)" | undefined;
|
|
221
|
-
defaultJSON?: string | undefined;
|
|
222
213
|
} | undefined;
|
|
223
214
|
}, {
|
|
224
215
|
type: "dateRange";
|
|
225
216
|
columns: {
|
|
226
|
-
start
|
|
217
|
+
start: {
|
|
227
218
|
label?: string | undefined;
|
|
228
219
|
help?: string | undefined;
|
|
229
220
|
labelTranslationKey?: string | undefined;
|
|
230
221
|
max?: string | undefined;
|
|
231
222
|
min?: string | undefined;
|
|
232
223
|
step?: number | undefined;
|
|
233
|
-
}
|
|
234
|
-
end
|
|
224
|
+
};
|
|
225
|
+
end: {
|
|
235
226
|
label?: string | undefined;
|
|
236
227
|
help?: string | undefined;
|
|
237
228
|
labelTranslationKey?: string | undefined;
|
|
238
229
|
max?: string | undefined;
|
|
239
230
|
min?: string | undefined;
|
|
240
231
|
step?: number | undefined;
|
|
241
|
-
}
|
|
232
|
+
};
|
|
242
233
|
};
|
|
243
234
|
attributes?: {
|
|
244
235
|
label?: string | undefined;
|
|
@@ -249,7 +240,6 @@ export declare const DateRangeQuestionSchema: z.ZodObject<{
|
|
|
249
240
|
schemaVersion: "1.0";
|
|
250
241
|
title?: "Date Range" | undefined;
|
|
251
242
|
usageDescription?: "For questions that require a date range (e.g. From/To, Start/End)" | undefined;
|
|
252
|
-
defaultJSON?: string | undefined;
|
|
253
243
|
} | undefined;
|
|
254
244
|
}>;
|
|
255
245
|
export type DateQuestionType = z.infer<typeof DateQuestionSchema>;
|
|
@@ -6,43 +6,28 @@ const question_1 = require("./question");
|
|
|
6
6
|
const BaseAttributes = question_1.QuestionSchema.shape.attributes;
|
|
7
7
|
const BaseMeta = question_1.QuestionSchema.shape.meta;
|
|
8
8
|
const DateAttributesSchema = BaseAttributes.unwrap().merge(zod_1.z.object({
|
|
9
|
-
max: zod_1.z.string().optional(),
|
|
10
|
-
min: zod_1.z.string().optional(),
|
|
11
|
-
step: zod_1.z.number().
|
|
9
|
+
max: zod_1.z.string().optional(),
|
|
10
|
+
min: zod_1.z.string().optional(),
|
|
11
|
+
step: zod_1.z.number().default(1),
|
|
12
12
|
}));
|
|
13
13
|
// Date question and answer
|
|
14
|
-
const defaultDateJSON = {
|
|
15
|
-
type: 'date',
|
|
16
|
-
attributes: Object.assign(Object.assign({}, question_1.defaultAttributes), { max: undefined, min: undefined, step: 1 }),
|
|
17
|
-
meta: Object.assign({}, question_1.defaultMeta)
|
|
18
|
-
};
|
|
19
14
|
exports.DateQuestionSchema = question_1.QuestionSchema.merge(zod_1.z.object({
|
|
20
15
|
type: zod_1.z.literal('date'), // The type of question
|
|
21
16
|
attributes: DateAttributesSchema.optional(),
|
|
22
17
|
meta: BaseMeta.unwrap().merge(zod_1.z.object({
|
|
23
18
|
title: zod_1.z.literal('Date Field').optional(),
|
|
24
19
|
usageDescription: zod_1.z.literal('For questions that require a date.').optional(),
|
|
25
|
-
defaultJSON: zod_1.z.literal(JSON.stringify(defaultDateJSON)).optional(),
|
|
26
20
|
})).optional(),
|
|
27
21
|
}));
|
|
28
22
|
// Date range question and answer
|
|
29
|
-
const defaultDateRangeJSON = {
|
|
30
|
-
type: 'dateRange',
|
|
31
|
-
attributes: Object.assign({}, question_1.defaultAttributes),
|
|
32
|
-
columns: {
|
|
33
|
-
start: Object.assign(Object.assign({}, question_1.defaultAttributes), { label: 'Start', max: undefined, min: undefined, step: 1 }),
|
|
34
|
-
end: Object.assign(Object.assign({}, question_1.defaultAttributes), { label: 'End', max: undefined, min: undefined, step: 1 })
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
23
|
exports.DateRangeQuestionSchema = question_1.QuestionSchema.merge(zod_1.z.object({
|
|
38
24
|
type: zod_1.z.literal('dateRange'), // The type of question
|
|
39
25
|
columns: zod_1.z.object({
|
|
40
|
-
start: DateAttributesSchema
|
|
41
|
-
end: DateAttributesSchema
|
|
26
|
+
start: DateAttributesSchema,
|
|
27
|
+
end: DateAttributesSchema
|
|
42
28
|
}),
|
|
43
29
|
meta: BaseMeta.unwrap().merge(zod_1.z.object({
|
|
44
30
|
title: zod_1.z.literal('Date Range').optional(),
|
|
45
31
|
usageDescription: zod_1.z.literal('For questions that require a date range (e.g. From/To, Start/End)').optional(),
|
|
46
|
-
defaultJSON: zod_1.z.literal(JSON.stringify(defaultDateRangeJSON)).optional(),
|
|
47
32
|
})).optional(),
|
|
48
33
|
}));
|
|
@@ -95,19 +95,16 @@ export declare const FilteredSearchQuestionSchema: z.ZodObject<{} & {
|
|
|
95
95
|
meta: z.ZodOptional<z.ZodObject<{
|
|
96
96
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
97
97
|
usageDescription: z.ZodOptional<z.ZodString>;
|
|
98
|
-
defaultJSON: z.ZodOptional<z.ZodString>;
|
|
99
98
|
} & {
|
|
100
99
|
title: z.ZodOptional<z.ZodLiteral<"Not yet implemented">>;
|
|
101
100
|
}, "strip", z.ZodTypeAny, {
|
|
102
101
|
schemaVersion: "1.0";
|
|
103
102
|
title?: "Not yet implemented" | undefined;
|
|
104
103
|
usageDescription?: string | undefined;
|
|
105
|
-
defaultJSON?: string | undefined;
|
|
106
104
|
}, {
|
|
107
105
|
schemaVersion: "1.0";
|
|
108
106
|
title?: "Not yet implemented" | undefined;
|
|
109
107
|
usageDescription?: string | undefined;
|
|
110
|
-
defaultJSON?: string | undefined;
|
|
111
108
|
}>>;
|
|
112
109
|
}, "strip", z.ZodTypeAny, {
|
|
113
110
|
type: "filteredSearch";
|
|
@@ -139,7 +136,6 @@ export declare const FilteredSearchQuestionSchema: z.ZodObject<{} & {
|
|
|
139
136
|
schemaVersion: "1.0";
|
|
140
137
|
title?: "Not yet implemented" | undefined;
|
|
141
138
|
usageDescription?: string | undefined;
|
|
142
|
-
defaultJSON?: string | undefined;
|
|
143
139
|
} | undefined;
|
|
144
140
|
}, {
|
|
145
141
|
type: "filteredSearch";
|
|
@@ -171,7 +167,6 @@ export declare const FilteredSearchQuestionSchema: z.ZodObject<{} & {
|
|
|
171
167
|
schemaVersion: "1.0";
|
|
172
168
|
title?: "Not yet implemented" | undefined;
|
|
173
169
|
usageDescription?: string | undefined;
|
|
174
|
-
defaultJSON?: string | undefined;
|
|
175
170
|
} | undefined;
|
|
176
171
|
}>;
|
|
177
172
|
export declare const AffiliationSearchQuestionSchema: z.ZodObject<{
|
|
@@ -188,98 +183,97 @@ export declare const AffiliationSearchQuestionSchema: z.ZodObject<{
|
|
|
188
183
|
help?: string | undefined;
|
|
189
184
|
labelTranslationKey?: string | undefined;
|
|
190
185
|
}>>;
|
|
186
|
+
} & {
|
|
187
|
+
type: z.ZodLiteral<"affiliationSearch">;
|
|
191
188
|
graphQL: z.ZodObject<{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
localQueryId: z.ZodOptional<z.ZodString>;
|
|
190
|
+
} & {
|
|
191
|
+
query: z.ZodLiteral<"query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}">;
|
|
192
|
+
queryId: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
193
|
+
variables: z.ZodArray<z.ZodObject<{
|
|
194
|
+
name: z.ZodLiteral<"name">;
|
|
195
|
+
type: z.ZodDefault<z.ZodString>;
|
|
196
|
+
label: z.ZodDefault<z.ZodString>;
|
|
197
|
+
minLength: z.ZodLiteral<3>;
|
|
198
|
+
labelTranslationKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
196
199
|
}, "strip", z.ZodTypeAny, {
|
|
200
|
+
type: string;
|
|
197
201
|
label: string;
|
|
198
|
-
|
|
202
|
+
minLength: 3;
|
|
203
|
+
name: "name";
|
|
199
204
|
labelTranslationKey?: string | undefined;
|
|
200
205
|
}, {
|
|
201
|
-
|
|
202
|
-
|
|
206
|
+
minLength: 3;
|
|
207
|
+
name: "name";
|
|
208
|
+
type?: string | undefined;
|
|
209
|
+
label?: string | undefined;
|
|
203
210
|
labelTranslationKey?: string | undefined;
|
|
204
211
|
}>, "many">;
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
label: z.ZodOptional<z.ZodString>;
|
|
211
|
-
labelTranslationKey: z.ZodOptional<z.ZodString>;
|
|
212
|
-
name: z.ZodString;
|
|
213
|
-
type: z.ZodString;
|
|
214
|
-
defaultValue: z.ZodOptional<z.ZodString>;
|
|
212
|
+
answerField: z.ZodLiteral<"uri">;
|
|
213
|
+
displayFields: z.ZodArray<z.ZodObject<{
|
|
214
|
+
propertyName: z.ZodLiteral<"displayName">;
|
|
215
|
+
label: z.ZodDefault<z.ZodString>;
|
|
216
|
+
labelTranslationKey: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
215
217
|
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
label?: string | undefined;
|
|
218
|
+
label: string;
|
|
219
|
+
propertyName: "displayName";
|
|
219
220
|
labelTranslationKey?: string | undefined;
|
|
220
|
-
minLength?: number | undefined;
|
|
221
|
-
defaultValue?: string | undefined;
|
|
222
221
|
}, {
|
|
223
|
-
|
|
224
|
-
name: string;
|
|
222
|
+
propertyName: "displayName";
|
|
225
223
|
label?: string | undefined;
|
|
226
224
|
labelTranslationKey?: string | undefined;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}>, "many">>;
|
|
225
|
+
}>, "many">;
|
|
226
|
+
responseField: z.ZodLiteral<"affiliations.items">;
|
|
230
227
|
}, "strip", z.ZodTypeAny, {
|
|
231
228
|
displayFields: {
|
|
232
229
|
label: string;
|
|
233
|
-
propertyName:
|
|
230
|
+
propertyName: "displayName";
|
|
234
231
|
labelTranslationKey?: string | undefined;
|
|
235
232
|
}[];
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
variables?: {
|
|
233
|
+
query: "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}";
|
|
234
|
+
responseField: "affiliations.items";
|
|
235
|
+
variables: {
|
|
240
236
|
type: string;
|
|
241
|
-
|
|
242
|
-
|
|
237
|
+
label: string;
|
|
238
|
+
minLength: 3;
|
|
239
|
+
name: "name";
|
|
243
240
|
labelTranslationKey?: string | undefined;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
241
|
+
}[];
|
|
242
|
+
answerField: "uri";
|
|
243
|
+
localQueryId?: string | undefined;
|
|
244
|
+
queryId?: string | undefined;
|
|
247
245
|
}, {
|
|
248
246
|
displayFields: {
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
propertyName: "displayName";
|
|
248
|
+
label?: string | undefined;
|
|
251
249
|
labelTranslationKey?: string | undefined;
|
|
252
250
|
}[];
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
query: "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}";
|
|
252
|
+
responseField: "affiliations.items";
|
|
253
|
+
variables: {
|
|
254
|
+
minLength: 3;
|
|
255
|
+
name: "name";
|
|
256
|
+
type?: string | undefined;
|
|
259
257
|
label?: string | undefined;
|
|
260
258
|
labelTranslationKey?: string | undefined;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
259
|
+
}[];
|
|
260
|
+
answerField: "uri";
|
|
261
|
+
localQueryId?: string | undefined;
|
|
262
|
+
queryId?: string | undefined;
|
|
264
263
|
}>;
|
|
265
|
-
} & {
|
|
266
|
-
type: z.ZodLiteral<"affiliationSearch">;
|
|
267
264
|
meta: z.ZodObject<{
|
|
268
265
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
269
266
|
} & {
|
|
270
267
|
title: z.ZodOptional<z.ZodLiteral<"Affiliation Search">>;
|
|
271
268
|
usageDescription: z.ZodOptional<z.ZodLiteral<"For questions that require the user to select from a controlled list of institutions.">>;
|
|
272
|
-
defaultJSON: z.ZodOptional<z.ZodLiteral<string>>;
|
|
273
269
|
}, "strip", z.ZodTypeAny, {
|
|
274
270
|
schemaVersion: "1.0";
|
|
275
271
|
title?: "Affiliation Search" | undefined;
|
|
276
272
|
usageDescription?: "For questions that require the user to select from a controlled list of institutions." | undefined;
|
|
277
|
-
defaultJSON?: string | undefined;
|
|
278
273
|
}, {
|
|
279
274
|
schemaVersion: "1.0";
|
|
280
275
|
title?: "Affiliation Search" | undefined;
|
|
281
276
|
usageDescription?: "For questions that require the user to select from a controlled list of institutions." | undefined;
|
|
282
|
-
defaultJSON?: string | undefined;
|
|
283
277
|
}>;
|
|
284
278
|
}, "strip", z.ZodTypeAny, {
|
|
285
279
|
type: "affiliationSearch";
|
|
@@ -287,25 +281,25 @@ export declare const AffiliationSearchQuestionSchema: z.ZodObject<{
|
|
|
287
281
|
schemaVersion: "1.0";
|
|
288
282
|
title?: "Affiliation Search" | undefined;
|
|
289
283
|
usageDescription?: "For questions that require the user to select from a controlled list of institutions." | undefined;
|
|
290
|
-
defaultJSON?: string | undefined;
|
|
291
284
|
};
|
|
292
285
|
graphQL: {
|
|
293
286
|
displayFields: {
|
|
294
287
|
label: string;
|
|
295
|
-
propertyName:
|
|
288
|
+
propertyName: "displayName";
|
|
296
289
|
labelTranslationKey?: string | undefined;
|
|
297
290
|
}[];
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
variables?: {
|
|
291
|
+
query: "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}";
|
|
292
|
+
responseField: "affiliations.items";
|
|
293
|
+
variables: {
|
|
302
294
|
type: string;
|
|
303
|
-
|
|
304
|
-
|
|
295
|
+
label: string;
|
|
296
|
+
minLength: 3;
|
|
297
|
+
name: "name";
|
|
305
298
|
labelTranslationKey?: string | undefined;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
299
|
+
}[];
|
|
300
|
+
answerField: "uri";
|
|
301
|
+
localQueryId?: string | undefined;
|
|
302
|
+
queryId?: string | undefined;
|
|
309
303
|
};
|
|
310
304
|
attributes?: {
|
|
311
305
|
label?: string | undefined;
|
|
@@ -318,25 +312,25 @@ export declare const AffiliationSearchQuestionSchema: z.ZodObject<{
|
|
|
318
312
|
schemaVersion: "1.0";
|
|
319
313
|
title?: "Affiliation Search" | undefined;
|
|
320
314
|
usageDescription?: "For questions that require the user to select from a controlled list of institutions." | undefined;
|
|
321
|
-
defaultJSON?: string | undefined;
|
|
322
315
|
};
|
|
323
316
|
graphQL: {
|
|
324
317
|
displayFields: {
|
|
325
|
-
|
|
326
|
-
|
|
318
|
+
propertyName: "displayName";
|
|
319
|
+
label?: string | undefined;
|
|
327
320
|
labelTranslationKey?: string | undefined;
|
|
328
321
|
}[];
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
322
|
+
query: "query Affiliations($name: String!){affiliations(name: $name) { totalCount nextCursor items {id displayName uri}}}";
|
|
323
|
+
responseField: "affiliations.items";
|
|
324
|
+
variables: {
|
|
325
|
+
minLength: 3;
|
|
326
|
+
name: "name";
|
|
327
|
+
type?: string | undefined;
|
|
335
328
|
label?: string | undefined;
|
|
336
329
|
labelTranslationKey?: string | undefined;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
330
|
+
}[];
|
|
331
|
+
answerField: "uri";
|
|
332
|
+
localQueryId?: string | undefined;
|
|
333
|
+
queryId?: string | undefined;
|
|
340
334
|
};
|
|
341
335
|
attributes?: {
|
|
342
336
|
label?: string | undefined;
|