Update
This commit is contained in:
@@ -114,6 +114,7 @@ from devplacepy.schemas.gateway import (
|
||||
GatewayUsageOut,
|
||||
UserAiUsageOut,
|
||||
)
|
||||
from devplacepy.schemas.statistics import StatisticsOut
|
||||
from devplacepy.schemas.auth import (
|
||||
AuthPageOut,
|
||||
DeviiPageOut,
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from devplacepy.schemas.base import _Out
|
||||
from devplacepy.schemas.content import UserOut
|
||||
|
||||
|
||||
class AwardOut(_Out):
|
||||
uid: str = ""
|
||||
slug: str = ""
|
||||
description: str = ""
|
||||
giver_uid: str = ""
|
||||
receiver_uid: str = ""
|
||||
generated_at: Optional[str] = None
|
||||
created_at: Optional[str] = None
|
||||
image_url: Optional[str] = None
|
||||
thumb_url: Optional[str] = None
|
||||
giver: Optional[UserOut] = None
|
||||
@@ -6,6 +6,7 @@ from typing import Any, Optional
|
||||
|
||||
from devplacepy.schemas.base import _Out
|
||||
from devplacepy.schemas.content import BadgeOut, ProjectOut, UserOut
|
||||
from devplacepy.schemas.awards import AwardOut
|
||||
from devplacepy.schemas.listings import FeedItemOut, GistItemOut
|
||||
|
||||
|
||||
@@ -70,6 +71,11 @@ class ProfileOut(_Out):
|
||||
media: list[MediaItemOut] = []
|
||||
media_pagination: Optional[Any] = None
|
||||
notification_prefs: list[Any] = []
|
||||
awards: list[AwardOut] = []
|
||||
awards_pagination: Optional[Any] = None
|
||||
awards_count: int = 0
|
||||
prominent_award: Optional[AwardOut] = None
|
||||
can_give_award: bool = False
|
||||
|
||||
|
||||
class TelegramPairOut(_Out):
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# retoor <retoor@molodetz.nl>
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class StatisticsMetricOut(BaseModel):
|
||||
key: str
|
||||
label: str
|
||||
value: Any
|
||||
format: str = "int"
|
||||
delta: Optional[float] = None
|
||||
direction: Optional[str] = None
|
||||
|
||||
|
||||
class StatisticsPointOut(BaseModel):
|
||||
t: str
|
||||
v: float
|
||||
|
||||
|
||||
class StatisticsSeriesOut(BaseModel):
|
||||
key: str
|
||||
label: str
|
||||
points: list[StatisticsPointOut]
|
||||
|
||||
|
||||
class StatisticsTableOut(BaseModel):
|
||||
key: str
|
||||
title: str
|
||||
columns: list[str]
|
||||
rows: list[list[Any]]
|
||||
|
||||
|
||||
class StatisticsHighlightOut(BaseModel):
|
||||
label: str
|
||||
value: Any
|
||||
|
||||
|
||||
class StatisticsOut(BaseModel):
|
||||
tab: str
|
||||
window_hours: int
|
||||
granularity: str
|
||||
generated_at: str
|
||||
compare: bool = True
|
||||
cards: list[StatisticsMetricOut] = []
|
||||
series: list[StatisticsSeriesOut] = []
|
||||
tables: list[StatisticsTableOut] = []
|
||||
highlights: list[StatisticsHighlightOut] = []
|
||||
notes: dict[str, Any] = {}
|
||||
Reference in New Issue
Block a user