@nira-opencrvs/toolkit 1.9.11-rc.871aaf5 → 1.9.12-rc.3b87c2f

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.
@@ -232,10 +232,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
232
232
  };
233
233
  fieldId: string;
234
234
  fieldType: "field";
235
- type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
235
+ type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FIELD_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
236
236
  options?: {
237
237
  value: string;
238
238
  label: string | import("../commons").TranslationConfig;
239
+ conditionals?: ({
240
+ type: "SHOW";
241
+ conditional: import("../commons").JSONSchema;
242
+ } | {
243
+ type: "ENABLE";
244
+ conditional: import("../commons").JSONSchema;
245
+ })[] | undefined;
239
246
  }[] | undefined;
240
247
  label?: import("../commons").TranslationConfig | undefined;
241
248
  conditionals?: ({
@@ -260,10 +267,17 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
260
267
  };
261
268
  fieldId: "event.status" | "event.trackingId" | "event.updatedAt" | "event.legalStatuses.REGISTERED.acceptedAt" | "event.legalStatuses.REGISTERED.createdAtLocation" | "event.legalStatuses.REGISTERED.registrationNumber";
262
269
  fieldType: "event";
263
- type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
270
+ type?: "NAME" | "PHONE" | "ID" | "ADDRESS" | "TEXT" | "NUMBER" | "NUMBER_WITH_UNIT" | "TEXTAREA" | "EMAIL" | "DATE" | "AGE" | "DATE_RANGE" | "SELECT_DATE_RANGE" | "TIME" | "PARAGRAPH" | "PAGE_HEADER" | "RADIO_GROUP" | "FIELD_GROUP" | "FILE" | "FILE_WITH_OPTIONS" | "BULLET_LIST" | "CHECKBOX" | "SELECT" | "COUNTRY" | "LOCATION" | "DIVIDER" | "ADMINISTRATIVE_AREA" | "FACILITY" | "OFFICE" | "SIGNATURE" | "DATA" | "BUTTON" | "SEARCH" | "ALPHA_PRINT_BUTTON" | "HTTP" | "LINK_BUTTON" | "VERIFICATION_STATUS" | "QUERY_PARAM_READER" | "QR_READER" | "ID_READER" | "LOADER" | undefined;
264
271
  options?: {
265
272
  value: string;
266
273
  label: string | import("../commons").TranslationConfig;
274
+ conditionals?: ({
275
+ type: "SHOW";
276
+ conditional: import("../commons").JSONSchema;
277
+ } | {
278
+ type: "ENABLE";
279
+ conditional: import("../commons").JSONSchema;
280
+ })[] | undefined;
267
281
  }[] | undefined;
268
282
  label?: import("../commons").TranslationConfig | undefined;
269
283
  conditionals?: ({
@@ -3668,7 +3682,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3668
3682
  signature?: string | undefined;
3669
3683
  device?: string | undefined;
3670
3684
  data?: Record<string, string> | undefined;
3685
+ email?: string | undefined;
3671
3686
  fullHonorificName?: string | undefined;
3687
+ mobile?: string | undefined;
3672
3688
  avatar?: string | undefined;
3673
3689
  } | {
3674
3690
  type: "system";
@@ -3697,7 +3713,9 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3697
3713
  signature?: string | undefined;
3698
3714
  device?: string | undefined;
3699
3715
  data?: Record<string, string> | undefined;
3716
+ email?: string | undefined;
3700
3717
  fullHonorificName?: string | undefined;
3718
+ mobile?: string | undefined;
3701
3719
  avatar?: string | undefined;
3702
3720
  } | {
3703
3721
  type: "system";
@@ -3881,27 +3899,27 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3881
3899
  createdBy?: {
3882
3900
  type: "exact";
3883
3901
  term: string | {
3884
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3902
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3885
3903
  $location?: string | undefined;
3886
3904
  };
3887
3905
  } | undefined;
3888
3906
  createdAtLocation?: {
3889
3907
  type: "exact";
3890
3908
  term: string | {
3891
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3909
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3892
3910
  $location?: string | undefined;
3893
3911
  };
3894
3912
  } | {
3895
3913
  type: "within";
3896
3914
  location: string | {
3897
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3915
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3898
3916
  $location?: string | undefined;
3899
3917
  };
3900
3918
  } | undefined;
3901
3919
  assignedTo?: {
3902
3920
  type: "exact";
3903
3921
  term: string | {
3904
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3922
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3905
3923
  $location?: string | undefined;
3906
3924
  };
3907
3925
  } | undefined;
@@ -3923,27 +3941,27 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3923
3941
  updatedByUserRole?: {
3924
3942
  type: "exact";
3925
3943
  term: string | {
3926
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3944
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3927
3945
  $location?: string | undefined;
3928
3946
  };
3929
3947
  } | undefined;
3930
3948
  updatedAtLocation?: {
3931
3949
  type: "exact";
3932
3950
  term: string | {
3933
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3951
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3934
3952
  $location?: string | undefined;
3935
3953
  };
3936
3954
  } | {
3937
3955
  type: "within";
3938
3956
  location: string | {
3939
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3957
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3940
3958
  $location?: string | undefined;
3941
3959
  };
3942
3960
  } | undefined;
3943
3961
  updatedBy?: {
3944
3962
  type: "exact";
3945
3963
  term: string | {
3946
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
3964
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
3947
3965
  $location?: string | undefined;
3948
3966
  };
3949
3967
  } | undefined;
@@ -4004,27 +4022,27 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4004
4022
  createdBy?: {
4005
4023
  type: "exact";
4006
4024
  term: string | {
4007
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4025
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4008
4026
  $location?: string | undefined;
4009
4027
  };
4010
4028
  } | undefined;
4011
4029
  createdAtLocation?: {
4012
4030
  type: "exact";
4013
4031
  term: string | {
4014
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4032
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4015
4033
  $location?: string | undefined;
4016
4034
  };
4017
4035
  } | {
4018
4036
  type: "within";
4019
4037
  location: string | {
4020
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4038
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4021
4039
  $location?: string | undefined;
4022
4040
  };
4023
4041
  } | undefined;
4024
4042
  assignedTo?: {
4025
4043
  type: "exact";
4026
4044
  term: string | {
4027
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4045
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4028
4046
  $location?: string | undefined;
4029
4047
  };
4030
4048
  } | undefined;
@@ -4046,27 +4064,27 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4046
4064
  updatedByUserRole?: {
4047
4065
  type: "exact";
4048
4066
  term: string | {
4049
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4067
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4050
4068
  $location?: string | undefined;
4051
4069
  };
4052
4070
  } | undefined;
4053
4071
  updatedAtLocation?: {
4054
4072
  type: "exact";
4055
4073
  term: string | {
4056
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4074
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4057
4075
  $location?: string | undefined;
4058
4076
  };
4059
4077
  } | {
4060
4078
  type: "within";
4061
4079
  location: string | {
4062
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4080
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4063
4081
  $location?: string | undefined;
4064
4082
  };
4065
4083
  } | undefined;
4066
4084
  updatedBy?: {
4067
4085
  type: "exact";
4068
4086
  term: string | {
4069
- $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
4087
+ $userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "email" | "role" | "fullHonorificName" | "province" | "primaryOfficeId" | "mobile";
4070
4088
  $location?: string | undefined;
4071
4089
  };
4072
4090
  } | undefined;
@@ -6,7 +6,9 @@ import { FieldUpdateValue, FieldValue } from '../events/FieldValue';
6
6
  import { TranslationConfig } from '../events/TranslationConfig';
7
7
  import { ITokenPayload } from '../authentication';
8
8
  import { UUID } from '../uuid';
9
- import { ActionType, EventDocument } from '../client';
9
+ import { FormState } from '../events/utils';
10
+ import { ActionType } from '../events/ActionType';
11
+ import { EventDocument } from '../events/EventDocument';
10
12
  export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
11
13
  export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
12
14
  export declare function isOnline(): boolean;
@@ -89,13 +91,14 @@ export declare function runStructuralValidations({ field, values, context, actio
89
91
  }): {
90
92
  message: TranslationConfig;
91
93
  }[];
92
- export declare function runFieldValidations({ field, values, context }: {
94
+ export declare function runFieldValidations({ field: config, form, value, context }: {
93
95
  field: FieldConfig;
94
- values: ActionUpdate;
96
+ value: FieldUpdateValue;
97
+ form: ActionUpdate;
95
98
  context: ValidatorContext;
96
- }): {
99
+ }): FormState<Array<{
97
100
  message: TranslationConfig;
98
- }[];
101
+ }>>;
99
102
  export declare function getValidatorsForField(fieldId: FieldConfig['id'], validations: NonNullable<FieldConfig['validation']>): NonNullable<FieldConfig['validation']>;
100
103
  export declare function areCertificateConditionsMet(conditions: FieldConditional[], values: ConditionalParameters): boolean;
101
104
  //# sourceMappingURL=validate.d.ts.map
@@ -8,7 +8,7 @@ export type ActionUpdate = z.infer<typeof ActionUpdate>;
8
8
  /**
9
9
  * EventState is an aggregate of all the actions that have been applied to event data.
10
10
  */
11
- export declare const EventState: z.ZodRecord<z.ZodString, z.ZodType<FieldValue, z.ZodTypeDef, unknown>>;
11
+ export declare const EventState: z.ZodRecord<z.ZodString, z.ZodType<FieldValue, z.ZodTypeDef, FieldValue>>;
12
12
  export type EventState = z.infer<typeof EventState>;
13
13
  export declare const ActionStatus: {
14
14
  readonly Requested: "Requested";