docs: general fixes and improvements (#7918)
* 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
This commit is contained in:
@@ -33,7 +33,7 @@ Only one provider can be defined for a channel.
|
||||
</Note>
|
||||
|
||||
```js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
import { Modules } from "@medusajs/utils"
|
||||
|
||||
// ...
|
||||
|
||||
@@ -47,12 +47,9 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
{
|
||||
resolve: "@medusajs/notification-local",
|
||||
id: "local",
|
||||
options: {
|
||||
config: {
|
||||
local: {
|
||||
channels: ["email"],
|
||||
},
|
||||
},
|
||||
channels: ["email"],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -31,7 +31,7 @@ When you send a notification, you specify the channel to send it through, such a
|
||||
For example:
|
||||
|
||||
```js title="medusa-config.js" highlights={[["19"]]}
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
import { Modules } from "@medusajs/utils"
|
||||
|
||||
// ...
|
||||
|
||||
@@ -46,12 +46,9 @@ module.exports = {
|
||||
// ...
|
||||
{
|
||||
resolve: "@medusajs/notification-local",
|
||||
id: "notification",
|
||||
options: {
|
||||
config: {
|
||||
local: {
|
||||
channels: ["email"],
|
||||
},
|
||||
},
|
||||
channels: ["email"],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
+4
-1
@@ -33,7 +33,10 @@ export const highlights = [
|
||||
]
|
||||
|
||||
```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-7" expandButtonLabel="Show Imports"
|
||||
import type { SubscriberArgs, SubscriberConfig } from "@medusajs/medusa"
|
||||
import type {
|
||||
SubscriberArgs,
|
||||
SubscriberConfig,
|
||||
} from "@medusajs/medusa"
|
||||
import { ModuleRegistrationName } from "@medusajs/utils"
|
||||
import { INotificationModuleService } from "@medusajs/types"
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Only one provider can be defined for a channel.
|
||||
</Note>
|
||||
|
||||
```js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/modules-sdk")
|
||||
import { Modules } from "@medusajs/utils"
|
||||
|
||||
// ...
|
||||
|
||||
@@ -49,14 +49,11 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
{
|
||||
resolve: "@medusajs/notification-sendgrid",
|
||||
id: "sendgrid",
|
||||
options: {
|
||||
config: {
|
||||
sendgrid: {
|
||||
channels: ["email"],
|
||||
api_key: process.env.SENDGRID_API_KEY,
|
||||
from: process.env.SENDGRID_FROM,
|
||||
},
|
||||
},
|
||||
channels: ["email"],
|
||||
api_key: process.env.SENDGRID_API_KEY,
|
||||
from: process.env.SENDGRID_FROM,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -130,7 +127,10 @@ export const highlights = [
|
||||
]
|
||||
|
||||
```ts title="src/subscribers/product-created.ts" highlights={highlights} collapsibleLines="1-7" expandButtonLabel="Show Imports"
|
||||
import type { SubscriberArgs, SubscriberConfig } from "@medusajs/medusa"
|
||||
import type {
|
||||
SubscriberArgs,
|
||||
SubscriberConfig,
|
||||
} from "@medusajs/medusa"
|
||||
import { ModuleRegistrationName } from "@medusajs/utils"
|
||||
import { INotificationModuleService } from "@medusajs/types"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user