From f9528abfd913c5fc8e283d79a529c53847f80392 Mon Sep 17 00:00:00 2001 From: Gosha Date: Thu, 22 Jun 2023 16:19:20 +0300 Subject: [PATCH 1/2] feat: add ip pool name in integration --- .../app/integrations/dtos/credentials.dto.ts | 23 +++++++++++- .../check-integration.command.ts | 5 ++- .../usecases/chat-oauth/chat-oauth.usecase.ts | 4 +-- .../integrations/IntegrationsStoreModal.tsx | 29 ++------------- .../integrations/IntegrationsStorePage.tsx | 29 +-------------- .../components/ConnectIntegrationForm.tsx | 2 +- .../integration/integration.entity.ts | 35 +++---------------- .../integration/integration.schema.ts | 1 + .../credentials/provider-credentials.ts | 6 ++++ .../src/consts/providers/provider.enum.ts | 1 + .../construct-integration.interface.ts | 30 ++-------------- .../integration/credential.interface.ts | 28 +++++++++++++++ libs/shared/src/entities/integration/index.ts | 1 + libs/shared/src/index.ts | 1 + .../chat/handlers/discord.handler.ts | 2 +- .../chat/handlers/mattermost.handler.ts | 2 +- .../chat/handlers/msteams.handler.ts | 2 +- .../factories/chat/handlers/slack.handler.ts | 2 +- .../src/factories/chat/interfaces/index.ts | 4 +-- .../mail/handlers/email-webhook.handler.ts | 3 +- .../mail/handlers/emailjs.handler.ts | 3 +- .../mail/handlers/infobip.handler.ts | 3 +- .../mail/handlers/mailersend.handler.ts | 3 +- .../mail/handlers/mailgun.handler.ts | 3 +- .../mail/handlers/mailjet.handler.ts | 3 +- .../mail/handlers/mandrill.handler.ts | 3 +- .../mail/handlers/nodemailer.handler.ts | 3 +- .../mail/handlers/outlook365.handler.ts | 3 +- .../mail/handlers/postmark.handler.ts | 3 +- .../factories/mail/handlers/resend.handler.ts | 3 +- .../mail/handlers/sendinblue.handler.ts | 3 +- .../factories/mail/handlers/ses.handler.ts | 3 +- .../mail/handlers/sparkpost.handler.ts | 3 +- .../mail/interfaces/send.handler.interface.ts | 3 +- .../factories/push/handlers/apns.handler.ts | 3 +- .../factories/push/handlers/base.handler.ts | 4 +-- .../factories/push/handlers/expo.handler.ts | 3 +- .../factories/push/handlers/fcm.handler.ts | 3 +- .../push/handlers/one-signal.handler.ts | 3 +- .../push/handlers/push-webhook.handler.ts | 3 +- .../push/interfaces/push.handler.interface.ts | 3 +- .../sms/handlers/africas-talking.handler.ts | 3 +- .../factories/sms/handlers/base.handler.ts | 3 +- .../sms/handlers/burst-sms.handler.ts | 3 +- .../sms/handlers/clickatell.handler.ts | 3 +- .../sms/handlers/firetext.handler.ts | 3 +- .../sms/handlers/forty-six-elks.handler.ts | 3 +- .../factories/sms/handlers/gupshup.handler.ts | 3 +- .../factories/sms/handlers/infobip.handler.ts | 3 +- .../factories/sms/handlers/kannel.handler.ts | 3 +- .../factories/sms/handlers/maqsam.handler.ts | 3 +- .../factories/sms/handlers/plivo.handler.ts | 3 +- .../sms/handlers/sms-central.handler.ts | 3 +- .../factories/sms/handlers/sms77.handler.ts | 3 +- .../src/factories/sms/handlers/sns.handler.ts | 3 +- .../factories/sms/handlers/telnyx.handler.ts | 3 +- .../factories/sms/handlers/termii.handler.ts | 3 +- .../factories/sms/handlers/twilio.handler.ts | 3 +- .../sms/interfaces/sms.handler.interface.ts | 3 +- 59 files changed, 122 insertions(+), 206 deletions(-) create mode 100644 libs/shared/src/entities/integration/credential.interface.ts create mode 100644 libs/shared/src/entities/integration/index.ts diff --git a/apps/api/src/app/integrations/dtos/credentials.dto.ts b/apps/api/src/app/integrations/dtos/credentials.dto.ts index 974d306f7dd..164890b0eb2 100644 --- a/apps/api/src/app/integrations/dtos/credentials.dto.ts +++ b/apps/api/src/app/integrations/dtos/credentials.dto.ts @@ -1,8 +1,9 @@ import { ApiPropertyOptional } from '@nestjs/swagger'; import { IsBoolean, IsObject, IsOptional, IsString } from 'class-validator'; import { TransformToBoolean } from '../../shared/transformers/to-boolean'; +import { ICredentials } from '@novu/shared'; -export class CredentialsDto { +export class CredentialsDto implements ICredentials { @ApiPropertyOptional() @IsString() @IsOptional() @@ -115,4 +116,24 @@ export class CredentialsDto { @IsString() @IsOptional() webhookUrl?: string; + + @ApiPropertyOptional() + @IsString() + @IsOptional() + redirectUrl?: string; + + @ApiPropertyOptional() + @IsString() + @IsOptional() + hmac?: boolean; + + @ApiPropertyOptional() + @IsString() + @IsOptional() + serviceAccount?: string; + + @ApiPropertyOptional() + @IsString() + @IsOptional() + ipPoolName?: string; } diff --git a/apps/api/src/app/integrations/usecases/check-integration/check-integration.command.ts b/apps/api/src/app/integrations/usecases/check-integration/check-integration.command.ts index 695e23d94f2..d64564d0950 100644 --- a/apps/api/src/app/integrations/usecases/check-integration/check-integration.command.ts +++ b/apps/api/src/app/integrations/usecases/check-integration/check-integration.command.ts @@ -1,7 +1,6 @@ -import { IsDefined, IsOptional, IsString, IsBoolean } from 'class-validator'; -import { ICredentials } from '@novu/dal'; +import { IsDefined, IsString } from 'class-validator'; import { EnvironmentCommand } from '../../../shared/commands/project.command'; -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; export class CheckIntegrationCommand extends EnvironmentCommand { @IsDefined() diff --git a/apps/api/src/app/subscribers/usecases/chat-oauth/chat-oauth.usecase.ts b/apps/api/src/app/subscribers/usecases/chat-oauth/chat-oauth.usecase.ts index 22b99a86a83..457f914d698 100644 --- a/apps/api/src/app/subscribers/usecases/chat-oauth/chat-oauth.usecase.ts +++ b/apps/api/src/app/subscribers/usecases/chat-oauth/chat-oauth.usecase.ts @@ -1,7 +1,7 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { ChannelTypeEnum } from '@novu/stateless'; -import { IntegrationEntity, IntegrationRepository, EnvironmentRepository, ICredentials } from '@novu/dal'; +import { IntegrationEntity, IntegrationRepository, EnvironmentRepository, ICredentialsEntity } from '@novu/dal'; import { ChatOauthCommand } from './chat-oauth.command'; import { createHash } from '../../../shared/helpers/hmac.service'; @@ -60,7 +60,7 @@ export class ChatOauth { return `${this.SLACK_OAUTH_URL}client_id=${clientId}&scope=incoming-webhook&user_scope=&redirect_uri=${redirectUri}`; } - private async getCredentials(command: ChatOauthCommand): Promise { + private async getCredentials(command: ChatOauthCommand): Promise { const query: Partial & { _environmentId: string } = { _environmentId: command.environmentId, channel: ChannelTypeEnum.CHAT, diff --git a/apps/web/src/pages/integrations/IntegrationsStoreModal.tsx b/apps/web/src/pages/integrations/IntegrationsStoreModal.tsx index f09698ad683..e691b74c0f6 100644 --- a/apps/web/src/pages/integrations/IntegrationsStoreModal.tsx +++ b/apps/web/src/pages/integrations/IntegrationsStoreModal.tsx @@ -9,6 +9,7 @@ import { InAppProviderIdEnum, ProvidersIdEnum, SmsProviderIdEnum, + ICredentials, } from '@novu/shared'; import { useAuthController, useEnvController } from '../../hooks'; @@ -18,7 +19,7 @@ import { NovuInAppProviderModal } from './components/NovuInAppProviderModal'; import { ChannelGroup } from './components/Modal/ChannelGroup'; import { colors, shadows, Title } from '../../design-system'; import { ConnectIntegrationForm } from './components/Modal/ConnectIntegrationForm'; -import { Close } from '../../design-system/icons/actions/Close'; +import { Close } from '../../design-system/icons'; import { useProviders } from './useProviders'; import { useSegment } from '../../components/providers/SegmentProvider'; import { IntegrationsStoreModalAnalytics } from './constants'; @@ -328,32 +329,6 @@ export interface IIntegratedProvider { novu?: boolean; } -export interface ICredentials { - apiKey?: string; - user?: string; - secretKey?: string; - domain?: string; - password?: string; - host?: string; - port?: string; - secure?: boolean; - region?: string; - accountSid?: string; - messageProfileId?: string; - token?: string; - from?: string; - senderName?: string; - applicationId?: string; - clientId?: string; - projectName?: string; - serviceAccount?: string; - baseUrl?: string; - webhookUrl?: string; - requireTls?: boolean; - ignoreTls?: boolean; - tlsOptions?: Record; -} - export interface IntegrationEntity { _id?: string; diff --git a/apps/web/src/pages/integrations/IntegrationsStorePage.tsx b/apps/web/src/pages/integrations/IntegrationsStorePage.tsx index 2635e32b011..b6268d108ed 100644 --- a/apps/web/src/pages/integrations/IntegrationsStorePage.tsx +++ b/apps/web/src/pages/integrations/IntegrationsStorePage.tsx @@ -12,6 +12,7 @@ import { InAppProviderIdEnum, ProvidersIdEnum, SmsProviderIdEnum, + ICredentials, } from '@novu/shared'; import PageHeader from '../../components/layout/components/PageHeader'; @@ -152,34 +153,6 @@ export interface IIntegratedProvider { novu?: boolean; } -export interface ICredentials { - apiKey?: string; - user?: string; - secretKey?: string; - domain?: string; - password?: string; - host?: string; - port?: string; - secure?: boolean; - region?: string; - accountSid?: string; - messageProfileId?: string; - token?: string; - from?: string; - senderName?: string; - applicationId?: string; - clientId?: string; - projectName?: string; - serviceAccount?: string; - baseUrl?: string; - webhookUrl?: string; - requireTls?: boolean; - ignoreTls?: boolean; - tlsOptions?: Record; - redirectUrl?: string; - hmac?: boolean; -} - export interface IntegrationEntity { _id?: string; diff --git a/apps/web/src/pages/integrations/components/ConnectIntegrationForm.tsx b/apps/web/src/pages/integrations/components/ConnectIntegrationForm.tsx index e1dd3bfe06e..cc4b00460be 100644 --- a/apps/web/src/pages/integrations/components/ConnectIntegrationForm.tsx +++ b/apps/web/src/pages/integrations/components/ConnectIntegrationForm.tsx @@ -11,7 +11,7 @@ import { ChannelTypeEnum, ICredentialsDto, IConfigCredentials } from '@novu/shar import { Button, colors, Input, Switch, Text } from '../../../design-system'; import { IIntegratedProvider } from '../IntegrationsStorePage'; import { createIntegration, getWebhookSupportStatus, updateIntegration } from '../../../api/integration'; -import { Close } from '../../../design-system/icons/actions/Close'; +import { Close } from '../../../design-system/icons'; import { IntegrationInput } from './IntegrationInput'; import { IS_DOCKER_HOSTED, WEBHOOK_URL } from '../../../config'; import { useEnvController, useAuthController } from '../../../hooks'; diff --git a/libs/dal/src/repositories/integration/integration.entity.ts b/libs/dal/src/repositories/integration/integration.entity.ts index 5b7881ed22f..0dfd6423a18 100644 --- a/libs/dal/src/repositories/integration/integration.entity.ts +++ b/libs/dal/src/repositories/integration/integration.entity.ts @@ -1,38 +1,9 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import type { EnvironmentId } from '../environment'; import type { OrganizationId } from '../organization'; import { ChangePropsValueType } from '../../types/helpers'; -export interface ICredentials { - apiKey?: string; - user?: string; - secretKey?: string; - domain?: string; - password?: string; - host?: string; - port?: string; - secure?: boolean; - region?: string; - accountSid?: string; - messageProfileId?: string; - token?: string; - from?: string; - senderName?: string; - applicationId?: string; - clientId?: string; - projectName?: string; - serviceAccount?: string; - baseUrl?: string; - webhookUrl?: string; - ipPoolName?: string; - requireTls?: boolean; - ignoreTls?: boolean; - tlsOptions?: Record; - redirectUrl?: string; - hmac?: boolean; -} - export class IntegrationEntity { _id: string; @@ -44,7 +15,7 @@ export class IntegrationEntity { channel: ChannelTypeEnum; - credentials: ICredentials; + credentials: ICredentialsEntity; active: boolean; @@ -59,4 +30,6 @@ export class IntegrationEntity { deletedBy: string; } +export type ICredentialsEntity = ICredentials; + export type IntegrationDBModel = ChangePropsValueType; diff --git a/libs/dal/src/repositories/integration/integration.schema.ts b/libs/dal/src/repositories/integration/integration.schema.ts index c35e9a449dd..80473fd312a 100644 --- a/libs/dal/src/repositories/integration/integration.schema.ts +++ b/libs/dal/src/repositories/integration/integration.schema.ts @@ -44,6 +44,7 @@ const integrationSchema = new Schema( tlsOptions: Schema.Types.Mixed, redirectUrl: Schema.Types.String, hmac: Schema.Types.Boolean, + ipPoolName: Schema.Types.String, }, active: { type: Schema.Types.Boolean, diff --git a/libs/shared/src/consts/providers/credentials/provider-credentials.ts b/libs/shared/src/consts/providers/credentials/provider-credentials.ts index 75d5be4f625..c53887d9d43 100644 --- a/libs/shared/src/consts/providers/credentials/provider-credentials.ts +++ b/libs/shared/src/consts/providers/credentials/provider-credentials.ts @@ -201,6 +201,12 @@ export const sendgridConfig: IConfigCredentials[] = [ type: 'string', required: true, }, + { + key: CredentialsKeyEnum.IpPoolName, + displayName: 'IP Pool Name', + type: 'string', + required: false, + }, ...mailConfigBase, ]; diff --git a/libs/shared/src/consts/providers/provider.enum.ts b/libs/shared/src/consts/providers/provider.enum.ts index 4a481600765..346c30daa96 100644 --- a/libs/shared/src/consts/providers/provider.enum.ts +++ b/libs/shared/src/consts/providers/provider.enum.ts @@ -26,6 +26,7 @@ export enum CredentialsKeyEnum { TlsOptions = 'tlsOptions', RedirectUrl = 'redirectUrl', Hmac = 'hmac', + IpPoolName = 'ipPoolName', } export enum EmailProviderIdEnum { diff --git a/libs/shared/src/dto/integration/construct-integration.interface.ts b/libs/shared/src/dto/integration/construct-integration.interface.ts index 86d4da39d89..c7921fef295 100644 --- a/libs/shared/src/dto/integration/construct-integration.interface.ts +++ b/libs/shared/src/dto/integration/construct-integration.interface.ts @@ -1,30 +1,6 @@ -export interface ICredentialsDto { - apiKey?: string; - user?: string; - secretKey?: string; - domain?: string; - password?: string; - host?: string; - port?: string; - secure?: boolean; - hmac?: boolean; - region?: string; - accountSid?: string; - messageProfileId?: string; - token?: string; - from?: string; - senderName?: string; - applicationId?: string; - clientId?: string; - projectName?: string; - serviceAccount?: string; - baseUrl?: string; - requireTls?: boolean; - ignoreTls?: boolean; - tlsOptions?: Record; - webhookUrl?: string; - redirectUrl?: string; -} +import { ICredentials } from '../../entities/integration'; + +export type ICredentialsDto = ICredentials; export interface IConstructIntegrationDto { credentials: ICredentialsDto; diff --git a/libs/shared/src/entities/integration/credential.interface.ts b/libs/shared/src/entities/integration/credential.interface.ts new file mode 100644 index 00000000000..2991c1d3ce9 --- /dev/null +++ b/libs/shared/src/entities/integration/credential.interface.ts @@ -0,0 +1,28 @@ +export interface ICredentials { + apiKey?: string; + user?: string; + secretKey?: string; + domain?: string; + password?: string; + host?: string; + port?: string; + secure?: boolean; + region?: string; + accountSid?: string; + messageProfileId?: string; + token?: string; + from?: string; + senderName?: string; + applicationId?: string; + clientId?: string; + projectName?: string; + serviceAccount?: string; + baseUrl?: string; + webhookUrl?: string; + requireTls?: boolean; + ignoreTls?: boolean; + tlsOptions?: Record; + redirectUrl?: string; + hmac?: boolean; + ipPoolName?: string; +} diff --git a/libs/shared/src/entities/integration/index.ts b/libs/shared/src/entities/integration/index.ts new file mode 100644 index 00000000000..8817fc01ba3 --- /dev/null +++ b/libs/shared/src/entities/integration/index.ts @@ -0,0 +1 @@ +export * from './credential.interface'; diff --git a/libs/shared/src/index.ts b/libs/shared/src/index.ts index 24f9793b344..b40313c08a4 100644 --- a/libs/shared/src/index.ts +++ b/libs/shared/src/index.ts @@ -15,6 +15,7 @@ export * from './entities/subscriber-preference'; export * from './entities/subscriber'; export * from './entities/layout'; export * from './entities/notification-group'; +export * from './entities/integration'; export * from './types'; export * from './dto'; export * from './consts'; diff --git a/packages/application-generic/src/factories/chat/handlers/discord.handler.ts b/packages/application-generic/src/factories/chat/handlers/discord.handler.ts index aac6039e905..fa47821fa71 100644 --- a/packages/application-generic/src/factories/chat/handlers/discord.handler.ts +++ b/packages/application-generic/src/factories/chat/handlers/discord.handler.ts @@ -1,4 +1,4 @@ -import { ICredentials } from '@novu/dal'; +import { ICredentials } from '@novu/shared'; import { ChannelTypeEnum } from '@novu/stateless'; import { BaseChatHandler } from './base.handler'; import { DiscordProvider } from '@novu/discord'; diff --git a/packages/application-generic/src/factories/chat/handlers/mattermost.handler.ts b/packages/application-generic/src/factories/chat/handlers/mattermost.handler.ts index 2a8abe3ee97..793c2ae0c20 100644 --- a/packages/application-generic/src/factories/chat/handlers/mattermost.handler.ts +++ b/packages/application-generic/src/factories/chat/handlers/mattermost.handler.ts @@ -1,4 +1,4 @@ -import { ICredentials } from '@novu/dal'; +import { ICredentials } from '@novu/shared'; import { ChannelTypeEnum } from '@novu/stateless'; import { BaseChatHandler } from './base.handler'; import { MattermostProvider } from '@novu/mattermost'; diff --git a/packages/application-generic/src/factories/chat/handlers/msteams.handler.ts b/packages/application-generic/src/factories/chat/handlers/msteams.handler.ts index 31de2479328..52daef57ded 100644 --- a/packages/application-generic/src/factories/chat/handlers/msteams.handler.ts +++ b/packages/application-generic/src/factories/chat/handlers/msteams.handler.ts @@ -1,4 +1,4 @@ -import { ICredentials } from '@novu/dal'; +import { ICredentials } from '@novu/shared'; import { ChannelTypeEnum } from '@novu/stateless'; import { BaseChatHandler } from './base.handler'; import { MsTeamsProvider } from '@novu/ms-teams'; diff --git a/packages/application-generic/src/factories/chat/handlers/slack.handler.ts b/packages/application-generic/src/factories/chat/handlers/slack.handler.ts index 806319ab567..420fd4e7fd3 100644 --- a/packages/application-generic/src/factories/chat/handlers/slack.handler.ts +++ b/packages/application-generic/src/factories/chat/handlers/slack.handler.ts @@ -1,4 +1,4 @@ -import { ICredentials } from '@novu/dal'; +import { ICredentials } from '@novu/shared'; import { ChannelTypeEnum } from '@novu/stateless'; import { SlackProvider } from '@novu/slack'; diff --git a/packages/application-generic/src/factories/chat/interfaces/index.ts b/packages/application-generic/src/factories/chat/interfaces/index.ts index 2bd550b6be1..e9170622da8 100644 --- a/packages/application-generic/src/factories/chat/interfaces/index.ts +++ b/packages/application-generic/src/factories/chat/interfaces/index.ts @@ -1,6 +1,6 @@ import { IChatOptions, ISendMessageSuccessResponse } from '@novu/stateless'; -import { ICredentials, IntegrationEntity } from '@novu/dal'; -import { ChannelTypeEnum } from '@novu/shared'; +import { IntegrationEntity } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; export interface IChatHandler { canHandle(providerId: string, channelType: ChannelTypeEnum); diff --git a/packages/application-generic/src/factories/mail/handlers/email-webhook.handler.ts b/packages/application-generic/src/factories/mail/handlers/email-webhook.handler.ts index 9b1f4071bd3..3803556afec 100644 --- a/packages/application-generic/src/factories/mail/handlers/email-webhook.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/email-webhook.handler.ts @@ -1,6 +1,5 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { EmailWebhookProvider } from '@novu/email-webhook'; -import { ICredentials } from '@novu/dal'; import { BaseHandler } from './base.handler'; export class EmailWebhookHandler extends BaseHandler { constructor() { diff --git a/packages/application-generic/src/factories/mail/handlers/emailjs.handler.ts b/packages/application-generic/src/factories/mail/handlers/emailjs.handler.ts index e6485fd1412..736526067ae 100644 --- a/packages/application-generic/src/factories/mail/handlers/emailjs.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/emailjs.handler.ts @@ -1,7 +1,6 @@ import { IEmailJsConfig } from '@novu/emailjs/build/main/lib/emailjs.config'; import { EmailJsProvider } from '@novu/emailjs'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseHandler } from './base.handler'; /** diff --git a/packages/application-generic/src/factories/mail/handlers/infobip.handler.ts b/packages/application-generic/src/factories/mail/handlers/infobip.handler.ts index 4ee5635a6c0..6640e65ad3e 100644 --- a/packages/application-generic/src/factories/mail/handlers/infobip.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/infobip.handler.ts @@ -1,6 +1,5 @@ import { InfobipEmailProvider } from '@novu/infobip'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseHandler } from './base.handler'; export class InfobipEmailHandler extends BaseHandler { diff --git a/packages/application-generic/src/factories/mail/handlers/mailersend.handler.ts b/packages/application-generic/src/factories/mail/handlers/mailersend.handler.ts index 0e9ddb647e0..d226375f6a9 100644 --- a/packages/application-generic/src/factories/mail/handlers/mailersend.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/mailersend.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { MailersendEmailProvider } from '@novu/mailersend'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/mailgun.handler.ts b/packages/application-generic/src/factories/mail/handlers/mailgun.handler.ts index 0eeaea047df..d903e07bb1b 100644 --- a/packages/application-generic/src/factories/mail/handlers/mailgun.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/mailgun.handler.ts @@ -1,6 +1,5 @@ import { MailgunEmailProvider } from '@novu/mailgun'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseHandler } from './base.handler'; export class MailgunHandler extends BaseHandler { diff --git a/packages/application-generic/src/factories/mail/handlers/mailjet.handler.ts b/packages/application-generic/src/factories/mail/handlers/mailjet.handler.ts index 71194cfbae9..b80e338ea5a 100644 --- a/packages/application-generic/src/factories/mail/handlers/mailjet.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/mailjet.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { MailjetEmailProvider } from '@novu/mailjet'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/mandrill.handler.ts b/packages/application-generic/src/factories/mail/handlers/mandrill.handler.ts index 5b705bbe9bf..9d30134c159 100644 --- a/packages/application-generic/src/factories/mail/handlers/mandrill.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/mandrill.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { MandrillProvider } from '@novu/mandrill'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/nodemailer.handler.ts b/packages/application-generic/src/factories/mail/handlers/nodemailer.handler.ts index 4cfb5812dee..3e76f19591f 100644 --- a/packages/application-generic/src/factories/mail/handlers/nodemailer.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/nodemailer.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { NodemailerProvider } from '@novu/nodemailer'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/outlook365.handler.ts b/packages/application-generic/src/factories/mail/handlers/outlook365.handler.ts index 587c6288fcd..490305125fe 100644 --- a/packages/application-generic/src/factories/mail/handlers/outlook365.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/outlook365.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { Outlook365Provider } from '@novu/outlook365'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/postmark.handler.ts b/packages/application-generic/src/factories/mail/handlers/postmark.handler.ts index 0b8ca42af59..61366ad1b7a 100644 --- a/packages/application-generic/src/factories/mail/handlers/postmark.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/postmark.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { PostmarkEmailProvider } from '@novu/postmark'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/resend.handler.ts b/packages/application-generic/src/factories/mail/handlers/resend.handler.ts index d028ebeea9a..c2ff2108ba7 100644 --- a/packages/application-generic/src/factories/mail/handlers/resend.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/resend.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { ResendEmailProvider } from '@novu/resend'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/sendinblue.handler.ts b/packages/application-generic/src/factories/mail/handlers/sendinblue.handler.ts index 09d1275eb1e..c293190e6ad 100644 --- a/packages/application-generic/src/factories/mail/handlers/sendinblue.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/sendinblue.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { SendinblueEmailProvider } from '@novu/sendinblue'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/ses.handler.ts b/packages/application-generic/src/factories/mail/handlers/ses.handler.ts index c5db0770749..ceb458ad434 100644 --- a/packages/application-generic/src/factories/mail/handlers/ses.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/ses.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { SESConfig } from '@novu/ses/build/module/lib/ses.config'; import { SESEmailProvider } from '@novu/ses'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/handlers/sparkpost.handler.ts b/packages/application-generic/src/factories/mail/handlers/sparkpost.handler.ts index 51c0b5e0f9e..b3e26e17295 100644 --- a/packages/application-generic/src/factories/mail/handlers/sparkpost.handler.ts +++ b/packages/application-generic/src/factories/mail/handlers/sparkpost.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { SparkPostEmailProvider } from '@novu/sparkpost'; import { BaseHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/mail/interfaces/send.handler.interface.ts b/packages/application-generic/src/factories/mail/interfaces/send.handler.interface.ts index e03b2e06368..4bb2854ca0b 100644 --- a/packages/application-generic/src/factories/mail/interfaces/send.handler.interface.ts +++ b/packages/application-generic/src/factories/mail/interfaces/send.handler.interface.ts @@ -4,8 +4,7 @@ import { ISendMessageSuccessResponse, ICheckIntegrationResponse, } from '@novu/stateless'; -import { ICredentials } from '@novu/dal'; -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; export interface IMailHandler { canHandle(providerId: string, channelType: ChannelTypeEnum); diff --git a/packages/application-generic/src/factories/push/handlers/apns.handler.ts b/packages/application-generic/src/factories/push/handlers/apns.handler.ts index 46c0cf6a18f..2dec62b7281 100644 --- a/packages/application-generic/src/factories/push/handlers/apns.handler.ts +++ b/packages/application-generic/src/factories/push/handlers/apns.handler.ts @@ -1,7 +1,6 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { APNSPushProvider } from '@novu/apns'; import { BasePushHandler } from './base.handler'; -import { ICredentials } from '@novu/dal'; export class APNSHandler extends BasePushHandler { constructor() { diff --git a/packages/application-generic/src/factories/push/handlers/base.handler.ts b/packages/application-generic/src/factories/push/handlers/base.handler.ts index 1472475e961..5d4d52af8ab 100644 --- a/packages/application-generic/src/factories/push/handlers/base.handler.ts +++ b/packages/application-generic/src/factories/push/handlers/base.handler.ts @@ -1,6 +1,6 @@ import { IPushOptions, IPushProvider } from '@novu/stateless'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; +import {} from '@novu/dal'; import { IPushHandler } from '../interfaces'; export abstract class BasePushHandler implements IPushHandler { diff --git a/packages/application-generic/src/factories/push/handlers/expo.handler.ts b/packages/application-generic/src/factories/push/handlers/expo.handler.ts index b471c2a5688..a3714700a6a 100644 --- a/packages/application-generic/src/factories/push/handlers/expo.handler.ts +++ b/packages/application-generic/src/factories/push/handlers/expo.handler.ts @@ -1,7 +1,6 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { ExpoPushProvider } from '@novu/expo'; import { BasePushHandler } from './base.handler'; -import { ICredentials } from '@novu/dal'; export class ExpoHandler extends BasePushHandler { constructor() { diff --git a/packages/application-generic/src/factories/push/handlers/fcm.handler.ts b/packages/application-generic/src/factories/push/handlers/fcm.handler.ts index db47a996552..6ff918fb361 100644 --- a/packages/application-generic/src/factories/push/handlers/fcm.handler.ts +++ b/packages/application-generic/src/factories/push/handlers/fcm.handler.ts @@ -1,7 +1,6 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { FcmPushProvider } from '@novu/fcm'; import { BasePushHandler } from './base.handler'; -import { ICredentials } from '@novu/dal'; export class FCMHandler extends BasePushHandler { constructor() { diff --git a/packages/application-generic/src/factories/push/handlers/one-signal.handler.ts b/packages/application-generic/src/factories/push/handlers/one-signal.handler.ts index b053d5ba7ea..f344e25b6fc 100644 --- a/packages/application-generic/src/factories/push/handlers/one-signal.handler.ts +++ b/packages/application-generic/src/factories/push/handlers/one-signal.handler.ts @@ -1,7 +1,6 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { OneSignalPushProvider } from '@novu/one-signal'; import { BasePushHandler } from './base.handler'; -import { ICredentials } from '@novu/dal'; export class OneSignalHandler extends BasePushHandler { constructor() { diff --git a/packages/application-generic/src/factories/push/handlers/push-webhook.handler.ts b/packages/application-generic/src/factories/push/handlers/push-webhook.handler.ts index fd422665957..1e85b93b1fc 100644 --- a/packages/application-generic/src/factories/push/handlers/push-webhook.handler.ts +++ b/packages/application-generic/src/factories/push/handlers/push-webhook.handler.ts @@ -1,7 +1,6 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { PushWebhookPushProvider } from '@novu/push-webhook'; import { BasePushHandler } from './base.handler'; -import { ICredentials } from '@novu/dal'; export class PushWebhookHandler extends BasePushHandler { constructor() { diff --git a/packages/application-generic/src/factories/push/interfaces/push.handler.interface.ts b/packages/application-generic/src/factories/push/interfaces/push.handler.interface.ts index d4d88e55a96..ebf70721849 100644 --- a/packages/application-generic/src/factories/push/interfaces/push.handler.interface.ts +++ b/packages/application-generic/src/factories/push/interfaces/push.handler.interface.ts @@ -1,6 +1,5 @@ import { IPushOptions, ISendMessageSuccessResponse } from '@novu/stateless'; -import { ICredentials } from '@novu/dal'; -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; export interface IPushHandler { canHandle(providerId: string, channelType: ChannelTypeEnum); diff --git a/packages/application-generic/src/factories/sms/handlers/africas-talking.handler.ts b/packages/application-generic/src/factories/sms/handlers/africas-talking.handler.ts index e67e4ad8a88..d6cdd03134e 100644 --- a/packages/application-generic/src/factories/sms/handlers/africas-talking.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/africas-talking.handler.ts @@ -1,6 +1,5 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { AfricasTalkingSmsProvider } from '@novu/africas-talking'; -import { ICredentials } from '@novu/dal'; import { BaseSmsHandler } from './base.handler'; export class AfricasTalkingSmsHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/base.handler.ts b/packages/application-generic/src/factories/sms/handlers/base.handler.ts index 92c8230243e..a4e4767bc78 100644 --- a/packages/application-generic/src/factories/sms/handlers/base.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/base.handler.ts @@ -1,6 +1,5 @@ import { ISmsOptions, ISmsProvider } from '@novu/stateless'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { ISmsHandler } from '../interfaces'; export abstract class BaseSmsHandler implements ISmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/burst-sms.handler.ts b/packages/application-generic/src/factories/sms/handlers/burst-sms.handler.ts index f8db920d5dc..59125e09f45 100644 --- a/packages/application-generic/src/factories/sms/handlers/burst-sms.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/burst-sms.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; import { BurstSmsProvider } from '@novu/burst-sms'; diff --git a/packages/application-generic/src/factories/sms/handlers/clickatell.handler.ts b/packages/application-generic/src/factories/sms/handlers/clickatell.handler.ts index aa250b86ec9..4f30674e7aa 100644 --- a/packages/application-generic/src/factories/sms/handlers/clickatell.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/clickatell.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { ClickatellSmsProvider } from '@novu/clickatell'; import { BaseSmsHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/sms/handlers/firetext.handler.ts b/packages/application-generic/src/factories/sms/handlers/firetext.handler.ts index a552b331ce4..e11eda6c799 100644 --- a/packages/application-generic/src/factories/sms/handlers/firetext.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/firetext.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; import { FiretextSmsProvider } from '@novu/firetext'; diff --git a/packages/application-generic/src/factories/sms/handlers/forty-six-elks.handler.ts b/packages/application-generic/src/factories/sms/handlers/forty-six-elks.handler.ts index 45706243056..b6d2f88b7db 100644 --- a/packages/application-generic/src/factories/sms/handlers/forty-six-elks.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/forty-six-elks.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; import { FortySixElksSmsProvider } from '@novu/forty-six-elks'; diff --git a/packages/application-generic/src/factories/sms/handlers/gupshup.handler.ts b/packages/application-generic/src/factories/sms/handlers/gupshup.handler.ts index 433afda4eb0..6b5b0ae6933 100644 --- a/packages/application-generic/src/factories/sms/handlers/gupshup.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/gupshup.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; import { GupshupSmsProvider } from '@novu/gupshup'; diff --git a/packages/application-generic/src/factories/sms/handlers/infobip.handler.ts b/packages/application-generic/src/factories/sms/handlers/infobip.handler.ts index dccba7405d2..ada62a59990 100644 --- a/packages/application-generic/src/factories/sms/handlers/infobip.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/infobip.handler.ts @@ -1,6 +1,5 @@ import { InfobipSmsProvider } from '@novu/infobip'; -import { ChannelTypeEnum, SmsProviderIdEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, SmsProviderIdEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; export class InfobipSmsHandler extends BaseSmsHandler { constructor() { diff --git a/packages/application-generic/src/factories/sms/handlers/kannel.handler.ts b/packages/application-generic/src/factories/sms/handlers/kannel.handler.ts index 94534cd8261..d868724db70 100644 --- a/packages/application-generic/src/factories/sms/handlers/kannel.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/kannel.handler.ts @@ -1,6 +1,5 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { KannelSmsProvider } from '@novu/kannel'; -import { ICredentials } from '@novu/dal'; import { BaseSmsHandler } from './base.handler'; export class KannelSmsHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/maqsam.handler.ts b/packages/application-generic/src/factories/sms/handlers/maqsam.handler.ts index 7a40bcb21a9..201adb1db30 100644 --- a/packages/application-generic/src/factories/sms/handlers/maqsam.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/maqsam.handler.ts @@ -1,6 +1,5 @@ import { MaqsamSmsProvider } from '@novu/maqsam'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; export class MaqsamHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/plivo.handler.ts b/packages/application-generic/src/factories/sms/handlers/plivo.handler.ts index 9d65ab4f2b5..07d623f4064 100644 --- a/packages/application-generic/src/factories/sms/handlers/plivo.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/plivo.handler.ts @@ -1,6 +1,5 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { PlivoSmsProvider } from '@novu/plivo'; -import { ICredentials } from '@novu/dal'; import { BaseSmsHandler } from './base.handler'; export class PlivoHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/sms-central.handler.ts b/packages/application-generic/src/factories/sms/handlers/sms-central.handler.ts index e76131a478a..bc97f6133ac 100644 --- a/packages/application-generic/src/factories/sms/handlers/sms-central.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/sms-central.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; import { SmsCentralSmsProvider } from '@novu/sms-central'; diff --git a/packages/application-generic/src/factories/sms/handlers/sms77.handler.ts b/packages/application-generic/src/factories/sms/handlers/sms77.handler.ts index 4c9959ddaf1..126947cc6f4 100644 --- a/packages/application-generic/src/factories/sms/handlers/sms77.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/sms77.handler.ts @@ -1,5 +1,4 @@ -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { Sms77SmsProvider } from '@novu/sms77'; import { BaseSmsHandler } from './base.handler'; diff --git a/packages/application-generic/src/factories/sms/handlers/sns.handler.ts b/packages/application-generic/src/factories/sms/handlers/sns.handler.ts index bbcd5d27774..4b8fd4e5d89 100644 --- a/packages/application-generic/src/factories/sms/handlers/sns.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/sns.handler.ts @@ -1,7 +1,6 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { SNSSmsProvider } from '@novu/sns'; import { SNSConfig } from '@novu/sns/build/main/lib/sns.config'; -import { ICredentials } from '@novu/dal'; import { BaseSmsHandler } from './base.handler'; export class SnsHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/telnyx.handler.ts b/packages/application-generic/src/factories/sms/handlers/telnyx.handler.ts index 950dab04a37..55908600fde 100644 --- a/packages/application-generic/src/factories/sms/handlers/telnyx.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/telnyx.handler.ts @@ -1,6 +1,5 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { TelnyxSmsProvider } from '@novu/telnyx'; -import { ICredentials } from '@novu/dal'; import { BaseSmsHandler } from './base.handler'; export class TelnyxHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/termii.handler.ts b/packages/application-generic/src/factories/sms/handlers/termii.handler.ts index 6b4a038b99d..b964ec883a9 100644 --- a/packages/application-generic/src/factories/sms/handlers/termii.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/termii.handler.ts @@ -1,6 +1,5 @@ -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { TermiiSmsProvider } from '@novu/termii'; -import { ICredentials } from '@novu/dal'; import { BaseSmsHandler } from './base.handler'; export class TermiiSmsHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/handlers/twilio.handler.ts b/packages/application-generic/src/factories/sms/handlers/twilio.handler.ts index c93b82d6aca..1e8e52c5a8e 100644 --- a/packages/application-generic/src/factories/sms/handlers/twilio.handler.ts +++ b/packages/application-generic/src/factories/sms/handlers/twilio.handler.ts @@ -1,6 +1,5 @@ import { TwilioSmsProvider } from '@novu/twilio'; -import { ChannelTypeEnum } from '@novu/shared'; -import { ICredentials } from '@novu/dal'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; import { BaseSmsHandler } from './base.handler'; export class TwilioHandler extends BaseSmsHandler { diff --git a/packages/application-generic/src/factories/sms/interfaces/sms.handler.interface.ts b/packages/application-generic/src/factories/sms/interfaces/sms.handler.interface.ts index 9337ad5e61b..3c5e60de0ed 100644 --- a/packages/application-generic/src/factories/sms/interfaces/sms.handler.interface.ts +++ b/packages/application-generic/src/factories/sms/interfaces/sms.handler.interface.ts @@ -3,8 +3,7 @@ import { ISmsOptions, ISmsProvider, } from '@novu/stateless'; -import { ICredentials } from '@novu/dal'; -import { ChannelTypeEnum } from '@novu/shared'; +import { ChannelTypeEnum, ICredentials } from '@novu/shared'; export interface ISmsHandler { canHandle(providerId: string, channelType: ChannelTypeEnum); From 4cd81ae7b043b4b07b89b32f16c14806c6546b1f Mon Sep 17 00:00:00 2001 From: Gosha Date: Thu, 22 Jun 2023 17:52:02 +0300 Subject: [PATCH 2/2] fix: wrong type validation --- apps/api/src/app/integrations/dtos/credentials.dto.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/app/integrations/dtos/credentials.dto.ts b/apps/api/src/app/integrations/dtos/credentials.dto.ts index 164890b0eb2..5701d25fbc2 100644 --- a/apps/api/src/app/integrations/dtos/credentials.dto.ts +++ b/apps/api/src/app/integrations/dtos/credentials.dto.ts @@ -123,7 +123,7 @@ export class CredentialsDto implements ICredentials { redirectUrl?: string; @ApiPropertyOptional() - @IsString() + @IsBoolean() @IsOptional() hmac?: boolean;