docs: add documentation for Locking Module (#11824)

* add locking docs

* fix main navbar

* added implementation example links

* generate refs

* update architecture

* fix vale error
This commit is contained in:
Shahed Nasser
2025-03-13 12:20:24 +02:00
committed by GitHub
parent 5cf0bf4d93
commit 28b0d08591
94 changed files with 15932 additions and 10857 deletions

View File

@@ -9,9 +9,17 @@ sidebar_label: Create Notification Provider
import { TypeList } from "docs-ui"
# How to Create a Notification Provider Module
# How to Create a Notification Module Provider
In this document, youll learn how to create a notification provider module and the methods you must implement in it.
In this document, youll learn how to create a Notification Module Provider and the methods you must implement in it.
---
## Implementation Example
As you implement your Notification Module Provider, it can be useful to refer to an existing provider and how it's implemeted.
If you need to refer to an existing implementation as an example, check the [SendGrid Notification Module Provider in the Medusa repository](https://github.com/medusajs/medusa/tree/develop/packages/modules/providers/notification-sendgrid).
---
@@ -31,11 +39,11 @@ The rest of this guide always uses the `src/modules/my-notification` directory a
---
## 2. Create the Notification Provider Service
## 2. Create the Notification Module Provider's Service
Create the file `src/modules/my-notification/service.ts` that holds the implementation of the notification service.
The Notification Provider Module's main service must extend the `AbstractNotificationProviderService` class imported from `@medusajs/framework/utils`:
The Notification Module Provider's main service must extend the `AbstractNotificationProviderService` class imported from `@medusajs/framework/utils`:
```ts title="src/modules/my-notification/service.ts"
import {
@@ -172,7 +180,7 @@ class MyNotificationProviderService extends AbstractNotificationProviderService
---
## 3. Create Module Definition File
## 3. Create Module Provider Definition File
Create the file `src/modules/my-notification/index.ts` with the following content:
@@ -188,11 +196,11 @@ export default ModuleProvider(Modules.NOTIFICATION, {
})
```
This exports the module's definition, indicating that the `MyNotificationProviderService` is the module's service.
This exports the module provider's definition, indicating that the `MyNotificationProviderService` is the module provider's service.
---
## 4. Use Module
## 4. Use Module Provider
To use your Notification Module Provider, add it to the `providers` array of the Notification Module in `medusa-config.ts`: