@opencrvs/toolkit 2.0.0-rc.1498d58 → 2.0.0-rc.14dd6ca
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/build.sh +2 -2
- package/dist/application-config/index.js +5 -27
- package/dist/cli.js +5103 -167
- package/dist/commons/api/router.d.ts +68 -669
- package/dist/commons/conditionals/conditionals.d.ts +6 -6
- package/dist/commons/events/ActionConfig.d.ts +0 -202
- package/dist/commons/events/ActionDocument.d.ts +0 -44
- package/dist/commons/events/ActionInput.d.ts +0 -26
- package/dist/commons/events/ActionType.d.ts +1 -6
- package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -18
- package/dist/commons/events/AuditLog.d.ts +0 -2
- package/dist/commons/events/Draft.d.ts +0 -2
- package/dist/commons/events/EventConfig.d.ts +0 -2
- package/dist/commons/events/EventDocument.d.ts +0 -22
- package/dist/commons/events/EventIndex.d.ts +0 -11
- package/dist/commons/events/EventMetadata.d.ts +0 -26
- package/dist/commons/events/FieldConfig.d.ts +0 -15
- package/dist/commons/events/WorkqueueConfig.d.ts +2 -5
- package/dist/commons/events/locations.d.ts +0 -1
- package/dist/commons/events/scopes.d.ts +0 -1
- package/dist/commons/events/state/index.d.ts +0 -8
- package/dist/commons/events/state/utils.d.ts +0 -9
- package/dist/commons/events/test.utils.d.ts +1 -9
- package/dist/commons/events/utils.d.ts +1 -15
- package/dist/conditionals/index.js +5 -12
- package/dist/events/index.js +23 -204
- package/dist/migrations/v2.0/index.js +5139 -88
- package/dist/notification/index.js +16 -146
- package/dist/scopes/index.d.ts +2 -96
- package/dist/scopes/index.js +5 -12
- package/opencrvs-toolkit-2.0.0-rc.14dd6ca.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts +0 -3
- package/dist/migrations/v2.1/add-explicit-correction-flags.d.ts.map +0 -1
- package/dist/migrations/v2.1/add-explicit-correction-flags.js +0 -234
- package/dist/migrations/v2.1/index.d.ts +0 -6
- package/dist/migrations/v2.1/index.d.ts.map +0 -1
- package/dist/migrations/v2.1/index.js +0 -218
- package/opencrvs-toolkit-2.0.0-rc.1498d58.tgz +0 -0
|
@@ -39,17 +39,6 @@ export declare const RegistrationCreationMetadata: z.ZodObject<{
|
|
|
39
39
|
}, z.core.$strip>;
|
|
40
40
|
export type RegistrationCreationMetadata = z.infer<typeof RegistrationCreationMetadata>;
|
|
41
41
|
export declare const LegalStatuses: z.ZodObject<{
|
|
42
|
-
NOTIFIED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
43
|
-
createdAt: z.ZodISODateTime;
|
|
44
|
-
createdBy: z.ZodString;
|
|
45
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
46
|
-
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
47
|
-
user: "user";
|
|
48
|
-
system: "system";
|
|
49
|
-
}>>>;
|
|
50
|
-
acceptedAt: z.ZodISODateTime;
|
|
51
|
-
createdByRole: z.ZodOptional<z.ZodString>;
|
|
52
|
-
}, z.core.$strip>>>;
|
|
53
42
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
54
43
|
createdAt: z.ZodISODateTime;
|
|
55
44
|
createdBy: z.ZodString;
|
|
@@ -90,17 +79,6 @@ export declare const EventMetadata: z.ZodObject<{
|
|
|
90
79
|
ARCHIVED: "ARCHIVED";
|
|
91
80
|
}>;
|
|
92
81
|
legalStatuses: z.ZodObject<{
|
|
93
|
-
NOTIFIED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
94
|
-
createdAt: z.ZodISODateTime;
|
|
95
|
-
createdBy: z.ZodString;
|
|
96
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
97
|
-
createdByUserType: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
98
|
-
user: "user";
|
|
99
|
-
system: "system";
|
|
100
|
-
}>>>;
|
|
101
|
-
acceptedAt: z.ZodISODateTime;
|
|
102
|
-
createdByRole: z.ZodOptional<z.ZodString>;
|
|
103
|
-
}, z.core.$strip>>>;
|
|
104
82
|
DECLARED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
105
83
|
createdAt: z.ZodISODateTime;
|
|
106
84
|
createdBy: z.ZodString;
|
|
@@ -183,8 +161,6 @@ export declare const eventMetadataLabelMap: Record<Exclude<`event.${EventMetadat
|
|
|
183
161
|
export declare const EventMetadataDateFieldIdInput: z.ZodEnum<{
|
|
184
162
|
updatedAt: "updatedAt";
|
|
185
163
|
createdAt: "createdAt";
|
|
186
|
-
"legalStatuses.NOTIFIED.createdAt": "legalStatuses.NOTIFIED.createdAt";
|
|
187
|
-
"legalStatuses.NOTIFIED.acceptedAt": "legalStatuses.NOTIFIED.acceptedAt";
|
|
188
164
|
"legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
|
|
189
165
|
"legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
|
|
190
166
|
"legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";
|
|
@@ -194,8 +170,6 @@ export type EventMetadataDateFieldIdInput = z.infer<typeof EventMetadataDateFiel
|
|
|
194
170
|
export declare const EventMetadataDateFieldId: z.ZodEnum<{
|
|
195
171
|
"event.updatedAt": "event.updatedAt";
|
|
196
172
|
"event.createdAt": "event.createdAt";
|
|
197
|
-
"event.legalStatuses.NOTIFIED.createdAt": "event.legalStatuses.NOTIFIED.createdAt";
|
|
198
|
-
"event.legalStatuses.NOTIFIED.acceptedAt": "event.legalStatuses.NOTIFIED.acceptedAt";
|
|
199
173
|
"event.legalStatuses.DECLARED.createdAt": "event.legalStatuses.DECLARED.createdAt";
|
|
200
174
|
"event.legalStatuses.DECLARED.acceptedAt": "event.legalStatuses.DECLARED.acceptedAt";
|
|
201
175
|
"event.legalStatuses.REGISTERED.createdAt": "event.legalStatuses.REGISTERED.createdAt";
|
|
@@ -1886,7 +1886,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1886
1886
|
"record.edit": "record.edit";
|
|
1887
1887
|
"record.reject": "record.reject";
|
|
1888
1888
|
"record.archive": "record.archive";
|
|
1889
|
-
"record.unarchive": "record.unarchive";
|
|
1890
1889
|
"record.review-duplicates": "record.review-duplicates";
|
|
1891
1890
|
"record.register": "record.register";
|
|
1892
1891
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
@@ -1920,8 +1919,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1920
1919
|
role: "role";
|
|
1921
1920
|
event: "event";
|
|
1922
1921
|
placeOfEvent: "placeOfEvent";
|
|
1923
|
-
notifiedIn: "notifiedIn";
|
|
1924
|
-
notifiedBy: "notifiedBy";
|
|
1925
1922
|
declaredIn: "declaredIn";
|
|
1926
1923
|
declaredBy: "declaredBy";
|
|
1927
1924
|
registeredIn: "registeredIn";
|
|
@@ -2015,7 +2012,6 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2015
2012
|
"record.edit": "record.edit";
|
|
2016
2013
|
"record.reject": "record.reject";
|
|
2017
2014
|
"record.archive": "record.archive";
|
|
2018
|
-
"record.unarchive": "record.unarchive";
|
|
2019
2015
|
"record.review-duplicates": "record.review-duplicates";
|
|
2020
2016
|
"record.register": "record.register";
|
|
2021
2017
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
@@ -2049,8 +2045,6 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2049
2045
|
role: "role";
|
|
2050
2046
|
event: "event";
|
|
2051
2047
|
placeOfEvent: "placeOfEvent";
|
|
2052
|
-
notifiedIn: "notifiedIn";
|
|
2053
|
-
notifiedBy: "notifiedBy";
|
|
2054
2048
|
declaredIn: "declaredIn";
|
|
2055
2049
|
declaredBy: "declaredBy";
|
|
2056
2050
|
registeredIn: "registeredIn";
|
|
@@ -2215,7 +2209,6 @@ declare const Facility: z.ZodObject<{
|
|
|
2215
2209
|
"record.edit": "record.edit";
|
|
2216
2210
|
"record.reject": "record.reject";
|
|
2217
2211
|
"record.archive": "record.archive";
|
|
2218
|
-
"record.unarchive": "record.unarchive";
|
|
2219
2212
|
"record.review-duplicates": "record.review-duplicates";
|
|
2220
2213
|
"record.register": "record.register";
|
|
2221
2214
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
@@ -2249,8 +2242,6 @@ declare const Facility: z.ZodObject<{
|
|
|
2249
2242
|
role: "role";
|
|
2250
2243
|
event: "event";
|
|
2251
2244
|
placeOfEvent: "placeOfEvent";
|
|
2252
|
-
notifiedIn: "notifiedIn";
|
|
2253
|
-
notifiedBy: "notifiedBy";
|
|
2254
2245
|
declaredIn: "declaredIn";
|
|
2255
2246
|
declaredBy: "declaredBy";
|
|
2256
2247
|
registeredIn: "registeredIn";
|
|
@@ -2330,7 +2321,6 @@ declare const Office: z.ZodObject<{
|
|
|
2330
2321
|
"record.edit": "record.edit";
|
|
2331
2322
|
"record.reject": "record.reject";
|
|
2332
2323
|
"record.archive": "record.archive";
|
|
2333
|
-
"record.unarchive": "record.unarchive";
|
|
2334
2324
|
"record.review-duplicates": "record.review-duplicates";
|
|
2335
2325
|
"record.register": "record.register";
|
|
2336
2326
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
@@ -2364,8 +2354,6 @@ declare const Office: z.ZodObject<{
|
|
|
2364
2354
|
role: "role";
|
|
2365
2355
|
event: "event";
|
|
2366
2356
|
placeOfEvent: "placeOfEvent";
|
|
2367
|
-
notifiedIn: "notifiedIn";
|
|
2368
|
-
notifiedBy: "notifiedBy";
|
|
2369
2357
|
declaredIn: "declaredIn";
|
|
2370
2358
|
declaredBy: "declaredBy";
|
|
2371
2359
|
registeredIn: "registeredIn";
|
|
@@ -2531,7 +2519,6 @@ declare const Address: z.ZodObject<{
|
|
|
2531
2519
|
"record.edit": "record.edit";
|
|
2532
2520
|
"record.reject": "record.reject";
|
|
2533
2521
|
"record.archive": "record.archive";
|
|
2534
|
-
"record.unarchive": "record.unarchive";
|
|
2535
2522
|
"record.review-duplicates": "record.review-duplicates";
|
|
2536
2523
|
"record.register": "record.register";
|
|
2537
2524
|
"record.print-certified-copies": "record.print-certified-copies";
|
|
@@ -2565,8 +2552,6 @@ declare const Address: z.ZodObject<{
|
|
|
2565
2552
|
role: "role";
|
|
2566
2553
|
event: "event";
|
|
2567
2554
|
placeOfEvent: "placeOfEvent";
|
|
2568
|
-
notifiedIn: "notifiedIn";
|
|
2569
|
-
notifiedBy: "notifiedBy";
|
|
2570
2555
|
declaredIn: "declaredIn";
|
|
2571
2556
|
declaredBy: "declaredBy";
|
|
2572
2557
|
registeredIn: "registeredIn";
|
|
@@ -659,7 +659,6 @@ export declare const WorkqueueConfig: z.ZodObject<{
|
|
|
659
659
|
REJECT: "REJECT";
|
|
660
660
|
MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
|
|
661
661
|
ARCHIVE: "ARCHIVE";
|
|
662
|
-
UNARCHIVE: "UNARCHIVE";
|
|
663
662
|
PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
|
|
664
663
|
REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
|
665
664
|
READ: "READ";
|
|
@@ -914,7 +913,6 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
|
|
|
914
913
|
REJECT: "REJECT";
|
|
915
914
|
MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
|
|
916
915
|
ARCHIVE: "ARCHIVE";
|
|
917
|
-
UNARCHIVE: "UNARCHIVE";
|
|
918
916
|
PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
|
|
919
917
|
REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
|
920
918
|
READ: "READ";
|
|
@@ -935,7 +933,6 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
|
|
|
935
933
|
REJECT: "REJECT";
|
|
936
934
|
MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
|
|
937
935
|
ARCHIVE: "ARCHIVE";
|
|
938
|
-
UNARCHIVE: "UNARCHIVE";
|
|
939
936
|
PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
|
|
940
937
|
REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
|
941
938
|
READ: "READ";
|
|
@@ -2324,7 +2321,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
|
|
|
2324
2321
|
}[];
|
|
2325
2322
|
icon: "File" | "Archived" | "Assigned" | "Briefcase" | "Certified" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "Registered" | "RequiresUpdates" | "Sent" | "Validated" | "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" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "PenNib" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "ChatText" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
|
|
2326
2323
|
action?: {
|
|
2327
|
-
type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "
|
|
2324
|
+
type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ";
|
|
2328
2325
|
} | undefined;
|
|
2329
2326
|
emptyMessage?: {
|
|
2330
2327
|
id: string;
|
|
@@ -2635,7 +2632,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
|
|
|
2635
2632
|
}[];
|
|
2636
2633
|
icon: "File" | "Archived" | "Assigned" | "Briefcase" | "Certified" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "Registered" | "RequiresUpdates" | "Sent" | "Validated" | "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" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "PenNib" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "ChatText" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
|
|
2637
2634
|
action?: {
|
|
2638
|
-
type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "
|
|
2635
|
+
type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ";
|
|
2639
2636
|
} | undefined;
|
|
2640
2637
|
emptyMessage?: {
|
|
2641
2638
|
id: string;
|
|
@@ -40,7 +40,6 @@ type ToArrayFields<T, K extends PropertyKey> = T extends unknown ? T extends obj
|
|
|
40
40
|
*/
|
|
41
41
|
export type EventIndexWithAdministrativeHierarchy = Omit<ToArrayFields<EventIndex, 'createdAtLocation' | 'updatedAtLocation' | 'placeOfEvent'>, 'legalStatuses'> & {
|
|
42
42
|
legalStatuses: {
|
|
43
|
-
NOTIFIED: ToArrayFields<ActionCreationMetadata, 'createdAtLocation'> | undefined;
|
|
44
43
|
DECLARED: ToArrayFields<ActionCreationMetadata, 'createdAtLocation'> | undefined;
|
|
45
44
|
REGISTERED: ToArrayFields<RegistrationCreationMetadata, 'createdAtLocation'> | undefined;
|
|
46
45
|
};
|
|
@@ -20,7 +20,6 @@ export declare const ACTION_SCOPE_MAP: {
|
|
|
20
20
|
MARK_AS_DUPLICATE: "record.review-duplicates"[];
|
|
21
21
|
MARK_AS_NOT_DUPLICATE: "record.review-duplicates"[];
|
|
22
22
|
ARCHIVE: "record.archive"[];
|
|
23
|
-
UNARCHIVE: "record.unarchive"[];
|
|
24
23
|
REJECT: "record.reject"[];
|
|
25
24
|
ASSIGN: null;
|
|
26
25
|
UNASSIGN: null;
|
|
@@ -65,14 +65,6 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
|
|
|
65
65
|
type: string;
|
|
66
66
|
status: "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
|
|
67
67
|
legalStatuses: {
|
|
68
|
-
NOTIFIED?: {
|
|
69
|
-
createdAt: string;
|
|
70
|
-
createdBy: string;
|
|
71
|
-
acceptedAt: string;
|
|
72
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
73
|
-
createdByUserType?: "user" | "system" | null | undefined;
|
|
74
|
-
createdByRole?: string | undefined;
|
|
75
|
-
} | null | undefined;
|
|
76
68
|
DECLARED?: {
|
|
77
69
|
createdAt: string;
|
|
78
70
|
createdBy: string;
|
|
@@ -30,15 +30,6 @@ export declare function getActionUpdateMetadata(actions: Action[]): Pick<{
|
|
|
30
30
|
* @see EventIndex for the description of the returned object.
|
|
31
31
|
*/
|
|
32
32
|
export declare function getLegalStatuses(actions: Action[]): {
|
|
33
|
-
NOTIFIED: {
|
|
34
|
-
createdAt: string;
|
|
35
|
-
createdBy: string;
|
|
36
|
-
createdByUserType: "user" | "system";
|
|
37
|
-
createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
38
|
-
acceptedAt: string;
|
|
39
|
-
createdByRole: string | undefined;
|
|
40
|
-
registrationNumber: string | null | undefined;
|
|
41
|
-
} | null;
|
|
42
33
|
DECLARED: {
|
|
43
34
|
createdAt: string;
|
|
44
35
|
createdBy: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UUID } from '../uuid';
|
|
2
2
|
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
|
3
|
-
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput,
|
|
3
|
+
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnassignActionInput } from './ActionInput';
|
|
4
4
|
import { ActionType } from './ActionType';
|
|
5
5
|
import { Draft } from './Draft';
|
|
6
6
|
import { EventConfig } from './EventConfig';
|
|
@@ -131,14 +131,6 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
131
131
|
reason: string;
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
-
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, "transactionId" | "declaration" | "keepAssignment">>) => {
|
|
135
|
-
transactionId: string;
|
|
136
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
137
|
-
keepAssignment?: boolean | undefined;
|
|
138
|
-
type: "UNARCHIVE";
|
|
139
|
-
annotation: {};
|
|
140
|
-
eventId: string;
|
|
141
|
-
};
|
|
142
134
|
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, "transactionId" | "annotation" | "keepAssignment">>) => {
|
|
143
135
|
transactionId: string;
|
|
144
136
|
annotation: {};
|
|
@@ -328,20 +328,6 @@ export declare function findLastAssignmentAction(actions: Action[]): {
|
|
|
328
328
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
329
329
|
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
330
330
|
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
331
|
-
} | {
|
|
332
|
-
id: string & import("zod").$brand<"UUID">;
|
|
333
|
-
transactionId: string;
|
|
334
|
-
createdByUserType: "user" | "system";
|
|
335
|
-
createdAt: string;
|
|
336
|
-
createdBy: string;
|
|
337
|
-
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
338
|
-
status: "Requested" | "Accepted" | "Rejected";
|
|
339
|
-
type: "UNARCHIVE";
|
|
340
|
-
createdByRole?: string | undefined;
|
|
341
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
342
|
-
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
343
|
-
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
344
|
-
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
345
331
|
} | {
|
|
346
332
|
id: string & import("zod").$brand<"UUID">;
|
|
347
333
|
transactionId: string;
|
|
@@ -455,7 +441,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
|
|
|
455
441
|
createdByUserType: "user" | "system";
|
|
456
442
|
createdAt: string;
|
|
457
443
|
createdBy: string;
|
|
458
|
-
type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "
|
|
444
|
+
type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
|
|
459
445
|
status: "Rejected";
|
|
460
446
|
createdByRole?: string | undefined;
|
|
461
447
|
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
@@ -152,7 +152,6 @@ var RecordScopeTypeV2 = z6.enum([
|
|
|
152
152
|
"record.edit",
|
|
153
153
|
"record.reject",
|
|
154
154
|
"record.archive",
|
|
155
|
-
"record.unarchive",
|
|
156
155
|
"record.review-duplicates",
|
|
157
156
|
"record.register",
|
|
158
157
|
"record.print-certified-copies",
|
|
@@ -192,13 +191,11 @@ var scopeOptionsPlaceEvent = z6.object({
|
|
|
192
191
|
event: scopeByEvent,
|
|
193
192
|
placeOfEvent: JurisdictionFilter.optional()
|
|
194
193
|
}).describe("Options applicable to all record scopes.");
|
|
195
|
-
var
|
|
196
|
-
notifiedIn: JurisdictionFilter.optional(),
|
|
197
|
-
notifiedBy: UserFilter.optional(),
|
|
194
|
+
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
198
195
|
declaredIn: JurisdictionFilter.optional(),
|
|
199
196
|
declaredBy: UserFilter.optional()
|
|
200
197
|
}).describe("Options applicable to actions that may take place after DECLARE");
|
|
201
|
-
var AllRecordScopeOptions =
|
|
198
|
+
var AllRecordScopeOptions = scopeOptionsDeclared.extend({
|
|
202
199
|
registeredIn: JurisdictionFilter.optional(),
|
|
203
200
|
registeredBy: UserFilter.optional()
|
|
204
201
|
}).describe(
|
|
@@ -236,8 +233,6 @@ var ResolvedScopeOptionsPlaceEvent = z6.object({
|
|
|
236
233
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
237
234
|
);
|
|
238
235
|
var ResolvedScopeOptionsDeclared = ResolvedScopeOptionsPlaceEvent.extend({
|
|
239
|
-
notifiedIn: UUID.nullish(),
|
|
240
|
-
notifiedBy: z6.string().optional(),
|
|
241
236
|
declaredIn: UUID.nullish(),
|
|
242
237
|
declaredBy: z6.string().optional()
|
|
243
238
|
}).describe(
|
|
@@ -258,7 +253,6 @@ var ScopesWithDeclaredOptions = RecordScopeTypeV2.extract([
|
|
|
258
253
|
"record.edit",
|
|
259
254
|
"record.reject",
|
|
260
255
|
"record.archive",
|
|
261
|
-
"record.unarchive",
|
|
262
256
|
"record.review-duplicates",
|
|
263
257
|
"record.register"
|
|
264
258
|
]);
|
|
@@ -284,7 +278,7 @@ var RecordScopeV2 = z6.discriminatedUnion("type", [
|
|
|
284
278
|
}),
|
|
285
279
|
z6.object({
|
|
286
280
|
type: ScopesWithDeclaredOptions,
|
|
287
|
-
options:
|
|
281
|
+
options: scopeOptionsDeclared.optional()
|
|
288
282
|
}),
|
|
289
283
|
z6.object({
|
|
290
284
|
type: ScopesWithFullOptions,
|
|
@@ -373,9 +367,8 @@ var EncodedScope2 = z6.string().brand("EncodedScope");
|
|
|
373
367
|
var DEFAULT_SCOPE_OPTIONS = {
|
|
374
368
|
placeOfEvent: JurisdictionFilter.enum.all,
|
|
375
369
|
accessLevel: JurisdictionFilter.enum.all,
|
|
376
|
-
|
|
377
|
-
declaredIn: JurisdictionFilter.enum.all
|
|
378
|
-
registeredIn: JurisdictionFilter.enum.all
|
|
370
|
+
registeredIn: JurisdictionFilter.enum.all,
|
|
371
|
+
declaredIn: JurisdictionFilter.enum.all
|
|
379
372
|
};
|
|
380
373
|
|
|
381
374
|
// ../commons/src/users/userReferences.ts
|