feat: Add the basic implementation of notification module (#7282)
* feat: Add the basic implementation of notification module * fix: Minor fixes and introduction of idempotency key * fix: Changes based on PR review
This commit is contained in:
@@ -24,5 +24,6 @@ export * from "./user"
|
||||
export * from "./api-key"
|
||||
export * from "./link"
|
||||
export * from "./file"
|
||||
export * from "./notification"
|
||||
|
||||
export const MedusaModuleType = Symbol.for("MedusaModule")
|
||||
|
||||
@@ -22,4 +22,5 @@ export enum Modules {
|
||||
STORE = "store",
|
||||
CURRENCY = "currency",
|
||||
FILE = "file",
|
||||
NOTIFICATION = "notification",
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { NotificationTypes, INotificationProvider } from "@medusajs/types"
|
||||
|
||||
export class AbstractNotificationProviderService
|
||||
implements INotificationProvider
|
||||
{
|
||||
async send(
|
||||
notification: NotificationTypes.ProviderSendNotificationDTO
|
||||
): Promise<NotificationTypes.ProviderSendNotificationResultsDTO> {
|
||||
throw Error(
|
||||
`send is not implemented in ${
|
||||
Object.getPrototypeOf(this).constructor.name
|
||||
}`
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./abstract-notification-provider"
|
||||
Reference in New Issue
Block a user