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:
Stevche Radevski
2024-05-10 11:22:03 +02:00
committed by GitHub
parent 6ec5ded6c8
commit 144e09e852
43 changed files with 1666 additions and 1 deletions
+1
View File
@@ -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"