docs-util: add note for providers (#12432)
This commit is contained in:
@@ -74,7 +74,13 @@ export default ModuleProvider(Modules.AUTH, {
|
||||
})
|
||||
\`\`\`
|
||||
|
||||
This exports the module provider's definition, indicating that the \`MyAuthProviderService\` is the module provider's service.`,
|
||||
This exports the module provider's definition, indicating that the \`MyAuthProviderService\` is the module provider's service.
|
||||
|
||||
<Note title="Tip>
|
||||
|
||||
A auth module provider can have export multiple provider services, where each are registered as a separate auth provider.
|
||||
|
||||
</Note>`,
|
||||
`## 4. Use Module Provider
|
||||
|
||||
To use your Auth Module Provider, add it to the \`providers\` array of the Auth Module in \`medusa-config.ts\`:
|
||||
|
||||
@@ -75,7 +75,13 @@ export default ModuleProvider(Modules.FULFILLMENT, {
|
||||
})
|
||||
\`\`\`
|
||||
|
||||
This exports the module provider's definition, indicating that the \`MyFulfillmentProviderService\` is the module provider's service.`,
|
||||
This exports the module provider's definition, indicating that the \`MyFulfillmentProviderService\` is the module provider's service.
|
||||
|
||||
<Note title="Tip>
|
||||
|
||||
A fulfillment module provider can have export multiple provider services, where each are registered as a separate fulfillment provider.
|
||||
|
||||
</Note>`,
|
||||
`## 4. Use Module Provider
|
||||
|
||||
To use your Fulfillment Module Provider, add it to the \`providers\` array of the Fulfillment Module in \`medusa-config.ts\`:
|
||||
|
||||
@@ -77,7 +77,13 @@ export default ModuleProvider(Modules.NOTIFICATION, {
|
||||
})
|
||||
\`\`\`
|
||||
|
||||
This exports the module provider's definition, indicating that the \`MyNotificationProviderService\` is the module provider's service.`,
|
||||
This exports the module provider's definition, indicating that the \`MyNotificationProviderService\` is the module provider's service.
|
||||
|
||||
<Note title="Tip>
|
||||
|
||||
A notification module provider can have export multiple provider services, where each are registered as a separate notification provider.
|
||||
|
||||
</Note>`,
|
||||
`## 4. Use Module Provider
|
||||
|
||||
To use your Notification Module Provider, add it to the \`providers\` array of the Notification Module in \`medusa-config.ts\`:
|
||||
|
||||
@@ -86,7 +86,13 @@ export default ModuleProvider(Modules.PAYMENT, {
|
||||
})
|
||||
\`\`\`
|
||||
|
||||
This exports the module provider's definition, indicating that the \`MyPaymentProviderService\` is the module provider's service.`,
|
||||
This exports the module provider's definition, indicating that the \`MyPaymentProviderService\` is the module provider's service.
|
||||
|
||||
<Note title="Tip>
|
||||
|
||||
A payment module provider can have export multiple provider services, where each are registered as a separate payment provider.
|
||||
|
||||
</Note>`,
|
||||
`## 4. Use Module Provider
|
||||
|
||||
To use your Payment Module Provider, add it to the \`providers\` array of the Payment Module in \`medusa-config.ts\`:
|
||||
|
||||
@@ -42,7 +42,7 @@ The rest of this guide always uses the \`src/modules/my-tax\` directory as an ex
|
||||
</Note>`,
|
||||
`## 2. Create the Tax Module Provider's Service
|
||||
|
||||
Create the file \`src/modules/my-tax/service.ts\` that holds the module provider's main service. It must extend the \`ITaxProvider\` class imported from \`@medusajs/framework/types\`:
|
||||
Create the file \`src/modules/my-tax/service.ts\` that holds the module provider's main service. It must implement the \`ITaxProvider\` interface imported from \`@medusajs/framework/types\`:
|
||||
|
||||
\`\`\`ts title="src/modules/my-tax/service.ts"
|
||||
import { ITaxProvider } from "@medusajs/framework/types"
|
||||
@@ -69,7 +69,13 @@ export default ModuleProvider(Modules.TAX, {
|
||||
})
|
||||
\`\`\`
|
||||
|
||||
This exports the module provider's definition, indicating that the \`MyTaxProvider\` is the module provider's service.`,
|
||||
This exports the module provider's definition, indicating that the \`MyTaxProvider\` is the module provider's service.
|
||||
|
||||
<Note title="Tip>
|
||||
|
||||
A tax module provider can have export multiple provider services, where each are registered as a separate tax provider.
|
||||
|
||||
</Note>`,
|
||||
`## 4. Use Module Provider
|
||||
|
||||
To use your Tax Module Provider, add it to the \`providers\` array of the Tax Module in \`medusa-config.ts\`:
|
||||
|
||||
Reference in New Issue
Block a user