@opencrvs/toolkit 1.9.12-rc.d22cc55 → 1.9.12-rc.dcd12a4
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 +14 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +258 -0
- package/dist/commons/events/EventConfig.d.ts +170 -0
- package/dist/commons/events/FieldConfig.d.ts +215 -15
- package/dist/commons/events/defineConfig.d.ts +14 -0
- package/dist/commons/events/utils.d.ts +14 -0
- package/dist/events/index.js +14 -24
- package/dist/notification/index.js +14 -24
- package/package.json +1 -1
|
@@ -3456,9 +3456,17 @@ export declare const SelectOption: z.ZodObject<{
|
|
|
3456
3456
|
description: string;
|
|
3457
3457
|
defaultMessage: string;
|
|
3458
3458
|
}>]>;
|
|
3459
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
3459
3460
|
}, "strip", z.ZodTypeAny, {
|
|
3460
3461
|
value: string;
|
|
3461
3462
|
label: string | TranslationConfig;
|
|
3463
|
+
conditionals?: ({
|
|
3464
|
+
type: "SHOW";
|
|
3465
|
+
conditional: JSONSchema;
|
|
3466
|
+
} | {
|
|
3467
|
+
type: "ENABLE";
|
|
3468
|
+
conditional: JSONSchema;
|
|
3469
|
+
})[] | undefined;
|
|
3462
3470
|
}, {
|
|
3463
3471
|
value: string;
|
|
3464
3472
|
label: string | {
|
|
@@ -3466,6 +3474,13 @@ export declare const SelectOption: z.ZodObject<{
|
|
|
3466
3474
|
description: string;
|
|
3467
3475
|
defaultMessage: string;
|
|
3468
3476
|
};
|
|
3477
|
+
conditionals?: ({
|
|
3478
|
+
type: "SHOW";
|
|
3479
|
+
conditional: JSONSchema;
|
|
3480
|
+
} | {
|
|
3481
|
+
type: "ENABLE";
|
|
3482
|
+
conditional: JSONSchema;
|
|
3483
|
+
})[] | undefined;
|
|
3469
3484
|
}>;
|
|
3470
3485
|
declare const NumberWithUnitField: z.ZodObject<z.objectUtil.extendShape<{
|
|
3471
3486
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -3579,9 +3594,17 @@ declare const NumberWithUnitField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3579
3594
|
description: string;
|
|
3580
3595
|
defaultMessage: string;
|
|
3581
3596
|
}>]>;
|
|
3597
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
3582
3598
|
}, "strip", z.ZodTypeAny, {
|
|
3583
3599
|
value: string;
|
|
3584
3600
|
label: string | TranslationConfig;
|
|
3601
|
+
conditionals?: ({
|
|
3602
|
+
type: "SHOW";
|
|
3603
|
+
conditional: JSONSchema;
|
|
3604
|
+
} | {
|
|
3605
|
+
type: "ENABLE";
|
|
3606
|
+
conditional: JSONSchema;
|
|
3607
|
+
})[] | undefined;
|
|
3585
3608
|
}, {
|
|
3586
3609
|
value: string;
|
|
3587
3610
|
label: string | {
|
|
@@ -3589,6 +3612,13 @@ declare const NumberWithUnitField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3589
3612
|
description: string;
|
|
3590
3613
|
defaultMessage: string;
|
|
3591
3614
|
};
|
|
3615
|
+
conditionals?: ({
|
|
3616
|
+
type: "SHOW";
|
|
3617
|
+
conditional: JSONSchema;
|
|
3618
|
+
} | {
|
|
3619
|
+
type: "ENABLE";
|
|
3620
|
+
conditional: JSONSchema;
|
|
3621
|
+
})[] | undefined;
|
|
3592
3622
|
}>, "many">;
|
|
3593
3623
|
configuration: z.ZodOptional<z.ZodObject<{
|
|
3594
3624
|
min: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3617,6 +3647,13 @@ declare const NumberWithUnitField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3617
3647
|
options: {
|
|
3618
3648
|
value: string;
|
|
3619
3649
|
label: string | TranslationConfig;
|
|
3650
|
+
conditionals?: ({
|
|
3651
|
+
type: "SHOW";
|
|
3652
|
+
conditional: JSONSchema;
|
|
3653
|
+
} | {
|
|
3654
|
+
type: "ENABLE";
|
|
3655
|
+
conditional: JSONSchema;
|
|
3656
|
+
})[] | undefined;
|
|
3620
3657
|
}[];
|
|
3621
3658
|
label: TranslationConfig;
|
|
3622
3659
|
parent?: {
|
|
@@ -3675,6 +3712,13 @@ declare const NumberWithUnitField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3675
3712
|
description: string;
|
|
3676
3713
|
defaultMessage: string;
|
|
3677
3714
|
};
|
|
3715
|
+
conditionals?: ({
|
|
3716
|
+
type: "SHOW";
|
|
3717
|
+
conditional: JSONSchema;
|
|
3718
|
+
} | {
|
|
3719
|
+
type: "ENABLE";
|
|
3720
|
+
conditional: JSONSchema;
|
|
3721
|
+
})[] | undefined;
|
|
3678
3722
|
}[];
|
|
3679
3723
|
label: {
|
|
3680
3724
|
id: string;
|
|
@@ -3851,9 +3895,17 @@ declare const RadioGroup: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3851
3895
|
description: string;
|
|
3852
3896
|
defaultMessage: string;
|
|
3853
3897
|
}>]>;
|
|
3898
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
3854
3899
|
}, "strip", z.ZodTypeAny, {
|
|
3855
3900
|
value: string;
|
|
3856
3901
|
label: string | TranslationConfig;
|
|
3902
|
+
conditionals?: ({
|
|
3903
|
+
type: "SHOW";
|
|
3904
|
+
conditional: JSONSchema;
|
|
3905
|
+
} | {
|
|
3906
|
+
type: "ENABLE";
|
|
3907
|
+
conditional: JSONSchema;
|
|
3908
|
+
})[] | undefined;
|
|
3857
3909
|
}, {
|
|
3858
3910
|
value: string;
|
|
3859
3911
|
label: string | {
|
|
@@ -3861,6 +3913,13 @@ declare const RadioGroup: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3861
3913
|
description: string;
|
|
3862
3914
|
defaultMessage: string;
|
|
3863
3915
|
};
|
|
3916
|
+
conditionals?: ({
|
|
3917
|
+
type: "SHOW";
|
|
3918
|
+
conditional: JSONSchema;
|
|
3919
|
+
} | {
|
|
3920
|
+
type: "ENABLE";
|
|
3921
|
+
conditional: JSONSchema;
|
|
3922
|
+
})[] | undefined;
|
|
3864
3923
|
}>, "many">;
|
|
3865
3924
|
configuration: z.ZodOptional<z.ZodObject<{
|
|
3866
3925
|
styles: z.ZodOptional<z.ZodObject<{
|
|
@@ -3885,6 +3944,13 @@ declare const RadioGroup: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3885
3944
|
options: {
|
|
3886
3945
|
value: string;
|
|
3887
3946
|
label: string | TranslationConfig;
|
|
3947
|
+
conditionals?: ({
|
|
3948
|
+
type: "SHOW";
|
|
3949
|
+
conditional: JSONSchema;
|
|
3950
|
+
} | {
|
|
3951
|
+
type: "ENABLE";
|
|
3952
|
+
conditional: JSONSchema;
|
|
3953
|
+
})[] | undefined;
|
|
3888
3954
|
}[];
|
|
3889
3955
|
label: TranslationConfig;
|
|
3890
3956
|
parent?: {
|
|
@@ -3940,6 +4006,13 @@ declare const RadioGroup: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
3940
4006
|
description: string;
|
|
3941
4007
|
defaultMessage: string;
|
|
3942
4008
|
};
|
|
4009
|
+
conditionals?: ({
|
|
4010
|
+
type: "SHOW";
|
|
4011
|
+
conditional: JSONSchema;
|
|
4012
|
+
} | {
|
|
4013
|
+
type: "ENABLE";
|
|
4014
|
+
conditional: JSONSchema;
|
|
4015
|
+
})[] | undefined;
|
|
3943
4016
|
}[];
|
|
3944
4017
|
label: {
|
|
3945
4018
|
id: string;
|
|
@@ -4350,9 +4423,17 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4350
4423
|
description: string;
|
|
4351
4424
|
defaultMessage: string;
|
|
4352
4425
|
}>]>;
|
|
4426
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
4353
4427
|
}, "strip", z.ZodTypeAny, {
|
|
4354
4428
|
value: string;
|
|
4355
4429
|
label: string | TranslationConfig;
|
|
4430
|
+
conditionals?: ({
|
|
4431
|
+
type: "SHOW";
|
|
4432
|
+
conditional: JSONSchema;
|
|
4433
|
+
} | {
|
|
4434
|
+
type: "ENABLE";
|
|
4435
|
+
conditional: JSONSchema;
|
|
4436
|
+
})[] | undefined;
|
|
4356
4437
|
}, {
|
|
4357
4438
|
value: string;
|
|
4358
4439
|
label: string | {
|
|
@@ -4360,6 +4441,13 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4360
4441
|
description: string;
|
|
4361
4442
|
defaultMessage: string;
|
|
4362
4443
|
};
|
|
4444
|
+
conditionals?: ({
|
|
4445
|
+
type: "SHOW";
|
|
4446
|
+
conditional: JSONSchema;
|
|
4447
|
+
} | {
|
|
4448
|
+
type: "ENABLE";
|
|
4449
|
+
conditional: JSONSchema;
|
|
4450
|
+
})[] | undefined;
|
|
4363
4451
|
}>, "many">;
|
|
4364
4452
|
noOptionsMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
4365
4453
|
id: string;
|
|
@@ -4372,6 +4460,13 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4372
4460
|
options: {
|
|
4373
4461
|
value: string;
|
|
4374
4462
|
label: string | TranslationConfig;
|
|
4463
|
+
conditionals?: ({
|
|
4464
|
+
type: "SHOW";
|
|
4465
|
+
conditional: JSONSchema;
|
|
4466
|
+
} | {
|
|
4467
|
+
type: "ENABLE";
|
|
4468
|
+
conditional: JSONSchema;
|
|
4469
|
+
})[] | undefined;
|
|
4375
4470
|
}[];
|
|
4376
4471
|
label: TranslationConfig;
|
|
4377
4472
|
parent?: {
|
|
@@ -4423,6 +4518,13 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4423
4518
|
description: string;
|
|
4424
4519
|
defaultMessage: string;
|
|
4425
4520
|
};
|
|
4521
|
+
conditionals?: ({
|
|
4522
|
+
type: "SHOW";
|
|
4523
|
+
conditional: JSONSchema;
|
|
4524
|
+
} | {
|
|
4525
|
+
type: "ENABLE";
|
|
4526
|
+
conditional: JSONSchema;
|
|
4527
|
+
})[] | undefined;
|
|
4426
4528
|
}[];
|
|
4427
4529
|
label: {
|
|
4428
4530
|
id: string;
|
|
@@ -6281,6 +6383,33 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6281
6383
|
}, {
|
|
6282
6384
|
type: z.ZodLiteral<"COUNTRY">;
|
|
6283
6385
|
defaultValue: z.ZodOptional<z.ZodString>;
|
|
6386
|
+
optionOverrides: z.ZodOptional<z.ZodArray<z.ZodObject<Omit<{
|
|
6387
|
+
value: z.ZodString;
|
|
6388
|
+
label: z.ZodUnion<[z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
6389
|
+
id: string;
|
|
6390
|
+
description: string;
|
|
6391
|
+
defaultMessage: string;
|
|
6392
|
+
}>]>;
|
|
6393
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
6394
|
+
}, "label">, "strip", z.ZodTypeAny, {
|
|
6395
|
+
value: string;
|
|
6396
|
+
conditionals?: ({
|
|
6397
|
+
type: "SHOW";
|
|
6398
|
+
conditional: JSONSchema;
|
|
6399
|
+
} | {
|
|
6400
|
+
type: "ENABLE";
|
|
6401
|
+
conditional: JSONSchema;
|
|
6402
|
+
})[] | undefined;
|
|
6403
|
+
}, {
|
|
6404
|
+
value: string;
|
|
6405
|
+
conditionals?: ({
|
|
6406
|
+
type: "SHOW";
|
|
6407
|
+
conditional: JSONSchema;
|
|
6408
|
+
} | {
|
|
6409
|
+
type: "ENABLE";
|
|
6410
|
+
conditional: JSONSchema;
|
|
6411
|
+
})[] | undefined;
|
|
6412
|
+
}>, "many">>;
|
|
6284
6413
|
}>, "strip", z.ZodTypeAny, {
|
|
6285
6414
|
type: "COUNTRY";
|
|
6286
6415
|
id: string;
|
|
@@ -6323,6 +6452,16 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6323
6452
|
uncorrectable?: boolean | undefined;
|
|
6324
6453
|
analytics?: boolean | undefined;
|
|
6325
6454
|
defaultValue?: string | undefined;
|
|
6455
|
+
optionOverrides?: {
|
|
6456
|
+
value: string;
|
|
6457
|
+
conditionals?: ({
|
|
6458
|
+
type: "SHOW";
|
|
6459
|
+
conditional: JSONSchema;
|
|
6460
|
+
} | {
|
|
6461
|
+
type: "ENABLE";
|
|
6462
|
+
conditional: JSONSchema;
|
|
6463
|
+
})[] | undefined;
|
|
6464
|
+
}[] | undefined;
|
|
6326
6465
|
}, {
|
|
6327
6466
|
type: "COUNTRY";
|
|
6328
6467
|
id: string;
|
|
@@ -6385,6 +6524,16 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6385
6524
|
uncorrectable?: boolean | undefined;
|
|
6386
6525
|
analytics?: boolean | undefined;
|
|
6387
6526
|
defaultValue?: string | undefined;
|
|
6527
|
+
optionOverrides?: {
|
|
6528
|
+
value: string;
|
|
6529
|
+
conditionals?: ({
|
|
6530
|
+
type: "SHOW";
|
|
6531
|
+
conditional: JSONSchema;
|
|
6532
|
+
} | {
|
|
6533
|
+
type: "ENABLE";
|
|
6534
|
+
conditional: JSONSchema;
|
|
6535
|
+
})[] | undefined;
|
|
6536
|
+
}[] | undefined;
|
|
6388
6537
|
}>;
|
|
6389
6538
|
export type Country = z.infer<typeof Country>;
|
|
6390
6539
|
export declare const AdministrativeAreas: z.ZodEnum<["ADMIN_STRUCTURE", "HEALTH_FACILITY", "CRVS_OFFICE"]>;
|
|
@@ -6986,9 +7135,17 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6986
7135
|
description: string;
|
|
6987
7136
|
defaultMessage: string;
|
|
6988
7137
|
}>]>;
|
|
7138
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
6989
7139
|
}, "strip", z.ZodTypeAny, {
|
|
6990
7140
|
value: string;
|
|
6991
7141
|
label: string | TranslationConfig;
|
|
7142
|
+
conditionals?: ({
|
|
7143
|
+
type: "SHOW";
|
|
7144
|
+
conditional: JSONSchema;
|
|
7145
|
+
} | {
|
|
7146
|
+
type: "ENABLE";
|
|
7147
|
+
conditional: JSONSchema;
|
|
7148
|
+
})[] | undefined;
|
|
6992
7149
|
}, {
|
|
6993
7150
|
value: string;
|
|
6994
7151
|
label: string | {
|
|
@@ -6996,6 +7153,13 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6996
7153
|
description: string;
|
|
6997
7154
|
defaultMessage: string;
|
|
6998
7155
|
};
|
|
7156
|
+
conditionals?: ({
|
|
7157
|
+
type: "SHOW";
|
|
7158
|
+
conditional: JSONSchema;
|
|
7159
|
+
} | {
|
|
7160
|
+
type: "ENABLE";
|
|
7161
|
+
conditional: JSONSchema;
|
|
7162
|
+
})[] | undefined;
|
|
6999
7163
|
}>, "many">;
|
|
7000
7164
|
defaultValue: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7001
7165
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -7063,6 +7227,13 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7063
7227
|
options: {
|
|
7064
7228
|
value: string;
|
|
7065
7229
|
label: string | TranslationConfig;
|
|
7230
|
+
conditionals?: ({
|
|
7231
|
+
type: "SHOW";
|
|
7232
|
+
conditional: JSONSchema;
|
|
7233
|
+
} | {
|
|
7234
|
+
type: "ENABLE";
|
|
7235
|
+
conditional: JSONSchema;
|
|
7236
|
+
})[] | undefined;
|
|
7066
7237
|
}[];
|
|
7067
7238
|
label: TranslationConfig;
|
|
7068
7239
|
configuration: {
|
|
@@ -7128,6 +7299,13 @@ declare const FileUploadWithOptions: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7128
7299
|
description: string;
|
|
7129
7300
|
defaultMessage: string;
|
|
7130
7301
|
};
|
|
7302
|
+
conditionals?: ({
|
|
7303
|
+
type: "SHOW";
|
|
7304
|
+
conditional: JSONSchema;
|
|
7305
|
+
} | {
|
|
7306
|
+
type: "ENABLE";
|
|
7307
|
+
conditional: JSONSchema;
|
|
7308
|
+
})[] | undefined;
|
|
7131
7309
|
}[];
|
|
7132
7310
|
label: {
|
|
7133
7311
|
id: string;
|
|
@@ -7741,7 +7919,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7741
7919
|
type: z.ZodLiteral<"ADDRESS">;
|
|
7742
7920
|
configuration: z.ZodOptional<z.ZodObject<{
|
|
7743
7921
|
lineSeparator: z.ZodOptional<z.ZodString>;
|
|
7744
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.
|
|
7922
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<Pick<{
|
|
7745
7923
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
7746
7924
|
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7747
7925
|
id: string;
|
|
@@ -7834,10 +8012,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7834
8012
|
$$subfield?: string[] | undefined;
|
|
7835
8013
|
}>, "many">]>>;
|
|
7836
8014
|
analytics: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
7837
|
-
}, "id" | "required" | "conditionals">, {
|
|
7838
|
-
type: z.ZodUnion<[z.ZodLiteral<"ADMINISTRATIVE_AREA">, z.ZodLiteral<"COUNTRY">]>;
|
|
7839
|
-
}>, "strip", z.ZodTypeAny, {
|
|
7840
|
-
type: "COUNTRY" | "ADMINISTRATIVE_AREA";
|
|
8015
|
+
}, "id" | "required" | "conditionals">, "strip", z.ZodTypeAny, {
|
|
7841
8016
|
id: string;
|
|
7842
8017
|
required?: boolean | {
|
|
7843
8018
|
message: TranslationConfig;
|
|
@@ -7853,7 +8028,6 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7853
8028
|
conditional: JSONSchema;
|
|
7854
8029
|
})[] | undefined;
|
|
7855
8030
|
}, {
|
|
7856
|
-
type: "COUNTRY" | "ADMINISTRATIVE_AREA";
|
|
7857
8031
|
id: string;
|
|
7858
8032
|
required?: boolean | {
|
|
7859
8033
|
message: {
|
|
@@ -7872,7 +8046,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7872
8046
|
type: "DISPLAY_ON_REVIEW";
|
|
7873
8047
|
conditional: JSONSchema;
|
|
7874
8048
|
})[] | undefined;
|
|
7875
|
-
}
|
|
8049
|
+
}>, {
|
|
7876
8050
|
type: "COUNTRY" | "ADMINISTRATIVE_AREA";
|
|
7877
8051
|
id: string;
|
|
7878
8052
|
required?: boolean | {
|
|
@@ -7888,8 +8062,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7888
8062
|
type: "DISPLAY_ON_REVIEW";
|
|
7889
8063
|
conditional: JSONSchema;
|
|
7890
8064
|
})[] | undefined;
|
|
7891
|
-
},
|
|
7892
|
-
type: "COUNTRY" | "ADMINISTRATIVE_AREA";
|
|
8065
|
+
}, {
|
|
7893
8066
|
id: string;
|
|
7894
8067
|
required?: boolean | {
|
|
7895
8068
|
message: {
|
|
@@ -8037,8 +8210,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8037
8210
|
}[] | undefined;
|
|
8038
8211
|
}, {
|
|
8039
8212
|
lineSeparator?: string | undefined;
|
|
8040
|
-
fields?:
|
|
8041
|
-
type: "COUNTRY" | "ADMINISTRATIVE_AREA";
|
|
8213
|
+
fields?: {
|
|
8042
8214
|
id: string;
|
|
8043
8215
|
required?: boolean | {
|
|
8044
8216
|
message: {
|
|
@@ -8057,7 +8229,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8057
8229
|
type: "DISPLAY_ON_REVIEW";
|
|
8058
8230
|
conditional: JSONSchema;
|
|
8059
8231
|
})[] | undefined;
|
|
8060
|
-
}
|
|
8232
|
+
}[] | undefined;
|
|
8061
8233
|
streetAddressForm?: {
|
|
8062
8234
|
type: "TEXT";
|
|
8063
8235
|
id: string;
|
|
@@ -8287,8 +8459,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8287
8459
|
} | undefined;
|
|
8288
8460
|
configuration?: {
|
|
8289
8461
|
lineSeparator?: string | undefined;
|
|
8290
|
-
fields?:
|
|
8291
|
-
type: "COUNTRY" | "ADMINISTRATIVE_AREA";
|
|
8462
|
+
fields?: {
|
|
8292
8463
|
id: string;
|
|
8293
8464
|
required?: boolean | {
|
|
8294
8465
|
message: {
|
|
@@ -8307,7 +8478,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8307
8478
|
type: "DISPLAY_ON_REVIEW";
|
|
8308
8479
|
conditional: JSONSchema;
|
|
8309
8480
|
})[] | undefined;
|
|
8310
|
-
}
|
|
8481
|
+
}[] | undefined;
|
|
8311
8482
|
streetAddressForm?: {
|
|
8312
8483
|
type: "TEXT";
|
|
8313
8484
|
id: string;
|
|
@@ -12978,9 +13149,17 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
12978
13149
|
description: string;
|
|
12979
13150
|
defaultMessage: string;
|
|
12980
13151
|
}>]>;
|
|
13152
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
12981
13153
|
}, "strip", z.ZodTypeAny, {
|
|
12982
13154
|
value: string;
|
|
12983
13155
|
label: string | TranslationConfig;
|
|
13156
|
+
conditionals?: ({
|
|
13157
|
+
type: "SHOW";
|
|
13158
|
+
conditional: JSONSchema;
|
|
13159
|
+
} | {
|
|
13160
|
+
type: "ENABLE";
|
|
13161
|
+
conditional: JSONSchema;
|
|
13162
|
+
})[] | undefined;
|
|
12984
13163
|
}, {
|
|
12985
13164
|
value: string;
|
|
12986
13165
|
label: string | {
|
|
@@ -12988,6 +13167,13 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
12988
13167
|
description: string;
|
|
12989
13168
|
defaultMessage: string;
|
|
12990
13169
|
};
|
|
13170
|
+
conditionals?: ({
|
|
13171
|
+
type: "SHOW";
|
|
13172
|
+
conditional: JSONSchema;
|
|
13173
|
+
} | {
|
|
13174
|
+
type: "ENABLE";
|
|
13175
|
+
conditional: JSONSchema;
|
|
13176
|
+
})[] | undefined;
|
|
12991
13177
|
}>, "many">;
|
|
12992
13178
|
defaultValue: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
12993
13179
|
path: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -13055,6 +13241,13 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
13055
13241
|
options: {
|
|
13056
13242
|
value: string;
|
|
13057
13243
|
label: string | TranslationConfig;
|
|
13244
|
+
conditionals?: ({
|
|
13245
|
+
type: "SHOW";
|
|
13246
|
+
conditional: JSONSchema;
|
|
13247
|
+
} | {
|
|
13248
|
+
type: "ENABLE";
|
|
13249
|
+
conditional: JSONSchema;
|
|
13250
|
+
})[] | undefined;
|
|
13058
13251
|
}[];
|
|
13059
13252
|
label: TranslationConfig;
|
|
13060
13253
|
configuration: {
|
|
@@ -13120,6 +13313,13 @@ export declare const AnyFileField: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
|
13120
13313
|
description: string;
|
|
13121
13314
|
defaultMessage: string;
|
|
13122
13315
|
};
|
|
13316
|
+
conditionals?: ({
|
|
13317
|
+
type: "SHOW";
|
|
13318
|
+
conditional: JSONSchema;
|
|
13319
|
+
} | {
|
|
13320
|
+
type: "ENABLE";
|
|
13321
|
+
conditional: JSONSchema;
|
|
13322
|
+
})[] | undefined;
|
|
13123
13323
|
}[];
|
|
13124
13324
|
label: {
|
|
13125
13325
|
id: string;
|
|
@@ -176,6 +176,13 @@ export declare const defineConfig: (config: EventConfigInput) => {
|
|
|
176
176
|
options?: {
|
|
177
177
|
value: string;
|
|
178
178
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
179
|
+
conditionals?: ({
|
|
180
|
+
type: "SHOW";
|
|
181
|
+
conditional: import(".").JSONSchema;
|
|
182
|
+
} | {
|
|
183
|
+
type: "ENABLE";
|
|
184
|
+
conditional: import(".").JSONSchema;
|
|
185
|
+
})[] | undefined;
|
|
179
186
|
}[] | undefined;
|
|
180
187
|
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
181
188
|
conditionals?: ({
|
|
@@ -204,6 +211,13 @@ export declare const defineConfig: (config: EventConfigInput) => {
|
|
|
204
211
|
options?: {
|
|
205
212
|
value: string;
|
|
206
213
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
214
|
+
conditionals?: ({
|
|
215
|
+
type: "SHOW";
|
|
216
|
+
conditional: import(".").JSONSchema;
|
|
217
|
+
} | {
|
|
218
|
+
type: "ENABLE";
|
|
219
|
+
conditional: import(".").JSONSchema;
|
|
220
|
+
})[] | undefined;
|
|
207
221
|
}[] | undefined;
|
|
208
222
|
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
209
223
|
conditionals?: ({
|
|
@@ -554,6 +554,13 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
|
|
|
554
554
|
options?: {
|
|
555
555
|
value: string;
|
|
556
556
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
557
|
+
conditionals?: ({
|
|
558
|
+
type: "SHOW";
|
|
559
|
+
conditional: import(".").JSONSchema;
|
|
560
|
+
} | {
|
|
561
|
+
type: "ENABLE";
|
|
562
|
+
conditional: import(".").JSONSchema;
|
|
563
|
+
})[] | undefined;
|
|
557
564
|
}[] | undefined;
|
|
558
565
|
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
559
566
|
conditionals?: ({
|
|
@@ -582,6 +589,13 @@ export declare function getEventConfigById(eventConfigs: EventConfig[], id: stri
|
|
|
582
589
|
options?: {
|
|
583
590
|
value: string;
|
|
584
591
|
label: string | import("./TranslationConfig").TranslationConfig;
|
|
592
|
+
conditionals?: ({
|
|
593
|
+
type: "SHOW";
|
|
594
|
+
conditional: import(".").JSONSchema;
|
|
595
|
+
} | {
|
|
596
|
+
type: "ENABLE";
|
|
597
|
+
conditional: import(".").JSONSchema;
|
|
598
|
+
})[] | undefined;
|
|
585
599
|
}[] | undefined;
|
|
586
600
|
label?: import("./TranslationConfig").TranslationConfig | undefined;
|
|
587
601
|
conditionals?: ({
|
package/dist/events/index.js
CHANGED
|
@@ -2182,7 +2182,8 @@ var File = BaseField.extend({
|
|
|
2182
2182
|
}).describe("File upload");
|
|
2183
2183
|
var SelectOption = import_zod17.z.object({
|
|
2184
2184
|
value: import_zod17.z.string().describe("The value of the option"),
|
|
2185
|
-
label: import_zod17.z.union([import_zod17.z.string(), TranslationConfig]).describe("The label of the option")
|
|
2185
|
+
label: import_zod17.z.union([import_zod17.z.string(), TranslationConfig]).describe("The label of the option"),
|
|
2186
|
+
conditionals: import_zod17.z.array(ActionConditional).default([]).optional()
|
|
2186
2187
|
});
|
|
2187
2188
|
var NumberWithUnitField = BaseField.extend({
|
|
2188
2189
|
type: import_zod17.z.literal(FieldType.NUMBER_WITH_UNIT),
|
|
@@ -2285,7 +2286,10 @@ var Checkbox = BaseField.extend({
|
|
|
2285
2286
|
}).describe("Boolean checkbox field");
|
|
2286
2287
|
var Country = BaseField.extend({
|
|
2287
2288
|
type: import_zod17.z.literal(FieldType.COUNTRY),
|
|
2288
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
2289
|
+
defaultValue: NonEmptyTextValue.optional(),
|
|
2290
|
+
optionOverrides: import_zod17.z.array(SelectOption.omit({ label: true })).optional().describe(
|
|
2291
|
+
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
2292
|
+
)
|
|
2289
2293
|
}).describe("Country select field");
|
|
2290
2294
|
var AdministrativeAreas = import_zod17.z.enum([
|
|
2291
2295
|
"ADMIN_STRUCTURE",
|
|
@@ -2333,28 +2337,14 @@ var Office = BaseField.extend({
|
|
|
2333
2337
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
2334
2338
|
administrativeArea: import_zod17.z.union([UUID, SerializedUserField]).optional()
|
|
2335
2339
|
});
|
|
2336
|
-
var DomesticAddressField =
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
import_zod17.z.literal(FieldType.COUNTRY)
|
|
2345
|
-
])
|
|
2346
|
-
})
|
|
2347
|
-
).transform((val) => {
|
|
2348
|
-
if (typeof val === "string") {
|
|
2349
|
-
return {
|
|
2350
|
-
id: val,
|
|
2351
|
-
type: val === "country" ? FieldType.COUNTRY : FieldType.ADMINISTRATIVE_AREA,
|
|
2352
|
-
required: true,
|
|
2353
|
-
conditionals: []
|
|
2354
|
-
};
|
|
2355
|
-
}
|
|
2356
|
-
return val;
|
|
2357
|
-
}).openapi({ effectType: "input", type: "string" });
|
|
2340
|
+
var DomesticAddressField = BaseField.pick({
|
|
2341
|
+
id: true,
|
|
2342
|
+
required: true,
|
|
2343
|
+
conditionals: true
|
|
2344
|
+
}).transform((config) => ({
|
|
2345
|
+
...config,
|
|
2346
|
+
type: config.id === "country" ? FieldType.COUNTRY : FieldType.ADMINISTRATIVE_AREA
|
|
2347
|
+
})).openapi({ effectType: "input", type: "object" });
|
|
2358
2348
|
var Address = BaseField.extend({
|
|
2359
2349
|
type: import_zod17.z.literal(FieldType.ADDRESS),
|
|
2360
2350
|
configuration: import_zod17.z.object({
|
|
@@ -1688,7 +1688,8 @@ var File = BaseField.extend({
|
|
|
1688
1688
|
}).describe("File upload");
|
|
1689
1689
|
var SelectOption = import_zod17.z.object({
|
|
1690
1690
|
value: import_zod17.z.string().describe("The value of the option"),
|
|
1691
|
-
label: import_zod17.z.union([import_zod17.z.string(), TranslationConfig]).describe("The label of the option")
|
|
1691
|
+
label: import_zod17.z.union([import_zod17.z.string(), TranslationConfig]).describe("The label of the option"),
|
|
1692
|
+
conditionals: import_zod17.z.array(ActionConditional).default([]).optional()
|
|
1692
1693
|
});
|
|
1693
1694
|
var NumberWithUnitField = BaseField.extend({
|
|
1694
1695
|
type: import_zod17.z.literal(FieldType.NUMBER_WITH_UNIT),
|
|
@@ -1791,7 +1792,10 @@ var Checkbox = BaseField.extend({
|
|
|
1791
1792
|
}).describe("Boolean checkbox field");
|
|
1792
1793
|
var Country = BaseField.extend({
|
|
1793
1794
|
type: import_zod17.z.literal(FieldType.COUNTRY),
|
|
1794
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1795
|
+
defaultValue: NonEmptyTextValue.optional(),
|
|
1796
|
+
optionOverrides: import_zod17.z.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1797
|
+
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1798
|
+
)
|
|
1795
1799
|
}).describe("Country select field");
|
|
1796
1800
|
var AdministrativeAreas = import_zod17.z.enum([
|
|
1797
1801
|
"ADMIN_STRUCTURE",
|
|
@@ -1839,28 +1843,14 @@ var Office = BaseField.extend({
|
|
|
1839
1843
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
1840
1844
|
administrativeArea: import_zod17.z.union([UUID, SerializedUserField]).optional()
|
|
1841
1845
|
});
|
|
1842
|
-
var DomesticAddressField =
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
import_zod17.z.literal(FieldType.COUNTRY)
|
|
1851
|
-
])
|
|
1852
|
-
})
|
|
1853
|
-
).transform((val) => {
|
|
1854
|
-
if (typeof val === "string") {
|
|
1855
|
-
return {
|
|
1856
|
-
id: val,
|
|
1857
|
-
type: val === "country" ? FieldType.COUNTRY : FieldType.ADMINISTRATIVE_AREA,
|
|
1858
|
-
required: true,
|
|
1859
|
-
conditionals: []
|
|
1860
|
-
};
|
|
1861
|
-
}
|
|
1862
|
-
return val;
|
|
1863
|
-
}).openapi({ effectType: "input", type: "string" });
|
|
1846
|
+
var DomesticAddressField = BaseField.pick({
|
|
1847
|
+
id: true,
|
|
1848
|
+
required: true,
|
|
1849
|
+
conditionals: true
|
|
1850
|
+
}).transform((config) => ({
|
|
1851
|
+
...config,
|
|
1852
|
+
type: config.id === "country" ? FieldType.COUNTRY : FieldType.ADMINISTRATIVE_AREA
|
|
1853
|
+
})).openapi({ effectType: "input", type: "object" });
|
|
1864
1854
|
var Address = BaseField.extend({
|
|
1865
1855
|
type: import_zod17.z.literal(FieldType.ADDRESS),
|
|
1866
1856
|
configuration: import_zod17.z.object({
|