@opencrvs/toolkit 2.1.0-rc.d1b9774 → 2.1.0-rc.d235243
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.
- package/README.md +2 -12
- package/build.sh +15 -5
- package/create-countryconfig/index.js +164 -4
- package/dist/application-config/index.js +36 -25
- package/dist/authentication/index.d.ts +8 -9
- package/dist/authentication/index.js +23 -8
- package/dist/cli.js +1981 -2823
- package/dist/commons/api/router.d.ts +252 -290
- package/dist/commons/application-config/index.d.ts +0 -2
- package/dist/commons/conditionals/conditionals.d.ts +6 -6
- package/dist/commons/conditionals/validate.d.ts +19 -4
- package/dist/commons/events/ActionConfig.d.ts +5 -14
- package/dist/commons/events/ActionDocument.d.ts +30 -4
- package/dist/commons/events/AdvancedSearchConfig.d.ts +24 -12
- package/dist/commons/events/AuditLog.d.ts +1 -0
- package/dist/commons/events/Draft.d.ts +1 -21
- package/dist/commons/events/EventDocument.d.ts +4 -4
- package/dist/commons/events/FieldConfig.d.ts +26 -15
- package/dist/commons/events/FieldTypeMapping.d.ts +10 -10
- package/dist/commons/events/FieldValue.d.ts +1 -0
- package/dist/commons/events/FormConfig.d.ts +6 -0
- package/dist/commons/events/PageConfig.d.ts +4 -0
- package/dist/commons/events/locations.d.ts +4 -0
- package/dist/commons/events/scopes.d.ts +21 -1
- package/dist/commons/events/test.utils.d.ts +71 -22
- package/dist/commons/events/utils.d.ts +37 -2
- package/dist/conditionals/index.js +21 -7
- package/dist/environment/derived-variables.d.ts +18 -0
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +21 -0
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +2 -1
- package/dist/environment/manage-users.js +1 -1
- package/dist/environment/questions.d.ts +16 -0
- package/dist/environment/questions.d.ts.map +1 -1
- package/dist/environment/questions.js +27 -2
- package/dist/environment/setup-environment.d.ts +1 -1
- package/dist/environment/setup-environment.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +633 -560
- package/dist/environment/swarm-to-k8s.js +3 -4
- package/dist/environment/templates.d.ts +0 -1
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +3 -8
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +6 -1
- package/dist/environment/utils.d.ts +0 -12
- package/dist/environment/utils.d.ts.map +1 -1
- package/dist/environment/utils.js +1 -28
- package/dist/events/index.js +2115 -1884
- package/dist/migrations/v2.1/add-recovery-link-notifications.js +4 -4
- package/dist/migrations/v2.1/add-translations.d.ts.map +1 -1
- package/dist/migrations/v2.1/add-translations.js +4 -68
- package/dist/migrations/v2.1/enable-telemetry.d.ts.map +1 -1
- package/dist/migrations/v2.1/enable-telemetry.js +30 -13
- package/dist/migrations/v2.1/index.d.ts.map +1 -1
- package/dist/migrations/v2.1/index.js +35 -1261
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +14 -0
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +1 -0
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.js +348 -0
- package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts +2 -0
- package/dist/migrations/v2.1/remove-metabase-package-installs.d.ts.map +1 -0
- package/dist/migrations/v2.1/remove-metabase-package-installs.js +161 -0
- package/dist/migrations/{v2.0/migrate-scopes.d.ts → v2.1/remove-sentry.d.ts} +1 -1
- package/dist/migrations/v2.1/remove-sentry.d.ts.map +1 -0
- package/dist/migrations/v2.1/remove-sentry.js +354 -0
- package/dist/migrations/{v2.0/rename-api-paths.d.ts → v2.1/rename-trigger-paths.d.ts} +1 -1
- package/dist/migrations/v2.1/rename-trigger-paths.d.ts.map +1 -0
- package/dist/migrations/{v2.0/rename-api-paths.js → v2.1/rename-trigger-paths.js} +69 -40
- package/dist/migrations/v2.1/template-files.d.ts +8 -0
- package/dist/migrations/v2.1/template-files.d.ts.map +1 -0
- package/dist/migrations/v2.1/template-files.js +49 -0
- package/dist/migrations/v2.1/upgrade-tilt.d.ts +8 -0
- package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +1 -0
- package/dist/migrations/v2.1/upgrade-tilt.js +139 -0
- package/dist/migrations/v2.2/add-e2e-tests.d.ts +19 -0
- package/dist/migrations/v2.2/add-e2e-tests.d.ts.map +1 -0
- package/dist/migrations/v2.2/add-e2e-tests.js +143 -0
- package/dist/migrations/v2.2/index.d.ts +6 -0
- package/dist/migrations/v2.2/index.d.ts.map +1 -0
- package/dist/migrations/v2.2/index.js +279 -0
- package/dist/migrations/v2.2/template-files.d.ts +8 -0
- package/dist/migrations/v2.2/template-files.d.ts.map +1 -0
- package/dist/migrations/v2.2/template-files.js +49 -0
- package/dist/migrations/v2.2/upgrade-tilt.d.ts +8 -0
- package/dist/migrations/v2.2/upgrade-tilt.d.ts.map +1 -0
- package/dist/migrations/v2.2/upgrade-tilt.js +139 -0
- package/dist/notification/index.js +249 -207
- package/dist/scopes/index.d.ts +288 -5
- package/dist/scopes/index.js +22 -7
- package/dist/telemetry/index.js +4 -0
- package/dist/templates/charts-values/dependencies/values.yaml +8 -0
- package/dist/templates/charts-values/opencrvs-services/values.yaml +6 -0
- package/dist/templates/charts-values/opentelemetry/values.yaml +7 -0
- package/dist/templates/charts-values/traefik/values.yaml +2 -3
- package/dist/templates/countryconfig-template/.tiltignore +1 -0
- package/dist/templates/countryconfig-template/Dockerfile.assets +7 -0
- package/dist/templates/countryconfig-template/Tiltfile +112 -0
- package/dist/templates/countryconfig-template/assets/README.md +1 -0
- package/dist/templates/countryconfig-template/assets/clear-all-data-dev.sh +61 -0
- package/dist/templates/countryconfig-template/assets/deployment/deploy.sh +455 -0
- package/dist/templates/countryconfig-template/assets/deployment/reindex.sh +168 -0
- package/dist/templates/countryconfig-template/assets/deployment/validate-required-variables-in-compose-files.ts +67 -0
- package/dist/templates/countryconfig-template/assets/elasticsearch/reindex.sh +168 -0
- package/dist/templates/countryconfig-template/assets/metabase/README.md +34 -0
- package/dist/templates/countryconfig-template/assets/metabase/environment-configuration.sql +36 -0
- package/dist/templates/countryconfig-template/assets/metabase/initialize-database.sh +46 -0
- package/dist/templates/countryconfig-template/assets/metabase/metabase.init.db.sql +27737 -0
- package/dist/templates/countryconfig-template/assets/metabase/open-shell.sh +21 -0
- package/dist/templates/countryconfig-template/assets/metabase/package.json +13 -0
- package/dist/templates/countryconfig-template/assets/metabase/run-dev.sh +108 -0
- package/dist/templates/countryconfig-template/assets/metabase/run.sh +120 -0
- package/dist/templates/countryconfig-template/assets/metabase/update-database.sh +40 -0
- package/dist/templates/countryconfig-template/assets/postgres/setup-analytics.sh +135 -0
- package/dist/templates/countryconfig-template/assets/postgres/setup-reference-data.sh +108 -0
- package/dist/templates/countryconfig-template/e2e/README.md +36 -0
- package/dist/templates/countryconfig-template/e2e/constants.ts +28 -0
- package/dist/templates/countryconfig-template/e2e/login.e2e.ts +59 -0
- package/dist/templates/countryconfig-template/package.json +153 -0
- package/dist/templates/countryconfig-template/playwright.config.ts +42 -0
- package/dist/templates/countryconfig-template/tilt/clear-all-data.ps1 +50 -0
- package/dist/templates/countryconfig-template/tilt/clear-all-data.sh +35 -0
- package/dist/templates/countryconfig-template/tilt/common.tilt +159 -0
- package/dist/templates/countryconfig-template/tilt/examples/dependencies/values.yaml +15 -0
- package/dist/templates/countryconfig-template/tilt/examples/opencrvs-services/values.yaml +56 -0
- package/dist/templates/countryconfig-template/tilt/examples/traefik/values-minikube.yaml +21 -0
- package/dist/templates/countryconfig-template/tilt/examples/traefik/values.yaml +38 -0
- package/dist/templates/countryconfig-template/tilt/helm/dependencies/values.yaml +17 -0
- package/dist/templates/countryconfig-template/tilt/helm/opencrvs-services/values.yaml +16 -0
- package/dist/templates/countryconfig-template/tilt/lib.tilt +95 -0
- package/dist/templates/countryconfig-template/tilt/opencrvs.tilt +136 -0
- package/dist/translations/template.d.ts +11 -0
- package/dist/translations/template.d.ts.map +1 -0
- package/dist/translations/template.js +100 -0
- package/dist/verify/endpoints.d.ts.map +1 -1
- package/dist/verify/endpoints.js +180 -15
- package/opencrvs-toolkit-2.1.0-rc.d235243.tgz +0 -0
- package/package.json +2 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts +0 -3
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +0 -429
- package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +0 -3
- package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +0 -1
- package/dist/migrations/v2.0/add-resend-invite-notification.js +0 -373
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -22
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +0 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +0 -146
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts +0 -2
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +0 -1
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +0 -838
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts +0 -3
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +0 -1
- package/dist/migrations/v2.0/convert-paragraph-to-heading.js +0 -158
- package/dist/migrations/v2.0/create-events-index.d.ts +0 -3
- package/dist/migrations/v2.0/create-events-index.d.ts.map +0 -1
- package/dist/migrations/v2.0/create-events-index.js +0 -325
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +0 -11
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
- package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -123
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +0 -3
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +0 -1
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +0 -110
- package/dist/migrations/v2.0/index.d.ts +0 -13
- package/dist/migrations/v2.0/index.d.ts.map +0 -1
- package/dist/migrations/v2.0/index.js +0 -103
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts +0 -3
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +0 -1
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +0 -432
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -13
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
- package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -222
- package/dist/migrations/v2.0/migrate-application-config-url.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-application-config-url.js +0 -343
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-scopes.js +0 -305
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +0 -267
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts +0 -3
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +0 -1
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +0 -317
- package/dist/migrations/v2.0/remove-delete-actions.d.ts +0 -3
- package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-delete-actions.js +0 -156
- package/dist/migrations/v2.0/remove-demo-scope.d.ts +0 -3
- package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-demo-scope.js +0 -74
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts +0 -3
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-deprecated-imports.js +0 -96
- package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +0 -3
- package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-fhir-url-helpers.js +0 -163
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts +0 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-hearth-migrations.js +0 -87
- package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +0 -3
- package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-old-statistics-service.js +0 -356
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts +0 -3
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-pending-certification-flag.js +0 -109
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts +0 -3
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-review-from-register-action.js +0 -163
- package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +0 -3
- package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +0 -1
- package/dist/migrations/v2.0/remove-unused-environment-variables.js +0 -186
- package/dist/migrations/v2.0/rename-api-paths.d.ts.map +0 -1
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts +0 -3
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +0 -1
- package/dist/migrations/v2.0/rename-location-parent-id.js +0 -180
- package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts +0 -3
- package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +0 -1
- package/dist/migrations/v2.0/simplify-analytics-precalculations.js +0 -195
- package/dist/migrations/v2.0/update-package-json.d.ts +0 -3
- package/dist/migrations/v2.0/update-package-json.d.ts.map +0 -1
- package/dist/migrations/v2.0/update-package-json.js +0 -105
- package/dist/translations/check.d.ts +0 -19
- package/dist/translations/check.d.ts.map +0 -1
- package/dist/translations/check.js +0 -127
- package/opencrvs-toolkit-2.1.0-rc.d1b9774.tgz +0 -0
|
@@ -1890,8 +1890,9 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1890
1890
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
1891
1891
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
1892
1892
|
"profile.electronic-signature": "profile.electronic-signature";
|
|
1893
|
+
"record.action.accept": "record.action.accept";
|
|
1894
|
+
"record.action.reject": "record.action.reject";
|
|
1893
1895
|
"record.archive": "record.archive";
|
|
1894
|
-
"record.confirm-registration": "record.confirm-registration";
|
|
1895
1896
|
"record.correct": "record.correct";
|
|
1896
1897
|
"record.create": "record.create";
|
|
1897
1898
|
"record.custom-action": "record.custom-action";
|
|
@@ -1904,7 +1905,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1904
1905
|
"record.register": "record.register";
|
|
1905
1906
|
"record.reindex": "record.reindex";
|
|
1906
1907
|
"record.reject": "record.reject";
|
|
1907
|
-
"record.reject-registration": "record.reject-registration";
|
|
1908
1908
|
"record.request-correction": "record.request-correction";
|
|
1909
1909
|
"record.review-duplicates": "record.review-duplicates";
|
|
1910
1910
|
"record.search": "record.search";
|
|
@@ -1920,6 +1920,8 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1920
1920
|
}>;
|
|
1921
1921
|
$option: z.ZodEnum<{
|
|
1922
1922
|
accessLevel: "accessLevel";
|
|
1923
|
+
createdBy: "createdBy";
|
|
1924
|
+
createdIn: "createdIn";
|
|
1923
1925
|
declaredBy: "declaredBy";
|
|
1924
1926
|
declaredIn: "declaredIn";
|
|
1925
1927
|
event: "event";
|
|
@@ -1935,7 +1937,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1935
1937
|
}>;
|
|
1936
1938
|
}, z.core.$strip>]>;
|
|
1937
1939
|
}, z.core.$strip>>;
|
|
1938
|
-
listHistoricalNames: z.ZodOptional<z.ZodBoolean>;
|
|
1939
1940
|
activeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1940
1941
|
anchorToDateOfEvent: z.ZodOptional<z.ZodBoolean>;
|
|
1941
1942
|
}, z.core.$strip>;
|
|
@@ -2026,8 +2027,9 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2026
2027
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
2027
2028
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
2028
2029
|
"profile.electronic-signature": "profile.electronic-signature";
|
|
2030
|
+
"record.action.accept": "record.action.accept";
|
|
2031
|
+
"record.action.reject": "record.action.reject";
|
|
2029
2032
|
"record.archive": "record.archive";
|
|
2030
|
-
"record.confirm-registration": "record.confirm-registration";
|
|
2031
2033
|
"record.correct": "record.correct";
|
|
2032
2034
|
"record.create": "record.create";
|
|
2033
2035
|
"record.custom-action": "record.custom-action";
|
|
@@ -2040,7 +2042,6 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2040
2042
|
"record.register": "record.register";
|
|
2041
2043
|
"record.reindex": "record.reindex";
|
|
2042
2044
|
"record.reject": "record.reject";
|
|
2043
|
-
"record.reject-registration": "record.reject-registration";
|
|
2044
2045
|
"record.request-correction": "record.request-correction";
|
|
2045
2046
|
"record.review-duplicates": "record.review-duplicates";
|
|
2046
2047
|
"record.search": "record.search";
|
|
@@ -2056,6 +2057,8 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2056
2057
|
}>;
|
|
2057
2058
|
$option: z.ZodEnum<{
|
|
2058
2059
|
accessLevel: "accessLevel";
|
|
2060
|
+
createdBy: "createdBy";
|
|
2061
|
+
createdIn: "createdIn";
|
|
2059
2062
|
declaredBy: "declaredBy";
|
|
2060
2063
|
declaredIn: "declaredIn";
|
|
2061
2064
|
event: "event";
|
|
@@ -2071,7 +2074,6 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2071
2074
|
}>;
|
|
2072
2075
|
}, z.core.$strip>]>;
|
|
2073
2076
|
}, z.core.$strip>>;
|
|
2074
|
-
listHistoricalNames: z.ZodOptional<z.ZodBoolean>;
|
|
2075
2077
|
activeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2076
2078
|
anchorToDateOfEvent: z.ZodOptional<z.ZodBoolean>;
|
|
2077
2079
|
}, z.core.$strip>>;
|
|
@@ -2233,8 +2235,9 @@ declare const Facility: z.ZodObject<{
|
|
|
2233
2235
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
2234
2236
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
2235
2237
|
"profile.electronic-signature": "profile.electronic-signature";
|
|
2238
|
+
"record.action.accept": "record.action.accept";
|
|
2239
|
+
"record.action.reject": "record.action.reject";
|
|
2236
2240
|
"record.archive": "record.archive";
|
|
2237
|
-
"record.confirm-registration": "record.confirm-registration";
|
|
2238
2241
|
"record.correct": "record.correct";
|
|
2239
2242
|
"record.create": "record.create";
|
|
2240
2243
|
"record.custom-action": "record.custom-action";
|
|
@@ -2247,7 +2250,6 @@ declare const Facility: z.ZodObject<{
|
|
|
2247
2250
|
"record.register": "record.register";
|
|
2248
2251
|
"record.reindex": "record.reindex";
|
|
2249
2252
|
"record.reject": "record.reject";
|
|
2250
|
-
"record.reject-registration": "record.reject-registration";
|
|
2251
2253
|
"record.request-correction": "record.request-correction";
|
|
2252
2254
|
"record.review-duplicates": "record.review-duplicates";
|
|
2253
2255
|
"record.search": "record.search";
|
|
@@ -2263,6 +2265,8 @@ declare const Facility: z.ZodObject<{
|
|
|
2263
2265
|
}>;
|
|
2264
2266
|
$option: z.ZodEnum<{
|
|
2265
2267
|
accessLevel: "accessLevel";
|
|
2268
|
+
createdBy: "createdBy";
|
|
2269
|
+
createdIn: "createdIn";
|
|
2266
2270
|
declaredBy: "declaredBy";
|
|
2267
2271
|
declaredIn: "declaredIn";
|
|
2268
2272
|
event: "event";
|
|
@@ -2278,7 +2282,6 @@ declare const Facility: z.ZodObject<{
|
|
|
2278
2282
|
}>;
|
|
2279
2283
|
}, z.core.$strip>]>;
|
|
2280
2284
|
}, z.core.$strip>>;
|
|
2281
|
-
listHistoricalNames: z.ZodOptional<z.ZodBoolean>;
|
|
2282
2285
|
activeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2283
2286
|
anchorToDateOfEvent: z.ZodOptional<z.ZodBoolean>;
|
|
2284
2287
|
}, z.core.$strip>>;
|
|
@@ -2355,8 +2358,9 @@ declare const Office: z.ZodObject<{
|
|
|
2355
2358
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
2356
2359
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
2357
2360
|
"profile.electronic-signature": "profile.electronic-signature";
|
|
2361
|
+
"record.action.accept": "record.action.accept";
|
|
2362
|
+
"record.action.reject": "record.action.reject";
|
|
2358
2363
|
"record.archive": "record.archive";
|
|
2359
|
-
"record.confirm-registration": "record.confirm-registration";
|
|
2360
2364
|
"record.correct": "record.correct";
|
|
2361
2365
|
"record.create": "record.create";
|
|
2362
2366
|
"record.custom-action": "record.custom-action";
|
|
@@ -2369,7 +2373,6 @@ declare const Office: z.ZodObject<{
|
|
|
2369
2373
|
"record.register": "record.register";
|
|
2370
2374
|
"record.reindex": "record.reindex";
|
|
2371
2375
|
"record.reject": "record.reject";
|
|
2372
|
-
"record.reject-registration": "record.reject-registration";
|
|
2373
2376
|
"record.request-correction": "record.request-correction";
|
|
2374
2377
|
"record.review-duplicates": "record.review-duplicates";
|
|
2375
2378
|
"record.search": "record.search";
|
|
@@ -2385,6 +2388,8 @@ declare const Office: z.ZodObject<{
|
|
|
2385
2388
|
}>;
|
|
2386
2389
|
$option: z.ZodEnum<{
|
|
2387
2390
|
accessLevel: "accessLevel";
|
|
2391
|
+
createdBy: "createdBy";
|
|
2392
|
+
createdIn: "createdIn";
|
|
2388
2393
|
declaredBy: "declaredBy";
|
|
2389
2394
|
declaredIn: "declaredIn";
|
|
2390
2395
|
event: "event";
|
|
@@ -2400,7 +2405,6 @@ declare const Office: z.ZodObject<{
|
|
|
2400
2405
|
}>;
|
|
2401
2406
|
}, z.core.$strip>]>;
|
|
2402
2407
|
}, z.core.$strip>>;
|
|
2403
|
-
listHistoricalNames: z.ZodOptional<z.ZodBoolean>;
|
|
2404
2408
|
activeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2405
2409
|
anchorToDateOfEvent: z.ZodOptional<z.ZodBoolean>;
|
|
2406
2410
|
}, z.core.$strip>>;
|
|
@@ -2563,8 +2567,9 @@ declare const Address: z.ZodObject<{
|
|
|
2563
2567
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
2564
2568
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
2565
2569
|
"profile.electronic-signature": "profile.electronic-signature";
|
|
2570
|
+
"record.action.accept": "record.action.accept";
|
|
2571
|
+
"record.action.reject": "record.action.reject";
|
|
2566
2572
|
"record.archive": "record.archive";
|
|
2567
|
-
"record.confirm-registration": "record.confirm-registration";
|
|
2568
2573
|
"record.correct": "record.correct";
|
|
2569
2574
|
"record.create": "record.create";
|
|
2570
2575
|
"record.custom-action": "record.custom-action";
|
|
@@ -2577,7 +2582,6 @@ declare const Address: z.ZodObject<{
|
|
|
2577
2582
|
"record.register": "record.register";
|
|
2578
2583
|
"record.reindex": "record.reindex";
|
|
2579
2584
|
"record.reject": "record.reject";
|
|
2580
|
-
"record.reject-registration": "record.reject-registration";
|
|
2581
2585
|
"record.request-correction": "record.request-correction";
|
|
2582
2586
|
"record.review-duplicates": "record.review-duplicates";
|
|
2583
2587
|
"record.search": "record.search";
|
|
@@ -2593,6 +2597,8 @@ declare const Address: z.ZodObject<{
|
|
|
2593
2597
|
}>;
|
|
2594
2598
|
$option: z.ZodEnum<{
|
|
2595
2599
|
accessLevel: "accessLevel";
|
|
2600
|
+
createdBy: "createdBy";
|
|
2601
|
+
createdIn: "createdIn";
|
|
2596
2602
|
declaredBy: "declaredBy";
|
|
2597
2603
|
declaredIn: "declaredIn";
|
|
2598
2604
|
event: "event";
|
|
@@ -2608,7 +2614,6 @@ declare const Address: z.ZodObject<{
|
|
|
2608
2614
|
}>;
|
|
2609
2615
|
}, z.core.$strip>]>;
|
|
2610
2616
|
}, z.core.$strip>>;
|
|
2611
|
-
listHistoricalNames: z.ZodOptional<z.ZodBoolean>;
|
|
2612
2617
|
activeOnly: z.ZodOptional<z.ZodBoolean>;
|
|
2613
2618
|
anchorToDateOfEvent: z.ZodOptional<z.ZodBoolean>;
|
|
2614
2619
|
}, z.core.$strip>>;
|
|
@@ -2827,13 +2832,19 @@ declare const ButtonField: z.ZodObject<{
|
|
|
2827
2832
|
}, z.core.$strip>;
|
|
2828
2833
|
}, z.core.$strip>;
|
|
2829
2834
|
export type ButtonField = z.infer<typeof ButtonField>;
|
|
2835
|
+
declare const FieldGroupConfiguration: z.ZodObject<{
|
|
2836
|
+
separator: z.ZodOptional<z.ZodString>;
|
|
2837
|
+
hideEmptyFields: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
2838
|
+
}, z.core.$strip>;
|
|
2830
2839
|
type FieldGroupInput = z.input<typeof BaseField> & {
|
|
2831
2840
|
type: typeof FieldType.FIELD_GROUP;
|
|
2832
2841
|
fields: FieldConfigInput[];
|
|
2842
|
+
configuration?: z.input<typeof FieldGroupConfiguration>;
|
|
2833
2843
|
};
|
|
2834
2844
|
export type FieldGroup = BaseField & {
|
|
2835
2845
|
type: typeof FieldType.FIELD_GROUP;
|
|
2836
2846
|
fields: FieldConfig[];
|
|
2847
|
+
configuration?: z.infer<typeof FieldGroupConfiguration>;
|
|
2837
2848
|
};
|
|
2838
2849
|
declare const AlphaPrintButton: z.ZodObject<{
|
|
2839
2850
|
id: z.ZodString;
|
|
@@ -29,11 +29,12 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
29
29
|
}> | z.ZodNumber | z.ZodObject<Readonly<{
|
|
30
30
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
31
31
|
}>, z.core.$strip> | z.ZodObject<{
|
|
32
|
+
age: z.ZodNumber;
|
|
33
|
+
asOfDateRef: z.ZodString;
|
|
34
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
32
35
|
path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
|
|
33
36
|
originalFilename: z.ZodString;
|
|
34
37
|
type: z.ZodString;
|
|
35
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
36
|
-
data: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
37
38
|
}, z.core.$strip> | z.ZodObject<{
|
|
38
39
|
data: z.ZodAny;
|
|
39
40
|
}, z.core.$strip> | z.ZodObject<{
|
|
@@ -42,12 +43,11 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
42
43
|
}, z.core.$strip> | z.ZodObject<{
|
|
43
44
|
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
44
45
|
unit: z.ZodOptional<z.ZodString>;
|
|
45
|
-
}, z.core.$strip> | z.ZodObject<{
|
|
46
|
-
age: z.ZodNumber;
|
|
47
|
-
asOfDateRef: z.ZodString;
|
|
48
46
|
}, z.core.$strip> | z.ZodObject<{
|
|
49
47
|
label: z.ZodString;
|
|
50
48
|
value: z.ZodString;
|
|
49
|
+
}, z.core.$strip> | z.ZodObject<{
|
|
50
|
+
data: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
51
51
|
}, z.core.$strip> | z.ZodObject<{
|
|
52
52
|
firstname: z.ZodString;
|
|
53
53
|
surname: z.ZodString;
|
|
@@ -65,11 +65,12 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
65
65
|
}>>> | z.ZodOptional<z.ZodNullable<z.ZodNumber>> | z.ZodOptional<z.ZodNullable<z.ZodObject<Readonly<{
|
|
66
66
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
67
67
|
}>, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
68
|
+
age: z.ZodNumber;
|
|
69
|
+
asOfDateRef: z.ZodString;
|
|
70
|
+
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
68
71
|
path: z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">;
|
|
69
72
|
originalFilename: z.ZodString;
|
|
70
73
|
type: z.ZodString;
|
|
71
|
-
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
72
|
-
data: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
73
74
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
74
75
|
data: z.ZodAny;
|
|
75
76
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -78,9 +79,6 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
78
79
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
79
80
|
numericValue: z.ZodOptional<z.ZodNumber>;
|
|
80
81
|
unit: z.ZodOptional<z.ZodString>;
|
|
81
|
-
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
82
|
-
age: z.ZodNumber;
|
|
83
|
-
asOfDateRef: z.ZodString;
|
|
84
82
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
85
83
|
label: z.ZodString;
|
|
86
84
|
value: z.ZodString;
|
|
@@ -154,6 +152,8 @@ export declare function mapFieldTypeToZod(field: FieldConfig, actionType?: Actio
|
|
|
154
152
|
label: z.ZodString;
|
|
155
153
|
value: z.ZodString;
|
|
156
154
|
}, z.core.$strip>>>]>>;
|
|
155
|
+
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
156
|
+
data: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
157
157
|
}, z.core.$strip>>> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
158
158
|
firstname: z.ZodString;
|
|
159
159
|
surname: z.ZodString;
|
|
@@ -19,6 +19,7 @@ export declare const HiddenFieldValue: z.ZodString;
|
|
|
19
19
|
export declare const NonEmptyTextValue: z.ZodString;
|
|
20
20
|
export declare const DateValue: z.ZodISODate;
|
|
21
21
|
export type DateValue = z.infer<typeof DateValue>;
|
|
22
|
+
export declare const AGE_MAX_VALUE = 999;
|
|
22
23
|
export declare const AgeValue: z.ZodObject<{
|
|
23
24
|
age: z.ZodNumber;
|
|
24
25
|
asOfDateRef: z.ZodString;
|
|
@@ -5,6 +5,7 @@ export declare const DeclarationFormConfig: z.ZodObject<{
|
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
7
7
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
8
9
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
9
10
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
10
11
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -18,6 +19,7 @@ export declare const ActionFormConfig: z.ZodObject<{
|
|
|
18
19
|
id: z.ZodString;
|
|
19
20
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
20
21
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
21
23
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
22
24
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
23
25
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -25,6 +27,7 @@ export declare const ActionFormConfig: z.ZodObject<{
|
|
|
25
27
|
id: z.ZodString;
|
|
26
28
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
27
29
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
28
31
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
29
32
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
30
33
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -50,6 +53,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
50
53
|
id: z.ZodString;
|
|
51
54
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
52
55
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
53
57
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
54
58
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
55
59
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -60,6 +64,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
60
64
|
id: z.ZodString;
|
|
61
65
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
62
66
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
63
68
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
64
69
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
65
70
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -67,6 +72,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
67
72
|
id: z.ZodString;
|
|
68
73
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
69
74
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
70
76
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
71
77
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
72
78
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -9,6 +9,7 @@ export declare const FormPageConfig: z.ZodObject<{
|
|
|
9
9
|
id: z.ZodString;
|
|
10
10
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
11
11
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
13
14
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
14
15
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -31,6 +32,7 @@ export declare const VerificationPageConfig: z.ZodObject<{
|
|
|
31
32
|
id: z.ZodString;
|
|
32
33
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
33
34
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
34
36
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
35
37
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
36
38
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -52,6 +54,7 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
52
54
|
id: z.ZodString;
|
|
53
55
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
54
56
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
57
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
55
58
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
56
59
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
57
60
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -59,6 +62,7 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
59
62
|
id: z.ZodString;
|
|
60
63
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
61
64
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
62
66
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
63
67
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
64
68
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -17,6 +17,10 @@ export declare const LocationStatus: z.ZodEnum<{
|
|
|
17
17
|
inactive: "inactive";
|
|
18
18
|
}>;
|
|
19
19
|
export type LocationStatus = z.infer<typeof LocationStatus>;
|
|
20
|
+
/** Thrown when a user's assigned office is inactive and must not be allowed to authenticate. */
|
|
21
|
+
export declare class InactiveOfficeError extends Error {
|
|
22
|
+
constructor(message?: string);
|
|
23
|
+
}
|
|
20
24
|
/**
|
|
21
25
|
* A single element of the `versions` history of a location or administrative
|
|
22
26
|
* area. Versions are sorted ascending by `effectiveFrom` ('0001-01-01' is used
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DisplayableAction } from './ActionType';
|
|
2
|
-
import { EncodedScope, UserScopeV2 } from '../scopes';
|
|
2
|
+
import { EncodedScope, RecordScopeTypeV2, ScopeType, UserScopeV2 } from '../scopes';
|
|
3
3
|
import { EventIndexWithAdministrativeHierarchy } from './locations';
|
|
4
4
|
import { UserContext } from '../users/User';
|
|
5
5
|
import { EventIndex } from './EventIndex';
|
|
@@ -27,6 +27,26 @@ export declare const ACTION_SCOPE_MAP: {
|
|
|
27
27
|
DUPLICATE_DETECTED: never[];
|
|
28
28
|
CUSTOM: never[];
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* The scopes of every action that can write to a record. Each of them can
|
|
32
|
+
* trigger a sweep of the record's prefix, so each of them has to be able to
|
|
33
|
+
* delete. `record.read` is absent: reading a record is not grounds for erasing
|
|
34
|
+
* it.
|
|
35
|
+
*/
|
|
36
|
+
export declare const RECORD_WRITE_SCOPES: RecordScopeTypeV2[];
|
|
37
|
+
/**
|
|
38
|
+
* Scopes that authorize deleting objects held by the documents service.
|
|
39
|
+
*
|
|
40
|
+
* Documents records no link between an object and the record it belongs to, so
|
|
41
|
+
* it cannot check that the caller owns a prefix. It checks instead that the
|
|
42
|
+
* caller holds a scope that lets them change a record or edit a user, and the
|
|
43
|
+
* service that forwarded the request has already checked that this particular
|
|
44
|
+
* record or user is theirs to act on.
|
|
45
|
+
*
|
|
46
|
+
* Listed rather than derived, so that adding an action to `ACTION_SCOPE_MAP`
|
|
47
|
+
* cannot silently grant deletion. `scopes.test.ts` fails when the two drift.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DOCUMENT_DELETE_SCOPES: ScopeType[];
|
|
30
50
|
export declare function hasAnyOfScopes(a: string[], b: string[]): boolean;
|
|
31
51
|
export declare const AssignmentStatus: {
|
|
32
52
|
readonly ASSIGNED_TO_SELF: 'ASSIGNED_TO_SELF';
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { UUID } from '../uuid';
|
|
2
2
|
import { ActionDocument, ActionUpdate } from './ActionDocument';
|
|
3
|
+
import { ValidatorContext } from '../conditionals/validate';
|
|
3
4
|
import { ApproveCorrectionActionInput, ArchiveActionInput, AssignActionInput, DeclareActionInput, EditActionInput, MarkAsDuplicateActionInput, MarkNotDuplicateActionInput, NotifyActionInput, RegisterActionInput, RejectCorrectionActionInput, RejectDeclarationActionInput, RequestCorrectionActionInput, UnarchiveActionInput, UnassignActionInput } 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 { LocationVersion, SetLocationPayload, SetAdministrativeAreaPayload } from './locations';
|
|
13
|
+
import { LocationVersion, SetLocationPayload, SetAdministrativeAreaPayload, ClientAdministrativeArea } from './locations';
|
|
13
14
|
import { WorkqueueConfig } from './WorkqueueConfig';
|
|
14
15
|
import * as z from 'zod/v4';
|
|
15
16
|
import { DocumentPath } from '../documents';
|
|
@@ -84,8 +85,11 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
84
85
|
omitFields?: string[];
|
|
85
86
|
}, input?: Partial<Draft>) => Draft;
|
|
86
87
|
actions: {
|
|
87
|
-
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
88
|
+
declare: (eventId: string, input?: Partial<Pick<DeclareActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
|
|
88
89
|
keepAssignment?: boolean | undefined;
|
|
90
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
91
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
92
|
+
waitFor?: boolean | undefined;
|
|
89
93
|
type: "DECLARE";
|
|
90
94
|
transactionId: string;
|
|
91
95
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
@@ -95,53 +99,70 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
95
99
|
/**
|
|
96
100
|
* Notify allows sending incomplete data. Think it as 'partial declare' for now.
|
|
97
101
|
*/
|
|
98
|
-
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
102
|
+
notify: (eventId: string, input?: Partial<Pick<NotifyActionInput, 'transactionId' | 'declaration' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
99
103
|
type: "NOTIFY";
|
|
100
104
|
transactionId: string;
|
|
101
105
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
102
106
|
eventId: string;
|
|
103
107
|
keepAssignment: boolean | undefined;
|
|
108
|
+
keepAssignmentIfAccepted: boolean | undefined;
|
|
109
|
+
keepAssignmentIfRejected: boolean | undefined;
|
|
110
|
+
waitFor: boolean | undefined;
|
|
104
111
|
};
|
|
105
|
-
edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
112
|
+
edit: (eventId: string, input?: Partial<Pick<EditActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
|
|
106
113
|
keepAssignment?: boolean | undefined;
|
|
114
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
115
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
116
|
+
waitFor?: boolean | undefined;
|
|
107
117
|
type: "EDIT";
|
|
108
118
|
transactionId: string;
|
|
109
119
|
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
110
120
|
annotation: {};
|
|
111
121
|
eventId: string;
|
|
112
122
|
};
|
|
113
|
-
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo'>>) => {
|
|
123
|
+
assign: (eventId: string, input?: Partial<Pick<AssignActionInput, 'transactionId' | 'assignedTo' | 'waitFor'>>) => {
|
|
114
124
|
type: "ASSIGN";
|
|
115
125
|
transactionId: string;
|
|
116
126
|
declaration: {};
|
|
117
127
|
assignedTo: string;
|
|
118
128
|
eventId: string;
|
|
129
|
+
waitFor: boolean | undefined;
|
|
119
130
|
};
|
|
120
|
-
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId'>>) => {
|
|
131
|
+
unassign: (eventId: string, input?: Partial<Pick<UnassignActionInput, 'transactionId' | 'waitFor'>>) => {
|
|
121
132
|
type: "UNASSIGN";
|
|
122
133
|
transactionId: string;
|
|
123
134
|
declaration: {};
|
|
124
135
|
assignedTo: null;
|
|
125
136
|
eventId: string;
|
|
137
|
+
waitFor: boolean | undefined;
|
|
126
138
|
};
|
|
127
|
-
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
139
|
+
archive: (eventId: string, input?: Partial<Pick<ArchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
128
140
|
keepAssignment?: boolean | undefined;
|
|
141
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
142
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
143
|
+
waitFor?: boolean | undefined;
|
|
129
144
|
type: "ARCHIVE";
|
|
130
145
|
transactionId: string;
|
|
131
146
|
declaration: {};
|
|
132
147
|
annotation: {};
|
|
133
148
|
eventId: string;
|
|
134
149
|
};
|
|
135
|
-
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment'>>) => {
|
|
150
|
+
unarchive: (eventId: string, input?: Partial<Pick<UnarchiveActionInput, 'transactionId' | 'declaration' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
136
151
|
keepAssignment?: boolean | undefined;
|
|
152
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
153
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
154
|
+
waitFor?: boolean | undefined;
|
|
137
155
|
type: "UNARCHIVE";
|
|
138
156
|
transactionId: string;
|
|
139
157
|
declaration: {};
|
|
140
158
|
annotation: {};
|
|
141
159
|
eventId: string;
|
|
142
160
|
};
|
|
143
|
-
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
161
|
+
reject: (eventId: string, input?: Partial<Pick<RejectDeclarationActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
|
|
144
162
|
keepAssignment?: boolean | undefined;
|
|
163
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
164
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
165
|
+
waitFor?: boolean | undefined;
|
|
145
166
|
type: "REJECT";
|
|
146
167
|
transactionId: string;
|
|
147
168
|
declaration: {};
|
|
@@ -151,8 +172,11 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
151
172
|
reason: string;
|
|
152
173
|
};
|
|
153
174
|
};
|
|
154
|
-
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber'>>) => {
|
|
175
|
+
register: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'registrationNumber' | 'keepAssignmentIfAccepted' | 'keepAssignmentIfRejected' | 'waitFor'>>) => {
|
|
155
176
|
keepAssignment?: boolean | undefined;
|
|
177
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
178
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
179
|
+
waitFor?: boolean | undefined;
|
|
156
180
|
registrationNumber?: string | undefined;
|
|
157
181
|
type: "REGISTER";
|
|
158
182
|
transactionId: string;
|
|
@@ -160,8 +184,11 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
160
184
|
annotation: {};
|
|
161
185
|
eventId: string;
|
|
162
186
|
};
|
|
163
|
-
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
187
|
+
printCertificate: (eventId: string, input?: Partial<Pick<RegisterActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
164
188
|
keepAssignment?: boolean | undefined;
|
|
189
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
190
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
191
|
+
waitFor?: boolean | undefined;
|
|
165
192
|
type: "PRINT_CERTIFICATE";
|
|
166
193
|
transactionId: string;
|
|
167
194
|
declaration: {};
|
|
@@ -169,15 +196,18 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
169
196
|
eventId: string;
|
|
170
197
|
};
|
|
171
198
|
correction: {
|
|
172
|
-
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment'>>) => {
|
|
199
|
+
request: (eventId: string, input?: Partial<Pick<RequestCorrectionActionInput, 'transactionId' | 'declaration' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
173
200
|
type: "REQUEST_CORRECTION";
|
|
174
201
|
transactionId: string;
|
|
175
202
|
declaration: import("lodash").Omit<Record<string, import("./FieldValue").FieldUpdateValue>, "applicant.email" | "applicant.image">;
|
|
176
203
|
annotation: {};
|
|
177
204
|
eventId: string;
|
|
178
205
|
keepAssignment: boolean | undefined;
|
|
206
|
+
keepAssignmentIfAccepted: boolean | undefined;
|
|
207
|
+
keepAssignmentIfRejected: boolean | undefined;
|
|
208
|
+
waitFor: boolean | undefined;
|
|
179
209
|
};
|
|
180
|
-
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment'>>) => {
|
|
210
|
+
approve: (eventId: string, requestId: string, input?: Partial<Pick<ApproveCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
181
211
|
type: "APPROVE_CORRECTION";
|
|
182
212
|
transactionId: string;
|
|
183
213
|
declaration: {};
|
|
@@ -185,18 +215,24 @@ export declare function eventPayloadGenerator(rng: () => number, configuration?:
|
|
|
185
215
|
eventId: string;
|
|
186
216
|
requestId: string;
|
|
187
217
|
keepAssignment: boolean | undefined;
|
|
218
|
+
keepAssignmentIfAccepted: boolean | undefined;
|
|
219
|
+
keepAssignmentIfRejected: boolean | undefined;
|
|
220
|
+
waitFor: boolean | undefined;
|
|
188
221
|
};
|
|
189
|
-
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'keepAssignment' | '
|
|
222
|
+
reject: (eventId: string, requestId: string, input: Partial<Pick<RejectCorrectionActionInput, 'transactionId' | 'annotation' | 'content' | 'keepAssignment' | 'keepAssignmentIfRejected' | 'keepAssignmentIfAccepted' | 'waitFor'>>) => {
|
|
190
223
|
type: "REJECT_CORRECTION";
|
|
191
224
|
transactionId: string;
|
|
192
225
|
declaration: {};
|
|
193
226
|
annotation: {};
|
|
194
227
|
eventId: string;
|
|
195
228
|
requestId: string;
|
|
196
|
-
keepAssignment: boolean | undefined;
|
|
197
229
|
content: {
|
|
198
230
|
reason: string;
|
|
199
231
|
};
|
|
232
|
+
keepAssignment: boolean | undefined;
|
|
233
|
+
keepAssignmentIfAccepted: boolean | undefined;
|
|
234
|
+
keepAssignmentIfRejected: boolean | undefined;
|
|
235
|
+
waitFor: boolean | undefined;
|
|
200
236
|
};
|
|
201
237
|
};
|
|
202
238
|
duplicate: {
|
|
@@ -275,11 +311,6 @@ export declare function createPrng(seed: number): () => number;
|
|
|
275
311
|
*/
|
|
276
312
|
export declare const eventQueryDataGenerator: (overrides?: Partial<EventIndex>, seed?: number) => EventIndex;
|
|
277
313
|
export declare const generateTranslationConfig: (message: string) => TranslationConfig;
|
|
278
|
-
export declare const BearerTokenByUserType: {
|
|
279
|
-
fieldAgent: string;
|
|
280
|
-
registrationAgent: string;
|
|
281
|
-
localRegistrar: string;
|
|
282
|
-
};
|
|
283
314
|
export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
|
|
284
315
|
/**
|
|
285
316
|
* Backend focused event config generator for testing fields in a lightweight way.
|
|
@@ -289,10 +320,28 @@ export declare const generateWorkqueues: (slug?: string) => WorkqueueConfig[];
|
|
|
289
320
|
* @param placeOfEventId - Optional place of event field id.
|
|
290
321
|
* @param dateOfEventId - Optional date of event field id.
|
|
291
322
|
*/
|
|
292
|
-
export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfEventId }: {
|
|
323
|
+
export declare const generateEventConfig: ({ id, fields, placeOfEventId, dateOfEventId, actions }: {
|
|
293
324
|
id: string;
|
|
294
325
|
fields: FieldConfig[];
|
|
295
326
|
placeOfEventId?: string;
|
|
296
327
|
dateOfEventId?: string;
|
|
328
|
+
/** Extra actions appended to the default READ + DECLARE pair, e.g. a REQUEST_CORRECTION action with its own correctionForm. */
|
|
329
|
+
actions?: EventConfigInput['actions'];
|
|
297
330
|
}) => EventConfig;
|
|
331
|
+
/**
|
|
332
|
+
* Get the leaf administrative area IDs from a list of administrative areas.
|
|
333
|
+
*
|
|
334
|
+
* A leaf administrative area is defined as an administrative area that does not have any children in the provided list.
|
|
335
|
+
* AdministrativeArea might have a CRVS_OFFICE as children, but is still considered to be a leaf administrative area.
|
|
336
|
+
*
|
|
337
|
+
* @param administrativeAreas - The list of administrative areas to search.
|
|
338
|
+
* @returns The list of leaf administrative area IDs.
|
|
339
|
+
*/
|
|
340
|
+
export declare function getLeafAdministrativeAreaIds(administrativeAreas: Map<UUID, ClientAdministrativeArea>): Array<{
|
|
341
|
+
id: UUID;
|
|
342
|
+
}>;
|
|
343
|
+
export declare function generateTestValidatorContext(userRole?: TestUserRole, eventWithConfig?: {
|
|
344
|
+
event: EventDocument;
|
|
345
|
+
eventConfig: EventConfig;
|
|
346
|
+
}): ValidatorContext;
|
|
298
347
|
//# sourceMappingURL=test.utils.d.ts.map
|