"""Backward-compatible re-exports from :mod:`app.domain.errors`.

All domain errors now live in ``errors.py``.  This module preserves the
old import paths so that existing code keeps working without changes::

    from app.domain.exceptions import InvalidTransitionError  # still works
"""

# Import # noqa: F401 from app.domain.errors
from app.domain.errors import (  # noqa: F401
    BusinessRuleViolation,
    DomainError,
    DuplicateEntityError,
    EntityNotFoundError,
    InvalidOperationError,
    InvalidStateTransition,
    PermissionViolation,
)

# Legacy aliases — old name → new name
DomainException = DomainError
# Assign InvalidTransitionError = InvalidStateTransition
InvalidTransitionError = InvalidStateTransition
# Assign AuthorizationError = PermissionViolation
AuthorizationError = PermissionViolation
