-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): update nestjs-notification vertion to 2
BREAKING CHANGE: update nestjs-notification vertion to 2
- Loading branch information
1 parent
866c753
commit 8c6fd68
Showing
6 changed files
with
32 additions
and
23 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,15 +1,15 @@ | ||
import { NestJsNotify } from '@sinuos/nestjs-notification'; | ||
import { NestJsNotification } from '@sinuos/nestjs-notification'; | ||
|
||
/** | ||
* Webhook channel model | ||
* @interface IWebhookChannel | ||
* @extends NestJsNotify | ||
* @extends NestJsNotification | ||
*/ | ||
export interface IWebhookChannel extends NestJsNotify { | ||
export interface IWebhookChannel extends NestJsNotification { | ||
/** | ||
* Get the Http representation of the notification. | ||
* @property | ||
* @returns {any} http payload data | ||
*/ | ||
toWebhook(): any; | ||
toWebhook?(): any; | ||
} |
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,19 +1,22 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { NestJsNotify, NestjsNotifyService } from '@sinuos/nestjs-notification'; | ||
import { | ||
NestJsNotification, | ||
NestjsNotificationService, | ||
} from '@sinuos/nestjs-notification'; | ||
|
||
@Injectable() | ||
export class WebhookChannelService { | ||
/** | ||
* @constructor | ||
* @param notifications | ||
* @param {NestjsNotificationService} notifications | ||
*/ | ||
constructor(private readonly notifications: NestjsNotifyService) {} | ||
constructor(private readonly notifications: NestjsNotificationService) {} | ||
|
||
/** | ||
* Notify notification. | ||
* @param notification | ||
* Notify. | ||
* @param {NestJsNotification} notification | ||
*/ | ||
async notify(notification: NestJsNotify): Promise<any> { | ||
async notify(notification: NestJsNotification): Promise<any> { | ||
return this.notifications.send(notification); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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