* docs improvements and changes * updated module definition * modules + dml changes * fix build * fix vale error * fix lint errors * fixes to stripe docs * fix condition * fix condition * fix module defintion * fix checkout * disable UI action * change oas preview action * flatten provider module options * fix lint errors * add module link docs * pr comments fixes * fix vale error * change node engine version * links -> linkable * add note about database name * small fixes * link fixes * fix response code in api reference * added migrations step
87 lines
1.9 KiB
Plaintext
87 lines
1.9 KiB
Plaintext
import { Table } from "docs-ui"
|
|
|
|
export const metadata = {
|
|
title: `Local Notification Module Provider`,
|
|
}
|
|
|
|
# {metadata.title}
|
|
|
|
The Local Notification Module Provider simulates sending a notification, but only logs the notification's details in the terminal. This is useful for development.
|
|
|
|
---
|
|
|
|
## Install the Local Notification Module
|
|
|
|
<Note>
|
|
|
|
The Local Notification Module Provider is installed by default in your application.
|
|
|
|
</Note>
|
|
|
|
To install the Local Notification Module Provider, 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"
|
|
import { Modules } from "@medusajs/utils"
|
|
|
|
// ...
|
|
|
|
module.exports = defineConfig({
|
|
// ...
|
|
modules: {
|
|
[Modules.NOTIFICATION]: {
|
|
resolve: "@medusajs/notification",
|
|
options: {
|
|
providers: [
|
|
// ...
|
|
{
|
|
resolve: "@medusajs/notification-local",
|
|
id: "local",
|
|
options: {
|
|
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>
|