Implements

  • InboxModule

Constructors

Properties

NotificationSource: typeof InboxNotificationSource

Methods

  • Get an inbox fetcher for the current installation ID.

    The [maxPageSize] is the maximum of notifications to fetch on each call, up to 100 messages per page. Note that the actual count of fetched messages might differ from the value you've set here.

    Set [limit] to be the maximum number of notifications to fetch, ever. This allows you to let Batch manage the upper limit itself, so you can be sure not to use a crazy amount of memory.

    Parameters

    • OptionalmaxPageSize: number
    • Optionallimit: number

    Returns Promise<InboxFetcher>

  • Get an inbox fetcher for a user identifier.

    Set [userIdentifier] to the identifier for which you want the notifications: this is usually the current user's identifier, set in BatchUser.

    The [authenticationKey] is the secret used to authenticate the request. It should be computed by your backend. See the documentation for more info on how to generate it.

    The [maxPageSize] is the maximum of notifications to fetch on each call, up to 100 messages per page. Note that the actual count of fetched messages might differ from the value you've set here.

    Set [limit] to be the maximum number of notifications to fetch, ever. This allows you to let Batch manage the upper limit itself, so you can be sure not to use a crazy amount of memory.

    Parameters

    • userIdentifier: string
    • authenticationKey: string
    • OptionalmaxPageSize: number
    • Optionallimit: number

    Returns Promise<InboxFetcher>