-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api): improve notification and email handling (#5683)
* refactor(api): improve notification and email handling * refactor(invites): update webhook DTO and use typed headers * feat(env): add HubSpot environment variables * refactor(invites): rename invite-nudge-webhook to invite-nudge
- Loading branch information
1 parent
fa55ff5
commit 75c9ffa
Showing
11 changed files
with
135 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import { IsEmail, IsNotEmpty } from 'class-validator'; | ||
import { IsEmail, IsNotEmpty, IsObject, ValidateNested } from 'class-validator'; | ||
import { Type } from 'class-transformer'; | ||
import { SubscriberEntity } from '@novu/dal'; | ||
|
||
export class InviteMemberDto { | ||
@IsEmail() | ||
@IsNotEmpty() | ||
email: string; | ||
} | ||
|
||
export class InviteWebhookDto { | ||
@IsObject() | ||
@ValidateNested() | ||
@Type(() => SubscriberEntity) | ||
subscriber: SubscriberEntity; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
apps/api/src/app/invites/usecases/invite-nudge-webhook/invite-nudge-command.ts
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
apps/api/src/app/invites/usecases/invite-nudge/invite-nudge.command.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { IsObject, IsString } from 'class-validator'; | ||
import { SubscriberEntity } from '@novu/dal'; | ||
import { BaseCommand } from '../../../shared/commands/base.command'; | ||
|
||
export class InviteNudgeWebhookCommand extends BaseCommand { | ||
@IsString() | ||
hmacHeader: string; | ||
|
||
@IsObject() | ||
subscriber: SubscriberEntity; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters