feat: manager-related endpoints

This commit is contained in:
Alexandre Teles
2023-11-22 11:43:57 -03:00
committed by Alexandre Teles (afterSt0rm)
parent a8126d785f
commit 3a128c4661
7 changed files with 150 additions and 50 deletions

32
api/models/manager.py Normal file
View File

@@ -0,0 +1,32 @@
from pydantic import BaseModel
class BootsrapResponseModel(BaseModel):
"""
A Pydantic BaseModel that represents a list of available tools.
"""
tools: list[str]
"""
A list of available tools.
"""
class CustomSourcesFields(BaseModel):
"""
Implements the fields for a source.
"""
url: str
preferred: bool
class CustomSourcesResponseModel(BaseModel):
"""
A Pydantic BaseModel that represents a list of available sources.
"""
_: dict[str, CustomSourcesFields]
"""
A list of available sources.
"""

View File

@@ -11,7 +11,7 @@ class SocialFields(BaseModel):
preferred: bool
class ConnectionsResponseModel(BaseModel):
class SocialsResponseModel(BaseModel):
"""
A Pydantic BaseModel that represents a dictionary of social links.
"""
@@ -21,15 +21,3 @@ class ConnectionsResponseModel(BaseModel):
A dictionary where the keys are the names of the social networks, and
the values are the links to the profiles or pages.
"""
class ConnectionsResponseModel(BaseModel):
"""
A Pydantic BaseModel that represents a dictionary of connection links.
"""
connections: list[SocialFields]
"""
A dictionary where the keys are the names of the social networks, and
the values are the links to the profiles or pages.
"""