mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-31 15:22:26 -07:00
chore(api): Cleanup schemas and update skills docs
This commit is contained in:
@@ -39,8 +39,7 @@ ALLOWED_DEVICE_COLUMNS = Literal[
|
||||
]
|
||||
|
||||
ALLOWED_NMAP_MODES = Literal[
|
||||
"quick", "intense", "ping", "comprehensive", "fast", "normal", "detail", "skipdiscovery",
|
||||
"-sS", "-sT", "-sU", "-sV", "-O"
|
||||
"fast", "normal", "detail", "skipdiscovery"
|
||||
]
|
||||
|
||||
NOTIFICATION_LEVELS = Literal["info", "warning", "error", "alert", "interrupt"]
|
||||
@@ -301,6 +300,24 @@ class DeviceTotalsResponse(RootModel):
|
||||
root: List[int] = Field(default_factory=list, description="List of counts: [all, online, favorites, new, offline, archived]")
|
||||
|
||||
|
||||
class DeviceTotalsNamedResponse(BaseResponse):
|
||||
"""Response with named device statistics."""
|
||||
totals: Dict[str, int] = Field(
|
||||
...,
|
||||
description="Dictionary of counts",
|
||||
json_schema_extra={
|
||||
"examples": [{
|
||||
"devices": 10,
|
||||
"connected": 5,
|
||||
"favorites": 2,
|
||||
"new": 1,
|
||||
"down": 0,
|
||||
"archived": 2
|
||||
}]
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class DeviceExportRequest(BaseModel):
|
||||
"""Request for exporting devices."""
|
||||
format: Literal["csv", "json"] = Field(
|
||||
|
||||
Reference in New Issue
Block a user