@opencrvs/toolkit 2.1.0-rc.ffe0b7f → 2.2.0-rc.9042a13

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 (250) hide show
  1. package/README.md +2 -12
  2. package/build.sh +23 -5
  3. package/create-countryconfig/index.js +441 -59
  4. package/create-countryconfig/node_modules/.bin/degit +21 -0
  5. package/create-countryconfig/package.json +5 -2
  6. package/dist/application-config/index.js +391 -286
  7. package/dist/authentication/index.d.ts +66 -0
  8. package/dist/authentication/index.d.ts.map +1 -0
  9. package/dist/authentication/index.js +778 -0
  10. package/dist/cli.js +2041 -1311
  11. package/dist/commons/api/router.d.ts +2359 -485
  12. package/dist/commons/application-config/index.d.ts +0 -2
  13. package/dist/commons/conditionals/conditionals.d.ts +6 -6
  14. package/dist/commons/conditionals/validate.d.ts +34 -8
  15. package/dist/commons/events/ActionConfig.d.ts +131 -7
  16. package/dist/commons/events/ActionDocument.d.ts +123 -15
  17. package/dist/commons/events/ActionInput.d.ts +56 -4
  18. package/dist/commons/events/ActionStatus.d.ts +14 -0
  19. package/dist/commons/events/ActionType.d.ts +11 -1
  20. package/dist/commons/events/AdvancedSearchConfig.d.ts +60 -12
  21. package/dist/commons/events/AuditLog.d.ts +152 -0
  22. package/dist/commons/events/CountryConfigQueryInput.d.ts +132 -0
  23. package/dist/commons/events/Draft.d.ts +3 -21
  24. package/dist/commons/events/EventConfig.d.ts +29 -6
  25. package/dist/commons/events/EventDocument.d.ts +560 -4
  26. package/dist/commons/events/EventIndex.d.ts +23 -26
  27. package/dist/commons/events/EventMetadata.d.ts +24 -11
  28. package/dist/commons/events/EventStatus.d.ts +20 -0
  29. package/dist/commons/events/FieldConfig.d.ts +119 -63
  30. package/dist/commons/events/FieldTypeMapping.d.ts +17 -17
  31. package/dist/commons/events/FieldValue.d.ts +3 -2
  32. package/dist/commons/events/Flag.d.ts +42 -0
  33. package/dist/commons/events/FormConfig.d.ts +6 -0
  34. package/dist/commons/events/PageConfig.d.ts +4 -0
  35. package/dist/commons/events/PlainDate.d.ts +8 -0
  36. package/dist/commons/events/SummaryConfig.d.ts +249 -0
  37. package/dist/commons/events/WorkqueueConfig.d.ts +167 -20
  38. package/dist/commons/events/event.d.ts +12 -0
  39. package/dist/commons/events/eventConfigValidation.d.ts +17 -1
  40. package/dist/commons/events/index.d.ts +1 -0
  41. package/dist/commons/events/locationPayloads.d.ts +95 -0
  42. package/dist/commons/events/locations.d.ts +169 -26
  43. package/dist/commons/events/mocks.test.utils.d.ts +30 -0
  44. package/dist/commons/events/scopes.d.ts +23 -1
  45. package/dist/commons/events/state/index.d.ts +10 -2
  46. package/dist/commons/events/state/utils.d.ts +11 -1
  47. package/dist/commons/events/test.utils.d.ts +106 -26
  48. package/dist/commons/events/utils.d.ts +81 -18
  49. package/dist/commons/notification/UserNotifications.d.ts +28 -13
  50. package/dist/commons/notification/dispatch.d.ts +10 -0
  51. package/dist/commons/notification/index.d.ts +1 -0
  52. package/dist/conditionals/index.js +362 -65
  53. package/dist/csv.d.ts +25 -0
  54. package/dist/csv.d.ts.map +1 -0
  55. package/dist/csv.js +120 -0
  56. package/dist/environment/derived-variables.d.ts +18 -0
  57. package/dist/environment/derived-variables.d.ts.map +1 -1
  58. package/dist/environment/derived-variables.js +22 -1
  59. package/dist/environment/index.d.ts.map +1 -1
  60. package/dist/environment/index.js +2 -1
  61. package/dist/environment/logger.d.ts +15 -3
  62. package/dist/environment/logger.d.ts.map +1 -1
  63. package/dist/environment/manage-users.js +1 -1
  64. package/dist/environment/questions.d.ts.map +1 -1
  65. package/dist/environment/questions.js +20 -14
  66. package/dist/environment/setup-environment.d.ts +1 -1
  67. package/dist/environment/setup-environment.d.ts.map +1 -1
  68. package/dist/environment/setup-environment.js +610 -560
  69. package/dist/environment/swarm-to-k8s.js +3 -4
  70. package/dist/environment/templates.d.ts +0 -1
  71. package/dist/environment/templates.d.ts.map +1 -1
  72. package/dist/environment/templates.js +3 -8
  73. package/dist/environment/update-workflows.d.ts.map +1 -1
  74. package/dist/environment/update-workflows.js +4 -0
  75. package/dist/environment/utils.d.ts +0 -12
  76. package/dist/environment/utils.d.ts.map +1 -1
  77. package/dist/environment/utils.js +1 -28
  78. package/dist/events/index.js +7909 -7056
  79. package/dist/migrations/add-translations.d.ts +15 -0
  80. package/dist/migrations/add-translations.d.ts.map +1 -0
  81. package/dist/migrations/add-translations.js +151 -0
  82. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts +3 -0
  83. package/dist/migrations/v2.1/add-recovery-link-notifications.d.ts.map +1 -0
  84. package/dist/migrations/v2.1/add-recovery-link-notifications.js +511 -0
  85. package/dist/migrations/{v2.0/rename-api-paths.d.ts → v2.1/enable-telemetry.d.ts} +1 -1
  86. package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -0
  87. package/dist/migrations/v2.1/enable-telemetry.js +455 -0
  88. package/dist/migrations/v2.1/index.d.ts.map +1 -1
  89. package/dist/migrations/v2.1/index.js +47 -215
  90. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +17 -0
  91. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +1 -0
  92. package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +348 -0
  93. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +2 -0
  94. package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +1 -0
  95. package/dist/migrations/v2.1/remove-metabase-package-installs.js +161 -0
  96. package/dist/migrations/{v2.0/migrate-scopes.d.ts → v2.1/remove-sentry.d.ts} +1 -1
  97. package/dist/migrations/v2.1/remove-sentry.d.ts.map +1 -0
  98. package/dist/migrations/v2.1/remove-sentry.js +354 -0
  99. package/dist/migrations/{v2.0/create-events-index.d.ts → v2.1/rename-trigger-paths.d.ts} +1 -1
  100. package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +1 -0
  101. package/dist/migrations/{v2.0/rename-api-paths.js → v2.1/rename-trigger-paths.js} +69 -40
  102. package/dist/migrations/v2.1/template-files.d.ts +8 -0
  103. package/dist/migrations/v2.1/template-files.d.ts.map +1 -0
  104. package/dist/migrations/v2.1/template-files.js +49 -0
  105. package/dist/migrations/v2.1/upgrade-tilt.d.ts +11 -0
  106. package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +1 -0
  107. package/dist/migrations/v2.1/upgrade-tilt.js +139 -0
  108. package/dist/migrations/v2.2/index.d.ts +6 -0
  109. package/dist/migrations/v2.2/index.d.ts.map +1 -0
  110. package/dist/migrations/v2.2/index.js +456 -0
  111. package/dist/migrations/v2.2/read-declaration-through-helper.d.ts +39 -0
  112. package/dist/migrations/v2.2/read-declaration-through-helper.d.ts.map +1 -0
  113. package/dist/migrations/v2.2/read-declaration-through-helper.js +257 -0
  114. package/dist/notification/index.js +2090 -1456
  115. package/dist/scopes/index.d.ts +637 -36
  116. package/dist/scopes/index.js +364 -65
  117. package/dist/telemetry/index.d.ts +45 -0
  118. package/dist/telemetry/index.d.ts.map +1 -0
  119. package/dist/telemetry/index.js +43 -0
  120. package/dist/templates/charts-values/dependencies/values.yaml +8 -0
  121. package/dist/templates/charts-values/opencrvs-services/values.yaml +10 -3
  122. package/dist/templates/charts-values/opentelemetry/values.yaml +102 -0
  123. package/dist/templates/charts-values/traefik/values.yaml +25 -12
  124. package/dist/templates/countryconfig-template/.tiltignore +1 -0
  125. package/dist/templates/countryconfig-template/Dockerfile.assets +7 -0
  126. package/dist/templates/countryconfig-template/Tiltfile +112 -0
  127. package/dist/templates/countryconfig-template/assets/README.md +1 -0
  128. package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +61 -0
  129. package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +455 -0
  130. package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +168 -0
  131. package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +67 -0
  132. package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +168 -0
  133. package/dist/templates/countryconfig-template/assets/metabase/README.md +34 -0
  134. package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +36 -0
  135. package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +46 -0
  136. package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +27737 -0
  137. package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +21 -0
  138. package/dist/templates/countryconfig-template/assets/metabase/package.json +13 -0
  139. package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +108 -0
  140. package/dist/templates/countryconfig-template/assets/metabase/run.sh +120 -0
  141. package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +40 -0
  142. package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +135 -0
  143. package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +108 -0
  144. package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +50 -0
  145. package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +35 -0
  146. package/dist/templates/countryconfig-template/tilt/common.tilt +145 -0
  147. package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +15 -0
  148. package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +56 -0
  149. package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +21 -0
  150. package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +38 -0
  151. package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +17 -0
  152. package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +16 -0
  153. package/dist/templates/countryconfig-template/tilt/lib.tilt +95 -0
  154. package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +136 -0
  155. package/dist/templates/inventory/inventory.template.yml +1 -3
  156. package/dist/translations/template.d.ts +11 -0
  157. package/dist/translations/template.d.ts.map +1 -0
  158. package/dist/translations/template.js +100 -0
  159. package/dist/verify/endpoints.d.ts +2 -0
  160. package/dist/verify/endpoints.d.ts.map +1 -0
  161. package/dist/verify/endpoints.js +510 -0
  162. package/opencrvs-toolkit-2.2.0-rc.9042a13.tgz +0 -0
  163. package/package.json +13 -7
  164. package/tsconfig.build.json +11 -0
  165. package/tsconfig.build.tsbuildinfo +1 -0
  166. package/tsconfig.json +3 -0
  167. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +0 -3
  168. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +0 -1
  169. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +0 -429
  170. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +0 -3
  171. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +0 -1
  172. package/dist/migrations/v2.0/add-resend-invite-notification.js +0 -373
  173. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -22
  174. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +0 -1
  175. package/dist/migrations/v2.0/checkout-upstream-files.js +0 -146
  176. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +0 -2
  177. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +0 -1
  178. package/dist/migrations/v2.0/convert-config-files-to-ts.js +0 -838
  179. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +0 -3
  180. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +0 -1
  181. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +0 -158
  182. package/dist/migrations/v2.0/create-events-index.d.ts.map +0 -1
  183. package/dist/migrations/v2.0/create-events-index.js +0 -325
  184. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +0 -11
  185. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
  186. package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -123
  187. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +0 -3
  188. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +0 -1
  189. package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +0 -110
  190. package/dist/migrations/v2.0/index.d.ts +0 -13
  191. package/dist/migrations/v2.0/index.d.ts.map +0 -1
  192. package/dist/migrations/v2.0/index.js +0 -103
  193. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +0 -3
  194. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +0 -1
  195. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +0 -432
  196. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -13
  197. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
  198. package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -222
  199. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +0 -3
  200. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +0 -1
  201. package/dist/migrations/v2.0/migrate-application-config-url.js +0 -343
  202. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +0 -1
  203. package/dist/migrations/v2.0/migrate-scopes.js +0 -305
  204. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +0 -3
  205. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +0 -1
  206. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +0 -267
  207. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +0 -3
  208. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +0 -1
  209. package/dist/migrations/v2.0/migrate-workqueue-configs.js +0 -317
  210. package/dist/migrations/v2.0/remove-delete-actions.d.ts +0 -3
  211. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +0 -1
  212. package/dist/migrations/v2.0/remove-delete-actions.js +0 -156
  213. package/dist/migrations/v2.0/remove-demo-scope.d.ts +0 -3
  214. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +0 -1
  215. package/dist/migrations/v2.0/remove-demo-scope.js +0 -74
  216. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +0 -3
  217. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +0 -1
  218. package/dist/migrations/v2.0/remove-deprecated-imports.js +0 -96
  219. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +0 -3
  220. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +0 -1
  221. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +0 -163
  222. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +0 -3
  223. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +0 -1
  224. package/dist/migrations/v2.0/remove-hearth-migrations.js +0 -87
  225. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +0 -3
  226. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +0 -1
  227. package/dist/migrations/v2.0/remove-old-statistics-service.js +0 -356
  228. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +0 -3
  229. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +0 -1
  230. package/dist/migrations/v2.0/remove-pending-certification-flag.js +0 -109
  231. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +0 -3
  232. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +0 -1
  233. package/dist/migrations/v2.0/remove-review-from-register-action.js +0 -163
  234. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +0 -3
  235. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +0 -1
  236. package/dist/migrations/v2.0/remove-unused-environment-variables.js +0 -186
  237. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +0 -1
  238. package/dist/migrations/v2.0/rename-location-parent-id.d.ts +0 -3
  239. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +0 -1
  240. package/dist/migrations/v2.0/rename-location-parent-id.js +0 -180
  241. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +0 -3
  242. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +0 -1
  243. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +0 -195
  244. package/dist/migrations/v2.0/update-package-json.d.ts +0 -3
  245. package/dist/migrations/v2.0/update-package-json.d.ts.map +0 -1
  246. package/dist/migrations/v2.0/update-package-json.js +0 -105
  247. package/dist/templates/inventory/production.example.yml +0 -77
  248. package/dist/templates/inventory/qa.example.yml +0 -48
  249. package/opencrvs-toolkit-2.1.0-rc.ffe0b7f.tgz +0 -0
  250. package/tsconfig.tsbuildinfo +0 -1
@@ -66,14 +66,12 @@ export declare const LoginConfig: z.ZodObject<{
66
66
  backgroundImage: z.ZodOptional<z.ZodString>;
67
67
  imageFit: z.ZodOptional<z.ZodString>;
68
68
  }, z.core.$strip>;
69
- SENTRY: z.ZodOptional<z.ZodString>;
70
69
  }, z.core.$strip>;
71
70
  export type LoginConfig = z.infer<typeof LoginConfig>;
72
71
  export declare const defineLoginConfig: (config: z.input<typeof LoginConfig>) => LoginConfig;
73
72
  export declare const ClientConfig: z.ZodObject<{
74
73
  COUNTRY: z.ZodString;
75
74
  LANGUAGES: z.ZodArray<z.ZodString>;
76
- SENTRY: z.ZodOptional<z.ZodString>;
77
75
  LOGIN_URL: z.ZodOptional<z.ZodString>;
78
76
  REGISTER_BACKGROUND: z.ZodObject<{
79
77
  backgroundColor: z.ZodOptional<z.ZodString>;
@@ -85,17 +85,17 @@ export declare const now: typeof todayDateTimeValueSerializer;
85
85
  export declare const user: typeof userSerializer & {
86
86
  scope: (scope: import("../scopes").ScopeType) => {
87
87
  attribute: (option: import("../scopes").ScopeOptionKey) => {
88
- $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
89
- $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
88
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.audit.read" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.action.accept" | "record.action.reject" | "record.archive" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reinstate-registration" | "record.reject" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
89
+ $option: "accessLevel" | "createdBy" | "createdIn" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role" | "status";
90
90
  };
91
91
  };
92
92
  jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
93
- $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
94
- $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
93
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.audit.read" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.action.accept" | "record.action.reject" | "record.archive" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reinstate-registration" | "record.reject" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
94
+ $option: "accessLevel" | "createdBy" | "createdIn" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role" | "status";
95
95
  }) => {
96
96
  $jurisdiction: "administrativeArea" | "all" | "location" | {
97
- $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
98
- $option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
97
+ $scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.audit.read" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.action.accept" | "record.action.reject" | "record.archive" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reinstate-registration" | "record.reject" | "record.request-correction" | "record.review-duplicates" | "record.revoke-registration" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
98
+ $option: "accessLevel" | "createdBy" | "createdIn" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role" | "status";
99
99
  };
100
100
  };
101
101
  hasScope: (scope: string) => JSONSchema;
@@ -2,9 +2,9 @@ import { ConditionalParameters, JSONSchema } from './conditionals';
2
2
  import { ActionUpdate, EventState } from '../events/ActionDocument';
3
3
  import { FieldConditional } from '../events/Conditional';
4
4
  import { FieldConfig } from '../events/FieldConfig';
5
- import { FieldUpdateValue, FieldValue } from '../events/FieldValue';
5
+ import { PlainDate, FieldUpdateValue, FieldValue } from '../events/FieldValue';
6
6
  import { TranslationConfig } from '../events/TranslationConfig';
7
- import { ITokenPayload } from '../authentication';
7
+ import { EncodedScope, TokenUserType } from '../authentication';
8
8
  import { UUID } from '../uuid';
9
9
  import { FormState } from '../events/utils';
10
10
  import { ActionConfig } from '../events/ActionConfig';
@@ -14,8 +14,8 @@ import { EventDocument } from '../events/EventDocument';
14
14
  import { EventIndex } from '../events/EventIndex';
15
15
  import { Location } from '../events/locations';
16
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;
17
+ /** Returns today's date as a {@link PlainDate} (YYYY-MM-DD), device-local. */
18
+ export declare function todayISO(): PlainDate;
19
19
  /**
20
20
  * Context passed to every serialised client-side function ({@link runClientFunction}).
21
21
  *
@@ -27,7 +27,7 @@ export type ClientFunctionContext = {
27
27
  $form: EventState | ActionUpdate;
28
28
  $now: string;
29
29
  $online: boolean;
30
- $user?: ITokenPayload;
30
+ $user?: UserValidatorContext;
31
31
  $event?: EventDocument;
32
32
  $leafAdminStructureLocationIds: Array<{
33
33
  id: UUID;
@@ -69,14 +69,40 @@ export declare function validate(schema: JSONSchema, data: ConditionalParameters
69
69
  export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
70
70
  export declare function isOnline(): boolean;
71
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;
72
+ export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext, event: EventIndex): boolean;
73
+ /**
74
+ * Given a field's `secured` property (a boolean, or a JSONSchema conditional
75
+ * evaluated against the event, e.g. `flag('sealed')`), returns whether the
76
+ * field is currently secured for the given event.
77
+ */
78
+ export declare function isFieldSecured(field: Pick<FieldConfig, 'secured'>, event: EventIndex, context: ValidatorContext): boolean;
79
+ export type EventValidatorContext = {
80
+ document: EventDocument;
81
+ state: EventIndex;
82
+ };
83
+ export declare function getEventValidatorContext(document: EventDocument, config: EventConfig): EventValidatorContext;
84
+ export type UserValidatorContext = {
85
+ sub: string;
86
+ scope: EncodedScope[];
87
+ role?: string;
88
+ userType: TokenUserType;
89
+ };
90
+ /** deprecated */
73
91
  export type ValidatorContext = {
74
- user?: ITokenPayload;
92
+ user?: UserValidatorContext;
75
93
  leafAdminStructureLocationIds?: Array<{
76
94
  id: UUID;
77
95
  }>;
78
- event?: EventDocument;
79
96
  baseFormState?: EventState;
97
+ event?: EventValidatorContext;
98
+ };
99
+ export type StrictValidatorContext = {
100
+ user: UserValidatorContext;
101
+ leafAdminStructureLocationIds: Array<{
102
+ id: UUID;
103
+ }>;
104
+ baseFormState?: EventState;
105
+ event: EventValidatorContext;
80
106
  };
81
107
  export declare function isFieldVisible(field: FieldConfig, form: Partial<ActionUpdate | EventState>, context: ValidatorContext): boolean;
82
108
  export declare function isFieldEnabled(field: FieldConfig, form: ActionUpdate | EventState, context: ValidatorContext): boolean;
@@ -30,7 +30,7 @@ export declare const ActionConfigBase: z.ZodObject<{
30
30
  conditional: z.ZodAny;
31
31
  }, z.core.$strip>], "type">>>;
32
32
  }, z.core.$strip>;
33
- declare const CustomActionConfig: z.ZodObject<{
33
+ declare const DeclareConfig: z.ZodObject<{
34
34
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
35
35
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
36
36
  id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
@@ -55,13 +55,36 @@ declare const CustomActionConfig: z.ZodObject<{
55
55
  type: z.ZodLiteral<"ENABLE">;
56
56
  conditional: z.ZodAny;
57
57
  }, z.core.$strip>], "type">>>;
58
- type: z.ZodLiteral<"CUSTOM">;
59
- customActionType: z.ZodString;
60
- form: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
61
- auditHistoryLabel: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
58
+ deduplication: z.ZodOptional<z.ZodObject<{
59
+ id: z.ZodString;
60
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
61
+ query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
62
+ }, z.core.$strip>>;
63
+ type: z.ZodLiteral<"DECLARE">;
64
+ declaration: z.ZodObject<{
65
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
66
+ pages: z.ZodArray<z.ZodObject<{
67
+ id: z.ZodString;
68
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
69
+ requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
70
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
71
+ fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
72
+ conditional: z.ZodOptional<z.ZodAny>;
73
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
74
+ }, z.core.$strip>>;
75
+ }, z.core.$strip>;
76
+ review: z.ZodObject<{
77
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
78
+ fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
79
+ }, z.core.$strip>;
80
+ form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
81
+ dialogCopy: z.ZodOptional<z.ZodObject<{
82
+ notify: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
83
+ declare: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
84
+ register: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
85
+ }, z.core.$strip>>;
62
86
  }, z.core.$strip>;
63
- export type CustomActionConfig = z.infer<typeof CustomActionConfig>;
64
- export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
87
+ declare const CustomActionConfig: z.ZodObject<{
65
88
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
66
89
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
67
90
  id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
@@ -79,12 +102,30 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
79
102
  }, z.core.$strip>>>>;
80
103
  supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
81
104
  icon: z.ZodOptional<z.ZodString>;
105
+ conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
106
+ type: z.ZodLiteral<"SHOW">;
107
+ conditional: z.ZodAny;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ type: z.ZodLiteral<"ENABLE">;
110
+ conditional: z.ZodAny;
111
+ }, z.core.$strip>], "type">>>;
112
+ type: z.ZodLiteral<"CUSTOM">;
113
+ customActionType: z.ZodString;
114
+ form: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
115
+ auditHistoryLabel: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
116
+ }, z.core.$strip>;
117
+ export type CustomActionConfig = z.infer<typeof CustomActionConfig>;
118
+ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
119
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
120
+ supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
121
+ icon: z.ZodOptional<z.ZodString>;
82
122
  type: z.ZodLiteral<"READ">;
83
123
  review: z.ZodObject<{
84
124
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
85
125
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
86
126
  }, z.core.$strip>;
87
127
  conditionals: z.ZodOptional<z.ZodNever>;
128
+ flags: z.ZodOptional<z.ZodNever>;
88
129
  }, z.core.$strip>, z.ZodObject<{
89
130
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
90
131
  supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
@@ -195,6 +236,18 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
195
236
  query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
196
237
  }, z.core.$strip>>;
197
238
  type: z.ZodLiteral<"DECLARE">;
239
+ declaration: z.ZodObject<{
240
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
241
+ pages: z.ZodArray<z.ZodObject<{
242
+ id: z.ZodString;
243
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
244
+ requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
245
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
246
+ fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
247
+ conditional: z.ZodOptional<z.ZodAny>;
248
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
249
+ }, z.core.$strip>>;
250
+ }, z.core.$strip>;
198
251
  review: z.ZodObject<{
199
252
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
200
253
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
@@ -368,6 +421,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
368
421
  id: z.ZodString;
369
422
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
370
423
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
424
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
371
425
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
372
426
  conditional: z.ZodOptional<z.ZodAny>;
373
427
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -375,6 +429,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
375
429
  id: z.ZodString;
376
430
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
377
431
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
432
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
378
433
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
379
434
  conditional: z.ZodOptional<z.ZodAny>;
380
435
  type: z.ZodLiteral<"VERIFICATION">;
@@ -424,6 +479,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
424
479
  id: z.ZodString;
425
480
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
426
481
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
482
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
427
483
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
428
484
  conditional: z.ZodOptional<z.ZodAny>;
429
485
  type: z.ZodDefault<z.ZodLiteral<"FORM">>;
@@ -431,6 +487,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
431
487
  id: z.ZodString;
432
488
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
433
489
  requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
490
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
434
491
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
435
492
  conditional: z.ZodOptional<z.ZodAny>;
436
493
  type: z.ZodLiteral<"VERIFICATION">;
@@ -584,6 +641,60 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
584
641
  conditional: z.ZodAny;
585
642
  }, z.core.$strip>], "type">>>;
586
643
  type: z.ZodLiteral<"UNARCHIVE">;
644
+ }, z.core.$strip>, z.ZodObject<{
645
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
646
+ flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
647
+ id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
648
+ readonly INCOMPLETE: 'incomplete';
649
+ readonly REJECTED: 'rejected';
650
+ readonly CORRECTION_REQUESTED: 'correction-requested';
651
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
652
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
653
+ }>]>, z.ZodString]>;
654
+ operation: z.ZodEnum<{
655
+ add: "add";
656
+ remove: "remove";
657
+ }>;
658
+ conditional: z.ZodOptional<z.ZodAny>;
659
+ }, z.core.$strip>>>>;
660
+ supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
661
+ icon: z.ZodOptional<z.ZodString>;
662
+ conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
663
+ type: z.ZodLiteral<"SHOW">;
664
+ conditional: z.ZodAny;
665
+ }, z.core.$strip>, z.ZodObject<{
666
+ type: z.ZodLiteral<"ENABLE">;
667
+ conditional: z.ZodAny;
668
+ }, z.core.$strip>], "type">>>;
669
+ type: z.ZodLiteral<"REVOKE_REGISTRATION">;
670
+ form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
671
+ }, z.core.$strip>, z.ZodObject<{
672
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
673
+ flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
674
+ id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
675
+ readonly INCOMPLETE: 'incomplete';
676
+ readonly REJECTED: 'rejected';
677
+ readonly CORRECTION_REQUESTED: 'correction-requested';
678
+ readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
679
+ readonly EDIT_IN_PROGRESS: 'edit-in-progress';
680
+ }>]>, z.ZodString]>;
681
+ operation: z.ZodEnum<{
682
+ add: "add";
683
+ remove: "remove";
684
+ }>;
685
+ conditional: z.ZodOptional<z.ZodAny>;
686
+ }, z.core.$strip>>>>;
687
+ supportingCopy: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>>;
688
+ icon: z.ZodOptional<z.ZodString>;
689
+ conditionals: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
690
+ type: z.ZodLiteral<"SHOW">;
691
+ conditional: z.ZodAny;
692
+ }, z.core.$strip>, z.ZodObject<{
693
+ type: z.ZodLiteral<"ENABLE">;
694
+ conditional: z.ZodAny;
695
+ }, z.core.$strip>], "type">>>;
696
+ type: z.ZodLiteral<"REINSTATE_REGISTRATION">;
697
+ form: z.ZodOptional<z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>>;
587
698
  }, z.core.$strip>, z.ZodObject<{
588
699
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
589
700
  flags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -615,6 +726,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
615
726
  auditHistoryLabel: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
616
727
  }, z.core.$strip>], "type">;
617
728
  export type ActionConfig = z.infer<typeof ActionConfig>;
729
+ export type DeclareActionConfig = z.infer<typeof DeclareConfig>;
618
730
  export declare const actionConfigTypes: Set<ActionConfigTypes>;
619
731
  /**
620
732
  * Action types that come specifically from the country configuration.
@@ -656,6 +768,18 @@ export declare const DeclarationActionConfig: z.ZodDiscriminatedUnion<[z.ZodObje
656
768
  query: z.ZodType<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput, z.core.$ZodTypeInternals<import("./DeduplicationConfig").ClauseOutput, import("./DeduplicationConfig").ClauseInput>>;
657
769
  }, z.core.$strip>>;
658
770
  type: z.ZodLiteral<"DECLARE">;
771
+ declaration: z.ZodObject<{
772
+ label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
773
+ pages: z.ZodArray<z.ZodObject<{
774
+ id: z.ZodString;
775
+ title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
776
+ requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
777
+ showClearButton: z.ZodOptional<z.ZodBoolean>;
778
+ fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
779
+ conditional: z.ZodOptional<z.ZodAny>;
780
+ type: z.ZodDefault<z.ZodLiteral<"FORM">>;
781
+ }, z.core.$strip>>;
782
+ }, z.core.$strip>;
659
783
  review: z.ZodObject<{
660
784
  title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
661
785
  fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
@@ -1,5 +1,6 @@
1
1
  import * as z from 'zod/v4';
2
2
  import { FieldValue, FieldUpdateValue } from './FieldValue';
3
+ export { ActionStatus } from './ActionStatus';
3
4
  /**
4
5
  * ActionUpdate is a record of a specific action that updated data fields.
5
6
  */
@@ -10,12 +11,6 @@ export type ActionUpdate = z.infer<typeof ActionUpdate>;
10
11
  */
11
12
  export declare const EventState: z.ZodRecord<z.ZodString, z.ZodType<FieldValue, unknown, z.core.$ZodTypeInternals<FieldValue, unknown>>>;
12
13
  export type EventState = z.infer<typeof EventState>;
13
- export declare const ActionStatus: {
14
- readonly Requested: 'Requested';
15
- readonly Accepted: 'Accepted';
16
- readonly Rejected: 'Rejected';
17
- };
18
- export type ActionStatus = keyof typeof ActionStatus;
19
14
  export declare const ActionBase: z.ZodObject<{
20
15
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
21
16
  transactionId: z.ZodString;
@@ -223,6 +218,32 @@ declare const RequestedCorrectionAction: z.ZodObject<{
223
218
  type: z.ZodLiteral<"REQUEST_CORRECTION">;
224
219
  }, z.core.$strip>;
225
220
  export type RequestedCorrectionAction = z.infer<typeof RequestedCorrectionAction>;
221
+ export declare const RejectedCorrectionAction: z.ZodObject<{
222
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
223
+ transactionId: z.ZodString;
224
+ createdByUserType: z.ZodEnum<{
225
+ system: "system";
226
+ user: "user";
227
+ }>;
228
+ createdAt: z.ZodString;
229
+ createdBy: z.ZodString;
230
+ createdByRole: z.ZodOptional<z.ZodString>;
231
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
232
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
233
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>;
234
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>>>;
235
+ status: z.ZodEnum<{
236
+ Accepted: "Accepted";
237
+ Rejected: "Rejected";
238
+ Requested: "Requested";
239
+ }>;
240
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
241
+ type: z.ZodLiteral<"REJECT_CORRECTION">;
242
+ requestId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
243
+ content: z.ZodObject<{
244
+ reason: z.ZodString;
245
+ }, z.core.$strip>;
246
+ }, z.core.$strip>;
226
247
  declare const CustomAction: z.ZodObject<{
227
248
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
228
249
  transactionId: z.ZodString;
@@ -385,9 +406,9 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
385
406
  }>;
386
407
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
387
408
  type: z.ZodLiteral<"ARCHIVE">;
388
- content: z.ZodObject<{
409
+ content: z.ZodOptional<z.ZodObject<{
389
410
  reason: z.ZodString;
390
- }, z.core.$strip>;
411
+ }, z.core.$strip>>;
391
412
  }, z.core.$strip>, z.ZodObject<{
392
413
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
393
414
  transactionId: z.ZodString;
@@ -409,6 +430,48 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
409
430
  }>;
410
431
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
411
432
  type: z.ZodLiteral<"UNARCHIVE">;
433
+ }, z.core.$strip>, z.ZodObject<{
434
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
435
+ transactionId: z.ZodString;
436
+ createdByUserType: z.ZodEnum<{
437
+ system: "system";
438
+ user: "user";
439
+ }>;
440
+ createdAt: z.ZodString;
441
+ createdBy: z.ZodString;
442
+ createdByRole: z.ZodOptional<z.ZodString>;
443
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
444
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
445
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>;
446
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>>>;
447
+ status: z.ZodEnum<{
448
+ Accepted: "Accepted";
449
+ Rejected: "Rejected";
450
+ Requested: "Requested";
451
+ }>;
452
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
453
+ type: z.ZodLiteral<"REVOKE_REGISTRATION">;
454
+ }, z.core.$strip>, z.ZodObject<{
455
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
456
+ transactionId: z.ZodString;
457
+ createdByUserType: z.ZodEnum<{
458
+ system: "system";
459
+ user: "user";
460
+ }>;
461
+ createdAt: z.ZodString;
462
+ createdBy: z.ZodString;
463
+ createdByRole: z.ZodOptional<z.ZodString>;
464
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
465
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
466
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>;
467
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>>>;
468
+ status: z.ZodEnum<{
469
+ Accepted: "Accepted";
470
+ Rejected: "Rejected";
471
+ Requested: "Requested";
472
+ }>;
473
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
474
+ type: z.ZodLiteral<"REINSTATE_REGISTRATION">;
412
475
  }, z.core.$strip>, z.ZodObject<{
413
476
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
414
477
  transactionId: z.ZodString;
@@ -537,7 +600,7 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
537
600
  }>;
538
601
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
539
602
  type: z.ZodLiteral<"APPROVE_CORRECTION">;
540
- requestId: z.ZodString;
603
+ requestId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
541
604
  content: z.ZodOptional<z.ZodObject<{
542
605
  immediateCorrection: z.ZodOptional<z.ZodBoolean>;
543
606
  }, z.core.$strip>>;
@@ -562,7 +625,7 @@ export declare const ActionDocument: z.ZodDiscriminatedUnion<[z.ZodObject<{
562
625
  }>;
563
626
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
564
627
  type: z.ZodLiteral<"REJECT_CORRECTION">;
565
- requestId: z.ZodString;
628
+ requestId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
566
629
  content: z.ZodObject<{
567
630
  reason: z.ZodString;
568
631
  }, z.core.$strip>;
@@ -702,9 +765,11 @@ export declare const AsyncRejectActionDocument: z.ZodObject<{
702
765
  NOTIFY: "NOTIFY";
703
766
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
704
767
  REGISTER: "REGISTER";
768
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
705
769
  REJECT: "REJECT";
706
770
  REJECT_CORRECTION: "REJECT_CORRECTION";
707
771
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
772
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
708
773
  UNARCHIVE: "UNARCHIVE";
709
774
  }>;
710
775
  status: z.ZodLiteral<"Rejected">;
@@ -848,9 +913,9 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
848
913
  }>;
849
914
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
850
915
  type: z.ZodLiteral<"ARCHIVE">;
851
- content: z.ZodObject<{
916
+ content: z.ZodOptional<z.ZodObject<{
852
917
  reason: z.ZodString;
853
- }, z.core.$strip>;
918
+ }, z.core.$strip>>;
854
919
  }, z.core.$strip>, z.ZodObject<{
855
920
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
856
921
  transactionId: z.ZodString;
@@ -872,6 +937,48 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
872
937
  }>;
873
938
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
874
939
  type: z.ZodLiteral<"UNARCHIVE">;
940
+ }, z.core.$strip>, z.ZodObject<{
941
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
942
+ transactionId: z.ZodString;
943
+ createdByUserType: z.ZodEnum<{
944
+ system: "system";
945
+ user: "user";
946
+ }>;
947
+ createdAt: z.ZodString;
948
+ createdBy: z.ZodString;
949
+ createdByRole: z.ZodOptional<z.ZodString>;
950
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
951
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
952
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>;
953
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>>>;
954
+ status: z.ZodEnum<{
955
+ Accepted: "Accepted";
956
+ Rejected: "Rejected";
957
+ Requested: "Requested";
958
+ }>;
959
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
960
+ type: z.ZodLiteral<"REVOKE_REGISTRATION">;
961
+ }, z.core.$strip>, z.ZodObject<{
962
+ id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
963
+ transactionId: z.ZodString;
964
+ createdByUserType: z.ZodEnum<{
965
+ system: "system";
966
+ user: "user";
967
+ }>;
968
+ createdAt: z.ZodString;
969
+ createdBy: z.ZodString;
970
+ createdByRole: z.ZodOptional<z.ZodString>;
971
+ createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
972
+ createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
973
+ declaration: z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>;
974
+ annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<FieldUpdateValue, unknown, z.core.$ZodTypeInternals<FieldUpdateValue, unknown>>>>>;
975
+ status: z.ZodEnum<{
976
+ Accepted: "Accepted";
977
+ Rejected: "Rejected";
978
+ Requested: "Requested";
979
+ }>;
980
+ originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
981
+ type: z.ZodLiteral<"REINSTATE_REGISTRATION">;
875
982
  }, z.core.$strip>, z.ZodObject<{
876
983
  id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
877
984
  transactionId: z.ZodString;
@@ -1000,7 +1107,7 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1000
1107
  }>;
1001
1108
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
1002
1109
  type: z.ZodLiteral<"APPROVE_CORRECTION">;
1003
- requestId: z.ZodString;
1110
+ requestId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
1004
1111
  content: z.ZodOptional<z.ZodObject<{
1005
1112
  immediateCorrection: z.ZodOptional<z.ZodBoolean>;
1006
1113
  }, z.core.$strip>>;
@@ -1025,7 +1132,7 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1025
1132
  }>;
1026
1133
  originalActionId: z.ZodNullable<z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
1027
1134
  type: z.ZodLiteral<"REJECT_CORRECTION">;
1028
- requestId: z.ZodString;
1135
+ requestId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
1029
1136
  content: z.ZodObject<{
1030
1137
  reason: z.ZodString;
1031
1138
  }, z.core.$strip>;
@@ -1163,9 +1270,11 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1163
1270
  NOTIFY: "NOTIFY";
1164
1271
  PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
1165
1272
  REGISTER: "REGISTER";
1273
+ REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION";
1166
1274
  REJECT: "REJECT";
1167
1275
  REJECT_CORRECTION: "REJECT_CORRECTION";
1168
1276
  REQUEST_CORRECTION: "REQUEST_CORRECTION";
1277
+ REVOKE_REGISTRATION: "REVOKE_REGISTRATION";
1169
1278
  UNARCHIVE: "UNARCHIVE";
1170
1279
  }>;
1171
1280
  status: z.ZodLiteral<"Rejected">;
@@ -1173,5 +1282,4 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
1173
1282
  export type Action = z.infer<typeof Action>;
1174
1283
  export type CreatedAction = z.infer<typeof CreatedAction>;
1175
1284
  export type AssignedAction = z.infer<typeof AssignedAction>;
1176
- export {};
1177
1285
  //# sourceMappingURL=ActionDocument.d.ts.map