@opencrvs/toolkit 2.0.0-rc.e94ba6c → 2.0.0-rc.ea3d915

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.
Files changed (32) hide show
  1. package/create-countryconfig/index.js +50 -20
  2. package/create-countryconfig/package.json +12 -2
  3. package/dist/application-config/index.js +218 -85
  4. package/dist/cli.js +206 -36
  5. package/dist/commons/api/router.d.ts +3311 -246
  6. package/dist/commons/conditionals/conditionals.d.ts +6 -0
  7. package/dist/commons/conditionals/validate.d.ts +1 -0
  8. package/dist/commons/events/ActionInput.d.ts +108 -0
  9. package/dist/commons/events/Draft.d.ts +4 -2
  10. package/dist/commons/events/EventIndex.d.ts +0 -3
  11. package/dist/commons/events/EventMetadata.d.ts +0 -7
  12. package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
  13. package/dist/commons/events/index.d.ts +1 -0
  14. package/dist/commons/events/state/flags.d.ts +15 -0
  15. package/dist/commons/events/state/index.d.ts +0 -4
  16. package/dist/commons/events/state/utils.d.ts +0 -2
  17. package/dist/commons/events/utils.d.ts +1 -1
  18. package/dist/conditionals/index.js +7 -1
  19. package/dist/events/index.js +728 -172
  20. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
  21. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
  22. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
  23. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  24. package/dist/migrations/v2.0/index.js +204 -34
  25. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  26. package/dist/migrations/v2.0/migrate-scopes.js +54 -30
  27. package/dist/notification/index.js +652 -117
  28. package/dist/scopes/index.js +3 -1
  29. package/opencrvs-toolkit-2.0.0-rc.ea3d915.tgz +0 -0
  30. package/package.json +6 -2
  31. package/tsconfig.tsbuildinfo +1 -1
  32. package/opencrvs-toolkit-2.0.0-rc.e94ba6c.tgz +0 -0
@@ -677,6 +677,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
677
677
  }, z.core.$strip>;
678
678
  }, z.core.$strip>>>;
679
679
  icon: z.ZodEnum<{
680
+ File: "File";
680
681
  Archived: "Archived";
681
682
  Assigned: "Assigned";
682
683
  Briefcase: "Briefcase";
@@ -722,7 +723,6 @@ export declare const WorkqueueConfig: z.ZodObject<{
722
723
  Eye: "Eye";
723
724
  EyeSlash: "EyeSlash";
724
725
  Envelope: "Envelope";
725
- File: "File";
726
726
  FileSearch: "FileSearch";
727
727
  FileMinus: "FileMinus";
728
728
  FilePlus: "FilePlus";
@@ -786,6 +786,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
786
786
  export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
787
787
  name: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
788
788
  icon: z.ZodEnum<{
789
+ File: "File";
789
790
  Archived: "Archived";
790
791
  Assigned: "Assigned";
791
792
  Briefcase: "Briefcase";
@@ -831,7 +832,6 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
831
832
  Eye: "Eye";
832
833
  EyeSlash: "EyeSlash";
833
834
  Envelope: "Envelope";
834
- File: "File";
835
835
  FileSearch: "FileSearch";
836
836
  FileMinus: "FileMinus";
837
837
  FilePlus: "FilePlus";
@@ -910,6 +910,152 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
910
910
  export declare const WorkqueueConfigInput: z.ZodObject<{
911
911
  slug: z.ZodString;
912
912
  name: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
913
+ action: z.ZodOptional<z.ZodObject<{
914
+ type: z.ZodEnum<{
915
+ DELETE: "DELETE";
916
+ DECLARE: "DECLARE";
917
+ REGISTER: "REGISTER";
918
+ EDIT: "EDIT";
919
+ REJECT: "REJECT";
920
+ MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
921
+ ARCHIVE: "ARCHIVE";
922
+ PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
923
+ REQUEST_CORRECTION: "REQUEST_CORRECTION";
924
+ READ: "READ";
925
+ }>;
926
+ }, z.core.$strip>>;
927
+ columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
928
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
929
+ value: z.ZodObject<{
930
+ $event: z.ZodEnum<{
931
+ id: "id";
932
+ title: "title";
933
+ type: "type";
934
+ updatedAt: "updatedAt";
935
+ placeOfEvent: "placeOfEvent";
936
+ createdByUserType: "createdByUserType";
937
+ createdAt: "createdAt";
938
+ createdBy: "createdBy";
939
+ createdAtLocation: "createdAtLocation";
940
+ status: "status";
941
+ assignedTo: "assignedTo";
942
+ trackingId: "trackingId";
943
+ legalStatuses: "legalStatuses";
944
+ dateOfEvent: "dateOfEvent";
945
+ updatedByUserRole: "updatedByUserRole";
946
+ updatedAtLocation: "updatedAtLocation";
947
+ updatedBy: "updatedBy";
948
+ flags: "flags";
949
+ outbox: "outbox";
950
+ }>;
951
+ }, z.core.$strip>;
952
+ }, z.core.$strip>>>;
953
+ icon: z.ZodEnum<{
954
+ File: "File";
955
+ Archived: "Archived";
956
+ Assigned: "Assigned";
957
+ Briefcase: "Briefcase";
958
+ Certified: "Certified";
959
+ Close: "Close";
960
+ Collapse: "Collapse";
961
+ Draft: "Draft";
962
+ DuplicateYellow: "DuplicateYellow";
963
+ Expand: "Expand";
964
+ ExternalValidate: "ExternalValidate";
965
+ FilledCheck: "FilledCheck";
966
+ InReview: "InReview";
967
+ Offline: "Offline";
968
+ Registered: "Registered";
969
+ RequiresUpdates: "RequiresUpdates";
970
+ Sent: "Sent";
971
+ Validated: "Validated";
972
+ WaitingApproval: "WaitingApproval";
973
+ ChartActivity: "ChartActivity";
974
+ Activity: "Activity";
975
+ Archive: "Archive";
976
+ ArchiveTray: "ArchiveTray";
977
+ ArrowLeft: "ArrowLeft";
978
+ ArrowRight: "ArrowRight";
979
+ Buildings: "Buildings";
980
+ Circle: "Circle";
981
+ CaretDown: "CaretDown";
982
+ CaretLeft: "CaretLeft";
983
+ CaretRight: "CaretRight";
984
+ ChartBar: "ChartBar";
985
+ ChartLine: "ChartLine";
986
+ ChatCircle: "ChatCircle";
987
+ CheckSquare: "CheckSquare";
988
+ Compass: "Compass";
989
+ Check: "Check";
990
+ Copy: "Copy";
991
+ Database: "Database";
992
+ DotsThreeVertical: "DotsThreeVertical";
993
+ ArrowCounterClockwise: "ArrowCounterClockwise";
994
+ MagnifyingGlassMinus: "MagnifyingGlassMinus";
995
+ MagnifyingGlassPlus: "MagnifyingGlassPlus";
996
+ Export: "Export";
997
+ Eye: "Eye";
998
+ EyeSlash: "EyeSlash";
999
+ Envelope: "Envelope";
1000
+ FileSearch: "FileSearch";
1001
+ FileMinus: "FileMinus";
1002
+ FilePlus: "FilePlus";
1003
+ FileText: "FileText";
1004
+ FileX: "FileX";
1005
+ Handshake: "Handshake";
1006
+ Gear: "Gear";
1007
+ GitBranch: "GitBranch";
1008
+ IdentificationCard: "IdentificationCard";
1009
+ List: "List";
1010
+ ListBullets: "ListBullets";
1011
+ Lock: "Lock";
1012
+ MagnifyingGlass: "MagnifyingGlass";
1013
+ MapPin: "MapPin";
1014
+ Medal: "Medal";
1015
+ NotePencil: "NotePencil";
1016
+ Paperclip: "Paperclip";
1017
+ PaperPlaneTilt: "PaperPlaneTilt";
1018
+ Pen: "Pen";
1019
+ PenNib: "PenNib";
1020
+ Pencil: "Pencil";
1021
+ PencilSimpleLine: "PencilSimpleLine";
1022
+ Phone: "Phone";
1023
+ Plus: "Plus";
1024
+ Printer: "Printer";
1025
+ SignOut: "SignOut";
1026
+ Stamp: "Stamp";
1027
+ Star: "Star";
1028
+ Target: "Target";
1029
+ TextT: "TextT";
1030
+ Trash: "Trash";
1031
+ UploadSimple: "UploadSimple";
1032
+ User: "User";
1033
+ UserPlus: "UserPlus";
1034
+ Users: "Users";
1035
+ WarningCircle: "WarningCircle";
1036
+ X: "X";
1037
+ ChatText: "ChatText";
1038
+ CircleWavyCheck: "CircleWavyCheck";
1039
+ CircleWavyQuestion: "CircleWavyQuestion";
1040
+ ArchiveBox: "ArchiveBox";
1041
+ ArrowCircleDown: "ArrowCircleDown";
1042
+ FileArrowUp: "FileArrowUp";
1043
+ FileDotted: "FileDotted";
1044
+ Files: "Files";
1045
+ PencilLine: "PencilLine";
1046
+ PencilCircle: "PencilCircle";
1047
+ UserCircle: "UserCircle";
1048
+ Clock: "Clock";
1049
+ QrCode: "QrCode";
1050
+ Webcam: "Webcam";
1051
+ Sun: "Sun";
1052
+ DeviceTabletCamera: "DeviceTabletCamera";
1053
+ Globe: "Globe";
1054
+ Fingerprint: "Fingerprint";
1055
+ PushPin: "PushPin";
1056
+ Timer: "Timer";
1057
+ }>;
1058
+ emptyMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
913
1059
  query: z.ZodUnion<readonly [z.ZodObject<{
914
1060
  eventType: z.ZodOptional<z.ZodString>;
915
1061
  status: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -1838,152 +1984,6 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1838
1984
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1839
1985
  }, z.core.$strip>>;
1840
1986
  }, z.core.$strip>]>;
1841
- action: z.ZodOptional<z.ZodObject<{
1842
- type: z.ZodEnum<{
1843
- DELETE: "DELETE";
1844
- DECLARE: "DECLARE";
1845
- REGISTER: "REGISTER";
1846
- EDIT: "EDIT";
1847
- REJECT: "REJECT";
1848
- MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
1849
- ARCHIVE: "ARCHIVE";
1850
- PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
1851
- REQUEST_CORRECTION: "REQUEST_CORRECTION";
1852
- READ: "READ";
1853
- }>;
1854
- }, z.core.$strip>>;
1855
- columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
1856
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
1857
- value: z.ZodObject<{
1858
- $event: z.ZodEnum<{
1859
- id: "id";
1860
- title: "title";
1861
- type: "type";
1862
- updatedAt: "updatedAt";
1863
- placeOfEvent: "placeOfEvent";
1864
- createdByUserType: "createdByUserType";
1865
- createdAt: "createdAt";
1866
- createdBy: "createdBy";
1867
- createdAtLocation: "createdAtLocation";
1868
- status: "status";
1869
- assignedTo: "assignedTo";
1870
- trackingId: "trackingId";
1871
- legalStatuses: "legalStatuses";
1872
- dateOfEvent: "dateOfEvent";
1873
- updatedByUserRole: "updatedByUserRole";
1874
- updatedAtLocation: "updatedAtLocation";
1875
- updatedBy: "updatedBy";
1876
- flags: "flags";
1877
- outbox: "outbox";
1878
- }>;
1879
- }, z.core.$strip>;
1880
- }, z.core.$strip>>>;
1881
- icon: z.ZodEnum<{
1882
- Archived: "Archived";
1883
- Assigned: "Assigned";
1884
- Briefcase: "Briefcase";
1885
- Certified: "Certified";
1886
- Close: "Close";
1887
- Collapse: "Collapse";
1888
- Draft: "Draft";
1889
- DuplicateYellow: "DuplicateYellow";
1890
- Expand: "Expand";
1891
- ExternalValidate: "ExternalValidate";
1892
- FilledCheck: "FilledCheck";
1893
- InReview: "InReview";
1894
- Offline: "Offline";
1895
- Registered: "Registered";
1896
- RequiresUpdates: "RequiresUpdates";
1897
- Sent: "Sent";
1898
- Validated: "Validated";
1899
- WaitingApproval: "WaitingApproval";
1900
- ChartActivity: "ChartActivity";
1901
- Activity: "Activity";
1902
- Archive: "Archive";
1903
- ArchiveTray: "ArchiveTray";
1904
- ArrowLeft: "ArrowLeft";
1905
- ArrowRight: "ArrowRight";
1906
- Buildings: "Buildings";
1907
- Circle: "Circle";
1908
- CaretDown: "CaretDown";
1909
- CaretLeft: "CaretLeft";
1910
- CaretRight: "CaretRight";
1911
- ChartBar: "ChartBar";
1912
- ChartLine: "ChartLine";
1913
- ChatCircle: "ChatCircle";
1914
- CheckSquare: "CheckSquare";
1915
- Compass: "Compass";
1916
- Check: "Check";
1917
- Copy: "Copy";
1918
- Database: "Database";
1919
- DotsThreeVertical: "DotsThreeVertical";
1920
- ArrowCounterClockwise: "ArrowCounterClockwise";
1921
- MagnifyingGlassMinus: "MagnifyingGlassMinus";
1922
- MagnifyingGlassPlus: "MagnifyingGlassPlus";
1923
- Export: "Export";
1924
- Eye: "Eye";
1925
- EyeSlash: "EyeSlash";
1926
- Envelope: "Envelope";
1927
- File: "File";
1928
- FileSearch: "FileSearch";
1929
- FileMinus: "FileMinus";
1930
- FilePlus: "FilePlus";
1931
- FileText: "FileText";
1932
- FileX: "FileX";
1933
- Handshake: "Handshake";
1934
- Gear: "Gear";
1935
- GitBranch: "GitBranch";
1936
- IdentificationCard: "IdentificationCard";
1937
- List: "List";
1938
- ListBullets: "ListBullets";
1939
- Lock: "Lock";
1940
- MagnifyingGlass: "MagnifyingGlass";
1941
- MapPin: "MapPin";
1942
- Medal: "Medal";
1943
- NotePencil: "NotePencil";
1944
- Paperclip: "Paperclip";
1945
- PaperPlaneTilt: "PaperPlaneTilt";
1946
- Pen: "Pen";
1947
- PenNib: "PenNib";
1948
- Pencil: "Pencil";
1949
- PencilSimpleLine: "PencilSimpleLine";
1950
- Phone: "Phone";
1951
- Plus: "Plus";
1952
- Printer: "Printer";
1953
- SignOut: "SignOut";
1954
- Stamp: "Stamp";
1955
- Star: "Star";
1956
- Target: "Target";
1957
- TextT: "TextT";
1958
- Trash: "Trash";
1959
- UploadSimple: "UploadSimple";
1960
- User: "User";
1961
- UserPlus: "UserPlus";
1962
- Users: "Users";
1963
- WarningCircle: "WarningCircle";
1964
- X: "X";
1965
- ChatText: "ChatText";
1966
- CircleWavyCheck: "CircleWavyCheck";
1967
- CircleWavyQuestion: "CircleWavyQuestion";
1968
- ArchiveBox: "ArchiveBox";
1969
- ArrowCircleDown: "ArrowCircleDown";
1970
- FileArrowUp: "FileArrowUp";
1971
- FileDotted: "FileDotted";
1972
- Files: "Files";
1973
- PencilLine: "PencilLine";
1974
- PencilCircle: "PencilCircle";
1975
- UserCircle: "UserCircle";
1976
- Clock: "Clock";
1977
- QrCode: "QrCode";
1978
- Webcam: "Webcam";
1979
- Sun: "Sun";
1980
- DeviceTabletCamera: "DeviceTabletCamera";
1981
- Globe: "Globe";
1982
- Fingerprint: "Fingerprint";
1983
- PushPin: "PushPin";
1984
- Timer: "Timer";
1985
- }>;
1986
- emptyMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
1987
1987
  }, z.core.$strip>;
1988
1988
  export type WorkqueueConfig = z.infer<typeof WorkqueueConfig>;
1989
1989
  export type WorkqueueConfigWithoutQuery = z.infer<typeof WorkqueueConfigWithoutQuery>;
@@ -2282,7 +2282,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2282
2282
  $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
2283
2283
  };
2284
2284
  }[];
2285
- icon: "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" | "File" | "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";
2285
+ 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";
2286
2286
  action?: {
2287
2287
  type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ";
2288
2288
  } | undefined;
@@ -2591,7 +2591,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2591
2591
  $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
2592
2592
  };
2593
2593
  }[];
2594
- icon: "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" | "File" | "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";
2594
+ 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";
2595
2595
  action?: {
2596
2596
  type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ";
2597
2597
  } | undefined;
@@ -37,6 +37,7 @@ export * from './scopes';
37
37
  export * from './serializer';
38
38
  export * from './state/availableActions';
39
39
  export * from './FileUtils';
40
+ export * from './mocks.test.utils';
40
41
  export * from '../conditionals/conditionals';
41
42
  export * from '../conditionals/validate';
42
43
  export * from './field';
@@ -1,6 +1,8 @@
1
+ import { Action, RequestedCorrectionAction } from '../ActionDocument';
1
2
  import { Flag, CustomFlag } from '../Flag';
2
3
  import { EventConfig } from '../EventConfig';
3
4
  import { EventDocument } from '../EventDocument';
5
+ export declare function findPendingCorrectionAction(writeActions: Action[]): RequestedCorrectionAction | undefined;
4
6
  /**
5
7
  * This function resolves custom flags for an event based on its actions.
6
8
  * Flags are not stored to the event state or any database directly, instead they are always computed/evaluated from the event actions.
@@ -18,5 +20,18 @@ import { EventDocument } from '../EventDocument';
18
20
  * // Returns: ['flag-1', 'flag-3']
19
21
  */
20
22
  export declare function resolveEventCustomFlags(event: EventDocument, eventConfiguration: EventConfig): CustomFlag[];
23
+ /**
24
+ * Computes all flags (inherent, action status, and custom) that should be attached to the given event,
25
+ * based on its actions and event-specific configuration.
26
+ *
27
+ * Flags are determined by combining:
28
+ * - Action status flags (format 'ActionType:ActionStatus')
29
+ * - Inherent flags (e.g. incomplete, rejected, correction requested, potential duplicate, edit in progress)
30
+ * - Event type-specific custom flags defined in the event configuration
31
+ *
32
+ * @param event - The EventDocument containing the action history and payload
33
+ * @param config - The EventConfig providing rules for custom flag evaluation
34
+ * @returns An array of flags currently relevant/applicable to the event
35
+ */
21
36
  export declare function getEventFlags(event: EventDocument, config: EventConfig): Flag[];
22
37
  //# sourceMappingURL=flags.d.ts.map
@@ -9,7 +9,6 @@ import { UUID } from '../../uuid';
9
9
  import { DocumentPath } from '../../documents';
10
10
  export declare function getStatusFromActions(actions: Array<Action>): "CREATED" | "NOTIFIED" | "DECLARED" | "REGISTERED" | "ARCHIVED";
11
11
  export declare function getAssignedUserFromActions(actions: Array<ActionDocument>): string | null;
12
- export declare function getAssignedUserSignatureFromActions(actions: Array<ActionDocument>): string | null;
13
12
  type NonNullableDeep<T> = T extends [unknown, ...unknown[]] ? {
14
13
  [K in keyof T]: NonNullableDeep<NonNullable<T[K]>>;
15
14
  } : T extends UUID ? T : T extends DocumentPath ? T : T extends string ? NonNullable<T> : T extends (infer U)[] ? NonNullableDeep<U>[] : T extends object ? {
@@ -73,7 +72,6 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
73
72
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
74
73
  createdByUserType?: "user" | "system" | null | undefined;
75
74
  createdByRole?: string | undefined;
76
- createdBySignature?: string | null | undefined;
77
75
  } | null | undefined;
78
76
  REGISTERED?: {
79
77
  createdAt: string;
@@ -83,7 +81,6 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
83
81
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
84
82
  createdByUserType?: "user" | "system" | null | undefined;
85
83
  createdByRole?: string | undefined;
86
- createdBySignature?: string | null | undefined;
87
84
  } | null | undefined;
88
85
  };
89
86
  createdAt: string;
@@ -101,7 +98,6 @@ export declare function applyDraftToEventIndex(eventIndex: EventIndex, draft: Dr
101
98
  createdByUserType?: "user" | "system" | null | undefined;
102
99
  updatedByUserRole?: string | null | undefined;
103
100
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
104
- createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
105
101
  updatedAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
106
102
  assignedTo?: string | null | undefined;
107
103
  updatedBy?: string | null | undefined;
@@ -312,7 +312,6 @@ export declare function getLegalStatuses(actions: Action[]): {
312
312
  createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
313
313
  acceptedAt: string;
314
314
  createdByRole: string | undefined;
315
- createdBySignature: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
316
315
  registrationNumber: string | null | undefined;
317
316
  } | null;
318
317
  REGISTERED: {
@@ -322,7 +321,6 @@ export declare function getLegalStatuses(actions: Action[]): {
322
321
  createdAtLocation: (string & import("zod").$brand<"UUID">) | null | undefined;
323
322
  acceptedAt: string;
324
323
  createdByRole: string | undefined;
325
- createdBySignature: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
326
324
  registrationNumber: string | null | undefined;
327
325
  } | null;
328
326
  };
@@ -131,7 +131,7 @@ export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate
131
131
  * * @param validatorContext - custom validation context
132
132
  * @returns {Partial<T>} A new object containing only the values for visible fields
133
133
  */
134
- export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean, declarationContext?: EventState): Partial<T>;
134
+ export declare function omitHiddenFields<T extends EventState | ActionUpdate>(fields: FieldConfig[], formValues: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<T>;
135
135
  export declare function omitHiddenPaginatedFields<T extends EventState | ActionUpdate>(formConfig: FormConfig, values: T, validatorContext: ValidatorContext, includeHiddenFieldsWithNullValues?: boolean): Partial<Partial<T>>;
136
136
  /**
137
137
  *
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/conditionals/index.ts
31
31
  var conditionals_exports = {};
32
32
  __export(conditionals_exports, {
33
+ always: () => always,
33
34
  alwaysTrue: () => alwaysTrue,
34
35
  and: () => and,
35
36
  createFieldConditionals: () => createFieldConditionals,
@@ -365,7 +366,9 @@ var ScopeType2 = z6.enum([
365
366
  var EncodedScope2 = z6.string().brand("EncodedScope");
366
367
  var DEFAULT_SCOPE_OPTIONS = {
367
368
  placeOfEvent: JurisdictionFilter.enum.all,
368
- accessLevel: JurisdictionFilter.enum.all
369
+ accessLevel: JurisdictionFilter.enum.all,
370
+ registeredIn: JurisdictionFilter.enum.all,
371
+ declaredIn: JurisdictionFilter.enum.all
369
372
  };
370
373
 
371
374
  // ../commons/src/users/userReferences.ts
@@ -452,6 +455,9 @@ function not(condition) {
452
455
  function never() {
453
456
  return not(alwaysTrue());
454
457
  }
458
+ function always() {
459
+ return defineConditional(alwaysTrue());
460
+ }
455
461
  function jsonFieldPath(field) {
456
462
  return [field.$$field, ...field.$$subfield].join("/");
457
463
  }