@opencrvs/toolkit 1.8.1-rc.fa83f7b → 1.8.1-rc.faf1965
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 +8 -7
- package/dist/commons/conditionals/validate.d.ts +3 -2
- package/dist/commons/events/AdvancedSearchConfig.d.ts +13 -31
- package/dist/commons/events/CountryConfigQueryInput.d.ts +88 -88
- package/dist/commons/events/EventConfig.d.ts +9 -9
- package/dist/commons/events/EventIndex.d.ts +55 -52
- package/dist/commons/events/EventMetadata.d.ts +12 -9
- package/dist/commons/events/FieldConfig.d.ts +8 -1
- package/dist/commons/events/WorkqueueConfig.d.ts +164 -199
- package/dist/commons/events/defineConfig.d.ts +1 -1
- package/dist/commons/events/event.d.ts +61 -7
- package/dist/commons/events/utils.d.ts +2 -2
- package/dist/conditionals/index.js +2 -2
- package/dist/events/index.js +171 -74
- package/package.json +1 -1
@@ -7409,7 +7409,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
7409
7409
|
output: {
|
7410
7410
|
type: string;
|
7411
7411
|
id: string & import("zod").BRAND<"UUID">;
|
7412
|
-
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
7412
|
+
status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
7413
7413
|
createdAt: string;
|
7414
7414
|
createdBy: string;
|
7415
7415
|
declaration: Record<string, string | number | boolean | {
|
@@ -7493,6 +7493,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
7493
7493
|
dateOfEvent?: string | null | undefined;
|
7494
7494
|
updatedAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
7495
7495
|
updatedBy?: string | null | undefined;
|
7496
|
+
modifiedAt?: string | undefined;
|
7496
7497
|
}[];
|
7497
7498
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
7498
7499
|
}>;
|
@@ -7504,7 +7505,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
7504
7505
|
output: {
|
7505
7506
|
type: string;
|
7506
7507
|
id: string & import("zod").BRAND<"UUID">;
|
7507
|
-
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
7508
|
+
status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
7508
7509
|
createdAt: string;
|
7509
7510
|
createdBy: string;
|
7510
7511
|
declaration: Record<string, string | number | boolean | {
|
@@ -7588,6 +7589,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
7588
7589
|
dateOfEvent?: string | null | undefined;
|
7589
7590
|
updatedAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
|
7590
7591
|
updatedBy?: string | null | undefined;
|
7592
|
+
modifiedAt?: string | undefined;
|
7591
7593
|
}[];
|
7592
7594
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
7593
7595
|
}>;
|
@@ -10878,10 +10880,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
10878
10880
|
clauses: {
|
10879
10881
|
status?: {
|
10880
10882
|
type: "exact";
|
10881
|
-
term: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10883
|
+
term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10882
10884
|
} | {
|
10883
10885
|
type: "anyOf";
|
10884
|
-
terms: ("ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10886
|
+
terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10885
10887
|
} | undefined;
|
10886
10888
|
data?: any;
|
10887
10889
|
createdByUserType?: {
|
@@ -10987,10 +10989,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
10987
10989
|
clauses: {
|
10988
10990
|
status?: {
|
10989
10991
|
type: "exact";
|
10990
|
-
term: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10992
|
+
term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10991
10993
|
} | {
|
10992
10994
|
type: "anyOf";
|
10993
|
-
terms: ("ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10995
|
+
terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10994
10996
|
} | undefined;
|
10995
10997
|
data?: any;
|
10996
10998
|
createdByUserType?: {
|
@@ -11100,7 +11102,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
11100
11102
|
label: import("../commons").TranslationConfig;
|
11101
11103
|
}[];
|
11102
11104
|
icon: "Validated" | "Registered" | "Certified" | "Archived" | "List" | "Assigned" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "RequiresUpdates" | "Sent" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "File" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
|
11103
|
-
emptyMessage?: import("../commons").TranslationConfig | undefined;
|
11104
11105
|
}[];
|
11105
11106
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
11106
11107
|
}>;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ConditionalParameters, JSONSchema } from './conditionals';
|
2
|
-
import {
|
2
|
+
import { ActionUpdate, EventState } from '../events/ActionDocument';
|
3
|
+
import { FieldConditional } from '../events/Conditional';
|
3
4
|
import { FieldConfig } from '../events/FieldConfig';
|
4
5
|
import { FieldUpdateValue } from '../events/FieldValue';
|
5
6
|
import { TranslationConfig } from '../events/TranslationConfig';
|
6
|
-
import { FieldConditional } from '../events/Conditional';
|
7
7
|
export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
|
8
8
|
export declare function isConditionMet(conditional: JSONSchema, values: Record<string, unknown>): boolean;
|
9
9
|
export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, unknown>): boolean;
|
@@ -77,4 +77,5 @@ export declare function runFieldValidations({ field, values }: {
|
|
77
77
|
}[];
|
78
78
|
};
|
79
79
|
export declare function getValidatorsForField(fieldId: FieldConfig['id'], validations: NonNullable<FieldConfig['validation']>): NonNullable<FieldConfig['validation']>;
|
80
|
+
export declare function areCertificateConditionsMet(conditions: FieldConditional[], values: Record<string, unknown>): boolean;
|
80
81
|
//# sourceMappingURL=validate.d.ts.map
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { z } from 'zod';
|
2
2
|
import { TranslationConfig } from './TranslationConfig';
|
3
|
-
import { FieldConfig } from './FieldConfig';
|
4
3
|
export declare const SearchQueryParams: z.ZodObject<{
|
5
4
|
eventType: z.ZodOptional<z.ZodString>;
|
6
5
|
}, "strip", z.ZodUnion<[z.ZodString, z.ZodString, z.ZodString, z.ZodUnion<[z.ZodObject<{
|
@@ -569,22 +568,7 @@ export declare const FieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
569
568
|
alternateFieldIds?: string[] | undefined;
|
570
569
|
excludeInSearchQuery?: boolean | undefined;
|
571
570
|
}>;
|
572
|
-
|
573
|
-
* The event fields that are available for advanced search. These are the values
|
574
|
-
* that can be passed to the `event` function to create a field config.
|
575
|
-
*/
|
576
|
-
export declare const EventFieldIdInput: z.ZodEnum<["trackingId", "status", "legalStatuses.REGISTERED.acceptedAt", "legalStatuses.REGISTERED.createdAtLocation", "updatedAt"]>;
|
577
|
-
/**
|
578
|
-
* Represent the prefix used to differentiate event metadata fields from
|
579
|
-
* the declaration ones in advanced search form.
|
580
|
-
*/
|
581
|
-
export declare const METADATA_FIELD_PREFIX = "event.";
|
582
|
-
/**
|
583
|
-
* The field IDs that are actually used in the advanced search. The `event`
|
584
|
-
* function prefixes the `EventFieldIdInput` values with METADATA_FIELD_PREFIX.
|
585
|
-
*/
|
586
|
-
export declare const EventFieldId: z.ZodEnum<["event.trackingId", "event.status", "event.legalStatuses.REGISTERED.acceptedAt", "event.legalStatuses.REGISTERED.createdAtLocation", "event.updatedAt"]>;
|
587
|
-
export type EventFieldIdInput = z.infer<typeof EventFieldIdInput>;
|
571
|
+
export declare const EventFieldId: z.ZodEnum<["trackingId", "status", "legalStatuses.REGISTERED.acceptedAt", "legalStatuses.REGISTERED.createdAtLocation", "updatedAt"]>;
|
588
572
|
export type EventFieldId = z.infer<typeof EventFieldId>;
|
589
573
|
export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShape<{
|
590
574
|
config: z.ZodObject<{
|
@@ -637,13 +621,13 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
|
|
637
621
|
validator: import(".").JSONSchema;
|
638
622
|
}>, "many">>>;
|
639
623
|
}, {
|
640
|
-
fieldId: z.ZodEnum<["
|
624
|
+
fieldId: z.ZodEnum<["trackingId", "status", "legalStatuses.REGISTERED.acceptedAt", "legalStatuses.REGISTERED.createdAtLocation", "updatedAt"]>;
|
641
625
|
fieldType: z.ZodLiteral<"event">;
|
642
626
|
}>, "strip", z.ZodTypeAny, {
|
643
627
|
config: {
|
644
628
|
type: "exact" | "fuzzy" | "range" | "within";
|
645
629
|
};
|
646
|
-
fieldId: "
|
630
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
647
631
|
fieldType: "event";
|
648
632
|
options?: {
|
649
633
|
value: string;
|
@@ -668,7 +652,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<z.objectUtil.extendShap
|
|
668
652
|
config: {
|
669
653
|
type: "exact" | "fuzzy" | "range" | "within";
|
670
654
|
};
|
671
|
-
fieldId: "
|
655
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
672
656
|
fieldType: "event";
|
673
657
|
options?: {
|
674
658
|
value: string;
|
@@ -874,13 +858,13 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
874
858
|
validator: import(".").JSONSchema;
|
875
859
|
}>, "many">>>;
|
876
860
|
}, {
|
877
|
-
fieldId: z.ZodEnum<["
|
861
|
+
fieldId: z.ZodEnum<["trackingId", "status", "legalStatuses.REGISTERED.acceptedAt", "legalStatuses.REGISTERED.createdAtLocation", "updatedAt"]>;
|
878
862
|
fieldType: z.ZodLiteral<"event">;
|
879
863
|
}>, "strip", z.ZodTypeAny, {
|
880
864
|
config: {
|
881
865
|
type: "exact" | "fuzzy" | "range" | "within";
|
882
866
|
};
|
883
|
-
fieldId: "
|
867
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
884
868
|
fieldType: "event";
|
885
869
|
options?: {
|
886
870
|
value: string;
|
@@ -905,7 +889,7 @@ export declare const SearchField: z.ZodDiscriminatedUnion<"fieldType", [z.ZodObj
|
|
905
889
|
config: {
|
906
890
|
type: "exact" | "fuzzy" | "range" | "within";
|
907
891
|
};
|
908
|
-
fieldId: "
|
892
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
909
893
|
fieldType: "event";
|
910
894
|
options?: {
|
911
895
|
value: string;
|
@@ -1118,13 +1102,13 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1118
1102
|
validator: import(".").JSONSchema;
|
1119
1103
|
}>, "many">>>;
|
1120
1104
|
}, {
|
1121
|
-
fieldId: z.ZodEnum<["
|
1105
|
+
fieldId: z.ZodEnum<["trackingId", "status", "legalStatuses.REGISTERED.acceptedAt", "legalStatuses.REGISTERED.createdAtLocation", "updatedAt"]>;
|
1122
1106
|
fieldType: z.ZodLiteral<"event">;
|
1123
1107
|
}>, "strip", z.ZodTypeAny, {
|
1124
1108
|
config: {
|
1125
1109
|
type: "exact" | "fuzzy" | "range" | "within";
|
1126
1110
|
};
|
1127
|
-
fieldId: "
|
1111
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
1128
1112
|
fieldType: "event";
|
1129
1113
|
options?: {
|
1130
1114
|
value: string;
|
@@ -1149,7 +1133,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1149
1133
|
config: {
|
1150
1134
|
type: "exact" | "fuzzy" | "range" | "within";
|
1151
1135
|
};
|
1152
|
-
fieldId: "
|
1136
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
1153
1137
|
fieldType: "event";
|
1154
1138
|
options?: {
|
1155
1139
|
value: string;
|
@@ -1216,7 +1200,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1216
1200
|
config: {
|
1217
1201
|
type: "exact" | "fuzzy" | "range" | "within";
|
1218
1202
|
};
|
1219
|
-
fieldId: "
|
1203
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
1220
1204
|
fieldType: "event";
|
1221
1205
|
options?: {
|
1222
1206
|
value: string;
|
@@ -1287,7 +1271,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1287
1271
|
config: {
|
1288
1272
|
type: "exact" | "fuzzy" | "range" | "within";
|
1289
1273
|
};
|
1290
|
-
fieldId: "
|
1274
|
+
fieldId: "status" | "updatedAt" | "trackingId" | "legalStatuses.REGISTERED.acceptedAt" | "legalStatuses.REGISTERED.createdAtLocation";
|
1291
1275
|
fieldType: "event";
|
1292
1276
|
options?: {
|
1293
1277
|
value: string;
|
@@ -1322,8 +1306,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
1322
1306
|
}[] | undefined;
|
1323
1307
|
})[];
|
1324
1308
|
}>;
|
1309
|
+
export type AdvancedSearchConfigInput = z.infer<typeof AdvancedSearchConfig>;
|
1325
1310
|
export type AdvancedSearchConfig = z.infer<typeof AdvancedSearchConfig>;
|
1326
|
-
export type AdvancedSearchConfigWithFieldsResolved = Omit<AdvancedSearchConfig, 'fields'> & {
|
1327
|
-
fields: FieldConfig[];
|
1328
|
-
};
|
1329
1311
|
//# sourceMappingURL=AdvancedSearchConfig.d.ts.map
|