* docs: changes based on DX changes * remove fields no longer needed * remove unnecessary parameters * fixes to authenticate middleware usage * add highlight to migrations config * change configuration to http * added missing remote link docs * fix name in sidebar * added notification module docs + updated file module docs * add vale exceptions * fix vale errors * added docs on custom cli scripts
81 lines
1.8 KiB
Plaintext
81 lines
1.8 KiB
Plaintext
import { Table } from "docs-ui"
|
|
|
|
export const metadata = {
|
|
title: `Local Notification Provider Module`,
|
|
}
|
|
|
|
# {metadata.title}
|
|
|
|
The Local Notification Provider Module simulates sending a notification, but only logs the notification's details in the terminal. This is useful for development.
|
|
|
|
---
|
|
|
|
## Install the Local Notification Module
|
|
|
|
To install the Local Notification Provider Module, run the following command in the directory of your Medusa application:
|
|
|
|
```bash npm2yarn
|
|
npm install @medusajs/notification-local
|
|
```
|
|
|
|
Next, add the module into the `providers` array of the Notification Module:
|
|
|
|
<Note>
|
|
|
|
Only one provider can be defined for a channel.
|
|
|
|
</Note>
|
|
|
|
```js title="medusa-config.js"
|
|
module.exports = {
|
|
// ...
|
|
modules: {
|
|
// ...
|
|
[Modules.NOTIFICATION]: {
|
|
resolve: "@medusajs/notification",
|
|
options: {
|
|
providers: [
|
|
// ...
|
|
{
|
|
resolve: "@medusajs/notification-local",
|
|
options: {
|
|
config: {
|
|
local: {
|
|
channels: ["email"]
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
},
|
|
}
|
|
```
|
|
|
|
### Local Notification Module Options
|
|
|
|
<Table>
|
|
<Table.Header>
|
|
<Table.Row>
|
|
<Table.HeaderCell>Option</Table.HeaderCell>
|
|
<Table.HeaderCell>Description</Table.HeaderCell>
|
|
</Table.Row>
|
|
</Table.Header>
|
|
<Table.Body>
|
|
<Table.Row>
|
|
<Table.Cell>
|
|
|
|
`channels`
|
|
|
|
</Table.Cell>
|
|
<Table.Cell>
|
|
|
|
The channels this notification module is used to send notifications for. While the local notification module doesn't actually send the notification,
|
|
it's important to specify its channels to make sure it's used when a notification for that channel is created.
|
|
|
|
</Table.Cell>
|
|
</Table.Row>
|
|
</Table.Body>
|
|
</Table>
|