mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-09-21 13:04:00 +00:00
- Implemented TemplateResponseDto and UpdateTemplateRequestDto for subscription templates. - Created models for system statistics including CPU, memory, and bandwidth. - Developed user models for user creation, updates, and responses. - Added bulk actions for user updates and statistics tracking. - Introduced tests for authentication, bandwidth statistics, hosts, inbounds, key generation, nodes, subscriptions, and user management. - Enhanced utility functions for generating random strings, emails, and date ranges for testing.
38 lines
802 B
Python
38 lines
802 B
Python
from typing import Any, List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class InboundResponseDto(BaseModel):
|
|
uuid: UUID
|
|
tag: str
|
|
type: str
|
|
port: float
|
|
network: Optional[str] = None
|
|
security: Optional[str] = None
|
|
|
|
|
|
class InboundsResponseDto(BaseModel):
|
|
response: List[InboundResponseDto]
|
|
|
|
|
|
class FullInboundStatistic(BaseModel):
|
|
enabled: float
|
|
disabled: float
|
|
|
|
|
|
class FullInboundResponseDto(BaseModel):
|
|
uuid: UUID
|
|
tag: str
|
|
type: str
|
|
port: float
|
|
network: Optional[str] = None
|
|
security: Optional[str] = None
|
|
raw_from_config: Any = Field(alias="rawFromConfig")
|
|
users: FullInboundStatistic
|
|
nodes: FullInboundStatistic
|
|
|
|
|
|
class FullInboundsResponseDto(BaseModel):
|
|
response: List[FullInboundResponseDto]
|