Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BatchInboxFetcher

Index

Constructors

constructor

Properties

Private Readonly identifier

identifier: string

Methods

destroy

  • destroy(): Promise<void>
  • Destroys the fetcher.

    You'll usually want to use this when your component unmounts in order to free up memory.

    Returns Promise<void>

fetchNewNotifications

  • fetchNewNotifications(): Promise<{ endReached: boolean; foundNewNotifications: boolean; notifications: IInboxNotification[] }>
  • Fetches new notifications (and resets pagination to 0).

    Usually used as an initial fetch and refresh method in an infinite list.

    Returns Promise<{ endReached: boolean; foundNewNotifications: boolean; notifications: IInboxNotification[] }>

fetchNextPage

  • Fetches the next page of notifications.

    Usually used as a "fetchMore" method in an infinite list.

    Returns Promise<{ endReached: boolean; notifications: IInboxNotification[] }>

hasMore

  • hasMore(): Promise<boolean>

markAllNotificationsAsRead

  • markAllNotificationsAsRead(): Promise<void>

markNotificationAsDeleted

  • markNotificationAsDeleted(notificationIdentifier: string): Promise<void>
  • Marks a notification as deleted.

    The notification must have been fetched by this fetcher before.

    Parameters

    • notificationIdentifier: string

      The identifier of the notification to mark as deleted

    Returns Promise<void>

markNotificationAsRead

  • markNotificationAsRead(notificationIdentifier: string): Promise<void>
  • Marks a notification as read.

    The notification must have been fetched by this fetcher before.

    Parameters

    • notificationIdentifier: string

      The identifier of the notification to mark as read

    Returns Promise<void>

Generated using TypeDoc