@dmptool/types 2.3.2 → 3.1.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 (42) hide show
  1. package/dist/dmp/index.d.ts +2 -2
  2. package/dist/dmp/index.js +65 -50
  3. package/dist/questions/__tests__/defaults.spec.js +17 -45
  4. package/dist/questions/__tests__/graphQLQuestions.spec.js +3 -11
  5. package/dist/questions/__tests__/optionBasedQuestions.spec.js +3 -3
  6. package/dist/questions/graphQLQuestions.d.ts +4 -4
  7. package/dist/questions/graphQLQuestions.js +5 -23
  8. package/dist/questions/index.d.ts +25 -8
  9. package/dist/questions/index.js +2 -2
  10. package/dist/questions/optionBasedQuestions.d.ts +8 -2
  11. package/dist/questions/optionBasedQuestions.js +6 -6
  12. package/dist/questions/tableQuestions.d.ts +85 -16
  13. package/dist/questions/tableQuestions.js +3 -3
  14. package/dist/questions/textQuestions.d.ts +8 -0
  15. package/dist/questions/textQuestions.js +1 -1
  16. package/dist/schemas/anyQuestion.schema.json +70 -15
  17. package/dist/schemas/anyTableColumnQuestion.schema.json +24 -5
  18. package/dist/schemas/checkboxesQuestion.schema.json +2 -3
  19. package/dist/schemas/emailQuestion.schema.json +3 -0
  20. package/dist/schemas/licenseSearchQuestion.schema.json +2 -2
  21. package/dist/schemas/multiselectBoxQuestion.schema.json +4 -0
  22. package/dist/schemas/radioButtonsQuestion.schema.json +4 -0
  23. package/dist/schemas/researchOutputTableQuestion.schema.json +1455 -61
  24. package/dist/schemas/selectBoxQuestion.schema.json +4 -0
  25. package/dist/schemas/tableQuestion.schema.json +24 -5
  26. package/dist/schemas/textAreaQuestion.schema.json +3 -0
  27. package/dist/schemas/textQuestion.schema.json +3 -0
  28. package/dist/schemas/urlQuestion.schema.json +3 -0
  29. package/package.json +1 -1
  30. package/schemas/anyQuestion.schema.json +70 -15
  31. package/schemas/anyTableColumnQuestion.schema.json +24 -5
  32. package/schemas/checkboxesQuestion.schema.json +2 -3
  33. package/schemas/emailQuestion.schema.json +3 -0
  34. package/schemas/licenseSearchQuestion.schema.json +2 -2
  35. package/schemas/multiselectBoxQuestion.schema.json +4 -0
  36. package/schemas/radioButtonsQuestion.schema.json +4 -0
  37. package/schemas/researchOutputTableQuestion.schema.json +1455 -61
  38. package/schemas/selectBoxQuestion.schema.json +4 -0
  39. package/schemas/tableQuestion.schema.json +24 -5
  40. package/schemas/textAreaQuestion.schema.json +3 -0
  41. package/schemas/textQuestion.schema.json +3 -0
  42. package/schemas/urlQuestion.schema.json +3 -0
@@ -80,7 +80,7 @@ exports.QuestionSchemaMap = {
80
80
  // Export a mapping between the Types and their corresponding default structures
81
81
  exports.QuestionDefaultMap = {
82
82
  affiliationSearch: graphQLQuestions_1.DefaultAffiliationSearchQuestion,
83
- boolean: graphQLQuestions_1.DefaultAffiliationSearchQuestion,
83
+ boolean: optionBasedQuestions_1.DefaultBooleanQuestion,
84
84
  checkBoxes: optionBasedQuestions_1.DefaultCheckboxesQuestion,
85
85
  currency: numberQuestions_1.DefaultCurrencyQuestion,
86
86
  date: dateQuestions_1.DefaultDateQuestion,
@@ -96,7 +96,7 @@ exports.QuestionDefaultMap = {
96
96
  repositorySearch: graphQLQuestions_1.DefaultRepositorySearchQuestion,
97
97
  researchOutputTable: tableQuestions_1.DefaultResearchOutputTableQuestion,
98
98
  selectBox: optionBasedQuestions_1.DefaultSelectBoxQuestion,
99
- table: tableQuestions_1.DefaultResearchOutputTableQuestion,
99
+ table: tableQuestions_1.DefaultTableQuestion,
100
100
  text: textQuestions_1.DefaultTextQuestion,
101
101
  textArea: textQuestions_1.DefaultTextAreaQuestion,
102
102
  url: textQuestions_1.DefaultURLQuestion,
@@ -28,10 +28,10 @@ export declare const DefaultBooleanQuestion: {
28
28
  export declare const CheckboxesQuestionSchema: z.ZodObject<{
29
29
  type: z.ZodLiteral<"checkBoxes">;
30
30
  options: z.ZodArray<z.ZodObject<{
31
- checked: z.ZodDefault<z.ZodBoolean>;
32
31
  label: z.ZodDefault<z.ZodString>;
33
32
  value: z.ZodDefault<z.ZodString>;
34
33
  description: z.ZodOptional<z.ZodString>;
34
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
35
35
  }, z.core.$strip>>;
36
36
  showCommentField: z.ZodOptional<z.ZodBoolean>;
37
37
  attributes: z.ZodObject<{
@@ -48,10 +48,10 @@ export declare const CheckboxesQuestionSchema: z.ZodObject<{
48
48
  export declare const DefaultCheckboxesQuestion: {
49
49
  type: "checkBoxes";
50
50
  options: {
51
- checked: boolean;
52
51
  label: string;
53
52
  value: string;
54
53
  description?: string | undefined;
54
+ selected?: boolean | undefined;
55
55
  }[];
56
56
  attributes: {
57
57
  label?: string | undefined;
@@ -71,6 +71,7 @@ export declare const RadioButtonsQuestionSchema: z.ZodObject<{
71
71
  label: z.ZodDefault<z.ZodString>;
72
72
  value: z.ZodDefault<z.ZodString>;
73
73
  description: z.ZodOptional<z.ZodString>;
74
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
74
75
  }, z.core.$strip>>;
75
76
  showCommentField: z.ZodOptional<z.ZodBoolean>;
76
77
  attributes: z.ZodObject<{
@@ -90,6 +91,7 @@ export declare const DefaultRadioButtonsQuestion: {
90
91
  label: string;
91
92
  value: string;
92
93
  description?: string | undefined;
94
+ selected?: boolean | undefined;
93
95
  }[];
94
96
  attributes: {
95
97
  label?: string | undefined;
@@ -109,6 +111,7 @@ export declare const SelectBoxQuestionSchema: z.ZodObject<{
109
111
  label: z.ZodDefault<z.ZodString>;
110
112
  value: z.ZodDefault<z.ZodString>;
111
113
  description: z.ZodOptional<z.ZodString>;
114
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
112
115
  }, z.core.$strip>>;
113
116
  attributes: z.ZodObject<{
114
117
  multiple: z.ZodLiteral<false>;
@@ -129,6 +132,7 @@ export declare const DefaultSelectBoxQuestion: {
129
132
  label: string;
130
133
  value: string;
131
134
  description?: string | undefined;
135
+ selected?: boolean | undefined;
132
136
  }[];
133
137
  attributes: {
134
138
  multiple: false;
@@ -149,6 +153,7 @@ export declare const MultiselectBoxQuestionSchema: z.ZodObject<{
149
153
  label: z.ZodDefault<z.ZodString>;
150
154
  value: z.ZodDefault<z.ZodString>;
151
155
  description: z.ZodOptional<z.ZodString>;
156
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
152
157
  }, z.core.$strip>>;
153
158
  attributes: z.ZodObject<{
154
159
  multiple: z.ZodLiteral<true>;
@@ -169,6 +174,7 @@ export declare const DefaultMultiselectBoxQuestion: {
169
174
  label: string;
170
175
  value: string;
171
176
  description?: string | undefined;
177
+ selected?: boolean | undefined;
172
178
  }[];
173
179
  attributes: {
174
180
  multiple: true;
@@ -5,19 +5,19 @@ const zod_1 = require("zod");
5
5
  const question_1 = require("./question");
6
6
  // A select box, radio buttons, or checkboxes option
7
7
  // NOTE: Question option shapes are intentionally minimal: they describe the configurable
8
- // properties of each option (label, value, description). We deliberately do NOT include
9
- // answer-state flags such as `selected` on question definitions because those represent
10
- // user response state and belong in answer objects/schemas (not in the question configuration).
8
+ // properties of each option (label, value, description). However, we deliberately included
9
+ // `selected` on question definitions in order to save default selection state for options.
11
10
  // For checkboxes we include a `checked` default on the question option to allow a configured
12
- // default checked state. Radio/select/multiselect questions should not contain `selected`;
13
- // user selections are captured by the answer schemas.
11
+ // default checked state. Radio/select/multiselect questions SHOULD include `selected`;
12
+ // in order to save which options should be selected by default.
14
13
  const OptionSchema = zod_1.z.object({
15
14
  label: zod_1.z.string().default('Option A'),
16
15
  value: zod_1.z.string().default('a'),
17
16
  description: zod_1.z.string().optional(),
17
+ selected: zod_1.z.boolean().default(false).optional() // For setting default selected option(s)
18
18
  });
19
19
  const DefaultOption = OptionSchema.parse({});
20
- const CheckedOptionSchema = zod_1.z.object(Object.assign(Object.assign({}, OptionSchema.shape), { checked: zod_1.z.boolean().default(false) }));
20
+ const CheckedOptionSchema = zod_1.z.object(Object.assign({}, OptionSchema.shape));
21
21
  const DefaultCheckedOption = CheckedOptionSchema.parse({});
22
22
  const selectBoxAttributes = zod_1.z.object(Object.assign(Object.assign({}, question_1.BaseAttributesSchema.shape), { multiple: zod_1.z.literal(false) }));
23
23
  const DefaultSelectBoxAttributes = selectBoxAttributes.parse({
@@ -46,10 +46,10 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
46
46
  }, z.core.$strip>, z.ZodObject<{
47
47
  type: z.ZodLiteral<"checkBoxes">;
48
48
  options: z.ZodArray<z.ZodObject<{
49
- checked: z.ZodDefault<z.ZodBoolean>;
50
49
  label: z.ZodDefault<z.ZodString>;
51
50
  value: z.ZodDefault<z.ZodString>;
52
51
  description: z.ZodOptional<z.ZodString>;
52
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
53
53
  }, z.core.$strip>>;
54
54
  showCommentField: z.ZodOptional<z.ZodBoolean>;
55
55
  attributes: z.ZodObject<{
@@ -133,6 +133,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
133
133
  maxLength: z.ZodDefault<z.ZodNumber>;
134
134
  minLength: z.ZodOptional<z.ZodNumber>;
135
135
  pattern: z.ZodOptional<z.ZodString>;
136
+ defaultValue: z.ZodOptional<z.ZodString>;
136
137
  label: z.ZodOptional<z.ZodString>;
137
138
  help: z.ZodOptional<z.ZodString>;
138
139
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -162,7 +163,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
162
163
  label: z.ZodDefault<z.ZodString>;
163
164
  labelTranslationKey: z.ZodOptional<z.ZodString>;
164
165
  }, z.core.$strip>>;
165
- responseField: z.ZodLiteral<"licenses.items">;
166
+ responseField: z.ZodLiteral<"licenses">;
166
167
  localQueryId: z.ZodOptional<z.ZodString>;
167
168
  }, z.core.$strip>;
168
169
  attributes: z.ZodObject<{
@@ -251,6 +252,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
251
252
  label: z.ZodDefault<z.ZodString>;
252
253
  value: z.ZodDefault<z.ZodString>;
253
254
  description: z.ZodOptional<z.ZodString>;
255
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
254
256
  }, z.core.$strip>>;
255
257
  showCommentField: z.ZodOptional<z.ZodBoolean>;
256
258
  attributes: z.ZodObject<{
@@ -301,6 +303,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
301
303
  label: z.ZodDefault<z.ZodString>;
302
304
  value: z.ZodDefault<z.ZodString>;
303
305
  description: z.ZodOptional<z.ZodString>;
306
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
304
307
  }, z.core.$strip>>;
305
308
  attributes: z.ZodObject<{
306
309
  multiple: z.ZodLiteral<false>;
@@ -323,6 +326,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
323
326
  maxLength: z.ZodDefault<z.ZodNumber>;
324
327
  minLength: z.ZodOptional<z.ZodNumber>;
325
328
  pattern: z.ZodOptional<z.ZodString>;
329
+ defaultValue: z.ZodOptional<z.ZodString>;
326
330
  label: z.ZodOptional<z.ZodString>;
327
331
  help: z.ZodOptional<z.ZodString>;
328
332
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -338,6 +342,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
338
342
  maxLength: z.ZodDefault<z.ZodNumber>;
339
343
  minLength: z.ZodOptional<z.ZodNumber>;
340
344
  pattern: z.ZodOptional<z.ZodString>;
345
+ defaultValue: z.ZodOptional<z.ZodString>;
341
346
  label: z.ZodOptional<z.ZodString>;
342
347
  help: z.ZodOptional<z.ZodString>;
343
348
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -353,6 +358,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<[z.Zo
353
358
  maxLength: z.ZodDefault<z.ZodNumber>;
354
359
  minLength: z.ZodOptional<z.ZodNumber>;
355
360
  pattern: z.ZodOptional<z.ZodString>;
361
+ defaultValue: z.ZodOptional<z.ZodString>;
356
362
  label: z.ZodOptional<z.ZodString>;
357
363
  help: z.ZodOptional<z.ZodString>;
358
364
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -416,10 +422,10 @@ export declare const TableColumnSchema: z.ZodObject<{
416
422
  }, z.core.$strip>, z.ZodObject<{
417
423
  type: z.ZodLiteral<"checkBoxes">;
418
424
  options: z.ZodArray<z.ZodObject<{
419
- checked: z.ZodDefault<z.ZodBoolean>;
420
425
  label: z.ZodDefault<z.ZodString>;
421
426
  value: z.ZodDefault<z.ZodString>;
422
427
  description: z.ZodOptional<z.ZodString>;
428
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
423
429
  }, z.core.$strip>>;
424
430
  showCommentField: z.ZodOptional<z.ZodBoolean>;
425
431
  attributes: z.ZodObject<{
@@ -503,6 +509,7 @@ export declare const TableColumnSchema: z.ZodObject<{
503
509
  maxLength: z.ZodDefault<z.ZodNumber>;
504
510
  minLength: z.ZodOptional<z.ZodNumber>;
505
511
  pattern: z.ZodOptional<z.ZodString>;
512
+ defaultValue: z.ZodOptional<z.ZodString>;
506
513
  label: z.ZodOptional<z.ZodString>;
507
514
  help: z.ZodOptional<z.ZodString>;
508
515
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -532,7 +539,7 @@ export declare const TableColumnSchema: z.ZodObject<{
532
539
  label: z.ZodDefault<z.ZodString>;
533
540
  labelTranslationKey: z.ZodOptional<z.ZodString>;
534
541
  }, z.core.$strip>>;
535
- responseField: z.ZodLiteral<"licenses.items">;
542
+ responseField: z.ZodLiteral<"licenses">;
536
543
  localQueryId: z.ZodOptional<z.ZodString>;
537
544
  }, z.core.$strip>;
538
545
  attributes: z.ZodObject<{
@@ -621,6 +628,7 @@ export declare const TableColumnSchema: z.ZodObject<{
621
628
  label: z.ZodDefault<z.ZodString>;
622
629
  value: z.ZodDefault<z.ZodString>;
623
630
  description: z.ZodOptional<z.ZodString>;
631
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
624
632
  }, z.core.$strip>>;
625
633
  showCommentField: z.ZodOptional<z.ZodBoolean>;
626
634
  attributes: z.ZodObject<{
@@ -671,6 +679,7 @@ export declare const TableColumnSchema: z.ZodObject<{
671
679
  label: z.ZodDefault<z.ZodString>;
672
680
  value: z.ZodDefault<z.ZodString>;
673
681
  description: z.ZodOptional<z.ZodString>;
682
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
674
683
  }, z.core.$strip>>;
675
684
  attributes: z.ZodObject<{
676
685
  multiple: z.ZodLiteral<false>;
@@ -693,6 +702,7 @@ export declare const TableColumnSchema: z.ZodObject<{
693
702
  maxLength: z.ZodDefault<z.ZodNumber>;
694
703
  minLength: z.ZodOptional<z.ZodNumber>;
695
704
  pattern: z.ZodOptional<z.ZodString>;
705
+ defaultValue: z.ZodOptional<z.ZodString>;
696
706
  label: z.ZodOptional<z.ZodString>;
697
707
  help: z.ZodOptional<z.ZodString>;
698
708
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -708,6 +718,7 @@ export declare const TableColumnSchema: z.ZodObject<{
708
718
  maxLength: z.ZodDefault<z.ZodNumber>;
709
719
  minLength: z.ZodOptional<z.ZodNumber>;
710
720
  pattern: z.ZodOptional<z.ZodString>;
721
+ defaultValue: z.ZodOptional<z.ZodString>;
711
722
  label: z.ZodOptional<z.ZodString>;
712
723
  help: z.ZodOptional<z.ZodString>;
713
724
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -723,6 +734,7 @@ export declare const TableColumnSchema: z.ZodObject<{
723
734
  maxLength: z.ZodDefault<z.ZodNumber>;
724
735
  minLength: z.ZodOptional<z.ZodNumber>;
725
736
  pattern: z.ZodOptional<z.ZodString>;
737
+ defaultValue: z.ZodOptional<z.ZodString>;
726
738
  label: z.ZodOptional<z.ZodString>;
727
739
  help: z.ZodOptional<z.ZodString>;
728
740
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -801,6 +813,7 @@ export declare const DefaultTableColumn: {
801
813
  maxLength: number;
802
814
  minLength?: number | undefined;
803
815
  pattern?: string | undefined;
816
+ defaultValue?: string | undefined;
804
817
  label?: string | undefined;
805
818
  help?: string | undefined;
806
819
  labelTranslationKey?: string | undefined;
@@ -820,6 +833,7 @@ export declare const DefaultTableColumn: {
820
833
  maxLength: number;
821
834
  minLength?: number | undefined;
822
835
  pattern?: string | undefined;
836
+ defaultValue?: string | undefined;
823
837
  label?: string | undefined;
824
838
  help?: string | undefined;
825
839
  labelTranslationKey?: string | undefined;
@@ -835,6 +849,7 @@ export declare const DefaultTableColumn: {
835
849
  maxLength: number;
836
850
  minLength?: number | undefined;
837
851
  pattern?: string | undefined;
852
+ defaultValue?: string | undefined;
838
853
  label?: string | undefined;
839
854
  help?: string | undefined;
840
855
  labelTranslationKey?: string | undefined;
@@ -850,6 +865,7 @@ export declare const DefaultTableColumn: {
850
865
  maxLength: number;
851
866
  minLength?: number | undefined;
852
867
  pattern?: string | undefined;
868
+ defaultValue?: string | undefined;
853
869
  label?: string | undefined;
854
870
  help?: string | undefined;
855
871
  labelTranslationKey?: string | undefined;
@@ -922,10 +938,10 @@ export declare const DefaultTableColumn: {
922
938
  } | {
923
939
  type: "checkBoxes";
924
940
  options: {
925
- checked: boolean;
926
941
  label: string;
927
942
  value: string;
928
943
  description?: string | undefined;
944
+ selected?: boolean | undefined;
929
945
  }[];
930
946
  attributes: {
931
947
  label?: string | undefined;
@@ -944,6 +960,7 @@ export declare const DefaultTableColumn: {
944
960
  label: string;
945
961
  value: string;
946
962
  description?: string | undefined;
963
+ selected?: boolean | undefined;
947
964
  }[];
948
965
  attributes: {
949
966
  label?: string | undefined;
@@ -962,6 +979,7 @@ export declare const DefaultTableColumn: {
962
979
  label: string;
963
980
  value: string;
964
981
  description?: string | undefined;
982
+ selected?: boolean | undefined;
965
983
  }[];
966
984
  attributes: {
967
985
  multiple: false;
@@ -1089,7 +1107,7 @@ export declare const DefaultTableColumn: {
1089
1107
  label: string;
1090
1108
  labelTranslationKey?: string | undefined;
1091
1109
  }[];
1092
- responseField: "licenses.items";
1110
+ responseField: "licenses";
1093
1111
  queryId?: string | undefined;
1094
1112
  localQueryId?: string | undefined;
1095
1113
  };
@@ -1160,10 +1178,10 @@ export declare const TableQuestionSchema: z.ZodObject<{
1160
1178
  }, z.core.$strip>, z.ZodObject<{
1161
1179
  type: z.ZodLiteral<"checkBoxes">;
1162
1180
  options: z.ZodArray<z.ZodObject<{
1163
- checked: z.ZodDefault<z.ZodBoolean>;
1164
1181
  label: z.ZodDefault<z.ZodString>;
1165
1182
  value: z.ZodDefault<z.ZodString>;
1166
1183
  description: z.ZodOptional<z.ZodString>;
1184
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1167
1185
  }, z.core.$strip>>;
1168
1186
  showCommentField: z.ZodOptional<z.ZodBoolean>;
1169
1187
  attributes: z.ZodObject<{
@@ -1247,6 +1265,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1247
1265
  maxLength: z.ZodDefault<z.ZodNumber>;
1248
1266
  minLength: z.ZodOptional<z.ZodNumber>;
1249
1267
  pattern: z.ZodOptional<z.ZodString>;
1268
+ defaultValue: z.ZodOptional<z.ZodString>;
1250
1269
  label: z.ZodOptional<z.ZodString>;
1251
1270
  help: z.ZodOptional<z.ZodString>;
1252
1271
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1276,7 +1295,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1276
1295
  label: z.ZodDefault<z.ZodString>;
1277
1296
  labelTranslationKey: z.ZodOptional<z.ZodString>;
1278
1297
  }, z.core.$strip>>;
1279
- responseField: z.ZodLiteral<"licenses.items">;
1298
+ responseField: z.ZodLiteral<"licenses">;
1280
1299
  localQueryId: z.ZodOptional<z.ZodString>;
1281
1300
  }, z.core.$strip>;
1282
1301
  attributes: z.ZodObject<{
@@ -1365,6 +1384,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1365
1384
  label: z.ZodDefault<z.ZodString>;
1366
1385
  value: z.ZodDefault<z.ZodString>;
1367
1386
  description: z.ZodOptional<z.ZodString>;
1387
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1368
1388
  }, z.core.$strip>>;
1369
1389
  showCommentField: z.ZodOptional<z.ZodBoolean>;
1370
1390
  attributes: z.ZodObject<{
@@ -1415,6 +1435,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1415
1435
  label: z.ZodDefault<z.ZodString>;
1416
1436
  value: z.ZodDefault<z.ZodString>;
1417
1437
  description: z.ZodOptional<z.ZodString>;
1438
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1418
1439
  }, z.core.$strip>>;
1419
1440
  attributes: z.ZodObject<{
1420
1441
  multiple: z.ZodLiteral<false>;
@@ -1437,6 +1458,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1437
1458
  maxLength: z.ZodDefault<z.ZodNumber>;
1438
1459
  minLength: z.ZodOptional<z.ZodNumber>;
1439
1460
  pattern: z.ZodOptional<z.ZodString>;
1461
+ defaultValue: z.ZodOptional<z.ZodString>;
1440
1462
  label: z.ZodOptional<z.ZodString>;
1441
1463
  help: z.ZodOptional<z.ZodString>;
1442
1464
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1452,6 +1474,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1452
1474
  maxLength: z.ZodDefault<z.ZodNumber>;
1453
1475
  minLength: z.ZodOptional<z.ZodNumber>;
1454
1476
  pattern: z.ZodOptional<z.ZodString>;
1477
+ defaultValue: z.ZodOptional<z.ZodString>;
1455
1478
  label: z.ZodOptional<z.ZodString>;
1456
1479
  help: z.ZodOptional<z.ZodString>;
1457
1480
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1467,6 +1490,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
1467
1490
  maxLength: z.ZodDefault<z.ZodNumber>;
1468
1491
  minLength: z.ZodOptional<z.ZodNumber>;
1469
1492
  pattern: z.ZodOptional<z.ZodString>;
1493
+ defaultValue: z.ZodOptional<z.ZodString>;
1470
1494
  label: z.ZodOptional<z.ZodString>;
1471
1495
  help: z.ZodOptional<z.ZodString>;
1472
1496
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1563,6 +1587,7 @@ export declare const DefaultTableQuestion: {
1563
1587
  maxLength: number;
1564
1588
  minLength?: number | undefined;
1565
1589
  pattern?: string | undefined;
1590
+ defaultValue?: string | undefined;
1566
1591
  label?: string | undefined;
1567
1592
  help?: string | undefined;
1568
1593
  labelTranslationKey?: string | undefined;
@@ -1582,6 +1607,7 @@ export declare const DefaultTableQuestion: {
1582
1607
  maxLength: number;
1583
1608
  minLength?: number | undefined;
1584
1609
  pattern?: string | undefined;
1610
+ defaultValue?: string | undefined;
1585
1611
  label?: string | undefined;
1586
1612
  help?: string | undefined;
1587
1613
  labelTranslationKey?: string | undefined;
@@ -1597,6 +1623,7 @@ export declare const DefaultTableQuestion: {
1597
1623
  maxLength: number;
1598
1624
  minLength?: number | undefined;
1599
1625
  pattern?: string | undefined;
1626
+ defaultValue?: string | undefined;
1600
1627
  label?: string | undefined;
1601
1628
  help?: string | undefined;
1602
1629
  labelTranslationKey?: string | undefined;
@@ -1612,6 +1639,7 @@ export declare const DefaultTableQuestion: {
1612
1639
  maxLength: number;
1613
1640
  minLength?: number | undefined;
1614
1641
  pattern?: string | undefined;
1642
+ defaultValue?: string | undefined;
1615
1643
  label?: string | undefined;
1616
1644
  help?: string | undefined;
1617
1645
  labelTranslationKey?: string | undefined;
@@ -1684,10 +1712,10 @@ export declare const DefaultTableQuestion: {
1684
1712
  } | {
1685
1713
  type: "checkBoxes";
1686
1714
  options: {
1687
- checked: boolean;
1688
1715
  label: string;
1689
1716
  value: string;
1690
1717
  description?: string | undefined;
1718
+ selected?: boolean | undefined;
1691
1719
  }[];
1692
1720
  attributes: {
1693
1721
  label?: string | undefined;
@@ -1706,6 +1734,7 @@ export declare const DefaultTableQuestion: {
1706
1734
  label: string;
1707
1735
  value: string;
1708
1736
  description?: string | undefined;
1737
+ selected?: boolean | undefined;
1709
1738
  }[];
1710
1739
  attributes: {
1711
1740
  label?: string | undefined;
@@ -1724,6 +1753,7 @@ export declare const DefaultTableQuestion: {
1724
1753
  label: string;
1725
1754
  value: string;
1726
1755
  description?: string | undefined;
1756
+ selected?: boolean | undefined;
1727
1757
  }[];
1728
1758
  attributes: {
1729
1759
  multiple: false;
@@ -1851,7 +1881,7 @@ export declare const DefaultTableQuestion: {
1851
1881
  label: string;
1852
1882
  labelTranslationKey?: string | undefined;
1853
1883
  }[];
1854
- responseField: "licenses.items";
1884
+ responseField: "licenses";
1855
1885
  queryId?: string | undefined;
1856
1886
  localQueryId?: string | undefined;
1857
1887
  };
@@ -1884,6 +1914,33 @@ export declare const DefaultTableQuestion: {
1884
1914
  minRows?: number | undefined;
1885
1915
  } | undefined;
1886
1916
  };
1917
+ export declare const DefaultResearchOutputAccessLevelColumn: {
1918
+ heading: string;
1919
+ help: string;
1920
+ enabled: boolean;
1921
+ content: {
1922
+ type: "radioButtons";
1923
+ options: {
1924
+ label: string;
1925
+ value: string;
1926
+ description?: string | undefined;
1927
+ selected?: boolean | undefined;
1928
+ }[];
1929
+ attributes: {
1930
+ label?: string | undefined;
1931
+ help?: string | undefined;
1932
+ labelTranslationKey?: string | undefined;
1933
+ };
1934
+ meta: {
1935
+ schemaVersion: string;
1936
+ title?: string | undefined;
1937
+ usageDescription?: string | undefined;
1938
+ };
1939
+ showCommentField?: boolean | undefined;
1940
+ };
1941
+ required: boolean;
1942
+ commonStandardId?: string | undefined;
1943
+ };
1887
1944
  export declare const ResearchOutputCustomColumnSchema: z.ZodObject<{
1888
1945
  heading: z.ZodDefault<z.ZodString>;
1889
1946
  help: z.ZodDefault<z.ZodString>;
@@ -1941,6 +1998,7 @@ declare const AnyResearchOutputColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
1941
1998
  maxLength: z.ZodDefault<z.ZodNumber>;
1942
1999
  minLength: z.ZodOptional<z.ZodNumber>;
1943
2000
  pattern: z.ZodOptional<z.ZodString>;
2001
+ defaultValue: z.ZodOptional<z.ZodString>;
1944
2002
  label: z.ZodOptional<z.ZodString>;
1945
2003
  help: z.ZodOptional<z.ZodString>;
1946
2004
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1965,6 +2023,7 @@ declare const AnyResearchOutputColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
1965
2023
  maxLength: z.ZodDefault<z.ZodNumber>;
1966
2024
  minLength: z.ZodOptional<z.ZodNumber>;
1967
2025
  pattern: z.ZodOptional<z.ZodString>;
2026
+ defaultValue: z.ZodOptional<z.ZodString>;
1968
2027
  label: z.ZodOptional<z.ZodString>;
1969
2028
  help: z.ZodOptional<z.ZodString>;
1970
2029
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1988,6 +2047,7 @@ declare const AnyResearchOutputColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
1988
2047
  label: z.ZodDefault<z.ZodString>;
1989
2048
  value: z.ZodDefault<z.ZodString>;
1990
2049
  description: z.ZodOptional<z.ZodString>;
2050
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1991
2051
  }, z.core.$strip>>;
1992
2052
  attributes: z.ZodObject<{
1993
2053
  multiple: z.ZodLiteral<false>;
@@ -2011,10 +2071,10 @@ declare const AnyResearchOutputColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
2011
2071
  content: z.ZodObject<{
2012
2072
  type: z.ZodLiteral<"checkBoxes">;
2013
2073
  options: z.ZodArray<z.ZodObject<{
2014
- checked: z.ZodDefault<z.ZodBoolean>;
2015
2074
  label: z.ZodDefault<z.ZodString>;
2016
2075
  value: z.ZodDefault<z.ZodString>;
2017
2076
  description: z.ZodOptional<z.ZodString>;
2077
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2018
2078
  }, z.core.$strip>>;
2019
2079
  showCommentField: z.ZodOptional<z.ZodBoolean>;
2020
2080
  attributes: z.ZodObject<{
@@ -2040,6 +2100,7 @@ declare const AnyResearchOutputColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
2040
2100
  label: z.ZodDefault<z.ZodString>;
2041
2101
  value: z.ZodDefault<z.ZodString>;
2042
2102
  description: z.ZodOptional<z.ZodString>;
2103
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2043
2104
  }, z.core.$strip>>;
2044
2105
  showCommentField: z.ZodOptional<z.ZodBoolean>;
2045
2106
  attributes: z.ZodObject<{
@@ -2216,7 +2277,7 @@ declare const AnyResearchOutputColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
2216
2277
  label: z.ZodDefault<z.ZodString>;
2217
2278
  labelTranslationKey: z.ZodOptional<z.ZodString>;
2218
2279
  }, z.core.$strip>>;
2219
- responseField: z.ZodLiteral<"licenses.items">;
2280
+ responseField: z.ZodLiteral<"licenses">;
2220
2281
  localQueryId: z.ZodOptional<z.ZodString>;
2221
2282
  }, z.core.$strip>;
2222
2283
  attributes: z.ZodObject<{
@@ -2271,6 +2332,7 @@ export declare const ResearchOutputTableQuestionSchema: z.ZodObject<{
2271
2332
  maxLength: z.ZodDefault<z.ZodNumber>;
2272
2333
  minLength: z.ZodOptional<z.ZodNumber>;
2273
2334
  pattern: z.ZodOptional<z.ZodString>;
2335
+ defaultValue: z.ZodOptional<z.ZodString>;
2274
2336
  label: z.ZodOptional<z.ZodString>;
2275
2337
  help: z.ZodOptional<z.ZodString>;
2276
2338
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -2295,6 +2357,7 @@ export declare const ResearchOutputTableQuestionSchema: z.ZodObject<{
2295
2357
  maxLength: z.ZodDefault<z.ZodNumber>;
2296
2358
  minLength: z.ZodOptional<z.ZodNumber>;
2297
2359
  pattern: z.ZodOptional<z.ZodString>;
2360
+ defaultValue: z.ZodOptional<z.ZodString>;
2298
2361
  label: z.ZodOptional<z.ZodString>;
2299
2362
  help: z.ZodOptional<z.ZodString>;
2300
2363
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -2318,6 +2381,7 @@ export declare const ResearchOutputTableQuestionSchema: z.ZodObject<{
2318
2381
  label: z.ZodDefault<z.ZodString>;
2319
2382
  value: z.ZodDefault<z.ZodString>;
2320
2383
  description: z.ZodOptional<z.ZodString>;
2384
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2321
2385
  }, z.core.$strip>>;
2322
2386
  attributes: z.ZodObject<{
2323
2387
  multiple: z.ZodLiteral<false>;
@@ -2341,10 +2405,10 @@ export declare const ResearchOutputTableQuestionSchema: z.ZodObject<{
2341
2405
  content: z.ZodObject<{
2342
2406
  type: z.ZodLiteral<"checkBoxes">;
2343
2407
  options: z.ZodArray<z.ZodObject<{
2344
- checked: z.ZodDefault<z.ZodBoolean>;
2345
2408
  label: z.ZodDefault<z.ZodString>;
2346
2409
  value: z.ZodDefault<z.ZodString>;
2347
2410
  description: z.ZodOptional<z.ZodString>;
2411
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2348
2412
  }, z.core.$strip>>;
2349
2413
  showCommentField: z.ZodOptional<z.ZodBoolean>;
2350
2414
  attributes: z.ZodObject<{
@@ -2370,6 +2434,7 @@ export declare const ResearchOutputTableQuestionSchema: z.ZodObject<{
2370
2434
  label: z.ZodDefault<z.ZodString>;
2371
2435
  value: z.ZodDefault<z.ZodString>;
2372
2436
  description: z.ZodOptional<z.ZodString>;
2437
+ selected: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2373
2438
  }, z.core.$strip>>;
2374
2439
  showCommentField: z.ZodOptional<z.ZodBoolean>;
2375
2440
  attributes: z.ZodObject<{
@@ -2546,7 +2611,7 @@ export declare const ResearchOutputTableQuestionSchema: z.ZodObject<{
2546
2611
  label: z.ZodDefault<z.ZodString>;
2547
2612
  labelTranslationKey: z.ZodOptional<z.ZodString>;
2548
2613
  }, z.core.$strip>>;
2549
- responseField: z.ZodLiteral<"licenses.items">;
2614
+ responseField: z.ZodLiteral<"licenses">;
2550
2615
  localQueryId: z.ZodOptional<z.ZodString>;
2551
2616
  }, z.core.$strip>;
2552
2617
  attributes: z.ZodObject<{
@@ -2616,6 +2681,7 @@ export declare const DefaultResearchOutputTableQuestion: {
2616
2681
  maxLength: number;
2617
2682
  minLength?: number | undefined;
2618
2683
  pattern?: string | undefined;
2684
+ defaultValue?: string | undefined;
2619
2685
  label?: string | undefined;
2620
2686
  help?: string | undefined;
2621
2687
  labelTranslationKey?: string | undefined;
@@ -2640,6 +2706,7 @@ export declare const DefaultResearchOutputTableQuestion: {
2640
2706
  maxLength: number;
2641
2707
  minLength?: number | undefined;
2642
2708
  pattern?: string | undefined;
2709
+ defaultValue?: string | undefined;
2643
2710
  label?: string | undefined;
2644
2711
  help?: string | undefined;
2645
2712
  labelTranslationKey?: string | undefined;
@@ -2663,6 +2730,7 @@ export declare const DefaultResearchOutputTableQuestion: {
2663
2730
  label: string;
2664
2731
  value: string;
2665
2732
  description?: string | undefined;
2733
+ selected?: boolean | undefined;
2666
2734
  }[];
2667
2735
  attributes: {
2668
2736
  multiple: false;
@@ -2686,10 +2754,10 @@ export declare const DefaultResearchOutputTableQuestion: {
2686
2754
  content: {
2687
2755
  type: "checkBoxes";
2688
2756
  options: {
2689
- checked: boolean;
2690
2757
  label: string;
2691
2758
  value: string;
2692
2759
  description?: string | undefined;
2760
+ selected?: boolean | undefined;
2693
2761
  }[];
2694
2762
  attributes: {
2695
2763
  label?: string | undefined;
@@ -2715,6 +2783,7 @@ export declare const DefaultResearchOutputTableQuestion: {
2715
2783
  label: string;
2716
2784
  value: string;
2717
2785
  description?: string | undefined;
2786
+ selected?: boolean | undefined;
2718
2787
  }[];
2719
2788
  attributes: {
2720
2789
  label?: string | undefined;
@@ -2890,7 +2959,7 @@ export declare const DefaultResearchOutputTableQuestion: {
2890
2959
  label: string;
2891
2960
  labelTranslationKey?: string | undefined;
2892
2961
  }[];
2893
- responseField: "licenses.items";
2962
+ responseField: "licenses";
2894
2963
  queryId?: string | undefined;
2895
2964
  localQueryId?: string | undefined;
2896
2965
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ResearchOutputTableQuestionJSONSchema = exports.TableQuestionJSONSchema = exports.AnyTableColumnQuestionJSONSchema = exports.DefaultResearchOutputTableQuestion = exports.ResearchOutputTableQuestionSchema = exports.DefaultResearchOutputCustomColumn = exports.ResearchOutputCustomColumnSchema = exports.DefaultTableQuestion = exports.TableQuestionSchema = exports.DefaultTableColumn = exports.TableColumnSchema = exports.AnyTableColumnQuestionSchema = void 0;
3
+ exports.ResearchOutputTableQuestionJSONSchema = exports.TableQuestionJSONSchema = exports.AnyTableColumnQuestionJSONSchema = exports.DefaultResearchOutputTableQuestion = exports.ResearchOutputTableQuestionSchema = exports.DefaultResearchOutputCustomColumn = exports.ResearchOutputCustomColumnSchema = exports.DefaultResearchOutputAccessLevelColumn = exports.DefaultTableQuestion = exports.TableQuestionSchema = exports.DefaultTableColumn = exports.TableColumnSchema = exports.AnyTableColumnQuestionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const numberQuestions_1 = require("./numberQuestions");
6
6
  const textQuestions_1 = require("./textQuestions");
@@ -143,7 +143,7 @@ const DefaultResearchOutputAccessLevelContent = optionBasedQuestions_1.RadioButt
143
143
  options: DefaultResearchOutputAccessLevelOptions
144
144
  });
145
145
  const ResearchOutputAccessLevelColumnSchema = zod_1.z.object(Object.assign(Object.assign({}, exports.TableColumnSchema.shape), { heading: zod_1.z.string().default('Access Level'), commonStandardId: zod_1.z.string().optional(), help: zod_1.z.string().default('Select the access level for this research output'), enabled: zod_1.z.boolean().default(false), content: optionBasedQuestions_1.RadioButtonsQuestionSchema }));
146
- const DefaultResearchOutputAccessLevelColumn = ResearchOutputAccessLevelColumnSchema.parse({
146
+ exports.DefaultResearchOutputAccessLevelColumn = ResearchOutputAccessLevelColumnSchema.parse({
147
147
  // This commonStandardId is tied to how we render the dataset in the RDA Common Standard.
148
148
  // Any change will also need to be made to `buildDataset` function of
149
149
  // `src/lambda/layer/dmp.ts` in the `dmptool-infrastructure` repo.`
@@ -260,7 +260,7 @@ exports.DefaultResearchOutputTableQuestion = exports.ResearchOutputTableQuestion
260
260
  DefaultResearchOutputDescriptionColumn,
261
261
  DefaultResearchOutputTypeColumn,
262
262
  DefaultResearchOutputDataFlagsColumn,
263
- DefaultResearchOutputAccessLevelColumn,
263
+ exports.DefaultResearchOutputAccessLevelColumn,
264
264
  DefaultResearchOutputReleaseDateColumn,
265
265
  DefaultResearchOutputByteSizeColumn,
266
266
  DefaultResearchOutputRepositoryColumn,