@opencrvs/toolkit 1.8.0-rc.ff2e7b6 → 1.8.0-rc.ff62f9e
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 +6823 -479
- package/dist/commons/conditionals/conditionals.d.ts +1 -0
- package/dist/commons/conditionals/validate-address.test.d.ts +2 -0
- package/dist/commons/conditionals/validate.d.ts +27 -0
- package/dist/commons/conditionals/validate.test.d.ts +2 -0
- package/dist/commons/events/ActionConfig.d.ts +4708 -256
- package/dist/commons/events/ActionDocument.d.ts +2546 -71
- package/dist/commons/events/ActionInput.d.ts +4096 -188
- package/dist/commons/events/ActionType.d.ts +6 -0
- package/dist/commons/events/CompositeFieldValue.d.ts +152 -2
- package/dist/commons/events/Draft.d.ts +300 -12
- package/dist/commons/events/EventConfig.d.ts +1844 -188
- package/dist/commons/events/EventConfigInput.d.ts +2 -2
- package/dist/commons/events/EventDocument.d.ts +3239 -156
- package/dist/commons/events/FieldConfig.d.ts +292 -40
- package/dist/commons/events/FieldType.d.ts +2 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +154 -3
- package/dist/commons/events/FieldValue.d.ts +76 -2
- package/dist/commons/events/FormConfig.d.ts +377 -29
- package/dist/commons/events/defineConfig.d.ts +308 -34
- package/dist/commons/events/test.utils.d.ts +161 -13
- package/dist/commons/events/utils.d.ts +229 -12
- package/dist/conditionals/index.js +17 -0
- package/dist/events/index.js +456 -95
- package/package.json +1 -1
@@ -747,6 +747,9 @@ declare const TextAreaField: z.ZodObject<z.objectUtil.extendShape<{
|
|
747
747
|
} | undefined;
|
748
748
|
}>;
|
749
749
|
export type TextAreaField = z.infer<typeof TextAreaField>;
|
750
|
+
export declare const ImageMimeType: z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>;
|
751
|
+
export declare const MimeType: z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>;
|
752
|
+
export type MimeType = z.infer<typeof MimeType>;
|
750
753
|
declare const SignatureField: z.ZodObject<z.objectUtil.extendShape<{
|
751
754
|
id: z.ZodString;
|
752
755
|
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodObject<{
|
@@ -800,20 +803,24 @@ declare const SignatureField: z.ZodObject<z.objectUtil.extendShape<{
|
|
800
803
|
description: string;
|
801
804
|
defaultMessage: string;
|
802
805
|
}>;
|
803
|
-
configuration: z.
|
804
|
-
|
805
|
-
|
806
|
+
configuration: z.ZodDefault<z.ZodObject<{
|
807
|
+
maxFileSize: z.ZodDefault<z.ZodNumber>;
|
808
|
+
acceptedFileTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>, "many">>;
|
806
809
|
}, "strip", z.ZodTypeAny, {
|
807
|
-
|
808
|
-
|
810
|
+
maxFileSize: number;
|
811
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
809
812
|
}, {
|
810
|
-
|
811
|
-
|
812
|
-
}
|
813
|
+
maxFileSize?: number | undefined;
|
814
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
815
|
+
}>>;
|
813
816
|
}>, "strip", z.ZodTypeAny, {
|
814
817
|
type: "SIGNATURE";
|
815
818
|
id: string;
|
816
819
|
label: TranslationConfig;
|
820
|
+
configuration: {
|
821
|
+
maxFileSize: number;
|
822
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
823
|
+
};
|
817
824
|
signaturePromptLabel: TranslationConfig;
|
818
825
|
validation?: {
|
819
826
|
message: TranslationConfig;
|
@@ -836,10 +843,6 @@ declare const SignatureField: z.ZodObject<z.objectUtil.extendShape<{
|
|
836
843
|
hidden?: boolean | undefined;
|
837
844
|
placeholder?: TranslationConfig | undefined;
|
838
845
|
hideLabel?: boolean | undefined;
|
839
|
-
configuration?: {
|
840
|
-
maxSizeMb?: number | undefined;
|
841
|
-
allowedFileFormats?: string[] | undefined;
|
842
|
-
} | undefined;
|
843
846
|
}, {
|
844
847
|
type: "SIGNATURE";
|
845
848
|
id: string;
|
@@ -883,8 +886,8 @@ declare const SignatureField: z.ZodObject<z.objectUtil.extendShape<{
|
|
883
886
|
} | undefined;
|
884
887
|
hideLabel?: boolean | undefined;
|
885
888
|
configuration?: {
|
886
|
-
|
887
|
-
|
889
|
+
maxFileSize?: number | undefined;
|
890
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
888
891
|
} | undefined;
|
889
892
|
}>;
|
890
893
|
export type SignatureField = z.infer<typeof SignatureField>;
|
@@ -1491,32 +1494,40 @@ declare const File: z.ZodObject<z.objectUtil.extendShape<{
|
|
1491
1494
|
hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
1492
1495
|
}, {
|
1493
1496
|
type: z.ZodLiteral<"FILE">;
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
+
configuration: z.ZodDefault<z.ZodObject<{
|
1498
|
+
maxFileSize: z.ZodDefault<z.ZodNumber>;
|
1499
|
+
acceptedFileTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>, "many">>;
|
1500
|
+
style: z.ZodOptional<z.ZodObject<{
|
1501
|
+
width: z.ZodOptional<z.ZodEnum<["full", "auto"]>>;
|
1497
1502
|
}, "strip", z.ZodTypeAny, {
|
1498
|
-
|
1503
|
+
width?: "full" | "auto" | undefined;
|
1499
1504
|
}, {
|
1500
|
-
|
1501
|
-
}
|
1505
|
+
width?: "full" | "auto" | undefined;
|
1506
|
+
}>>;
|
1502
1507
|
}, "strip", z.ZodTypeAny, {
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1508
|
+
maxFileSize: number;
|
1509
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
1510
|
+
style?: {
|
1511
|
+
width?: "full" | "auto" | undefined;
|
1512
|
+
} | undefined;
|
1506
1513
|
}, {
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1514
|
+
maxFileSize?: number | undefined;
|
1515
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
1516
|
+
style?: {
|
1517
|
+
width?: "full" | "auto" | undefined;
|
1518
|
+
} | undefined;
|
1510
1519
|
}>>;
|
1511
1520
|
}>, "strip", z.ZodTypeAny, {
|
1512
1521
|
type: "FILE";
|
1513
1522
|
id: string;
|
1514
1523
|
label: TranslationConfig;
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1524
|
+
configuration: {
|
1525
|
+
maxFileSize: number;
|
1526
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
1527
|
+
style?: {
|
1528
|
+
width?: "full" | "auto" | undefined;
|
1529
|
+
} | undefined;
|
1530
|
+
};
|
1520
1531
|
validation?: {
|
1521
1532
|
message: TranslationConfig;
|
1522
1533
|
validator: import(".").JSONSchema;
|
@@ -1546,11 +1557,6 @@ declare const File: z.ZodObject<z.objectUtil.extendShape<{
|
|
1546
1557
|
description: string;
|
1547
1558
|
defaultMessage: string;
|
1548
1559
|
};
|
1549
|
-
options?: {
|
1550
|
-
style: {
|
1551
|
-
fullWidth: boolean;
|
1552
|
-
};
|
1553
|
-
} | undefined;
|
1554
1560
|
validation?: {
|
1555
1561
|
message: {
|
1556
1562
|
id: string;
|
@@ -1580,6 +1586,13 @@ declare const File: z.ZodObject<z.objectUtil.extendShape<{
|
|
1580
1586
|
defaultMessage: string;
|
1581
1587
|
} | undefined;
|
1582
1588
|
hideLabel?: boolean | undefined;
|
1589
|
+
configuration?: {
|
1590
|
+
maxFileSize?: number | undefined;
|
1591
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
1592
|
+
style?: {
|
1593
|
+
width?: "full" | "auto" | undefined;
|
1594
|
+
} | undefined;
|
1595
|
+
} | undefined;
|
1583
1596
|
}>;
|
1584
1597
|
export type File = z.infer<typeof File>;
|
1585
1598
|
declare const SelectOption: z.ZodObject<{
|
@@ -2682,6 +2695,16 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
2682
2695
|
defaultMessage: string;
|
2683
2696
|
};
|
2684
2697
|
}>, "many">;
|
2698
|
+
configuration: z.ZodDefault<z.ZodObject<{
|
2699
|
+
maxFileSize: z.ZodDefault<z.ZodNumber>;
|
2700
|
+
acceptedFileTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["image/png", "image/jpg", "image/jpeg", "image/svg+xml"]>, "many">>;
|
2701
|
+
}, "strip", z.ZodTypeAny, {
|
2702
|
+
maxFileSize: number;
|
2703
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
2704
|
+
}, {
|
2705
|
+
maxFileSize?: number | undefined;
|
2706
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
2707
|
+
}>>;
|
2685
2708
|
}>, "strip", z.ZodTypeAny, {
|
2686
2709
|
type: "FILE_WITH_OPTIONS";
|
2687
2710
|
id: string;
|
@@ -2690,6 +2713,10 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
2690
2713
|
label: TranslationConfig;
|
2691
2714
|
}[];
|
2692
2715
|
label: TranslationConfig;
|
2716
|
+
configuration: {
|
2717
|
+
maxFileSize: number;
|
2718
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
2719
|
+
};
|
2693
2720
|
validation?: {
|
2694
2721
|
message: TranslationConfig;
|
2695
2722
|
validator: import(".").JSONSchema;
|
@@ -2756,6 +2783,10 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
2756
2783
|
defaultMessage: string;
|
2757
2784
|
} | undefined;
|
2758
2785
|
hideLabel?: boolean | undefined;
|
2786
|
+
configuration?: {
|
2787
|
+
maxFileSize?: number | undefined;
|
2788
|
+
acceptedFileTypes?: ("image/png" | "image/jpg" | "image/jpeg" | "image/svg+xml")[] | undefined;
|
2789
|
+
} | undefined;
|
2759
2790
|
}>;
|
2760
2791
|
export type FileUploadWithOptions = z.infer<typeof FileUploadWithOptions>;
|
2761
2792
|
declare const Facility: z.ZodObject<z.objectUtil.extendShape<{
|
@@ -3050,8 +3081,9 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3050
3081
|
hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
3051
3082
|
}, {
|
3052
3083
|
type: z.ZodLiteral<"ADDRESS">;
|
3053
|
-
defaultValue: z.ZodOptional<z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
3084
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodDiscriminatedUnion<"urbanOrRural", [z.ZodObject<z.objectUtil.extendShape<{
|
3054
3085
|
country: z.ZodString;
|
3086
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
3055
3087
|
province: z.ZodString;
|
3056
3088
|
district: z.ZodString;
|
3057
3089
|
}, {
|
@@ -3064,6 +3096,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3064
3096
|
}>, "strip", z.ZodTypeAny, {
|
3065
3097
|
country: string;
|
3066
3098
|
district: string;
|
3099
|
+
addressType: "DOMESTIC";
|
3067
3100
|
province: string;
|
3068
3101
|
urbanOrRural: "URBAN";
|
3069
3102
|
number?: string | undefined;
|
@@ -3074,6 +3107,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3074
3107
|
}, {
|
3075
3108
|
country: string;
|
3076
3109
|
district: string;
|
3110
|
+
addressType: "DOMESTIC";
|
3077
3111
|
province: string;
|
3078
3112
|
urbanOrRural: "URBAN";
|
3079
3113
|
number?: string | undefined;
|
@@ -3083,6 +3117,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3083
3117
|
zipCode?: string | undefined;
|
3084
3118
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
3085
3119
|
country: z.ZodString;
|
3120
|
+
addressType: z.ZodLiteral<"DOMESTIC">;
|
3086
3121
|
province: z.ZodString;
|
3087
3122
|
district: z.ZodString;
|
3088
3123
|
}, {
|
@@ -3091,15 +3126,47 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3091
3126
|
}>, "strip", z.ZodTypeAny, {
|
3092
3127
|
country: string;
|
3093
3128
|
district: string;
|
3129
|
+
addressType: "DOMESTIC";
|
3094
3130
|
province: string;
|
3095
3131
|
urbanOrRural: "RURAL";
|
3096
3132
|
village?: string | undefined;
|
3097
3133
|
}, {
|
3098
3134
|
country: string;
|
3099
3135
|
district: string;
|
3136
|
+
addressType: "DOMESTIC";
|
3100
3137
|
province: string;
|
3101
3138
|
urbanOrRural: "RURAL";
|
3102
3139
|
village?: string | undefined;
|
3140
|
+
}>]>, z.ZodObject<{
|
3141
|
+
country: z.ZodString;
|
3142
|
+
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
3143
|
+
state: z.ZodString;
|
3144
|
+
district2: z.ZodString;
|
3145
|
+
cityOrTown: z.ZodOptional<z.ZodString>;
|
3146
|
+
addressLine1: z.ZodOptional<z.ZodString>;
|
3147
|
+
addressLine2: z.ZodOptional<z.ZodString>;
|
3148
|
+
addressLine3: z.ZodOptional<z.ZodString>;
|
3149
|
+
postcodeOrZip: z.ZodOptional<z.ZodString>;
|
3150
|
+
}, "strip", z.ZodTypeAny, {
|
3151
|
+
country: string;
|
3152
|
+
state: string;
|
3153
|
+
addressType: "INTERNATIONAL";
|
3154
|
+
district2: string;
|
3155
|
+
cityOrTown?: string | undefined;
|
3156
|
+
addressLine1?: string | undefined;
|
3157
|
+
addressLine2?: string | undefined;
|
3158
|
+
addressLine3?: string | undefined;
|
3159
|
+
postcodeOrZip?: string | undefined;
|
3160
|
+
}, {
|
3161
|
+
country: string;
|
3162
|
+
state: string;
|
3163
|
+
addressType: "INTERNATIONAL";
|
3164
|
+
district2: string;
|
3165
|
+
cityOrTown?: string | undefined;
|
3166
|
+
addressLine1?: string | undefined;
|
3167
|
+
addressLine2?: string | undefined;
|
3168
|
+
addressLine3?: string | undefined;
|
3169
|
+
postcodeOrZip?: string | undefined;
|
3103
3170
|
}>]>>;
|
3104
3171
|
}>, "strip", z.ZodTypeAny, {
|
3105
3172
|
type: "ADDRESS";
|
@@ -3114,6 +3181,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3114
3181
|
defaultValue?: {
|
3115
3182
|
country: string;
|
3116
3183
|
district: string;
|
3184
|
+
addressType: "DOMESTIC";
|
3117
3185
|
province: string;
|
3118
3186
|
urbanOrRural: "URBAN";
|
3119
3187
|
number?: string | undefined;
|
@@ -3124,9 +3192,20 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3124
3192
|
} | {
|
3125
3193
|
country: string;
|
3126
3194
|
district: string;
|
3195
|
+
addressType: "DOMESTIC";
|
3127
3196
|
province: string;
|
3128
3197
|
urbanOrRural: "RURAL";
|
3129
3198
|
village?: string | undefined;
|
3199
|
+
} | {
|
3200
|
+
country: string;
|
3201
|
+
state: string;
|
3202
|
+
addressType: "INTERNATIONAL";
|
3203
|
+
district2: string;
|
3204
|
+
cityOrTown?: string | undefined;
|
3205
|
+
addressLine1?: string | undefined;
|
3206
|
+
addressLine2?: string | undefined;
|
3207
|
+
addressLine3?: string | undefined;
|
3208
|
+
postcodeOrZip?: string | undefined;
|
3130
3209
|
} | undefined;
|
3131
3210
|
conditionals?: ({
|
3132
3211
|
type: "SHOW";
|
@@ -3160,6 +3239,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3160
3239
|
defaultValue?: {
|
3161
3240
|
country: string;
|
3162
3241
|
district: string;
|
3242
|
+
addressType: "DOMESTIC";
|
3163
3243
|
province: string;
|
3164
3244
|
urbanOrRural: "URBAN";
|
3165
3245
|
number?: string | undefined;
|
@@ -3170,9 +3250,175 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3170
3250
|
} | {
|
3171
3251
|
country: string;
|
3172
3252
|
district: string;
|
3253
|
+
addressType: "DOMESTIC";
|
3173
3254
|
province: string;
|
3174
3255
|
urbanOrRural: "RURAL";
|
3175
3256
|
village?: string | undefined;
|
3257
|
+
} | {
|
3258
|
+
country: string;
|
3259
|
+
state: string;
|
3260
|
+
addressType: "INTERNATIONAL";
|
3261
|
+
district2: string;
|
3262
|
+
cityOrTown?: string | undefined;
|
3263
|
+
addressLine1?: string | undefined;
|
3264
|
+
addressLine2?: string | undefined;
|
3265
|
+
addressLine3?: string | undefined;
|
3266
|
+
postcodeOrZip?: string | undefined;
|
3267
|
+
} | undefined;
|
3268
|
+
conditionals?: ({
|
3269
|
+
type: "SHOW";
|
3270
|
+
conditional: import(".").JSONSchema;
|
3271
|
+
} | {
|
3272
|
+
type: "ENABLE";
|
3273
|
+
conditional: import(".").JSONSchema;
|
3274
|
+
})[] | undefined;
|
3275
|
+
disabled?: boolean | undefined;
|
3276
|
+
hidden?: boolean | undefined;
|
3277
|
+
placeholder?: {
|
3278
|
+
id: string;
|
3279
|
+
description: string;
|
3280
|
+
defaultMessage: string;
|
3281
|
+
} | undefined;
|
3282
|
+
hideLabel?: boolean | undefined;
|
3283
|
+
}>;
|
3284
|
+
declare const DataField: z.ZodObject<z.objectUtil.extendShape<{
|
3285
|
+
id: z.ZodString;
|
3286
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodObject<{
|
3287
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
3288
|
+
expression: z.ZodString;
|
3289
|
+
}, "strip", z.ZodTypeAny, {
|
3290
|
+
dependsOn: string[];
|
3291
|
+
expression: string;
|
3292
|
+
}, {
|
3293
|
+
expression: string;
|
3294
|
+
dependsOn?: string[] | undefined;
|
3295
|
+
}>]>>;
|
3296
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").AllActionConditionalFields[]>, "many">>>;
|
3297
|
+
required: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
3298
|
+
disabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
3299
|
+
hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
3300
|
+
placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
3301
|
+
id: string;
|
3302
|
+
description: string;
|
3303
|
+
defaultMessage: string;
|
3304
|
+
}>>;
|
3305
|
+
validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
3306
|
+
validator: z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>;
|
3307
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
3308
|
+
id: string;
|
3309
|
+
description: string;
|
3310
|
+
defaultMessage: string;
|
3311
|
+
}>;
|
3312
|
+
}, "strip", z.ZodTypeAny, {
|
3313
|
+
message: TranslationConfig;
|
3314
|
+
validator: import(".").JSONSchema;
|
3315
|
+
}, {
|
3316
|
+
message: {
|
3317
|
+
id: string;
|
3318
|
+
description: string;
|
3319
|
+
defaultMessage: string;
|
3320
|
+
};
|
3321
|
+
validator: import(".").JSONSchema;
|
3322
|
+
}>, "many">>>;
|
3323
|
+
dependsOn: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
3324
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
3325
|
+
id: string;
|
3326
|
+
description: string;
|
3327
|
+
defaultMessage: string;
|
3328
|
+
}>;
|
3329
|
+
hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
3330
|
+
}, {
|
3331
|
+
type: z.ZodLiteral<"DATA">;
|
3332
|
+
configuration: z.ZodObject<{
|
3333
|
+
subtitle: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
3334
|
+
id: string;
|
3335
|
+
description: string;
|
3336
|
+
defaultMessage: string;
|
3337
|
+
}>>;
|
3338
|
+
data: z.ZodArray<z.ZodObject<{
|
3339
|
+
fieldId: z.ZodString;
|
3340
|
+
}, "strip", z.ZodTypeAny, {
|
3341
|
+
fieldId: string;
|
3342
|
+
}, {
|
3343
|
+
fieldId: string;
|
3344
|
+
}>, "many">;
|
3345
|
+
}, "strip", z.ZodTypeAny, {
|
3346
|
+
data: {
|
3347
|
+
fieldId: string;
|
3348
|
+
}[];
|
3349
|
+
subtitle?: TranslationConfig | undefined;
|
3350
|
+
}, {
|
3351
|
+
data: {
|
3352
|
+
fieldId: string;
|
3353
|
+
}[];
|
3354
|
+
subtitle?: {
|
3355
|
+
id: string;
|
3356
|
+
description: string;
|
3357
|
+
defaultMessage: string;
|
3358
|
+
} | undefined;
|
3359
|
+
}>;
|
3360
|
+
}>, "strip", z.ZodTypeAny, {
|
3361
|
+
type: "DATA";
|
3362
|
+
id: string;
|
3363
|
+
label: TranslationConfig;
|
3364
|
+
configuration: {
|
3365
|
+
data: {
|
3366
|
+
fieldId: string;
|
3367
|
+
}[];
|
3368
|
+
subtitle?: TranslationConfig | undefined;
|
3369
|
+
};
|
3370
|
+
validation?: {
|
3371
|
+
message: TranslationConfig;
|
3372
|
+
validator: import(".").JSONSchema;
|
3373
|
+
}[] | undefined;
|
3374
|
+
required?: boolean | undefined;
|
3375
|
+
dependsOn?: string[] | undefined;
|
3376
|
+
defaultValue?: string | number | boolean | {
|
3377
|
+
dependsOn: string[];
|
3378
|
+
expression: string;
|
3379
|
+
} | undefined;
|
3380
|
+
conditionals?: ({
|
3381
|
+
type: "SHOW";
|
3382
|
+
conditional: import(".").JSONSchema;
|
3383
|
+
} | {
|
3384
|
+
type: "ENABLE";
|
3385
|
+
conditional: import(".").JSONSchema;
|
3386
|
+
})[] | undefined;
|
3387
|
+
disabled?: boolean | undefined;
|
3388
|
+
hidden?: boolean | undefined;
|
3389
|
+
placeholder?: TranslationConfig | undefined;
|
3390
|
+
hideLabel?: boolean | undefined;
|
3391
|
+
}, {
|
3392
|
+
type: "DATA";
|
3393
|
+
id: string;
|
3394
|
+
label: {
|
3395
|
+
id: string;
|
3396
|
+
description: string;
|
3397
|
+
defaultMessage: string;
|
3398
|
+
};
|
3399
|
+
configuration: {
|
3400
|
+
data: {
|
3401
|
+
fieldId: string;
|
3402
|
+
}[];
|
3403
|
+
subtitle?: {
|
3404
|
+
id: string;
|
3405
|
+
description: string;
|
3406
|
+
defaultMessage: string;
|
3407
|
+
} | undefined;
|
3408
|
+
};
|
3409
|
+
validation?: {
|
3410
|
+
message: {
|
3411
|
+
id: string;
|
3412
|
+
description: string;
|
3413
|
+
defaultMessage: string;
|
3414
|
+
};
|
3415
|
+
validator: import(".").JSONSchema;
|
3416
|
+
}[] | undefined;
|
3417
|
+
required?: boolean | undefined;
|
3418
|
+
dependsOn?: string[] | undefined;
|
3419
|
+
defaultValue?: string | number | boolean | {
|
3420
|
+
expression: string;
|
3421
|
+
dependsOn?: string[] | undefined;
|
3176
3422
|
} | undefined;
|
3177
3423
|
conditionals?: ({
|
3178
3424
|
type: "SHOW";
|
@@ -3190,11 +3436,17 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
3190
3436
|
} | undefined;
|
3191
3437
|
hideLabel?: boolean | undefined;
|
3192
3438
|
}>;
|
3439
|
+
export type DataField = z.infer<typeof DataField>;
|
3440
|
+
/** @knipignore */
|
3441
|
+
export type AllFields = typeof Address | typeof TextField | typeof NumberField | typeof TextAreaField | typeof DateField | typeof Paragraph | typeof RadioGroup | typeof BulletList | typeof PageHeader | typeof Select | typeof Checkbox | typeof File | typeof Country | typeof AdministrativeArea | typeof Divider | typeof Location | typeof Facility | typeof Office | typeof SignatureField | typeof EmailField | typeof FileUploadWithOptions | typeof DataField;
|
3193
3442
|
/** @knipignore */
|
3194
|
-
export type
|
3443
|
+
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 Paragraph> | z.infer<typeof RadioGroup> | z.infer<typeof BulletList> | z.infer<typeof PageHeader> | z.infer<typeof Select> | 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>;
|
3195
3444
|
/** @knipignore */
|
3196
|
-
|
3197
|
-
|
3445
|
+
/**
|
3446
|
+
* This is the type that should be used for the input of the FieldConfig. Useful when config uses zod defaults.
|
3447
|
+
*/
|
3448
|
+
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 Paragraph> | z.input<typeof RadioGroup> | z.input<typeof BulletList> | z.input<typeof PageHeader> | z.input<typeof Select> | 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>;
|
3449
|
+
export declare const FieldConfig: z.ZodType<Inferred, any, InferredInput>;
|
3198
3450
|
export type SelectField = z.infer<typeof Select>;
|
3199
3451
|
export type LocationField = z.infer<typeof Location>;
|
3200
3452
|
export type RadioField = z.infer<typeof RadioGroup>;
|
@@ -21,8 +21,9 @@ export declare const FieldType: {
|
|
21
21
|
readonly FACILITY: "FACILITY";
|
22
22
|
readonly OFFICE: "OFFICE";
|
23
23
|
readonly SIGNATURE: "SIGNATURE";
|
24
|
+
readonly DATA: "DATA";
|
24
25
|
};
|
25
|
-
export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "HIDDEN" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE")[];
|
26
|
+
export declare const fieldTypes: ("ADDRESS" | "TEXT" | "NUMBER" | "TEXTAREA" | "EMAIL" | "DATE" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "HIDDEN" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA")[];
|
26
27
|
export type FieldType = (typeof fieldTypes)[number];
|
27
28
|
/**
|
28
29
|
* Composite field types are field types that consist of multiple field values.
|