refactor: migrate vendor auth, profile, team, dashboard, settings to modules

Tenancy module (identity & organizational hierarchy):
- vendor_auth.py: login, logout, /me endpoints
- vendor_profile.py: vendor profile get/update
- vendor_team.py: team management, roles, permissions, invitations

Core module (foundational non-domain features):
- vendor_dashboard.py: dashboard statistics
- vendor_settings.py: localization, business info, letzshop settings

All routes auto-discovered via is_self_contained=True.
Deleted 5 legacy files from app/api/v1/vendor/.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 15:09:41 +01:00
parent d747f9ebaa
commit da3f28849e
12 changed files with 105 additions and 52 deletions

View File

@@ -2,12 +2,13 @@
"""
Tenancy module vendor API routes.
Provides public vendor information lookup for:
- Vendor login pages to display branding
- Public vendor profile lookup
Aggregates all vendor tenancy routes:
- /info/{vendor_code} - Public vendor info lookup
- /auth/* - Vendor authentication (login, logout, /me)
- /profile/* - Vendor profile management
- /team/* - Team member management, roles, permissions
These endpoints do NOT require authentication - they provide
public information about vendors.
The tenancy module owns identity and organizational hierarchy.
"""
import logging
@@ -80,3 +81,17 @@ def get_vendor_info(
owner_email=vendor.company.owner.email,
owner_username=vendor.company.owner.username,
)
# ============================================================================
# Aggregate Sub-Routers
# ============================================================================
# Include all tenancy vendor routes (auth, profile, team)
from .vendor_auth import vendor_auth_router
from .vendor_profile import vendor_profile_router
from .vendor_team import vendor_team_router
vendor_router.include_router(vendor_auth_router, tags=["vendor-auth"])
vendor_router.include_router(vendor_profile_router, tags=["vendor-profile"])
vendor_router.include_router(vendor_team_router, tags=["vendor-team"])