/** * Notifications Controller * * REST API endpoints for Notifications management. * Notifications are created automatically when emails/SMS/push are sent. * Only listing and deletion are exposed via API. * * Also handles short URL redirects for email tracking links and * user notification preference management including unsubscribe. * * @endpoints * - GET /notifications/health - Health check * - GET /notifications - List all notifications * - DELETE /notifications/:id - Delete notification * - GET /notifications/s/:code - Redirect short URL (tracking) * - GET /notifications/s/:code/analytics - Get short URL analytics * - GET /notifications/preferences - Get user preferences * - PATCH /notifications/preferences - Update user preferences * - GET /notifications/unsubscribe - Process unsubscribe token from email */ import type { Response } from 'express'; import type { ReturnResponseType } from '@plyaz/types/errors'; import type { BackendNotificationsDomainService } from '../../domain/notifications'; import type { NotificationPreferencesDatabaseRow } from '../../models/notifications'; import type { QueryNotificationsDTO, NotificationsEntity } from '@plyaz/types/core'; import type { UrlAnalytics } from '@plyaz/types/notifications'; export declare const BACKEND_NOTIFICATIONS_DOMAIN_SERVICE = "BACKEND_NOTIFICATIONS_DOMAIN_SERVICE"; /** * Notifications Controller * * Routes: * - GET /notifications/health - Health check * - GET /notifications - List all notifications * - DELETE /notifications/:id - Delete notification * * NOTE: Notifications are created internally when emails/SMS/push are sent. * No POST/PATCH/GET-by-ID endpoints are exposed. */ export declare class NotificationsController { private readonly notificationsService; constructor(notificationsService: BackendNotificationsDomainService); /** * Health check endpoint * GET /notifications/health */ health(): ReturnResponseType<{ service: boolean; timestamp: string; }>; /** * List all notifications * GET /notifications */ findAll(query: QueryNotificationsDTO): Promise>; /** * Delete notification * DELETE /notifications/:id */ remove(id: string): Promise>; /** * Redirect short URL to original URL * GET /notifications/s/:code */ redirectShortUrl(code: string, res: Response): Promise; /** * Get short URL analytics * GET /notifications/s/:code/analytics */ getShortUrlAnalytics(code: string): Promise>; /** * Get user notification preferences * GET /notifications/preferences */ getPreferences(): Promise>; /** * Update user notification preferences * PATCH /notifications/preferences */ updatePreferences(body: Partial): Promise>; /** * Process unsubscribe token from email link * GET /notifications/unsubscribe?token=... */ unsubscribe(token: string): Promise>; } //# sourceMappingURL=notifications.controller.d.ts.map