@ecrvs/opencrvs-toolkit 1.9.10-rc.d4f70c6 → 1.9.12-rc.62ef478
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/api/router.d.ts +82 -7
- package/dist/commons/conditionals/validate.d.ts +8 -5
- package/dist/commons/events/AdvancedSearchConfig.d.ts +288 -24
- package/dist/commons/events/CountryConfigQueryInput.d.ts +290 -0
- package/dist/commons/events/EventConfig.d.ts +202 -30
- package/dist/commons/events/EventIndex.d.ts +134 -0
- package/dist/commons/events/EventMetadata.d.ts +106 -2
- package/dist/commons/events/FieldConfig.d.ts +692 -68
- package/dist/commons/events/FieldType.d.ts +2 -1
- package/dist/commons/events/FieldTypeMapping.d.ts +51 -51
- package/dist/commons/events/FieldValue.d.ts +190 -28
- package/dist/commons/events/PlainDate.d.ts +19 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +455 -0
- package/dist/commons/events/defineConfig.d.ts +17 -3
- package/dist/commons/events/state/index.d.ts +9 -0
- package/dist/commons/events/state/utils.d.ts +10 -0
- package/dist/commons/events/utils.d.ts +165 -15
- package/dist/events/index.js +969 -792
- package/dist/notification/index.js +825 -784
- package/package.json +1 -1
|
@@ -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?: ({
|
|
@@ -287,7 +301,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
287
301
|
$$field: string;
|
|
288
302
|
$$subfield: string[];
|
|
289
303
|
} | {
|
|
290
|
-
$$event: "createdAt" | "updatedAt" | "legalStatuses.DECLARED.createdAt" | "legalStatuses.DECLARED.acceptedAt" | "legalStatuses.REGISTERED.createdAt" | "legalStatuses.REGISTERED.acceptedAt";
|
|
304
|
+
$$event: "createdAt" | "updatedAt" | "legalStatuses.DECLARED.createdAt" | "legalStatuses.DECLARED.acceptedAt" | "legalStatuses.VALIDATED.createdAt" | "legalStatuses.VALIDATED.acceptedAt" | "legalStatuses.REGISTERED.createdAt" | "legalStatuses.REGISTERED.acceptedAt";
|
|
291
305
|
} | undefined;
|
|
292
306
|
fallbackTitle?: import("../commons").TranslationConfig | undefined;
|
|
293
307
|
}[];
|
|
@@ -3283,6 +3297,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3283
3297
|
createdBySignature?: string | null | undefined;
|
|
3284
3298
|
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
3285
3299
|
} | null | undefined;
|
|
3300
|
+
VALIDATED?: {
|
|
3301
|
+
createdAt: string;
|
|
3302
|
+
createdBy: string;
|
|
3303
|
+
createdByRole: string;
|
|
3304
|
+
acceptedAt: string;
|
|
3305
|
+
createdByUserType?: "system" | "user" | null | undefined;
|
|
3306
|
+
createdBySignature?: string | null | undefined;
|
|
3307
|
+
createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
|
3308
|
+
} | null | undefined;
|
|
3286
3309
|
};
|
|
3287
3310
|
updatedByUserRole: string;
|
|
3288
3311
|
potentialDuplicates: {
|
|
@@ -3588,11 +3611,49 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3588
3611
|
output: any;
|
|
3589
3612
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
3590
3613
|
}>;
|
|
3591
|
-
reindex: import("@trpc/server").
|
|
3592
|
-
|
|
3593
|
-
|
|
3614
|
+
reindex: import("@trpc/server").TRPCBuiltRouter<{
|
|
3615
|
+
ctx: {
|
|
3616
|
+
user: {
|
|
3617
|
+
type: "user";
|
|
3618
|
+
id: string;
|
|
3619
|
+
role: string;
|
|
3620
|
+
primaryOfficeId: string & import("zod").BRAND<"UUID">;
|
|
3621
|
+
signature?: string | undefined;
|
|
3622
|
+
} | {
|
|
3623
|
+
type: "system";
|
|
3624
|
+
id: string;
|
|
3625
|
+
role: "HEALTH" | "NATIONAL_ID" | "RECORD_SEARCH" | "REINDEX" | "WEBHOOK" | "IMPORT_EXPORT";
|
|
3626
|
+
primaryOfficeId?: undefined;
|
|
3627
|
+
signature?: undefined;
|
|
3628
|
+
};
|
|
3629
|
+
token: `Bearer ${string}`;
|
|
3630
|
+
};
|
|
3594
3631
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
3595
|
-
|
|
3632
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
3633
|
+
transformer: true;
|
|
3634
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
3635
|
+
trigger: import("@trpc/server").TRPCMutationProcedure<{
|
|
3636
|
+
input: void;
|
|
3637
|
+
output: void;
|
|
3638
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
3639
|
+
}>;
|
|
3640
|
+
status: import("@trpc/server").TRPCQueryProcedure<{
|
|
3641
|
+
input: {
|
|
3642
|
+
limit?: number | undefined;
|
|
3643
|
+
} | undefined;
|
|
3644
|
+
output: {
|
|
3645
|
+
id: string;
|
|
3646
|
+
status: "failed" | "running" | "completed";
|
|
3647
|
+
timestamp: string;
|
|
3648
|
+
progress: {
|
|
3649
|
+
processed: number;
|
|
3650
|
+
};
|
|
3651
|
+
error_message: string | null;
|
|
3652
|
+
completed_at: string | null;
|
|
3653
|
+
}[];
|
|
3654
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
3655
|
+
}>;
|
|
3656
|
+
}>>;
|
|
3596
3657
|
}>>;
|
|
3597
3658
|
user: import("@trpc/server").TRPCBuiltRouter<{
|
|
3598
3659
|
ctx: {
|
|
@@ -3880,6 +3941,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3880
3941
|
type: "timePeriod";
|
|
3881
3942
|
term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
|
|
3882
3943
|
} | undefined;
|
|
3944
|
+
updatedByUserRole?: {
|
|
3945
|
+
type: "exact";
|
|
3946
|
+
term: string | {
|
|
3947
|
+
$userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
|
|
3948
|
+
$location?: string | undefined;
|
|
3949
|
+
};
|
|
3950
|
+
} | undefined;
|
|
3883
3951
|
updatedAtLocation?: {
|
|
3884
3952
|
type: "exact";
|
|
3885
3953
|
term: string | {
|
|
@@ -3996,6 +4064,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
3996
4064
|
type: "timePeriod";
|
|
3997
4065
|
term: "last7Days" | "last30Days" | "last90Days" | "last365Days";
|
|
3998
4066
|
} | undefined;
|
|
4067
|
+
updatedByUserRole?: {
|
|
4068
|
+
type: "exact";
|
|
4069
|
+
term: string | {
|
|
4070
|
+
$userField: "id" | "name" | "device" | "district" | "firstname" | "surname" | "middlename" | "role" | "fullHonorificName" | "province" | "primaryOfficeId";
|
|
4071
|
+
$location?: string | undefined;
|
|
4072
|
+
};
|
|
4073
|
+
} | undefined;
|
|
3999
4074
|
updatedAtLocation?: {
|
|
4000
4075
|
type: "exact";
|
|
4001
4076
|
term: string | {
|
|
@@ -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 {
|
|
9
|
+
import { FormState } from '../events/utils';
|
|
10
|
+
import { ActionType } from '../events/ActionType';
|
|
11
|
+
import { EventDocument } from '../events/EventDocument';
|
|
10
12
|
export declare const isValidDateFormat: (date: string) => boolean;
|
|
11
13
|
export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
|
|
12
14
|
export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
|
|
@@ -90,13 +92,14 @@ export declare function runStructuralValidations({ field, values, context, actio
|
|
|
90
92
|
}): {
|
|
91
93
|
message: TranslationConfig;
|
|
92
94
|
}[];
|
|
93
|
-
export declare function runFieldValidations({ field,
|
|
95
|
+
export declare function runFieldValidations({ field: config, form, value, context }: {
|
|
94
96
|
field: FieldConfig;
|
|
95
|
-
|
|
97
|
+
value: FieldUpdateValue;
|
|
98
|
+
form: ActionUpdate;
|
|
96
99
|
context: ValidatorContext;
|
|
97
|
-
}): {
|
|
100
|
+
}): FormState<Array<{
|
|
98
101
|
message: TranslationConfig;
|
|
99
|
-
}
|
|
102
|
+
}>>;
|
|
100
103
|
export declare function getValidatorsForField(fieldId: FieldConfig['id'], validations: NonNullable<FieldConfig['validation']>): NonNullable<FieldConfig['validation']>;
|
|
101
104
|
export declare function areCertificateConditionsMet(conditions: FieldConditional[], values: ConditionalParameters): boolean;
|
|
102
105
|
//# sourceMappingURL=validate.d.ts.map
|