@opencrvs/toolkit 2.0.1-rc.7e65cec → 2.0.1-rc.837f69d

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 (31) hide show
  1. package/create-countryconfig/index.js +177 -14
  2. package/dist/application-config/index.js +6 -2
  3. package/dist/cli.js +8 -4
  4. package/dist/commons/api/router.d.ts +42 -15
  5. package/dist/commons/conditionals/conditionals.d.ts +3 -3
  6. package/dist/commons/events/ActionConfig.d.ts +4 -0
  7. package/dist/commons/events/ActionDocument.d.ts +2 -2
  8. package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
  9. package/dist/commons/events/Draft.d.ts +1 -1
  10. package/dist/commons/events/EventDocument.d.ts +1 -1
  11. package/dist/commons/events/EventMetadata.d.ts +1 -1
  12. package/dist/commons/events/FieldConfig.d.ts +10 -0
  13. package/dist/commons/events/FormConfig.d.ts +6 -0
  14. package/dist/commons/events/PageConfig.d.ts +4 -0
  15. package/dist/commons/events/WorkqueueColumnConfig.d.ts +4 -4
  16. package/dist/commons/events/WorkqueueConfig.d.ts +5 -5
  17. package/dist/commons/events/state/utils.d.ts +1 -1
  18. package/dist/commons/events/utils.d.ts +5 -1
  19. package/dist/conditionals/index.js +6 -2
  20. package/dist/events/index.js +27 -2
  21. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  22. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  23. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  24. package/dist/migrations/v2.0/index.js +8 -4
  25. package/dist/migrations/v2.0/merge-infrastructure-directory.js +3 -3
  26. package/dist/notification/index.js +10 -2
  27. package/dist/scopes/index.d.ts +108 -0
  28. package/dist/scopes/index.js +6 -2
  29. package/opencrvs-toolkit-2.0.1-rc.837f69d.tgz +0 -0
  30. package/package.json +1 -1
  31. package/opencrvs-toolkit-2.0.1-rc.7e65cec.tgz +0 -0
@@ -139,6 +139,8 @@ export declare const FieldConfigSchema: z.ZodObject<{
139
139
  role: "role";
140
140
  event: "event";
141
141
  placeOfEvent: "placeOfEvent";
142
+ createdBy: "createdBy";
143
+ createdIn: "createdIn";
142
144
  declaredIn: "declaredIn";
143
145
  declaredBy: "declaredBy";
144
146
  registeredIn: "registeredIn";
@@ -316,6 +318,8 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
316
318
  role: "role";
317
319
  event: "event";
318
320
  placeOfEvent: "placeOfEvent";
321
+ createdBy: "createdBy";
322
+ createdIn: "createdIn";
319
323
  declaredIn: "declaredIn";
320
324
  declaredBy: "declaredBy";
321
325
  registeredIn: "registeredIn";
@@ -469,6 +473,8 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
469
473
  role: "role";
470
474
  event: "event";
471
475
  placeOfEvent: "placeOfEvent";
476
+ createdBy: "createdBy";
477
+ createdIn: "createdIn";
472
478
  declaredIn: "declaredIn";
473
479
  declaredBy: "declaredBy";
474
480
  registeredIn: "registeredIn";
@@ -614,6 +620,8 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
614
620
  role: "role";
615
621
  event: "event";
616
622
  placeOfEvent: "placeOfEvent";
623
+ createdBy: "createdBy";
624
+ createdIn: "createdIn";
617
625
  declaredIn: "declaredIn";
618
626
  declaredBy: "declaredBy";
619
627
  registeredIn: "registeredIn";
@@ -770,6 +778,8 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
770
778
  role: "role";
771
779
  event: "event";
772
780
  placeOfEvent: "placeOfEvent";
781
+ createdBy: "createdBy";
782
+ createdIn: "createdIn";
773
783
  declaredIn: "declaredIn";
774
784
  declaredBy: "declaredBy";
775
785
  registeredIn: "registeredIn";
@@ -915,6 +925,8 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
915
925
  role: "role";
916
926
  event: "event";
917
927
  placeOfEvent: "placeOfEvent";
928
+ createdBy: "createdBy";
929
+ createdIn: "createdIn";
918
930
  declaredIn: "declaredIn";
919
931
  declaredBy: "declaredBy";
920
932
  registeredIn: "registeredIn";
@@ -25,13 +25,13 @@ export declare const Draft: z.ZodObject<{
25
25
  ASSIGN: "ASSIGN";
26
26
  UNASSIGN: "UNASSIGN";
27
27
  }>;
28
+ createdBy: z.ZodString;
28
29
  transactionId: z.ZodString;
29
30
  createdByUserType: z.ZodEnum<{
30
31
  user: "user";
31
32
  system: "system";
32
33
  }>;
33
34
  createdAt: z.ZodString;
34
- createdBy: z.ZodString;
35
35
  createdByRole: z.ZodOptional<z.ZodString>;
36
36
  createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
37
37
  declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>;
@@ -416,13 +416,13 @@ export declare const EventDocument: z.ZodObject<{
416
416
  customActionType: z.ZodString;
417
417
  }, z.core.$strip>], "type">, z.ZodObject<{
418
418
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
419
+ createdBy: z.ZodString;
419
420
  transactionId: z.ZodString;
420
421
  createdByUserType: z.ZodEnum<{
421
422
  user: "user";
422
423
  system: "system";
423
424
  }>;
424
425
  createdAt: z.ZodString;
425
- createdBy: z.ZodString;
426
426
  createdByRole: z.ZodOptional<z.ZodString>;
427
427
  createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
428
428
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -137,9 +137,9 @@ export declare const EventMetadataKeys: z.ZodEnum<{
137
137
  type: "type";
138
138
  updatedAt: "updatedAt";
139
139
  placeOfEvent: "placeOfEvent";
140
+ createdBy: "createdBy";
140
141
  createdByUserType: "createdByUserType";
141
142
  createdAt: "createdAt";
142
- createdBy: "createdBy";
143
143
  createdAtLocation: "createdAtLocation";
144
144
  status: "status";
145
145
  assignedTo: "assignedTo";
@@ -1919,6 +1919,8 @@ declare const AdministrativeAreaField: z.ZodObject<{
1919
1919
  role: "role";
1920
1920
  event: "event";
1921
1921
  placeOfEvent: "placeOfEvent";
1922
+ createdBy: "createdBy";
1923
+ createdIn: "createdIn";
1922
1924
  declaredIn: "declaredIn";
1923
1925
  declaredBy: "declaredBy";
1924
1926
  registeredIn: "registeredIn";
@@ -2045,6 +2047,8 @@ declare const LocationInput: z.ZodObject<{
2045
2047
  role: "role";
2046
2048
  event: "event";
2047
2049
  placeOfEvent: "placeOfEvent";
2050
+ createdBy: "createdBy";
2051
+ createdIn: "createdIn";
2048
2052
  declaredIn: "declaredIn";
2049
2053
  declaredBy: "declaredBy";
2050
2054
  registeredIn: "registeredIn";
@@ -2242,6 +2246,8 @@ declare const Facility: z.ZodObject<{
2242
2246
  role: "role";
2243
2247
  event: "event";
2244
2248
  placeOfEvent: "placeOfEvent";
2249
+ createdBy: "createdBy";
2250
+ createdIn: "createdIn";
2245
2251
  declaredIn: "declaredIn";
2246
2252
  declaredBy: "declaredBy";
2247
2253
  registeredIn: "registeredIn";
@@ -2354,6 +2360,8 @@ declare const Office: z.ZodObject<{
2354
2360
  role: "role";
2355
2361
  event: "event";
2356
2362
  placeOfEvent: "placeOfEvent";
2363
+ createdBy: "createdBy";
2364
+ createdIn: "createdIn";
2357
2365
  declaredIn: "declaredIn";
2358
2366
  declaredBy: "declaredBy";
2359
2367
  registeredIn: "registeredIn";
@@ -2552,6 +2560,8 @@ declare const Address: z.ZodObject<{
2552
2560
  role: "role";
2553
2561
  event: "event";
2554
2562
  placeOfEvent: "placeOfEvent";
2563
+ createdBy: "createdBy";
2564
+ createdIn: "createdIn";
2555
2565
  declaredIn: "declaredIn";
2556
2566
  declaredBy: "declaredBy";
2557
2567
  registeredIn: "registeredIn";
@@ -5,6 +5,7 @@ export declare const DeclarationFormConfig: z.ZodObject<{
5
5
  id: z.ZodString;
6
6
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
7
7
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
8
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
8
9
  fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
9
10
  conditional: z.ZodOptional<z.ZodAny>;
10
11
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -18,6 +19,7 @@ export declare const ActionFormConfig: z.ZodObject<{
18
19
  id: z.ZodString;
19
20
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
20
21
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
22
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
21
23
  fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
22
24
  conditional: z.ZodOptional<z.ZodAny>;
23
25
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -25,6 +27,7 @@ export declare const ActionFormConfig: z.ZodObject<{
25
27
  id: z.ZodString;
26
28
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
27
29
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
30
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
28
31
  fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
29
32
  conditional: z.ZodOptional<z.ZodAny>;
30
33
  type: z.ZodLiteral<"VERIFICATION">;
@@ -50,6 +53,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
50
53
  id: z.ZodString;
51
54
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
52
55
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
56
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
53
57
  fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
54
58
  conditional: z.ZodOptional<z.ZodAny>;
55
59
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -60,6 +64,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
60
64
  id: z.ZodString;
61
65
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
62
66
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
67
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
63
68
  fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
64
69
  conditional: z.ZodOptional<z.ZodAny>;
65
70
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -67,6 +72,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
67
72
  id: z.ZodString;
68
73
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
69
74
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
75
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
70
76
  fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
71
77
  conditional: z.ZodOptional<z.ZodAny>;
72
78
  type: z.ZodLiteral<"VERIFICATION">;
@@ -9,6 +9,7 @@ export declare const FormPageConfig: z.ZodObject<{
9
9
  id: z.ZodString;
10
10
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
11
11
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
12
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
12
13
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
13
14
  conditional: z.ZodOptional<z.ZodAny>;
14
15
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -31,6 +32,7 @@ export declare const VerificationPageConfig: z.ZodObject<{
31
32
  id: z.ZodString;
32
33
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
33
34
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
35
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
34
36
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
35
37
  conditional: z.ZodOptional<z.ZodAny>;
36
38
  type: z.ZodLiteral<"VERIFICATION">;
@@ -52,6 +54,7 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
52
54
  id: z.ZodString;
53
55
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
54
56
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
57
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
55
58
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
56
59
  conditional: z.ZodOptional<z.ZodAny>;
57
60
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -59,6 +62,7 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
59
62
  id: z.ZodString;
60
63
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
61
64
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
65
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
62
66
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
63
67
  conditional: z.ZodOptional<z.ZodAny>;
64
68
  type: z.ZodLiteral<"VERIFICATION">;
@@ -6,9 +6,9 @@ export declare const WorkqueueColumnKeys: z.ZodEnum<{
6
6
  type: "type";
7
7
  updatedAt: "updatedAt";
8
8
  placeOfEvent: "placeOfEvent";
9
+ createdBy: "createdBy";
9
10
  createdByUserType: "createdByUserType";
10
11
  createdAt: "createdAt";
11
- createdBy: "createdBy";
12
12
  createdAtLocation: "createdAtLocation";
13
13
  status: "status";
14
14
  assignedTo: "assignedTo";
@@ -29,9 +29,9 @@ export declare const WorkqueueColumnValue: z.ZodObject<{
29
29
  type: "type";
30
30
  updatedAt: "updatedAt";
31
31
  placeOfEvent: "placeOfEvent";
32
+ createdBy: "createdBy";
32
33
  createdByUserType: "createdByUserType";
33
34
  createdAt: "createdAt";
34
- createdBy: "createdBy";
35
35
  createdAtLocation: "createdAtLocation";
36
36
  status: "status";
37
37
  assignedTo: "assignedTo";
@@ -58,9 +58,9 @@ export declare const WorkqueueColumn: z.ZodObject<{
58
58
  type: "type";
59
59
  updatedAt: "updatedAt";
60
60
  placeOfEvent: "placeOfEvent";
61
+ createdBy: "createdBy";
61
62
  createdByUserType: "createdByUserType";
62
63
  createdAt: "createdAt";
63
- createdBy: "createdBy";
64
64
  createdAtLocation: "createdAtLocation";
65
65
  status: "status";
66
66
  assignedTo: "assignedTo";
@@ -84,7 +84,7 @@ export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColum
84
84
  description: string;
85
85
  };
86
86
  value: {
87
- $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
87
+ $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdBy" | "createdByUserType" | "createdAt" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
88
88
  };
89
89
  }[];
90
90
  //# sourceMappingURL=WorkqueueColumnConfig.d.ts.map
@@ -6,7 +6,7 @@ export declare const mandatoryColumns: {
6
6
  description: string;
7
7
  };
8
8
  value: {
9
- $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
9
+ $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdBy" | "createdByUserType" | "createdAt" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
10
10
  };
11
11
  }[];
12
12
  /**
@@ -659,9 +659,9 @@ export declare const WorkqueueConfig: z.ZodObject<{
659
659
  type: "type";
660
660
  updatedAt: "updatedAt";
661
661
  placeOfEvent: "placeOfEvent";
662
+ createdBy: "createdBy";
662
663
  createdByUserType: "createdByUserType";
663
664
  createdAt: "createdAt";
664
- createdBy: "createdBy";
665
665
  createdAtLocation: "createdAtLocation";
666
666
  status: "status";
667
667
  assignedTo: "assignedTo";
@@ -933,9 +933,9 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
933
933
  type: "type";
934
934
  updatedAt: "updatedAt";
935
935
  placeOfEvent: "placeOfEvent";
936
+ createdBy: "createdBy";
936
937
  createdByUserType: "createdByUserType";
937
938
  createdAt: "createdAt";
938
- createdBy: "createdBy";
939
939
  createdAtLocation: "createdAtLocation";
940
940
  status: "status";
941
941
  assignedTo: "assignedTo";
@@ -2279,7 +2279,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
2279
2279
  description: string;
2280
2280
  };
2281
2281
  value: {
2282
- $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
2282
+ $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdBy" | "createdByUserType" | "createdAt" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
2283
2283
  };
2284
2284
  }[];
2285
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";
@@ -2588,7 +2588,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInputWithV19
2588
2588
  description: string;
2589
2589
  };
2590
2590
  value: {
2591
- $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
2591
+ $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "createdBy" | "createdByUserType" | "createdAt" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "flags" | "outbox";
2592
2592
  };
2593
2593
  }[];
2594
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";
@@ -24,7 +24,7 @@ export declare function getActionUpdateMetadata(actions: Action[]): Pick<{
24
24
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
25
25
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
26
26
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
27
- }, "createdByUserType" | "createdAt" | "createdBy" | "createdByRole" | "createdAtLocation">;
27
+ }, "createdBy" | "createdByUserType" | "createdAt" | "createdByRole" | "createdAtLocation">;
28
28
  /**
29
29
  * @returns the legal statuses of the event. Event is considered legal if it has been accepted.
30
30
  * @see EventIndex for the description of the returned object.
@@ -22,6 +22,7 @@ export declare function getDeclarationPages(configuration: EventConfig): {
22
22
  requireCompletionToContinue: boolean;
23
23
  fields: FieldConfig[];
24
24
  type: "FORM";
25
+ showClearButton?: boolean | undefined;
25
26
  conditional?: any;
26
27
  }[];
27
28
  export declare function getDeclaration(configuration: EventConfig): {
@@ -40,6 +41,7 @@ export declare function getDeclaration(configuration: EventConfig): {
40
41
  requireCompletionToContinue: boolean;
41
42
  fields: FieldConfig[];
42
43
  type: "FORM";
44
+ showClearButton?: boolean | undefined;
43
45
  conditional?: any;
44
46
  }[];
45
47
  };
@@ -60,6 +62,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
60
62
  requireCompletionToContinue: boolean;
61
63
  fields: FieldConfig[];
62
64
  type: "FORM";
65
+ showClearButton?: boolean | undefined;
63
66
  conditional?: any;
64
67
  } | {
65
68
  id: string;
@@ -99,6 +102,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
99
102
  };
100
103
  };
101
104
  };
105
+ showClearButton?: boolean | undefined;
102
106
  conditional?: any;
103
107
  })[];
104
108
  export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => FieldConfig[];
@@ -437,10 +441,10 @@ export declare function findLastAssignmentAction(actions: Action[]): {
437
441
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
438
442
  } | {
439
443
  id: string & import("zod").$brand<"UUID">;
444
+ createdBy: string;
440
445
  transactionId: string;
441
446
  createdByUserType: "user" | "system";
442
447
  createdAt: string;
443
- createdBy: string;
444
448
  type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
445
449
  status: "Rejected";
446
450
  createdByRole?: string | undefined;
@@ -189,7 +189,9 @@ var userRole = z6.preprocess(
189
189
  ).describe("User role, e.g. admin, field agent");
190
190
  var scopeOptionsPlaceEvent = z6.object({
191
191
  event: scopeByEvent,
192
- placeOfEvent: JurisdictionFilter.optional()
192
+ placeOfEvent: JurisdictionFilter.optional(),
193
+ createdBy: UserFilter.optional(),
194
+ createdIn: JurisdictionFilter.optional()
193
195
  }).describe("Options applicable to all record scopes.");
194
196
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
195
197
  declaredIn: JurisdictionFilter.optional(),
@@ -228,7 +230,9 @@ var AllScopeOptions = z6.object({
228
230
  var ScopeOptionKey = AllScopeOptions.keyof();
229
231
  var ResolvedScopeOptionsPlaceEvent = z6.object({
230
232
  event: scopeByEvent,
231
- placeOfEvent: UUID.nullish()
233
+ placeOfEvent: UUID.nullish(),
234
+ createdBy: z6.string().optional(),
235
+ createdIn: UUID.nullish()
232
236
  }).describe(
233
237
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
234
238
  );
@@ -518,7 +518,9 @@ var userRole = z2.preprocess(
518
518
  ).describe("User role, e.g. admin, field agent");
519
519
  var scopeOptionsPlaceEvent = z2.object({
520
520
  event: scopeByEvent,
521
- placeOfEvent: JurisdictionFilter.optional()
521
+ placeOfEvent: JurisdictionFilter.optional(),
522
+ createdBy: UserFilter.optional(),
523
+ createdIn: JurisdictionFilter.optional()
522
524
  }).describe("Options applicable to all record scopes.");
523
525
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
524
526
  declaredIn: JurisdictionFilter.optional(),
@@ -557,7 +559,9 @@ var AllScopeOptions = z2.object({
557
559
  var ScopeOptionKey = AllScopeOptions.keyof();
558
560
  var ResolvedScopeOptionsPlaceEvent = z2.object({
559
561
  event: scopeByEvent,
560
- placeOfEvent: UUID.nullish()
562
+ placeOfEvent: UUID.nullish(),
563
+ createdBy: z2.string().optional(),
564
+ createdIn: UUID.nullish()
561
565
  }).describe(
562
566
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
563
567
  );
@@ -3042,6 +3046,9 @@ var PageConfigBase = z21.object({
3042
3046
  requireCompletionToContinue: z21.boolean().default(false).describe(
3043
3047
  "If true, all required fields must be filled before continuing to the next page"
3044
3048
  ),
3049
+ showClearButton: z21.boolean().optional().describe(
3050
+ 'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
3051
+ ),
3045
3052
  fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
3046
3053
  conditional: Conditional.optional().describe(
3047
3054
  "Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
@@ -7758,6 +7765,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
7758
7765
  defaultMessage: "Who is applying for the membership?",
7759
7766
  description: "This is the title of the section"
7760
7767
  },
7768
+ showClearButton: true,
7761
7769
  fields: [
7762
7770
  {
7763
7771
  id: "applicant.name",
@@ -10309,6 +10317,23 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
10309
10317
  )) {
10310
10318
  return false;
10311
10319
  }
10320
+ if (opts?.createdBy === UserFilter.enum.user && event2.createdBy !== user2.id) {
10321
+ return false;
10322
+ }
10323
+ if (opts?.createdIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
10324
+ event2.createdAtLocation,
10325
+ JurisdictionFilter.enum.location,
10326
+ user2
10327
+ )) {
10328
+ return false;
10329
+ }
10330
+ if (opts?.createdIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
10331
+ event2.createdAtLocation,
10332
+ JurisdictionFilter.enum.administrativeArea,
10333
+ user2
10334
+ )) {
10335
+ return false;
10336
+ }
10312
10337
  if (scopeUsesDeclaredOptions(scope)) {
10313
10338
  const { options } = scope;
10314
10339
  if (options?.declaredBy === UserFilter.enum.user) {
@@ -1,5 +1,5 @@
1
1
  export declare const UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
2
- export declare const UPSTREAM_BRANCH = "release-v2.0.0";
2
+ export declare const UPSTREAM_BRANCH = "release/2.0.0";
3
3
  /**
4
4
  * Runs a git command in the country config working directory.
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-upstream-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/checkout-upstream-files.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,YAAY,2DACiC,CAAA;AAE1D,eAAO,MAAM,eAAe,mBAAmB,CAAA;AAc/C;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,MAAc,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAO9C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAMtC;AAID,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"checkout-upstream-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/checkout-upstream-files.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,YAAY,2DACiC,CAAA;AAE1D,eAAO,MAAM,eAAe,kBAAkB,CAAA;AAc9C;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,MAAc,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAO9C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAMtC;AAID,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -59,7 +59,7 @@ exports.main = main;
59
59
  */
60
60
  const child_process_1 = require("child_process");
61
61
  exports.UPSTREAM_URL = 'https://github.com/opencrvs/opencrvs-countryconfig.git';
62
- exports.UPSTREAM_BRANCH = 'release-v2.0.0';
62
+ exports.UPSTREAM_BRANCH = 'release/2.0.0';
63
63
  // Remote name used only for the duration of this codemod. Prefixed to avoid
64
64
  // clashing with remotes the user may have (origin, upstream, etc.).
65
65
  const TEMP_REMOTE = 'opencrvs-upgrade-v19-v20-codemod';
@@ -2202,7 +2202,9 @@ var userRole = z3.preprocess(
2202
2202
  ).describe("User role, e.g. admin, field agent");
2203
2203
  var scopeOptionsPlaceEvent = z3.object({
2204
2204
  event: scopeByEvent,
2205
- placeOfEvent: JurisdictionFilter.optional()
2205
+ placeOfEvent: JurisdictionFilter.optional(),
2206
+ createdBy: UserFilter.optional(),
2207
+ createdIn: JurisdictionFilter.optional()
2206
2208
  }).describe("Options applicable to all record scopes.");
2207
2209
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
2208
2210
  declaredIn: JurisdictionFilter.optional(),
@@ -2241,7 +2243,9 @@ var AllScopeOptions = z3.object({
2241
2243
  var ScopeOptionKey = AllScopeOptions.keyof();
2242
2244
  var ResolvedScopeOptionsPlaceEvent = z3.object({
2243
2245
  event: scopeByEvent,
2244
- placeOfEvent: UUID.nullish()
2246
+ placeOfEvent: UUID.nullish(),
2247
+ createdBy: z3.string().optional(),
2248
+ createdIn: UUID.nullish()
2245
2249
  }).describe(
2246
2250
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
2247
2251
  );
@@ -4312,7 +4316,7 @@ Saved ${handlerRelPath}.`);
4312
4316
  // src/migrations/v2.0/checkout-upstream-files.ts
4313
4317
  var import_child_process = require("child_process");
4314
4318
  var UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
4315
- var UPSTREAM_BRANCH = "release-v2.0.0";
4319
+ var UPSTREAM_BRANCH = "release/2.0.0";
4316
4320
  var TEMP_REMOTE = "opencrvs-upgrade-v19-v20-codemod";
4317
4321
  var FILES_TO_CHECKOUT = [
4318
4322
  "src/analytics/analytics.ts",
@@ -4850,7 +4854,7 @@ var import_os = require("os");
4850
4854
  var import_path24 = require("path");
4851
4855
  var TEMP_REMOTE2 = "opencrvs-upgrade-v19-v20-codemod-merge-infra";
4852
4856
  var INFRASTRUCTURE_DIR = "infrastructure";
4853
- var BASE_BRANCH = "release-v1.9";
4857
+ var BASE_BRANCH = "release/1.9.15";
4854
4858
  function gitShowBytes(ref, path24) {
4855
4859
  try {
4856
4860
  const buf = (0, import_child_process2.execFileSync)("git", ["show", `${ref}:${path24}`], {
@@ -56,7 +56,7 @@ exports.main = main;
56
56
  * so `git merge-base HEAD upstream/develop` typically returns nothing.
57
57
  * - With no merge-base, a 3-way merge degenerates to a 2-way diff against
58
58
  * an empty file — every line that differs becomes a conflict.
59
- * - `release-v1.9` is the latest 1.9.x release line on upstream and is a
59
+ * - `release/1.9.15` is the latest 1.9.x release on upstream and is a
60
60
  * near-perfect representation of "what `infrastructure/` looked like
61
61
  * before v2.0", regardless of whether the fork's git history reaches it.
62
62
  * - For files the country config never modified relative to that baseline,
@@ -81,7 +81,7 @@ exports.main = main;
81
81
  * sides changed a binary file, the result will be invalid and a warning
82
82
  * is printed.
83
83
  * - Forks that are on a much older 1.9.x and never merged later 1.9 patches
84
- * may see a few extra conflicts on files where 1.9.x → release-v1.9
84
+ * may see a few extra conflicts on files where 1.9.x → release/1.9.15
85
85
  * patches and v1.9 → v2.0 changes textually overlap.
86
86
  */
87
87
  const child_process_1 = require("child_process");
@@ -97,7 +97,7 @@ const INFRASTRUCTURE_DIR = 'infrastructure';
97
97
  // Synthetic merge-base: the tip of upstream's latest 1.9.x release line.
98
98
  // We use this branch's content as the "common ancestor" for every file,
99
99
  // since most country forks don't share git history with upstream.
100
- const BASE_BRANCH = 'release-v1.9';
100
+ const BASE_BRANCH = 'release/1.9.15';
101
101
  /**
102
102
  * Reads `git show <ref>:<path>` as a Uint8Array (binary-safe).
103
103
  * Returns `null` if the path doesn't exist at that ref.
@@ -116,7 +116,9 @@ var userRole = z2.preprocess(
116
116
  ).describe("User role, e.g. admin, field agent");
117
117
  var scopeOptionsPlaceEvent = z2.object({
118
118
  event: scopeByEvent,
119
- placeOfEvent: JurisdictionFilter.optional()
119
+ placeOfEvent: JurisdictionFilter.optional(),
120
+ createdBy: UserFilter.optional(),
121
+ createdIn: JurisdictionFilter.optional()
120
122
  }).describe("Options applicable to all record scopes.");
121
123
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
122
124
  declaredIn: JurisdictionFilter.optional(),
@@ -155,7 +157,9 @@ var AllScopeOptions = z2.object({
155
157
  var ScopeOptionKey = AllScopeOptions.keyof();
156
158
  var ResolvedScopeOptionsPlaceEvent = z2.object({
157
159
  event: scopeByEvent,
158
- placeOfEvent: UUID.nullish()
160
+ placeOfEvent: UUID.nullish(),
161
+ createdBy: z2.string().optional(),
162
+ createdIn: UUID.nullish()
159
163
  }).describe(
160
164
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
161
165
  );
@@ -2499,6 +2503,9 @@ var PageConfigBase = z21.object({
2499
2503
  requireCompletionToContinue: z21.boolean().default(false).describe(
2500
2504
  "If true, all required fields must be filled before continuing to the next page"
2501
2505
  ),
2506
+ showClearButton: z21.boolean().optional().describe(
2507
+ 'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
2508
+ ),
2502
2509
  fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
2503
2510
  conditional: Conditional.optional().describe(
2504
2511
  "Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
@@ -5530,6 +5537,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
5530
5537
  defaultMessage: "Who is applying for the membership?",
5531
5538
  description: "This is the title of the section"
5532
5539
  },
5540
+ showClearButton: true,
5533
5541
  fields: [
5534
5542
  {
5535
5543
  id: "applicant.name",