Skip to content

Issue #50 — Frontend: Notification TypeScript Type Definitions #675

@yusuftomilola

Description

@yusuftomilola

Location: frontend/lib/types/notification.ts

Description

Before any notification hooks or UI components can be built, the TypeScript interfaces for the notifications feature need to be defined. These types are shared across the NotificationBell component, the notifications page, and any query hooks that interact with the notifications API.

Acceptance Criteria

  • frontend/lib/types/notification.ts exports:
    • A NotificationType union type: "BOOKING_CREATED" | "BOOKING_CONFIRMED" | "BOOKING_CANCELLED" | "BOOKING_COMPLETED" | "PAYMENT_SUCCESS" | "PAYMENT_FAILED" | "INVOICE_READY"
    • A Notification interface with:
      • id: string
      • type: NotificationType
      • title: string
      • message: string
      • isRead: boolean
      • userId: string
      • createdAt: string
      • updatedAt: string
    • A NotificationsResponse interface with:
      • data: Notification[]
      • meta: { total: number; page: number; limit: number; totalPages: number; unreadCount: number }
  • Only TypeScript interface and type declarations — no runtime code
  • npx tsc --noEmit passes with no errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions