Commit graph

7 commits

Author SHA1 Message Date
Artem
294d70e8c6 feat: Обновить SDK до Remnawave API v2.8.0
Новые эндпоинты:
- GET /tokens/scopes (api_tokens_management.get_scopes)
- GET /users/stream — keyset-пагинация (users.get_users_stream)
- PATCH /hosts/bulk/update (hosts_bulk_actions.update_hosts)
- POST /bandwidth-stats/nodes/users (bandwidthstats.get_stats_nodes_users_usage)

Удалённые эндпоинты (вслед за API):
- POST /hosts/bulk/set-inbound, /hosts/bulk/set-port (заменены update_hosts)
- POST /system/tools/happ/encrypt

Изменения моделей:
- Hosts: tags (вместо tag), mihomoIpVersion, pinnedPeerCertSha256,
  verifyPeerCertByName, finalMask, xhttpExtraParams; fingerprint -> str;
  удалены tag/allowInsecure (с обратной совместимостью через свойства)
- API-токены: name/expiresInDays/scopes, tokens/enabled; новый enum Scope
  (полный каталог scope-ов v2.8.0)
- Nodes: nodeConsumptionMultiplier, note, proxyUrl; тело RestartNodeRequestBodyDto
- trafficLimitBytes int -> float (users, nodes, bulk-actions)
- Infra billing: name, nullable nodeUuid, обязательное nextBillingAt
- HWID: requestIp; webhook-события (user/service) обновлены
- Новый enum MihomoIpVersion

Исправления:
- Bulk-ответы хостов переведены на RootModel (раньше падали с ValueError)
- revoke_user_subscription: исправлен порядок Annotated/Optional (тело терялось)
- Restart*RequestBodyDto: populate_by_name (force_restart игнорировался)

Зависимости:
- Убраны избыточные пины pydantic и pydantic-core (покрыты pydantic[email])
- requires-python <3.14 -> <3.15, добавлен классификатор Python 3.14

Версия пакета 2.7.1 -> 2.8.0.
2026-06-30 22:47:15 +02:00
Artem
3e6be1f4b4
feat: Add new endpoints for fetching user IPs and recap statistics
- Implemented `fetch_users_ips` and `get_fetch_users_ips_result` in `IpControlController`.
- Added `get_recap` endpoint in `SystemController`.
- Introduced new models for user IP fetching and recap statistics in `models/ip_control.py` and `models/system.py`.
- Updated existing models and enums to accommodate new features.
- Added tests for new endpoints and model validations.
2026-03-28 19:51:37 +01:00
Artem
93987d7452
feat: обновить маршруты и добавить поддержку профилей для модификации в контроллерах и моделях 2026-01-17 12:00:30 +01:00
Artem
9e2822774a
feat: Enhance subscription and external squad management
- Updated NodeUsageDto to include node_uuid and changed date to datetime.
- Changed total fields in subscription and subscription request history models from float to int.
- Introduced response rules and conditions for subscription settings, including new models for response modifications.
- Added external squads management with CRUD operations and associated models.
- Implemented passkey management with registration and verification endpoints.
- Enhanced snippets management with full CRUD operations and validation.
- Added OAuth2 provider enum for better authentication handling.
2025-10-28 00:44:15 +01:00
Artem
c8e13c41af
Aktualizacja do wersji 2.1.8:
- Zmieniono wersję pakietu z 2.1.7.post1 na 2.1.8 w pliku pyproject.toml oraz README.md.
- Przeniesiono endpoint `/sub/{short_uuid}/raw` z `SubscriptionController` do `SubscriptionsController`.
- Rozszerzono modele subskrypcji o dodatkowe informacje o użytkowniku, połączeniach, hasłach i wykorzystaniu ruchu.
- Dodano nowy endpoint `/system/tools/x25519/generate` do generowania pary kluczy X25519.
- Uzupełniono klasyfikatory projektu o nowe tematy w `pyproject.toml`.

Zmiany poprawiają strukturę API, rozszerzają możliwości diagnostyczne oraz wprowadzają nową funkcjonalność kryptograficzną.
2025-09-04 01:13:16 +02:00
Artem
08f2146d41 feat: add nodes metrics endpoint - метод get_nodes_metrics()
feat: add host tags management - метод get_hosts_tags()
feat: add advanced host options - поля tag, isHidden, muxParams, sockoptParams
update: relax validation - username min 3 chars, node name min 3 chars
update: reduce host description - max 30 chars (было 50)
update: add name fields - для config profiles и internal squads

‼️ fix: remove tokenDescription - убрано из CreateApiTokenRequestDto
2025-08-14 15:01:15 +02:00
Artem
950a7ffab3
Add Pydantic models for nodes usage history, subscriptions, and user management
- Implemented models for nodes usage history including NodeInfoDto, GetUserAccessibleNodesResponse, and usage statistics.
- Created subscription-related models such as UserSubscription, SubscriptionInfoData, and various response DTOs for subscription information.
- Developed models for subscription settings, templates, and system statistics, enhancing the API's capability to manage and retrieve subscription configurations.
- Introduced user management models including CreateUserRequestDto, UpdateUserRequestDto, and various response DTOs for user actions.
- Added bulk actions for user updates and statistics tracking, improving the efficiency of user management operations.
- Established a base controller for handling API requests and responses, along with decorators for HTTP methods to streamline API interactions.
- Included utility functions for serialization using orjson for better performance with Pydantic models.
2025-07-03 12:22:16 +02:00
Renamed from remnawave_api/controllers/system.py (Browse further)