#Tenant Support for frontend : React

1 messages · Page 1 of 1 (latest)

jaunty craneBOT
#

Thanks for tagging me @frank axle. I'll look through relevant sources and get back to you shortly. Please tag @jaunty crane for any follow-ups.

#

Answer

To fetch notifications for a specific subscriber within a specific tenant, you would typically use the provided APIs to retrieve such data. Novu's documentation covers various endpoints and functionalities, but it does not explicitly state a method for fetching notifications filtered both by subscriber and tenant. However, you can use the fetchNotifications method from Novu's Headless API to retrieve notifications for a subscriber.

Here is the signature for using the fetchNotifications method:

headlessService.fetchNotifications({
  listener: (result: FetchResult<IPaginatedResponse<IMessage>>) => {
    console.log(result);
  },
  onSuccess: (response: IPaginatedResponse<IMessage>) => {
    console.log(
      response.data,
      response.page,
      response.totalCount,
      response.pageSize
    );
  },
  page: pageNumber,
  query: { feedIdentifier: "feedId", read: false, seen: true },
  storeId: "storeId",
});