@dmptool/types 1.2.1 → 1.2.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/answers/index.d.ts +99 -0
- package/dist/answers/index.js +3 -0
- package/dist/questions/graphQLQuestions.js +10 -10
- package/dist/schemas/affiliationSearchQuestion.schema.json +2 -2
- package/dist/schemas/anyAnswer.schema.json +98 -61
- package/dist/schemas/anyQuestion.schema.json +2 -2
- package/dist/schemas/anyTableColumnQuestion.schema.json +2 -2
- package/dist/schemas/tableQuestion.schema.json +2 -2
- package/package.json +1 -1
package/dist/answers/index.d.ts
CHANGED
|
@@ -21,6 +21,44 @@ export declare const AnyAnswerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
21
21
|
}, {
|
|
22
22
|
schemaVersion?: string | undefined;
|
|
23
23
|
}>>;
|
|
24
|
+
} & {
|
|
25
|
+
type: z.ZodLiteral<"affiliationSearch">;
|
|
26
|
+
answer: z.ZodDefault<z.ZodObject<{
|
|
27
|
+
affiliationId: z.ZodDefault<z.ZodString>;
|
|
28
|
+
affiliationName: z.ZodDefault<z.ZodString>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
affiliationId: string;
|
|
31
|
+
affiliationName: string;
|
|
32
|
+
}, {
|
|
33
|
+
affiliationId?: string | undefined;
|
|
34
|
+
affiliationName?: string | undefined;
|
|
35
|
+
}>>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
type: "affiliationSearch";
|
|
38
|
+
meta: {
|
|
39
|
+
schemaVersion: string;
|
|
40
|
+
};
|
|
41
|
+
answer: {
|
|
42
|
+
affiliationId: string;
|
|
43
|
+
affiliationName: string;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
type: "affiliationSearch";
|
|
47
|
+
meta?: {
|
|
48
|
+
schemaVersion?: string | undefined;
|
|
49
|
+
} | undefined;
|
|
50
|
+
answer?: {
|
|
51
|
+
affiliationId?: string | undefined;
|
|
52
|
+
affiliationName?: string | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
}>, z.ZodObject<{
|
|
55
|
+
meta: z.ZodDefault<z.ZodObject<{
|
|
56
|
+
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
schemaVersion: string;
|
|
59
|
+
}, {
|
|
60
|
+
schemaVersion?: string | undefined;
|
|
61
|
+
}>>;
|
|
24
62
|
} & {
|
|
25
63
|
type: z.ZodLiteral<"boolean">;
|
|
26
64
|
answer: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -174,6 +212,29 @@ export declare const AnyAnswerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
174
212
|
}, {
|
|
175
213
|
schemaVersion?: string | undefined;
|
|
176
214
|
}>>;
|
|
215
|
+
} & {
|
|
216
|
+
type: z.ZodLiteral<"multiselectBox">;
|
|
217
|
+
answer: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
type: "multiselectBox";
|
|
220
|
+
meta: {
|
|
221
|
+
schemaVersion: string;
|
|
222
|
+
};
|
|
223
|
+
answer: string[];
|
|
224
|
+
}, {
|
|
225
|
+
type: "multiselectBox";
|
|
226
|
+
meta?: {
|
|
227
|
+
schemaVersion?: string | undefined;
|
|
228
|
+
} | undefined;
|
|
229
|
+
answer?: string[] | undefined;
|
|
230
|
+
}>, z.ZodObject<{
|
|
231
|
+
meta: z.ZodDefault<z.ZodObject<{
|
|
232
|
+
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
233
|
+
}, "strip", z.ZodTypeAny, {
|
|
234
|
+
schemaVersion: string;
|
|
235
|
+
}, {
|
|
236
|
+
schemaVersion?: string | undefined;
|
|
237
|
+
}>>;
|
|
177
238
|
} & {
|
|
178
239
|
type: z.ZodLiteral<"number">;
|
|
179
240
|
answer: z.ZodDefault<z.ZodNumber>;
|
|
@@ -197,6 +258,44 @@ export declare const AnyAnswerSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
197
258
|
}, {
|
|
198
259
|
schemaVersion?: string | undefined;
|
|
199
260
|
}>>;
|
|
261
|
+
} & {
|
|
262
|
+
type: z.ZodLiteral<"numberRange">;
|
|
263
|
+
answer: z.ZodDefault<z.ZodObject<{
|
|
264
|
+
start: z.ZodDefault<z.ZodNumber>;
|
|
265
|
+
end: z.ZodDefault<z.ZodNumber>;
|
|
266
|
+
}, "strip", z.ZodTypeAny, {
|
|
267
|
+
start: number;
|
|
268
|
+
end: number;
|
|
269
|
+
}, {
|
|
270
|
+
start?: number | undefined;
|
|
271
|
+
end?: number | undefined;
|
|
272
|
+
}>>;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
type: "numberRange";
|
|
275
|
+
meta: {
|
|
276
|
+
schemaVersion: string;
|
|
277
|
+
};
|
|
278
|
+
answer: {
|
|
279
|
+
start: number;
|
|
280
|
+
end: number;
|
|
281
|
+
};
|
|
282
|
+
}, {
|
|
283
|
+
type: "numberRange";
|
|
284
|
+
meta?: {
|
|
285
|
+
schemaVersion?: string | undefined;
|
|
286
|
+
} | undefined;
|
|
287
|
+
answer?: {
|
|
288
|
+
start?: number | undefined;
|
|
289
|
+
end?: number | undefined;
|
|
290
|
+
} | undefined;
|
|
291
|
+
}>, z.ZodObject<{
|
|
292
|
+
meta: z.ZodDefault<z.ZodObject<{
|
|
293
|
+
schemaVersion: z.ZodDefault<z.ZodString>;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
schemaVersion: string;
|
|
296
|
+
}, {
|
|
297
|
+
schemaVersion?: string | undefined;
|
|
298
|
+
}>>;
|
|
200
299
|
} & {
|
|
201
300
|
type: z.ZodLiteral<"radioButtons">;
|
|
202
301
|
answer: z.ZodDefault<z.ZodString>;
|
package/dist/answers/index.js
CHANGED
|
@@ -32,6 +32,7 @@ __exportStar(require("./tableAnswers"), exports);
|
|
|
32
32
|
__exportStar(require("./textAnswers"), exports);
|
|
33
33
|
// Union of all possible answers
|
|
34
34
|
exports.AnyAnswerSchema = zod_1.z.discriminatedUnion('type', [
|
|
35
|
+
graphQLAnswers_1.AffiliationSearchAnswerSchema,
|
|
35
36
|
optionBasedAnswers_1.BooleanAnswerSchema,
|
|
36
37
|
optionBasedAnswers_1.CheckboxesAnswerSchema,
|
|
37
38
|
numberAnswers_1.CurrencyAnswerSchema,
|
|
@@ -39,7 +40,9 @@ exports.AnyAnswerSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
39
40
|
dateAnswers_1.DateRangeAnswerSchema,
|
|
40
41
|
textAnswers_1.EmailAnswerSchema,
|
|
41
42
|
// FilteredSearchAnswerSchema,
|
|
43
|
+
optionBasedAnswers_1.MultiselectBoxAnswerSchema,
|
|
42
44
|
numberAnswers_1.NumberAnswerSchema,
|
|
45
|
+
numberAnswers_1.NumberRangeAnswerSchema,
|
|
43
46
|
optionBasedAnswers_1.RadioButtonsAnswerSchema,
|
|
44
47
|
optionBasedAnswers_1.SelectBoxAnswerSchema,
|
|
45
48
|
tableAnswers_1.TableAnswerSchema,
|
|
@@ -43,16 +43,16 @@ const TypeaheadSearchQuestionSchema = question_1.QuestionSchema.merge(zod_1.z.ob
|
|
|
43
43
|
graphQL: GraphQLQuery, // The GraphQL query options for the typeahead search
|
|
44
44
|
}));
|
|
45
45
|
exports.affiliationQuery = '' +
|
|
46
|
-
'query Affiliations($name: String!){' +
|
|
47
|
-
'affiliations(name: $name) {' +
|
|
48
|
-
'totalCount' +
|
|
49
|
-
'nextCursor' +
|
|
50
|
-
'items {' +
|
|
51
|
-
'id' +
|
|
52
|
-
'displayName' +
|
|
53
|
-
'uri' +
|
|
54
|
-
'}' +
|
|
55
|
-
'}' +
|
|
46
|
+
'query Affiliations($name: String!){ ' +
|
|
47
|
+
'affiliations(name: $name) { ' +
|
|
48
|
+
'totalCount ' +
|
|
49
|
+
'nextCursor ' +
|
|
50
|
+
'items { ' +
|
|
51
|
+
'id ' +
|
|
52
|
+
'displayName ' +
|
|
53
|
+
'uri ' +
|
|
54
|
+
'} ' +
|
|
55
|
+
'} ' +
|
|
56
56
|
'}';
|
|
57
57
|
exports.AffiliationSearchQuestionSchema = TypeaheadSearchQuestionSchema.merge(zod_1.z.object({
|
|
58
58
|
type: zod_1.z.literal('affiliationSearch'),
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
},
|
|
75
75
|
"query": {
|
|
76
76
|
"type": "string",
|
|
77
|
-
"const": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
78
|
-
"default": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
77
|
+
"const": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }",
|
|
78
|
+
"default": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }"
|
|
79
79
|
},
|
|
80
80
|
"responseField": {
|
|
81
81
|
"type": "string",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"properties": {
|
|
9
9
|
"type": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"const": "
|
|
11
|
+
"const": "affiliationSearch"
|
|
12
12
|
},
|
|
13
13
|
"meta": {
|
|
14
14
|
"type": "object",
|
|
@@ -21,6 +21,37 @@
|
|
|
21
21
|
"additionalProperties": false,
|
|
22
22
|
"default": {}
|
|
23
23
|
},
|
|
24
|
+
"answer": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"affiliationId": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"default": ""
|
|
30
|
+
},
|
|
31
|
+
"affiliationName": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"default": ""
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"default": {}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": [
|
|
41
|
+
"type"
|
|
42
|
+
],
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "object",
|
|
47
|
+
"properties": {
|
|
48
|
+
"type": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"const": "boolean"
|
|
51
|
+
},
|
|
52
|
+
"meta": {
|
|
53
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
|
|
54
|
+
},
|
|
24
55
|
"answer": {
|
|
25
56
|
"type": "boolean",
|
|
26
57
|
"default": false
|
|
@@ -147,6 +178,31 @@
|
|
|
147
178
|
],
|
|
148
179
|
"additionalProperties": false
|
|
149
180
|
},
|
|
181
|
+
{
|
|
182
|
+
"type": "object",
|
|
183
|
+
"properties": {
|
|
184
|
+
"type": {
|
|
185
|
+
"type": "string",
|
|
186
|
+
"const": "multiselectBox"
|
|
187
|
+
},
|
|
188
|
+
"meta": {
|
|
189
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
|
|
190
|
+
},
|
|
191
|
+
"answer": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "string"
|
|
195
|
+
},
|
|
196
|
+
"default": [
|
|
197
|
+
""
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"required": [
|
|
202
|
+
"type"
|
|
203
|
+
],
|
|
204
|
+
"additionalProperties": false
|
|
205
|
+
},
|
|
150
206
|
{
|
|
151
207
|
"type": "object",
|
|
152
208
|
"properties": {
|
|
@@ -167,6 +223,37 @@
|
|
|
167
223
|
],
|
|
168
224
|
"additionalProperties": false
|
|
169
225
|
},
|
|
226
|
+
{
|
|
227
|
+
"type": "object",
|
|
228
|
+
"properties": {
|
|
229
|
+
"type": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"const": "numberRange"
|
|
232
|
+
},
|
|
233
|
+
"meta": {
|
|
234
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
|
|
235
|
+
},
|
|
236
|
+
"answer": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"properties": {
|
|
239
|
+
"start": {
|
|
240
|
+
"type": "number",
|
|
241
|
+
"default": 0
|
|
242
|
+
},
|
|
243
|
+
"end": {
|
|
244
|
+
"type": "number",
|
|
245
|
+
"default": 0
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"additionalProperties": false,
|
|
249
|
+
"default": {}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"required": [
|
|
253
|
+
"type"
|
|
254
|
+
],
|
|
255
|
+
"additionalProperties": false
|
|
256
|
+
},
|
|
170
257
|
{
|
|
171
258
|
"type": "object",
|
|
172
259
|
"properties": {
|
|
@@ -235,37 +322,6 @@
|
|
|
235
322
|
"type": "array",
|
|
236
323
|
"items": {
|
|
237
324
|
"anyOf": [
|
|
238
|
-
{
|
|
239
|
-
"type": "object",
|
|
240
|
-
"properties": {
|
|
241
|
-
"type": {
|
|
242
|
-
"type": "string",
|
|
243
|
-
"const": "affiliationSearch"
|
|
244
|
-
},
|
|
245
|
-
"meta": {
|
|
246
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
|
|
247
|
-
},
|
|
248
|
-
"answer": {
|
|
249
|
-
"type": "object",
|
|
250
|
-
"properties": {
|
|
251
|
-
"affiliationId": {
|
|
252
|
-
"type": "string",
|
|
253
|
-
"default": ""
|
|
254
|
-
},
|
|
255
|
-
"affiliationName": {
|
|
256
|
-
"type": "string",
|
|
257
|
-
"default": ""
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
"additionalProperties": false,
|
|
261
|
-
"default": {}
|
|
262
|
-
}
|
|
263
|
-
},
|
|
264
|
-
"required": [
|
|
265
|
-
"type"
|
|
266
|
-
],
|
|
267
|
-
"additionalProperties": false
|
|
268
|
-
},
|
|
269
325
|
{
|
|
270
326
|
"$ref": "#/definitions/AnyAnswer/anyOf/0"
|
|
271
327
|
},
|
|
@@ -284,6 +340,9 @@
|
|
|
284
340
|
{
|
|
285
341
|
"$ref": "#/definitions/AnyAnswer/anyOf/5"
|
|
286
342
|
},
|
|
343
|
+
{
|
|
344
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/6"
|
|
345
|
+
},
|
|
287
346
|
{
|
|
288
347
|
"type": "object",
|
|
289
348
|
"properties": {
|
|
@@ -310,38 +369,16 @@
|
|
|
310
369
|
"additionalProperties": false
|
|
311
370
|
},
|
|
312
371
|
{
|
|
313
|
-
"
|
|
314
|
-
"properties": {
|
|
315
|
-
"type": {
|
|
316
|
-
"type": "string",
|
|
317
|
-
"const": "multiselectBox"
|
|
318
|
-
},
|
|
319
|
-
"meta": {
|
|
320
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/0/properties/meta"
|
|
321
|
-
},
|
|
322
|
-
"answer": {
|
|
323
|
-
"type": "array",
|
|
324
|
-
"items": {
|
|
325
|
-
"type": "string"
|
|
326
|
-
},
|
|
327
|
-
"default": [
|
|
328
|
-
""
|
|
329
|
-
]
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
"required": [
|
|
333
|
-
"type"
|
|
334
|
-
],
|
|
335
|
-
"additionalProperties": false
|
|
372
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/7"
|
|
336
373
|
},
|
|
337
374
|
{
|
|
338
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/
|
|
375
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/8"
|
|
339
376
|
},
|
|
340
377
|
{
|
|
341
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/
|
|
378
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/10"
|
|
342
379
|
},
|
|
343
380
|
{
|
|
344
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/
|
|
381
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/11"
|
|
345
382
|
},
|
|
346
383
|
{
|
|
347
384
|
"type": "object",
|
|
@@ -433,13 +470,13 @@
|
|
|
433
470
|
"additionalProperties": false
|
|
434
471
|
},
|
|
435
472
|
{
|
|
436
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/
|
|
473
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/12/properties/answer/items/properties/columns/items/anyOf/12"
|
|
437
474
|
},
|
|
438
475
|
{
|
|
439
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/
|
|
476
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/12/properties/answer/items/properties/columns/items/anyOf/13"
|
|
440
477
|
},
|
|
441
478
|
{
|
|
442
|
-
"$ref": "#/definitions/AnyAnswer/anyOf/
|
|
479
|
+
"$ref": "#/definitions/AnyAnswer/anyOf/12/properties/answer/items/properties/columns/items/anyOf/14"
|
|
443
480
|
}
|
|
444
481
|
]
|
|
445
482
|
}
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
},
|
|
77
77
|
"query": {
|
|
78
78
|
"type": "string",
|
|
79
|
-
"const": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
80
|
-
"default": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
79
|
+
"const": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }",
|
|
80
|
+
"default": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }"
|
|
81
81
|
},
|
|
82
82
|
"responseField": {
|
|
83
83
|
"type": "string",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
},
|
|
77
77
|
"query": {
|
|
78
78
|
"type": "string",
|
|
79
|
-
"const": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
80
|
-
"default": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
79
|
+
"const": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }",
|
|
80
|
+
"default": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }"
|
|
81
81
|
},
|
|
82
82
|
"responseField": {
|
|
83
83
|
"type": "string",
|
|
@@ -129,8 +129,8 @@
|
|
|
129
129
|
},
|
|
130
130
|
"query": {
|
|
131
131
|
"type": "string",
|
|
132
|
-
"const": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
133
|
-
"default": "query Affiliations($name: String!){affiliations(name: $name) {
|
|
132
|
+
"const": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }",
|
|
133
|
+
"default": "query Affiliations($name: String!){ affiliations(name: $name) { totalCount nextCursor items { id displayName uri } } }"
|
|
134
134
|
},
|
|
135
135
|
"responseField": {
|
|
136
136
|
"type": "string",
|