@dmptool/types 1.1.0 → 1.1.1

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.
@@ -9,7 +9,7 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<"type
9
9
  }>>;
10
10
  } & {
11
11
  type: z.ZodLiteral<"boolean">;
12
- attributes: z.ZodOptional<z.ZodObject<{
12
+ attributes: z.ZodObject<{
13
13
  label: z.ZodOptional<z.ZodString>;
14
14
  help: z.ZodOptional<z.ZodString>;
15
15
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -25,26 +25,26 @@ export declare const AnyTableColumnQuestionSchema: z.ZodDiscriminatedUnion<"type
25
25
  help?: string | undefined;
26
26
  labelTranslationKey?: string | undefined;
27
27
  checked?: boolean | undefined;
28
- }>>;
28
+ }>;
29
29
  }, "strip", z.ZodTypeAny, {
30
30
  type: "boolean";
31
- attributes?: {
31
+ attributes: {
32
32
  label?: string | undefined;
33
33
  help?: string | undefined;
34
34
  labelTranslationKey?: string | undefined;
35
35
  checked?: boolean | undefined;
36
- } | undefined;
36
+ };
37
37
  meta?: {
38
38
  schemaVersion: "1.0";
39
39
  } | undefined;
40
40
  }, {
41
41
  type: "boolean";
42
- attributes?: {
42
+ attributes: {
43
43
  label?: string | undefined;
44
44
  help?: string | undefined;
45
45
  labelTranslationKey?: string | undefined;
46
46
  checked?: boolean | undefined;
47
- } | undefined;
47
+ };
48
48
  meta?: {
49
49
  schemaVersion: "1.0";
50
50
  } | undefined;
@@ -1176,7 +1176,7 @@ export declare const TableColumn: z.ZodObject<{
1176
1176
  }>>;
1177
1177
  } & {
1178
1178
  type: z.ZodLiteral<"boolean">;
1179
- attributes: z.ZodOptional<z.ZodObject<{
1179
+ attributes: z.ZodObject<{
1180
1180
  label: z.ZodOptional<z.ZodString>;
1181
1181
  help: z.ZodOptional<z.ZodString>;
1182
1182
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -1192,26 +1192,26 @@ export declare const TableColumn: z.ZodObject<{
1192
1192
  help?: string | undefined;
1193
1193
  labelTranslationKey?: string | undefined;
1194
1194
  checked?: boolean | undefined;
1195
- }>>;
1195
+ }>;
1196
1196
  }, "strip", z.ZodTypeAny, {
1197
1197
  type: "boolean";
1198
- attributes?: {
1198
+ attributes: {
1199
1199
  label?: string | undefined;
1200
1200
  help?: string | undefined;
1201
1201
  labelTranslationKey?: string | undefined;
1202
1202
  checked?: boolean | undefined;
1203
- } | undefined;
1203
+ };
1204
1204
  meta?: {
1205
1205
  schemaVersion: "1.0";
1206
1206
  } | undefined;
1207
1207
  }, {
1208
1208
  type: "boolean";
1209
- attributes?: {
1209
+ attributes: {
1210
1210
  label?: string | undefined;
1211
1211
  help?: string | undefined;
1212
1212
  labelTranslationKey?: string | undefined;
1213
1213
  checked?: boolean | undefined;
1214
- } | undefined;
1214
+ };
1215
1215
  meta?: {
1216
1216
  schemaVersion: "1.0";
1217
1217
  } | undefined;
@@ -2333,17 +2333,6 @@ export declare const TableColumn: z.ZodObject<{
2333
2333
  }>]>;
2334
2334
  }, "strip", z.ZodTypeAny, {
2335
2335
  content: {
2336
- type: "boolean";
2337
- attributes?: {
2338
- label?: string | undefined;
2339
- help?: string | undefined;
2340
- labelTranslationKey?: string | undefined;
2341
- checked?: boolean | undefined;
2342
- } | undefined;
2343
- meta?: {
2344
- schemaVersion: "1.0";
2345
- } | undefined;
2346
- } | {
2347
2336
  type: "currency";
2348
2337
  attributes?: {
2349
2338
  label?: string | undefined;
@@ -2466,6 +2455,17 @@ export declare const TableColumn: z.ZodObject<{
2466
2455
  meta?: {
2467
2456
  schemaVersion: "1.0";
2468
2457
  } | undefined;
2458
+ } | {
2459
+ type: "boolean";
2460
+ attributes: {
2461
+ label?: string | undefined;
2462
+ help?: string | undefined;
2463
+ labelTranslationKey?: string | undefined;
2464
+ checked?: boolean | undefined;
2465
+ };
2466
+ meta?: {
2467
+ schemaVersion: "1.0";
2468
+ } | undefined;
2469
2469
  } | {
2470
2470
  options: {
2471
2471
  value: string;
@@ -2573,17 +2573,6 @@ export declare const TableColumn: z.ZodObject<{
2573
2573
  heading?: string | undefined;
2574
2574
  }, {
2575
2575
  content: {
2576
- type: "boolean";
2577
- attributes?: {
2578
- label?: string | undefined;
2579
- help?: string | undefined;
2580
- labelTranslationKey?: string | undefined;
2581
- checked?: boolean | undefined;
2582
- } | undefined;
2583
- meta?: {
2584
- schemaVersion: "1.0";
2585
- } | undefined;
2586
- } | {
2587
2576
  type: "currency";
2588
2577
  attributes?: {
2589
2578
  label?: string | undefined;
@@ -2706,6 +2695,17 @@ export declare const TableColumn: z.ZodObject<{
2706
2695
  meta?: {
2707
2696
  schemaVersion: "1.0";
2708
2697
  } | undefined;
2698
+ } | {
2699
+ type: "boolean";
2700
+ attributes: {
2701
+ label?: string | undefined;
2702
+ help?: string | undefined;
2703
+ labelTranslationKey?: string | undefined;
2704
+ checked?: boolean | undefined;
2705
+ };
2706
+ meta?: {
2707
+ schemaVersion: "1.0";
2708
+ } | undefined;
2709
2709
  } | {
2710
2710
  options: {
2711
2711
  value: string;
@@ -2834,7 +2834,7 @@ export declare const TableQuestionSchema: z.ZodObject<{
2834
2834
  }>>;
2835
2835
  } & {
2836
2836
  type: z.ZodLiteral<"boolean">;
2837
- attributes: z.ZodOptional<z.ZodObject<{
2837
+ attributes: z.ZodObject<{
2838
2838
  label: z.ZodOptional<z.ZodString>;
2839
2839
  help: z.ZodOptional<z.ZodString>;
2840
2840
  labelTranslationKey: z.ZodOptional<z.ZodString>;
@@ -2850,26 +2850,26 @@ export declare const TableQuestionSchema: z.ZodObject<{
2850
2850
  help?: string | undefined;
2851
2851
  labelTranslationKey?: string | undefined;
2852
2852
  checked?: boolean | undefined;
2853
- }>>;
2853
+ }>;
2854
2854
  }, "strip", z.ZodTypeAny, {
2855
2855
  type: "boolean";
2856
- attributes?: {
2856
+ attributes: {
2857
2857
  label?: string | undefined;
2858
2858
  help?: string | undefined;
2859
2859
  labelTranslationKey?: string | undefined;
2860
2860
  checked?: boolean | undefined;
2861
- } | undefined;
2861
+ };
2862
2862
  meta?: {
2863
2863
  schemaVersion: "1.0";
2864
2864
  } | undefined;
2865
2865
  }, {
2866
2866
  type: "boolean";
2867
- attributes?: {
2867
+ attributes: {
2868
2868
  label?: string | undefined;
2869
2869
  help?: string | undefined;
2870
2870
  labelTranslationKey?: string | undefined;
2871
2871
  checked?: boolean | undefined;
2872
- } | undefined;
2872
+ };
2873
2873
  meta?: {
2874
2874
  schemaVersion: "1.0";
2875
2875
  } | undefined;
@@ -3991,17 +3991,6 @@ export declare const TableQuestionSchema: z.ZodObject<{
3991
3991
  }>]>;
3992
3992
  }, "strip", z.ZodTypeAny, {
3993
3993
  content: {
3994
- type: "boolean";
3995
- attributes?: {
3996
- label?: string | undefined;
3997
- help?: string | undefined;
3998
- labelTranslationKey?: string | undefined;
3999
- checked?: boolean | undefined;
4000
- } | undefined;
4001
- meta?: {
4002
- schemaVersion: "1.0";
4003
- } | undefined;
4004
- } | {
4005
3994
  type: "currency";
4006
3995
  attributes?: {
4007
3996
  label?: string | undefined;
@@ -4124,6 +4113,17 @@ export declare const TableQuestionSchema: z.ZodObject<{
4124
4113
  meta?: {
4125
4114
  schemaVersion: "1.0";
4126
4115
  } | undefined;
4116
+ } | {
4117
+ type: "boolean";
4118
+ attributes: {
4119
+ label?: string | undefined;
4120
+ help?: string | undefined;
4121
+ labelTranslationKey?: string | undefined;
4122
+ checked?: boolean | undefined;
4123
+ };
4124
+ meta?: {
4125
+ schemaVersion: "1.0";
4126
+ } | undefined;
4127
4127
  } | {
4128
4128
  options: {
4129
4129
  value: string;
@@ -4231,17 +4231,6 @@ export declare const TableQuestionSchema: z.ZodObject<{
4231
4231
  heading?: string | undefined;
4232
4232
  }, {
4233
4233
  content: {
4234
- type: "boolean";
4235
- attributes?: {
4236
- label?: string | undefined;
4237
- help?: string | undefined;
4238
- labelTranslationKey?: string | undefined;
4239
- checked?: boolean | undefined;
4240
- } | undefined;
4241
- meta?: {
4242
- schemaVersion: "1.0";
4243
- } | undefined;
4244
- } | {
4245
4234
  type: "currency";
4246
4235
  attributes?: {
4247
4236
  label?: string | undefined;
@@ -4364,6 +4353,17 @@ export declare const TableQuestionSchema: z.ZodObject<{
4364
4353
  meta?: {
4365
4354
  schemaVersion: "1.0";
4366
4355
  } | undefined;
4356
+ } | {
4357
+ type: "boolean";
4358
+ attributes: {
4359
+ label?: string | undefined;
4360
+ help?: string | undefined;
4361
+ labelTranslationKey?: string | undefined;
4362
+ checked?: boolean | undefined;
4363
+ };
4364
+ meta?: {
4365
+ schemaVersion: "1.0";
4366
+ } | undefined;
4367
4367
  } | {
4368
4368
  options: {
4369
4369
  value: string;
@@ -4503,17 +4503,6 @@ export declare const TableQuestionSchema: z.ZodObject<{
4503
4503
  type: "table";
4504
4504
  columns: {
4505
4505
  content: {
4506
- type: "boolean";
4507
- attributes?: {
4508
- label?: string | undefined;
4509
- help?: string | undefined;
4510
- labelTranslationKey?: string | undefined;
4511
- checked?: boolean | undefined;
4512
- } | undefined;
4513
- meta?: {
4514
- schemaVersion: "1.0";
4515
- } | undefined;
4516
- } | {
4517
4506
  type: "currency";
4518
4507
  attributes?: {
4519
4508
  label?: string | undefined;
@@ -4636,6 +4625,17 @@ export declare const TableQuestionSchema: z.ZodObject<{
4636
4625
  meta?: {
4637
4626
  schemaVersion: "1.0";
4638
4627
  } | undefined;
4628
+ } | {
4629
+ type: "boolean";
4630
+ attributes: {
4631
+ label?: string | undefined;
4632
+ help?: string | undefined;
4633
+ labelTranslationKey?: string | undefined;
4634
+ checked?: boolean | undefined;
4635
+ };
4636
+ meta?: {
4637
+ schemaVersion: "1.0";
4638
+ } | undefined;
4639
4639
  } | {
4640
4640
  options: {
4641
4641
  value: string;
@@ -4759,17 +4759,6 @@ export declare const TableQuestionSchema: z.ZodObject<{
4759
4759
  type: "table";
4760
4760
  columns: {
4761
4761
  content: {
4762
- type: "boolean";
4763
- attributes?: {
4764
- label?: string | undefined;
4765
- help?: string | undefined;
4766
- labelTranslationKey?: string | undefined;
4767
- checked?: boolean | undefined;
4768
- } | undefined;
4769
- meta?: {
4770
- schemaVersion: "1.0";
4771
- } | undefined;
4772
- } | {
4773
4762
  type: "currency";
4774
4763
  attributes?: {
4775
4764
  label?: string | undefined;
@@ -4892,6 +4881,17 @@ export declare const TableQuestionSchema: z.ZodObject<{
4892
4881
  meta?: {
4893
4882
  schemaVersion: "1.0";
4894
4883
  } | undefined;
4884
+ } | {
4885
+ type: "boolean";
4886
+ attributes: {
4887
+ label?: string | undefined;
4888
+ help?: string | undefined;
4889
+ labelTranslationKey?: string | undefined;
4890
+ checked?: boolean | undefined;
4891
+ };
4892
+ meta?: {
4893
+ schemaVersion: "1.0";
4894
+ } | undefined;
4895
4895
  } | {
4896
4896
  options: {
4897
4897
  value: string;
@@ -11,7 +11,7 @@ const question_1 = require("./question");
11
11
  const BaseAttributes = question_1.QuestionSchema.shape.attributes;
12
12
  // Union types for all questions and answers (tables cannot be nested so no TableQuestion here!)
13
13
  exports.AnyTableColumnQuestionSchema = zod_1.z.discriminatedUnion('type', [
14
- numberQuestions_1.BooleanQuestionSchema,
14
+ optionBasedQuestions_1.BooleanQuestionSchema,
15
15
  optionBasedQuestions_1.CheckboxesQuestionSchema,
16
16
  numberQuestions_1.CurrencyQuestionSchema,
17
17
  dateQuestions_1.DateQuestionSchema,
@@ -43,7 +43,8 @@
43
43
  }
44
44
  },
45
45
  "required": [
46
- "type"
46
+ "type",
47
+ "attributes"
47
48
  ],
48
49
  "additionalProperties": false
49
50
  },
@@ -406,6 +407,38 @@
406
407
  ],
407
408
  "additionalProperties": false
408
409
  },
410
+ {
411
+ "type": "object",
412
+ "properties": {
413
+ "type": {
414
+ "type": "string",
415
+ "const": "numberRange"
416
+ },
417
+ "attributes": {
418
+ "$ref": "#/definitions/AnyQuestion/anyOf/1/properties/attributes"
419
+ },
420
+ "meta": {
421
+ "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
422
+ },
423
+ "columns": {
424
+ "type": "object",
425
+ "properties": {
426
+ "start": {
427
+ "$ref": "#/definitions/AnyQuestion/anyOf/7/properties/attributes"
428
+ },
429
+ "end": {
430
+ "$ref": "#/definitions/AnyQuestion/anyOf/7/properties/attributes"
431
+ }
432
+ },
433
+ "additionalProperties": false
434
+ }
435
+ },
436
+ "required": [
437
+ "type",
438
+ "columns"
439
+ ],
440
+ "additionalProperties": false
441
+ },
409
442
  {
410
443
  "type": "object",
411
444
  "properties": {
@@ -479,7 +512,7 @@
479
512
  "options": {
480
513
  "type": "array",
481
514
  "items": {
482
- "$ref": "#/definitions/AnyQuestion/anyOf/8/properties/options/items"
515
+ "$ref": "#/definitions/AnyQuestion/anyOf/9/properties/options/items"
483
516
  }
484
517
  }
485
518
  },
@@ -564,10 +597,10 @@
564
597
  "$ref": "#/definitions/AnyQuestion/anyOf/7"
565
598
  },
566
599
  {
567
- "$ref": "#/definitions/AnyQuestion/anyOf/8"
600
+ "$ref": "#/definitions/AnyQuestion/anyOf/9"
568
601
  },
569
602
  {
570
- "$ref": "#/definitions/AnyQuestion/anyOf/9"
603
+ "$ref": "#/definitions/AnyQuestion/anyOf/10"
571
604
  },
572
605
  {
573
606
  "type": "object",
@@ -696,7 +729,7 @@
696
729
  "const": "url"
697
730
  },
698
731
  "attributes": {
699
- "$ref": "#/definitions/AnyQuestion/anyOf/10/properties/columns/items/properties/content/anyOf/11/properties/attributes"
732
+ "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/11/properties/attributes"
700
733
  },
701
734
  "meta": {
702
735
  "$ref": "#/definitions/AnyQuestion/anyOf/0/properties/meta"
@@ -724,16 +757,16 @@
724
757
  "additionalProperties": false
725
758
  },
726
759
  {
727
- "$ref": "#/definitions/AnyQuestion/anyOf/10/properties/columns/items/properties/content/anyOf/10"
760
+ "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/10"
728
761
  },
729
762
  {
730
- "$ref": "#/definitions/AnyQuestion/anyOf/10/properties/columns/items/properties/content/anyOf/11"
763
+ "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/11"
731
764
  },
732
765
  {
733
- "$ref": "#/definitions/AnyQuestion/anyOf/10/properties/columns/items/properties/content/anyOf/12"
766
+ "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/12"
734
767
  },
735
768
  {
736
- "$ref": "#/definitions/AnyQuestion/anyOf/10/properties/columns/items/properties/content/anyOf/13"
769
+ "$ref": "#/definitions/AnyQuestion/anyOf/11/properties/columns/items/properties/content/anyOf/13"
737
770
  }
738
771
  ]
739
772
  }
@@ -43,7 +43,8 @@
43
43
  }
44
44
  },
45
45
  "required": [
46
- "type"
46
+ "type",
47
+ "attributes"
47
48
  ],
48
49
  "additionalProperties": false
49
50
  },
@@ -41,7 +41,8 @@
41
41
  }
42
42
  },
43
43
  "required": [
44
- "type"
44
+ "type",
45
+ "attributes"
45
46
  ],
46
47
  "additionalProperties": false
47
48
  }
@@ -91,7 +91,8 @@
91
91
  }
92
92
  },
93
93
  "required": [
94
- "type"
94
+ "type",
95
+ "attributes"
95
96
  ],
96
97
  "additionalProperties": false
97
98
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dmptool/types",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "TypeScript types for DMPTool",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",