mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-09-19 00:55:51 +00:00
- Added MetadataController for handling user and node metadata. - Implemented models for user and node metadata management. - Created tests for user and node metadata functionalities. - Enhanced authentication settings with passkey and OAuth2 configurations. - Added bulk actions for node updates and responses. - Refactored existing models to accommodate new features and improve structure. - Removed obsolete test_imports.py file. - Updated environment variables for testing. - Improved error handling in subscription tests. - Added new node plugin functionalities including cloning and execution commands.
41 lines
1 KiB
Python
41 lines
1 KiB
Python
"""Metadata management models for Users and Nodes"""
|
|
|
|
from typing import Any, Dict, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class GetMetadataResponseDto(BaseModel):
|
|
"""Get metadata response"""
|
|
metadata: Optional[Dict[str, Any]] = None
|
|
|
|
|
|
class GetUserMetadataResponseDto(BaseModel):
|
|
"""Get user metadata response"""
|
|
metadata: Optional[Dict[str, Any]] = None
|
|
|
|
|
|
class UpsertUserMetadataRequestBodyDto(BaseModel):
|
|
"""Request body for upserting user metadata"""
|
|
metadata: Dict[str, Any]
|
|
|
|
|
|
class UpsertUserMetadataResponseDto(BaseModel):
|
|
"""Response for upserting user metadata"""
|
|
metadata: Dict[str, Any]
|
|
|
|
|
|
class GetNodeMetadataResponseDto(BaseModel):
|
|
"""Get node metadata response"""
|
|
metadata: Optional[Dict[str, Any]] = None
|
|
|
|
|
|
class UpsertNodeMetadataRequestBodyDto(BaseModel):
|
|
"""Request body for upserting node metadata"""
|
|
metadata: Dict[str, Any]
|
|
|
|
|
|
class UpsertNodeMetadataResponseDto(BaseModel):
|
|
"""Response for upserting node metadata"""
|
|
metadata: Dict[str, Any]
|