@opencrvs/toolkit 2.0.1-rc.8c97c00 → 2.0.1-rc.c5ef379

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.
@@ -663,7 +663,8 @@ var userRole = z11.preprocess(
663
663
  ).describe("User role, e.g. admin, field agent");
664
664
  var scopeOptionsPlaceEvent = z11.object({
665
665
  event: scopeByEvent,
666
- placeOfEvent: JurisdictionFilter.optional()
666
+ placeOfEvent: JurisdictionFilter.optional(),
667
+ createdBy: UserFilter.optional()
667
668
  }).describe("Options applicable to all record scopes.");
668
669
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
669
670
  declaredIn: JurisdictionFilter.optional(),
@@ -702,7 +703,8 @@ var AllScopeOptions = z11.object({
702
703
  var ScopeOptionKey = AllScopeOptions.keyof();
703
704
  var ResolvedScopeOptionsPlaceEvent = z11.object({
704
705
  event: scopeByEvent,
705
- placeOfEvent: UUID.nullish()
706
+ placeOfEvent: UUID.nullish(),
707
+ createdBy: z11.string().optional()
706
708
  }).describe(
707
709
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
708
710
  );
package/dist/cli.js CHANGED
@@ -2190,7 +2190,8 @@ var userRole = z3.preprocess(
2190
2190
  ).describe("User role, e.g. admin, field agent");
2191
2191
  var scopeOptionsPlaceEvent = z3.object({
2192
2192
  event: scopeByEvent,
2193
- placeOfEvent: JurisdictionFilter.optional()
2193
+ placeOfEvent: JurisdictionFilter.optional(),
2194
+ createdBy: UserFilter.optional()
2194
2195
  }).describe("Options applicable to all record scopes.");
2195
2196
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
2196
2197
  declaredIn: JurisdictionFilter.optional(),
@@ -2229,7 +2230,8 @@ var AllScopeOptions = z3.object({
2229
2230
  var ScopeOptionKey = AllScopeOptions.keyof();
2230
2231
  var ResolvedScopeOptionsPlaceEvent = z3.object({
2231
2232
  event: scopeByEvent,
2232
- placeOfEvent: UUID.nullish()
2233
+ placeOfEvent: UUID.nullish(),
2234
+ createdBy: z3.string().optional()
2233
2235
  }).describe(
2234
2236
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
2235
2237
  );
@@ -413,10 +413,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
413
413
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
414
414
  } | {
415
415
  id: string & import("zod").$brand<"UUID">;
416
+ createdBy: string;
416
417
  transactionId: string;
417
418
  createdByUserType: "system" | "user";
418
419
  createdAt: string;
419
- createdBy: string;
420
420
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
421
421
  status: "Rejected";
422
422
  createdByRole?: string | undefined;
@@ -725,10 +725,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
725
725
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
726
726
  } | {
727
727
  id: string & import("zod").$brand<"UUID">;
728
+ createdBy: string;
728
729
  transactionId: string;
729
730
  createdByUserType: "system" | "user";
730
731
  createdAt: string;
731
- createdBy: string;
732
732
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
733
733
  status: "Rejected";
734
734
  createdByRole?: string | undefined;
@@ -1036,10 +1036,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1036
1036
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1037
1037
  } | {
1038
1038
  id: string & import("zod").$brand<"UUID">;
1039
+ createdBy: string;
1039
1040
  transactionId: string;
1040
1041
  createdByUserType: "system" | "user";
1041
1042
  createdAt: string;
1042
- createdBy: string;
1043
1043
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
1044
1044
  status: "Rejected";
1045
1045
  createdByRole?: string | undefined;
@@ -1091,10 +1091,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1091
1091
  createdAt: string;
1092
1092
  action: {
1093
1093
  type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
1094
+ createdBy: string;
1094
1095
  transactionId: string;
1095
1096
  createdByUserType: "system" | "user";
1096
1097
  createdAt: string;
1097
- createdBy: string;
1098
1098
  declaration: Record<string, import("../commons").FieldUpdateValue>;
1099
1099
  status: "Requested" | "Accepted" | "Rejected";
1100
1100
  createdByRole?: string | undefined;
@@ -1126,10 +1126,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1126
1126
  createdAt: string;
1127
1127
  action: {
1128
1128
  type: "CREATE" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN" | "CUSTOM";
1129
+ createdBy: string;
1129
1130
  transactionId: string;
1130
1131
  createdByUserType: "system" | "user";
1131
1132
  createdAt: string;
1132
- createdBy: string;
1133
1133
  declaration: Record<string, import("../commons").FieldUpdateValue>;
1134
1134
  status: "Requested" | "Accepted" | "Rejected";
1135
1135
  createdByRole?: string | undefined;
@@ -1784,10 +1784,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
1784
1784
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
1785
1785
  } | {
1786
1786
  id: string & import("zod").$brand<"UUID">;
1787
+ createdBy: string;
1787
1788
  transactionId: string;
1788
1789
  createdByUserType: "system" | "user";
1789
1790
  createdAt: string;
1790
- createdBy: string;
1791
1791
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
1792
1792
  status: "Rejected";
1793
1793
  createdByRole?: string | undefined;
@@ -2127,10 +2127,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
2127
2127
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
2128
2128
  } | {
2129
2129
  id: string & import("zod").$brand<"UUID">;
2130
+ createdBy: string;
2130
2131
  transactionId: string;
2131
2132
  createdByUserType: "system" | "user";
2132
2133
  createdAt: string;
2133
- createdBy: string;
2134
2134
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
2135
2135
  status: "Rejected";
2136
2136
  createdByRole?: string | undefined;
@@ -4213,10 +4213,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4213
4213
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4214
4214
  } | {
4215
4215
  id: string & import("zod").$brand<"UUID">;
4216
+ createdBy: string;
4216
4217
  transactionId: string;
4217
4218
  createdByUserType: "system" | "user";
4218
4219
  createdAt: string;
4219
- createdBy: string;
4220
4220
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
4221
4221
  status: "Rejected";
4222
4222
  createdByRole?: string | undefined;
@@ -4824,10 +4824,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4824
4824
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4825
4825
  } | {
4826
4826
  id: string & import("zod").$brand<"UUID">;
4827
+ createdBy: string;
4827
4828
  transactionId: string;
4828
4829
  createdByUserType: "system" | "user";
4829
4830
  createdAt: string;
4830
- createdBy: string;
4831
4831
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
4832
4832
  status: "Rejected";
4833
4833
  createdByRole?: string | undefined;
@@ -5145,10 +5145,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5145
5145
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
5146
5146
  } | {
5147
5147
  id: string & import("zod").$brand<"UUID">;
5148
+ createdBy: string;
5148
5149
  transactionId: string;
5149
5150
  createdByUserType: "system" | "user";
5150
5151
  createdAt: string;
5151
- createdBy: string;
5152
5152
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
5153
5153
  status: "Rejected";
5154
5154
  createdByRole?: string | undefined;
@@ -6399,10 +6399,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6399
6399
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
6400
6400
  } | {
6401
6401
  id: string & import("zod").$brand<"UUID">;
6402
+ createdBy: string;
6402
6403
  transactionId: string;
6403
6404
  createdByUserType: "system" | "user";
6404
6405
  createdAt: string;
6405
- createdBy: string;
6406
6406
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
6407
6407
  status: "Rejected";
6408
6408
  createdByRole?: string | undefined;
@@ -6719,10 +6719,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
6719
6719
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
6720
6720
  } | {
6721
6721
  id: string & import("zod").$brand<"UUID">;
6722
+ createdBy: string;
6722
6723
  transactionId: string;
6723
6724
  createdByUserType: "system" | "user";
6724
6725
  createdAt: string;
6725
- createdBy: string;
6726
6726
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
6727
6727
  status: "Rejected";
6728
6728
  createdByRole?: string | undefined;
@@ -7082,10 +7082,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
7082
7082
  originalActionId?: string | null | undefined;
7083
7083
  } | {
7084
7084
  id: string;
7085
+ createdBy: string;
7085
7086
  transactionId: string;
7086
7087
  createdByUserType: "system" | "user";
7087
7088
  createdAt: string;
7088
- createdBy: string;
7089
7089
  type: "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "CUSTOM";
7090
7090
  status: "Rejected";
7091
7091
  createdByRole?: string | undefined;
@@ -94,16 +94,16 @@ export declare const user: typeof userSerializer & {
94
94
  scope: (scope: import("../scopes").ScopeType) => {
95
95
  attribute: (option: import("../scopes").ScopeOptionKey) => {
96
96
  $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
97
- $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
97
+ $option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
98
98
  };
99
99
  };
100
100
  jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
101
101
  $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
102
- $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
102
+ $option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
103
103
  }) => {
104
104
  $jurisdiction: "administrativeArea" | "location" | "all" | {
105
105
  $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
106
- $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
106
+ $option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
107
107
  };
108
108
  };
109
109
  };
@@ -661,13 +661,13 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
661
661
  export type ActionDocument = z.infer<typeof ActionDocument>;
662
662
  export declare const AsyncRejectActionDocument: z.ZodObject<{
663
663
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
664
+ createdBy: z.ZodString;
664
665
  transactionId: z.ZodString;
665
666
  createdByUserType: z.ZodEnum<{
666
667
  user: "user";
667
668
  system: "system";
668
669
  }>;
669
670
  createdAt: z.ZodString;
670
- createdBy: z.ZodString;
671
671
  createdByRole: z.ZodOptional<z.ZodString>;
672
672
  createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
673
673
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -1100,13 +1100,13 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1100
1100
  customActionType: z.ZodString;
1101
1101
  }, z.core.$strip>], "type">, z.ZodObject<{
1102
1102
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
1103
+ createdBy: z.ZodString;
1103
1104
  transactionId: z.ZodString;
1104
1105
  createdByUserType: z.ZodEnum<{
1105
1106
  user: "user";
1106
1107
  system: "system";
1107
1108
  }>;
1108
1109
  createdAt: z.ZodString;
1109
- createdBy: z.ZodString;
1110
1110
  createdByRole: z.ZodOptional<z.ZodString>;
1111
1111
  createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
1112
1112
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -139,6 +139,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
139
139
  role: "role";
140
140
  event: "event";
141
141
  placeOfEvent: "placeOfEvent";
142
+ createdBy: "createdBy";
142
143
  declaredIn: "declaredIn";
143
144
  declaredBy: "declaredBy";
144
145
  registeredIn: "registeredIn";
@@ -316,6 +317,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
316
317
  role: "role";
317
318
  event: "event";
318
319
  placeOfEvent: "placeOfEvent";
320
+ createdBy: "createdBy";
319
321
  declaredIn: "declaredIn";
320
322
  declaredBy: "declaredBy";
321
323
  registeredIn: "registeredIn";
@@ -469,6 +471,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
469
471
  role: "role";
470
472
  event: "event";
471
473
  placeOfEvent: "placeOfEvent";
474
+ createdBy: "createdBy";
472
475
  declaredIn: "declaredIn";
473
476
  declaredBy: "declaredBy";
474
477
  registeredIn: "registeredIn";
@@ -614,6 +617,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
614
617
  role: "role";
615
618
  event: "event";
616
619
  placeOfEvent: "placeOfEvent";
620
+ createdBy: "createdBy";
617
621
  declaredIn: "declaredIn";
618
622
  declaredBy: "declaredBy";
619
623
  registeredIn: "registeredIn";
@@ -770,6 +774,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
770
774
  role: "role";
771
775
  event: "event";
772
776
  placeOfEvent: "placeOfEvent";
777
+ createdBy: "createdBy";
773
778
  declaredIn: "declaredIn";
774
779
  declaredBy: "declaredBy";
775
780
  registeredIn: "registeredIn";
@@ -915,6 +920,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
915
920
  role: "role";
916
921
  event: "event";
917
922
  placeOfEvent: "placeOfEvent";
923
+ createdBy: "createdBy";
918
924
  declaredIn: "declaredIn";
919
925
  declaredBy: "declaredBy";
920
926
  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,7 @@ declare const AdministrativeAreaField: z.ZodObject<{
1919
1919
  role: "role";
1920
1920
  event: "event";
1921
1921
  placeOfEvent: "placeOfEvent";
1922
+ createdBy: "createdBy";
1922
1923
  declaredIn: "declaredIn";
1923
1924
  declaredBy: "declaredBy";
1924
1925
  registeredIn: "registeredIn";
@@ -2045,6 +2046,7 @@ declare const LocationInput: z.ZodObject<{
2045
2046
  role: "role";
2046
2047
  event: "event";
2047
2048
  placeOfEvent: "placeOfEvent";
2049
+ createdBy: "createdBy";
2048
2050
  declaredIn: "declaredIn";
2049
2051
  declaredBy: "declaredBy";
2050
2052
  registeredIn: "registeredIn";
@@ -2242,6 +2244,7 @@ declare const Facility: z.ZodObject<{
2242
2244
  role: "role";
2243
2245
  event: "event";
2244
2246
  placeOfEvent: "placeOfEvent";
2247
+ createdBy: "createdBy";
2245
2248
  declaredIn: "declaredIn";
2246
2249
  declaredBy: "declaredBy";
2247
2250
  registeredIn: "registeredIn";
@@ -2354,6 +2357,7 @@ declare const Office: z.ZodObject<{
2354
2357
  role: "role";
2355
2358
  event: "event";
2356
2359
  placeOfEvent: "placeOfEvent";
2360
+ createdBy: "createdBy";
2357
2361
  declaredIn: "declaredIn";
2358
2362
  declaredBy: "declaredBy";
2359
2363
  registeredIn: "registeredIn";
@@ -2552,6 +2556,7 @@ declare const Address: z.ZodObject<{
2552
2556
  role: "role";
2553
2557
  event: "event";
2554
2558
  placeOfEvent: "placeOfEvent";
2559
+ createdBy: "createdBy";
2555
2560
  declaredIn: "declaredIn";
2556
2561
  declaredBy: "declaredBy";
2557
2562
  registeredIn: "registeredIn";
@@ -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.
@@ -437,10 +437,10 @@ export declare function findLastAssignmentAction(actions: Action[]): {
437
437
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
438
438
  } | {
439
439
  id: string & import("zod").$brand<"UUID">;
440
+ createdBy: string;
440
441
  transactionId: string;
441
442
  createdByUserType: "user" | "system";
442
443
  createdAt: string;
443
- createdBy: string;
444
444
  type: "CUSTOM" | "NOTIFY" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION";
445
445
  status: "Rejected";
446
446
  createdByRole?: string | undefined;
@@ -189,7 +189,8 @@ 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()
193
194
  }).describe("Options applicable to all record scopes.");
194
195
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
195
196
  declaredIn: JurisdictionFilter.optional(),
@@ -228,7 +229,8 @@ var AllScopeOptions = z6.object({
228
229
  var ScopeOptionKey = AllScopeOptions.keyof();
229
230
  var ResolvedScopeOptionsPlaceEvent = z6.object({
230
231
  event: scopeByEvent,
231
- placeOfEvent: UUID.nullish()
232
+ placeOfEvent: UUID.nullish(),
233
+ createdBy: z6.string().optional()
232
234
  }).describe(
233
235
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
234
236
  );
@@ -518,7 +518,8 @@ 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()
522
523
  }).describe("Options applicable to all record scopes.");
523
524
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
524
525
  declaredIn: JurisdictionFilter.optional(),
@@ -557,7 +558,8 @@ var AllScopeOptions = z2.object({
557
558
  var ScopeOptionKey = AllScopeOptions.keyof();
558
559
  var ResolvedScopeOptionsPlaceEvent = z2.object({
559
560
  event: scopeByEvent,
560
- placeOfEvent: UUID.nullish()
561
+ placeOfEvent: UUID.nullish(),
562
+ createdBy: z2.string().optional()
561
563
  }).describe(
562
564
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
563
565
  );
@@ -10309,6 +10311,9 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
10309
10311
  )) {
10310
10312
  return false;
10311
10313
  }
10314
+ if (opts?.createdBy === UserFilter.enum.user && event2.createdBy !== user2.id) {
10315
+ return false;
10316
+ }
10312
10317
  if (scopeUsesDeclaredOptions(scope)) {
10313
10318
  const { options } = scope;
10314
10319
  if (options?.declaredBy === UserFilter.enum.user) {
@@ -2202,7 +2202,8 @@ 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()
2206
2207
  }).describe("Options applicable to all record scopes.");
2207
2208
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
2208
2209
  declaredIn: JurisdictionFilter.optional(),
@@ -2241,7 +2242,8 @@ var AllScopeOptions = z3.object({
2241
2242
  var ScopeOptionKey = AllScopeOptions.keyof();
2242
2243
  var ResolvedScopeOptionsPlaceEvent = z3.object({
2243
2244
  event: scopeByEvent,
2244
- placeOfEvent: UUID.nullish()
2245
+ placeOfEvent: UUID.nullish(),
2246
+ createdBy: z3.string().optional()
2245
2247
  }).describe(
2246
2248
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
2247
2249
  );
@@ -116,7 +116,8 @@ 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()
120
121
  }).describe("Options applicable to all record scopes.");
121
122
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
122
123
  declaredIn: JurisdictionFilter.optional(),
@@ -155,7 +156,8 @@ var AllScopeOptions = z2.object({
155
156
  var ScopeOptionKey = AllScopeOptions.keyof();
156
157
  var ResolvedScopeOptionsPlaceEvent = z2.object({
157
158
  event: scopeByEvent,
158
- placeOfEvent: UUID.nullish()
159
+ placeOfEvent: UUID.nullish(),
160
+ createdBy: z2.string().optional()
159
161
  }).describe(
160
162
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
161
163
  );
@@ -48,6 +48,9 @@ declare const AllScopeOptions: z.ZodObject<{
48
48
  location: "location";
49
49
  all: "all";
50
50
  }>>;
51
+ createdBy: z.ZodOptional<z.ZodEnum<{
52
+ user: "user";
53
+ }>>;
51
54
  declaredIn: z.ZodOptional<z.ZodEnum<{
52
55
  administrativeArea: "administrativeArea";
53
56
  location: "location";
@@ -70,6 +73,7 @@ export declare const ScopeOptionKey: z.ZodEnum<{
70
73
  role: "role";
71
74
  event: "event";
72
75
  placeOfEvent: "placeOfEvent";
76
+ createdBy: "createdBy";
73
77
  declaredIn: "declaredIn";
74
78
  declaredBy: "declaredBy";
75
79
  registeredIn: "registeredIn";
@@ -110,6 +114,9 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
110
114
  location: "location";
111
115
  all: "all";
112
116
  }>>;
117
+ createdBy: z.ZodOptional<z.ZodEnum<{
118
+ user: "user";
119
+ }>>;
113
120
  }, z.core.$strip>>;
114
121
  }, z.core.$strip>, z.ZodObject<{
115
122
  type: z.ZodEnum<{
@@ -126,6 +133,9 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
133
  location: "location";
127
134
  all: "all";
128
135
  }>>;
136
+ createdBy: z.ZodOptional<z.ZodEnum<{
137
+ user: "user";
138
+ }>>;
129
139
  declaredIn: z.ZodOptional<z.ZodEnum<{
130
140
  administrativeArea: "administrativeArea";
131
141
  location: "location";
@@ -150,6 +160,9 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
160
  location: "location";
151
161
  all: "all";
152
162
  }>>;
163
+ createdBy: z.ZodOptional<z.ZodEnum<{
164
+ user: "user";
165
+ }>>;
153
166
  declaredIn: z.ZodOptional<z.ZodEnum<{
154
167
  administrativeArea: "administrativeArea";
155
168
  location: "location";
@@ -176,6 +189,9 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
176
189
  location: "location";
177
190
  all: "all";
178
191
  }>>;
192
+ createdBy: z.ZodOptional<z.ZodEnum<{
193
+ user: "user";
194
+ }>>;
179
195
  declaredIn: z.ZodOptional<z.ZodEnum<{
180
196
  administrativeArea: "administrativeArea";
181
197
  location: "location";
@@ -203,6 +219,9 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
203
219
  location: "location";
204
220
  all: "all";
205
221
  }>>;
222
+ createdBy: z.ZodOptional<z.ZodEnum<{
223
+ user: "user";
224
+ }>>;
206
225
  declaredIn: z.ZodOptional<z.ZodEnum<{
207
226
  administrativeArea: "administrativeArea";
208
227
  location: "location";
@@ -293,6 +312,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
293
312
  options: z.ZodOptional<z.ZodObject<{
294
313
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
295
314
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
315
+ createdBy: z.ZodOptional<z.ZodString>;
296
316
  }, z.core.$strip>>;
297
317
  }, z.core.$strip>, z.ZodObject<{
298
318
  type: z.ZodEnum<{
@@ -305,6 +325,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
305
325
  options: z.ZodOptional<z.ZodObject<{
306
326
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
307
327
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
328
+ createdBy: z.ZodOptional<z.ZodString>;
308
329
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
309
330
  declaredBy: z.ZodOptional<z.ZodString>;
310
331
  }, z.core.$strip>>;
@@ -319,6 +340,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
319
340
  options: z.ZodOptional<z.ZodObject<{
320
341
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
321
342
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
343
+ createdBy: z.ZodOptional<z.ZodString>;
322
344
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
323
345
  declaredBy: z.ZodOptional<z.ZodString>;
324
346
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -329,6 +351,7 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
329
351
  options: z.ZodOptional<z.ZodObject<{
330
352
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
331
353
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
354
+ createdBy: z.ZodOptional<z.ZodString>;
332
355
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
333
356
  declaredBy: z.ZodOptional<z.ZodString>;
334
357
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -369,6 +392,9 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
369
392
  location: "location";
370
393
  all: "all";
371
394
  }>>;
395
+ createdBy: z.ZodOptional<z.ZodEnum<{
396
+ user: "user";
397
+ }>>;
372
398
  }, z.core.$strip>>;
373
399
  }, z.core.$strip>, z.ZodObject<{
374
400
  type: z.ZodEnum<{
@@ -385,6 +411,9 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
385
411
  location: "location";
386
412
  all: "all";
387
413
  }>>;
414
+ createdBy: z.ZodOptional<z.ZodEnum<{
415
+ user: "user";
416
+ }>>;
388
417
  declaredIn: z.ZodOptional<z.ZodEnum<{
389
418
  administrativeArea: "administrativeArea";
390
419
  location: "location";
@@ -409,6 +438,9 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
409
438
  location: "location";
410
439
  all: "all";
411
440
  }>>;
441
+ createdBy: z.ZodOptional<z.ZodEnum<{
442
+ user: "user";
443
+ }>>;
412
444
  declaredIn: z.ZodOptional<z.ZodEnum<{
413
445
  administrativeArea: "administrativeArea";
414
446
  location: "location";
@@ -435,6 +467,9 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
435
467
  location: "location";
436
468
  all: "all";
437
469
  }>>;
470
+ createdBy: z.ZodOptional<z.ZodEnum<{
471
+ user: "user";
472
+ }>>;
438
473
  declaredIn: z.ZodOptional<z.ZodEnum<{
439
474
  administrativeArea: "administrativeArea";
440
475
  location: "location";
@@ -462,6 +497,9 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
462
497
  location: "location";
463
498
  all: "all";
464
499
  }>>;
500
+ createdBy: z.ZodOptional<z.ZodEnum<{
501
+ user: "user";
502
+ }>>;
465
503
  declaredIn: z.ZodOptional<z.ZodEnum<{
466
504
  administrativeArea: "administrativeArea";
467
505
  location: "location";
@@ -590,12 +628,14 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
590
628
  options?: {
591
629
  event?: string[] | undefined;
592
630
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
631
+ createdBy?: "user" | undefined;
593
632
  } | undefined;
594
633
  } | {
595
634
  type: "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register";
596
635
  options?: {
597
636
  event?: string[] | undefined;
598
637
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
638
+ createdBy?: "user" | undefined;
599
639
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
600
640
  declaredBy?: "user" | undefined;
601
641
  } | undefined;
@@ -604,6 +644,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
604
644
  options?: {
605
645
  event?: string[] | undefined;
606
646
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
647
+ createdBy?: "user" | undefined;
607
648
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
608
649
  declaredBy?: "user" | undefined;
609
650
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -614,6 +655,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
614
655
  options?: {
615
656
  event?: string[] | undefined;
616
657
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
658
+ createdBy?: "user" | undefined;
617
659
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
618
660
  declaredBy?: "user" | undefined;
619
661
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -625,6 +667,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
625
667
  options?: {
626
668
  event?: string[] | undefined;
627
669
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
670
+ createdBy?: "user" | undefined;
628
671
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
629
672
  declaredBy?: "user" | undefined;
630
673
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -147,7 +147,8 @@ var userRole = z3.preprocess(
147
147
  ).describe("User role, e.g. admin, field agent");
148
148
  var scopeOptionsPlaceEvent = z3.object({
149
149
  event: scopeByEvent,
150
- placeOfEvent: JurisdictionFilter.optional()
150
+ placeOfEvent: JurisdictionFilter.optional(),
151
+ createdBy: UserFilter.optional()
151
152
  }).describe("Options applicable to all record scopes.");
152
153
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
153
154
  declaredIn: JurisdictionFilter.optional(),
@@ -186,7 +187,8 @@ var AllScopeOptions = z3.object({
186
187
  var ScopeOptionKey = AllScopeOptions.keyof();
187
188
  var ResolvedScopeOptionsPlaceEvent = z3.object({
188
189
  event: scopeByEvent,
189
- placeOfEvent: UUID.nullish()
190
+ placeOfEvent: UUID.nullish(),
191
+ createdBy: z3.string().optional()
190
192
  }).describe(
191
193
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
192
194
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.1-rc.8c97c00",
3
+ "version": "2.0.1-rc.c5ef379",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {