from __future__ import annotations from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER from govoplan_core.core.policy import CAPABILITY_POLICY_PRIVACY_RETENTION from govoplan_core.core.modules import ModuleContext, ModuleManifest def _route_factory(context: ModuleContext): del context from govoplan_policy.backend.api.v1.routes import router return router def _privacy_retention_service(context: ModuleContext) -> object: del context from govoplan_policy.backend.retention import SqlPrivacyRetentionService return SqlPrivacyRetentionService() manifest = ModuleManifest( id="policy", name="Policy", version="0.1.6", required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR), route_factory=_route_factory, capability_factories={ CAPABILITY_POLICY_PRIVACY_RETENTION: _privacy_retention_service, }, ) def get_manifest() -> ModuleManifest: return manifest