Files
govoplan-booking/src/govoplan_booking/backend/manifest.py
T
zemion 1400a9f6a0
Module Package Release / publish-packages (push) Successful in 10s
docs: complete public documentation baseline
2026-08-22 07:55:17 +02:00

127 lines
5.0 KiB
Python

from __future__ import annotations
from govoplan_core.core.access import CAPABILITY_AUTH_PERMISSION_EVALUATOR, CAPABILITY_AUTH_PRINCIPAL_RESOLVER
from govoplan_core.core.modules import DocumentationLink, DocumentationTopic, ModuleManifest, PermissionDefinition, RoleTemplate
from govoplan_core.core.provider_governance import declared_module_architecture
MODULE_ID = "booking"
MODULE_NAME = "Booking"
MODULE_VERSION = "0.1.19"
READ_SCOPE = "booking:workspace:read"
WRITE_SCOPE = "booking:workspace:write"
ADMIN_SCOPE = "booking:workspace:admin"
OPTIONAL_DEPENDENCIES = (
"resources",
"calendar",
"appointments",
"scheduling",
"mail",
"notifications",
"files",
"workflow_engine",
"approvals",
"portal",
)
def _permission(scope: str, label: str, description: str) -> PermissionDefinition:
module_id, resource, action = scope.split(":", 2)
return PermissionDefinition(
scope=scope,
label=label,
description=description,
category="Booking",
level="tenant",
module_id=module_id,
resource=resource,
action=action,
)
PERMISSIONS = (
_permission(READ_SCOPE, "View booking workspace", "Read booking records, configuration, and workflow context."),
_permission(WRITE_SCOPE, "Manage booking workspace", "Create and update booking records and workflow state."),
_permission(ADMIN_SCOPE, "Administer booking workspace", "Configure booking policies, templates, and tenant-level administration."),
)
ROLE_TEMPLATES = (
RoleTemplate(
slug="booking_manager",
name="Booking manager",
description="Manage booking records and workflow state.",
permissions=(READ_SCOPE, WRITE_SCOPE),
),
RoleTemplate(
slug="booking_viewer",
name="Booking viewer",
description="Read booking records and workflow context.",
permissions=(READ_SCOPE,),
),
)
DOCUMENTATION = (
DocumentationTopic(
id=f"{MODULE_ID}.module-boundary",
title=f"{MODULE_NAME} module boundary",
summary="Booking procedures for rooms, resources, counters, equipment, appointment types, public slots, internal reservations, waiting lists, cancellations, attendance, and no-shows.",
body=(
"This repository is currently a platform module seed. It registers the domain boundary, "
"permission surface, role templates, and documentation metadata before runtime APIs, "
"database models, migrations, and WebUI routes are introduced."
),
layer="available",
documentation_types=("admin", "user"),
audience=("user", "operator", "module_admin", "product_owner"),
translations={
"de": {
"title": "Modulgrenze von Booking",
"summary": "Buchungsverfahren für Räume, Ressourcen, Schalter, Ausstattung, Terminarten, öffentliche Zeitfenster, interne Reservierungen, Wartelisten, Absagen, Anwesenheit und Nichterscheinen.",
"body": "Dieses Repository ist derzeit ein Grundgerüst für ein Plattformmodul. Es registriert die Fachgrenze, Berechtigungsoberfläche, Rollenvorlagen und Dokumentationsmetadaten, bevor Laufzeit-APIs, Datenbankmodelle, Migrationen und WebUI-Routen eingeführt werden.",
}
},
order=100,
related_modules=OPTIONAL_DEPENDENCIES,
links=(
DocumentationLink(
label="Repository domain boundary",
href="govoplan-booking/docs/BOOKING_DOMAIN_BOUNDARY.md",
kind="repository",
),
),
metadata={
"kind": "reference",
"seed": True,
"consequence_classes": {
"seed_boundary": "Declares ownership and permissions only; no runtime workflow is available yet.",
},
"domain_objects": ['booking procedures', 'public and internal slot allocation', 'waiting lists', 'reservation lifecycle', 'attendance and no-show facts'],
"first_slice": "Define booking type, slot, reservation, attendance, cancellation, and no-show concepts, then add APIs for tenant-local booking configuration.",
},
),
)
manifest = ModuleManifest(
id=MODULE_ID,
name=MODULE_NAME,
version=MODULE_VERSION,
dependencies=("access",),
optional_dependencies=OPTIONAL_DEPENDENCIES,
required_capabilities=(CAPABILITY_AUTH_PRINCIPAL_RESOLVER, CAPABILITY_AUTH_PERMISSION_EVALUATOR),
permissions=PERMISSIONS,
role_templates=ROLE_TEMPLATES,
documentation=DOCUMENTATION,
architecture=declared_module_architecture(
layer="communication_participation",
kind="domain",
maturity="scaffold",
documentation_ref="docs/BOOKING_DOMAIN_BOUNDARY.md",
known_limits=("Bookable-resource persistence and reservation workflows are not implemented yet.",),
owned_concepts=("booking", "availability offer", "reservation"),
non_owned_concepts=("calendar event", "resource master", "payment"),
),
)
def get_manifest() -> ModuleManifest:
return manifest