@opencrvs/toolkit 1.8.1-rc.e32d7b8 → 1.8.1-rc.e59d03c

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 (32) hide show
  1. package/dist/commons/api/router.d.ts +433 -796
  2. package/dist/commons/conditionals/validate.d.ts +11 -2
  3. package/dist/commons/events/ActionConfig.d.ts +2004 -366
  4. package/dist/commons/events/ActionDocument.d.ts +1302 -1389
  5. package/dist/commons/events/ActionInput.d.ts +658 -1136
  6. package/dist/commons/events/AdvancedSearchConfig.d.ts +83 -65
  7. package/dist/commons/events/CompositeFieldValue.d.ts +6 -6
  8. package/dist/commons/events/CountryConfigQueryInput.d.ts +88 -88
  9. package/dist/commons/events/Draft.d.ts +48 -92
  10. package/dist/commons/events/EventConfig.d.ts +695 -168
  11. package/dist/commons/events/EventDocument.d.ts +475 -846
  12. package/dist/commons/events/EventIndex.d.ts +184 -62
  13. package/dist/commons/events/EventMetadata.d.ts +9 -9
  14. package/dist/commons/events/FieldConfig.d.ts +254 -43
  15. package/dist/commons/events/FieldTypeMapping.d.ts +16 -16
  16. package/dist/commons/events/FieldValue.d.ts +12 -12
  17. package/dist/commons/events/FormConfig.d.ts +1032 -246
  18. package/dist/commons/events/PageConfig.d.ts +264 -46
  19. package/dist/commons/events/WorkqueueConfig.d.ts +288 -164
  20. package/dist/commons/events/defineConfig.d.ts +129 -30
  21. package/dist/commons/events/event.d.ts +68 -6
  22. package/dist/commons/events/field.d.ts +14 -0
  23. package/dist/commons/events/test.utils.d.ts +17 -13
  24. package/dist/commons/events/utils.d.ts +236 -64
  25. package/dist/conditionals/index.js +3 -2
  26. package/dist/events/index.js +265 -102
  27. package/package.json +1 -1
  28. package/tsconfig.json +1 -1
  29. package/dist/commons/conditionals/conditionals.test.d.ts +0 -2
  30. package/dist/commons/conditionals/validate-address.test.d.ts +0 -2
  31. package/dist/commons/conditionals/validate.test.d.ts +0 -2
  32. package/dist/commons/events/utils.test.d.ts +0 -2
@@ -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
- declare const TextField: z.ZodObject<z.objectUtil.extendShape<{
268
+ export 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,6 +2747,50 @@ 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>;
2750
2794
  declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2751
2795
  id: z.ZodString;
2752
2796
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
@@ -2797,16 +2841,62 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2797
2841
  }, {
2798
2842
  type: z.ZodLiteral<"NAME">;
2799
2843
  defaultValue: z.ZodOptional<z.ZodObject<{
2800
- firstname: z.ZodString;
2801
- surname: z.ZodString;
2844
+ firstname: z.ZodOptional<z.ZodString>;
2845
+ middlename: z.ZodOptional<z.ZodString>;
2846
+ surname: z.ZodOptional<z.ZodString>;
2802
2847
  }, "strip", z.ZodTypeAny, {
2803
- firstname: string;
2804
- surname: string;
2848
+ firstname?: string | undefined;
2849
+ surname?: string | undefined;
2850
+ middlename?: string | undefined;
2805
2851
  }, {
2806
- firstname: string;
2807
- surname: string;
2852
+ firstname?: string | undefined;
2853
+ surname?: string | undefined;
2854
+ middlename?: string | undefined;
2808
2855
  }>>;
2809
- configuration: z.ZodOptional<z.ZodObject<{
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
+ }>>>;
2810
2900
  maxLength: z.ZodOptional<z.ZodNumber>;
2811
2901
  prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
2812
2902
  id: string;
@@ -2818,15 +2908,35 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2818
2908
  description: string;
2819
2909
  defaultMessage: string;
2820
2910
  }>>;
2821
- includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2822
2911
  searchMode: z.ZodOptional<z.ZodBoolean>;
2823
2912
  }, "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;
2824
2924
  maxLength?: number | undefined;
2825
2925
  prefix?: TranslationConfig | undefined;
2826
2926
  postfix?: TranslationConfig | undefined;
2827
- includeMiddlename?: boolean | undefined;
2828
2927
  searchMode?: boolean | undefined;
2829
2928
  }, {
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;
2830
2940
  maxLength?: number | undefined;
2831
2941
  prefix?: {
2832
2942
  id: string;
@@ -2838,9 +2948,8 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2838
2948
  description: string;
2839
2949
  defaultMessage: string;
2840
2950
  } | undefined;
2841
- includeMiddlename?: boolean | undefined;
2842
2951
  searchMode?: boolean | undefined;
2843
- }>>;
2952
+ }>>>;
2844
2953
  }>, "strip", z.ZodTypeAny, {
2845
2954
  type: "NAME";
2846
2955
  id: string;
@@ -2869,14 +2978,25 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2869
2978
  hideLabel?: boolean | undefined;
2870
2979
  uncorrectable?: boolean | undefined;
2871
2980
  defaultValue?: {
2872
- firstname: string;
2873
- surname: string;
2981
+ firstname?: string | undefined;
2982
+ surname?: string | undefined;
2983
+ middlename?: string | undefined;
2874
2984
  } | undefined;
2875
2985
  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;
2876
2997
  maxLength?: number | undefined;
2877
2998
  prefix?: TranslationConfig | undefined;
2878
2999
  postfix?: TranslationConfig | undefined;
2879
- includeMiddlename?: boolean | undefined;
2880
3000
  searchMode?: boolean | undefined;
2881
3001
  } | undefined;
2882
3002
  }, {
@@ -2923,10 +3043,22 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2923
3043
  hideLabel?: boolean | undefined;
2924
3044
  uncorrectable?: boolean | undefined;
2925
3045
  defaultValue?: {
2926
- firstname: string;
2927
- surname: string;
3046
+ firstname?: string | undefined;
3047
+ surname?: string | undefined;
3048
+ middlename?: string | undefined;
2928
3049
  } | undefined;
2929
3050
  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;
2930
3062
  maxLength?: number | undefined;
2931
3063
  prefix?: {
2932
3064
  id: string;
@@ -2938,7 +3070,6 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2938
3070
  description: string;
2939
3071
  defaultMessage: string;
2940
3072
  } | undefined;
2941
- includeMiddlename?: boolean | undefined;
2942
3073
  searchMode?: boolean | undefined;
2943
3074
  } | undefined;
2944
3075
  }>;
@@ -4724,13 +4855,7 @@ declare const DataField: z.ZodObject<z.objectUtil.extendShape<{
4724
4855
  uncorrectable?: boolean | undefined;
4725
4856
  }>;
4726
4857
  export type DataField = z.infer<typeof DataField>;
4727
- /** @knipignore */
4728
- 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>;
4729
- /** @knipignore */
4730
- /**
4731
- * This is the type that should be used for the input of the FieldConfig. Useful when config uses zod defaults.
4732
- */
4733
- 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>;
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>;
4734
4859
  export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
4735
4860
  id: z.ZodString;
4736
4861
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
@@ -6962,16 +7087,62 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
6962
7087
  }, {
6963
7088
  type: z.ZodLiteral<"NAME">;
6964
7089
  defaultValue: z.ZodOptional<z.ZodObject<{
6965
- firstname: z.ZodString;
6966
- surname: z.ZodString;
7090
+ firstname: z.ZodOptional<z.ZodString>;
7091
+ middlename: z.ZodOptional<z.ZodString>;
7092
+ surname: z.ZodOptional<z.ZodString>;
6967
7093
  }, "strip", z.ZodTypeAny, {
6968
- firstname: string;
6969
- surname: string;
7094
+ firstname?: string | undefined;
7095
+ surname?: string | undefined;
7096
+ middlename?: string | undefined;
6970
7097
  }, {
6971
- firstname: string;
6972
- surname: string;
7098
+ firstname?: string | undefined;
7099
+ surname?: string | undefined;
7100
+ middlename?: string | undefined;
6973
7101
  }>>;
6974
- configuration: z.ZodOptional<z.ZodObject<{
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
+ }>>>;
6975
7146
  maxLength: z.ZodOptional<z.ZodNumber>;
6976
7147
  prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
6977
7148
  id: string;
@@ -6983,15 +7154,35 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
6983
7154
  description: string;
6984
7155
  defaultMessage: string;
6985
7156
  }>>;
6986
- includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
6987
7157
  searchMode: z.ZodOptional<z.ZodBoolean>;
6988
7158
  }, "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;
6989
7170
  maxLength?: number | undefined;
6990
7171
  prefix?: TranslationConfig | undefined;
6991
7172
  postfix?: TranslationConfig | undefined;
6992
- includeMiddlename?: boolean | undefined;
6993
7173
  searchMode?: boolean | undefined;
6994
7174
  }, {
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;
6995
7186
  maxLength?: number | undefined;
6996
7187
  prefix?: {
6997
7188
  id: string;
@@ -7003,9 +7194,8 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7003
7194
  description: string;
7004
7195
  defaultMessage: string;
7005
7196
  } | undefined;
7006
- includeMiddlename?: boolean | undefined;
7007
7197
  searchMode?: boolean | undefined;
7008
- }>>;
7198
+ }>>>;
7009
7199
  }>, "strip", z.ZodTypeAny, {
7010
7200
  type: "NAME";
7011
7201
  id: string;
@@ -7034,14 +7224,25 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7034
7224
  hideLabel?: boolean | undefined;
7035
7225
  uncorrectable?: boolean | undefined;
7036
7226
  defaultValue?: {
7037
- firstname: string;
7038
- surname: string;
7227
+ firstname?: string | undefined;
7228
+ surname?: string | undefined;
7229
+ middlename?: string | undefined;
7039
7230
  } | undefined;
7040
7231
  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;
7041
7243
  maxLength?: number | undefined;
7042
7244
  prefix?: TranslationConfig | undefined;
7043
7245
  postfix?: TranslationConfig | undefined;
7044
- includeMiddlename?: boolean | undefined;
7045
7246
  searchMode?: boolean | undefined;
7046
7247
  } | undefined;
7047
7248
  }, {
@@ -7088,10 +7289,22 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7088
7289
  hideLabel?: boolean | undefined;
7089
7290
  uncorrectable?: boolean | undefined;
7090
7291
  defaultValue?: {
7091
- firstname: string;
7092
- surname: string;
7292
+ firstname?: string | undefined;
7293
+ surname?: string | undefined;
7294
+ middlename?: string | undefined;
7093
7295
  } | undefined;
7094
7296
  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;
7095
7308
  maxLength?: number | undefined;
7096
7309
  prefix?: {
7097
7310
  id: string;
@@ -7103,7 +7316,6 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7103
7316
  description: string;
7104
7317
  defaultMessage: string;
7105
7318
  } | undefined;
7106
- includeMiddlename?: boolean | undefined;
7107
7319
  searchMode?: boolean | undefined;
7108
7320
  } | undefined;
7109
7321
  }>, z.ZodObject<z.objectUtil.extendShape<{
@@ -9148,7 +9360,6 @@ export type LocationField = z.infer<typeof Location>;
9148
9360
  export type RadioField = z.infer<typeof RadioGroup>;
9149
9361
  export type AddressField = z.infer<typeof Address>;
9150
9362
  export type NumberField = z.infer<typeof NumberField>;
9151
- export type FieldConfig = Inferred;
9152
9363
  export type FieldProps<T extends FieldType> = Extract<FieldConfig, {
9153
9364
  type: T;
9154
9365
  }>;
@@ -56,16 +56,16 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
56
56
  surname: string;
57
57
  middlename?: string | undefined;
58
58
  }> | z.ZodUndefined | z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
59
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ firstname: z.ZodString;
60
+ surname: z.ZodString;
61
61
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
62
  }, "strip", z.ZodTypeAny, {
63
- firstname?: string | null | undefined;
64
- surname?: string | null | undefined;
63
+ firstname: string;
64
+ surname: string;
65
65
  middlename?: string | null | undefined;
66
66
  }, {
67
- firstname?: string | null | undefined;
68
- surname?: string | null | undefined;
67
+ firstname: string;
68
+ surname: string;
69
69
  middlename?: string | null | undefined;
70
70
  }>, z.ZodNull]>, z.ZodUndefined]> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
71
  firstname: z.ZodString;
@@ -80,16 +80,16 @@ export declare function mapFieldTypeToZod(type: FieldType, required?: boolean):
80
80
  surname: string;
81
81
  middlename?: string | undefined;
82
82
  }>>> | z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
83
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
84
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ firstname: z.ZodString;
84
+ surname: z.ZodString;
85
85
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
86
86
  }, "strip", z.ZodTypeAny, {
87
- firstname?: string | null | undefined;
88
- surname?: string | null | undefined;
87
+ firstname: string;
88
+ surname: string;
89
89
  middlename?: string | null | undefined;
90
90
  }, {
91
- firstname?: string | null | undefined;
92
- surname?: string | null | undefined;
91
+ firstname: string;
92
+ surname: string;
93
93
  middlename?: string | null | undefined;
94
94
  }>, z.ZodNull]>, z.ZodUndefined]>>> | z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
95
95
  country: z.ZodString;
@@ -333,8 +333,8 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
333
333
  surname: string;
334
334
  middlename?: string | undefined;
335
335
  } | {
336
- firstname?: string | null | undefined;
337
- surname?: string | null | undefined;
336
+ firstname: string;
337
+ surname: string;
338
338
  middlename?: string | null | undefined;
339
339
  } | {
340
340
  country: string;
@@ -383,8 +383,8 @@ export declare function createValidationSchema(config: FieldConfig[]): z.ZodObje
383
383
  surname: string;
384
384
  middlename?: string | undefined;
385
385
  } | {
386
- firstname?: string | null | undefined;
387
- surname?: string | null | undefined;
386
+ firstname: string;
387
+ surname: string;
388
388
  middlename?: string | null | undefined;
389
389
  } | {
390
390
  country: string;
@@ -174,16 +174,16 @@ export declare const FieldValue: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodStri
174
174
  surname: string;
175
175
  middlename?: string | undefined;
176
176
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
177
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
178
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
177
+ firstname: z.ZodString;
178
+ surname: z.ZodString;
179
179
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
180
  }, "strip", z.ZodTypeAny, {
181
- firstname?: string | null | undefined;
182
- surname?: string | null | undefined;
181
+ firstname: string;
182
+ surname: string;
183
183
  middlename?: string | null | undefined;
184
184
  }, {
185
- firstname?: string | null | undefined;
186
- surname?: string | null | undefined;
185
+ firstname: string;
186
+ surname: string;
187
187
  middlename?: string | null | undefined;
188
188
  }>, z.ZodNull]>, z.ZodUndefined]>]>;
189
189
  export type FieldValue = z.infer<typeof FieldValue>;
@@ -310,16 +310,16 @@ export declare const FieldUpdateValue: z.ZodUnion<[z.ZodString, z.ZodString, z.Z
310
310
  addressLine3?: string | null | undefined;
311
311
  postcodeOrZip?: string | null | undefined;
312
312
  }>, z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
313
- firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
- surname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
313
+ firstname: z.ZodString;
314
+ surname: z.ZodString;
315
315
  middlename: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
316
  }, "strip", z.ZodTypeAny, {
317
- firstname?: string | null | undefined;
318
- surname?: string | null | undefined;
317
+ firstname: string;
318
+ surname: string;
319
319
  middlename?: string | null | undefined;
320
320
  }, {
321
- firstname?: string | null | undefined;
322
- surname?: string | null | undefined;
321
+ firstname: string;
322
+ surname: string;
323
323
  middlename?: string | null | undefined;
324
324
  }>, z.ZodNull]>, z.ZodUndefined]>]>;
325
325
  export type FieldUpdateValue = z.infer<typeof FieldUpdateValue>;