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:
Shahed Nasser authored and GitHub committed 2024-07-04 17:26:03 +03:00
1 parent 32982e708a
commit 964927b597
149 files changed
+1676 -3008

No files matched your search

@@ -39,10 +39,11 @@ Create the file \`src/modules/my-auth/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-auth/index.ts"
import MyAuthProviderService from "./service"
import { Module } from "@medusajs/utils"
export default {
export default Module("my-auth", {
service: MyAuthProviderService,
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyAuthProviderService\` is the main service of the module.`,
@@ -51,7 +52,7 @@ This exports the module's definition, indicating that the \`MyAuthProviderServic
To use your Auth Provider Module, add it to the \`providers\` array of the Auth Module:
\`\`\`js title="medusa-config.js"
const { Modules } = require("@medusajs/modules-sdk")
import { Modules } from "@medusajs/utils"
// ...
@@ -64,12 +65,9 @@ module.exports = defineConfig({
providers: [
{
resolve: "./modules/my-auth",
id: "my-auth",
options: {
config: {
"my-auth": {
// provider options...
},
},
// provider options...
},
},
],
@@ -39,10 +39,11 @@ Create the file \`src/modules/my-file/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-file/index.ts"
import MyFileProviderService from "./service"
import { Module } from "@medusajs/utils"
export default {
export default Module("my-file", {
service: MyFileProviderService,
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyFileProviderService\` is the main service of the module.`,
@@ -57,7 +58,7 @@ The File Module accepts one provider only.
</Note>
\`\`\`js title="medusa-config.js"
const { Modules } = require("@medusajs/modules-sdk")
import { Modules } from "@medusajs/utils"
// ...
@@ -70,12 +71,9 @@ module.exports = defineConfig({
providers: [
{
resolve: "./modules/my-file",
id: "my-file",
options: {
config: {
"my-file": {
// provider options...
},
},
// provider options...
},
},
],
@@ -39,10 +39,11 @@ Create the file \`src/modules/my-fulfillment/index.ts\` with the following conte
\`\`\`ts title="src/modules/my-fulfillment/index.ts"
import MyFulfillmentProviderService from "./service"
import { Module } from "@medusajs/utils"
export default {
export default Module("my-fulfillment", {
service: MyFulfillmentProviderService,
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyFulfillmentProviderService\` is the main service of the module.`,
@@ -51,7 +52,7 @@ This exports the module's definition, indicating that the \`MyFulfillmentProvide
To use your Fulfillment Provider Module, add it to the \`providers\` array of the Fulfillment Module:
\`\`\`js title="medusa-config.js"
const { Modules } = require("@medusajs/modules-sdk")
import { Modules } from "@medusajs/utils"
// ...
@@ -64,12 +65,9 @@ module.exports = defineConfig({
providers: [
{
resolve: "./modules/my-fulfillment",
id: "my-fulfillment",
options: {
config: {
"my-fulfillment": {
// provider options...
},
},
// provider options...
},
},
],
@@ -43,10 +43,11 @@ Create the file \`src/modules/my-notification/index.ts\` with the following cont
\`\`\`ts title="src/modules/my-notification/index.ts"
import MyNotificationProviderService from "./service"
import { Module } from "@medusajs/utils"
export default {
export default Module("my-notification", {
service: MyNotificationProviderService,
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyNotificationProviderService\` is the main service of the module.`,
@@ -61,7 +62,7 @@ The Notification Module accepts one provider per channel.
</Note>
\`\`\`js title="medusa-config.js"
const { Modules } = require("@medusajs/modules-sdk")
import { Modules } from "@medusajs/utils"
// ...
@@ -74,13 +75,10 @@ module.exports = defineConfig({
providers: [
{
resolve: "./modules/my-notification",
id: "my-notification",
options: {
config: {
"my-notification": {
channels: ["email"],
// provider options...
},
},
channels: ["email"],
// provider options...
},
},
],