@opencrvs/toolkit 2.0.0-rc.5b847e3 → 2.0.0-rc.5ba2797

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 (104) hide show
  1. package/README.md +15 -0
  2. package/build.sh +3 -2
  3. package/dist/application-config/index.js +70 -40
  4. package/dist/cli.js +3262 -50
  5. package/dist/commons/api/router.d.ts +212 -127
  6. package/dist/commons/application-config/index.d.ts +1 -0
  7. package/dist/commons/conditionals/conditionals.d.ts +1937 -41
  8. package/dist/commons/conditionals/validate.d.ts +51 -2
  9. package/dist/commons/events/ActionConfig.d.ts +28 -2
  10. package/dist/commons/events/ActionDocument.d.ts +6 -0
  11. package/dist/commons/events/ActionInput.d.ts +6 -0
  12. package/dist/commons/events/AdvancedSearchConfig.d.ts +354 -0
  13. package/dist/commons/events/CountryConfigQueryInput.d.ts +42 -0
  14. package/dist/commons/events/EventConfig.d.ts +2 -0
  15. package/dist/commons/events/EventDocument.d.ts +3 -0
  16. package/dist/commons/events/EventIndex.d.ts +25 -0
  17. package/dist/commons/events/EventMetadata.d.ts +26 -0
  18. package/dist/commons/events/FieldConfig.d.ts +388 -50
  19. package/dist/commons/events/FieldType.d.ts +1 -0
  20. package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
  21. package/dist/commons/events/FieldValue.d.ts +6 -0
  22. package/dist/commons/events/WorkqueueConfig.d.ts +39 -0
  23. package/dist/commons/events/field.d.ts +775 -35
  24. package/dist/commons/events/index.d.ts +1 -0
  25. package/dist/commons/events/locations.d.ts +1 -0
  26. package/dist/commons/events/state/flags.d.ts +14 -0
  27. package/dist/commons/events/state/index.d.ts +8 -0
  28. package/dist/commons/events/state/utils.d.ts +21 -287
  29. package/dist/commons/events/utils.d.ts +12 -1
  30. package/dist/conditionals/index.js +58 -6
  31. package/dist/environment/custom-types.d.ts +33 -0
  32. package/dist/environment/custom-types.d.ts.map +1 -0
  33. package/dist/environment/custom-types.js +12 -0
  34. package/dist/environment/derived-variables.d.ts +134 -0
  35. package/dist/environment/derived-variables.d.ts.map +1 -0
  36. package/dist/environment/derived-variables.js +169 -0
  37. package/dist/environment/editor-questions.d.ts +4 -0
  38. package/dist/environment/editor-questions.d.ts.map +1 -0
  39. package/dist/environment/editor-questions.js +67 -0
  40. package/dist/environment/git.d.ts +5 -0
  41. package/dist/environment/git.d.ts.map +1 -0
  42. package/dist/environment/git.js +38 -0
  43. package/dist/environment/github.d.ts +26 -0
  44. package/dist/environment/github.d.ts.map +1 -0
  45. package/dist/environment/github.js +247 -0
  46. package/dist/environment/index.d.ts +5 -0
  47. package/dist/environment/index.d.ts.map +1 -0
  48. package/dist/environment/index.js +71 -0
  49. package/dist/environment/logger.d.ts +6 -0
  50. package/dist/environment/logger.d.ts.map +1 -0
  51. package/dist/environment/logger.js +25 -0
  52. package/dist/environment/manage-users.d.ts +11 -0
  53. package/dist/environment/manage-users.d.ts.map +1 -0
  54. package/dist/environment/manage-users.js +507 -0
  55. package/dist/environment/questions-helper.d.ts +15 -0
  56. package/dist/environment/questions-helper.d.ts.map +1 -0
  57. package/dist/environment/questions-helper.js +70 -0
  58. package/dist/environment/questions.d.ts +199 -0
  59. package/dist/environment/questions.d.ts.map +1 -0
  60. package/dist/environment/questions.js +412 -0
  61. package/dist/environment/setup-environment.d.ts +2 -0
  62. package/dist/environment/setup-environment.d.ts.map +1 -0
  63. package/dist/environment/setup-environment.js +794 -0
  64. package/dist/environment/ssh-keygen.d.ts +5 -0
  65. package/dist/environment/ssh-keygen.d.ts.map +1 -0
  66. package/dist/environment/ssh-keygen.js +21 -0
  67. package/dist/environment/swarm-to-k8s.d.ts +2 -0
  68. package/dist/environment/swarm-to-k8s.d.ts.map +1 -0
  69. package/dist/environment/swarm-to-k8s.js +183 -0
  70. package/dist/environment/templates.d.ts +27 -0
  71. package/dist/environment/templates.d.ts.map +1 -0
  72. package/dist/environment/templates.js +163 -0
  73. package/dist/environment/update-workflows.d.ts +2 -0
  74. package/dist/environment/update-workflows.d.ts.map +1 -0
  75. package/dist/environment/update-workflows.js +179 -0
  76. package/dist/environment/users.d.ts +2 -0
  77. package/dist/environment/users.d.ts.map +1 -0
  78. package/dist/environment/users.js +122 -0
  79. package/dist/environment/utils.d.ts +18 -0
  80. package/dist/environment/utils.d.ts.map +1 -0
  81. package/dist/environment/utils.js +110 -0
  82. package/dist/events/index.js +441 -147
  83. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +1 -1
  84. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  85. package/dist/migrations/v2.0/checkout-upstream-files.js +1 -1
  86. package/dist/migrations/v2.0/convert-config-files-to-ts.js +17 -7
  87. package/dist/migrations/v2.0/index.js +20 -9
  88. package/dist/migrations/v2.0/remove-hearth-migrations.js +17 -7
  89. package/dist/notification/index.js +265 -45
  90. package/dist/scopes/index.d.ts +93 -7
  91. package/dist/scopes/index.js +19 -8
  92. package/dist/templates/charts-values/dependencies/values.override.yaml +4 -0
  93. package/dist/templates/charts-values/dependencies/values.yaml +83 -0
  94. package/dist/templates/charts-values/opencrvs-services/values.override.yaml +4 -0
  95. package/dist/templates/charts-values/opencrvs-services/values.yaml +81 -0
  96. package/dist/templates/charts-values/traefik/values.override.yaml +4 -0
  97. package/dist/templates/charts-values/traefik/values.yaml +115 -0
  98. package/dist/templates/inventory/inventory.template.yml +100 -0
  99. package/dist/templates/inventory/production.example.yml +77 -0
  100. package/dist/templates/inventory/qa.example.yml +48 -0
  101. package/opencrvs-toolkit-2.0.0-rc.5ba2797.tgz +0 -0
  102. package/package.json +16 -2
  103. package/tsconfig.tsbuildinfo +1 -1
  104. package/opencrvs-toolkit-2.0.0-rc.5b847e3.tgz +0 -0
@@ -12,6 +12,54 @@ import { ActionType } from '../events/ActionType';
12
12
  import { EventConfig } from '../events/EventConfig';
13
13
  import { EventDocument } from '../events/EventDocument';
14
14
  import { EventIndex } from '../events/EventIndex';
15
+ import { Location } from '../events/locations';
16
+ import { SystemVariables } from '../events/TemplateConfig';
17
+ /** Returns today's date as an ISO date string (YYYY-MM-DD). */
18
+ export declare function todayISO(): string;
19
+ /**
20
+ * Context passed to every serialised client-side function ({@link runClientFunction}).
21
+ *
22
+ * `$user` (full {@link ITokenPayload}, validator paths) and `user` (a
23
+ * {@link SystemVariables} subset for template substitution, default-value
24
+ * path) are distinct sources, not duplicates.
25
+ */
26
+ export type ClientFunctionContext = {
27
+ $form: EventState | ActionUpdate;
28
+ $now: string;
29
+ $online: boolean;
30
+ $user?: ITokenPayload;
31
+ $event?: EventDocument;
32
+ $leafAdminStructureLocationIds: Array<{
33
+ id: UUID;
34
+ }>;
35
+ user?: SystemVariables['user'];
36
+ $window?: SystemVariables['$window'];
37
+ locations?: Location[];
38
+ adminLevelIds?: string[];
39
+ $flags?: string[];
40
+ $status?: string;
41
+ };
42
+ type CompiledClientFunction = (data: FieldValue | undefined, context: ClientFunctionContext) => unknown;
43
+ /**
44
+ * Deserialises a serialised function string (produced by `.toString()`) into a callable.
45
+ * Results are cached by code string so each unique function body is compiled at most once.
46
+ * Runs in a clean scope — no access to outer closures or external imports.
47
+ */
48
+ export declare function compileClientFunction(code: string): CompiledClientFunction;
49
+ export declare function buildClientFunctionContext(input: {
50
+ form: EventState | ActionUpdate;
51
+ validatorContext?: ValidatorContext;
52
+ systemVariables?: SystemVariables;
53
+ /**
54
+ * In real use cases, there can be hundreds of thousands of locations.
55
+ * Make sure that the context contains only the locations that are needed for validation.
56
+ * E.g. if the user is a leaf admin, only the leaf locations under their admin structure are needed.
57
+ * Loading few megabytes of locations to memory just for validation is not efficient and will choke the application.
58
+ */
59
+ locations?: Location[];
60
+ adminLevelIds?: string[];
61
+ }): ClientFunctionContext;
62
+ export declare function runClientFunction(code: string, data: FieldValue | undefined, context: ClientFunctionContext): unknown;
15
63
  /**
16
64
  * Precompiles action conditional schemas from the event configurations to improve performance of condition validation later on.
17
65
  * Best called once on application startup before any condition validation is done.
@@ -20,8 +68,8 @@ export declare function precompileActionSchemas(eventConfigurations: EventConfig
20
68
  export declare function validate(schema: JSONSchema, data: ConditionalParameters): boolean;
21
69
  export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
22
70
  export declare function isOnline(): boolean;
23
- export declare function isConditionMet(conditional: JSONSchema, values: EventState | ActionUpdate, context: ValidatorContext, eventIndex?: EventIndex): boolean;
24
- export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext, event: EventIndex): boolean;
71
+ export declare function isConditionMet(conditional: JSONSchema, values: EventState | ActionUpdate, context: ValidatorContext): boolean;
72
+ export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext, _event: EventIndex): boolean;
25
73
  export type ValidatorContext = {
26
74
  user?: ITokenPayload;
27
75
  leafAdminStructureLocationIds?: Array<{
@@ -113,4 +161,5 @@ export declare function runFieldValidations({ field: config, form, value, contex
113
161
  }>>;
114
162
  export declare function getValidatorsForField(fieldId: FieldConfig['id'], validations: NonNullable<FieldConfig['validation']>): NonNullable<FieldConfig['validation']>;
115
163
  export declare function areCertificateConditionsMet(conditions: FieldConditional[], values: ConditionalParameters): boolean;
164
+ export {};
116
165
  //# sourceMappingURL=validate.d.ts.map
@@ -85,6 +85,32 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
85
85
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
86
86
  }, z.core.$strip>;
87
87
  conditionals: z.ZodOptional<z.ZodNever>;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
90
+ flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
91
+ id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
92
+ readonly INCOMPLETE: "incomplete";
93
+ readonly REJECTED: "rejected";
94
+ readonly CORRECTION_REQUESTED: "correction-requested";
95
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
96
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
97
+ }>]>, z.ZodString]>;
98
+ operation: z.ZodEnum<{
99
+ add: "add";
100
+ remove: "remove";
101
+ }>;
102
+ conditional: z.ZodOptional<z.ZodAny>;
103
+ }, z.core.$strip>>>>;
104
+ supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
105
+ icon: z.ZodOptional<z.ZodString>;
106
+ conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
107
+ type: z.ZodLiteral<"SHOW">;
108
+ conditional: z.ZodAny;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ type: z.ZodLiteral<"ENABLE">;
111
+ conditional: z.ZodAny;
112
+ }, z.core.$strip>], "type">>>;
113
+ type: z.ZodLiteral<"NOTIFY">;
88
114
  }, z.core.$strip>, z.ZodObject<{
89
115
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
90
116
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -388,8 +414,8 @@ export declare const actionConfigTypes: Set<ActionConfigTypes>;
388
414
  *
389
415
  * These are not the same as the broader workflow `action.type` values.
390
416
  * `ActionConfigTypes` includes only the action kinds that can be defined
391
- * in the country configuration (e.g. DECLARE, VALIDATE, CUSTOM), and
392
- * excludes workflow-only types such as CREATE or NOTIFY.
417
+ * in the country configuration (e.g. NOTIFY, DECLARE, VALIDATE, CUSTOM), and
418
+ * excludes workflow-only types such as CREATE.
393
419
  */
394
420
  export type ActionConfigTypes = ActionConfig['type'];
395
421
  export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -517,6 +517,9 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
517
517
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
518
518
  type: z.ZodLiteral<"APPROVE_CORRECTION">;
519
519
  requestId: z.ZodString;
520
+ content: z.ZodOptional<z.ZodObject<{
521
+ immediateCorrection: z.ZodOptional<z.ZodBoolean>;
522
+ }, z.core.$strip>>;
520
523
  }, z.core.$strip>, z.ZodObject<{
521
524
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
522
525
  transactionId: z.ZodString;
@@ -955,6 +958,9 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
955
958
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
956
959
  type: z.ZodLiteral<"APPROVE_CORRECTION">;
957
960
  requestId: z.ZodString;
961
+ content: z.ZodOptional<z.ZodObject<{
962
+ immediateCorrection: z.ZodOptional<z.ZodBoolean>;
963
+ }, z.core.$strip>>;
958
964
  }, z.core.$strip>, z.ZodObject<{
959
965
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
960
966
  transactionId: z.ZodString;
@@ -246,6 +246,9 @@ export declare const ApproveCorrectionActionInput: z.ZodObject<{
246
246
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
247
247
  requestId: z.ZodString;
248
248
  type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
249
+ content: z.ZodOptional<z.ZodObject<{
250
+ immediateCorrection: z.ZodOptional<z.ZodBoolean>;
251
+ }, z.core.$strip>>;
249
252
  }, z.core.$strip>;
250
253
  export type ApproveCorrectionActionInput = z.infer<typeof ApproveCorrectionActionInput>;
251
254
  export declare const ReadActionInput: z.ZodObject<{
@@ -495,6 +498,9 @@ export declare const ActionInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
495
498
  createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
496
499
  requestId: z.ZodString;
497
500
  type: z.ZodDefault<z.ZodLiteral<"APPROVE_CORRECTION">>;
501
+ content: z.ZodOptional<z.ZodObject<{
502
+ immediateCorrection: z.ZodOptional<z.ZodBoolean>;
503
+ }, z.core.$strip>>;
498
504
  }, z.core.$strip>, z.ZodObject<{
499
505
  eventId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
500
506
  transactionId: z.ZodString;
@@ -91,6 +91,65 @@ export declare const FieldConfigSchema: z.ZodObject<{
91
91
  validator: z.ZodAny;
92
92
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
93
93
  }, z.core.$strip>>>;
94
+ allowedLocations: z.ZodOptional<z.ZodObject<{
95
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
96
+ administrativeArea: "administrativeArea";
97
+ location: "location";
98
+ all: "all";
99
+ }>, z.ZodObject<{
100
+ $scope: z.ZodEnum<{
101
+ "record.search": "record.search";
102
+ "record.create": "record.create";
103
+ "record.read": "record.read";
104
+ "record.declare": "record.declare";
105
+ "record.notify": "record.notify";
106
+ "record.edit": "record.edit";
107
+ "record.reject": "record.reject";
108
+ "record.archive": "record.archive";
109
+ "record.review-duplicates": "record.review-duplicates";
110
+ "record.register": "record.register";
111
+ "record.print-certified-copies": "record.print-certified-copies";
112
+ "record.request-correction": "record.request-correction";
113
+ "record.correct": "record.correct";
114
+ "record.unassign-others": "record.unassign-others";
115
+ "record.custom-action": "record.custom-action";
116
+ bypassratelimit: "bypassratelimit";
117
+ "record.reindex": "record.reindex";
118
+ "user.data-seeding": "user.data-seeding";
119
+ "integration.create": "integration.create";
120
+ "record.import": "record.import";
121
+ "config.update-all": "config.update-all";
122
+ "attachment.upload": "attachment.upload";
123
+ "profile.electronic-signature": "profile.electronic-signature";
124
+ "user.read-only-my-audit": "user.read-only-my-audit";
125
+ "performance.read": "performance.read";
126
+ "performance.read-dashboards": "performance.read-dashboards";
127
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
128
+ "record.confirm-registration": "record.confirm-registration";
129
+ "record.reject-registration": "record.reject-registration";
130
+ "organisation.read-locations": "organisation.read-locations";
131
+ "user.read": "user.read";
132
+ "user.create": "user.create";
133
+ "user.edit": "user.edit";
134
+ "user.search": "user.search";
135
+ workqueue: "workqueue";
136
+ "dashboard.view": "dashboard.view";
137
+ }>;
138
+ $option: z.ZodEnum<{
139
+ role: "role";
140
+ event: "event";
141
+ placeOfEvent: "placeOfEvent";
142
+ notifiedIn: "notifiedIn";
143
+ notifiedBy: "notifiedBy";
144
+ declaredIn: "declaredIn";
145
+ declaredBy: "declaredBy";
146
+ registeredIn: "registeredIn";
147
+ registeredBy: "registeredBy";
148
+ accessLevel: "accessLevel";
149
+ ids: "ids";
150
+ }>;
151
+ }, z.core.$strip>]>;
152
+ }, z.core.$strip>>;
94
153
  fieldId: z.ZodString;
95
154
  fieldType: z.ZodLiteral<"field">;
96
155
  }, z.core.$strip>;
@@ -211,6 +270,65 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
211
270
  validator: z.ZodAny;
212
271
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
213
272
  }, z.core.$strip>>>;
273
+ allowedLocations: z.ZodOptional<z.ZodObject<{
274
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
275
+ administrativeArea: "administrativeArea";
276
+ location: "location";
277
+ all: "all";
278
+ }>, z.ZodObject<{
279
+ $scope: z.ZodEnum<{
280
+ "record.search": "record.search";
281
+ "record.create": "record.create";
282
+ "record.read": "record.read";
283
+ "record.declare": "record.declare";
284
+ "record.notify": "record.notify";
285
+ "record.edit": "record.edit";
286
+ "record.reject": "record.reject";
287
+ "record.archive": "record.archive";
288
+ "record.review-duplicates": "record.review-duplicates";
289
+ "record.register": "record.register";
290
+ "record.print-certified-copies": "record.print-certified-copies";
291
+ "record.request-correction": "record.request-correction";
292
+ "record.correct": "record.correct";
293
+ "record.unassign-others": "record.unassign-others";
294
+ "record.custom-action": "record.custom-action";
295
+ bypassratelimit: "bypassratelimit";
296
+ "record.reindex": "record.reindex";
297
+ "user.data-seeding": "user.data-seeding";
298
+ "integration.create": "integration.create";
299
+ "record.import": "record.import";
300
+ "config.update-all": "config.update-all";
301
+ "attachment.upload": "attachment.upload";
302
+ "profile.electronic-signature": "profile.electronic-signature";
303
+ "user.read-only-my-audit": "user.read-only-my-audit";
304
+ "performance.read": "performance.read";
305
+ "performance.read-dashboards": "performance.read-dashboards";
306
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
307
+ "record.confirm-registration": "record.confirm-registration";
308
+ "record.reject-registration": "record.reject-registration";
309
+ "organisation.read-locations": "organisation.read-locations";
310
+ "user.read": "user.read";
311
+ "user.create": "user.create";
312
+ "user.edit": "user.edit";
313
+ "user.search": "user.search";
314
+ workqueue: "workqueue";
315
+ "dashboard.view": "dashboard.view";
316
+ }>;
317
+ $option: z.ZodEnum<{
318
+ role: "role";
319
+ event: "event";
320
+ placeOfEvent: "placeOfEvent";
321
+ notifiedIn: "notifiedIn";
322
+ notifiedBy: "notifiedBy";
323
+ declaredIn: "declaredIn";
324
+ declaredBy: "declaredBy";
325
+ registeredIn: "registeredIn";
326
+ registeredBy: "registeredBy";
327
+ accessLevel: "accessLevel";
328
+ ids: "ids";
329
+ }>;
330
+ }, z.core.$strip>]>;
331
+ }, z.core.$strip>>;
214
332
  fieldId: z.ZodEnum<{
215
333
  "event.updatedAt": "event.updatedAt";
216
334
  "event.status": "event.status";
@@ -307,6 +425,65 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
307
425
  validator: z.ZodAny;
308
426
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
309
427
  }, z.core.$strip>>>;
428
+ allowedLocations: z.ZodOptional<z.ZodObject<{
429
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
430
+ administrativeArea: "administrativeArea";
431
+ location: "location";
432
+ all: "all";
433
+ }>, z.ZodObject<{
434
+ $scope: z.ZodEnum<{
435
+ "record.search": "record.search";
436
+ "record.create": "record.create";
437
+ "record.read": "record.read";
438
+ "record.declare": "record.declare";
439
+ "record.notify": "record.notify";
440
+ "record.edit": "record.edit";
441
+ "record.reject": "record.reject";
442
+ "record.archive": "record.archive";
443
+ "record.review-duplicates": "record.review-duplicates";
444
+ "record.register": "record.register";
445
+ "record.print-certified-copies": "record.print-certified-copies";
446
+ "record.request-correction": "record.request-correction";
447
+ "record.correct": "record.correct";
448
+ "record.unassign-others": "record.unassign-others";
449
+ "record.custom-action": "record.custom-action";
450
+ bypassratelimit: "bypassratelimit";
451
+ "record.reindex": "record.reindex";
452
+ "user.data-seeding": "user.data-seeding";
453
+ "integration.create": "integration.create";
454
+ "record.import": "record.import";
455
+ "config.update-all": "config.update-all";
456
+ "attachment.upload": "attachment.upload";
457
+ "profile.electronic-signature": "profile.electronic-signature";
458
+ "user.read-only-my-audit": "user.read-only-my-audit";
459
+ "performance.read": "performance.read";
460
+ "performance.read-dashboards": "performance.read-dashboards";
461
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
462
+ "record.confirm-registration": "record.confirm-registration";
463
+ "record.reject-registration": "record.reject-registration";
464
+ "organisation.read-locations": "organisation.read-locations";
465
+ "user.read": "user.read";
466
+ "user.create": "user.create";
467
+ "user.edit": "user.edit";
468
+ "user.search": "user.search";
469
+ workqueue: "workqueue";
470
+ "dashboard.view": "dashboard.view";
471
+ }>;
472
+ $option: z.ZodEnum<{
473
+ role: "role";
474
+ event: "event";
475
+ placeOfEvent: "placeOfEvent";
476
+ notifiedIn: "notifiedIn";
477
+ notifiedBy: "notifiedBy";
478
+ declaredIn: "declaredIn";
479
+ declaredBy: "declaredBy";
480
+ registeredIn: "registeredIn";
481
+ registeredBy: "registeredBy";
482
+ accessLevel: "accessLevel";
483
+ ids: "ids";
484
+ }>;
485
+ }, z.core.$strip>]>;
486
+ }, z.core.$strip>>;
310
487
  fieldId: z.ZodString;
311
488
  fieldType: z.ZodLiteral<"field">;
312
489
  }, z.core.$strip>, z.ZodObject<{
@@ -395,6 +572,65 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
395
572
  validator: z.ZodAny;
396
573
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
397
574
  }, z.core.$strip>>>;
575
+ allowedLocations: z.ZodOptional<z.ZodObject<{
576
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
577
+ administrativeArea: "administrativeArea";
578
+ location: "location";
579
+ all: "all";
580
+ }>, z.ZodObject<{
581
+ $scope: z.ZodEnum<{
582
+ "record.search": "record.search";
583
+ "record.create": "record.create";
584
+ "record.read": "record.read";
585
+ "record.declare": "record.declare";
586
+ "record.notify": "record.notify";
587
+ "record.edit": "record.edit";
588
+ "record.reject": "record.reject";
589
+ "record.archive": "record.archive";
590
+ "record.review-duplicates": "record.review-duplicates";
591
+ "record.register": "record.register";
592
+ "record.print-certified-copies": "record.print-certified-copies";
593
+ "record.request-correction": "record.request-correction";
594
+ "record.correct": "record.correct";
595
+ "record.unassign-others": "record.unassign-others";
596
+ "record.custom-action": "record.custom-action";
597
+ bypassratelimit: "bypassratelimit";
598
+ "record.reindex": "record.reindex";
599
+ "user.data-seeding": "user.data-seeding";
600
+ "integration.create": "integration.create";
601
+ "record.import": "record.import";
602
+ "config.update-all": "config.update-all";
603
+ "attachment.upload": "attachment.upload";
604
+ "profile.electronic-signature": "profile.electronic-signature";
605
+ "user.read-only-my-audit": "user.read-only-my-audit";
606
+ "performance.read": "performance.read";
607
+ "performance.read-dashboards": "performance.read-dashboards";
608
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
609
+ "record.confirm-registration": "record.confirm-registration";
610
+ "record.reject-registration": "record.reject-registration";
611
+ "organisation.read-locations": "organisation.read-locations";
612
+ "user.read": "user.read";
613
+ "user.create": "user.create";
614
+ "user.edit": "user.edit";
615
+ "user.search": "user.search";
616
+ workqueue: "workqueue";
617
+ "dashboard.view": "dashboard.view";
618
+ }>;
619
+ $option: z.ZodEnum<{
620
+ role: "role";
621
+ event: "event";
622
+ placeOfEvent: "placeOfEvent";
623
+ notifiedIn: "notifiedIn";
624
+ notifiedBy: "notifiedBy";
625
+ declaredIn: "declaredIn";
626
+ declaredBy: "declaredBy";
627
+ registeredIn: "registeredIn";
628
+ registeredBy: "registeredBy";
629
+ accessLevel: "accessLevel";
630
+ ids: "ids";
631
+ }>;
632
+ }, z.core.$strip>]>;
633
+ }, z.core.$strip>>;
398
634
  fieldId: z.ZodEnum<{
399
635
  "event.updatedAt": "event.updatedAt";
400
636
  "event.status": "event.status";
@@ -494,6 +730,65 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
494
730
  validator: z.ZodAny;
495
731
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
496
732
  }, z.core.$strip>>>;
733
+ allowedLocations: z.ZodOptional<z.ZodObject<{
734
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
735
+ administrativeArea: "administrativeArea";
736
+ location: "location";
737
+ all: "all";
738
+ }>, z.ZodObject<{
739
+ $scope: z.ZodEnum<{
740
+ "record.search": "record.search";
741
+ "record.create": "record.create";
742
+ "record.read": "record.read";
743
+ "record.declare": "record.declare";
744
+ "record.notify": "record.notify";
745
+ "record.edit": "record.edit";
746
+ "record.reject": "record.reject";
747
+ "record.archive": "record.archive";
748
+ "record.review-duplicates": "record.review-duplicates";
749
+ "record.register": "record.register";
750
+ "record.print-certified-copies": "record.print-certified-copies";
751
+ "record.request-correction": "record.request-correction";
752
+ "record.correct": "record.correct";
753
+ "record.unassign-others": "record.unassign-others";
754
+ "record.custom-action": "record.custom-action";
755
+ bypassratelimit: "bypassratelimit";
756
+ "record.reindex": "record.reindex";
757
+ "user.data-seeding": "user.data-seeding";
758
+ "integration.create": "integration.create";
759
+ "record.import": "record.import";
760
+ "config.update-all": "config.update-all";
761
+ "attachment.upload": "attachment.upload";
762
+ "profile.electronic-signature": "profile.electronic-signature";
763
+ "user.read-only-my-audit": "user.read-only-my-audit";
764
+ "performance.read": "performance.read";
765
+ "performance.read-dashboards": "performance.read-dashboards";
766
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
767
+ "record.confirm-registration": "record.confirm-registration";
768
+ "record.reject-registration": "record.reject-registration";
769
+ "organisation.read-locations": "organisation.read-locations";
770
+ "user.read": "user.read";
771
+ "user.create": "user.create";
772
+ "user.edit": "user.edit";
773
+ "user.search": "user.search";
774
+ workqueue: "workqueue";
775
+ "dashboard.view": "dashboard.view";
776
+ }>;
777
+ $option: z.ZodEnum<{
778
+ role: "role";
779
+ event: "event";
780
+ placeOfEvent: "placeOfEvent";
781
+ notifiedIn: "notifiedIn";
782
+ notifiedBy: "notifiedBy";
783
+ declaredIn: "declaredIn";
784
+ declaredBy: "declaredBy";
785
+ registeredIn: "registeredIn";
786
+ registeredBy: "registeredBy";
787
+ accessLevel: "accessLevel";
788
+ ids: "ids";
789
+ }>;
790
+ }, z.core.$strip>]>;
791
+ }, z.core.$strip>>;
497
792
  fieldId: z.ZodString;
498
793
  fieldType: z.ZodLiteral<"field">;
499
794
  }, z.core.$strip>, z.ZodObject<{
@@ -582,6 +877,65 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
582
877
  validator: z.ZodAny;
583
878
  message: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
584
879
  }, z.core.$strip>>>;
880
+ allowedLocations: z.ZodOptional<z.ZodObject<{
881
+ $jurisdiction: z.ZodUnion<[z.ZodEnum<{
882
+ administrativeArea: "administrativeArea";
883
+ location: "location";
884
+ all: "all";
885
+ }>, z.ZodObject<{
886
+ $scope: z.ZodEnum<{
887
+ "record.search": "record.search";
888
+ "record.create": "record.create";
889
+ "record.read": "record.read";
890
+ "record.declare": "record.declare";
891
+ "record.notify": "record.notify";
892
+ "record.edit": "record.edit";
893
+ "record.reject": "record.reject";
894
+ "record.archive": "record.archive";
895
+ "record.review-duplicates": "record.review-duplicates";
896
+ "record.register": "record.register";
897
+ "record.print-certified-copies": "record.print-certified-copies";
898
+ "record.request-correction": "record.request-correction";
899
+ "record.correct": "record.correct";
900
+ "record.unassign-others": "record.unassign-others";
901
+ "record.custom-action": "record.custom-action";
902
+ bypassratelimit: "bypassratelimit";
903
+ "record.reindex": "record.reindex";
904
+ "user.data-seeding": "user.data-seeding";
905
+ "integration.create": "integration.create";
906
+ "record.import": "record.import";
907
+ "config.update-all": "config.update-all";
908
+ "attachment.upload": "attachment.upload";
909
+ "profile.electronic-signature": "profile.electronic-signature";
910
+ "user.read-only-my-audit": "user.read-only-my-audit";
911
+ "performance.read": "performance.read";
912
+ "performance.read-dashboards": "performance.read-dashboards";
913
+ "performance.vital-statistics-export": "performance.vital-statistics-export";
914
+ "record.confirm-registration": "record.confirm-registration";
915
+ "record.reject-registration": "record.reject-registration";
916
+ "organisation.read-locations": "organisation.read-locations";
917
+ "user.read": "user.read";
918
+ "user.create": "user.create";
919
+ "user.edit": "user.edit";
920
+ "user.search": "user.search";
921
+ workqueue: "workqueue";
922
+ "dashboard.view": "dashboard.view";
923
+ }>;
924
+ $option: z.ZodEnum<{
925
+ role: "role";
926
+ event: "event";
927
+ placeOfEvent: "placeOfEvent";
928
+ notifiedIn: "notifiedIn";
929
+ notifiedBy: "notifiedBy";
930
+ declaredIn: "declaredIn";
931
+ declaredBy: "declaredBy";
932
+ registeredIn: "registeredIn";
933
+ registeredBy: "registeredBy";
934
+ accessLevel: "accessLevel";
935
+ ids: "ids";
936
+ }>;
937
+ }, z.core.$strip>]>;
938
+ }, z.core.$strip>>;
585
939
  fieldId: z.ZodEnum<{
586
940
  "event.updatedAt": "event.updatedAt";
587
941
  "event.status": "event.status";
@@ -346,6 +346,13 @@ export declare const SerializedQueryExpression: z.ZodObject<{
346
346
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
347
347
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
348
348
  }>]>, z.ZodString]>>>;
349
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
350
+ readonly INCOMPLETE: "incomplete";
351
+ readonly REJECTED: "rejected";
352
+ readonly CORRECTION_REQUESTED: "correction-requested";
353
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
354
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
355
+ }>]>, z.ZodString]>>>;
349
356
  }, z.core.$strip>>>;
350
357
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
351
358
  }, z.core.$strip>;
@@ -657,6 +664,13 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
657
664
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
658
665
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
659
666
  }>]>, z.ZodString]>>>;
667
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
668
+ readonly INCOMPLETE: "incomplete";
669
+ readonly REJECTED: "rejected";
670
+ readonly CORRECTION_REQUESTED: "correction-requested";
671
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
672
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
673
+ }>]>, z.ZodString]>>>;
660
674
  }, z.core.$strip>>>;
661
675
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
662
676
  }, z.core.$strip>>;
@@ -967,6 +981,13 @@ export declare const CountryConfigQueryType: z.ZodDiscriminatedUnion<[z.ZodObjec
967
981
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
968
982
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
969
983
  }>]>, z.ZodString]>>>;
984
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
985
+ readonly INCOMPLETE: "incomplete";
986
+ readonly REJECTED: "rejected";
987
+ readonly CORRECTION_REQUESTED: "correction-requested";
988
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
989
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
990
+ }>]>, z.ZodString]>>>;
970
991
  }, z.core.$strip>>>;
971
992
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
972
993
  }, z.core.$strip>>;
@@ -1277,6 +1298,13 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1277
1298
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1278
1299
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1279
1300
  }>]>, z.ZodString]>>>;
1301
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1302
+ readonly INCOMPLETE: "incomplete";
1303
+ readonly REJECTED: "rejected";
1304
+ readonly CORRECTION_REQUESTED: "correction-requested";
1305
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1306
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1307
+ }>]>, z.ZodString]>>>;
1280
1308
  }, z.core.$strip>>>;
1281
1309
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1282
1310
  }, z.core.$strip>, z.ZodObject<{
@@ -1586,6 +1614,13 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1586
1614
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1587
1615
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1588
1616
  }>]>, z.ZodString]>>>;
1617
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1618
+ readonly INCOMPLETE: "incomplete";
1619
+ readonly REJECTED: "rejected";
1620
+ readonly CORRECTION_REQUESTED: "correction-requested";
1621
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1622
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1623
+ }>]>, z.ZodString]>>>;
1589
1624
  }, z.core.$strip>>>;
1590
1625
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1591
1626
  }, z.core.$strip>>;
@@ -1896,6 +1931,13 @@ export declare const CountryConfigQueryInputType: z.ZodUnion<readonly [z.ZodObje
1896
1931
  readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1897
1932
  readonly EDIT_IN_PROGRESS: "edit-in-progress";
1898
1933
  }>]>, z.ZodString]>>>;
1934
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
1935
+ readonly INCOMPLETE: "incomplete";
1936
+ readonly REJECTED: "rejected";
1937
+ readonly CORRECTION_REQUESTED: "correction-requested";
1938
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
1939
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
1940
+ }>]>, z.ZodString]>>>;
1899
1941
  }, z.core.$strip>>>;
1900
1942
  data: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
1901
1943
  }, z.core.$strip>>;
@@ -10,6 +10,8 @@ export declare const EventFieldReference: z.ZodObject<{
10
10
  $$event: z.ZodEnum<{
11
11
  updatedAt: "updatedAt";
12
12
  createdAt: "createdAt";
13
+ "legalStatuses.NOTIFIED.createdAt": "legalStatuses.NOTIFIED.createdAt";
14
+ "legalStatuses.NOTIFIED.acceptedAt": "legalStatuses.NOTIFIED.acceptedAt";
13
15
  "legalStatuses.DECLARED.createdAt": "legalStatuses.DECLARED.createdAt";
14
16
  "legalStatuses.DECLARED.acceptedAt": "legalStatuses.DECLARED.acceptedAt";
15
17
  "legalStatuses.REGISTERED.createdAt": "legalStatuses.REGISTERED.createdAt";