mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-18 11:51:41 +03:00
0ec9eb00b8
This pull request updates the brain authorization and integration entities. It includes changes to the `retrieve_brain_by_id`, `update_existing_brain`, `update_existing_brain_secrets`, `CreateApiBrainDefinition`, `CreateIntegrationBrain`, `BrainIntegrationSettings`, `BrainIntegrationUpdateSettings`, `CreateBrainProperties`, and `BrainUpdatableProperties` classes.
30 lines
624 B
Python
30 lines
624 B
Python
from enum import Enum
|
|
from typing import Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class IntegrationType(str, Enum):
|
|
CUSTOM = "custom"
|
|
SYNC = "sync"
|
|
|
|
|
|
class IntegrationDescriptionEntity(BaseModel):
|
|
id: UUID
|
|
integration_name: str
|
|
integration_logo_url: Optional[str] = None
|
|
connection_settings: Optional[dict] = None
|
|
integration_type: IntegrationType
|
|
description: str
|
|
max_files: int
|
|
|
|
|
|
class IntegrationEntity(BaseModel):
|
|
id: int
|
|
user_id: str
|
|
brain_id: str
|
|
integration_id: str
|
|
settings: Optional[dict] = None
|
|
credentials: Optional[dict] = None
|