Implement RecentlyOnScope domain digest
This commit is contained in:
parent
0ccbb13892
commit
bb985812e5
15 changed files with 1187 additions and 8 deletions
35
api/schemas/recently_on_scope.py
Normal file
35
api/schemas/recently_on_scope.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class RecentlyOnScopeGenerate(BaseModel):
|
||||
range: str = Field(default="1h", description="Time range such as 15m, 1h, 6h, or 1d")
|
||||
since: datetime | None = None
|
||||
until: datetime | None = None
|
||||
|
||||
|
||||
class RecentlyOnScopeSourceCounts(BaseModel):
|
||||
progress_events: int = 0
|
||||
decisions: int = 0
|
||||
workstreams: int = 0
|
||||
tasks: int = 0
|
||||
repos: int = 0
|
||||
attention_items: int = 0
|
||||
|
||||
|
||||
class RecentlyOnScopeReportMetadata(BaseModel):
|
||||
id: str
|
||||
domain_slug: str
|
||||
range: str
|
||||
since: datetime
|
||||
until: datetime
|
||||
generated_at: datetime
|
||||
path: str
|
||||
source_counts: RecentlyOnScopeSourceCounts
|
||||
|
||||
|
||||
class RecentlyOnScopeGeneratedReport(RecentlyOnScopeReportMetadata):
|
||||
markdown: str
|
||||
Loading…
Add table
Add a link
Reference in a new issue