@nira-opencrvs/toolkit 1.9.12-rc.d19bd90 → 1.9.12-rc.f93d958
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 +465 -16
- package/dist/events/index.js +20 -5
- package/dist/notification/index.js +20 -5
- 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,8 +7974,186 @@ 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.
|
|
7911
|
-
|
|
7977
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
7978
|
+
type: z.ZodLiteral<"COUNTRY">;
|
|
7979
|
+
id: z.ZodEffects<z.ZodString, string, string>;
|
|
7980
|
+
required: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
7981
|
+
message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7982
|
+
id: string;
|
|
7983
|
+
description: string;
|
|
7984
|
+
defaultMessage: string;
|
|
7985
|
+
}>;
|
|
7986
|
+
}, "strip", z.ZodTypeAny, {
|
|
7987
|
+
message: TranslationConfig;
|
|
7988
|
+
}, {
|
|
7989
|
+
message: {
|
|
7990
|
+
id: string;
|
|
7991
|
+
description: string;
|
|
7992
|
+
defaultMessage: string;
|
|
7993
|
+
};
|
|
7994
|
+
}>]>>>>;
|
|
7995
|
+
label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
7996
|
+
id: string;
|
|
7997
|
+
description: string;
|
|
7998
|
+
defaultMessage: string;
|
|
7999
|
+
}>>;
|
|
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, {
|
|
8004
|
+
id: string;
|
|
8005
|
+
description: string;
|
|
8006
|
+
defaultMessage: string;
|
|
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;
|
|
8018
|
+
}, {
|
|
8019
|
+
value: string;
|
|
8020
|
+
conditionals?: ({
|
|
8021
|
+
type: "SHOW";
|
|
8022
|
+
conditional: JSONSchema;
|
|
8023
|
+
} | {
|
|
8024
|
+
type: "ENABLE";
|
|
8025
|
+
conditional: JSONSchema;
|
|
8026
|
+
})[] | undefined;
|
|
8027
|
+
}>, "many">>>;
|
|
8028
|
+
}, "strip", z.ZodTypeAny, {
|
|
8029
|
+
type: "COUNTRY";
|
|
8030
|
+
id: string;
|
|
8031
|
+
required?: boolean | {
|
|
8032
|
+
message: TranslationConfig;
|
|
8033
|
+
} | undefined;
|
|
8034
|
+
label?: TranslationConfig | undefined;
|
|
8035
|
+
conditionals?: ({
|
|
8036
|
+
type: "SHOW";
|
|
8037
|
+
conditional: JSONSchema;
|
|
8038
|
+
} | {
|
|
8039
|
+
type: "ENABLE";
|
|
8040
|
+
conditional: JSONSchema;
|
|
8041
|
+
} | {
|
|
8042
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8043
|
+
conditional: JSONSchema;
|
|
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;
|
|
8055
|
+
}, {
|
|
8056
|
+
type: "COUNTRY";
|
|
8057
|
+
id: string;
|
|
8058
|
+
required?: boolean | {
|
|
8059
|
+
message: {
|
|
8060
|
+
id: string;
|
|
8061
|
+
description: string;
|
|
8062
|
+
defaultMessage: string;
|
|
8063
|
+
};
|
|
8064
|
+
} | undefined;
|
|
8065
|
+
label?: {
|
|
8066
|
+
id: string;
|
|
8067
|
+
description: string;
|
|
8068
|
+
defaultMessage: string;
|
|
8069
|
+
} | undefined;
|
|
8070
|
+
conditionals?: ({
|
|
8071
|
+
type: "SHOW";
|
|
8072
|
+
conditional: JSONSchema;
|
|
8073
|
+
} | {
|
|
8074
|
+
type: "ENABLE";
|
|
8075
|
+
conditional: JSONSchema;
|
|
8076
|
+
} | {
|
|
8077
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8078
|
+
conditional: JSONSchema;
|
|
8079
|
+
})[] | undefined;
|
|
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";
|
|
8116
|
+
id: string;
|
|
8117
|
+
required?: boolean | {
|
|
8118
|
+
message: TranslationConfig;
|
|
8119
|
+
} | undefined;
|
|
8120
|
+
label?: TranslationConfig | undefined;
|
|
8121
|
+
conditionals?: ({
|
|
8122
|
+
type: "SHOW";
|
|
8123
|
+
conditional: JSONSchema;
|
|
8124
|
+
} | {
|
|
8125
|
+
type: "ENABLE";
|
|
8126
|
+
conditional: JSONSchema;
|
|
8127
|
+
} | {
|
|
8128
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8129
|
+
conditional: JSONSchema;
|
|
8130
|
+
})[] | undefined;
|
|
8131
|
+
}, {
|
|
8132
|
+
type: "ADMINISTRATIVE_AREA";
|
|
8133
|
+
id: string;
|
|
8134
|
+
required?: boolean | {
|
|
8135
|
+
message: {
|
|
8136
|
+
id: string;
|
|
8137
|
+
description: string;
|
|
8138
|
+
defaultMessage: string;
|
|
8139
|
+
};
|
|
8140
|
+
} | undefined;
|
|
8141
|
+
label?: {
|
|
8142
|
+
id: string;
|
|
8143
|
+
description: string;
|
|
8144
|
+
defaultMessage: string;
|
|
8145
|
+
} | undefined;
|
|
8146
|
+
conditionals?: ({
|
|
8147
|
+
type: "SHOW";
|
|
8148
|
+
conditional: JSONSchema;
|
|
8149
|
+
} | {
|
|
8150
|
+
type: "ENABLE";
|
|
8151
|
+
conditional: JSONSchema;
|
|
8152
|
+
} | {
|
|
8153
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8154
|
+
conditional: JSONSchema;
|
|
8155
|
+
})[] | undefined;
|
|
8156
|
+
}>]>, "many">>;
|
|
7912
8157
|
streetAddressForm: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
7913
8158
|
id: z.ZodString;
|
|
7914
8159
|
required: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
@@ -7996,8 +8241,51 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
7996
8241
|
}>, "many">>;
|
|
7997
8242
|
}, "strip", z.ZodTypeAny, {
|
|
7998
8243
|
lineSeparator?: string | undefined;
|
|
7999
|
-
fields?: (
|
|
8000
|
-
|
|
8244
|
+
fields?: ({
|
|
8245
|
+
type: "COUNTRY";
|
|
8246
|
+
id: string;
|
|
8247
|
+
required?: boolean | {
|
|
8248
|
+
message: TranslationConfig;
|
|
8249
|
+
} | undefined;
|
|
8250
|
+
label?: TranslationConfig | undefined;
|
|
8251
|
+
conditionals?: ({
|
|
8252
|
+
type: "SHOW";
|
|
8253
|
+
conditional: JSONSchema;
|
|
8254
|
+
} | {
|
|
8255
|
+
type: "ENABLE";
|
|
8256
|
+
conditional: JSONSchema;
|
|
8257
|
+
} | {
|
|
8258
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8259
|
+
conditional: JSONSchema;
|
|
8260
|
+
})[] | undefined;
|
|
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;
|
|
8001
8289
|
streetAddressForm?: {
|
|
8002
8290
|
type: "TEXT";
|
|
8003
8291
|
id: string;
|
|
@@ -8022,8 +8310,67 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8022
8310
|
}[] | undefined;
|
|
8023
8311
|
}, {
|
|
8024
8312
|
lineSeparator?: string | undefined;
|
|
8025
|
-
fields?: (
|
|
8026
|
-
|
|
8313
|
+
fields?: ({
|
|
8314
|
+
type: "COUNTRY";
|
|
8315
|
+
id: string;
|
|
8316
|
+
required?: boolean | {
|
|
8317
|
+
message: {
|
|
8318
|
+
id: string;
|
|
8319
|
+
description: string;
|
|
8320
|
+
defaultMessage: string;
|
|
8321
|
+
};
|
|
8322
|
+
} | undefined;
|
|
8323
|
+
label?: {
|
|
8324
|
+
id: string;
|
|
8325
|
+
description: string;
|
|
8326
|
+
defaultMessage: string;
|
|
8327
|
+
} | undefined;
|
|
8328
|
+
conditionals?: ({
|
|
8329
|
+
type: "SHOW";
|
|
8330
|
+
conditional: JSONSchema;
|
|
8331
|
+
} | {
|
|
8332
|
+
type: "ENABLE";
|
|
8333
|
+
conditional: JSONSchema;
|
|
8334
|
+
} | {
|
|
8335
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8336
|
+
conditional: JSONSchema;
|
|
8337
|
+
})[] | undefined;
|
|
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;
|
|
8027
8374
|
streetAddressForm?: {
|
|
8028
8375
|
type: "TEXT";
|
|
8029
8376
|
id: string;
|
|
@@ -8141,8 +8488,51 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8141
8488
|
} | undefined;
|
|
8142
8489
|
configuration?: {
|
|
8143
8490
|
lineSeparator?: string | undefined;
|
|
8144
|
-
fields?: (
|
|
8145
|
-
|
|
8491
|
+
fields?: ({
|
|
8492
|
+
type: "COUNTRY";
|
|
8493
|
+
id: string;
|
|
8494
|
+
required?: boolean | {
|
|
8495
|
+
message: TranslationConfig;
|
|
8496
|
+
} | undefined;
|
|
8497
|
+
label?: TranslationConfig | undefined;
|
|
8498
|
+
conditionals?: ({
|
|
8499
|
+
type: "SHOW";
|
|
8500
|
+
conditional: JSONSchema;
|
|
8501
|
+
} | {
|
|
8502
|
+
type: "ENABLE";
|
|
8503
|
+
conditional: JSONSchema;
|
|
8504
|
+
} | {
|
|
8505
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8506
|
+
conditional: JSONSchema;
|
|
8507
|
+
})[] | undefined;
|
|
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;
|
|
8146
8536
|
streetAddressForm?: {
|
|
8147
8537
|
type: "TEXT";
|
|
8148
8538
|
id: string;
|
|
@@ -8238,8 +8628,67 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
8238
8628
|
} | undefined;
|
|
8239
8629
|
configuration?: {
|
|
8240
8630
|
lineSeparator?: string | undefined;
|
|
8241
|
-
fields?: (
|
|
8242
|
-
|
|
8631
|
+
fields?: ({
|
|
8632
|
+
type: "COUNTRY";
|
|
8633
|
+
id: string;
|
|
8634
|
+
required?: boolean | {
|
|
8635
|
+
message: {
|
|
8636
|
+
id: string;
|
|
8637
|
+
description: string;
|
|
8638
|
+
defaultMessage: string;
|
|
8639
|
+
};
|
|
8640
|
+
} | undefined;
|
|
8641
|
+
label?: {
|
|
8642
|
+
id: string;
|
|
8643
|
+
description: string;
|
|
8644
|
+
defaultMessage: string;
|
|
8645
|
+
} | undefined;
|
|
8646
|
+
conditionals?: ({
|
|
8647
|
+
type: "SHOW";
|
|
8648
|
+
conditional: JSONSchema;
|
|
8649
|
+
} | {
|
|
8650
|
+
type: "ENABLE";
|
|
8651
|
+
conditional: JSONSchema;
|
|
8652
|
+
} | {
|
|
8653
|
+
type: "DISPLAY_ON_REVIEW";
|
|
8654
|
+
conditional: JSONSchema;
|
|
8655
|
+
})[] | undefined;
|
|
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;
|
|
8243
8692
|
streetAddressForm?: {
|
|
8244
8693
|
type: "TEXT";
|
|
8245
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,12 +2348,24 @@ var Office = BaseField.extend({
|
|
|
2345
2348
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
2346
2349
|
administrativeArea: import_zod17.z.union([UUID, SerializedUserField]).optional()
|
|
2347
2350
|
});
|
|
2351
|
+
var commonDomesticFieldProps = {
|
|
2352
|
+
id: true,
|
|
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
|
+
);
|
|
2348
2364
|
var Address = BaseField.extend({
|
|
2349
2365
|
type: import_zod17.z.literal(FieldType.ADDRESS),
|
|
2350
2366
|
configuration: import_zod17.z.object({
|
|
2351
2367
|
lineSeparator: import_zod17.z.string().optional(),
|
|
2352
|
-
fields: import_zod17.z.array(
|
|
2353
|
-
administrativeLevels: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
2368
|
+
fields: import_zod17.z.array(DomesticAddressField).optional(),
|
|
2354
2369
|
streetAddressForm: import_zod17.z.array(
|
|
2355
2370
|
import_zod17.z.object({
|
|
2356
2371
|
id: import_zod17.z.string(),
|
|
@@ -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,12 +1854,24 @@ var Office = BaseField.extend({
|
|
|
1851
1854
|
var DefaultAddressFieldValue = DomesticAddressFieldValue.extend({
|
|
1852
1855
|
administrativeArea: import_zod17.z.union([UUID, SerializedUserField]).optional()
|
|
1853
1856
|
});
|
|
1857
|
+
var commonDomesticFieldProps = {
|
|
1858
|
+
id: true,
|
|
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
|
+
);
|
|
1854
1870
|
var Address = BaseField.extend({
|
|
1855
1871
|
type: import_zod17.z.literal(FieldType.ADDRESS),
|
|
1856
1872
|
configuration: import_zod17.z.object({
|
|
1857
1873
|
lineSeparator: import_zod17.z.string().optional(),
|
|
1858
|
-
fields: import_zod17.z.array(
|
|
1859
|
-
administrativeLevels: import_zod17.z.array(import_zod17.z.string()).optional(),
|
|
1874
|
+
fields: import_zod17.z.array(DomesticAddressField).optional(),
|
|
1860
1875
|
streetAddressForm: import_zod17.z.array(
|
|
1861
1876
|
import_zod17.z.object({
|
|
1862
1877
|
id: import_zod17.z.string(),
|