feat: allow html content for notifications (#9613)
* feat: allow passing provider specific metadata to notification module * changed providerContext to snake cased * rename provider_context to content
This commit is contained in:
1 parent
2a98be6b65
commit
a0b747e117
7 files changed
+121
-2
No files matched your search
@@ -176,3 +176,23 @@ export interface FilterableNotificationProps
|
||||
*/
|
||||
created_at?: OperatorMap<string>
|
||||
}
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*
|
||||
* The structure for content passed to the notification provider.
|
||||
*/
|
||||
export interface NotificationContent {
|
||||
/**
|
||||
* the subject of the notification
|
||||
*/
|
||||
subject?: string
|
||||
/**
|
||||
* the text content of the notification
|
||||
*/
|
||||
text?: string
|
||||
/**
|
||||
* the html content of the notification
|
||||
*/
|
||||
html?: string
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
import { NotificationContent } from "./common"
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*
|
||||
@@ -21,6 +23,10 @@ export interface CreateNotificationDTO {
|
||||
* The data that gets passed over to the provider for rendering the notification.
|
||||
*/
|
||||
data?: Record<string, unknown> | null
|
||||
/**
|
||||
* The content that gets passed over to the provider.
|
||||
*/
|
||||
content?: NotificationContent | null
|
||||
/**
|
||||
* The event name, the workflow, or anything else that can help to identify what triggered the notification.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Attachment } from "./common"
|
||||
import { Attachment, NotificationContent } from "./common"
|
||||
|
||||
/**
|
||||
* @interface
|
||||
@@ -30,6 +30,10 @@ export type ProviderSendNotificationDTO = {
|
||||
* The data that gets passed over to the provider for rendering the notification.
|
||||
*/
|
||||
data?: Record<string, unknown> | null
|
||||
/**
|
||||
* The content that gets passed to the provider.
|
||||
*/
|
||||
content?: NotificationContent | null
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user