Files
medusa-store/www/apps/resources/app/architectural-modules/notification/local/page.mdx
T
Shahed Nasser b6df24463d docs: updates for breaking changes (#9558)
- Update modules registration
- Update `medusa-config.js` to `medusa-config.ts`
- Update the out directory in the admin deployment guide
- Update logger imports
- Other fixes

Note: will need to re-generate references afterwards

Closes #9548
2024-10-14 10:40:30 +00:00

81 lines
1.7 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.
---
## Register the Local Notification Module
<Note>
The Local Notification Module Provider is registered by default in your application. It's configured to run on the `feed` channel.
</Note>
Add the module into the `providers` array of the Notification Module:
<Note>
Only one provider can be defined for a channel.
</Note>
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: [
{
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>