mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-08-29 04:45:45 +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.
26 lines
620 B
Python
26 lines
620 B
Python
from typing import Annotated
|
|
|
|
from pydantic import BaseModel, Field, StringConstraints
|
|
|
|
|
|
class RegisterResponseDto(BaseModel):
|
|
access_token: str = Field(alias="accessToken")
|
|
|
|
|
|
class LoginResponseDto(BaseModel):
|
|
access_token: str = Field(alias="accessToken")
|
|
|
|
|
|
class LoginRequestDto(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
|
|
class RegisterRequestDto(BaseModel):
|
|
username: str
|
|
password: Annotated[str, StringConstraints(min_length=24)]
|
|
|
|
|
|
class StatusResponseDto(BaseModel):
|
|
is_login_allowed: bool = Field(alias="isLoginAllowed")
|
|
is_register_allowed: bool = Field(alias="isRegisterAllowed")
|