docs: update imports and package names across docs (#9375)
* docs: update imports and package names across docs + reference configs * generate files * fix import * change preview to rc
This commit is contained in:
+4
-4
@@ -20,10 +20,10 @@ const authProviderOptions: FormattingOptionsType = {
|
||||
Start by creating a new directory for your module. For example, \`src/modules/my-auth\`.`,
|
||||
`## 2. Create the Auth Provider Service
|
||||
|
||||
Create the file \`src/modules/my-auth/service.ts\` that holds the module's main service. It must extend the \`AbstractAuthModuleProvider\` class imported from \`@medusajs/utils\`:
|
||||
Create the file \`src/modules/my-auth/service.ts\` that holds the module's main service. It must extend the \`AbstractAuthModuleProvider\` class imported from \`@medusajs/framework/utils\`:
|
||||
|
||||
\`\`\`ts title="src/modules/my-auth/service.ts"
|
||||
import { AbstractAuthModuleProvider } from "@medusajs/utils"
|
||||
import { AbstractAuthModuleProvider } from "@medusajs/framework/utils"
|
||||
|
||||
class MyAuthProviderService extends AbstractAuthModuleProvider {
|
||||
// TODO implement methods
|
||||
@@ -51,7 +51,7 @@ This exports the module's definition, indicating that the \`MyAuthProviderServic
|
||||
To use your Auth Module Provider, add it to the \`providers\` array of the Auth Module:
|
||||
|
||||
\`\`\`js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/utils")
|
||||
const { Modules } = require("@medusajs/framework/utils")
|
||||
|
||||
// ...
|
||||
|
||||
@@ -59,7 +59,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
[Modules.AUTH]: {
|
||||
resolve: "@medusajs/auth",
|
||||
resolve: "@medusajs/framework/auth",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ const coreFlowsOptions: FormattingOptionsType = {
|
||||
},
|
||||
"^core_flows/.*/Workflows_.*/functions/.*/page\\.mdx": {
|
||||
reflectionDescription:
|
||||
"This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/core-flows` package.",
|
||||
"This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/medusa/core-flows` package.",
|
||||
frontmatterData: {
|
||||
slug: "/references/medusa-workflows/{{alias}}",
|
||||
sidebar_label: "{{alias}}",
|
||||
@@ -56,7 +56,7 @@ const coreFlowsOptions: FormattingOptionsType = {
|
||||
},
|
||||
"^core_flows/.*/Steps_.*/functions/.*/page\\.mdx": {
|
||||
reflectionDescription:
|
||||
"This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/core-flows` package.",
|
||||
"This documentation provides a reference to the `{{alias}}`. It belongs to the `@medusajs/medusa/core-flows` package.",
|
||||
frontmatterData: {
|
||||
slug: "/references/medusa-workflows/steps/{{alias}}",
|
||||
sidebar_label: "{{alias}}",
|
||||
|
||||
+4
-4
@@ -20,10 +20,10 @@ const fileOptions: FormattingOptionsType = {
|
||||
Start by creating a new directory for your module. For example, \`src/modules/my-file\`.`,
|
||||
`## 2. Create the File Provider Service
|
||||
|
||||
Create the file \`src/modules/my-file/service.ts\` that holds the implementation of the module's main service. It must extend the \`AbstractFileProviderService\` class imported from \`@medusajs/utils\`:
|
||||
Create the file \`src/modules/my-file/service.ts\` that holds the implementation of the module's main service. It must extend the \`AbstractFileProviderService\` class imported from \`@medusajs/framework/utils\`:
|
||||
|
||||
\`\`\`ts title="src/modules/my-file/service.ts"
|
||||
import { AbstractFileProviderService } from "@medusajs/utils"
|
||||
import { AbstractFileProviderService } from "@medusajs/framework/utils"
|
||||
|
||||
class MyFileProviderService extends AbstractFileProviderService {
|
||||
// TODO implement methods
|
||||
@@ -57,7 +57,7 @@ The File Module accepts one provider only.
|
||||
</Note>
|
||||
|
||||
\`\`\`js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/utils")
|
||||
const { Modules } = require("@medusajs/framework/utils")
|
||||
|
||||
// ...
|
||||
|
||||
@@ -65,7 +65,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
[Modules.FILE]: {
|
||||
resolve: "@medusajs/file",
|
||||
resolve: "@medusajs/framework/file",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
|
||||
+4
-4
@@ -20,10 +20,10 @@ const fulfillmentProviderOptions: FormattingOptionsType = {
|
||||
Start by creating a new directory for your module. For example, \`src/modules/my-fulfillment\`.`,
|
||||
`## 2. Create the Fulfillment Provider Service
|
||||
|
||||
Create the file \`src/modules/my-fulfillment/service.ts\` that holds the module's main service. It must extend the \`AbstractFulfillmentProviderService\` class imported from \`@medusajs/utils\`:
|
||||
Create the file \`src/modules/my-fulfillment/service.ts\` that holds the module's main service. It must extend the \`AbstractFulfillmentProviderService\` class imported from \`@medusajs/framework/utils\`:
|
||||
|
||||
\`\`\`ts title="src/modules/my-fulfillment/service.ts"
|
||||
import { AbstractFulfillmentProviderService } from "@medusajs/utils"
|
||||
import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils"
|
||||
|
||||
class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
// TODO implement methods
|
||||
@@ -51,7 +51,7 @@ This exports the module's definition, indicating that the \`MyFulfillmentProvide
|
||||
To use your Fulfillment Module Provider, add it to the \`providers\` array of the Fulfillment Module:
|
||||
|
||||
\`\`\`js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/utils")
|
||||
const { Modules } = require("@medusajs/framework/utils")
|
||||
|
||||
// ...
|
||||
|
||||
@@ -59,7 +59,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
[Modules.FULFILLMENT]: {
|
||||
resolve: "@medusajs/fulfillment",
|
||||
resolve: "@medusajs/framework/fulfillment",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ const helperStepsOptions: FormattingOptionsType = {
|
||||
},
|
||||
"^modules/helper_steps/page\\.mdx": {
|
||||
reflectionDescription:
|
||||
"This section of the documentation provides a reference to utility steps that you can use in your workflows. These steps are imported from the `@medusajs/core-flows` package.",
|
||||
"This section of the documentation provides a reference to utility steps that you can use in your workflows. These steps are imported from the `@medusajs/medusa/core-flows` package.",
|
||||
reflectionGroups: {
|
||||
Namespaces: false,
|
||||
Enumerations: false,
|
||||
@@ -35,7 +35,7 @@ const helperStepsOptions: FormattingOptionsType = {
|
||||
},
|
||||
"^helper_steps/functions": {
|
||||
reflectionDescription:
|
||||
"This documentation provides a reference to the `{{alias}}` step. It belongs to the `@medusajs/core-flows` package.",
|
||||
"This documentation provides a reference to the `{{alias}}` step. It belongs to the `@medusajs/medusa/core-flows` package.",
|
||||
frontmatterData: {
|
||||
slug: "/references/helper-steps/{{alias}}",
|
||||
sidebar_label: "{{alias}}",
|
||||
|
||||
+4
-4
@@ -22,12 +22,12 @@ Start by creating a new directory for your module. For example, \`src/modules/my
|
||||
|
||||
Create the file \`src/modules/my-notification/service.ts\` that holds the implementation of the notification service.
|
||||
|
||||
The Notification Provider Module's main service must extend the \`AbstractNotificationProviderService\` class imported from \`@medusajs/utils\`:
|
||||
The Notification Provider Module's main service must extend the \`AbstractNotificationProviderService\` class imported from \`@medusajs/framework/utils\`:
|
||||
|
||||
\`\`\`ts title="src/modules/my-notification/service.ts"
|
||||
import {
|
||||
AbstractNotificationProviderService
|
||||
} from "@medusajs/utils"
|
||||
} from "@medusajs/framework/utils"
|
||||
|
||||
class MyNotificationProviderService extends AbstractNotificationProviderService {
|
||||
// TODO add methods
|
||||
@@ -61,7 +61,7 @@ The Notification Module accepts one provider per channel.
|
||||
</Note>
|
||||
|
||||
\`\`\`js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/utils")
|
||||
const { Modules } = require("@medusajs/framework/utils")
|
||||
|
||||
// ...
|
||||
|
||||
@@ -69,7 +69,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
[Modules.NOTIFICATION]: {
|
||||
resolve: "@medusajs/notification",
|
||||
resolve: "@medusajs/framework/notification",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
|
||||
+4
-4
@@ -23,10 +23,10 @@ const paymentProviderOptions: FormattingOptionsType = {
|
||||
Start by creating a new directory for your module. For example, \`src/modules/my-payment\`.`,
|
||||
`## 2. Create the Payment Provider Service
|
||||
|
||||
Create the file \`src/modules/my-payment/service.ts\` that holds the module's main service. It must extend the \`AbstractPaymentProvider\` class imported from \`@medusajs/utils\`:
|
||||
Create the file \`src/modules/my-payment/service.ts\` that holds the module's main service. It must extend the \`AbstractPaymentProvider\` class imported from \`@medusajs/framework/utils\`:
|
||||
|
||||
\`\`\`ts title="src/modules/my-payment/service.ts"
|
||||
import { AbstractPaymentProvider } from "@medusajs/utils"
|
||||
import { AbstractPaymentProvider } from "@medusajs/framework/utils"
|
||||
|
||||
type Options = {
|
||||
apiKey: string
|
||||
@@ -60,7 +60,7 @@ This exports the module's definition, indicating that the \`MyPaymentProviderSer
|
||||
To use your Payment Module Provider, add it to the \`providers\` array of the Payment Module:
|
||||
|
||||
\`\`\`js title="medusa-config.js"
|
||||
const { Modules } = require("@medusajs/utils")
|
||||
const { Modules } = require("@medusajs/framework/utils")
|
||||
|
||||
// ...
|
||||
|
||||
@@ -68,7 +68,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: {
|
||||
[Modules.PAYMENT]: {
|
||||
resolve: "@medusajs/payment",
|
||||
resolve: "@medusajs/framework/payment",
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ const searchOptions: FormattingOptionsType = {
|
||||
|
||||
## Prerequisites
|
||||
|
||||
A search service must extend the \`AbstractSearchService\` class imported from the \`@medusajs/utils\` package. If you don’t already have the package
|
||||
A search service must extend the \`AbstractSearchService\` class imported from the \`@medusajs/framework/utils\` package. If you don’t already have the package
|
||||
installed, run the following command to install it within your project:
|
||||
|
||||
\`\`\`bash npm2yarn
|
||||
|
||||
+2
-2
@@ -12,7 +12,7 @@ const workflowsOptions: FormattingOptionsType = {
|
||||
},
|
||||
"^modules/workflows/page\\.mdx": {
|
||||
reflectionDescription:
|
||||
"This section of the documentation provides a reference to the utility functions of the `@medusajs/workflows-sdk` package.",
|
||||
"This section of the documentation provides a reference to the utility functions of the `@medusajs/framework/workflows-sdk` package.",
|
||||
reflectionGroups: {
|
||||
Namespaces: false,
|
||||
Enumerations: false,
|
||||
@@ -32,7 +32,7 @@ const workflowsOptions: FormattingOptionsType = {
|
||||
"^workflows/functions": {
|
||||
maxLevel: 1,
|
||||
reflectionDescription:
|
||||
"This documentation provides a reference to the `{{alias}}` {{kind}}. It belongs to the `@medusajs/workflows-sdk` package.",
|
||||
"This documentation provides a reference to the `{{alias}}` {{kind}}. It belongs to the `@medusajs/framework/workflows-sdk` package.",
|
||||
frontmatterData: {
|
||||
slug: "/references/workflows/{{alias}}",
|
||||
sidebar_label: "{{alias}}",
|
||||
|
||||
Reference in New Issue
Block a user