template-for-typescript-projects
    Preparing search index...

    Exposes public HTTP endpoints for alert operations.

    Index

    Constructors

    Methods

    • Deletes all alerts.

      Parameters

      • _req: Request

        The incoming request (unused).

      • res: Response

        The response used to send the deletion result.

      • next: NextFunction

        The next middleware function for error handling.

      Returns Promise<void>

    • Deletes a single alert by identifier.

      Parameters

      • req: Request

        The incoming request.

      • res: Response

        The response used to send the deletion result.

      • next: NextFunction

        The next middleware function for error handling.

      Returns Promise<void>

    • Retrieves all alerts and returns their representations.

      Parameters

      • _req: Request

        The incoming request (unused).

      • res: Response

        The response used to send the alerts payload.

      • next: NextFunction

        The next middleware function for error handling.

      Returns Promise<void>

    • Retrieves a single alert by identifier and returns its representation.

      Parameters

      • req: Request

        The incoming request.

      • res: Response

        The response used to send the alert payload.

      • next: NextFunction

        The next middleware function for error handling.

      Returns Promise<void>

    • Returns the count of unread alerts.

      Parameters

      • _req: Request

        The incoming request (unused).

      • res: Response

        The response used to send the count.

      • next: NextFunction

        The next middleware function for error handling.

      Returns Promise<void>

    • Registers the response as an SSE client for real-time alerts.

      Parameters

      • _req: Request

        The incoming request (unused).

      • res: Response

        The response registered as an SSE client.

      • next: NextFunction

        The next middleware function for error handling.

      Returns void

    • Updates the read state of an alert based on request payload.

      Parameters

      • req: Request

        The incoming request containing the read DTO.

      • res: Response

        The response used to send the result.

      • next: NextFunction

        The next middleware function for error handling.

      Returns Promise<void>