Adding a new Credentials Enum
So i'm working on issue 5033, and when I go to add a new CredentialEnum to
provider.enum.ts
to the CredentialsKeyEnum
, i'm getting the error in the attached screenshot. Once placed, i run pnpm run setup:project
and it fails. I'm following the guide just to make sure I'm putting the new field where it needs to go, but i'm not entirely sure if I'm missing a step that isn't documented or what.
Modified provider.enum.ts
snipping:
error in text format vs picture:
![No description](https://cdn.answeroverflow.com/1192949745950392440/image.png)
8 Replies
@dr.really
if you are adding any new field in
CredentialsKeyEnum
make sure you add that field in these files in addition to provider specific required files
1. https://github.com/novuhq/novu/blob/next/libs/shared/src/entities/integration/credential.interface.ts
2. https://github.com/novuhq/novu/blob/next/apps/api/src/app/integrations/dtos/credentials.dto.ts
3. https://github.com/novuhq/novu/blob/next/libs/dal/src/repositories/integration/integration.schema.ts#L22ah, thanks Pawan!
Let me know if you face any other issue.
Happy to help 🙌
Hey @Pawan Jain, so I got it updated from above and it's building and running. However, it looks like when the provider is triggered, it's not pulling the new field from the db. Sorry for all the questions, once all of this is done I can write up a PR for the docs for updating existing integrations if that will help lol
For context, it is storing the new field value in the db, I can see it sitting in Mongo however, it's just not selecting it on trigger
Hey @Pawan Jain just wanted to circle back around to see if you have had a chance to look at the above?
@dr.really
Sure. I will check this today morning
Give me some time
Meantime could you add some logs around provider to check the root cause?
aye will do when I get home tonight and will report back
I'm going to have to put this on hold. Apparently I have to register a new number with AWS SNS/Pinpoint for testing this. Will reach back out once that registration is complete
Sure @dr.really
my work said that i can't use the same number(s) we have, which is why I have to register a new one haha, thanks for your patience!