@nira-opencrvs/toolkit 1.9.12-rc.0ec970c → 1.9.12-rc.3e3f1eb
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/events/FieldConfig.d.ts +312 -90
- package/dist/events/index.js +18 -10
- package/dist/notification/index.js +18 -10
- package/package.json +1 -1
|
@@ -4425,7 +4425,13 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4425
4425
|
analytics: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
4426
4426
|
}, {
|
|
4427
4427
|
type: z.ZodLiteral<"SELECT">;
|
|
4428
|
-
defaultValue: z.ZodOptional<z.ZodString
|
|
4428
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
4429
|
+
$userDataField: z.ZodString;
|
|
4430
|
+
}, "strip", z.ZodTypeAny, {
|
|
4431
|
+
$userDataField: string;
|
|
4432
|
+
}, {
|
|
4433
|
+
$userDataField: string;
|
|
4434
|
+
}>]>>;
|
|
4429
4435
|
options: z.ZodArray<z.ZodObject<{
|
|
4430
4436
|
value: z.ZodString;
|
|
4431
4437
|
label: z.ZodUnion<[z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
@@ -4516,7 +4522,9 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4516
4522
|
hideLabel?: boolean | undefined;
|
|
4517
4523
|
uncorrectable?: boolean | undefined;
|
|
4518
4524
|
analytics?: boolean | undefined;
|
|
4519
|
-
defaultValue?: string |
|
|
4525
|
+
defaultValue?: string | {
|
|
4526
|
+
$userDataField: string;
|
|
4527
|
+
} | undefined;
|
|
4520
4528
|
noOptionsMessage?: TranslationConfig | undefined;
|
|
4521
4529
|
}, {
|
|
4522
4530
|
type: "SELECT";
|
|
@@ -4594,7 +4602,9 @@ declare const Select: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
4594
4602
|
hideLabel?: boolean | undefined;
|
|
4595
4603
|
uncorrectable?: boolean | undefined;
|
|
4596
4604
|
analytics?: boolean | undefined;
|
|
4597
|
-
defaultValue?: string |
|
|
4605
|
+
defaultValue?: string | {
|
|
4606
|
+
$userDataField: string;
|
|
4607
|
+
} | undefined;
|
|
4598
4608
|
noOptionsMessage?: {
|
|
4599
4609
|
id: string;
|
|
4600
4610
|
description: string;
|
|
@@ -5988,7 +5998,13 @@ declare const IdField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
5988
5998
|
}>, "many">]>>;
|
|
5989
5999
|
analytics: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
5990
6000
|
}, {
|
|
5991
|
-
defaultValue: z.ZodOptional<z.ZodString
|
|
6001
|
+
defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
6002
|
+
$userDataField: z.ZodString;
|
|
6003
|
+
}, "strip", z.ZodTypeAny, {
|
|
6004
|
+
$userDataField: string;
|
|
6005
|
+
}, {
|
|
6006
|
+
$userDataField: string;
|
|
6007
|
+
}>]>>;
|
|
5992
6008
|
type: z.ZodLiteral<"ID">;
|
|
5993
6009
|
}>, "strip", z.ZodTypeAny, {
|
|
5994
6010
|
type: "ID";
|
|
@@ -6031,7 +6047,9 @@ declare const IdField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6031
6047
|
hideLabel?: boolean | undefined;
|
|
6032
6048
|
uncorrectable?: boolean | undefined;
|
|
6033
6049
|
analytics?: boolean | undefined;
|
|
6034
|
-
defaultValue?: string |
|
|
6050
|
+
defaultValue?: string | {
|
|
6051
|
+
$userDataField: string;
|
|
6052
|
+
} | undefined;
|
|
6035
6053
|
}, {
|
|
6036
6054
|
type: "ID";
|
|
6037
6055
|
id: string;
|
|
@@ -6093,7 +6111,9 @@ declare const IdField: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6093
6111
|
hideLabel?: boolean | undefined;
|
|
6094
6112
|
uncorrectable?: boolean | undefined;
|
|
6095
6113
|
analytics?: boolean | undefined;
|
|
6096
|
-
defaultValue?: string |
|
|
6114
|
+
defaultValue?: string | {
|
|
6115
|
+
$userDataField: string;
|
|
6116
|
+
} | undefined;
|
|
6097
6117
|
}>;
|
|
6098
6118
|
declare const Checkbox: z.ZodObject<z.objectUtil.extendShape<{
|
|
6099
6119
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -6393,6 +6413,33 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6393
6413
|
}, {
|
|
6394
6414
|
type: z.ZodLiteral<"COUNTRY">;
|
|
6395
6415
|
defaultValue: z.ZodOptional<z.ZodString>;
|
|
6416
|
+
optionOverrides: z.ZodOptional<z.ZodArray<z.ZodObject<Omit<{
|
|
6417
|
+
value: z.ZodString;
|
|
6418
|
+
label: z.ZodUnion<[z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
6419
|
+
id: string;
|
|
6420
|
+
description: string;
|
|
6421
|
+
defaultMessage: string;
|
|
6422
|
+
}>]>;
|
|
6423
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
6424
|
+
}, "label">, "strip", z.ZodTypeAny, {
|
|
6425
|
+
value: string;
|
|
6426
|
+
conditionals?: ({
|
|
6427
|
+
type: "SHOW";
|
|
6428
|
+
conditional: JSONSchema;
|
|
6429
|
+
} | {
|
|
6430
|
+
type: "ENABLE";
|
|
6431
|
+
conditional: JSONSchema;
|
|
6432
|
+
})[] | undefined;
|
|
6433
|
+
}, {
|
|
6434
|
+
value: string;
|
|
6435
|
+
conditionals?: ({
|
|
6436
|
+
type: "SHOW";
|
|
6437
|
+
conditional: JSONSchema;
|
|
6438
|
+
} | {
|
|
6439
|
+
type: "ENABLE";
|
|
6440
|
+
conditional: JSONSchema;
|
|
6441
|
+
})[] | undefined;
|
|
6442
|
+
}>, "many">>;
|
|
6396
6443
|
}>, "strip", z.ZodTypeAny, {
|
|
6397
6444
|
type: "COUNTRY";
|
|
6398
6445
|
id: string;
|
|
@@ -6435,6 +6482,16 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6435
6482
|
uncorrectable?: boolean | undefined;
|
|
6436
6483
|
analytics?: boolean | undefined;
|
|
6437
6484
|
defaultValue?: string | undefined;
|
|
6485
|
+
optionOverrides?: {
|
|
6486
|
+
value: string;
|
|
6487
|
+
conditionals?: ({
|
|
6488
|
+
type: "SHOW";
|
|
6489
|
+
conditional: JSONSchema;
|
|
6490
|
+
} | {
|
|
6491
|
+
type: "ENABLE";
|
|
6492
|
+
conditional: JSONSchema;
|
|
6493
|
+
})[] | undefined;
|
|
6494
|
+
}[] | undefined;
|
|
6438
6495
|
}, {
|
|
6439
6496
|
type: "COUNTRY";
|
|
6440
6497
|
id: string;
|
|
@@ -6497,6 +6554,16 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
6497
6554
|
uncorrectable?: boolean | undefined;
|
|
6498
6555
|
analytics?: boolean | undefined;
|
|
6499
6556
|
defaultValue?: string | undefined;
|
|
6557
|
+
optionOverrides?: {
|
|
6558
|
+
value: string;
|
|
6559
|
+
conditionals?: ({
|
|
6560
|
+
type: "SHOW";
|
|
6561
|
+
conditional: JSONSchema;
|
|
6562
|
+
} | {
|
|
6563
|
+
type: "ENABLE";
|
|
6564
|
+
conditional: JSONSchema;
|
|
6565
|
+
})[] | undefined;
|
|
6566
|
+
}[] | undefined;
|
|
6500
6567
|
}>;
|
|
6501
6568
|
export type Country = z.infer<typeof Country>;
|
|
6502
6569
|
export declare const AdministrativeAreas: z.ZodEnum<["ADMIN_STRUCTURE", "HEALTH_FACILITY", "CRVS_OFFICE"]>;
|
|
@@ -7907,33 +7974,10 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7907
7974
|
type: z.ZodLiteral<"ADDRESS">;
|
|
7908
7975
|
configuration: z.ZodOptional<z.ZodObject<{
|
|
7909
7976
|
lineSeparator: z.ZodOptional<z.ZodString>;
|
|
7910
|
-
fields: z.ZodOptional<z.ZodArray<z.
|
|
7977
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
7978
|
+
type: z.ZodLiteral<"COUNTRY">;
|
|
7911
7979
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
7912
|
-
|
|
7913
|
-
id: string;
|
|
7914
|
-
description: string;
|
|
7915
|
-
defaultMessage: string;
|
|
7916
|
-
}>;
|
|
7917
|
-
parent: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
7918
|
-
$$field: z.ZodEffects<z.ZodString, string, string>;
|
|
7919
|
-
$$subfield: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
7920
|
-
}, "strip", z.ZodTypeAny, {
|
|
7921
|
-
$$field: string;
|
|
7922
|
-
$$subfield: string[];
|
|
7923
|
-
}, {
|
|
7924
|
-
$$field: string;
|
|
7925
|
-
$$subfield?: string[] | undefined;
|
|
7926
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
7927
|
-
$$field: z.ZodEffects<z.ZodString, string, string>;
|
|
7928
|
-
$$subfield: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
7929
|
-
}, "strip", z.ZodTypeAny, {
|
|
7930
|
-
$$field: string;
|
|
7931
|
-
$$subfield: string[];
|
|
7932
|
-
}, {
|
|
7933
|
-
$$field: string;
|
|
7934
|
-
$$subfield?: string[] | undefined;
|
|
7935
|
-
}>, "many">]>>;
|
|
7936
|
-
required: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
7980
|
+
required: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
7937
7981
|
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7938
7982
|
id: string;
|
|
7939
7983
|
description: string;
|
|
@@ -7947,64 +7991,47 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7947
7991
|
description: string;
|
|
7948
7992
|
defaultMessage: string;
|
|
7949
7993
|
};
|
|
7950
|
-
}>]
|
|
7951
|
-
|
|
7952
|
-
secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
7953
|
-
placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7994
|
+
}>]>>>>;
|
|
7995
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7954
7996
|
id: string;
|
|
7955
7997
|
description: string;
|
|
7956
7998
|
defaultMessage: string;
|
|
7957
7999
|
}>>;
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
8000
|
+
conditionals: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>>;
|
|
8001
|
+
optionOverrides: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<Omit<{
|
|
8002
|
+
value: z.ZodString;
|
|
8003
|
+
label: z.ZodUnion<[z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7961
8004
|
id: string;
|
|
7962
8005
|
description: string;
|
|
7963
8006
|
defaultMessage: string;
|
|
7964
|
-
}>;
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
8007
|
+
}>]>;
|
|
8008
|
+
conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
|
|
8009
|
+
}, "label">, "strip", z.ZodTypeAny, {
|
|
8010
|
+
value: string;
|
|
8011
|
+
conditionals?: ({
|
|
8012
|
+
type: "SHOW";
|
|
8013
|
+
conditional: JSONSchema;
|
|
8014
|
+
} | {
|
|
8015
|
+
type: "ENABLE";
|
|
8016
|
+
conditional: JSONSchema;
|
|
8017
|
+
})[] | undefined;
|
|
7968
8018
|
}, {
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
}
|
|
7974
|
-
|
|
8019
|
+
value: string;
|
|
8020
|
+
conditionals?: ({
|
|
8021
|
+
type: "SHOW";
|
|
8022
|
+
conditional: JSONSchema;
|
|
8023
|
+
} | {
|
|
8024
|
+
type: "ENABLE";
|
|
8025
|
+
conditional: JSONSchema;
|
|
8026
|
+
})[] | undefined;
|
|
7975
8027
|
}>, "many">>>;
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
description: string;
|
|
7979
|
-
defaultMessage: string;
|
|
7980
|
-
}>>;
|
|
7981
|
-
hideLabel: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
7982
|
-
uncorrectable: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
7983
|
-
value: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
7984
|
-
$$field: z.ZodEffects<z.ZodString, string, string>;
|
|
7985
|
-
$$subfield: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
7986
|
-
}, "strip", z.ZodTypeAny, {
|
|
7987
|
-
$$field: string;
|
|
7988
|
-
$$subfield: string[];
|
|
7989
|
-
}, {
|
|
7990
|
-
$$field: string;
|
|
7991
|
-
$$subfield?: string[] | undefined;
|
|
7992
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
7993
|
-
$$field: z.ZodEffects<z.ZodString, string, string>;
|
|
7994
|
-
$$subfield: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
7995
|
-
}, "strip", z.ZodTypeAny, {
|
|
7996
|
-
$$field: string;
|
|
7997
|
-
$$subfield: string[];
|
|
7998
|
-
}, {
|
|
7999
|
-
$$field: string;
|
|
8000
|
-
$$subfield?: string[] | undefined;
|
|
8001
|
-
}>, "many">]>>;
|
|
8002
|
-
analytics: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
8003
|
-
}, "id" | "required" | "conditionals">, "strip", z.ZodTypeAny, {
|
|
8028
|
+
}, "strip", z.ZodTypeAny, {
|
|
8029
|
+
type: "COUNTRY";
|
|
8004
8030
|
id: string;
|
|
8005
8031
|
required?: boolean | {
|
|
8006
8032
|
message: TranslationConfig;
|
|
8007
8033
|
} | undefined;
|
|
8034
|
+
label?: TranslationConfig | undefined;
|
|
8008
8035
|
conditionals?: ({
|
|
8009
8036
|
type: "SHOW";
|
|
8010
8037
|
conditional: JSONSchema;
|
|
@@ -8015,7 +8042,18 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8015
8042
|
type: "DISPLAY_ON_REVIEW";
|
|
8016
8043
|
conditional: JSONSchema;
|
|
8017
8044
|
})[] | undefined;
|
|
8045
|
+
optionOverrides?: {
|
|
8046
|
+
value: string;
|
|
8047
|
+
conditionals?: ({
|
|
8048
|
+
type: "SHOW";
|
|
8049
|
+
conditional: JSONSchema;
|
|
8050
|
+
} | {
|
|
8051
|
+
type: "ENABLE";
|
|
8052
|
+
conditional: JSONSchema;
|
|
8053
|
+
})[] | undefined;
|
|
8054
|
+
}[] | undefined;
|
|
8018
8055
|
}, {
|
|
8056
|
+
type: "COUNTRY";
|
|
8019
8057
|
id: string;
|
|
8020
8058
|
required?: boolean | {
|
|
8021
8059
|
message: {
|
|
@@ -8024,6 +8062,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8024
8062
|
defaultMessage: string;
|
|
8025
8063
|
};
|
|
8026
8064
|
} | undefined;
|
|
8065
|
+
label?: {
|
|
8066
|
+
id: string;
|
|
8067
|
+
description: string;
|
|
8068
|
+
defaultMessage: string;
|
|
8069
|
+
} | undefined;
|
|
8027
8070
|
conditionals?: ({
|
|
8028
8071
|
type: "SHOW";
|
|
8029
8072
|
conditional: JSONSchema;
|
|
@@ -8034,12 +8077,47 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8034
8077
|
type: "DISPLAY_ON_REVIEW";
|
|
8035
8078
|
conditional: JSONSchema;
|
|
8036
8079
|
})[] | undefined;
|
|
8037
|
-
|
|
8038
|
-
|
|
8080
|
+
optionOverrides?: {
|
|
8081
|
+
value: string;
|
|
8082
|
+
conditionals?: ({
|
|
8083
|
+
type: "SHOW";
|
|
8084
|
+
conditional: JSONSchema;
|
|
8085
|
+
} | {
|
|
8086
|
+
type: "ENABLE";
|
|
8087
|
+
conditional: JSONSchema;
|
|
8088
|
+
})[] | undefined;
|
|
8089
|
+
}[] | undefined;
|
|
8090
|
+
}>, z.ZodObject<{
|
|
8091
|
+
type: z.ZodLiteral<"ADMINISTRATIVE_AREA">;
|
|
8092
|
+
id: z.ZodEffects<z.ZodString, string, string>;
|
|
8093
|
+
required: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
8094
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
8095
|
+
id: string;
|
|
8096
|
+
description: string;
|
|
8097
|
+
defaultMessage: string;
|
|
8098
|
+
}>;
|
|
8099
|
+
}, "strip", z.ZodTypeAny, {
|
|
8100
|
+
message: TranslationConfig;
|
|
8101
|
+
}, {
|
|
8102
|
+
message: {
|
|
8103
|
+
id: string;
|
|
8104
|
+
description: string;
|
|
8105
|
+
defaultMessage: string;
|
|
8106
|
+
};
|
|
8107
|
+
}>]>>>>;
|
|
8108
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
8109
|
+
id: string;
|
|
8110
|
+
description: string;
|
|
8111
|
+
defaultMessage: string;
|
|
8112
|
+
}>>;
|
|
8113
|
+
conditionals: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>>;
|
|
8114
|
+
}, "strip", z.ZodTypeAny, {
|
|
8115
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8039
8116
|
id: string;
|
|
8040
8117
|
required?: boolean | {
|
|
8041
8118
|
message: TranslationConfig;
|
|
8042
8119
|
} | undefined;
|
|
8120
|
+
label?: TranslationConfig | undefined;
|
|
8043
8121
|
conditionals?: ({
|
|
8044
8122
|
type: "SHOW";
|
|
8045
8123
|
conditional: JSONSchema;
|
|
@@ -8051,6 +8129,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8051
8129
|
conditional: JSONSchema;
|
|
8052
8130
|
})[] | undefined;
|
|
8053
8131
|
}, {
|
|
8132
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8054
8133
|
id: string;
|
|
8055
8134
|
required?: boolean | {
|
|
8056
8135
|
message: {
|
|
@@ -8059,6 +8138,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8059
8138
|
defaultMessage: string;
|
|
8060
8139
|
};
|
|
8061
8140
|
} | undefined;
|
|
8141
|
+
label?: {
|
|
8142
|
+
id: string;
|
|
8143
|
+
description: string;
|
|
8144
|
+
defaultMessage: string;
|
|
8145
|
+
} | undefined;
|
|
8062
8146
|
conditionals?: ({
|
|
8063
8147
|
type: "SHOW";
|
|
8064
8148
|
conditional: JSONSchema;
|
|
@@ -8069,7 +8153,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8069
8153
|
type: "DISPLAY_ON_REVIEW";
|
|
8070
8154
|
conditional: JSONSchema;
|
|
8071
8155
|
})[] | undefined;
|
|
8072
|
-
}>, "many">>;
|
|
8156
|
+
}>]>, "many">>;
|
|
8073
8157
|
streetAddressForm: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8074
8158
|
id: z.ZodString;
|
|
8075
8159
|
required: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
@@ -8157,12 +8241,13 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8157
8241
|
}>, "many">>;
|
|
8158
8242
|
}, "strip", z.ZodTypeAny, {
|
|
8159
8243
|
lineSeparator?: string | undefined;
|
|
8160
|
-
fields?: {
|
|
8161
|
-
type: "COUNTRY"
|
|
8244
|
+
fields?: ({
|
|
8245
|
+
type: "COUNTRY";
|
|
8162
8246
|
id: string;
|
|
8163
8247
|
required?: boolean | {
|
|
8164
8248
|
message: TranslationConfig;
|
|
8165
8249
|
} | undefined;
|
|
8250
|
+
label?: TranslationConfig | undefined;
|
|
8166
8251
|
conditionals?: ({
|
|
8167
8252
|
type: "SHOW";
|
|
8168
8253
|
conditional: JSONSchema;
|
|
@@ -8173,7 +8258,34 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8173
8258
|
type: "DISPLAY_ON_REVIEW";
|
|
8174
8259
|
conditional: JSONSchema;
|
|
8175
8260
|
})[] | undefined;
|
|
8176
|
-
|
|
8261
|
+
optionOverrides?: {
|
|
8262
|
+
value: string;
|
|
8263
|
+
conditionals?: ({
|
|
8264
|
+
type: "SHOW";
|
|
8265
|
+
conditional: JSONSchema;
|
|
8266
|
+
} | {
|
|
8267
|
+
type: "ENABLE";
|
|
8268
|
+
conditional: JSONSchema;
|
|
8269
|
+
})[] | undefined;
|
|
8270
|
+
}[] | undefined;
|
|
8271
|
+
} | {
|
|
8272
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8273
|
+
id: string;
|
|
8274
|
+
required?: boolean | {
|
|
8275
|
+
message: TranslationConfig;
|
|
8276
|
+
} | undefined;
|
|
8277
|
+
label?: TranslationConfig | undefined;
|
|
8278
|
+
conditionals?: ({
|
|
8279
|
+
type: "SHOW";
|
|
8280
|
+
conditional: JSONSchema;
|
|
8281
|
+
} | {
|
|
8282
|
+
type: "ENABLE";
|
|
8283
|
+
conditional: JSONSchema;
|
|
8284
|
+
} | {
|
|
8285
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8286
|
+
conditional: JSONSchema;
|
|
8287
|
+
})[] | undefined;
|
|
8288
|
+
})[] | undefined;
|
|
8177
8289
|
streetAddressForm?: {
|
|
8178
8290
|
type: "TEXT";
|
|
8179
8291
|
id: string;
|
|
@@ -8198,7 +8310,8 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8198
8310
|
}[] | undefined;
|
|
8199
8311
|
}, {
|
|
8200
8312
|
lineSeparator?: string | undefined;
|
|
8201
|
-
fields?: {
|
|
8313
|
+
fields?: ({
|
|
8314
|
+
type: "COUNTRY";
|
|
8202
8315
|
id: string;
|
|
8203
8316
|
required?: boolean | {
|
|
8204
8317
|
message: {
|
|
@@ -8207,6 +8320,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8207
8320
|
defaultMessage: string;
|
|
8208
8321
|
};
|
|
8209
8322
|
} | undefined;
|
|
8323
|
+
label?: {
|
|
8324
|
+
id: string;
|
|
8325
|
+
description: string;
|
|
8326
|
+
defaultMessage: string;
|
|
8327
|
+
} | undefined;
|
|
8210
8328
|
conditionals?: ({
|
|
8211
8329
|
type: "SHOW";
|
|
8212
8330
|
conditional: JSONSchema;
|
|
@@ -8217,7 +8335,42 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8217
8335
|
type: "DISPLAY_ON_REVIEW";
|
|
8218
8336
|
conditional: JSONSchema;
|
|
8219
8337
|
})[] | undefined;
|
|
8220
|
-
|
|
8338
|
+
optionOverrides?: {
|
|
8339
|
+
value: string;
|
|
8340
|
+
conditionals?: ({
|
|
8341
|
+
type: "SHOW";
|
|
8342
|
+
conditional: JSONSchema;
|
|
8343
|
+
} | {
|
|
8344
|
+
type: "ENABLE";
|
|
8345
|
+
conditional: JSONSchema;
|
|
8346
|
+
})[] | undefined;
|
|
8347
|
+
}[] | undefined;
|
|
8348
|
+
} | {
|
|
8349
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8350
|
+
id: string;
|
|
8351
|
+
required?: boolean | {
|
|
8352
|
+
message: {
|
|
8353
|
+
id: string;
|
|
8354
|
+
description: string;
|
|
8355
|
+
defaultMessage: string;
|
|
8356
|
+
};
|
|
8357
|
+
} | undefined;
|
|
8358
|
+
label?: {
|
|
8359
|
+
id: string;
|
|
8360
|
+
description: string;
|
|
8361
|
+
defaultMessage: string;
|
|
8362
|
+
} | undefined;
|
|
8363
|
+
conditionals?: ({
|
|
8364
|
+
type: "SHOW";
|
|
8365
|
+
conditional: JSONSchema;
|
|
8366
|
+
} | {
|
|
8367
|
+
type: "ENABLE";
|
|
8368
|
+
conditional: JSONSchema;
|
|
8369
|
+
} | {
|
|
8370
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8371
|
+
conditional: JSONSchema;
|
|
8372
|
+
})[] | undefined;
|
|
8373
|
+
})[] | undefined;
|
|
8221
8374
|
streetAddressForm?: {
|
|
8222
8375
|
type: "TEXT";
|
|
8223
8376
|
id: string;
|
|
@@ -8335,12 +8488,13 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8335
8488
|
} | undefined;
|
|
8336
8489
|
configuration?: {
|
|
8337
8490
|
lineSeparator?: string | undefined;
|
|
8338
|
-
fields?: {
|
|
8339
|
-
type: "COUNTRY"
|
|
8491
|
+
fields?: ({
|
|
8492
|
+
type: "COUNTRY";
|
|
8340
8493
|
id: string;
|
|
8341
8494
|
required?: boolean | {
|
|
8342
8495
|
message: TranslationConfig;
|
|
8343
8496
|
} | undefined;
|
|
8497
|
+
label?: TranslationConfig | undefined;
|
|
8344
8498
|
conditionals?: ({
|
|
8345
8499
|
type: "SHOW";
|
|
8346
8500
|
conditional: JSONSchema;
|
|
@@ -8351,7 +8505,34 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8351
8505
|
type: "DISPLAY_ON_REVIEW";
|
|
8352
8506
|
conditional: JSONSchema;
|
|
8353
8507
|
})[] | undefined;
|
|
8354
|
-
|
|
8508
|
+
optionOverrides?: {
|
|
8509
|
+
value: string;
|
|
8510
|
+
conditionals?: ({
|
|
8511
|
+
type: "SHOW";
|
|
8512
|
+
conditional: JSONSchema;
|
|
8513
|
+
} | {
|
|
8514
|
+
type: "ENABLE";
|
|
8515
|
+
conditional: JSONSchema;
|
|
8516
|
+
})[] | undefined;
|
|
8517
|
+
}[] | undefined;
|
|
8518
|
+
} | {
|
|
8519
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8520
|
+
id: string;
|
|
8521
|
+
required?: boolean | {
|
|
8522
|
+
message: TranslationConfig;
|
|
8523
|
+
} | undefined;
|
|
8524
|
+
label?: TranslationConfig | undefined;
|
|
8525
|
+
conditionals?: ({
|
|
8526
|
+
type: "SHOW";
|
|
8527
|
+
conditional: JSONSchema;
|
|
8528
|
+
} | {
|
|
8529
|
+
type: "ENABLE";
|
|
8530
|
+
conditional: JSONSchema;
|
|
8531
|
+
} | {
|
|
8532
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8533
|
+
conditional: JSONSchema;
|
|
8534
|
+
})[] | undefined;
|
|
8535
|
+
})[] | undefined;
|
|
8355
8536
|
streetAddressForm?: {
|
|
8356
8537
|
type: "TEXT";
|
|
8357
8538
|
id: string;
|
|
@@ -8447,7 +8628,8 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8447
8628
|
} | undefined;
|
|
8448
8629
|
configuration?: {
|
|
8449
8630
|
lineSeparator?: string | undefined;
|
|
8450
|
-
fields?: {
|
|
8631
|
+
fields?: ({
|
|
8632
|
+
type: "COUNTRY";
|
|
8451
8633
|
id: string;
|
|
8452
8634
|
required?: boolean | {
|
|
8453
8635
|
message: {
|
|
@@ -8456,6 +8638,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8456
8638
|
defaultMessage: string;
|
|
8457
8639
|
};
|
|
8458
8640
|
} | undefined;
|
|
8641
|
+
label?: {
|
|
8642
|
+
id: string;
|
|
8643
|
+
description: string;
|
|
8644
|
+
defaultMessage: string;
|
|
8645
|
+
} | undefined;
|
|
8459
8646
|
conditionals?: ({
|
|
8460
8647
|
type: "SHOW";
|
|
8461
8648
|
conditional: JSONSchema;
|
|
@@ -8466,7 +8653,42 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8466
8653
|
type: "DISPLAY_ON_REVIEW";
|
|
8467
8654
|
conditional: JSONSchema;
|
|
8468
8655
|
})[] | undefined;
|
|
8469
|
-
|
|
8656
|
+
optionOverrides?: {
|
|
8657
|
+
value: string;
|
|
8658
|
+
conditionals?: ({
|
|
8659
|
+
type: "SHOW";
|
|
8660
|
+
conditional: JSONSchema;
|
|
8661
|
+
} | {
|
|
8662
|
+
type: "ENABLE";
|
|
8663
|
+
conditional: JSONSchema;
|
|
8664
|
+
})[] | undefined;
|
|
8665
|
+
}[] | undefined;
|
|
8666
|
+
} | {
|
|
8667
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8668
|
+
id: string;
|
|
8669
|
+
required?: boolean | {
|
|
8670
|
+
message: {
|
|
8671
|
+
id: string;
|
|
8672
|
+
description: string;
|
|
8673
|
+
defaultMessage: string;
|
|
8674
|
+
};
|
|
8675
|
+
} | undefined;
|
|
8676
|
+
label?: {
|
|
8677
|
+
id: string;
|
|
8678
|
+
description: string;
|
|
8679
|
+
defaultMessage: string;
|
|
8680
|
+
} | undefined;
|
|
8681
|
+
conditionals?: ({
|
|
8682
|
+
type: "SHOW";
|
|
8683
|
+
conditional: JSONSchema;
|
|
8684
|
+
} | {
|
|
8685
|
+
type: "ENABLE";
|
|
8686
|
+
conditional: JSONSchema;
|
|
8687
|
+
} | {
|
|
8688
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8689
|
+
conditional: JSONSchema;
|
|
8690
|
+
})[] | undefined;
|
|
8691
|
+
})[] | undefined;
|
|
8470
8692
|
streetAddressForm?: {
|
|
8471
8693
|
type: "TEXT";
|
|
8472
8694
|
id: string;
|
package/dist/events/index.js
CHANGED
|
@@ -2230,7 +2230,7 @@ var BulletList = BaseField.extend({
|
|
|
2230
2230
|
}).describe("A list of bullet points");
|
|
2231
2231
|
var Select = BaseField.extend({
|
|
2232
2232
|
type: import_zod17.z.literal(FieldType.SELECT),
|
|
2233
|
-
defaultValue:
|
|
2233
|
+
defaultValue: import_zod17.z.union([NonEmptyTextValue, SerializedUserDataField]).optional(),
|
|
2234
2234
|
options: import_zod17.z.array(SelectOption).describe("A list of options"),
|
|
2235
2235
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
2236
2236
|
`
|
|
@@ -2288,7 +2288,7 @@ var PhoneField = BaseField.extend({
|
|
|
2288
2288
|
type: import_zod17.z.literal(FieldType.PHONE)
|
|
2289
2289
|
}).describe("Phone input field");
|
|
2290
2290
|
var IdField = BaseField.extend({
|
|
2291
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
2291
|
+
defaultValue: import_zod17.z.union([NonEmptyTextValue, SerializedUserDataField]).optional(),
|
|
2292
2292
|
type: import_zod17.z.literal(FieldType.ID)
|
|
2293
2293
|
}).describe("ID input field");
|
|
2294
2294
|
var Checkbox = BaseField.extend({
|
|
@@ -2297,7 +2297,10 @@ var Checkbox = BaseField.extend({
|
|
|
2297
2297
|
}).describe("Boolean checkbox field");
|
|
2298
2298
|
var Country = BaseField.extend({
|
|
2299
2299
|
type: import_zod17.z.literal(FieldType.COUNTRY),
|
|
2300
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
2300
|
+
defaultValue: NonEmptyTextValue.optional(),
|
|
2301
|
+
optionOverrides: import_zod17.z.array(SelectOption.omit({ label: true })).optional().describe(
|
|
2302
|
+
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
2303
|
+
)
|
|
2301
2304
|
}).describe("Country select field");
|
|
2302
2305
|
var AdministrativeAreas = import_zod17.z.enum([
|
|
2303
2306
|
"ADMIN_STRUCTURE",
|
|
@@ -2345,14 +2348,19 @@ var Office = BaseField.extend({
|
|
|
2345
2348
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
2346
2349
|
administrativeArea: import_zod17.z.union([UUID, SerializedUserField]).optional()
|
|
2347
2350
|
});
|
|
2348
|
-
var
|
|
2351
|
+
var commonDomesticFieldProps = {
|
|
2349
2352
|
id: true,
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2353
|
+
type: true,
|
|
2354
|
+
label: true,
|
|
2355
|
+
conditionals: true,
|
|
2356
|
+
required: true
|
|
2357
|
+
};
|
|
2358
|
+
var DomesticAddressField = Country.partial().pick({
|
|
2359
|
+
...commonDomesticFieldProps,
|
|
2360
|
+
optionOverrides: true
|
|
2361
|
+
}).required({ id: true, type: true }).or(
|
|
2362
|
+
AdministrativeArea.partial().pick(commonDomesticFieldProps).required({ id: true, type: true })
|
|
2363
|
+
);
|
|
2356
2364
|
var Address = BaseField.extend({
|
|
2357
2365
|
type: import_zod17.z.literal(FieldType.ADDRESS),
|
|
2358
2366
|
configuration: import_zod17.z.object({
|
|
@@ -1736,7 +1736,7 @@ var BulletList = BaseField.extend({
|
|
|
1736
1736
|
}).describe("A list of bullet points");
|
|
1737
1737
|
var Select = BaseField.extend({
|
|
1738
1738
|
type: import_zod17.z.literal(FieldType.SELECT),
|
|
1739
|
-
defaultValue:
|
|
1739
|
+
defaultValue: import_zod17.z.union([NonEmptyTextValue, SerializedUserDataField]).optional(),
|
|
1740
1740
|
options: import_zod17.z.array(SelectOption).describe("A list of options"),
|
|
1741
1741
|
noOptionsMessage: TranslationConfig.optional().describe(
|
|
1742
1742
|
`
|
|
@@ -1794,7 +1794,7 @@ var PhoneField = BaseField.extend({
|
|
|
1794
1794
|
type: import_zod17.z.literal(FieldType.PHONE)
|
|
1795
1795
|
}).describe("Phone input field");
|
|
1796
1796
|
var IdField = BaseField.extend({
|
|
1797
|
-
defaultValue: NonEmptyTextValue.optional(),
|
|
1797
|
+
defaultValue: import_zod17.z.union([NonEmptyTextValue, SerializedUserDataField]).optional(),
|
|
1798
1798
|
type: import_zod17.z.literal(FieldType.ID)
|
|
1799
1799
|
}).describe("ID input field");
|
|
1800
1800
|
var Checkbox = BaseField.extend({
|
|
@@ -1803,7 +1803,10 @@ var Checkbox = BaseField.extend({
|
|
|
1803
1803
|
}).describe("Boolean checkbox field");
|
|
1804
1804
|
var Country = BaseField.extend({
|
|
1805
1805
|
type: import_zod17.z.literal(FieldType.COUNTRY),
|
|
1806
|
-
defaultValue: NonEmptyTextValue.optional()
|
|
1806
|
+
defaultValue: NonEmptyTextValue.optional(),
|
|
1807
|
+
optionOverrides: import_zod17.z.array(SelectOption.omit({ label: true })).optional().describe(
|
|
1808
|
+
"Conditionals for specific countries. Countries not listed are always shown and enabled."
|
|
1809
|
+
)
|
|
1807
1810
|
}).describe("Country select field");
|
|
1808
1811
|
var AdministrativeAreas = import_zod17.z.enum([
|
|
1809
1812
|
"ADMIN_STRUCTURE",
|
|
@@ -1851,14 +1854,19 @@ var Office = BaseField.extend({
|
|
|
1851
1854
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
1852
1855
|
administrativeArea: import_zod17.z.union([UUID, SerializedUserField]).optional()
|
|
1853
1856
|
});
|
|
1854
|
-
var
|
|
1857
|
+
var commonDomesticFieldProps = {
|
|
1855
1858
|
id: true,
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1859
|
+
type: true,
|
|
1860
|
+
label: true,
|
|
1861
|
+
conditionals: true,
|
|
1862
|
+
required: true
|
|
1863
|
+
};
|
|
1864
|
+
var DomesticAddressField = Country.partial().pick({
|
|
1865
|
+
...commonDomesticFieldProps,
|
|
1866
|
+
optionOverrides: true
|
|
1867
|
+
}).required({ id: true, type: true }).or(
|
|
1868
|
+
AdministrativeArea.partial().pick(commonDomesticFieldProps).required({ id: true, type: true })
|
|
1869
|
+
);
|
|
1862
1870
|
var Address = BaseField.extend({
|
|
1863
1871
|
type: import_zod17.z.literal(FieldType.ADDRESS),
|
|
1864
1872
|
configuration: import_zod17.z.object({
|