@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
@@ -1,15 +1,17 @@
1
1
  import { UUID } from '../uuid';
2
2
  import { ActionDocument, ActionUpdate } from './ActionDocument';
3
- import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnarchiveActionInput, UnassignActionInput } from './ActionInput';
3
+ import { ValidatorContext } from '../conditionals/validate';
4
+ import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnarchiveActionInput, UnassignActionInput, RevokeRegistrationActionInput, ReinstateRegistrationActionInput } from './ActionInput';
4
5
  import { ActionType } from './ActionType';
5
6
  import { Draft } from './Draft';
6
- import { EventConfig } from './EventConfig';
7
+ import { EventConfig, EventConfigInput } from './EventConfig';
7
8
  import { EventDocument } from './EventDocument';
8
9
  import { EventIndex } from './EventIndex';
9
10
  import { EventInput } from './EventInput';
10
11
  import { TranslationConfig } from './TranslationConfig';
11
12
  import { FieldConfig } from './FieldConfig';
12
- import { SetLocationPayload, SetAdministrativeAreaPayload } from './locations';
13
+ import { DeclarationFormConfig } from './FormConfig';
14
+ import { LocationVersion, SetLocationPayload, SetAdministrativeAreaPayload, ClientAdministrativeArea } from './locations';
13
15
  import { WorkqueueConfig } from './WorkqueueConfig';
14
16
  import * as z from 'zod/v4';
15
17
  import { DocumentPath } from '../documents';
@@ -43,6 +45,13 @@ export declare function generateUuid(rng?: () => number): UUID;
43
45
  export declare function generateTrackingId(rng: () => number): string;
44
46
  export declare function generateRegistrationNumber(rng: () => number): string;
45
47
  export declare function generateRandomSignature(rng: () => number): DocumentPath;
48
+ /**
49
+ * Builds one element of a location / administrative area `versions` history.
50
+ * Every field is defaulted so a call names only what its assertion is about —
51
+ * an `effectiveFrom`, a `name`, or an explicit `versionId` when the test needs
52
+ * to control version identity.
53
+ */
54
+ export declare function locationVersion(overrides?: Partial<LocationVersion>, rng?: () => number): LocationVersion;
46
55
  export declare function fieldConfigsToActionPayload(fields: FieldConfig[], rng: () => number,
47
56
  /**
48
57
  * Given hierarchy, ensures that related fields (e.g. location and administrative area) have valid values based on the hierarchy.
@@ -77,8 +86,11 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
77
86
  omitFields?: string[];
78
87
  }, input?: Partial<Draft>) => Draft;
79
88
  actions: {
80
- declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
89
+ declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
81
90
  keepAssignment?: boolean | undefined;
91
+ keepAssignmentIfAccepted?: boolean | undefined;
92
+ keepAssignmentIfRejected?: boolean | undefined;
93
+ waitFor?: boolean | undefined;
82
94
  type: "DECLARE";
83
95
  transactionId: string;
84
96
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
@@ -88,56 +100,92 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
88
100
  /**
89
101
  * Notify allows sending incomplete data. Think it as 'partial declare' for now.
90
102
  */
91
- notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
103
+ notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
92
104
  type: "NOTIFY";
93
105
  transactionId: string;
94
106
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
95
107
  eventId: string;
96
108
  keepAssignment: boolean | undefined;
109
+ keepAssignmentIfAccepted: boolean | undefined;
110
+ keepAssignmentIfRejected: boolean | undefined;
111
+ waitFor: boolean | undefined;
97
112
  };
98
- edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
113
+ edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
99
114
  keepAssignment?: boolean | undefined;
115
+ keepAssignmentIfAccepted?: boolean | undefined;
116
+ keepAssignmentIfRejected?: boolean | undefined;
117
+ waitFor?: boolean | undefined;
100
118
  type: "EDIT";
101
119
  transactionId: string;
102
120
  declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
103
121
  annotation: {};
104
122
  eventId: string;
105
123
  };
106
- assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo'>>) => {
124
+ assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo' | 'waitFor'>>) => {
107
125
  type: "ASSIGN";
108
126
  transactionId: string;
109
127
  declaration: {};
110
128
  assignedTo: string;
111
129
  eventId: string;
130
+ waitFor: boolean | undefined;
112
131
  };
113
- unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId'>>) => {
132
+ unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId' | 'waitFor'>>) => {
114
133
  type: "UNASSIGN";
115
134
  transactionId: string;
116
135
  declaration: {};
117
136
  assignedTo: null;
118
137
  eventId: string;
138
+ waitFor: boolean | undefined;
119
139
  };
120
- archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
140
+ archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
121
141
  keepAssignment?: boolean | undefined;
142
+ keepAssignmentIfAccepted?: boolean | undefined;
143
+ keepAssignmentIfRejected?: boolean | undefined;
144
+ waitFor?: boolean | undefined;
122
145
  type: "ARCHIVE";
123
146
  transactionId: string;
124
147
  declaration: {};
125
148
  annotation: {};
126
149
  eventId: string;
127
- content: {
128
- reason: string;
129
- };
130
150
  };
131
- unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
151
+ unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
132
152
  keepAssignment?: boolean | undefined;
153
+ keepAssignmentIfAccepted?: boolean | undefined;
154
+ keepAssignmentIfRejected?: boolean | undefined;
155
+ waitFor?: boolean | undefined;
133
156
  type: "UNARCHIVE";
134
157
  transactionId: string;
135
158
  declaration: {};
136
159
  annotation: {};
137
160
  eventId: string;
138
161
  };
139
- reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
162
+ revokeRegistration: (eventId: string, input?: Partial<Pick<RevokeRegistrationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
163
+ keepAssignment?: boolean | undefined;
164
+ keepAssignmentIfAccepted?: boolean | undefined;
165
+ keepAssignmentIfRejected?: boolean | undefined;
166
+ waitFor?: boolean | undefined;
167
+ type: "REVOKE_REGISTRATION";
168
+ transactionId: string;
169
+ declaration: {};
170
+ annotation: {};
171
+ eventId: string;
172
+ };
173
+ reinstateRegistration: (eventId: string, input?: Partial<Pick<ReinstateRegistrationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
140
174
  keepAssignment?: boolean | undefined;
175
+ keepAssignmentIfAccepted?: boolean | undefined;
176
+ keepAssignmentIfRejected?: boolean | undefined;
177
+ waitFor?: boolean | undefined;
178
+ type: "REINSTATE_REGISTRATION";
179
+ transactionId: string;
180
+ declaration: {};
181
+ annotation: {};
182
+ eventId: string;
183
+ };
184
+ reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
185
+ keepAssignment?: boolean | undefined;
186
+ keepAssignmentIfAccepted?: boolean | undefined;
187
+ keepAssignmentIfRejected?: boolean | undefined;
188
+ waitFor?: boolean | undefined;
141
189
  type: "REJECT";
142
190
  transactionId: string;
143
191
  declaration: {};
@@ -147,8 +195,11 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
147
195
  reason: string;
148
196
  };
149
197
  };
150
- register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber'>>) => {
198
+ register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
151
199
  keepAssignment?: boolean | undefined;
200
+ keepAssignmentIfAccepted?: boolean | undefined;
201
+ keepAssignmentIfRejected?: boolean | undefined;
202
+ waitFor?: boolean | undefined;
152
203
  registrationNumber?: string | undefined;
153
204
  type: "REGISTER";
154
205
  transactionId: string;
@@ -156,8 +207,11 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
156
207
  annotation: {};
157
208
  eventId: string;
158
209
  };
159
- printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
210
+ printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
160
211
  keepAssignment?: boolean | undefined;
212
+ keepAssignmentIfAccepted?: boolean | undefined;
213
+ keepAssignmentIfRejected?: boolean | undefined;
214
+ waitFor?: boolean | undefined;
161
215
  type: "PRINT_CERTIFICATE";
162
216
  transactionId: string;
163
217
  declaration: {};
@@ -165,15 +219,18 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
165
219
  eventId: string;
166
220
  };
167
221
  correction: {
168
- request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
222
+ request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
169
223
  type: "REQUEST_CORRECTION";
170
224
  transactionId: string;
171
225
  declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
172
226
  annotation: {};
173
227
  eventId: string;
174
228
  keepAssignment: boolean | undefined;
229
+ keepAssignmentIfAccepted: boolean | undefined;
230
+ keepAssignmentIfRejected: boolean | undefined;
231
+ waitFor: boolean | undefined;
175
232
  };
176
- approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
233
+ approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
177
234
  type: "APPROVE_CORRECTION";
178
235
  transactionId: string;
179
236
  declaration: {};
@@ -181,18 +238,24 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
181
238
  eventId: string;
182
239
  requestId: string;
183
240
  keepAssignment: boolean | undefined;
241
+ keepAssignmentIfAccepted: boolean | undefined;
242
+ keepAssignmentIfRejected: boolean | undefined;
243
+ waitFor: boolean | undefined;
184
244
  };
185
- reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'content'>>) => {
245
+ reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'content' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
186
246
  type: "REJECT_CORRECTION";
187
247
  transactionId: string;
188
248
  declaration: {};
189
249
  annotation: {};
190
250
  eventId: string;
191
251
  requestId: string;
192
- keepAssignment: boolean | undefined;
193
252
  content: {
194
253
  reason: string;
195
254
  };
255
+ keepAssignment: boolean | undefined;
256
+ keepAssignmentIfAccepted: boolean | undefined;
257
+ keepAssignmentIfRejected: boolean | undefined;
258
+ waitFor: boolean | undefined;
196
259
  };
197
260
  };
198
261
  duplicate: {
@@ -271,11 +334,6 @@ export declare function createPrng(seed: number): () => number;
271
334
  */
272
335
  export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
273
336
  export declare const generateTranslationConfig: (message: string) => TranslationConfig;
274
- export declare const BearerTokenByUserType: {
275
- fieldAgent: string;
276
- registrationAgent: string;
277
- localRegistrar: string;
278
- };
279
337
  export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
280
338
  /**
281
339
  * Backend focused event config generator for testing fields in a lightweight way.
@@ -285,10 +343,32 @@ export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
285
343
  * @param placeOfEventId - Optional place of event field id.
286
344
  * @param dateOfEventId - Optional date of event field id.
287
345
  */
288
- export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfEventId }: {
346
+ export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfEventId, actions }: {
289
347
  id: string;
290
348
  fields: FieldConfig[];
291
349
  placeOfEventId?: string;
292
350
  dateOfEventId?: string;
351
+ /** Extra actions appended to the default READ + DECLARE pair, e.g. a REQUEST_CORRECTION action with its own correctionForm. */
352
+ actions?: EventConfigInput['actions'];
293
353
  }) => EventConfig;
354
+ /**
355
+ * @returns a copy of the configuration with the DECLARE action's declaration replaced.
356
+ */
357
+ export declare function withDeclaration(configuration: EventConfig, declaration: DeclarationFormConfig): EventConfig;
358
+ /**
359
+ * Get the leaf administrative area IDs from a list of administrative areas.
360
+ *
361
+ * A leaf administrative area is defined as an administrative area that does not have any children in the provided list.
362
+ * AdministrativeArea might have a CRVS_OFFICE as children, but is still considered to be a leaf administrative area.
363
+ *
364
+ * @param administrativeAreas - The list of administrative areas to search.
365
+ * @returns The list of leaf administrative area IDs.
366
+ */
367
+ export declare function getLeafAdministrativeAreaIds(administrativeAreas: Map<UUID, ClientAdministrativeArea>): Array<{
368
+ id: UUID;
369
+ }>;
370
+ export declare function generateTestValidatorContext(userRole?: TestUserRole, eventWithConfig?: {
371
+ event: EventDocument;
372
+ eventConfig: EventConfig;
373
+ }): ValidatorContext;
294
374
  //# sourceMappingURL=test.utils.d.ts.map
@@ -10,20 +10,8 @@ import { UUID } from '../uuid';
10
10
  import { ActionConfig, ActionConfigTypes } from './ActionConfig';
11
11
  import { FormConfig } from './FormConfig';
12
12
  import { PlainDate, SelectDateRangeValue } from './FieldValue';
13
+ import { EventIndex } from './EventIndex';
13
14
  export declare function ageToDate(age: number, asOfDate: PlainDate): string & import("zod").$brand<"PlainDate">;
14
- export declare function getDeclarationFields(configuration: EventConfig): FieldConfig[];
15
- export declare function getDeclarationPages(configuration: EventConfig): {
16
- id: string;
17
- title: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- requireCompletionToContinue: boolean;
23
- fields: FieldConfig[];
24
- conditional?: any;
25
- type: "FORM";
26
- }[];
27
15
  export declare function getDeclaration(configuration: EventConfig): {
28
16
  label: {
29
17
  id: string;
@@ -38,11 +26,26 @@ export declare function getDeclaration(configuration: EventConfig): {
38
26
  description: string;
39
27
  };
40
28
  requireCompletionToContinue: boolean;
29
+ showClearButton?: boolean | undefined;
41
30
  fields: FieldConfig[];
42
31
  conditional?: any;
43
32
  type: "FORM";
44
33
  }[];
45
34
  };
35
+ export declare function getDeclarationPages(configuration: EventConfig): {
36
+ id: string;
37
+ title: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ requireCompletionToContinue: boolean;
43
+ showClearButton?: boolean | undefined;
44
+ fields: FieldConfig[];
45
+ conditional?: any;
46
+ type: "FORM";
47
+ }[];
48
+ export declare function getDeclarationFields(configuration: EventConfig): FieldConfig[];
46
49
  export declare function isActionConfigType(type: ActionType): type is ActionConfigTypes;
47
50
  export declare function getActionConfig({ eventConfiguration, actionType, customActionType }: {
48
51
  eventConfiguration: EventConfig;
@@ -66,6 +69,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
66
69
  description: string;
67
70
  };
68
71
  requireCompletionToContinue: boolean;
72
+ showClearButton?: boolean | undefined;
69
73
  fields: FieldConfig[];
70
74
  conditional?: any;
71
75
  type: "FORM";
@@ -77,6 +81,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
77
81
  description: string;
78
82
  };
79
83
  requireCompletionToContinue: boolean;
84
+ showClearButton?: boolean | undefined;
80
85
  fields: FieldConfig[];
81
86
  conditional?: any;
82
87
  type: "VERIFICATION";
@@ -255,9 +260,9 @@ export declare function findLastAssignmentAction(actions: Action[]): {
255
260
  status: "Accepted" | "Rejected" | "Requested";
256
261
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
257
262
  type: "ARCHIVE";
258
- content: {
263
+ content?: {
259
264
  reason: string;
260
- };
265
+ } | undefined;
261
266
  } | {
262
267
  id: string & import("zod").$brand<"UUID">;
263
268
  transactionId: string;
@@ -272,6 +277,34 @@ export declare function findLastAssignmentAction(actions: Action[]): {
272
277
  status: "Accepted" | "Rejected" | "Requested";
273
278
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
274
279
  type: "UNARCHIVE";
280
+ } | {
281
+ id: string & import("zod").$brand<"UUID">;
282
+ transactionId: string;
283
+ createdByUserType: "system" | "user";
284
+ createdAt: string;
285
+ createdBy: string;
286
+ createdByRole?: string | undefined;
287
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
288
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
289
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
290
+ annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
291
+ status: "Accepted" | "Rejected" | "Requested";
292
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
293
+ type: "REVOKE_REGISTRATION";
294
+ } | {
295
+ id: string & import("zod").$brand<"UUID">;
296
+ transactionId: string;
297
+ createdByUserType: "system" | "user";
298
+ createdAt: string;
299
+ createdBy: string;
300
+ createdByRole?: string | undefined;
301
+ createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
302
+ createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
303
+ declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
304
+ annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
305
+ status: "Accepted" | "Rejected" | "Requested";
306
+ originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
307
+ type: "REINSTATE_REGISTRATION";
275
308
  } | {
276
309
  id: string & import("zod").$brand<"UUID">;
277
310
  transactionId: string;
@@ -358,7 +391,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
358
391
  status: "Accepted" | "Rejected" | "Requested";
359
392
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
360
393
  type: "APPROVE_CORRECTION";
361
- requestId: string;
394
+ requestId: string & import("zod").$brand<"UUID">;
362
395
  content?: {
363
396
  immediateCorrection?: boolean | undefined;
364
397
  } | undefined;
@@ -376,7 +409,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
376
409
  status: "Accepted" | "Rejected" | "Requested";
377
410
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
378
411
  type: "REJECT_CORRECTION";
379
- requestId: string;
412
+ requestId: string & import("zod").$brand<"UUID">;
380
413
  content: {
381
414
  reason: string;
382
415
  };
@@ -467,7 +500,7 @@ export declare function findLastAssignmentAction(actions: Action[]): {
467
500
  createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
468
501
  createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
469
502
  originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
470
- type: "APPROVE_CORRECTION" | "ARCHIVE" | "CUSTOM" | "DECLARE" | "EDIT" | "NOTIFY" | "PRINT_CERTIFICATE" | "REGISTER" | "REJECT" | "REJECT_CORRECTION" | "REQUEST_CORRECTION" | "UNARCHIVE";
503
+ type: "APPROVE_CORRECTION" | "ARCHIVE" | "CUSTOM" | "DECLARE" | "EDIT" | "NOTIFY" | "PRINT_CERTIFICATE" | "REGISTER" | "REINSTATE_REGISTRATION" | "REJECT" | "REJECT_CORRECTION" | "REQUEST_CORRECTION" | "REVOKE_REGISTRATION" | "UNARCHIVE";
471
504
  status: "Rejected";
472
505
  } | undefined;
473
506
  /**
@@ -596,5 +629,35 @@ export declare function getCompleteActionContent(event: EventDocument, action: A
596
629
  export declare function getCompleteActionDeclaration<T extends EventState | ActionUpdate>(declaration: T, event: EventDocument, action: ActionDocument): T;
597
630
  export declare function getAcceptedActions(event: EventDocument): ActionDocument[];
598
631
  export declare function aggregateActionDeclarations(event: EventDocument): EventState;
632
+ /**
633
+ * Returns the declaration after each of `event.actions`, which must be in chronological order.
634
+ * Index `i` equals `aggregateActionDeclarations` of the first `i + 1` actions, in linear time.
635
+ */
636
+ export declare function getDeclarationAfterEachAction(event: EventDocument): EventState[];
637
+ /**
638
+ * Returns the event's declaration state as it will be once the single pending
639
+ * action is accepted — i.e. the aggregate of all accepted declarations with the
640
+ * pending action's changes applied on top.
641
+ *
642
+ * Country configuration confirmation handlers (and notifications) need the
643
+ * up-to-date declaration at confirmation time, before core has accepted the
644
+ * action. Reaching for `aggregateActionDeclarations` alone is not enough for
645
+ * corrections: when confirming an APPROVE_CORRECTION the changed fields live on
646
+ * the linked REQUEST_CORRECTION, not on the pending action's own (empty)
647
+ * declaration. This helper applies the same correction-aware merge that
648
+ * `aggregateActionDeclarations` uses for already-accepted approvals, so callers
649
+ * do not have to reimplement the `requestId`/`originalActionId` resolution.
650
+ */
651
+ export declare function getDeclarationWithPendingAction(event: EventDocument): EventState;
599
652
  export declare function aggregateActionAnnotations(event: EventDocument): EventState;
653
+ /**
654
+ * 2.1. onwards secured fields have accepted conditionals.
655
+ * Secured fields are not present in EventIndex payload.
656
+ * When we derive @see EventIndex from @see EventDocument, we will have all the fields present.
657
+ *
658
+ * To keep the views consistent, and not to change if event.get gets triggered, we need to clean out the secured fields.
659
+ *
660
+ * @returns EventIndex without values that evaluate to secured: true.
661
+ */
662
+ export declare function dropSecuredDeclarationFields(eventConfig: EventConfig, eventIndex: EventIndex, validatorContext: ValidatorContext): EventIndex;
600
663
  //# sourceMappingURL=utils.d.ts.map
@@ -5,6 +5,8 @@ export declare const TriggerEvent: {
5
5
  readonly USERNAME_REMINDER: 'username-reminder';
6
6
  readonly RESET_PASSWORD: 'reset-password';
7
7
  readonly RESET_PASSWORD_BY_ADMIN: 'reset-password-by-admin';
8
+ readonly PASSWORD_RESET_LINK: 'password-reset-link';
9
+ readonly USERNAME_REMINDER_LINK: 'username-reminder-link';
8
10
  readonly RESEND_INVITE: 'resend-invite';
9
11
  readonly TWO_FA: '2fa';
10
12
  readonly ALL_USER_NOTIFICATION: 'all-user-notification';
@@ -113,6 +115,32 @@ export declare const TriggerPayload: {
113
115
  role: z.ZodString;
114
116
  }, z.core.$strip>;
115
117
  }, z.core.$strip>;
118
+ readonly "password-reset-link": z.ZodObject<{
119
+ recipient: z.ZodObject<{
120
+ name: z.ZodOptional<z.ZodObject<{
121
+ firstname: z.ZodString;
122
+ surname: z.ZodString;
123
+ middlename: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strip>>;
125
+ mobile: z.ZodOptional<z.ZodString>;
126
+ email: z.ZodOptional<z.ZodString>;
127
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString>>;
128
+ }, z.core.$strip>;
129
+ token: z.ZodString;
130
+ }, z.core.$strip>;
131
+ readonly "username-reminder-link": z.ZodObject<{
132
+ recipient: z.ZodObject<{
133
+ name: z.ZodOptional<z.ZodObject<{
134
+ firstname: z.ZodString;
135
+ surname: z.ZodString;
136
+ middlename: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>>;
138
+ mobile: z.ZodOptional<z.ZodString>;
139
+ email: z.ZodOptional<z.ZodString>;
140
+ bcc: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
+ }, z.core.$strip>;
142
+ token: z.ZodString;
143
+ }, z.core.$strip>;
116
144
  readonly "resend-invite": z.ZodObject<{
117
145
  recipient: z.ZodObject<{
118
146
  name: z.ZodOptional<z.ZodObject<{
@@ -184,18 +212,5 @@ export declare const TriggerPayload: {
184
212
  export type TriggerPayload = {
185
213
  [K in TriggerEvent]: z.infer<(typeof TriggerPayload)[K]>;
186
214
  };
187
- export declare function triggerUserEventNotification(args: {
188
- event: typeof TriggerEvent.ALL_USER_NOTIFICATION;
189
- payload: TriggerPayload[typeof TriggerEvent.ALL_USER_NOTIFICATION];
190
- countryConfigUrl: string;
191
- }): Promise<Response>;
192
- export declare function triggerUserEventNotification<T extends Exclude<TriggerEvent, typeof TriggerEvent.ALL_USER_NOTIFICATION>>(args: {
193
- event: T;
194
- payload: TriggerPayload[T];
195
- countryConfigUrl: string;
196
- authHeader: {
197
- Authorization: string;
198
- };
199
- }): Promise<Response>;
200
215
  export declare function parseUserEventTrigger<T extends TriggerEvent>(event: T, body: unknown): TriggerPayload[T];
201
216
  //# sourceMappingURL=UserNotifications.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { TriggerEvent, TriggerPayload } from './UserNotifications';
2
+ export declare function triggerUserEventNotification<T extends TriggerEvent>({ event, payload, countryConfigUrl, authHeader }: {
3
+ event: T;
4
+ payload: TriggerPayload[T];
5
+ countryConfigUrl: string;
6
+ authHeader: {
7
+ Authorization: string;
8
+ };
9
+ }): Promise<Response>;
10
+ //# sourceMappingURL=dispatch.d.ts.map
@@ -1,2 +1,3 @@
1
1
  export * from './UserNotifications';
2
+ export * from './dispatch';
2
3
  //# sourceMappingURL=index.d.ts.map