Hi,
I was trying to perform update from an outdated @novu/node package to the @novu/api one, but unfortunately stumbled upon some errors.
Some info for the context:
We are using @novu/framework with NestJS for our code-first workflows. The outdated package that I am trying to replace was used for 3 things (@novu/node package was working fine in all 3 cases):
- novu.triggerBulk to trigger notifications. Works perfectly with the new package
- novu.subscribers.create to send information regarding newly created users in the system. New package updates the subscriber info, but returns
{ "statusCode": 201, "message": "Response validation failed" }json. Not critical, but such response validation error looks a little bit weird - novu.messages.retrieve({ subscriberId }) + novu.messages.delete to delete some messages that were sent to particular subscribers (saved us several times). And this is unfortunately completely broken. First request is throwing ResponseValidationError with such cause
ZodError: [
{
"code": "invalid_type",
"expected": "boolean",
"received": "undefined",
"path": [
"Result",
"data",
0,
"subscriber",
"isOnline"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"Result",
"data",
0,
"subscriber",
"lastOnlineAt"
],
"message": "Required"
}
]
Is there something wrong on our side or maybe you can give a hint, what can be a source of an issue?
Package versions that we are using:
@novu/api v3.14.2
@novu/framework v2.9.0
novu 2.6.6