@opencrvs/toolkit 1.9.5-rc.873140 → 1.9.5-rc.98beaa4

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.
@@ -537,16 +537,7 @@ export declare const TextField: z.ZodObject<z.objectUtil.extendShape<{
537
537
  analytics: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
538
538
  }, {
539
539
  type: z.ZodLiteral<"TEXT">;
540
- defaultValue: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
541
- $userField: z.ZodEnum<["id", "name", "role", "fullHonorificName", "device", "firstname", "middlename", "surname", "district", "province", "primaryOfficeId"]>;
542
- $location: z.ZodOptional<z.ZodString>;
543
- }, "strip", z.ZodTypeAny, {
544
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
545
- $location?: string | undefined;
546
- }, {
547
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
548
- $location?: string | undefined;
549
- }>]>>;
540
+ defaultValue: z.ZodOptional<z.ZodString>;
550
541
  configuration: z.ZodOptional<z.ZodDefault<z.ZodObject<{
551
542
  maxLength: z.ZodOptional<z.ZodNumber>;
552
543
  type: z.ZodOptional<z.ZodEnum<["text", "password"]>>;
@@ -620,10 +611,7 @@ export declare const TextField: z.ZodObject<z.objectUtil.extendShape<{
620
611
  hideLabel?: boolean | undefined;
621
612
  uncorrectable?: boolean | undefined;
622
613
  analytics?: boolean | undefined;
623
- defaultValue?: string | {
624
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
625
- $location?: string | undefined;
626
- } | undefined;
614
+ defaultValue?: string | undefined;
627
615
  configuration?: {
628
616
  type?: "text" | "password" | undefined;
629
617
  maxLength?: number | undefined;
@@ -691,10 +679,7 @@ export declare const TextField: z.ZodObject<z.objectUtil.extendShape<{
691
679
  hideLabel?: boolean | undefined;
692
680
  uncorrectable?: boolean | undefined;
693
681
  analytics?: boolean | undefined;
694
- defaultValue?: string | {
695
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
696
- $location?: string | undefined;
697
- } | undefined;
682
+ defaultValue?: string | undefined;
698
683
  configuration?: {
699
684
  type?: "text" | "password" | undefined;
700
685
  maxLength?: number | undefined;
@@ -4677,62 +4662,17 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
4677
4662
  }, {
4678
4663
  type: z.ZodLiteral<"NAME">;
4679
4664
  defaultValue: z.ZodOptional<z.ZodObject<{
4680
- firstname: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
4681
- $userField: z.ZodEnum<["id", "name", "role", "fullHonorificName", "device", "firstname", "middlename", "surname", "district", "province", "primaryOfficeId"]>;
4682
- $location: z.ZodOptional<z.ZodString>;
4683
- }, "strip", z.ZodTypeAny, {
4684
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4685
- $location?: string | undefined;
4686
- }, {
4687
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4688
- $location?: string | undefined;
4689
- }>, z.ZodString]>>;
4690
- middlename: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
4691
- $userField: z.ZodEnum<["id", "name", "role", "fullHonorificName", "device", "firstname", "middlename", "surname", "district", "province", "primaryOfficeId"]>;
4692
- $location: z.ZodOptional<z.ZodString>;
4693
- }, "strip", z.ZodTypeAny, {
4694
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4695
- $location?: string | undefined;
4696
- }, {
4697
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4698
- $location?: string | undefined;
4699
- }>, z.ZodString]>>;
4700
- surname: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
4701
- $userField: z.ZodEnum<["id", "name", "role", "fullHonorificName", "device", "firstname", "middlename", "surname", "district", "province", "primaryOfficeId"]>;
4702
- $location: z.ZodOptional<z.ZodString>;
4703
- }, "strip", z.ZodTypeAny, {
4704
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4705
- $location?: string | undefined;
4706
- }, {
4707
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4708
- $location?: string | undefined;
4709
- }>, z.ZodString]>>;
4665
+ firstname: z.ZodOptional<z.ZodString>;
4666
+ middlename: z.ZodOptional<z.ZodString>;
4667
+ surname: z.ZodOptional<z.ZodString>;
4710
4668
  }, "strip", z.ZodTypeAny, {
4711
- firstname?: string | {
4712
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4713
- $location?: string | undefined;
4714
- } | undefined;
4715
- surname?: string | {
4716
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4717
- $location?: string | undefined;
4718
- } | undefined;
4719
- middlename?: string | {
4720
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4721
- $location?: string | undefined;
4722
- } | undefined;
4669
+ firstname?: string | undefined;
4670
+ surname?: string | undefined;
4671
+ middlename?: string | undefined;
4723
4672
  }, {
4724
- firstname?: string | {
4725
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4726
- $location?: string | undefined;
4727
- } | undefined;
4728
- surname?: string | {
4729
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4730
- $location?: string | undefined;
4731
- } | undefined;
4732
- middlename?: string | {
4733
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4734
- $location?: string | undefined;
4735
- } | undefined;
4673
+ firstname?: string | undefined;
4674
+ surname?: string | undefined;
4675
+ middlename?: string | undefined;
4736
4676
  }>>;
4737
4677
  configuration: z.ZodOptional<z.ZodDefault<z.ZodObject<{
4738
4678
  name: z.ZodOptional<z.ZodDefault<z.ZodObject<{
@@ -5056,18 +4996,9 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
5056
4996
  uncorrectable?: boolean | undefined;
5057
4997
  analytics?: boolean | undefined;
5058
4998
  defaultValue?: {
5059
- firstname?: string | {
5060
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
5061
- $location?: string | undefined;
5062
- } | undefined;
5063
- surname?: string | {
5064
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
5065
- $location?: string | undefined;
5066
- } | undefined;
5067
- middlename?: string | {
5068
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
5069
- $location?: string | undefined;
5070
- } | undefined;
4999
+ firstname?: string | undefined;
5000
+ surname?: string | undefined;
5001
+ middlename?: string | undefined;
5071
5002
  } | undefined;
5072
5003
  configuration?: {
5073
5004
  name?: {
@@ -5157,18 +5088,9 @@ declare const NameField: z.ZodObject<z.objectUtil.extendShape<{
5157
5088
  uncorrectable?: boolean | undefined;
5158
5089
  analytics?: boolean | undefined;
5159
5090
  defaultValue?: {
5160
- firstname?: string | {
5161
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
5162
- $location?: string | undefined;
5163
- } | undefined;
5164
- surname?: string | {
5165
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
5166
- $location?: string | undefined;
5167
- } | undefined;
5168
- middlename?: string | {
5169
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
5170
- $location?: string | undefined;
5171
- } | undefined;
5091
+ firstname?: string | undefined;
5092
+ surname?: string | undefined;
5093
+ middlename?: string | undefined;
5172
5094
  } | undefined;
5173
5095
  configuration?: {
5174
5096
  name?: {
@@ -7192,13 +7114,13 @@ export declare const DefaultAddressFieldValue: z.ZodObject<z.objectUtil.extendSh
7192
7114
  administrativeArea: z.ZodString;
7193
7115
  }>, {
7194
7116
  administrativeArea: z.ZodOptional<z.ZodUnion<[z.ZodBranded<z.ZodString, "UUID">, z.ZodObject<{
7195
- $userField: z.ZodEnum<["id", "name", "role", "fullHonorificName", "device", "firstname", "middlename", "surname", "district", "province", "primaryOfficeId"]>;
7117
+ $userField: z.ZodEnum<["id", "name", "role", "signature", "avatar", "primaryOfficeId"]>;
7196
7118
  $location: z.ZodOptional<z.ZodString>;
7197
7119
  }, "strip", z.ZodTypeAny, {
7198
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7120
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7199
7121
  $location?: string | undefined;
7200
7122
  }, {
7201
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7123
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7202
7124
  $location?: string | undefined;
7203
7125
  }>]>>;
7204
7126
  }>, "strip", z.ZodTypeAny, {
@@ -7206,7 +7128,7 @@ export declare const DefaultAddressFieldValue: z.ZodObject<z.objectUtil.extendSh
7206
7128
  addressType: "DOMESTIC";
7207
7129
  streetLevelDetails?: Record<string, string> | undefined;
7208
7130
  administrativeArea?: (string & z.BRAND<"UUID">) | {
7209
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7131
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7210
7132
  $location?: string | undefined;
7211
7133
  } | undefined;
7212
7134
  }, {
@@ -7214,7 +7136,7 @@ export declare const DefaultAddressFieldValue: z.ZodObject<z.objectUtil.extendSh
7214
7136
  addressType: "DOMESTIC";
7215
7137
  streetLevelDetails?: Record<string, string> | undefined;
7216
7138
  administrativeArea?: string | {
7217
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7139
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7218
7140
  $location?: string | undefined;
7219
7141
  } | undefined;
7220
7142
  }>;
@@ -7472,13 +7394,13 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7472
7394
  administrativeArea: z.ZodString;
7473
7395
  }>, {
7474
7396
  administrativeArea: z.ZodOptional<z.ZodUnion<[z.ZodBranded<z.ZodString, "UUID">, z.ZodObject<{
7475
- $userField: z.ZodEnum<["id", "name", "role", "fullHonorificName", "device", "firstname", "middlename", "surname", "district", "province", "primaryOfficeId"]>;
7397
+ $userField: z.ZodEnum<["id", "name", "role", "signature", "avatar", "primaryOfficeId"]>;
7476
7398
  $location: z.ZodOptional<z.ZodString>;
7477
7399
  }, "strip", z.ZodTypeAny, {
7478
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7400
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7479
7401
  $location?: string | undefined;
7480
7402
  }, {
7481
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7403
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7482
7404
  $location?: string | undefined;
7483
7405
  }>]>>;
7484
7406
  }>, "strip", z.ZodTypeAny, {
@@ -7486,7 +7408,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7486
7408
  addressType: "DOMESTIC";
7487
7409
  streetLevelDetails?: Record<string, string> | undefined;
7488
7410
  administrativeArea?: (string & z.BRAND<"UUID">) | {
7489
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7411
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7490
7412
  $location?: string | undefined;
7491
7413
  } | undefined;
7492
7414
  }, {
@@ -7494,7 +7416,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7494
7416
  addressType: "DOMESTIC";
7495
7417
  streetLevelDetails?: Record<string, string> | undefined;
7496
7418
  administrativeArea?: string | {
7497
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7419
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7498
7420
  $location?: string | undefined;
7499
7421
  } | undefined;
7500
7422
  }>>;
@@ -7544,7 +7466,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7544
7466
  addressType: "DOMESTIC";
7545
7467
  streetLevelDetails?: Record<string, string> | undefined;
7546
7468
  administrativeArea?: (string & z.BRAND<"UUID">) | {
7547
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7469
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7548
7470
  $location?: string | undefined;
7549
7471
  } | undefined;
7550
7472
  } | undefined;
@@ -7641,7 +7563,7 @@ declare const Address: z.ZodObject<z.objectUtil.extendShape<{
7641
7563
  addressType: "DOMESTIC";
7642
7564
  streetLevelDetails?: Record<string, string> | undefined;
7643
7565
  administrativeArea?: string | {
7644
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
7566
+ $userField: "signature" | "id" | "name" | "role" | "avatar" | "primaryOfficeId";
7645
7567
  $location?: string | undefined;
7646
7568
  } | undefined;
7647
7569
  } | undefined;
@@ -49,6 +49,6 @@ export type FieldType = (typeof fieldTypes)[number];
49
49
  /**
50
50
  * Composite field types are field types that consist of multiple field values.
51
51
  */
52
- export declare const compositeFieldTypes: ("NAME" | "ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS" | "DATA" | "ID_READER")[];
52
+ export declare const compositeFieldTypes: ("ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS" | "DATA" | "ID_READER")[];
53
53
  export declare const FieldTypesToHideInReview: ("PARAGRAPH" | "PAGE_HEADER" | "BULLET_LIST" | "DIVIDER" | "DATA" | "HTTP" | "QUERY_PARAM_READER" | "ID_READER" | "LOADER")[];
54
54
  //# sourceMappingURL=FieldType.d.ts.map
@@ -2,26 +2,14 @@
2
2
  * TemplateConfig defines configuration rules for system-based variables (e.g. $user.province).
3
3
  * They are currently used for providing default values in FieldConfig.
4
4
  */
5
- import { UUID } from '../uuid';
6
5
  import { FieldValue } from './FieldValue';
7
6
  /**
8
7
  * Available system variables for configuration.
9
8
  */
10
9
  export type SystemVariables = {
11
- user: {
12
- id: string;
13
- province?: string;
14
- district?: string;
15
- name?: string;
16
- role?: string;
17
- firstname?: string;
18
- middlename?: string;
19
- surname?: string;
20
- primaryOfficeId?: UUID;
21
- fullHonorificName?: string;
22
- device?: string;
23
- avatar?: string;
24
- signature?: string;
10
+ $user: {
11
+ province: string;
12
+ district: string;
25
13
  };
26
14
  $window: {
27
15
  location: {