Skip to content

Commit

Permalink
chore(providers): Upgrade vonage sdk to latest version (#4937)
Browse files Browse the repository at this point in the history
* fix: version up of nexmo provider

* fix: removed dep

* fix: add vonage lockfile

---------

Co-authored-by: Dima Grossman <[email protected]>
  • Loading branch information
sr-26 and scopsy authored Dec 4, 2023
1 parent 81c829d commit 4f19b2d
Show file tree
Hide file tree
Showing 8 changed files with 301 additions and 128 deletions.
1 change: 1 addition & 0 deletions packages/application-generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
"@novu/testing": "^0.22.0",
"@novu/twilio": "^0.22.0",
"@novu/zulip": "^0.22.0",
"@novu/nexmo": "^0.22.0",
"@sentry/node": "^7.12.1",
"analytics-node": "^6.2.0",
"axios": "^1.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ export * from './generic-sms.handler';
export * from './messagebird.handler';
export * from './azure-sms.handler';
export * from './bulk-sms.handler';
export * from './nexmo.handler';
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { ChannelTypeEnum, ICredentials } from '@novu/shared';
import { BaseSmsHandler } from './base.handler';
import { NexmoSmsProvider } from '@novu/nexmo';

export class NexmoHandler extends BaseSmsHandler {
constructor() {
super('nexmo', ChannelTypeEnum.SMS);
}

buildProvider(credentials: ICredentials) {
this.provider = new NexmoSmsProvider({
apiKey: credentials.apiKey,
from: credentials.from,
apiSecret: credentials.secretKey,
});
}
}
2 changes: 2 additions & 0 deletions packages/application-generic/src/factories/sms/sms.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
MessageBirdHandler,
AzureSmsHandler,
NovuSmsHandler,
NexmoHandler,
} from './handlers';

export class SmsFactory implements ISmsFactory {
Expand Down Expand Up @@ -53,6 +54,7 @@ export class SmsFactory implements ISmsFactory {
new MessageBirdHandler(),
new AzureSmsHandler(),
new NovuSmsHandler(),
new NexmoHandler(),
];

getHandler(integration: IntegrationEntity) {
Expand Down
Loading

0 comments on commit 4f19b2d

Please sign in to comment.