# retoor <retoor@molodetz.nl>

from __future__ import annotations

from ..spec import Action
from ._shared import path, query


NOTIFICATION_ACTIONS: tuple[Action, ...] = (
    Action(
        name="list_notifications",
        method="GET",
        path="/notifications",
        summary="List notifications",
        params=(query("before", "Pagination cursor."),),
    ),
    Action(
        name="notification_counts",
        method="GET",
        path="/notifications/counts",
        summary="Get unread notification and message counts",
        requires_auth=False,
    ),
    Action(
        name="open_notification",
        method="GET",
        path="/notifications/open/{notification_uid}",
        summary="Open a notification and follow it",
        params=(path("notification_uid", "Notification uid."),),
    ),
    Action(
        name="mark_notification_read",
        method="POST",
        path="/notifications/mark-read/{notification_uid}",
        summary="Mark a single notification read",
        params=(path("notification_uid", "Notification uid."),),
    ),
    Action(
        name="mark_all_notifications_read",
        method="POST",
        path="/notifications/mark-all-read",
        summary="Mark all notifications read",
    ),
)
