@opencrvs/toolkit 1.8.1-rc.e32d7b8 → 1.8.1-rc.ebf61ab
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commons/api/router.d.ts +433 -796
- package/dist/commons/conditionals/validate.d.ts +11 -2
- package/dist/commons/events/ActionConfig.d.ts +3924 -642
- package/dist/commons/events/ActionDocument.d.ts +1302 -1389
- package/dist/commons/events/ActionInput.d.ts +658 -1136
- package/dist/commons/events/AdvancedSearchConfig.d.ts +83 -65
- package/dist/commons/events/CompositeFieldValue.d.ts +6 -6
- package/dist/commons/events/CountryConfigQueryInput.d.ts +88 -88
- package/dist/commons/events/Draft.d.ts +48 -92
- package/dist/commons/events/EventConfig.d.ts +1281 -262
- package/dist/commons/events/EventDocument.d.ts +475 -846
- package/dist/commons/events/EventIndex.d.ts +184 -62
- package/dist/commons/events/EventMetadata.d.ts +9 -9
- package/dist/commons/events/FieldConfig.d.ts +517 -71
- package/dist/commons/events/FieldTypeMapping.d.ts +16 -16
- package/dist/commons/events/FieldValue.d.ts +12 -12
- package/dist/commons/events/FormConfig.d.ts +1956 -378
- package/dist/commons/events/PageConfig.d.ts +524 -82
- package/dist/commons/events/WorkqueueConfig.d.ts +288 -164
- package/dist/commons/events/defineConfig.d.ts +183 -48
- package/dist/commons/events/event.d.ts +68 -6
- package/dist/commons/events/field.d.ts +14 -0
- package/dist/commons/events/test.utils.d.ts +17 -13
- package/dist/commons/events/utils.d.ts +332 -96
- package/dist/conditionals/index.js +3 -2
- package/dist/events/index.js +293 -108
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/commons/conditionals/conditionals.test.d.ts +0 -2
- package/dist/commons/conditionals/validate-address.test.d.ts +0 -2
- package/dist/commons/conditionals/validate.test.d.ts +0 -2
- 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,101 @@ 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
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2754
|
+
id: string;
|
2755
|
+
description: string;
|
2756
|
+
defaultMessage: string;
|
2757
|
+
}>>;
|
2758
|
+
}, "strip", z.ZodTypeAny, {
|
2759
|
+
required: boolean;
|
2760
|
+
label?: TranslationConfig | undefined;
|
2761
|
+
}, {
|
2762
|
+
required: boolean;
|
2763
|
+
label?: {
|
2764
|
+
id: string;
|
2765
|
+
description: string;
|
2766
|
+
defaultMessage: string;
|
2767
|
+
} | undefined;
|
2768
|
+
}>>;
|
2769
|
+
middlename: z.ZodOptional<z.ZodObject<{
|
2770
|
+
required: z.ZodBoolean;
|
2771
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2772
|
+
id: string;
|
2773
|
+
description: string;
|
2774
|
+
defaultMessage: string;
|
2775
|
+
}>>;
|
2776
|
+
}, "strip", z.ZodTypeAny, {
|
2777
|
+
required: boolean;
|
2778
|
+
label?: TranslationConfig | undefined;
|
2779
|
+
}, {
|
2780
|
+
required: boolean;
|
2781
|
+
label?: {
|
2782
|
+
id: string;
|
2783
|
+
description: string;
|
2784
|
+
defaultMessage: string;
|
2785
|
+
} | undefined;
|
2786
|
+
}>>;
|
2787
|
+
surname: z.ZodOptional<z.ZodObject<{
|
2788
|
+
required: z.ZodBoolean;
|
2789
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2790
|
+
id: string;
|
2791
|
+
description: string;
|
2792
|
+
defaultMessage: string;
|
2793
|
+
}>>;
|
2794
|
+
}, "strip", z.ZodTypeAny, {
|
2795
|
+
required: boolean;
|
2796
|
+
label?: TranslationConfig | undefined;
|
2797
|
+
}, {
|
2798
|
+
required: boolean;
|
2799
|
+
label?: {
|
2800
|
+
id: string;
|
2801
|
+
description: string;
|
2802
|
+
defaultMessage: string;
|
2803
|
+
} | undefined;
|
2804
|
+
}>>;
|
2805
|
+
}, "strip", z.ZodTypeAny, {
|
2806
|
+
firstname?: {
|
2807
|
+
required: boolean;
|
2808
|
+
label?: TranslationConfig | undefined;
|
2809
|
+
} | undefined;
|
2810
|
+
surname?: {
|
2811
|
+
required: boolean;
|
2812
|
+
label?: TranslationConfig | undefined;
|
2813
|
+
} | undefined;
|
2814
|
+
middlename?: {
|
2815
|
+
required: boolean;
|
2816
|
+
label?: TranslationConfig | undefined;
|
2817
|
+
} | undefined;
|
2818
|
+
}, {
|
2819
|
+
firstname?: {
|
2820
|
+
required: boolean;
|
2821
|
+
label?: {
|
2822
|
+
id: string;
|
2823
|
+
description: string;
|
2824
|
+
defaultMessage: string;
|
2825
|
+
} | undefined;
|
2826
|
+
} | undefined;
|
2827
|
+
surname?: {
|
2828
|
+
required: boolean;
|
2829
|
+
label?: {
|
2830
|
+
id: string;
|
2831
|
+
description: string;
|
2832
|
+
defaultMessage: string;
|
2833
|
+
} | undefined;
|
2834
|
+
} | undefined;
|
2835
|
+
middlename?: {
|
2836
|
+
required: boolean;
|
2837
|
+
label?: {
|
2838
|
+
id: string;
|
2839
|
+
description: string;
|
2840
|
+
defaultMessage: string;
|
2841
|
+
} | undefined;
|
2842
|
+
} | undefined;
|
2843
|
+
}>;
|
2844
|
+
export type NameConfig = z.infer<typeof NameConfig>;
|
2750
2845
|
declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
2751
2846
|
id: z.ZodString;
|
2752
2847
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
@@ -2797,16 +2892,114 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
|
2797
2892
|
}, {
|
2798
2893
|
type: z.ZodLiteral<"NAME">;
|
2799
2894
|
defaultValue: z.ZodOptional<z.ZodObject<{
|
2800
|
-
firstname: z.ZodString
|
2801
|
-
|
2895
|
+
firstname: z.ZodOptional<z.ZodString>;
|
2896
|
+
middlename: z.ZodOptional<z.ZodString>;
|
2897
|
+
surname: z.ZodOptional<z.ZodString>;
|
2802
2898
|
}, "strip", z.ZodTypeAny, {
|
2803
|
-
firstname
|
2804
|
-
surname
|
2899
|
+
firstname?: string | undefined;
|
2900
|
+
surname?: string | undefined;
|
2901
|
+
middlename?: string | undefined;
|
2805
2902
|
}, {
|
2806
|
-
firstname
|
2807
|
-
surname
|
2903
|
+
firstname?: string | undefined;
|
2904
|
+
surname?: string | undefined;
|
2905
|
+
middlename?: string | undefined;
|
2808
2906
|
}>>;
|
2809
|
-
configuration: z.ZodOptional<z.ZodObject<{
|
2907
|
+
configuration: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
2908
|
+
name: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
2909
|
+
firstname: z.ZodOptional<z.ZodObject<{
|
2910
|
+
required: z.ZodBoolean;
|
2911
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2912
|
+
id: string;
|
2913
|
+
description: string;
|
2914
|
+
defaultMessage: string;
|
2915
|
+
}>>;
|
2916
|
+
}, "strip", z.ZodTypeAny, {
|
2917
|
+
required: boolean;
|
2918
|
+
label?: TranslationConfig | undefined;
|
2919
|
+
}, {
|
2920
|
+
required: boolean;
|
2921
|
+
label?: {
|
2922
|
+
id: string;
|
2923
|
+
description: string;
|
2924
|
+
defaultMessage: string;
|
2925
|
+
} | undefined;
|
2926
|
+
}>>;
|
2927
|
+
middlename: z.ZodOptional<z.ZodObject<{
|
2928
|
+
required: z.ZodBoolean;
|
2929
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2930
|
+
id: string;
|
2931
|
+
description: string;
|
2932
|
+
defaultMessage: string;
|
2933
|
+
}>>;
|
2934
|
+
}, "strip", z.ZodTypeAny, {
|
2935
|
+
required: boolean;
|
2936
|
+
label?: TranslationConfig | undefined;
|
2937
|
+
}, {
|
2938
|
+
required: boolean;
|
2939
|
+
label?: {
|
2940
|
+
id: string;
|
2941
|
+
description: string;
|
2942
|
+
defaultMessage: string;
|
2943
|
+
} | undefined;
|
2944
|
+
}>>;
|
2945
|
+
surname: z.ZodOptional<z.ZodObject<{
|
2946
|
+
required: z.ZodBoolean;
|
2947
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2948
|
+
id: string;
|
2949
|
+
description: string;
|
2950
|
+
defaultMessage: string;
|
2951
|
+
}>>;
|
2952
|
+
}, "strip", z.ZodTypeAny, {
|
2953
|
+
required: boolean;
|
2954
|
+
label?: TranslationConfig | undefined;
|
2955
|
+
}, {
|
2956
|
+
required: boolean;
|
2957
|
+
label?: {
|
2958
|
+
id: string;
|
2959
|
+
description: string;
|
2960
|
+
defaultMessage: string;
|
2961
|
+
} | undefined;
|
2962
|
+
}>>;
|
2963
|
+
}, "strip", z.ZodTypeAny, {
|
2964
|
+
firstname?: {
|
2965
|
+
required: boolean;
|
2966
|
+
label?: TranslationConfig | undefined;
|
2967
|
+
} | undefined;
|
2968
|
+
surname?: {
|
2969
|
+
required: boolean;
|
2970
|
+
label?: TranslationConfig | undefined;
|
2971
|
+
} | undefined;
|
2972
|
+
middlename?: {
|
2973
|
+
required: boolean;
|
2974
|
+
label?: TranslationConfig | undefined;
|
2975
|
+
} | undefined;
|
2976
|
+
}, {
|
2977
|
+
firstname?: {
|
2978
|
+
required: boolean;
|
2979
|
+
label?: {
|
2980
|
+
id: string;
|
2981
|
+
description: string;
|
2982
|
+
defaultMessage: string;
|
2983
|
+
} | undefined;
|
2984
|
+
} | undefined;
|
2985
|
+
surname?: {
|
2986
|
+
required: boolean;
|
2987
|
+
label?: {
|
2988
|
+
id: string;
|
2989
|
+
description: string;
|
2990
|
+
defaultMessage: string;
|
2991
|
+
} | undefined;
|
2992
|
+
} | undefined;
|
2993
|
+
middlename?: {
|
2994
|
+
required: boolean;
|
2995
|
+
label?: {
|
2996
|
+
id: string;
|
2997
|
+
description: string;
|
2998
|
+
defaultMessage: string;
|
2999
|
+
} | undefined;
|
3000
|
+
} | undefined;
|
3001
|
+
}>>>;
|
3002
|
+
order: z.ZodOptional<z.ZodArray<z.ZodEnum<["firstname", "middlename", "surname"]>, "many">>;
|
2810
3003
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
2811
3004
|
prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
2812
3005
|
id: string;
|
@@ -2818,15 +3011,53 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
|
2818
3011
|
description: string;
|
2819
3012
|
defaultMessage: string;
|
2820
3013
|
}>>;
|
2821
|
-
includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
2822
|
-
searchMode: z.ZodOptional<z.ZodBoolean>;
|
2823
3014
|
}, "strip", z.ZodTypeAny, {
|
3015
|
+
name?: {
|
3016
|
+
firstname?: {
|
3017
|
+
required: boolean;
|
3018
|
+
label?: TranslationConfig | undefined;
|
3019
|
+
} | undefined;
|
3020
|
+
surname?: {
|
3021
|
+
required: boolean;
|
3022
|
+
label?: TranslationConfig | undefined;
|
3023
|
+
} | undefined;
|
3024
|
+
middlename?: {
|
3025
|
+
required: boolean;
|
3026
|
+
label?: TranslationConfig | undefined;
|
3027
|
+
} | undefined;
|
3028
|
+
} | undefined;
|
3029
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
2824
3030
|
maxLength?: number | undefined;
|
2825
3031
|
prefix?: TranslationConfig | undefined;
|
2826
3032
|
postfix?: TranslationConfig | undefined;
|
2827
|
-
includeMiddlename?: boolean | undefined;
|
2828
|
-
searchMode?: boolean | undefined;
|
2829
3033
|
}, {
|
3034
|
+
name?: {
|
3035
|
+
firstname?: {
|
3036
|
+
required: boolean;
|
3037
|
+
label?: {
|
3038
|
+
id: string;
|
3039
|
+
description: string;
|
3040
|
+
defaultMessage: string;
|
3041
|
+
} | undefined;
|
3042
|
+
} | undefined;
|
3043
|
+
surname?: {
|
3044
|
+
required: boolean;
|
3045
|
+
label?: {
|
3046
|
+
id: string;
|
3047
|
+
description: string;
|
3048
|
+
defaultMessage: string;
|
3049
|
+
} | undefined;
|
3050
|
+
} | undefined;
|
3051
|
+
middlename?: {
|
3052
|
+
required: boolean;
|
3053
|
+
label?: {
|
3054
|
+
id: string;
|
3055
|
+
description: string;
|
3056
|
+
defaultMessage: string;
|
3057
|
+
} | undefined;
|
3058
|
+
} | undefined;
|
3059
|
+
} | undefined;
|
3060
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
2830
3061
|
maxLength?: number | undefined;
|
2831
3062
|
prefix?: {
|
2832
3063
|
id: string;
|
@@ -2838,9 +3069,7 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
|
2838
3069
|
description: string;
|
2839
3070
|
defaultMessage: string;
|
2840
3071
|
} | undefined;
|
2841
|
-
|
2842
|
-
searchMode?: boolean | undefined;
|
2843
|
-
}>>;
|
3072
|
+
}>>>;
|
2844
3073
|
}>, "strip", z.ZodTypeAny, {
|
2845
3074
|
type: "NAME";
|
2846
3075
|
id: string;
|
@@ -2869,15 +3098,29 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
|
2869
3098
|
hideLabel?: boolean | undefined;
|
2870
3099
|
uncorrectable?: boolean | undefined;
|
2871
3100
|
defaultValue?: {
|
2872
|
-
firstname
|
2873
|
-
surname
|
3101
|
+
firstname?: string | undefined;
|
3102
|
+
surname?: string | undefined;
|
3103
|
+
middlename?: string | undefined;
|
2874
3104
|
} | undefined;
|
2875
3105
|
configuration?: {
|
3106
|
+
name?: {
|
3107
|
+
firstname?: {
|
3108
|
+
required: boolean;
|
3109
|
+
label?: TranslationConfig | undefined;
|
3110
|
+
} | undefined;
|
3111
|
+
surname?: {
|
3112
|
+
required: boolean;
|
3113
|
+
label?: TranslationConfig | undefined;
|
3114
|
+
} | undefined;
|
3115
|
+
middlename?: {
|
3116
|
+
required: boolean;
|
3117
|
+
label?: TranslationConfig | undefined;
|
3118
|
+
} | undefined;
|
3119
|
+
} | undefined;
|
3120
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
2876
3121
|
maxLength?: number | undefined;
|
2877
3122
|
prefix?: TranslationConfig | undefined;
|
2878
3123
|
postfix?: TranslationConfig | undefined;
|
2879
|
-
includeMiddlename?: boolean | undefined;
|
2880
|
-
searchMode?: boolean | undefined;
|
2881
3124
|
} | undefined;
|
2882
3125
|
}, {
|
2883
3126
|
type: "NAME";
|
@@ -2923,10 +3166,38 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
|
2923
3166
|
hideLabel?: boolean | undefined;
|
2924
3167
|
uncorrectable?: boolean | undefined;
|
2925
3168
|
defaultValue?: {
|
2926
|
-
firstname
|
2927
|
-
surname
|
3169
|
+
firstname?: string | undefined;
|
3170
|
+
surname?: string | undefined;
|
3171
|
+
middlename?: string | undefined;
|
2928
3172
|
} | undefined;
|
2929
3173
|
configuration?: {
|
3174
|
+
name?: {
|
3175
|
+
firstname?: {
|
3176
|
+
required: boolean;
|
3177
|
+
label?: {
|
3178
|
+
id: string;
|
3179
|
+
description: string;
|
3180
|
+
defaultMessage: string;
|
3181
|
+
} | undefined;
|
3182
|
+
} | undefined;
|
3183
|
+
surname?: {
|
3184
|
+
required: boolean;
|
3185
|
+
label?: {
|
3186
|
+
id: string;
|
3187
|
+
description: string;
|
3188
|
+
defaultMessage: string;
|
3189
|
+
} | undefined;
|
3190
|
+
} | undefined;
|
3191
|
+
middlename?: {
|
3192
|
+
required: boolean;
|
3193
|
+
label?: {
|
3194
|
+
id: string;
|
3195
|
+
description: string;
|
3196
|
+
defaultMessage: string;
|
3197
|
+
} | undefined;
|
3198
|
+
} | undefined;
|
3199
|
+
} | undefined;
|
3200
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
2930
3201
|
maxLength?: number | undefined;
|
2931
3202
|
prefix?: {
|
2932
3203
|
id: string;
|
@@ -2938,8 +3209,6 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
|
|
2938
3209
|
description: string;
|
2939
3210
|
defaultMessage: string;
|
2940
3211
|
} | undefined;
|
2941
|
-
includeMiddlename?: boolean | undefined;
|
2942
|
-
searchMode?: boolean | undefined;
|
2943
3212
|
} | undefined;
|
2944
3213
|
}>;
|
2945
3214
|
declare const PhoneField: z.ZodObject<z.objectUtil.extendShape<{
|
@@ -4244,6 +4513,16 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
4244
4513
|
uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
4245
4514
|
}, {
|
4246
4515
|
type: z.ZodLiteral<"ADDRESS">;
|
4516
|
+
configuration: z.ZodOptional<z.ZodObject<{
|
4517
|
+
lineSeparator: z.ZodOptional<z.ZodString>;
|
4518
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["number", "country", "province", "addressType", "district", "urbanOrRural", "town", "residentialArea", "street", "zipCode", "village", "state", "district2", "cityOrTown", "addressLine1", "addressLine2", "addressLine3", "postcodeOrZip"]>, "many">>;
|
4519
|
+
}, "strip", z.ZodTypeAny, {
|
4520
|
+
lineSeparator?: string | undefined;
|
4521
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
4522
|
+
}, {
|
4523
|
+
lineSeparator?: string | undefined;
|
4524
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
4525
|
+
}>>;
|
4247
4526
|
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
4248
4527
|
country: z.ZodString;
|
4249
4528
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
@@ -4331,13 +4610,6 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
4331
4610
|
addressLine3?: string | undefined;
|
4332
4611
|
postcodeOrZip?: string | undefined;
|
4333
4612
|
}>]>>;
|
4334
|
-
configuration: z.ZodOptional<z.ZodObject<{
|
4335
|
-
searchMode: z.ZodOptional<z.ZodBoolean>;
|
4336
|
-
}, "strip", z.ZodTypeAny, {
|
4337
|
-
searchMode?: boolean | undefined;
|
4338
|
-
}, {
|
4339
|
-
searchMode?: boolean | undefined;
|
4340
|
-
}>>;
|
4341
4613
|
}>, "strip", z.ZodTypeAny, {
|
4342
4614
|
type: "ADDRESS";
|
4343
4615
|
id: string;
|
@@ -4395,7 +4667,8 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
4395
4667
|
postcodeOrZip?: string | undefined;
|
4396
4668
|
} | undefined;
|
4397
4669
|
configuration?: {
|
4398
|
-
|
4670
|
+
lineSeparator?: string | undefined;
|
4671
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
4399
4672
|
} | undefined;
|
4400
4673
|
}, {
|
4401
4674
|
type: "ADDRESS";
|
@@ -4470,7 +4743,8 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
4470
4743
|
postcodeOrZip?: string | undefined;
|
4471
4744
|
} | undefined;
|
4472
4745
|
configuration?: {
|
4473
|
-
|
4746
|
+
lineSeparator?: string | undefined;
|
4747
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
4474
4748
|
} | undefined;
|
4475
4749
|
}>;
|
4476
4750
|
export declare const DataEntry: z.ZodUnion<[z.ZodObject<{
|
@@ -4724,13 +4998,7 @@ declare const DataField: z.ZodObject<z.objectUtil.extendShape<{
|
|
4724
4998
|
uncorrectable?: boolean | undefined;
|
4725
4999
|
}>;
|
4726
5000
|
export type DataField = z.infer<typeof DataField>;
|
4727
|
-
|
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>;
|
5001
|
+
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
5002
|
export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
|
4735
5003
|
id: z.ZodString;
|
4736
5004
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
@@ -4780,6 +5048,16 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
4780
5048
|
uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
4781
5049
|
}, {
|
4782
5050
|
type: z.ZodLiteral<"ADDRESS">;
|
5051
|
+
configuration: z.ZodOptional<z.ZodObject<{
|
5052
|
+
lineSeparator: z.ZodOptional<z.ZodString>;
|
5053
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodEnum<["number", "country", "province", "addressType", "district", "urbanOrRural", "town", "residentialArea", "street", "zipCode", "village", "state", "district2", "cityOrTown", "addressLine1", "addressLine2", "addressLine3", "postcodeOrZip"]>, "many">>;
|
5054
|
+
}, "strip", z.ZodTypeAny, {
|
5055
|
+
lineSeparator?: string | undefined;
|
5056
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
5057
|
+
}, {
|
5058
|
+
lineSeparator?: string | undefined;
|
5059
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
5060
|
+
}>>;
|
4783
5061
|
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
4784
5062
|
country: z.ZodString;
|
4785
5063
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
@@ -4867,13 +5145,6 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
4867
5145
|
addressLine3?: string | undefined;
|
4868
5146
|
postcodeOrZip?: string | undefined;
|
4869
5147
|
}>]>>;
|
4870
|
-
configuration: z.ZodOptional<z.ZodObject<{
|
4871
|
-
searchMode: z.ZodOptional<z.ZodBoolean>;
|
4872
|
-
}, "strip", z.ZodTypeAny, {
|
4873
|
-
searchMode?: boolean | undefined;
|
4874
|
-
}, {
|
4875
|
-
searchMode?: boolean | undefined;
|
4876
|
-
}>>;
|
4877
5148
|
}>, "strip", z.ZodTypeAny, {
|
4878
5149
|
type: "ADDRESS";
|
4879
5150
|
id: string;
|
@@ -4931,7 +5202,8 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
4931
5202
|
postcodeOrZip?: string | undefined;
|
4932
5203
|
} | undefined;
|
4933
5204
|
configuration?: {
|
4934
|
-
|
5205
|
+
lineSeparator?: string | undefined;
|
5206
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
4935
5207
|
} | undefined;
|
4936
5208
|
}, {
|
4937
5209
|
type: "ADDRESS";
|
@@ -5006,7 +5278,8 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
5006
5278
|
postcodeOrZip?: string | undefined;
|
5007
5279
|
} | undefined;
|
5008
5280
|
configuration?: {
|
5009
|
-
|
5281
|
+
lineSeparator?: string | undefined;
|
5282
|
+
fields?: ("number" | "country" | "district" | "state" | "addressType" | "province" | "urbanOrRural" | "town" | "residentialArea" | "street" | "zipCode" | "village" | "district2" | "cityOrTown" | "addressLine1" | "addressLine2" | "addressLine3" | "postcodeOrZip")[] | undefined;
|
5010
5283
|
} | undefined;
|
5011
5284
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
5012
5285
|
id: z.ZodString;
|
@@ -6962,16 +7235,114 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
6962
7235
|
}, {
|
6963
7236
|
type: z.ZodLiteral<"NAME">;
|
6964
7237
|
defaultValue: z.ZodOptional<z.ZodObject<{
|
6965
|
-
firstname: z.ZodString
|
6966
|
-
|
7238
|
+
firstname: z.ZodOptional<z.ZodString>;
|
7239
|
+
middlename: z.ZodOptional<z.ZodString>;
|
7240
|
+
surname: z.ZodOptional<z.ZodString>;
|
6967
7241
|
}, "strip", z.ZodTypeAny, {
|
6968
|
-
firstname
|
6969
|
-
surname
|
7242
|
+
firstname?: string | undefined;
|
7243
|
+
surname?: string | undefined;
|
7244
|
+
middlename?: string | undefined;
|
6970
7245
|
}, {
|
6971
|
-
firstname
|
6972
|
-
surname
|
7246
|
+
firstname?: string | undefined;
|
7247
|
+
surname?: string | undefined;
|
7248
|
+
middlename?: string | undefined;
|
6973
7249
|
}>>;
|
6974
|
-
configuration: z.ZodOptional<z.ZodObject<{
|
7250
|
+
configuration: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
7251
|
+
name: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
7252
|
+
firstname: z.ZodOptional<z.ZodObject<{
|
7253
|
+
required: z.ZodBoolean;
|
7254
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
7255
|
+
id: string;
|
7256
|
+
description: string;
|
7257
|
+
defaultMessage: string;
|
7258
|
+
}>>;
|
7259
|
+
}, "strip", z.ZodTypeAny, {
|
7260
|
+
required: boolean;
|
7261
|
+
label?: TranslationConfig | undefined;
|
7262
|
+
}, {
|
7263
|
+
required: boolean;
|
7264
|
+
label?: {
|
7265
|
+
id: string;
|
7266
|
+
description: string;
|
7267
|
+
defaultMessage: string;
|
7268
|
+
} | undefined;
|
7269
|
+
}>>;
|
7270
|
+
middlename: z.ZodOptional<z.ZodObject<{
|
7271
|
+
required: z.ZodBoolean;
|
7272
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
7273
|
+
id: string;
|
7274
|
+
description: string;
|
7275
|
+
defaultMessage: string;
|
7276
|
+
}>>;
|
7277
|
+
}, "strip", z.ZodTypeAny, {
|
7278
|
+
required: boolean;
|
7279
|
+
label?: TranslationConfig | undefined;
|
7280
|
+
}, {
|
7281
|
+
required: boolean;
|
7282
|
+
label?: {
|
7283
|
+
id: string;
|
7284
|
+
description: string;
|
7285
|
+
defaultMessage: string;
|
7286
|
+
} | undefined;
|
7287
|
+
}>>;
|
7288
|
+
surname: z.ZodOptional<z.ZodObject<{
|
7289
|
+
required: z.ZodBoolean;
|
7290
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
7291
|
+
id: string;
|
7292
|
+
description: string;
|
7293
|
+
defaultMessage: string;
|
7294
|
+
}>>;
|
7295
|
+
}, "strip", z.ZodTypeAny, {
|
7296
|
+
required: boolean;
|
7297
|
+
label?: TranslationConfig | undefined;
|
7298
|
+
}, {
|
7299
|
+
required: boolean;
|
7300
|
+
label?: {
|
7301
|
+
id: string;
|
7302
|
+
description: string;
|
7303
|
+
defaultMessage: string;
|
7304
|
+
} | undefined;
|
7305
|
+
}>>;
|
7306
|
+
}, "strip", z.ZodTypeAny, {
|
7307
|
+
firstname?: {
|
7308
|
+
required: boolean;
|
7309
|
+
label?: TranslationConfig | undefined;
|
7310
|
+
} | undefined;
|
7311
|
+
surname?: {
|
7312
|
+
required: boolean;
|
7313
|
+
label?: TranslationConfig | undefined;
|
7314
|
+
} | undefined;
|
7315
|
+
middlename?: {
|
7316
|
+
required: boolean;
|
7317
|
+
label?: TranslationConfig | undefined;
|
7318
|
+
} | undefined;
|
7319
|
+
}, {
|
7320
|
+
firstname?: {
|
7321
|
+
required: boolean;
|
7322
|
+
label?: {
|
7323
|
+
id: string;
|
7324
|
+
description: string;
|
7325
|
+
defaultMessage: string;
|
7326
|
+
} | undefined;
|
7327
|
+
} | undefined;
|
7328
|
+
surname?: {
|
7329
|
+
required: boolean;
|
7330
|
+
label?: {
|
7331
|
+
id: string;
|
7332
|
+
description: string;
|
7333
|
+
defaultMessage: string;
|
7334
|
+
} | undefined;
|
7335
|
+
} | undefined;
|
7336
|
+
middlename?: {
|
7337
|
+
required: boolean;
|
7338
|
+
label?: {
|
7339
|
+
id: string;
|
7340
|
+
description: string;
|
7341
|
+
defaultMessage: string;
|
7342
|
+
} | undefined;
|
7343
|
+
} | undefined;
|
7344
|
+
}>>>;
|
7345
|
+
order: z.ZodOptional<z.ZodArray<z.ZodEnum<["firstname", "middlename", "surname"]>, "many">>;
|
6975
7346
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
6976
7347
|
prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
6977
7348
|
id: string;
|
@@ -6983,15 +7354,53 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
6983
7354
|
description: string;
|
6984
7355
|
defaultMessage: string;
|
6985
7356
|
}>>;
|
6986
|
-
includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
6987
|
-
searchMode: z.ZodOptional<z.ZodBoolean>;
|
6988
7357
|
}, "strip", z.ZodTypeAny, {
|
7358
|
+
name?: {
|
7359
|
+
firstname?: {
|
7360
|
+
required: boolean;
|
7361
|
+
label?: TranslationConfig | undefined;
|
7362
|
+
} | undefined;
|
7363
|
+
surname?: {
|
7364
|
+
required: boolean;
|
7365
|
+
label?: TranslationConfig | undefined;
|
7366
|
+
} | undefined;
|
7367
|
+
middlename?: {
|
7368
|
+
required: boolean;
|
7369
|
+
label?: TranslationConfig | undefined;
|
7370
|
+
} | undefined;
|
7371
|
+
} | undefined;
|
7372
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
6989
7373
|
maxLength?: number | undefined;
|
6990
7374
|
prefix?: TranslationConfig | undefined;
|
6991
7375
|
postfix?: TranslationConfig | undefined;
|
6992
|
-
includeMiddlename?: boolean | undefined;
|
6993
|
-
searchMode?: boolean | undefined;
|
6994
7376
|
}, {
|
7377
|
+
name?: {
|
7378
|
+
firstname?: {
|
7379
|
+
required: boolean;
|
7380
|
+
label?: {
|
7381
|
+
id: string;
|
7382
|
+
description: string;
|
7383
|
+
defaultMessage: string;
|
7384
|
+
} | undefined;
|
7385
|
+
} | undefined;
|
7386
|
+
surname?: {
|
7387
|
+
required: boolean;
|
7388
|
+
label?: {
|
7389
|
+
id: string;
|
7390
|
+
description: string;
|
7391
|
+
defaultMessage: string;
|
7392
|
+
} | undefined;
|
7393
|
+
} | undefined;
|
7394
|
+
middlename?: {
|
7395
|
+
required: boolean;
|
7396
|
+
label?: {
|
7397
|
+
id: string;
|
7398
|
+
description: string;
|
7399
|
+
defaultMessage: string;
|
7400
|
+
} | undefined;
|
7401
|
+
} | undefined;
|
7402
|
+
} | undefined;
|
7403
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
6995
7404
|
maxLength?: number | undefined;
|
6996
7405
|
prefix?: {
|
6997
7406
|
id: string;
|
@@ -7003,9 +7412,7 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
7003
7412
|
description: string;
|
7004
7413
|
defaultMessage: string;
|
7005
7414
|
} | undefined;
|
7006
|
-
|
7007
|
-
searchMode?: boolean | undefined;
|
7008
|
-
}>>;
|
7415
|
+
}>>>;
|
7009
7416
|
}>, "strip", z.ZodTypeAny, {
|
7010
7417
|
type: "NAME";
|
7011
7418
|
id: string;
|
@@ -7034,15 +7441,29 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
7034
7441
|
hideLabel?: boolean | undefined;
|
7035
7442
|
uncorrectable?: boolean | undefined;
|
7036
7443
|
defaultValue?: {
|
7037
|
-
firstname
|
7038
|
-
surname
|
7444
|
+
firstname?: string | undefined;
|
7445
|
+
surname?: string | undefined;
|
7446
|
+
middlename?: string | undefined;
|
7039
7447
|
} | undefined;
|
7040
7448
|
configuration?: {
|
7449
|
+
name?: {
|
7450
|
+
firstname?: {
|
7451
|
+
required: boolean;
|
7452
|
+
label?: TranslationConfig | undefined;
|
7453
|
+
} | undefined;
|
7454
|
+
surname?: {
|
7455
|
+
required: boolean;
|
7456
|
+
label?: TranslationConfig | undefined;
|
7457
|
+
} | undefined;
|
7458
|
+
middlename?: {
|
7459
|
+
required: boolean;
|
7460
|
+
label?: TranslationConfig | undefined;
|
7461
|
+
} | undefined;
|
7462
|
+
} | undefined;
|
7463
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
7041
7464
|
maxLength?: number | undefined;
|
7042
7465
|
prefix?: TranslationConfig | undefined;
|
7043
7466
|
postfix?: TranslationConfig | undefined;
|
7044
|
-
includeMiddlename?: boolean | undefined;
|
7045
|
-
searchMode?: boolean | undefined;
|
7046
7467
|
} | undefined;
|
7047
7468
|
}, {
|
7048
7469
|
type: "NAME";
|
@@ -7088,10 +7509,38 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
7088
7509
|
hideLabel?: boolean | undefined;
|
7089
7510
|
uncorrectable?: boolean | undefined;
|
7090
7511
|
defaultValue?: {
|
7091
|
-
firstname
|
7092
|
-
surname
|
7512
|
+
firstname?: string | undefined;
|
7513
|
+
surname?: string | undefined;
|
7514
|
+
middlename?: string | undefined;
|
7093
7515
|
} | undefined;
|
7094
7516
|
configuration?: {
|
7517
|
+
name?: {
|
7518
|
+
firstname?: {
|
7519
|
+
required: boolean;
|
7520
|
+
label?: {
|
7521
|
+
id: string;
|
7522
|
+
description: string;
|
7523
|
+
defaultMessage: string;
|
7524
|
+
} | undefined;
|
7525
|
+
} | undefined;
|
7526
|
+
surname?: {
|
7527
|
+
required: boolean;
|
7528
|
+
label?: {
|
7529
|
+
id: string;
|
7530
|
+
description: string;
|
7531
|
+
defaultMessage: string;
|
7532
|
+
} | undefined;
|
7533
|
+
} | undefined;
|
7534
|
+
middlename?: {
|
7535
|
+
required: boolean;
|
7536
|
+
label?: {
|
7537
|
+
id: string;
|
7538
|
+
description: string;
|
7539
|
+
defaultMessage: string;
|
7540
|
+
} | undefined;
|
7541
|
+
} | undefined;
|
7542
|
+
} | undefined;
|
7543
|
+
order?: ("firstname" | "surname" | "middlename")[] | undefined;
|
7095
7544
|
maxLength?: number | undefined;
|
7096
7545
|
prefix?: {
|
7097
7546
|
id: string;
|
@@ -7103,8 +7552,6 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
|
|
7103
7552
|
description: string;
|
7104
7553
|
defaultMessage: string;
|
7105
7554
|
} | undefined;
|
7106
|
-
includeMiddlename?: boolean | undefined;
|
7107
|
-
searchMode?: boolean | undefined;
|
7108
7555
|
} | undefined;
|
7109
7556
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
7110
7557
|
id: z.ZodString;
|
@@ -9148,7 +9595,6 @@ export type LocationField = z.infer<typeof Location>;
|
|
9148
9595
|
export type RadioField = z.infer<typeof RadioGroup>;
|
9149
9596
|
export type AddressField = z.infer<typeof Address>;
|
9150
9597
|
export type NumberField = z.infer<typeof NumberField>;
|
9151
|
-
export type FieldConfig = Inferred;
|
9152
9598
|
export type FieldProps<T extends FieldType> = Extract<FieldConfig, {
|
9153
9599
|
type: T;
|
9154
9600
|
}>;
|