feat(watcher,api,frontend): watched bots become accounts and drain the update backlog
This commit is contained in:
1 parent
4bd031f21e
commit
b0ed041c2e
21 files changed
+414
-1155
No files matched your search
@@ -22,6 +22,7 @@ class AccountView(BaseModel):
|
||||
phone: str | None
|
||||
tg_user_id: int | None
|
||||
is_active: bool
|
||||
is_bot: bool
|
||||
device_model: str | None
|
||||
|
||||
|
||||
@@ -427,6 +428,7 @@ class FileShareHitView(BaseModel):
|
||||
|
||||
class BotView(BaseModel):
|
||||
bot_id: int
|
||||
account_id: int | None
|
||||
username: str | None
|
||||
title: str | None
|
||||
enabled: bool
|
||||
@@ -435,70 +437,3 @@ class BotView(BaseModel):
|
||||
backfilled_at: datetime | None
|
||||
checked_at: datetime | None
|
||||
added_at: datetime
|
||||
incoming: int
|
||||
senders: int
|
||||
last_ts: datetime | None
|
||||
|
||||
|
||||
class BotSummary(BaseModel):
|
||||
incoming: int
|
||||
outgoing: int
|
||||
senders: int
|
||||
chats: int
|
||||
first_ts: datetime | None
|
||||
last_ts: datetime | None
|
||||
|
||||
|
||||
class BotSender(BaseModel):
|
||||
sender_id: int
|
||||
username: str | None
|
||||
name: str | None
|
||||
is_bot: bool | None
|
||||
incoming: int
|
||||
chat_id: int | None
|
||||
first_ts: datetime
|
||||
last_ts: datetime
|
||||
|
||||
|
||||
class BotBucket(BaseModel):
|
||||
bucket: datetime
|
||||
incoming: int
|
||||
senders: int
|
||||
|
||||
|
||||
class BotCount(BaseModel):
|
||||
key: str
|
||||
incoming: int
|
||||
|
||||
|
||||
class BotHour(BaseModel):
|
||||
hour: int
|
||||
incoming: int
|
||||
|
||||
|
||||
class BotStats(BaseModel):
|
||||
bot: BotView
|
||||
summary: BotSummary
|
||||
timeline: list[BotBucket]
|
||||
kinds: list[BotCount]
|
||||
media: list[BotCount]
|
||||
hours: list[BotHour]
|
||||
senders: list[BotSender]
|
||||
|
||||
|
||||
class BotUpdateView(BaseModel):
|
||||
kind: str
|
||||
chat_id: int
|
||||
item_id: int
|
||||
ts: datetime
|
||||
source: str
|
||||
outgoing: bool
|
||||
sender_id: int | None
|
||||
sender_username: str | None
|
||||
sender_name: str | None
|
||||
sender_is_bot: bool | None
|
||||
chat_type: str | None
|
||||
chat_title: str | None
|
||||
text: str | None
|
||||
media_kind: str | None
|
||||
edited_at: datetime | None
|
||||
Reference in new issue
Block a user