@opencrvs/toolkit 1.8.1-rc.4fba37a → 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 +395 -412
  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 +9396 -8676
  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 +56 -56
  13. package/dist/commons/events/EventConfig.d.ts +2213 -1443
  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 +251 -944
  18. package/dist/commons/events/FieldType.d.ts +2 -6
  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 +3874 -3574
  22. package/dist/commons/events/PageConfig.d.ts +544 -524
  23. package/dist/commons/events/WorkqueueConfig.d.ts +164 -288
  24. package/dist/commons/events/defineConfig.d.ts +327 -183
  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 +13 -14
  28. package/dist/commons/events/utils.d.ts +701 -351
  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 +881 -1101
  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,101 +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
- 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>;
2845
2750
  declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2846
2751
  id: z.ZodString;
2847
2752
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
@@ -2892,114 +2797,16 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
2892
2797
  }, {
2893
2798
  type: z.ZodLiteral<"NAME">;
2894
2799
  defaultValue: z.ZodOptional<z.ZodObject<{
2895
- firstname: z.ZodOptional<z.ZodString>;
2896
- middlename: z.ZodOptional<z.ZodString>;
2897
- surname: z.ZodOptional<z.ZodString>;
2800
+ firstname: z.ZodString;
2801
+ surname: z.ZodString;
2898
2802
  }, "strip", z.ZodTypeAny, {
2899
- firstname?: string | undefined;
2900
- surname?: string | undefined;
2901
- middlename?: string | undefined;
2803
+ firstname: string;
2804
+ surname: string;
2902
2805
  }, {
2903
- firstname?: string | undefined;
2904
- surname?: string | undefined;
2905
- middlename?: string | undefined;
2806
+ firstname: string;
2807
+ surname: string;
2906
2808
  }>>;
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">>;
2809
+ configuration: z.ZodOptional<z.ZodObject<{
3003
2810
  maxLength: z.ZodOptional<z.ZodNumber>;
3004
2811
  prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
3005
2812
  id: string;
@@ -3011,53 +2818,15 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3011
2818
  description: string;
3012
2819
  defaultMessage: string;
3013
2820
  }>>;
2821
+ includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2822
+ searchMode: z.ZodOptional<z.ZodBoolean>;
3014
2823
  }, "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;
3030
2824
  maxLength?: number | undefined;
3031
2825
  prefix?: TranslationConfig | undefined;
3032
2826
  postfix?: TranslationConfig | undefined;
2827
+ includeMiddlename?: boolean | undefined;
2828
+ searchMode?: boolean | undefined;
3033
2829
  }, {
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;
3061
2830
  maxLength?: number | undefined;
3062
2831
  prefix?: {
3063
2832
  id: string;
@@ -3069,7 +2838,9 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3069
2838
  description: string;
3070
2839
  defaultMessage: string;
3071
2840
  } | undefined;
3072
- }>>>;
2841
+ includeMiddlename?: boolean | undefined;
2842
+ searchMode?: boolean | undefined;
2843
+ }>>;
3073
2844
  }>, "strip", z.ZodTypeAny, {
3074
2845
  type: "NAME";
3075
2846
  id: string;
@@ -3098,29 +2869,15 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3098
2869
  hideLabel?: boolean | undefined;
3099
2870
  uncorrectable?: boolean | undefined;
3100
2871
  defaultValue?: {
3101
- firstname?: string | undefined;
3102
- surname?: string | undefined;
3103
- middlename?: string | undefined;
2872
+ firstname: string;
2873
+ surname: string;
3104
2874
  } | undefined;
3105
2875
  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;
3121
2876
  maxLength?: number | undefined;
3122
2877
  prefix?: TranslationConfig | undefined;
3123
2878
  postfix?: TranslationConfig | undefined;
2879
+ includeMiddlename?: boolean | undefined;
2880
+ searchMode?: boolean | undefined;
3124
2881
  } | undefined;
3125
2882
  }, {
3126
2883
  type: "NAME";
@@ -3166,38 +2923,10 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3166
2923
  hideLabel?: boolean | undefined;
3167
2924
  uncorrectable?: boolean | undefined;
3168
2925
  defaultValue?: {
3169
- firstname?: string | undefined;
3170
- surname?: string | undefined;
3171
- middlename?: string | undefined;
2926
+ firstname: string;
2927
+ surname: string;
3172
2928
  } | undefined;
3173
2929
  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;
3201
2930
  maxLength?: number | undefined;
3202
2931
  prefix?: {
3203
2932
  id: string;
@@ -3209,6 +2938,8 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
3209
2938
  description: string;
3210
2939
  defaultMessage: string;
3211
2940
  } | undefined;
2941
+ includeMiddlename?: boolean | undefined;
2942
+ searchMode?: boolean | undefined;
3212
2943
  } | undefined;
3213
2944
  }>;
3214
2945
  declare const PhoneField: z.ZodObject<z.objectUtil.extendShape<{
@@ -4513,16 +4244,6 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
4513
4244
  uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4514
4245
  }, {
4515
4246
  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
- }>>;
4526
4247
  defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
4527
4248
  country: z.ZodString;
4528
4249
  addressType: z.ZodLiteral<"DOMESTIC">;
@@ -4610,6 +4331,13 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
4610
4331
  addressLine3?: string | undefined;
4611
4332
  postcodeOrZip?: string | undefined;
4612
4333
  }>]>>;
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
+ }>>;
4613
4341
  }>, "strip", z.ZodTypeAny, {
4614
4342
  type: "ADDRESS";
4615
4343
  id: string;
@@ -4667,8 +4395,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
4667
4395
  postcodeOrZip?: string | undefined;
4668
4396
  } | undefined;
4669
4397
  configuration?: {
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;
4398
+ searchMode?: boolean | undefined;
4672
4399
  } | undefined;
4673
4400
  }, {
4674
4401
  type: "ADDRESS";
@@ -4743,8 +4470,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
4743
4470
  postcodeOrZip?: string | undefined;
4744
4471
  } | undefined;
4745
4472
  configuration?: {
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;
4473
+ searchMode?: boolean | undefined;
4748
4474
  } | undefined;
4749
4475
  }>;
4750
4476
  export declare const DataEntry: z.ZodUnion<[z.ZodObject<{
@@ -4998,8 +4724,7 @@ declare const DataField: z.ZodObject<z.objectUtil.extendShape<{
4998
4724
  uncorrectable?: boolean | undefined;
4999
4725
  }>;
5000
4726
  export type DataField = z.infer<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>;
5002
- export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
4727
+ declare const PrintButton: z.ZodObject<z.objectUtil.extendShape<{
5003
4728
  id: z.ZodString;
5004
4729
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
5005
4730
  id: string;
@@ -5047,17 +4772,165 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
5047
4772
  hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5048
4773
  uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
5049
4774
  }, {
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">>;
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>;
4885
+ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
4886
+ id: z.ZodString;
4887
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4888
+ id: string;
4889
+ description: string;
4890
+ defaultMessage: string;
4891
+ }>;
4892
+ parent: z.ZodOptional<z.ZodObject<{
4893
+ $$field: z.ZodString;
4894
+ }, "strip", z.ZodTypeAny, {
4895
+ $$field: string;
4896
+ }, {
4897
+ $$field: string;
4898
+ }>>;
4899
+ required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4900
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
4901
+ secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4902
+ placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4903
+ id: string;
4904
+ description: string;
4905
+ defaultMessage: string;
4906
+ }>>;
4907
+ validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
4908
+ validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
4909
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4910
+ id: string;
4911
+ description: string;
4912
+ defaultMessage: string;
4913
+ }>;
5054
4914
  }, "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;
4915
+ message: TranslationConfig;
4916
+ validator: import(".").JSONSchema;
5057
4917
  }, {
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;
4918
+ message: {
4919
+ id: string;
4920
+ description: string;
4921
+ defaultMessage: string;
4922
+ };
4923
+ validator: import(".").JSONSchema;
4924
+ }>, "many">>>;
4925
+ helperText: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
4926
+ id: string;
4927
+ description: string;
4928
+ defaultMessage: string;
5060
4929
  }>>;
4930
+ hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4931
+ uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4932
+ }, {
4933
+ type: z.ZodLiteral<"ADDRESS">;
5061
4934
  defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
5062
4935
  country: z.ZodString;
5063
4936
  addressType: z.ZodLiteral<"DOMESTIC">;
@@ -5145,6 +5018,13 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
5145
5018
  addressLine3?: string | undefined;
5146
5019
  postcodeOrZip?: string | undefined;
5147
5020
  }>]>>;
5021
+ configuration: z.ZodOptional<z.ZodObject<{
5022
+ searchMode: z.ZodOptional<z.ZodBoolean>;
5023
+ }, "strip", z.ZodTypeAny, {
5024
+ searchMode?: boolean | undefined;
5025
+ }, {
5026
+ searchMode?: boolean | undefined;
5027
+ }>>;
5148
5028
  }>, "strip", z.ZodTypeAny, {
5149
5029
  type: "ADDRESS";
5150
5030
  id: string;
@@ -5202,8 +5082,7 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
5202
5082
  postcodeOrZip?: string | undefined;
5203
5083
  } | undefined;
5204
5084
  configuration?: {
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;
5085
+ searchMode?: boolean | undefined;
5207
5086
  } | undefined;
5208
5087
  }, {
5209
5088
  type: "ADDRESS";
@@ -5278,8 +5157,7 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
5278
5157
  postcodeOrZip?: string | undefined;
5279
5158
  } | undefined;
5280
5159
  configuration?: {
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;
5160
+ searchMode?: boolean | undefined;
5283
5161
  } | undefined;
5284
5162
  }>, z.ZodObject<z.objectUtil.extendShape<{
5285
5163
  id: z.ZodString;
@@ -7235,114 +7113,16 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7235
7113
  }, {
7236
7114
  type: z.ZodLiteral<"NAME">;
7237
7115
  defaultValue: z.ZodOptional<z.ZodObject<{
7238
- firstname: z.ZodOptional<z.ZodString>;
7239
- middlename: z.ZodOptional<z.ZodString>;
7240
- surname: z.ZodOptional<z.ZodString>;
7116
+ firstname: z.ZodString;
7117
+ surname: z.ZodString;
7241
7118
  }, "strip", z.ZodTypeAny, {
7242
- firstname?: string | undefined;
7243
- surname?: string | undefined;
7244
- middlename?: string | undefined;
7119
+ firstname: string;
7120
+ surname: string;
7245
7121
  }, {
7246
- firstname?: string | undefined;
7247
- surname?: string | undefined;
7248
- middlename?: string | undefined;
7122
+ firstname: string;
7123
+ surname: string;
7249
7124
  }>>;
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">>;
7125
+ configuration: z.ZodOptional<z.ZodObject<{
7346
7126
  maxLength: z.ZodOptional<z.ZodNumber>;
7347
7127
  prefix: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7348
7128
  id: string;
@@ -7354,53 +7134,15 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7354
7134
  description: string;
7355
7135
  defaultMessage: string;
7356
7136
  }>>;
7137
+ includeMiddlename: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7138
+ searchMode: z.ZodOptional<z.ZodBoolean>;
7357
7139
  }, "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;
7373
7140
  maxLength?: number | undefined;
7374
7141
  prefix?: TranslationConfig | undefined;
7375
7142
  postfix?: TranslationConfig | undefined;
7143
+ includeMiddlename?: boolean | undefined;
7144
+ searchMode?: boolean | undefined;
7376
7145
  }, {
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;
7404
7146
  maxLength?: number | undefined;
7405
7147
  prefix?: {
7406
7148
  id: string;
@@ -7412,7 +7154,9 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7412
7154
  description: string;
7413
7155
  defaultMessage: string;
7414
7156
  } | undefined;
7415
- }>>>;
7157
+ includeMiddlename?: boolean | undefined;
7158
+ searchMode?: boolean | undefined;
7159
+ }>>;
7416
7160
  }>, "strip", z.ZodTypeAny, {
7417
7161
  type: "NAME";
7418
7162
  id: string;
@@ -7441,29 +7185,15 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7441
7185
  hideLabel?: boolean | undefined;
7442
7186
  uncorrectable?: boolean | undefined;
7443
7187
  defaultValue?: {
7444
- firstname?: string | undefined;
7445
- surname?: string | undefined;
7446
- middlename?: string | undefined;
7188
+ firstname: string;
7189
+ surname: string;
7447
7190
  } | undefined;
7448
7191
  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;
7464
7192
  maxLength?: number | undefined;
7465
7193
  prefix?: TranslationConfig | undefined;
7466
7194
  postfix?: TranslationConfig | undefined;
7195
+ includeMiddlename?: boolean | undefined;
7196
+ searchMode?: boolean | undefined;
7467
7197
  } | undefined;
7468
7198
  }, {
7469
7199
  type: "NAME";
@@ -7509,38 +7239,10 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7509
7239
  hideLabel?: boolean | undefined;
7510
7240
  uncorrectable?: boolean | undefined;
7511
7241
  defaultValue?: {
7512
- firstname?: string | undefined;
7513
- surname?: string | undefined;
7514
- middlename?: string | undefined;
7242
+ firstname: string;
7243
+ surname: string;
7515
7244
  } | undefined;
7516
7245
  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;
7544
7246
  maxLength?: number | undefined;
7545
7247
  prefix?: {
7546
7248
  id: string;
@@ -7552,6 +7254,8 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
7552
7254
  description: string;
7553
7255
  defaultMessage: string;
7554
7256
  } | undefined;
7257
+ includeMiddlename?: boolean | undefined;
7258
+ searchMode?: boolean | undefined;
7555
7259
  } | undefined;
7556
7260
  }>, z.ZodObject<z.objectUtil.extendShape<{
7557
7261
  id: z.ZodString;
@@ -9586,24 +9290,7 @@ export declare const FieldConfig: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z
9586
9290
  } | undefined;
9587
9291
  hideLabel?: boolean | undefined;
9588
9292
  uncorrectable?: boolean | undefined;
9589
- }>]>;
9590
- export type SelectField = z.infer<typeof Select>;
9591
- export type NameField = z.infer<typeof NameField>;
9592
- export type PhoneField = z.infer<typeof PhoneField>;
9593
- export type IdField = z.infer<typeof IdField>;
9594
- export type LocationField = z.infer<typeof Location>;
9595
- export type RadioField = z.infer<typeof RadioGroup>;
9596
- export type AddressField = z.infer<typeof Address>;
9597
- export type NumberField = z.infer<typeof NumberField>;
9598
- export type FieldProps<T extends FieldType> = Extract<FieldConfig, {
9599
- type: T;
9600
- }>;
9601
- export type SelectOption = z.infer<typeof SelectOption>;
9602
- export type AdministrativeAreaConfiguration = z.infer<typeof AdministrativeAreaConfiguration>;
9603
- /**
9604
- * Union of file-related fields. Using common type should help with compiler to know where to add new cases.
9605
- */
9606
- export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.objectUtil.extendShape<{
9293
+ }>, z.ZodObject<z.objectUtil.extendShape<{
9607
9294
  id: z.ZodString;
9608
9295
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9609
9296
  id: string;
@@ -9651,216 +9338,32 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
9651
9338
  hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9652
9339
  uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9653
9340
  }, {
9654
- type: z.ZodLiteral<"SIGNATURE">;
9655
- signaturePromptLabel: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9656
- id: string;
9657
- description: string;
9658
- defaultMessage: string;
9659
- }>;
9660
- defaultValue: z.ZodOptional<z.ZodString>;
9661
- configuration: z.ZodDefault<z.ZodObject<{
9662
- maxFileSize: z.ZodDefault<z.ZodNumber>;
9663
- acceptedFileTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>, "many">>;
9664
- }, "strip", z.ZodTypeAny, {
9665
- maxFileSize: number;
9666
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9667
- }, {
9668
- maxFileSize?: number | undefined;
9669
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9670
- }>>;
9671
- }>, "strip", z.ZodTypeAny, {
9672
- type: "SIGNATURE";
9673
- id: string;
9674
- label: TranslationConfig;
9675
- configuration: {
9676
- maxFileSize: number;
9677
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9678
- };
9679
- signaturePromptLabel: TranslationConfig;
9680
- parent?: {
9681
- $$field: string;
9682
- } | undefined;
9683
- validation?: {
9684
- message: TranslationConfig;
9685
- validator: import(".").JSONSchema;
9686
- }[] | undefined;
9687
- required?: boolean | undefined;
9688
- conditionals?: ({
9689
- type: "SHOW";
9690
- conditional: import(".").JSONSchema;
9691
- } | {
9692
- type: "ENABLE";
9693
- conditional: import(".").JSONSchema;
9694
- } | {
9695
- type: "DISPLAY_ON_REVIEW";
9696
- conditional: import(".").JSONSchema;
9697
- })[] | undefined;
9698
- secured?: boolean | undefined;
9699
- placeholder?: TranslationConfig | undefined;
9700
- helperText?: TranslationConfig | undefined;
9701
- hideLabel?: boolean | undefined;
9702
- uncorrectable?: boolean | undefined;
9703
- defaultValue?: string | undefined;
9704
- }, {
9705
- type: "SIGNATURE";
9706
- id: string;
9707
- label: {
9708
- id: string;
9709
- description: string;
9710
- defaultMessage: string;
9711
- };
9712
- signaturePromptLabel: {
9713
- id: string;
9714
- description: string;
9715
- defaultMessage: string;
9716
- };
9717
- parent?: {
9718
- $$field: string;
9719
- } | undefined;
9720
- validation?: {
9721
- message: {
9722
- id: string;
9723
- description: string;
9724
- defaultMessage: string;
9725
- };
9726
- validator: import(".").JSONSchema;
9727
- }[] | undefined;
9728
- required?: boolean | undefined;
9729
- conditionals?: ({
9730
- type: "SHOW";
9731
- conditional: import(".").JSONSchema;
9732
- } | {
9733
- type: "ENABLE";
9734
- conditional: import(".").JSONSchema;
9735
- } | {
9736
- type: "DISPLAY_ON_REVIEW";
9737
- conditional: import(".").JSONSchema;
9738
- })[] | undefined;
9739
- secured?: boolean | undefined;
9740
- placeholder?: {
9741
- id: string;
9742
- description: string;
9743
- defaultMessage: string;
9744
- } | undefined;
9745
- helperText?: {
9746
- id: string;
9747
- description: string;
9748
- defaultMessage: string;
9749
- } | undefined;
9750
- hideLabel?: boolean | undefined;
9751
- uncorrectable?: boolean | undefined;
9752
- defaultValue?: string | undefined;
9753
- configuration?: {
9754
- maxFileSize?: number | undefined;
9755
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9756
- } | undefined;
9757
- }>, z.ZodObject<z.objectUtil.extendShape<{
9758
- id: z.ZodString;
9759
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9760
- id: string;
9761
- description: string;
9762
- defaultMessage: string;
9763
- }>;
9764
- parent: z.ZodOptional<z.ZodObject<{
9765
- $$field: z.ZodString;
9766
- }, "strip", z.ZodTypeAny, {
9767
- $$field: string;
9768
- }, {
9769
- $$field: string;
9770
- }>>;
9771
- required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9772
- conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
9773
- secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9774
- placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9775
- id: string;
9776
- description: string;
9777
- defaultMessage: string;
9778
- }>>;
9779
- validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
9780
- validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
9781
- message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9782
- id: string;
9783
- description: string;
9784
- defaultMessage: string;
9785
- }>;
9786
- }, "strip", z.ZodTypeAny, {
9787
- message: TranslationConfig;
9788
- validator: import(".").JSONSchema;
9789
- }, {
9790
- message: {
9791
- id: string;
9792
- description: string;
9793
- defaultMessage: string;
9794
- };
9795
- validator: import(".").JSONSchema;
9796
- }>, "many">>>;
9797
- helperText: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9798
- id: string;
9799
- description: string;
9800
- defaultMessage: string;
9801
- }>>;
9802
- hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9803
- uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9804
- }, {
9805
- type: z.ZodLiteral<"FILE">;
9806
- defaultValue: z.ZodOptional<z.ZodObject<{
9807
- path: z.ZodEffects<z.ZodString, string, string>;
9808
- originalFilename: z.ZodString;
9809
- type: z.ZodString;
9810
- }, "strip", z.ZodTypeAny, {
9811
- type: string;
9812
- path: string;
9813
- originalFilename: string;
9814
- }, {
9815
- type: string;
9816
- path: string;
9817
- originalFilename: string;
9818
- }>>;
9819
- configuration: z.ZodDefault<z.ZodObject<{
9820
- maxFileSize: z.ZodDefault<z.ZodNumber>;
9821
- acceptedFileTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>, "many">>;
9822
- style: z.ZodOptional<z.ZodObject<{
9823
- width: z.ZodOptional<z.ZodEnum<["full", "auto"]>>;
9824
- }, "strip", z.ZodTypeAny, {
9825
- width?: "full" | "auto" | undefined;
9826
- }, {
9827
- width?: "full" | "auto" | undefined;
9828
- }>>;
9829
- fileName: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
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, {
9830
9345
  id: string;
9831
9346
  description: string;
9832
9347
  defaultMessage: string;
9833
9348
  }>>;
9834
9349
  }, "strip", z.ZodTypeAny, {
9835
- maxFileSize: number;
9836
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9837
- style?: {
9838
- width?: "full" | "auto" | undefined;
9839
- } | undefined;
9840
- fileName?: TranslationConfig | undefined;
9350
+ template: string;
9351
+ buttonLabel?: TranslationConfig | undefined;
9841
9352
  }, {
9842
- maxFileSize?: number | undefined;
9843
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9844
- style?: {
9845
- width?: "full" | "auto" | undefined;
9846
- } | undefined;
9847
- fileName?: {
9353
+ template: string;
9354
+ buttonLabel?: {
9848
9355
  id: string;
9849
9356
  description: string;
9850
9357
  defaultMessage: string;
9851
9358
  } | undefined;
9852
- }>>;
9359
+ }>;
9853
9360
  }>, "strip", z.ZodTypeAny, {
9854
- type: "FILE";
9361
+ type: "PRINT_BUTTON";
9855
9362
  id: string;
9856
9363
  label: TranslationConfig;
9857
9364
  configuration: {
9858
- maxFileSize: number;
9859
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9860
- style?: {
9861
- width?: "full" | "auto" | undefined;
9862
- } | undefined;
9863
- fileName?: TranslationConfig | undefined;
9365
+ template: string;
9366
+ buttonLabel?: TranslationConfig | undefined;
9864
9367
  };
9865
9368
  parent?: {
9866
9369
  $$field: string;
@@ -9885,220 +9388,21 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
9885
9388
  helperText?: TranslationConfig | undefined;
9886
9389
  hideLabel?: boolean | undefined;
9887
9390
  uncorrectable?: boolean | undefined;
9888
- defaultValue?: {
9889
- type: string;
9890
- path: string;
9891
- originalFilename: string;
9892
- } | undefined;
9893
9391
  }, {
9894
- type: "FILE";
9392
+ type: "PRINT_BUTTON";
9895
9393
  id: string;
9896
9394
  label: {
9897
9395
  id: string;
9898
9396
  description: string;
9899
9397
  defaultMessage: string;
9900
9398
  };
9901
- parent?: {
9902
- $$field: string;
9903
- } | undefined;
9904
- validation?: {
9905
- message: {
9906
- id: string;
9907
- description: string;
9908
- defaultMessage: string;
9909
- };
9910
- validator: import(".").JSONSchema;
9911
- }[] | undefined;
9912
- required?: boolean | undefined;
9913
- conditionals?: ({
9914
- type: "SHOW";
9915
- conditional: import(".").JSONSchema;
9916
- } | {
9917
- type: "ENABLE";
9918
- conditional: import(".").JSONSchema;
9919
- } | {
9920
- type: "DISPLAY_ON_REVIEW";
9921
- conditional: import(".").JSONSchema;
9922
- })[] | undefined;
9923
- secured?: boolean | undefined;
9924
- placeholder?: {
9925
- id: string;
9926
- description: string;
9927
- defaultMessage: string;
9928
- } | undefined;
9929
- helperText?: {
9930
- id: string;
9931
- description: string;
9932
- defaultMessage: string;
9933
- } | undefined;
9934
- hideLabel?: boolean | undefined;
9935
- uncorrectable?: boolean | undefined;
9936
- defaultValue?: {
9937
- type: string;
9938
- path: string;
9939
- originalFilename: string;
9940
- } | undefined;
9941
- configuration?: {
9942
- maxFileSize?: number | undefined;
9943
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
9944
- style?: {
9945
- width?: "full" | "auto" | undefined;
9946
- } | undefined;
9947
- fileName?: {
9948
- id: string;
9949
- description: string;
9950
- defaultMessage: string;
9951
- } | undefined;
9952
- } | undefined;
9953
- }>, z.ZodObject<z.objectUtil.extendShape<{
9954
- id: z.ZodString;
9955
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9956
- id: string;
9957
- description: string;
9958
- defaultMessage: string;
9959
- }>;
9960
- parent: z.ZodOptional<z.ZodObject<{
9961
- $$field: z.ZodString;
9962
- }, "strip", z.ZodTypeAny, {
9963
- $$field: string;
9964
- }, {
9965
- $$field: string;
9966
- }>>;
9967
- required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9968
- conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
9969
- secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9970
- placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9971
- id: string;
9972
- description: string;
9973
- defaultMessage: string;
9974
- }>>;
9975
- validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
9976
- validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
9977
- message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9978
- id: string;
9979
- description: string;
9980
- defaultMessage: string;
9981
- }>;
9982
- }, "strip", z.ZodTypeAny, {
9983
- message: TranslationConfig;
9984
- validator: import(".").JSONSchema;
9985
- }, {
9986
- message: {
9987
- id: string;
9988
- description: string;
9989
- defaultMessage: string;
9990
- };
9991
- validator: import(".").JSONSchema;
9992
- }>, "many">>>;
9993
- helperText: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9994
- id: string;
9995
- description: string;
9996
- defaultMessage: string;
9997
- }>>;
9998
- hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
9999
- uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
10000
- }, {
10001
- type: z.ZodLiteral<"FILE_WITH_OPTIONS">;
10002
- options: z.ZodArray<z.ZodObject<{
10003
- value: z.ZodString;
10004
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
10005
- id: string;
10006
- description: string;
10007
- defaultMessage: string;
10008
- }>;
10009
- }, "strip", z.ZodTypeAny, {
10010
- value: string;
10011
- label: TranslationConfig;
10012
- }, {
10013
- value: string;
10014
- label: {
10015
- id: string;
10016
- description: string;
10017
- defaultMessage: string;
10018
- };
10019
- }>, "many">;
10020
- defaultValue: z.ZodOptional<z.ZodArray<z.ZodObject<{
10021
- path: z.ZodEffects<z.ZodString, string, string>;
10022
- originalFilename: z.ZodString;
10023
- type: z.ZodString;
10024
- option: z.ZodString;
10025
- }, "strip", z.ZodTypeAny, {
10026
- type: string;
10027
- option: string;
10028
- path: string;
10029
- originalFilename: string;
10030
- }, {
10031
- type: string;
10032
- option: string;
10033
- path: string;
10034
- originalFilename: string;
10035
- }>, "many">>;
10036
- configuration: z.ZodDefault<z.ZodObject<{
10037
- maxFileSize: z.ZodDefault<z.ZodNumber>;
10038
- acceptedFileTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>, "many">>;
10039
- }, "strip", z.ZodTypeAny, {
10040
- maxFileSize: number;
10041
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
10042
- }, {
10043
- maxFileSize?: number | undefined;
10044
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
10045
- }>>;
10046
- }>, "strip", z.ZodTypeAny, {
10047
- type: "FILE_WITH_OPTIONS";
10048
- id: string;
10049
- options: {
10050
- value: string;
10051
- label: TranslationConfig;
10052
- }[];
10053
- label: TranslationConfig;
10054
9399
  configuration: {
10055
- maxFileSize: number;
10056
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
10057
- };
10058
- parent?: {
10059
- $$field: string;
10060
- } | undefined;
10061
- validation?: {
10062
- message: TranslationConfig;
10063
- validator: import(".").JSONSchema;
10064
- }[] | undefined;
10065
- required?: boolean | undefined;
10066
- conditionals?: ({
10067
- type: "SHOW";
10068
- conditional: import(".").JSONSchema;
10069
- } | {
10070
- type: "ENABLE";
10071
- conditional: import(".").JSONSchema;
10072
- } | {
10073
- type: "DISPLAY_ON_REVIEW";
10074
- conditional: import(".").JSONSchema;
10075
- })[] | undefined;
10076
- secured?: boolean | undefined;
10077
- placeholder?: TranslationConfig | undefined;
10078
- helperText?: TranslationConfig | undefined;
10079
- hideLabel?: boolean | undefined;
10080
- uncorrectable?: boolean | undefined;
10081
- defaultValue?: {
10082
- type: string;
10083
- option: string;
10084
- path: string;
10085
- originalFilename: string;
10086
- }[] | undefined;
10087
- }, {
10088
- type: "FILE_WITH_OPTIONS";
10089
- id: string;
10090
- options: {
10091
- value: string;
10092
- label: {
9400
+ template: string;
9401
+ buttonLabel?: {
10093
9402
  id: string;
10094
9403
  description: string;
10095
9404
  defaultMessage: string;
10096
- };
10097
- }[];
10098
- label: {
10099
- id: string;
10100
- description: string;
10101
- defaultMessage: string;
9405
+ } | undefined;
10102
9406
  };
10103
9407
  parent?: {
10104
9408
  $$field: string;
@@ -10135,17 +9439,20 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
10135
9439
  } | undefined;
10136
9440
  hideLabel?: boolean | undefined;
10137
9441
  uncorrectable?: boolean | undefined;
10138
- defaultValue?: {
10139
- type: string;
10140
- option: string;
10141
- path: string;
10142
- originalFilename: string;
10143
- }[] | undefined;
10144
- configuration?: {
10145
- maxFileSize?: number | undefined;
10146
- acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
10147
- } | undefined;
10148
9442
  }>]>;
10149
- export type AnyFileField = z.infer<typeof AnyFileField>;
9443
+ export type SelectField = z.infer<typeof Select>;
9444
+ export type NameField = z.infer<typeof NameField>;
9445
+ export type PhoneField = z.infer<typeof PhoneField>;
9446
+ export type IdField = z.infer<typeof IdField>;
9447
+ export type LocationField = z.infer<typeof Location>;
9448
+ export type RadioField = z.infer<typeof RadioGroup>;
9449
+ export type AddressField = z.infer<typeof Address>;
9450
+ export type NumberField = z.infer<typeof NumberField>;
9451
+ export type FieldConfig = Inferred;
9452
+ export type FieldProps<T extends FieldType> = Extract<FieldConfig, {
9453
+ type: T;
9454
+ }>;
9455
+ export type SelectOption = z.infer<typeof SelectOption>;
9456
+ export type AdministrativeAreaConfiguration = z.infer<typeof AdministrativeAreaConfiguration>;
10150
9457
  export {};
10151
9458
  //# sourceMappingURL=FieldConfig.d.ts.map