From 3a2e87897aa3a8f0cdef87ad8714acb5b5f53a8d Mon Sep 17 00:00:00 2001 From: Artem Date: Sun, 11 May 2025 15:42:50 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D1=8C=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=BA=D0=B8=20=D1=82=D0=B5=D0=B3=D0=B0=20=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82=D1=8C=20=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D1=8B=D0=B9=20=D1=8D=D0=BD=D0=B4=D0=BF=D0=BE=D0=B8=D0=BD?= =?UTF-8?q?=D1=82=20=D0=B4=D0=BB=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D0=B5=D0=B9=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D1=82=D0=B5=D0=B3=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + pyproject.toml | 2 +- remnawave_api/controllers/users.py | 8 ++++++++ remnawave_api/models/users.py | 2 ++ remnawave_api/models/users_bulk_actions.py | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2180a35..54c3f98 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ pip install git+https://github.com/sm1ky/remnawave-api.git@development | Contract Version | Remnawave Panel Version | | ---------------- | ----------------------- | +| 1.1.1 | 1.6.1 | | 1.1.0 | 1.6.0 | | 1.0.8 | 1.5.7 | diff --git a/pyproject.toml b/pyproject.toml index 4350745..1afef8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "remnawave-api" -version = "1.1.0" +version = "1.1.1" description = "A Python SDK for interacting with the Remnawave API." authors = [ {name = "Artem",email = "sm1ky@forestsnet.com"} diff --git a/remnawave_api/controllers/users.py b/remnawave_api/controllers/users.py index c35d134..9d8957d 100644 --- a/remnawave_api/controllers/users.py +++ b/remnawave_api/controllers/users.py @@ -148,3 +148,11 @@ class UsersController(BaseController): ) -> EmailUserResponseDto: """Get Users By Email""" ... + + @get("/users/by-tag/{tag}", response_class=UsersResponseDto) + async def get_users_by_tag( + self, + tag: Annotated[str, Path(description="Tag of the user")], + ) -> UsersResponseDto: + """Get Users By Tag""" + ... \ No newline at end of file diff --git a/remnawave_api/models/users.py b/remnawave_api/models/users.py index 67e86b1..183ec32 100644 --- a/remnawave_api/models/users.py +++ b/remnawave_api/models/users.py @@ -55,6 +55,7 @@ class CreateUserRequestDto(BaseModel): None, serialization_alias="lastTrafficResetAt" ) description: Optional[str] = None + tag: Optional[str] = None telegram_id: Optional[int] = Field(None, serialization_alias="telegramId") email: Optional[str] = None hwidDeviceLimit: Optional[int] = Field( @@ -82,6 +83,7 @@ class UpdateUserRequestDto(BaseModel): None, serialization_alias="lastTrafficResetAt" ) description: Optional[str] = None + tag: Optional[str] = None telegram_id: Optional[int] = Field(None, serialization_alias="telegramId") email: Optional[str] = None hwidDeviceLimit: Optional[int] = Field( diff --git a/remnawave_api/models/users_bulk_actions.py b/remnawave_api/models/users_bulk_actions.py index b1f2c3a..1a4efaa 100644 --- a/remnawave_api/models/users_bulk_actions.py +++ b/remnawave_api/models/users_bulk_actions.py @@ -23,6 +23,7 @@ class UpdateUserFields(BaseModel): ) expire_at: Optional[datetime] = Field(None, serialization_alias="expireAt") description: Optional[str] = None + tag: Optional[str] = None telegram_id: Optional[int] = Field(None, serialization_alias="telegramId") email: Optional[str] = None @@ -37,6 +38,7 @@ class BulkAllUpdateUsersRequestDto(BaseModel): ) expire_at: Optional[datetime] = Field(None, serialization_alias="expireAt") description: Optional[str] = None + tag: Optional[str] = None telegram_id: Optional[int] = Field(None, serialization_alias="telegramId") email: Optional[str] = None