@opencrvs/toolkit 2.1.0-rc.d078d1a → 2.1.0-rc.d13869e
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/application-config/index.js +189 -200
- package/dist/commons/api/router.d.ts +1 -86
- package/dist/commons/conditionals/conditionals.d.ts +6 -6
- package/dist/commons/conditionals/validate.d.ts +1 -10
- package/dist/commons/events/ActionDocument.d.ts +7 -1
- package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -12
- package/dist/commons/events/AuditLog.d.ts +0 -37
- package/dist/commons/events/EventConfig.d.ts +0 -3
- package/dist/commons/events/EventIndex.d.ts +24 -1
- package/dist/commons/events/FieldConfig.d.ts +0 -10
- package/dist/commons/events/FieldTypeMapping.d.ts +27 -27
- package/dist/commons/events/Flag.d.ts +0 -42
- package/dist/commons/events/WorkqueueConfig.d.ts +14 -17
- package/dist/commons/events/event.d.ts +0 -12
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/locations.d.ts +0 -7
- package/dist/conditionals/index.js +55 -303
- package/dist/events/index.js +2829 -2988
- package/dist/notification/index.js +1047 -1724
- package/dist/scopes/index.d.ts +1 -226
- package/dist/scopes/index.js +55 -304
- package/opencrvs-toolkit-2.1.0-rc.d13869e.tgz +0 -0
- package/package.json +1 -1
- package/dist/commons/events/ActionStatus.d.ts +0 -14
- package/dist/commons/events/locationPayloads.d.ts +0 -95
- package/opencrvs-toolkit-2.1.0-rc.d078d1a.tgz +0 -0
|
@@ -32,48 +32,6 @@ export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
|
32
32
|
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
33
33
|
}>]>, z.ZodString]>;
|
|
34
34
|
export type Flag = z.infer<typeof Flag>;
|
|
35
|
-
export declare const ContainsFlags: z.ZodObject<{
|
|
36
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
37
|
-
readonly INCOMPLETE: 'incomplete';
|
|
38
|
-
readonly REJECTED: 'rejected';
|
|
39
|
-
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
40
|
-
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
41
|
-
/**
|
|
42
|
-
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
43
|
-
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
44
|
-
*
|
|
45
|
-
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
46
|
-
*/
|
|
47
|
-
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
48
|
-
}>]>, z.ZodString]>>>;
|
|
49
|
-
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
50
|
-
readonly INCOMPLETE: 'incomplete';
|
|
51
|
-
readonly REJECTED: 'rejected';
|
|
52
|
-
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
53
|
-
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
54
|
-
/**
|
|
55
|
-
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
56
|
-
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
57
|
-
*
|
|
58
|
-
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
59
|
-
*/
|
|
60
|
-
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
61
|
-
}>]>, z.ZodString]>>>;
|
|
62
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
63
|
-
readonly INCOMPLETE: 'incomplete';
|
|
64
|
-
readonly REJECTED: 'rejected';
|
|
65
|
-
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
66
|
-
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
67
|
-
/**
|
|
68
|
-
* This flag is set by the Edit-action and removed after the declaration or registration.
|
|
69
|
-
* A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
|
|
70
|
-
*
|
|
71
|
-
* We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
|
|
72
|
-
*/
|
|
73
|
-
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
74
|
-
}>]>, z.ZodString]>>>;
|
|
75
|
-
}, z.core.$strip>;
|
|
76
|
-
export type ContainsFlags = z.infer<typeof ContainsFlags>;
|
|
77
35
|
/**
|
|
78
36
|
* Configuration of a custom flag that can be associated with a certain event type.
|
|
79
37
|
*/
|
|
@@ -737,7 +737,6 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
737
737
|
File: "File";
|
|
738
738
|
FileArrowUp: "FileArrowUp";
|
|
739
739
|
FileDotted: "FileDotted";
|
|
740
|
-
FileLock: "FileLock";
|
|
741
740
|
FileMinus: "FileMinus";
|
|
742
741
|
FilePlus: "FilePlus";
|
|
743
742
|
FileSearch: "FileSearch";
|
|
@@ -863,7 +862,6 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
|
|
|
863
862
|
File: "File";
|
|
864
863
|
FileArrowUp: "FileArrowUp";
|
|
865
864
|
FileDotted: "FileDotted";
|
|
866
|
-
FileLock: "FileLock";
|
|
867
865
|
FileMinus: "FileMinus";
|
|
868
866
|
FilePlus: "FilePlus";
|
|
869
867
|
FileSearch: "FileSearch";
|
|
@@ -1015,7 +1013,6 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
1015
1013
|
File: "File";
|
|
1016
1014
|
FileArrowUp: "FileArrowUp";
|
|
1017
1015
|
FileDotted: "FileDotted";
|
|
1018
|
-
FileLock: "FileLock";
|
|
1019
1016
|
FileMinus: "FileMinus";
|
|
1020
1017
|
FilePlus: "FilePlus";
|
|
1021
1018
|
FileSearch: "FileSearch";
|
|
@@ -2041,11 +2038,11 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
|
|
|
2041
2038
|
clauses: {
|
|
2042
2039
|
eventType?: string | undefined;
|
|
2043
2040
|
status?: {
|
|
2044
|
-
type: "exact";
|
|
2045
|
-
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2046
|
-
} | {
|
|
2047
2041
|
type: "anyOf";
|
|
2048
2042
|
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2043
|
+
} | {
|
|
2044
|
+
type: "exact";
|
|
2045
|
+
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2049
2046
|
} | undefined;
|
|
2050
2047
|
createdAt?: {
|
|
2051
2048
|
type: "range";
|
|
@@ -2180,11 +2177,11 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
|
|
|
2180
2177
|
clauses: {
|
|
2181
2178
|
eventType?: string | undefined;
|
|
2182
2179
|
status?: {
|
|
2183
|
-
type: "exact";
|
|
2184
|
-
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2185
|
-
} | {
|
|
2186
2180
|
type: "anyOf";
|
|
2187
2181
|
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2182
|
+
} | {
|
|
2183
|
+
type: "exact";
|
|
2184
|
+
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2188
2185
|
} | undefined;
|
|
2189
2186
|
createdAt?: {
|
|
2190
2187
|
type: "range";
|
|
@@ -2328,7 +2325,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
|
|
|
2328
2325
|
$event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
|
|
2329
2326
|
};
|
|
2330
2327
|
}[];
|
|
2331
|
-
icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "
|
|
2328
|
+
icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
|
|
2332
2329
|
emptyMessage?: {
|
|
2333
2330
|
id: string;
|
|
2334
2331
|
defaultMessage: string;
|
|
@@ -2352,11 +2349,11 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
|
|
|
2352
2349
|
clauses: {
|
|
2353
2350
|
eventType?: string | undefined;
|
|
2354
2351
|
status?: {
|
|
2355
|
-
type: "exact";
|
|
2356
|
-
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2357
|
-
} | {
|
|
2358
2352
|
type: "anyOf";
|
|
2359
2353
|
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2354
|
+
} | {
|
|
2355
|
+
type: "exact";
|
|
2356
|
+
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2360
2357
|
} | undefined;
|
|
2361
2358
|
createdAt?: {
|
|
2362
2359
|
type: "range";
|
|
@@ -2491,11 +2488,11 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
|
|
|
2491
2488
|
clauses: {
|
|
2492
2489
|
eventType?: string | undefined;
|
|
2493
2490
|
status?: {
|
|
2494
|
-
type: "exact";
|
|
2495
|
-
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2496
|
-
} | {
|
|
2497
2491
|
type: "anyOf";
|
|
2498
2492
|
terms: ("ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED")[];
|
|
2493
|
+
} | {
|
|
2494
|
+
type: "exact";
|
|
2495
|
+
term: "ARCHIVED" | "CREATED" | "DECLARED" | "NOTIFIED" | "REGISTERED";
|
|
2499
2496
|
} | undefined;
|
|
2500
2497
|
createdAt?: {
|
|
2501
2498
|
type: "range";
|
|
@@ -2639,7 +2636,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
|
|
|
2639
2636
|
$event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
|
|
2640
2637
|
};
|
|
2641
2638
|
}[];
|
|
2642
|
-
icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "
|
|
2639
|
+
icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
|
|
2643
2640
|
emptyMessage?: {
|
|
2644
2641
|
id: string;
|
|
2645
2642
|
defaultMessage: string;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { NonSearchableEventMetadataTimeFieldIdInput, AdvancedSearchConfig } from '../event-config/event-configuration';
|
|
2
2
|
import { ActionType } from './ActionType';
|
|
3
3
|
import { EventFieldIdInput } from './AdvancedSearchConfig';
|
|
4
|
-
import { EventStatus } from './EventMetadata';
|
|
5
|
-
import { Flag } from './Flag';
|
|
6
4
|
import { WorkqueueColumnKeys, WorkqueueColumnValue } from './WorkqueueColumnConfig';
|
|
7
5
|
/**
|
|
8
6
|
* Creates a function that acts like a callable + static method container.
|
|
@@ -77,16 +75,6 @@ declare const event: typeof eventFn & {
|
|
|
77
75
|
};
|
|
78
76
|
};
|
|
79
77
|
field(field: WorkqueueColumnKeys): WorkqueueColumnValue;
|
|
80
|
-
/**
|
|
81
|
-
* Checks if the event currently has the given status.
|
|
82
|
-
* @param eventStatus - The status to check for.
|
|
83
|
-
*/
|
|
84
|
-
hasStatus: (eventStatus: EventStatus) => import("../conditionals/conditionals").JSONSchema;
|
|
85
|
-
/**
|
|
86
|
-
* Checks if the event currently carries the given flag.
|
|
87
|
-
* @param flagValue - The flag to check for.
|
|
88
|
-
*/
|
|
89
|
-
hasFlag: (flagValue: Flag) => import("../conditionals/conditionals").JSONSchema;
|
|
90
78
|
};
|
|
91
79
|
export { event };
|
|
92
80
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -45,7 +45,6 @@ export * from './field';
|
|
|
45
45
|
export * from './Flag';
|
|
46
46
|
export * from './event';
|
|
47
47
|
export * from './locations';
|
|
48
|
-
export * from './locationPayloads';
|
|
49
48
|
export { UUID } from '../uuid';
|
|
50
49
|
export { DocumentPath } from '../documents';
|
|
51
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -111,13 +111,6 @@ export type SetAdministrativeAreaPayload = z.infer<typeof SetAdministrativeAreaP
|
|
|
111
111
|
export declare function resolveVersion<T extends {
|
|
112
112
|
effectiveFrom: string;
|
|
113
113
|
}>(versions: T[], anchor: string): T;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the entity holds the given externalId with active status at the
|
|
116
|
-
* anchor date or at any point after it. Used for point-in-time uniqueness of
|
|
117
|
-
* external codes: a new holder starting at `anchor` collides when an existing
|
|
118
|
-
* holder is (or is scheduled to be) active with the code from then on.
|
|
119
|
-
*/
|
|
120
|
-
export declare function hasActiveExternalIdOnOrAfter(versions: LocationVersion[], externalId: string, anchor: string): boolean;
|
|
121
114
|
type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
|
|
122
115
|
/**
|
|
123
116
|
* For type T, convert fields K to arrays. If field is string, convert to string[].
|