Skip to content

Bump version, fix models and add new route#10

Merged
sm1ky merged 6 commits intoproductionfrom
development
Sep 16, 2025
Merged

Bump version, fix models and add new route#10
sm1ky merged 6 commits intoproductionfrom
development

Conversation

@sm1ky
Copy link
Copy Markdown
Collaborator

@sm1ky sm1ky commented Sep 16, 2025

No description provided.

@sm1ky sm1ky requested a review from Copilot September 16, 2025 19:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Python SDK to use modern union syntax and adds a new HWID deletion endpoint. The changes improve code consistency by migrating from Optional[T] to T | None syntax and fix type annotations for better precision.

  • Replace Optional[T] with T | None union syntax throughout user models
  • Update type annotations from float to int for count fields in HWID models
  • Add new endpoint for deleting all HWID devices for a user

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
remnawave/models/users.py Modernizes type annotations using union syntax and removes unused imports
remnawave/models/hwid.py Fixes type annotations for count fields and removes trailing whitespace
remnawave/controllers/hwid.py Adds new endpoint for bulk HWID device deletion
pyproject.toml Updates version to include post-release identifier

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread remnawave/models/users.py
Comment thread remnawave/models/users.py
first_connected: Optional[datetime] = Field(None, alias="firstConnectedAt")
last_trigger_threshold: Optional[int] = Field(None, alias="lastTriggeredThreshold")
last_connected_node: Optional[UserLastConnectedNodeDto] = Field(
subscription_url: str | None = Field(None, alias="subscriptionUrl")
Copy link

Copilot AI Sep 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The subscription_url field type changed from str (required) to str | None (optional). This is a breaking change that could cause issues for consumers expecting this field to always be present.

Suggested change
subscription_url: str | None = Field(None, alias="subscriptionUrl")
subscription_url: str = Field(alias="subscriptionUrl")

Copilot uses AI. Check for mistakes.
@remnawave remnawave deleted a comment from Copilot AI Sep 16, 2025
…я статистики HWID и удаления всех устройств пользователя
@sm1ky sm1ky merged commit 600628b into production Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants