quivr/backend/modules/onboarding/repository/onboardings_interface.py
Zineb El Bachiri f578b2fa00
refactor: onboarding module (#1702)
# 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):
2023-11-24 10:25:02 +01:00

44 lines
1.2 KiB
Python

from abc import ABC, abstractmethod
from uuid import UUID
from modules.onboarding.dto.inputs import OnboardingUpdatableProperties
from modules.onboarding.entity.onboarding import OnboardingStates
class OnboardingInterface(ABC):
@abstractmethod
def get_user_onboarding(self, user_id: UUID) -> OnboardingStates | None:
"""
Get user onboarding information by user_id
"""
pass
@abstractmethod
def update_user_onboarding(
self, user_id: UUID, onboarding: OnboardingUpdatableProperties
) -> OnboardingStates:
"""Update user onboarding information by user_id"""
pass
@abstractmethod
def remove_user_onboarding(self, user_id: UUID) -> OnboardingStates | None:
"""
Remove user onboarding information by user_id
"""
pass
@abstractmethod
def create_user_onboarding(self, user_id: UUID) -> OnboardingStates:
"""
Create user onboarding information by user_id
"""
pass
@abstractmethod
def remove_onboarding_more_than_x_days(self, days: int):
"""
Remove onboarding if it is older than x days
"""
"""Update a prompt by id"""
pass