Enhance Notification Management with New Endpoints and Response Structures

- Added new endpoints for retrieving notifications for both admins and users, improving the flexibility of the notification system.
- Implemented query parameters for filtering notifications by status, method, event type, type, and recipient, enhancing usability.
- Introduced new response structures for notifications, including pagination information, to provide better data handling in API responses.
- Updated API documentation with Swagger comments for the new endpoints and response formats, ensuring clarity for API consumers.
- Refactored notification handling logic to support the new features, promoting a more robust notification management system.
This commit is contained in:
n.nakhostin
2025-09-20 17:41:21 +03:30
parent ab6eb3b3ed
commit 19cd346b1c
13 changed files with 1637 additions and 16 deletions
+5
View File
@@ -104,6 +104,11 @@ func (s *Service) SendOTP(ctx context.Context, model Model) (*NotificationRespon
return s.client.SendNotification(ctx, req)
}
// GetNotifications retrieves a list of notifications from the notification service
func (s *Service) GetNotifications(ctx context.Context, req *GetNotificationsRequest) (*NotificationListResponse, error) {
return s.client.GetNotifications(ctx, req)
}
// Health checks if the notification service is available
func (s *Service) Health(ctx context.Context) error {
// Create a simple test request to check service availability