-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IP Pool Name In Integration #3647
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing attributes that i located due the |
||
@ApiPropertyOptional() | ||
@IsString() | ||
@IsOptional() | ||
redirectUrl?: string; | ||
|
||
@ApiPropertyOptional() | ||
@IsBoolean() | ||
@IsOptional() | ||
hmac?: boolean; | ||
|
||
@ApiPropertyOptional() | ||
@IsString() | ||
@IsOptional() | ||
serviceAccount?: string; | ||
|
||
@ApiPropertyOptional() | ||
@IsString() | ||
@IsOptional() | ||
ipPoolName?: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 |
||
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<string, unknown>; | ||
} | ||
|
||
export interface IntegrationEntity { | ||
_id?: string; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 |
||
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<string, unknown>; | ||
redirectUrl?: string; | ||
hmac?: boolean; | ||
} | ||
|
||
export interface IntegrationEntity { | ||
_id?: string; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 |
||
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<string, unknown>; | ||
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; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was not sure what to call this one :/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Decided to keep the "Entity" separation so we will have it in code. because one can change while the other one may not. |
||
export type IntegrationDBModel = ChangePropsValueType<IntegrationEntity, '_environmentId' | '_organizationId'>; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,6 @@ | ||
export interface ICredentialsDto { | ||
apiKey?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 |
||
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<string, unknown>; | ||
webhookUrl?: string; | ||
redirectUrl?: string; | ||
} | ||
import { ICredentials } from '../../entities/integration'; | ||
|
||
export type ICredentialsDto = ICredentials; | ||
|
||
export interface IConstructIntegrationDto { | ||
credentials: ICredentialsDto; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<string, unknown>; | ||
redirectUrl?: string; | ||
hmac?: boolean; | ||
ipPoolName?: string; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './credential.interface'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { ICredentials } from '@novu/dal'; | ||
import { ICredentials } from '@novu/shared'; | ||
import { ChannelTypeEnum } from '@novu/stateless'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that the shared one will do the work in the provider's packages. |
||
import { BaseChatHandler } from './base.handler'; | ||
import { DiscordProvider } from '@novu/discord'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this addition implements: