mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-18 20:01:52 +03:00
e1ad3dfb2a
This pull request adds the implementation of the notifications feature, including the ability to create, update, and delete notifications.
34 lines
925 B
Python
34 lines
925 B
Python
from abc import ABC, abstractmethod
|
|
from uuid import UUID
|
|
|
|
from modules.notification.dto.inputs import NotificationUpdatableProperties, CreateNotification
|
|
from modules.notification.entity.notification import Notification
|
|
|
|
|
|
class NotificationInterface(ABC):
|
|
@abstractmethod
|
|
def add_notification(self, notification: CreateNotification) -> Notification:
|
|
"""
|
|
Add a notification
|
|
"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def update_notification_by_id(
|
|
self, notification_id: UUID, notification: NotificationUpdatableProperties
|
|
) -> Notification:
|
|
"""Update a notification by id"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def remove_notification_by_id(self, notification_id: UUID):
|
|
"""
|
|
Remove a notification by id
|
|
Args:
|
|
notification_id (UUID): The id of the notification
|
|
|
|
Returns:
|
|
str: Status message
|
|
"""
|
|
pass
|