Commit graph

8 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
f1503b2fda
fix: исправить алиасы в эндпоинтах и удалить неиспользуемые DTO 2025-12-03 05:31:17 +01:00
Artem
38a57b3e31
feat: обновить модели пользователей и добавить новые DTO для работы с пользователями и их подписками 2025-11-30 02:09:32 +01:00
Artem
3f0b5af2cf
Refactor tests for HWID, subscriptions, system, and users; add subscription request history functionality
- Restructured HWID tests into classes for better organization and clarity.
- Enhanced subscription tests to cover additional scenarios and improved assertions.
- Introduced new tests for system statistics and monitoring.
- Implemented CRUD operations for user management with comprehensive test coverage.
- Added new controllers and models for handling subscription request history.
- Created tests for subscription request history, including pagination and statistics.
- Improved error handling in tests to skip when exceptions occur.
2025-10-02 01:46:17 +02:00
Artem
8e34b50c6c feat: добавить модель TagUserResponseDto и обновить контроллер пользователей для использования новой модели 2025-08-25 15:38:14 +02:00
Artem
8a84503191
feat: добавить эндпоинт для получения сырой подписки по короткому UUID и обновить модели подписки 2025-08-21 23:58:28 +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/users.py (Browse further)