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-03-05 03:10:56 +03:00
|
|
|
DOC = "doc"
|
2024-02-20 08:44:06 +03:00
|
|
|
|
2024-03-06 22:17:46 +03:00
|
|
|
class IntegrationBrainTag(str, Enum):
|
|
|
|
NEW = "new"
|
|
|
|
RECOMMENDED = "recommended"
|
|
|
|
MOST_POPULAR = "most_popular"
|
|
|
|
PREMIUM = "premium"
|
|
|
|
COMING_SOON = "coming_soon"
|
|
|
|
COMMUNITY = "community"
|
|
|
|
DEPRECATED = "deprecated"
|
|
|
|
|
2024-02-20 08:44:06 +03:00
|
|
|
|
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
|
2024-03-06 22:17:46 +03:00
|
|
|
tags: Optional[list[IntegrationBrainTag]] = []
|
|
|
|
information: Optional[str] = None
|
2024-02-16 22:32:13 +03:00
|
|
|
description: str
|
|
|
|
max_files: int
|
2024-03-06 22:17:46 +03:00
|
|
|
allow_model_change: bool
|
2024-03-06 23:55:36 +03:00
|
|
|
integration_display_name: str
|
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
|
2024-02-28 08:30:25 +03:00
|
|
|
last_synced: str
|