@dmptool/types 1.1.1 → 1.1.2
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/__tests__/answers.spec.js +11 -5
- package/dist/answers/answer.d.ts +3 -3
- package/dist/answers/graphQLAnswers.d.ts +2 -2
- package/dist/answers/graphQLAnswers.js +2 -2
- package/dist/answers/index.d.ts +92 -55
- package/dist/answers/index.js +2 -2
- package/dist/answers/optionBasedAnswers.d.ts +27 -2
- package/dist/answers/optionBasedAnswers.js +5 -1
- package/dist/answers/tableAnswers.d.ts +268 -104
- package/dist/answers/tableAnswers.js +2 -1
- package/dist/questions/__tests__/graphQLQuestions.spec.js +7 -7
- package/dist/questions/__tests__/optionBasedQuestions.spec.js +48 -1
- package/dist/questions/dateQuestions.d.ts +47 -16
- package/dist/questions/dateQuestions.js +25 -1
- package/dist/questions/graphQLQuestions.d.ts +59 -28
- package/dist/questions/graphQLQuestions.js +40 -3
- package/dist/questions/index.d.ts +1363 -646
- package/dist/questions/index.js +4 -2
- package/dist/questions/numberQuestions.d.ts +71 -25
- package/dist/questions/numberQuestions.js +36 -1
- package/dist/questions/optionBasedQuestions.d.ts +197 -44
- package/dist/questions/optionBasedQuestions.js +84 -6
- package/dist/questions/question.d.ts +51 -4
- package/dist/questions/question.js +14 -2
- package/dist/questions/tableQuestions.d.ts +1841 -932
- package/dist/questions/tableQuestions.js +13 -1
- package/dist/questions/textQuestions.d.ts +100 -40
- package/dist/questions/textQuestions.js +45 -7
- package/dist/schemas/affiliationSearchAnswer.schema.json +37 -0
- package/dist/schemas/affiliationSearchQuestion.schema.json +133 -0
- package/dist/schemas/anyAnswer.schema.json +41 -23
- package/dist/schemas/anyQuestion.schema.json +533 -149
- package/dist/schemas/anyTableColumnAnswer.schema.json +35 -14
- package/dist/schemas/anyTableColumnQuestion.schema.json +397 -119
- package/dist/schemas/booleanQuestion.schema.json +13 -2
- package/dist/schemas/checkboxesQuestion.schema.json +12 -0
- package/dist/schemas/currencyQuestion.schema.json +12 -0
- package/dist/schemas/dateQuestion.schema.json +12 -0
- package/dist/schemas/dateRangeQuestion.schema.json +12 -0
- package/dist/schemas/emailQuestion.schema.json +12 -0
- package/dist/schemas/filteredSearchQuestion.schema.json +10 -0
- package/dist/schemas/multiselectBoxAnswer.schema.json +40 -0
- package/dist/schemas/multiselectBoxQuestion.schema.json +90 -0
- package/dist/schemas/numberQuestion.schema.json +12 -0
- package/dist/schemas/numberRangeQuestion.schema.json +12 -0
- package/dist/schemas/radioButtonsQuestion.schema.json +12 -0
- package/dist/schemas/selectBoxAnswer.schema.json +1 -4
- package/dist/schemas/selectBoxQuestion.schema.json +18 -1
- package/dist/schemas/tableAnswer.schema.json +35 -14
- package/dist/schemas/tableQuestion.schema.json +419 -120
- package/dist/schemas/textAreaQuestion.schema.json +15 -4
- package/dist/schemas/textQuestion.schema.json +12 -0
- package/dist/schemas/urlQuestion.schema.json +12 -0
- package/package.json +1 -1
|
@@ -7,6 +7,29 @@ export declare const AnyTableColumnAnswerSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
7
7
|
}, {
|
|
8
8
|
schemaVersion: "1.0";
|
|
9
9
|
}>;
|
|
10
|
+
} & {
|
|
11
|
+
type: z.ZodLiteral<"typeaheadSearch">;
|
|
12
|
+
answer: z.ZodString;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
type: "typeaheadSearch";
|
|
15
|
+
meta: {
|
|
16
|
+
schemaVersion: "1.0";
|
|
17
|
+
};
|
|
18
|
+
answer: string;
|
|
19
|
+
}, {
|
|
20
|
+
type: "typeaheadSearch";
|
|
21
|
+
meta: {
|
|
22
|
+
schemaVersion: "1.0";
|
|
23
|
+
};
|
|
24
|
+
answer: string;
|
|
25
|
+
}>, z.ZodObject<{
|
|
26
|
+
meta: z.ZodObject<{
|
|
27
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
schemaVersion: "1.0";
|
|
30
|
+
}, {
|
|
31
|
+
schemaVersion: "1.0";
|
|
32
|
+
}>;
|
|
10
33
|
} & {
|
|
11
34
|
type: z.ZodLiteral<"boolean">;
|
|
12
35
|
answer: z.ZodBoolean;
|
|
@@ -183,6 +206,29 @@ export declare const AnyTableColumnAnswerSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
183
206
|
}, {
|
|
184
207
|
schemaVersion: "1.0";
|
|
185
208
|
}>;
|
|
209
|
+
} & {
|
|
210
|
+
type: z.ZodLiteral<"multiselectBox">;
|
|
211
|
+
answer: z.ZodArray<z.ZodString, "many">;
|
|
212
|
+
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
type: "multiselectBox";
|
|
214
|
+
meta: {
|
|
215
|
+
schemaVersion: "1.0";
|
|
216
|
+
};
|
|
217
|
+
answer: string[];
|
|
218
|
+
}, {
|
|
219
|
+
type: "multiselectBox";
|
|
220
|
+
meta: {
|
|
221
|
+
schemaVersion: "1.0";
|
|
222
|
+
};
|
|
223
|
+
answer: string[];
|
|
224
|
+
}>, z.ZodObject<{
|
|
225
|
+
meta: z.ZodObject<{
|
|
226
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
schemaVersion: "1.0";
|
|
229
|
+
}, {
|
|
230
|
+
schemaVersion: "1.0";
|
|
231
|
+
}>;
|
|
186
232
|
} & {
|
|
187
233
|
type: z.ZodLiteral<"number">;
|
|
188
234
|
answer: z.ZodNumber;
|
|
@@ -231,19 +277,19 @@ export declare const AnyTableColumnAnswerSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
231
277
|
}>;
|
|
232
278
|
} & {
|
|
233
279
|
type: z.ZodLiteral<"selectBox">;
|
|
234
|
-
answer: z.
|
|
280
|
+
answer: z.ZodString;
|
|
235
281
|
}, "strip", z.ZodTypeAny, {
|
|
236
282
|
type: "selectBox";
|
|
237
283
|
meta: {
|
|
238
284
|
schemaVersion: "1.0";
|
|
239
285
|
};
|
|
240
|
-
answer: string
|
|
286
|
+
answer: string;
|
|
241
287
|
}, {
|
|
242
288
|
type: "selectBox";
|
|
243
289
|
meta: {
|
|
244
290
|
schemaVersion: "1.0";
|
|
245
291
|
};
|
|
246
|
-
answer: string
|
|
292
|
+
answer: string;
|
|
247
293
|
}>, z.ZodObject<{
|
|
248
294
|
meta: z.ZodObject<{
|
|
249
295
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
@@ -298,29 +344,6 @@ export declare const AnyTableColumnAnswerSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
298
344
|
}, {
|
|
299
345
|
schemaVersion: "1.0";
|
|
300
346
|
}>;
|
|
301
|
-
} & {
|
|
302
|
-
type: z.ZodLiteral<"typeaheadSearch">;
|
|
303
|
-
answer: z.ZodString;
|
|
304
|
-
}, "strip", z.ZodTypeAny, {
|
|
305
|
-
type: "typeaheadSearch";
|
|
306
|
-
meta: {
|
|
307
|
-
schemaVersion: "1.0";
|
|
308
|
-
};
|
|
309
|
-
answer: string;
|
|
310
|
-
}, {
|
|
311
|
-
type: "typeaheadSearch";
|
|
312
|
-
meta: {
|
|
313
|
-
schemaVersion: "1.0";
|
|
314
|
-
};
|
|
315
|
-
answer: string;
|
|
316
|
-
}>, z.ZodObject<{
|
|
317
|
-
meta: z.ZodObject<{
|
|
318
|
-
schemaVersion: z.ZodLiteral<"1.0">;
|
|
319
|
-
}, "strip", z.ZodTypeAny, {
|
|
320
|
-
schemaVersion: "1.0";
|
|
321
|
-
}, {
|
|
322
|
-
schemaVersion: "1.0";
|
|
323
|
-
}>;
|
|
324
347
|
} & {
|
|
325
348
|
type: z.ZodLiteral<"url">;
|
|
326
349
|
answer: z.ZodString;
|
|
@@ -347,6 +370,29 @@ export declare const TableColumnAnswerSchema: z.ZodObject<{
|
|
|
347
370
|
}, {
|
|
348
371
|
schemaVersion: "1.0";
|
|
349
372
|
}>;
|
|
373
|
+
} & {
|
|
374
|
+
type: z.ZodLiteral<"typeaheadSearch">;
|
|
375
|
+
answer: z.ZodString;
|
|
376
|
+
}, "strip", z.ZodTypeAny, {
|
|
377
|
+
type: "typeaheadSearch";
|
|
378
|
+
meta: {
|
|
379
|
+
schemaVersion: "1.0";
|
|
380
|
+
};
|
|
381
|
+
answer: string;
|
|
382
|
+
}, {
|
|
383
|
+
type: "typeaheadSearch";
|
|
384
|
+
meta: {
|
|
385
|
+
schemaVersion: "1.0";
|
|
386
|
+
};
|
|
387
|
+
answer: string;
|
|
388
|
+
}>, z.ZodObject<{
|
|
389
|
+
meta: z.ZodObject<{
|
|
390
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
schemaVersion: "1.0";
|
|
393
|
+
}, {
|
|
394
|
+
schemaVersion: "1.0";
|
|
395
|
+
}>;
|
|
350
396
|
} & {
|
|
351
397
|
type: z.ZodLiteral<"boolean">;
|
|
352
398
|
answer: z.ZodBoolean;
|
|
@@ -523,6 +569,29 @@ export declare const TableColumnAnswerSchema: z.ZodObject<{
|
|
|
523
569
|
}, {
|
|
524
570
|
schemaVersion: "1.0";
|
|
525
571
|
}>;
|
|
572
|
+
} & {
|
|
573
|
+
type: z.ZodLiteral<"multiselectBox">;
|
|
574
|
+
answer: z.ZodArray<z.ZodString, "many">;
|
|
575
|
+
}, "strip", z.ZodTypeAny, {
|
|
576
|
+
type: "multiselectBox";
|
|
577
|
+
meta: {
|
|
578
|
+
schemaVersion: "1.0";
|
|
579
|
+
};
|
|
580
|
+
answer: string[];
|
|
581
|
+
}, {
|
|
582
|
+
type: "multiselectBox";
|
|
583
|
+
meta: {
|
|
584
|
+
schemaVersion: "1.0";
|
|
585
|
+
};
|
|
586
|
+
answer: string[];
|
|
587
|
+
}>, z.ZodObject<{
|
|
588
|
+
meta: z.ZodObject<{
|
|
589
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
schemaVersion: "1.0";
|
|
592
|
+
}, {
|
|
593
|
+
schemaVersion: "1.0";
|
|
594
|
+
}>;
|
|
526
595
|
} & {
|
|
527
596
|
type: z.ZodLiteral<"number">;
|
|
528
597
|
answer: z.ZodNumber;
|
|
@@ -571,19 +640,19 @@ export declare const TableColumnAnswerSchema: z.ZodObject<{
|
|
|
571
640
|
}>;
|
|
572
641
|
} & {
|
|
573
642
|
type: z.ZodLiteral<"selectBox">;
|
|
574
|
-
answer: z.
|
|
643
|
+
answer: z.ZodString;
|
|
575
644
|
}, "strip", z.ZodTypeAny, {
|
|
576
645
|
type: "selectBox";
|
|
577
646
|
meta: {
|
|
578
647
|
schemaVersion: "1.0";
|
|
579
648
|
};
|
|
580
|
-
answer: string
|
|
649
|
+
answer: string;
|
|
581
650
|
}, {
|
|
582
651
|
type: "selectBox";
|
|
583
652
|
meta: {
|
|
584
653
|
schemaVersion: "1.0";
|
|
585
654
|
};
|
|
586
|
-
answer: string
|
|
655
|
+
answer: string;
|
|
587
656
|
}>, z.ZodObject<{
|
|
588
657
|
meta: z.ZodObject<{
|
|
589
658
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
@@ -638,29 +707,6 @@ export declare const TableColumnAnswerSchema: z.ZodObject<{
|
|
|
638
707
|
}, {
|
|
639
708
|
schemaVersion: "1.0";
|
|
640
709
|
}>;
|
|
641
|
-
} & {
|
|
642
|
-
type: z.ZodLiteral<"typeaheadSearch">;
|
|
643
|
-
answer: z.ZodString;
|
|
644
|
-
}, "strip", z.ZodTypeAny, {
|
|
645
|
-
type: "typeaheadSearch";
|
|
646
|
-
meta: {
|
|
647
|
-
schemaVersion: "1.0";
|
|
648
|
-
};
|
|
649
|
-
answer: string;
|
|
650
|
-
}, {
|
|
651
|
-
type: "typeaheadSearch";
|
|
652
|
-
meta: {
|
|
653
|
-
schemaVersion: "1.0";
|
|
654
|
-
};
|
|
655
|
-
answer: string;
|
|
656
|
-
}>, z.ZodObject<{
|
|
657
|
-
meta: z.ZodObject<{
|
|
658
|
-
schemaVersion: z.ZodLiteral<"1.0">;
|
|
659
|
-
}, "strip", z.ZodTypeAny, {
|
|
660
|
-
schemaVersion: "1.0";
|
|
661
|
-
}, {
|
|
662
|
-
schemaVersion: "1.0";
|
|
663
|
-
}>;
|
|
664
710
|
} & {
|
|
665
711
|
type: z.ZodLiteral<"url">;
|
|
666
712
|
answer: z.ZodString;
|
|
@@ -729,6 +775,12 @@ export declare const TableColumnAnswerSchema: z.ZodObject<{
|
|
|
729
775
|
meta: {
|
|
730
776
|
schemaVersion: "1.0";
|
|
731
777
|
};
|
|
778
|
+
answer: string;
|
|
779
|
+
} | {
|
|
780
|
+
type: "multiselectBox";
|
|
781
|
+
meta: {
|
|
782
|
+
schemaVersion: "1.0";
|
|
783
|
+
};
|
|
732
784
|
answer: string[];
|
|
733
785
|
} | {
|
|
734
786
|
type: "currency";
|
|
@@ -819,6 +871,12 @@ export declare const TableColumnAnswerSchema: z.ZodObject<{
|
|
|
819
871
|
meta: {
|
|
820
872
|
schemaVersion: "1.0";
|
|
821
873
|
};
|
|
874
|
+
answer: string;
|
|
875
|
+
} | {
|
|
876
|
+
type: "multiselectBox";
|
|
877
|
+
meta: {
|
|
878
|
+
schemaVersion: "1.0";
|
|
879
|
+
};
|
|
822
880
|
answer: string[];
|
|
823
881
|
} | {
|
|
824
882
|
type: "currency";
|
|
@@ -869,6 +927,29 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
869
927
|
}, {
|
|
870
928
|
schemaVersion: "1.0";
|
|
871
929
|
}>;
|
|
930
|
+
} & {
|
|
931
|
+
type: z.ZodLiteral<"typeaheadSearch">;
|
|
932
|
+
answer: z.ZodString;
|
|
933
|
+
}, "strip", z.ZodTypeAny, {
|
|
934
|
+
type: "typeaheadSearch";
|
|
935
|
+
meta: {
|
|
936
|
+
schemaVersion: "1.0";
|
|
937
|
+
};
|
|
938
|
+
answer: string;
|
|
939
|
+
}, {
|
|
940
|
+
type: "typeaheadSearch";
|
|
941
|
+
meta: {
|
|
942
|
+
schemaVersion: "1.0";
|
|
943
|
+
};
|
|
944
|
+
answer: string;
|
|
945
|
+
}>, z.ZodObject<{
|
|
946
|
+
meta: z.ZodObject<{
|
|
947
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
948
|
+
}, "strip", z.ZodTypeAny, {
|
|
949
|
+
schemaVersion: "1.0";
|
|
950
|
+
}, {
|
|
951
|
+
schemaVersion: "1.0";
|
|
952
|
+
}>;
|
|
872
953
|
} & {
|
|
873
954
|
type: z.ZodLiteral<"boolean">;
|
|
874
955
|
answer: z.ZodBoolean;
|
|
@@ -1045,6 +1126,29 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1045
1126
|
}, {
|
|
1046
1127
|
schemaVersion: "1.0";
|
|
1047
1128
|
}>;
|
|
1129
|
+
} & {
|
|
1130
|
+
type: z.ZodLiteral<"multiselectBox">;
|
|
1131
|
+
answer: z.ZodArray<z.ZodString, "many">;
|
|
1132
|
+
}, "strip", z.ZodTypeAny, {
|
|
1133
|
+
type: "multiselectBox";
|
|
1134
|
+
meta: {
|
|
1135
|
+
schemaVersion: "1.0";
|
|
1136
|
+
};
|
|
1137
|
+
answer: string[];
|
|
1138
|
+
}, {
|
|
1139
|
+
type: "multiselectBox";
|
|
1140
|
+
meta: {
|
|
1141
|
+
schemaVersion: "1.0";
|
|
1142
|
+
};
|
|
1143
|
+
answer: string[];
|
|
1144
|
+
}>, z.ZodObject<{
|
|
1145
|
+
meta: z.ZodObject<{
|
|
1146
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1147
|
+
}, "strip", z.ZodTypeAny, {
|
|
1148
|
+
schemaVersion: "1.0";
|
|
1149
|
+
}, {
|
|
1150
|
+
schemaVersion: "1.0";
|
|
1151
|
+
}>;
|
|
1048
1152
|
} & {
|
|
1049
1153
|
type: z.ZodLiteral<"number">;
|
|
1050
1154
|
answer: z.ZodNumber;
|
|
@@ -1093,19 +1197,19 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1093
1197
|
}>;
|
|
1094
1198
|
} & {
|
|
1095
1199
|
type: z.ZodLiteral<"selectBox">;
|
|
1096
|
-
answer: z.
|
|
1200
|
+
answer: z.ZodString;
|
|
1097
1201
|
}, "strip", z.ZodTypeAny, {
|
|
1098
1202
|
type: "selectBox";
|
|
1099
1203
|
meta: {
|
|
1100
1204
|
schemaVersion: "1.0";
|
|
1101
1205
|
};
|
|
1102
|
-
answer: string
|
|
1206
|
+
answer: string;
|
|
1103
1207
|
}, {
|
|
1104
1208
|
type: "selectBox";
|
|
1105
1209
|
meta: {
|
|
1106
1210
|
schemaVersion: "1.0";
|
|
1107
1211
|
};
|
|
1108
|
-
answer: string
|
|
1212
|
+
answer: string;
|
|
1109
1213
|
}>, z.ZodObject<{
|
|
1110
1214
|
meta: z.ZodObject<{
|
|
1111
1215
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
@@ -1160,29 +1264,6 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1160
1264
|
}, {
|
|
1161
1265
|
schemaVersion: "1.0";
|
|
1162
1266
|
}>;
|
|
1163
|
-
} & {
|
|
1164
|
-
type: z.ZodLiteral<"typeaheadSearch">;
|
|
1165
|
-
answer: z.ZodString;
|
|
1166
|
-
}, "strip", z.ZodTypeAny, {
|
|
1167
|
-
type: "typeaheadSearch";
|
|
1168
|
-
meta: {
|
|
1169
|
-
schemaVersion: "1.0";
|
|
1170
|
-
};
|
|
1171
|
-
answer: string;
|
|
1172
|
-
}, {
|
|
1173
|
-
type: "typeaheadSearch";
|
|
1174
|
-
meta: {
|
|
1175
|
-
schemaVersion: "1.0";
|
|
1176
|
-
};
|
|
1177
|
-
answer: string;
|
|
1178
|
-
}>, z.ZodObject<{
|
|
1179
|
-
meta: z.ZodObject<{
|
|
1180
|
-
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1181
|
-
}, "strip", z.ZodTypeAny, {
|
|
1182
|
-
schemaVersion: "1.0";
|
|
1183
|
-
}, {
|
|
1184
|
-
schemaVersion: "1.0";
|
|
1185
|
-
}>;
|
|
1186
1267
|
} & {
|
|
1187
1268
|
type: z.ZodLiteral<"url">;
|
|
1188
1269
|
answer: z.ZodString;
|
|
@@ -1251,6 +1332,12 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1251
1332
|
meta: {
|
|
1252
1333
|
schemaVersion: "1.0";
|
|
1253
1334
|
};
|
|
1335
|
+
answer: string;
|
|
1336
|
+
} | {
|
|
1337
|
+
type: "multiselectBox";
|
|
1338
|
+
meta: {
|
|
1339
|
+
schemaVersion: "1.0";
|
|
1340
|
+
};
|
|
1254
1341
|
answer: string[];
|
|
1255
1342
|
} | {
|
|
1256
1343
|
type: "currency";
|
|
@@ -1341,6 +1428,12 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1341
1428
|
meta: {
|
|
1342
1429
|
schemaVersion: "1.0";
|
|
1343
1430
|
};
|
|
1431
|
+
answer: string;
|
|
1432
|
+
} | {
|
|
1433
|
+
type: "multiselectBox";
|
|
1434
|
+
meta: {
|
|
1435
|
+
schemaVersion: "1.0";
|
|
1436
|
+
};
|
|
1344
1437
|
answer: string[];
|
|
1345
1438
|
} | {
|
|
1346
1439
|
type: "currency";
|
|
@@ -1433,6 +1526,12 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1433
1526
|
meta: {
|
|
1434
1527
|
schemaVersion: "1.0";
|
|
1435
1528
|
};
|
|
1529
|
+
answer: string;
|
|
1530
|
+
} | {
|
|
1531
|
+
type: "multiselectBox";
|
|
1532
|
+
meta: {
|
|
1533
|
+
schemaVersion: "1.0";
|
|
1534
|
+
};
|
|
1436
1535
|
answer: string[];
|
|
1437
1536
|
} | {
|
|
1438
1537
|
type: "currency";
|
|
@@ -1525,6 +1624,12 @@ export declare const TableRowAnswerSchema: z.ZodObject<{
|
|
|
1525
1624
|
meta: {
|
|
1526
1625
|
schemaVersion: "1.0";
|
|
1527
1626
|
};
|
|
1627
|
+
answer: string;
|
|
1628
|
+
} | {
|
|
1629
|
+
type: "multiselectBox";
|
|
1630
|
+
meta: {
|
|
1631
|
+
schemaVersion: "1.0";
|
|
1632
|
+
};
|
|
1528
1633
|
answer: string[];
|
|
1529
1634
|
} | {
|
|
1530
1635
|
type: "currency";
|
|
@@ -1586,6 +1691,29 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
1586
1691
|
}, {
|
|
1587
1692
|
schemaVersion: "1.0";
|
|
1588
1693
|
}>;
|
|
1694
|
+
} & {
|
|
1695
|
+
type: z.ZodLiteral<"typeaheadSearch">;
|
|
1696
|
+
answer: z.ZodString;
|
|
1697
|
+
}, "strip", z.ZodTypeAny, {
|
|
1698
|
+
type: "typeaheadSearch";
|
|
1699
|
+
meta: {
|
|
1700
|
+
schemaVersion: "1.0";
|
|
1701
|
+
};
|
|
1702
|
+
answer: string;
|
|
1703
|
+
}, {
|
|
1704
|
+
type: "typeaheadSearch";
|
|
1705
|
+
meta: {
|
|
1706
|
+
schemaVersion: "1.0";
|
|
1707
|
+
};
|
|
1708
|
+
answer: string;
|
|
1709
|
+
}>, z.ZodObject<{
|
|
1710
|
+
meta: z.ZodObject<{
|
|
1711
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1712
|
+
}, "strip", z.ZodTypeAny, {
|
|
1713
|
+
schemaVersion: "1.0";
|
|
1714
|
+
}, {
|
|
1715
|
+
schemaVersion: "1.0";
|
|
1716
|
+
}>;
|
|
1589
1717
|
} & {
|
|
1590
1718
|
type: z.ZodLiteral<"boolean">;
|
|
1591
1719
|
answer: z.ZodBoolean;
|
|
@@ -1762,6 +1890,29 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
1762
1890
|
}, {
|
|
1763
1891
|
schemaVersion: "1.0";
|
|
1764
1892
|
}>;
|
|
1893
|
+
} & {
|
|
1894
|
+
type: z.ZodLiteral<"multiselectBox">;
|
|
1895
|
+
answer: z.ZodArray<z.ZodString, "many">;
|
|
1896
|
+
}, "strip", z.ZodTypeAny, {
|
|
1897
|
+
type: "multiselectBox";
|
|
1898
|
+
meta: {
|
|
1899
|
+
schemaVersion: "1.0";
|
|
1900
|
+
};
|
|
1901
|
+
answer: string[];
|
|
1902
|
+
}, {
|
|
1903
|
+
type: "multiselectBox";
|
|
1904
|
+
meta: {
|
|
1905
|
+
schemaVersion: "1.0";
|
|
1906
|
+
};
|
|
1907
|
+
answer: string[];
|
|
1908
|
+
}>, z.ZodObject<{
|
|
1909
|
+
meta: z.ZodObject<{
|
|
1910
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1911
|
+
}, "strip", z.ZodTypeAny, {
|
|
1912
|
+
schemaVersion: "1.0";
|
|
1913
|
+
}, {
|
|
1914
|
+
schemaVersion: "1.0";
|
|
1915
|
+
}>;
|
|
1765
1916
|
} & {
|
|
1766
1917
|
type: z.ZodLiteral<"number">;
|
|
1767
1918
|
answer: z.ZodNumber;
|
|
@@ -1810,19 +1961,19 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
1810
1961
|
}>;
|
|
1811
1962
|
} & {
|
|
1812
1963
|
type: z.ZodLiteral<"selectBox">;
|
|
1813
|
-
answer: z.
|
|
1964
|
+
answer: z.ZodString;
|
|
1814
1965
|
}, "strip", z.ZodTypeAny, {
|
|
1815
1966
|
type: "selectBox";
|
|
1816
1967
|
meta: {
|
|
1817
1968
|
schemaVersion: "1.0";
|
|
1818
1969
|
};
|
|
1819
|
-
answer: string
|
|
1970
|
+
answer: string;
|
|
1820
1971
|
}, {
|
|
1821
1972
|
type: "selectBox";
|
|
1822
1973
|
meta: {
|
|
1823
1974
|
schemaVersion: "1.0";
|
|
1824
1975
|
};
|
|
1825
|
-
answer: string
|
|
1976
|
+
answer: string;
|
|
1826
1977
|
}>, z.ZodObject<{
|
|
1827
1978
|
meta: z.ZodObject<{
|
|
1828
1979
|
schemaVersion: z.ZodLiteral<"1.0">;
|
|
@@ -1877,29 +2028,6 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
1877
2028
|
}, {
|
|
1878
2029
|
schemaVersion: "1.0";
|
|
1879
2030
|
}>;
|
|
1880
|
-
} & {
|
|
1881
|
-
type: z.ZodLiteral<"typeaheadSearch">;
|
|
1882
|
-
answer: z.ZodString;
|
|
1883
|
-
}, "strip", z.ZodTypeAny, {
|
|
1884
|
-
type: "typeaheadSearch";
|
|
1885
|
-
meta: {
|
|
1886
|
-
schemaVersion: "1.0";
|
|
1887
|
-
};
|
|
1888
|
-
answer: string;
|
|
1889
|
-
}, {
|
|
1890
|
-
type: "typeaheadSearch";
|
|
1891
|
-
meta: {
|
|
1892
|
-
schemaVersion: "1.0";
|
|
1893
|
-
};
|
|
1894
|
-
answer: string;
|
|
1895
|
-
}>, z.ZodObject<{
|
|
1896
|
-
meta: z.ZodObject<{
|
|
1897
|
-
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1898
|
-
}, "strip", z.ZodTypeAny, {
|
|
1899
|
-
schemaVersion: "1.0";
|
|
1900
|
-
}, {
|
|
1901
|
-
schemaVersion: "1.0";
|
|
1902
|
-
}>;
|
|
1903
2031
|
} & {
|
|
1904
2032
|
type: z.ZodLiteral<"url">;
|
|
1905
2033
|
answer: z.ZodString;
|
|
@@ -1968,6 +2096,12 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
1968
2096
|
meta: {
|
|
1969
2097
|
schemaVersion: "1.0";
|
|
1970
2098
|
};
|
|
2099
|
+
answer: string;
|
|
2100
|
+
} | {
|
|
2101
|
+
type: "multiselectBox";
|
|
2102
|
+
meta: {
|
|
2103
|
+
schemaVersion: "1.0";
|
|
2104
|
+
};
|
|
1971
2105
|
answer: string[];
|
|
1972
2106
|
} | {
|
|
1973
2107
|
type: "currency";
|
|
@@ -2058,6 +2192,12 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
2058
2192
|
meta: {
|
|
2059
2193
|
schemaVersion: "1.0";
|
|
2060
2194
|
};
|
|
2195
|
+
answer: string;
|
|
2196
|
+
} | {
|
|
2197
|
+
type: "multiselectBox";
|
|
2198
|
+
meta: {
|
|
2199
|
+
schemaVersion: "1.0";
|
|
2200
|
+
};
|
|
2061
2201
|
answer: string[];
|
|
2062
2202
|
} | {
|
|
2063
2203
|
type: "currency";
|
|
@@ -2150,6 +2290,12 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
2150
2290
|
meta: {
|
|
2151
2291
|
schemaVersion: "1.0";
|
|
2152
2292
|
};
|
|
2293
|
+
answer: string;
|
|
2294
|
+
} | {
|
|
2295
|
+
type: "multiselectBox";
|
|
2296
|
+
meta: {
|
|
2297
|
+
schemaVersion: "1.0";
|
|
2298
|
+
};
|
|
2153
2299
|
answer: string[];
|
|
2154
2300
|
} | {
|
|
2155
2301
|
type: "currency";
|
|
@@ -2242,6 +2388,12 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
2242
2388
|
meta: {
|
|
2243
2389
|
schemaVersion: "1.0";
|
|
2244
2390
|
};
|
|
2391
|
+
answer: string;
|
|
2392
|
+
} | {
|
|
2393
|
+
type: "multiselectBox";
|
|
2394
|
+
meta: {
|
|
2395
|
+
schemaVersion: "1.0";
|
|
2396
|
+
};
|
|
2245
2397
|
answer: string[];
|
|
2246
2398
|
} | {
|
|
2247
2399
|
type: "currency";
|
|
@@ -2340,6 +2492,12 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
2340
2492
|
meta: {
|
|
2341
2493
|
schemaVersion: "1.0";
|
|
2342
2494
|
};
|
|
2495
|
+
answer: string;
|
|
2496
|
+
} | {
|
|
2497
|
+
type: "multiselectBox";
|
|
2498
|
+
meta: {
|
|
2499
|
+
schemaVersion: "1.0";
|
|
2500
|
+
};
|
|
2343
2501
|
answer: string[];
|
|
2344
2502
|
} | {
|
|
2345
2503
|
type: "currency";
|
|
@@ -2438,6 +2596,12 @@ export declare const TableAnswerSchema: z.ZodObject<{
|
|
|
2438
2596
|
meta: {
|
|
2439
2597
|
schemaVersion: "1.0";
|
|
2440
2598
|
};
|
|
2599
|
+
answer: string;
|
|
2600
|
+
} | {
|
|
2601
|
+
type: "multiselectBox";
|
|
2602
|
+
meta: {
|
|
2603
|
+
schemaVersion: "1.0";
|
|
2604
|
+
};
|
|
2441
2605
|
answer: string[];
|
|
2442
2606
|
} | {
|
|
2443
2607
|
type: "currency";
|
|
@@ -10,6 +10,7 @@ const numberAnswers_1 = require("./numberAnswers");
|
|
|
10
10
|
const textAnswers_1 = require("./textAnswers");
|
|
11
11
|
// Answers to Table Column Question Types (note that TableAnswer is not included here because we don't allow nested tables)
|
|
12
12
|
exports.AnyTableColumnAnswerSchema = zod_1.z.discriminatedUnion('type', [
|
|
13
|
+
graphQLAnswers_1.AffiliationSearchAnswerSchema,
|
|
13
14
|
optionBasedAnswers_1.BooleanAnswerSchema,
|
|
14
15
|
optionBasedAnswers_1.CheckboxesAnswerSchema,
|
|
15
16
|
numberAnswers_1.CurrencyAnswerSchema,
|
|
@@ -17,12 +18,12 @@ exports.AnyTableColumnAnswerSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
17
18
|
dateAnswers_1.DateRangeAnswerSchema,
|
|
18
19
|
textAnswers_1.EmailAnswerSchema,
|
|
19
20
|
graphQLAnswers_1.FilteredSearchAnswerSchema,
|
|
21
|
+
optionBasedAnswers_1.MultiselectBoxAnswerSchema,
|
|
20
22
|
numberAnswers_1.NumberAnswerSchema,
|
|
21
23
|
optionBasedAnswers_1.RadioButtonsAnswerSchema,
|
|
22
24
|
optionBasedAnswers_1.SelectBoxAnswerSchema,
|
|
23
25
|
textAnswers_1.TextAnswerSchema,
|
|
24
26
|
textAnswers_1.TextAreaAnswerSchema,
|
|
25
|
-
graphQLAnswers_1.TypeaheadSearchAnswerSchema,
|
|
26
27
|
textAnswers_1.URLAnswerSchema
|
|
27
28
|
]);
|
|
28
29
|
exports.TableColumnAnswerSchema = zod_1.z.object({
|
|
@@ -51,10 +51,10 @@ const graphQLQuestions_1 = require("../graphQLQuestions");
|
|
|
51
51
|
(0, globals_1.expect)(() => graphQLQuestions_1.FilteredSearchQuestionSchema.parse(invalidData)).toThrow();
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
|
-
(0, globals_1.describe)("
|
|
55
|
-
(0, globals_1.it)("should validate a correct
|
|
54
|
+
(0, globals_1.describe)("AffiliationSearchQuestion schema", () => {
|
|
55
|
+
(0, globals_1.it)("should validate a correct AffiliationSearchQuestion object", () => {
|
|
56
56
|
const validData = {
|
|
57
|
-
type: "
|
|
57
|
+
type: "affiliationSearch",
|
|
58
58
|
attributes: {
|
|
59
59
|
label: "Search",
|
|
60
60
|
help: "Search for a user",
|
|
@@ -73,11 +73,11 @@ const graphQLQuestions_1 = require("../graphQLQuestions");
|
|
|
73
73
|
schemaVersion: "1.0"
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
(0, globals_1.expect)(() => graphQLQuestions_1.
|
|
76
|
+
(0, globals_1.expect)(() => graphQLQuestions_1.AffiliationSearchQuestionSchema.parse(validData)).not.toThrow();
|
|
77
77
|
});
|
|
78
|
-
(0, globals_1.it)("should throw an error for an invalid
|
|
78
|
+
(0, globals_1.it)("should throw an error for an invalid AffiliationSearchQuestion object", () => {
|
|
79
79
|
const invalidData = {
|
|
80
|
-
type: "
|
|
80
|
+
type: "affiliationSearch",
|
|
81
81
|
graphQL: {
|
|
82
82
|
displayFields: [
|
|
83
83
|
{ propertyName: "title", label: "Title" },
|
|
@@ -88,6 +88,6 @@ const graphQLQuestions_1 = require("../graphQLQuestions");
|
|
|
88
88
|
],
|
|
89
89
|
},
|
|
90
90
|
};
|
|
91
|
-
(0, globals_1.expect)(() => graphQLQuestions_1.
|
|
91
|
+
(0, globals_1.expect)(() => graphQLQuestions_1.AffiliationSearchQuestionSchema.parse(invalidData)).toThrow();
|
|
92
92
|
});
|
|
93
93
|
});
|