From cb0f065c9dd59fe54a52c337f9b5392723f9db58 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 7 Feb 2025 17:30:08 +0200 Subject: [PATCH] fix(utils): add static identifier to AbstractNotificationProviderService (#11344) --- .changeset/good-hornets-protect.md | 5 +++++ .../src/notification/abstract-notification-provider.ts | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .changeset/good-hornets-protect.md diff --git a/.changeset/good-hornets-protect.md b/.changeset/good-hornets-protect.md new file mode 100644 index 0000000000..5bb6efb852 --- /dev/null +++ b/.changeset/good-hornets-protect.md @@ -0,0 +1,5 @@ +--- +"@medusajs/utils": patch +--- + +fix(utils): add static identifier to AbstractNotificationProviderService diff --git a/packages/core/utils/src/notification/abstract-notification-provider.ts b/packages/core/utils/src/notification/abstract-notification-provider.ts index bb788bb9c6..17eecef3b2 100644 --- a/packages/core/utils/src/notification/abstract-notification-provider.ts +++ b/packages/core/utils/src/notification/abstract-notification-provider.ts @@ -48,6 +48,16 @@ import { INotificationProvider, NotificationTypes } from "@medusajs/types" export class AbstractNotificationProviderService implements INotificationProvider { + /** + * Each notification provider has a unique ID used to identify it. + * + * @example + * class MyNotificationProviderService extends AbstractNotificationProviderService { + * static identifier = "my-notification" + * // ... + * } + */ + static identifier: string /** * This method validates the options of the provider set in `medusa-config.ts`. * Implementing this method is optional. It's useful if your provider requires custom validation.