Add statistics endpoint

This commit is contained in:
Jack Kingsman
2026-02-15 12:54:42 -08:00
parent 3756579f9d
commit 1f3042f360
12 changed files with 696 additions and 1 deletions
+27
View File
@@ -296,3 +296,30 @@ class AppSettings(BaseModel):
default_factory=list,
description="List of bot configurations",
)
class BusyChannel(BaseModel):
channel_key: str
channel_name: str
message_count: int
class ContactActivityCounts(BaseModel):
last_hour: int
last_24_hours: int
last_week: int
class StatisticsResponse(BaseModel):
busiest_channels_24h: list[BusyChannel]
contact_count: int
repeater_count: int
channel_count: int
total_packets: int
decrypted_packets: int
undecrypted_packets: int
total_dms: int
total_channel_messages: int
total_outgoing: int
contacts_heard: ContactActivityCounts
repeaters_heard: ContactActivityCounts