IMessage missing subscriber and actor types.

Hi all. I notice the IMessage type when I am building my own React headless notification center does not match the actual data the API is returning:

{
    "cta": {
        "action": {
            "buttons": []
        },
        "type": "redirect",
        "data": {
            "url": "http://localhost:7081/organizations/2b09dbec-879a-4f5b-a422-6fc202a58c73/incidents/b2d12179-327b-43ee-92e1-ac4594e093e7"
        }
    },
    .... A bunch of other unrelated fields
    "subscriber": {
        "_id": "64fa87317bfe966b0ce62b51",
        "firstName": "Team",
        "lastName": "Leader",
        "subscriberId": "auth0|649a83c638f93cb86b04d904",
        "avatar": "https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/1218.jpg",
        "id": "64fa87317bfe966b0ce62b51"
    },
    "actorSubscriber": null,
    "id": "64fd5dcff1a5b873e5c1bb99"
}


Compare that against what the API says it should return: https://docs.novu.co/notification-center/react/api-reference#the-notification-imessage-model

I want to access the subscriber info here, but the typescript types make no mention of it.
This page contains the complete documentation about the React Notification Center package. You can find here the list of all the components, hooks and props that you can use.
Was this page helpful?