2024-02-20 08:44:06 +03:00
|
|
|
from enum import Enum
|
2024-02-06 08:02:46 +03:00
|
|
|
from typing import Optional
|
|
|
|
from uuid import UUID
|
|
|
|
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
2024-02-20 08:44:06 +03:00
|
|
|
class IntegrationType(str, Enum):
|
|
|
|
CUSTOM = "custom"
|
|
|
|
SYNC = "sync"
|
|
|
|
|
|
|
|
|
2024-02-06 08:02:46 +03:00
|
|
|
class IntegrationDescriptionEntity(BaseModel):
|
|
|
|
id: UUID
|
|
|
|
integration_name: str
|
2024-02-15 01:01:35 +03:00
|
|
|
integration_logo_url: Optional[str] = None
|
|
|
|
connection_settings: Optional[dict] = None
|
2024-02-16 22:32:13 +03:00
|
|
|
integration_type: IntegrationType
|
|
|
|
description: str
|
|
|
|
max_files: int
|
2024-02-06 08:02:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
class IntegrationEntity(BaseModel):
|
2024-02-15 07:07:53 +03:00
|
|
|
id: int
|
2024-02-06 08:02:46 +03:00
|
|
|
user_id: str
|
|
|
|
brain_id: str
|
|
|
|
integration_id: str
|
2024-02-15 01:01:35 +03:00
|
|
|
settings: Optional[dict] = None
|
|
|
|
credentials: Optional[dict] = None
|