You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NOTIF_UPD-2: Implement Notification Libraries for Admin and User Operations
Description
Develop two distinct libraries, notification-admin and notification-user, for handling notification-related operations in the Hasura environment. notification-admin will be responsible for creating and updating notifications with administrative rights, while notification-user will handle the retrieval and management of notifications from the user's perspective.
notification-admin Library
Purpose
Facilitate the creation and updating of notifications, ensuring type safety and alignment with the marketplaceNotification model in Hasura.
Key Methods
createNotification:
Parameters: receiverId (UUID), senderId (text), type (enum), content (JSONB, optional).
Functionality: Validates input, ensures type safety based on the notification type, and creates a new notification in the database.
Returns: Confirmation of creation or error details.
Functionality: Validates the provided updates, applies them to the specified notification, handles special cases like marking a notification's action as completed.
Returns: Updated notification data or error details.
notification-user Library
Purpose
Enable users to retrieve and interact with their notifications, ensuring data security and user-specific access.
NOTIF_UPD-2: Implement Notification Libraries for Admin and User Operations
Description
Develop two distinct libraries,
notification-admin
andnotification-user
, for handling notification-related operations in the Hasura environment.notification-admin
will be responsible for creating and updating notifications with administrative rights, whilenotification-user
will handle the retrieval and management of notifications from the user's perspective.notification-admin
LibraryPurpose
Facilitate the creation and updating of notifications, ensuring type safety and alignment with the
marketplaceNotification
model in Hasura.Key Methods
createNotification:
receiverId
(UUID),senderId
(text),type
(enum),content
(JSONB, optional).updateNotification:
notificationId
(UUID),updates
(object containing updateable fields).notification-user
LibraryPurpose
Enable users to retrieve and interact with their notifications, ensuring data security and user-specific access.
Key Methods
fetchNotifications:
userId
(UUID),page
(int),limit
(int).resolveNotificationContent:
notification
(object).markNotificationAsRead:
userId
(UUID),notificationId
(UUID).Acceptance Criteria
Functionality of
notification-admin
:Functionality of
notification-user
:Security and Data Integrity:
Comprehensive Testing:
Documentation:
Notes
notification-user
library to safeguard against unauthorized access.notification-admin
library, focus on flexibility to accommodate future notification types and content structures.The text was updated successfully, but these errors were encountered: