@opencrvs/toolkit 2.0.1-rc.848e85d → 2.0.1-rc.8af24af

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/create-countryconfig/index.js +177 -14
  2. package/dist/application-config/index.js +6 -2
  3. package/dist/cli.js +334 -5
  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/commons/notification/UserNotifications.d.ts +1 -6
  20. package/dist/conditionals/index.js +6 -2
  21. package/dist/events/index.js +27 -2
  22. package/dist/migrations/v2.0/index.js +6 -2
  23. package/dist/notification/index.js +10 -2
  24. package/dist/scopes/index.d.ts +108 -0
  25. package/dist/scopes/index.js +6 -2
  26. package/dist/verify/endpoints.d.ts +2 -0
  27. package/dist/verify/endpoints.d.ts.map +1 -0
  28. package/dist/verify/endpoints.js +345 -0
  29. package/opencrvs-toolkit-2.0.1-rc.8af24af.tgz +0 -0
  30. package/package.json +1 -1
  31. package/tsconfig.tsbuildinfo +1 -1
  32. package/opencrvs-toolkit-2.0.1-rc.848e85d.tgz +0 -0
@@ -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;
@@ -184,12 +184,7 @@ export declare const TriggerPayload: {
184
184
  export type TriggerPayload = {
185
185
  [K in TriggerEvent]: z.infer<(typeof TriggerPayload)[K]>;
186
186
  };
187
- export declare function triggerUserEventNotification(args: {
188
- event: typeof TriggerEvent.ALL_USER_NOTIFICATION;
189
- payload: TriggerPayload[typeof TriggerEvent.ALL_USER_NOTIFICATION];
190
- countryConfigUrl: string;
191
- }): Promise<Response>;
192
- export declare function triggerUserEventNotification<T extends Exclude<TriggerEvent, typeof TriggerEvent.ALL_USER_NOTIFICATION>>(args: {
187
+ export declare function triggerUserEventNotification<T extends TriggerEvent>({ event, payload, countryConfigUrl, authHeader }: {
193
188
  event: T;
194
189
  payload: TriggerPayload[T];
195
190
  countryConfigUrl: string;
@@ -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) {
@@ -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
  );
@@ -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",
@@ -48,6 +48,14 @@ 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
+ }>>;
54
+ createdIn: z.ZodOptional<z.ZodEnum<{
55
+ administrativeArea: "administrativeArea";
56
+ location: "location";
57
+ all: "all";
58
+ }>>;
51
59
  declaredIn: z.ZodOptional<z.ZodEnum<{
52
60
  administrativeArea: "administrativeArea";
53
61
  location: "location";
@@ -70,6 +78,8 @@ export declare const ScopeOptionKey: z.ZodEnum<{
70
78
  role: "role";
71
79
  event: "event";
72
80
  placeOfEvent: "placeOfEvent";
81
+ createdBy: "createdBy";
82
+ createdIn: "createdIn";
73
83
  declaredIn: "declaredIn";
74
84
  declaredBy: "declaredBy";
75
85
  registeredIn: "registeredIn";
@@ -110,6 +120,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
110
120
  location: "location";
111
121
  all: "all";
112
122
  }>>;
123
+ createdBy: z.ZodOptional<z.ZodEnum<{
124
+ user: "user";
125
+ }>>;
126
+ createdIn: z.ZodOptional<z.ZodEnum<{
127
+ administrativeArea: "administrativeArea";
128
+ location: "location";
129
+ all: "all";
130
+ }>>;
113
131
  }, z.core.$strip>>;
114
132
  }, z.core.$strip>, z.ZodObject<{
115
133
  type: z.ZodEnum<{
@@ -126,6 +144,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
126
144
  location: "location";
127
145
  all: "all";
128
146
  }>>;
147
+ createdBy: z.ZodOptional<z.ZodEnum<{
148
+ user: "user";
149
+ }>>;
150
+ createdIn: z.ZodOptional<z.ZodEnum<{
151
+ administrativeArea: "administrativeArea";
152
+ location: "location";
153
+ all: "all";
154
+ }>>;
129
155
  declaredIn: z.ZodOptional<z.ZodEnum<{
130
156
  administrativeArea: "administrativeArea";
131
157
  location: "location";
@@ -150,6 +176,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
176
  location: "location";
151
177
  all: "all";
152
178
  }>>;
179
+ createdBy: z.ZodOptional<z.ZodEnum<{
180
+ user: "user";
181
+ }>>;
182
+ createdIn: z.ZodOptional<z.ZodEnum<{
183
+ administrativeArea: "administrativeArea";
184
+ location: "location";
185
+ all: "all";
186
+ }>>;
153
187
  declaredIn: z.ZodOptional<z.ZodEnum<{
154
188
  administrativeArea: "administrativeArea";
155
189
  location: "location";
@@ -176,6 +210,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
176
210
  location: "location";
177
211
  all: "all";
178
212
  }>>;
213
+ createdBy: z.ZodOptional<z.ZodEnum<{
214
+ user: "user";
215
+ }>>;
216
+ createdIn: z.ZodOptional<z.ZodEnum<{
217
+ administrativeArea: "administrativeArea";
218
+ location: "location";
219
+ all: "all";
220
+ }>>;
179
221
  declaredIn: z.ZodOptional<z.ZodEnum<{
180
222
  administrativeArea: "administrativeArea";
181
223
  location: "location";
@@ -203,6 +245,14 @@ export declare const RecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
203
245
  location: "location";
204
246
  all: "all";
205
247
  }>>;
248
+ createdBy: z.ZodOptional<z.ZodEnum<{
249
+ user: "user";
250
+ }>>;
251
+ createdIn: z.ZodOptional<z.ZodEnum<{
252
+ administrativeArea: "administrativeArea";
253
+ location: "location";
254
+ all: "all";
255
+ }>>;
206
256
  declaredIn: z.ZodOptional<z.ZodEnum<{
207
257
  administrativeArea: "administrativeArea";
208
258
  location: "location";
@@ -293,6 +343,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
293
343
  options: z.ZodOptional<z.ZodObject<{
294
344
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
295
345
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
346
+ createdBy: z.ZodOptional<z.ZodString>;
347
+ createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
296
348
  }, z.core.$strip>>;
297
349
  }, z.core.$strip>, z.ZodObject<{
298
350
  type: z.ZodEnum<{
@@ -305,6 +357,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
305
357
  options: z.ZodOptional<z.ZodObject<{
306
358
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
307
359
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
360
+ createdBy: z.ZodOptional<z.ZodString>;
361
+ createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
308
362
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
309
363
  declaredBy: z.ZodOptional<z.ZodString>;
310
364
  }, z.core.$strip>>;
@@ -319,6 +373,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
319
373
  options: z.ZodOptional<z.ZodObject<{
320
374
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
321
375
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
376
+ createdBy: z.ZodOptional<z.ZodString>;
377
+ createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
322
378
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
323
379
  declaredBy: z.ZodOptional<z.ZodString>;
324
380
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -329,6 +385,8 @@ export declare const ResolvedRecordScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject
329
385
  options: z.ZodOptional<z.ZodObject<{
330
386
  event: z.ZodPipe<z.ZodTransform<({} | null)[] | undefined, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
331
387
  placeOfEvent: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
388
+ createdBy: z.ZodOptional<z.ZodString>;
389
+ createdIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
332
390
  declaredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
333
391
  declaredBy: z.ZodOptional<z.ZodString>;
334
392
  registeredIn: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
@@ -369,6 +427,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
369
427
  location: "location";
370
428
  all: "all";
371
429
  }>>;
430
+ createdBy: z.ZodOptional<z.ZodEnum<{
431
+ user: "user";
432
+ }>>;
433
+ createdIn: z.ZodOptional<z.ZodEnum<{
434
+ administrativeArea: "administrativeArea";
435
+ location: "location";
436
+ all: "all";
437
+ }>>;
372
438
  }, z.core.$strip>>;
373
439
  }, z.core.$strip>, z.ZodObject<{
374
440
  type: z.ZodEnum<{
@@ -385,6 +451,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
385
451
  location: "location";
386
452
  all: "all";
387
453
  }>>;
454
+ createdBy: z.ZodOptional<z.ZodEnum<{
455
+ user: "user";
456
+ }>>;
457
+ createdIn: z.ZodOptional<z.ZodEnum<{
458
+ administrativeArea: "administrativeArea";
459
+ location: "location";
460
+ all: "all";
461
+ }>>;
388
462
  declaredIn: z.ZodOptional<z.ZodEnum<{
389
463
  administrativeArea: "administrativeArea";
390
464
  location: "location";
@@ -409,6 +483,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
409
483
  location: "location";
410
484
  all: "all";
411
485
  }>>;
486
+ createdBy: z.ZodOptional<z.ZodEnum<{
487
+ user: "user";
488
+ }>>;
489
+ createdIn: z.ZodOptional<z.ZodEnum<{
490
+ administrativeArea: "administrativeArea";
491
+ location: "location";
492
+ all: "all";
493
+ }>>;
412
494
  declaredIn: z.ZodOptional<z.ZodEnum<{
413
495
  administrativeArea: "administrativeArea";
414
496
  location: "location";
@@ -435,6 +517,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
435
517
  location: "location";
436
518
  all: "all";
437
519
  }>>;
520
+ createdBy: z.ZodOptional<z.ZodEnum<{
521
+ user: "user";
522
+ }>>;
523
+ createdIn: z.ZodOptional<z.ZodEnum<{
524
+ administrativeArea: "administrativeArea";
525
+ location: "location";
526
+ all: "all";
527
+ }>>;
438
528
  declaredIn: z.ZodOptional<z.ZodEnum<{
439
529
  administrativeArea: "administrativeArea";
440
530
  location: "location";
@@ -462,6 +552,14 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
462
552
  location: "location";
463
553
  all: "all";
464
554
  }>>;
555
+ createdBy: z.ZodOptional<z.ZodEnum<{
556
+ user: "user";
557
+ }>>;
558
+ createdIn: z.ZodOptional<z.ZodEnum<{
559
+ administrativeArea: "administrativeArea";
560
+ location: "location";
561
+ all: "all";
562
+ }>>;
465
563
  declaredIn: z.ZodOptional<z.ZodEnum<{
466
564
  administrativeArea: "administrativeArea";
467
565
  location: "location";
@@ -590,12 +688,16 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
590
688
  options?: {
591
689
  event?: string[] | undefined;
592
690
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
691
+ createdBy?: "user" | undefined;
692
+ createdIn?: "administrativeArea" | "location" | "all" | undefined;
593
693
  } | undefined;
594
694
  } | {
595
695
  type: "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register";
596
696
  options?: {
597
697
  event?: string[] | undefined;
598
698
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
699
+ createdBy?: "user" | undefined;
700
+ createdIn?: "administrativeArea" | "location" | "all" | undefined;
599
701
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
600
702
  declaredBy?: "user" | undefined;
601
703
  } | undefined;
@@ -604,6 +706,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
604
706
  options?: {
605
707
  event?: string[] | undefined;
606
708
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
709
+ createdBy?: "user" | undefined;
710
+ createdIn?: "administrativeArea" | "location" | "all" | undefined;
607
711
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
608
712
  declaredBy?: "user" | undefined;
609
713
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -614,6 +718,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
614
718
  options?: {
615
719
  event?: string[] | undefined;
616
720
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
721
+ createdBy?: "user" | undefined;
722
+ createdIn?: "administrativeArea" | "location" | "all" | undefined;
617
723
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
618
724
  declaredBy?: "user" | undefined;
619
725
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -625,6 +731,8 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
625
731
  options?: {
626
732
  event?: string[] | undefined;
627
733
  placeOfEvent?: "administrativeArea" | "location" | "all" | undefined;
734
+ createdBy?: "user" | undefined;
735
+ createdIn?: "administrativeArea" | "location" | "all" | undefined;
628
736
  declaredIn?: "administrativeArea" | "location" | "all" | undefined;
629
737
  declaredBy?: "user" | undefined;
630
738
  registeredIn?: "administrativeArea" | "location" | "all" | undefined;
@@ -147,7 +147,9 @@ 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(),
152
+ createdIn: JurisdictionFilter.optional()
151
153
  }).describe("Options applicable to all record scopes.");
152
154
  var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
153
155
  declaredIn: JurisdictionFilter.optional(),
@@ -186,7 +188,9 @@ var AllScopeOptions = z3.object({
186
188
  var ScopeOptionKey = AllScopeOptions.keyof();
187
189
  var ResolvedScopeOptionsPlaceEvent = z3.object({
188
190
  event: scopeByEvent,
189
- placeOfEvent: UUID.nullish()
191
+ placeOfEvent: UUID.nullish(),
192
+ createdBy: z3.string().optional(),
193
+ createdIn: UUID.nullish()
190
194
  }).describe(
191
195
  "Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
192
196
  );
@@ -0,0 +1,2 @@
1
+ export declare function runVerifyEndpoints(target?: string): Promise<void>;
2
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../src/verify/endpoints.ts"],"names":[],"mappings":"AA2RA,wBAAsB,kBAAkB,CACtC,MAAM,GAAE,MAA2B,GAClC,OAAO,CAAC,IAAI,CAAC,CAkIf"}