@opencrvs/toolkit 1.9.6-rc.41331b0 → 1.9.6-rc.41b0fd2

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.
@@ -26718,7 +26718,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
26718
26718
  input: {
26719
26719
  transactionId: string;
26720
26720
  type: string;
26721
- createdAtLocation?: string | null | undefined;
26722
26721
  };
26723
26722
  output: {
26724
26723
  id: string & import("zod").$brand<"UUID">;
@@ -31024,7 +31023,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
31024
31023
  }[];
31025
31024
  };
31026
31025
  actions: {
31027
- type: "DELETE" | "READ" | "DECLARE" | "REJECT" | "REGISTER" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "EDIT" | "ARCHIVE" | "MARK_AS_DUPLICATE" | "ASSIGN" | "UNASSIGN";
31026
+ type: "DELETE" | "READ" | "DECLARE" | "REJECT" | "REGISTER" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "EDIT" | "ARCHIVE" | "MARK_AS_DUPLICATE" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
31028
31027
  }[];
31029
31028
  columns: {
31030
31029
  label: {
@@ -27,8 +27,8 @@ export declare const NotifyActionInput: z.ZodObject<{
27
27
  annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
28
28
  originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID">>;
29
29
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
30
- type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
31
30
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>>;
31
+ type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
32
32
  }, z.core.$strip>;
33
33
  export type NotifyActionInput = z.infer<typeof NotifyActionInput>;
34
34
  export declare const DeclareActionInput: z.ZodObject<{
@@ -261,8 +261,8 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
261
261
  annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, unknown, z.core.$ZodTypeInternals<import("./FieldValue").FieldUpdateValue, unknown>>>>;
262
262
  originalActionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID">>;
263
263
  keepAssignment: z.ZodOptional<z.ZodBoolean>;
264
- type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
265
264
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>>;
265
+ type: z.ZodDefault<z.ZodLiteral<"NOTIFY">>;
266
266
  }, z.core.$strip>, z.ZodObject<{
267
267
  eventId: z.core.$ZodBranded<z.ZodUUID, "UUID">;
268
268
  transactionId: z.ZodString;
@@ -0,0 +1,2 @@
1
+ export declare const CreatedAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod/v4/core").$ZodBranded<import("zod").ZodUUID, "UUID">>>;
2
+ //# sourceMappingURL=CreatedAtLocation.d.ts.map
@@ -2,7 +2,6 @@ import * as z from 'zod/v4';
2
2
  export declare const EventInput: z.ZodObject<{
3
3
  transactionId: z.ZodString;
4
4
  type: z.ZodString;
5
- createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID">>>;
6
5
  }, z.core.$strip>;
7
6
  export type EventInput = z.infer<typeof EventInput>;
8
7
  //# sourceMappingURL=EventInput.d.ts.map
@@ -148,9 +148,9 @@ export declare const EventMetadataKeys: z.ZodEnum<{
148
148
  createdAtLocation: "createdAtLocation";
149
149
  assignedTo: "assignedTo";
150
150
  trackingId: "trackingId";
151
+ placeOfEvent: "placeOfEvent";
151
152
  legalStatuses: "legalStatuses";
152
153
  dateOfEvent: "dateOfEvent";
153
- placeOfEvent: "placeOfEvent";
154
154
  updatedByUserRole: "updatedByUserRole";
155
155
  updatedAtLocation: "updatedAtLocation";
156
156
  updatedAt: "updatedAt";
@@ -11,9 +11,9 @@ export declare const WorkqueueColumnKeys: z.ZodEnum<{
11
11
  createdAtLocation: "createdAtLocation";
12
12
  assignedTo: "assignedTo";
13
13
  trackingId: "trackingId";
14
+ placeOfEvent: "placeOfEvent";
14
15
  legalStatuses: "legalStatuses";
15
16
  dateOfEvent: "dateOfEvent";
16
- placeOfEvent: "placeOfEvent";
17
17
  updatedByUserRole: "updatedByUserRole";
18
18
  updatedAtLocation: "updatedAtLocation";
19
19
  updatedAt: "updatedAt";
@@ -34,9 +34,9 @@ export declare const WorkqueueColumnValue: z.ZodObject<{
34
34
  createdAtLocation: "createdAtLocation";
35
35
  assignedTo: "assignedTo";
36
36
  trackingId: "trackingId";
37
+ placeOfEvent: "placeOfEvent";
37
38
  legalStatuses: "legalStatuses";
38
39
  dateOfEvent: "dateOfEvent";
39
- placeOfEvent: "placeOfEvent";
40
40
  updatedByUserRole: "updatedByUserRole";
41
41
  updatedAtLocation: "updatedAtLocation";
42
42
  updatedAt: "updatedAt";
@@ -63,9 +63,9 @@ export declare const WorkqueueColumn: z.ZodObject<{
63
63
  createdAtLocation: "createdAtLocation";
64
64
  assignedTo: "assignedTo";
65
65
  trackingId: "trackingId";
66
+ placeOfEvent: "placeOfEvent";
66
67
  legalStatuses: "legalStatuses";
67
68
  dateOfEvent: "dateOfEvent";
68
- placeOfEvent: "placeOfEvent";
69
69
  updatedByUserRole: "updatedByUserRole";
70
70
  updatedAtLocation: "updatedAtLocation";
71
71
  updatedAt: "updatedAt";
@@ -84,7 +84,7 @@ export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColum
84
84
  description: string;
85
85
  };
86
86
  value: {
87
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "placeOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
87
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
88
88
  };
89
89
  }[];
90
90
  //# sourceMappingURL=WorkqueueColumnConfig.d.ts.map
@@ -6,11 +6,10 @@ export declare const mandatoryColumns: {
6
6
  description: string;
7
7
  };
8
8
  value: {
9
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "placeOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
9
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
10
10
  };
11
11
  }[];
12
- /** Workqueue Call-to-action -button action type */
13
- export declare const CtaActionType: z.ZodEnum<{
12
+ export declare const WorkqueueActionsWithDefault: z.ZodEnum<{
14
13
  DELETE: "DELETE";
15
14
  DECLARE: "DECLARE";
16
15
  REGISTER: "REGISTER";
@@ -23,8 +22,9 @@ export declare const CtaActionType: z.ZodEnum<{
23
22
  READ: "READ";
24
23
  ASSIGN: "ASSIGN";
25
24
  UNASSIGN: "UNASSIGN";
25
+ DEFAULT: "DEFAULT";
26
26
  }>;
27
- export type CtaActionType = z.infer<typeof CtaActionType>;
27
+ export type WorkqueueActionsWithDefault = z.infer<typeof WorkqueueActionsWithDefault>;
28
28
  /**
29
29
  * Configuration for workqueue. Workqueues are used to display a list of events.
30
30
  */
@@ -534,6 +534,7 @@ export declare const WorkqueueConfig: z.ZodObject<{
534
534
  READ: "READ";
535
535
  ASSIGN: "ASSIGN";
536
536
  UNASSIGN: "UNASSIGN";
537
+ DEFAULT: "DEFAULT";
537
538
  }>;
538
539
  }, z.core.$strip>>;
539
540
  columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -550,9 +551,9 @@ export declare const WorkqueueConfig: z.ZodObject<{
550
551
  createdAtLocation: "createdAtLocation";
551
552
  assignedTo: "assignedTo";
552
553
  trackingId: "trackingId";
554
+ placeOfEvent: "placeOfEvent";
553
555
  legalStatuses: "legalStatuses";
554
556
  dateOfEvent: "dateOfEvent";
555
- placeOfEvent: "placeOfEvent";
556
557
  updatedByUserRole: "updatedByUserRole";
557
558
  updatedAtLocation: "updatedAtLocation";
558
559
  updatedAt: "updatedAt";
@@ -790,6 +791,7 @@ export declare const WorkqueueConfigWithoutQuery: z.ZodObject<{
790
791
  READ: "READ";
791
792
  ASSIGN: "ASSIGN";
792
793
  UNASSIGN: "UNASSIGN";
794
+ DEFAULT: "DEFAULT";
793
795
  }>;
794
796
  }, z.core.$strip>>;
795
797
  slug: z.ZodString;
@@ -1542,6 +1544,7 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1542
1544
  READ: "READ";
1543
1545
  ASSIGN: "ASSIGN";
1544
1546
  UNASSIGN: "UNASSIGN";
1547
+ DEFAULT: "DEFAULT";
1545
1548
  }>;
1546
1549
  }, z.core.$strip>>;
1547
1550
  columns: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -1558,9 +1561,9 @@ export declare const WorkqueueConfigInput: z.ZodObject<{
1558
1561
  createdAtLocation: "createdAtLocation";
1559
1562
  assignedTo: "assignedTo";
1560
1563
  trackingId: "trackingId";
1564
+ placeOfEvent: "placeOfEvent";
1561
1565
  legalStatuses: "legalStatuses";
1562
1566
  dateOfEvent: "dateOfEvent";
1563
- placeOfEvent: "placeOfEvent";
1564
1567
  updatedByUserRole: "updatedByUserRole";
1565
1568
  updatedAtLocation: "updatedAtLocation";
1566
1569
  updatedAt: "updatedAt";
@@ -1911,7 +1914,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
1911
1914
  }[];
1912
1915
  };
1913
1916
  actions: {
1914
- type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
1917
+ type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
1915
1918
  }[];
1916
1919
  columns: {
1917
1920
  label: {
@@ -1920,7 +1923,7 @@ export declare function defineWorkqueue(workqueueInput: WorkqueueConfigInput): {
1920
1923
  description: string;
1921
1924
  };
1922
1925
  value: {
1923
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "placeOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
1926
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
1924
1927
  };
1925
1928
  }[];
1926
1929
  icon: "Validated" | "Registered" | "Certified" | "Archived" | "List" | "Assigned" | "Briefcase" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "RequiresUpdates" | "Sent" | "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" | "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";
@@ -2161,7 +2164,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInput[]): {
2161
2164
  }[];
2162
2165
  };
2163
2166
  actions: {
2164
- type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
2167
+ type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "DEFAULT";
2165
2168
  }[];
2166
2169
  columns: {
2167
2170
  label: {
@@ -2170,7 +2173,7 @@ export declare function defineWorkqueues(workqueues: WorkqueueConfigInput[]): {
2170
2173
  description: string;
2171
2174
  };
2172
2175
  value: {
2173
- $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "placeOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
2176
+ $event: "type" | "id" | "status" | "title" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "assignedTo" | "trackingId" | "placeOfEvent" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedAt" | "updatedBy" | "flags" | "outbox";
2174
2177
  };
2175
2178
  }[];
2176
2179
  icon: "Validated" | "Registered" | "Certified" | "Archived" | "List" | "Assigned" | "Briefcase" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "RequiresUpdates" | "Sent" | "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" | "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";
@@ -35,6 +35,7 @@ export declare function resolvePlaceOfEvent(eventMetadata: {
35
35
  export declare function extractPotentialDuplicatesFromActions(actions: Action[]): PotentialDuplicate[];
36
36
  /**
37
37
  * NOTE: This function should not run field validations. It should return the state based on the actions, without considering context (users, roles, permissions, etc).
38
+ createdAtLocation: CreatedAtLocation
38
39
  *
39
40
  * If you update this function, please ensure @EventIndex type is updated accordingly.
40
41
  * In most cases, you won't need to add new parameters to this function. Discuss with the team before doing so.
@@ -75,7 +75,6 @@ __export(events_exports, {
75
75
  ConditionalType: () => ConditionalType,
76
76
  ConfirmableActions: () => ConfirmableActions,
77
77
  ContainsFlags: () => ContainsFlags,
78
- CtaActionType: () => CtaActionType,
79
78
  CustomActionInput: () => CustomActionInput,
80
79
  CustomFieldValue: () => CustomFieldValue,
81
80
  CustomFlag: () => CustomFlag,
@@ -211,6 +210,7 @@ __export(events_exports, {
211
210
  VerificationPageConfig: () => VerificationPageConfig,
212
211
  VerificationStatusValue: () => VerificationStatusValue,
213
212
  Within: () => Within,
213
+ WorkqueueActionsWithDefault: () => WorkqueueActionsWithDefault,
214
214
  WorkqueueColumn: () => WorkqueueColumn,
215
215
  WorkqueueColumnKeys: () => WorkqueueColumnKeys,
216
216
  WorkqueueColumnKeysArray: () => WorkqueueColumnKeysArray,
@@ -972,6 +972,9 @@ var z14 = __toESM(require("zod/v4"));
972
972
  // ../commons/src/events/ActionDocument.ts
973
973
  var z12 = __toESM(require("zod/v4"));
974
974
 
975
+ // ../commons/src/events/CreatedAtLocation.ts
976
+ var CreatedAtLocation = UUID.nullish();
977
+
975
978
  // ../commons/src/authentication.ts
976
979
  var import_jwt_decode = __toESM(require("jwt-decode"));
977
980
  var z11 = __toESM(require("zod/v4"));
@@ -1436,8 +1439,7 @@ var ActionBase = z12.object({
1436
1439
  createdBy: z12.string().describe("Identifier of the user who created the action."),
1437
1440
  createdByRole: z12.string().describe("Role of the user who created the action."),
1438
1441
  createdBySignature: z12.string().nullish().describe("Reference to the signature of the user who created the action."),
1439
- // @TODO: createdAtLocation should be non-nullable in the future once all actions have this field populated.
1440
- createdAtLocation: UUID.nullish().describe(
1442
+ createdAtLocation: CreatedAtLocation.describe(
1441
1443
  "Reference to the location of the user who created the action."
1442
1444
  ),
1443
1445
  declaration: ActionUpdate.describe(
@@ -1672,8 +1674,7 @@ var ZodDate = z14.iso.date();
1672
1674
  var ActionCreationMetadata = z14.object({
1673
1675
  createdAt: z14.iso.datetime().describe("The timestamp when the action request was created."),
1674
1676
  createdBy: z14.string().describe("ID of the user who created the action request."),
1675
- // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1676
- createdAtLocation: UUID.nullish().describe(
1677
+ createdAtLocation: CreatedAtLocation.describe(
1677
1678
  "Location of the user who created the action request."
1678
1679
  ),
1679
1680
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
@@ -1699,12 +1700,11 @@ var EventMetadata = z14.object({
1699
1700
  ),
1700
1701
  createdAt: z14.iso.datetime().describe("The timestamp when the event was first created and saved."),
1701
1702
  dateOfEvent: ZodDate.nullish(),
1702
- placeOfEvent: UUID.nullish(),
1703
+ placeOfEvent: CreatedAtLocation,
1703
1704
  createdBy: z14.string().describe("ID of the user who created the event."),
1704
1705
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1705
1706
  updatedByUserRole: z14.string().describe("Role of the user who last changed the status."),
1706
- // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1707
- createdAtLocation: UUID.nullish().describe(
1707
+ createdAtLocation: CreatedAtLocation.describe(
1708
1708
  "Location of the user who created the event."
1709
1709
  ),
1710
1710
  createdBySignature: z14.string().nullish().describe("Signature of the user who created the event."),
@@ -5345,7 +5345,11 @@ var mandatoryColumns = defineWorkqueuesColumns([
5345
5345
  value: event.field("updatedAt")
5346
5346
  }
5347
5347
  ]);
5348
- var CtaActionType = z33.enum([...workqueueActions.options, ActionType.READ]);
5348
+ var WorkqueueActionsWithDefault = z33.enum([
5349
+ ...workqueueActions.options,
5350
+ "DEFAULT",
5351
+ ActionType.READ
5352
+ ]);
5349
5353
  var WorkqueueConfig = z33.object({
5350
5354
  slug: z33.string().describe("Determines the url of the workqueue."),
5351
5355
  name: TranslationConfig.describe(
@@ -5354,7 +5358,7 @@ var WorkqueueConfig = z33.object({
5354
5358
  query: CountryConfigQueryType,
5355
5359
  /** This action object used to contain a conditionals option, but it was not used anywhere.
5356
5360
  * It's also debatable whether it should be an array, or just a single action. */
5357
- actions: z33.array(z33.object({ type: CtaActionType })).describe("Workqueue call-to-action button configuration."),
5361
+ actions: z33.array(z33.object({ type: WorkqueueActionsWithDefault })).describe("Workqueue call-to-action button configuration."),
5358
5362
  columns: z33.array(WorkqueueColumn).default(mandatoryColumns),
5359
5363
  icon: AvailableIcons,
5360
5364
  emptyMessage: TranslationConfig.optional()
@@ -5369,7 +5373,7 @@ var WorkqueueConfigInput = z33.object({
5369
5373
  "Title of the workflow (both in navigation and on the page)"
5370
5374
  ),
5371
5375
  query: CountryConfigQueryInputType,
5372
- actions: z33.array(z33.object({ type: CtaActionType })).describe("Workqueue call-to-action button configuration."),
5376
+ actions: z33.array(z33.object({ type: WorkqueueActionsWithDefault })).describe("Workqueue call-to-action button configuration."),
5373
5377
  columns: z33.array(WorkqueueColumn).default(mandatoryColumns),
5374
5378
  icon: AvailableIcons,
5375
5379
  emptyMessage: TranslationConfig.optional()
@@ -5421,18 +5425,14 @@ var BaseActionInput = z34.object({
5421
5425
  // should not be part of base action.
5422
5426
  keepAssignment: z34.boolean().optional(),
5423
5427
  // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
5424
- // @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
5425
- createdAtLocation: UUID.nullish().describe(
5428
+ createdAtLocation: CreatedAtLocation.describe(
5426
5429
  "A valid office location ID. This is required for system users performing actions. The provided location must be a leaf-location, i.e. it must not have any children locations."
5427
5430
  )
5428
5431
  });
5429
5432
  var CreateActionInput = BaseActionInput.extend(
5430
5433
  z34.object({
5431
5434
  type: z34.literal(ActionType.CREATE).default(ActionType.CREATE),
5432
- // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
5433
- createdAtLocation: UUID.nullish().describe(
5434
- "A valid office location ID. This is required for system users performing actions. The provided location must be a leaf-location, i.e. it must not have any children locations."
5435
- )
5435
+ createdAtLocation: CreatedAtLocation
5436
5436
  }).shape
5437
5437
  );
5438
5438
  var RegisterActionInput = BaseActionInput.extend(
@@ -5443,11 +5443,7 @@ var RegisterActionInput = BaseActionInput.extend(
5443
5443
  );
5444
5444
  var NotifyActionInput = BaseActionInput.extend(
5445
5445
  z34.object({
5446
- type: z34.literal(ActionType.NOTIFY).default(ActionType.NOTIFY),
5447
- // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
5448
- createdAtLocation: UUID.nullish().describe(
5449
- "A valid office location ID. This is required for system users performing actions. The provided location must be a leaf-location, i.e. it must not have any children locations."
5450
- )
5446
+ type: z34.literal(ActionType.NOTIFY).default(ActionType.NOTIFY)
5451
5447
  }).shape
5452
5448
  ).meta({
5453
5449
  default: {
@@ -5610,14 +5606,11 @@ var DraftInput = BaseActionInput.extend({
5610
5606
 
5611
5607
  // ../commons/src/events/EventInput.ts
5612
5608
  var z36 = __toESM(require("zod/v4"));
5613
- var import_uuid9 = require("uuid");
5609
+ var import_uuid10 = require("uuid");
5614
5610
  var EventInput = z36.object({
5615
5611
  transactionId: z36.string(),
5616
- type: z36.string(),
5617
- createdAtLocation: UUID.nullish().describe(
5618
- "Location where the event occurred. Required for system users."
5619
- )
5620
- }).meta({ default: { transactionId: (0, import_uuid9.v4)(), type: "birth" } });
5612
+ type: z36.string()
5613
+ }).meta({ default: { transactionId: (0, import_uuid10.v4)(), type: "birth" } });
5621
5614
 
5622
5615
  // ../commons/src/events/EventDocument.ts
5623
5616
  var z37 = __toESM(require("zod/v4"));
@@ -9170,7 +9163,7 @@ var generateWorkqueues = (slug = "all-events") => defineWorkqueues([
9170
9163
  type: "and",
9171
9164
  clauses: [{ eventType: tennisClubMembershipEvent.id }]
9172
9165
  },
9173
- actions: [{ type: ActionType.READ }],
9166
+ actions: [{ type: "DEFAULT" }],
9174
9167
  icon: "Draft"
9175
9168
  }
9176
9169
  ]);
@@ -609,6 +609,9 @@ var z14 = __toESM(require("zod/v4"));
609
609
  // ../commons/src/events/ActionDocument.ts
610
610
  var z12 = __toESM(require("zod/v4"));
611
611
 
612
+ // ../commons/src/events/CreatedAtLocation.ts
613
+ var CreatedAtLocation = UUID.nullish();
614
+
612
615
  // ../commons/src/authentication.ts
613
616
  var import_jwt_decode = __toESM(require("jwt-decode"));
614
617
  var z11 = __toESM(require("zod/v4"));
@@ -1019,8 +1022,7 @@ var ActionBase = z12.object({
1019
1022
  createdBy: z12.string().describe("Identifier of the user who created the action."),
1020
1023
  createdByRole: z12.string().describe("Role of the user who created the action."),
1021
1024
  createdBySignature: z12.string().nullish().describe("Reference to the signature of the user who created the action."),
1022
- // @TODO: createdAtLocation should be non-nullable in the future once all actions have this field populated.
1023
- createdAtLocation: UUID.nullish().describe(
1025
+ createdAtLocation: CreatedAtLocation.describe(
1024
1026
  "Reference to the location of the user who created the action."
1025
1027
  ),
1026
1028
  declaration: ActionUpdate.describe(
@@ -1255,8 +1257,7 @@ var ZodDate = z14.iso.date();
1255
1257
  var ActionCreationMetadata = z14.object({
1256
1258
  createdAt: z14.iso.datetime().describe("The timestamp when the action request was created."),
1257
1259
  createdBy: z14.string().describe("ID of the user who created the action request."),
1258
- // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1259
- createdAtLocation: UUID.nullish().describe(
1260
+ createdAtLocation: CreatedAtLocation.describe(
1260
1261
  "Location of the user who created the action request."
1261
1262
  ),
1262
1263
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
@@ -1282,12 +1283,11 @@ var EventMetadata = z14.object({
1282
1283
  ),
1283
1284
  createdAt: z14.iso.datetime().describe("The timestamp when the event was first created and saved."),
1284
1285
  dateOfEvent: ZodDate.nullish(),
1285
- placeOfEvent: UUID.nullish(),
1286
+ placeOfEvent: CreatedAtLocation,
1286
1287
  createdBy: z14.string().describe("ID of the user who created the event."),
1287
1288
  createdByUserType: z14.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1288
1289
  updatedByUserRole: z14.string().describe("Role of the user who last changed the status."),
1289
- // @TODO: createdAtLocation should be non-nullable in the future once all action requests have this field populated.
1290
- createdAtLocation: UUID.nullish().describe(
1290
+ createdAtLocation: CreatedAtLocation.describe(
1291
1291
  "Location of the user who created the event."
1292
1292
  ),
1293
1293
  createdBySignature: z14.string().nullish().describe("Signature of the user who created the event."),
@@ -3819,7 +3819,11 @@ var mandatoryColumns = defineWorkqueuesColumns([
3819
3819
  value: event.field("updatedAt")
3820
3820
  }
3821
3821
  ]);
3822
- var CtaActionType = z33.enum([...workqueueActions.options, ActionType.READ]);
3822
+ var WorkqueueActionsWithDefault = z33.enum([
3823
+ ...workqueueActions.options,
3824
+ "DEFAULT",
3825
+ ActionType.READ
3826
+ ]);
3823
3827
  var WorkqueueConfig = z33.object({
3824
3828
  slug: z33.string().describe("Determines the url of the workqueue."),
3825
3829
  name: TranslationConfig.describe(
@@ -3828,7 +3832,7 @@ var WorkqueueConfig = z33.object({
3828
3832
  query: CountryConfigQueryType,
3829
3833
  /** This action object used to contain a conditionals option, but it was not used anywhere.
3830
3834
  * It's also debatable whether it should be an array, or just a single action. */
3831
- actions: z33.array(z33.object({ type: CtaActionType })).describe("Workqueue call-to-action button configuration."),
3835
+ actions: z33.array(z33.object({ type: WorkqueueActionsWithDefault })).describe("Workqueue call-to-action button configuration."),
3832
3836
  columns: z33.array(WorkqueueColumn).default(mandatoryColumns),
3833
3837
  icon: AvailableIcons,
3834
3838
  emptyMessage: TranslationConfig.optional()
@@ -3843,7 +3847,7 @@ var WorkqueueConfigInput = z33.object({
3843
3847
  "Title of the workflow (both in navigation and on the page)"
3844
3848
  ),
3845
3849
  query: CountryConfigQueryInputType,
3846
- actions: z33.array(z33.object({ type: CtaActionType })).describe("Workqueue call-to-action button configuration."),
3850
+ actions: z33.array(z33.object({ type: WorkqueueActionsWithDefault })).describe("Workqueue call-to-action button configuration."),
3847
3851
  columns: z33.array(WorkqueueColumn).default(mandatoryColumns),
3848
3852
  icon: AvailableIcons,
3849
3853
  emptyMessage: TranslationConfig.optional()
@@ -3887,18 +3891,14 @@ var BaseActionInput = z34.object({
3887
3891
  // should not be part of base action.
3888
3892
  keepAssignment: z34.boolean().optional(),
3889
3893
  // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
3890
- // @TODO: createdAtLocation should be limited to actions that system users can perform. For normal users, it should not be part of the base action.
3891
- createdAtLocation: UUID.nullish().describe(
3894
+ createdAtLocation: CreatedAtLocation.describe(
3892
3895
  "A valid office location ID. This is required for system users performing actions. The provided location must be a leaf-location, i.e. it must not have any children locations."
3893
3896
  )
3894
3897
  });
3895
3898
  var CreateActionInput = BaseActionInput.extend(
3896
3899
  z34.object({
3897
3900
  type: z34.literal(ActionType.CREATE).default(ActionType.CREATE),
3898
- // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
3899
- createdAtLocation: UUID.nullish().describe(
3900
- "A valid office location ID. This is required for system users performing actions. The provided location must be a leaf-location, i.e. it must not have any children locations."
3901
- )
3901
+ createdAtLocation: CreatedAtLocation
3902
3902
  }).shape
3903
3903
  );
3904
3904
  var RegisterActionInput = BaseActionInput.extend(
@@ -3909,11 +3909,7 @@ var RegisterActionInput = BaseActionInput.extend(
3909
3909
  );
3910
3910
  var NotifyActionInput = BaseActionInput.extend(
3911
3911
  z34.object({
3912
- type: z34.literal(ActionType.NOTIFY).default(ActionType.NOTIFY),
3913
- // For normal users, the createdAtLocation is resolved on the backend from the user's primaryOfficeId.
3914
- createdAtLocation: UUID.nullish().describe(
3915
- "A valid office location ID. This is required for system users performing actions. The provided location must be a leaf-location, i.e. it must not have any children locations."
3916
- )
3912
+ type: z34.literal(ActionType.NOTIFY).default(ActionType.NOTIFY)
3917
3913
  }).shape
3918
3914
  ).meta({
3919
3915
  default: {
@@ -4076,14 +4072,11 @@ var DraftInput = BaseActionInput.extend({
4076
4072
 
4077
4073
  // ../commons/src/events/EventInput.ts
4078
4074
  var z36 = __toESM(require("zod/v4"));
4079
- var import_uuid9 = require("uuid");
4075
+ var import_uuid10 = require("uuid");
4080
4076
  var EventInput = z36.object({
4081
4077
  transactionId: z36.string(),
4082
- type: z36.string(),
4083
- createdAtLocation: UUID.nullish().describe(
4084
- "Location where the event occurred. Required for system users."
4085
- )
4086
- }).meta({ default: { transactionId: (0, import_uuid9.v4)(), type: "birth" } });
4078
+ type: z36.string()
4079
+ }).meta({ default: { transactionId: (0, import_uuid10.v4)(), type: "birth" } });
4087
4080
 
4088
4081
  // ../commons/src/events/EventDocument.ts
4089
4082
  var z37 = __toESM(require("zod/v4"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.6-rc.41331b0",
3
+ "version": "1.9.6-rc.41b0fd2",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {