@opencrvs/toolkit 1.8.1-rc.4f4b65a → 1.8.1-rc.5130256

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 (33) hide show
  1. package/dist/commons/api/router.d.ts +392 -409
  2. package/dist/commons/conditionals/conditionals.test.d.ts +2 -0
  3. package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
  4. package/dist/commons/conditionals/validate.d.ts +2 -11
  5. package/dist/commons/conditionals/validate.test.d.ts +2 -0
  6. package/dist/commons/events/ActionConfig.d.ts +5805 -3441
  7. package/dist/commons/events/ActionDocument.d.ts +716 -1252
  8. package/dist/commons/events/ActionInput.d.ts +600 -626
  9. package/dist/commons/events/AdvancedSearchConfig.d.ts +65 -83
  10. package/dist/commons/events/CompositeFieldValue.d.ts +6 -6
  11. package/dist/commons/events/CountryConfigQueryInput.d.ts +88 -88
  12. package/dist/commons/events/Draft.d.ts +48 -48
  13. package/dist/commons/events/EventConfig.d.ts +2663 -1401
  14. package/dist/commons/events/EventDocument.d.ts +432 -451
  15. package/dist/commons/events/EventIndex.d.ts +62 -184
  16. package/dist/commons/events/EventMetadata.d.ts +9 -9
  17. package/dist/commons/events/FieldConfig.d.ts +343 -254
  18. package/dist/commons/events/FieldType.d.ts +2 -1
  19. package/dist/commons/events/FieldTypeMapping.d.ts +25 -18
  20. package/dist/commons/events/FieldValue.d.ts +12 -12
  21. package/dist/commons/events/FormConfig.d.ts +2388 -1296
  22. package/dist/commons/events/PageConfig.d.ts +508 -264
  23. package/dist/commons/events/WorkqueueConfig.d.ts +164 -288
  24. package/dist/commons/events/defineConfig.d.ts +309 -129
  25. package/dist/commons/events/event.d.ts +6 -68
  26. package/dist/commons/events/field.d.ts +0 -14
  27. package/dist/commons/events/test.utils.d.ts +12 -12
  28. package/dist/commons/events/utils.d.ts +564 -244
  29. package/dist/commons/events/utils.test.d.ts +2 -0
  30. package/dist/conditionals/index.js +2 -3
  31. package/dist/events/index.js +115 -259
  32. package/package.json +1 -1
  33. package/tsconfig.json +1 -1
@@ -265,7 +265,7 @@ declare const Divider: z.ZodObject<z.objectUtil.extendShape<{
265
265
  uncorrectable?: boolean | undefined;
266
266
  }>;
267
267
  export type Divider = z.infer<typeof Divider>;
268
- export declare const TextField: z.ZodObject<z.objectUtil.extendShape<{
268
+ declare const TextField: z.ZodObject<z.objectUtil.extendShape<{
269
269
  id: z.ZodString;
270
270
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
271
271
  id: string;
@@ -2747,50 +2747,6 @@ export declare const SelectDateRangeField: z.ZodObject<z.objectUtil.extendShape<
2747
2747
  defaultValue?: "last7Days" | "last30Days" | "last90Days" | "last365Days" | undefined;
2748
2748
  }>;
2749
2749
  export type SelectDateRangeField = z.infer<typeof SelectDateRangeField>;
2750
- export declare const NameConfig: z.ZodObject<{
2751
- firstname: z.ZodOptional<z.ZodObject<{
2752
- required: z.ZodBoolean;
2753
- }, "strip", z.ZodTypeAny, {
2754
- required: boolean;
2755
- }, {
2756
- required: boolean;
2757
- }>>;
2758
- middlename: z.ZodOptional<z.ZodObject<{
2759
- required: z.ZodBoolean;
2760
- }, "strip", z.ZodTypeAny, {
2761
- required: boolean;
2762
- }, {
2763
- required: boolean;
2764
- }>>;
2765
- surname: z.ZodOptional<z.ZodObject<{
2766
- required: z.ZodBoolean;
2767
- }, "strip", z.ZodTypeAny, {
2768
- required: boolean;
2769
- }, {
2770
- required: boolean;
2771
- }>>;
2772
- }, "strip", z.ZodTypeAny, {
2773
- firstname?: {
2774
- required: boolean;
2775
- } | undefined;
2776
- surname?: {
2777
- required: boolean;
2778
- } | undefined;
2779
- middlename?: {
2780
- required: boolean;
2781
- } | undefined;
2782
- }, {
2783
- firstname?: {
2784
- required: boolean;
2785
- } | undefined;
2786
- surname?: {
2787
- required: boolean;
2788
- } | undefined;
2789
- middlename?: {
2790
- required: boolean;
2791
- } | undefined;
2792
- }>;
2793
- export type NameConfig = z.infer<typeof NameConfig>;
2794
2750
  declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2795
2751
  id: z.ZodString;
2796
2752
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
@@ -2841,62 +2797,16 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2841
2797
  }, {
2842
2798
  type: z.ZodLiteral<"NAME">;
2843
2799
  defaultValue: z.ZodOptional<z.ZodObject<{
2844
- firstname: z.ZodOptional<z.ZodString>;
2845
- middlename: z.ZodOptional<z.ZodString>;
2846
- surname: z.ZodOptional<z.ZodString>;
2800
+ firstname: z.ZodString;
2801
+ surname: z.ZodString;
2847
2802
  }, "strip", z.ZodTypeAny, {
2848
- firstname?: string | undefined;
2849
- surname?: string | undefined;
2850
- middlename?: string | undefined;
2803
+ firstname: string;
2804
+ surname: string;
2851
2805
  }, {
2852
- firstname?: string | undefined;
2853
- surname?: string | undefined;
2854
- middlename?: string | undefined;
2806
+ firstname: string;
2807
+ surname: string;
2855
2808
  }>>;
2856
- configuration: z.ZodOptional<z.ZodDefault<z.ZodObject<{
2857
- name: z.ZodOptional<z.ZodDefault<z.ZodObject<{
2858
- firstname: z.ZodOptional<z.ZodObject<{
2859
- required: z.ZodBoolean;
2860
- }, "strip", z.ZodTypeAny, {
2861
- required: boolean;
2862
- }, {
2863
- required: boolean;
2864
- }>>;
2865
- middlename: z.ZodOptional<z.ZodObject<{
2866
- required: z.ZodBoolean;
2867
- }, "strip", z.ZodTypeAny, {
2868
- required: boolean;
2869
- }, {
2870
- required: boolean;
2871
- }>>;
2872
- surname: z.ZodOptional<z.ZodObject<{
2873
- required: z.ZodBoolean;
2874
- }, "strip", z.ZodTypeAny, {
2875
- required: boolean;
2876
- }, {
2877
- required: boolean;
2878
- }>>;
2879
- }, "strip", z.ZodTypeAny, {
2880
- firstname?: {
2881
- required: boolean;
2882
- } | undefined;
2883
- surname?: {
2884
- required: boolean;
2885
- } | undefined;
2886
- middlename?: {
2887
- required: boolean;
2888
- } | undefined;
2889
- }, {
2890
- firstname?: {
2891
- required: boolean;
2892
- } | undefined;
2893
- surname?: {
2894
- required: boolean;
2895
- } | undefined;
2896
- middlename?: {
2897
- required: boolean;
2898
- } | undefined;
2899
- }>>>;
2809
+ configuration: z.ZodOptional<z.ZodObject<{
2900
2810
  maxLength: z.ZodOptional<z.ZodNumber>;
2901
2811
  prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
2902
2812
  id: string;
@@ -2908,35 +2818,15 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2908
2818
  description: string;
2909
2819
  defaultMessage: string;
2910
2820
  }>>;
2821
+ includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2911
2822
  searchMode: z.ZodOptional<z.ZodBoolean>;
2912
2823
  }, "strip", z.ZodTypeAny, {
2913
- name?: {
2914
- firstname?: {
2915
- required: boolean;
2916
- } | undefined;
2917
- surname?: {
2918
- required: boolean;
2919
- } | undefined;
2920
- middlename?: {
2921
- required: boolean;
2922
- } | undefined;
2923
- } | undefined;
2924
2824
  maxLength?: number | undefined;
2925
2825
  prefix?: TranslationConfig | undefined;
2926
2826
  postfix?: TranslationConfig | undefined;
2827
+ includeMiddlename?: boolean | undefined;
2927
2828
  searchMode?: boolean | undefined;
2928
2829
  }, {
2929
- name?: {
2930
- firstname?: {
2931
- required: boolean;
2932
- } | undefined;
2933
- surname?: {
2934
- required: boolean;
2935
- } | undefined;
2936
- middlename?: {
2937
- required: boolean;
2938
- } | undefined;
2939
- } | undefined;
2940
2830
  maxLength?: number | undefined;
2941
2831
  prefix?: {
2942
2832
  id: string;
@@ -2948,8 +2838,9 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2948
2838
  description: string;
2949
2839
  defaultMessage: string;
2950
2840
  } | undefined;
2841
+ includeMiddlename?: boolean | undefined;
2951
2842
  searchMode?: boolean | undefined;
2952
- }>>>;
2843
+ }>>;
2953
2844
  }>, "strip", z.ZodTypeAny, {
2954
2845
  type: "NAME";
2955
2846
  id: string;
@@ -2978,25 +2869,14 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2978
2869
  hideLabel?: boolean | undefined;
2979
2870
  uncorrectable?: boolean | undefined;
2980
2871
  defaultValue?: {
2981
- firstname?: string | undefined;
2982
- surname?: string | undefined;
2983
- middlename?: string | undefined;
2872
+ firstname: string;
2873
+ surname: string;
2984
2874
  } | undefined;
2985
2875
  configuration?: {
2986
- name?: {
2987
- firstname?: {
2988
- required: boolean;
2989
- } | undefined;
2990
- surname?: {
2991
- required: boolean;
2992
- } | undefined;
2993
- middlename?: {
2994
- required: boolean;
2995
- } | undefined;
2996
- } | undefined;
2997
2876
  maxLength?: number | undefined;
2998
2877
  prefix?: TranslationConfig | undefined;
2999
2878
  postfix?: TranslationConfig | undefined;
2879
+ includeMiddlename?: boolean | undefined;
3000
2880
  searchMode?: boolean | undefined;
3001
2881
  } | undefined;
3002
2882
  }, {
@@ -3043,22 +2923,10 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3043
2923
  hideLabel?: boolean | undefined;
3044
2924
  uncorrectable?: boolean | undefined;
3045
2925
  defaultValue?: {
3046
- firstname?: string | undefined;
3047
- surname?: string | undefined;
3048
- middlename?: string | undefined;
2926
+ firstname: string;
2927
+ surname: string;
3049
2928
  } | undefined;
3050
2929
  configuration?: {
3051
- name?: {
3052
- firstname?: {
3053
- required: boolean;
3054
- } | undefined;
3055
- surname?: {
3056
- required: boolean;
3057
- } | undefined;
3058
- middlename?: {
3059
- required: boolean;
3060
- } | undefined;
3061
- } | undefined;
3062
2930
  maxLength?: number | undefined;
3063
2931
  prefix?: {
3064
2932
  id: string;
@@ -3070,6 +2938,7 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3070
2938
  description: string;
3071
2939
  defaultMessage: string;
3072
2940
  } | undefined;
2941
+ includeMiddlename?: boolean | undefined;
3073
2942
  searchMode?: boolean | undefined;
3074
2943
  } | undefined;
3075
2944
  }>;
@@ -4855,7 +4724,164 @@ declare const DataField: z.ZodObject<z.objectUtil.extendShape<{
4855
4724
  uncorrectable?: boolean | undefined;
4856
4725
  }>;
4857
4726
  export type DataField = z.infer<typeof DataField>;
4858
- export type FieldConfig = z.infer<typeof Address> | z.infer<typeof TextField> | z.infer<typeof NumberField> | z.infer<typeof TextAreaField> | z.infer<typeof DateField> | z.infer<typeof TimeField> | z.infer<typeof DateRangeField> | z.infer<typeof SelectDateRangeField> | z.infer<typeof Paragraph> | z.infer<typeof RadioGroup> | z.infer<typeof BulletList> | z.infer<typeof PageHeader> | z.infer<typeof Select> | z.infer<typeof NameField> | z.infer<typeof PhoneField> | z.infer<typeof IdField> | z.infer<typeof Checkbox> | z.infer<typeof File> | z.infer<typeof FileUploadWithOptions> | z.infer<typeof Country> | z.infer<typeof AdministrativeArea> | z.infer<typeof Divider> | z.infer<typeof Location> | z.infer<typeof Facility> | z.infer<typeof Office> | z.infer<typeof SignatureField> | z.infer<typeof EmailField> | z.infer<typeof DataField>;
4727
+ declare const PrintButton: z.ZodObject<z.objectUtil.extendShape<{
4728
+ id: z.ZodString;
4729
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4730
+ id: string;
4731
+ description: string;
4732
+ defaultMessage: string;
4733
+ }>;
4734
+ parent: z.ZodOptional<z.ZodObject<{
4735
+ $$field: z.ZodString;
4736
+ }, "strip", z.ZodTypeAny, {
4737
+ $$field: string;
4738
+ }, {
4739
+ $$field: string;
4740
+ }>>;
4741
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4742
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
4743
+ secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4744
+ placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4745
+ id: string;
4746
+ description: string;
4747
+ defaultMessage: string;
4748
+ }>>;
4749
+ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
4750
+ validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
4751
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4752
+ id: string;
4753
+ description: string;
4754
+ defaultMessage: string;
4755
+ }>;
4756
+ }, "strip", z.ZodTypeAny, {
4757
+ message: TranslationConfig;
4758
+ validator: import(".").JSONSchema;
4759
+ }, {
4760
+ message: {
4761
+ id: string;
4762
+ description: string;
4763
+ defaultMessage: string;
4764
+ };
4765
+ validator: import(".").JSONSchema;
4766
+ }>, "many">>>;
4767
+ helperText: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4768
+ id: string;
4769
+ description: string;
4770
+ defaultMessage: string;
4771
+ }>>;
4772
+ hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4773
+ uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4774
+ }, {
4775
+ type: z.ZodLiteral<"PRINT_BUTTON">;
4776
+ configuration: z.ZodObject<{
4777
+ template: z.ZodString;
4778
+ buttonLabel: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4779
+ id: string;
4780
+ description: string;
4781
+ defaultMessage: string;
4782
+ }>>;
4783
+ }, "strip", z.ZodTypeAny, {
4784
+ template: string;
4785
+ buttonLabel?: TranslationConfig | undefined;
4786
+ }, {
4787
+ template: string;
4788
+ buttonLabel?: {
4789
+ id: string;
4790
+ description: string;
4791
+ defaultMessage: string;
4792
+ } | undefined;
4793
+ }>;
4794
+ }>, "strip", z.ZodTypeAny, {
4795
+ type: "PRINT_BUTTON";
4796
+ id: string;
4797
+ label: TranslationConfig;
4798
+ configuration: {
4799
+ template: string;
4800
+ buttonLabel?: TranslationConfig | undefined;
4801
+ };
4802
+ parent?: {
4803
+ $$field: string;
4804
+ } | undefined;
4805
+ validation?: {
4806
+ message: TranslationConfig;
4807
+ validator: import(".").JSONSchema;
4808
+ }[] | undefined;
4809
+ required?: boolean | undefined;
4810
+ conditionals?: ({
4811
+ type: "SHOW";
4812
+ conditional: import(".").JSONSchema;
4813
+ } | {
4814
+ type: "ENABLE";
4815
+ conditional: import(".").JSONSchema;
4816
+ } | {
4817
+ type: "DISPLAY_ON_REVIEW";
4818
+ conditional: import(".").JSONSchema;
4819
+ })[] | undefined;
4820
+ secured?: boolean | undefined;
4821
+ placeholder?: TranslationConfig | undefined;
4822
+ helperText?: TranslationConfig | undefined;
4823
+ hideLabel?: boolean | undefined;
4824
+ uncorrectable?: boolean | undefined;
4825
+ }, {
4826
+ type: "PRINT_BUTTON";
4827
+ id: string;
4828
+ label: {
4829
+ id: string;
4830
+ description: string;
4831
+ defaultMessage: string;
4832
+ };
4833
+ configuration: {
4834
+ template: string;
4835
+ buttonLabel?: {
4836
+ id: string;
4837
+ description: string;
4838
+ defaultMessage: string;
4839
+ } | undefined;
4840
+ };
4841
+ parent?: {
4842
+ $$field: string;
4843
+ } | undefined;
4844
+ validation?: {
4845
+ message: {
4846
+ id: string;
4847
+ description: string;
4848
+ defaultMessage: string;
4849
+ };
4850
+ validator: import(".").JSONSchema;
4851
+ }[] | undefined;
4852
+ required?: boolean | undefined;
4853
+ conditionals?: ({
4854
+ type: "SHOW";
4855
+ conditional: import(".").JSONSchema;
4856
+ } | {
4857
+ type: "ENABLE";
4858
+ conditional: import(".").JSONSchema;
4859
+ } | {
4860
+ type: "DISPLAY_ON_REVIEW";
4861
+ conditional: import(".").JSONSchema;
4862
+ })[] | undefined;
4863
+ secured?: boolean | undefined;
4864
+ placeholder?: {
4865
+ id: string;
4866
+ description: string;
4867
+ defaultMessage: string;
4868
+ } | undefined;
4869
+ helperText?: {
4870
+ id: string;
4871
+ description: string;
4872
+ defaultMessage: string;
4873
+ } | undefined;
4874
+ hideLabel?: boolean | undefined;
4875
+ uncorrectable?: boolean | undefined;
4876
+ }>;
4877
+ export type PrintButton = z.infer<typeof PrintButton>;
4878
+ /** @knipignore */
4879
+ export type Inferred = z.infer<typeof Address> | z.infer<typeof TextField> | z.infer<typeof NumberField> | z.infer<typeof TextAreaField> | z.infer<typeof DateField> | z.infer<typeof TimeField> | z.infer<typeof DateRangeField> | z.infer<typeof SelectDateRangeField> | z.infer<typeof Paragraph> | z.infer<typeof RadioGroup> | z.infer<typeof BulletList> | z.infer<typeof PageHeader> | z.infer<typeof Select> | z.infer<typeof NameField> | z.infer<typeof PhoneField> | z.infer<typeof IdField> | z.infer<typeof Checkbox> | z.infer<typeof File> | z.infer<typeof FileUploadWithOptions> | z.infer<typeof Country> | z.infer<typeof AdministrativeArea> | z.infer<typeof Divider> | z.infer<typeof Location> | z.infer<typeof Facility> | z.infer<typeof Office> | z.infer<typeof SignatureField> | z.infer<typeof EmailField> | z.infer<typeof DataField> | z.infer<typeof PrintButton>;
4880
+ /** @knipignore */
4881
+ /**
4882
+ * This is the type that should be used for the input of the FieldConfig. Useful when config uses zod defaults.
4883
+ */
4884
+ export type InferredInput = z.input<typeof Address> | z.input<typeof TextField> | z.input<typeof NumberField> | z.input<typeof TextAreaField> | z.input<typeof DateField> | z.input<typeof TimeField> | z.input<typeof DateRangeField> | z.input<typeof Paragraph> | z.input<typeof RadioGroup> | z.input<typeof BulletList> | z.input<typeof PageHeader> | z.input<typeof Select> | z.input<typeof NameField> | z.input<typeof PhoneField> | z.input<typeof IdField> | z.input<typeof Checkbox> | z.input<typeof File> | z.input<typeof FileUploadWithOptions> | z.input<typeof Country> | z.input<typeof AdministrativeArea> | z.input<typeof Divider> | z.input<typeof Location> | z.input<typeof Facility> | z.input<typeof Office> | z.input<typeof SignatureField> | z.input<typeof EmailField> | z.input<typeof DataField> | z.input<typeof PrintButton>;
4859
4885
  export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
4860
4886
  id: z.ZodString;
4861
4887
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
@@ -7087,62 +7113,16 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7087
7113
  }, {
7088
7114
  type: z.ZodLiteral<"NAME">;
7089
7115
  defaultValue: z.ZodOptional<z.ZodObject<{
7090
- firstname: z.ZodOptional<z.ZodString>;
7091
- middlename: z.ZodOptional<z.ZodString>;
7092
- surname: z.ZodOptional<z.ZodString>;
7116
+ firstname: z.ZodString;
7117
+ surname: z.ZodString;
7093
7118
  }, "strip", z.ZodTypeAny, {
7094
- firstname?: string | undefined;
7095
- surname?: string | undefined;
7096
- middlename?: string | undefined;
7119
+ firstname: string;
7120
+ surname: string;
7097
7121
  }, {
7098
- firstname?: string | undefined;
7099
- surname?: string | undefined;
7100
- middlename?: string | undefined;
7122
+ firstname: string;
7123
+ surname: string;
7101
7124
  }>>;
7102
- configuration: z.ZodOptional<z.ZodDefault<z.ZodObject<{
7103
- name: z.ZodOptional<z.ZodDefault<z.ZodObject<{
7104
- firstname: z.ZodOptional<z.ZodObject<{
7105
- required: z.ZodBoolean;
7106
- }, "strip", z.ZodTypeAny, {
7107
- required: boolean;
7108
- }, {
7109
- required: boolean;
7110
- }>>;
7111
- middlename: z.ZodOptional<z.ZodObject<{
7112
- required: z.ZodBoolean;
7113
- }, "strip", z.ZodTypeAny, {
7114
- required: boolean;
7115
- }, {
7116
- required: boolean;
7117
- }>>;
7118
- surname: z.ZodOptional<z.ZodObject<{
7119
- required: z.ZodBoolean;
7120
- }, "strip", z.ZodTypeAny, {
7121
- required: boolean;
7122
- }, {
7123
- required: boolean;
7124
- }>>;
7125
- }, "strip", z.ZodTypeAny, {
7126
- firstname?: {
7127
- required: boolean;
7128
- } | undefined;
7129
- surname?: {
7130
- required: boolean;
7131
- } | undefined;
7132
- middlename?: {
7133
- required: boolean;
7134
- } | undefined;
7135
- }, {
7136
- firstname?: {
7137
- required: boolean;
7138
- } | undefined;
7139
- surname?: {
7140
- required: boolean;
7141
- } | undefined;
7142
- middlename?: {
7143
- required: boolean;
7144
- } | undefined;
7145
- }>>>;
7125
+ configuration: z.ZodOptional<z.ZodObject<{
7146
7126
  maxLength: z.ZodOptional<z.ZodNumber>;
7147
7127
  prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7148
7128
  id: string;
@@ -7154,35 +7134,15 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7154
7134
  description: string;
7155
7135
  defaultMessage: string;
7156
7136
  }>>;
7137
+ includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7157
7138
  searchMode: z.ZodOptional<z.ZodBoolean>;
7158
7139
  }, "strip", z.ZodTypeAny, {
7159
- name?: {
7160
- firstname?: {
7161
- required: boolean;
7162
- } | undefined;
7163
- surname?: {
7164
- required: boolean;
7165
- } | undefined;
7166
- middlename?: {
7167
- required: boolean;
7168
- } | undefined;
7169
- } | undefined;
7170
7140
  maxLength?: number | undefined;
7171
7141
  prefix?: TranslationConfig | undefined;
7172
7142
  postfix?: TranslationConfig | undefined;
7143
+ includeMiddlename?: boolean | undefined;
7173
7144
  searchMode?: boolean | undefined;
7174
7145
  }, {
7175
- name?: {
7176
- firstname?: {
7177
- required: boolean;
7178
- } | undefined;
7179
- surname?: {
7180
- required: boolean;
7181
- } | undefined;
7182
- middlename?: {
7183
- required: boolean;
7184
- } | undefined;
7185
- } | undefined;
7186
7146
  maxLength?: number | undefined;
7187
7147
  prefix?: {
7188
7148
  id: string;
@@ -7194,8 +7154,9 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7194
7154
  description: string;
7195
7155
  defaultMessage: string;
7196
7156
  } | undefined;
7157
+ includeMiddlename?: boolean | undefined;
7197
7158
  searchMode?: boolean | undefined;
7198
- }>>>;
7159
+ }>>;
7199
7160
  }>, "strip", z.ZodTypeAny, {
7200
7161
  type: "NAME";
7201
7162
  id: string;
@@ -7224,25 +7185,14 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7224
7185
  hideLabel?: boolean | undefined;
7225
7186
  uncorrectable?: boolean | undefined;
7226
7187
  defaultValue?: {
7227
- firstname?: string | undefined;
7228
- surname?: string | undefined;
7229
- middlename?: string | undefined;
7188
+ firstname: string;
7189
+ surname: string;
7230
7190
  } | undefined;
7231
7191
  configuration?: {
7232
- name?: {
7233
- firstname?: {
7234
- required: boolean;
7235
- } | undefined;
7236
- surname?: {
7237
- required: boolean;
7238
- } | undefined;
7239
- middlename?: {
7240
- required: boolean;
7241
- } | undefined;
7242
- } | undefined;
7243
7192
  maxLength?: number | undefined;
7244
7193
  prefix?: TranslationConfig | undefined;
7245
7194
  postfix?: TranslationConfig | undefined;
7195
+ includeMiddlename?: boolean | undefined;
7246
7196
  searchMode?: boolean | undefined;
7247
7197
  } | undefined;
7248
7198
  }, {
@@ -7289,22 +7239,10 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7289
7239
  hideLabel?: boolean | undefined;
7290
7240
  uncorrectable?: boolean | undefined;
7291
7241
  defaultValue?: {
7292
- firstname?: string | undefined;
7293
- surname?: string | undefined;
7294
- middlename?: string | undefined;
7242
+ firstname: string;
7243
+ surname: string;
7295
7244
  } | undefined;
7296
7245
  configuration?: {
7297
- name?: {
7298
- firstname?: {
7299
- required: boolean;
7300
- } | undefined;
7301
- surname?: {
7302
- required: boolean;
7303
- } | undefined;
7304
- middlename?: {
7305
- required: boolean;
7306
- } | undefined;
7307
- } | undefined;
7308
7246
  maxLength?: number | undefined;
7309
7247
  prefix?: {
7310
7248
  id: string;
@@ -7316,6 +7254,7 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7316
7254
  description: string;
7317
7255
  defaultMessage: string;
7318
7256
  } | undefined;
7257
+ includeMiddlename?: boolean | undefined;
7319
7258
  searchMode?: boolean | undefined;
7320
7259
  } | undefined;
7321
7260
  }>, z.ZodObject<z.objectUtil.extendShape<{
@@ -9351,6 +9290,155 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
9351
9290
  } | undefined;
9352
9291
  hideLabel?: boolean | undefined;
9353
9292
  uncorrectable?: boolean | undefined;
9293
+ }>, z.ZodObject<z.objectUtil.extendShape<{
9294
+ id: z.ZodString;
9295
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9296
+ id: string;
9297
+ description: string;
9298
+ defaultMessage: string;
9299
+ }>;
9300
+ parent: z.ZodOptional<z.ZodObject<{
9301
+ $$field: z.ZodString;
9302
+ }, "strip", z.ZodTypeAny, {
9303
+ $$field: string;
9304
+ }, {
9305
+ $$field: string;
9306
+ }>>;
9307
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9308
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
9309
+ secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9310
+ placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9311
+ id: string;
9312
+ description: string;
9313
+ defaultMessage: string;
9314
+ }>>;
9315
+ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
9316
+ validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
9317
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9318
+ id: string;
9319
+ description: string;
9320
+ defaultMessage: string;
9321
+ }>;
9322
+ }, "strip", z.ZodTypeAny, {
9323
+ message: TranslationConfig;
9324
+ validator: import(".").JSONSchema;
9325
+ }, {
9326
+ message: {
9327
+ id: string;
9328
+ description: string;
9329
+ defaultMessage: string;
9330
+ };
9331
+ validator: import(".").JSONSchema;
9332
+ }>, "many">>>;
9333
+ helperText: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9334
+ id: string;
9335
+ description: string;
9336
+ defaultMessage: string;
9337
+ }>>;
9338
+ hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9339
+ uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9340
+ }, {
9341
+ type: z.ZodLiteral<"PRINT_BUTTON">;
9342
+ configuration: z.ZodObject<{
9343
+ template: z.ZodString;
9344
+ buttonLabel: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9345
+ id: string;
9346
+ description: string;
9347
+ defaultMessage: string;
9348
+ }>>;
9349
+ }, "strip", z.ZodTypeAny, {
9350
+ template: string;
9351
+ buttonLabel?: TranslationConfig | undefined;
9352
+ }, {
9353
+ template: string;
9354
+ buttonLabel?: {
9355
+ id: string;
9356
+ description: string;
9357
+ defaultMessage: string;
9358
+ } | undefined;
9359
+ }>;
9360
+ }>, "strip", z.ZodTypeAny, {
9361
+ type: "PRINT_BUTTON";
9362
+ id: string;
9363
+ label: TranslationConfig;
9364
+ configuration: {
9365
+ template: string;
9366
+ buttonLabel?: TranslationConfig | undefined;
9367
+ };
9368
+ parent?: {
9369
+ $$field: string;
9370
+ } | undefined;
9371
+ validation?: {
9372
+ message: TranslationConfig;
9373
+ validator: import(".").JSONSchema;
9374
+ }[] | undefined;
9375
+ required?: boolean | undefined;
9376
+ conditionals?: ({
9377
+ type: "SHOW";
9378
+ conditional: import(".").JSONSchema;
9379
+ } | {
9380
+ type: "ENABLE";
9381
+ conditional: import(".").JSONSchema;
9382
+ } | {
9383
+ type: "DISPLAY_ON_REVIEW";
9384
+ conditional: import(".").JSONSchema;
9385
+ })[] | undefined;
9386
+ secured?: boolean | undefined;
9387
+ placeholder?: TranslationConfig | undefined;
9388
+ helperText?: TranslationConfig | undefined;
9389
+ hideLabel?: boolean | undefined;
9390
+ uncorrectable?: boolean | undefined;
9391
+ }, {
9392
+ type: "PRINT_BUTTON";
9393
+ id: string;
9394
+ label: {
9395
+ id: string;
9396
+ description: string;
9397
+ defaultMessage: string;
9398
+ };
9399
+ configuration: {
9400
+ template: string;
9401
+ buttonLabel?: {
9402
+ id: string;
9403
+ description: string;
9404
+ defaultMessage: string;
9405
+ } | undefined;
9406
+ };
9407
+ parent?: {
9408
+ $$field: string;
9409
+ } | undefined;
9410
+ validation?: {
9411
+ message: {
9412
+ id: string;
9413
+ description: string;
9414
+ defaultMessage: string;
9415
+ };
9416
+ validator: import(".").JSONSchema;
9417
+ }[] | undefined;
9418
+ required?: boolean | undefined;
9419
+ conditionals?: ({
9420
+ type: "SHOW";
9421
+ conditional: import(".").JSONSchema;
9422
+ } | {
9423
+ type: "ENABLE";
9424
+ conditional: import(".").JSONSchema;
9425
+ } | {
9426
+ type: "DISPLAY_ON_REVIEW";
9427
+ conditional: import(".").JSONSchema;
9428
+ })[] | undefined;
9429
+ secured?: boolean | undefined;
9430
+ placeholder?: {
9431
+ id: string;
9432
+ description: string;
9433
+ defaultMessage: string;
9434
+ } | undefined;
9435
+ helperText?: {
9436
+ id: string;
9437
+ description: string;
9438
+ defaultMessage: string;
9439
+ } | undefined;
9440
+ hideLabel?: boolean | undefined;
9441
+ uncorrectable?: boolean | undefined;
9354
9442
  }>]>;
9355
9443
  export type SelectField = z.infer<typeof Select>;
9356
9444
  export type NameField = z.infer<typeof NameField>;
@@ -9360,6 +9448,7 @@ export type LocationField = z.infer<typeof Location>;
9360
9448
  export type RadioField = z.infer<typeof RadioGroup>;
9361
9449
  export type AddressField = z.infer<typeof Address>;
9362
9450
  export type NumberField = z.infer<typeof NumberField>;
9451
+ export type FieldConfig = Inferred;
9363
9452
  export type FieldProps<T extends FieldType> = Extract<FieldConfig, {
9364
9453
  type: T;
9365
9454
  }>;