@nira-opencrvs/toolkit 1.9.12-rc.0ec970c → 1.9.12-rc.60314e5

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.
@@ -6393,6 +6393,33 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
6393
6393
  }, {
6394
6394
  type: z.ZodLiteral<"COUNTRY">;
6395
6395
  defaultValue: z.ZodOptional<z.ZodString>;
6396
+ optionOverrides: z.ZodOptional<z.ZodArray<z.ZodObject<Omit<{
6397
+ value: z.ZodString;
6398
+ label: z.ZodUnion<[z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
6399
+ id: string;
6400
+ description: string;
6401
+ defaultMessage: string;
6402
+ }>]>;
6403
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
6404
+ }, "label">, "strip", z.ZodTypeAny, {
6405
+ value: string;
6406
+ conditionals?: ({
6407
+ type: "SHOW";
6408
+ conditional: JSONSchema;
6409
+ } | {
6410
+ type: "ENABLE";
6411
+ conditional: JSONSchema;
6412
+ })[] | undefined;
6413
+ }, {
6414
+ value: string;
6415
+ conditionals?: ({
6416
+ type: "SHOW";
6417
+ conditional: JSONSchema;
6418
+ } | {
6419
+ type: "ENABLE";
6420
+ conditional: JSONSchema;
6421
+ })[] | undefined;
6422
+ }>, "many">>;
6396
6423
  }>, "strip", z.ZodTypeAny, {
6397
6424
  type: "COUNTRY";
6398
6425
  id: string;
@@ -6435,6 +6462,16 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
6435
6462
  uncorrectable?: boolean | undefined;
6436
6463
  analytics?: boolean | undefined;
6437
6464
  defaultValue?: string | undefined;
6465
+ optionOverrides?: {
6466
+ value: string;
6467
+ conditionals?: ({
6468
+ type: "SHOW";
6469
+ conditional: JSONSchema;
6470
+ } | {
6471
+ type: "ENABLE";
6472
+ conditional: JSONSchema;
6473
+ })[] | undefined;
6474
+ }[] | undefined;
6438
6475
  }, {
6439
6476
  type: "COUNTRY";
6440
6477
  id: string;
@@ -6497,6 +6534,16 @@ declare const Country: z.ZodObject<z.objectUtil.extendShape<{
6497
6534
  uncorrectable?: boolean | undefined;
6498
6535
  analytics?: boolean | undefined;
6499
6536
  defaultValue?: string | undefined;
6537
+ optionOverrides?: {
6538
+ value: string;
6539
+ conditionals?: ({
6540
+ type: "SHOW";
6541
+ conditional: JSONSchema;
6542
+ } | {
6543
+ type: "ENABLE";
6544
+ conditional: JSONSchema;
6545
+ })[] | undefined;
6546
+ }[] | undefined;
6500
6547
  }>;
6501
6548
  export type Country = z.infer<typeof Country>;
6502
6549
  export declare const AdministrativeAreas: z.ZodEnum<["ADMIN_STRUCTURE", "HEALTH_FACILITY", "CRVS_OFFICE"]>;
@@ -7907,33 +7954,10 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7907
7954
  type: z.ZodLiteral<"ADDRESS">;
7908
7955
  configuration: z.ZodOptional<z.ZodObject<{
7909
7956
  lineSeparator: z.ZodOptional<z.ZodString>;
7910
- fields: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<Pick<{
7957
+ fields: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
7958
+ type: z.ZodLiteral<"COUNTRY">;
7911
7959
  id: z.ZodEffects<z.ZodString, string, string>;
7912
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
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<{
7960
+ required: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
7937
7961
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7938
7962
  id: string;
7939
7963
  description: string;
@@ -7947,64 +7971,47 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7947
7971
  description: string;
7948
7972
  defaultMessage: string;
7949
7973
  };
7950
- }>]>>>;
7951
- conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>;
7952
- secured: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
7953
- placeholder: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7974
+ }>]>>>>;
7975
+ label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7954
7976
  id: string;
7955
7977
  description: string;
7956
7978
  defaultMessage: string;
7957
7979
  }>>;
7958
- validation: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
7959
- validator: z.ZodType<JSONSchema, z.ZodTypeDef, JSONSchema>;
7960
- message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7980
+ conditionals: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>>;
7981
+ optionOverrides: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<Omit<{
7982
+ value: z.ZodString;
7983
+ label: z.ZodUnion<[z.ZodString, z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7961
7984
  id: string;
7962
7985
  description: string;
7963
7986
  defaultMessage: string;
7964
- }>;
7965
- }, "strip", z.ZodTypeAny, {
7966
- message: TranslationConfig;
7967
- validator: JSONSchema;
7987
+ }>]>;
7988
+ conditionals: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").ActionConditionalType[]>, "many">>>;
7989
+ }, "label">, "strip", z.ZodTypeAny, {
7990
+ value: string;
7991
+ conditionals?: ({
7992
+ type: "SHOW";
7993
+ conditional: JSONSchema;
7994
+ } | {
7995
+ type: "ENABLE";
7996
+ conditional: JSONSchema;
7997
+ })[] | undefined;
7968
7998
  }, {
7969
- message: {
7970
- id: string;
7971
- description: string;
7972
- defaultMessage: string;
7973
- };
7974
- validator: JSONSchema;
7999
+ value: string;
8000
+ conditionals?: ({
8001
+ type: "SHOW";
8002
+ conditional: JSONSchema;
8003
+ } | {
8004
+ type: "ENABLE";
8005
+ conditional: JSONSchema;
8006
+ })[] | undefined;
7975
8007
  }>, "many">>>;
7976
- helperText: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7977
- id: string;
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, {
8008
+ }, "strip", z.ZodTypeAny, {
8009
+ type: "COUNTRY";
8004
8010
  id: string;
8005
8011
  required?: boolean | {
8006
8012
  message: TranslationConfig;
8007
8013
  } | undefined;
8014
+ label?: TranslationConfig | undefined;
8008
8015
  conditionals?: ({
8009
8016
  type: "SHOW";
8010
8017
  conditional: JSONSchema;
@@ -8015,7 +8022,18 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8015
8022
  type: "DISPLAY_ON_REVIEW";
8016
8023
  conditional: JSONSchema;
8017
8024
  })[] | undefined;
8025
+ optionOverrides?: {
8026
+ value: string;
8027
+ conditionals?: ({
8028
+ type: "SHOW";
8029
+ conditional: JSONSchema;
8030
+ } | {
8031
+ type: "ENABLE";
8032
+ conditional: JSONSchema;
8033
+ })[] | undefined;
8034
+ }[] | undefined;
8018
8035
  }, {
8036
+ type: "COUNTRY";
8019
8037
  id: string;
8020
8038
  required?: boolean | {
8021
8039
  message: {
@@ -8024,6 +8042,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8024
8042
  defaultMessage: string;
8025
8043
  };
8026
8044
  } | undefined;
8045
+ label?: {
8046
+ id: string;
8047
+ description: string;
8048
+ defaultMessage: string;
8049
+ } | undefined;
8027
8050
  conditionals?: ({
8028
8051
  type: "SHOW";
8029
8052
  conditional: JSONSchema;
@@ -8034,12 +8057,47 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8034
8057
  type: "DISPLAY_ON_REVIEW";
8035
8058
  conditional: JSONSchema;
8036
8059
  })[] | undefined;
8037
- }>, {
8038
- type: "COUNTRY" | "ADMINISTRATIVE_AREA";
8060
+ optionOverrides?: {
8061
+ value: string;
8062
+ conditionals?: ({
8063
+ type: "SHOW";
8064
+ conditional: JSONSchema;
8065
+ } | {
8066
+ type: "ENABLE";
8067
+ conditional: JSONSchema;
8068
+ })[] | undefined;
8069
+ }[] | undefined;
8070
+ }>, z.ZodObject<{
8071
+ type: z.ZodLiteral<"ADMINISTRATIVE_AREA">;
8072
+ id: z.ZodEffects<z.ZodString, string, string>;
8073
+ required: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
8074
+ message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
8075
+ id: string;
8076
+ description: string;
8077
+ defaultMessage: string;
8078
+ }>;
8079
+ }, "strip", z.ZodTypeAny, {
8080
+ message: TranslationConfig;
8081
+ }, {
8082
+ message: {
8083
+ id: string;
8084
+ description: string;
8085
+ defaultMessage: string;
8086
+ };
8087
+ }>]>>>>;
8088
+ label: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
8089
+ id: string;
8090
+ description: string;
8091
+ defaultMessage: string;
8092
+ }>>;
8093
+ conditionals: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"type", import("./Conditional").FieldConditionalType[]>, "many">>>>;
8094
+ }, "strip", z.ZodTypeAny, {
8095
+ type: "ADMINISTRATIVE_AREA";
8039
8096
  id: string;
8040
8097
  required?: boolean | {
8041
8098
  message: TranslationConfig;
8042
8099
  } | undefined;
8100
+ label?: TranslationConfig | undefined;
8043
8101
  conditionals?: ({
8044
8102
  type: "SHOW";
8045
8103
  conditional: JSONSchema;
@@ -8051,6 +8109,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8051
8109
  conditional: JSONSchema;
8052
8110
  })[] | undefined;
8053
8111
  }, {
8112
+ type: "ADMINISTRATIVE_AREA";
8054
8113
  id: string;
8055
8114
  required?: boolean | {
8056
8115
  message: {
@@ -8059,6 +8118,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8059
8118
  defaultMessage: string;
8060
8119
  };
8061
8120
  } | undefined;
8121
+ label?: {
8122
+ id: string;
8123
+ description: string;
8124
+ defaultMessage: string;
8125
+ } | undefined;
8062
8126
  conditionals?: ({
8063
8127
  type: "SHOW";
8064
8128
  conditional: JSONSchema;
@@ -8069,7 +8133,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8069
8133
  type: "DISPLAY_ON_REVIEW";
8070
8134
  conditional: JSONSchema;
8071
8135
  })[] | undefined;
8072
- }>, "many">>;
8136
+ }>]>, "many">>;
8073
8137
  streetAddressForm: z.ZodOptional<z.ZodArray<z.ZodObject<{
8074
8138
  id: z.ZodString;
8075
8139
  required: z.ZodOptional<z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
@@ -8157,12 +8221,13 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8157
8221
  }>, "many">>;
8158
8222
  }, "strip", z.ZodTypeAny, {
8159
8223
  lineSeparator?: string | undefined;
8160
- fields?: {
8161
- type: "COUNTRY" | "ADMINISTRATIVE_AREA";
8224
+ fields?: ({
8225
+ type: "COUNTRY";
8162
8226
  id: string;
8163
8227
  required?: boolean | {
8164
8228
  message: TranslationConfig;
8165
8229
  } | undefined;
8230
+ label?: TranslationConfig | undefined;
8166
8231
  conditionals?: ({
8167
8232
  type: "SHOW";
8168
8233
  conditional: JSONSchema;
@@ -8173,7 +8238,34 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8173
8238
  type: "DISPLAY_ON_REVIEW";
8174
8239
  conditional: JSONSchema;
8175
8240
  })[] | undefined;
8176
- }[] | undefined;
8241
+ optionOverrides?: {
8242
+ value: string;
8243
+ conditionals?: ({
8244
+ type: "SHOW";
8245
+ conditional: JSONSchema;
8246
+ } | {
8247
+ type: "ENABLE";
8248
+ conditional: JSONSchema;
8249
+ })[] | undefined;
8250
+ }[] | undefined;
8251
+ } | {
8252
+ type: "ADMINISTRATIVE_AREA";
8253
+ id: string;
8254
+ required?: boolean | {
8255
+ message: TranslationConfig;
8256
+ } | undefined;
8257
+ label?: TranslationConfig | undefined;
8258
+ conditionals?: ({
8259
+ type: "SHOW";
8260
+ conditional: JSONSchema;
8261
+ } | {
8262
+ type: "ENABLE";
8263
+ conditional: JSONSchema;
8264
+ } | {
8265
+ type: "DISPLAY_ON_REVIEW";
8266
+ conditional: JSONSchema;
8267
+ })[] | undefined;
8268
+ })[] | undefined;
8177
8269
  streetAddressForm?: {
8178
8270
  type: "TEXT";
8179
8271
  id: string;
@@ -8198,7 +8290,8 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8198
8290
  }[] | undefined;
8199
8291
  }, {
8200
8292
  lineSeparator?: string | undefined;
8201
- fields?: {
8293
+ fields?: ({
8294
+ type: "COUNTRY";
8202
8295
  id: string;
8203
8296
  required?: boolean | {
8204
8297
  message: {
@@ -8207,6 +8300,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8207
8300
  defaultMessage: string;
8208
8301
  };
8209
8302
  } | undefined;
8303
+ label?: {
8304
+ id: string;
8305
+ description: string;
8306
+ defaultMessage: string;
8307
+ } | undefined;
8210
8308
  conditionals?: ({
8211
8309
  type: "SHOW";
8212
8310
  conditional: JSONSchema;
@@ -8217,7 +8315,42 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8217
8315
  type: "DISPLAY_ON_REVIEW";
8218
8316
  conditional: JSONSchema;
8219
8317
  })[] | undefined;
8220
- }[] | undefined;
8318
+ optionOverrides?: {
8319
+ value: string;
8320
+ conditionals?: ({
8321
+ type: "SHOW";
8322
+ conditional: JSONSchema;
8323
+ } | {
8324
+ type: "ENABLE";
8325
+ conditional: JSONSchema;
8326
+ })[] | undefined;
8327
+ }[] | undefined;
8328
+ } | {
8329
+ type: "ADMINISTRATIVE_AREA";
8330
+ id: string;
8331
+ required?: boolean | {
8332
+ message: {
8333
+ id: string;
8334
+ description: string;
8335
+ defaultMessage: string;
8336
+ };
8337
+ } | undefined;
8338
+ label?: {
8339
+ id: string;
8340
+ description: string;
8341
+ defaultMessage: string;
8342
+ } | undefined;
8343
+ conditionals?: ({
8344
+ type: "SHOW";
8345
+ conditional: JSONSchema;
8346
+ } | {
8347
+ type: "ENABLE";
8348
+ conditional: JSONSchema;
8349
+ } | {
8350
+ type: "DISPLAY_ON_REVIEW";
8351
+ conditional: JSONSchema;
8352
+ })[] | undefined;
8353
+ })[] | undefined;
8221
8354
  streetAddressForm?: {
8222
8355
  type: "TEXT";
8223
8356
  id: string;
@@ -8335,12 +8468,13 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8335
8468
  } | undefined;
8336
8469
  configuration?: {
8337
8470
  lineSeparator?: string | undefined;
8338
- fields?: {
8339
- type: "COUNTRY" | "ADMINISTRATIVE_AREA";
8471
+ fields?: ({
8472
+ type: "COUNTRY";
8340
8473
  id: string;
8341
8474
  required?: boolean | {
8342
8475
  message: TranslationConfig;
8343
8476
  } | undefined;
8477
+ label?: TranslationConfig | undefined;
8344
8478
  conditionals?: ({
8345
8479
  type: "SHOW";
8346
8480
  conditional: JSONSchema;
@@ -8351,7 +8485,34 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8351
8485
  type: "DISPLAY_ON_REVIEW";
8352
8486
  conditional: JSONSchema;
8353
8487
  })[] | undefined;
8354
- }[] | undefined;
8488
+ optionOverrides?: {
8489
+ value: string;
8490
+ conditionals?: ({
8491
+ type: "SHOW";
8492
+ conditional: JSONSchema;
8493
+ } | {
8494
+ type: "ENABLE";
8495
+ conditional: JSONSchema;
8496
+ })[] | undefined;
8497
+ }[] | undefined;
8498
+ } | {
8499
+ type: "ADMINISTRATIVE_AREA";
8500
+ id: string;
8501
+ required?: boolean | {
8502
+ message: TranslationConfig;
8503
+ } | undefined;
8504
+ label?: TranslationConfig | undefined;
8505
+ conditionals?: ({
8506
+ type: "SHOW";
8507
+ conditional: JSONSchema;
8508
+ } | {
8509
+ type: "ENABLE";
8510
+ conditional: JSONSchema;
8511
+ } | {
8512
+ type: "DISPLAY_ON_REVIEW";
8513
+ conditional: JSONSchema;
8514
+ })[] | undefined;
8515
+ })[] | undefined;
8355
8516
  streetAddressForm?: {
8356
8517
  type: "TEXT";
8357
8518
  id: string;
@@ -8447,7 +8608,43 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8447
8608
  } | undefined;
8448
8609
  configuration?: {
8449
8610
  lineSeparator?: string | undefined;
8450
- fields?: {
8611
+ fields?: ({
8612
+ type: "COUNTRY";
8613
+ id: string;
8614
+ required?: boolean | {
8615
+ message: {
8616
+ id: string;
8617
+ description: string;
8618
+ defaultMessage: string;
8619
+ };
8620
+ } | undefined;
8621
+ label?: {
8622
+ id: string;
8623
+ description: string;
8624
+ defaultMessage: string;
8625
+ } | undefined;
8626
+ conditionals?: ({
8627
+ type: "SHOW";
8628
+ conditional: JSONSchema;
8629
+ } | {
8630
+ type: "ENABLE";
8631
+ conditional: JSONSchema;
8632
+ } | {
8633
+ type: "DISPLAY_ON_REVIEW";
8634
+ conditional: JSONSchema;
8635
+ })[] | undefined;
8636
+ optionOverrides?: {
8637
+ value: string;
8638
+ conditionals?: ({
8639
+ type: "SHOW";
8640
+ conditional: JSONSchema;
8641
+ } | {
8642
+ type: "ENABLE";
8643
+ conditional: JSONSchema;
8644
+ })[] | undefined;
8645
+ }[] | undefined;
8646
+ } | {
8647
+ type: "ADMINISTRATIVE_AREA";
8451
8648
  id: string;
8452
8649
  required?: boolean | {
8453
8650
  message: {
@@ -8456,6 +8653,11 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8456
8653
  defaultMessage: string;
8457
8654
  };
8458
8655
  } | undefined;
8656
+ label?: {
8657
+ id: string;
8658
+ description: string;
8659
+ defaultMessage: string;
8660
+ } | undefined;
8459
8661
  conditionals?: ({
8460
8662
  type: "SHOW";
8461
8663
  conditional: JSONSchema;
@@ -8466,7 +8668,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
8466
8668
  type: "DISPLAY_ON_REVIEW";
8467
8669
  conditional: JSONSchema;
8468
8670
  })[] | undefined;
8469
- }[] | undefined;
8671
+ })[] | undefined;
8470
8672
  streetAddressForm?: {
8471
8673
  type: "TEXT";
8472
8674
  id: string;
@@ -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 DomesticAddressField = BaseField.pick({
2351
+ var commonDomesticFieldProps = {
2349
2352
  id: true,
2350
- required: true,
2351
- conditionals: true
2352
- }).transform((config) => ({
2353
- ...config,
2354
- type: config.id === "country" ? FieldType.COUNTRY : FieldType.ADMINISTRATIVE_AREA
2355
- })).openapi({ effectType: "input", type: "object" });
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({
@@ -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 DomesticAddressField = BaseField.pick({
1857
+ var commonDomesticFieldProps = {
1855
1858
  id: true,
1856
- required: true,
1857
- conditionals: true
1858
- }).transform((config) => ({
1859
- ...config,
1860
- type: config.id === "country" ? FieldType.COUNTRY : FieldType.ADMINISTRATIVE_AREA
1861
- })).openapi({ effectType: "input", type: "object" });
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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nira-opencrvs/toolkit",
3
- "version": "1.9.12-rc.0ec970c",
3
+ "version": "1.9.12-rc.60314e5",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {