quivr/backend/modules/brain/repository/interfaces/integration_brains_interface.py
Antoine Dewez 0c0545b7ae
fix(backend): invitation brain bugs (#2380)
# 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):
2024-03-25 16:13:51 -07:00

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