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:
@@ -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, you’ll learn how to create a notification provider module and the methods you must implement in it.
|
||||
In this document, you’ll 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`:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user