mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-18 11:51:41 +03:00
0c0545b7ae
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
65 lines
1.6 KiB
Python
65 lines
1.6 KiB
Python
from abc import ABC, abstractmethod
|
|
from uuid import UUID
|
|
|
|
from modules.brain.entity.integration_brain import (
|
|
IntegrationDescriptionEntity,
|
|
IntegrationEntity,
|
|
)
|
|
|
|
|
|
class IntegrationBrainInterface(ABC):
|
|
@abstractmethod
|
|
def get_integration_brain(self, brain_id: UUID) -> IntegrationEntity:
|
|
"""Get the integration brain entity
|
|
|
|
Args:
|
|
brain_id (UUID): ID of the brain
|
|
|
|
Returns:
|
|
IntegrationEntity: Integration brain entity
|
|
"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def add_integration_brain(
|
|
self, brain_id: UUID, integration_brain: IntegrationEntity
|
|
) -> IntegrationEntity:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def update_integration_brain(
|
|
self, brain_id: UUID, integration_brain: IntegrationEntity
|
|
) -> IntegrationEntity:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def delete_integration_brain(self, brain_id: UUID) -> None:
|
|
pass
|
|
|
|
|
|
class IntegrationDescriptionInterface(ABC):
|
|
|
|
@abstractmethod
|
|
def get_integration_description(
|
|
self, integration_id: UUID
|
|
) -> IntegrationDescriptionEntity:
|
|
"""Get the integration description entity
|
|
|
|
Args:
|
|
integration_id (UUID): ID of the integration
|
|
|
|
Returns:
|
|
IntegrationEntity: Integration description entity
|
|
"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_all_integration_descriptions(self) -> list[IntegrationDescriptionEntity]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_integration_description_by_user_brain_id(
|
|
self, brain_id: UUID, user_id: UUID
|
|
) -> IntegrationDescriptionEntity:
|
|
pass
|