mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-13 09:02:23 +00:00
- Merge leggend API components into leggen (api/, services/, background/) - Replace leggend command with 'leggen server' subcommand - Consolidate configuration systems into leggen.utils.config - Update environment variables: LEGGEND_API_URL -> LEGGEN_API_URL - Rename LeggendAPIClient -> LeggenAPIClient - Update all documentation, Docker configs, and compose files - Fix all import statements and test references - Remove duplicate utility files and clean up package structure All tests passing (101/101), linting clean, server functionality preserved. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
598 B
Python
30 lines
598 B
Python
from typing import Any, Dict, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class APIResponse(BaseModel):
|
|
"""Base API response model"""
|
|
|
|
success: bool = True
|
|
message: Optional[str] = None
|
|
data: Optional[Any] = None
|
|
|
|
|
|
class ErrorResponse(BaseModel):
|
|
"""Error response model"""
|
|
|
|
success: bool = False
|
|
message: str
|
|
error_code: Optional[str] = None
|
|
details: Optional[Dict[str, Any]] = None
|
|
|
|
|
|
class PaginatedResponse(BaseModel):
|
|
"""Paginated response model"""
|
|
|
|
success: bool = True
|
|
data: list
|
|
pagination: Dict[str, Any]
|
|
message: Optional[str] = None
|