@opencrvs/toolkit 2.0.0-rc.b63fd2e → 2.0.0-rc.bee2b7b
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/dist/application-config/index.js +36 -7
- package/dist/cli.js +178 -1390
- package/dist/commons/events/locations.d.ts +17 -1
- package/dist/conditionals/index.js +36 -7
- package/dist/events/index.js +74 -7
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -1
- package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +4 -3
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -19
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +13 -17
- package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -1
- package/dist/migrations/v2.0/convert-config-files-to-ts.js +5 -4
- package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -1
- package/dist/migrations/v2.0/convert-paragraph-to-heading.js +5 -4
- package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -1
- package/dist/migrations/v2.0/create-events-index.js +2 -1
- package/dist/migrations/v2.0/index.d.ts +4 -8
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +175 -1358
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -1
- package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +6 -5
- package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-scopes.js +7 -6
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +4 -3
- package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
- package/dist/migrations/v2.0/migrate-workqueue-configs.js +4 -3
- package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -1
- package/dist/migrations/v2.0/remove-delete-actions.js +4 -3
- package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -1
- package/dist/migrations/v2.0/remove-demo-scope.js +3 -2
- package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -1
- package/dist/migrations/v2.0/remove-deprecated-imports.js +4 -3
- package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -1
- package/dist/migrations/v2.0/remove-hearth-migrations.js +2 -1
- package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -1
- package/dist/migrations/v2.0/remove-pending-certification-flag.js +4 -3
- package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -1
- package/dist/migrations/v2.0/remove-review-from-register-action.js +4 -3
- package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -1
- package/dist/migrations/v2.0/rename-api-paths.js +4 -3
- package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -1
- package/dist/migrations/v2.0/rename-location-parent-id.js +4 -3
- package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -1
- package/dist/migrations/v2.0/simplify-analytics-precalculations.js +2 -1
- package/dist/notification/index.js +36 -7
- package/dist/scopes/index.d.ts +80 -10
- package/dist/scopes/index.js +42 -8
- package/opencrvs-toolkit-2.0.0-rc.bee2b7b.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- 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/delete-infrastructure-directory.d.ts +0 -3
- package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
- package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -77
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -3
- package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
- package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -221
- 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 -342
- 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-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-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/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/opencrvs-toolkit-2.0.0-rc.b63fd2e.tgz +0 -0
|
@@ -656,6 +656,10 @@ var scopeByEvent = z11.preprocess(
|
|
|
656
656
|
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
657
657
|
z11.array(z11.string()).optional()
|
|
658
658
|
).describe("Event type, e.g. birth, death");
|
|
659
|
+
var userRole = z11.preprocess(
|
|
660
|
+
(val) => val === void 0 ? void 0 : [val].flat(),
|
|
661
|
+
z11.array(z11.string()).optional()
|
|
662
|
+
).describe("User role, e.g. admin, field agent");
|
|
659
663
|
var scopeOptionsPlaceEvent = z11.object({
|
|
660
664
|
event: scopeByEvent,
|
|
661
665
|
placeOfEvent: JurisdictionFilter.optional()
|
|
@@ -760,6 +764,33 @@ var RecordScopeV2 = z11.discriminatedUnion("type", [
|
|
|
760
764
|
]).describe(
|
|
761
765
|
"Scopes used to check user's permission to perform actions on a record."
|
|
762
766
|
);
|
|
767
|
+
var SystemScopeType = z11.enum([
|
|
768
|
+
"organisation.read-locations",
|
|
769
|
+
"user.read",
|
|
770
|
+
"user.create",
|
|
771
|
+
"user.edit"
|
|
772
|
+
]);
|
|
773
|
+
var UserScopeType = SystemScopeType.extract([
|
|
774
|
+
"user.read",
|
|
775
|
+
"user.create",
|
|
776
|
+
"user.edit"
|
|
777
|
+
]);
|
|
778
|
+
var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
|
|
779
|
+
var UserScopeV2 = z11.discriminatedUnion("type", [
|
|
780
|
+
z11.object({
|
|
781
|
+
type: ScopesWithRoleOption,
|
|
782
|
+
options: z11.object({
|
|
783
|
+
accessLevel: JurisdictionFilter.optional(),
|
|
784
|
+
role: userRole.optional()
|
|
785
|
+
}).optional()
|
|
786
|
+
}),
|
|
787
|
+
z11.object({
|
|
788
|
+
type: UserScopeType.extract(["user.read"]),
|
|
789
|
+
options: z11.object({
|
|
790
|
+
accessLevel: JurisdictionFilter.optional()
|
|
791
|
+
}).optional()
|
|
792
|
+
})
|
|
793
|
+
]);
|
|
763
794
|
var ResolvedRecordScopeV2 = z11.discriminatedUnion("type", [
|
|
764
795
|
z11.object({
|
|
765
796
|
type: ScopesWithPlaceEventOptions,
|
|
@@ -780,16 +811,14 @@ var ResolvedRecordScopeV2 = z11.discriminatedUnion("type", [
|
|
|
780
811
|
}).optional()
|
|
781
812
|
})
|
|
782
813
|
]).describe("Resolved scope with location/user IDs instead of filters.");
|
|
783
|
-
var SystemScopeType = z11.enum([
|
|
784
|
-
"organisation.read-locations",
|
|
785
|
-
"user.read",
|
|
786
|
-
"user.create",
|
|
787
|
-
"user.edit"
|
|
788
|
-
]);
|
|
789
814
|
var Scope = z11.discriminatedUnion("type", [
|
|
790
815
|
z11.object({ type: PlainScopeType }),
|
|
791
816
|
...RecordScopeV2.options,
|
|
792
|
-
|
|
817
|
+
...UserScopeV2.options,
|
|
818
|
+
z11.object({
|
|
819
|
+
type: z11.literal("organisation.read-locations"),
|
|
820
|
+
options: AccessLevelOptions.optional()
|
|
821
|
+
}),
|
|
793
822
|
z11.object({
|
|
794
823
|
type: z11.literal("workqueue"),
|
|
795
824
|
options: WorkqueueOrDashboardOptions
|