first commit

This commit is contained in:
2025-12-02 21:26:08 +01:00
commit 790f4a9f1d
23 changed files with 4085 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
from typing import Dict, Any
from pydantic import BaseModel, Field
class ProjectInfo(BaseModel):
"""Project information model."""
id: int
activity: Dict[str, Any]
class TimeReportResponse(BaseModel):
"""Response model for time reporting endpoint."""
message: str
reported_days: int
total_hours: float
project_name: str
user_name: str
class TimeEvent(BaseModel):
"""Time event model for Kleer API."""
foreign_id: str = Field(default="", alias="foreign-id")
user: Dict[str, int]
client_project: int = Field(alias="client-project")
activity: Dict[str, Any]
date: str
hours: float
comment: str = ""
internal_comment: str = Field(default="", alias="internal-comment")
class Config:
populate_by_name = True
class UserInfo(BaseModel):
"""User information model."""
id: int
name: str
class ProjectResponse(BaseModel):
"""Project response model."""
id: int
name: str
activity_id: Dict[str, Any]