@opencrvs/toolkit 2.0.0-rc.1aa040b → 2.0.0-rc.1b5d54a

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.
@@ -75,7 +75,10 @@ var ActionConditional = z.discriminatedUnion("type", [
75
75
  ShowConditional,
76
76
  // Action can be shown to the user in the list but as disabled
77
77
  EnableConditional
78
- ]);
78
+ ]).meta({
79
+ description: "Action conditional configuration",
80
+ id: "ActionConditional"
81
+ });
79
82
  var DisplayOnReviewConditional = z.object({
80
83
  type: z.literal(ConditionalType.DISPLAY_ON_REVIEW),
81
84
  conditional: Conditional
@@ -831,9 +834,7 @@ var ScopeType = z11.enum([
831
834
  var EncodedScope = z11.string().brand("EncodedScope");
832
835
  var DEFAULT_SCOPE_OPTIONS = {
833
836
  placeOfEvent: JurisdictionFilter.enum.all,
834
- accessLevel: JurisdictionFilter.enum.all,
835
- registeredIn: JurisdictionFilter.enum.all,
836
- declaredIn: JurisdictionFilter.enum.all
837
+ accessLevel: JurisdictionFilter.enum.all
837
838
  };
838
839
 
839
840
  // ../commons/src/authentication.ts
@@ -1079,6 +1080,9 @@ var FlagConfig = z14.object({
1079
1080
  "Indicates if this flag expects an action to be performed to be cleared."
1080
1081
  ),
1081
1082
  label: TranslationConfig.describe("Human readable label of the flag.")
1083
+ }).meta({
1084
+ description: "Flag configuration",
1085
+ id: "FlagConfig"
1082
1086
  });
1083
1087
  var ActionFlagConfig = z14.object({
1084
1088
  id: Flag,
@@ -1086,6 +1090,9 @@ var ActionFlagConfig = z14.object({
1086
1090
  conditional: Conditional.optional().describe(
1087
1091
  "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
1088
1092
  )
1093
+ }).meta({
1094
+ description: "Action flag configuration",
1095
+ id: "ActionFlagConfig"
1089
1096
  });
1090
1097
 
1091
1098
  // ../commons/src/events/EventMetadata.ts
@@ -1398,7 +1405,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
1398
1405
  }
1399
1406
  }).describe("Unique identifier for the field");
1400
1407
  var FieldReference = import_v43.default.object({
1401
- $$field: FieldId,
1408
+ $$field: FieldId.describe("Id of the field to reference"),
1402
1409
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
1403
1410
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
1404
1411
  )
package/dist/cli.js CHANGED
@@ -2393,9 +2393,7 @@ var decodeScope = (query) => {
2393
2393
  };
2394
2394
  var DEFAULT_SCOPE_OPTIONS = {
2395
2395
  placeOfEvent: JurisdictionFilter.enum.all,
2396
- accessLevel: JurisdictionFilter.enum.all,
2397
- registeredIn: JurisdictionFilter.enum.all,
2398
- declaredIn: JurisdictionFilter.enum.all
2396
+ accessLevel: JurisdictionFilter.enum.all
2399
2397
  };
2400
2398
 
2401
2399
  // ../commons/src/scopes.deprecated.do-not-use.ts
@@ -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
+ Archived: "Archived";
955
+ Assigned: "Assigned";
956
+ Briefcase: "Briefcase";
957
+ Certified: "Certified";
958
+ Close: "Close";
959
+ Collapse: "Collapse";
960
+ Draft: "Draft";
961
+ DuplicateYellow: "DuplicateYellow";
962
+ Expand: "Expand";
963
+ ExternalValidate: "ExternalValidate";
964
+ FilledCheck: "FilledCheck";
965
+ InReview: "InReview";
966
+ Offline: "Offline";
967
+ Registered: "Registered";
968
+ RequiresUpdates: "RequiresUpdates";
969
+ Sent: "Sent";
970
+ Validated: "Validated";
971
+ WaitingApproval: "WaitingApproval";
972
+ ChartActivity: "ChartActivity";
973
+ Activity: "Activity";
974
+ Archive: "Archive";
975
+ ArchiveTray: "ArchiveTray";
976
+ ArrowLeft: "ArrowLeft";
977
+ ArrowRight: "ArrowRight";
978
+ Buildings: "Buildings";
979
+ Circle: "Circle";
980
+ CaretDown: "CaretDown";
981
+ CaretLeft: "CaretLeft";
982
+ CaretRight: "CaretRight";
983
+ ChartBar: "ChartBar";
984
+ ChartLine: "ChartLine";
985
+ ChatCircle: "ChatCircle";
986
+ CheckSquare: "CheckSquare";
987
+ Compass: "Compass";
988
+ Check: "Check";
989
+ Copy: "Copy";
990
+ Database: "Database";
991
+ DotsThreeVertical: "DotsThreeVertical";
992
+ ArrowCounterClockwise: "ArrowCounterClockwise";
993
+ MagnifyingGlassMinus: "MagnifyingGlassMinus";
994
+ MagnifyingGlassPlus: "MagnifyingGlassPlus";
995
+ Export: "Export";
996
+ Eye: "Eye";
997
+ EyeSlash: "EyeSlash";
998
+ Envelope: "Envelope";
999
+ File: "File";
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>;
@@ -365,9 +365,7 @@ var ScopeType2 = z6.enum([
365
365
  var EncodedScope2 = z6.string().brand("EncodedScope");
366
366
  var DEFAULT_SCOPE_OPTIONS = {
367
367
  placeOfEvent: JurisdictionFilter.enum.all,
368
- accessLevel: JurisdictionFilter.enum.all,
369
- registeredIn: JurisdictionFilter.enum.all,
370
- declaredIn: JurisdictionFilter.enum.all
368
+ accessLevel: JurisdictionFilter.enum.all
371
369
  };
372
370
 
373
371
  // ../commons/src/users/userReferences.ts
@@ -704,9 +704,7 @@ var decodeScope = (query) => {
704
704
  };
705
705
  var DEFAULT_SCOPE_OPTIONS = {
706
706
  placeOfEvent: JurisdictionFilter.enum.all,
707
- accessLevel: JurisdictionFilter.enum.all,
708
- registeredIn: JurisdictionFilter.enum.all,
709
- declaredIn: JurisdictionFilter.enum.all
707
+ accessLevel: JurisdictionFilter.enum.all
710
708
  };
711
709
  function getAcceptedScopesByType({
712
710
  acceptedScopes,
@@ -1079,7 +1077,10 @@ var ActionConditional = z7.discriminatedUnion("type", [
1079
1077
  ShowConditional,
1080
1078
  // Action can be shown to the user in the list but as disabled
1081
1079
  EnableConditional
1082
- ]);
1080
+ ]).meta({
1081
+ description: "Action conditional configuration",
1082
+ id: "ActionConditional"
1083
+ });
1083
1084
  var DisplayOnReviewConditional = z7.object({
1084
1085
  type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
1085
1086
  conditional: Conditional
@@ -1738,6 +1739,9 @@ var FlagConfig = z15.object({
1738
1739
  "Indicates if this flag expects an action to be performed to be cleared."
1739
1740
  ),
1740
1741
  label: TranslationConfig.describe("Human readable label of the flag.")
1742
+ }).meta({
1743
+ description: "Flag configuration",
1744
+ id: "FlagConfig"
1741
1745
  });
1742
1746
  var ActionFlagConfig = z15.object({
1743
1747
  id: Flag,
@@ -1745,6 +1749,9 @@ var ActionFlagConfig = z15.object({
1745
1749
  conditional: Conditional.optional().describe(
1746
1750
  "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
1747
1751
  )
1752
+ }).meta({
1753
+ description: "Action flag configuration",
1754
+ id: "ActionFlagConfig"
1748
1755
  });
1749
1756
 
1750
1757
  // ../commons/src/events/EventMetadata.ts
@@ -2168,7 +2175,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
2168
2175
  }
2169
2176
  }).describe("Unique identifier for the field");
2170
2177
  var FieldReference = import_v43.default.object({
2171
- $$field: FieldId,
2178
+ $$field: FieldId.describe("Id of the field to reference"),
2172
2179
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
2173
2180
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
2174
2181
  )
@@ -2881,10 +2888,10 @@ var VerificationPageConfig = FormPageConfig.extend({
2881
2888
  type: z21.literal(PageTypes.enum.VERIFICATION),
2882
2889
  actions: VerificationActionConfig
2883
2890
  });
2884
- var PageConfig = z21.discriminatedUnion("type", [
2885
- FormPageConfig,
2886
- VerificationPageConfig
2887
- ]);
2891
+ var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
2892
+ description: "Page configuration",
2893
+ id: "PageConfig"
2894
+ });
2888
2895
 
2889
2896
  // ../commons/src/events/FormConfig.ts
2890
2897
  var DeclarationFormConfig = z22.object({
@@ -5365,7 +5372,7 @@ var _EventConfigBase = z33.object({
5365
5372
  ),
5366
5373
  label: TranslationConfig.describe("Human-readable label for the event type."),
5367
5374
  actions: z33.array(ActionConfig).describe(
5368
- "Configuration of system-defined actions associated with the event."
5375
+ "Configuration of core and custom actions associated with the event."
5369
5376
  ),
5370
5377
  actionOrder: z33.array(z33.string()).optional().describe(
5371
5378
  "Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
@@ -5377,7 +5384,7 @@ var _EventConfigBase = z33.object({
5377
5384
  "Configuration of fields available in the advanced search feature."
5378
5385
  ),
5379
5386
  flags: z33.array(FlagConfig).optional().default([]).describe(
5380
- "Configuration of flags associated with the actions of this event type."
5387
+ "Configuration of custom flags associated with the actions of this event type."
5381
5388
  ),
5382
5389
  analytics: z33.boolean().optional().default(true).describe(
5383
5390
  "Indicates whether the records of this event type are included in analytics"
@@ -5816,18 +5823,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
5816
5823
  query: true,
5817
5824
  columns: true
5818
5825
  });
5819
- var WorkqueueConfigInput = z37.object({
5820
- slug: z37.string().describe("Determines the url of the workqueue."),
5821
- name: TranslationConfig.describe(
5822
- "Title of the workflow (both in navigation and on the page)"
5823
- ),
5824
- query: CountryConfigQueryInputType,
5825
- action: z37.object({ type: WorkqueueActionType }).optional().describe(
5826
- "Workqueue call-to-action button configuration. This determines the quick action button shown on each event card and the action taken when the button is clicked."
5827
- ),
5828
- columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
5829
- icon: AvailableIcons,
5830
- emptyMessage: TranslationConfig.optional()
5826
+ var WorkqueueConfigInput = WorkqueueConfig.extend({
5827
+ query: CountryConfigQueryInputType
5828
+ }).meta({
5829
+ description: "Workqueue configuration",
5830
+ id: "WorkqueueConfig"
5831
5831
  });
5832
5832
  function defineWorkqueue(workqueueInput) {
5833
5833
  const queryInput = workqueueInput.query;
@@ -2405,9 +2405,7 @@ var decodeScope = (query) => {
2405
2405
  };
2406
2406
  var DEFAULT_SCOPE_OPTIONS = {
2407
2407
  placeOfEvent: JurisdictionFilter.enum.all,
2408
- accessLevel: JurisdictionFilter.enum.all,
2409
- registeredIn: JurisdictionFilter.enum.all,
2410
- declaredIn: JurisdictionFilter.enum.all
2408
+ accessLevel: JurisdictionFilter.enum.all
2411
2409
  };
2412
2410
 
2413
2411
  // ../commons/src/scopes.deprecated.do-not-use.ts
@@ -293,9 +293,7 @@ var ScopeType = z2.enum([
293
293
  var EncodedScope = z2.string().brand("EncodedScope");
294
294
  var DEFAULT_SCOPE_OPTIONS = {
295
295
  placeOfEvent: JurisdictionFilter.enum.all,
296
- accessLevel: JurisdictionFilter.enum.all,
297
- registeredIn: JurisdictionFilter.enum.all,
298
- declaredIn: JurisdictionFilter.enum.all
296
+ accessLevel: JurisdictionFilter.enum.all
299
297
  };
300
298
 
301
299
  // ../commons/src/authentication.ts
@@ -654,7 +652,10 @@ var ActionConditional = z7.discriminatedUnion("type", [
654
652
  ShowConditional,
655
653
  // Action can be shown to the user in the list but as disabled
656
654
  EnableConditional
657
- ]);
655
+ ]).meta({
656
+ description: "Action conditional configuration",
657
+ id: "ActionConditional"
658
+ });
658
659
  var DisplayOnReviewConditional = z7.object({
659
660
  type: z7.literal(ConditionalType.DISPLAY_ON_REVIEW),
660
661
  conditional: Conditional
@@ -1305,6 +1306,9 @@ var FlagConfig = z15.object({
1305
1306
  "Indicates if this flag expects an action to be performed to be cleared."
1306
1307
  ),
1307
1308
  label: TranslationConfig.describe("Human readable label of the flag.")
1309
+ }).meta({
1310
+ description: "Flag configuration",
1311
+ id: "FlagConfig"
1308
1312
  });
1309
1313
  var ActionFlagConfig = z15.object({
1310
1314
  id: Flag,
@@ -1312,6 +1316,9 @@ var ActionFlagConfig = z15.object({
1312
1316
  conditional: Conditional.optional().describe(
1313
1317
  "When conditional is met, the operation is performed on the flag. If not provided, the operation is performed unconditionally."
1314
1318
  )
1319
+ }).meta({
1320
+ description: "Action flag configuration",
1321
+ id: "ActionFlagConfig"
1315
1322
  });
1316
1323
 
1317
1324
  // ../commons/src/events/EventMetadata.ts
@@ -1653,7 +1660,7 @@ var FieldId = import_v43.default.string().superRefine((val, ctx) => {
1653
1660
  }
1654
1661
  }).describe("Unique identifier for the field");
1655
1662
  var FieldReference = import_v43.default.object({
1656
- $$field: FieldId,
1663
+ $$field: FieldId.describe("Id of the field to reference"),
1657
1664
  $$subfield: import_v43.default.array(import_v43.default.string()).optional().default([]).describe(
1658
1665
  'If the FieldValue is an object, subfield can be used to refer to e.g. `["foo", "bar"]` in `{ foo: { bar: 3 } }`'
1659
1666
  )
@@ -2366,10 +2373,10 @@ var VerificationPageConfig = FormPageConfig.extend({
2366
2373
  type: z21.literal(PageTypes.enum.VERIFICATION),
2367
2374
  actions: VerificationActionConfig
2368
2375
  });
2369
- var PageConfig = z21.discriminatedUnion("type", [
2370
- FormPageConfig,
2371
- VerificationPageConfig
2372
- ]);
2376
+ var PageConfig = z21.discriminatedUnion("type", [FormPageConfig, VerificationPageConfig]).meta({
2377
+ description: "Page configuration",
2378
+ id: "PageConfig"
2379
+ });
2373
2380
 
2374
2381
  // ../commons/src/events/FormConfig.ts
2375
2382
  var DeclarationFormConfig = z22.object({
@@ -3669,7 +3676,7 @@ var _EventConfigBase = z33.object({
3669
3676
  ),
3670
3677
  label: TranslationConfig.describe("Human-readable label for the event type."),
3671
3678
  actions: z33.array(ActionConfig).describe(
3672
- "Configuration of system-defined actions associated with the event."
3679
+ "Configuration of core and custom actions associated with the event."
3673
3680
  ),
3674
3681
  actionOrder: z33.array(z33.string()).optional().describe(
3675
3682
  "Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
@@ -3681,7 +3688,7 @@ var _EventConfigBase = z33.object({
3681
3688
  "Configuration of fields available in the advanced search feature."
3682
3689
  ),
3683
3690
  flags: z33.array(FlagConfig).optional().default([]).describe(
3684
- "Configuration of flags associated with the actions of this event type."
3691
+ "Configuration of custom flags associated with the actions of this event type."
3685
3692
  ),
3686
3693
  analytics: z33.boolean().optional().default(true).describe(
3687
3694
  "Indicates whether the records of this event type are included in analytics"
@@ -4119,18 +4126,11 @@ var WorkqueueConfigWithoutQuery = WorkqueueConfig.omit({
4119
4126
  query: true,
4120
4127
  columns: true
4121
4128
  });
4122
- var WorkqueueConfigInput = z37.object({
4123
- slug: z37.string().describe("Determines the url of the workqueue."),
4124
- name: TranslationConfig.describe(
4125
- "Title of the workflow (both in navigation and on the page)"
4126
- ),
4127
- query: CountryConfigQueryInputType,
4128
- action: z37.object({ type: WorkqueueActionType }).optional().describe(
4129
- "Workqueue call-to-action button configuration. This determines the quick action button shown on each event card and the action taken when the button is clicked."
4130
- ),
4131
- columns: z37.array(WorkqueueColumn).default(mandatoryColumns),
4132
- icon: AvailableIcons,
4133
- emptyMessage: TranslationConfig.optional()
4129
+ var WorkqueueConfigInput = WorkqueueConfig.extend({
4130
+ query: CountryConfigQueryInputType
4131
+ }).meta({
4132
+ description: "Workqueue configuration",
4133
+ id: "WorkqueueConfig"
4134
4134
  });
4135
4135
  var WorkqueueCountInput = z37.array(
4136
4136
  z37.object({ slug: z37.string(), query: QueryType })
@@ -365,9 +365,7 @@ var decodeScope = (query) => {
365
365
  };
366
366
  var DEFAULT_SCOPE_OPTIONS = {
367
367
  placeOfEvent: JurisdictionFilter.enum.all,
368
- accessLevel: JurisdictionFilter.enum.all,
369
- registeredIn: JurisdictionFilter.enum.all,
370
- declaredIn: JurisdictionFilter.enum.all
368
+ accessLevel: JurisdictionFilter.enum.all
371
369
  };
372
370
  function getScopeOptionValue(scope, option) {
373
371
  const options = "options" in scope ? scope.options : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.0-rc.1aa040b",
3
+ "version": "2.0.0-rc.1b5d54a",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {