@opencrvs/toolkit 1.8.1-rc.008155b → 1.8.1-rc.184470
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 +6 -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 +52 -52
- package/dist/commons/events/EventMetadata.d.ts +9 -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 +169 -73
- package/package.json +1 -1
- package/tsconfig.json +1 -1
- package/dist/commons/conditionals/conditionals.test.d.ts +0 -2
- package/dist/commons/conditionals/validate-address.test.d.ts +0 -2
- package/dist/commons/conditionals/validate.test.d.ts +0 -2
- package/dist/commons/events/utils.test.d.ts +0 -2
@@ -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 | {
|
@@ -7504,7 +7504,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
7504
7504
|
output: {
|
7505
7505
|
type: string;
|
7506
7506
|
id: string & import("zod").BRAND<"UUID">;
|
7507
|
-
status: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
7507
|
+
status: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
7508
7508
|
createdAt: string;
|
7509
7509
|
createdBy: string;
|
7510
7510
|
declaration: Record<string, string | number | boolean | {
|
@@ -10876,10 +10876,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
10876
10876
|
clauses: {
|
10877
10877
|
status?: {
|
10878
10878
|
type: "exact";
|
10879
|
-
term: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10879
|
+
term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10880
10880
|
} | {
|
10881
10881
|
type: "anyOf";
|
10882
|
-
terms: ("ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10882
|
+
terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10883
10883
|
} | undefined;
|
10884
10884
|
data?: any;
|
10885
10885
|
createdByUserType?: {
|
@@ -10985,10 +10985,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
10985
10985
|
clauses: {
|
10986
10986
|
status?: {
|
10987
10987
|
type: "exact";
|
10988
|
-
term: "ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10988
|
+
term: "ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED";
|
10989
10989
|
} | {
|
10990
10990
|
type: "anyOf";
|
10991
|
-
terms: ("ARCHIVED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10991
|
+
terms: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
|
10992
10992
|
} | undefined;
|
10993
10993
|
data?: any;
|
10994
10994
|
createdByUserType?: {
|
@@ -11098,7 +11098,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
11098
11098
|
label: import("../commons").TranslationConfig;
|
11099
11099
|
}[];
|
11100
11100
|
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";
|
11101
|
-
emptyMessage?: import("../commons").TranslationConfig | undefined;
|
11102
11101
|
}[];
|
11103
11102
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
11104
11103
|
}>;
|
@@ -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
|